@baseline-ui/core 3.3.0 → 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.
- package/dist/Accordion.css +1 -1
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.css +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.css +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.css +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.css +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.css +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.css +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.css +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/DateFormat.mjs +1 -1
- package/dist/Dialog.css +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.css +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.css +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.css +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.css +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Group.mjs +1 -1
- package/dist/I18nProvider.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.css +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.css +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +2 -2
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Menu.css +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberFormat.mjs +1 -1
- package/dist/NumberInput.css +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/Panel.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.css +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/ProgressSpinner.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.css +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.css +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Separator.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.css +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.css +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.css +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.css +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.css +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
- package/dist/{chunk-4PYEGHW5.mjs → chunk-22VRCVTH.mjs} +2 -2
- package/dist/chunk-235S3EB7.mjs +10 -0
- package/dist/chunk-24R46WQW.mjs +10 -0
- package/dist/{chunk-5IXSPQRW.mjs → chunk-2F3CFR22.mjs} +2 -2
- package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
- package/dist/{chunk-KHOXLBPR.mjs → chunk-2LFMBQKQ.mjs} +2 -2
- package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
- package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
- package/dist/{chunk-QXOG2ISL.mjs → chunk-36ZMHBG5.mjs} +2 -2
- package/dist/chunk-3BEG3MEX.mjs +10 -0
- package/dist/chunk-3BG6K2G2.mjs +10 -0
- package/dist/{chunk-E5GYCA3P.mjs → chunk-3DWFAHR2.mjs} +1 -1
- package/dist/{chunk-YX2ASVM3.mjs → chunk-3KCSUNRV.mjs} +1 -1
- package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
- package/dist/chunk-4AG2RUAZ.mjs +10 -0
- package/dist/{chunk-RSTHM3ZF.mjs → chunk-4EANTENO.mjs} +1 -1
- package/dist/{chunk-TCCQDGMI.mjs → chunk-4EAXDHSV.mjs} +1 -1
- package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
- package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
- package/dist/chunk-4MHBLLHV.mjs +11 -0
- package/dist/chunk-4P247R4V.mjs +10 -0
- package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
- package/dist/chunk-4RSUKS23.mjs +10 -0
- package/dist/chunk-4S4GGUSH.mjs +10 -0
- package/dist/chunk-4W5VP4NV.mjs +10 -0
- package/dist/chunk-5BKC373Y.mjs +10 -0
- package/dist/chunk-5FK5AJ7A.mjs +10 -0
- package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
- package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
- package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
- package/dist/{chunk-UCPPKNGF.mjs → chunk-5VNC6UYE.mjs} +2 -2
- package/dist/chunk-5ZC64ZG7.mjs +10 -0
- package/dist/{chunk-NUYBQ7KP.mjs → chunk-6G7EUNZW.mjs} +1 -1
- package/dist/chunk-6QQEK5I6.mjs +10 -0
- package/dist/{chunk-B237CJT4.mjs → chunk-76DKF2SK.mjs} +1 -1
- package/dist/chunk-7MMO7S3R.mjs +10 -0
- package/dist/{chunk-6NQPENP4.mjs → chunk-7P7VZMTO.mjs} +1 -1
- package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
- package/dist/chunk-7SQRBY7N.mjs +10 -0
- package/dist/chunk-7TE4MFKC.mjs +10 -0
- package/dist/chunk-7XGNJE7J.mjs +10 -0
- package/dist/{chunk-VZFS4QRW.mjs → chunk-AD3MLX6G.mjs} +1 -1
- package/dist/chunk-AELTF2DE.mjs +10 -0
- package/dist/chunk-AI6WQPRX.mjs +10 -0
- package/dist/chunk-AK7XHUQW.mjs +10 -0
- package/dist/chunk-AM5FU4Y7.mjs +10 -0
- package/dist/chunk-AYQN3OH2.mjs +10 -0
- package/dist/chunk-B3EZOXNU.mjs +10 -0
- package/dist/chunk-BBYODNBO.mjs +10 -0
- package/dist/chunk-BGQRLALS.mjs +10 -0
- package/dist/chunk-BGRGRUG4.mjs +10 -0
- package/dist/chunk-BHJCYKFJ.mjs +11 -0
- package/dist/chunk-BTPAZDGG.mjs +10 -0
- package/dist/{chunk-HVKYWSRF.mjs → chunk-BXNNVZOQ.mjs} +1 -1
- package/dist/chunk-BYDJXA5A.mjs +10 -0
- package/dist/{chunk-ZLZAFTSD.mjs → chunk-C2VP5IEB.mjs} +1 -1
- package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
- package/dist/chunk-CIPPPD6E.mjs +10 -0
- package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
- package/dist/{chunk-QSSCSN5S.mjs → chunk-COHK4QQW.mjs} +2 -2
- package/dist/chunk-CTSDHAAV.mjs +10 -0
- package/dist/chunk-CU6D2EA6.mjs +10 -0
- package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
- package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
- package/dist/chunk-DAN62T2M.mjs +10 -0
- package/dist/{chunk-SYFSGF73.mjs → chunk-DAS5QGJX.mjs} +1 -1
- package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
- package/dist/{chunk-RJZZIVSY.mjs → chunk-DSV6CCI6.mjs} +1 -1
- package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
- package/dist/{chunk-NADBGP35.mjs → chunk-E22TWF63.mjs} +2 -2
- package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
- package/dist/chunk-ETM4MNG4.mjs +10 -0
- package/dist/chunk-EUVUJQ2Z.mjs +10 -0
- package/dist/chunk-F7WPMQ3P.mjs +16 -0
- package/dist/chunk-FOKMDEP7.mjs +10 -0
- package/dist/chunk-FPFGTGUC.mjs +10 -0
- package/dist/chunk-FPM5UJRF.mjs +10 -0
- package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
- package/dist/{chunk-N26C7NYZ.mjs → chunk-GCBMNOA6.mjs} +1 -1
- package/dist/chunk-GFKZXGWJ.mjs +10 -0
- package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
- package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
- package/dist/chunk-GMALMQWI.mjs +10 -0
- package/dist/chunk-GQIS4QBN.mjs +10 -0
- package/dist/chunk-GUPSQSPC.mjs +0 -0
- package/dist/chunk-HH4VLTF3.mjs +10 -0
- package/dist/chunk-I7LPPUZS.mjs +10 -0
- package/dist/chunk-IEOHIOGL.mjs +10 -0
- package/dist/chunk-IHES52NR.mjs +10 -0
- package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
- package/dist/chunk-IUXXTORQ.mjs +10 -0
- package/dist/{chunk-5K46OAX5.mjs → chunk-IVGNOQSQ.mjs} +1 -1
- package/dist/chunk-IWZXZ5LU.mjs +10 -0
- package/dist/chunk-J4OPD7OL.mjs +10 -0
- package/dist/{chunk-XUJJMAKM.mjs → chunk-JZXLV6JU.mjs} +1 -1
- package/dist/chunk-K4TTZX4T.mjs +10 -0
- package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
- package/dist/chunk-K7VOXFSK.mjs +10 -0
- package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
- package/dist/chunk-KGS3UWPG.mjs +10 -0
- package/dist/{chunk-6EFNC443.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
- package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
- package/dist/chunk-KUDCYGII.mjs +10 -0
- package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
- package/dist/chunk-KX7WG3L4.mjs +10 -0
- package/dist/chunk-LJZ7ZS4C.mjs +10 -0
- package/dist/{chunk-PNBYTIUO.mjs → chunk-LPI2NIDI.mjs} +1 -1
- package/dist/{chunk-L6S5GBKS.mjs → chunk-MBRNO6IW.mjs} +1 -1
- package/dist/chunk-MDE2FQHX.mjs +10 -0
- package/dist/chunk-MFB3SWO7.mjs +29 -0
- package/dist/{chunk-V37GPPZD.mjs → chunk-MIF6BAPG.mjs} +1 -1
- package/dist/chunk-MYJ733MN.mjs +10 -0
- package/dist/chunk-MZIQ27JP.mjs +10 -0
- package/dist/chunk-NJKSUI2F.mjs +10 -0
- package/dist/chunk-NKC4MIX3.mjs +10 -0
- package/dist/{chunk-GI2O6H4I.mjs → chunk-NMGKHMH3.mjs} +1 -1
- package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
- package/dist/chunk-NRQSR3G7.mjs +10 -0
- package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
- package/dist/chunk-NYCG264A.mjs +10 -0
- package/dist/chunk-NZNOHFLD.mjs +10 -0
- package/dist/chunk-O4DA3TPW.mjs +11 -0
- package/dist/{chunk-3UH5CQQF.mjs → chunk-O7IU5NHN.mjs} +2 -2
- package/dist/chunk-ONEE6UCM.mjs +10 -0
- package/dist/chunk-OQPYPKZV.mjs +10 -0
- package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
- package/dist/chunk-OZMADP4Z.mjs +10 -0
- package/dist/chunk-P7BN7QDF.mjs +10 -0
- package/dist/chunk-PD5ZXNGT.mjs +10 -0
- package/dist/chunk-PMDRFB75.mjs +10 -0
- package/dist/chunk-PPHSLODC.mjs +10 -0
- package/dist/chunk-PYV5J322.mjs +11 -0
- package/dist/{chunk-6V7BIFQD.mjs → chunk-Q4SEEMIX.mjs} +1 -1
- package/dist/{chunk-2EMOQIU7.mjs → chunk-Q6PGYMYI.mjs} +2 -2
- package/dist/chunk-QAAOC64D.mjs +10 -0
- package/dist/chunk-QJYPCVSD.mjs +10 -0
- package/dist/chunk-QU34XSML.mjs +10 -0
- package/dist/chunk-QUQ4VYCN.mjs +10 -0
- package/dist/chunk-R3HHMCE5.mjs +10 -0
- package/dist/chunk-R4MOUAJW.mjs +10 -0
- package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
- package/dist/{chunk-XEGXSFIP.mjs → chunk-R7R7JDA3.mjs} +2 -2
- package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
- package/dist/chunk-RXSX2RKA.mjs +10 -0
- package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
- package/dist/chunk-S4HLMIFK.mjs +10 -0
- package/dist/chunk-SD43KVTU.mjs +10 -0
- package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
- package/dist/chunk-SLFKSR3T.mjs +10 -0
- package/dist/chunk-SLSJEMQ4.mjs +10 -0
- package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
- package/dist/chunk-SVIYLH7R.mjs +10 -0
- package/dist/chunk-SVTTHYTR.mjs +10 -0
- package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
- package/dist/chunk-SZCVQU55.mjs +10 -0
- package/dist/{chunk-DMJHCNBU.mjs → chunk-SZN2J2ER.mjs} +1 -1
- package/dist/chunk-TAT552A5.mjs +10 -0
- package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
- package/dist/{chunk-NQO6OQT6.mjs → chunk-TH4XPZEO.mjs} +1 -1
- package/dist/chunk-TSHZ7JSR.mjs +10 -0
- package/dist/{chunk-AYBACQ6U.mjs → chunk-TUJLNJPJ.mjs} +2 -2
- package/dist/chunk-TUY23KMK.mjs +10 -0
- package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
- package/dist/chunk-UDMNDUBO.mjs +10 -0
- package/dist/chunk-UFN2OAM2.mjs +10 -0
- package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
- package/dist/chunk-UNGYVWKZ.mjs +10 -0
- package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
- package/dist/chunk-UUTMZQQA.mjs +15 -0
- package/dist/chunk-UZ672WDX.mjs +10 -0
- package/dist/chunk-VETO7WNN.mjs +10 -0
- package/dist/chunk-VGFPT43C.mjs +10 -0
- package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
- package/dist/{chunk-2TH2QRSV.mjs → chunk-W7OTSFZS.mjs} +1 -1
- package/dist/chunk-WHN2SEWO.mjs +10 -0
- package/dist/{chunk-UN7XC7QV.mjs → chunk-WTAJLO6E.mjs} +1 -1
- package/dist/chunk-XD43CVDT.mjs +10 -0
- package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
- package/dist/chunk-XMGPNXZH.mjs +10 -0
- package/dist/chunk-XWJJ4V3O.mjs +10 -0
- package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
- package/dist/chunk-YF63IQQR.mjs +10 -0
- package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
- package/dist/chunk-YMYMFVW4.mjs +10 -0
- package/dist/chunk-YPEAGD2G.mjs +10 -0
- package/dist/chunk-YQHHE5AT.mjs +10 -0
- package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
- package/dist/{chunk-Z4HTFTPM.mjs → chunk-YU5NRJT6.mjs} +2 -2
- package/dist/{chunk-IXK6S6IH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
- package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
- package/dist/{chunk-XJ2DFV56.mjs → chunk-ZZIQF6XD.mjs} +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useI18n.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLiveInteractionModality.mjs +1 -1
- package/dist/hooks/useMedia.mjs +1 -1
- package/dist/hooks/useMutationObserver.mjs +1 -1
- package/dist/hooks/usePortalContainer.mjs +1 -1
- package/dist/hooks/usePreventFocus.mjs +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -1
- package/dist/hooks/useTextSelection.mjs +1 -1
- package/dist/hooks/useUndoRedo.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +375 -166
- package/dist/index.js +21 -20
- package/dist/index.mjs +1 -1
- package/dist/react-aria.mjs +1 -1
- package/dist/react-stately.mjs +1 -1
- package/dist/utils/colors.mjs +1 -1
- package/dist/utils/dom.mjs +1 -1
- package/dist/utils/isInShadowDOM.mjs +1 -1
- package/dist/utils/keyboards.mjs +1 -1
- package/messages.json +1 -1
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-2BXXD6SW.mjs +0 -10
- package/dist/chunk-2V323KAD.mjs +0 -10
- package/dist/chunk-2YTKLY4F.mjs +0 -10
- package/dist/chunk-3FYY26ED.mjs +0 -10
- package/dist/chunk-3W6RWDIE.mjs +0 -10
- package/dist/chunk-4C6AJ3TZ.mjs +0 -10
- package/dist/chunk-5HK56IXH.mjs +0 -10
- package/dist/chunk-63KRQW56.mjs +0 -10
- package/dist/chunk-66NJ7EYY.mjs +0 -10
- package/dist/chunk-6JWACCHG.mjs +0 -10
- package/dist/chunk-6PXOVWVM.mjs +0 -10
- package/dist/chunk-6VXBFM6Q.mjs +0 -10
- package/dist/chunk-7MQBBSZ2.mjs +0 -10
- package/dist/chunk-7P322KP4.mjs +0 -10
- package/dist/chunk-7PRJIPFA.mjs +0 -10
- package/dist/chunk-A24DWFQ2.mjs +0 -10
- package/dist/chunk-AC7OXVHA.mjs +0 -10
- package/dist/chunk-AKES5B6C.mjs +0 -10
- package/dist/chunk-AQYBKDT2.mjs +0 -16
- package/dist/chunk-AUOQSTS5.mjs +0 -10
- package/dist/chunk-AW5WDI2U.mjs +0 -10
- package/dist/chunk-B6U6JHD4.mjs +0 -10
- package/dist/chunk-B7PSE5KC.mjs +0 -10
- package/dist/chunk-BBZ2I3RF.mjs +0 -10
- package/dist/chunk-BCENUHNO.mjs +0 -10
- package/dist/chunk-BGHBSM3K.mjs +0 -10
- package/dist/chunk-BGMVPFYK.mjs +0 -10
- package/dist/chunk-BJVFZYUV.mjs +0 -10
- package/dist/chunk-BU5H25MV.mjs +0 -10
- package/dist/chunk-C7AUJO36.mjs +0 -10
- package/dist/chunk-CAWUDHAE.mjs +0 -10
- package/dist/chunk-CCA2ABXO.mjs +0 -10
- package/dist/chunk-CUOTJ7AP.mjs +0 -10
- package/dist/chunk-CYTHB4M4.mjs +0 -10
- package/dist/chunk-D5EEZT5J.mjs +0 -10
- package/dist/chunk-DDLZ6CKC.mjs +0 -10
- package/dist/chunk-E3DMXJIC.mjs +0 -10
- package/dist/chunk-E3QDPL77.mjs +0 -10
- package/dist/chunk-EA6GA4WC.mjs +0 -10
- package/dist/chunk-EGXILQNX.mjs +0 -10
- package/dist/chunk-EX2LI2CV.mjs +0 -10
- package/dist/chunk-EYKIXVM3.mjs +0 -10
- package/dist/chunk-F2X474RV.mjs +0 -10
- package/dist/chunk-GVI6EBGJ.mjs +0 -10
- package/dist/chunk-HK3CZVHY.mjs +0 -10
- package/dist/chunk-HONWMHMX.mjs +0 -10
- package/dist/chunk-HZHAKW6I.mjs +0 -10
- package/dist/chunk-ILAQFMYD.mjs +0 -10
- package/dist/chunk-INDVRI57.mjs +0 -10
- package/dist/chunk-ITWJSFYK.mjs +0 -10
- package/dist/chunk-IVC2BJRU.mjs +0 -10
- package/dist/chunk-JDLUGVXG.mjs +0 -10
- package/dist/chunk-K6HE4Z2Y.mjs +0 -10
- package/dist/chunk-K73R5G6G.mjs +0 -10
- package/dist/chunk-KEAM6GSA.mjs +0 -10
- package/dist/chunk-KEVERVHK.mjs +0 -10
- package/dist/chunk-KPEONVLU.mjs +0 -10
- package/dist/chunk-KUEDQO7P.mjs +0 -10
- package/dist/chunk-KWHTLY23.mjs +0 -10
- package/dist/chunk-KY3JKXSX.mjs +0 -10
- package/dist/chunk-LZFTBNPW.mjs +0 -10
- package/dist/chunk-M5M3EPG5.mjs +0 -10
- package/dist/chunk-M7OLZJYB.mjs +0 -10
- package/dist/chunk-MHUFXHRU.mjs +0 -10
- package/dist/chunk-MONDDKB4.mjs +0 -10
- package/dist/chunk-MRJFGHFW.mjs +0 -10
- package/dist/chunk-MVK5CB64.mjs +0 -10
- package/dist/chunk-N6VKP3UH.mjs +0 -10
- package/dist/chunk-NZQVKNP4.mjs +0 -10
- package/dist/chunk-OAY74XPB.mjs +0 -10
- package/dist/chunk-OMT6ZWSV.mjs +0 -11
- package/dist/chunk-P37WUXAI.mjs +0 -10
- package/dist/chunk-P5LSMA24.mjs +0 -11
- package/dist/chunk-PA3THES4.mjs +0 -10
- package/dist/chunk-QDQPVCXN.mjs +0 -10
- package/dist/chunk-QYTY3KJR.mjs +0 -10
- package/dist/chunk-R2OV7FJO.mjs +0 -10
- package/dist/chunk-RCBUNCHV.mjs +0 -10
- package/dist/chunk-RFTDIXEG.mjs +0 -10
- package/dist/chunk-SHJ2TJYG.mjs +0 -10
- package/dist/chunk-SMAYNDQQ.mjs +0 -10
- package/dist/chunk-T4R3EXGI.mjs +0 -10
- package/dist/chunk-TBCZKWGQ.mjs +0 -10
- package/dist/chunk-TDXALNX3.mjs +0 -10
- package/dist/chunk-TKQOQVZD.mjs +0 -10
- package/dist/chunk-TTYRHIRQ.mjs +0 -10
- package/dist/chunk-UBFMOTBM.mjs +0 -10
- package/dist/chunk-UEDBY5JI.mjs +0 -10
- package/dist/chunk-UT2I4K7L.mjs +0 -10
- package/dist/chunk-V3L4SVVF.mjs +0 -10
- package/dist/chunk-VAFIUM63.mjs +0 -29
- package/dist/chunk-VIVNQZYK.mjs +0 -10
- package/dist/chunk-VOSSQAHC.mjs +0 -11
- package/dist/chunk-WWSGOGLA.mjs +0 -10
- package/dist/chunk-X3AXUU3H.mjs +0 -10
- package/dist/chunk-X6IJEPSH.mjs +0 -10
- package/dist/chunk-XF5UMU6D.mjs +0 -15
- package/dist/chunk-XTH6B5FE.mjs +0 -10
- package/dist/chunk-XWLESSHN.mjs +0 -10
- package/dist/chunk-Y3YZMICA.mjs +0 -10
- package/dist/chunk-Y4DRSGEJ.mjs +0 -10
- package/dist/chunk-YB3KW7JC.mjs +0 -10
- package/dist/chunk-YIGT3OP2.mjs +0 -10
- package/dist/chunk-YKMSINHH.mjs +0 -10
- package/dist/chunk-YWCU4PP7.mjs +0 -10
- package/dist/chunk-YWQXHVMW.mjs +0 -10
- package/dist/chunk-ZGRRD3TU.mjs +0 -10
- /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
package/dist/chunk-EYKIXVM3.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$b}from'./chunk-AMYRLAIC.mjs';import {j,c,i,l,p,r,s,m,w,u,v,k,f as f$2,e as e$1,x,d,q,a as a$i}from'./chunk-SMAYNDQQ.mjs';import {a as a$f}from'./chunk-AMW7LGCF.mjs';import {b as b$1,c as c$5}from'./chunk-VIVNQZYK.mjs';import {c as c$7}from'./chunk-BROSGYL3.mjs';import {c as c$2,f as f$1,e as e$2,d as d$2}from'./chunk-7P322KP4.mjs';import {a as a$g}from'./chunk-DDLZ6CKC.mjs';import {a as a$l}from'./chunk-V37GPPZD.mjs';import {b as b$3}from'./chunk-NUYBQ7KP.mjs';import {d as d$3}from'./chunk-UBFMOTBM.mjs';import {b,c as c$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c,f as f$3}from'./chunk-DECHIERQ.mjs';import {f as f$4}from'./chunk-AKES5B6C.mjs';import {a as a$8,b as b$6}from'./chunk-AC7OXVHA.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {b as b$9}from'./chunk-WWSGOGLA.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {a}from'./chunk-USMC34OO.mjs';import {b as b$8}from'./chunk-WL27JGVG.mjs';import {a as a$q}from'./chunk-BU5H25MV.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {c as c$8}from'./chunk-RCBUNCHV.mjs';import {a as a$p}from'./chunk-UUBOEBYZ.mjs';import {e,h,c as c$3,b as b$4,f,a as a$9,d as d$1}from'./chunk-B7PSE5KC.mjs';import {a as a$m}from'./chunk-4PYEGHW5.mjs';import {a as a$h}from'./chunk-66CUIXA6.mjs';import {h as h$1,i as i$1,e as e$5}from'./chunk-SHJ2TJYG.mjs';import {a as a$k}from'./chunk-RXSYDMT6.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$6}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-YB3KW7JC.mjs';import {b as b$5,d as d$5,f as f$6}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {d as d$4}from'./chunk-AQYBKDT2.mjs';import {a as a$4}from'./chunk-RT4LMB6X.mjs';import {n,q as q$1,a as a$n,t,r as r$1}from'./chunk-MRJFGHFW.mjs';import {c as c$4}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c as c$6,a as a$j,e as e$4}from'./chunk-JDLUGVXG.mjs';import {e as e$3,g,i as i$2,f as f$5,b as b$7,a as a$o}from'./chunk-AUOQSTS5.mjs';import {a as a$a}from'./chunk-JQQGRJ5J.mjs';import {a as a$e}from'./chunk-4QEH5CGK.mjs';import be,{createContext,forwardRef,useContext,useMemo,useRef,useEffect,useCallback,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {ChevronRightFilledIcon}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/24';/**
|
|
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 ge=createContext({}),ze=j(c,function(e$1,t){return [e$1,t]=e(e$1,t,ge),jsx(h.header,{className:"react-aria-Header",...e$1,ref:t,children:e$1.children})});var _e=createContext({});var lt=createContext(null),le=createContext(null),st=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,lt);let o=useContext(le);return o?jsx(Lr,{state:o,props:e$1,listBoxRef:t}):jsx(i,{content:jsx(l,{...e$1}),children:n=>jsx(uo,{props:e$1,listBoxRef:t,collection:n})})});function uo({props:r,listBoxRef:e,collection:t}){r={...r,collection:t,children:null,items:null};let{layoutDelegate:o}=useContext(p),n=b({...r,layoutDelegate:o});return jsx(Lr,{state:n,props:r,listBoxRef:e})}function Lr({state:r$1,props:e$1,listBoxRef:t}){[e$1,t]=e(e$1,t,b$1);let{dragAndDropHooks:o,layout:n="stack",orientation:i="vertical",filter:l}=e$1,s$1=c$1(r$1,l),{collection:p$1,selectionManager:m$1}=s$1,u$1=!!o?.useDraggableCollectionState,c=!!o?.useDroppableCollectionState,{direction:f}=b$2(),{disabledBehavior:a$4,disabledKeys:x}=m$1,g=a({usage:"search",sensitivity:"base"}),{isVirtualized:R,layoutDelegate:M,dropTargetDelegate:D,CollectionRoot:v$1}=useContext(p),L=useMemo(()=>e$1.keyboardDelegate||new b$3({collection:p$1,collator:g,ref:t,disabledKeys:x,disabledBehavior:a$4,layout:n,orientation:i,direction:f,layoutDelegate:M}),[p$1,g,t,a$4,x,i,f,e$1.keyboardDelegate,n,M]),{listBoxProps:O}=c$2({...e$1,shouldSelectOnPressUp:u$1||e$1.shouldSelectOnPressUp,keyboardDelegate:L,isVirtualized:R},s$1,t),k=useRef(u$1),d=useRef(c);useEffect(()=>{process.env.NODE_ENV!=="production"&&(k.current!==u$1&&console.warn("Drag hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."),d.current!==c&&console.warn("Drop hooks were provided during one render, but not another. This should be avoided as it may produce unexpected behavior."));},[u$1,c]);let S,E,w$1,y=false,b=null,h$1=useRef(null);if(u$1&&o){S=o.useDraggableCollectionState({collection:p$1,selectionManager:m$1,preview:o.renderDragPreview?h$1:void 0}),o.useDraggableCollection({},S,t);let Y=o.DragPreview;b=o.renderDragPreview?jsx(Y,{ref:h$1,children:o.renderDragPreview}):null;}if(c&&o){E=o.useDroppableCollectionState({collection:p$1,selectionManager:m$1});let Y=o.dropTargetDelegate||D||new o.ListDropTargetDelegate(p$1,t,{orientation:i,layout:n,direction:f});w$1=o.useDroppableCollection({keyboardDelegate:L,dropTargetDelegate:Y},E,t),y=E.isDropTarget({type:"root"});}let{focusProps:z,isFocused:j,isFocusVisible:_}=a$1(),H=s$1.collection.size===0,W={isDropTarget:y,isEmpty:H,isFocused:j,isFocusVisible:_,layout:e$1.layout||"stack",orientation:i,state:s$1},se=c$3({...e$1,children:void 0,defaultClassName:"react-aria-ListBox",values:W}),te=null;H&&e$1.renderEmptyState&&(te=jsx("div",{role:"option",style:{display:"contents"},children:e$1.renderEmptyState(W)}));let J=a$2(e$1,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(J,se,O,z,w$1?.collectionProps),ref:t,slot:e$1.slot||void 0,onScroll:e$1.onScroll,"data-drop-target":y||void 0,"data-empty":H||void 0,"data-focused":j||void 0,"data-focus-visible":_||void 0,"data-layout":e$1.layout||"stack","data-orientation":i,children:[jsx(b$4,{values:[[lt,e$1],[le,s$1],[r,{dragAndDropHooks:o,dragState:S,dropState:E}],[_e,{elementType:"div"}],[s,{render:co}],[m,{name:"ListBoxSection",render:Er}]],children:jsx(w,{children:jsx(v$1,{collection:p$1,scrollRef:t,persistedKeys:v(m$1,o,E),renderDropIndicator:u(o,E)})})}),te,b]})})}function Er(r$1,e,t,o="react-aria-ListBoxSection"){let n=useContext(le),{dragAndDropHooks:i,dropState:l}=useContext(r),{CollectionBranch:s}=useContext(p),[p$1,m]=f(),{headingProps:u$1,groupProps:c}=f$1({heading:m,"aria-label":r$1["aria-label"]??void 0}),f$2=c$3({...r$1,id:void 0,children:void 0,defaultClassName:o,values:void 0}),a=a$2(r$1,{global:true});return delete a.id,jsx(h.section,{...c$4(a,f$2,c),ref:e,children:jsx(ge.Provider,{value:{...u$1,ref:p$1},children:jsx(s,{collection:n.collection,parent:t,renderDropIndicator:u(i,l)})})})}var at=k(f$2,Er),ut=j(e$1,function(e,t,o){let n=a$4(t),i=useContext(le),{dragAndDropHooks:l,dragState:s,dropState:p}=useContext(r),m=s&&!(s.isDisabled||s.selectionManager.isDisabled(o.key)),{optionProps:u,labelProps:c,descriptionProps:f,...a}=e$2({key:o.key,"aria-label":e?.["aria-label"]},i,n),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:!a.allowsSelection&&!a.hasAction&&!m,onHoverStart:o.props.onHoverStart,onHoverChange:o.props.onHoverChange,onHoverEnd:o.props.onHoverEnd}),{keyboardProps:R}=a$6(e),{focusProps:M}=a$7(e),D=null;s&&l&&(D=l.useDraggableItem({key:o.key,hasAction:a.hasAction},s,n));let v=null;p&&l&&(v=l.useDroppableItem({target:{type:"item",key:o.key,dropPosition:"on"}},p,n));let L=s&&s.isDragging(o.key),O=c$3({...e,id:void 0,children:e.children,defaultClassName:"react-aria-ListBoxItem",values:{...a,isHovered:g,selectionMode:i.selectionManager.selectionMode,selectionBehavior:i.selectionManager.selectionBehavior,allowsDragging:!!s,isDragging:L,isDropTarget:v?.isDropTarget}});useEffect(()=>{!o.textValue&&process.env.NODE_ENV!=="production"&&console.warn("A `textValue` prop is required for <ListBoxItem> elements with non-plain text children in order to support accessibility features such as type to select.");},[o.textValue]);let k=e.href?h.a:h.div,d=a$2(e,{global:true});return delete d.id,delete d.onClick,e.href&&u.tabIndex==null&&(u.tabIndex=-1),jsx(k,{...c$4(d,O,u,x$1,R,M,D?.dragProps,v?.dropProps),ref:n,"data-allows-dragging":!!s||void 0,"data-selected":a.isSelected||void 0,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-dragging":L||void 0,"data-drop-target":v?.isDropTarget||void 0,"data-selection-mode":i.selectionManager.selectionMode==="none"?void 0:i.selectionManager.selectionMode,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:c,label:c,description:f}}],[x,{isSelected:a.isSelected}]],children:O.children})})});function co(r$1,e){e=a$4(e);let{dragAndDropHooks:t,dropState:o}=useContext(r),{dropIndicatorProps:n,isHidden:i,isDropTarget:l}=t.useDropIndicator(r$1,o,e);return i?null:jsx(mo,{...r$1,dropIndicatorProps:n,isDropTarget:l,ref:e})}function po(r,e){let{dropIndicatorProps:t,isDropTarget:o,...n}=r,i=c$3({...n,defaultClassName:"react-aria-DropIndicator",values:{isDropTarget:o}});return jsx(Fragment,{children:jsx(h.div,{...t,...i,role:"option",ref:e,"data-drop-target":o||void 0})})}var mo=forwardRef(po);j(d,function(e,t,o){let n=useContext(le),{isLoading:i,onLoadMore:l,scrollOffset:s,...p}=e,m=useRef(null),u=useMemo(()=>({onLoadMore:l,collection:n?.collection,sentinelRef:m,scrollOffset:s}),[l,s,n?.collection]);h$1(u,m);let c=c$3({...p,id:void 0,children:o.rendered,defaultClassName:"react-aria-ListBoxLoadingIndicator",values:void 0}),f={tabIndex:-1};return jsxs(Fragment,{children:[jsx("div",{style:{position:"relative",width:0,height:0},inert:i$1(true),children:jsx("div",{"data-testid":"loadMoreSentinel",ref:m,style:{position:"absolute",height:1,width:1}})}),i&&c.children&&jsx(Fragment,{children:jsx(h.div,{...c$4(a$2(e,{global:true}),f),...c,role:"option",ref:t,children:c.children})})]})});var Ve=({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s}={})=>Object.values({renderOption:r,optionClassName:e,optionStyle:t,renderSectionHeader:o,sectionClassName:n,sectionStyle:i,showSectionHeader:l,withSectionHeaderPadding:s});var gi=a$a({defaultClassName:"_1fjxa6ld _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"},orientation:{vertical:"_1yep5z618m",horizontal:"_1yep5z618n"}},defaultVariants:{},compoundVariants:[]}),Ar="_1fjxa6la _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja",Ir=a$a({defaultClassName:"_1fjxa6lb _1yep5z6ez _1yep5z6da _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z6f2"}},defaultVariants:{},compoundVariants:[]}),kr=a$a({defaultClassName:"_1fjxa6l3 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6dy _1yep5z6ey _1yep5z6lq _1yep5z6lt _1yep5z6m6 _1yep5z6m5 _1yep5z6m3 _1yep5z6m0",variantClassNames:{isSelected:{},isFocused:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t _1yep5z615c _1yep5z615d _1yep5z615e"},isFirstChild:{true:"_1fjxa6l5"},isLastChild:{true:"_1fjxa6l6"},isHovered:{true:"_1yep5z612t",false:"_1yep5z612s"},isDisabled:{true:"z9nup82 _1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),wr="_1fjxa6lh _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",Fr="_1fjxa6l1",Br="_1fjxa6l2",Hr="_1fjxa6l0";var Nr={"ar-AE":{longPressMessage:"\u0627\u0636\u063A\u0637 \u0645\u0637\u0648\u0644\u0627\u064B \u0623\u0648 \u0627\u0636\u063A\u0637 \u0639\u0644\u0649 Alt + \u0627\u0644\u0633\u0647\u0645 \u0644\u0623\u0633\u0641\u0644 \u0644\u0641\u062A\u062D \u0627\u0644\u0642\u0627\u0626\u0645\u0629"},"bg-BG":{longPressMessage:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E \u0438\u043B\u0438 \u043D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Alt+ \u0441\u0442\u0440\u0435\u043B\u043A\u0430 \u043D\u0430\u0434\u043E\u043B\u0443, \u0437\u0430 \u0434\u0430 \u043E\u0442\u0432\u043E\u0440\u0438\u0442\u0435 \u043C\u0435\u043D\u044E\u0442\u043E"},"cs-CZ":{longPressMessage:"Dlouh\xFDm stiskem nebo stisknut\xEDm kl\xE1ves Alt + \u0161ipka dol\u016F otev\u0159ete nab\xEDdku"},"da-DK":{longPressMessage:"Langt tryk eller tryk p\xE5 Alt + pil ned for at \xE5bne menuen"},"de-DE":{longPressMessage:"Dr\xFCcken Sie lange oder dr\xFCcken Sie Alt + Nach-unten, um das Men\xFC zu \xF6ffnen"},"el-GR":{longPressMessage:"\u03A0\u03B9\u03AD\u03C3\u03C4\u03B5 \u03C0\u03B1\u03C1\u03B1\u03C4\u03B5\u03C4\u03B1\u03BC\u03AD\u03BD\u03B1 \u03AE \u03C0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 Alt + \u03BA\u03AC\u03C4\u03C9 \u03B2\u03AD\u03BB\u03BF\u03C2 \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03B1\u03BD\u03BF\u03AF\u03BE\u03B5\u03C4\u03B5 \u03C4\u03BF \u03BC\u03B5\u03BD\u03BF\u03CD"},"en-US":{longPressMessage:"Long press or press Alt + ArrowDown to open menu"},"es-ES":{longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el men\xFA"},"et-EE":{longPressMessage:"Men\xFC\xFC avamiseks vajutage pikalt v\xF5i vajutage klahve Alt + allanool"},"fi-FI":{longPressMessage:"Avaa valikko painamalla pohjassa tai n\xE4pp\xE4inyhdistelm\xE4ll\xE4 Alt + Alanuoli"},"fr-FR":{longPressMessage:"Appuyez de mani\xE8re prolong\xE9e ou appuyez sur Alt\xA0+\xA0Fl\xE8che vers le bas pour ouvrir le menu."},"he-IL":{longPressMessage:"\u05DC\u05D7\u05E5 \u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05E8\u05D5\u05DB\u05D4 \u05D0\u05D5 \u05D4\u05E7\u05E9 Alt + ArrowDown \u05DB\u05D3\u05D9 \u05DC\u05E4\u05EA\u05D5\u05D7 \u05D0\u05EA \u05D4\u05EA\u05E4\u05E8\u05D9\u05D8"},"hr-HR":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"},"hu-HU":{longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele ny\xEDl gombot a men\xFC megnyit\xE1s\xE1hoz"},"it-IT":{longPressMessage:"Premi a lungo o premi Alt + Freccia gi\xF9 per aprire il menu"},"ja-JP":{longPressMessage:"\u9577\u62BC\u3057\u307E\u305F\u306F Alt+\u4E0B\u77E2\u5370\u30AD\u30FC\u3067\u30E1\u30CB\u30E5\u30FC\u3092\u958B\u304F"},"ko-KR":{longPressMessage:"\uAE38\uAC8C \uB204\uB974\uAC70\uB098 Alt + \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uB20C\uB7EC \uBA54\uB274 \uC5F4\uAE30"},"lt-LT":{longPressMessage:"Nor\u0117dami atidaryti meniu, nuspaud\u0119 palaikykite arba paspauskite \u201EAlt + ArrowDown\u201C."},"lv-LV":{longPressMessage:"Lai atv\u0113rtu izv\u0113lni, turiet nospiestu vai nospiediet tausti\u0146u kombin\u0101ciju Alt + lejupv\u0113rst\u0101 bulti\u0146a"},"nb-NO":{longPressMessage:"Langt trykk eller trykk Alt + PilNed for \xE5 \xE5pne menyen"},"nl-NL":{longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"},"pl-PL":{longPressMessage:"Naci\u015Bnij i przytrzymaj lub naci\u015Bnij klawisze Alt + Strza\u0142ka w d\xF3\u0142, aby otworzy\u0107 menu"},"pt-BR":{longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"},"pt-PT":{longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"},"ro-RO":{longPressMessage:"Ap\u0103sa\u021Bi lung sau ap\u0103sa\u021Bi pe Alt + s\u0103geat\u0103 \xEEn jos pentru a deschide meniul"},"ru-RU":{longPressMessage:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u0438 \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0439\u0442\u0435 \u0438\u043B\u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 Alt + \u0421\u0442\u0440\u0435\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u043C\u0435\u043D\u044E"},"sk-SK":{longPressMessage:"Ponuku otvor\xEDte dlh\xFDm stla\u010Den\xEDm alebo stla\u010Den\xEDm kl\xE1vesu Alt + kl\xE1vesu so \u0161\xEDpkou nadol"},"sl-SI":{longPressMessage:"Za odprtje menija pritisnite in dr\u017Eite gumb ali pritisnite Alt+pu\u0161\u010Dica navzdol"},"sr-SP":{longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"},"sv-SE":{longPressMessage:"H\xE5ll nedtryckt eller tryck p\xE5 Alt + pil ned\xE5t f\xF6r att \xF6ppna menyn"},"tr-TR":{longPressMessage:"Men\xFCy\xFC a\xE7mak i\xE7in uzun bas\u0131n veya Alt + A\u015Fa\u011F\u0131 Ok tu\u015Funa bas\u0131n"},"uk-UA":{longPressMessage:"\u0414\u043E\u0432\u0433\u043E \u0430\u0431\u043E \u0437\u0432\u0438\u0447\u0430\u0439\u043D\u043E \u043D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C \u043A\u043E\u043C\u0431\u0456\u043D\u0430\u0446\u0456\u044E \u043A\u043B\u0430\u0432\u0456\u0448 Alt \u0456 \u0441\u0442\u0440\u0456\u043B\u043A\u0430 \u0432\u043D\u0438\u0437, \u0449\u043E\u0431 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438 \u043C\u0435\u043D\u044E"},"zh-CN":{longPressMessage:"\u957F\u6309\u6216\u6309 Alt + \u5411\u4E0B\u65B9\u5411\u952E\u4EE5\u6253\u5F00\u83DC\u5355"},"zh-TW":{longPressMessage:"\u9577\u6309\u6216\u6309 Alt+\u5411\u4E0B\u9375\u4EE5\u958B\u555F\u529F\u80FD\u8868"}};function dt(r,e,t){let{type:o="menu",isDisabled:n,trigger:i="press"}=r,l=c$6(),{triggerProps:s,overlayProps:p}=a$p({type:o},e,t),m=a=>{if(!n&&!(i==="longPress"&&!a.altKey)&&t&&t.current)switch(a.key){case "Enter":case " ":if(i==="longPress"||a.isDefaultPrevented())return;case "ArrowDown":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("first");break;case "ArrowUp":"continuePropagation"in a||a.stopPropagation(),a.preventDefault(),e.toggle("last");break;default:"continuePropagation"in a&&a.continuePropagation();}},u=b$8(Nr,"@react-aria/menu"),{longPressProps:c}=a$q({isDisabled:n||i!=="longPress",accessibilityDescription:u.format("longPressMessage"),onLongPressStart(){e.close();},onLongPress(){e.open("first");}}),f={preventFocusOnPress:true,onPressStart(a){a.pointerType!=="touch"&&a.pointerType!=="keyboard"&&!n&&(a$n(a.target),e.open(a.pointerType==="virtual"?"first":null));},onPress(a){a.pointerType==="touch"&&!n&&(a$n(a.target),e.toggle());}};return delete s.onPress,{menuTriggerProps:{...s,...i==="press"?f:c,id:l,onKeyDown:m},menuProps:{...p,"aria-labelledby":l,autoFocus:e.focusStrategy||true,onClose:e.close}}}var je=new WeakMap;function ct(r,e,t){let{shouldFocusWrap:o=true,onKeyDown:n,onKeyUp:i,...l}=r;!r["aria-label"]&&!r["aria-labelledby"]&&process.env.NODE_ENV!=="production"&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=a$2(r,{labelable:true}),{listProps:p}=a$l({...l,ref:t,selectionManager:e.selectionManager,collection:e.collection,disabledKeys:e.disabledKeys,shouldFocusWrap:o,linkBehavior:"override"});return je.set(e,{onClose:r.onClose,onAction:r.onAction,shouldUseVirtualFocus:r.shouldUseVirtualFocus}),{menuProps:c$4(s,{onKeyDown:n,onKeyUp:i},{role:"menu",...p,onKeyDown:m=>{(m.key!=="Escape"||r.shouldUseVirtualFocus)&&p.onKeyDown?.(m);}})}}function pt(r,e,t){let{id:o,key:n$1,closeOnSelect:i,shouldCloseOnSelect:l,isVirtualized:s,"aria-haspopup":p,onPressStart:m,onPressUp:u,onPress:c,onPressChange:f,onPressEnd:a,onClick:x,onHoverStart:g$1,onHoverChange:R,onHoverEnd:M,onKeyDown:D,onKeyUp:v,onFocus:L,onFocusChange:O,onBlur:k,selectionManager:d=e.selectionManager}=r,S=!!p,E=S&&r["aria-expanded"]==="true",w=r.isDisabled??d.isDisabled(n$1),y=r.isSelected??d.isSelected(n$1),b=je.get(e),h=e.collection.getItem(n$1),z=r.onClose||b.onClose,j=n(),_=()=>{if(!S&&(h?.props?.onAction?h.props.onAction():r.onAction&&r.onAction(n$1),b.onAction)){let P=b.onAction;P(n$1,h?.value);}},H="menuitem";S||(d.selectionMode==="single"?H="menuitemradio":d.selectionMode==="multiple"&&(H="menuitemcheckbox"));let W=e$4(),se=e$4(),te=e$4(),J={id:o,"aria-disabled":w||void 0,role:H,"aria-label":r["aria-label"],"aria-labelledby":W,"aria-describedby":[r["aria-describedby"],se,te].filter(Boolean).join(" ")||void 0,"aria-controls":r["aria-controls"],"aria-haspopup":p,"aria-expanded":r["aria-expanded"]};if(d.selectionMode!=="none"&&!S&&(J["aria-checked"]=y),s){let P=Number(h?.index);J["aria-posinset"]=Number.isNaN(P)?void 0:P+1,J["aria-setsize"]=d$2(e.collection);}let Y=useRef(false),he=P=>{f?.(P),Y.current=P;},Z=useRef(null),T=P=>{P.pointerType!=="keyboard"&&(Z.current={pointerType:P.pointerType}),P.pointerType==="mouse"&&(Y.current||P.target.click()),u?.(P);},ue=P=>{x?.(P),_(),r$1(P,j,h.props.href,h?.props.routerOptions);let Je=Z.current?.pointerType==="keyboard"?Z.current?.key==="Enter"||d.selectionMode==="none"||d.isLink(n$1):d.selectionMode!=="multiple"||d.isLink(n$1);Je=l??i??Je,z&&!S&&Je&&z(),Z.current=null;},{itemProps:re,isFocused:At}=d$3({id:o,selectionManager:d,key:n$1,ref:t,shouldSelectOnPressUp:true,allowsDifferentPressOrigin:true,linkBehavior:"none",shouldUseVirtualFocus:b.shouldUseVirtualFocus}),{pressProps:eo,isPressed:to}=d$4({onPressStart:m,onPress:c,onPressUp:T,onPressChange:he,onPressEnd:a,isDisabled:w}),{hoverProps:ro}=a$5({isDisabled:w,onHoverStart(P){!b$5()&&!(E&&p)&&(d.setFocused(true),d.setFocusedKey(n$1)),g$1?.(P);},onHoverChange:R,onHoverEnd:M}),{keyboardProps:oo}=a$6({onKeyDown:P=>{if(P.repeat){P.continuePropagation();return}switch(P.key){case " ":Z.current={pointerType:"keyboard",key:" "},g(P).click(),d$5("keyboard");break;case "Enter":Z.current={pointerType:"keyboard",key:"Enter"},g(P).tagName!=="A"&&g(P).click(),d$5("keyboard");break;default:S||P.continuePropagation(),D?.(P);break}},onKeyUp:v}),{focusableProps:no}=d$6({onBlur:k,onFocus:L,onFocusChange:O},t),It=a$2(h?.props);delete It.id;let io=q$1(h?.props);return {menuItemProps:{...J,...c$4(It,io,S?{onFocus:re.onFocus,"data-collection":re["data-collection"],"data-key":re["data-key"]}:re,eo,ro,oo,no,b.shouldUseVirtualFocus||S?{onMouseDown:P=>P.preventDefault()}:void 0,w?void 0:{onClick:ue}),tabIndex:re.tabIndex!=null&&E&&!b.shouldUseVirtualFocus?-1:re.tabIndex},labelProps:{id:W},descriptionProps:{id:se},keyboardShortcutProps:{id:te},isFocused:At,isFocusVisible:At&&d.isFocused&&b$5()&&!E,isSelected:y,isPressed:to,isDisabled:w}}function mt(r){let{heading:e,"aria-label":t}=r,o=e$4([!!e]);return {itemProps:{role:"presentation"},headingProps:e?{id:o,role:"presentation"}:{},groupProps:{role:"group","aria-label":t,"aria-labelledby":e?o:void 0}}}var Ue=2,Po=50,bo=1e3,_r=Math.PI/12;function Kr(r){let{menuRef:e,submenuRef:t$1,isOpen:o,isDisabled:n}=r,i=useRef(void 0),l=useRef(void 0),s=useRef(0),p=useRef(void 0),m=useRef(void 0),u=useRef(void 0),c=useRef(2),[f,a]=useState(false);e$5({ref:o?t$1:void 0,onResize:()=>{t$1.current&&(l.current=t$1.current.getBoundingClientRect(),u.current=void 0);}});let g=()=>{a(false),c.current=Ue,i.current=void 0;},R=f$6(),M=t(D=>{f&&D.preventDefault();});useEffect(()=>{f&&e.current?e.current.style.pointerEvents="none":e.current.style.pointerEvents="";},[e,f]),a$j(()=>{let D=t$1.current,v=e.current;if(n||!D||!o||R!=="pointer"||!v){g();return}l.current=D.getBoundingClientRect();let L=k=>{if(k.pointerType==="touch"||k.pointerType==="pen")return;let d=Date.now();if(d-s.current<Po)return;clearTimeout(p.current),clearTimeout(m.current);let{clientX:S,clientY:E}=k;if(!i.current){i.current={x:S,y:E};return}if(!l.current)return;if(u.current||(u.current=S>l.current.right?"left":"right"),S<v.getBoundingClientRect().left||S>v.getBoundingClientRect().right||E<v.getBoundingClientRect().top||E>v.getBoundingClientRect().bottom){g();return}let w=i.current.x,y=i.current.y,b=u.current==="right"?l.current.left-w:w-l.current.right,h=Math.atan2(y-l.current.top,b)+_r,z=Math.atan2(y-l.current.bottom,b)-_r,j=Math.atan2(y-E,u.current==="left"?-(S-w):S-w),_=j<h&&j>z;c.current=_?Math.min(c.current+1,Ue):Math.max(c.current-1,0),c.current>=Ue?a(true):a(false),s.current=d,i.current={x:S,y:E},_&&(p.current=setTimeout(()=>{g(),m.current=setTimeout(()=>{let H=a$o(v).elementFromPoint(S,E);H&&e$3(v,H)&&H.dispatchEvent(new PointerEvent("pointerover",{bubbles:true,cancelable:true}));},100);},bo));},O=b$7(v);return O.addEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.addEventListener("pointerdown",M,true),()=>{O.removeEventListener("pointermove",L),process.env.NODE_ENV!=="test"&&O.removeEventListener("pointerdown",M,true),clearTimeout(p.current),clearTimeout(m.current),c.current=Ue;}},[n,o,e,R,a,t$1]);}function gt(r,e,t){let{parentMenuRef:o,submenuRef:n,type:i="menu",isDisabled:l,delay:s=200,shouldUseVirtualFocus:p}=r,m=c$6(),u=c$6(),{direction:c}=b$2(),f=useRef(void 0),a=useCallback(()=>{f.current&&(clearTimeout(f.current),f.current=void 0);},[f]),x=useCallback(d=>{a(),e.open(d);},[e,a]),g$1=useCallback(()=>{a(),e.close();},[e,a]);a$j(()=>()=>{a();},[a]);let R=d=>{if(i$2(d.currentTarget))switch(d.key){case "ArrowLeft":c==="ltr"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "ArrowRight":c==="rtl"&&e$3(d.currentTarget,g(d))&&(d.preventDefault(),d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break;case "Escape":e$3(n.current,g(d))&&(d.stopPropagation(),g$1(),!p&&t.current&&a$n(t.current));break}},M={id:u,"aria-labelledby":m,submenuLevel:e.submenuLevel,...i==="menu"&&{onClose:e.closeAll,autoFocus:e.focusStrategy??void 0,onKeyDown:R}},D=d=>{switch(d.key){case "ArrowRight":l||(c==="ltr"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;case "ArrowLeft":l||(c==="rtl"?(d.preventDefault(),e.isOpen||x("first"),i==="menu"&&n?.current&&f$5()===t?.current&&a$n(n.current)):e.isOpen?g$1():d.continuePropagation());break;default:d.continuePropagation();break}},v=d=>{!l&&(d.pointerType==="virtual"||d.pointerType==="keyboard")&&x("first");},L=d=>{!l&&(d.pointerType==="touch"||d.pointerType==="mouse")&&x();},O=d=>{l||(d&&!e.isOpen?f.current||(f.current=setTimeout(()=>{x();},s)):d||a());};a$k(o,"focusin",d=>{e.isOpen&&e$3(o.current,g(d))&&g(d)!==t.current&&g$1();});let k=d=>d!==t.current;return Kr({menuRef:o,submenuRef:n,isOpen:e.isOpen,isDisabled:l}),{submenuTriggerProps:{id:m,"aria-controls":e.isOpen?u:void 0,"aria-haspopup":l?void 0:i,"aria-expanded":e.isOpen?"true":"false",onPressStart:v,onPress:L,onHoverChange:O,onKeyDown:D,isOpen:e.isOpen},submenuProps:M,popoverProps:{isNonModal:true,shouldCloseOnInteractOutside:k}}}function We(r){let e=a$m(r),[t,o]=useState(null),[n,i]=useState([]),l=()=>{i([]),e.close();};return {focusStrategy:t,...e,open(m=null){o(m),e.open();},toggle(m=null){o(m),e.toggle();},close(){l();},expandedKeysStack:n,openSubmenu:(m,u)=>{i(c=>u>c.length?c:[...c.slice(0,u),m]);},closeSubmenu:(m,u)=>{i(c=>c[u]===m?c.slice(0,u):c);}}}function Pt(r,e){let{triggerKey:t}=r,{expandedKeysStack:o,openSubmenu:n,closeSubmenu:i,close:l}=e,[s]=useState(o?.length),p=useMemo(()=>o[s]===t,[o,t,s]),[m,u]=useState(null),c=useCallback(x=>{u(x??null),n(t,s);},[n,s,t]),f=useCallback(()=>{u(null),i(t,s);},[i,s,t]),a=useCallback(x=>{u(x??null),p?f():c(x);},[f,c,p]);return useMemo(()=>({focusStrategy:m,isOpen:p,open:c,close:f,closeAll:l,submenuLevel:s,setOpen:()=>{},toggle:a}),[p,c,f,l,m,a,s])}var bt=createContext({});forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,bt),jsx(h.kbd,{dir:"ltr",...e$1,ref:t})});var Do=createContext({}),Xl=forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,Do);let{children:o,level:n=3,className:i,...l}=e$1,s=h[`h${n}`];return jsx(s,{...l,ref:t,className:i??"react-aria-Heading",children:o})});var xt=createContext(null);createContext(null);createContext(null);var vt=createContext(null);var Xe=createContext(null),De=createContext(null),Ce=createContext(null),Ge=createContext(null);function Eo(r){let e=We(r),t=useRef(null),{menuTriggerProps:o,menuProps:n}=dt({...r,type:"menu"},e,t),i=useRef(null);return c$8()?null:jsx(b$4,{values:[[Xe,{...n,ref:i}],[vt,e],[Ce,e],[xt,{trigger:"MenuTrigger",triggerRef:t,scrollRef:i,placement:"bottom start","aria-labelledby":n["aria-labelledby"]}]],children:jsx(b$9,{...o,ref:t,isPressed:e.isOpen,children:r.children})})}var Xr=createContext(null),Mt=class extends a$i{static type="submenutrigger";filter(e,t,o){let n=e.getItem(this.firstChildKey);if(n&&o(n.textValue,this)){let i=this.clone();return t.addDescendants(i,e),i}return null}},Oo=k(Mt,(r,e,t)=>{let{CollectionBranch:o}=useContext(p),n=useContext(De),i=useContext(Ce),l=Pt({triggerKey:t.key},i),s=useRef(null),p$1=a$4(e),{parentMenuRef:m,shouldUseVirtualFocus:u}=useContext(Xr),{submenuTriggerProps:c,submenuProps:f,popoverProps:a}=gt({parentMenuRef:m,submenuRef:s,delay:r.delay,shouldUseVirtualFocus:u},l,p$1);return jsxs(b$4,{values:[[ye,{...c,onAction:void 0,ref:p$1}],[Xe,{ref:s,...f}],[vt,l],[xt,{trigger:"SubmenuTrigger",triggerRef:p$1,placement:"end top","aria-labelledby":f["aria-labelledby"],...a}]],children:[jsx(o,{collection:n.collection,parent:t}),r.children[1]]})},r=>r.children[0]),Ao=forwardRef(function(e$1,t){return [e$1,t]=e(e$1,t,Xe),jsx(i,{content:jsx(l,{...e$1}),children:o=>jsx(Io,{props:e$1,collection:o,menuRef:t})})});function Io({props:r,collection:e$1,menuRef:t}){[r,t]=e(r,t,b$1);let{filter:o,...n}=r,i=useMemo(()=>o?e$1.filter(o):e$1,[e$1,o]),l=a$b({...r,collection:i,children:void 0}),s=useContext(Ce),{isVirtualized:p$1,CollectionRoot:m$1}=useContext(p),{menuProps:u}=ct({...r,isVirtualized:p$1,onClose:r.onClose||s?.close},l,t),c=c$3({...r,children:void 0,defaultClassName:"react-aria-Menu",values:{isEmpty:l.collection.size===0}}),f=null;l.collection.size===0&&r.renderEmptyState&&(f=jsx("div",{role:"menuitem",style:{display:"contents"},children:r.renderEmptyState()}));let a=a$2(r,{global:true});return jsx(a$3,{children:jsxs(h.div,{...c$4(a,c,u),ref:t,slot:r.slot||void 0,"data-empty":l.collection.size===0||void 0,onScroll:r.onScroll,children:[jsx(b$4,{values:[[De,l],[_e,{elementType:"div"}],[m,{name:"MenuSection",render:$r}],[Xr,{parentMenuRef:t,shouldUseVirtualFocus:n?.shouldUseVirtualFocus}],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect}],[b$1,null],[c$5,null],[Ge,l.selectionManager],[Ce,s??We({})]],children:jsx(w,{children:jsx(m$1,{collection:l.collection,persistedKeys:q(l.selectionManager.focusedKey),scrollRef:t})})}),f]})})}var Tt=class extends f$3{parent;constructor(e,t){super(e.collection,t),this.parent=e;}get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e);}get childFocusStrategy(){return this.parent.childFocusStrategy}};function $r(r,e,t,o="react-aria-MenuSection"){let n=useContext(De),{CollectionBranch:i}=useContext(p),[l,s]=f(),{headingProps:p$1,groupProps:m}=mt({heading:s,"aria-label":t.props["aria-label"]??void 0}),u=c$3({...r,id:void 0,children:void 0,defaultClassName:o,className:t.props?.className,style:t.props?.style,values:void 0}),c=useContext(Ge),f$1=a$c(r),a=r.selectionMode!=null?new Tt(c,f$1):c,x=d$1(ye)?.shouldCloseOnSelect,g=a$2(r,{global:true});return delete g.id,jsx(h.section,{...c$4(g,u,m),ref:e,children:jsx(b$4,{values:[[ge,{...p$1,ref:l}],[Ge,a],[ye,{shouldCloseOnSelect:r.shouldCloseOnSelect??x}]],children:jsx(i,{collection:n.collection,parent:t})})})}var Ct=k(f$2,$r),ye=createContext(null),Dt=j(e$1,function(e$1,t,o){[e$1,t]=e(e$1,t,ye);let n=d$1(ye)?.id,i=useContext(De),l=a$4(t),s=useContext(Ge),{isVirtualized:p$1}=useContext(p),{menuItemProps:m,labelProps:u,descriptionProps:c,keyboardShortcutProps:f,...a}=pt({...e$1,id:n,key:o.key,selectionManager:s,isVirtualized:p$1},i,l),{hoverProps:x$1,isHovered:g}=a$5({isDisabled:a.isDisabled}),R=c$3({...e$1,id:void 0,children:o.rendered,defaultClassName:"react-aria-MenuItem",values:{...a,isHovered:g,isFocusVisible:a.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e$1["aria-haspopup"],isOpen:e$1["aria-expanded"]==="true"}}),M=e$1.href?h.a:h.div,D=a$2(e$1,{global:true});return delete D.id,delete D.onClick,jsx(M,{...c$4(D,R,m,x$1),ref:l,"data-disabled":a.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":a.isFocused||void 0,"data-focus-visible":a.isFocusVisible||void 0,"data-pressed":a.isPressed||void 0,"data-selected":a.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e$1["aria-haspopup"]||void 0,"data-open":e$1["aria-expanded"]==="true"||void 0,children:jsx(b$4,{values:[[a$8,{slots:{[a$9]:u,label:u,description:c}}],[bt,f],[x,{isSelected:a.isSelected}]],children:R.children})})});var Rt=be.forwardRef(({section:r,isFirstCollectionItem:e,showSectionHeader:t,renderSectionHeader:o,withSectionHeaderPadding:n,sectionStyle:i,sectionClassName:l$1,componentName:s="ListBox",selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a,...x},g)=>{let{isVirtualized:R}=useContext(p),M=o?.(r),D=s==="ListBox"?at:Ct,v=p$1==null?{}:{selectionMode:p$1,selectedKeys:m,defaultSelectedKeys:u,onSelectionChange:c,disabledKeys:f,disallowEmptySelection:a};return jsxs(D,{id:r.id,"aria-label":r.title,...v,className:a$e(`BaselineUI-${s}-Section`,Fr,R&&!e&&Br,typeof l$1=="function"?l$1(r):l$1),style:typeof i=="function"?i(r):i,ref:g,children:[t?M?jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:M}):jsx(ze,{className:`BaselineUI-${s}-SectionHeader`,children:jsx(a$d,{className:a$e(wr,`BaselineUI-${s}-SectionHeaderDefault`),paddingX:"lg",typography:"label.md.semibold",color:"text.primary",paddingInlineStart:n?"5xl":"lg",paddingInlineEnd:"lg",children:r.title})}):null,jsx(l,{items:r.children,dependencies:Ve(x),children:L=>jsx($e,{componentName:s,item:L,...x},L.id)})]})});Rt.displayName="ListSection";var Bo=({componentName:r})=>{let{direction:e}=b$2();return jsx(a$d,{"aria-hidden":true,display:"flex",alignItems:"center",color:"icon.secondary",className:`BaselineUI-${r}-SubmenuChevron`,style:e==="rtl"?{transform:"scaleX(-1)"}:void 0,children:jsx(ChevronRightFilledIcon,{size:8})})},Ho=({item:r,isSelected:e,isHovered:t,isFocusVisible:o,isDisabled:n,selectionIcon:i="checkmark",selectionMode:l,componentName:s="ListBox",hasSubmenu:p=false})=>{let m=r.icon,u=l!=="none",c=r.keyboardShortcut??r.description;return jsxs(a$d,{display:"flex",alignItems:"center",gap:"lg",className:a$e(kr({isHovered:t,isFocused:o,isDisabled:n}),`BaselineUI-${s}-OptionDefault`),children:[jsxs(a$d,{display:"flex",alignItems:"center",flex:1,gap:"lg",children:[u&&i==="checkmark"?jsx("span",{"aria-hidden":true,style:{height:24,width:24},className:`BaselineUI-${s}-SelectionIndicator`,children:e?jsx(CheckmarkIcon,{size:24}):null}):null,u&&i==="checkbox"?jsx("span",{"aria-hidden":true,style:{height:16,width:16},children:jsx("div",{className:c$7({isSelected:e,isIndeterminate:false,isFocusVisible:false,isDisabled:n,isReadOnly:false,hasError:false,isHovered:false}),children:e?jsx(CheckmarkIcon$1,{size:12}):null})}):null,m?jsx(m,{size:24}):null,jsx(b$6,{slot:"label",elementType:"span",children:r.label})]}),p?jsx(Bo,{componentName:s}):c?jsx(b$6,{slot:"description",className:a$e(Ir({isDisabled:n}),`BaselineUI-${s}-OptionDescription`),children:c}):null]})},$e=be.forwardRef(({item:r,optionStyle:e,optionClassName:t,renderOption:o,componentName:n="ListBox",...i},l)=>{let{onPress:s,onKeyDown:p}=useContext(Zr);return jsx(n==="ListBox"?ut:Dt,{...c$4(a$f(i),{onPress:u=>s?.(u,r.id),onKeyDown:p?u=>{p(u,r.id),u.continuePropagation();}:void 0}),id:r.id,value:r,className:u=>a$e(Hr,`BaselineUI-${n}-Option`,typeof t=="function"?t(r,u):t),style:u=>typeof e=="function"?e(r,u):e,textValue:r.label,ref:l,children:u=>o?o(r,u):jsx(Ho,{componentName:n,...u,item:r})})});$e.displayName="ListOption";var Qr=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Zr=be.createContext({}),zo=be.forwardRef(({withSectionHeaderPadding:r=false,showSectionHeader:e=false,renderSectionHeader:t,optionStyle:o,optionClassName:n,sectionStyle:i,sectionClassName:l,renderOption:s,className:p$1,dragAndDropHooks:m,listBoxHandle:u,"data-block-id":c,"data-block-class":f,...a},x)=>{let g=a$4(x),R=be.useRef(false),M=be.useRef(null),D=useContext(le),{isVirtualized:v,layoutDelegate:L}=useContext(p);useEffect(()=>{D&&(s||o||n)&&console.warn("ListBox: If a state is provided via the ListStateContext, the `renderOption`, `optionStyle`, `optionClassName`, `sectionStyle`, `sectionClassName`, and `renderSectionHeader` props will be ignored.");},[D,s,o,n,i,l,t]),a$g({ref:g,isDisabled:!m});let O=useCallback(y=>g.current?.querySelector(`[data-key="${y}"][role="option"]`),[g]);useEffect(()=>{if(!v)return;let y=g.current,b=y?.ownerDocument,h=b?.defaultView;if(y==null||b==null||h==null)return;let z=()=>{let T=f$4(y);return T==null||T===b.body||T===b.documentElement},j=()=>y.querySelector('[role="option"][tabindex="0"]')??y.querySelector('[role="option"][data-focused="true"]'),_=()=>{let T=f$4(y);return T!=null&&e$3(y,T)},H=T=>T.composedPath().some(ue=>ue instanceof h.Node&&e$3(y,ue)),W=()=>{R.current=false;},se=()=>{M.current!=null&&h.cancelAnimationFrame(M.current),M.current=h.requestAnimationFrame(()=>{if(M.current=null,_())return;if(!z()){W();return}let T=j();T?.focus({preventScroll:true});});},te=T=>{Qr.has(T.key)&&(R.current=true);},J=T=>{!Qr.has(T.key)||!z()||!R.current||se();},Y=T=>{H(T)||_()||W();},he=T=>{H(T)||W();},Z=new MutationObserver(T=>{T.some(({addedNodes:ue,removedNodes:re})=>ue.length>0||re.length>0)&&R.current&&se();});return y.addEventListener("keydown",te),b.addEventListener("keydown",J,true),b.addEventListener("focusin",Y,true),b.addEventListener("pointerdown",he,true),Z.observe(y,{childList:true,subtree:true}),()=>{y.removeEventListener("keydown",te),b.removeEventListener("keydown",J,true),b.removeEventListener("focusin",Y,true),b.removeEventListener("pointerdown",he,true),Z.disconnect(),M.current!=null&&h.cancelAnimationFrame(M.current),W(),M.current=null;}},[v,g]);let k=be.useRef(null),d=useCallback(()=>{let y=k.current;y&&(y.ownerWindow.cancelAnimationFrame(y.frameId),k.current=null);},[]);useEffect(()=>d,[d]);let S=useCallback((y,b)=>{if(d(),!g.current)return;let h=()=>{let j=O(y);if(j)return j.scrollIntoView({block:"nearest",inline:"nearest",...b}),true;if(v&&L){let _=L.getItemRect(y);return _?(L.virtualizer.delegate.setVisibleRect(_),true):false}return false};if(h())return;let z=g.current.ownerDocument?.defaultView;z&&(k.current={ownerWindow:z,frameId:z.requestAnimationFrame(()=>{k.current=null,h();})});},[d,O,v,L,g]);useImperativeHandle(u,()=>({scrollIntoView:S,setFocusedKey:y=>{let b=O(y);!g.current||!b||(b.focus(),S(y));}}),[S,O,g]);let E={renderOption:s,optionClassName:n,optionStyle:o,renderSectionHeader:t,sectionClassName:l,sectionStyle:i,showSectionHeader:e,withSectionHeaderPadding:r},w=a.items?.[0]?.id;return jsx(st,{...a,dependencies:[...a.dependencies??[],w,...Ve(E)],"data-block-id":c,"data-block-class":f,dragAndDropHooks:m,ref:g,className:a$e(Ar,"BaselineUI-ListBox",p$1),children:y=>jsx(Ko,{item:y,isFirstCollectionItem:w===y.id,...E},y.id)})});zo.displayName="UNSAFE_ListBox";var _o=be.createContext({}),Ko=r=>{let e=useContext(_o),{item:t,isFirstCollectionItem:o,id:n,value:i,...l}={...e,...r};return a$h(t,"Item is required"),"children"in t?jsx(Rt,{section:t,componentName:"ListBox",isFirstCollectionItem:o,...l}):jsx($e,{item:t,componentName:"ListBox",...l})};export{lt as a,le as b,dt as c,Ve as d,gi as e,Do as f,Xl as g,xt as h,vt as i,Eo as j,Oo as k,Ao as l,Rt as m,Ho as n,$e as o,Zr as p,zo as q,Ko as r};
|
package/dist/chunk-F2X474RV.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-GVI6EBGJ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {j,l,m,k,o,i,h}from'./chunk-EYKIXVM3.mjs';import {a as a$3}from'./chunk-UN7XC7QV.mjs';import {a as a$2}from'./chunk-KCHAWPUN.mjs';import {b}from'./chunk-AYBACQ6U.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:N,itemClassName:C,optionClassName:R,optionStyle:ee,renderOption:oe,...O},re)=>{let u=a($),y=m!=null&&typeof m=="object",A=P.useMemo(()=>h==null?void 0:new Set(h),[h]),te=P.useMemo(()=>C?(ne,ie)=>a$1(C,a$2(R,ne,ie)):R,[C,R]),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,{...O,disabledKeys:A,...y?{}:{selectionMode:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N},className:a$1(I,s),ref:re,children:V(O.items,u,{onAction:O.onAction,disabledKeys:A,contentClassName:s,optionClassName:te,optionStyle:ee,renderOption:oe,selection:y?{modes:m,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:K,disallowEmptySelection:N}: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};
|
package/dist/chunk-HK3CZVHY.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$9}from'./chunk-TJEK54BW.mjs';import {c as c$1,d}from'./chunk-UBFMOTBM.mjs';import {a as a$8}from'./chunk-NGZRN4SF.mjs';import {a as a$2}from'./chunk-2V323KAD.mjs';import {a as a$c}from'./chunk-34TYNTXM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a as a$a}from'./chunk-D3IZ4HBL.mjs';import {a as a$7}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-K6X2BHPP.mjs';import {a as a$6,d as d$1}from'./chunk-BGMVPFYK.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {q}from'./chunk-MRJFGHFW.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$b}from'./chunk-KEVERVHK.mjs';import {c as c$2}from'./chunk-JDLUGVXG.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import R,{useMemo,useRef,useEffect}from'react';import {XIcon}from'@baseline-ui/icons/8';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=new WeakMap;function h(a,e,t){if(!a)return "";typeof e=="string"&&(e=e.replace(/\s+/g,""));let i=I.get(a);return process.env.NODE_ENV!=="production"&&!i&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${i}-${t}-${e}`}function C(a,e,t){let{key:i,isDisabled:s,shouldSelectOnPressUp:r}=a,{selectionManager:o,selectedKey:c$1}=e,l=i===c$1,n=s||e.isDisabled||e.selectionManager.isDisabled(i),p=e.collection.getItem(i),{itemProps:b,isPressed:m}=d({selectionManager:o,key:i,ref:t,isDisabled:n,shouldSelectOnPressUp:r??p?.props.href!=null,linkBehavior:"selection"}),d$2=h(e,i,"tab"),P=h(e,i,"tabpanel"),{tabIndex:L}=b,g=a$b(p?.props,{labelable:true});delete g.id;let x=q(p?.props),{focusableProps:v}=d$1({...p?.props,isDisabled:n},t);return {tabProps:c(g,v,x,b,{id:d$2,"aria-selected":l,"aria-disabled":n||void 0,"aria-controls":l?P:void 0,tabIndex:n?void 0:L,role:"tab"}),isSelected:l,isDisabled:n,isPressed:m}}function A(a,e,t){let i=a$c(t)?void 0:0,s=h(e,a.id??e?.selectedKey,"tabpanel"),r=a$a({...a,id:s,"aria-labelledby":h(e,e?.selectedKey,"tab")});return {tabPanelProps:c(r,{tabIndex:i,role:"tabpanel","aria-describedby":a["aria-describedby"],"aria-details":a["aria-details"]})}}var z=class{collection;flipDirection;disabledKeys;tabDirection;constructor(e,t,i,s=new Set){this.collection=e,this.flipDirection=t==="rtl"&&i==="horizontal",this.disabledKeys=s,this.tabDirection=i==="horizontal";}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(t!=null&&this.isDisabled(t)&&t!==e);return t}};function O(a,e,t){let{orientation:i="horizontal",keyboardActivation:s="automatic"}=a,{collection:r,selectionManager:o,disabledKeys:c$3}=e,{direction:l}=b(),n=useMemo(()=>new z(r,l,i,c$3),[r,c$3,i,l]),{collectionProps:p}=c$1({ref:t,selectionManager:o,keyboardDelegate:n,selectOnFocus:s==="automatic",disallowEmptySelection:true,scrollRef:t,linkBehavior:"selection"}),b$1=c$2();I.set(e,b$1);let m=a$a({...a,id:b$1});return {tabListProps:{...c(p,m),role:"tablist","aria-orientation":i,tabIndex:void 0}}}function N(a){let e=a$9({...a,onSelectionChange:a.onSelectionChange?o=>{o!=null&&a.onSelectionChange?.(o);}:void 0,suppressTextValueWarning:true,defaultSelectedKey:a.defaultSelectedKey??Z(a.collection,a.disabledKeys?new Set(a.disabledKeys):new Set)??void 0}),{selectionManager:t,collection:i,selectedKey:s}=e,r=useRef(s);return useEffect(()=>{let o=s;a.selectedKey==null&&(t.isEmpty||o==null||!i.getItem(o))&&(o=Z(i,e.disabledKeys),o!=null&&t.setSelectedKeys([o])),(o!=null&&t.focusedKey==null||!t.isFocused&&o!==r.current)&&t.setFocusedKey(o),r.current=o;}),{...e,isDisabled:a.isDisabled||false}}function Z(a,e){let t=null;if(a){for(t=a.getFirstKey();t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t!==a.getLastKey();)t=a.getKeyAfter(t);t!=null&&(e.has(t)||a.getItem(t)?.props?.isDisabled)&&t===a.getLastKey()&&(t=a.getFirstKey());}return t}var ee="_1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",te=a({defaultClassName:"_1x62fhb6 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6m5 _1yep5z6m6 _1yep5z6lq _1yep5z6lt _1yep5z6ez _1yep5z69i _1yep5z69j _1yep5z69k",variantClassNames:{isHovered:{true:"_1yep5z611h"},isSelected:{true:"_1x62fhb8"},isFocusVisible:{true:"_1x62fhb9"},isDisabled:{true:"_1x62fhba _1yep5z611l"},variant:{primary:"_1x62fhbb _1yep5z610e",ghost:"_1yep5z610h"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61o0"],[{variant:"primary",isSelected:true},"_1yep5z61pb"],[{variant:"ghost",isSelected:true,isFocusVisible:false},"_1x62fhbd"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61o7"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1x62fhbe _1yep5z6f2"],[{variant:"primary",isHovered:true},"_1yep5z61pc"]]}),ae=a({defaultClassName:"_1x62fhb3 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1x62fhb4",ghost:"_1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ie="_1x62fhbl",k=a({defaultClassName:"_1x62fhbf _1yep5z6fa",variantClassNames:{isHovered:{true:"_1yep5z611s"},isSelected:{true:"_1x62fhbh"},isDisabled:{true:"_1yep5z611u"},variant:{primary:"_1x62fhbj",ghost:"_1x62fhbk"}},defaultVariants:{},compoundVariants:[[{variant:"primary",isSelected:true,isDisabled:false},"_1yep5z61ob"],[{variant:"ghost",isSelected:true,isDisabled:false},"_1yep5z61og"],[{variant:"ghost",isDisabled:true,isSelected:true},"_1yep5z61od"]]}),re="_1yep5z6ma _1yep5z6m7 _1yep5z6id _1yep5z6m9",se=a({defaultClassName:"_1x62fhb0 _1yep5z6m3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{primary:"_1yep5z612u",ghost:"_1x62fhb2"}},defaultVariants:{},compoundVariants:[]});var oe=({state:a,...e})=>{let t=R.useRef(null),{tabPanelProps:i}=A(e,a,t),{selectedItem:s}=a,{focusProps:r,isFocusVisible:o}=a$5();if(!s?.value)return null;let{className:c$1,style:l,"data-block-id":n}=s.value;return jsx("div",{...c(i,r),ref:t,className:a$3({[re]:o},"Baseline-Tabs-TabPanel",c$1),"data-block-id":n,style:l,children:s?.props.children})};var M=R.forwardRef(({className:a,style:e,tabHeaderStyle:t,tabHeaderClassName:i,variant:s="primary",actions:r,onRemove:o,"data-block-id":c,...l},n)=>{let p=N({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues}),b=R.useRef(null),{tabListProps:m}=O({...l,selectedKey:l.selectedValue,defaultSelectedKey:l.defaultSelectedValue,disabledKeys:l.disabledValues},p,b);return jsxs("div",{className:a$3("BaselineUI-Tabs",a),style:e,ref:n,"data-block-id":c,children:[jsxs("div",{className:a$3(se({variant:s}),i),style:t,children:[jsx("div",{...m,className:ae({variant:s}),ref:b,children:[...p.collection].map(d=>(a$1(d.value,"TabItem requires a value prop"),jsx(le,{item:d,state:p,onRemove:o,variant:s},d.key)))}),r?.map((d,P)=>jsx("div",{className:ee,children:jsx(a$2,{...d,variant:"secondary",size:"sm",className:a$3(ie,d.className)})},P))]}),jsx(oe,{state:p},p.selectedItem?.key)]})});M.displayName="TabsBase";var le=({item:a,onRemove:e,state:t,variant:i})=>{let{key:s,value:r}=a,o=R.useRef(null),{tabProps:c$1,isSelected:l,isDisabled:n}=C({key:s},t,o),{hoverProps:p,isHovered:b}=a$4({});a$1(r,"TabButton requires a value prop");let{title:m,icon:d,titleStyle:P,titleClassName:L}=r,{focusProps:g,isFocusVisible:x,isFocused:v}=a$5(),{keyboardProps:de}=a$6({onKeyDown:w=>{w.key==="Backspace"&&e?e(s):w.continuePropagation();}}),ce=a$7({"data-selected":l,"data-disabled":n,"data-focused":v,"data-hovered":b,"data-focus-visible":x});return jsxs("div",{...c(de,c$1,p,g,ce),className:a$3(te({isHovered:b,isSelected:l,isFocusVisible:x,isDisabled:n,variant:i}),"BaselineUI-Tabs-TabButton",L),style:P,ref:o,children:[d?jsx(d,{size:20,className:k({isHovered:b,isSelected:l,isDisabled:n,variant:i})}):null,m,e?jsx(a$2,{variant:"secondary",elementType:"div",icon:XIcon,size:"xxs",onPress:()=>{e(s);},excludeFromTabOrder:true,UNSAFE_isVisuallyInteractiveOnly:true,style:{display:"inline-flex",opacity:l||v||b?1:0},className:k({isHovered:b,isSelected:l,isDisabled:n,variant:i})}):null]})};le.displayName="TabButton";var pe=R.forwardRef(function({children:e,...t},i){let s=useMemo(()=>R.Children.map(e,r=>!r||!R.isValidElement(r)||typeof r.type=="string"?null:{...r.props,id:r.props.value}).filter(Boolean),[e]);return jsx(M,{...t,ref:i,items:s,children:r=>jsx(a$8,{title:r.title,children:r.children},r.key)})});pe.displayName="Tabs";var be=({children:a,title:e,value:t})=>(a$1(t,"TabItem requires a value prop"),a$1(e,"TabItem requires a title prop"),a$1(a,"TabItem requires children"),a);be.displayName="TabItem";export{pe as a,be as b};
|
package/dist/chunk-HONWMHMX.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-HZHAKW6I.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-ILAQFMYD.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b,a as a$5}from'./chunk-Y3YZMICA.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$1,f as f$1}from'./chunk-VZFS4QRW.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-EYKIXVM3.mjs';import {a as a$9}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-UN7XC7QV.mjs';import {b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-AKES5B6C.mjs';import {a as a$b}from'./chunk-CGFLGZL4.mjs';import {b as b$4}from'./chunk-AYBACQ6U.mjs';import {a as a$e}from'./chunk-6JWACCHG.mjs';import {a as a$4}from'./chunk-TDXALNX3.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-K6X2BHPP.mjs';import {a as a$c}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-3FYY26ED.mjs';import {d}from'./chunk-AQYBKDT2.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c,b as b$3}from'./chunk-TZ4MVY4E.mjs';import {g,e}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import z,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var Le=a({defaultClassName:"_18v88n10 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m3",variantClassNames:{labelPosition:{top:"_1yep5z6163 _1yep5z6164 _1yep5z6165",start:"_1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z617i _1yep5z617j _1yep5z617k _1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),Ne=a({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ey _1yep5z6m3 _1yep5z6me _1yep5z6m6 _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z611l"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),we=a({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6m0",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610x",warning:"_1yep5z6117"},isReadOnly:{true:"_1yep5z611s"}},defaultVariants:{},compoundVariants:[]}),Ie=a({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z613e",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z6190 _1yep5z618y _1yep5z613w _1yep5z618r _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61vj _1yep5z61vh _1yep5z61qi"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_18v88n1n"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61qj"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61qj"],[{isReadOnly:true,variant:"primary",isFocused:false},"_18v88n1o"]]}),Ee=a({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),Ve=a({defaultClassName:"_18v88n19 _1yep5z6jb _1yep5z6jc _1yep5z6jd",variantClassNames:{labelPosition:{top:"_1yep5z6tp _1yep5z6tq _1yep5z6tr",start:"_1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6163 _1yep5z6164 _1yep5z6165"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61tv _1yep5z61tw _1yep5z61tx"]]}),je="_18v88n1y",Oe=a({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isHovered:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isOpen:{true:"_1yep5z615b _1yep5z618p"}},defaultVariants:{},compoundVariants:[]});function F(n,s,c,p){if(s!=="number"||n===void 0||n==="")return n;let u=Number.parseFloat(n);if(Number.isNaN(u))return n;let t=u;return c!==void 0&&(t=Math.max(t,c)),p!==void 0&&(t=Math.min(t,p)),t===u?n:String(t)}function Me(n,s){return n.selectedKey==null||s!==n.selectedItem?.textValue}function Te({allowsCustomValue:n,onValueChange:s,inputType:c,minValue:p,maxValue:u},t,x,f){let[D,m]=useState(null),r=useRef(false),C=useRef(null),R=!Me(t,t.inputValue),L=(o,a)=>{C.current=a==null?null:{key:a,value:o},s?.({value:o,key:a});},N=o=>{!r.current||!Me(t,o)||(L(o,null),r.current=false);};useEffect(()=>{if(!s)return;let o=x.current,a=b=>{m(g(b));};return o?.addEventListener("focusin",a),()=>{o?.removeEventListener("focusin",a);}},[s,x,t.selectedKey]),useGranularEffect(()=>{if(t.selectedKey==null||t.selectedItem==null){t.selectionManager.isEmpty&&(C.current=null);return}let o=t.selectedKey,a=t.selectedItem.textValue,b=C.current?.key!==o;!b&&(C.current?.value===a||r.current&&!R)||(L(a,o),b&&(r.current=false));},[t.selectedKey,t.selectedItem?.textValue,R],[s,t.selectedItem]);let B=()=>{D===f.current&&n&&r.current&&(r.current=false);};useEffect(()=>{if(!s)return;let o=f.current,a=()=>{r.current=true;};return o?.addEventListener("input",a),()=>{o?.removeEventListener("input",a);}},[f,s]);let{keyboardProps:h}=a$c({isDisabled:!s,onKeyDown:o=>{if(n&&o.key==="Enter"&&r.current){let a=F(f.current?.value,c,p,u);N(a??""),r.current=false;}else o.key==="Escape"&&(t.selectedKey!=null&&(r.current=false),t.close());o.continuePropagation();}});return {inputProps:h,commitCustomValue:N,disarmPendingEdit:B}}var He=z.forwardRef(({renderOption:n,optionStyle:s,optionClassName:c,...p},u)=>jsx(a$1,{items:p.items,listBoxProps:{renderOption:n,optionStyle:s,optionClassName:c},children:t=>jsx(Fe,{...p,collection:t,ref:u})}));He.displayName="ComboBox";var Fe=z.forwardRef(({className:n,style:s,inputStyle:c$1,inputClassName:p,"data-block-id":u,"data-block-class":t,label:x,items:f$2,isInvalid:D=false,labelPosition:m="top",validationState:r="valid",variant:C="primary",toggleLabel:R,showIcon:L=true,filter:N,minValue:B,maxValue:h,inputType:o="text",onInputSubmit:a,onValueChange:b$5,tooltip:Se,collection:Ke,onTriggerPress:S,...e$1},qe)=>{let k=a$2(qe),{contains:Ae}=a$3({sensitivity:"base"}),_=b({...e$1,defaultFilter:N||Ae,defaultItems:f$2,collection:Ke,children:void 0,validationState:D?"invalid":"valid"}),K=z.useRef(null),v=z.useRef(null),q$1=z.useRef(null),M=z.useRef(null),A=z.useRef(null),{inputProps:Ue,commitCustomValue:We,disarmPendingEdit:Ge}=Te({onValueChange:b$5,allowsCustomValue:e$1.allowsCustomValue,inputType:o,minValue:B,maxValue:h},_,k,v),U=i=>{let d=F(i,o,B,h)??"";return d!==i&&!a&&!b$5&&a$i("bui.comboBox.clampNoCallback","ComboBox: minValue/maxValue clamped a value but no onInputSubmit or onValueChange callback is provided. The constraint cannot be enforced without a callback to notify the consumer."),a?.(d),d},W=()=>{let i=v.current?.value??"";!e$1.allowsCustomValue||!i||We(U(i));};a$4({ref:v,onInteractOutside:i=>{let d=g(i);if(e(k.current,d)||e(M.current,d))return;let P=v.current;if(!P||f(P)!==P){Ge();return}_.isOpen&&(W(),_.close());}});let{buttonProps:w,inputProps:Je,listBoxProps:G,labelProps:Qe,errorMessageProps:Xe,descriptionProps:Ye,validationErrors:Ze}=a$5({...e$1,onBlur:a$6(e$1.onBlur,W),inputRef:v,defaultItems:f$2,buttonRef:K,listBoxRef:q$1,popoverRef:M,validationState:r==="error"?"invalid":"valid"},_),J=e$1.errorMessage||Ze.join(" "),I=b$1({...e$1,errorMessage:J,descriptionProps:Ye,errorMessageProps:Xe,labelPosition:m});J&&(r="error");let{hoverProps:$e,isHovered:Q}=a$7({isDisabled:e$1.isDisabled}),{isFocused:X,focusProps:et,isFocusVisible:Y}=a$8(),Z=a$9({isReadOnly:e$1.isReadOnly,validationState:r}),tt=a$a({"data-read-only":e$1.isReadOnly,"data-disabled":e$1.isDisabled,"data-validation-state":r,"data-focused":X,"data-focus-visible":Y}),{labelProps:ot,fieldProps:rt}=a$b({label:x,"aria-label":e$1["aria-label"],"aria-labelledby":e$1["aria-labelledby"],"aria-describedby":e$1["aria-describedby"],"aria-details":e$1["aria-details"]}),{keyboardProps:at}=a$c({onKeyDown:i=>{e$1.allowsCustomValue&&i.key==="Enter"&&U(v.current?.value??"");}}),{tooltipProps:$}=a$d({tooltip:Se,label:e$1["aria-label"]}),{pressProps:nt}=d({onPress:S}),ee=R?.trim()||void 0,te=i=>{let{triggerProps:d,triggerRef:P}=i??{};return jsxs("div",{className:a$h(Le({labelPosition:m}),n,"BaselineUI-ComboBox"),"data-block-id":u,"data-block-class":t,style:s,ref:k,children:[x||m==="start"&&I?jsxs("div",{className:Ve({labelPosition:m,hasMessage:!!I}),children:[jsx("label",{...c(Qe,ot),className:Ee({isDisabled:e$1.isDisabled}),children:x}),m==="start"&&I]}):null,jsxs("div",{...$e,className:Ie({validationState:r,isHovered:Q,isFocused:X,variant:C,isReadOnly:!!e$1.isReadOnly,isDisabled:!!e$1.isDisabled}),ref:A,children:[jsx("input",{...c(nt,d,Je,Ue,et,tt,rt,at,o==="number"?{type:"number",min:B,max:h,onKeyDown:g=>{(g.key==="ArrowUp"||g.key==="ArrowDown")&&g.preventDefault();}}:null),id:e$1.id,ref:b$3(P,v),className:a$h(Ne({isDisabled:e$1.isDisabled,labelPosition:m}),"BaselineUI-ComboBox-Input",p),style:c$1}),Z&&L?jsx(Z,{className:we({validationState:r,isReadOnly:e$1.isReadOnly}),size:16}):null,jsx(b$4,{...w,onPressStart:g=>{w.onPressStart?.(g),S?.(g);},ref:K,"data-testid":"combobox-toggle-button",variant:"popover",label:null,"aria-label":ee??w["aria-label"],"aria-labelledby":ee?void 0:w["aria-labelledby"],className:Oe({isFocusVisible:!e$1.isDisabled&&!e$1.isReadOnly&&Y,isHovered:!e$1.isDisabled&&!e$1.isReadOnly&&Q,isOpen:_.isOpen})})]}),m==="top"&&I]})};return jsxs(Fragment,{children:[$?jsx(a$e,{...$,children:te}):te(),jsx(a$f,{ref:M,triggerRef:A,state:_,isNonModal:true,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(b$2.Provider,{value:_,children:jsx(a$g.Provider,{value:useMemo(()=>({...G,ref:q$1}),[G]),children:jsx(q,{selectionMode:"single",className:a$h(f$1,je,"BaselineUI-ComboBox-ListBox")})})})})]})});Fe.displayName="ComboBoxInner";export{He as a};
|
package/dist/chunk-INDVRI57.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-ITWJSFYK.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {g as g$1}from'./chunk-SHJ2TJYG.mjs';import {g}from'./chunk-MRJFGHFW.mjs';import {g as g$2,f,a}from'./chunk-AUOQSTS5.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import {useState,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 e=typeof document<"u"&&window.visualViewport;function d(){let x=b(),[h,E]=useState(()=>x?{width:0,height:0}:u());return useEffect(()=>{let m=t=>{E(r=>t.width===r.width&&t.height===r.height?r:t);},n=()=>{e&&e.scale>1||m(u());},l,a$1=t=>{e&&e.scale>1||g$1(g$2(t))&&(l=requestAnimationFrame(()=>{let r=f(a(g$2(t)));(!r||!g$1(r))&&m({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});}));};return m(u()),g()&&window.addEventListener("blur",a$1,true),e?e.addEventListener("resize",n):window.addEventListener("resize",n),()=>{cancelAnimationFrame(l),g()&&window.removeEventListener("blur",a$1,true),e?e.removeEventListener("resize",n):window.removeEventListener("resize",n);}},[]),h}function u(){return {width:e?Math.min(e.width*e.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:e?e.height*e.scale:document.documentElement.clientHeight}}export{d as a};
|
package/dist/chunk-IVC2BJRU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a,b}from'./chunk-XF5UMU6D.mjs';import {b as b$1,a as a$3}from'./chunk-F2X474RV.mjs';import {a as a$1}from'./chunk-CCA2ABXO.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-JDLUGVXG.mjs';import {a as a$4}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
|
-
function E(d,r){let{triggerRef:n,popoverRef:e,groupRef:t,isNonModal:o,isKeyboardDismissDisabled:b$2,shouldCloseOnInteractOutside:g,shouldCloseOnScroll:i=true,...s}=d,l=s.trigger==="SubmenuTrigger",{overlayProps:v,underlayProps:y}=a({isOpen:r.isOpen,onClose:r.close,shouldCloseOnBlur:true,isDismissable:!o||l,isKeyboardDismissDisabled:b$2,shouldCloseOnInteractOutside:g},t??e),{overlayProps:A,arrowProps:R,placement:D,triggerAnchorPoint:h,updatePosition:x}=a$1({...s,targetRef:n,overlayRef:e,isOpen:r.isOpen,shouldCloseOnScroll:i,onClose:o&&!l&&i?r.close:null}),C=e.current?.ownerDocument.documentElement??n.current?.ownerDocument.documentElement;return b({isDisabled:o||!r.isOpen,root:C},e),a$2(()=>{if(r.isOpen&&e.current)return o?b$1(t?.current??e.current):a$3([t?.current??e.current],{shouldUseInert:false,root:a$4(e.current)?.body})},[o,r.isOpen,e,t]),{popoverProps:c(v,A),arrowProps:R,underlayProps:y,placement:D,triggerAnchorPoint:h,updatePosition:x}}export{E as a};
|
package/dist/chunk-JDLUGVXG.mjs
DELETED
|
@@ -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};
|
package/dist/chunk-K6HE4Z2Y.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-TDYBXLYP.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};
|
package/dist/chunk-K73R5G6G.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-TBCZKWGQ.mjs';import {a as a$e}from'./chunk-E3DMXJIC.mjs';import {k,j,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-VZFS4QRW.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-EYKIXVM3.mjs';import {p}from'./chunk-SMAYNDQQ.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-VIVNQZYK.mjs';import {b as b$6}from'./chunk-NUYBQ7KP.mjs';import {b as b$7}from'./chunk-UBFMOTBM.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-XJ2DFV56.mjs';import {a as a$d}from'./chunk-UN7XC7QV.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-XUJJMAKM.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-AYBACQ6U.mjs';import {a as a$7}from'./chunk-O7XK2WIX.mjs';import {a as a$j}from'./chunk-6JWACCHG.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),R=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":[R,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:R},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 U=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:R,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 j=c$2.slice(0,r),H=c$2.slice(r),W=[...j,...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(([j])=>j.startsWith("on"))):c$1(B,T),R,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),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})})})]})});U.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:R,valueProps:m,isOpen:T,ref:N,selectionMode:A,onRemove:F,maxCount:V})=>jsx(U,{...P,className:y,style:x,isOpen:T,isReadOnly:f$2.isReadOnly,ref:N,variant:n,validationState:f$2.validationState,valueProps:m,value:R,fallbackValue:f$2.placeholder,selectionMode:A,onRemove:F,maxCount:V,moreLabel:i}),...f$2},B)=>{let{popoverAnchorRef:P}=useContext(xt),R=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:j,errorMessageProps:H}=de({...a$b(f$2),validationState:f$2.validationState==="error"?"invalid":"valid"},l,R),W=c$3(),X=a$c(f$2)==="warningMessage",E=b$2({...f$2,descriptionProps:j,errorMessageProps:H,warningMessageProps:{id:W},labelPosition:a}),Rt=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:R,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:Rt,valueProps:ae,isOpen:l.isOpen,ref:R,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||R,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(U,{...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};
|
package/dist/chunk-KEAM6GSA.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {l,q,e,B,o,p,u,h,d as d$1,A,g,v,x,z,f,i,m,c as c$2,r,t,s,n,j,a as a$4,b as b$4,w}from'./chunk-OMT6ZWSV.mjs';import {b as b$1}from'./chunk-WL27JGVG.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$2,b as b$3}from'./chunk-MVK5CB64.mjs';import {a as a$1}from'./chunk-XWLESSHN.mjs';import {d}from'./chunk-Y4DRSGEJ.mjs';import {i as i$1,g as g$1,l as l$1,m as m$1}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a,c}from'./chunk-JDLUGVXG.mjs';import {a as a$3}from'./chunk-6ZQE5SHE.mjs';import {b as b$2,g as g$2}from'./chunk-AUOQSTS5.mjs';import {flushSync}from'react-dom';import Je,{useState,useRef,useImperativeHandle,useEffect,useCallback,version}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 Ze=Je.forwardRef(function(e,n){let t=e.children,[s,l]=useState(null),v=useRef(null),d=useRef(void 0);return useImperativeHandle(n,()=>(h,K)=>{let T=t(h),O,a,b;T&&typeof T=="object"&&"element"in T?(O=T.element,a=T.x,b=T.y):O=T,flushSync(()=>{l(O);}),K(v.current,a,b),d.current=requestAnimationFrame(()=>{l(null);});},[t]),useEffect(()=>()=>{d.current&&cancelAnimationFrame(d.current);},[]),s?jsx("div",{style:{zIndex:-100,position:"fixed",top:0,left:-1e5},ref:v,children:s}):null});function Be(i,e,n,t,s=false,l=false){switch(t){case "left":return s?te(i,e,n,l,"left"):re(i,e,n,l,"left");case "right":return s?re(i,e,n,l,"right"):te(i,e,n,l,"right");case "up":return re(i,e,n,l);case "down":return te(i,e,n,l)}}function te(i,e,n,t=false,s=null){if(!n)return {type:"root"};if(n.type==="root"){let l=i.getFirstKey?.()??null;return l!=null?{type:"item",key:l,dropPosition:"before"}:null}if(n.type==="item"){let l=null;s?l=s==="right"?i.getKeyRightOf?.(n.key,{includeDisabled:true}):i.getKeyLeftOf?.(n.key,{includeDisabled:true}):l=i.getKeyBelow?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyAfter(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":return {type:"item",key:n.key,dropPosition:"on"};case "on":{let d=e.getItem(n.key),h=l!=null?e.getItem(l):null;return d&&h&&h.level>=d.level?{type:"item",key:h.key,dropPosition:"before"}:{type:"item",key:n.key,dropPosition:"after"}}case "after":{let d=e.getItem(n.key),h=d?.nextKey!=null?e.getItem(d.nextKey):null;for(;h!=null&&h.type!=="item";)h=h.nextKey!=null?e.getItem(h.nextKey):null;if(d&&h==null&&d.parentKey!=null){let K=e.getItem(d.parentKey),T=K?.nextKey!=null?e.getItem(K.nextKey):null;if(T?.type==="item")return {type:"item",key:T.key,dropPosition:"before"};if(K?.type==="item")return {type:"item",key:K.key,dropPosition:"after"}}if(h)return {type:"item",key:h.key,dropPosition:"on"}}}}return t?{type:"root"}:null}function re(i,e,n,t=false,s=null){if(!n||t&&n.type==="root"){let l=null,v=i.getLastKey?.();for(;v!=null;){let d=e.getItem(v);if(d?.type!=="item")break;l=v,v=d?.parentKey;}return l!=null?{type:"item",key:l,dropPosition:"after"}:null}if(n.type==="item"){let l=null;s?l=s==="left"?i.getKeyLeftOf?.(n.key,{includeDisabled:true}):i.getKeyRightOf?.(n.key,{includeDisabled:true}):l=i.getKeyAbove?.(n.key,{includeDisabled:true});let v=oe(e,n.key,d=>e.getKeyBefore(d));if(l!=null&&l!==v)return {type:"item",key:l,dropPosition:n.dropPosition};switch(n.dropPosition){case "before":{let d=e.getItem(n.key);if(d&&d.prevKey!=null){let h=Fe(e,d.prevKey);if(h)return h}return l!=null?{type:"item",key:l,dropPosition:"on"}:{type:"root"}}case "on":return {type:"item",key:n.key,dropPosition:"before"};case "after":{let d=Fe(e,n.key);return d||{type:"item",key:n.key,dropPosition:"on"}}}}return n.type!=="root"?{type:"root"}:null}function Fe(i,e){let n=i.getItem(e),t=oe(i,e,l=>i.getKeyAfter(l)),s=t!=null?i.getItem(t):null;if(n&&s&&s.level>n.level){let l=null;if("lastChildKey"in n)for(l=n.lastChildKey!=null?i.getItem(n.lastChildKey):null;l&&l.type!=="item"&&l.prevKey!=null;)l=i.getItem(l.prevKey);else l=Array.from(n.childNodes).findLast(v=>v.type==="item")||null;if(l)return {type:"item",key:l.key,dropPosition:"after"}}return null}function oe(i,e,n){let t=n(e),s=t!=null?i.getItem(t):null;for(;s&&s.type!=="item";)t=n(s.key),s=t!=null?i.getItem(t):null;return t}var $=20;function He(i){let e=useRef(null),n=useRef(true),t=useRef(true);useEffect(()=>{if(i.current){e.current=a$2(i.current)?i.current:b$3(i.current);let v=window.getComputedStyle(e.current);n.current=/(auto|scroll)/.test(v.overflowX),t.current=/(auto|scroll)/.test(v.overflowY);}},[i]);let s=useRef({timer:void 0,dx:0,dy:0}).current;useEffect(()=>()=>{s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);},[s]);let l=useCallback(()=>{n.current&&e.current&&(e.current.scrollLeft+=s.dx),t.current&&e.current&&(e.current.scrollTop+=s.dy),s.timer&&(s.timer=requestAnimationFrame(l));},[e,s]);return {move(v,d){if(!i$1()||g$1()||!e.current)return;let h=e.current.getBoundingClientRect(),K=$,T=$,O=h.height-$,a=h.width-$;v<K||v>a||d<T||d>O?(v<K?s.dx=v-K:v>a&&(s.dx=v-a),d<T?s.dy=d-T:d>O&&(s.dy=d-O),s.timer||(s.timer=requestAnimationFrame(l))):this.stop();},stop(){s.timer&&(cancelAnimationFrame(s.timer),s.timer=void 0);}}}function tt(i,e$1,n){let t=useRef({props:i,state:e$1,nextTarget:null,dropOperation:null}).current;t.props=i,t.state=e$1;let s=useCallback(async a=>{let{onInsert:b,onRootDrop:g,onItemDrop:c,onReorder:p,onMove:m,acceptedDragTypes:u="all",shouldAcceptItemDrop:r}=t.props,{draggingKeys:f}=l,y=q(n),{target:o,dropOperation:D,items:P}=a,w=P;(u!=="all"||r)&&(w=P.filter(S=>{let E;return S.kind==="directory"?E=new Set([e]):E=S.kind==="file"?new Set([S.type]):S.types,u==="all"||u.some(x=>E.has(x))?o.type==="item"&&o.dropPosition==="on"&&r?r(o,E):true:false})),w.length>0&&(o.type==="root"&&g&&await g({items:w,dropOperation:D}),o.type==="item"&&(o.dropPosition==="on"&&c&&await c({items:w,dropOperation:D,isInternal:y,target:o}),m&&y&&await m({keys:f,dropOperation:D,target:o}),o.dropPosition!=="on"&&(!y&&b&&await b({items:w,dropOperation:D,target:o}),y&&p&&await p({keys:f,dropOperation:D,target:o}))));},[t,n]),l$1=He(n),{dropProps:v}=B({ref:n,onDropEnter(){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},onDropMove(a){t.nextTarget!=null&&e$1.setTarget(t.nextTarget);},getDropOperationForPoint(a,b,g,c){let{draggingKeys:p,dropCollectionRef:m}=l,u=q(n),r=y=>e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p})!=="cancel",f=i.dropTargetDelegate.getDropTargetFromPoint(g,c,r);if(!f)return t.dropOperation="cancel",t.nextTarget=null,"cancel";if(t.dropOperation=e$1.getDropOperation({target:f,types:a,allowedOperations:b,isInternal:u,draggingKeys:p}),t.dropOperation==="cancel"){let y={type:"root"},o=e$1.getDropOperation({target:y,types:a,allowedOperations:b,isInternal:u,draggingKeys:p});o!=="cancel"&&(f=y,t.dropOperation=o);}return f&&t.dropOperation!=="cancel"&&n?.current!==m?.current&&o(n),t.nextTarget=t.dropOperation==="cancel"?null:f,t.dropOperation},onDropExit(){o(void 0),e$1.setTarget(null),l$1.stop();},onDropActivate(a){e$1.target?.type==="item"&&typeof i.onDropActivate=="function"&&i.onDropActivate({type:"dropactivate",x:a.x,y:a.y,target:e$1.target});},onDrop(a){o(n),e$1.target&&K(a,e$1.target);let{draggingCollectionRef:b}=l;b==null&&p();}}),d$2=useRef(null),h$1=useCallback(()=>{let{state:a}=t;if(d$2.current){let{target:b,collection:g,selectedKeys:c,focusedKey:p,isInternal:m,draggingKeys:u}=d$2.current;if(a.collection.size>g.size&&a.selectionManager.isSelectionEqual(c)){let r=new Set,f=a.collection.getFirstKey();for(;f!=null;){let y=a.collection.getItem(f);y?.type==="item"&&!g.getItem(y.key)&&r.add(y.key),y?.hasChildNodes&&a.collection.getItem(y.lastChildKey)?.type==="item"?f=y.firstChildKey:f=a.collection.getKeyAfter(f);}if(a.selectionManager.setSelectedKeys(r),a.selectionManager.focusedKey===p){let y=r.keys().next().value;if(y!=null){let o=a.collection.getItem(y),D=d$2.current.target,P=a.collection.expandedKeys?a.collection.expandedKeys.has(o?.parentKey):false;o&&(o?.type==="cell"||D.type==="item"&&D.dropPosition==="on"&&!P)&&(y=o.parentKey),y!=null&&a.selectionManager.setFocusedKey(y),a.selectionManager.selectionMode==="none"&&d("keyboard");}}}else p!=null&&a.selectionManager.focusedKey===p&&m&&b.type==="item"&&b.dropPosition!=="on"&&u.has(a.collection.getItem(p)?.parentKey)?(a.selectionManager.setFocusedKey(a.collection.getItem(p)?.parentKey??null),d("keyboard")):a.selectionManager.focusedKey===p&&b.type==="item"&&b.dropPosition==="on"&&a.collection.getItem(b.key)!=null?(a.selectionManager.setFocusedKey(b.key),d("keyboard")):a.selectionManager.focusedKey!=null&&!a.selectionManager.isSelected(a.selectionManager.focusedKey)&&d("keyboard");a.selectionManager.setFocused(true);}},[t]),K=useCallback((a,b)=>{let{state:g}=t;d$2.current={timeout:void 0,focusedKey:g.selectionManager.focusedKey,collection:g.collection,selectedKeys:g.selectionManager.selectedKeys,draggingKeys:l.draggingKeys,isInternal:q(n),target:b},(t.props.onDrop||s)({type:"drop",x:a.x,y:a.y,target:b,items:a.items,dropOperation:a.dropOperation}),d$2.current.timeout=setTimeout(()=>{h$1(),d$2.current=null;},50);},[t,s,n,h$1]);useEffect(()=>()=>{d$2.current&&clearTimeout(d$2.current.timeout);},[]),a(()=>{d$2.current&&e$1.collection!==d$2.current.collection&&h$1();});let{direction:T}=b();useEffect(()=>{if(!n.current)return;let a=(c,p=true,m="down")=>Be(t.props.keyboardDelegate,t.state.collection,c,m,T==="rtl",p),b=(c,p=true)=>a(c,p,"up"),g=(c,p,m,u,r=true)=>{let f=0,y,{draggingKeys:o}=l,D=q(n);do{let P=u(c,r);if(!P)return null;c=P,y=t.state.getDropOperation({target:P,types:p,allowedOperations:m,isInternal:D,draggingKeys:o}),c.type==="root"&&f++;}while(y==="cancel"&&!t.state.isDropTarget(c)&&f<2);return y==="cancel"?null:c};return u({element:n.current,preventFocusOnDrop:true,getDropOperation(c,p){if(t.state.target){let{draggingKeys:u}=l,r=q(n);return t.state.getDropOperation({target:t.state.target,types:c,allowedOperations:p,isInternal:r,draggingKeys:u})}return g(null,c,p,a)?"move":"cancel"},onDropEnter(c,p){let m=h(p.items),u=t.state.selectionManager,r=null;o(n);let f=u.focusedKey,y="after",o$1=f!=null?t.state.collection.getItem(f):null;if(o$1?.type==="cell"&&(f=o$1.parentKey),f!=null&&u.isSelected(f)&&(u.selectedKeys.size>1&&u.firstSelectedKey===f?y="before":f=u.lastSelectedKey),f!=null){r={type:"item",key:f,dropPosition:y};let{draggingKeys:D}=l,P=q(n);t.state.getDropOperation({target:r,types:m,allowedOperations:p.allowedDropOperations,isInternal:P,draggingKeys:D})==="cancel"&&(r=g(r,m,p.allowedDropOperations,a,false)??g(r,m,p.allowedDropOperations,b,false));}r||(r=g(null,m,p.allowedDropOperations,a)),t.state.setTarget(r);},onDropExit(){o(void 0),t.state.setTarget(null);},onDropTargetEnter(c){t.state.setTarget(c);},onDropActivate(c,p){p?.type==="item"&&p?.dropPosition==="on"&&typeof t.props.onDropActivate=="function"&&t.props.onDropActivate({type:"dropactivate",x:c.x,y:c.y,target:p});},onDrop(c,p){o(n),t.state.target&&K(c,p||t.state.target);},onKeyDown(c,p){let{keyboardDelegate:m}=t.props,u=h(p.items);switch(c.key){case "ArrowDown":{if(m.getKeyBelow){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"down"));t.state.setTarget(r);}break}case "ArrowUp":{if(m.getKeyAbove){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"up"));t.state.setTarget(r);}break}case "ArrowLeft":{if(m.getKeyLeftOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"left"));t.state.setTarget(r);}break}case "ArrowRight":{if(m.getKeyRightOf){let r=g(t.state.target,u,p.allowedDropOperations,(f,y)=>a(f,y,"right"));t.state.setTarget(r);}break}case "Home":{if(m.getFirstKey){let r=g(null,u,p.allowedDropOperations,a);t.state.setTarget(r);}break}case "End":{if(m.getLastKey){let r=g(null,u,p.allowedDropOperations,b);t.state.setTarget(r);}break}case "PageDown":{if(m.getKeyPageBelow){let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,a);else {let f=m.getFirstKey?.();r.type==="item"&&(f=r.key);let y=null;f!=null&&(y=m.getKeyPageBelow(f));let o=r.type==="item"?r.dropPosition:"after";if((y==null||r.type==="item"&&r.key===m.getLastKey?.())&&(y=m.getLastKey?.()??null,o="after"),y==null)break;r={type:"item",key:y,dropPosition:o};let{draggingCollectionRef:D,draggingKeys:P}=l,w=D?.current===n?.current;t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:w,draggingKeys:P})==="cancel"&&(r=g(r,u,p.allowedDropOperations,a,false)??g(r,u,p.allowedDropOperations,b,false));}t.state.setTarget(r??t.state.target);}break}case "PageUp":{if(!m.getKeyPageAbove)break;let r=t.state.target;if(!r)r=g(null,u,p.allowedDropOperations,b);else if(r.type==="item"){if(r.key===m.getFirstKey?.())r={type:"root"};else {let D=m.getKeyPageAbove(r.key),P=r.dropPosition;if(D==null&&(D=m.getFirstKey?.(),P="before"),D==null)break;r={type:"item",key:D,dropPosition:P};}let{draggingKeys:f}=l,y=q(n);t.state.getDropOperation({target:r,types:u,allowedOperations:p.allowedDropOperations,isInternal:y,draggingKeys:f})==="cancel"&&(r=g(r,u,p.allowedDropOperations,b,false)??g(r,u,p.allowedDropOperations,a,false));}t.state.setTarget(r??t.state.target);break}}t.props.onKeyDown?.(c);}})},[t,n,K,T]);let O=c();return d$1.set(e$1,{id:O,ref:n}),{collectionProps:c$1(v,{id:O,"aria-describedby":null})}}function ie(i,e,n){let{dropProps:t}=A(n),s=g(e);useEffect(()=>{if(n.current)return v({element:n.current,target:i.target,getDropOperation(T,O){let{draggingKeys:a}=l,b=q(s);return e.getDropOperation({target:i.target,types:T,allowedOperations:O,isInternal:b,draggingKeys:a})},activateButtonRef:i.activateButtonRef})},[n,i.target,e,s,i.activateButtonRef]);let l$1=x(),{draggingKeys:v$1}=l,d=q(s),h$1=l$1&&e.getDropOperation({target:i.target,types:h(l$1.dragTarget.items),allowedOperations:l$1.dragTarget.allowedDropOperations,isInternal:d,draggingKeys:v$1})!=="cancel",K=e.isDropTarget(i.target);return useEffect(()=>{l$1&&K&&n.current&&n.current.focus();},[K,l$1,n]),{dropProps:{...t,"aria-hidden":!l$1||h$1?void 0:"true"},isDropTarget:K}}function rt(i,e,n){let{target:t}=i,{collection:s}=e,l=b$1(z,"@react-aria/dnd"),v=x(),{dropProps:d}=ie(i,e,n),h=c(),K=g=>g==null?"":s.getTextValue?.(g)??s.getItem(g)?.textValue??"",T="",O;if(t.type==="root")T=l.format("dropOnRoot"),O=`${h} ${f(e)}`;else if(t.dropPosition==="on")T=l.format("dropOnItem",{itemText:K(t.key)});else {let g,c;if(t.dropPosition==="before"){let p=s.getItem(t.key)?.prevKey,m=p!=null?s.getItem(p):null;g=m?.type==="item"?m.key:null;}else g=t.key;if(t.dropPosition==="after"){let p=s.getItem(t.key)?.nextKey,m=p!=null?s.getItem(p):null;c=m?.type==="item"?m.key:null;}else c=t.key;g!=null&&c!=null?T=l.format("insertBetween",{beforeItemText:K(g),afterItemText:K(c)}):g!=null?T=l.format("insertAfter",{itemText:K(g)}):c!=null&&(T=l.format("insertBefore",{itemText:K(c)}));}let a=e.isDropTarget(t),b=v?d["aria-hidden"]:"true";return {dropIndicatorProps:{...d,id:h,"aria-roledescription":l.format("dropIndicator"),"aria-label":T,"aria-labelledby":O,"aria-hidden":b,tabIndex:-1},isDropTarget:a,isHidden:!a&&!!b}}var Ve={keyboard:{start:"dragDescriptionKeyboard",end:"endDragKeyboard"},touch:{start:"dragDescriptionTouch",end:"endDragTouch"},virtual:{start:"dragDescriptionVirtual",end:"endDragVirtual"}};function Ye(i$1){let{hasDragButton:e,isDisabled:n,elementRef:t$1}=i$1,s$1=b$1(z,"@react-aria/dnd"),l=useRef({options:i$1,x:0,y:0}).current;l.options=i$1;let v=useRef(null),[d,h]=useState(false),K=o=>{v.current=o,h(!!o);},{addGlobalListener:T,removeAllGlobalListeners:O}=a$3(),a=useRef(null),b=o=>{if(o.defaultPrevented)return;if(o.stopPropagation(),a.current==="virtual"){o.preventDefault(),m(g$2(o)),a.current=null;return}typeof i$1.onDragStart=="function"&&i$1.onDragStart({type:"dragstart",x:o.clientX,y:o.clientY});let D=i$1.getItems();o.dataTransfer.clearData?.(),j(o.dataTransfer,D);let P=7;if(typeof i$1.getAllowedDropOperations=="function"){let E=i$1.getAllowedDropOperations();P=0;for(let x of E)P|=a$4[x]||0;}t(P);let w=b$4[P]||"none";o.dataTransfer.effectAllowed=w==="cancel"?"none":w,typeof i$1.preview?.current=="function"&&i$1.preview.current(D,(E,x,N)=>{if(!E)return;let M=E.getBoundingClientRect(),ge=o.currentTarget.getBoundingClientRect(),Z=o.clientX-ge.x,Q=o.clientY-ge.y;(Z>M.width||Q>M.height)&&(Z=M.width/2,Q=M.height/2);let H=Z,j=Q;typeof x=="number"&&typeof N=="number"&&(H=x,j=N),H=Math.max(0,Math.min(H,M.width)),j=Math.max(0,Math.min(j,M.height));let _e=2*Math.round(M.height/2);E.style.height=`${_e}px`,o.dataTransfer.setDragImage(E,H,j);}),T(b$2(g$2(o)),"drop",E=>{E.preventDefault(),E.stopPropagation(),console.warn("Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.");},{once:true}),l.x=o.clientX,l.y=o.clientY;let S=g$2(o);requestAnimationFrame(()=>{K(S);});},g=o=>{o.stopPropagation(),!(o.clientX===l.x&&o.clientY===l.y)&&(typeof i$1.onDragMove=="function"&&i$1.onDragMove({type:"dragmove",x:o.clientX,y:o.clientY}),l.x=o.clientX,l.y=o.clientY);},c=o=>{if(o.stopPropagation(),typeof i$1.onDragEnd=="function"){let D={type:"dragend",x:o.clientX,y:o.clientY,dropOperation:c$2[o.dataTransfer.dropEffect]};r&&(D.dropOperation=c$2[r]),i$1.onDragEnd(D);}K(null),O(),t(0),s(void 0);};useEffect(()=>()=>{if(v.current&&(!v.current.isConnected||parseInt(version,10)<17)){if(typeof l.options.onDragEnd=="function"){let o={type:"dragend",x:0,y:0,dropOperation:c$2[r||"none"]};l.options.onDragEnd(o);}K(null),t(0),s(void 0);}},[l]);let p=o=>{o.pointerType!=="keyboard"&&o.pointerType!=="virtual"||m(o.target);},m=o=>{if(typeof l.options.onDragStart=="function"){let D=o.getBoundingClientRect();l.options.onDragStart({type:"dragstart",x:D.x+D.width/2,y:D.y+D.height/2});}w({element:o,items:l.options.getItems(),allowedDropOperations:typeof l.options.getAllowedDropOperations=="function"?l.options.getAllowedDropOperations():["move","copy","link"],onDragEnd(D){K(null),typeof l.options.onDragEnd=="function"&&l.options.onDragEnd(D);}},s$1),K(o);},u=i(),r$1=d?Ve[u].end:Ve[u].start,f=a$1(s$1.format(r$1),t$1),y={};return e||(y={...f,onPointerDown(o){if(a.current=m$1(o.nativeEvent)?"virtual":o.pointerType,o.width<1&&o.height<1)a.current="virtual";else {let D=o.currentTarget.getBoundingClientRect(),P=o.clientX-D.x,w=o.clientY-D.y,S=D.width/2,E=D.height/2;Math.abs(P-S)<=.5&&Math.abs(w-E)<=.5?a.current="virtual":a.current=o.pointerType;}},onKeyDownCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation());},onKeyUpCapture(o){g$2(o)===o.currentTarget&&o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));},onClick(o){(l$1(o.nativeEvent)||a.current==="virtual")&&(o.preventDefault(),o.stopPropagation(),m(g$2(o)));}}),n?{dragProps:{draggable:"false"},dragButtonProps:{},isDragging:false}:{dragProps:{...y,draggable:"true",onDragStart:b,onDrag:g,onDragEnd:c},dragButtonProps:{...f,onPress:p},isDragging:d}}var it={keyboard:{selected:"dragSelectedKeyboard",notSelected:"dragDescriptionKeyboard"},touch:{selected:"dragSelectedLongPress",notSelected:"dragDescriptionLongPress"},virtual:{selected:"dragDescriptionVirtual",notSelected:"dragDescriptionVirtual"}};function at(i$1,e,n$1){let t=b$1(z,"@react-aria/dnd"),s=e.isDisabled||e.selectionManager.isDisabled(i$1.key),{dragProps:l,dragButtonProps:v}=Ye({elementRef:n$1,getItems(){return e.getItems(i$1.key)},preview:e.preview,getAllowedDropOperations:e.getAllowedDropOperations,hasDragButton:i$1.hasDragButton,onDragStart(g){e.startDrag(i$1.key,g),n(e.draggingKeys);},onDragMove(g){e.moveDrag(g);},onDragEnd(g){let{dropOperation:c}=g,p$1=c==="cancel"?false:q();e.endDrag({...g,keys:e.draggingKeys,isInternal:p$1}),p();}}),d=e.collection.getItem(i$1.key),h=e.getKeysForDrag(i$1.key).size,K=h>1&&e.selectionManager.isSelected(i$1.key),T,O,a=i();if(!i$1.hasDragButton&&e.selectionManager.selectionMode!=="none"){let g=it[a][K?"selected":"notSelected"];i$1.hasAction&&a==="keyboard"&&(g+="Alt"),K?O=t.format(g,{count:h}):O=t.format(g),delete l.onClick;}else if(K)T=t.format("dragSelectedItems",{count:h});else {let g=e.collection.getTextValue?.(i$1.key)??d?.textValue??"";T=t.format("dragItem",{itemText:g});}let b=a$1(O,n$1);if(O&&Object.assign(l,b),!i$1.hasDragButton&&i$1.hasAction){let{onKeyDownCapture:g,onKeyUpCapture:c}=l;a==="touch"&&delete l["aria-describedby"],l.onKeyDownCapture=p=>{p.altKey&&g?.(p);},l.onKeyUpCapture=p=>{p.altKey&&c?.(p);};}return {dragProps:s?{}:l,dragButtonProps:{...v,isDisabled:s,"aria-label":T}}}function pt(i,e,n){let{draggingCollectionRef:t}=l;e.draggingKeys.size>0&&t?.current!==n.current&&m(n);}function gt(i){let{getItems:e,isDisabled:n,collection:t,selectionManager:s,onDragStart:l,onDragMove:v,onDragEnd:d,preview:h,getAllowedDropOperations:K}=i,[,T]=useState(false),O=useRef(new Set),a=useRef(null),b=g=>{let c=new Set;if(s.isSelected(g))for(let p of s.selectedKeys){let m=t.getItem(p);if(m){let u=false,r=m.parentKey;for(;r!=null;){if(s.selectedKeys.has(r)){u=true;break}let f=t.getItem(r);r=f?f.parentKey:null;}u||c.add(p);}}else c.add(g);return c};return {collection:t,selectionManager:s,get draggedKey(){return a.current},get draggingKeys(){return O.current},isDragging(g){return O.current.has(g)},getKeysForDrag:b,getItems(g){let c=b(g),p=[];for(let m of c){let u=t.getItem(m)?.value;u!=null&&p.push(u);}return e(b(g),p)},isDisabled:n,preview:h,getAllowedDropOperations:K,startDrag(g,c){let p=b(g);O.current=p,a.current=g,s.setFocused(false),T(true),typeof l=="function"&&l({...c,keys:p});},moveDrag(g){typeof v=="function"&&v({...g,keys:O.current});},endDrag(g){let{isInternal:c}=g;typeof d=="function"&&d({...g,keys:O.current,isInternal:c}),O.current=new Set,a.current=null,T(false);}}}function ft(i){let{acceptedDragTypes:e="all",isDisabled:n,onInsert:t,onRootDrop:s,onItemDrop:l,onReorder:v,onMove:d,shouldAcceptItemDrop:h,collection:K,selectionManager:T,onDropEnter:O,getDropOperation:a,onDrop:b}=i,[,g]=useState(null),c=useRef(null),p=u=>{if(u.dropPosition==="before"){let r=K.getItem(u.key);return r&&r.prevKey!=null?{type:"item",key:r.prevKey,dropPosition:"after"}:null}else if(u.dropPosition==="after"){let r=K.getItem(u.key);return r&&r.nextKey!=null?{type:"item",key:r.nextKey,dropPosition:"before"}:null}return null},m=useCallback(u=>{let{target:r,types:f,allowedOperations:y,isInternal:o,draggingKeys:D}=u;if(n||!r)return "cancel";if(e==="all"||e.some(P=>f.has(P))){let P=t&&r.type==="item"&&!o&&(r.dropPosition==="before"||r.dropPosition==="after"),w=v&&r.type==="item"&&o&&(r.dropPosition==="before"||r.dropPosition==="after")&&yt(K,r,D),S=r.type!=="item"||r.dropPosition!=="on"||!h||h(r,f),E=d&&r.type==="item"&&o&&S,x=s&&r.type==="root"&&!o,N=l&&r.type==="item"&&r.dropPosition==="on"&&!(o&&r.key!=null&&D.has(r.key))&&S;if(b||P||w||E||x||N)return a?a(r,f,y):y[0]}return "cancel"},[n,K,e,a,t,s,l,h,v,d,b]);return {collection:K,selectionManager:T,isDisabled:n,get target(){return c.current},setTarget(u){if(this.isDropTarget(u))return;let r=c.current;r&&typeof i.onDropExit=="function"&&i.onDropExit({type:"dropexit",x:0,y:0,target:r}),u&&typeof O=="function"&&O({type:"dropenter",x:0,y:0,target:u}),c.current=u??null,g(u??null);},isDropTarget(u){let r=c.current;return !r||!u?false:pe(u,r)?true:u?.type==="item"&&r?.type==="item"&&u.key!==r.key&&u.dropPosition!==r.dropPosition&&u.dropPosition!=="on"&&r.dropPosition!=="on"?pe(p(u),r)||pe(u,p(r)):false},getDropOperation(u){let{target:r,isInternal:f,draggingKeys:y}=u;if(f&&r.type==="item"&&y.size>0){if(y.has(r.key)&&r.dropPosition==="on")return "cancel";let o=r.key;for(;o!=null;){let P=K.getItem(o)?.parentKey;if(P!=null&&y.has(P))return "cancel";o=P??null;}}return m(u)}}}function pe(i,e){if(!i)return !e;switch(i.type){case "root":return e?.type==="root";case "item":return e?.type==="item"&&e?.key===i.key&&e?.dropPosition===i.dropPosition}}function yt(i,e,n){let t=i.getItem(e.key);for(let s of n)if(i.getItem(s)?.parentKey!==t?.parentKey)return false;return true}var se=class{collection;ref;layout;orientation;direction;constructor(e,n,t){this.collection=e,this.ref=n,this.layout=t?.layout||"stack",this.orientation=t?.orientation||"vertical",this.direction=t?.direction||"ltr";}getPrimaryStart(e){return this.orientation==="horizontal"?e.left:e.top}getPrimaryEnd(e){return this.orientation==="horizontal"?e.right:e.bottom}getSecondaryStart(e){return this.orientation==="horizontal"?e.top:e.left}getSecondaryEnd(e){return this.orientation==="horizontal"?e.bottom:e.right}getFlowStart(e){return this.layout==="stack"?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout==="stack"?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,n,t){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return {type:"root"};let s=this.ref.current.getBoundingClientRect(),l=this.orientation==="horizontal"?e:n,v=this.orientation==="horizontal"?n:e;l+=this.getPrimaryStart(s),v+=this.getSecondaryStart(s);let d=this.layout==="stack"?l:v,h=this.orientation==="horizontal"&&this.direction==="rtl",K=this.layout==="grid"&&this.orientation==="vertical"&&this.direction==="rtl",T=this.layout==="stack"?h:K,O=this.ref.current?.dataset.collection,a=this.ref.current.querySelectorAll(O?`[data-collection="${CSS.escape(O)}"]`:"[data-key]"),b=new Map,g=b$2(this.ref.current);for(let f of a)f instanceof g.HTMLElement&&f.dataset.key!=null&&b.set(f.dataset.key,f);let c=[...this.collection].filter(f=>f.type==="item");if(c.length<1)return {type:"root"};let p=0,m=c.length;for(;p<m;){let f=Math.floor((p+m)/2),y=c[f],o=b.get(String(y.key));if(!o)break;let D=o.getBoundingClientRect(),P=w=>{w?p=f+1:m=f;};if(l<this.getPrimaryStart(D))P(h);else if(l>this.getPrimaryEnd(D))P(!h);else if(v<this.getSecondaryStart(D))P(K);else if(v>this.getSecondaryEnd(D))P(!K);else {let w={type:"item",key:y.key,dropPosition:"on"};if(t(w))d<=this.getFlowStart(D)+5&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=this.getFlowEnd(D)-5&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");else {let S=this.getFlowStart(D)+this.getFlowSize(D)/2;d<=S&&t({...w,dropPosition:"before"})?w.dropPosition=T?"after":"before":d>=S&&t({...w,dropPosition:"after"})&&(w.dropPosition=T?"before":"after");}return w}}let u=c[Math.min(p,c.length-1)];return s=b.get(String(u.key))?.getBoundingClientRect(),s&&(l<this.getPrimaryStart(s)||Math.abs(d-this.getFlowStart(s))<Math.abs(d-this.getFlowEnd(s)))?{type:"item",key:u.key,dropPosition:T?"after":"before"}:{type:"item",key:u.key,dropPosition:T?"before":"after"}}};export{tt as a,ie as b,rt as c,at as d,pt as e,Ze as f,gt as g,ft as h,se as i};
|
package/dist/chunk-KEVERVHK.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var p=new Set(["id"]),c=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),u=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),P=new Set(["dir","lang","hidden","inert","translate"]),r=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),M=/^(data-.*)$/;function O(n,a={}){let{labelable:i,isLink:l,global:e,events:s=e,propNames:b}=a,t={};for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(p.has(o)||i&&c.has(o)||l&&u.has(o)||e&&P.has(o)||s&&(r.has(o)||o.endsWith("Capture")&&r.has(o.slice(0,-7)))||b?.has(o)||M.test(o))&&(t[o]=n[o]);return t}export{O as a};
|
package/dist/chunk-KPEONVLU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var y=new Map,d=false;try{d=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero";}catch{}var g=false;try{g=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit";}catch{}var P={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},u=class{numberFormatter;options;constructor(t,e={}){this.numberFormatter=V(t,e),this.options=e;}format(t){let e="";if(!d&&this.options.signDisplay!=null?e=z(this.numberFormatter,this.options.signDisplay,t):e=this.numberFormatter.format(t),this.options.style==="unit"&&!g){let{unit:i,unitDisplay:n="short",locale:s}=this.resolvedOptions();if(!i)return e;let a=P[i]?.[n];e+=a[s]||a.default;}return e}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,e){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,e);if(e<t)throw new RangeError("End date must be >= start date");return `${this.format(t)} \u2013 ${this.format(e)}`}formatRangeToParts(t,e){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,e);if(e<t)throw new RangeError("End date must be >= start date");let i=this.numberFormatter.formatToParts(t),n=this.numberFormatter.formatToParts(e);return [...i.map(s=>({...s,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...n.map(s=>({...s,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return !d&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!g&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}};function V(r,t={}){let{numberingSystem:e}=t;if(e&&r.includes("-nu-")&&(r.includes("-u-")||(r+="-u-"),r+=`-nu-${e}`),t.style==="unit"&&!g){let{unit:s,unitDisplay:a="short"}=t;if(!s)throw new Error('unit option must be provided with style: "unit"');if(!P[s]?.[a])throw new Error(`Unsupported unit ${s} with unitDisplay = ${a}`);t={...t,style:"decimal"};}let i=r+(t?Object.entries(t).sort((s,a)=>s[0]<a[0]?-1:1).join():"");if(y.has(i))return y.get(i);let n=new Intl.NumberFormat(r,t);return y.set(i,n),n}function z(r,t,e){if(t==="auto")return r.format(e);if(t==="never")return r.format(Math.abs(e));{let i=false;if(t==="always"?i=e>0||Object.is(e,0):t==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):i=e>0),i){let n=r.format(-e),s=r.format(e),a=n.replace(s,"").replace(/\u200e|\u061C/,"");return [...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),n.replace(s,"!!!").replace(a,"+").replace("!!!",s)}else return r.format(e)}}var W=new RegExp("^.*\\(.*\\).*$"),_=["latn","arab","hanidec","deva","beng","fullwide"],f=class{locale;options;constructor(t,e={}){this.locale=t,this.options=e;}parse(t){return F(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,e,i){return F(this.locale,this.options,t).isValidPartialNumber(t,e,i)}getNumberingSystem(t){return F(this.locale,this.options,t).options.numberingSystem}},w=new Map;function F(r,t,e){let i=D(r,t);if(!r.includes("-nu-")&&!i.isValidPartialNumber(e)){for(let n of _)if(n!==i.options.numberingSystem){let s=D(r+(r.includes("-u-")?"-nu-":"-u-nu-")+n,t);if(s.isValidPartialNumber(e))return s}}return i}function D(r,t){let e=r+(t?Object.entries(t).sort((n,s)=>n[0]<s[0]?-1:1).join():""),i=w.get(e);return i||(i=new N(r,t),w.set(e,i)),i}var N=class{formatter;options;symbols;locale;constructor(t,e={}){this.locale=t,e.roundingIncrement!==1&&e.roundingIncrement!=null&&(e.maximumFractionDigits==null&&e.minimumFractionDigits==null?(e.maximumFractionDigits=0,e.minimumFractionDigits=0):e.maximumFractionDigits==null?e.maximumFractionDigits=e.minimumFractionDigits:e.minimumFractionDigits==null&&(e.minimumFractionDigits=e.maximumFractionDigits)),this.formatter=new Intl.NumberFormat(t,e),this.options=this.formatter.resolvedOptions(),this.symbols=L(t,this.formatter,this.options,e),this.options.style==="percent"&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.");}parse(t){let e=this.formatter.resolvedOptions().useGrouping,i=this.sanitize(t);if(!e&&this.symbols.group&&i.includes(this.symbols.group))return NaN;if(this.symbols.group&&(i=i.replaceAll(this.symbols.group,"")),this.symbols.decimal&&(i=i.replace(this.symbols.decimal,".")),this.symbols.minusSign&&(i=i.replace(this.symbols.minusSign,"-")),i=i.replace(this.symbols.numeral,this.symbols.index),this.options.style==="percent"){let s=i.indexOf("-");i=i.replace("-",""),i=i.replace("+","");let a=i.indexOf(".");a===-1&&(a=i.length),i=i.replace(".",""),a-2===0?i=`0.${i}`:a-2===-1?i=`0.0${i}`:a-2===-2?i="0.00":i=`${i.slice(0,a-2)}.${i.slice(a-2)}`,s>-1&&(i=`-${i}`);}let n=i?+i:NaN;if(isNaN(n))return NaN;if(this.options.style==="percent"){let s={...this.options,style:"decimal",minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new f(this.locale,s).parse(new u(this.locale,s).format(n))}return this.options.currencySign==="accounting"&&W.test(t)&&(n=-1*n),n}sanitize(t){let e=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(i=>i.unit===t)?this.symbols.noNumeralUnits.find(i=>i.unit===t).value.toString():(t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=l(t,",",this.symbols.decimal),t=l(t,"\u060C",this.symbols.decimal)),this.symbols.group&&e&&(t=l(t,".",this.symbols.group))),this.symbols.group==="\u2019"&&t.includes("'")&&e&&(t=l(t,"'",this.symbols.group)),this.symbols.group==="'"&&t.includes("\u2019")&&e&&(t=l(t,"\u2019",this.symbols.group)),this.options.locale==="fr-FR"&&this.symbols.group&&e&&(t=l(t," ",this.symbols.group),t=l(t,/\u00A0/g,this.symbols.group)),t)}isValidPartialNumber(t,e=-1/0,i=1/0){let n=this.formatter.resolvedOptions().useGrouping;return t=this.sanitize(t),this.symbols.minusSign&&t.startsWith(this.symbols.minusSign)&&e<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&i>0&&(t=t.slice(this.symbols.plusSign.length)),this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?false:(this.symbols.group&&n&&(t=l(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}},I=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),R=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function L(r,t,e,i){let n=new Intl.NumberFormat(r,{...e,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:"auto",roundingMode:"halfExpand",useGrouping:true}),s=n.formatToParts(-10000.111),a=n.formatToParts(10000.111),b=R.map(o=>n.formatToParts(o)),E=b.map((o,m)=>{let x=o.find(p=>p.type==="unit");return x&&!o.some(p=>p.type==="integer"||p.type==="fraction")?{unit:x.value,value:R[m]}:null}).filter(o=>!!o),$=s.find(o=>o.type==="minusSign")?.value??"-",c=a.find(o=>o.type==="plusSign")?.value;!c&&(i?.signDisplay==="exceptZero"||i?.signDisplay==="always")&&(c="+");let T=new Intl.NumberFormat(r,{...e,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(o=>o.type==="decimal")?.value,j=s.find(o=>o.type==="group")?.value,C=s.filter(o=>!I.has(o.type)).map(o=>O(o.value)),G=b.flatMap(o=>o.filter(m=>!I.has(m.type)).map(m=>O(m.value))),S=[...new Set([...C,...G])].sort((o,m)=>m.length-o.length),M=S.length===0?new RegExp("\\p{White_Space}|\\p{Cf}","gu"):new RegExp(`${S.join("|")}|\\p{White_Space}|\\p{Cf}`,"gu"),h=[...new Intl.NumberFormat(e.locale,{useGrouping:false}).format(9876543210)].reverse(),U=new Map(h.map((o,m)=>[o,m])),A=new RegExp(`[${h.join("")}]`,"g");return {minusSign:$,plusSign:c,decimal:T,group:j,literals:M,numeral:A,numerals:h,index:o=>String(U.get(o)),noNumeralUnits:E}}function l(r,t,e){return r.replaceAll?r.replaceAll(t,e):r.split(t).join(e)}function O(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}export{u as a,f as b};
|
package/dist/chunk-KUEDQO7P.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-XTH6B5FE.mjs';import {i,c as c$1}from'./chunk-Y4DRSGEJ.mjs';import {c,b,k as k$1,j}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {e,f,a as a$1,g,b as b$1}from'./chunk-AUOQSTS5.mjs';import $,{useRef,useContext,useMemo,useEffect}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 K=$.createContext(null),O="react-aria-focus-scope-restore",m=null;function he(e){let{children:t,contain:n,restoreFocus:r,autoFocus:s,ownerDocument:o}=e,f$1=useRef(null),l=useRef(null),i=useRef([]),{parentNode:a$2}=useContext(K)||{},c=useMemo(()=>new C({scopeRef:i}),[i]);a(()=>{let d=a$2||E.root;if(E.getTreeNode(d.scopeRef)&&m&&!k(m,d.scopeRef)){let p=E.getTreeNode(m);p&&(d=p);}d.addChild(c),E.addNode(c);},[c,a$2]),a(()=>{let d=E.getTreeNode(i);d&&(d.contain=!!n);},[n]),a(()=>{let d=f$1.current?.nextSibling,p=[],L=A=>A.stopPropagation();for(;d&&d!==l.current;)p.push(d),d.addEventListener(O,L),d=d.nextSibling;return i.current=p,()=>{for(let A of p)A.removeEventListener(O,L);}},[t]),ue(i,r,n),oe(i,n),ae(i,r,n,o),le(i,s),useEffect(()=>{let d=f(a$1(i.current?i.current[0]:void 0)),p=null;if(h(d,i.current)){for(let L of E.traverse())L.scopeRef&&h(d,L.scopeRef.current)&&(p=L);p===E.getTreeNode(i)&&(m=p.scopeRef);}},[i]),a(()=>()=>{let d=E.getTreeNode(i)?.parent?.scopeRef??null;(i===m||k(i,m))&&(!d||E.getTreeNode(d))&&(m=d),E.removeTreeNode(i);},[i]);let u=useMemo(()=>te(i),[]),b=useMemo(()=>({focusManager:u,parentNode:c}),[c,u]);return jsxs(K.Provider,{value:b,children:[jsx("span",{"data-focus-scope-start":true,hidden:true,ref:f$1}),t,jsx("span",{"data-focus-scope-end":true,hidden:true,ref:l})]})}function ge(){return useContext(K)?.focusManager}function te(e){return {focusNext(t={}){let n=e.current,{from:r,tabbable:s,wrap:o,accept:f$1}=t,l=r||f(a$1(n[0]??void 0)),i=n[0].previousElementSibling,a=R(n),c=v(a,{tabbable:s,accept:f$1},n);c.currentNode=h(l,n)?l:i;let u=c.nextNode();return !u&&o&&(c.currentNode=i,u=c.nextNode()),u&&T(u,true),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:s,wrap:o,accept:f$1}=t,l=r||f(a$1(n[0]??void 0)),i=n[n.length-1].nextElementSibling,a=R(n),c=v(a,{tabbable:s,accept:f$1},n);c.currentNode=h(l,n)?l:i;let u=c.previousNode();return !u&&o&&(c.currentNode=i,u=c.previousNode()),u&&T(u,true),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:s}=t,o=R(n),f=v(o,{tabbable:r,accept:s},n);f.currentNode=n[0].previousElementSibling;let l=f.nextNode();return l&&T(l,true),l},focusLast(t={}){let n=e.current,{tabbable:r,accept:s}=t,o=R(n),f=v(o,{tabbable:r,accept:s},n);f.currentNode=n[n.length-1].nextElementSibling;let l=f.previousNode();return l&&T(l,true),l}}}function R(e){return e[0].parentElement}function x(e){let t=E.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.contain)return false;t=t.parent;}return true}function ne(e){if(!e.form)return Array.from(a$1(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(r=>!r.form);let t=e.form.elements.namedItem(e.name),n=b$1(e);return t instanceof n.RadioNodeList?Array.from(t).filter(r=>r instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}function re(e){if(e.checked)return true;let t=ne(e);return t.length>0&&!t.some(n=>n.checked)}function oe(e,t){let n=useRef(void 0),r=useRef(void 0);a(()=>{let s=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}let o=a$1(s?s[0]:void 0),f$1=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!x(e)||a.isComposing)return;let c=f(o),u=e.current;if(!u||!h(c,u))return;let b=R(u),d=v(b,{tabbable:true},u);if(!c)return;d.currentNode=c;let p=a.shiftKey?d.previousNode():d.nextNode();p||(d.currentNode=a.shiftKey?u[u.length-1].nextElementSibling:u[0].previousElementSibling,p=a.shiftKey?d.previousNode():d.nextNode()),a.preventDefault(),p&&(T(p,true),p instanceof b$1(p).HTMLInputElement&&p.select());},l=a=>{(!m||k(m,e))&&h(g(a),e.current)?(m=e,n.current=g(a)):x(e)&&!w(g(a),e)?n.current?n.current.focus():m&&m.current&&P(m.current):x(e)&&(n.current=g(a));},i=a=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let c=c$1(),u=(c==="virtual"||c===null)&&k$1()&&j(),b=f(o);if(!u&&b&&x(e)&&!w(b,e)){m=e;let d=g(a);d&&d.isConnected?(n.current=d,n.current?.focus()):m.current&&P(m.current);}});};return o.addEventListener("keydown",f$1,false),o.addEventListener("focusin",l,false),s?.forEach(a=>a.addEventListener("focusin",l,false)),s?.forEach(a=>a.addEventListener("focusout",i,false)),()=>{o.removeEventListener("keydown",f$1,false),o.removeEventListener("focusin",l,false),s?.forEach(a=>a.removeEventListener("focusin",l,false)),s?.forEach(a=>a.removeEventListener("focusout",i,false));}},[e,t]),a(()=>()=>{r.current&&cancelAnimationFrame(r.current);},[r]);}function Z(e){return w(e)}function h(e$1,t){return !e$1||!t?false:t.some(n=>e(n,e$1))}function w(e,t=null){if(e instanceof b$1(e).Element&&e.closest("[data-react-aria-top-layer]"))return true;for(let{scopeRef:n}of E.traverse(E.getTreeNode(t)))if(n&&h(e,n.current))return true;return false}function we(e){return w(e,m)}function k(e,t){let n=E.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return true;n=n.parent;}return false}function T(e,t=false){if(e!=null&&!t)try{i(e);}catch{}else if(e!=null)try{e.focus();}catch{}}function ee(e,t=true){let n=e[0].previousElementSibling,r=R(e),s=v(r,{tabbable:t},e);s.currentNode=n;let o=s.nextNode();return t&&!o&&(r=R(e),s=v(r,{tabbable:false},e),s.currentNode=n,o=s.nextNode()),o}function P(e,t=true){T(ee(e,t));}function le(e,t){let n=$.useRef(t);useEffect(()=>{if(n.current){m=e;let r=a$1(e.current?e.current[0]:void 0);!h(f(r),m.current)&&e.current&&P(e.current);}n.current=false;},[e]);}function ue(e,t,n){a(()=>{if(t||n)return;let r=e.current,s=a$1(r?r[0]:void 0),o=f=>{let l=g(f);h(l,e.current)?m=e:Z(l)||(m=null);};return s.addEventListener("focusin",o,false),r?.forEach(f=>f.addEventListener("focusin",o,false)),()=>{s.removeEventListener("focusin",o,false),r?.forEach(f=>f.removeEventListener("focusin",o,false));}},[e,t,n]);}function X(e){let t=E.getTreeNode(m);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return false;t=t.parent;}return t?.scopeRef===e}function ae(e,t,n,r){let s=useRef(typeof document<"u"?f(r??a$1(e.current?e.current[0]:void 0)):null);a(()=>{let o=e.current,f$1=a$1(o?o[0]:void 0);if(!t||n)return;let l=()=>{(!m||k(m,e))&&h(f(f$1),e.current)&&(m=e);};return f$1.addEventListener("focusin",l,false),o?.forEach(i=>i.addEventListener("focusin",l,false)),()=>{f$1.removeEventListener("focusin",l,false),o?.forEach(i=>i.removeEventListener("focusin",l,false));}},[e,n]),a(()=>{let o=a$1(e.current?e.current[0]:void 0);if(!t)return;let f$1=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!x(e)||l.isComposing)return;let i=f(o);if(!i||!w(i,e)||!X(e))return;let a=E.getTreeNode(e);if(!a)return;let c=a.nodeToRestore,u=v(o.body,{tabbable:true});u.currentNode=i;let b=l.shiftKey?u.previousNode():u.nextNode();if((!c||!c.isConnected||c===o.body)&&(c=void 0,a.nodeToRestore=void 0),(!b||!w(b,e))&&c){u.currentNode=c;do b=l.shiftKey?u.previousNode():u.nextNode();while(w(b,e));l.preventDefault(),l.stopPropagation(),b?T(b,true):Z(c)?T(c,true):i.blur();}};return n||o.addEventListener("keydown",f$1,true),()=>{n||o.removeEventListener("keydown",f$1,true);}},[e,t,n]),a(()=>{let o=a$1(e.current?e.current[0]:void 0);if(!t)return;let f$1=E.getTreeNode(e);if(f$1)return f$1.nodeToRestore=s.current??void 0,()=>{let l=E.getTreeNode(e);if(!l)return;let i=l.nodeToRestore,a=f(o);if(t&&i&&(a&&w(a,e)||a===o.body&&X(e))){let c=E.clone();requestAnimationFrame(()=>{if(o.activeElement===o.body){let u=c.getTreeNode(e);for(;u;){if(u.nodeToRestore&&u.nodeToRestore.isConnected){B(u.nodeToRestore);return}u=u.parent;}for(u=c.getTreeNode(e);u;){if(u.scopeRef&&u.scopeRef.current&&E.getTreeNode(u.scopeRef)){let b=ee(u.scopeRef.current,true);B(b);return}u=u.parent;}}});}}},[e,t]);}function B(e){e.dispatchEvent(new CustomEvent(O,{bubbles:true,cancelable:true}))&&T(e);}function v(e$1,t,n){let r=t?.tabbable?c:b,s=e$1?.nodeType===Node.ELEMENT_NODE?e$1:null,o=a$1(s),f=a$2(o,e$1||o,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return e(t?.from,l)||t?.tabbable&&l.tagName==="INPUT"&&l.getAttribute("type")==="radio"&&(!re(l)||f.currentNode.tagName==="INPUT"&&f.currentNode.type==="radio"&&f.currentNode.name===l.name)?NodeFilter.FILTER_REJECT:r(l)&&(!n||h(l,n))&&(!t?.accept||t.accept(l))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(f.currentNode=t.from),f}function Se(e$1,t={}){return {focusNext(n={}){let r=e$1.current;if(!r)return null;let{from:s,tabbable:o=t.tabbable,wrap:f$1=t.wrap,accept:l=t.accept}=n,i=s||f(a$1(r)),a=v(r,{tabbable:o,accept:l});e(r,i)&&(a.currentNode=i);let c=a.nextNode();return !c&&f$1&&(a.currentNode=r,c=a.nextNode()),c&&T(c,true),c},focusPrevious(n=t){let r=e$1.current;if(!r)return null;let{from:s,tabbable:o=t.tabbable,wrap:f$1=t.wrap,accept:l=t.accept}=n,i=s||f(a$1(r)),a=v(r,{tabbable:o,accept:l});if(e(r,i))a.currentNode=i;else {let u=H(a);return u&&T(u,true),u??null}let c=a.previousNode();if(!c&&f$1){a.currentNode=r;let u=H(a);if(!u)return null;c=u;}return c&&T(c,true),c??null},focusFirst(n=t){let r=e$1.current;if(!r)return null;let{tabbable:s=t.tabbable,accept:o=t.accept}=n,l=v(r,{tabbable:s,accept:o}).nextNode();return l&&T(l,true),l},focusLast(n=t){let r=e$1.current;if(!r)return null;let{tabbable:s=t.tabbable,accept:o=t.accept}=n,f=v(r,{tabbable:s,accept:o}),l=H(f);return l&&T(l,true),l??null}}}function H(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}var W=class e{root;fastMap=new Map;constructor(){this.root=new C({scopeRef:null}),this.fastMap.set(null,this.root);}get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let s=this.fastMap.get(n??null);if(!s)return;let o=new C({scopeRef:t});s.addChild(o),o.parent=s,this.fastMap.set(t,o),r&&(o.nodeToRestore=r);}addNode(t){this.fastMap.set(t.scopeRef,t);}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&h(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let s=n.children;r&&(r.removeChild(n),s.size>0&&s.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef);}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n);}clone(){let t=new e;for(let n of this.traverse())t.addTreeNode(n.scopeRef,n.parent?.scopeRef??null,n.nodeToRestore);return t}},C=class{scopeRef;nodeToRestore;parent;children=new Set;contain=false;constructor(t){this.scopeRef=t.scopeRef;}addChild(t){this.children.add(t),t.parent=this;}removeChild(t){this.children.delete(t),t.parent=void 0;}},E=new W;export{he as a,ge as b,we as c,v as d,Se as e};
|
package/dist/chunk-KWHTLY23.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-2V323KAD.mjs';import {a as a$4}from'./chunk-6JWACCHG.mjs';import {b as b$1}from'./chunk-WWSGOGLA.mjs';import {e}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$7}from'./chunk-KEVERVHK.mjs';import {a as a$6}from'./chunk-JDLUGVXG.mjs';import {e as e$1,g}from'./chunk-AUOQSTS5.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import j,{useMemo,useState,useEffect}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 _={none:"toolbar",single:"radiogroup",multiple:"toolbar"};function P(e$2,o,r){let{isDisabled:i,orientation:n="horizontal"}=e$2,[c,p]=useState(false);a$6(()=>{p(!!(r.current&&r.current.parentElement?.closest('[role="toolbar"]')));},[r]),[...o.collection.getKeys()].some(t=>!o.disabledKeys.has(t))||(i=true);let{direction:a}=b$2(),s=e(r),l=a==="rtl"&&n==="horizontal",A=t=>{if(e$1(t.currentTarget,g(t)))switch(t.key){case "ArrowRight":case "ArrowDown":t.preventDefault(),t.stopPropagation(),t.key==="ArrowRight"&&l?s.focusPrevious({wrap:true}):s.focusNext({wrap:true});break;case "ArrowLeft":case "ArrowUp":t.preventDefault(),t.stopPropagation(),t.key==="ArrowLeft"&&l?s.focusNext({wrap:true}):s.focusPrevious({wrap:true});break}},u=_[o.selectionManager.selectionMode];return c&&u==="toolbar"&&(u="group"),{actionGroupProps:{...a$7(e$2,{labelable:true}),role:u,"aria-orientation":u==="toolbar"?n:void 0,"aria-disabled":i,onKeyDown:A}}}var z={none:void 0,single:"radio",multiple:"checkbox"};function x(e,o,r){let i=o.selectionManager.selectionMode,n={role:z[i]};if(i!=="none"){let m=o.selectionManager.isSelected(e.key);n["aria-checked"]=m;}let c=e.key===o.selectionManager.focusedKey,p=t(()=>{c&&o.selectionManager.setFocusedKey(null);});return useEffect(()=>()=>{p();},[]),{buttonProps:c$1(n,{tabIndex:c||o.selectionManager.focusedKey==null?0:-1,onFocus(){o.selectionManager.setFocusedKey(e.key);},onPress(){o.selectionManager.select(e.key);}})}}var F="_1yep5z6f9",N="_1dc3b8m0";var B=j.forwardRef(({className:e,selectionMode:o,style:r,"data-block-id":i,"data-block-class":n,tooltipProps:c$1,icon:p,renderActionItem:m,...a$4},s)=>{let l=a(s),A=c(),u=b({...a$4,selectionMode:o,suppressTextValueWarning:true,children:A}),{actionGroupProps:t}=P({...a$4,selectionMode:o,children:A},u,l),I=[...u.collection].map(g=>(a$1(g.value),jsx(V,{item:g,state:u,isDisabled:a$4.isDisabled,onAction:a$4.onAction,tooltipProps:c$1,renderActionItem:m},g.key)));return p?jsxs(a$2,{...t,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:[jsx(p,{"aria-hidden":"true",size:24,className:F}),jsx(a$2,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:I})]}):jsx(a$2,{...t,display:"flex",flexDirection:"row",gap:"xs",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:r,ref:l,children:I})});B.displayName="ActionGroup";var V=({item:e,state:o,tooltipProps:r,renderActionItem:i,onAction:n,isDisabled:c})=>{let{buttonProps:p}=x({key:e.key},o),m=c||o.selectionManager.isDisabled(e.key),a=o.selectionManager.isSelected(e.key);a$1(e.value);let{icon:s}=e.value;a$1(s);let l=useMemo(()=>(a$1(e.value),typeof r=="function"?r(e.value):r),[r,e.value]);return jsx(b$1,{...c$1(p,{onPress:()=>{n?.(e.key);}}),children:jsx(a$4,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...l,children:i?.(e,{isSelected:a,isDisabled:m})||jsx(a$5,{variant:"tertiary",icon:s,"aria-label":e.textValue,size:"sm",isDisabled:m,className:a$3({[N]:a},"BaselineUI-ActionGroup-Item")})})})};export{B as a,V as b};
|