@baseline-ui/core 3.2.1 → 3.4.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 (458) hide show
  1. package/dist/Accordion.css +1 -1
  2. package/dist/Accordion.mjs +1 -1
  3. package/dist/ActionButton.css +1 -1
  4. package/dist/ActionButton.mjs +1 -1
  5. package/dist/ActionGroup.css +1 -1
  6. package/dist/ActionGroup.mjs +1 -1
  7. package/dist/ActionIconButton.css +1 -1
  8. package/dist/ActionIconButton.mjs +1 -1
  9. package/dist/Actionable.mjs +1 -1
  10. package/dist/AlertDialog.css +1 -1
  11. package/dist/AlertDialog.mjs +1 -1
  12. package/dist/AudioPlayer.css +1 -1
  13. package/dist/AudioPlayer.mjs +1 -1
  14. package/dist/Avatar.mjs +1 -1
  15. package/dist/ButtonSelect.css +1 -1
  16. package/dist/ButtonSelect.mjs +1 -1
  17. package/dist/Calendar.css +1 -1
  18. package/dist/Calendar.mjs +1 -1
  19. package/dist/Checkbox.mjs +1 -1
  20. package/dist/ColorInput.css +1 -1
  21. package/dist/ColorInput.mjs +1 -1
  22. package/dist/ColorSwatch.mjs +1 -1
  23. package/dist/ColorSwatchPicker.mjs +1 -1
  24. package/dist/ComboBox.css +1 -1
  25. package/dist/ComboBox.mjs +1 -1
  26. package/dist/DateField.css +1 -1
  27. package/dist/DateField.mjs +1 -1
  28. package/dist/DateFormat.mjs +1 -1
  29. package/dist/Dialog.css +1 -1
  30. package/dist/Dialog.mjs +1 -1
  31. package/dist/Disclosure.mjs +1 -1
  32. package/dist/DomNodeRenderer.mjs +1 -1
  33. package/dist/Drawer.css +1 -1
  34. package/dist/Drawer.mjs +1 -1
  35. package/dist/Editor.css +1 -1
  36. package/dist/Editor.mjs +1 -1
  37. package/dist/FileInput.css +1 -1
  38. package/dist/FileInput.mjs +1 -1
  39. package/dist/FileList.css +1 -1
  40. package/dist/FileList.mjs +1 -1
  41. package/dist/FileUploader.css +1 -1
  42. package/dist/FileUploader.mjs +1 -1
  43. package/dist/FrameProvider.mjs +1 -1
  44. package/dist/FreehandCanvas.css +1 -1
  45. package/dist/FreehandCanvas.mjs +1 -1
  46. package/dist/GridList.mjs +1 -1
  47. package/dist/Group.mjs +1 -1
  48. package/dist/I18nProvider.mjs +1 -1
  49. package/dist/Icon.mjs +1 -1
  50. package/dist/ImageDropZone.css +1 -1
  51. package/dist/ImageDropZone.mjs +1 -1
  52. package/dist/ImageGallery.css +1 -1
  53. package/dist/ImageGallery.mjs +1 -1
  54. package/dist/InlineAlert.css +1 -1
  55. package/dist/InlineAlert.mjs +1 -1
  56. package/dist/InlineToolbar.mjs +2 -2
  57. package/dist/Kbd.mjs +1 -1
  58. package/dist/Link.mjs +1 -1
  59. package/dist/ListBox.mjs +1 -1
  60. package/dist/Menu.css +1 -1
  61. package/dist/Menu.mjs +1 -1
  62. package/dist/MessageFormat.mjs +1 -1
  63. package/dist/Modal.mjs +1 -1
  64. package/dist/NumberFormat.mjs +1 -1
  65. package/dist/NumberInput.css +1 -1
  66. package/dist/NumberInput.mjs +1 -1
  67. package/dist/Pagination.css +1 -1
  68. package/dist/Pagination.mjs +1 -1
  69. package/dist/Panel.mjs +1 -1
  70. package/dist/PointPicker.mjs +1 -1
  71. package/dist/Popover.mjs +1 -1
  72. package/dist/Portal.mjs +1 -1
  73. package/dist/Preview.css +1 -1
  74. package/dist/Preview.mjs +1 -1
  75. package/dist/ProgressBar.mjs +1 -1
  76. package/dist/ProgressSpinner.mjs +1 -1
  77. package/dist/RadioGroup.mjs +1 -1
  78. package/dist/Reaction.mjs +1 -1
  79. package/dist/ScrollControlButton.mjs +1 -1
  80. package/dist/SearchInput.css +1 -1
  81. package/dist/SearchInput.mjs +1 -1
  82. package/dist/Select.css +1 -1
  83. package/dist/Select.mjs +1 -1
  84. package/dist/Separator.mjs +1 -1
  85. package/dist/Slider.css +1 -1
  86. package/dist/Slider.mjs +1 -1
  87. package/dist/StatusCard.mjs +1 -1
  88. package/dist/Stepper.mjs +1 -1
  89. package/dist/Switch.mjs +1 -1
  90. package/dist/Table.mjs +1 -1
  91. package/dist/Tabs.css +1 -1
  92. package/dist/Tabs.mjs +1 -1
  93. package/dist/Tag.mjs +1 -1
  94. package/dist/TagGroup.mjs +1 -1
  95. package/dist/TaggedPagination.css +1 -1
  96. package/dist/TaggedPagination.mjs +1 -1
  97. package/dist/Text.mjs +1 -1
  98. package/dist/TextInput.mjs +1 -1
  99. package/dist/ThemeProvider.mjs +1 -1
  100. package/dist/TimeField.mjs +1 -1
  101. package/dist/Toast.css +1 -1
  102. package/dist/Toast.mjs +1 -1
  103. package/dist/ToggleButton.css +1 -1
  104. package/dist/ToggleButton.mjs +1 -1
  105. package/dist/ToggleIconButton.mjs +1 -1
  106. package/dist/Toolbar.css +1 -1
  107. package/dist/Toolbar.mjs +1 -1
  108. package/dist/Tooltip.mjs +1 -1
  109. package/dist/TreeView.css +1 -1
  110. package/dist/TreeView.mjs +1 -1
  111. package/dist/UNSAFE_ListBox.mjs +1 -1
  112. package/dist/Virtualizer.mjs +1 -1
  113. package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
  114. package/dist/{chunk-3UH5CQQF.mjs → chunk-22VRCVTH.mjs} +2 -2
  115. package/dist/chunk-235S3EB7.mjs +10 -0
  116. package/dist/chunk-24R46WQW.mjs +10 -0
  117. package/dist/chunk-2F3CFR22.mjs +10 -0
  118. package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
  119. package/dist/{chunk-4SBMUWOY.mjs → chunk-2LFMBQKQ.mjs} +2 -2
  120. package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
  121. package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
  122. package/dist/{chunk-DAN5WASP.mjs → chunk-36ZMHBG5.mjs} +2 -2
  123. package/dist/chunk-3BEG3MEX.mjs +10 -0
  124. package/dist/chunk-3BG6K2G2.mjs +10 -0
  125. package/dist/{chunk-SNQDFFKP.mjs → chunk-3DWFAHR2.mjs} +1 -1
  126. package/dist/{chunk-FOEGHU3P.mjs → chunk-3KCSUNRV.mjs} +1 -1
  127. package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
  128. package/dist/chunk-4AG2RUAZ.mjs +10 -0
  129. package/dist/{chunk-7OCDKTTZ.mjs → chunk-4EANTENO.mjs} +1 -1
  130. package/dist/{chunk-JJPCZOOI.mjs → chunk-4EAXDHSV.mjs} +2 -2
  131. package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
  132. package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
  133. package/dist/chunk-4MHBLLHV.mjs +11 -0
  134. package/dist/chunk-4P247R4V.mjs +10 -0
  135. package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
  136. package/dist/chunk-4RSUKS23.mjs +10 -0
  137. package/dist/chunk-4S4GGUSH.mjs +10 -0
  138. package/dist/chunk-4W5VP4NV.mjs +10 -0
  139. package/dist/chunk-5BKC373Y.mjs +10 -0
  140. package/dist/chunk-5FK5AJ7A.mjs +10 -0
  141. package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
  142. package/dist/{chunk-F2O4AP7P.mjs → chunk-5MUEJ5WI.mjs} +1 -1
  143. package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
  144. package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
  145. package/dist/{chunk-4DTPDMSQ.mjs → chunk-5VNC6UYE.mjs} +2 -2
  146. package/dist/chunk-5ZC64ZG7.mjs +10 -0
  147. package/dist/{chunk-246VHB32.mjs → chunk-6G7EUNZW.mjs} +1 -1
  148. package/dist/chunk-6QQEK5I6.mjs +10 -0
  149. package/dist/chunk-76DKF2SK.mjs +10 -0
  150. package/dist/{chunk-4BYKAG4W.mjs → chunk-7L5UOGZA.mjs} +1 -1
  151. package/dist/chunk-7MMO7S3R.mjs +10 -0
  152. package/dist/{chunk-HDVWQ6RL.mjs → chunk-7P7VZMTO.mjs} +1 -1
  153. package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
  154. package/dist/chunk-7SQRBY7N.mjs +10 -0
  155. package/dist/chunk-7TE4MFKC.mjs +10 -0
  156. package/dist/chunk-7XGNJE7J.mjs +10 -0
  157. package/dist/{chunk-UCQJ6FJO.mjs → chunk-AD3MLX6G.mjs} +1 -1
  158. package/dist/chunk-AELTF2DE.mjs +10 -0
  159. package/dist/chunk-AI6WQPRX.mjs +10 -0
  160. package/dist/chunk-AK7XHUQW.mjs +10 -0
  161. package/dist/chunk-AM5FU4Y7.mjs +10 -0
  162. package/dist/chunk-AYQN3OH2.mjs +10 -0
  163. package/dist/chunk-B3EZOXNU.mjs +10 -0
  164. package/dist/chunk-BBYODNBO.mjs +10 -0
  165. package/dist/chunk-BGQRLALS.mjs +10 -0
  166. package/dist/chunk-BGRGRUG4.mjs +10 -0
  167. package/dist/chunk-BHJCYKFJ.mjs +11 -0
  168. package/dist/{chunk-K6MB234H.mjs → chunk-BIDNNBRG.mjs} +1 -1
  169. package/dist/{chunk-RBZ7SIZR.mjs → chunk-BROSGYL3.mjs} +1 -1
  170. package/dist/chunk-BTPAZDGG.mjs +10 -0
  171. package/dist/{chunk-TNU3YDGL.mjs → chunk-BXNNVZOQ.mjs} +1 -1
  172. package/dist/chunk-BYDJXA5A.mjs +10 -0
  173. package/dist/chunk-C2VP5IEB.mjs +10 -0
  174. package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
  175. package/dist/chunk-CIPPPD6E.mjs +10 -0
  176. package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
  177. package/dist/{chunk-MXKP7NQ4.mjs → chunk-COHK4QQW.mjs} +2 -2
  178. package/dist/chunk-CTSDHAAV.mjs +10 -0
  179. package/dist/chunk-CU6D2EA6.mjs +10 -0
  180. package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
  181. package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
  182. package/dist/chunk-DAN62T2M.mjs +10 -0
  183. package/dist/{chunk-KAVZW4RV.mjs → chunk-DAS5QGJX.mjs} +1 -1
  184. package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
  185. package/dist/{chunk-H2E7GKGB.mjs → chunk-DSV6CCI6.mjs} +2 -2
  186. package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
  187. package/dist/{chunk-3L7GTQXK.mjs → chunk-E22TWF63.mjs} +2 -2
  188. package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
  189. package/dist/chunk-ETM4MNG4.mjs +10 -0
  190. package/dist/chunk-EUVUJQ2Z.mjs +10 -0
  191. package/dist/chunk-F7WPMQ3P.mjs +16 -0
  192. package/dist/chunk-FOKMDEP7.mjs +10 -0
  193. package/dist/chunk-FPFGTGUC.mjs +10 -0
  194. package/dist/chunk-FPM5UJRF.mjs +10 -0
  195. package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
  196. package/dist/chunk-GCBMNOA6.mjs +10 -0
  197. package/dist/chunk-GFKZXGWJ.mjs +10 -0
  198. package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
  199. package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
  200. package/dist/chunk-GMALMQWI.mjs +10 -0
  201. package/dist/chunk-GQIS4QBN.mjs +10 -0
  202. package/dist/chunk-GUPSQSPC.mjs +0 -0
  203. package/dist/chunk-HH4VLTF3.mjs +10 -0
  204. package/dist/chunk-I7LPPUZS.mjs +10 -0
  205. package/dist/chunk-IEOHIOGL.mjs +10 -0
  206. package/dist/chunk-IHES52NR.mjs +10 -0
  207. package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
  208. package/dist/chunk-IUXXTORQ.mjs +10 -0
  209. package/dist/{chunk-XIXHGXIN.mjs → chunk-IVGNOQSQ.mjs} +1 -1
  210. package/dist/chunk-IWZXZ5LU.mjs +10 -0
  211. package/dist/{chunk-HXTAOYOD.mjs → chunk-IXRSSEHQ.mjs} +1 -1
  212. package/dist/chunk-J4OPD7OL.mjs +10 -0
  213. package/dist/{chunk-J7RVOP5G.mjs → chunk-JDIGAVFU.mjs} +1 -1
  214. package/dist/{chunk-NSC53QWT.mjs → chunk-JZXLV6JU.mjs} +1 -1
  215. package/dist/chunk-K4TTZX4T.mjs +10 -0
  216. package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
  217. package/dist/chunk-K7VOXFSK.mjs +10 -0
  218. package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
  219. package/dist/chunk-KGS3UWPG.mjs +10 -0
  220. package/dist/{chunk-W3ZGXUFP.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
  221. package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
  222. package/dist/chunk-KUDCYGII.mjs +10 -0
  223. package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
  224. package/dist/chunk-KX7WG3L4.mjs +10 -0
  225. package/dist/chunk-LJZ7ZS4C.mjs +10 -0
  226. package/dist/{chunk-BZTAFNPW.mjs → chunk-LPI2NIDI.mjs} +1 -1
  227. package/dist/{chunk-2HMLSXNO.mjs → chunk-MBRNO6IW.mjs} +1 -1
  228. package/dist/chunk-MDE2FQHX.mjs +10 -0
  229. package/dist/chunk-MFB3SWO7.mjs +29 -0
  230. package/dist/{chunk-J7K7I5U2.mjs → chunk-MIF6BAPG.mjs} +1 -1
  231. package/dist/chunk-MYJ733MN.mjs +10 -0
  232. package/dist/chunk-MZIQ27JP.mjs +10 -0
  233. package/dist/chunk-NJKSUI2F.mjs +10 -0
  234. package/dist/chunk-NKC4MIX3.mjs +10 -0
  235. package/dist/{chunk-XB657BXX.mjs → chunk-NMGKHMH3.mjs} +1 -1
  236. package/dist/{chunk-TDPODC62.mjs → chunk-NMSOOQB2.mjs} +1 -1
  237. package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
  238. package/dist/chunk-NRQSR3G7.mjs +10 -0
  239. package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
  240. package/dist/chunk-NYCG264A.mjs +10 -0
  241. package/dist/chunk-NZNOHFLD.mjs +10 -0
  242. package/dist/chunk-O4DA3TPW.mjs +11 -0
  243. package/dist/{chunk-4PYEGHW5.mjs → chunk-O7IU5NHN.mjs} +2 -2
  244. package/dist/chunk-ONEE6UCM.mjs +10 -0
  245. package/dist/chunk-OQPYPKZV.mjs +10 -0
  246. package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
  247. package/dist/chunk-OZMADP4Z.mjs +10 -0
  248. package/dist/chunk-P7BN7QDF.mjs +10 -0
  249. package/dist/chunk-PD5ZXNGT.mjs +10 -0
  250. package/dist/{chunk-WICBTAMY.mjs → chunk-PG3WDHSK.mjs} +1 -1
  251. package/dist/chunk-PMDRFB75.mjs +10 -0
  252. package/dist/chunk-PPHSLODC.mjs +10 -0
  253. package/dist/chunk-PYV5J322.mjs +11 -0
  254. package/dist/{chunk-TPNZG6FA.mjs → chunk-Q4SEEMIX.mjs} +1 -1
  255. package/dist/{chunk-IE3E4KQ6.mjs → chunk-Q6PGYMYI.mjs} +2 -2
  256. package/dist/chunk-QAAOC64D.mjs +10 -0
  257. package/dist/chunk-QJYPCVSD.mjs +10 -0
  258. package/dist/chunk-QU34XSML.mjs +10 -0
  259. package/dist/chunk-QUQ4VYCN.mjs +10 -0
  260. package/dist/chunk-R3HHMCE5.mjs +10 -0
  261. package/dist/chunk-R4MOUAJW.mjs +10 -0
  262. package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
  263. package/dist/{chunk-H4ZIN7W3.mjs → chunk-R7R7JDA3.mjs} +2 -2
  264. package/dist/{chunk-2NO2ITVE.mjs → chunk-RO5ZRU3Y.mjs} +1 -1
  265. package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
  266. package/dist/chunk-RXSX2RKA.mjs +10 -0
  267. package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
  268. package/dist/chunk-S4HLMIFK.mjs +10 -0
  269. package/dist/{chunk-FTYXFTJV.mjs → chunk-SBR5UAUY.mjs} +2 -2
  270. package/dist/chunk-SD43KVTU.mjs +10 -0
  271. package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
  272. package/dist/chunk-SLFKSR3T.mjs +10 -0
  273. package/dist/chunk-SLSJEMQ4.mjs +10 -0
  274. package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
  275. package/dist/chunk-SVIYLH7R.mjs +10 -0
  276. package/dist/chunk-SVTTHYTR.mjs +10 -0
  277. package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
  278. package/dist/chunk-SZCVQU55.mjs +10 -0
  279. package/dist/chunk-SZN2J2ER.mjs +10 -0
  280. package/dist/{chunk-RM2Y4D2M.mjs → chunk-SZTFMBPY.mjs} +1 -1
  281. package/dist/chunk-TAT552A5.mjs +10 -0
  282. package/dist/{chunk-IHLJTHGQ.mjs → chunk-TDYBXLYP.mjs} +1 -1
  283. package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
  284. package/dist/{chunk-ENDOKA57.mjs → chunk-TH4XPZEO.mjs} +1 -1
  285. package/dist/chunk-TSHZ7JSR.mjs +10 -0
  286. package/dist/{chunk-WN6FAICZ.mjs → chunk-TUJLNJPJ.mjs} +2 -2
  287. package/dist/chunk-TUY23KMK.mjs +10 -0
  288. package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
  289. package/dist/chunk-UDMNDUBO.mjs +10 -0
  290. package/dist/chunk-UFN2OAM2.mjs +10 -0
  291. package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
  292. package/dist/chunk-UNGYVWKZ.mjs +10 -0
  293. package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
  294. package/dist/chunk-UUTMZQQA.mjs +15 -0
  295. package/dist/chunk-UZ672WDX.mjs +10 -0
  296. package/dist/chunk-VETO7WNN.mjs +10 -0
  297. package/dist/chunk-VGFPT43C.mjs +10 -0
  298. package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
  299. package/dist/{chunk-ODDEW5IV.mjs → chunk-W7OTSFZS.mjs} +1 -1
  300. package/dist/chunk-WHN2SEWO.mjs +10 -0
  301. package/dist/{chunk-6DU65N7Q.mjs → chunk-WTAJLO6E.mjs} +2 -2
  302. package/dist/{chunk-NVS22MIQ.mjs → chunk-X5Z54UUE.mjs} +1 -1
  303. package/dist/chunk-XD43CVDT.mjs +10 -0
  304. package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
  305. package/dist/chunk-XMGPNXZH.mjs +10 -0
  306. package/dist/chunk-XWJJ4V3O.mjs +10 -0
  307. package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
  308. package/dist/chunk-YF63IQQR.mjs +10 -0
  309. package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
  310. package/dist/chunk-YMYMFVW4.mjs +10 -0
  311. package/dist/chunk-YPEAGD2G.mjs +10 -0
  312. package/dist/chunk-YQHHE5AT.mjs +10 -0
  313. package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
  314. package/dist/{chunk-OFWPRDTC.mjs → chunk-YU5NRJT6.mjs} +2 -2
  315. package/dist/{chunk-TEQE6WCH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
  316. package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
  317. package/dist/{chunk-ZAMDRHQY.mjs → chunk-ZZIQF6XD.mjs} +1 -1
  318. package/dist/hooks/useContainerScopedRef.mjs +1 -1
  319. package/dist/hooks/useDevice.mjs +1 -1
  320. package/dist/hooks/useI18n.mjs +1 -1
  321. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  322. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  323. package/dist/hooks/useLocalStorage.mjs +1 -1
  324. package/dist/hooks/useMedia.mjs +1 -1
  325. package/dist/hooks/useMutationObserver.mjs +1 -1
  326. package/dist/hooks/usePortalContainer.mjs +1 -1
  327. package/dist/hooks/usePreventFocus.mjs +1 -1
  328. package/dist/hooks/useResizeObserver.mjs +1 -1
  329. package/dist/hooks/useTextSelection.mjs +1 -1
  330. package/dist/hooks/useUndoRedo.mjs +1 -1
  331. package/dist/index.css +1 -1
  332. package/dist/index.d.ts +423 -199
  333. package/dist/index.js +21 -20
  334. package/dist/index.mjs +1 -1
  335. package/dist/react-aria.mjs +1 -1
  336. package/dist/react-stately.mjs +1 -1
  337. package/dist/utils/colors.mjs +1 -1
  338. package/dist/utils/dom.mjs +1 -1
  339. package/dist/utils/isInShadowDOM.mjs +1 -1
  340. package/dist/utils/keyboards.mjs +1 -1
  341. package/messages.json +1 -1
  342. package/package.json +6 -6
  343. package/sbom.json +27 -77
  344. package/dist/chunk-3BL5D3CA.mjs +0 -10
  345. package/dist/chunk-3FYY26ED.mjs +0 -10
  346. package/dist/chunk-3JL2TJZL.mjs +0 -10
  347. package/dist/chunk-3W6RWDIE.mjs +0 -10
  348. package/dist/chunk-47I3USMC.mjs +0 -10
  349. package/dist/chunk-4I4TIV2G.mjs +0 -10
  350. package/dist/chunk-4MRHG5IU.mjs +0 -10
  351. package/dist/chunk-4TAUFBXO.mjs +0 -10
  352. package/dist/chunk-55YEATL7.mjs +0 -10
  353. package/dist/chunk-5TDFLLMX.mjs +0 -10
  354. package/dist/chunk-63KRQW56.mjs +0 -10
  355. package/dist/chunk-66NJ7EYY.mjs +0 -10
  356. package/dist/chunk-6DGD7BZA.mjs +0 -10
  357. package/dist/chunk-6IRWW75G.mjs +0 -10
  358. package/dist/chunk-6Y6BYHT4.mjs +0 -10
  359. package/dist/chunk-6ZFBX7C7.mjs +0 -10
  360. package/dist/chunk-7PRJIPFA.mjs +0 -10
  361. package/dist/chunk-7VHON5HL.mjs +0 -10
  362. package/dist/chunk-A24DWFQ2.mjs +0 -10
  363. package/dist/chunk-AC7OXVHA.mjs +0 -10
  364. package/dist/chunk-AKES5B6C.mjs +0 -10
  365. package/dist/chunk-AL3FICFA.mjs +0 -10
  366. package/dist/chunk-AQYBKDT2.mjs +0 -16
  367. package/dist/chunk-AUOQSTS5.mjs +0 -10
  368. package/dist/chunk-AZRPXTYJ.mjs +0 -10
  369. package/dist/chunk-B7PSE5KC.mjs +0 -10
  370. package/dist/chunk-BGMVPFYK.mjs +0 -10
  371. package/dist/chunk-BJVFZYUV.mjs +0 -10
  372. package/dist/chunk-BU5H25MV.mjs +0 -10
  373. package/dist/chunk-C3W4WN2O.mjs +0 -10
  374. package/dist/chunk-C5P23FUW.mjs +0 -10
  375. package/dist/chunk-CAWUDHAE.mjs +0 -10
  376. package/dist/chunk-D5EEZT5J.mjs +0 -10
  377. package/dist/chunk-DSSMBDVA.mjs +0 -10
  378. package/dist/chunk-EA6GA4WC.mjs +0 -10
  379. package/dist/chunk-EADUR7IC.mjs +0 -10
  380. package/dist/chunk-EK3RIYMV.mjs +0 -10
  381. package/dist/chunk-EX2LI2CV.mjs +0 -10
  382. package/dist/chunk-F2X474RV.mjs +0 -10
  383. package/dist/chunk-G3K2DXNP.mjs +0 -10
  384. package/dist/chunk-GLT45FXJ.mjs +0 -10
  385. package/dist/chunk-GS4C6CYA.mjs +0 -10
  386. package/dist/chunk-HONWMHMX.mjs +0 -10
  387. package/dist/chunk-HZHAKW6I.mjs +0 -10
  388. package/dist/chunk-INDVRI57.mjs +0 -10
  389. package/dist/chunk-JDLUGVXG.mjs +0 -10
  390. package/dist/chunk-JF4BWG7T.mjs +0 -10
  391. package/dist/chunk-JQ4ZGZPV.mjs +0 -15
  392. package/dist/chunk-JUXBZ2ZN.mjs +0 -10
  393. package/dist/chunk-KEVERVHK.mjs +0 -10
  394. package/dist/chunk-KKJ6XIU3.mjs +0 -10
  395. package/dist/chunk-KLNQ24LT.mjs +0 -10
  396. package/dist/chunk-KPEONVLU.mjs +0 -10
  397. package/dist/chunk-KUEDQO7P.mjs +0 -10
  398. package/dist/chunk-KY3JKXSX.mjs +0 -10
  399. package/dist/chunk-LRZ6BQFQ.mjs +0 -10
  400. package/dist/chunk-LTIDSWDM.mjs +0 -10
  401. package/dist/chunk-LZFTBNPW.mjs +0 -10
  402. package/dist/chunk-M5M3EPG5.mjs +0 -10
  403. package/dist/chunk-MFH2E2GU.mjs +0 -10
  404. package/dist/chunk-MFNWPTNI.mjs +0 -10
  405. package/dist/chunk-MHUFXHRU.mjs +0 -10
  406. package/dist/chunk-MI7DCFP2.mjs +0 -10
  407. package/dist/chunk-MNAD5FJH.mjs +0 -10
  408. package/dist/chunk-MRJFGHFW.mjs +0 -10
  409. package/dist/chunk-MVK5CB64.mjs +0 -10
  410. package/dist/chunk-N53SGN23.mjs +0 -10
  411. package/dist/chunk-N7MTFSWR.mjs +0 -10
  412. package/dist/chunk-O66FNQSB.mjs +0 -10
  413. package/dist/chunk-OAY74XPB.mjs +0 -10
  414. package/dist/chunk-OC42IZG2.mjs +0 -10
  415. package/dist/chunk-OHZK2ZDA.mjs +0 -10
  416. package/dist/chunk-OMT6ZWSV.mjs +0 -11
  417. package/dist/chunk-PDWICYVZ.mjs +0 -29
  418. package/dist/chunk-PF3OQKXP.mjs +0 -10
  419. package/dist/chunk-PFKPY3N7.mjs +0 -10
  420. package/dist/chunk-Q4BSQC65.mjs +0 -10
  421. package/dist/chunk-QKKV24WQ.mjs +0 -10
  422. package/dist/chunk-QQGK5M66.mjs +0 -10
  423. package/dist/chunk-RCBUNCHV.mjs +0 -10
  424. package/dist/chunk-RFTDIXEG.mjs +0 -10
  425. package/dist/chunk-RRB5F4E4.mjs +0 -11
  426. package/dist/chunk-RWHDD6Z7.mjs +0 -10
  427. package/dist/chunk-RZEGMPV2.mjs +0 -11
  428. package/dist/chunk-SMAYNDQQ.mjs +0 -10
  429. package/dist/chunk-T2XIDX6U.mjs +0 -10
  430. package/dist/chunk-TBDKTTIY.mjs +0 -10
  431. package/dist/chunk-TDXALNX3.mjs +0 -10
  432. package/dist/chunk-THRAJMLX.mjs +0 -10
  433. package/dist/chunk-TIHKHXTS.mjs +0 -10
  434. package/dist/chunk-TKQOQVZD.mjs +0 -10
  435. package/dist/chunk-TO6OQF2Y.mjs +0 -10
  436. package/dist/chunk-TVENHRYC.mjs +0 -10
  437. package/dist/chunk-UCZZLAPB.mjs +0 -10
  438. package/dist/chunk-ULCYKB34.mjs +0 -10
  439. package/dist/chunk-UOMNE4F4.mjs +0 -10
  440. package/dist/chunk-V3L4SVVF.mjs +0 -10
  441. package/dist/chunk-VDSLDZLT.mjs +0 -10
  442. package/dist/chunk-VJ3SWDRJ.mjs +0 -10
  443. package/dist/chunk-WA35CT3D.mjs +0 -10
  444. package/dist/chunk-WRQ4FPJE.mjs +0 -10
  445. package/dist/chunk-WWSGOGLA.mjs +0 -10
  446. package/dist/chunk-X3AXUU3H.mjs +0 -10
  447. package/dist/chunk-XCL4K4MY.mjs +0 -10
  448. package/dist/chunk-XTH6B5FE.mjs +0 -10
  449. package/dist/chunk-XWLESSHN.mjs +0 -10
  450. package/dist/chunk-Y4DRSGEJ.mjs +0 -10
  451. package/dist/chunk-YB3KW7JC.mjs +0 -10
  452. package/dist/chunk-YIGT3OP2.mjs +0 -10
  453. package/dist/chunk-YVYMYKYN.mjs +0 -10
  454. package/dist/chunk-ZFLLIBX5.mjs +0 -10
  455. package/dist/chunk-ZGRRD3TU.mjs +0 -10
  456. package/dist/chunk-ZP4YB5RP.mjs +0 -10
  457. /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
  458. /package/dist/{chunk-FXCHST4Z.mjs → chunk-JQQGRJ5J.mjs} +0 -0
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {forwardRef,useRef,useMemo,useContext,useState,useCallback}from'react';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
- var D=Symbol("default");function U({values:t,children:r}){for(let[e,o]of t)r=jsx(e.Provider,{value:o,children:r});return r}function $(t){let{className:r,style:e,children:o,defaultClassName:l=void 0,defaultChildren:n=void 0,defaultStyle:a,values:i,render:d}=t;return useMemo(()=>{let c,s,u;return typeof r=="function"?c=r({...i,defaultClassName:l}):c=r,typeof e=="function"?s=e({...i,defaultStyle:a||{}}):s=e,typeof o=="function"?u=o({...i,defaultChildren:n}):o==null?u=n:u=o,{className:c??l,style:s||a?{...a,...s}:void 0,children:u??n,"data-rac":"",render:d?E=>d(E,i):void 0}},[r,e,o,l,n,a,i,d])}function h(t,r){let e=useContext(t);if(r===null)return null;if(e&&typeof e=="object"&&"slots"in e&&e.slots){let o=r||D;if(!e.slots[o]){let l=new Intl.ListFormat().format(Object.keys(e.slots).map(a=>`"${a}"`)),n=r?`Invalid slot "${r}".`:"A slot prop is required.";throw new Error(`${n} Valid slot names are ${l}.`)}return e.slots[o]}return e}function j(t,r,e){let o=h(e,t.slot)||{},{ref:l,...n}=o,a=a$1(useMemo(()=>b(r,l),[r,l])),i=c(n,t);return "style"in n&&n.style&&"style"in t&&t.style&&(typeof n.style=="function"||typeof t.style=="function"?i.style=d=>{let c=typeof n.style=="function"?n.style(d):n.style,s={...d.defaultStyle,...c},u=typeof t.style=="function"?t.style({...d,defaultStyle:s}):t.style;return {...s,...u}}:i.style={...n.style,...t.style}),[i,a]}function q(t=true){let[r,e]=useState(t),o=useRef(false),l=useCallback(n=>{o.current=true,e(!!n);},[]);return a(()=>{o.current||e(false);},[]),[l,r]}function W(t){let r=/^(data-.*)$/,e={};for(let o in t)r.test(o)||(e[o]=t[o]);return e}function A(t,r,e){let{render:o,...l}=r,n=useRef(null),a$1=useMemo(()=>b(e,n),[e,n]);a(()=>{process.env.NODE_ENV!=="production"&&o&&(n.current?n.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${n.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"));},[t,o]);let i={...l,ref:a$1};return o?o(i,void 0):jsx(t,{...i})}var y={},_=new Proxy({},{get(t,r){if(typeof r!="string")return;let e=y[r];return e||(e=forwardRef(A.bind(null,r)),y[r]=e),e}});export{D as a,U as b,$ as c,h as d,j as e,q as f,W as g,_ as h};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-YB3KW7JC.mjs';import {i as i$1}from'./chunk-Y4DRSGEJ.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {b as b$2,u}from'./chunk-MRJFGHFW.mjs';import {b as b$3,c}from'./chunk-TZ4MVY4E.mjs';import {b as b$1}from'./chunk-AUOQSTS5.mjs';import i,{forwardRef,useEffect,useRef,useContext}from'react';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 b(o){if(!o)return;let t=true;return r=>{let n={...r,preventDefault(){r.preventDefault();},isDefaultPrevented(){return r.isDefaultPrevented()},stopPropagation(){t&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):t=true;},continuePropagation(){t=false,typeof r.continuePropagation=="function"&&r.continuePropagation();},isPropagationStopped(){return t}};o(n),t&&r.stopPropagation();}}function v(o){return {keyboardProps:o.isDisabled?{}:{onKeyDown:b(o.onKeyDown),onKeyUp:b(o.onKeyUp)}}}var E=i.createContext(null);function O(o){let t=useContext(E)||{};u(t,o);let{ref:r,...n}=t;return n}var Y=i.forwardRef(function(t,r){let{children:n,...l}=t,s=a(r),a$1={...l,ref:s};return jsx(E.Provider,{value:a$1,children:n})});function g(o,t){let{focusProps:r}=a$1(o),{keyboardProps:n}=v(o),l=c(r,n),s=O(t),a=o.isDisabled?{}:s,e=useRef(o.autoFocus);useEffect(()=>{e.current&&t.current&&i$1(t.current),e.current=false;},[t]);let f=o.excludeFromTabOrder?-1:0;return o.isDisabled&&(f=void 0),{focusableProps:c({...l,tabIndex:f},a)}}var $=forwardRef(({children:o,...t},r)=>{r=a(r);let{focusableProps:n}=g(t,r),l=i.Children.only(o);useEffect(()=>{if(process.env.NODE_ENV==="production")return;let a=r.current;if(!a||!(a instanceof b$1(a).Element)){console.error("<Focusable> child must forward its ref to a DOM element.");return}if(!t.isDisabled&&!b$2(a)){console.warn("<Focusable> child must be focusable. Please ensure the tabIndex prop is passed through.");return}if(a.localName!=="button"&&a.localName!=="input"&&a.localName!=="select"&&a.localName!=="textarea"&&a.localName!=="a"&&a.localName!=="area"&&a.localName!=="summary"&&a.localName!=="img"&&a.localName!=="svg"){let e=a.getAttribute("role");e?e!=="application"&&e!=="button"&&e!=="checkbox"&&e!=="combobox"&&e!=="gridcell"&&e!=="link"&&e!=="menuitem"&&e!=="menuitemcheckbox"&&e!=="menuitemradio"&&e!=="option"&&e!=="radio"&&e!=="searchbox"&&e!=="separator"&&e!=="slider"&&e!=="spinbutton"&&e!=="switch"&&e!=="tab"&&e!=="tabpanel"&&e!=="textbox"&&e!=="treeitem"&&e!=="img"&&e!=="meter"&&e!=="progressbar"&&console.warn(`<Focusable> child must have an interactive ARIA role. Got "${e}".`):console.warn("<Focusable> child must have an interactive ARIA role.");}},[r,t.isDisabled]);let s=parseInt(i.version,10)<19?l.ref:l.props.ref;return i.cloneElement(l,{...c(n,l.props),ref:b$3(s,r)})});export{v as a,E as b,Y as c,g as d,$ as e};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-CGFLGZL4.mjs';import {a as a$2}from'./chunk-7PRJIPFA.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$3}from'./chunk-2VY4FAOY.mjs';import {a as a$7}from'./chunk-545KDVGI.mjs';import {a as a$6,d as d$1}from'./chunk-BGMVPFYK.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-6ZQE5SHE.mjs';import {a as a$4,g,b as b$1}from'./chunk-AUOQSTS5.mjs';import {useRef,useCallback,useEffect}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
- var x=new WeakMap;function I(i,e){let r=x.get(i);if(!r)throw new Error("Unknown slider state");return `${r.id}-${e}`}function we(i,e,r){let{labelProps:T,fieldProps:R}=a(i),f=i.orientation==="vertical";x.set(e,{id:T.id??R.id,"aria-describedby":i["aria-describedby"],"aria-details":i["aria-details"]});let{direction:A}=b(),{addGlobalListener:a$5,removeGlobalListener:L}=a$1(),o=useRef(null),U=A==="rtl",s=useRef(null),{moveProps:D}=a$2({onMoveStart(){s.current=null;},onMove({deltaX:t,deltaY:b}){if(!r.current)return;let{height:g,width:E}=r.current.getBoundingClientRect(),u=f?g:E;s.current==null&&o.current!=null&&(s.current=e.getThumbPercent(o.current)*u);let c=f?b:t;if((f||U)&&(c=-c),s.current+=c,o.current!=null&&r.current){let S=a$3(s.current/u,0,1);e.setThumbPercent(o.current,S);}},onMoveEnd(){o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null);}}),O=useRef(void 0),v=(t,b,g,E)=>{if(r.current&&!i.isDisabled&&e.values.every((u,c)=>!e.isThumbDragging(c))){let u=b$1(t.currentTarget),{height:c,width:S,top:M,left:$}=r.current.getBoundingClientRect(),z=f?c:S,p=((f?E:g)-(f?M:$))/z;(A==="rtl"||f)&&(p=1-p);let P=e.getPercentValue(p),d,n=e.values.findIndex(l=>P-l<0);if(n===0)d=n;else if(n===-1)d=e.values.length-1;else {let l=e.values[n-1],h=e.values[n];Math.abs(l-P)<Math.abs(h-P)?d=n-1:d=n;}d>=0&&e.isThumbEditable(d)?(t.preventDefault(),o.current=d,e.setFocusedThumb(d),O.current=b,e.setThumbDragging(o.current,true),e.setThumbValue(d,P),a$5(u,"mouseup",m,false),a$5(u,"touchend",m,false),a$5(u,"pointerup",m,false)):o.current=null;}},m=t=>{let b=t.pointerId??t.changedTouches?.[0].identifier,g=b$1(t.currentTarget);b===O.current&&(o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null),L(g,"mouseup",m,false),L(g,"touchend",m,false),L(g,"pointerup",m,false));};return "htmlFor"in T&&T.htmlFor&&(delete T.htmlFor,T.onClick=t=>{a$4(t.currentTarget).getElementById(I(e,0))?.focus(),d("keyboard");}),{labelProps:T,groupProps:{role:"group",...R},trackProps:c({onMouseDown(t){t.button!==0||t.altKey||t.ctrlKey||t.metaKey||v(t,void 0,t.clientX,t.clientY);},onPointerDown(t){t.pointerType==="mouse"&&(t.button!==0||t.altKey||t.ctrlKey||t.metaKey)||v(t,t.pointerId,t.clientX,t.clientY);},onTouchStart(t){v(t,t.changedTouches[0].identifier,t.changedTouches[0].clientX,t.changedTouches[0].clientY);},style:{position:"relative",touchAction:"none"}},D),outputProps:{htmlFor:e.values.map((t,b)=>I(e,b)).join(" "),"aria-live":"off"}}}function qe(i,e){let{index:r=0,isRequired:T,validationState:R,isInvalid:f,trackRef:A,inputRef:a$4,orientation:L=e.orientation,name:o,form:U}=i,s=i.isDisabled||e.isDisabled,D=L==="vertical",{direction:O}=b(),{addGlobalListener:v,removeGlobalListener:m}=a$1(),t=x.get(e),{labelProps:b$2,fieldProps:g$1}=a({...i,id:I(e,r),"aria-labelledby":`${t.id} ${i["aria-labelledby"]??""}`.trim()}),E=e.values[r],u=useCallback(()=>{a$4.current&&a$5(a$4.current);},[a$4]),c$1=e.focusedThumb===r;useEffect(()=>{c$1&&u();},[c$1,u]);let S=O==="rtl",M=useRef(null),{keyboardProps:$}=a$6({onKeyDown(n){let{getThumbMaxValue:l,getThumbMinValue:h,decrementThumb:F,incrementThumb:X,setThumbValue:V,setThumbDragging:H,pageSize:K}=e;if(!/^(PageUp|PageDown|Home|End)$/.test(n.key)){n.continuePropagation();return}switch(n.preventDefault(),H(r,true),n.key){case "PageUp":X(r,K);break;case "PageDown":F(r,K);break;case "Home":V(r,h(r));break;case "End":V(r,l(r));break}H(r,false);}}),{moveProps:z}=a$2({onMoveStart(){M.current=null,e.setThumbDragging(r,true);},onMove({deltaX:n,deltaY:l,pointerType:h,shiftKey:F}){let{getThumbPercent:X,setThumbPercent:V,decrementThumb:H,incrementThumb:K,step:N,pageSize:Q}=e;if(!A.current)return;let{width:ae,height:se}=A.current.getBoundingClientRect(),Z=D?se:ae;if(M.current==null&&(M.current=X(r)*Z),h==="keyboard")n>0&&S||n<0&&!S||l>0?H(r,F?Q:N):K(r,F?Q:N);else {let Y=D?l:n;(D||S)&&(Y=-Y),M.current+=Y,V(r,a$3(M.current/Z,0,1));}},onMoveEnd(){e.setThumbDragging(r,false);}});e.setThumbEditable(r,!s);let{focusableProps:J}=d$1(c(i,{onFocus:()=>e.setFocusedThumb(r),onBlur:()=>e.setFocusedThumb(void 0)}),a$4),q=useRef(void 0),k=n=>{u(),q.current=n,e.setThumbDragging(r,true);let l=b$1(a$4.current);v(l,"mouseup",p,false),v(l,"touchend",p,false),v(l,"pointerup",p,false);},p=n=>{if((n.pointerId??n.changedTouches?.[0].identifier)===q.current){u(),e.setThumbDragging(r,false);let h=b$1(a$4.current);m(h,"mouseup",p,false),m(h,"touchend",p,false),m(h,"pointerup",p,false);}},P=e.getThumbPercent(r);(D||O==="rtl")&&(P=1-P);let d=s?{}:c($,z,{onMouseDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||k();},onPointerDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||k(n.pointerId);},onTouchStart:n=>{k(n.changedTouches[0].identifier);}});return a$7(a$4,e.defaultValues[r],n=>{e.setThumbValue(r,n);}),{inputProps:c(J,g$1,{type:"range",tabIndex:s?void 0:0,min:e.getThumbMinValue(r),max:e.getThumbMaxValue(r),step:e.step,value:E,name:o,form:U,disabled:s,"aria-orientation":L,"aria-valuetext":e.getThumbValueLabel(r),"aria-required":T||void 0,"aria-invalid":f||R==="invalid"||void 0,"aria-errormessage":i["aria-errormessage"],"aria-describedby":[t["aria-describedby"],i["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[t["aria-details"],i["aria-details"]].filter(Boolean).join(" "),onChange:n=>{e.setThumbValue(r,parseFloat(g(n).value));}}),thumbProps:{...d,style:{position:"absolute",[D?"top":"left"]:`${P*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:b$2,isDragging:e.isThumbDragging(r),isDisabled:s,isFocused:c$1}}export{we as a,qe as b};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {a as a$2}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-6ZQE5SHE.mjs';import {a as a$1,b}from'./chunk-AUOQSTS5.mjs';import {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
- var h=500;function G(f){let{isDisabled:r,onLongPressStart:n,onLongPressEnd:s,onLongPress:o,threshold:d$1=h,accessibilityDescription:L}=f,t=useRef(void 0),{addGlobalListener:i,removeGlobalListener:b$1}=a(),{pressProps:E}=d({isDisabled:r,onPressStart(e){if(e.continuePropagation(),(e.pointerType==="mouse"||e.pointerType==="touch")&&(n&&n({...e,type:"longpressstart"}),t.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:true})),a$1(e.target).activeElement!==e.target&&a$2(e.target),o&&o({...e,type:"longpress"}),t.current=void 0;},d$1),e.pointerType==="touch")){let p=T=>{T.preventDefault();},y=b(e.target);i(e.target,"contextmenu",p,{once:true}),i(y,"pointerup",()=>{setTimeout(()=>{b$1(e.target,"contextmenu",p);},30);},{once:true});}},onPressEnd(e){t.current&&clearTimeout(t.current),s&&(e.pointerType==="mouse"||e.pointerType==="touch")&&s({...e,type:"longpressend"});}}),v=a$3(o&&!r?L:void 0);return {longPressProps:c(E,v)}}export{G as a};
@@ -1,10 +0,0 @@
1
- import {a as a$2}from'./chunk-3UH5CQQF.mjs';import {a as a$3}from'./chunk-SNQDFFKP.mjs';import {a}from'./chunk-O7XK2WIX.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import d 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 f="_1vghdeb0";var u=new Set(["\u2318","\u2325","\u21E7","\u21A9","\u2423","\u2303"]),h="+";function x(o,n){if(n){let e=[],r="";for(let t of o)u.has(t)?(r&&e.push(r),e.push(t),r=""):r+=t;return r&&e.push(r),e.length===1&&e[0].includes("+")?e[0].split("+").map(t=>t.trim()).filter(Boolean):e}return o.split("+").map(e=>e.trim()).filter(Boolean)}var p=d.forwardRef(({children:o,className:n,style:e},r)=>jsx(a,{elementType:"kbd",ref:r,display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:"xs",borderWidth:1,borderStyle:"solid",borderColor:"border.medium",backgroundColor:"background.primary.strong",color:"text.primary",typography:"label.md.medium",paddingX:"md",paddingY:"sm",className:a$1(f,"BaselineUI-Kbd-Key",n),style:e,children:o}));p.displayName="KbdKey";var y=d.forwardRef(({children:o,shouldUseSymbol:n=false,className:e,style:r},t)=>{let K=a$2(o,n),a$4=x(K,n);return a$4.length===1?jsx(p,{ref:t,className:a$1("BaselineUI-Kbd",e),style:r,children:a$4[0]}):jsx(a,{elementType:"span",display:"inline-flex",alignItems:"center",gap:"md",ref:t,className:a$1("BaselineUI-Kbd",e),style:r,children:a$4.map((m,g)=>jsxs(d.Fragment,{children:[jsx(p,{children:m}),g<a$4.length-1?jsx(a$3,{type:"label",size:"sm",children:h}):null]},m))})});y.displayName="Kbd";export{y as a};
@@ -1,10 +0,0 @@
1
- import {a as a$4}from'./chunk-IHLJTHGQ.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a}from'./chunk-K6X2BHPP.mjs';import {d}from'./chunk-BGMVPFYK.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {d as d$1}from'./chunk-AQYBKDT2.mjs';import {n,q,r}from'./chunk-MRJFGHFW.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-KEVERVHK.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C from'react';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 A(e,o){let{elementType:d$2="a",onPress:c$1,onPressStart:k,onPressEnd:t,onClick:f,isDisabled:s,...u}=e,n$1={};d$2!=="a"&&(n$1={role:"link",tabIndex:s?void 0:0});let{focusableProps:P}=d(e,o),{pressProps:r$1,isPressed:L}=d$1({onPress:c$1,onPressStart:k,onPressEnd:t,onClick:f,isDisabled:s,ref:o}),a=a$5(u,{labelable:true}),b=c(P,r$1),l=n(),m=q(e);return {isPressed:L,linkProps:c(a,m,{...b,...n$1,"aria-disabled":s||void 0,"aria-current":e["aria-current"],onClick:p=>{r$1.onClick?.(p),r(p,l,e.href,e.routerOptions);}})}}var N=C.forwardRef(({className:e,style:o,children:d,variant:c$1="default",size:k="md",elementType:t="a",type:f="body","data-block-id":s,"data-block-class":u,title:n,role:P,...r},L)=>{let a$5=C.useRef(null),{linkProps:b$1,isPressed:l}=A({...r,elementType:r.onPress?"span":t},a$5),{isFocusVisible:m,isFocused:p,focusProps:I}=a(),{hoverProps:V,isHovered:x}=a$1({isDisabled:r.isDisabled}),j=t,w=a$2({"data-block-id":s,"data-block-class":u,"data-disabled":r.isDisabled,"data-focused":p,"data-pressed":l,"data-focus-visible":m,"data-hovered":x,role:P,title:n});return jsx(j,{...c(b$1,I,V,w),className:a$3(a$4({variant:c$1,isFocusVisible:m,isHovered:x,isDisabled:r.isDisabled,size:k,isActive:l,type:f}),"BaselineUI-Link",e),ref:b(a$5,L),style:o,children:d})});N.displayName="Link";export{N as a};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-66CUIXA6.mjs';import {b as b$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-AUOQSTS5.mjs';import*as d from'dompurify';import c,{useId}from'react';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
- var b=(e,t)=>{e.setAttribute("height",typeof t=="number"?`${t}px`:t),e.setAttribute("width",typeof t=="number"?`${t}px`:t);},E=(e,t,n)=>{let o=e.querySelector("title"),i=a(e);if(o)o.textContent=t,o.setAttribute("id",n);else {let r=i.createElement("title");r.textContent=t,r.setAttribute("id",n),e.prepend(r);}},I=(e,t)=>{t&&e.classList.add(t);},T=(e,t)=>{let n=t.createElement("span");n.innerHTML=d.default.sanitize(e);let o=n.querySelector("svg");return a$1(o,"Icon: svg prop must be a valid svg string"),o},w=c.forwardRef(({size:e,title:t,className:n,style:o,color:i,...r},S)=>{let u=useId(),f=c.useRef(null),m="svg"in r?r.svg:void 0,l=c.useMemo(()=>{if(m){let y=a(f.current),s=T(m,y);return e&&b(s,e),t&&E(s,t,u),I(s,n),s.outerHTML}},[m,e,t,n,u]);return jsx("span",{className:n,ref:b$1(S,f),style:{display:"contents",...o,color:i},dangerouslySetInnerHTML:l?{__html:l}:void 0})});w.displayName="Icon";export{w as a};
@@ -1,10 +0,0 @@
1
- import {d}from'./chunk-AQYBKDT2.mjs';import {b}from'./chunk-TZ4MVY4E.mjs';import r from'react';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
- var m=r.forwardRef(({className:a,style:n,node:e,"data-block-id":p,"data-block-class":l,...f},c)=>{let o=r.useRef(null);r.useEffect(()=>{let s=o.current;return s?.append(e),()=>{s?.contains(e)&&e.remove();}},[e]);let{pressProps:i,isPressed:R}=d(f);return jsx("div",{...i,className:a,style:n,"data-block-id":p,"data-block-class":l,"data-pressed":R,"data-testid":"dom-node-renderer",ref:b(c,o)})});m.displayName="DomNodeRenderer";export{m as a};
@@ -1,10 +0,0 @@
1
- import {a as a$j}from'./chunk-FTYXFTJV.mjs';import {a as a$l}from'./chunk-BZTAFNPW.mjs';import {c as c$4}from'./chunk-GLT45FXJ.mjs';import {c as c$2}from'./chunk-7VHON5HL.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$m,w,d,c as c$6,x,k,b as b$8,o,n,r}from'./chunk-GS4C6CYA.mjs';import {a as a$6,b as b$7,c as c$5,d as d$1}from'./chunk-EU75HMPG.mjs';import {a as a$o}from'./chunk-VDSLDZLT.mjs';import {a as a$h}from'./chunk-ZAMDRHQY.mjs';import {a as a$b}from'./chunk-6DU65N7Q.mjs';import {a as a$c}from'./chunk-MFNWPTNI.mjs';import {b as b$5,e as e$1}from'./chunk-MNAD5FJH.mjs';import {a as a$d}from'./chunk-NSC53QWT.mjs';import {b as b$2,c as c$3}from'./chunk-GX2IOGYR.mjs';import {b as b$4}from'./chunk-WN6FAICZ.mjs';import {a as a$g}from'./chunk-O7XK2WIX.mjs';import {a as a$k}from'./chunk-TVENHRYC.mjs';import {a as a$f}from'./chunk-ULCYKB34.mjs';import {a as a$9}from'./chunk-F3HQNHR5.mjs';import {a as a$n}from'./chunk-JJPCZOOI.mjs';import {a as a$i}from'./chunk-ZGRRD3TU.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {b as b$6,j as j$1}from'./chunk-2HMLSXNO.mjs';import {a as a$8}from'./chunk-UUBOEBYZ.mjs';import {a as a$e}from'./chunk-VDUFLHKK.mjs';import {a as a$7}from'./chunk-4PYEGHW5.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$a}from'./chunk-X3AXUU3H.mjs';import {a as a$1}from'./chunk-YS3Y5KGV.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {a}from'./chunk-3FYY26ED.mjs';import {b as b$1,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {c}from'./chunk-JDLUGVXG.mjs';import {g as g$1}from'./chunk-AUOQSTS5.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import No,{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=No.forwardRef(({color:o,colorLabel:t,colorName:r,isIndeterminate:e,indeterminateIcon:l,noneLabel:a$5,...n},s)=>{let i=No.useRef(null),{hoverProps:p,isHovered:m}=a({isDisabled:n.isDisabled}),{buttonProps:d,isPressed:b$2}=a$1(n,i),{isFocusVisible:C,focusProps:I$1}=a$2(),S=a$3({"data-block-id":n["data-block-id"],"data-focused":C,"data-focus-visible":C,"data-disabled":n.isDisabled,"data-hovered":m,"data-pressed":b$2}),B=c(),f$1=c();return jsxs("button",{...c$1(d,p,I$1,S),style:n.style,className:a$4(f({isHovered:m,isFocusVisible:C||n.isOpen,isDisabled:n.isDisabled,labelPosition:n.labelPosition}),"BaselineUI-ColorInputButton",n.className),ref:b$1(s,i),id:B,"aria-labelledby":n["aria-labelledby"]||`${B} ${f$1}`,children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:e,indeterminateIcon:l,noneLabel:a$5}),t?jsx("div",{className:j,id:f$1,"aria-hidden":"true",children:r}):typeof r=="string"&&jsx(b,{children:r})]})});no.displayName="ColorInputButton";var Ro=No.forwardRef(({className:o,style:t,icon:r,...e$1},l)=>{let a$5=No.useRef(null),{hoverProps:n,isHovered:s}=a({isDisabled:e$1.isDisabled}),{buttonProps:i,isPressed:p$1}=a$1(e$1,a$5),{isFocusVisible:m,focusProps:d}=a$2(),b=a$3({"data-block-id":e$1["data-block-id"],"data-focused":m,"data-focus-visible":m,"data-disabled":e$1.isDisabled,"data-hovered":s,"data-pressed":p$1});return jsxs("button",{...c$1(i,n,d,b),ref:b$1(l,a$5),style:t,className:a$4(p({isHovered:s||p$1||e$1.isOpen,isFocusVisible:m,isDisabled:e$1.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(r,{size:16}),jsx("div",{className:e,style:{backgroundColor:e$1.color||void 0}})]})});Ro.displayName="IconColorInputButton";var Yo=No.forwardRef(({setColor:o,color:t,triggerRef:r,autoFocus:e,presets:l,state:a,isIndeterminate:n,colorPresetsLabel:s$1},i$1)=>{let{formatMessage:p}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let b=[...d][0],C=l.find(I=>I.id===b);a$5(C,"Preset not found"),o(C.id===F?null:a$6(C.id).toFormat(A)),a.close();}},[a,l,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:r.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:e,items:l,layout:"grid","aria-label":s$1??p(ct.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:n?[]:[t?.toString(B)||F],onSelectionChange:m,escapeKeyBehavior:"none"})})});Yo.displayName="ColorPresetList";var ct=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Xe=({value:o,...t})=>{let r=No.useRef(null),e=No.useRef(null),l=No.useRef(null),a=b$7({...t,value:o}),{colorAreaProps:n,xInputProps:s,yInputProps:i,thumbProps:p}=a$m({...t,value:o,inputXRef:r,inputYRef:e,containerRef:l},a);useEffect(()=>{r.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:l,...n,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...p,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...p.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:r,...s,...m}),jsx("input",{ref:e,...i,...m})]})})};var $e=({color:o$1,setColor:t,allowAlpha:r,...e})=>{let l=d$1({value:o$1,onChange:d=>{t(C(d)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),a$1=No.useRef(null),{inputProps:n$1}=b$8({...e,"aria-label":"Hex"},l,a$1),{focusProps:s,isFocused:i}=a$2({isTextInput:true}),{hoverProps:p,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":r?"hexa":"hex",children:[jsx("input",{...c$1(n$1,s,p),ref:a$1,className:o({isFocused:i,isHovered:m,allowAlpha:r})}),r?jsx(qe,{color:o$1,setColor:t}):null]})},Ye=({color:o,setColor:t,allowAlpha:r$1})=>{let e=o.toFormat("rgba"),{locale:l}=b$3();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":r$1?"rgba":"rgb",children:[jsx(a$o,{"aria-label":o.getChannelName("red",l),value:e.getChannelValue("red"),showStepper:false,className:r,onChange:a=>{t(e.withChannelValue("red",a).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$o,{"aria-label":o.getChannelName("green",l),value:e.getChannelValue("green"),showStepper:false,className:r,onChange:a=>{t(e.withChannelValue("green",a).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$o,{"aria-label":o.getChannelName("blue",l),value:e.getChannelValue("blue"),showStepper:false,className:r,onChange:a=>{t(e.withChannelValue("blue",a).toFormat(A));},step:1,minValue:0,maxValue:255}),r$1?jsx(qe,{color:o,setColor:t}):null]})},bt={style:"percent",maximumFractionDigits:0},qe=({color:o,setColor:t})=>{let{locale:r$1}=b$3(),e=useCallback(l=>{t(o.withChannelValue("alpha",l));},[o,t]);return jsx(a$o,{"aria-label":o.getChannelName("alpha",r$1),value:o.getChannelValue("alpha"),formatOptions:bt,className:r,showStepper:false,onChange:e,minValue:0,maxValue:1})};var Jo=({channel:o,...t})=>{let{locale:r}=b$3(),e=c$5({...t,channel:o,locale:r}),l=No.useRef(null),a=No.useRef(null),{trackProps:n,thumbProps:s,inputProps:i}=c$6({...t,channel:o,trackRef:l,inputRef:a,"aria-label":e.value.getChannelName(o,r)},e),{focusProps:p,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$n({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...n,ref:l,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:n.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:e.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:a,...i,...p})})]})]})};var Fo=({color:o,setColor:t,allowAlpha:r,colorFormatLabel:e,onChangeEnd:l})=>{let[a,n]=No.useState("hex"),{formatMessage:s}=b$2();return jsxs(Fragment,{children:[jsx(Xe,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:t,onChangeEnd:l}),jsxs("div",{className:v,children:[jsx(Jo,{channel:"hue",value:o,onChange:t,onChangeEnd:l}),r?jsx(Jo,{channel:"alpha",value:o,onChange:t,onChangeEnd:l}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$4,{label:e??s(vt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:a,onSelectionChange:i=>{n(i);}}),a==="hex"&&jsx($e,{color:o,setColor:i=>{t(i),l?.(i);},allowAlpha:r}),a==="rgb"&&jsx(Ye,{color:o,setColor:i=>{t(i),l?.(i);},allowAlpha:r})]})]})},vt=c$3({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var Ze=({color:o,setColor:t$1,storePickedColorKey:r,addColorButtonLabel:e,removeColorButtonLabel:l$1,customColorsLabel:a,addLabel:n,cancelLabel:s$1,newColorLabel:i$1,colorFormatLabel:p,pickerMode:m$1,allowAlpha:d,isIndeterminate:b})=>{let{locale:C}=b$3(),{formatMessage:I}=b$2(),S=No.useRef(null),B$1=a$i(S.current),[f,x]=a$j(r,[]),M=No.useRef(null),[K,G]=No.useState(o),To=No.useMemo(()=>f.map(u=>({id:u,label:a$6(u).getColorName(C),description:u})),[f,C]),J=useCallback(()=>{let u=m$1==="active"?o:K;if(f.includes(u.toString(B))){M.current?.querySelector(`[data-key='${u.toString(B)}']`)?.classList.add(t);return}x([...f,u.toString(B)]);},[f,o,x,K,m$1]);useEffect(()=>{let u$1=M.current;function A(po){po.animationName===u&&g$1(po)?.classList.remove(t);}return u$1?.addEventListener("animationend",A),()=>{u$1?.removeEventListener("animationend",A);}},[]);let mo=c(),Q=jsx(a$k,{ref:S,variant:"secondary",size:"md","aria-label":e,icon:PlusIcon,onPress:m$1==="active"?J:void 0}),T=useCallback(u=>jsxs(a$c,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??I(jo.newColor),children:[jsx(Fo,{color:K,setColor:G,allowAlpha:d,colorFormatLabel:p}),jsx(a$d,{}),jsx(a$g,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(a$g,{display:"inline-flex",gap:"lg",children:[jsx(b$4,{label:s$1??I(jo.cancel),size:"sm",variant:"secondary",onPress:u}),jsx(b$4,{label:n??I(jo.add),variant:"primary",onPress:()=>{J(),u();},size:"sm"})]})})]}),[K,J,I,d,i$1,p,s$1,n]),Ao=useCallback(u=>{a$5(u instanceof Set,"Key must be a set");let A$1=[...u][0];A$1&&t$1(a$6(A$1).toFormat(A));},[t$1]);return jsxs(Fragment,{children:[jsx(a$d,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:mo,children:a}),jsxs(a$g,{display:"flex",children:[!!f.length&&f.includes(o.toString(B))&&jsx(a$k,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":l$1,onPress:()=>{x(f.filter(u=>u!==o.toString(B)));}}),m$1==="active"&&Q,m$1==="lazy"&&(B$1==="mobile"?jsxs(b$5,{children:[jsx(a$l,{children:Q}),jsx(e$1,{style:{zIndex:1e5},children:({close:u})=>T(u)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:Q}),jsx(a$b,{placement:"right top",className:q,offset:6,children:({close:u})=>T(u)})]}))]})]}),!!f.length&&jsx(c$2,{items:To,layout:"grid","aria-labelledby":mo,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:M,autoFocus:false,selectionMode:"single",selectedKeys:b?[]:[o.toString(B)],onSelectionChange:Ao})]})},jo=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 ot({colorLabel:o,color:t,presets:r,isIndeterminate:e,indeterminateLabel:l,transparentLabel:a}){let{formatMessage:n}=b$2(),{locale:s}=b$3(),i=useMemo(()=>e?{id:"indeterminate",label:l??n(je.indeterminate)}:r.find(d=>d.id===F?!t:t?D(t,a$6(d.id)):false),[r,t,e,n,l]),p=useMemo(()=>{if(typeof o=="function")return o?.(t,{isIndeterminate:!!e});if(typeof o=="boolean")return o?E(t,i,a??n(je.transparent)):false;throw new TypeError("`colorLabel` must be a function or a boolean")},[t,o,n,i,e,a]),m=useMemo(()=>{if(i?.label)return i.label;t?.getColorName(s);},[t,s,i?.label]);return {colorName:p,humanReadableName:m}}var je=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var Mo=No.forwardRef(({className:o,style:t,allowRemoval:r,allowAlpha:e=true,presets:l,labelPosition:a="top",colorLabel:n=true,includePicker:s=true,onChange:i,onChangeEnd:p,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:b,addColorButtonLabel:C$1,removeColorButtonLabel:I,customColorsLabel:S,addLabel:B,cancelLabel:f,newColorLabel:x,colorFormatLabel:M,colorPresetsLabel:K,noColorLabel:G$1,indeterminateLabel:To,transparentLabel:J,onTriggerPress:mo,renderTriggerButton:Q=({isOpen:W,color:Oo,ref:X,colorName:Ho,triggerProps:Do,labelId:ko,isIndeterminate:H,indeterminateIcon:Z,noneLabel:D})=>jsx(no,{...c$1(Do,{...v.label?{"aria-labelledby":ko}:{"aria-label":v["aria-label"]}}),ref:X,isOpen:W,isDisabled:v.isDisabled,labelPosition:a,color:Oo,colorLabel:n,colorName:Ho,isIndeterminate:H,indeterminateIcon:Z,noneLabel:D}),pickerMode:T="active",offset:Ao=2,placement:u=a==="start"?"bottom end":"bottom start","data-block-id":A,"data-block-class":po,isIndeterminate:uo,indeterminateIcon:lt,...v},at)=>{let W=No.useRef(null),Oo=No.useRef(null),X=a$7(v),{triggerProps:Ho,overlayProps:Do}=a$8({type:"listbox"},X,W),ko=a$9(v.portalContainer),[H,Z]=a$a(b===void 0?void 0:C(b),C(m$1),y=>i?.(y?.toFormat("rgba")||null)),{formatMessage:D}=b$2(),Eo=useMemo(()=>G(G$1??D(xo.noColor),l),[l,D,G$1]),wo=c(),{colorName:nt}=ot({colorLabel:n,color:H,presets:Eo,isIndeterminate:uo,indeterminateLabel:To,transparentLabel:J}),re=useMemo(()=>Eo.filter(y=>r||y.id!==F),[Eo,r]),st=C$1||D(xo.addColor),it=I||D(xo.removeColor),mt=S||D(xo.customColors),le=jsx(Ze,{color:H||z,setColor:y=>{Z(y),p?.(y?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:st,removeColorButtonLabel:it,customColorsLabel:mt,addLabel:B,cancelLabel:f,newColorLabel:x,colorFormatLabel:M,pickerMode:T,allowAlpha:e,isIndeterminate:!!uo});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:a==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":A,"data-block-class":po,style:t,ref:at,children:[v.label?jsx("label",{id:wo,className:h({labelPosition:a}),children:v.label}):null,Q({isOpen:X.isOpen,color:H,ref:W,colorName:nt,triggerProps:c$1(Ho,{onPress:mo}),labelId:wo,isIndeterminate:uo,indeterminateIcon:lt,noneLabel:G$1})]}),jsx(a$b,{...v,portalContainer:ko,placement:u,state:X,offset:Ao,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:W,overlayProps:Do,children:jsxs(a$c,{size:"content",className:m({includesCustomColorPicker:s}),ref:Oo,"aria-labelledby":v.label?wo:void 0,"aria-label":v["aria-label"],children:[s&&T==="active"?jsxs(Fragment,{children:[jsx(Fo,{color:H||z,setColor:Z,allowAlpha:e,colorFormatLabel:M,onChangeEnd:y=>{p?.(y?.toFormat("rgba")||null);}}),le]}):null,!!re.length&&jsxs(Fragment,{children:[s&&T==="active"?jsx(a$d,{}):null,jsx(Yo,{autoFocus:s&&T==="active"?false:"first",state:X,triggerRef:W,presets:re,colorPresetsLabel:K,color:H,setColor:y=>{Z(y),p?.(y?.toFormat("rgba")||null);},isIndeterminate:!!uo})]}),s&&T==="lazy"?le:null]})})]})});Mo.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 rt=No.forwardRef(({className:o,style:t,icon:r,variant:e="standard","data-block-id":l,tooltip:a=true,iconTooltip:n=true,...s},i)=>{let p=No.useRef(null),{tooltipProps:m}=a$e({label:s["aria-label"],tooltip:a}),d=useCallback(({isOpen:b,color:C,ref:I,colorName:S,triggerProps:B,isIndeterminate:f,indeterminateIcon:x,noneLabel:M})=>jsx(a$f,{...m,children:e==="standard"?jsx(no,{...B,"aria-label":s["aria-label"],ref:I,isOpen:b,isDisabled:s.isDisabled,color:C,colorLabel:false,colorName:S,isIndeterminate:f,indeterminateIcon:x,noneLabel:M}):jsx(Ro,{...B,isOpen:b,icon:TextIcon,color:C?.toString("hexa"),ref:I,isDisabled:s.isDisabled,"aria-label":s["aria-label"],isIndeterminate:f,indeterminateIcon:x})}),[s,m,e]);return jsxs(a$g,{display:"flex",flexDirection:"row",gap:"md",paddingX:e==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":l,style:t,ref:b$1(i,p),children:[e==="standard"&&r?jsx(a$h,{icon:r,label:s["aria-label"],tooltip:n,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(Mo,{...s,colorLabel:false,renderTriggerButton:d})]})});rt.displayName="IconColorInput";export{Ro as a,Mo as b,rt as c};
@@ -1,10 +0,0 @@
1
- import {a as a$3}from'./chunk-WAOWR7MR.mjs';import {a}from'./chunk-M5M3EPG5.mjs';import {d,c}from'./chunk-W6QO7FPZ.mjs';import {a as a$2}from'./chunk-545KDVGI.mjs';import {d as d$2}from'./chunk-BGMVPFYK.mjs';import {d as d$1}from'./chunk-AQYBKDT2.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-KEVERVHK.mjs';import {g}from'./chunk-AUOQSTS5.mjs';import {useState}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 pe(r,i,t){let{isDisabled:a$4=false,isReadOnly:l=false,value:u,name:R,form:V,children:k,isRequired:b,validationBehavior:P="aria","aria-label":C,"aria-labelledby":x,"aria-describedby":F,onPressStart:c$2,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g$1,onClick:v}=r,s=d({...r,value:i.isSelected}),{isInvalid:T,validationErrors:j,validationDetails:q}=s.displayValidation;a(r,s,t);let W=e=>{e.stopPropagation(),i.setSelected(g(e).checked);},B=k!=null,N=C!=null||x!=null;!B&&!N&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:U,isPressed:w}=d$1({onPressStart:c$2,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g$1,onClick:v,isDisabled:a$4}),[_,y]=useState(false),{pressProps:z}=d$1({onPressStart(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}c$2?.(e),n?.(true),y(true);},onPressEnd(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}m?.(e),n?.(false),y(false);},onPressUp(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}g$1?.(e);},onClick:v,onPress(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}f?.(e),i.toggle(),t.current?.focus();let{[c]:S}=r,{commitValidation:Q}=S||s;Q();},isDisabled:a$4||l}),{focusableProps:G}=d$2(r,t),J=c$1(U,G),K=a$1(r,{labelable:true});a$2(t,i.defaultSelected,i.setSelected);let L=a$3(),M=a$3();return {labelProps:c$1(z,{onClick:e=>e.preventDefault()}),inputProps:c$1(K,{checked:i.isSelected,"aria-required":b&&P==="aria"||void 0,required:b&&P==="native","aria-invalid":T||r.validationState==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":l||void 0,"aria-describedby":[L.id,M.id,F].filter(Boolean).join(" ")||void 0,onChange:W,disabled:a$4,...u==null?{}:{value:u},name:R,form:V,type:"checkbox",...J}),descriptionProps:L,errorMessageProps:M,isSelected:i.isSelected,isPressed:w||_,isDisabled:a$4,isReadOnly:l,isInvalid:T||r.validationState==="invalid",validationErrors:j,validationDetails:q}}export{pe as a};
@@ -1,10 +0,0 @@
1
- import {j,l,m,k,o,i,h}from'./chunk-5TDFLLMX.mjs';import {a as a$3}from'./chunk-6DU65N7Q.mjs';import {a as a$2}from'./chunk-KCHAWPUN.mjs';import {b}from'./chunk-WN6FAICZ.mjs';import {a}from'./chunk-F3HQNHR5.mjs';import {e}from'./chunk-B7PSE5KC.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import P,{useEffect,useContext}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 I="xyd2ss0 _1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z6sa _1yep5z6sb _1yep5z6sc _1yep5z6um _1yep5z6un _1yep5z6uo _1yep5z6vs _1yep5z6vt _1yep5z6vu _1yep5z6tg _1yep5z6th _1yep5z6ti _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618r _1yep5z618q _1yep5z614z _1yep5z618u _1yep5z612s";var z=e=>e!=null&&typeof e=="object"&&!(Symbol.iterator in e);function G(e,o,r){let i=z(o)||z(r),s=o!=null&&!z(o)||r!=null&&!z(r);return e&&s?"Menu: an object `selectionMode` expects `selectedKeys`/`defaultSelectedKeys` to be records keyed by section id.":!e&&i?"Menu: a per-section `selectedKeys`/`defaultSelectedKeys` record requires the object form of `selectionMode`.":null}var Q=P.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:r,isDisabled:i,contentClassName:s,placement:l$1="bottom start",isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z,triggerLabel:x,renderTrigger:b$1=({buttonProps:u,ref:y})=>jsx(b,{...u,variant:"popover",ref:y,"data-testid":"menu-trigger"}),portalContainer:$,selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disabledKeys:h,disallowEmptySelection:A,itemClassName:C,optionClassName:O,optionStyle:ee,renderOption:oe,...R},re)=>{let u=a($),y=m!=null&&typeof m=="object",N=P.useMemo(()=>h==null?void 0:new Set(h),[h]),te=P.useMemo(()=>C?(ne,ie)=>a$1(C,a$2(O,ne,ie)):O,[C,O]),B=G(y,v,S);if(B)throw new Error(B);return useEffect(()=>{!x&&!b$1&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[b$1,x]),jsxs(j,{defaultOpen:e,onOpenChange:o,isOpen:r,children:[jsx(W,{isDisabled:i,renderTrigger:b$1,triggerLabel:x}),jsx(X,{placement:l$1,isNonModal:a$3,shouldFlip:c,shouldUpdatePosition:t,boundaryElement:M,boundaryAxis:p,horizontalBoundaryBehavior:d,crossOffset:_,offset:Z||2,className:"BaselineUI-Menu-Popover",portalContainer:u,children:jsx(l,{...R,disabledKeys:N,...y?{}:{selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:A},className:a$1(I,s),ref:re,children:V(R.items,u,{onAction:R.onAction,disabledKeys:N,contentClassName:s,optionClassName:te,optionStyle:ee,renderOption:oe,selection:y?{modes:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:A}:void 0})})})]})});function V(e,o$1,r){let{onAction:i,disabledKeys:s,contentClassName:l$1,selection:a,...c}=r;return e.map((t,M)=>{if("children"in t){let p=t,d=a?.modes[p.id];return jsx(m,{section:p,componentName:"Menu",isFirstCollectionItem:M===0,showSectionHeader:!!p.title,...c,...d?{selectionMode:d,selectedKeys:a?.selectedKeys?.[p.id],defaultSelectedKeys:a?.defaultSelectedKeys?.[p.id],disabledKeys:s,disallowEmptySelection:a?.disallowEmptySelection,onSelectionChange:_=>{a?.onSelectionChange?.(_,{sectionId:p.id});}}:{}},p.id)}return t.items?jsxs(k,{children:[jsx(o,{item:t,componentName:"Menu",...c}),jsx(X,{className:"BaselineUI-Menu-SubmenuPopover",portalContainer:o$1,children:jsx(l,{className:a$1(I,l$1),onAction:i,disabledKeys:s,children:V(t.items,o$1,r)})})]},t.id):jsx(o,{item:t,componentName:"Menu",...c},t.id)})}var W=P.forwardRef(({renderTrigger:e,triggerLabel:o,isDisabled:r,...i$1},s)=>{let l=useContext(i);return e?.({buttonProps:{...i$1,isDisabled:r,label:typeof o=="function"?o(l?.isOpen||false):o,isOpen:l?.isOpen||false,className:"BaselineUI-Menu-Trigger"},ref:s})});W.displayName="MyTrigger";var X=({children:e$1,...o})=>{let r=useContext(i),[i$1]=e(o,void 0,h);return r?.isOpen?jsx(a$3,{...i$1,state:r,children:e$1}):null};Q.displayName="Menu";export{Q as a};
@@ -1,10 +0,0 @@
1
- import {c as c$1,b}from'./chunk-MXKP7NQ4.mjs';import {a}from'./chunk-J7K7I5U2.mjs';import {d}from'./chunk-OC42IZG2.mjs';import {a as a$1}from'./chunk-34TYNTXM.mjs';import {d as d$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {e as e$2,b as b$2}from'./chunk-MVK5CB64.mjs';import {i as i$1,b as b$3}from'./chunk-Y4DRSGEJ.mjs';import {p,c as c$3}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c,e}from'./chunk-JDLUGVXG.mjs';import {g,i,f,a as a$4,e as e$1}from'./chunk-AUOQSTS5.mjs';import {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
- var w=new WeakMap;function N(o,t){let{id:e}=w.get(o)??{};if(!e)throw new Error("Unknown list");return `${e}-${ce(t)}`}function ce(o){return typeof o=="string"?o.replace(/\s*/g,""):""+o}function Se(o,t,e){let{isVirtualized:n,keyboardDelegate:a$3,layoutDelegate:s,onAction:d,disallowTypeAhead:A,linkBehavior:p="action",keyboardNavigationBehavior:M="arrow",escapeKeyBehavior:k="clearSelection",shouldSelectOnPressUp:S}=o;!o["aria-label"]&&!o["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let{listProps:L}=a({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:e,keyboardDelegate:a$3,layoutDelegate:s,isVirtualized:n,selectOnFocus:t.selectionManager.selectionBehavior==="replace",shouldFocusWrap:o.shouldFocusWrap,linkBehavior:p,disallowTypeAhead:A,autoFocus:o.autoFocus,escapeKeyBehavior:k,UNSTABLE_focusOnEntry:o.UNSTABLE_focusOnEntry}),v=c(o.id);w.set(t,{id:v,onAction:d,linkBehavior:p,keyboardNavigationBehavior:M,shouldSelectOnPressUp:S});let m=c$1({selectionManager:t.selectionManager,hasItemActions:!!d}),T=a$1(e,{isDisabled:t.collection.size!==0}),D=a$2(o,{labelable:true}),E=c$2(D,{role:"grid",id:v,"aria-multiselectable":t.selectionManager.selectionMode==="multiple"?"true":void 0},t.collection.size===0?{tabIndex:T?-1:0}:L,m);return n&&(E["aria-rowcount"]=t.collection.size,E["aria-colcount"]=1),b({},t),{gridProps:E}}var Y={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function He(o,t,e$3){let{node:n,isVirtualized:a}=o,{direction:s}=b$1(),{onAction:d$2,linkBehavior:A,keyboardNavigationBehavior:p$1,shouldSelectOnPressUp:M}=w.get(t),k=e(),S=useRef(null),L=()=>{e$3.current!==null&&(S.current!=null&&n.key!==S.current||!i(e$3.current))&&i$1(e$3.current);},v={},m=o.hasChildItems,T=t.selectionManager.isLink(n.key);if(n!=null&&"expandedKeys"in t){let r=t.collection.getChildren?.(n.key);m=m||[...r??[]].length>1,d$2==null&&!T&&t.selectionManager.selectionMode==="none"&&m&&(d$2=()=>t.toggleKey(n.key));let l=m?t.expandedKeys.has(n.key):void 0,i=1,u=n.index;if(n.level>=0&&n?.parentKey!=null){let c=t.collection.getItem(n.parentKey);if(c){let I=de(c,t.collection);i=[...I].filter(se=>se.type==="item").length,u>0&&I[0].type!=="item"&&(u-=1);}}else i=[...t.collection].filter(c=>c.level===0&&c.type==="item").length;v={"aria-expanded":l,"aria-level":n.level+1,"aria-posinset":u+1,"aria-setsize":i};}let{itemProps:D,...E}=d({selectionManager:t.selectionManager,key:n.key,ref:e$3,isVirtualized:a,shouldSelectOnPressUp:o.shouldSelectOnPressUp||M,onAction:d$2||n.props?.onAction?a$3(n.props?.onAction,d$2?()=>d$2(n.key):void 0):void 0,focus:L,linkBehavior:A}),Z=r=>{let l=f(a$4(e$3.current));if(!e$1(r.currentTarget,g(r))||!e$3.current||!l)return;let i=d$1(e$3.current);if(i.currentNode=l,!J(r,t,n,m,s,l,e$3.current))switch(r.key){case "ArrowLeft":{if(p$1==="arrow"){let u=s==="rtl"?i.nextNode():i.previousNode();if(u)r.preventDefault(),r.stopPropagation(),i$1(u),e$2(u,{containingElement:b$2(e$3.current)});else if(r.preventDefault(),r.stopPropagation(),s==="rtl")i$1(e$3.current),e$2(e$3.current,{containingElement:b$2(e$3.current)});else {i.currentNode=e$3.current;let c=Q(i);c&&(i$1(c),e$2(c,{containingElement:b$2(e$3.current)}));}}break}case "ArrowRight":{if(p$1==="arrow"){let u=s==="rtl"?i.previousNode():i.nextNode();if(u)r.preventDefault(),r.stopPropagation(),i$1(u),e$2(u,{containingElement:b$2(e$3.current)});else if(r.preventDefault(),r.stopPropagation(),s==="ltr")i$1(e$3.current),e$2(e$3.current,{containingElement:b$2(e$3.current)});else {i.currentNode=e$3.current;let c=Q(i);c&&(i$1(c),e$2(c,{containingElement:b$2(e$3.current)}));}}break}case "ArrowUp":case "ArrowDown":!r.altKey&&e$1(e$3.current,g(r))&&(r.stopPropagation(),r.preventDefault(),e$3.current.parentElement?.dispatchEvent(new KeyboardEvent(r.nativeEvent.type,r.nativeEvent)));break}},ee=r=>{if(S.current=n.key,g(r)!==e$3.current){b$3()||t.selectionManager.setFocusedKey(n.key);return}},te=r=>{let l=f(a$4(e$3.current));if(!(!e$1(r.currentTarget,g(r))||!e$3.current||!l)){if(p$1==="tab"){if(g(r)!==e$3.current&&r.key!=="Tab"){r.stopPropagation();return}if(J(r,t,n,m,s,l,e$3.current))return}switch(r.key){case "Tab":if(p$1==="tab"){let i=d$1(e$3.current,{tabbable:true});i.currentNode=l,(r.shiftKey?i.previousNode():i.nextNode())&&r.stopPropagation();}}}},re=p(n.props),ne=E.hasAction?re:{},y=c$2(D,ne,{role:"row",onKeyDownCapture:p$1==="arrow"?Z:void 0,onFocus:ee,"aria-label":n["aria-label"]||n.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(n.key)?t.selectionManager.isSelected(n.key):void 0,"aria-disabled":t.selectionManager.isDisabled(n.key)||void 0,"aria-labelledby":k&&(n["aria-label"]||n.textValue)?`${N(t,n.key)} ${k}`:void 0,id:N(t,n.key)}),oe=y.onKeyDown;y.onKeyDown=r=>{te(r),r.isPropagationStopped()||oe?.(r);};let ie=y.onPointerDown;y.onPointerDown=r=>{let l=g(r);if(l&&l!==e$3.current&&c$3(l)){r.stopPropagation();return}ie?.(r);};let le=y.onMouseDown;if(y.onMouseDown=r=>{let l=g(r);if(l&&l!==e$3.current&&c$3(l)){r.stopPropagation();return}le?.(r);},a){let{collection:r}=t,l=[...r];y["aria-rowindex"]=l.find(i=>i.type==="section")?[...r.getKeys()].filter(i=>r.getItem(i)?.type!=="section").findIndex(i=>i===n.key)+1:n.index+1;}let ae={role:"gridcell","aria-colindex":1};return {rowProps:{...c$2(y,v)},gridCellProps:ae,descriptionProps:{id:k},...E}}function J(o,t,e,n,a,s,d){if(!("expandedKeys"in t)||s!==d)return false;if(o.key===Y.expand[a]&&t.selectionManager.focusedKey===e.key&&n&&!t.expandedKeys.has(e.key))return t.toggleKey(e.key),o.stopPropagation(),true;if(o.key===Y.collapse[a]&&t.selectionManager.focusedKey===e.key){if(n&&t.expandedKeys.has(e.key))return t.toggleKey(e.key),o.stopPropagation(),true;if(!t.expandedKeys.has(e.key)&&e.parentKey&&t.collection.getItem(e.parentKey)?.type==="item")return t.selectionManager.setFocusedKey(e.parentKey),o.stopPropagation(),true}return false}function Q(o){let t=null,e=null;do e=o.lastChild(),e&&(t=e);while(e);return t}function de(o,t){let e=t.getChildren?.(o.key),n=e?Array.from(e):[],a=n.length>0?n[0]:null,s=[];for(;a;)s.push(a),a=a.nextKey!=null?t.getItem(a.nextKey):null;return s}export{N as a,Se as b,He as c};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-SAZLJ66W.mjs';import {a as a$4}from'./chunk-M5M3EPG5.mjs';import {d as d$1}from'./chunk-W6QO7FPZ.mjs';import {a}from'./chunk-X3AXUU3H.mjs';import {a as a$3}from'./chunk-545KDVGI.mjs';import {d}from'./chunk-BGMVPFYK.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {g}from'./chunk-AUOQSTS5.mjs';import V,{useState}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 Q(e,t){let{inputElementType:P="input",isDisabled:M=false,isRequired:a$5=false,isReadOnly:F=false,type:y="text",validationBehavior:r="aria"}=e,[i,l]=a(e.value,e.defaultValue||"",e.onChange),{focusableProps:I}=d(e,t),o=d$1({...e,value:i}),{isInvalid:n,validationErrors:s,validationDetails:L}=o.displayValidation,{labelProps:E,fieldProps:g$1,descriptionProps:H,errorMessageProps:A}=a$1({...e,isInvalid:n,errorMessage:e.errorMessage||s,ref:t}),C=a$2(e,{labelable:true}),h={type:y,pattern:e.pattern},[v]=useState(i);return a$3(t,e.defaultValue??v,l),a$4(e,o,t),{labelProps:E,inputProps:c(C,P==="input"?h:void 0,{disabled:M,readOnly:F,required:a$5&&r==="native","aria-required":a$5&&r==="aria"||void 0,"aria-invalid":n||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:i,onChange:O=>l(g(O).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(V.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...I,...g$1}),descriptionProps:H,errorMessageProps:A,isInvalid:n,validationErrors:s,validationDetails:L}}export{Q as a};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-XTH6B5FE.mjs';import {b,a,d,e}from'./chunk-AUOQSTS5.mjs';/**
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 C=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype;function M(i){return i.dataset.liveAnnouncer==="true"||i.dataset.reactAriaTopLayer!==void 0}var E=new WeakMap,r=[];function k(i,s){let l=b(i?.[0]),N=s instanceof l.Element?{root:s}:s,h=N?.root??a(i?.[0]).body,T=N?.shouldUseInert&&C,d$1=new Set(i),a$2=new Set,H=e=>T&&e instanceof l.HTMLElement?e.inert:e.getAttribute("aria-hidden")==="true",L=(e,t)=>{T&&e instanceof l.HTMLElement?e.inert=t:t?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof l.HTMLElement&&(e.inert=false));},b$1=new Set;if(d())for(let e of i){let t=e;for(;t&&t!==h;){let n=t.getRootNode();"shadowRoot"in n&&b$1.add(n.shadowRoot),t=n.parentNode;}}let p=e$1=>{for(let o of e$1.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))d$1.add(o);let t=o=>{if(a$2.has(o)||d$1.has(o)||o.parentElement&&a$2.has(o.parentElement)&&o.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let A of d$1)if(e(o,A))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=a$1(a(e$1),e$1,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),f=t(e$1);if(f===NodeFilter.FILTER_ACCEPT&&O(e$1),f!==NodeFilter.FILTER_REJECT){let o=n.nextNode();for(;o!=null;)O(o),o=n.nextNode();}},O=e=>{let t=E.get(e)??0;H(e)&&t===0||(t===0&&L(e,true),a$2.add(e),E.set(e,t+1));};r.length&&r[r.length-1].disconnect(),p(h);let c=new MutationObserver(e$1=>{for(let t of e$1)if(t.type==="childList"){if(t.target.isConnected&&![...d$1,...a$2].some(n=>e(n,t.target)))for(let n of t.addedNodes)(n instanceof l.HTMLElement||n instanceof l.SVGElement)&&M(n)?d$1.add(n):n instanceof l.Element&&p(n);if(d()){for(let n of b$1)if(!n.isConnected){c.disconnect();break}}}});c.observe(h,{childList:true,subtree:true});let g=new Set;if(d())for(let e$1 of b$1){let t=new MutationObserver(n=>{for(let f of n)if(f.type==="childList"){if(f.target.isConnected&&![...d$1,...a$2].some(o=>e(o,f.target)))for(let o of f.addedNodes)(o instanceof l.HTMLElement||o instanceof l.SVGElement)&&M(o)?d$1.add(o):o instanceof l.Element&&p(o);if(d()){for(let o of b$1)if(!o.isConnected){c.disconnect();break}}}});t.observe(e$1,{childList:true,subtree:true}),g.add(t);}let v={visibleNodes:d$1,hiddenNodes:a$2,observe(){c.observe(h,{childList:true,subtree:true});},disconnect(){c.disconnect();}};return r.push(v),()=>{if(c.disconnect(),d())for(let e of g)e.disconnect();for(let e of a$2){let t=E.get(e);t!=null&&(t===1?(L(e,false),E.delete(e)):E.set(e,t-1));}v===r[r.length-1]?(r.pop(),r.length&&r[r.length-1].observe()):r.splice(r.indexOf(v),1);}}function _(i){let s=r[r.length-1];if(s&&!s.visibleNodes.has(i))return s.visibleNodes.add(i),()=>{s.visibleNodes.delete(i);}}export{k as a,_ as b};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-MHUFXHRU.mjs';import {a as a$3}from'./chunk-KLNQ24LT.mjs';import {a as a$2}from'./chunk-3L7GTQXK.mjs';import {b,c}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {PauseIcon,PlayIcon}from'@baseline-ui/icons/24';import _ 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 g="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q",z="rta2n91 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69o _1yep5z69p _1yep5z69q _1yep5z610h _1yep5z6w1 _1yep5z6w2 _1yep5z6w3 _1yep5z618m _1yep5z611i",f="rta2n90";var P=_.forwardRef(({className:h,style:k,size:v="lg",sources:j,playLabel:T,pauseLabel:I,audioTimelineLabel:x,playingLabel:A,pausedLabel:C,"data-block-id":S,"data-block-class":B,...M},w)=>{let t=_.useRef(null),{isPlaying:r,progress:U,duration:H,togglePlay:N,seek:R,formattedDuration:V,formattedCurrentTime:D,setProgress:E,setIsSliderDragging:s}=a(t,{playingLabel:A,pausedLabel:C}),{formatMessage:o}=b(),q=a$1({"data-block-id":S,"data-block-class":B,"data-state":r?"playing":"paused","data-loaded":H>0});return jsxs("div",{...q,...M,className:a$4(g,"BaselineUI-AudioPlayer",h),role:"group",style:k,ref:w,children:[jsx(b$1,{children:jsx("audio",{ref:t,children:j.map(({url:a,type:L})=>jsx("source",{src:a,type:L},a))})}),jsx(a$2,{icon:r?PauseIcon:PlayIcon,variant:"toolbar",isSelected:r,size:v,"aria-label":r?I??o(i.pause):T??o(i.play),style:{borderRadius:"50%"},onPress:N}),jsxs("div",{className:z,children:[jsx("span",{"aria-hidden":true,children:D}),jsx(a$3,{"aria-label":x??o(i.audioTimeline),value:U,minValue:0,maxValue:100,className:f,onChange:a=>{E(a),s(true);},onChangeEnd:a=>{R(a),s(false);}}),jsx("span",{"aria-hidden":true,children:V})]})]})});P.displayName="AudioPlayer";var i=c({play:{id:"bui.audioPlayer.play",defaultMessage:"Play"},pause:{id:"bui.audioPlayer.pause",defaultMessage:"Pause"},audioTimeline:{id:"bui.audioPlayer.audioTimeline",defaultMessage:"Audio timeline"}});export{P as a};
@@ -1,10 +0,0 @@
1
- import {a as a$6}from'./chunk-LTIDSWDM.mjs';import {a as a$e}from'./chunk-4TAUFBXO.mjs';import {k,j as j$1,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-UCQJ6FJO.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-5TDFLLMX.mjs';import {p}from'./chunk-SMAYNDQQ.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-KKJ6XIU3.mjs';import {b as b$6}from'./chunk-246VHB32.mjs';import {b as b$7}from'./chunk-OC42IZG2.mjs';import {b as b$8}from'./chunk-PAQQ7MQG.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-ZAMDRHQY.mjs';import {a as a$d}from'./chunk-6DU65N7Q.mjs';import {a as a$c,b as b$2}from'./chunk-RM2Y4D2M.mjs';import {d,h,e,f,g as g$1}from'./chunk-WICBTAMY.mjs';import {a as a$f}from'./chunk-NSC53QWT.mjs';import {a as a$m}from'./chunk-SAZLJ66W.mjs';import {b,c as c$2}from'./chunk-GX2IOGYR.mjs';import {a as a$t}from'./chunk-M5M3EPG5.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-WN6FAICZ.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-ULCYKB34.mjs';import {a as a$a}from'./chunk-F3HQNHR5.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$r}from'./chunk-4ZJMZB5B.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$p}from'./chunk-4PYEGHW5.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$q}from'./chunk-X3AXUU3H.mjs';import {a as a$s}from'./chunk-545KDVGI.mjs';import {a}from'./chunk-YS3Y5KGV.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {d as d$2}from'./chunk-Y4DRSGEJ.mjs';import {a as a$1}from'./chunk-3FYY26ED.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-TZ4MVY4E.mjs';import {a as a$n}from'./chunk-KEVERVHK.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {e as e$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import q,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';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 $=new WeakMap;function de(t,e,a){let{keyboardDelegate:n,isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:u,menuProps:r}=c$4({isDisabled:p,type:"listbox"},e,a),d=m=>{if(e.selectionManager.selectionMode!=="multiple")switch(m.key){case "ArrowLeft":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}case "ArrowRight":{m.preventDefault();let T=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();T!=null&&e.setSelectedKey(T);break}}},{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(m){e.setSelectedKey(m);}}),{isInvalid:g,validationErrors:b,validationDetails:C}=e.displayValidation,{labelProps:O,fieldProps:i,descriptionProps:M,errorMessageProps:f}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,u,i),h=c$3();return $.set(e,{isDisabled:p,isRequired:S,name:c,form:s,validationBehavior:y}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:p,onKeyDown:a$o(P.onKeyDown,d,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[h,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(m){e.isFocused||(t.onFocus&&t.onFocus(m),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(m){e.isOpen||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:h},menuProps:{...r,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:m=>{e$2(m.currentTarget,m.relatedTarget)||(t.onBlur&&t.onBlur(m),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[i["aria-labelledby"],P["aria-label"]&&!i["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:f,isInvalid:g,validationErrors:b,validationDetails:C,hiddenSelectProps:{isDisabled:p,name:c,label:t.label,state:e,triggerRef:a,form:s}}}function bt(t,e,a){let n=$.get(e)||{},{autoComplete:p,name:S=n.name,form:c=n.form,isDisabled:s=n.isDisabled}=t,{validationBehavior:y,isRequired:x}=n,{visuallyHiddenProps:l}=a$r({style:{position:"fixed",top:0,left:0}});a$s(t.selectRef,e.defaultValue,e.setValue),a$t({validationBehavior:y,focus:()=>a.current?.focus()},e,t.selectRef);let u=e.setValue,r=useCallback(d=>{let o=g$2(d);o.multiple?u(Array.from(o.selectedOptions,g=>g.value)):u(d.currentTarget.value);},[u]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:p,disabled:s,multiple:e.selectionManager.selectionMode==="multiple",required:y==="native"&&x,name:S,form:c,value:e.value??"",onChange:r,onInput:r}}}function ue(t){let{state:e,triggerRef:a,label:n,name:p,form:S,isDisabled:c}=t,s=useRef(null),y=useRef(null),{containerProps:x,selectProps:l}=bt({...t,selectRef:e.collection.size<=300?s:y},e,a),u=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:s,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(r=>{let d=e.collection.getItem(r);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&p&&u.map((r,d)=>jsx("option",{value:r??""},d))]})]})});if(p){let r=$.get(e)||{},{validationBehavior:d}=r;u.length===0&&(u=[null]);let o=u.map((g,b)=>{let C={type:"hidden",autoComplete:l.autoComplete,name:p,form:S,disabled:c,value:g??""};return d==="native"?jsx("input",{...C,ref:b===0?y:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...C,ref:b===0?y:null},b)});return jsx(Fragment,{children:o})}return null}function pe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$p(t),[p,S]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),s=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[y,x]=a$q(s,c,t.onChange),l=e==="single"&&Array.isArray(y)?y[0]:y,u=i=>{if(e==="single"){let M=Array.isArray(i)?i[0]??null:i;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(i)?M=i:i!=null&&(M=[i]),x(M);}},r=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>Bt(l),[l]),onSelectionChange:i=>{if(i!=="all"){if(e==="single"){let M=i.values().next().value??null;u(M);}else u([...i]);a&&n.close(),g.commitValidation();}}}),d=r.selectionManager.firstSelectedKey,o=useMemo(()=>[...r.selectionManager.selectedKeys].map(i=>r.collection.getItem(i)).filter(i=>i!=null),[r.selectionManager.selectedKeys,r.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,C]=useState(false),[O]=useState(l);return {...g,...r,...n,value:l,defaultValue:c??O,setValue:u,selectedKey:d,setSelectedKey:u,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:p,open(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.open());},toggle(i=null){(r.collection.size!==0||t.allowsEmptyCollection)&&(S(i),n.toggle());},isFocused:b,setFocused:C}}function Bt(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var j=q.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:p,style:S,value:c$2,"data-block-id":s,"data-block-class":y,fallbackValue:x,selectionMode:l="single",onRemove:u,maxCount:r=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),C=c$2?.[0]??null,O=C?.label??x,i$1=C?.icon??null,M=q.useRef(null),f=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:h$1,isHovered:m}=a$1({isDisabled:o.isDisabled}),{focusProps:T,isFocused:N,isFocusVisible:A}=a$2(),F=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let V=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":N,"data-focus-visible":A,"data-hovered":m,"data-pressed":P,"data-open":e,"data-block-id":s,"data-block-class":y}),w=o["aria-labelledby"],ae=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let U=c$2.slice(0,r),H=c$2.slice(r),W=[...U,...H.length>0?[{label:(typeof d$1=="function"?d$1({count:H.length}):d$1)??b$2(It.more,{count:H.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:W,onRemove:o.isReadOnly?void 0:X=>{X.has("remaining-value")?u?.(new Set(H.map(E=>E.id))):u?.(X);},"aria-labelledby":w,className:k,isDisabled:o.isDisabled})},[c$2,r,b$2,d$1,w,o.isDisabled,u,o.isReadOnly]),z=l==="multiple";return jsxs("div",{...c$1(z?Object.fromEntries(Object.entries(B).filter(([U])=>U.startsWith("on"))):c$1(B,T),h$1,V),ref:z?g$1:b$1(g$1,M),className:a$8(i({isFocused:A,isDisabled:!!o.isDisabled,isOpen:e,isHovered:m,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:f}),h({variant:t,isHovered:m,isFocused:A,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),p,"BaselineUI-Select-Button"),"data-testid":"select-button",style:S,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?ae():jsxs("span",{className:k,children:[i$1?jsx(i$1,{size:24}):null,jsx("span",{...n,children:O})]}),F?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j$1),children:jsx(F,{size:16})}):null]}),jsx("div",{...z?{...c$1(B,T),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});j.displayName="SelectButton";var It=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var xt=q.createContext({state:null,popoverAnchorRef:null}),Se=q.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":p$1,"data-block-class":S,onTriggerPress:c,placement:s="bottom start",triggerClassName:y,triggerStyle:x,state:l,optionStyle:u,optionClassName:r,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:C,selectAllLabel:O,moreLabel:i,renderTrigger:M=({buttonProps:P,selectedValue:h,valueProps:m,isOpen:T,ref:N,selectionMode:A,onRemove:F,maxCount:V})=>jsx(j,{...P,className:y,style:x,isOpen:T,isReadOnly:f$2.isReadOnly,ref:N,variant:n,validationState:f$2.validationState,valueProps:m,value:h,fallbackValue:f$2.placeholder,selectionMode:A,onRemove:F,maxCount:V,moreLabel:i}),...f$2},B)=>{let{popoverAnchorRef:P}=useContext(xt),h=q.useRef(null),{formatMessage:m}=b(),T=C??m(ye.search),N=useContext(a$9),{isVirtualized:A}=useContext(p),F=a$a(f$2.portalContainer),{labelProps:V,triggerProps:w,valueProps:ae,menuProps:z,descriptionProps:U,errorMessageProps:H}=de({...a$b(f$2),validationState:f$2.validationState==="error"?"invalid":"valid"},l,h),W=c$3(),X=a$c(f$2)==="warningMessage",E=b$2({...f$2,descriptionProps:U,errorMessageProps:H,warningMessageProps:{id:W},labelPosition:a}),ht=l.selectedItems?.map(_=>_.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":p$1,"data-block-class":S,ref:B,children:[f$2.label||E?jsxs("div",{className:f({labelPosition:a,hasMessage:!!E}),children:[f$2.label?jsx("div",{...V,className:a$8(e,"BaselineUI-Select-Label"),children:f$2.label}):null,a==="start"&&E]}):null,jsx(ue,{state:l,triggerRef:h,isDisabled:f$2.isDisabled,label:f$2.label,name:f$2.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":V.id},w,X?{"aria-describedby":[w["aria-describedby"],W].filter(Boolean).join(" ")}:null),selectedValue:ht,valueProps:ae,isOpen:l.isOpen,ref:h,selectionMode:f$2.selectionMode??"single",onRemove:_=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ne=>!_.has(ne))));},maxCount:f$2.maxCount??2}),a==="top"&&E]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:s,state:l,portalContainer:F,offset:2,triggerRef:P||h,style:e$2,className:"BaselineUI-Select-Popover",...f$2,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[N?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":T,placeholder:T,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:z,children:jsx(q$1,{label:f$2.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:A}),optionStyle:u,optionClassName:r,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??m(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ne=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ne));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??m(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Pt=q.forwardRef(({collection:t,...e},a)=>{let n=pe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Pt.displayName="SelectStandalone";var le=q.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},p)=>{let{state:S}=useContext(xt);useEffect(()=>{a$5(S||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,S]);let c=useMemo(()=>({renderOption:(s,y)=>jsx(n,{...y,item:s,selectionIcon:y.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return S?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:p,state:S}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:s=>jsx(Pt,{collection:s,...n$1,ref:p})})});le.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var Ct=q.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,icon:p,tooltip:S=true,iconTooltip:c=true,...s},y)=>{let x=q.useRef(null),{tooltipProps:l}=a$i({label:s["aria-label"],tooltip:S}),u=useCallback(({buttonProps:r,selectedValue:d,valueProps:o,isOpen:g,ref:b})=>jsx(a$j,{...l,children:jsx(j,{...r,isOpen:g,isReadOnly:s.isReadOnly,ref:b,variant:a,validationState:s.validationState,value:d,fallbackValue:s.placeholder,valueProps:o,moreLabel:s.moreLabel})}),[s,l,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,style:e,ref:b$1(y,x),children:[p?jsx(a$k,{icon:p,label:s["aria-label"],tooltip:c,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(le,{...s,renderTrigger:u})]})});Ct.displayName="IconSelect";export{pe as a,xt as b,le as c,Ct as d};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-EU75HMPG.mjs';import {a as a$h,b as b$4}from'./chunk-BJVFZYUV.mjs';import {a as a$k}from'./chunk-UQJGSVXP.mjs';import {a as a$i}from'./chunk-RFTDIXEG.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-ULCYKB34.mjs';import {a as a$j}from'./chunk-6Z6HOW6T.mjs';import {a as a$d}from'./chunk-7PRJIPFA.mjs';import {b as b$2}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$g}from'./chunk-4ZJMZB5B.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$l}from'./chunk-66CUIXA6.mjs';import {a as a$f}from'./chunk-D3IZ4HBL.mjs';import {a as a$b}from'./chunk-545KDVGI.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {e,a as a$c}from'./chunk-BGMVPFYK.mjs';import {b as b$3,a as a$e}from'./chunk-YB3KW7JC.mjs';import {a as a$2}from'./chunk-3FYY26ED.mjs';import {a as a$a,g,k}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$8}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Ir,{useMemo,useState,useCallback,useRef}from'react';import {themeVars}from'@baseline-ui/tokens';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 oe={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ue=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Xe=e=>`${e.withChannelValue("saturation",0)}, transparent`,kr={hue:Ue,saturation:Xe,lightness:()=>"black, transparent, white"},Pr={hue:Ue,saturation:Xe,brightness:()=>"black, transparent"};function Ge({direction:e,state:r,zChannel:l,xChannel:t,yChannel:n}){return useMemo(()=>{let m=e==="rtl"?"left":"right",v={},z=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let s=a$1("rgb(0, 0, 0)");v={background:[`linear-gradient(to ${m}, ${s.withChannelValue(t,0)}, ${s.withChannelValue(t,255)})`,`linear-gradient(to top, ${s.withChannelValue(n,0)}, ${s.withChannelValue(n,255)})`,s.withChannelValue(l,z)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let s=r.value.getColorChannels(),d=a$1("hsl(0, 100%, 50%)").withChannelValue(l,z),c=s.filter(i=>i!==l).map(i=>`linear-gradient(to ${i===t?m:"top"}, ${kr[i](d)})`).reverse();l==="hue"&&c.push(d.toString("css")),v={background:c.join(", ")};break}case "hsb":{let s=r.value.getColorChannels(),d=a$1("hsb(0, 100%, 100%)").withChannelValue(l,z),c=s.filter(i=>i!==l).map(i=>`linear-gradient(to ${i===t?m:"top"}, ${Pr[i](d)})`).reverse();l==="hue"&&c.push(d.toString("css")),v={background:c.join(", ")};break}}let{x:h,y}=r.getThumbPosition();e==="rtl"&&(h=1-h);let f={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...f,...v}},thumbStyleProps:{style:{position:"absolute",left:`${h*100}%`,top:`${y*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...f}}}},[e,r,l,t,n])}function Je(e,r){let{isDisabled:l,inputXRef:t,inputYRef:n,containerRef:u,"aria-label":m,xName:v,yName:z,form:h}=e,y=b$2(oe,"@react-aria/color"),{addGlobalListener:f,removeGlobalListener:s}=a$9(),{direction:d,locale:c$1}=b$1(),[i,x]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[S,C]=useState(false),[V,k$1]=useState(false),{xChannel:_,yChannel:p,zChannel:w}=r.channels,g$1=r.xChannelStep,F=r.yChannelStep,j=useRef(null),{keyboardProps:ir}=a$c({onKeyDown(o){if(!/^(PageUp|PageDown|Home|End)$/.test(o.key)){o.continuePropagation();return}o.preventDefault(),r.setDragging(true),C(true);let a;switch(o.key){case "PageUp":r.incrementY(r.yChannelPageStep),a="y";break;case "PageDown":r.decrementY(r.yChannelPageStep),a="y";break;case "Home":d==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep),a="x";break;case "End":d==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep),a="x";break}r.setDragging(false),a&&(b(a==="x"?t:n),x(a));}}),X={onMoveStart(){j.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:a,pointerType:$,shiftKey:G}){let{incrementX:W,decrementX:ne,incrementY:ie,decrementY:M,xChannelPageStep:E,xChannelStep:H,yChannelPageStep:ve,yChannelStep:Se,getThumbPosition:Cr,setColorFromPoint:vr}=r;j.current==null&&(j.current=Cr());let{width:Sr,height:gr}=u.current?.getBoundingClientRect()||{width:0,height:0},ge=o!==0||a!==0;if($==="keyboard"){let xe=G&&E>H?E:H,ke=G&&ve>Se?ve:Se;o>0&&d==="ltr"||o<0&&d==="rtl"?W(xe):o<0&&d==="ltr"||o>0&&d==="rtl"?ne(xe):a>0?M(ke):a<0&&ie(ke),C(ge),i=ge&&Math.abs(a)>Math.abs(o)?"y":"x",x(i);}else j.current.x+=(d==="rtl"?-1:1)*o/Sr,j.current.y+=a/gr,vr(j.current.x,j.current.y);},onMoveEnd(){I.current=false,r.setDragging(false),b(i==="x"?t:n);}},{moveProps:pr}=a$d(X),{focusWithinProps:ur}=b$3({onFocusWithinChange:o=>{o||(C(false),k$1(false));}}),N=useRef(void 0),I=useRef(false),{moveProps:sr}=a$d({onMoveStart(){I.current&&X.onMoveStart();},onMove(o){I.current&&X.onMove(o);},onMoveEnd(){I.current&&X.onMoveEnd();}}),te=o=>{let a=b$5(u.current);r.isDragging||(N.current=o,C(false),b(),r.setDragging(true),typeof PointerEvent<"u"?f(a,"pointerup",T,false):(f(a,"mouseup",T,false),f(a,"touchend",T,false)));},T=o=>{let a=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===N.current&&(C(false),b(),r.setDragging(false),N.current=void 0,I.current=false,typeof PointerEvent<"u"?s(a,"pointerup",T,false):(s(a,"mouseup",T,false),s(a,"touchend",T,false)));},ae=(o,a,$,G)=>{let W=o.getBoundingClientRect(),{width:ne,height:ie}=W,M=($-W.x)/ne,E=(G-W.y)/ie;d==="rtl"&&(M=1-M);let H=b$5(u.current);M>=0&&M<=1&&E>=0&&E<=1&&!r.isDragging&&N.current===void 0&&(I.current=true,C(false),N.current=a,r.setColorFromPoint(M,E),b(),r.setDragging(true),typeof PointerEvent<"u"?f(H,"pointerup",O,false):(f(H,"mouseup",O,false),f(H,"touchend",O,false)));},O=o=>{let a=o.pointerId??o.changedTouches?.[0].identifier;if(I.current&&a===N.current){I.current=false,C(false),N.current=void 0,r.setDragging(false),b();let $=b$5(u.current);typeof PointerEvent<"u"?s($,"pointerup",O,false):(s($,"mouseup",O,false),s($,"touchend",O,false));}},cr=l?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ae(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ae(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ae(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},sr),dr=l?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||te(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||te(void 0);},onTouchStart:o=>{te(o.changedTouches[0].identifier);}}},ur,ir,pr),{focusProps:mr}=a$e({onFocus:()=>{x("x");}}),{focusProps:yr}=a$e({onFocus:()=>{x("y");}}),fe=o=>{let{target:a}=o;k$1(true),a===t.current?r.setXValue(parseFloat(a.value)):a===n.current&&r.setYValue(parseFloat(a.value));},B=g()||k(),A=r.getDisplayColor(),ze=useCallback(o=>`${V||S?y.format("colorNameAndValue",{name:A.getChannelName(o,c$1),value:A.formatChannelValue(o,c$1)}):[y.format("colorNameAndValue",{name:A.getChannelName(o,c$1),value:A.formatChannelValue(o,c$1)}),y.format("colorNameAndValue",{name:A.getChannelName(o===p?_:p,c$1),value:A.formatChannelValue(o===p?_:p,c$1)}),y.format("colorNameAndValue",{name:A.getChannelName(w,c$1),value:A.formatChannelValue(w,c$1)})].join(", ")}, ${A.getColorName(c$1)}`,[c$1,A,y,V,S,_,p,w]),R=y.format("colorPicker"),br=a$f({...e,"aria-label":m?y.format("colorInputLabel",{label:m,channelLabel:R}):R}),_r=a$f({...e,"aria-label":m?y.format("colorInputLabel",{label:m,channelLabel:R}):R}),fr=a$f({...e,"aria-label":m?`${m}, ${R}`:void 0},B?R:void 0),he=y.format("twoDimensionalSlider"),{visuallyHiddenProps:Ce}=a$g({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:zr,thumbStyleProps:hr}=Ge({direction:d,state:r,xChannel:_,yChannel:p,zChannel:w});return {colorAreaProps:{...fr,...cr,...zr,role:"group"},thumbProps:{...dr,...hr,role:"presentation"},xInputProps:{...br,...Ce,...mr,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:g$1,"aria-roledescription":he,"aria-valuetext":ze(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l,value:r.value.getChannelValue(_),name:v,form:h,tabIndex:B||!i||i==="x"?void 0:-1,"aria-hidden":B||!i||i==="x"||S?void 0:"true",onChange:fe},yInputProps:{..._r,...Ce,...yr,type:"range",min:r.value.getChannelRange(p).minValue,max:r.value.getChannelRange(p).maxValue,step:F,"aria-roledescription":he,"aria-valuetext":ze(p),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l,value:r.value.getChannelValue(p),name:z,form:h,tabIndex:B||i==="y"?void 0:-1,"aria-hidden":B||i==="y"||S?void 0:"true",onChange:fe}}}function Ze(e,r){let{trackRef:l,inputRef:t,orientation:n,channel:u,"aria-label":m,name:v,form:z}=e,{locale:h,direction:y}=b$1();!e.label&&!m&&!e["aria-labelledby"]&&(m=r.value.getChannelName(u,h));let{groupProps:f,trackProps:s,labelProps:d,outputProps:c$1}=a$h({...e,"aria-label":m},r,l),{inputProps:i,thumbProps:x}=b$4({index:0,orientation:n,isDisabled:e.isDisabled,name:v,form:z,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),S=()=>{let k;switch(n==="vertical"?k="top":y==="ltr"?k="right":k="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(p=>b.withChannelValue("hue",p).toString("css")).join(", ");return `linear-gradient(to ${k}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),p=r.getThumbMaxValue(0),w=b.withChannelValue(u,_).toString("css"),g=b.withChannelValue(u,(p-_)/2).toString("css"),F=b.withChannelValue(u,p).toString("css");return `linear-gradient(to ${k}, ${w}, ${g}, ${F})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),p=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${k}, ${_}, ${p})`}default:throw new Error("Unknown color channel: "+u)}},C={forcedColorAdjust:"none"};u==="hue"?i["aria-valuetext"]+=`, ${b.getHueName(h)}`:u!=="alpha"&&(i["aria-valuetext"]+=`, ${b.getColorName(h)}`);let{visuallyHiddenProps:V}=a$g({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(f,s),style:{...s.style,...C,background:S()}},inputProps:{...i,style:{...i.style,...V.style}},thumbProps:{...x,style:{...x.style,...C}},labelProps:d,outputProps:c$1}}function Qe(e,r,l){let{isDisabled:t,isReadOnly:n,isRequired:u,isWheelDisabled:m,validationBehavior:v="aria"}=e,{colorValue:z,inputValue:h,increment:y,decrement:f,incrementToMax:s,decrementToMin:d,commit:c$1}=r,i=c$2(),{spinButtonProps:x}=a$i({isDisabled:t,isReadOnly:n,isRequired:u,maxValue:16777215,minValue:0,onIncrement:y,onIncrementToMax:s,onDecrement:f,onDecrementToMin:d,value:z?z.toHexInt():void 0,textValue:z?z.toString("hex"):void 0}),[b,S]=useState(false),{focusWithinProps:C}=b$3({isDisabled:t,onFocusWithinChange:S}),V=useCallback(g=>{Math.abs(g.deltaY)<=Math.abs(g.deltaX)||(g.deltaY>0?y():g.deltaY<0&&f());},[f,y]);a$j({onScroll:V,isDisabled:m||t||n||!b},l);let _=g=>{r.validate(g)&&r.setInputValue(g);},{inputProps:p,...w}=a$k({...e,id:i,value:h,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:_},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),p=c(p,x,C,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:c$1}),v==="native"&&(p["aria-required"]=void 0),{inputProps:p,...w}}function le(e){let{color:r,colorName:l}=e,t=r||"#fff0",n=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),m=a$8(e,{labelable:true}),v=b$2(oe,"@react-aria/color"),z=c$2(e.id);return l||(l=n.getChannelValue("alpha")===0?v.format("transparent"):n.getColorName(u)),{colorSwatchProps:{...m,role:"img","aria-roledescription":v.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${z} ${e["aria-labelledby"]}`:void 0,id:z,style:{backgroundColor:n.toString("css"),forcedColorAdjust:"none"}},color:n||null}}var rl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",ol="_1dbkl5e",ll=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),tl="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",al=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),nl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",il="_1dbkl5f z9nup86",pl="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",er="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",ul="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",sl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",dl=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),ml=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),yl="_1dbkl5g",bl="_1dbkl5u",_l="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",fl="_1dbkl5x",zl="_1dbkl5w",hl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",Cl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),vl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var Al=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],$l=a$1("#000000").toFormat("hsla"),me="hsla",ye="hexa";function Dr(e){let r=document.createElement("canvas").getContext("2d");return a$l(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ll(e){if(typeof e=="string")try{return a$1(e).toFormat(me)}catch{return a$1(Dr(e)).toFormat(me)}else if(e)return e.toFormat(me);return null}function Dl(e,r){return e?.getChannelValue("alpha")?r?.toString(ye)===e.toString(ye):!r?.getChannelValue("alpha")}function Vl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var be="NONE";function Il(e,r){let l=r?.map(n=>({id:a$1(n.color).toString(ye),label:n.label}))||[],t={id:be,label:e};return [...l,t]}var jl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},n)=>(a$l(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:n,className:er,children:jsx(_e,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),or=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var lr=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),tr="_1yep5z6fa",ar="_1344e9q9 _1yep5z6fp";var _e=Ir.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:n,style:u,className:m,id:v,tooltip:z,isIndeterminate:h,indeterminateIcon:y=HelpIcon,noneLabel:f,"data-block-id":s,"data-block-class":d,...c$1},i)=>{let x=e$1&&e$1!==be&&(typeof e$1=="string"?a$1(e$1):e$1),{formatMessage:b$1}=b(),S=!x,{colorSwatchProps:C}=le({color:S?"#000000":e$1}),{hoverProps:V,isHovered:k}=a$2({isDisabled:n||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":k,"data-block-id":s,"data-block-class":d,"data-disabled":n,"data-interactive":t,"data-indeterminate":h}),p=S?f??b$1(nr.none):C["aria-label"],w=c$1["aria-label"]??p,{tooltipProps:g}=a$4({tooltip:z,label:w}),F=jsx("div",{...c(V,_,S?{}:C),style:u,"aria-label":S?f??b$1(nr.none):C["aria-label"],role:"img",className:a$6(lr({removeBlendMode:S,isFocusVisible:r,isDisabled:!!n,isSelected:!!l,isHovered:k}),"BaselineUI-ColorSwatch",m),ref:i,id:v,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:n?"medium":void 0,style:x&&!h?or(x,4):void 0,children:[S&&!h?jsx("div",{className:ar}):null,h&&y?jsx(y,{role:"presentation",size:16,className:tr,"aria-hidden":"true"}):null]})});return g&&!n?jsx(a$7,{...g,children:jsx(e,{children:F})}):F});_e.displayName="ColorSwatch";var nr=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{me as A,ye as B,Ll as C,Dl as D,Vl as E,be as F,Il as G,jl as H,_e as I,Je as a,Qe as b,Ze as c,rl as d,ol as e,ll as f,tl as g,al as h,nl as i,il as j,pl as k,ul as l,sl as m,cl as n,dl as o,ml as p,yl as q,bl as r,_l as s,fl as t,zl as u,hl as v,Cl as w,vl as x,Al as y,$l as z};
@@ -1,10 +0,0 @@
1
- import {b,g,e}from'./chunk-AUOQSTS5.mjs';import {useEffect}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
- var m=new WeakMap;function E(u){let{triggerRef:e$1,isOpen:r,onClose:o}=u;useEffect(()=>{if(!r||o===null)return;let n=b(e$1.current),l=a=>{let t=g(a);if(!e$1.current||t instanceof n.Node&&!e(t,e$1.current)||t instanceof n.HTMLInputElement||t instanceof n.HTMLTextAreaElement)return;let i=o||m.get(e$1.current);i&&i();};return n.addEventListener("scroll",l,true),()=>{n.removeEventListener("scroll",l,true);}},[r,o,e$1]);}export{m as a,E as b};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-N2XGJKZG.mjs';import c,{useRef,useState,useEffect}from'react';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
- var f=process.env.NODE_ENV!=="production",u="BUI \u{1F30D}:",h=e=>{e.error===void 0?console.warn(`${u} ${e.message}`):console.warn(`${u} ${e.message}`,e.error);},S=1e3;function M(e,n){let o=new Set;return (s,r)=>{if(e.has(s)||o.has(s))return;e.size>=S&&(o=new Set(e),e.clear()),e.add(s);let t=n?.();if(!t){h(r());return}try{t(r());}catch(a){console.error(`${u} \`onMessageIssue\` threw; the issue it was given was dropped.`,a);}}}var E=new Set,L=c.createContext({messages:{},reportMessageIssue:f?M(E):void 0,setLang:()=>{}}),y=({children:e,messages:n={},shouldLogMissingMessages:o=f,onMessageIssue:s,...r})=>{let t=useRef(new Set),a$1=useRef(false),[v,g]=useState(r.locale||"");useEffect(()=>{a$1.current?t.current.clear():a$1.current=true;},[v,r.locale]);let d=useRef(s);d.current=s;let P=c.useMemo(()=>M(t.current,()=>d.current),[]),l=s||o?P:void 0,m=c.useMemo(()=>({messages:n,reportMessageIssue:l,setLang:g}),[n,l,g]);return jsx(a,{...r,children:jsx(L.Provider,{value:m,children:e})})};y.displayName="I18nProvider";export{f as a,M as b,L as c,y as d};
@@ -1,10 +0,0 @@
1
- import {a}from'./chunk-XPISSX5R.mjs';import {useState,useMemo}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
- var F={};a(F,{useListData:()=>w,useTreeData:()=>L});function w(S){let{initialItems:m=[],initialSelectedKeys:c,getKey:f=K=>K.id??K.key,filter:r,initialFilterText:e=""}=S,[t,n]=useState({items:m,selectedKeys:c==="all"?"all":new Set(c||[]),filterText:e}),u=useMemo(()=>r?t.items.filter(K=>r(K,t.filterText)):t.items,[t.items,t.filterText,r]);return {...t,items:u,...B({getKey:f},n),getItem(K){return t.items.find(p=>f(p)===K)}}}function B(S,m){let{cursor:c,getKey:f}=S;return {setSelectedKeys(r){m(e=>({...e,selectedKeys:r}));},addKeysToSelection(r){m(e=>e.selectedKeys==="all"?e:r==="all"?{...e,selectedKeys:"all"}:{...e,selectedKeys:new Set([...e.selectedKeys,...r])});},removeKeysFromSelection(r){m(e=>{if(r==="all")return {...e,selectedKeys:new Set};let t=e.selectedKeys==="all"?new Set(e.items.map(f)):new Set(e.selectedKeys);for(let n of r)t.delete(n);return {...e,selectedKeys:t}});},setFilterText(r){m(e=>({...e,filterText:r}));},insert(r,...e){m(t=>b(t,r,...e));},insertBefore(r,...e){m(t=>{let n=t.items.findIndex(u=>f?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return b(t,n,...e)});},insertAfter(r,...e){m(t=>{let n=t.items.findIndex(u=>f?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return b(t,n+1,...e)});},prepend(...r){m(e=>b(e,0,...r));},append(...r){m(e=>b(e,e.items.length,...r));},remove(...r){m(e=>{let t=new Set(r),n=e.items.filter(K=>!t.has(f(K))),u="all";if(e.selectedKeys!=="all"){u=new Set(e.selectedKeys);for(let K of r)u.delete(K);}return c==null&&n.length===0&&(u=new Set),{...e,items:n,selectedKeys:u}});},removeSelectedItems(){m(r=>{if(r.selectedKeys==="all")return {...r,items:[],selectedKeys:new Set};let e=r.selectedKeys,t=r.items.filter(n=>!e.has(f(n)));return {...r,items:t,selectedKeys:new Set}});},move(r,e){m(t=>{let n=t.items.findIndex(p=>f(p)===r);if(n===-1)return t;let u=t.items.slice(),[K]=u.splice(n,1);return u.splice(e,0,K),{...t,items:u}});},moveBefore(r,e){m(t=>{let n=t.items.findIndex(p=>f(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>f(k)===p)).sort((p,k)=>p-k);return N(t,K,n)});},moveAfter(r,e){m(t=>{let n=t.items.findIndex(p=>f(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>f(k)===p)).sort((p,k)=>p-k);return N(t,K,n+1)});},update(r,e){m(t=>{let n=t.items.findIndex(K=>f(K)===r);if(n===-1)return t;let u;return typeof e=="function"?u=e(t.items[n]):u=e,{...t,items:[...t.items.slice(0,n),u,...t.items.slice(n+1)]}});}}}function b(S,m,...c){return {...S,items:[...S.items.slice(0,m),...c,...S.items.slice(m)]}}function N(S,m,c){c-=m.filter(e=>e<c).length;let f=m.map(e=>({from:e,to:c++}));for(let e=0;e<f.length;e++){let t=f[e].from;for(let n=e;n<f.length;n++)f[n].from>t&&f[n].from--;}for(let e=0;e<f.length;e++){let t=f[e];for(let n=f.length-1;n>e;n--){let u=f[n];u.from<t.to?t.to++:u.from++;}}let r=S.items.slice();for(let e of f){let[t]=r.splice(e.from,1);r.splice(e.to,0,t);}return {...S,items:r}}function L(S){let{initialItems:m=[],initialSelectedKeys:c,getKey:f=l=>l.id??l.key,getChildren:r=l=>l.children}=S,[e,t]=useState(()=>k(m,new Map)),{items:n,nodeMap:u}=e,[K,p]=useState(new Set(c||[]));function k(l=[],o,s){return l==null&&(l=[]),{items:l.map(T=>{let y={key:f(T),parentKey:s??null,value:T,children:null};return y.children=k(r(T),o,y.key).items,o.set(y.key,y),y}),nodeMap:o}}function g(l,o,s,T){let y=o==null?null:T.get(o);if(y==null)return {items:l,nodeMap:T};let d=new Map(T),i=s(y);for(i==null?I(y,d):h(i,d);y&&y.parentKey;){let a=d.get(y.parentKey),v={key:a.key,parentKey:a.parentKey,value:a.value,children:null},x=a.children;i==null&&x&&(x=x.filter(M=>M!==y)),v.children=x?.map(M=>M===y?i:M)??null,d.set(v.key,v),i=v,y=a;}return i==null&&(l=l.filter(a=>a!==y)),{items:l.map(a=>a===y?i:a),nodeMap:d}}function h(l,o){if(o.set(l.key,l),l.children)for(let s of l.children)h(s,o);}function I(l,o){if(o.delete(l.key),l.children)for(let s of l.children)I(s,o);}return {items:n,selectedKeys:K,setSelectedKeys:p,getItem(l){return u.get(l)},insert(l,o,...s){t(({items:T,nodeMap:y})=>{let{items:d,nodeMap:i}=k(s,new Map(y),l);return l==null?{items:[...T.slice(0,o),...d,...T.slice(o)],nodeMap:i}:g(T,l,a=>({key:a.key,parentKey:a.parentKey,value:a.value,children:[...a.children.slice(0,o),...d,...a.children.slice(o)]}),i)});},insertBefore(l,...o){let s=u.get(l);if(!s)return;let T=u.get(s.parentKey),d=(T?T.children:n).indexOf(s);this.insert(T?.key??null,d,...o);},insertAfter(l,...o){let s=u.get(l);if(!s)return;let T=u.get(s.parentKey),d=(T?T.children:n).indexOf(s);this.insert(T?.key??null,d+1,...o);},prepend(l,...o){this.insert(l,0,...o);},append(l,...o){if(l==null)this.insert(null,n.length,...o);else {let s=u.get(l);if(!s)return;this.insert(l,s.children.length,...o);}},remove(...l){if(l.length===0)return;let o=n,s=u,T;for(let d of l)T=g(o,d,()=>null,s),s=T.nodeMap,o=T.items;t(T);let y=new Set(K);for(let d of K)T.nodeMap.has(d)||y.delete(d);p(y);},removeSelectedItems(){this.remove(...K);},move(l,o,s){t(({items:T,nodeMap:y})=>{let d=y.get(l);if(!d)return {items:T,nodeMap:y};let{items:i,nodeMap:a}=g(T,l,()=>null,y),v={...d,parentKey:o};return o==null?(h(v,a),{items:[...i.slice(0,s),v,...i.slice(s)],nodeMap:a}):g(i,o,x=>({key:x.key,parentKey:x.parentKey,value:x.value,children:[...x.children.slice(0,s),v,...x.children.slice(s)]}),a)});},moveBefore(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,a=null;i!=null&&(a=y.get(i)??null);let v=a?.children?a.children.indexOf(d):T.indexOf(d);return A(s,o,a,v,g,h)});},moveAfter(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,a=null;i!=null&&(a=y.get(i)??null);let v=a?.children?a.children.indexOf(d):T.indexOf(d);return v++,A(s,o,a,v,g,h)});},update(l,o){t(({items:s,nodeMap:T})=>g(s,l,y=>{let d={key:y.key,parentKey:y.parentKey,value:o,children:null},i=k(r(o),T,d.key);return d.children=i.items,d},T));}}}function A(S,m,c,f,r,e){let{items:t,nodeMap:n}=S,u=c,K=new Set(m);for(;u?.parentKey!=null;){if(K.has(u.key))throw new Error("Cannot move an item to be a child of itself.");u=n.get(u.parentKey)??null;}let p=f,k=Array.isArray(m)?m:[...m],g=new Map,h=[],I=t,l=n,o=0;function s(i,{inorder:a,postorder:v}){if(a?.(i),i!=null)for(let x of i.children??[])s(x,{inorder:a,postorder:v}),v?.(x);}function T(i){k.includes(i.key)&&g.set(i.key,o++);}function y(i){if(k.includes(i.key)){h.push({...l.get(i.key),parentKey:c?.key??null});let{items:a,nodeMap:v}=r(I,i.key,()=>null,l);I=a,l=v;}(i.parentKey===c||i.parentKey===c?.key)&&k.includes(i.key)&&(c?.children?c.children.indexOf(i):t.indexOf(i))<p&&f--;}s({children:t},{inorder:T,postorder:y});let d=h.sort((i,a)=>g.get(i.key)>g.get(a.key)?1:-1);return !c||c.key==null?(d.forEach(i=>{e(i,l);}),{items:[...I.slice(0,f),...d,...I.slice(f)],nodeMap:l}):r(I,c.key,i=>({key:i.key,parentKey:i.parentKey,value:i.value,children:[...i.children.slice(0,f),...d,...i.children.slice(f)]}),l)}export{w as a,L as b,F as c};
@@ -1,10 +0,0 @@
1
- import {a as a$1,h}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-RMUV6NJJ.mjs';import S,{useState,useRef,useCallback,useEffect}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
- var i=typeof document<"u"?S.useLayoutEffect:()=>{};function y(n){let[t,u]=useState(n),r=useRef(t),e=useRef(null),o=useRef(()=>{if(!e.current)return;let c=e.current.next();if(c.done){e.current=null;return}r.current===c.value?o.current():u(c.value);});i(()=>{r.current=t,e.current&&o.current();});let l=useCallback(c=>{e.current=c(r.current),o.current();},[o]);return [t,l]}var b=!!(typeof window<"u"&&window.document&&window.document.createElement),f=new Map,s;typeof FinalizationRegistry<"u"&&(s=new FinalizationRegistry(n=>{f.delete(n);}));function v(n){let[t,u]=useState(n),r=useRef(null),e=a(t),o=useRef(null);if(s&&s.register(o,e),b){let l=f.get(e);l&&!l.includes(r)?l.push(r):f.set(e,[r]);}return i(()=>{let l=e;return ()=>{s&&s.unregister(o),f.delete(l);}},[e]),useEffect(()=>{let l=r.current;return l&&u(l),()=>{l&&(r.current=null);}}),e}function A(n,t){if(n===t)return n;let u=f.get(n);if(u)return u.forEach(e=>e.current=t),t;let r=f.get(t);return r?(r.forEach(e=>e.current=n),n):t}function H(n=[],t){let u=v(),[r,e]=y(u),o=useCallback(()=>{let l=a$1(t?.current);e(function*(){yield u,yield h(u,l)?u:void 0;});},[u,e,t]);return i(o,[u,o,...n]),r}export{i as a,y as b,v as c,A as d,H as e};
@@ -1,10 +0,0 @@
1
- import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {c}from'./chunk-WRQ4FPJE.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {b,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-FXCHST4Z.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import C 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 f=a({defaultClassName:"_5uw3kp0 oom8bs0 z9nup81",variantClassNames:{isHovered:{true:"_5uw3kp1"},isFocusVisible:{true:"_5uw3kp2"},isDisabled:{true:"_5uw3kp3"},isSelected:{true:"_5uw3kp4"},size:{sm:"_5uw3kp5",md:"_5uw3kp6",lg:"_5uw3kp7"},variant:{primary:"_5uw3kp8",toolbar:"_5uw3kp9"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true},"_5uw3kpa"],[{isSelected:true,isDisabled:true},"_5uw3kpb"],[{variant:"primary",size:"lg"},"_5uw3kpc"]]}),k=a({defaultClassName:"_5uw3kpd _1yep5z6f9",variantClassNames:{isDisabled:{true:"_1yep5z611u"},isSelected:{true:"_1yep5z611w"}},defaultVariants:{},compoundVariants:[]});var z={sm:16,md:20,lg:24},v=C.forwardRef(({className:t,style:a,iconStart:i,size:u="md",elementType:w="button",variant:_="toolbar",...e},y)=>{let o=a$1(e),{buttonProps:h,isPressed:x,ref:B,isFocusVisible:s,isFocused:T,isHovered:l,uiStateOptions:n}=c(e,o),S=a$2({"data-block-id":e["data-block-id"],"data-block-class":e["data-block-class"],"data-focused":T,"data-focus-visible":s,"data-disabled":e.isDisabled,"data-hovered":l,"data-pressed":x,"data-selected":o.isSelected});return jsxs(w,{...c$1(h,S),className:a$3(f({isHovered:l,isFocusVisible:s,isSelected:o.isSelected,size:u,isDisabled:e.isDisabled,variant:_}),"BaselineUI-ToggleButton",typeof t=="function"?t(n):t),style:typeof a=="function"?a(n):a,ref:b(B,y),children:[i?jsx(i,{size:z[u],className:k({isDisabled:e.isDisabled,isSelected:o.isSelected})}):null,e.label]})});v.displayName="ToggleButton";export{f as a,v as b};
@@ -1,15 +0,0 @@
1
- import {a}from'./chunk-TDXALNX3.mjs';import {c}from'./chunk-KUEDQO7P.mjs';import {f as f$2}from'./chunk-6IRWW75G.mjs';import {b as b$2,a as a$5}from'./chunk-MVK5CB64.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {a as a$4}from'./chunk-3W6RWDIE.mjs';import {g}from'./chunk-MRJFGHFW.mjs';import {a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-JDLUGVXG.mjs';import {a as a$2,f as f$1,g as g$1,b as b$3}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect}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
- var f=[];function J(e,l){let{onClose:r,shouldCloseOnBlur:n,isOpen:o,isDismissable:i=false,isKeyboardDismissDisabled:c$1=false,shouldCloseOnInteractOutside:s}=e,d=useRef();useEffect(()=>{if(o&&!f.includes(l))return f.push(l),()=>{let t=f.indexOf(l);t>=0&&f.splice(t,1);}},[o,l]);let p=()=>{f[f.length-1]===l&&r&&r();},g=t=>{let u=f[f.length-1];d.current=u,(!s||s(g$1(t)))&&u===l&&t.stopPropagation();},v=t=>{(!s||s(g$1(t)))&&(f[f.length-1]===l&&t.stopPropagation(),d.current===l&&p()),d.current=void 0;},O=t=>{t.key==="Escape"&&!c$1&&!t.nativeEvent.isComposing&&(t.stopPropagation(),t.preventDefault(),p());};a({ref:l,onInteractOutside:i&&o?v:void 0,onInteractOutsideStart:g});let{focusWithinProps:a$1}=b$1({isDisabled:!n,onBlurWithin:t=>{!t.relatedTarget||c(t.relatedTarget)||(!s||s(t.relatedTarget))&&r?.();}});return {overlayProps:{onKeyDown:O,...a$1},underlayProps:{}}}var b=new WeakMap;function ne(e={},l){let{isDisabled:r,root:n}=e;a$1(()=>{if(r)return;let o=n?.ownerDocument??a$2(l?.current),i=b.get(o);return i||(i={count:0},b.set(o,i)),i.count++,i.count===1&&(g()?i.restore=G(o):i.restore=B(n??o.documentElement)),()=>{let c=b.get(o);c&&(c.count--,c.count===0&&(c.restore?.(),b.delete(o)));}},[r,n]);}function B(e){let r=(e.ownerDocument.defaultView??window).innerWidth-e.clientWidth,n=e===e.ownerDocument.documentElement;return a$3(n&&r>0&&("scrollbarGutter"in e.style?h(e,"scrollbarGutter","stable"):h(e,"paddingRight",`${r}px`)),h(e,"overflow","hidden"))}function G(e){let l=e.defaultView??window;l.visualViewport;let n=h(e.documentElement,"overflow","hidden"),o,i=false,c=a=>{let t=g$1(a);o=a$5(t)?t:b$2(t,true),i=false;let u=t.ownerDocument.defaultView.getSelection();u&&!u.isCollapsed&&u.containsNode(t,true)&&(i=true);let H=b$3(t);a.composedPath().some(L=>L instanceof H.HTMLInputElement&&L.type==="range")&&(i=true),"selectionStart"in t&&"selectionEnd"in t&&t.selectionStart<t.selectionEnd&&f$1(a$2(t))===t&&(i=true);},s=e.createElement("style"),d=a$4(e);d&&(s.nonce=d),s.textContent=`
11
- @layer {
12
- * {
13
- overscroll-behavior: contain;
14
- }
15
- }`.trim(),e.head.prepend(s);let p=a=>{if(!(a.touches.length===2||i)){if(!o||o===e.documentElement||o===e.body){a.preventDefault();return}o.scrollHeight===o.clientHeight&&o.scrollWidth===o.clientWidth&&a.preventDefault();}},g=a=>{let t=g$1(a),u=a.relatedTarget;u&&f$2(u)?(u.focus({preventScroll:true}),A(u,f$2(t),e)):u||t.parentElement?.closest("[tabindex]")?.focus({preventScroll:true});},v=l.HTMLElement.prototype.focus;l.HTMLElement.prototype.focus=function(a){let t=f$1(e),u=t!=null&&f$2(t);v.call(this,{...a,preventScroll:true}),(!a||!a.preventScroll)&&A(this,u,e);};let O=a$3(M(e,"touchstart",c,{passive:false,capture:true}),M(e,"touchmove",p,{passive:false,capture:true}),M(e,"blur",g,true));return ()=>{n(),O(),s.remove(),l.HTMLElement.prototype.focus=v;}}function h(e,l,r){let n=e.style[l];return e.style[l]=r,()=>{e.style[l]=n;}}function M(e,l,r,n){return e.addEventListener(l,r,n),()=>{e.removeEventListener(l,r,n);}}function A(e,l,r){let n=r.defaultView?.visualViewport;l||!n?K(e,r):n.addEventListener("resize",()=>K(e,r),{once:true});}function K(e,l){let r=l.scrollingElement||l.documentElement,n=e;for(;n&&n!==r;){let o=b$2(n);if(o!==l.documentElement&&o!==l.body&&o!==n){let i=o.getBoundingClientRect(),c=n.getBoundingClientRect();if(c.top<i.top||c.bottom>i.top+n.clientHeight){let s=i.bottom,d=l.defaultView?.visualViewport;d&&(s=Math.min(s,d.offsetTop+d.height));let p=c.top-i.top-((s-i.top)/2-c.height/2);o.scrollTo({top:Math.max(0,Math.min(o.scrollHeight-o.clientHeight,o.scrollTop+p)),behavior:"smooth"});}}n=o.parentElement;}}export{J as a,ne as b};
@@ -1,10 +0,0 @@
1
- import {b as b$1}from'./chunk-JJPCZOOI.mjs';import {a as a$1}from'./chunk-2UUKKXBD.mjs';import {a}from'./chunk-ZGRRD3TU.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MotionConfig,MotionGlobalConfig}from'motion/react';export{MotionGlobalConfig as f}from'motion/react';import {lightTheme,themes,themeVars}from'@baseline-ui/tokens';import {assignInlineVars}from'@vanilla-extract/dynamic';import J,{createContext,useMemo,useEffect,useState}from'react';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 v(r=typeof window>"u"?void 0:window){let[f,s]=useState("light"),[i,a]=useState(false),[u,n]=useState(false),[p,m]=useState(false);return useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-color-scheme: dark)"),t=o=>{s(o.matches?"dark":"light");};return e.matches&&s("dark"),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-contrast: more)"),t=o=>{a(o.matches);};return a(e.matches),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-reduced-motion: reduce)"),t=o=>{n(o.matches);};return e.matches&&n(true),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),useEffect(()=>{if(!r)return;let e=r.matchMedia("(prefers-reduced-transparency: reduce)"),t=o=>{m(o.matches);};return e.matches&&m(true),e.addEventListener("change",t),()=>{e.removeEventListener("change",t);}},[r]),{colorScheme:f,highContrast:i,reducedMotion:u,transparency:p}}var k=createContext({theme:lightTheme,setTheme:()=>{},shouldHandleVirtualKeyboard:true});var A="var(--hj25q10)";var h={LIGHT:themes.base.light,DARK:themes.base.dark},R=J.forwardRef(({theme:r="system",children:f,setTheme:s,onThemeChange:i,className:a$3,style:u,UNSAFE_domProps:n,"data-block-id":p,"data-block-class":m,reducedMotion:e="user",shouldHandleVirtualKeyboard:t=true,minTouchTargetSize:o=24},U)=>{let{direction:P}=b(),{colorScheme:g,reducedMotion:V,highContrast:D,transparency:G}=v(),{name:K,...l}=useMemo(()=>{switch(r){case "system":return g==="light"?h.LIGHT:h.DARK;case "light":return h.LIGHT;case "dark":return h.DARK;default:return r}},[g,r]),N=a(),z={"data-theme":K,"data-block-id":p,"data-block-class":m,"data-reduced-motion":e==="user"?V:e==="always","data-high-contrast":D,"data-transparency":G,"data-device":N},B=useMemo(()=>({theme:l,setTheme:y=>{s?.(y),i?.(y);},shouldHandleVirtualKeyboard:t}),[l,s,i,t]);return useEffect(()=>{s&&console.warn("ThemeProvider: The `setTheme` prop is deprecated and will be removed in a future version of Baseline UI. Use the `onThemeChange` prop instead.");},[s]),jsx(k.Provider,{value:B,children:jsx(MotionConfig,{reducedMotion:e,children:jsx("div",{...c(n,z),className:a$2(b$1,"BaselineUI-ThemeProvider",a$3),style:{...assignInlineVars(themeVars,l),...assignInlineVars({[a$1]:P==="rtl"?"-1":"1",[A]:`${o}px`}),...u},dir:P,ref:U,children:f})})})});R.displayName="ThemeProvider";function ve(){MotionGlobalConfig.skipAnimations=true;}function Te(){MotionGlobalConfig.skipAnimations=false;}export{v as a,k as b,R as c,ve as d,Te as e};