@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$b}from'./chunk-5USQ6HBY.mjs';import {c as c$4,a as a$c,b as b$5}from'./chunk-BROSGYL3.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,g}from'./chunk-PG3WDHSK.mjs';import {a as a$5}from'./chunk-CY6W27WG.mjs';import {a as a$a}from'./chunk-6QQEK5I6.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-4QBHQCCK.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {b as b$4,j as j$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Se,{useMemo,useState}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 A=new WeakMap;function k(e,a,r){let{value:i,children:d,"aria-label":l,"aria-labelledby":p,onPressStart:s,onPressEnd:n,onPressChange:u,onPress:c,onPressUp:v,onClick:R}=e,o=e.isDisabled||a.isDisabled,_=d!=null,P=l!=null||p!=null;!_&&!P&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let f=a.selectedValue===i,g=M=>{M.stopPropagation(),a.setSelectedValue(i);},{pressProps:V,isPressed:z}=d$2({onPressStart:s,onPressEnd:n,onPressChange:u,onPress:c,onPressUp:v,onClick:R,isDisabled:o}),{pressProps:x,isPressed:G}=d$2({onPressStart:s,onPressEnd:n,onPressChange:u,onPressUp:v,onClick:R,isDisabled:o,onPress(M){c?.(M),a.setSelectedValue(i),r.current?.focus();}}),{focusableProps:L}=c$3(c$1(e,{onFocus:()=>a.setLastFocusedValue(i)}),r),t=c$1(V,L),D=a$6(e,{labelable:true}),b=-1;a.selectedValue!=null?a.selectedValue===i&&(b=0):(a.lastFocusedValue===i||a.lastFocusedValue==null)&&(b=0),o&&(b=void 0);let{name:y,form:S,descriptionId:_e,errorMessageId:ze,validationBehavior:H}=A.get(a);a$9(r,a.defaultSelectedValue,a.setSelectedValue),a$a({validationBehavior:H},a,r);let B=a$b();return {labelProps:c$1(x,useMemo(()=>({onClick:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault()}),[])),inputProps:c$1(D,{...t,type:"radio",name:y,form:S,tabIndex:b,disabled:o,required:a.isRequired&&H==="native",checked:f,value:i,onChange:g,"aria-describedby":[e["aria-describedby"],B.id,a.isInvalid?ze:null,_e].filter(Boolean).join(" ")||void 0}),descriptionProps:B,isDisabled:o,isSelected:f,isPressed:z||G}}function w(e,a,r){let{name:i,form:d,isReadOnly:l,isRequired:p,isDisabled:s,orientation:n="vertical",validationBehavior:u="aria"}=e,{direction:c}=b$1(),{isInvalid:v,validationErrors:R,validationDetails:o}=a.displayValidation,{labelProps:_,fieldProps:P,descriptionProps:f,errorMessageProps:g}=a$5({...e,labelElementType:"span",isInvalid:a.isInvalid,errorMessage:e.errorMessage||R,ref:r}),V=a$6(e,{labelable:true}),{focusWithinProps:z}=b$2({onBlurWithin(t){e.onBlur?.(t),a.selectedValue||a.setLastFocusedValue(null);},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function x(t,D){let b=d$1(D.currentTarget,{from:j$1(D),accept:S=>S instanceof b$4(S).HTMLInputElement&&S.type==="radio"}),y;return t==="next"?(y=b.nextNode(),y||(b.currentNode=D.currentTarget,y=b.firstChild())):(y=b.previousNode(),y||(b.currentNode=D.currentTarget,y=b.lastChild())),y?(y.focus(),a.setSelectedValue(y.value),true):false}let{keyboardProps:G}=j({shortcuts:{ArrowRight:t=>x(c==="rtl"&&n!=="vertical"?"prev":"next",t),ArrowLeft:t=>x(c==="rtl"&&n!=="vertical"?"next":"prev",t),ArrowDown:t=>x("next",t),ArrowUp:t=>x("prev",t)},allowRepeats:true}),L=c$2(i);return A.set(a,{name:L,form:d,descriptionId:f.id,errorMessageId:g.id,validationBehavior:u}),{radioGroupProps:c$1(V,{role:"radiogroup",...G,"aria-invalid":a.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":l||void 0,"aria-required":p||void 0,"aria-disabled":s||void 0,"aria-orientation":n,...P,...z}),labelProps:_,descriptionProps:f,errorMessageProps:g,isInvalid:v,validationErrors:R,validationDetails:o}}var Oe=Math.round(Math.random()*1e10),Le=0;function T(e){let a=useMemo(()=>e.name||`radio-group-${Oe}-${++Le}`,[e.name]),[r,i]=a$4(e.value,e.defaultValue??null,e.onChange),[d$1]=useState(r),[l,p]=useState(null),s=d({...e,value:r}),n=c=>{!e.isReadOnly&&!e.isDisabled&&(i(c),s.commitValidation());},u=s.displayValidation.isInvalid;return {...s,name:a,selectedValue:r,defaultSelectedValue:e.value!==void 0?d$1:e.defaultValue??null,setSelectedValue:n,lastFocusedValue:l,setLastFocusedValue:p,isDisabled:e.isDisabled||false,isReadOnly:e.isReadOnly||false,isRequired:e.isRequired||false,validationState:e.validationState||(u?"invalid":null),isInvalid:u}}var Re="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",Pe=a({defaultClassName:"cw3m0n5 _1yep5z6f0 _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),ve="cw3m0n4",ge="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m0",Ve=a({defaultClassName:"cw3m0n0 _1yep5z61k2 _1yep5z61k3 _1yep5z61k4 _1yep5z61kq _1yep5z61kr _1yep5z61ks _1yep5z61le _1yep5z61lf _1yep5z61lg _1yep5z61m2 _1yep5z61m3 _1yep5z61m4 _1yep5z61ob _1yep5z61us",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var he=({label:e,description:a},{isSelected:r,isFocusVisible:i,isDisabled:d,optionLabelPosition:l,isHovered:p,isReadOnly:s})=>jsxs("div",{className:b$5({labelPosition:l}),children:[jsx("div",{className:a$3(c$4({isSelected:r,isFocusVisible:i,isDisabled:d,isReadOnly:s,isHovered:p}),Ve({isHovered:p})),children:r?jsx("div",{className:ve}):null}),e?jsxs("div",{className:Re,children:[jsx("span",{className:a$c({isDisabled:d}),children:e}),a?jsx("span",{className:Pe({isDisabled:d}),children:a}):null]}):null]}),xe=({state:e,renderOption:a=he,item:r,optionLabelPosition:i="end",optionStyle:d,optionClassName:l,isReadOnly:p,...s})=>{let n=!!s.isDisabled||!!s.disabledValues?.includes(r.id),u=Se.useRef(null),{inputProps:c,isPressed:v,isSelected:R,labelProps:o}=k({...s,isDisabled:n,children:r.label,value:r.id},e,u),{focusProps:_,isFocusVisible:P,isFocused:f}=a$7(),{hoverProps:g,isHovered:V}=a$8({isDisabled:n},u),z=a$2({"data-selected":R,"data-focused":f,"data-focus-visible":P,"data-hovered":V,"data-disabled":n,"data-pressed":v,"data-read-only":p});return jsxs("label",{...c$1(o,g,z),style:d,className:a$3("BaselineUI-Radio-Item",l),children:[jsx(b$3,{children:jsx("input",{...c$1(c,_),ref:u})}),a(r,{isFocusVisible:P,isSelected:R,isFocused:f,isHovered:V,isDisabled:n,optionLabelPosition:i,isReadOnly:p})]})};var De=Se.forwardRef(({className:e$1,style:a,optionsContainerClassName:r,optionsContainerStyle:i,items:d,labelPosition:l="top",renderOption:p,"aria-label":s,"aria-labelledby":n,"aria-describedby":u,"aria-details":c$2,"data-block-id":v,"data-block-class":R,...o},_)=>{let P=a$1(_),f$1=T(o),{radioGroupProps:g$1,labelProps:V,descriptionProps:z,errorMessageProps:x}=w({...o,"aria-label":s,"aria-labelledby":n,"aria-describedby":u,"aria-details":c$2},f$1,P),G=b({...o,descriptionProps:z,errorMessageProps:x,labelPosition:l}),L=a$2({"data-orientation":o.orientation,"data-block-id":v,"data-block-class":R,"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly});return jsxs("div",{...c$1(g$1,L),className:a$3(g({labelPosition:l}),"BaselineUI-RadioGroup",e$1),style:a,ref:P,children:[o.label||G?jsxs("div",{className:f({labelPosition:l,hasMessage:!!G}),children:[jsx("span",{...V,className:a$3(e,"BaselineUI-RadioGroup-Label"),children:o.label}),l==="start"&&G]}):null,jsx("div",{className:a$3(ge,{[c]:o.isDisabled},r),style:i,children:d.map(t=>jsx(xe,{state:f$1,renderOption:p,item:t,optionLabelPosition:o.optionLabelPosition,optionStyle:o.optionStyle,optionClassName:o.optionClassName,isReadOnly:o.isReadOnly,isDisabled:o.isDisabled,disabledValues:o.disabledValues,value:t.id},t.id))}),l==="top"&&G]})});De.displayName="RadioGroup";export{De as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var w=e=>p(e)?e.document:E(e)?e:e?.ownerDocument??(typeof document<"u"?document:void 0),s=e=>w(e)?.defaultView??(typeof window<"u"?window:void 0);function f(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function p(e){return typeof e=="object"&&e!=null&&"window"in e&&e.window===e}function E(e){return f(e)&&e.nodeType===9}function a(e){return f(e)&&e.nodeType===11&&"host"in e}function y(e,t,n,o){if(n==null||e==null)return ()=>{};let r=Array.isArray(e)?e:[e];for(let l of r)l.addEventListener(t,n,o);return ()=>{for(let l of r)l.removeEventListener(t,n,o);}}function h(e,t,n,o){if(e==null)return ()=>{};let r=new Array,l=Array.isArray(e)?e:[e];for(let i of l){let d=i.style.getPropertyValue(t),m=i.style.getPropertyPriority(t);i.style.setProperty(t,n,o),r.unshift(()=>{d?i.style.setProperty(t,d,m):i.style.removeProperty(t);});}return ()=>{for(let i of r)i();}}var T=true;function u(){return T}function P(e,t){if(!e||!t)return false;let n=t;for(;n!=null;){if(n===e)return true;let o=n.assignedSlot;o?n=o:a(n)?n=n.host:n=n.parentNode;}return false}var L=(e=document)=>{let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function O(e){let t=e.target;if(t&&"shadowRoot"in t&&t.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return t}function c(e,t=document){if(typeof t.getElementById=="function"){let o=t.getElementById(e);if(o)return o}let n=t.children||[];for(let o of n){if(o.getAttribute&&o.getAttribute("id")===e)return o;if(o.shadowRoot){let l=c(e,o.shadowRoot);if(l)return l}let r=c(e,o);if(r)return r}return null}function A(e,t){if(t===null)return [];t=t??s(e);let n=[t];if(!e||e===t)return n;let o="getRootNode"in t?t.getRootNode():null,r=e.getRootNode()??null;for(;a(r)&&r!==o;)n.push(r),r=r.host.getRootNode();return n}function W(e){if(!e)return false;let t=e.getRootNode(),n=s(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return false;let o=t.activeElement;return o!=null&&e.contains(o)}export{w as a,s as b,f as c,a as d,y as e,h as f,u as g,P as h,L as i,O as j,c as k,A as l,W as m};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {c}from'./chunk-HH4VLTF3.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SVIYLH7R.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {d as d$1}from'./chunk-BGMVPFYK.mjs';import {d}from'./chunk-AQYBKDT2.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function g(t,i){let{elementType:e="button",isDisabled:n,onPress:f,onPressStart:d$
|
|
10
|
+
function g(t,i){let{elementType:e="button",isDisabled:n,onPress:f,onPressStart:d$1,onPressEnd:m,onPressUp:b,onPressChange:c$2,preventFocusOnPress:B,allowFocusWhenDisabled:A,onClick:T,href:P,target:x,rel:E,type:s="button"}=t,r;e==="button"?r={type:s,disabled:n,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:r={role:"button",href:e==="a"&&!n?P:void 0,target:e==="a"?x:void 0,type:e==="input"?s:void 0,disabled:e==="input"?n:void 0,"aria-disabled":!n||e==="input"?void 0:n,rel:e==="a"?E:void 0};let{pressProps:M,isPressed:L}=d({onPressStart:d$1,onPressEnd:m,onPressChange:c$2,onPress:f,onPressUp:b,onClick:T,isDisabled:n,preventFocusOnPress:B,ref:i}),{focusableProps:o}=c(t,i);A&&(o.tabIndex=n?-1:o.tabIndex);let O=c$1(o,M,a(t,{labelable:true}));return {isPressed:L,buttonProps:c$1(r,O,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}export{g as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {g,f,h,j}from'./chunk-TZGK36KC.mjs';import {h as h$1,j as j$1}from'./chunk-PPHSLODC.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {b as b$1}from'./chunk-RMUV6NJJ.mjs';import {useRef,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 M=200,N=50,D=600,s=new WeakMap,p=new Set,c=new Set;function _(e,i){let o=j(),t=performance.now()>=i;if(e!==o||t)for(let n of c)n(o),c.delete(n);if(!e&&o&&j$1()&&!t){window.clearInterval(s.get(window)),s.set(window,S(M));return}if(e!==o||t)for(let n of p)n(o),p.delete(n);(c.size+p.size<=0||t)&&(window.clearInterval(s.get(window)),s.delete(window));}function S(e=D){return window.setInterval(_,N,j(),performance.now()+e)}function L(e){if(!g())return e(false),()=>{};let i=window.requestAnimationFrame(()=>{i=window.requestAnimationFrame(()=>{let o=f(),t=h(o);if(j()===t||j()&&!t)return e(t);c.add(e),s.has(window)||s.set(window,S());});});return ()=>{window.cancelAnimationFrame(i),c.delete(e);}}function se(e){if(!g())return e(false),()=>{};let i=window.requestAnimationFrame(()=>{i=window.requestAnimationFrame(()=>{let o=f(),t=h(o);if(j()===t)return e(t);p.add(e),s.has(window)||s.set(window,S());});});return ()=>{window.cancelAnimationFrame(i),p.delete(e);}}var r=typeof document<"u"&&window.visualViewport;function A(){let e=b$1(),i=useRef(null),[o,t]=useState(()=>e?{width:0,height:0}:b());return useEffect(()=>{let n=u=>{t(m=>u.width===m.width&&u.height===m.height?m:u);},w=()=>{r&&r.scale>1||n(b());},g=u=>{r&&r.scale>1||h(j$2(u))&&(i.current=L(m=>{m||n({width:document.documentElement.clientWidth,height:document.documentElement.clientHeight});}));};return n(b()),h$1()&&j$1()&&window.addEventListener("blur",g,true),r?r.addEventListener("resize",w):window.addEventListener("resize",w),()=>{i.current?.(),h$1()&&j$1()&&window.removeEventListener("blur",g,true),r?r.removeEventListener("resize",w):window.removeEventListener("resize",w);}},[]),o}function b(){return {width:r?Math.min(r.width*r.scale,document.documentElement.clientWidth):document.documentElement.clientWidth,height:r?r.height*r.scale:document.documentElement.clientHeight}}export{L as a,se as b,A as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-66CUIXA6.mjs';import {b as b$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SD43KVTU.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import*as y from'dompurify';import c,{useId}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var I=(e,t)=>{e.setAttribute("height",typeof t=="number"?`${t}px`:t),e.setAttribute("width",typeof t=="number"?`${t}px`:t);},R=(e,t,n)=>{let o=e.querySelector("title"),i=a(e);if(o)o.textContent=t,o.setAttribute("id",n);else {let r=i.createElement("title");r.textContent=t,r.setAttribute("id",n),e.prepend(r);}},T=(e,t)=>{t&&e.classList.add(t);},w=(e,t)=>{let n=t.createElement("span");n.innerHTML=y.default.sanitize(e);let o=n.querySelector("svg");return a$1(o,"Icon: svg prop must be a valid svg string"),o},x=c.forwardRef(({size:e,title:t,className:n,style:o,color:i,...r},v)=>{let u=useId(),f=b(),l=c.useRef(null),m="svg"in r?r.svg:void 0,a$1=c.useMemo(()=>{if(m&&!f){let b=a(l.current),s=w(m,b);return e&&I(s,e),t&&R(s,t,u),T(s,n),s.outerHTML}},[m,e,t,n,u,f]);return jsx("span",{className:n,ref:b$1(v,l),style:{display:"contents",...o,color:i},dangerouslySetInnerHTML:a$1?{__html:a$1}:void 0})});x.displayName="Icon";export{x as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
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:a=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:a},n),getItem(K){return t.items.find(p=>a(p)===K)}}}function B(S,m){let{cursor:c,getKey:a}=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(a)):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=>M(t,r,...e));},insertBefore(r,...e){m(t=>{let n=t.items.findIndex(u=>a?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return M(t,n,...e)});},insertAfter(r,...e){m(t=>{let n=t.items.findIndex(u=>a?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return M(t,n+1,...e)});},prepend(...r){m(e=>M(e,0,...r));},append(...r){m(e=>M(e,e.items.length,...r));},remove(...r){m(e=>{let t=new Set(r),n=e.items.filter(K=>!t.has(a(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(a(n)));return {...r,items:t,selectedKeys:new Set}});},move(r,e){m(t=>{let n=t.items.findIndex(p=>a(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=>a(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>a(k)===p)).sort((p,k)=>p-k);return N(t,K,n)});},moveAfter(r,e){m(t=>{let n=t.items.findIndex(p=>a(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>a(k)===p)).sort((p,k)=>p-k);return N(t,K,n+1)});},update(r,e){m(t=>{let n=t.items.findIndex(K=>a(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 M(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 a=m.map(e=>({from:e,to:c++}));for(let e=0;e<a.length;e++){let t=a[e].from;for(let n=e;n<a.length;n++)a[n].from>t&&a[n].from--;}for(let e=0;e<a.length;e++){let t=a[e];for(let n=a.length-1;n>e;n--){let u=a[n];u.from<t.to?t.to++:u.from++;}}let r=S.items.slice();for(let e of a){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:a=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:a(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 x(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?b(y,d):I(i,d);y&&y.parentKey;){let f=d.get(y.parentKey),v={key:f.key,parentKey:f.parentKey,value:f.value,children:null},h=f.children;i==null&&h&&(h=h.filter(g=>g!==y)),v.children=h?.map(g=>g===y?i:g)??null,d.set(v.key,v),i=v,y=f;}return i==null&&(l=l.filter(f=>f!==y)),{items:l.map(f=>f===y?i:f),nodeMap:d}}function I(l,o){if(o.set(l.key,l),l.children)for(let s of l.children)I(s,o);}function b(l,o){if(o.delete(l.key),l.children)for(let s of l.children)b(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}:x(T,l,f=>({key:f.key,parentKey:f.parentKey,value:f.value,children:[...f.children.slice(0,o),...d,...f.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=x(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=o;for(;d!=null;){if(d===l)throw new Error("Cannot move an item to be a child of itself.");d=y.get(d)?.parentKey??null;}let i=y.get(l);if(!i)return {items:T,nodeMap:y};let{items:f,nodeMap:v}=x(T,l,()=>null,y),h={...i,parentKey:o};return o==null?(I(h,v),{items:[...f.slice(0,s),h,...f.slice(s)],nodeMap:v}):x(f,o,g=>({key:g.key,parentKey:g.parentKey,value:g.value,children:[...g.children.slice(0,s),h,...g.children.slice(s)]}),v)});},moveBefore(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,f=null;i!=null&&(f=y.get(i)??null);let v=f?.children?f.children.indexOf(d):T.indexOf(d);return A(s,o,f,v,x,I)});},moveAfter(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,f=null;i!=null&&(f=y.get(i)??null);let v=f?.children?f.children.indexOf(d):T.indexOf(d);return v++,A(s,o,f,v,x,I)});},update(l,o){t(({items:s,nodeMap:T})=>x(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,a,r,e){let{items:t,nodeMap:n}=S,u=c,K=new Set(m);for(;u!=null;){if(K.has(u.key))throw new Error("Cannot move an item to be a child of itself.");u=u.parentKey!=null?n.get(u.parentKey)??null:null;}let p=a,k=Array.isArray(m)?m:[...m],x=new Map,I=[],b=t,l=n,o=0;function s(i,{inorder:f,postorder:v}){if(f?.(i),i!=null)for(let h of i.children??[])s(h,{inorder:f,postorder:v}),v?.(h);}function T(i){k.includes(i.key)&&x.set(i.key,o++);}function y(i){if(k.includes(i.key)){I.push({...l.get(i.key),parentKey:c?.key??null});let{items:f,nodeMap:v}=r(b,i.key,()=>null,l);b=f,l=v;}(i.parentKey===c||i.parentKey===c?.key)&&k.includes(i.key)&&(c?.children?c.children.indexOf(i):t.indexOf(i))<p&&a--;}s({children:t},{inorder:T,postorder:y});let d=I.sort((i,f)=>x.get(i.key)>x.get(f.key)?1:-1);return !c||c.key==null?(d.forEach(i=>{e(i,l);}),{items:[...b.slice(0,a),...d,...b.slice(a)],nodeMap:l}):r(b,c.key,i=>({key:i.key,parentKey:i.parentKey,value:i.value,children:[...i.children.slice(0,a),...d,...i.children.slice(a)]}),l)}export{w as a,L as b,F as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-
|
|
1
|
+
import {a,b as b$1}from'./chunk-4S4GGUSH.mjs';import {b,h as h$1}from'./chunk-KUDCYGII.mjs';import {useRef,useState,useCallback}from'react';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
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 b=new Set(["id"]),u=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),c=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),P=new Set(["dir","lang","hidden","inert","translate","suppressHydrationWarning"]),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:s,global:e,events:l=e,propNames:p}=a,t={};for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(b.has(o)||i&&u.has(o)||s&&c.has(o)||e&&P.has(o)||l&&(r.has(o)||o.endsWith("Capture")&&r.has(o.slice(0,-7)))||p?.has(o)||M.test(o))&&(t[o]=n[o]);return t}export{O as a};
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var p=10,y=5,h=class{delegate=null;state=null;direction="ltr";pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null};setup(r,a,n){this.delegate=r,this.state=a,this.direction=n;}getDropTargetFromPoint(r,a,n){let i=this.delegate.getDropTargetFromPoint(r,a,n);return !i||i.type==="root"?i:this.resolveDropTarget(i,r,a,n)}resolveDropTarget(r,a,n,i){let t=this.pointerTracking,u=n-t.lastY,o=a-t.lastX,f=t.yDirection,l=t.xDirection;if(Math.abs(u)>y&&(f=u>0?"down":"up",t.yDirection=f,t.lastY=n),Math.abs(o)>p&&(l=o>0?"right":"left",t.xDirection=l,t.lastX=a),r.dropPosition==="before"){let g=this.state.collection.getKeyBefore(r.key);for(;g!=null;){let c=this.state.collection.getItem(g);if(c?.type==="item")break;g=c?.parentKey??null;}if(g!=null){let c={type:"item",key:g,dropPosition:"after"};i(c)&&(r=c);}}let e=this.getPotentialTargets(r,i);if(e.length===0)return {type:"root"};let d;return e.length>1?d=this.selectTarget(e,r,a,n,f,l):(d=e[0],t.boundaryContext=null),d}getPotentialTargets(r,a){if(r.dropPosition==="on")return [r];let n=r,i=this.state.collection,t=i.getItem(n.key);for(;t&&t?.type!=="item"&&t.nextKey!=null;)n.key=t.nextKey,t=i.getItem(t.nextKey);let u=[n];if(t&&t.hasChildNodes&&this.state.expandedKeys.has(t.key)&&i.getChildren&&n.dropPosition==="after"){let l=t.firstChildKey!=null?i.getItem(t.firstChildKey):null;for(;l&&l.type!=="item";)l=l.nextKey!=null?i.getItem(l.nextKey):null;if(l?.type==="item"){let e={type:"item",key:l.key,dropPosition:"before"};return a(e)?[e]:[]}}if(t?.nextKey!=null)return [r];let o=t?.parentKey,f=[];for(;o!=null;){let l=i.getItem(o),e=l?.nextKey!=null?i.getItem(l.nextKey):null;if(!e||e.parentKey!==o){let g={type:"item",key:o,dropPosition:"after"};
|
|
10
|
+
var p=10,y=5,h=class{delegate=null;state=null;direction="ltr";pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null};setup(r,a,n){this.delegate=r,this.state=a,this.direction=n;}getDropTargetFromPoint(r,a,n){let i=this.delegate.getDropTargetFromPoint(r,a,n);return !i||i.type==="root"?i:this.resolveDropTarget(i,r,a,n)}resolveDropTarget(r,a,n,i){let t=this.pointerTracking,u=n-t.lastY,o=a-t.lastX,f=t.yDirection,l=t.xDirection;if(Math.abs(u)>y&&(f=u>0?"down":"up",t.yDirection=f,t.lastY=n),Math.abs(o)>p&&(l=o>0?"right":"left",t.xDirection=l,t.lastX=a),r.dropPosition==="before"){let g=this.state.collection.getKeyBefore(r.key);for(;g!=null;){let c=this.state.collection.getItem(g);if(c?.type==="item")break;g=c?.parentKey??null;}if(g!=null){let c={type:"item",key:g,dropPosition:"after"};i(c)&&(r=c);}}let e=this.getPotentialTargets(r,i);if(e.length===0)return {type:"root"};let d;return e.length>1?d=this.selectTarget(e,r,a,n,f,l):(d=e[0],t.boundaryContext=null),d}getPotentialTargets(r,a){if(r.dropPosition==="on")return [r];let n=r,i=this.state.collection,t=i.getItem(n.key);for(;t&&t?.type!=="item"&&t.nextKey!=null;)n.key=t.nextKey,t=i.getItem(t.nextKey);let u=[n];if(t&&t.hasChildNodes&&this.state.expandedKeys.has(t.key)&&i.getChildren&&n.dropPosition==="after"){let l=t.firstChildKey!=null?i.getItem(t.firstChildKey):null;for(;l&&l.type!=="item";)l=l.nextKey!=null?i.getItem(l.nextKey):null;if(l?.type==="item"){let e={type:"item",key:l.key,dropPosition:"before"};return a(e)?[e]:[]}}if(t?.nextKey!=null)return [r];let o=t?.parentKey,f=[];for(;o!=null;){let l=i.getItem(o),e=l?.nextKey!=null?i.getItem(l.nextKey):null;if(!e||e.parentKey!==o){if(l?.type==="item"){let g={type:"item",key:o,dropPosition:"after"};a(g)&&f.push(g);}if(e)break}o=l?.parentKey;}if(f.length>0&&u.push(...f),u.length===1){let l=i.getKeyAfter(n.key),e=l!=null?i.getItem(l):null;if(l!=null&&e&&t&&e.level!=null&&t.level!=null&&e.level>t.level){let d={type:"item",key:l,dropPosition:"before"};if(a(d))return [d]}}return u.filter(a)}selectTarget(r,a,n,i,t,u){if(r.length<2)return r[0];let o=this.pointerTracking,l=this.state.collection.getItem(a.key)?.parentKey;if(l==null)return r[0];if(!o.boundaryContext||o.boundaryContext.parentKey!==l){let s=o.yDirection==="up"?r.length-1:0;o.boundaryContext={parentKey:l,preferredTargetIndex:s,lastSwitchY:i,lastSwitchX:n};}let e=o.boundaryContext,d=Math.abs(n-e.lastSwitchX);if(Math.abs(i-e.lastSwitchY)>y&&t){let s=e.preferredTargetIndex||0;t==="down"&&s===0?e.preferredTargetIndex=r.length-1:t==="up"&&s===r.length-1&&(e.preferredTargetIndex=0),o.xDirection=null;}if(d>p&&u){let s=e.preferredTargetIndex||0;u==="left"?this.direction==="ltr"?s<r.length-1&&(e.preferredTargetIndex=s+1,e.lastSwitchX=n):s>0&&(e.preferredTargetIndex=s-1,e.lastSwitchX=n):u==="right"&&(this.direction==="ltr"?s>0&&(e.preferredTargetIndex=s-1,e.lastSwitchX=n):s<r.length-1&&(e.preferredTargetIndex=s+1,e.lastSwitchX=n)),o.yDirection=null;}let c=Math.max(0,Math.min(e.preferredTargetIndex||0,r.length-1));return r[c]}};export{h as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {e}from'./chunk-UZ672WDX.mjs';import {useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function d(){return Object.prototype.hasOwnProperty.call(HTMLElement.prototype,"inert")}function p({ref:n,isDisabled:o}){useEffect(()=>{if(!n.current||o)return;let t=n.current;if(d())return t.hasAttribute("inert")?void 0:(t.setAttribute("inert","true"),()=>{t.removeAttribute("inert");});let i=new Map,u=t.hasAttribute("aria-hidden")?t.getAttribute("aria-hidden")==="true":null;t.setAttribute("aria-hidden","true");let s=()=>{if(!n.current)return;let r=e(n.current);for(let e of r)i.has(e)||(i.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1"));};s();let a=new MutationObserver(r=>{for(let e of r)if(e.type==="childList"){for(let c of e.removedNodes)c instanceof Element&&i.delete(c);s();}});return a.observe(n.current,{childList:true,subtree:true,attributes:false}),()=>{a.disconnect();for(let[r,e]of i.entries())r.isConnected&&(e===null?r.removeAttribute("tabindex"):r.setAttribute("tabindex",e));u===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",u?"true":"false");}},[n,o]);}export{p as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$4}from'./chunk-G77E7EDE.mjs';import {a as a$6}from'./chunk-LSPDPDB6.mjs';import {d}from'./chunk-QMV2O57M.mjs';import {a as a$1}from'./chunk-NGZRN4SF.mjs';import {c,b}from'./chunk-7MLFM55C.mjs';import {b as b$1}from'./chunk-KG2EHFYA.mjs';import {b as b$2}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import fe,{useMemo,useCallback,useEffect,useRef}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$4}from'./chunk-TJEK54BW.mjs';import {a as a$6}from'./chunk-V37GPP
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var X={"ar-AE":{steplist:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062E\u0637\u0648\u0627\u062A"},"bg-BG":{steplist:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441\u044A\u0441 \u0441\u0442\u044A\u043F\u043A\u0438"},"cs-CZ":{steplist:"Seznam krok\u016F"},"da-DK":{steplist:"Trinliste"},"de-DE":{steplist:"Schrittliste"},"el-GR":{steplist:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD"},"en-US":{steplist:"Step List"},"es-ES":{steplist:"Lista de pasos"},"et-EE":{steplist:"Sammude loend"},"fi-FI":{steplist:"Vaiheluettelo"},"fr-FR":{steplist:"Liste des \xE9tapes"},"he-IL":{steplist:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E6\u05E2\u05D3\u05D9\u05DD"},"hr-HR":{steplist:"Lista koraka"},"hu-HU":{steplist:"L\xE9p\xE9sek list\xE1ja"},"it-IT":{steplist:"Elenco dei passaggi"},"ja-JP":{steplist:"\u624B\u9806\u30EA\u30B9\u30C8"},"ko-KR":{steplist:"\uB2E8\uACC4 \uBAA9\uB85D"},"lt-LT":{steplist:"\u017Dingsni\u0173 s\u0105ra\u0161as"},"lv-LV":{steplist:"Darb\u012Bbu saraksts"},"nb-NO":{steplist:"Trinnliste"},"nl-NL":{steplist:"Stappenlijst"},"pl-PL":{steplist:"Lista krok\xF3w"},"pt-BR":{steplist:"Lista de etapas"},"pt-PT":{steplist:"Lista de passos"},"ro-RO":{steplist:"Lista de pa\u0219i"},"ru-RU":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u0448\u0430\u0433\u043E\u0432"},"sk-SK":{steplist:"Zoznam krokov"},"sl-SI":{steplist:"Seznam korakov"},"sr-SP":{steplist:"Lista koraka"},"sv-SE":{steplist:"Steglista"},"tr-TR":{steplist:"Ad\u0131m Listesi"},"uk-UA":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0440\u043E\u043A\u0456\u0432"},"zh-CN":{steplist:"\u6B65\u9AA4\u5217\u8868"},"zh-TW":{steplist:"\u6B65\u9A5F\u6E05\u55AE"}};function
|
|
10
|
+
var X={"ar-AE":{steplist:"\u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u062E\u0637\u0648\u0627\u062A"},"bg-BG":{steplist:"\u0421\u043F\u0438\u0441\u044A\u043A \u0441\u044A\u0441 \u0441\u0442\u044A\u043F\u043A\u0438"},"cs-CZ":{steplist:"Seznam krok\u016F"},"da-DK":{steplist:"Trinliste"},"de-DE":{steplist:"Schrittliste"},"el-GR":{steplist:"\u039B\u03AF\u03C3\u03C4\u03B1 \u03B2\u03B7\u03BC\u03AC\u03C4\u03C9\u03BD"},"en-US":{steplist:"Step List"},"es-ES":{steplist:"Lista de pasos"},"et-EE":{steplist:"Sammude loend"},"fi-FI":{steplist:"Vaiheluettelo"},"fr-FR":{steplist:"Liste des \xE9tapes"},"he-IL":{steplist:"\u05E8\u05E9\u05D9\u05DE\u05EA \u05E6\u05E2\u05D3\u05D9\u05DD"},"hr-HR":{steplist:"Lista koraka"},"hu-HU":{steplist:"L\xE9p\xE9sek list\xE1ja"},"it-IT":{steplist:"Elenco dei passaggi"},"ja-JP":{steplist:"\u624B\u9806\u30EA\u30B9\u30C8"},"ko-KR":{steplist:"\uB2E8\uACC4 \uBAA9\uB85D"},"lt-LT":{steplist:"\u017Dingsni\u0173 s\u0105ra\u0161as"},"lv-LV":{steplist:"Darb\u012Bbu saraksts"},"nb-NO":{steplist:"Trinnliste"},"nl-NL":{steplist:"Stappenlijst"},"pl-PL":{steplist:"Lista krok\xF3w"},"pt-BR":{steplist:"Lista de etapas"},"pt-PT":{steplist:"Lista de passos"},"ro-RO":{steplist:"Lista de pa\u0219i"},"ru-RU":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u0448\u0430\u0433\u043E\u0432"},"sk-SK":{steplist:"Zoznam krokov"},"sl-SI":{steplist:"Seznam korakov"},"sr-SP":{steplist:"Lista koraka"},"sv-SE":{steplist:"Steglista"},"tr-TR":{steplist:"Ad\u0131m Listesi"},"uk-UA":{steplist:"\u0421\u043F\u0438\u0441\u043E\u043A \u043A\u0440\u043E\u043A\u0456\u0432"},"zh-CN":{steplist:"\u6B65\u9AA4\u5217\u8868"},"zh-TW":{steplist:"\u6B65\u9A5F\u6E05\u55AE"}};function w(p,t,a){let{"aria-label":s}=p,{listProps:r}=a$6({...p,...t,allowsTabNavigation:true,ref:a}),o=b$1(X,"@react-aria/steplist");return {listProps:{...{...c$1(r,a$7(p,{labelable:true})),"aria-label":s||o.format("steplist")},tabIndex:void 0}}}function N(p){let t=a$4({...p,onSelectionChange:p.onSelectionChange?e=>{e!=null&&p.onSelectionChange?.(e);}:void 0}),[a,s]=a$5(p.lastCompletedStep,p.defaultLastCompletedStep??null,p.onLastCompletedStepChange),{setSelectedKey:r,selectedKey:o,collection:d}=t,{indexMap:y,keysLinkedList:c}=useMemo(()=>me(d),[d]),_=o!=null?y.get(o):0,m=useCallback(e=>e===void 0?false:e!==null&&a!==null&&y.has(e)&&y.has(a)&&y.get(e)<=y.get(a),[y,a]),k=useCallback((e,n)=>{let l=null;if(e&&e.size>0)for(l=e.getFirstKey();l!==e.getLastKey()&&l&&(n.has(l)||m(l));)l=e.getKeyAfter(l);return l},[m]);useEffect(()=>{let e=t.selectedKey;(t.selectionManager.isEmpty||e==null||!t.collection.getItem(e))&&(e=k(t.collection,t.disabledKeys),e!==null&&t.selectionManager.replaceSelection(e)),t.selectionManager.focusedKey==null&&t.selectionManager.setFocusedKey(e);let n=(a!==null?y.get(a):-1)??-1;_!==void 0&&_>0&&_>n+1&&e!==null&&c.has(e)&&s(c.get(e));});function g(e){if(p.isDisabled||t.disabledKeys.has(e)||p.isReadOnly)return false;if(m(e))return true;let n=c.get(e);return m(n)||e===t.collection.getFirstKey()}function h(e){let n=c.get(e);n&&!m(n)&&s(n),r(e);}return {...t,setSelectedKey:h,setLastCompletedStep:s,isCompleted:m,isSelectable:g}}function me(p){let t=new Map,a=new Map,s=0,r;for(let o of p)t.set(o.key,s),a.set(o.key,r?.key),r=o,s++;return {indexMap:t,keysLinkedList:a}}var $=a({defaultClassName:"_41r3q2q _1yep5z6kb _1yep5z6kc _1yep5z6kd",variantClassNames:{variant:{condensed:"_41r3q2r _1yep5z618j",expanded:"_41r3q2s _1yep5z6us _1yep5z6ut _1yep5z6uu _1yep5z6sg _1yep5z6sh _1yep5z6si _1yep5z6173 _1yep5z6174 _1yep5z6175"},status:{complete:"_1yep5z6136",active:"_41r3q2u",incomplete:"_41r3q2v"}},defaultVariants:{},compoundVariants:[]}),ee=a({defaultClassName:"_1yep5z6ez",variantClassNames:{size:{sm:"_1yep5z610e",md:"_1yep5z610h"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),te=a({defaultClassName:"_41r3q28 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6mf _1yep5z6mh _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m0",variantClassNames:{size:{sm:"_41r3q29 _1yep5z610e",md:"_41r3q2a _1yep5z610h"},status:{complete:"_41r3q2b _1yep5z6136 _1yep5z611n",active:"_1yep5z612s _1yep5z611h _1yep5z6142",incomplete:"_1yep5z612s _1yep5z611h _1yep5z613z"},isDisabled:{true:"_41r3q2e"},isFocusVisible:{true:"_41r3q2f"}},defaultVariants:{},compoundVariants:[[{status:"complete",isDisabled:true},"_41r3q2g _1yep5z61pt _1yep5z61o6"],[{status:"active",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"],[{status:"incomplete",isDisabled:true},"_1yep5z61pb _1yep5z61o4 _1yep5z61qp"]]}),se=a({defaultClassName:"_41r3q23 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{variant:{condensed:"_1yep5z618j _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_41r3q25 _1yep5z6173 _1yep5z6174 _1yep5z6175"},isLast:{true:"_41r3q26"}},defaultVariants:{},compoundVariants:[]}),pe="_41r3q27 _1yep5z60 _1yep5z61 _1yep5z62 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m5",ae=a({defaultClassName:"_41r3q20 _1yep5z613 _1yep5z614 _1yep5z615 _1yep5z63f _1yep5z63g _1yep5z63h _1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z65r _1yep5z65s _1yep5z65t _1yep5z683 _1yep5z684 _1yep5z685 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z66x _1yep5z66y _1yep5z66z _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{variant:{condensed:"_1yep5z616i _1yep5z616j _1yep5z616k _1yep5z6vy _1yep5z6vz _1yep5z6w0",expanded:"_1yep5z616c _1yep5z616d _1yep5z616e _1yep5z618m _1yep5z618l _1yep5z6wy _1yep5z6wz _1yep5z6x0"}},defaultVariants:{},compoundVariants:[]}),ie="_41r3q2h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km _1yep5z69c _1yep5z69d _1yep5z69e",re=a({defaultClassName:"_1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]});function A(p,t,a){let{key:s}=p,{selectionManager:r,selectedKey:o}=t,d$1=!t.isSelectable(s),{itemProps:y}=d({isDisabled:d$1,key:s,ref:a,selectionManager:r});return {stepProps:{...y,role:"link","aria-current":o===s?"step":void 0,"aria-disabled":d$1?true:void 0,tabIndex:d$1?void 0:0}}}function le({state:p,item:t,size:a,variant:s,index:r,isLast:o,stepLabel:d,completedLabel:y}){let c=useRef(null),_=b(),{stepProps:m}=A({key:t.key},p,c),{hoverProps:k,isHovered:g}=a$8({}),{focusProps:h,isFocused:e,isFocusVisible:n}=a$9(),l=p.isCompleted(t.key),I=p.selectedKey===t.key,b$1=l?"complete":I?"active":"incomplete",L=p.disabledKeys.has(t.key),z=t["aria-label"],P=!!z&&!t.description,C=s==="expanded"&&!!t.title&&!P,x=s==="expanded"&&!!t.description,q=t.title||((typeof d=="function"?d({index:r+1}):d)??_.formatMessage(oe.step,{index:r+1})),i=y??_.formatMessage(oe.completed),v=a==="sm"?CheckmarkIcon:CheckmarkIcon$1;return jsxs("li",{className:a$3("BaselineUI-Stepper-Item",se({variant:s,isLast:o})),"data-status":b$1,children:[jsxs("a",{...c$1(m,k,h),ref:c,"aria-label":l&&z?[i,z].join(" "):z||void 0,className:a$3("BaselineUI-Stepper-StepLink",pe),"data-status":b$1,"data-hovered":g||void 0,"data-focused":e||void 0,"data-focus-visible":n||void 0,"data-disabled":L||void 0,children:[jsx("span",{className:a$3("BaselineUI-Stepper-Indicator",te({size:a,status:b$1,isDisabled:L,isFocusVisible:n})),"aria-hidden":"true",children:l?jsx(v,{}):jsx("span",{children:r+1})}),l?jsx(b$2,{children:i}):null,C?jsxs("span",{className:a$3("BaselineUI-Stepper-Text",ie),children:[jsx("span",{className:a$3("BaselineUI-Stepper-Title",re({size:a,isDisabled:L})),children:t.title}),x?jsx("span",{className:a$3("BaselineUI-Stepper-Description",ee({size:a,isDisabled:L})),children:t.description}):null]}):z?null:jsx(b$2,{children:q})]}),!o&&jsx("span",{className:a$3("BaselineUI-Stepper-Connector",$({variant:s,status:b$1})),"aria-hidden":"true"})]})}var oe=c({step:{defaultMessage:"Step {index}",id:"bui.stepper.step"},completed:{defaultMessage:"Completed",id:"bui.stepper.completed"}});var ne=fe.forwardRef(function(t,a){let{items:s,variant:r="expanded",size:o="md",selectedStep:d,defaultSelectedStep:y,onSelectionChange:c,lastCompletedStep:_,defaultLastCompletedStep:m,onLastCompletedStepChange:k,isDisabled:g,className:h,style:e,"aria-label":n,stepLabel:l,completedLabel:I}=t,b$1=b(),L=useMemo(()=>new Set(s.filter(i=>i.isDisabled).map(i=>i.key)),[s]),z=useMemo(()=>s.map(i=>jsx(a$1,{textValue:i.title??String(i.key),children:i.title??""},i.key)),[s]),P=useMemo(()=>new Map(s.map(i=>[i.key,i])),[s]),C=N({children:z,selectedKey:d,defaultSelectedKey:y,onSelectionChange:c,lastCompletedStep:_,defaultLastCompletedStep:m,onLastCompletedStepChange:k,disabledKeys:L,isDisabled:g}),x=a$2(a),{listProps:q}=w({children:z,"aria-label":n||b$1.formatMessage(Se.label)},C,x);return jsx("ol",{...q,ref:x,className:a$3("BaselineUI-Stepper",ae({variant:r}),h),style:e,"data-variant":r,"data-size":o,children:[...C.collection].map((i,v,de)=>{let V=P.get(i.key);return V?jsx(le,{state:C,item:V,size:o,variant:r,index:v,isLast:v===de.length-1,stepLabel:l,completedLabel:I},i.key):null})})});ne.displayName="Stepper";var Se=c({label:{defaultMessage:"Progress",id:"bui.stepper.label"}});export{ne as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a,b as b$1}from'./chunk-GQIS4QBN.mjs';import {b,j,h}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var C=16,g=50,O=30;function _({ref:s,isDisabled:f}){let S=useRef(null),w=useRef({isScrollableX:true,isScrollableY:true}),u=useRef({x:0,y:0}),o=useRef(void 0),R=useRef(0);useEffect(()=>{if(f||!s.current)return;let e=s.current,m=b(e),d=a(e)?e:b$1(e),v=m.getComputedStyle(d);S.current=d,w.current={isScrollableX:/(auto|scroll)/.test(v.overflowX),isScrollableY:/(auto|scroll)/.test(v.overflowY)};},[f,s]),useEffect(()=>{if(f||!s.current||!S.current)return;let e=S.current,m=()=>{if(!e)return;let{isScrollableX:t,isScrollableY:r}=w.current,{x:n,y:a}=u.current;t&&n!==0&&(e.scrollLeft+=n),r&&a!==0&&(e.scrollTop+=a),o.current=requestAnimationFrame(m);},d=(t,r)=>t<g?-O*(1-t/g):t>r-g?O*(1-(r-t)/g):0,v=(t,r,n,a)=>{let E=performance.now();if(E-R.current<C)return;let b=d(t,n),p=d(r,a);(b!==u.current.x||p!==u.current.y)&&(u.current={x:b,y:p},R.current=E,(b!==0||p!==0)&&!o.current&&(o.current=requestAnimationFrame(m)));},y=t=>{if(t.preventDefault(),!e)return;let r=t,n=e.getBoundingClientRect(),a=r.clientX-n.left,E=r.clientY-n.top;v(a,E,n.width,n.height);},c=new Set,l=()=>{c.clear(),u.current={x:0,y:0},o.current&&(cancelAnimationFrame(o.current),o.current=void 0);},h$1=t=>{let r=j(t);r&&c.add(r);},x=t=>{let r=j(t);r&&c.delete(r);for(let n of c)h(e,n)||c.delete(n);c.size===0&&l();};return e.addEventListener("dragenter",h$1),e.addEventListener("dragover",y),e.addEventListener("dragleave",x),e.addEventListener("dragend",l),e.addEventListener("drop",l),()=>{e.removeEventListener("dragenter",h$1),e.removeEventListener("dragover",y),e.removeEventListener("dragleave",x),e.removeEventListener("dragend",l),e.removeEventListener("drop",l),l();}},[f,s]);}export{_ as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-
|
|
1
|
+
import {a as a$6}from'./chunk-BTPAZDGG.mjs';import {a as a$4}from'./chunk-7SKQUEHP.mjs';import {b,d as d$1,a as a$5,c as c$2}from'./chunk-W6QO7FPZ.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {e,h,c,d,g}from'./chunk-AYQN3OH2.mjs';import {a}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$2}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-SVIYLH7R.mjs';import {createContext,forwardRef,useContext,useMemo,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$6}from'./chunk-EA6GA4WC.mjs';import {a as a$4}from'./chunk-CFLEBB
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var W=new WeakMap;function C(o,e,t){let{labelProps:n,inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}=a$6(o,e,t),{isIndeterminate:c}=o;return useEffect(()=>{t.current&&(t.current.indeterminate=!!c);}),{labelProps:c$1(n,useMemo(()=>({onMouseDown:s=>s.preventDefault()}),[])),inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}}function O(o,e,t){let n=a$4({isReadOnly:o.isReadOnly||e.isReadOnly,isSelected:e.isSelected(o.value),defaultSelected:e.defaultValue.includes(o.value),onChange(s){s?e.addValue(o.value):e.removeValue(o.value),o.onChange&&o.onChange(s);}}),{name:a,form:r,descriptionId:i,errorMessageId:l,validationBehavior:d}=W.get(e);d=o.validationBehavior??d;let{realtimeValidation:u}=d$1({...o,value:n.isSelected,name:void 0,validationBehavior:"aria"}),m=useRef(a$5),f=()=>{e.setInvalid(o.value,u.isInvalid?u:m.current);};useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,x=d==="native"?e.displayValidation:b,c=C({...o,isReadOnly:o.isReadOnly||e.isReadOnly,isDisabled:o.isDisabled||e.isDisabled,name:o.name||a,form:o.form||r,isRequired:o.isRequired??e.isRequired,validationBehavior:d,[c$2]:{realtimeValidation:b,displayValidation:x,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(s){m.current=s,f();}}},n,t);return {...c,inputProps:{...c.inputProps,"aria-describedby":[c.inputProps["aria-describedby"],e.isInvalid?l:null,i].filter(Boolean).join(" ")||void 0}}}var k=createContext(null);forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,k);let{validationErrors:n,validationBehavior:a="native",children:r,className:i,...l}=e$1;return jsx(h.form,{noValidate:a!=="native",...l,ref:t,className:i||"react-aria-Form",children:jsx(k.Provider,{value:{...e$1,validationBehavior:a},children:jsx(b.Provider,{value:n??{},children:r})})})});var re=createContext(null),
|
|
10
|
+
var W=new WeakMap;function C(o,e,t){let{labelProps:n,inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}=a$6(o,e,t),{isIndeterminate:c}=o;return useEffect(()=>{t.current&&(t.current.indeterminate=!!c);}),{labelProps:c$1(n,useMemo(()=>({onMouseDown:s=>s.preventDefault()}),[])),inputProps:a,descriptionProps:r,errorMessageProps:i,isSelected:l,isPressed:d,isDisabled:u,isReadOnly:m,isInvalid:f,validationErrors:b,validationDetails:x}}function O(o,e,t){let n=a$4({isReadOnly:o.isReadOnly||e.isReadOnly,isSelected:e.isSelected(o.value),defaultSelected:e.defaultValue.includes(o.value),onChange(s){s?e.addValue(o.value):e.removeValue(o.value),o.onChange&&o.onChange(s);}}),{name:a,form:r,descriptionId:i,errorMessageId:l,validationBehavior:d}=W.get(e);d=o.validationBehavior??d;let{realtimeValidation:u}=d$1({...o,value:n.isSelected,name:void 0,validationBehavior:"aria"}),m=useRef(a$5),f=()=>{e.setInvalid(o.value,u.isInvalid?u:m.current);};useEffect(f);let b=e.realtimeValidation.isInvalid?e.realtimeValidation:u,x=d==="native"?e.displayValidation:b,c=C({...o,isReadOnly:o.isReadOnly||e.isReadOnly,isDisabled:o.isDisabled||e.isDisabled,name:o.name||a,form:o.form||r,isRequired:o.isRequired??e.isRequired,validationBehavior:d,[c$2]:{realtimeValidation:b,displayValidation:x,resetValidation:e.resetValidation,commitValidation:e.commitValidation,updateValidation(s){m.current=s,f();}}},n,t);return {...c,inputProps:{...c.inputProps,"aria-describedby":[c.inputProps["aria-describedby"],e.isInvalid?l:null,i].filter(Boolean).join(" ")||void 0}}}var k=createContext(null);forwardRef(function(e$1,t){[e$1,t]=e(e$1,t,k);let{validationErrors:n,validationBehavior:a="native",children:r,className:i,...l}=e$1;return jsx(h.form,{noValidate:a!=="native",...l,ref:t,className:i||"react-aria-Form",children:jsx(k.Provider,{value:{...e$1,validationBehavior:a},children:jsx(b.Provider,{value:n??{},children:r})})})});var re=createContext(null),mo=createContext(null);createContext(null);var ie=createContext(null);var z=createContext(null);function ae(o,e){let{validationBehavior:t}=d(k)||{},n=o.validationBehavior??t??"native",a=useContext(ie),r=a$3(useMemo(()=>b$2(e,o.inputRef!==void 0?o.inputRef:null),[e,o.inputRef])),i={...g(o),children:typeof o.children=="function"?true:o.children,value:o.value,validationBehavior:n};return [a?O(i,a,r):C(i,a$4(o),r),r]}var xo=forwardRef(function(e$1,t){let{inputRef:n=null,...a}=e$1;[e$1,t]=e(a,t,re);let[r,i]=ae(e$1,n);return jsx(z.Provider,{value:{...r,inputRef:i,defaultClassName:"react-aria-Checkbox",isIndeterminate:e$1.isIndeterminate,isRequired:e$1.isRequired},children:jsx(ne,{...e$1,ref:t})})}),ne=forwardRef(function(e,t){let{labelProps:n,inputProps:a$3,isSelected:r,isDisabled:i,isReadOnly:l,isPressed:d,isInvalid:u,inputRef:m,defaultClassName:f,isIndeterminate:b,isRequired:x}=useContext(z),{isFocused:c$2,isFocusVisible:s,focusProps:J}=a(),K=i||l,{hoverProps:Q,isHovered:g}=a$1({...e,isDisabled:K}),T=c({...e,defaultClassName:f,values:{isSelected:r,isIndeterminate:b||false,isPressed:d,isHovered:g,isFocused:c$2,isFocusVisible:s,isDisabled:i,isReadOnly:l,isInvalid:u,isRequired:x||false}}),I=a$2(e,{global:true});return delete I.id,delete I.onClick,jsxs(h.label,{...c$1(I,n,Q,T),ref:t,slot:e.slot||void 0,"data-selected":r||void 0,"data-indeterminate":b||void 0,"data-pressed":d||void 0,"data-hovered":g||void 0,"data-focused":c$2||void 0,"data-focus-visible":s||void 0,"data-disabled":i||void 0,"data-readonly":l||void 0,"data-invalid":u||void 0,"data-required":x||void 0,children:[jsx(b$1,{elementType:"span",children:jsx("input",{...c$1(a$3,J),ref:m})}),T.children]})});export{re as a,mo as b,xo as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-R6TFTLMV.mjs';import {a as a$2}from'./chunk-UFN2OAM2.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$3}from'./chunk-2VY4FAOY.mjs';import {a as a$6}from'./chunk-4QBHQCCK.mjs';import {c as c$1}from'./chunk-HH4VLTF3.mjs';import {d,j}from'./chunk-KUDCYGII.mjs';import {a as a$5}from'./chunk-PPHSLODC.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$1}from'./chunk-6ZQE5SHE.mjs';import {a as a$4,j as j$1,b as b$1}from'./chunk-SD43KVTU.mjs';import {useRef,useCallback,useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var I=new WeakMap;function F(i,e){let r=I.get(i);if(!r)throw new Error("Unknown slider state");return `${r.id}-${e}`}function we(i,e,r){let{labelProps:T,fieldProps:V}=a(i),p=i.orientation==="vertical";I.set(e,{id:T.id??V.id,"aria-describedby":i["aria-describedby"],"aria-details":i["aria-details"]});let{direction:O}=b(),{addGlobalListener:a$5,removeGlobalListener:L}=a$1(),o=useRef(null),C=O==="rtl",s=useRef(null),{moveProps:P}=a$2({onMoveStart(){s.current=null;},onMove({deltaX:t,deltaY:b}){if(!r.current)return;let{height:f,width:x}=r.current.getBoundingClientRect(),u=p?f:x;s.current==null&&o.current!=null&&(s.current=e.getThumbPercent(o.current)*u);let c=p?b:t;if((p||C)&&(c=-c),s.current+=c,o.current!=null&&r.current){let S=a$3(s.current/u,0,1);e.setThumbPercent(o.current,S);}},onMoveEnd(){o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null);}}),E=useRef(void 0),D=(t,b,f,x)=>{if(r.current&&!i.isDisabled&&e.values.every((u,c)=>!e.isThumbDragging(c))){let u=b$1(t.currentTarget),{height:c,width:S,top:v,left:y}=r.current.getBoundingClientRect(),B=p?c:S,M=((p?x:f)-(p?v:y))/B;(O==="rtl"||p)&&(M=1-M);let d=e.getPercentValue(M),l,g=e.values.findIndex(n=>d-n<0);if(g===0)l=g;else if(g===-1)l=e.values.length-1;else {let n=e.values[g-1],h=e.values[g];Math.abs(n-d)<Math.abs(h-d)?l=g-1:l=g;}l>=0&&e.isThumbEditable(l)?(t.preventDefault(),o.current=l,e.setFocusedThumb(l),E.current=b,e.setThumbDragging(o.current,true),e.setThumbValue(l,d),a$5(u,"mouseup",m,false),a$5(u,"touchend",m,false),a$5(u,"pointerup",m,false)):o.current=null;}},m=t=>{let b=t.pointerId??t.changedTouches?.[0].identifier,f=b$1(t.currentTarget);b===E.current&&(o.current!=null&&(e.setThumbDragging(o.current,false),o.current=null),L(f,"mouseup",m,false),L(f,"touchend",m,false),L(f,"pointerup",m,false));};return "htmlFor"in T&&T.htmlFor&&(delete T.htmlFor,T.onClick=t=>{a$4(t.currentTarget).getElementById(F(e,0))?.focus(),d("keyboard");}),{labelProps:T,groupProps:{role:"group",...V},trackProps:c({onMouseDown(t){t.button!==0||t.altKey||t.ctrlKey||t.metaKey||D(t,void 0,t.clientX,t.clientY);},onPointerDown(t){t.pointerType==="mouse"&&(t.button!==0||t.altKey||t.ctrlKey||t.metaKey)||D(t,t.pointerId,t.clientX,t.clientY);},onTouchStart(t){D(t,t.changedTouches[0].identifier,t.changedTouches[0].clientX,t.changedTouches[0].clientY);},style:{position:"relative",touchAction:"none"}},P),outputProps:{htmlFor:e.values.map((t,b)=>F(e,b)).join(" "),"aria-live":"off"}}}function Xe(i,e){let{index:r=0,isRequired:T,validationState:V,isInvalid:p,trackRef:O,inputRef:a$4,orientation:L=e.orientation,name:o,form:C}=i,s=i.isDisabled||e.isDisabled,P=L==="vertical",{direction:E}=b(),{addGlobalListener:D,removeGlobalListener:m}=a$1(),t=I.get(e),{labelProps:b$2,fieldProps:f}=a({...i,id:F(e,r),"aria-labelledby":`${t.id} ${i["aria-labelledby"]??""}`.trim()}),x=e.values[r],u=useCallback(()=>{a$4.current&&a$5(a$4.current);},[a$4]),c$2=e.focusedThumb===r;useEffect(()=>{c$2&&u();},[c$2,u]);let S=E==="rtl",v=useRef(null),y=n=>{e.setThumbDragging(r,true),n(),e.setThumbDragging(r,false);},{keyboardProps:B}=j({shortcuts:{PageUp:()=>y(()=>{e.incrementThumb(r,e.pageSize);}),PageDown:()=>y(()=>{e.decrementThumb(r,e.pageSize);}),Home:()=>y(()=>{e.setThumbValue(r,e.getThumbMinValue(r));}),End:()=>y(()=>{e.setThumbValue(r,e.getThumbMaxValue(r));})},allowRepeats:true}),{moveProps:$}=a$2({onMoveStart(){v.current=null,e.setThumbDragging(r,true);},onMove({deltaX:n,deltaY:h,pointerType:R,shiftKey:X}){let{getThumbPercent:oe,setThumbPercent:le,decrementThumb:ue,incrementThumb:ae,step:Y,pageSize:_}=e;if(!O.current)return;let{width:se,height:ce}=O.current.getBoundingClientRect(),J=P?ce:se;if(v.current==null&&(v.current=oe(r)*J),R==="keyboard")n>0&&S||n<0&&!S||h>0?ue(r,X?_:Y):ae(r,X?_:Y);else {let G=P?h:n;(P||S)&&(G=-G),v.current+=G,le(r,a$3(v.current/J,0,1));}},onMoveEnd(){e.setThumbDragging(r,false);}});e.setThumbEditable(r,!s);let{focusableProps:q}=c$1(c(i,{onFocus:()=>e.setFocusedThumb(r),onBlur:()=>e.setFocusedThumb(void 0)}),a$4),z=useRef(void 0),M=n=>{u(),z.current=n,e.setThumbDragging(r,true);let h=b$1(a$4.current);D(h,"mouseup",d,false),D(h,"touchend",d,false),D(h,"pointerup",d,false);},d=n=>{if((n.pointerId??n.changedTouches?.[0].identifier)===z.current){u(),e.setThumbDragging(r,false);let R=b$1(a$4.current);m(R,"mouseup",d,false),m(R,"touchend",d,false),m(R,"pointerup",d,false);}},l=e.getThumbPercent(r);(P||E==="rtl")&&(l=1-l);let g=s?{}:c(B,$,{onMouseDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||M();},onPointerDown:n=>{n.button!==0||n.altKey||n.ctrlKey||n.metaKey||M(n.pointerId);},onTouchStart:n=>{M(n.changedTouches[0].identifier);}});return a$6(a$4,e.defaultValues[r],n=>{e.setThumbValue(r,n);}),{inputProps:c(q,f,{type:"range",tabIndex:s?void 0:0,min:e.getThumbMinValue(r),max:e.getThumbMaxValue(r),step:e.step,value:x,name:o,form:C,disabled:s,"aria-orientation":L,"aria-valuetext":e.getThumbValueLabel(r),"aria-required":T||void 0,"aria-invalid":p||V==="invalid"||void 0,"aria-errormessage":i["aria-errormessage"],"aria-describedby":[t["aria-describedby"],i["aria-describedby"]].filter(Boolean).join(" "),"aria-details":[t["aria-details"],i["aria-details"]].filter(Boolean).join(" "),onChange:n=>{e.setThumbValue(r,parseFloat(j$1(n).value));}}),thumbProps:{...g,style:{position:"absolute",[P?"top":"left"]:`${l*100}%`,transform:"translate(-50%, -50%)",touchAction:"none"}},labelProps:b$2,isDragging:e.isThumbDragging(r),isDisabled:s,isFocused:c$2}}export{we as a,Xe as b};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$k}from'./chunk-SBR5UAUY.mjs';import {a as a$m}from'./chunk-2AKHB7Y5.mjs';import {c as c$4}from'./chunk-JRCDMRIW.mjs';import {c as c$2}from'./chunk-XQC3DSTW.mjs';import {I,j,f,e,p,F,A,H,i,B,s,C,G,z,h,g,m,q,D,E,t,l,v,y,u,a as a$n,w,d,c as c$6,x,k,b as b$8,o,n,r}from'./chunk-676DOXEK.mjs';import {a as a$7,b as b$7,c as c$5,d as d$1}from'./chunk-FCKJCFMD.mjs';import {a as a$p}from'./chunk-43LOJ3SH.mjs';import {a as a$i}from'./chunk-PLZ6ZFEO.mjs';import {a as a$c}from'./chunk-O6FPWOHR.mjs';import {a as a$d}from'./chunk-DO5YROCG.mjs';import {b as b$5,e as e$1}from'./chunk-YYU46XNM.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$2,c as c$3}from'./chunk-7MLFM55C.mjs';import {b as b$4}from'./chunk-AFOW62QN.mjs';import {a as a$h}from'./chunk-O7XK2WIX.mjs';import {a as a$l}from'./chunk-DAI7V4TE.mjs';import {a as a$g}from'./chunk-VXZT2JR2.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-KX7WG3L4.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$9}from'./chunk-22MA6EYO.mjs';import {a as a$f}from'./chunk-VDUFLHKK.mjs';import {a as a$8}from'./chunk-22VRCVTH.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {b as b$1,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import so,{useCallback,useMemo,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {TextIcon,PlusIcon,MinusIcon}from'@baseline-ui/icons/20';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var no=so.forwardRef(({color:o,colorLabel:e,colorName:l,isIndeterminate:r,indeterminateIcon:t,noneLabel:n,...a$5},s)=>{let i=so.useRef(null),{hoverProps:c$2,isHovered:m}=a({isDisabled:a$5.isDisabled}),{buttonProps:d,isPressed:b$2}=a$1(a$5,i),{isFocusVisible:f$1,focusProps:I$1}=a$2(),M=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":f$1,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":b$2}),L=c(),y=c();return jsxs("button",{...c$1(d,c$2,I$1,M),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:f$1||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(s,i),id:L,"aria-labelledby":a$5["aria-labelledby"]||`${L} ${y}`,children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:n}),e?jsx("div",{className:j,id:y,"aria-hidden":"true",children:l}):typeof l=="string"&&jsx(b,{children:l})]})});no.displayName="ColorInputButton";var Ro=so.forwardRef(({className:o,style:e$1,icon:l,elementType:r="button",...t},n)=>{let a$6=so.useRef(null),{hoverProps:s,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:m}=a$1({...t,elementType:r},a$6),{isFocusVisible:d,focusProps:b}=a$2(),f=a$3({"data-block-id":t["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":t.isDisabled,"data-hovered":i,"data-pressed":m});return jsxs(r,{...c$1(a$5(r,t.isDisabled),c,s,b,f),ref:b$1(n,a$6),style:e$1,className:a$4(p({isHovered:i||m||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(l,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});Ro.displayName="IconColorInputButton";var Yo=so.forwardRef(({setColor:o,color:e,triggerRef:l,autoFocus:r,presets:t,state:n,isIndeterminate:a,colorPresetsLabel:s$1},i$1)=>{let{formatMessage:c}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let b=[...d][0],f=t.find(I=>I.id===b);a$6(f,"Preset not found"),o(f.id===F?null:a$7(f.id).toFormat(A)),n.close();}},[n,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:l.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:r,items:t,layout:"grid","aria-label":s$1??c(dt.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:a?[]:[e?.toString(B)||F],onSelectionChange:m,escapeKeyBehavior:"none"})})});Yo.displayName="ColorPresetList";var dt=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var $e=({value:o,...e})=>{let l=so.useRef(null),r=so.useRef(null),t=so.useRef(null),n=b$7({...e,value:o}),{colorAreaProps:a,xInputProps:s,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:l,inputYRef:r,containerRef:t},n);useEffect(()=>{l.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...a,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...c,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:l,...s,...m}),jsx("input",{ref:r,...i,...m})]})})};var Ye=({color:o$1,setColor:e,allowAlpha:l,...r})=>{let t=d$1({value:o$1,onChange:d=>{e(C(d)?.toFormat(A).withChannelValue("alpha",o$1.getChannelValue("alpha")??1)||z);}}),n$1=so.useRef(null),{inputProps:a$1}=b$8({...r,"aria-label":"Hex"},t,n$1),{focusProps:s,isFocused:i}=a$2({isTextInput:true}),{hoverProps:c,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"hexa":"hex",children:[jsx("input",{...c$1(a$1,s,c),ref:n$1,className:o({isFocused:i,isHovered:m,allowAlpha:l})}),l?jsx(Ge,{color:o$1,setColor:e}):null]})},qe=({color:o,setColor:e,allowAlpha:l})=>{let r$1=o.toFormat("rgba"),{locale:t}=b$3();return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"rgba":"rgb",children:[jsx(a$p,{"aria-label":o.getChannelName("red",t),value:r$1.getChannelValue("red"),showStepper:false,className:r,onChange:n=>{e(r$1.withChannelValue("red",n).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("green",t),value:r$1.getChannelValue("green"),showStepper:false,className:r,onChange:n=>{e(r$1.withChannelValue("green",n).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("blue",t),value:r$1.getChannelValue("blue"),showStepper:false,className:r,onChange:n=>{e(r$1.withChannelValue("blue",n).toFormat(A));},step:1,minValue:0,maxValue:255}),l?jsx(Ge,{color:o,setColor:e}):null]})},It={style:"percent",maximumFractionDigits:0},Ge=({color:o,setColor:e})=>{let{locale:l}=b$3(),r$1=useCallback(t=>{e(o.withChannelValue("alpha",t));},[o,e]);return jsx(a$p,{"aria-label":o.getChannelName("alpha",l),value:o.getChannelValue("alpha"),formatOptions:It,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var Jo=({channel:o,...e})=>{let{locale:l}=b$3(),r=c$5({...e,channel:o,locale:l}),t=so.useRef(null),n=so.useRef(null),{trackProps:a,thumbProps:s,inputProps:i}=c$6({...e,channel:o,trackRef:t,inputRef:n,"aria-label":r.value.getChannelName(o,l)},r),{focusProps:c,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...a,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:a.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"BaselineUI-ColorInput-ColorSliderThumb"),...s,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:n,...i,...c})})]})]})};var Fo=({color:o,setColor:e,allowAlpha:l,colorFormatLabel:r,onChangeEnd:t})=>{let[n,a]=so.useState("hex"),{formatMessage:s}=b$2();return jsxs(Fragment,{children:[jsx($e,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:t}),jsxs("div",{className:v,children:[jsx(Jo,{channel:"hue",value:o,onChange:e,onChangeEnd:t}),l?jsx(Jo,{channel:"alpha",value:o,onChange:e,onChangeEnd:t}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$4,{label:r??s(Pt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:n,onSelectionChange:i=>{a(i);}}),n==="hex"&&jsx(Ye,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l}),n==="rgb"&&jsx(qe,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l})]})]})},Pt=c$3({colorFormat:{defaultMessage:"Color Format",id:"bui.colorInput.colorFormat"}});var je=({color:o,setColor:e,storePickedColorKey:l$1,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:n,addLabel:a,cancelLabel:s$1,newColorLabel:i$1,colorFormatLabel:c$1,pickerMode:m$1,allowAlpha:d,isIndeterminate:b})=>{let{locale:f}=b$3(),{formatMessage:I}=b$2(),M=so.useRef(null),L=a$j(M.current),[y,T]=a$k(l$1,[]),C=so.useMemo(()=>Array.isArray(y)?y.filter(p=>Ft(p)):[],[y]),J=so.useRef(null),[A$1,Mo]=so.useState(o),To=so.useMemo(()=>C.map(p=>({id:p,label:a$7(p).getColorName(f),description:p})),[C,f]),Q=useCallback(()=>{let p=m$1==="active"?o:A$1;if(C.includes(p.toString(B))){J.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}T([...C,p.toString(B)]);},[C,o,T,A$1,m$1]);useEffect(()=>{let p=J.current;function O(k){k.animationName===u&&j$2(k)?.classList.remove(t);}return p?.addEventListener("animationend",O),()=>{p?.removeEventListener("animationend",O);}},[]);let po=c(),N=jsx(a$l,{ref:M,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:m$1==="active"?Q:void 0}),uo=useCallback(p=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??I(jo.newColor),children:[jsx(Fo,{color:A$1,setColor:Mo,allowAlpha:d,colorFormatLabel:c$1}),jsx(a$e,{}),jsx(a$h,{padding:"lg",display:"flex",flexDirection:"row-reverse",children:jsxs(a$h,{display:"inline-flex",gap:"lg",children:[jsx(b$4,{label:s$1??I(jo.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??I(jo.add),variant:"primary",onPress:()=>{Q(),p();},size:"sm"})]})})]}),[A$1,Q,I,d,i$1,c$1,s$1,a]),Ao=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let O=[...p][0];O&&e(a$7(O).toFormat(A));},[e]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:po,children:n}),jsxs(a$h,{display:"flex",children:[!!C.length&&C.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{T(C.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&N,m$1==="lazy"&&(L==="mobile"?jsxs(b$5,{children:[jsx(a$m,{children:N}),jsx(e$1,{style:{zIndex:1e5},children:({close:p})=>uo(p)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:N}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:p})=>uo(p)})]}))]})]}),!!C.length&&jsx(c$2,{items:To,layout:"grid","aria-labelledby":po,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:J,autoFocus:false,selectionMode:"single",selectedKeys:b?[]:[o.toString(B)],onSelectionChange:Ao})]})},jo=c$3({newColor:{defaultMessage:"New Custom Color",id:"bui.colorInput.newColor"},cancel:{defaultMessage:"Cancel",id:"bui.colorInput.cancel"},add:{defaultMessage:"Add",id:"bui.colorInput.add"}});function Ft(o){if(typeof o!="string")return false;try{return a$7(o),!0}catch{return false}}function et({colorLabel:o,color:e,presets:l,isIndeterminate:r,indeterminateLabel:t,transparentLabel:n}){let{formatMessage:a}=b$2(),{locale:s}=b$3(),i=useMemo(()=>r?{id:"indeterminate",label:t??a(ot.indeterminate)}:l.find(d=>d.id===F?!e:e?D(e,a$7(d.id)):false),[l,e,r,a,t]),c=useMemo(()=>{if(typeof o=="function")return o?.(e,{isIndeterminate:!!r});if(typeof o=="boolean")return o?E(e,i,n??a(ot.transparent)):false;throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,a,i,r,n]),m=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(s);},[e,s,i?.label]);return {colorName:c,humanReadableName:m}}var ot=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var xo=so.forwardRef(({className:o,style:e,allowRemoval:l,allowAlpha:r=true,presets:t,labelPosition:n="top",colorLabel:a=true,includePicker:s=true,onChange:i,onChangeEnd:c$2,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:b,addColorButtonLabel:f,removeColorButtonLabel:I,customColorsLabel:M,addLabel:L,cancelLabel:y,newColorLabel:T,colorFormatLabel:C$1,colorPresetsLabel:J,noColorLabel:A,indeterminateLabel:Mo,transparentLabel:To,onTriggerPress:Q,renderTriggerButton:po=({isOpen:X,color:Oo,ref:$,colorName:Do,triggerProps:Ho,labelId:ko,isIndeterminate:w,indeterminateIcon:Z,noneLabel:E})=>jsx(no,{...c$1(Ho,{...P.label?{"aria-labelledby":ko}:{"aria-label":P["aria-label"]}}),ref:$,isOpen:X,isDisabled:P.isDisabled,labelPosition:n,color:Oo,colorLabel:a,colorName:Do,isIndeterminate:w,indeterminateIcon:Z,noneLabel:E}),pickerMode:N="active",offset:uo=2,placement:Ao=n==="start"?"bottom end":"bottom start","data-block-id":p,"data-block-class":O,isIndeterminate:k,indeterminateIcon:at,...P},nt)=>{let X=so.useRef(null),Oo=so.useRef(null),$=a$8(P),{triggerProps:Do,overlayProps:Ho}=a$9({type:"listbox"},$,X),ko=a$a(P.portalContainer),[w,Z]=a$b(b===void 0?void 0:C(b),C(m$1),v=>i?.(v?.toFormat("rgba")||null)),{formatMessage:E}=b$2(),wo=useMemo(()=>G(A??E(So.noColor),t),[t,E,A]),Eo=c(),{colorName:st}=et({colorLabel:a,color:w,presets:wo,isIndeterminate:k,indeterminateLabel:Mo,transparentLabel:To}),re=useMemo(()=>wo.filter(v=>l||v.id!==F),[wo,l]),it=f||E(So.addColor),mt=I||E(So.removeColor),pt=M||E(So.customColors),le=jsx(je,{color:w||z,setColor:v=>{Z(v),c$2?.(v?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:it,removeColorButtonLabel:mt,customColorsLabel:pt,addLabel:L,cancelLabel:y,newColorLabel:T,colorFormatLabel:C$1,pickerMode:N,allowAlpha:r,isIndeterminate:!!k});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:n==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":p,"data-block-class":O,style:e,ref:nt,children:[P.label?jsx("label",{id:Eo,className:h({labelPosition:n}),children:P.label}):null,po({isOpen:$.isOpen,color:w,ref:X,colorName:st,triggerProps:c$1(Do,{onPress:Q}),labelId:Eo,isIndeterminate:k,indeterminateIcon:at,noneLabel:A})]}),jsx(a$c,{...P,portalContainer:ko,placement:Ao,state:$,offset:uo,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:X,overlayProps:Ho,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:s}),ref:Oo,"aria-labelledby":P.label?Eo:void 0,"aria-label":P["aria-label"],children:[s&&N==="active"?jsxs(Fragment,{children:[jsx(Fo,{color:w||z,setColor:Z,allowAlpha:r,colorFormatLabel:C$1,onChangeEnd:v=>{c$2?.(v?.toFormat("rgba")||null);}}),le]}):null,!!re.length&&jsxs(Fragment,{children:[s&&N==="active"?jsx(a$e,{}):null,jsx(Yo,{autoFocus:s&&N==="active"?false:"first",state:$,triggerRef:X,presets:re,colorPresetsLabel:J,color:w,setColor:v=>{Z(v),c$2?.(v?.toFormat("rgba")||null);},isIndeterminate:!!k})]}),s&&N==="lazy"?le:null]})})]})});xo.displayName="ColorInput";var So=c$3({addColor:{defaultMessage:"Add Color",id:"bui.colorInput.addColor"},removeColor:{defaultMessage:"Remove Color",id:"bui.colorInput.removeColor"},customColors:{defaultMessage:"Custom Colors",id:"bui.colorInput.customColors"},noColor:{defaultMessage:"None",id:"bui.colorInput.noColor"}});var lt=so.forwardRef(({className:o,style:e,icon:l,variant:r="standard","data-block-id":t,tooltip:n=true,iconTooltip:a=true,...s},i)=>{let c=so.useRef(null),{tooltipProps:m}=a$f({label:s["aria-label"],tooltip:n}),d=useCallback(({isOpen:b,color:f,ref:I,colorName:M,triggerProps:L,isIndeterminate:y,indeterminateIcon:T,noneLabel:C})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...L,"aria-label":s["aria-label"],ref:I,isOpen:b,isDisabled:s.isDisabled,color:f,colorLabel:false,colorName:M,isIndeterminate:y,indeterminateIcon:T,noneLabel:C}):jsx(Ro,{...L,isOpen:b,icon:TextIcon,color:f?.toString("hexa"),ref:I,isDisabled:s.isDisabled,"aria-label":s["aria-label"],isIndeterminate:y,indeterminateIcon:T})}),[s,m,r]);return jsxs(a$h,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":t,style:e,ref:b$1(i,c),children:[r==="standard"&&l?jsx(a$i,{icon:l,label:s["aria-label"],tooltip:a,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(xo,{...s,colorLabel:false,renderTriggerButton:d})]})});lt.displayName="IconColorInput";export{Ro as a,xo as b,lt as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {e}from'./chunk-GMALMQWI.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-SVIYLH7R.mjs';import {a}from'./chunk-ETM4MNG4.mjs';import {h,j,a as a$2,i}from'./chunk-SD43KVTU.mjs';import {useState,useRef}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function E(u,n){let{"aria-label":c,"aria-labelledby":A,orientation:o="horizontal",isSingleTabStop:y=true}=u,[i$1,H]=useState(false);a(()=>{H(!!(n.current&&n.current.parentElement?.closest('[role="toolbar"]')));});let{direction:v}=b(),b$1=v==="rtl"&&o==="horizontal",t=e(n),M=e=>{if(h(e.currentTarget,j(e))){if(o==="horizontal"&&e.key==="ArrowRight"||o==="vertical"&&e.key==="ArrowDown")b$1?t.focusPrevious():t.focusNext();else if(o==="horizontal"&&e.key==="ArrowLeft"||o==="vertical"&&e.key==="ArrowUp")b$1?t.focusNext():t.focusPrevious();else if(e.key==="Tab"){if(!y)return;e.stopPropagation();let r=a$2(n.current);a$3.current=i(r),e.shiftKey?t.focusFirst():t.focusLast();return}else return;e.stopPropagation(),e.preventDefault();}},a$3=useRef(null),P=e=>{let r=e.relatedTarget;(r===null||!h(e.currentTarget,r))&&!a$3.current&&(a$3.current=j(e));},x=e=>{let r=e.relatedTarget,f=r===null||!h(e.currentTarget,r),w=h(n.current,j(e));a$3.current&&f&&w&&(a$3.current?.focus(),a$3.current=null);};return {toolbarProps:{...a$1(u,{labelable:true}),role:i$1?"group":"toolbar","aria-orientation":o,"aria-label":c,"aria-labelledby":c==null?A:void 0,onKeyDownCapture:i$1?void 0:M,onFocusCapture:i$1?void 0:x,onBlurCapture:i$1?void 0:P}}}export{E as a};
|