@baseline-ui/core 3.3.0 → 3.5.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/Avatar.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.css +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-22VRCVTH.mjs +10 -0
- package/dist/chunk-235S3EB7.mjs +10 -0
- package/dist/{chunk-PNBYTIUO.mjs → chunk-2AKHB7Y5.mjs} +1 -1
- package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
- package/dist/chunk-2M2LI4MI.mjs +10 -0
- package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
- package/dist/chunk-2WA3KB7H.mjs +10 -0
- package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
- package/dist/{chunk-E5GYCA3P.mjs → chunk-3DWFAHR2.mjs} +1 -1
- package/dist/chunk-3KWSJRYK.mjs +10 -0
- package/dist/chunk-3M3WJHOI.mjs +10 -0
- package/dist/{chunk-FWAK2OZM.mjs → chunk-3UC5V5E3.mjs} +1 -1
- package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
- package/dist/chunk-43LOJ3SH.mjs +10 -0
- package/dist/chunk-46RUOB4U.mjs +29 -0
- package/dist/{chunk-TCCQDGMI.mjs → chunk-4EAXDHSV.mjs} +1 -1
- package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
- package/dist/chunk-4P247R4V.mjs +10 -0
- package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
- package/dist/chunk-4S4GGUSH.mjs +10 -0
- package/dist/chunk-4WVW4KEK.mjs +10 -0
- package/dist/chunk-5G6JNQQR.mjs +10 -0
- package/dist/{chunk-RSTHM3ZF.mjs → chunk-5G7ABQYJ.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-5W67PVZQ.mjs +10 -0
- package/dist/chunk-5ZC64ZG7.mjs +10 -0
- package/dist/chunk-676DOXEK.mjs +10 -0
- package/dist/{chunk-VZFS4QRW.mjs → chunk-6GMU63H2.mjs} +1 -1
- package/dist/chunk-6M7PJXEE.mjs +10 -0
- package/dist/chunk-6Q5PNIYZ.mjs +10 -0
- package/dist/chunk-6QQEK5I6.mjs +10 -0
- package/dist/{chunk-XEGXSFIP.mjs → chunk-7BE6MOPW.mjs} +2 -2
- package/dist/chunk-7EQIV4GX.mjs +10 -0
- package/dist/{chunk-GX2IOGYR.mjs → chunk-7MLFM55C.mjs} +1 -1
- 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-7XGNJE7J.mjs +10 -0
- package/dist/chunk-7XLBV46W.mjs +10 -0
- package/dist/chunk-ABXTAFKP.mjs +11 -0
- package/dist/{chunk-AYBACQ6U.mjs → chunk-AFOW62QN.mjs} +2 -2
- package/dist/chunk-AI6WQPRX.mjs +10 -0
- package/dist/chunk-AMVX34SS.mjs +10 -0
- package/dist/chunk-AN26QORL.mjs +10 -0
- package/dist/chunk-AYQN3OH2.mjs +10 -0
- package/dist/chunk-B3EZOXNU.mjs +10 -0
- package/dist/{chunk-F3HQNHR5.mjs → chunk-BA5OA5DY.mjs} +1 -1
- package/dist/chunk-BAIVRB2I.mjs +10 -0
- package/dist/chunk-BET5GVGQ.mjs +10 -0
- package/dist/chunk-BGQRLALS.mjs +10 -0
- package/dist/chunk-BGRGRUG4.mjs +10 -0
- package/dist/chunk-BPW4QRPV.mjs +10 -0
- package/dist/chunk-BSSLS6MF.mjs +10 -0
- package/dist/chunk-BTPAZDGG.mjs +10 -0
- package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
- package/dist/chunk-CENNHSIS.mjs +15 -0
- package/dist/chunk-CIPPPD6E.mjs +10 -0
- package/dist/{chunk-2TH2QRSV.mjs → chunk-CTBCJZEG.mjs} +1 -1
- 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-D5VU5TED.mjs +11 -0
- package/dist/chunk-DAI7V4TE.mjs +10 -0
- package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
- package/dist/chunk-DO5YROCG.mjs +10 -0
- package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
- package/dist/{chunk-QSSCSN5S.mjs → chunk-EGLD5KVP.mjs} +2 -2
- package/dist/{chunk-HVKYWSRF.mjs → chunk-EL5OYHOX.mjs} +2 -2
- package/dist/chunk-ETM4MNG4.mjs +10 -0
- package/dist/chunk-F7WPMQ3P.mjs +16 -0
- package/dist/{chunk-EU75HMPG.mjs → chunk-FCKJCFMD.mjs} +2 -2
- package/dist/chunk-FGSVPRDN.mjs +10 -0
- package/dist/chunk-FNCHBVLF.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-GFBRKKX4.mjs +10 -0
- 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-GLAMJIYO.mjs +10 -0
- package/dist/chunk-GMALMQWI.mjs +10 -0
- package/dist/chunk-GQIS4QBN.mjs +10 -0
- package/dist/chunk-GUPSQSPC.mjs +0 -0
- package/dist/chunk-HABKIEKC.mjs +10 -0
- package/dist/chunk-HH4VLTF3.mjs +10 -0
- package/dist/{chunk-HI44JQA7.mjs → chunk-HPUUQKKH.mjs} +2 -2
- package/dist/chunk-HZM2XZP4.mjs +10 -0
- package/dist/chunk-I7LPPUZS.mjs +10 -0
- package/dist/{chunk-IXK6S6IH.mjs → chunk-I7SMG6PT.mjs} +1 -1
- package/dist/chunk-IHES52NR.mjs +10 -0
- package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
- package/dist/{chunk-NQO6OQT6.mjs → chunk-IM3E5JL4.mjs} +1 -1
- package/dist/chunk-IROFSPEN.mjs +10 -0
- package/dist/chunk-JRCDMRIW.mjs +10 -0
- package/dist/{chunk-XUJJMAKM.mjs → chunk-JZXLV6JU.mjs} +1 -1
- package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
- package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
- package/dist/chunk-KHDWTXGG.mjs +10 -0
- 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-KW3BKIG4.mjs +10 -0
- package/dist/chunk-KX7WG3L4.mjs +10 -0
- package/dist/chunk-LBHZV4BO.mjs +10 -0
- package/dist/chunk-LJZ7ZS4C.mjs +10 -0
- package/dist/chunk-LKSUUT3M.mjs +10 -0
- package/dist/chunk-LQ7PGSP4.mjs +10 -0
- package/dist/chunk-LQHFBXCW.mjs +10 -0
- package/dist/{chunk-V37GPPZD.mjs → chunk-LSPDPDB6.mjs} +1 -1
- package/dist/{chunk-L6S5GBKS.mjs → chunk-MBRNO6IW.mjs} +1 -1
- package/dist/chunk-MCN5JU6E.mjs +10 -0
- package/dist/chunk-MHAPHPNN.mjs +10 -0
- package/dist/chunk-MZIQ27JP.mjs +10 -0
- package/dist/chunk-NKC4MIX3.mjs +10 -0
- package/dist/{chunk-GI2O6H4I.mjs → chunk-NMGKHMH3.mjs} +1 -1
- package/dist/chunk-NMK4W6K3.mjs +10 -0
- package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
- package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
- package/dist/chunk-NZNOHFLD.mjs +10 -0
- package/dist/{chunk-4PYEGHW5.mjs → chunk-O23QVPUT.mjs} +2 -2
- package/dist/{chunk-UN7XC7QV.mjs → chunk-O6FPWOHR.mjs} +1 -1
- package/dist/{chunk-3UH5CQQF.mjs → chunk-O7IU5NHN.mjs} +2 -2
- package/dist/chunk-OMWMNUTI.mjs +10 -0
- package/dist/{chunk-Z4HTFTPM.mjs → chunk-ONBEVR2G.mjs} +2 -2
- package/dist/chunk-OQPYPKZV.mjs +10 -0
- package/dist/chunk-OVJT5F2R.mjs +10 -0
- package/dist/chunk-OWQRYRWF.mjs +10 -0
- package/dist/{chunk-XJ2DFV56.mjs → chunk-PLZ6ZFEO.mjs} +1 -1
- package/dist/chunk-PMDRFB75.mjs +10 -0
- package/dist/chunk-PPHSLODC.mjs +10 -0
- package/dist/chunk-PYV5J322.mjs +11 -0
- package/dist/chunk-QAAOC64D.mjs +10 -0
- package/dist/chunk-QMV2O57M.mjs +10 -0
- package/dist/{chunk-ZLZAFTSD.mjs → chunk-QWZBZ23U.mjs} +1 -1
- package/dist/{chunk-NADBGP35.mjs → chunk-QXXKOFWM.mjs} +2 -2
- package/dist/{chunk-DMJHCNBU.mjs → chunk-R6Q7UMQS.mjs} +1 -1
- package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
- package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
- package/dist/chunk-S2XIFW52.mjs +10 -0
- package/dist/chunk-S4HLMIFK.mjs +10 -0
- package/dist/chunk-SBGZCLF4.mjs +10 -0
- package/dist/chunk-SD43KVTU.mjs +10 -0
- package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
- package/dist/chunk-SI5WP6I7.mjs +10 -0
- 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-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
- package/dist/chunk-SZCVQU55.mjs +10 -0
- package/dist/{chunk-QXOG2ISL.mjs → chunk-T6J7G3YL.mjs} +2 -2
- package/dist/chunk-TAT552A5.mjs +10 -0
- package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
- package/dist/chunk-TIGGKOJQ.mjs +10 -0
- package/dist/chunk-TTVYMCU3.mjs +10 -0
- package/dist/chunk-TUY23KMK.mjs +10 -0
- package/dist/chunk-TYKMNZJ4.mjs +11 -0
- package/dist/chunk-TZGK36KC.mjs +10 -0
- package/dist/chunk-UBLCUHRL.mjs +10 -0
- package/dist/chunk-UFN2OAM2.mjs +10 -0
- package/dist/{chunk-5K46OAX5.mjs → chunk-UH6QIGD3.mjs} +1 -1
- package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
- package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
- package/dist/chunk-UOWKAUCQ.mjs +10 -0
- package/dist/chunk-UPJHL37C.mjs +10 -0
- package/dist/chunk-USUPPN73.mjs +10 -0
- package/dist/chunk-UYAFH4CW.mjs +10 -0
- package/dist/{chunk-6EFNC443.mjs → chunk-UYUYQFOW.mjs} +1 -1
- package/dist/chunk-UZ672WDX.mjs +10 -0
- package/dist/chunk-VFO35ZLL.mjs +10 -0
- package/dist/chunk-VXZT2JR2.mjs +10 -0
- package/dist/chunk-WFYFHANE.mjs +10 -0
- package/dist/chunk-X5ORCNAU.mjs +10 -0
- package/dist/chunk-X5ZTXDQ4.mjs +10 -0
- package/dist/chunk-X7CKWYUD.mjs +10 -0
- package/dist/{chunk-NUYBQ7KP.mjs → chunk-XAM3AXXK.mjs} +1 -1
- package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
- package/dist/chunk-XMGPNXZH.mjs +10 -0
- package/dist/chunk-XOS3JIQX.mjs +10 -0
- package/dist/chunk-XQC3DSTW.mjs +10 -0
- package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
- package/dist/chunk-Y3HXPORF.mjs +10 -0
- package/dist/chunk-YDUKC7QS.mjs +10 -0
- package/dist/chunk-YF63IQQR.mjs +10 -0
- package/dist/chunk-YFBMCK5O.mjs +10 -0
- package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
- package/dist/chunk-YMYMFVW4.mjs +10 -0
- package/dist/chunk-YQHHE5AT.mjs +10 -0
- package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
- package/dist/chunk-YYU46XNM.mjs +10 -0
- package/dist/{chunk-2EMOQIU7.mjs → chunk-Z3ZMWJSV.mjs} +2 -2
- package/dist/chunk-Z4QTH4TB.mjs +10 -0
- package/dist/chunk-ZA2FH3MS.mjs +10 -0
- package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
- package/dist/hooks/useContainerScopedRef.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 +440 -188
- package/dist/index.js +21 -20
- package/dist/index.mjs +1 -1
- package/dist/messageIds.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/dist/utils/strings.mjs +1 -1
- package/intl/ar.json +1 -0
- package/intl/cs.json +1 -0
- package/intl/cy.json +1 -0
- package/intl/da.json +1 -0
- package/intl/de.json +1 -0
- package/intl/el.json +1 -0
- package/intl/en-GB.json +1 -0
- package/intl/en.json +1 -0
- package/intl/es.json +1 -0
- package/intl/fi.json +1 -0
- package/intl/fr-CA.json +1 -0
- package/intl/fr.json +1 -0
- package/intl/he.json +1 -0
- package/intl/hr.json +1 -0
- package/intl/id.json +1 -0
- package/intl/it.json +1 -0
- package/intl/ja.json +1 -0
- package/intl/ko.json +1 -0
- package/intl/ms.json +1 -0
- package/intl/nb-NO.json +1 -0
- package/intl/nl.json +1 -0
- package/intl/pl.json +1 -0
- package/intl/pt-PT.json +1 -0
- package/intl/pt.json +1 -0
- package/intl/ru.json +1 -0
- package/intl/sk.json +1 -0
- package/intl/sl.json +1 -0
- package/intl/sv.json +1 -0
- package/intl/th.json +1 -0
- package/intl/tr.json +1 -0
- package/intl/uk.json +1 -0
- package/intl/zh-Hans.json +1 -0
- package/intl/zh-Hant.json +1 -0
- package/messages.json +5 -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-5IXSPQRW.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-6V7BIFQD.mjs +0 -10
- package/dist/chunk-6VXBFM6Q.mjs +0 -10
- package/dist/chunk-7L5UOGZA.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-B237CJT4.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-F7PGMOQF.mjs +0 -10
- package/dist/chunk-GKODQS6E.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-HT55YHTN.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-IXRSSEHQ.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-KHOXLBPR.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-LQMEFFFM.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-QR2AF3KT.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-RJZZIVSY.mjs +0 -10
- package/dist/chunk-SHJ2TJYG.mjs +0 -10
- package/dist/chunk-SMAYNDQQ.mjs +0 -10
- package/dist/chunk-SYFSGF73.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-XZSDCUID.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-YX2ASVM3.mjs +0 -10
- package/dist/chunk-ZGRRD3TU.mjs +0 -10
- /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
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-IXRSSEHQ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {AvatarIcon as AvatarIcon$1}from'@baseline-ui/icons/16';import {AvatarIcon}from'@baseline-ui/icons/24';import C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var c="_1017q4c5",d=a({defaultClassName:"_1017q4c0",variantClassNames:{size:{md:"_1017q4c1",sm:"_1017q4c2"},isDisabled:{true:"_1017q4c3"}},defaultVariants:{},compoundVariants:[]}),p="_1017q4c4";var N={sm:AvatarIcon$1,md:AvatarIcon},m=C.forwardRef(({className:u,style:v,size:a="md",icon:b=N[a],name:e,imgSrc:r,showInitials:i,isDisabled:o,hasNotifications:f,imgLoading:h,"data-block-id":x,"data-block-class":y},g)=>{let s=e?.split(" ").map(_=>_[0]).join("");return jsxs("span",{className:a$1(d({size:a,isDisabled:o}),"BaselineUI-Avatar",u),"data-disabled":o,ref:g,style:v,"aria-disabled":o,"data-block-id":x,"data-block-class":y,children:[r?jsx("img",{src:r,alt:e,loading:h,className:p}):null,!i&&!r&&jsx(b,{size:a==="sm"?16:24}),i&&!r?a==="sm"?s[0]:s:null,f?jsx("div",{"data-testid":"notification",className:c}):null]})});m.displayName="Avatar";export{m 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-KHOXLBPR.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$8}from'./chunk-RSTHM3ZF.mjs';import {a as a$4}from'./chunk-YX2ASVM3.mjs';import {a as a$3}from'./chunk-F3HQNHR5.mjs';import {b}from'./chunk-WL27JGVG.mjs';import {b as b$1}from'./chunk-YB3KW7JC.mjs';import {c}from'./chunk-Y4DRSGEJ.mjs';import {a as a$5}from'./chunk-3FYY26ED.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {a as a$7}from'./chunk-MRJFGHFW.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$9}from'./chunk-KEVERVHK.mjs';import {a as a$6,c as c$2,e}from'./chunk-JDLUGVXG.mjs';import {g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import z,{useRef,useCallback,useEffect,useMemo,useState}from'react';import {useSyncExternalStore}from'use-sync-external-store/shim/index.js';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 w(t){let e=useCallback(o=>t.subscribe(o),[t]),n=useCallback(()=>t.visibleToasts,[t]);return {visibleToasts:useSyncExternalStore(e,n,n),add:(o,i)=>t.add(o,i),close:o=>t.close(o),pauseAll:()=>t.pauseAll(),resumeAll:()=>t.resumeAll()}}var E=class{queue=[];subscriptions=new Set;maxVisibleToasts;wrapUpdate;visibleToasts=[];constructor(e){this.maxVisibleToasts=e?.maxVisibleToasts??1/0,this.wrapUpdate=e?.wrapUpdate;}runWithWrapUpdate(e,n){this.wrapUpdate?this.wrapUpdate(e,n):e();}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}add(e,n={}){let r="_"+Math.random().toString(36).slice(2),o={...n,content:e,key:r,timer:n.timeout?new R(()=>this.close(r),n.timeout):void 0};return this.queue.unshift(o),this.updateVisibleToasts("add"),r}close(e){let n=this.queue.findIndex(r=>r.key===e);n>=0&&(this.queue[n].onClose?.(),this.queue.splice(n,1)),this.updateVisibleToasts("remove");}updateVisibleToasts(e){this.visibleToasts=this.queue.slice(0,this.maxVisibleToasts),this.runWithWrapUpdate(()=>{for(let n of this.subscriptions)n();},e);}pauseAll(){for(let e of this.visibleToasts)e.timer&&e.timer.pause();}resumeAll(){for(let e of this.visibleToasts)e.timer&&e.timer.resume();}clear(){this.queue=[],this.updateVisibleToasts("clear");}},R=class{timerId;startTime=null;remaining;callback;constructor(e,n){this.remaining=n,this.callback=e;}reset(e){this.remaining=e,this.resume();}pause(){this.timerId!=null&&(clearTimeout(this.timerId),this.timerId=null,this.remaining-=Date.now()-this.startTime);}resume(){this.remaining<=0||(this.startTime=Date.now(),this.timerId=setTimeout(()=>{this.timerId=null,this.remaining=0,this.callback();},this.remaining));}};var x={"ar-AE":{close:"\u0625\u063A\u0644\u0627\u0642",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631`,other:()=>`${e.number(t.count)} \u0625\u0634\u0639\u0627\u0631\u0627\u062A`})}.`},"bg-BG":{close:"\u0417\u0430\u0442\u0432\u043E\u0440\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u0435`,other:()=>`${e.number(t.count)} \u0438\u0437\u0432\u0435\u0441\u0442\u0438\u044F`})}.`},"cs-CZ":{close:"Zav\u0159\xEDt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1men\xED`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"da-DK":{close:"Luk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} besked`,other:()=>`${e.number(t.count)} beskeder`})}.`},"de-DE":{close:"Schlie\xDFen",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} Benachrichtigung`,other:()=>`${e.number(t.count)} Benachrichtigungen`})}.`},"el-GR":{close:"\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7`,other:()=>`${e.number(t.count)} \u03B5\u03B9\u03B4\u03BF\u03C0\u03BF\u03B9\u03AE\u03C3\u03B5\u03B9\u03C2`})}.`},"en-US":{close:"Close",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"es-ES":{close:"Cerrar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificaci\xF3n`,other:()=>`${e.number(t.count)} notificaciones`})}.`},"et-EE":{close:"Sule",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} teatis`,other:()=>`${e.number(t.count)} teatist`})}.`},"fi-FI":{close:"Sulje",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ilmoitus`,other:()=>`${e.number(t.count)} ilmoitusta`})}.`},"fr-FR":{close:"Fermer",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notification`,other:()=>`${e.number(t.count)} notifications`})}.`},"he-IL":{close:"\u05E1\u05D2\u05D5\u05E8",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D4`,other:()=>`${e.number(t.count)} \u05D4\u05EA\u05E8\u05D0\u05D5\u05EA`})}.`},"hr-HR":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obavijest`,other:()=>`${e.number(t.count)} obavijesti`})}.`},"hu-HU":{close:"Bez\xE1r\xE1s",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`,other:()=>`${e.number(t.count)} \xE9rtes\xEDt\xE9s`})}.`},"it-IT":{close:"Chiudi",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica`,other:()=>`${e.number(t.count)} notifiche`})}.`},"ja-JP":{close:"\u9589\u3058\u308B",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u306E\u901A\u77E5`})}\u3002`},"ko-KR":{close:"\uB2EB\uAE30",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`,other:()=>`${e.number(t.count)}\uAC1C \uC54C\uB9BC`})}.`},"lt-LT":{close:"U\u017Edaryti",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} prane\u0161imas`,other:()=>`${e.number(t.count)} prane\u0161imai`})}.`},"lv-LV":{close:"Aizv\u0113rt",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} pazi\u0146ojums`,other:()=>`${e.number(t.count)} pazi\u0146ojumi`})}.`},"nb-NO":{close:"Lukk",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} varsling`,other:()=>`${e.number(t.count)} varsler`})}.`},"nl-NL":{close:"Sluiten",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} melding`,other:()=>`${e.number(t.count)} meldingen`})}.`},"pl-PL":{close:"Zamknij",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} powiadomienie`,few:()=>`${e.number(t.count)} powiadomienia`,many:()=>`${e.number(t.count)} powiadomie\u0144`,other:()=>`${e.number(t.count)} powiadomienia`})}.`},"pt-BR":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"pt-PT":{close:"Fechar",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notifica\xE7\xE3o`,other:()=>`${e.number(t.count)} notifica\xE7\xF5es`})}.`},"ro-RO":{close:"\xCEnchide\u0163i",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} notificare`,other:()=>`${e.number(t.count)} notific\u0103ri`})}.`},"ru-RU":{close:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u0435`,other:()=>`${e.number(t.count)} \u0443\u0432\u0435\u0434\u043E\u043C\u043B\u0435\u043D\u0438\u044F`})}.`},"sk-SK":{close:"Zatvori\u0165",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} ozn\xE1menie`,few:()=>`${e.number(t.count)} ozn\xE1menia`,other:()=>`${e.number(t.count)} ozn\xE1men\xED`})}.`},"sl-SI":{close:"Zapri",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obvestilo`,two:()=>`${e.number(t.count)} obvestili`,few:()=>`${e.number(t.count)} obvestila`,other:()=>`${e.number(t.count)} obvestil`})}.`},"sr-SP":{close:"Zatvori",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} obave\u0161tenje`,other:()=>`${e.number(t.count)} obave\u0161tenja`})}.`},"sv-SE":{close:"St\xE4ng",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} meddelande`,other:()=>`${e.number(t.count)} meddelanden`})}.`},"tr-TR":{close:"Kapat",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} bildirim`,other:()=>`${e.number(t.count)} bildirim`})}.`},"uk-UA":{close:"\u0417\u0430\u043A\u0440\u0438\u0442\u0438",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`,other:()=>`${e.number(t.count)} \u0441\u043F\u043E\u0432\u0456\u0449\u0435\u043D\u043D\u044F`})}.`},"zh-CN":{close:"\u5173\u95ED",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`,other:()=>`${e.number(t.count)} \u4E2A\u901A\u77E5`})}\u3002`},"zh-TW":{close:"\u95DC\u9589",notifications:(t,e)=>`${e.plural(t.count,{one:()=>`${e.number(t.count)} \u500B\u901A\u77E5`,other:()=>`${e.number(t.count)} \u500B\u901A\u77E5`})}\u3002`}};function C(t,e$1,n){let{key:r,timer:o,timeout:i}=t.toast;useEffect(()=>{if(!(o==null||i==null))return o.reset(i),()=>{o.pause();}},[o,i]);let a=c$2(),s=e(),d=b(x,"@react-aria/toast"),[u,c]=useState(false);return a$6(()=>{c(true);},[]),{toastProps:{...a$9(t,{labelable:true}),role:"alertdialog","aria-modal":"false","aria-labelledby":t["aria-labelledby"]||a,"aria-describedby":t["aria-describedby"]||s,tabIndex:0},contentProps:{role:"alert","aria-atomic":"true","aria-hidden":u?void 0:"true"},titleProps:{id:a},descriptionProps:{id:s},closeButtonProps:{"aria-label":d.format("close"),onPress:()=>e$1.close(r)}}}var q=1,S=Symbol.for("react-aria-landmark-manager");function ce(t){return document.addEventListener("react-aria-landmark-manager-change",t),()=>document.removeEventListener("react-aria-landmark-manager-change",t)}function Z(){if(typeof document>"u")return null;let t=document[S];return t&&t.version>=q?t:(document[S]=new F,document.dispatchEvent(new CustomEvent("react-aria-landmark-manager-change")),document[S])}function de(){return useSyncExternalStore(ce,Z,Z)}var F=class{landmarks=[];isListening=false;refCount=0;version=q;constructor(){this.f6Handler=this.f6Handler.bind(this),this.focusinHandler=this.focusinHandler.bind(this),this.focusoutHandler=this.focusoutHandler.bind(this);}setupIfNeeded(){this.isListening||(document.addEventListener("keydown",this.f6Handler,{capture:true}),document.addEventListener("focusin",this.focusinHandler,{capture:true}),document.addEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=true);}teardownIfNeeded(){!this.isListening||this.landmarks.length>0||this.refCount>0||(document.removeEventListener("keydown",this.f6Handler,{capture:true}),document.removeEventListener("focusin",this.focusinHandler,{capture:true}),document.removeEventListener("focusout",this.focusoutHandler,{capture:true}),this.isListening=false);}focusLandmark(e,n){this.landmarks.find(r=>r.ref.current===e)?.focus?.(n);}getLandmarksByRole(e){return new Set(this.landmarks.filter(n=>n.role===e))}getLandmarkByRole(e){return this.landmarks.find(n=>n.role===e)}addLandmark(e){if(this.setupIfNeeded(),this.landmarks.find(o=>o.ref===e.ref)||!e.ref.current)return;if(this.landmarks.filter(o=>o.role==="main").length>1&&process.env.NODE_ENV!=="production"&&console.error('Page can contain no more than one landmark with the role "main".'),this.landmarks.length===0){this.landmarks=[e],this.checkLabels(e.role);return}let n=0,r=this.landmarks.length-1;for(;n<=r;){let o=Math.floor((n+r)/2),i=e.ref.current.compareDocumentPosition(this.landmarks[o].ref.current);!!(i&Node.DOCUMENT_POSITION_PRECEDING||i&Node.DOCUMENT_POSITION_CONTAINS)?n=o+1:r=o-1;}this.landmarks.splice(n,0,e),this.checkLabels(e.role);}updateLandmark(e){let n=this.landmarks.findIndex(r=>r.ref===e.ref);n>=0&&(this.landmarks[n]={...this.landmarks[n],...e},this.checkLabels(this.landmarks[n].role));}removeLandmark(e){this.landmarks=this.landmarks.filter(n=>n.ref!==e),this.teardownIfNeeded();}checkLabels(e){let n=this.getLandmarksByRole(e);if(n.size>1){let r=[...n].filter(o=>!o.label);if(r.length>0&&process.env.NODE_ENV!=="production")console.warn(`Page contains more than one landmark with the '${e}' role. If two or more landmarks on a page share the same role, all must be labeled with an aria-label or aria-labelledby attribute: `,r.map(o=>o.ref.current));else if(process.env.NODE_ENV!=="production"){let o=[...n].map(a=>a.label);o.filter((a,s)=>o.indexOf(a)!==s).forEach(a=>{console.warn(`Page contains more than one landmark with the '${e}' role and '${a}' label. If two or more landmarks on a page share the same role, they must have unique labels: `,[...n].filter(s=>s.label===a).map(s=>s.ref.current));});}}}closestLandmark(e){let n=new Map(this.landmarks.map(o=>[o.ref.current,o])),r=e;for(;r&&!n.has(r)&&r!==document.body&&r.parentElement;)r=r.parentElement;return n.get(r)}getNextLandmark(e,{backward:n}){let r=this.closestLandmark(e),o=n?this.landmarks.length-1:0;r&&(o=this.landmarks.indexOf(r)+(n?-1:1));let i=()=>{if(o<0){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"backward"},bubbles:true,cancelable:true})))return true;o=this.landmarks.length-1;}else if(o>=this.landmarks.length){if(!e.dispatchEvent(new CustomEvent("react-aria-landmark-navigation",{detail:{direction:"forward"},bubbles:true,cancelable:true})))return true;o=0;}return o<0||o>=this.landmarks.length};if(i())return;let a=o;for(;this.landmarks[o].ref.current?.closest("[aria-hidden=true]");){if(o+=n?-1:1,i())return;if(o===a)break}return this.landmarks[o]}f6Handler(e){e.key==="F6"&&(e.altKey?this.focusMain():this.navigate(g(e),e.shiftKey))&&(e.preventDefault(),e.stopPropagation());}focusMain(){let e=this.getLandmarkByRole("main");return e&&e.ref.current&&e.ref.current.isConnected?(this.focusLandmark(e.ref.current,"forward"),true):false}navigate(e,n){let r=this.getNextLandmark(e,{backward:n});if(!r)return false;if(r.lastFocused){let o=r.lastFocused;if(e$1(document.body,o))return o.focus(),true}return r.ref.current&&r.ref.current.isConnected?(this.focusLandmark(r.ref.current,n?"backward":"forward"),true):false}focusinHandler(e){let n=this.closestLandmark(g(e));n&&n.ref.current!==g(e)&&this.updateLandmark({ref:n.ref,lastFocused:g(e)});let r=e.relatedTarget;if(r){let o=this.closestLandmark(r);o&&o.ref.current===r&&o.blur();}}focusoutHandler(e){let n=g(e),r=e.relatedTarget;if(!r||r===document){let o=this.closestLandmark(n);o&&o.ref.current===n&&o.blur();}}createLandmarkController(){let e=this;return e.refCount++,e.setupIfNeeded(),{navigate(n,r){let o=r?.from||document.activeElement;return e.navigate(o,n==="backward")},focusNext(n){let r=n?.from||document.activeElement;return e.navigate(r,false)},focusPrevious(n){let r=n?.from||document.activeElement;return e.navigate(r,true)},focusMain(){return e.focusMain()},dispose(){e&&(e.refCount--,e.teardownIfNeeded(),e=null);}}}registerLandmark(e){return this.landmarks.find(n=>n.ref===e.ref)?this.updateLandmark(e):this.addLandmark(e),()=>this.removeLandmark(e.ref)}};function J(t,e){let{role:n,"aria-label":r,"aria-labelledby":o,focus:i}=t,a=de(),s=r||o,[d,u]=useState(false),c=useCallback(()=>{u(true);},[u]),f=useCallback(()=>{u(false);},[u]);return a$6(()=>{if(a)return a.registerLandmark({ref:e,label:s,role:n,focus:i||c,blur:f})},[a,s,e,n,i,c,f]),useEffect(()=>{d&&e.current?.focus();},[d,e]),{landmarkProps:{role:n,tabIndex:d?-1:void 0,"aria-label":r,"aria-labelledby":o}}}function _(t,e,n){let r=b(x,"@react-aria/toast"),{landmarkProps:o}=J({role:"region","aria-label":t["aria-label"]||r.format("notifications",{count:e.visibleToasts.length})},n),i=useRef(false),a=useRef(false),s=useCallback(()=>{i.current||a.current?e.pauseAll():e.resumeAll();},[e]),{hoverProps:d}=a$5({onHoverStart:()=>{i.current=true,s();},onHoverEnd:()=>{i.current=false,s();}}),u=useRef([]),c$2=useRef(e.visibleToasts),f=useRef(null);a$6(()=>{if(f.current===-1||e.visibleToasts.length===0||!n.current){u.current=[],c$2.current=e.visibleToasts;return}if(u.current=[...n.current.querySelectorAll('[role="alertdialog"]')],c$2.current.length===e.visibleToasts.length&&e.visibleToasts.every((l,p)=>l.key===c$2.current[p].key)){c$2.current=e.visibleToasts;return}let b=c$2.current.map((l,p)=>({...l,i:p,isRemoved:!e.visibleToasts.some(h=>l.key===h.key)})),y=b.findIndex(l=>l.i===f.current&&l.isRemoved);if(y>-1)if(c()==="pointer"&&m.current?.isConnected)a$7(m.current);else {let l=0,p,h;for(;l<=y;)b[l].isRemoved||(h=Math.max(0,l-1)),l++;for(;l<b.length;){if(!b[l].isRemoved){p=l-1;break}l++;}h===void 0&&p===void 0&&(h=0),h>=0&&h<u.current.length?a$7(u.current[h]):p>=0&&p<u.current.length&&a$7(u.current[p]);}c$2.current=e.visibleToasts;},[e.visibleToasts,n]);let m=useRef(null),{focusWithinProps:oe}=b$1({onFocusWithin:b=>{a.current=true,m.current=b.relatedTarget,s();},onBlurWithin:()=>{a.current=false,m.current=null,s();}});return useEffect(()=>{e.visibleToasts.length===0&&m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n,e.visibleToasts.length]),useEffect(()=>()=>{m.current?.isConnected&&(c()==="pointer"?a$7(m.current):m.current.focus(),m.current=null);},[n]),{regionProps:c$1(o,d,oe,{tabIndex:-1,"data-react-aria-top-layer":true,onFocus:b=>{let y=g(b).closest('[role="alertdialog"]');f.current=u.current.findIndex(l=>l===y);},onBlur:()=>{f.current=-1;}})}}var Y=a({defaultClassName:"_1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6d7 _1yep5z6mf _1yep5z6mh",variantClassNames:{variant:{info:"_1yep5z613s",warning:"_1yep5z613n",error:"_1yep5z613d",success:"_1yep5z613i"}},defaultVariants:{},compoundVariants:[]}),ee="_1udvgpn5 _1yep5z6iz _1yep5z6j0 _1yep5z6j1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n";var fe=()=>{};function be({state:t,...e}){z.useRef(null);let {toastProps:r,contentProps:o,titleProps:i,descriptionProps:a,closeButtonProps:s}=C(e,t),d=useMemo(()=>({root:r,title:i,content:o,description:a,close:s}),[r,i,o,a,s]),{canClose:u=true,...c}=e.toast.content;return jsx(a$8,{elementProps:d,...c,className:a$2(Y({variant:c.variant||"info"}),c.className),onClose:u?fe:void 0})}var te=z.forwardRef(({state:t,style:e,className:n,...r},o)=>{let i=a$1(o),{regionProps:a}=_(r,t,i),s={zIndex:1,...e,...a.style};return jsx("div",{...a,ref:i,className:a$2(ee,n),style:s,children:t.visibleToasts.map(d=>jsx(be,{toast:d,state:t},d.key))})});te.displayName="ToastRegion";var ne=z.forwardRef(({toastQueue:t,portalContainer:e,...n},r)=>{let o=w(t),i=a$3(e);return o.visibleToasts.length>0?jsx(a$4,{portalContainer:i,ref:r,children:jsx(te,{state:o,...n})}):null});ne.displayName="GlobalToastRegion";export{E as a,ne as b};
|
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};
|
package/dist/chunk-KY3JKXSX.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$9}from'./chunk-UQJGSVXP.mjs';import {a as a$6}from'./chunk-RFTDIXEG.mjs';import {d,c as c$1}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-AV4ZP5SY.mjs';import {a as a$2,b as b$2}from'./chunk-KPEONVLU.mjs';import {a as a$7}from'./chunk-6Z6HOW6T.mjs';import {b as b$3}from'./chunk-WL27JGVG.mjs';import {a as a$3}from'./chunk-JJG67M2S.mjs';import {a,b as b$1}from'./chunk-2VY4FAOY.mjs';import {a as a$1}from'./chunk-X3AXUU3H.mjs';import {a as a$b}from'./chunk-545KDVGI.mjs';import {a as a$4,b as b$4}from'./chunk-YB3KW7JC.mjs';import {e,k,g}from'./chunk-MRJFGHFW.mjs';import {a as a$a,c as c$2}from'./chunk-TZ4MVY4E.mjs';import {a as a$8}from'./chunk-KEVERVHK.mjs';import {c,a as a$c}from'./chunk-JDLUGVXG.mjs';import {g as g$1,f,a as a$d}from'./chunk-AUOQSTS5.mjs';import {useCallback,useState,useMemo}from'react';import {flushSync}from'react-dom';/**
|
|
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 Qe(e){let{minValue:i,maxValue:t,step:u,formatOptions:r,value:o,defaultValue:d$1=NaN,onChange:L,locale:l,isDisabled:F,isReadOnly:P,commitBehavior:S="snap"}=e;o===null&&(o=NaN);let E=useCallback(a$1=>u===void 0||isNaN(u)?a(a$1,i,t):b$1(a$1,i,t,u),[u,i,t]);o!==void 0&&!isNaN(o)&&S==="snap"&&(o=E(o)),!isNaN(d$1)&&S==="snap"&&(d$1=E(d$1));let[s,g]=a$1(o,isNaN(d$1)?NaN:d$1,L),[U]=useState(s),[h,N]=useState(()=>isNaN(s)?"":new a$2(l,r).format(s)),$=useMemo(()=>new b$2(l,r),[l,r]),k=useMemo(()=>$.getNumberingSystem(h),[$,h]),x=useMemo(()=>new a$2(l,{...r,numberingSystem:k}),[l,r,k]),Z=useMemo(()=>x.resolvedOptions(),[x]),V=useCallback(a=>isNaN(a)||a===null?"":x.format(a),[x]),v=d({...e,value:s}),c=u!==void 0&&!isNaN(u)?u:1;Z.style==="percent"&&(u===void 0||isNaN(u))&&(c=.01);let[B,G]=useState(s),[T,q]=useState(l),[y,H]=useState(r);(!Object.is(s,B)||l!==T||!_e(r,y))&&(N(V(s)),G(s),q(l),H(r));let m=useMemo(()=>$.parse(h),[$,h]),Y=a=>{let D=a===void 0?h:a,p=m;if(a!==void 0&&(p=$.parse(D)),!D.length){g(NaN),N(o===void 0?"":V(s));return}if(isNaN(p)){N(V(s));return}let f=S==="snap"?E(p):p;f=$.parse(V(f));let ee=f!==s;g(f),N(V(o===void 0?f:s)),ee&&v.commitValidation();},A=(a,D=0)=>{let p=m;if(isNaN(p)){let f=isNaN(D)?0:D;return b$1(f,i,t,c)}else {let f=b$1(p,i,t,c);return a==="+"&&f>p||a==="-"&&f<p?f:b$1(ae(a,p,c),i,t,c)}},J=()=>{let a=A("+",i);a===s&&N(V(a)),g(a),v.commitValidation();},j=()=>{let a=A("-",t);a===s&&N(V(a)),g(a),v.commitValidation();},X=()=>{t!=null&&(g(b$1(t,i,t,c)),v.commitValidation());},R=()=>{i!=null&&(g(i),v.commitValidation());},Q=useMemo(()=>!F&&!P&&(isNaN(m)||t===void 0||isNaN(t)||b$1(m,i,t,c)>m||ae("+",m,c)<=t),[F,P,i,t,c,m]),_=useMemo(()=>!F&&!P&&(isNaN(m)||i===void 0||isNaN(i)||b$1(m,i,t,c)<m||ae("-",m,c)>=i),[F,P,i,t,c,m]);return {...v,validate:a=>$.isValidPartialNumber(a,i,t),increment:J,incrementToMax:X,decrement:j,decrementToMin:R,canIncrement:Q,canDecrement:_,minValue:i,maxValue:t,numberValue:m,defaultNumberValue:isNaN(d$1)?U:d$1,setNumberValue:g,setInputValue:N,inputValue:h,commit:Y}}function _e(e,i){if(e===i)return true;if(!e||!i)return false;let t=Object.keys(e),u=Object.keys(i);if(t.length!==u.length)return false;for(let r of t)if(i[r]!==e[r])return false;return true}function ae(e,i,t){let u=e==="+"?i+t:i-t;if(i%1!==0||t%1!==0){let r=i.toString().split("."),o=t.toString().split("."),d=r[1]&&r[1].length||0,L=o[1]&&o[1].length||0,l=Math.pow(10,Math.max(d,L));i=Math.round(i*l),t=Math.round(t*l),u=e==="+"?i+t:i-t,u/=l;}return u}var je={"ar-AE":{decrease:e=>`\u062E\u0641\u0636 ${e.fieldLabel}`,increase:e=>`\u0632\u064A\u0627\u062F\u0629 ${e.fieldLabel}`,numberField:"\u062D\u0642\u0644 \u0631\u0642\u0645\u064A"},"bg-BG":{decrease:e=>`\u041D\u0430\u043C\u0430\u043B\u044F\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0441\u0438\u043B\u0432\u0430\u043D\u0435 ${e.fieldLabel}`,numberField:"\u041D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043F\u043E\u043B\u0435\u0442\u043E"},"cs-CZ":{decrease:e=>`Sn\xED\u017Eit ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161it ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xD8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xF6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u039C\u03B5\u03AF\u03C9\u03C3\u03B7 ${e.fieldLabel}`,increase:e=>`\u0391\u03CD\u03BE\u03B7\u03C3\u03B7 ${e.fieldLabel}`,numberField:"\u03A0\u03B5\u03B4\u03AF\u03BF \u03B1\u03C1\u03B9\u03B8\u03BC\u03BF\u03CD"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"},"et-EE":{decrease:e=>`V\xE4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xE4li"},"fi-FI":{decrease:e=>`V\xE4henn\xE4 ${e.fieldLabel}`,increase:e=>`Lis\xE4\xE4 ${e.fieldLabel}`,numberField:"Numerokentt\xE4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u05D4\u05E7\u05D8\u05DF ${e.fieldLabel}`,increase:e=>`\u05D4\u05D2\u05D3\u05DC ${e.fieldLabel}`,numberField:"\u05E9\u05D3\u05D4 \u05DE\u05E1\u05E4\u05E8"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xF6kkent\xE9se`,increase:e=>`${e.fieldLabel} n\xF6vel\xE9se`,numberField:"Sz\xE1mmez\u0151"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u3092\u7E2E\u5C0F`,increase:e=>`${e.fieldLabel}\u3092\u62E1\u5927`,numberField:"\u6570\u5024\u30D5\u30A3\u30FC\u30EB\u30C9"},"ko-KR":{decrease:e=>`${e.fieldLabel} \uAC10\uC18C`,increase:e=>`${e.fieldLabel} \uC99D\uAC00`,numberField:"\uBC88\uD638 \uD544\uB4DC"},"lt-LT":{decrease:e=>`Suma\u017Einti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u0101\u0161ana ${e.fieldLabel}`,increase:e=>`Palielin\u0101\u0161ana ${e.fieldLabel}`,numberField:"Skait\u013Cu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xD8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u0119ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xFAmero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xE9rico"},"ro-RO":{decrease:e=>`Sc\u0103dere ${e.fieldLabel}`,increase:e=>`Cre\u0219tere ${e.fieldLabel}`,numberField:"C\xE2mp numeric"},"ru-RU":{decrease:e=>`\u0423\u043C\u0435\u043D\u044C\u0448\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,increase:e=>`\u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0435 ${e.fieldLabel}`,numberField:"\u0427\u0438\u0441\u043B\u043E\u0432\u043E\u0435 \u043F\u043E\u043B\u0435"},"sk-SK":{decrease:e=>`Zn\xED\u017Ei\u0165 ${e.fieldLabel}`,increase:e=>`Zv\xFD\u0161i\u0165 ${e.fieldLabel}`,numberField:"\u010C\xEDseln\xE9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u010Dajte ${e.fieldLabel}`,numberField:"\u0160tevil\u010Dno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u0107aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xD6ka ${e.fieldLabel}`,numberField:"Nummerf\xE4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u0131r`,numberField:"Say\u0131 alan\u0131"},"uk-UA":{decrease:e=>`\u0417\u043C\u0435\u043D\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,increase:e=>`\u0417\u0431\u0456\u043B\u044C\u0448\u0438\u0442\u0438 ${e.fieldLabel}`,numberField:"\u041F\u043E\u043B\u0435 \u043D\u043E\u043C\u0435\u0440\u0430"},"zh-CN":{decrease:e=>`\u964D\u4F4E ${e.fieldLabel}`,increase:e=>`\u63D0\u9AD8 ${e.fieldLabel}`,numberField:"\u6570\u5B57\u5B57\u6BB5"},"zh-TW":{decrease:e=>`\u7E2E\u5C0F ${e.fieldLabel}`,increase:e=>`\u653E\u5927 ${e.fieldLabel}`,numberField:"\u6578\u5B57\u6B04\u4F4D"}};function ii(e$1,i,t){let{id:u,decrementAriaLabel:r,incrementAriaLabel:o,isDisabled:d,isReadOnly:L,isRequired:l,minValue:F,maxValue:P,autoFocus:S,label:E,formatOptions:s,onBlur:g$2=()=>{},onFocus:U,onFocusChange:h,onKeyDown:N,onKeyUp:$,description:k$1,errorMessage:x,isWheelDisabled:Z,...V}=e$1,{increment:v,incrementToMax:c$3,decrement:B,decrementToMin:G,numberValue:T,inputValue:q,commit:y,commitValidation:H}=i,m=b$3(je,"@react-aria/numberfield"),Y=useCallback(()=>{let n=t.current?.value??"";flushSync(()=>{y();}),t.current?.value!==n&&a$3(t.current?.value??"","assertive");},[y,t]),A=c(u),{focusProps:J}=a$4({onBlur(){Y();}}),j=a$5(s),X=useMemo(()=>j.resolvedOptions(),[j]),R=a$5({...s,currencySign:void 0}),Q=useMemo(()=>isNaN(T)?"":R.format(T),[R,T]),{spinButtonProps:_,incrementButtonProps:oe,decrementButtonProps:a}=a$6({isDisabled:d,isReadOnly:L,isRequired:l,maxValue:P,minValue:F,onIncrement:v,onIncrementToMax:c$3,onDecrement:B,onDecrementToMin:G,value:T,textValue:Q}),[D,p]=useState(false),{focusWithinProps:f$1}=b$4({isDisabled:d,onFocusWithinChange:p}),ee=useCallback(n=>{Math.abs(n.deltaY)<=Math.abs(n.deltaX)||(n.deltaY>0?v():n.deltaY<0&&B());},[B,v]);a$7({onScroll:ee,isDisabled:Z||d||L||!D},t);let ue=(X.maximumFractionDigits??0)>0,de=i.minValue===void 0||isNaN(i.minValue)||i.minValue<0,C="numeric";e()?de?C="text":ue&&(C="decimal"):k()&&(de?C="numeric":ue&&(C="decimal"));let We=n=>{i.validate(n)&&i.setInputValue(n);},ze=n=>{e$1.onPaste?.(n);let W=g$1(n);W&&(W.selectionEnd??-1)-(W.selectionStart??0)===W.value.length&&(n.preventDefault(),y(n.clipboardData?.getData?.("text/plain")?.trim()??""));},Ke=a$8(e$1),se=useCallback(n=>{n.nativeEvent.isComposing||(n.key==="Enter"?(flushSync(()=>{y();}),H()):n.continuePropagation());},[y,H]),{isInvalid:me,validationErrors:Ue,validationDetails:Ze}=i.displayValidation,{labelProps:be,inputProps:Ge,descriptionProps:qe,errorMessageProps:Ye}=a$9({...V,...Ke,name:void 0,form:void 0,label:E,autoFocus:S,isDisabled:d,isReadOnly:L,isRequired:l,validate:void 0,[c$1]:i,value:q,defaultValue:"!",autoComplete:"off","aria-label":e$1["aria-label"]||void 0,"aria-labelledby":e$1["aria-labelledby"]||void 0,id:A,type:"text",inputMode:C,onChange:We,onBlur:g$2,onFocus:U,onFocusChange:h,onKeyDown:useMemo(()=>a$a(se,N),[se,N]),onKeyUp:$,onPaste:ze,description:k$1,errorMessage:x},i,t);a$b(t,i.defaultNumberValue,i.setNumberValue),ti(i,e$1.validationBehavior,e$1.commitBehavior,t,i.minValue,i.maxValue,e$1.step,i.numberValue);let ce=c$2(_,J,Ge,{role:null,"aria-roledescription":g()?null:m.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});e$1.validationBehavior==="native"&&(ce["aria-required"]=void 0);let fe=n=>{f(a$d(t.current))!==t.current&&(n.pointerType==="mouse"?t.current?.focus():n.target.focus());},ie=e$1["aria-label"]||(typeof e$1.label=="string"?e$1.label:""),I;ie||(I=e$1.label!=null?be.id:e$1["aria-labelledby"]);let pe=c(),Le=c(),Je=c$2(oe,{"aria-label":o||m.format("increase",{fieldLabel:ie}).trim(),id:I&&!o?pe:null,"aria-labelledby":I&&!o?`${pe} ${I}`:null,"aria-controls":A,excludeFromTabOrder:true,preventFocusOnPress:true,allowFocusWhenDisabled:true,isDisabled:!i.canIncrement,onPressStart:fe}),Xe=c$2(a,{"aria-label":r||m.format("decrease",{fieldLabel:ie}).trim(),id:I&&!r?Le:null,"aria-labelledby":I&&!r?`${Le} ${I}`:null,"aria-controls":A,excludeFromTabOrder:true,preventFocusOnPress:true,allowFocusWhenDisabled:true,isDisabled:!i.canDecrement,onPressStart:fe});return {groupProps:{...f$1,role:"group","aria-disabled":d,"aria-invalid":me?"true":void 0},labelProps:be,inputProps:ce,incrementButtonProps:Je,decrementButtonProps:Xe,errorMessageProps:Ye,descriptionProps:qe,isInvalid:me,validationErrors:Ue,validationDetails:Ze}}var b=null;function ti(e,i,t,u,r,o,d,L){a$c(()=>{let l=u.current;if(t!=="validate"||e.realtimeValidation.isInvalid||!l||l.disabled||(!b&&typeof document<"u"&&(b=document.createElement("input"),b.type="number"),!b))return;b.min=r!=null&&!isNaN(r)?String(r):"",b.max=o!=null&&!isNaN(o)?String(o):"",b.step=d!=null&&!isNaN(d)?String(d):"",b.value=L!=null&&!isNaN(L)?String(L):"";let F=l.validity.valid&&b.validity.valid,P=l.validationMessage||b.validationMessage,S={isInvalid:!F,validationErrors:P?[P]:[],validationDetails:{badInput:l.validity.badInput,customError:l.validity.customError,patternMismatch:l.validity.patternMismatch,rangeOverflow:b.validity.rangeOverflow,rangeUnderflow:b.validity.rangeUnderflow,stepMismatch:b.validity.stepMismatch,tooLong:l.validity.tooLong,tooShort:l.validity.tooShort,typeMismatch:l.validity.typeMismatch,valueMissing:l.validity.valueMissing,valid:F}};e.updateValidation(S),i==="native"&&!b.validity.valid&&l.setCustomValidity(b.validationMessage);});}export{Qe as a,ii as b};
|
package/dist/chunk-LQMEFFFM.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-JDLUGVXG.mjs';import {a}from'./chunk-4QEH5CGK.mjs';import {createContext,forwardRef,useEffect,useImperativeHandle,useMemo,useContext}from'react';import {usePanelRef,Panel,useGroupRef,useDefaultLayout,Group,Separator}from'react-resizable-panels';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 y=createContext({});function h(){return useContext(y)}function f(r){return typeof r=="number"?`${r}%`:r}var I=forwardRef(({className:r,isCollapsible:e=false,id:a$1,onResize:s,defaultSize:m,minSize:c$1,maxSize:p,collapsedSize:u,...P},o)=>{let n=usePanelRef(),b=c(),d=a$1??b,{autoSaveId:l}=h();return useEffect(()=>{l&&!a$1&&console.warn("Panel: A stable `id` prop is required for size persistence to work correctly when `autoSaveId` is set on the parent `PanelGroup`. Without it, panel sizes will not be saved or restored.");},[l,a$1]),useImperativeHandle(o,()=>({resize:t=>n.current?.resize(t)})),jsx(Panel,{className:a("BaselineUI-Panel",r),collapsible:e,panelRef:n,id:d,defaultSize:f(m),minSize:f(c$1),maxSize:f(p),collapsedSize:f(u),onResize:s?t=>{s(t.asPercentage);}:void 0,...P})});I.displayName="Panel";var V=forwardRef(({className:r,autoSaveId:e,direction:a$1,onLayout:s,...m},c)=>{let p=useGroupRef();useImperativeHandle(c,()=>({setLayout:o=>{let n=p.current;if(!n)return;let b=n.getLayout(),d=Object.keys(b);if(d.length>0){let l={};for(let t of d)t in o&&(l[t]=o[t]);n.setLayout(l);}else n.setLayout(o);}}));let u=useDefaultLayout({id:e??"",storage:e?localStorage:void 0}),P=useMemo(()=>({autoSaveId:e}),[e]);return jsx(y.Provider,{value:P,children:jsx(Group,{className:a("BaselineUI-PanelGroup",r),groupRef:p,orientation:a$1,defaultLayout:e?u.defaultLayout:void 0,onLayoutChanged:o=>{e&&u.onLayoutChanged(o),s&&s(o);},...m})})});V.displayName="PanelGroup";var z="_6abhjk0";var A=({className:r,isDisabled:e=false,...a$1})=>jsx(Separator,{disabled:e,className:a(z,"BaselineUI-PanelResizeHandle",r),...a$1});A.displayName="PanelResizeHandle";export{I as a,V as b,A as c};
|
package/dist/chunk-LZFTBNPW.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-CGFLGZL4.mjs';import {a as a$3}from'./chunk-AV4ZP5SY.mjs';import {a as a$2}from'./chunk-2VY4FAOY.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-KEVERVHK.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 c(a$4){let{value:r=0,minValue:e=0,maxValue:s=100,valueLabel:o,isIndeterminate:t,formatOptions:p={style:"percent"}}=a$4,u=a(a$4,{labelable:true}),{labelProps:g,fieldProps:B}=a$1({...a$4,labelElementType:"span"});r=a$2(r,e,s);let f=(r-e)/(s-e),b=a$3(p);if(!t&&!o){let x=p.style==="percent"?f:r;o=b.format(x);}return {progressBarProps:c$1(u,{...B,"aria-valuenow":t?void 0:r,"aria-valuemin":e,"aria-valuemax":s,"aria-valuetext":t?void 0:o,role:"progressbar"}),labelProps:g}}export{c as a};
|
package/dist/chunk-M5M3EPG5.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {d}from'./chunk-Y4DRSGEJ.mjs';import {t}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {b as b$1,g}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect}from'react';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function S(n,e,t$1){let{validationBehavior:s,focus:m}=n;a(()=>{if(s==="native"&&t$1?.current&&"setCustomValidity"in t$1.current&&!t$1.current.disabled){let i=e.realtimeValidation.isInvalid?e.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";t$1.current.setCustomValidity(i),t$1.current.hasAttribute("title")||(t$1.current.title=""),e.realtimeValidation.isInvalid||e.updateValidation(I(t$1.current));}});let r=useRef(false),u=t(()=>{r.current||e.resetValidation();}),v=t(i=>{e.displayValidation.isInvalid||e.commitValidation();let a=t$1?.current?.form;!i.defaultPrevented&&t$1&&a&&L(a)===t$1.current&&(m?m():t$1.current?.focus(),d("keyboard")),i.preventDefault();}),c=t(()=>{e.commitValidation();});useEffect(()=>{let i=t$1?.current;if(!i)return;let a=i.form,f=a?.reset;if(a){let E=b$1(i);a.reset=()=>{let o=E.event?E:window,d=o.event;r.current=!d||d.type==="message"&&typeof o.MessagePort=="function"&&g(d)instanceof o.MessagePort;try{f?.call(a);}finally{r.current=false;}};}return i.addEventListener("invalid",v),i.addEventListener("change",c),a?.addEventListener("reset",u),()=>{i.removeEventListener("invalid",v),i.removeEventListener("change",c),a?.removeEventListener("reset",u),a&&(a.reset=f);}},[t$1,s]);}function b(n){let e=n.validity;return {badInput:e.badInput,customError:e.customError,patternMismatch:e.patternMismatch,rangeOverflow:e.rangeOverflow,rangeUnderflow:e.rangeUnderflow,stepMismatch:e.stepMismatch,tooLong:e.tooLong,tooShort:e.tooShort,typeMismatch:e.typeMismatch,valueMissing:e.valueMissing,valid:e.valid}}function I(n){return {isInvalid:!n.validity.valid,validationDetails:b(n),validationErrors:n.validationMessage?[n.validationMessage]:[]}}function L(n){for(let e=0;e<n.elements.length;e++){let t=n.elements[e];if(t.validity?.valid===false)return t}return null}export{S as a};
|
package/dist/chunk-M7OLZJYB.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-SYFSGF73.mjs';import {c}from'./chunk-7MQBBSZ2.mjs';import {a as a$2}from'./chunk-OAY74XPB.mjs';import {b}from'./chunk-QR2AF3KT.mjs';import {a as a$1}from'./chunk-K6X2BHPP.mjs';import {b as b$1,c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$5}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import {assignInlineVars}from'@vanilla-extract/dynamic';import d,{useContext,useMemo,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 V="var(--cjv3et0)",H=a({defaultClassName:"cjv3et1 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6g9 _1yep5z6mf _1yep5z6mh",variantClassNames:{size:{sm:"cjv3et2",md:"cjv3et3",lg:"cjv3et4",content:"cjv3et5"},variant:{primary:"_1yep5z613z",ghost:"cjv3et7"},overlayType:{modal:"cjv3et8",popover:"cjv3et9"},isDrawer:{true:"cjv3eta _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo _1yep5z618m"},isFocusVisible:{true:"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vd"}},defaultVariants:{},compoundVariants:[]});function k(e,o){let t=e["aria-label"],r=e["aria-labelledby"],[i,s]=useState(()=>t||"");return useEffect(()=>{if(t){s(t);return}if(!r){s("");return}let a=o?.current?.getRootNode()??a$5(null),p=r.replaceAll(":",String.raw`\:`),m=a.querySelector(`#${p}`);if(m?.textContent){s(m.textContent);return}let l=a$5(null),y=a===l?l.body:a,n=new MutationObserver(()=>{let c=a.querySelector(`#${p}`);c?.textContent&&(s(c.textContent),n.disconnect());});return n.observe(y,{childList:true,subtree:true}),()=>{n.disconnect();}},[t,r,o]),i}var z=d.createContext({titleProps:{}}),O=d.forwardRef(({children:e,className:o,style:t,inheritDrawer:r,size:i="md",variant:s="primary","data-block-id":a,"data-block-class":p,drawerBackground:m,...l},y)=>{let n=d.useRef(null),c$2=d.useRef(null),{containerWidth:C,shouldContainOverlays:q}=useContext(b),{isDrawer:u,closeDrawer:U,dialogStyle:x,setDialogElement:R,isWithinModal:P}=useContext(c),$=k(l,c$2),{focusProps:A,isFocusVisible:T}=a$1(),{dialogProps:I,titleProps:w}=a$2(l,n),B=useMemo(()=>({titleProps:w}),[w]);return u&&r?jsx(a$3,{title:$,onCloseRequest:U,className:o,style:x,...l,"data-drawer":true,"data-block-id":a,"data-block-class":p,ref:b$1(y,c$2,g=>{R(g);}),background:m,children:e}):jsx(z.Provider,{value:B,children:jsx("section",{...c$1(I,A),"data-block-id":a,"data-block-class":p,"data-focus-visible":T,"data-overlay-type":P?"modal":"popover",ref:b$1(n,y,g=>{R(g);}),style:{...x,...t,...assignInlineVars({[V]:C&&q?`${C}px`:"100vw"})},className:a$4(H({size:u?"content":i,variant:s,isDrawer:u,isFocusVisible:T,overlayType:P?"modal":"popover"}),"BaselineUI-Dialog",o),children:e})})});O.displayName="Dialog";var W=d.forwardRef(({children:e,className:o,style:t},r)=>{let{titleProps:i}=useContext(z);return d.isValidElement(e)?d.cloneElement(e,{...i,ref:r,className:a$4(e.props.className,o),style:{...e.props.style,...t}}):jsx("h3",{...i,ref:r,className:o,style:t,children:e})});W.displayName="DialogTitle";export{O as a,W as b};
|
package/dist/chunk-MHUFXHRU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c,b}from'./chunk-GX2IOGYR.mjs';import {a}from'./chunk-JJG67M2S.mjs';import u,{useEffect,useCallback}from'react';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function C(e,r){let{playingLabel:n,pausedLabel:a$1}=r??{},{formatMessage:o,locale:s}=b(),[E,d]=u.useState(false),[S,c]=u.useState(0),[l,T]=u.useState(0),[g,h]=u.useState(false);useEffect(()=>{if(!e.current)return;let t=e.current,p=()=>{d(false),c(0);},f=()=>{g||c(t.currentTime*100/t.duration);},M=()=>{T(t.duration);};return t.addEventListener("ended",p),t.addEventListener("timeupdate",f),t.addEventListener("loadedmetadata",M),()=>{t.removeEventListener("ended",p),t.removeEventListener("timeupdate",f),t.removeEventListener("loadedmetadata",M);}},[g,e]);let D=useCallback(()=>{(async()=>e.current&&(e.current.paused?(await e.current.play(),d(true),a(n??o(v.playing),"polite")):(e.current.pause(),d(false),a(a$1??o(v.paused),"polite"))))();},[o,a$1,n,e]),P=useCallback(t=>{e.current&&(e.current.currentTime=t*e.current.duration/100,a(x(e.current.currentTime,s.locale),"assertive"));},[s.locale,e]);return {isPlaying:E,progress:S,duration:l,togglePlay:D,seek:P,setProgress:c,formattedCurrentTime:e.current?.currentTime?m(e.current?.currentTime):"00:00",formattedDuration:l?m(l):"00:00",setIsSliderDragging:h}}var v=c({playing:{id:"bui.useMedia.playing",defaultMessage:"Playing"},paused:{id:"bui.useMedia.paused",defaultMessage:"Paused"}});function x(e,r){if(!("DurationFormat"in Intl))return m(e);let n=Math.floor(e/3600),a=Math.floor(e%3600/60),o=e%60,s={...n&&{hours:n},...a&&{minutes:a},seconds:Math.floor(o)};return new Intl.DurationFormat(r,{style:"long"}).format(s)}function m(e){let r=Math.floor(e%3600/60),n=Math.floor(e%60);return [r,n].map(a=>a.toString().padStart(2,"0")).join(":")}export{C as a,x as b};
|
package/dist/chunk-MONDDKB4.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-5HK56IXH.mjs';import {a as a$e}from'./chunk-XJ2DFV56.mjs';import {a as a$g}from'./chunk-UN7XC7QV.mjs';import {a as a$3,b as b$1}from'./chunk-BJVFZYUV.mjs';import {a as a$2}from'./chunk-5KD2MNNX.mjs';import {a as a$h}from'./chunk-M7OLZJYB.mjs';import {b as b$5}from'./chunk-AYBACQ6U.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {a as a$f}from'./chunk-6JWACCHG.mjs';import {a as a$1}from'./chunk-AV4ZP5SY.mjs';import {a as a$i}from'./chunk-KUEDQO7P.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-4ZJMZB5B.mjs';import {b as b$4,j}from'./chunk-L6S5GBKS.mjs';import {a as a$c}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-X3AXUU3H.mjs';import {a as a$8}from'./chunk-RSKKEGJZ.mjs';import {a as a$6}from'./chunk-K6X2BHPP.mjs';import {a as a$b}from'./chunk-BGMVPFYK.mjs';import {a as a$7}from'./chunk-3FYY26ED.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import B from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';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 se="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",pe="_14uvjig3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",de="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6jz _1yep5z6k0 _1yep5z6k1",ne=a({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"},hasNumberInput:{false:"_1yep5z6p1 _1yep5z6p2 _1yep5z6p3"}},defaultVariants:{},compoundVariants:[]}),me=a({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6gh _1yep5z6m5 _1yep5z6lq",variantClassNames:{active:{true:"_14uvjigc _1yep5z6136 _1yep5z618x _1yep5z618p"},isDisabled:{true:"_14uvjigd _1yep5z613a"},isReadOnly:{true:"_1yep5z615l _1yep5z615m _1yep5z615n"},isFocusVisible:{true:"_14uvjigf _1yep5z6136 _1yep5z6189"},isHovered:{true:"_14uvjigg _1yep5z6136"}},defaultVariants:{},compoundVariants:[]}),ue="z9nup8a _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",ye="_14uvjig4 z9nup87 _1yep5z6gd _1yep5z6m3",ce=a({defaultClassName:"_14uvjig5 _1yep5z6gh _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6m4",variantClassNames:{active:{true:"_1yep5z6136"},isFocusVisible:{true:"_1yep5z6136"},isDisabled:{true:"_1yep5z613a"},isHovered:{true:"_1yep5z6136"}},defaultVariants:{},compoundVariants:[]});var N=B.forwardRef(({className:z,style:v,onChange:r,onChangeEnd:p,numberFormatOptions:o,isDisabled:i,step:g,minValue:d,maxValue:h,value:c,"aria-label":l,"aria-labelledby":e,"aria-details":n,"aria-describedby":m,"data-block-id":f,"data-block-class":H,defaultValue:j,isReadOnly:b$1,label:_,id:k,includeNumberInput:u,numberInputClassName:P,numberInputStyle:y},ze)=>{let I=B.useRef(null),F={onChange:r===void 0?void 0:S=>{r(S[0]);},isDisabled:i||b$1,step:g,minValue:d,maxValue:h,onChangeEnd:p===void 0?void 0:S=>{p(S[0]);},value:c===void 0?void 0:[c],defaultValue:j===void 0?void 0:[j],"aria-label":l,"aria-labelledby":e,"aria-details":n,"aria-describedby":m,id:k,label:_},ve=a$1(o),T=a$2({...F,numberFormatter:ve}),{trackProps:ge,groupProps:he,labelProps:O}=a$3(F,T,I),L=jsx(a$4,{variant:"ghost",showStepper:false,className:P,"aria-label":l,"aria-labelledby":O.id,isDisabled:i,isReadOnly:b$1,value:T.getThumbValue(0),formatOptions:o,onChange:S=>{T.setThumbValue(0,S);},style:{width:60,textAlign:"right",flexShrink:0,...y}});return jsxs("div",{...he,style:v,"data-block-id":f,"data-block-class":H,className:a$5(se,"BaselineUI-Slider",z),children:[_?jsxs("div",{className:de,children:[jsx("label",{...O,className:a$5(ne({isDisabled:i,hasNumberInput:!!u}),"BaselineUI-Slider-Label"),children:_}),u?L:null]}):null,jsxs("div",{className:pe,children:[jsx("div",{...ge,className:a$5(ye,"BaselineUI-Slider-Track"),ref:b(I,ze),"data-testid":"track",children:jsx(Se,{state:T,trackRef:I,isDisabled:i,isReadOnly:b$1})}),u&&!_?L:null]})]})});N.displayName="Slider";function Se({state:z,trackRef:v,isDisabled:r,isReadOnly:p}){let o=B.useRef(null),{thumbProps:i,inputProps:g,isDragging:d}=b$1({trackRef:v,inputRef:o},z),{focusProps:h,isFocused:c$1,isFocusVisible:l}=a$6(),{hoverProps:e,isHovered:n}=a$7({isDisabled:r}),{direction:m}=b$2(),f=a$8({"data-disabled":r,"data-readonly":p,"data-hovered":n,"data-focus-visible":l,"data-dragging":d,"data-focused":c$1});return jsxs(Fragment,{children:[jsx("div",{className:a$5(ce({isDisabled:r,isFocusVisible:l,active:d,isHovered:n}),"BaselineUI-Slider-TrackHighlight"),style:{width:m==="rtl"?`calc(100% - ${i.style?.left})`:i.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...c(i,e,f),className:a$5(ue,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:a$5(me({isDisabled:r,isFocusVisible:l,active:d,isReadOnly:p,isHovered:n}),"BaselineUI-Slider-Thumb")}),jsx(b$3,{children:jsx("input",{ref:o,...c(g,h)})})]})]})}var _e=B.forwardRef(({className:z,style:v,onChange:r,"data-block-id":p,icon:o,formatValue:i=m=>m,tooltip:g=true,iconTooltip:d=true,popoverContentProps:h,isDisabled:c,onTriggerPress:l,...e},n)=>{let m=a$9(n),[f,H]=a$a(e.value,e.defaultValue||0,r),[j$1,b]=B.useState(false),{keyboardProps:_}=a$b({onKeyDown:y=>{(y.key==="Enter"||y.key==="Escape")&&b(false);}}),{tooltipProps:k}=a$c({label:e["aria-label"],tooltip:g}),u=i(f||0),P=k?.isDisabled||e["aria-label"]?`${e["aria-label"]}, ${u}`:u.toString();return jsxs(a$d,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$5("BaselineUI-IconSlider",z),"data-block-id":p,style:v,ref:m,children:[o?jsx(a$e,{icon:o,label:e["aria-label"],tooltip:d,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsxs(b$4,{type:"dialog",isOpen:j$1,onOpenChange:b,children:[jsx(j,{children:jsx(a$f,{...k,children:jsx(b$5,{label:u,variant:"popover","aria-label":P,isDisabled:c,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"},onPressStart:l})})}),jsx(a$g,{placement:"bottom start",...h,children:jsx(a$h,{size:"content","aria-label":P,children:jsx(a$i,{autoFocus:true,children:jsx(a$d,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},..._,children:jsx(N,{...e,onChange:y=>{H(y),r?.(y);},value:f})})})})})]})]})});_e.displayName="IconSlider";export{N as a,_e as b};
|
package/dist/chunk-MRJFGHFW.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-JDLUGVXG.mjs';import {b as b$1,a as a$1,c,g as g$1}from'./chunk-AUOQSTS5.mjs';import ne,{createContext,useContext,useRef,useCallback}from'react';import'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function m(e){if(typeof window>"u"||window.navigator==null)return false;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function g(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):false}function f(e){if(process.env.NODE_ENV==="test")return e;let t=null;return ()=>(t==null&&(t=e()),t)}var p=f(function(){return g(/^Mac/i)}),N=f(function(){return g(/^iPhone/i)}),v=f(function(){return g(/^iPad/i)||p()&&navigator.maxTouchPoints>1}),V=f(function(){return N()||v()}),ae=f(function(){return p()||V()}),L=f(function(){return m(/AppleWebKit/i)&&!K()}),K=f(function(){return m(/Chrome/i)}),w=f(function(){return m(/Android/i)}),A=f(function(){return m(/Firefox/i)});function R(e){if(W(e))e.focus({preventScroll:true});else {let t=B(e);e.focus(),F(t);}}var b=null;function W(e){if(b==null){b=false;try{a$1(e).createElement("div").focus({get preventScroll(){return b=!0,!0}});}catch{}}return b}function B(e){let t=e.parentNode,n=[],o=a$1(e),r=b$1(e),i=o.scrollingElement||o.documentElement;for(;t&&t!==i;){if(c(t)){t=t.host;continue}t instanceof r.HTMLElement&&(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;}return i instanceof r.HTMLElement&&n.push({element:i,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),n}function F(e){for(let{element:t,scrollTop:n,scrollLeft:o}of e)t.scrollTop=n,t.scrollLeft=o;}var I=typeof Element<"u"&&"checkVisibility"in Element.prototype;function _(e){let t=b$1(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return false;let{display:n,visibility:o}=e.style,r=n!=="none"&&o!=="hidden"&&o!=="collapse";if(r){let{getComputedStyle:i}=b$1(e),{display:a,visibility:l}=i(e);r=a!=="none"&&l!=="hidden"&&l!=="collapse";}return r}function j(e,t){return !e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):true)}function h(e,t){return I?e.checkVisibility({visibilityProperty:true})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&_(e)&&j(e,t)&&(!e.parentElement||h(e.parentElement,e))}var S=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],z=S.join(':not([hidden]):not([data-bui-avoid-focus="true"]),')+',[tabindex]:not([disabled]):not([hidden]):not([data-bui-avoid-focus="true"])';S.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var U=S.join(':not([hidden]):not([tabindex="-1"]),');function Ee(e,t){return e.matches(z)&&!k(e)&&(t?.skipVisibilityCheck||h(e))}function me(e){return e.matches(U)&&h(e)&&!k(e)}function k(e){let t=e;for(;t!=null;){if(t instanceof b$1(t).HTMLElement&&t.inert)return true;t=t.parentElement;}return false}function ye(e){return e.pointerType===""&&e.isTrusted?true:w()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Te(e){return !w()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var X=createContext({isNative:true,open:Q,useHref:e=>e});function P(){return useContext(X)}function q(e,t){let n=e.getAttribute("target");return (!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function y(e,t,n=true){let{metaKey:o,ctrlKey:r,altKey:i,shiftKey:a}=t;A()&&b$1(e).event?.type?.startsWith("key")&&e.target==="_blank"&&(p()?o=true:r=true);let l=L()&&p()&&!v()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:r,altKey:i,shiftKey:a}):new MouseEvent("click",{metaKey:o,ctrlKey:r,altKey:i,shiftKey:a,detail:1,bubbles:true,cancelable:true});y.isOpening=n,R(e),e.dispatchEvent(l),y.isOpening=false;}y.isOpening=false;function Y(e,t){if(e instanceof b$1(e).HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=a$1(e).createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n);}}function Q(e,t){Y(e,n=>y(n,t));}function Oe(e){let n=P().useHref(e.href??"");return {"data-href":e.href?n:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function He(e){let n=P().useHref(e?.href??""),o={};if(e)for(let r of ["href","target","rel","download","ping","referrerPolicy"])r in e&&(o[r]=r==="href"?n:e[r]);return o}function Ce(e,t,n,o){let r=b$1(e.currentTarget);!t.isNative&&e.currentTarget instanceof r.HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&q(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,o));}var x=new WeakMap,O=new WeakSet;function H(e){return "propertyName"in e}function Z(){let e=new Map,t=new Set,n=a=>{let l=g$1(a);if(!H(a)||!l)return;let c=e.get(l);c&&(c.delete(a.propertyName),c.size===0&&(l.removeEventListener("transitioncancel",n),e.delete(l)),e.size===0&&D(i));},o=(a,l)=>{let c=e.get(a);c||(c=new Set,e.set(a,c),a.addEventListener("transitioncancel",n,{once:true})),c.add(l);},i={transitionsByElement:e,transitionCallbacks:t,track:o,onTransitionStart:a=>{let l=g$1(a);!H(a)||!l||o(l,a.propertyName);},onTransitionEnd:n};return i}function C(e){let t=x.get(e);return t||(t=Z(),x.set(e,t)),t}function $(e){let t=[],n=e?.getRootNode()??null;c(n)&&t.push(n);let o=a$1(e).body;return o&&t.push(o),t}function D(e){for(let t of e.transitionCallbacks)t();e.transitionCallbacks.clear();}function ee(e,t){let n=c(e)?e:a$1(e),o=c(e)?e.getAnimations?.():a$1(e).getAnimations?.();for(let r of o??[]){if(r.playState==="finished"||!("transitionProperty"in r))continue;let i=r.effect?.target;i&&i.getRootNode()===n&&t.track(i,r.transitionProperty);}}function M(e){if(typeof window>"u")return;let t=$(e).filter(o=>!O.has(o));if(t.length===0)return;let n=C(a$1(e));for(let o of t)O.add(o),o.addEventListener("transitionrun",n.onTransitionStart),o.addEventListener("transitionend",n.onTransitionEnd),ee(o,n);}typeof document<"u"&&(document.readyState!=="loading"?M():document.addEventListener("DOMContentLoaded",()=>M()));function te(e){for(let[t]of e.transitionsByElement)"isConnected"in t&&(!t.isConnected||!t.ownerDocument?.defaultView)&&e.transitionsByElement.delete(t);e.transitionsByElement.size===0&&D(e);}function Be(e,t){M(t);let n=C(a$1(t));requestAnimationFrame(()=>{te(n),n.transitionsByElement.size===0?e():n.transitionCallbacks.add(e);});}var ie=ne.useInsertionEffect??a;function je(e){let t=useRef(null);return ie(()=>{t.current=e;},[e]),useCallback((...n)=>{let o=t.current;return o?.(...n)},[])}function Ge(e,t){a(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null);}});}export{R as a,Ee as b,me as c,p as d,N as e,v as f,V as g,ae as h,L as i,K as j,w as k,ye as l,Te as m,P as n,y as o,Oe as p,He as q,Ce as r,Be as s,je as t,Ge as u};
|