@baseline-ui/core 3.9.1 → 3.10.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.mjs +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Breadcrumbs.mjs +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.css +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Group.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.mjs +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.mjs +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/Markdown.css +1 -1
- package/dist/Markdown.mjs +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +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.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/ProgressSpinner.mjs +1 -1
- package/dist/RadioGroup.css +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.css +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +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.mjs +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-E3TD3EJQ.mjs → chunk-23OLSA2X.mjs} +2 -2
- package/dist/{chunk-X6K4M542.mjs → chunk-24WOG72O.mjs} +2 -2
- package/dist/{chunk-YK3KAPIK.mjs → chunk-2CFMM7MZ.mjs} +2 -2
- package/dist/{chunk-WSRXTVYB.mjs → chunk-2KRVQJDA.mjs} +2 -2
- package/dist/{chunk-SCJ3RG7B.mjs → chunk-2MNK24YJ.mjs} +1 -1
- package/dist/{chunk-3PBFSDMT.mjs → chunk-2PTLJDIT.mjs} +1 -1
- package/dist/{chunk-YSQ3YHJN.mjs → chunk-2TMQUHHU.mjs} +1 -1
- package/dist/chunk-3A7ZISTE.mjs +10 -0
- package/dist/{chunk-DOFT4BQH.mjs → chunk-3EFE2WAJ.mjs} +1 -1
- package/dist/{chunk-CKUHFL5G.mjs → chunk-3HJAQJWA.mjs} +1 -1
- package/dist/chunk-3IHIKAT4.mjs +10 -0
- package/dist/chunk-3JHXI33A.mjs +10 -0
- package/dist/chunk-3K6XNSYE.mjs +10 -0
- package/dist/chunk-3LS73XVI.mjs +10 -0
- package/dist/chunk-3P25UGHE.mjs +10 -0
- package/dist/{chunk-BFW26T6V.mjs → chunk-43U6RZ5C.mjs} +2 -2
- package/dist/{chunk-54MWEZUP.mjs → chunk-46UWKP7W.mjs} +1 -1
- package/dist/chunk-4CMATAQ2.mjs +10 -0
- package/dist/{chunk-F3EOLTFM.mjs → chunk-4FN6UAXD.mjs} +1 -1
- package/dist/{chunk-NWYRVUTX.mjs → chunk-4Y5IKZSW.mjs} +1 -1
- package/dist/{chunk-26YOMQXV.mjs → chunk-5B6263RO.mjs} +13 -13
- package/dist/{chunk-WAPBLICF.mjs → chunk-5NVCSLXT.mjs} +1 -1
- package/dist/{chunk-OBEPT4LR.mjs → chunk-5YV74V36.mjs} +1 -1
- package/dist/{chunk-VWSTMBQK.mjs → chunk-64Y62MDR.mjs} +2 -2
- package/dist/{chunk-IVM5IBQS.mjs → chunk-6DVKR25T.mjs} +1 -1
- package/dist/{chunk-ADEALCJB.mjs → chunk-6IK2TDLH.mjs} +2 -2
- package/dist/{chunk-ES3IQZSH.mjs → chunk-6V7S5IG5.mjs} +2 -2
- package/dist/chunk-6VKIT2PF.mjs +10 -0
- package/dist/{chunk-OGIKNHLU.mjs → chunk-7EOAYPSZ.mjs} +2 -2
- package/dist/{chunk-LZEZW5RE.mjs → chunk-7LQTLZJ5.mjs} +2 -2
- package/dist/{chunk-IOHULFEP.mjs → chunk-A4PXU7GU.mjs} +2 -2
- package/dist/chunk-A52PIXOO.mjs +10 -0
- package/dist/chunk-AANAI2XF.mjs +10 -0
- package/dist/{chunk-UQJB6AGO.mjs → chunk-AB7LDKP2.mjs} +1 -1
- package/dist/{chunk-BPLTQDXX.mjs → chunk-ACHYZYVA.mjs} +2 -2
- package/dist/{chunk-JB3UIJ3I.mjs → chunk-AFJ3QV2Q.mjs} +2 -2
- package/dist/{chunk-NQVTVL24.mjs → chunk-AIG23SN5.mjs} +2 -2
- package/dist/chunk-ASIKCQC6.mjs +10 -0
- package/dist/{chunk-WGZUNJGH.mjs → chunk-AU3GNNEG.mjs} +2 -2
- package/dist/{chunk-45EAFDOZ.mjs → chunk-AYBI4SQV.mjs} +1 -1
- package/dist/chunk-BJHDL2HH.mjs +10 -0
- package/dist/chunk-BNWDQ4KX.mjs +10 -0
- package/dist/{chunk-QSFRMY47.mjs → chunk-BPXZ6J5G.mjs} +1 -1
- package/dist/{chunk-2UDXAKWA.mjs → chunk-C6TD53KY.mjs} +2 -2
- package/dist/chunk-CBQO7JUC.mjs +11 -0
- package/dist/{chunk-LN2NT32E.mjs → chunk-CE2W5D44.mjs} +1 -1
- package/dist/{chunk-UR42GQO4.mjs → chunk-CEUVH4UZ.mjs} +1 -1
- package/dist/chunk-CGBI7OB5.mjs +10 -0
- package/dist/chunk-CMM5JW7L.mjs +10 -0
- package/dist/chunk-CPX5CB4L.mjs +10 -0
- package/dist/{chunk-HMAVZPRE.mjs → chunk-CRNJAQPI.mjs} +1 -1
- package/dist/chunk-DIMNDTFC.mjs +10 -0
- package/dist/{chunk-KADD66HZ.mjs → chunk-DNZMQ7EA.mjs} +2 -2
- package/dist/{chunk-RFCTQQMD.mjs → chunk-DP76DMVO.mjs} +1 -1
- package/dist/{chunk-DZFNVFYT.mjs → chunk-EGSNIMDP.mjs} +1 -1
- package/dist/chunk-EHIGJYGW.mjs +10 -0
- package/dist/{chunk-U6M2GCPD.mjs → chunk-EJGGWOY5.mjs} +1 -1
- package/dist/chunk-EKRT3PPK.mjs +10 -0
- package/dist/{chunk-FDDB7QNQ.mjs → chunk-ELW6SXDM.mjs} +1 -1
- package/dist/{chunk-YQFS4UHL.mjs → chunk-EPWWEFTP.mjs} +1 -1
- package/dist/{chunk-VDUFLHKK.mjs → chunk-EYKQGC4O.mjs} +2 -2
- package/dist/{chunk-PLRUMLNB.mjs → chunk-FFPJBDWH.mjs} +1 -1
- package/dist/{chunk-KFJE5ZBK.mjs → chunk-G2IYZES5.mjs} +1 -1
- package/dist/chunk-G2RVM2KB.mjs +10 -0
- package/dist/{chunk-AALXW5AP.mjs → chunk-GAKWWL3Y.mjs} +1 -1
- package/dist/chunk-GHKMHXQ3.mjs +10 -0
- package/dist/{chunk-VYBJ36ZR.mjs → chunk-GJVQMTGA.mjs} +1 -1
- package/dist/chunk-GKPZBTRE.mjs +10 -0
- package/dist/{chunk-TN7FPPGM.mjs → chunk-GZTF5YE3.mjs} +1 -1
- package/dist/{chunk-RXADOJLS.mjs → chunk-HI56YXPJ.mjs} +2 -2
- package/dist/{chunk-R7Y36JCO.mjs → chunk-HOG4QRLG.mjs} +1 -1
- package/dist/chunk-HOV7MM7M.mjs +10 -0
- package/dist/{chunk-XKNL5LSL.mjs → chunk-HOZPCWCF.mjs} +2 -2
- package/dist/{chunk-IBBDZQPO.mjs → chunk-HVSDXCZP.mjs} +2 -2
- package/dist/{chunk-64ZD4EKW.mjs → chunk-I4F5NJUI.mjs} +1 -1
- package/dist/{chunk-DLJHL4V7.mjs → chunk-I5YPTKMM.mjs} +2 -2
- package/dist/chunk-IHCKLMWD.mjs +10 -0
- package/dist/chunk-IIYP5UE7.mjs +10 -0
- package/dist/{chunk-A2B2LTRA.mjs → chunk-IQ3Z6ZO2.mjs} +1 -1
- package/dist/{chunk-3COKCTB2.mjs → chunk-J4T6TE7V.mjs} +2 -2
- package/dist/{chunk-OS6PVCFX.mjs → chunk-JANI446W.mjs} +1 -1
- package/dist/{chunk-KSWXLIZH.mjs → chunk-JGKBJHX2.mjs} +1 -1
- package/dist/chunk-JQSZFPWJ.mjs +10 -0
- package/dist/{chunk-IDIZSV2Y.mjs → chunk-JYWJE6L5.mjs} +2 -2
- package/dist/{chunk-ARMWQYH2.mjs → chunk-KDNT54DP.mjs} +2 -2
- package/dist/{chunk-KMSNBINF.mjs → chunk-L42WN3AP.mjs} +2 -2
- package/dist/{chunk-SY24O432.mjs → chunk-L4MQCPRT.mjs} +3 -3
- package/dist/chunk-L7GYT3MC.mjs +10 -0
- package/dist/{chunk-6CSP66NI.mjs → chunk-LGE4377M.mjs} +1 -1
- package/dist/chunk-LJAVEZ2H.mjs +10 -0
- package/dist/{chunk-JDDA4R2D.mjs → chunk-LJM26E7W.mjs} +1 -1
- package/dist/chunk-LNEOOIXS.mjs +10 -0
- package/dist/{chunk-VSGVHATE.mjs → chunk-LPHX7UMQ.mjs} +1 -1
- package/dist/{chunk-L6ISOTLH.mjs → chunk-LZOXWIAS.mjs} +2 -2
- package/dist/{chunk-W3YUV7IF.mjs → chunk-M3NJURGR.mjs} +1 -1
- package/dist/{chunk-IIBBR266.mjs → chunk-MMLAKHLR.mjs} +3 -3
- package/dist/{chunk-Z7JRM3NW.mjs → chunk-MQCTOCK2.mjs} +2 -2
- package/dist/{chunk-X34RHNLT.mjs → chunk-NIAMDJYU.mjs} +2 -2
- package/dist/{chunk-WD2TPSZV.mjs → chunk-NIGOM3FD.mjs} +1 -1
- package/dist/{chunk-6NUHEJGL.mjs → chunk-NOTKA3RL.mjs} +1 -1
- package/dist/chunk-NYH6JQMA.mjs +10 -0
- package/dist/{chunk-SZNDCHMJ.mjs → chunk-OFEX3RHY.mjs} +1 -1
- package/dist/{chunk-GLIN7JAI.mjs → chunk-OJIOLYTM.mjs} +1 -1
- package/dist/chunk-OWXMAVXI.mjs +10 -0
- package/dist/chunk-OY57K37D.mjs +10 -0
- package/dist/{chunk-OO3ZVB2T.mjs → chunk-OYE6VSTU.mjs} +2 -2
- package/dist/{chunk-GIUNLLWW.mjs → chunk-P3RRGPNM.mjs} +2 -2
- package/dist/{chunk-GPT4DR4P.mjs → chunk-PGDGNOYE.mjs} +1 -1
- package/dist/{chunk-DPFX25HC.mjs → chunk-PITIJLE3.mjs} +1 -1
- package/dist/{chunk-RSKKEGJZ.mjs → chunk-PPGEEMZ2.mjs} +2 -2
- package/dist/{chunk-UKBBSYRC.mjs → chunk-PTL6NSYA.mjs} +2 -2
- package/dist/chunk-PV4E7XDP.mjs +10 -0
- package/dist/chunk-PZBJGZ57.mjs +10 -0
- package/dist/chunk-Q5SN5AQT.mjs +10 -0
- package/dist/{chunk-EISLHUT5.mjs → chunk-Q7BJGV4I.mjs} +1 -1
- package/dist/{chunk-R5JHN4X6.mjs → chunk-QDMG3P5Z.mjs} +1 -1
- package/dist/{chunk-RE7ZGPOY.mjs → chunk-QMFL5BMI.mjs} +1 -1
- package/dist/{chunk-JTGVIAOK.mjs → chunk-QMP72J5L.mjs} +1 -1
- package/dist/chunk-QMSBDXK6.mjs +10 -0
- package/dist/{chunk-JIGOXUY4.mjs → chunk-QPWBJW2X.mjs} +1 -1
- package/dist/{chunk-67QIBKUN.mjs → chunk-QRLUWOGW.mjs} +1 -1
- package/dist/{chunk-FTV6OWMI.mjs → chunk-QSNYILCF.mjs} +2 -2
- package/dist/chunk-QVXIFV7W.mjs +10 -0
- package/dist/{chunk-M7BCIQ2J.mjs → chunk-QYU7CWJD.mjs} +1 -1
- package/dist/{chunk-JC22ELJM.mjs → chunk-RGWXVYDG.mjs} +1 -1
- package/dist/{chunk-N4NDPTX6.mjs → chunk-RKPWFZB4.mjs} +1 -1
- package/dist/chunk-RM64ROGL.mjs +10 -0
- package/dist/{chunk-CIOPWCOS.mjs → chunk-RPV3UUIN.mjs} +2 -2
- package/dist/chunk-RS7TRDRM.mjs +10 -0
- package/dist/{chunk-CHBF3XQ6.mjs → chunk-S2MA4MRM.mjs} +1 -1
- package/dist/chunk-S3LWWMMQ.mjs +10 -0
- package/dist/{chunk-WID7IWNC.mjs → chunk-SL5Q4NLV.mjs} +1 -1
- package/dist/{chunk-A63HMTSM.mjs → chunk-SMPF53W4.mjs} +1 -1
- package/dist/{chunk-5MR5L5JZ.mjs → chunk-SQPWV3OX.mjs} +2 -2
- package/dist/chunk-ST3TDAOP.mjs +10 -0
- package/dist/{chunk-ENUU2IVX.mjs → chunk-SUJD4QFW.mjs} +1 -1
- package/dist/{chunk-OKEXEU3C.mjs → chunk-T7K4WI76.mjs} +1 -1
- package/dist/{chunk-DFMPVQM3.mjs → chunk-TJDL7HT5.mjs} +2 -2
- package/dist/{chunk-SI7LO2L4.mjs → chunk-TK33MBDB.mjs} +1 -1
- package/dist/{chunk-BK3RBPST.mjs → chunk-TLUB6FCT.mjs} +1 -1
- package/dist/{chunk-UBC32WQB.mjs → chunk-TMGB4HZ7.mjs} +1 -1
- package/dist/{chunk-ALMW6S4I.mjs → chunk-TQMBJFQC.mjs} +2 -2
- package/dist/{chunk-E6DZSC2G.mjs → chunk-TUSG5ZRW.mjs} +2 -2
- package/dist/{chunk-D2NVLRIU.mjs → chunk-TZSRU3GG.mjs} +1 -1
- package/dist/{chunk-WXILHRBE.mjs → chunk-U5XI3CZD.mjs} +1 -1
- package/dist/chunk-U6W7D7TT.mjs +10 -0
- package/dist/chunk-UC6WAEPH.mjs +10 -0
- package/dist/{chunk-TGLVJRZE.mjs → chunk-UXAMVDQ4.mjs} +1 -1
- package/dist/chunk-V2C4UDOC.mjs +10 -0
- package/dist/{chunk-5LGYS5CZ.mjs → chunk-V3DTS6FF.mjs} +1 -1
- package/dist/{chunk-AC44TKUI.mjs → chunk-V6ZIMZ53.mjs} +1 -1
- package/dist/{chunk-B5NICAFU.mjs → chunk-VGBHKFW7.mjs} +1 -1
- package/dist/{chunk-BSFG32AL.mjs → chunk-VOWLLVPD.mjs} +2 -2
- package/dist/chunk-W4DOEGYH.mjs +10 -0
- package/dist/chunk-WJBURR7M.mjs +10 -0
- package/dist/{chunk-MUQR2YER.mjs → chunk-WN4QRMX6.mjs} +2 -2
- package/dist/chunk-WSDEMATI.mjs +10 -0
- package/dist/{chunk-UPOQXYUI.mjs → chunk-XDORZSJQ.mjs} +1 -1
- package/dist/{chunk-6HTOSJOJ.mjs → chunk-Y5LEKSMM.mjs} +1 -1
- package/dist/{chunk-3JOOFCEF.mjs → chunk-YI5VNFT4.mjs} +2 -2
- package/dist/{chunk-PQIDCA7P.mjs → chunk-YYOOJMQZ.mjs} +1 -1
- package/dist/chunk-ZNZBHN2V.mjs +10 -0
- package/dist/chunk-ZOCNDYUQ.mjs +10 -0
- package/dist/{chunk-E2VXJPSE.mjs → chunk-ZRPR4V5U.mjs} +1 -1
- package/dist/chunk-ZY3ZKJVD.mjs +10 -0
- package/dist/{chunk-4PZGQTXE.mjs → chunk-ZZGRLSEK.mjs} +2 -2
- package/dist/hooks/useCommitEffect.mjs +1 -0
- 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/useLocalStorage.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 +116 -40
- package/dist/index.js +22 -22
- package/dist/index.mjs +1 -1
- package/dist/react-aria.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/objects.mjs +1 -1
- package/package.json +4 -4
- package/sbom.json +6 -6
- package/dist/chunk-2SKD7TKS.mjs +0 -10
- package/dist/chunk-35AM4QEA.mjs +0 -10
- package/dist/chunk-3V4W6OGG.mjs +0 -10
- package/dist/chunk-4HOAPQDQ.mjs +0 -10
- package/dist/chunk-5GZAORDK.mjs +0 -10
- package/dist/chunk-6PBBHYCA.mjs +0 -10
- package/dist/chunk-B3W7VMJR.mjs +0 -10
- package/dist/chunk-C4XJOYAW.mjs +0 -10
- package/dist/chunk-CR66GYHT.mjs +0 -10
- package/dist/chunk-D6AOHRAV.mjs +0 -10
- package/dist/chunk-DHZKZ3AV.mjs +0 -10
- package/dist/chunk-DRQHSYY3.mjs +0 -10
- package/dist/chunk-DZJTPX2G.mjs +0 -10
- package/dist/chunk-F4YBUGLD.mjs +0 -10
- package/dist/chunk-G76NJ3IU.mjs +0 -10
- package/dist/chunk-H2SJLW7T.mjs +0 -10
- package/dist/chunk-HNKEI45D.mjs +0 -10
- package/dist/chunk-INHZHYOF.mjs +0 -10
- package/dist/chunk-J7BCMF23.mjs +0 -10
- package/dist/chunk-JXJZIKEY.mjs +0 -10
- package/dist/chunk-K276BGP2.mjs +0 -10
- package/dist/chunk-KBLJ34QI.mjs +0 -10
- package/dist/chunk-KMZ3YVPE.mjs +0 -10
- package/dist/chunk-L5H5GE3H.mjs +0 -10
- package/dist/chunk-LHLY432N.mjs +0 -10
- package/dist/chunk-LXZOYBTL.mjs +0 -10
- package/dist/chunk-MPJXTZ6L.mjs +0 -10
- package/dist/chunk-MZIQ27JP.mjs +0 -10
- package/dist/chunk-NN6HKMC4.mjs +0 -10
- package/dist/chunk-NYNS3UDR.mjs +0 -10
- package/dist/chunk-OAOIUNNG.mjs +0 -10
- package/dist/chunk-OMCGORTH.mjs +0 -10
- package/dist/chunk-PJINRIA6.mjs +0 -10
- package/dist/chunk-PSUZMSD3.mjs +0 -10
- package/dist/chunk-Q3FYMLAA.mjs +0 -10
- package/dist/chunk-QKNNMY2Q.mjs +0 -10
- package/dist/chunk-QVFGEXDU.mjs +0 -10
- package/dist/chunk-SJRYJGTL.mjs +0 -10
- package/dist/chunk-SYA6LAFU.mjs +0 -10
- package/dist/chunk-TEQHGF4G.mjs +0 -10
- package/dist/chunk-UCRJ3AR5.mjs +0 -10
- package/dist/chunk-UI4SJCQU.mjs +0 -10
- package/dist/chunk-V6DZG4PM.mjs +0 -11
- package/dist/chunk-VKWXATZ3.mjs +0 -10
- package/dist/chunk-VNJDCKLQ.mjs +0 -10
- package/dist/chunk-VQ45RUYJ.mjs +0 -10
- package/dist/chunk-VQHI3ZCW.mjs +0 -10
- package/dist/chunk-XC5H4EVW.mjs +0 -10
- package/dist/chunk-Z2PHVVX4.mjs +0 -10
- package/dist/chunk-Z7UPVYL5.mjs +0 -10
package/dist/chunk-SJRYJGTL.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$k}from'./chunk-ENUU2IVX.mjs';import {a as a$m}from'./chunk-R7Y36JCO.mjs';import {c as c$2}from'./chunk-VNJDCKLQ.mjs';import {c as c$4}from'./chunk-OGIKNHLU.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-VKWXATZ3.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-IBBDZQPO.mjs';import {a as a$i}from'./chunk-6CSP66NI.mjs';import {a as a$c}from'./chunk-2UDXAKWA.mjs';import {a as a$d}from'./chunk-JXJZIKEY.mjs';import {b as b$5,e as e$1}from'./chunk-L5H5GE3H.mjs';import {a as a$e}from'./chunk-JZXLV6JU.mjs';import {b as b$2,c as c$3}from'./chunk-IDIZSV2Y.mjs';import {b as b$4}from'./chunk-GIUNLLWW.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-LHLY432N.mjs';import {a as a$g}from'./chunk-VQHI3ZCW.mjs';import {a as a$a}from'./chunk-5LGYS5CZ.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-JOK6I52O.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-DLJHL4V7.mjs';import {b as b$6,j as j$1}from'./chunk-R5JHN4X6.mjs';import {a as a$9}from'./chunk-UQJB6AGO.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-ALMW6S4I.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-FDDB7QNQ.mjs';import {a}from'./chunk-LRFFL765.mjs';import {b as b$1,c as c$1}from'./chunk-PJINRIA6.mjs';import {c}from'./chunk-35AM4QEA.mjs';import {j as j$2}from'./chunk-TYOEGCPS.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import io,{useCallback,useMemo,useEffect}from'react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {TextIcon,PlusIcon,MinusIcon}from'@baseline-ui/icons/20';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var no=io.forwardRef(({color:o,colorLabel:e,colorName:l,isIndeterminate:r,indeterminateIcon:t,noneLabel:s,...a$5},n)=>{let i=io.useRef(null),{hoverProps:c$2,isHovered:m}=a({isDisabled:a$5.isDisabled}),{buttonProps:d,isPressed:g}=a$1(a$5,i),{isFocused:f$1,isFocusVisible:b$2,focusProps:B}=a$2(),S=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":b$2,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":g}),F=c(),I$1=c(),h=!!e||typeof l=="string";return jsxs("button",{...c$1(d,c$2,B,S),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:b$2||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(n,i),id:F,"aria-labelledby":[a$5["aria-labelledby"]||F,h&&I$1].filter(Boolean).join(" "),children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:I$1,"aria-hidden":"true",children:l}):h&&jsx(b,{id:I$1,"aria-hidden":"true",children:l})]})});no.displayName="ColorInputButton";var Fo=io.forwardRef(({className:o,style:e$1,icon:l,elementType:r="button",...t},s)=>{let a$6=io.useRef(null),{hoverProps:n,isHovered:i}=a({isDisabled:t.isDisabled}),{buttonProps:c,isPressed:m}=a$1({...t,elementType:r},a$6),{isFocusVisible:d,focusProps:g}=a$2(),f=a$3({"data-block-id":t["data-block-id"],"data-focused":d,"data-focus-visible":d,"data-disabled":t.isDisabled,"data-hovered":i,"data-pressed":m});return jsxs(r,{...c$1(a$5(r,t.isDisabled),c,n,g,f),ref:b$1(s,a$6),style:e$1,className:a$4(p({isHovered:i||m||t.isOpen,isFocusVisible:d,isDisabled:t.isDisabled}),"BaselineUI-IconColorInputButton","BaselineUI-IconColorInput-Button",o),children:[jsx(l,{size:16}),jsx("div",{className:e,style:{backgroundColor:t.color||void 0}})]})});Fo.displayName="IconColorInputButton";var Wo=io.forwardRef(({setColor:o,color:e,triggerRef:l,autoFocus:r,presets:t,state:s$1,isIndeterminate:a,colorPresetsLabel:n},i$1)=>{let{formatMessage:c}=b$2(),m=useCallback(d=>{if(d instanceof Set&&d.size){let g=[...d][0],f=t.find(b=>b.id===g);a$6(f,"Preset not found"),o(f.id===F?null:a$7(f.id).toFormat(A)),s$1.close();}},[s$1,t,o]);return jsx("div",{className:a$4(s,"BaselineUI-ColorInput-Presets"),style:{minWidth:l.current?.offsetWidth},ref:i$1,children:jsx(c$2,{autoFocus:r,items:t,layout:"grid","aria-label":n??c(ft.colorPresets),className:i,renderOption:H,selectionMode:"single",selectedKeys:a?[]:[e?.toString(B)||F],onSelectionChange:m,shouldSelectOnPressUp:true,escapeKeyBehavior:"none"})})});Wo.displayName="ColorPresetList";var ft=c$3({colorPresets:{defaultMessage:"Color Presets",id:"bui.colorInput.colorPresets"}});var Xe=({value:o,...e})=>{let l=io.useRef(null),r=io.useRef(null),t=io.useRef(null),s=b$7({...e,value:o}),{colorAreaProps:a,xInputProps:n,yInputProps:i,thumbProps:c}=a$n({...e,value:o,inputXRef:l,inputYRef:r,containerRef:t},s);useEffect(()=>{l.current?.focus();},[]);let{focusProps:m,isFocusVisible:d$1}=a$2();return jsx("div",{ref:t,...a,className:a$4(d,"BaselineUI-ColorInput-ColorArea"),children:jsxs("div",{...c,className:a$4(w({isFocusVisible:d$1}),"BaselineUI-ColorInput-ColorAreaThumb"),style:{...c.style,transform:"translate(-50%, -50%)",backgroundColor:C(o)?.withChannelValue("alpha",1).toString("css")},children:[jsx("input",{ref:l,...n,...m}),jsx("input",{ref:r,...i,...m})]})})};var 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);}}),s=io.useRef(null),{inputProps:a$1}=b$8({...r,"aria-label":"Hex"},t,s),{focusProps:n$1,isFocused:i}=a$2({isTextInput:true}),{hoverProps:c,isHovered:m}=a({});return jsxs("div",{className:a$4(n,"BaselineUI-ColorInput-FieldInput"),"data-color-mode":l?"hexa":"hex",children:[jsx("input",{...c$1(a$1,n$1,c),ref:s,className:o({isFocused:i,isHovered:m,allowAlpha:l})}),l?jsx($e,{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:s=>{e(r$1.withChannelValue("red",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("green",t),value:r$1.getChannelValue("green"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("green",s).toFormat(A));},step:1,minValue:0,maxValue:255}),jsx(a$p,{"aria-label":o.getChannelName("blue",t),value:r$1.getChannelValue("blue"),showStepper:false,className:r,onChange:s=>{e(r$1.withChannelValue("blue",s).toFormat(A));},step:1,minValue:0,maxValue:255}),l?jsx($e,{color:o,setColor:e}):null]})},yt={style:"percent",maximumFractionDigits:0},$e=({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:yt,className:r,showStepper:false,onChange:r$1,minValue:0,maxValue:1})};var qo=({channel:o,...e})=>{let{locale:l}=b$3(),r=c$5({...e,channel:o,locale:l}),t=io.useRef(null),s=io.useRef(null),{trackProps:a,thumbProps:n,inputProps:i}=c$6({...e,channel:o,trackRef:t,inputRef:s,"aria-label":r.value.getChannelName(o,l)},r),{focusProps:c,isFocusVisible:m}=a$2();return jsxs("div",{className:a$4(k,{[a$o({size:"xs"})]:o==="alpha"},"BaselineUI-ColorInput-ColorSlider"),"data-channel":o,...a,ref:t,children:[o==="alpha"&&jsx("div",{className:x}),jsx("div",{className:k,style:a.style}),jsxs("div",{className:a$4(w({isFocusVisible:m}),"BaselineUI-ColorInput-ColorSliderThumb"),...n,children:[jsx("div",{className:x,style:{backgroundColor:"#ffffff"}}),jsx("div",{style:{backgroundColor:r.getDisplayColor().toString("css"),height:8},className:k}),jsx(b,{children:jsx("input",{ref:s,...i,...c})})]})]})};var xo=({color:o,setColor:e,allowAlpha:l,colorFormatLabel:r,onChangeEnd:t})=>{let[s,a]=io.useState("hex"),{formatMessage:n}=b$2();return jsxs(Fragment,{children:[jsx(Xe,{value:o,xChannel:"saturation",yChannel:"lightness",onChange:e,onChangeEnd:t}),jsxs("div",{className:v,children:[jsx(qo,{channel:"hue",value:o,onChange:e,onChangeEnd:t}),l?jsx(qo,{channel:"alpha",value:o,onChange:e,onChangeEnd:t}):null]}),jsxs("div",{className:a$4(v,sprinkles.variants({paddingTop:"none",gap:"sm"})),children:[jsx(c$4,{label:r??n(Pt.colorFormat),labelPosition:"start",variant:"ghost",items:y,selectedKey:s,onSelectionChange:i=>{a(i);}}),s==="hex"&&jsx(Ye,{color:o,setColor:i=>{e(i),t?.(i);},allowAlpha:l}),s==="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 Ze=({color:o,setColor:e,storePickedColorKey:l$1,addColorButtonLabel:r,removeColorButtonLabel:t$1,customColorsLabel:s$1,addLabel:a,cancelLabel:n,newColorLabel:i$1,colorFormatLabel:c$1,pickerMode:m$1,allowAlpha:d,isIndeterminate:g,state:f})=>{let{locale:b}=b$3(),{formatMessage:B$1}=b$2(),S=io.useRef(null),F=a$j(S.current),[I,h]=a$k(l$1,[]),v=io.useMemo(()=>Array.isArray(I)?I.filter(p=>Ft(p)):[],[I]),O=io.useRef(null),[K,Mo]=io.useState(o),uo=io.useMemo(()=>v.map(p=>({id:p,label:a$7(p).getColorName(b),description:p})),[v,b]),W=useCallback(()=>{let p=m$1==="active"?o:K;if(v.includes(p.toString(B))){O.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}h([...v,p.toString(B)]);},[v,o,h,K,m$1]);useEffect(()=>{let p=O.current;function y(Q){Q.animationName===u&&j$2(Q)?.classList.remove(t);}return p?.addEventListener("animationend",y),()=>{p?.removeEventListener("animationend",y);}},[]);let w=c(),J=jsx(a$l,{ref:S,variant:"secondary",size:"md","aria-label":r,icon:PlusIcon,onPress:m$1==="active"?W:void 0}),co=useCallback(p=>jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:true}),style:{paddingBlockEnd:0},"aria-label":i$1??B$1(Jo.newColor),children:[jsx(xo,{color:K,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:n??B$1(Jo.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??B$1(Jo.add),variant:"primary",onPress:()=>{W(),p();},size:"sm"})]})})]}),[K,W,B$1,d,i$1,c$1,n,a]),Oo=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let y=[...p][0];y&&(e(a$7(y).toFormat(A)),m$1==="lazy"&&f.close());},[e,m$1,f]);return jsxs(Fragment,{children:[jsx(a$e,{}),jsxs("div",{className:a$4(l,"BaselineUI-ColorInput-CustomColors"),children:[jsx("span",{id:w,children:s$1}),jsxs(a$h,{display:"flex",children:[!!v.length&&v.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{h(v.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&J,m$1==="lazy"&&(F==="mobile"?jsxs(b$5,{children:[jsx(a$m,{children:J}),jsx(e$1,{style:{zIndex:1e5},children:({close:p})=>co(p)})]}):jsxs(b$6,{type:"dialog",children:[jsx(j$1,{children:J}),jsx(a$c,{placement:"right top",className:q,offset:6,children:({close:p})=>co(p)})]}))]})]}),!!v.length&&jsx(c$2,{items:uo,layout:"grid","aria-labelledby":w,className:a$4(i,s,sprinkles.variants({paddingTop:"xs"}),"BaselineUI-ColorInput-CustomColorsListBox"),renderOption:H,ref:O,autoFocus:false,selectionMode:"single",selectedKeys:g?[]:[o.toString(B)],onSelectionChange:Oo,shouldSelectOnPressUp:true})]})},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 ot({colorLabel:o,color:e,presets:l,isIndeterminate:r,indeterminateLabel:t,transparentLabel:s}){let{formatMessage:a}=b$2(),{locale:n}=b$3(),i=useMemo(()=>r?{id:"indeterminate",label:t??a(je.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 E(e,i,s??a(je.transparent));throw new TypeError("`colorLabel` must be a function or a boolean")},[e,o,a,i,r,s]),m=useMemo(()=>{if(i?.label)return i.label;e?.getColorName(n);},[e,n,i?.label]);return {colorName:c,humanReadableName:m}}var je=c$3({transparent:{defaultMessage:"Transparent",id:"bui.colorInput.transparent"},indeterminate:{defaultMessage:"Indeterminate",id:"bui.colorInput.indeterminate"}});var Ao=io.forwardRef(({className:o,style:e,allowRemoval:l,allowAlpha:r=true,presets:t,labelPosition:s="top",colorLabel:a=true,includePicker:n=true,onChange:i,onChangeEnd:c$2,defaultValue:m$1,storePickedColorKey:d="baselinePickedColor",value:g$1,addColorButtonLabel:f,removeColorButtonLabel:b,customColorsLabel:B,addLabel:S,cancelLabel:F$1,newColorLabel:I,colorFormatLabel:h$1,colorPresetsLabel:v,noColorLabel:O,indeterminateLabel:K,transparentLabel:Mo,onTriggerPress:uo,renderTriggerButton:W,pickerMode:w="active",offset:J=2,placement:co=s==="start"?"bottom end":"bottom start","data-block-id":Oo,"data-block-class":p,isIndeterminate:y,indeterminateIcon:Q,...N},lt)=>{let Z=io.useRef(null),at=io.useRef(null),X=a$8(N),{triggerProps:oe,overlayProps:st}=a$9({type:"listbox"},X,Z),nt=a$a(N.portalContainer),[Y,wo]=a$b(g$1===void 0?void 0:C(g$1),C(m$1),P=>i?.(P?.toFormat("rgba")||null)),{formatMessage:j}=b$2(),Do=useMemo(()=>G(O??j(To.noColor),t),[t,j,O]),fo=c(),{colorName:ee}=ot({colorLabel:a||true,color:Y,presets:Do,isIndeterminate:y,indeterminateLabel:K,transparentLabel:Mo}),it=a?ee:false,te=useMemo(()=>Do.filter(P=>l||P.id!==F),[Do,l]),mt=f||j(To.addColor),pt=b||j(To.removeColor),ut=B||j(To.customColors),re=jsx(Ze,{color:Y||z,setColor:P=>{wo(P),c$2?.(P?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:mt,removeColorButtonLabel:pt,customColorsLabel:ut,addLabel:S,cancelLabel:F$1,newColorLabel:I,colorFormatLabel:h$1,pickerMode:w,allowAlpha:r,isIndeterminate:!!y,state:X});return jsxs(Fragment,{children:[jsxs("div",{className:a$4({[g]:s==="start"},"BaselineUI-ColorInput-Trigger",o),"data-block-id":Oo,"data-block-class":p,style:e,ref:lt,children:[N.label?jsx("label",{id:fo,className:h({labelPosition:s}),children:N.label}):null,W?W({isOpen:X.isOpen,color:Y,ref:Z,colorName:it,triggerProps:c$1(oe,{onPress:uo}),labelId:fo,isIndeterminate:y,indeterminateIcon:Q,noneLabel:O}):jsx(no,{...c$1(oe,{onPress:uo,...N.label?{"aria-labelledby":fo}:{"aria-label":N["aria-label"]}}),ref:Z,isOpen:X.isOpen,isDisabled:N.isDisabled,labelPosition:s,color:Y,colorLabel:a,colorName:ee,isIndeterminate:y,indeterminateIcon:Q,noneLabel:O})]}),jsx(a$c,{...N,portalContainer:nt,placement:co,state:X,offset:J,className:a$4(q,"BaselineUI-ColorInput-Popover"),triggerRef:Z,overlayProps:st,children:jsxs(a$d,{size:"content",className:m({includesCustomColorPicker:n}),ref:at,"aria-labelledby":N.label?fo:void 0,"aria-label":N["aria-label"],children:[n&&w==="active"?jsxs(Fragment,{children:[jsx(xo,{color:Y||z,setColor:wo,allowAlpha:r,colorFormatLabel:h$1,onChangeEnd:P=>{c$2?.(P?.toFormat("rgba")||null);}}),re]}):null,!!te.length&&jsxs(Fragment,{children:[n&&w==="active"?jsx(a$e,{}):null,jsx(Wo,{autoFocus:n&&w==="active"?false:"first",state:X,triggerRef:Z,presets:te,colorPresetsLabel:v,color:Y,setColor:P=>{wo(P),c$2?.(P?.toFormat("rgba")||null);},isIndeterminate:!!y})]}),n&&w==="lazy"?re:null]})})]})});Ao.displayName="ColorInput";var To=c$3({addColor:{defaultMessage:"Add Color",id:"bui.colorInput.addColor"},removeColor:{defaultMessage:"Remove Color",id:"bui.colorInput.removeColor"},customColors:{defaultMessage:"Custom Colors",id:"bui.colorInput.customColors"},noColor:{defaultMessage:"None",id:"bui.colorInput.noColor"}});var rt=io.forwardRef(({className:o,style:e,icon:l,variant:r="standard","data-block-id":t,tooltip:s=true,iconTooltip:a=true,...n},i)=>{let c=io.useRef(null),{tooltipProps:m}=a$f({label:n["aria-label"],tooltip:s}),d=useCallback(({isOpen:g,color:f,ref:b,colorName:B,triggerProps:S,isIndeterminate:F,indeterminateIcon:I,noneLabel:h})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...S,"aria-label":n["aria-label"],ref:b,isOpen:g,isDisabled:n.isDisabled,color:f,colorLabel:false,colorName:B,isIndeterminate:F,indeterminateIcon:I,noneLabel:h}):jsx(Fo,{...S,isOpen:g,icon:TextIcon,color:f?.toString("hexa"),ref:b,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:F,indeterminateIcon:I})}),[n,m,r]);return jsxs(a$h,{display:"flex",flexDirection:"row",gap:"md",paddingX:r==="standard"?"md":"none",alignItems:"center",className:a$4("BaselineUI-IconColorInput",o),"data-block-id":t,style:e,ref:b$1(i,c),children:[r==="standard"&&l?jsx(a$i,{icon:l,label:n["aria-label"],tooltip:a,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsx(Ao,{...n,renderTriggerButton:d})]})});rt.displayName="IconColorInput";export{Fo as a,Ao as b,rt as c};
|
package/dist/chunk-SYA6LAFU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-UI4SJCQU.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-DLJHL4V7.mjs';import {e,h,c,d,g}from'./chunk-NYNS3UDR.mjs';import {a}from'./chunk-FDDB7QNQ.mjs';import {a as a$1}from'./chunk-LRFFL765.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {c as c$1,b as b$2}from'./chunk-PJINRIA6.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
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var W=new WeakMap;function 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};
|
package/dist/chunk-TEQHGF4G.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$4,d as d$1,c as c$3,b as b$4}from'./chunk-KRVEGSVY.mjs';import {b as b$3}from'./chunk-KG2EHFYA.mjs';import {d,g,b}from'./chunk-NYNS3UDR.mjs';import {b as b$2,a as a$7,i as i$1}from'./chunk-OS6PVCFX.mjs';import {a as a$6}from'./chunk-QSFRMY47.mjs';import {a as a$5}from'./chunk-UR42GQO4.mjs';import {a}from'./chunk-FPM5UJRF.mjs';import {c as c$2,e}from'./chunk-NQVTVL24.mjs';import {a as a$3}from'./chunk-RT4LMB6X.mjs';import {h,l,u}from'./chunk-SCJ3RG7B.mjs';import {c,b as b$1}from'./chunk-PJINRIA6.mjs';import {c as c$1,a as a$2}from'./chunk-35AM4QEA.mjs';import {i,a as a$1,j,k}from'./chunk-TYOEGCPS.mjs';import {createContext,useRef,useState,useEffect,useCallback,useMemo}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 ie={"ar-AE":{collectionLabel:"\u0645\u0642\u062A\u0631\u062D\u0627\u062A"},"bg-BG":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"cs-CZ":{collectionLabel:"N\xE1vrhy"},"da-DK":{collectionLabel:"Forslag"},"de-DE":{collectionLabel:"Empfehlungen"},"el-GR":{collectionLabel:"\u03A0\u03C1\u03BF\u03C4\u03AC\u03C3\u03B5\u03B9\u03C2"},"en-US":{collectionLabel:"Suggestions"},"es-ES":{collectionLabel:"Sugerencias"},"et-EE":{collectionLabel:"Soovitused"},"fi-FI":{collectionLabel:"Ehdotukset"},"fr-FR":{collectionLabel:"Suggestions"},"he-IL":{collectionLabel:"\u05D4\u05E6\u05E2\u05D5\u05EA"},"hr-HR":{collectionLabel:"Prijedlozi"},"hu-HU":{collectionLabel:"Javaslatok"},"it-IT":{collectionLabel:"Suggerimenti"},"ja-JP":{collectionLabel:"\u5019\u88DC"},"ko-KR":{collectionLabel:"\uC81C\uC548"},"lt-LT":{collectionLabel:"Pasi\u016Blymai"},"lv-LV":{collectionLabel:"Ieteikumi"},"nb-NO":{collectionLabel:"Forslag"},"nl-NL":{collectionLabel:"Suggesties"},"pl-PL":{collectionLabel:"Sugestie"},"pt-BR":{collectionLabel:"Sugest\xF5es"},"pt-PT":{collectionLabel:"Sugest\xF5es"},"ro-RO":{collectionLabel:"Sugestii"},"ru-RU":{collectionLabel:"\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"},"sk-SK":{collectionLabel:"N\xE1vrhy"},"sl-SI":{collectionLabel:"Predlogi"},"sr-SP":{collectionLabel:"Predlozi"},"sv-SE":{collectionLabel:"F\xF6rslag"},"tr-TR":{collectionLabel:"\xD6neriler"},"uk-UA":{collectionLabel:"\u041F\u0440\u043E\u043F\u043E\u0437\u0438\u0446\u0456\u0457"},"zh-CN":{collectionLabel:"\u5EFA\u8BAE"},"zh-TW":{collectionLabel:"\u5EFA\u8B70"}};function O(i$2,n){let{inputRef:l$1,collectionRef:o,filter:c$4,disableAutoFocusFirst:m=false,disableVirtualFocus:E=false}=i$2,b=c$1(),a=useRef(void 0),s=useRef(false),r=useRef(null),se=c$2()==="virtual"&&(h()||l()),[P,pe]=useState(!se&&!E),[D,K]=useState(false),[de,M]=useState(false);useEffect(()=>()=>clearTimeout(a.current),[]);let H=u(e$1=>{!e$1.isTrusted&&P&&l$1.current&&i(a$1(l$1.current))!==l$1.current&&e()!=="touch"&&l$1.current.focus();let t=j(e$1);e$1.isTrusted||!t||r.current===t.id||(clearTimeout(a.current),t!==o.current?s.current?(r.current=t.id,a.current=setTimeout(()=>{n.setFocusedNodeId(t.id);},500)):(r.current=t.id,n.setFocusedNodeId(t.id)):r.current&&!k(r.current,a$1(o.current))&&(r.current=null,n.setFocusedNodeId(null)),s.current=false);}),[F,fe]=useState(null),U=useCallback(e=>{fe(e),e!=null?(e.getAttribute("tabindex")!=null&&pe(false),K(true)):K(false);},[]);a$2(()=>(F?.addEventListener("focusin",H),()=>{F?.removeEventListener("focusin",H);}),[F]);let me=a$3(useMemo(()=>b$1(o,U),[o,U])),be=useCallback(()=>{if(!o.current){M(true);return}s.current=true,o.current?.dispatchEvent(new CustomEvent(b$2,{cancelable:true,bubbles:true,detail:{focusStrategy:"first"}}));},[o]),x=useCallback(e=>{M(false),a$4(i(a$1(l$1.current))),r.current=null,n.setFocusedNodeId(null);let t=new CustomEvent(a$7,{cancelable:true,bubbles:true,detail:{clearFocusKey:e}});clearTimeout(a.current),s.current=false,o.current?.dispatchEvent(t);},[o,n]),p=useRef("");a$5(l$1,"beforeinput",e=>{let{inputType:t}=e;p.current=t;});let ve=e=>{(p.current==="insertText"||p.current==="insertCompositionText"||p.current==="insertFromComposition")&&!m?be():p.current&&(p.current.includes("insert")||p.current.includes("delete")||p.current.includes("history"))&&(x(true),d$1(a$1(l$1.current))===l$1.current&&c$3(l$1.current,null)),n.setInputValue(e);},B=useRef(null),Ee=e=>{if(B.current=j(e.nativeEvent),e.nativeEvent.isComposing)return;let t=r.current;switch(t!==null&&a$1(l$1.current).getElementById(t)==null&&(r.current=null,t=null),e.key){case "a":if(i$1(e))return;break;case "Escape":if(e.isDefaultPrevented())return;break;case " ":return;case "Tab":"continuePropagation"in e&&e.continuePropagation();return;case "Home":case "End":case "PageDown":case "PageUp":case "ArrowUp":case "ArrowDown":case "ArrowRight":case "ArrowLeft":{if((e.key==="Home"||e.key==="End")&&t==null&&e.shiftKey)return;if(e.key==="ArrowRight"||e.key==="ArrowLeft"){if(t==null){e.isPropagationStopped()||e.stopPropagation();return}break}e.preventDefault();let A=new CustomEvent(b$2,{cancelable:true,bubbles:true});o.current?.dispatchEvent(A);break}}e.isPropagationStopped()||e.stopPropagation();let d=true;if(o.current!==null)if(t==null)d=o.current?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false;else {let A=k(t,a$1(o.current));A&&(d=A?.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))||false);}if(d)switch(e.key){case "ArrowLeft":case "ArrowRight":{x();break}case "Enter":t!=null&&k(t,a$1(l$1.current))?.dispatchEvent(new PointerEvent("click",e.nativeEvent));break}else e.preventDefault();},S=u(e=>{if(j(e)===B.current){e.stopImmediatePropagation();let t=r.current;t==null?o.current?.dispatchEvent(new KeyboardEvent(e.type,e)):k(t,a$1(o.current))?.dispatchEvent(new KeyboardEvent(e.type,e));}});useEffect(()=>{let e=a$1(l$1.current);return e.addEventListener("keyup",S,true),()=>{e.removeEventListener("keyup",S,true);}},[S]);let Ae=b$3(ie,"@react-aria/autocomplete"),ge=a$6({id:b,"aria-label":Ae.format("collectionLabel")}),Pe=useCallback((e,t)=>c$4?c$4(e,n.inputValue,t):true,[n.inputValue,c$4]),Fe=e=>{if(!e.isTrusted)return;let t=r.current?k(r.current,a$1(l$1.current)):null;t&&b$4(t,e.relatedTarget);},Te=e=>{if(!e.isTrusted)return;if(r.current?k(r.current,a$1(l$1.current)):null){let d=j(e.nativeEvent);queueMicrotask(()=>{b$4(d,o.current),c$3(o.current,d);});}},Le=e=>{e.button!==0||e.pointerType==="touch"||r.current==null||l$1.current==null||j(e)===l$1.current&&x();},h$1={value:n.inputValue,onChange:ve},ye={onKeyDown:Ee,"aria-activedescendant":n.focusedNodeId??void 0,onBlur:Fe,onFocus:Te,onPointerDown:Le};return h$1={...h$1,...P&&D&&ye,enterKeyHint:"go","aria-controls":D?b:void 0,"aria-autocomplete":"list",autoCorrect:"off",spellCheck:"false",autoComplete:"off"},{inputProps:h$1,collectionProps:c(ge,{shouldUseVirtualFocus:P,disallowTypeAhead:P,autoFocus:de?"first":false}),collectionRef:me,filter:c$4!=null?Pe:void 0}}function w(i){let{onInputChange:n,inputValue:l,defaultInputValue:o=""}=i,c=s=>{n&&n(s);},[m,E]=useState(null),[b,a$1]=a(l,o,c);return {inputValue:b,setInputValue:a$1,focusedNodeId:m,setFocusedNodeId:E}}var Se=createContext(null),he=createContext(null),Ie=createContext(null),Ve=createContext(null);function Ft(i){let n=d(Se,i.slot);i=c(n,i);let{filter:l,disableAutoFocusFirst:o}=i,c$1=w(i),m=useRef(null),E=useRef(null),{inputProps:b$1,collectionProps:a,collectionRef:s,filter:r}=O({...g(i),filter:l,disableAutoFocusFirst:o,inputRef:m,collectionRef:E},c$1);return jsx(b,{values:[[he,c$1],[Ve,{...b$1,ref:m}],[Ie,{...a,filter:r,ref:s}]],children:i.children})}export{he as a,Ie as b,Ve as c,Ft as d};
|
package/dist/chunk-UCRJ3AR5.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-DF2D7NE6.mjs';import {a as a$2}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-LHLY432N.mjs';import {a as a$4}from'./chunk-VQHI3ZCW.mjs';import {b as b$1}from'./chunk-ES3IQZSH.mjs';import {e}from'./chunk-D2NVLRIU.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a as a$1}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u}from'./chunk-SCJ3RG7B.mjs';import {c as c$1}from'./chunk-PJINRIA6.mjs';import {a as a$7}from'./chunk-SVIYLH7R.mjs';import {a as a$6}from'./chunk-35AM4QEA.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import z,{useMemo,useState,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var _={none:"toolbar",single:"radiogroup",multiple:"toolbar"};function P(e$1,o,t){let{isDisabled:i,orientation:n="horizontal"}=e$1,[a,c]=useState(false);a$6(()=>{c(!!(t.current&&t.current.parentElement?.closest('[role="toolbar"]')));},[t]),[...o.collection.getKeys()].some(A=>!o.disabledKeys.has(A))||(i=true);let{direction:s}=b$2(),r=e(t),p=s==="rtl",{keyboardProps:d}=j({shortcuts:{ArrowRight:()=>{p?r.focusPrevious({wrap:true}):r.focusNext({wrap:true});},ArrowDown:()=>{r.focusNext({wrap:true});},ArrowLeft:()=>{p?r.focusNext({wrap:true}):r.focusPrevious({wrap:true});},ArrowUp:()=>{r.focusPrevious({wrap:true});}},allowRepeats:true}),l=_[o.selectionManager.selectionMode];return a&&l==="toolbar"&&(l="group"),{actionGroupProps:{...a$7(e$1,{labelable:true}),role:l,"aria-orientation":l==="toolbar"?n:void 0,"aria-disabled":i,...d}}}var U={none:void 0,single:"radio",multiple:"checkbox"};function x(e,o,t){let i=o.selectionManager.selectionMode,n={role:U[i]};if(i!=="none"){let u=o.selectionManager.isSelected(e.key);n["aria-checked"]=u;}let a=e.key===o.selectionManager.focusedKey,c=u(()=>{a&&o.selectionManager.setFocusedKey(null);});return useEffect(()=>()=>{c();},[]),{buttonProps:c$1(n,{tabIndex:a||o.selectionManager.focusedKey==null?0:-1,onFocus(){o.selectionManager.setFocusedKey(e.key);},onPress(){o.selectionManager.select(e.key);}})}}var h="_1yep5z6f9",F="_1dc3b8m0";var N=z.forwardRef(({className:e,selectionMode:o,style:t,"data-block-id":i,"data-block-class":n,tooltipProps:a$4,icon:c$1,renderActionItem:u,...s},r)=>{let p=a(r),d=c(),l=b({...s,selectionMode:o,suppressTextValueWarning:true,children:d}),{actionGroupProps:A}=P({...s,selectionMode:o,children:d},l,p),g=[...l.collection].map(I=>(a$1(I.value),jsx(V,{item:I,state:l,isDisabled:s.isDisabled,onAction:s.onAction,tooltipProps:a$4,renderActionItem:u},I.key)));return c$1?jsxs(a$2,{...A,display:"flex",flexDirection:"row",gap:"md",alignItems:"center",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:t,ref:p,children:[jsx(c$1,{"aria-hidden":"true",size:24,className:h}),jsx(a$2,{display:"flex",flexDirection:"row",gap:"xs",flex:1,children:g})]}):jsx(a$2,{...A,display:"flex",flexDirection:"row",gap:"xs",className:a$3("BaselineUI-ActionGroup",e),"data-block-id":i,"data-block-class":n,style:t,ref:p,children:g})});N.displayName="ActionGroup";var V=({item:e,state:o,tooltipProps:t,renderActionItem:i,onAction:n,isDisabled:a})=>{let{buttonProps:c}=x({key:e.key},o),u=a||o.selectionManager.isDisabled(e.key),s=o.selectionManager.isSelected(e.key);a$1(e.value);let{icon:r}=e.value;a$1(r);let p=useMemo(()=>(a$1(e.value),typeof t=="function"?t(e.value):t),[t,e.value]);return jsx(b$1,{...c$1(c,{onPress:()=>{n?.(e.key);}}),children:jsx(a$4,{text:e.textValue,size:"sm",variant:"inverse",includeArrow:false,offset:4,...p,children:i?.(e,{isSelected:s,isDisabled:u})||jsx(a$5,{variant:"tertiary",icon:r,"aria-label":e.textValue,size:"sm",isDisabled:u,className:a$3({[F]:s},"BaselineUI-ActionGroup-Item")})})})};export{N as a,V as b};
|
package/dist/chunk-UI4SJCQU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-OKEXEU3C.mjs';import {a}from'./chunk-UBC32WQB.mjs';import {d,c}from'./chunk-W6QO7FPZ.mjs';import {a as a$2}from'./chunk-WAPBLICF.mjs';import {c as c$1}from'./chunk-QVFGEXDU.mjs';import {d as d$1}from'./chunk-IIBBR266.mjs';import {c as c$2}from'./chunk-PJINRIA6.mjs';import {a as a$1}from'./chunk-SVIYLH7R.mjs';import {j}from'./chunk-TYOEGCPS.mjs';import {useState}from'react';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function pe(r,i,t){let{isDisabled:a$4=false,isReadOnly:l=false,value:u,name:R,form:V,children:k,isRequired:b,validationBehavior:P="aria","aria-label":C,"aria-labelledby":x,"aria-describedby":F,onPressStart:c$3,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g,onClick:v}=r,s=d({...r,value:i.isSelected}),{isInvalid:T,validationErrors:j$1,validationDetails:q}=s.displayValidation;a(r,s,t);let W=e=>{e.stopPropagation(),i.setSelected(j(e).checked);},B=k!=null,N=C!=null||x!=null;!B&&!N&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let{pressProps:U,isPressed:w}=d$1({onPressStart:c$3,onPressEnd:m,onPressChange:n,onPress:f,onPressUp:g,onClick:v,isDisabled:a$4}),[_,y]=useState(false),{pressProps:z}=d$1({onPressStart(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}c$3?.(e),n?.(true),y(true);},onPressEnd(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}m?.(e),n?.(false),y(false);},onPressUp(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}g?.(e);},onClick:v,onPress(e){if(e.pointerType==="keyboard"||e.pointerType==="virtual"){e.continuePropagation();return}f?.(e),i.toggle(),t.current?.focus();let{[c]:S}=r,{commitValidation:Q}=S||s;Q();},isDisabled:a$4||l}),{focusableProps:G}=c$1(r,t),J=c$2(U,G),K=a$1(r,{labelable:true});a$2(t,i.defaultSelected,i.setSelected);let L=a$3(),M=a$3();return {labelProps:c$2(z,{onClick:e=>e.preventDefault()}),inputProps:c$2(K,{checked:i.isSelected,"aria-required":b&&P==="aria"||void 0,required:b&&P==="native","aria-invalid":T||r.validationState==="invalid"||void 0,"aria-errormessage":r["aria-errormessage"],"aria-controls":r["aria-controls"],"aria-readonly":l||void 0,"aria-describedby":[L.id,M.id,F].filter(Boolean).join(" ")||void 0,onChange:W,disabled:a$4,...u==null?{}:{value:u},name:R,form:V,type:"checkbox",...J}),descriptionProps:L,errorMessageProps:M,isSelected:i.isSelected,isPressed:w||_,isDisabled:a$4,isReadOnly:l,isInvalid:T||r.validationState==="invalid",validationErrors:j$1,validationDetails:q}}export{pe as a};
|
package/dist/chunk-V6DZG4PM.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-67QIBKUN.mjs';import {a as a$6}from'./chunk-KMZ3YVPE.mjs';import {a as a$e}from'./chunk-JBXZ6ZHP.mjs';import {a as a$b}from'./chunk-BPW4QRPV.mjs';import {a as a$d}from'./chunk-JTGVIAOK.mjs';import {a as a$c}from'./chunk-DIL5HL6K.mjs';import {a as a$a}from'./chunk-54MWEZUP.mjs';import {a as a$4}from'./chunk-KFJE5ZBK.mjs';import {a as a$8}from'./chunk-WD2TPSZV.mjs';import {a as a$9,b as b$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$5}from'./chunk-FDDB7QNQ.mjs';import {a as a$7}from'./chunk-3PBFSDMT.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {d}from'./chunk-IIBBR266.mjs';import {b,c}from'./chunk-PJINRIA6.mjs';import {c as c$1}from'./chunk-35AM4QEA.mjs';import {a as a$3,b as b$1}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import R,{useContext,useMemo,useRef,useCallback,useEffect,useImperativeHandle,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {PlusIcon}from'@baseline-ui/icons/12';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';import Ze from'just-camel-case';import*as it from'comlink';/**
|
|
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 vt={node:null,setNode:()=>{},coordinates:null,setCoordinates:()=>{},displayId:void 0,setDisplayId:()=>{},boundsRef:{current:null},isDisabled:false,cursorNode:null,setCursorNode:()=>{},children:null,setChildren:()=>{}},h=R.createContext(vt),ke=R.memo(({children:e,isDisabled:t=false})=>{let[n,r]=R.useState(null),[a,i]=R.useState(null),[s,c]=R.useState(null),p=R.useRef(null),[o,l]=R.useState(null),[m,k]=R.useState(),u=R.useMemo(()=>({node:n,setNode:r,coordinates:o,setCoordinates:l,displayId:m,setDisplayId:k,boundsRef:p,isDisabled:t,cursorNode:a,setCursorNode:i,children:s,setChildren:c}),[n,o,m,l,r,p,t,a,i,s,c]);return jsx(h.Provider,{value:u,children:e})});ke.displayName="PointPicker";var Ee="m0xg2me";var _e="m0xg2md _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mh _1yep5z6mg _1yep5z6ho",Re="m0xg2mj",ze="_1yep5z6fa",De="m0xg2mk m0xg2mj",Ie=a({defaultClassName:"m0xg2m0",variantClassNames:{isDisabled:{true:"m0xg2m1",false:"m0xg2m2"},isIndicatorVisible:{true:"m0xg2m3",false:"m0xg2m4"}},defaultVariants:{},compoundVariants:[[{isDisabled:false,isIndicatorVisible:true},"m0xg2m5"],[{isDisabled:false,isIndicatorVisible:false},"m0xg2m6"]]}),Me="m0xg2m8",Ne="m0xg2mb",Z="m0xg2ma _1yep5z6hp _1yep5z6mf",Ae="m0xg2m9 _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z6hg _1yep5z6mf _1yep5z6it _1yep5z6iu _1yep5z6iv",Le="m0xg2m7",Te="m0xg2mc",Se="m0xg2mf";var $=a$1(_e,"BaselineUI-PointPicker-GridLine"),kt=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:e.y-5,transform:`translate(${e.x}px, 0) translate(-1px, 0) scaleX(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"vertical",style:{height:`calc(100% - ${e.y+4}px)`,transform:`translate(${e.x}px, ${e.y+5}px) translate(-1px, 0) scaleX(0.5)`}})]}),Et=({coordinates:e})=>jsxs(Fragment,{children:[jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:e.x-5,transform:`translate(0, ${e.y}px) translate(0, -1px) scaleY(0.5)`}}),jsx("div",{className:$,"data-grid-line-type":"horizontal",style:{width:`calc(100% - ${e.x+4}px)`,transform:`translate(${e.x+5}px, ${e.y}px) translate(0, -1px) scaleY(0.5)`}})]}),Oe=({gridLines:e})=>{let{isDisabled:t,boundsRef:n,coordinates:r}=useContext(h),a=useMemo(()=>{let i=typeof e=="function"?e({coordinates:r,boundingRect:n.current}):e;return typeof i=="boolean"?i?r:void 0:i?.coordinates},[e,r,n]);return a&&!t?jsxs(Fragment,{children:[jsx(kt,{coordinates:a}),jsx(Et,{coordinates:a})]}):null};var Rt=new Set(["ArrowRight","ArrowLeft","ArrowDown","ArrowUp","Home","End","PageUp","PageDown"]);function He({coordinates:e,setCoordinates:t,boundsRef:n,rootRef:r,onKeyDown:a,onKeyUp:i}){let{isDisabled:s}=useContext(h);return j({isDisabled:s,onKeyDown:c=>{a?.(c);let p=c.shiftKey?10:1,o=e&&Rt.has(c.key)?r.current?.getBoundingClientRect():void 0;if(!o||!e){c.isDefaultPrevented()||c.continuePropagation();return}n.current=o;let l;switch(c.key){case "ArrowRight":{c.preventDefault(),l={x:a$e(e.x+p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowLeft":{c.preventDefault(),l={x:a$e(e.x-p,0,o.width),y:a$e(e.y,0,o.height)};break}case "ArrowDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y+p,0,o.height)};break}case "ArrowUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:a$e(e.y-p,0,o.height)};break}case "Home":{c.preventDefault(),l={x:0,y:a$e(e.y,0,o.height)};break}case "End":{c.preventDefault(),l={x:o.width,y:a$e(e.y,0,o.height)};break}case "PageUp":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:0};break}case "PageDown":{c.preventDefault(),l={x:a$e(e.x,0,o.width),y:o.height};break}default:{c.isDefaultPrevented()||c.continuePropagation();return}}l&&t(l);},onKeyUp:i})}function Ue(){let{node:e,coordinates:t}=useContext(h);return useMemo(()=>{if(!e||!t)return {x:0,y:0};let{left:n,top:r}=e.getBoundingClientRect();return {x:t.x+n,y:t.y+r}},[t,e])}var{color:Be}=themeVars,$e=R.forwardRef(({modality:e},t)=>e==="keyboard"?jsxs("svg",{width:92,height:92,viewBox:"0 0 92 92",fill:"none",xmlns:"http://www.w3.org/2000/svg",ref:t,className:Re,children:[jsxs("g",{filter:"url(#filter0_d_11407_457970)",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M49 43V4h-6v39H4v6h39v39h6V49h39v-6H49zm38 5H48v39h-4V48H5v-4h39V5h4v39h39v4zm-5 28v6h-6v6h12V76h-6zm5 11H77v-4h6v-6h4v10zm-77-5v-6H4v12h12v-6h-6zm5 5H5V77h4v6h6v4zM76 4v6h6v6h6V4H76zm11 11h-4V9h-6V5h10v10zM4 4v12h6v-6h6V4H4zm11 5H9v6H5V5h10v4z",fill:Be.background.positive.subtle}),jsx("path",{d:"M48 44v4h39v-4H48zm-4 4v39h4V48h-4zM5 44v4h39v-4H5zM44 5v39h4V5h-4zm39 72v6h-6v4h10V77h-4zM9 83v-6H5v10h10v-4H9zM77 5v4h6v6h4V5H77zM5 5v10h4V9h6V5H5z",fill:Be.background.positive.interactive.enabled})]}),jsx("defs",{children:jsxs("filter",{id:"filter0_d_11407_457970",x:0,y:0,width:92,height:92,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),jsx("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),jsx("feOffset",{}),jsx("feGaussianBlur",{stdDeviation:2}),jsx("feComposite",{in2:"hardAlpha",operator:"out"}),jsx("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0"}),jsx("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_11407_457970"}),jsx("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_11407_457970",result:"shape"})]})})]}):jsx(PlusIcon,{className:De,ref:t}));$e.displayName="PointPickerIndicatorIcon";var Lt=({trailingElement:e})=>{let{cursorNode:t}=useContext(h),[n,r]=useState({width:0,height:0});return useEffect(()=>{if(!t)return;let a=t.getBoundingClientRect();r(a);let i=new ResizeObserver(s=>{r({width:s[0].contentRect.width,height:s[0].contentRect.height});});return i.observe(t),()=>{i.disconnect();}},[t]),e?jsx(a$c,{position:"absolute",style:{left:0,top:0,zIndex:0,transform:`translate(${n.width/2}px, ${n.height/2}px)`},className:"BaselineUI-PointPickerContent-TrailingElement",children:e}):null},ee=R.forwardRef(({renderTrailingElement:e,renderCursor:t},n)=>{let{coordinates:r,isDisabled:a,node:i}=useContext(h),s=a$2({ownerDocument:a$3(i)}),c=!!(r&&!a),p=useMemo(()=>e?.(),[e]),o=Ue(),l=useMemo(()=>{if(!r)return null;let m=t?.({coordinates:r,modality:s});return m===void 0?jsx($e,{modality:s}):m},[t,r,s]);return c?jsxs(a$4,{style:{left:o.x,top:o.y},className:a$1(Le,"BaselineUI-PointPickerContent-Cursor"),ref:n,children:[l,p?jsx(Lt,{trailingElement:p}):null]}):null});ee.displayName="PointPickerIndicator";var Ke=R.forwardRef(({children:e,className:t,style:n,"data-block-id":r,"data-block-class":a,onFocusChange:i,onBlur:s,onFocus:c$1,onKeyDown:p,onKeyUp:o,gridLines:l=true,elementHandle:m,onMove:k,onPress:u,onPressStart:v,onPressEnd:b$1,renderTrailingElement:w,renderCursor:E},D)=>{let{setNode:C,node:_,coordinates:x,setCoordinates:z,displayId:Y,boundsRef:I,isDisabled:y,setCursorNode:st,setChildren:K}=useContext(h),A=useRef(null),ce=useRef(null),ue=a$2({ownerDocument:a$3(_)}),M=useCallback(d=>{z(d??null),k?.({coordinates:d,boundingRect:I.current});},[z,k,I]);useEffect(()=>{if(!y)return K(e),()=>{K(null);}},[e,y,K]),useEffect(()=>{let d=A.current;if(!d||y)return;let U=T=>{let H=d.getBoundingClientRect();I.current=H;let gt="clientX"in T?T.clientX:T.touches[0].clientX,xt="clientY"in T?T.clientY:T.touches[0].clientY,Pt={x:a$e(gt-H.left,0,H.width),y:a$e(xt-H.top,0,H.height)};M(Pt);},L=()=>{M(null);};return d.addEventListener("mousemove",U),d.addEventListener("touchmove",U,{passive:true}),d.addEventListener("mouseleave",L),d.addEventListener("touchend",L),d.addEventListener("touchcancel",L),()=>{d.removeEventListener("mousemove",U),d.removeEventListener("touchmove",U),d.removeEventListener("mouseleave",L),d.removeEventListener("touchend",L),d.removeEventListener("touchcancel",L);}},[I,y,M]);let{pressProps:at}=d({isDisabled:y,onPress:d=>{d.pointerType==="keyboard"?x&&u?.({...d,x:x.x,y:x.y}):u?.(d);},onPressStart:v,onPressEnd:b$1}),{focusProps:lt,isFocusVisible:ct,isFocused:ut}=a$5();a$6({ref:ce,isDisabled:y}),useImperativeHandle(m,()=>({focus:()=>{y||A.current?.focus();}}));let{focusProps:dt}=a$7({isDisabled:y,onFocusChange:i,onFocus:c$1,onBlur:s});function pt(){ue==="keyboard"&&setTimeout(()=>{let d=A.current?.getBoundingClientRect();d&&(I.current=d,M({x:a$e(d.width/2,0,d.width),y:a$e(d.height/2,0,d.height)}));},0);}function mt(){M(null);}let{keyboardProps:ft}=He({coordinates:x,setCoordinates:M,boundsRef:I,rootRef:A,onKeyDown:p,onKeyUp:o});a$8({isDisabled:y,ref:A,onInteractOutside:()=>{M(null);}});let ht=!!(x&&!y),yt=a$9({"data-focus-visible":ct,"data-focused":ut,"data-disabled":y,"data-block-id":r,"data-block-class":a,"data-active":x&&!y,"data-modality":ue});return jsxs(Fragment,{children:[jsx(ee,{renderTrailingElement:w,renderCursor:E,ref:st}),jsxs("div",{...c(lt,dt,{onFocus:pt,onBlur:mt},y?{}:c(ft,at)),ref:b(D,A,C),className:a$1(Ie({isDisabled:!!y,isIndicatorVisible:!!ht}),"BaselineUI-PointPicker-Content",t),tabIndex:y?void 0:0,style:n,"aria-controls":Y,"data-testid":"point-picker-content",...yt,children:[jsx(Oe,{gridLines:l}),jsx("div",{className:Ee,ref:ce,children:e})]})]})});Ke.displayName="PointPickerContent";function Xe(e,t,n){let[r,a]=useState(0),i=s=>{a(s),n();};return useGranularEffect(()=>{if(!e||t==="trailing")return;let s=new ResizeObserver(c=>{i(c[0].contentRect.width);});return i(e.getBoundingClientRect().width),s.observe(e),()=>{s.disconnect();}},[e,t],[n]),r}function jt(e,t){return t==="indicator"?e:e?.querySelector(".BaselineUI-PointPickerContent-TrailingElement")??null}var ne=R.forwardRef(({children:e,className:t,crossOffset:n,offset:r,placement:a="bottom start",anchorElement:i="indicator"},s)=>{let c=useRef(null),{cursorNode:p,coordinates:o}=useContext(h),l=Xe(p,i,()=>{u();}),m=jt(p,i),{overlayProps:k,updatePosition:u}=a$a({overlayRef:c,placement:a,targetRef:{get current(){return m}},crossOffset:n??l,offset:r});return useGranularEffect(()=>{u();},[o,n,r],[u]),o?jsx(a$4,{className:a$1(Se,t),ref:s,children:jsx("div",{ref:c,...k,children:e})}):null});ne.displayName="Floater";var tt=8,Xt=7,qt=7,re=R.memo(({children:e,scale:t,renderMagnifierContent:n})=>{let r=useRef(null),{coordinates:a,boundsRef:i,node:s}=useContext(h),c=useRef([]);a$6({ref:r}),useEffect(()=>{if(!r.current||n)return;let l=r.current.querySelectorAll("canvas"),m=[],k=r.current.ownerDocument;for(let u of l){let v=u.getContext("2d");if(!v)continue;let b=u.clientWidth,w=u.clientHeight,E=u.width,D=u.height,C=v.getImageData(0,0,E,D);m.push({el:u,width:E,height:D,image:C});let _=k.createElement("canvas");_.width=E,_.height=D;let x=_.getContext("2d");x&&x.drawImage(u,0,0),u.width=b*t,u.height=w*t,u.style.width=`${b}px`,u.style.height=`${w}px`,v.scale(t,t),v.drawImage(_,0,0,b,w);}return c.current=m,()=>{for(let{el:u,width:v,height:b,image:w}of c.current)u.width=v,u.height=b,u.getContext("2d")?.putImageData(w,0,0);}},[s,t,n]);let p=useMemo(()=>n?n({coordinates:a,boundingRect:i.current,children:e}):e?R.cloneElement(e,{key:"magnifier-content"}):null,[n,a,i,e]),o=useMemo(()=>!i.current||!a?null:{x:a.x/i.current.width,y:a.y/i.current.height},[i,a]);return o?jsx("div",{style:{left:0,transform:`scale(${t}) translate(calc(-${o.x*100}% + ${tt*Xt/(2*t)}px), calc(-${o.y*100}% + ${tt*qt/(2*t)}px))`},className:a$1(Te,"BaselineUI-PointPickerDisplay-Magnifier"),children:jsx("div",{style:Jt(s),ref:r,inert:"true",children:p})}):null});re.displayName="Magnifier";function Zt(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],a=e.getPropertyValue(r);a&&t.push([r,a]);}for(let n of e)if(n.startsWith("--")){let r=e.getPropertyValue(n);r&&t.push([n,r]);}return Object.fromEntries(t)}function Jt(e){if(!e)return {};let n=b$1(e).getComputedStyle(e),r=e.getBoundingClientRect(),a={...Zt(n),position:"static",margin:"0px",left:"0px",top:"0px",transform:"none","-webkit-text-fill-color":"inherit","-webkit-text-stroke-color":"inherit",width:`${r.width}px`,height:`${r.height}px`,interactivity:"inert"};return Object.fromEntries(Object.entries(a).map(([i,s])=>i.startsWith("--")?[i,s]:i.startsWith("-")?[a$b(Ze(i)),s]:[Ze(i),s]))}var nn=7,rn=7,on={scale:2},sn={crossOffset:void 0,offset:void 0,placement:"bottom start",anchorElement:"indicator"},rt=R.forwardRef(({className:e,style:t,description:n,magnifier:r=true,"data-block-id":a,"data-block-class":i,floating:s=false,renderMagnifierContent:c},p)=>{let{coordinates:o,boundsRef:l,setDisplayId:m,isDisabled:k,children:u,cursorNode:v}=useContext(h),b=c$1(),w=useMemo(()=>b$2(r,on),[r]),E=useMemo(()=>typeof n=="function"?n({coordinates:o?{x:o.x,y:o.y}:null,boundingRect:l.current}):n,[n,o,l]),D=!k&&!!w&&o,C=useMemo(()=>b$2(s,sn),[s]);useEffect(()=>((!C||C&&v)&&m(b),()=>{m(void 0);}),[v,b,m,C]);let _=jsxs(a$c,{ref:C?void 0:p,className:a$1(Me,"BaselineUI-PointPicker-Display",e),backgroundColor:"background.primary.subtle",boxShadow:"medium",borderRadius:"sm",outlineWidth:1,outlineColor:"border.medium",outlineOffset:-1,outlineStyle:"solid",paddingY:"md",paddingLeft:"md",paddingRight:E?.length?"xl":"md",display:"flex",flexDirection:"row",gap:"lg",alignItems:"center",style:t,id:b,"data-block-id":a,"data-block-class":i,"data-variant":C?"floating":"auto","data-testid":"point-picker-display",children:[w?jsxs("div",{className:Ae,children:[D?jsx(re,{scale:w.scale,renderMagnifierContent:c,children:u}):null,Array.from({length:nn*rn}).map((x,z)=>z===24?jsx("div",{className:a$1(Z,Ne)},z):jsx("div",{className:Z},z))]}):null,E?.length?jsx(a$c,{display:"flex",gap:"lg",flexDirection:"column",children:E?.map(({label:x,icon:z},Y)=>jsxs(a$c,{display:"flex",gap:"md",flexDirection:"row",color:"text.secondary",alignItems:"center",children:[jsx(z,{size:12,className:ze}),jsx(a$d,{type:"label",size:"sm",children:x})]},x+Y))}):null]});return C?jsx(ne,{ref:p,...C,className:"BaselineUI-PointPicker-Floater",children:_}):_});rt.displayName="PointPickerDisplay";function se(e){let t=new Blob([e],{type:"text/javascript"}),n=URL.createObjectURL(t),r=new Worker(n);return URL.revokeObjectURL(n),r}function ae(){return se('var Y=Object.defineProperty;var Z=(n,t,e)=>t in n?Y(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var M=(n,t,e)=>Z(n,typeof t!="symbol"?t+"":t,e);var F=Symbol("Comlink.proxy"),J=Symbol("Comlink.endpoint"),Q=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),T=Symbol("Comlink.thrown"),B=n=>typeof n=="object"&&n!==null||typeof n=="function",q={canHandle:n=>B(n)&&n[F],serialize(n){let{port1:t,port2:e}=new MessageChannel;return U(n,t),[e,[e]]},deserialize(n){return n.start(),et(n)}},X={canHandle:n=>B(n)&&T in n,serialize({value:n}){let t;return n instanceof Error?t={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:t={isError:!1,value:n},[t,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},H=new Map([["proxy",q],["throw",X]]);function tt(n,t){for(let e of n)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function U(n,t=globalThis,e=["*"]){t.addEventListener("message",function r(s){if(!s||!s.data)return;if(!tt(e,s.origin)){console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);return}let{id:o,type:c,path:u}=Object.assign({path:[]},s.data),i=(s.data.argumentList||[]).map(m),a;try{let l=u.slice(0,-1).reduce((f,y)=>f[y],n),h=u.reduce((f,y)=>f[y],n);switch(c){case"GET":a=h;break;case"SET":l[u.slice(-1)[0]]=m(s.data.value),a=!0;break;case"APPLY":a=h.apply(l,i);break;case"CONSTRUCT":{let f=new h(...i);a=at(f)}break;case"ENDPOINT":{let{port1:f,port2:y}=new MessageChannel;U(n,y),a=ot(f,[f])}break;case"RELEASE":a=void 0;break;default:return}}catch(l){a={value:l,[T]:0}}Promise.resolve(a).catch(l=>({value:l,[T]:0})).then(l=>{let[h,f]=_(l);t.postMessage(Object.assign(Object.assign({},h),{id:o}),f),c==="RELEASE"&&(t.removeEventListener("message",r),V(t),z in n&&typeof n[z]=="function"&&n[z]())}).catch(l=>{let[h,f]=_({value:new TypeError("Unserializable return value"),[T]:0});t.postMessage(Object.assign(Object.assign({},h),{id:o}),f)})}),t.start&&t.start()}function nt(n){return n.constructor.name==="MessagePort"}function V(n){nt(n)&&n.close()}function et(n,t){let e=new Map;return n.addEventListener("message",function(s){let{data:o}=s;if(!o||!o.id)return;let c=e.get(o.id);if(c)try{c(o)}finally{e.delete(o.id)}}),I(n,e,[],t)}function S(n){if(n)throw new Error("Proxy has been released and is not useable")}function $(n){return A(n,new Map,{type:"RELEASE"}).then(()=>{V(n)})}var P=new WeakMap,R="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{let t=(P.get(n)||0)-1;P.set(n,t),t===0&&$(n)});function rt(n,t){let e=(P.get(t)||0)+1;P.set(t,e),R&&R.register(n,t,n)}function st(n){R&&R.unregister(n)}function I(n,t,e=[],r=function(){}){let s=!1,o=new Proxy(r,{get(c,u){if(S(s),u===Q)return()=>{st(o),$(n),t.clear(),s=!0};if(u==="then"){if(e.length===0)return{then:()=>o};let i=A(n,t,{type:"GET",path:e.map(a=>a.toString())}).then(m);return i.then.bind(i)}return I(n,t,[...e,u])},set(c,u,i){S(s);let[a,l]=_(i);return A(n,t,{type:"SET",path:[...e,u].map(h=>h.toString()),value:a},l).then(m)},apply(c,u,i){S(s);let a=e[e.length-1];if(a===J)return A(n,t,{type:"ENDPOINT"}).then(m);if(a==="bind")return I(n,t,e.slice(0,-1));let[l,h]=D(i);return A(n,t,{type:"APPLY",path:e.map(f=>f.toString()),argumentList:l},h).then(m)},construct(c,u){S(s);let[i,a]=D(u);return A(n,t,{type:"CONSTRUCT",path:e.map(l=>l.toString()),argumentList:i},a).then(m)}});return rt(o,n),o}function it(n){return Array.prototype.concat.apply([],n)}function D(n){let t=n.map(_);return[t.map(e=>e[0]),it(t.map(e=>e[1]))]}var W=new WeakMap;function ot(n,t){return W.set(n,t),n}function at(n){return Object.assign(n,{[F]:!0})}function _(n){for(let[t,e]of H)if(e.canHandle(n)){let[r,s]=e.serialize(n);return[{type:"HANDLER",name:t,value:r},s]}return[{type:"RAW",value:n},W.get(n)||[]]}function m(n){switch(n.type){case"HANDLER":return H.get(n.name).deserialize(n.value);case"RAW":return n.value}}function A(n,t,e,r){return new Promise(s=>{let o=ct();t.set(o,s),n.start&&n.start(),n.postMessage(Object.assign({id:o},e),r)})}function ct(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}var G=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],L=1,x=8,d=new Uint32Array(96),C=class n{static from(t){if(!t||t.byteLength===void 0||t.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");let[e,r]=new Uint8Array(t,0,2);if(e!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==L)throw new Error(`Got v${s} data when expected v${L}.`);let o=G[r&15];if(!o)throw new Error("Unrecognized array type.");let[c]=new Uint16Array(t,2,1),[u]=new Uint32Array(t,4,1);return new n(u,c,o,void 0,t)}constructor(t,e=64,r=Float64Array,s=ArrayBuffer,o){if(isNaN(t)||t<0)throw new Error(`Unexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;let c=G.indexOf(this.ArrayType),u=t*2*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(c<0)throw new Error(`Unexpected typed array class: ${r}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,x,t),this.coords=new r(o,x+i+a,t*2),this._pos=t*2,this._finished=!0;else{let l=this.data=new s(x+u+i+a);this.ids=new this.IndexArrayType(l,x,t),this.coords=new r(l,x+i+a,t*2),this._pos=0,this._finished=!1,new Uint8Array(l,0,2).set([219,(L<<4)+c]),new Uint16Array(l,2,1)[0]=e,new Uint32Array(l,4,1)[0]=t}}add(t,e){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){let t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return N(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=[];for(;i>0;){let l=d[--i],h=d[--i],f=d[--i];if(h-f<=u){for(let g=f;g<=h;g++){let E=c[2*g],k=c[2*g+1];E>=t&&E<=r&&k>=e&&k<=s&&a.push(o[g])}continue}let y=f+h>>1,w=c[2*y],p=c[2*y+1];w>=t&&w<=r&&p>=e&&p<=s&&a.push(o[y]),(l===0?t<=w:e<=p)&&(d[i++]=f,d[i++]=y-1,d[i++]=1-l),(l===0?r>=w:s>=p)&&(d[i++]=y+1,d[i++]=h,d[i++]=1-l)}return a}within(t,e,r){let s=[];return this.withinInto(t,e,r,s),s}withinInto(t,e,r,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:c,nodeSize:u}=this;d[0]=0,d[1]=o.length-1,d[2]=0;let i=3,a=0,l=r*r;for(;i>0;){let h=d[--i],f=d[--i],y=d[--i];if(f-y<=u){for(let E=y;E<=f;E++)j(c[2*E],c[2*E+1],t,e)<=l&&(s[a++]=o[E]);continue}let w=y+f>>1,p=c[2*w],g=c[2*w+1];j(p,g,t,e)<=l&&(s[a++]=o[w]),(h===0?t-r<=p:e-r<=g)&&(d[i++]=y,d[i++]=w-1,d[i++]=1-h),(h===0?t+r>=p:e+r>=g)&&(d[i++]=w+1,d[i++]=f,d[i++]=1-h)}return a}};function N(n,t,e,r,s,o){if(s-r<=e)return;let c=r+s>>1;K(n,t,c,r,s,o),N(n,t,e,r,c-1,1-o),N(n,t,e,c+1,s,1-o)}function K(n,t,e,r,s,o){for(;s>r;){if(s-r>600){let a=s-r+1,l=e-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),y=.5*Math.sqrt(h*f*(a-f)/a)*(l-a/2<0?-1:1),w=Math.max(r,Math.floor(e-l*f/a+y)),p=Math.min(s,Math.floor(e+(a-l)*f/a+y));K(n,t,e,w,p,o)}let c=t[2*e+o],u=r,i=s;for(b(n,t,r,e),t[2*s+o]>c&&b(n,t,r,s);u<i;){for(b(n,t,u,i),u++,i--;t[2*u+o]<c;)u++;for(;t[2*i+o]>c;)i--}t[2*r+o]===c?b(n,t,r,i):(i++,b(n,t,i,s)),i<=e&&(r=i+1),e<=i&&(s=i-1)}}function b(n,t,e,r){O(n,e,r),O(t,2*e,2*r),O(t,2*e+1,2*r+1)}function O(n,t,e){let r=n[t];n[t]=n[e],n[e]=r}function j(n,t,e,r){let s=n-e,o=t-r;return s*s+o*o}var v=class{constructor(){M(this,"index",null);M(this,"xCoords",null);M(this,"yCoords",null)}buildIndex(t){this.clear(),this.xCoords=new Float64Array(t.length),this.yCoords=new Float64Array(t.length);for(let[r,s]of t.entries())this.xCoords[r]=s.x,this.yCoords[r]=s.y;let e=new C(t.length);for(let r=0;r<t.length;r++)e.add(this.xCoords[r],this.yCoords[r]);return e.finish(),this.index=e,e.data}clear(){this.index=null,this.xCoords=null,this.yCoords=null}findNearestPoint(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return null;let s=this.index.within(t,e,r);if(s.length===0)return null;let o=s[0],c=1/0;for(let u of s){let i=t-this.xCoords[u],a=e-this.yCoords[u],l=i*i+a*a;l<c&&(c=l,o=u)}return{x:this.xCoords[o],y:this.yCoords[o]}}findPointsInRadius(t,e,r){if(!this.index||!this.xCoords||!this.yCoords)return[];let s=this.index.within(t,e,r),o=Array.from({length:s.length});for(let[c,u]of s.entries())o[c]={x:this.xCoords[u],y:this.yCoords[u]};return o}};U(new v);\n/*! Bundled license information:\n\ncomlink/dist/esm/comlink.mjs:\n (**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n *)\n*/\n')}function an({snapPoints:e,snapRadius:t=50}){let n=useRef(null),r=useRef(null),a=useRef(false),i=useCallback(()=>{if(a.current)return null;if(!r.current){let o=new ae;r.current={worker:o,api:it.wrap(o)};}return r.current.api},[]);useEffect(()=>(a.current=false,i(),()=>{a.current=true,r.current?.worker.terminate(),r.current=null,n.current=null;}),[i]);let s=useCallback(()=>{let o=i();if(!e?.length||!o)return null;if(n.current?.points!==e){let l={points:e,built:o.buildIndex(e)};n.current=l,l.built.catch(()=>{n.current===l&&(n.current=null);});}return {api:o,built:n.current.built}},[e,i]);useEffect(()=>{s()?.built.catch(()=>{});},[s]);let c=useCallback(async o=>{let l=s();if(!l)return null;let[,m]=await Promise.all([l.built,l.api.findNearestPoint(o.x,o.y,t)]);return m},[s,t]),p=useCallback(async o=>{let l=s();if(!l)return [];let[,m]=await Promise.all([l.built,l.api.findPointsInRadius(o.x,o.y,t)]);return m},[s,t]);return {findNearestPoint:c,findPointsInRadius:p}}
|
|
11
|
-
export{ke as a,Ke as b,rt as c,an as d};
|
package/dist/chunk-VKWXATZ3.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1,e}from'./chunk-FCKJCFMD.mjs';import {a as a$g,b as b$4}from'./chunk-KADD66HZ.mjs';import {a as a$j}from'./chunk-X34RHNLT.mjs';import {a as a$h}from'./chunk-PQIDCA7P.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {c as c$3}from'./chunk-W6QO7FPZ.mjs';import {a as a$5}from'./chunk-DIL5HL6K.mjs';import {a as a$7}from'./chunk-VQHI3ZCW.mjs';import {a as a$i}from'./chunk-N4NDPTX6.mjs';import {a as a$c}from'./chunk-JC22ELJM.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {a as a$f}from'./chunk-DLJHL4V7.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {a as a$e}from'./chunk-QSFRMY47.mjs';import {a as a$k}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-WAPBLICF.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {d}from'./chunk-QVFGEXDU.mjs';import {b as b$3,a as a$d}from'./chunk-3PBFSDMT.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {j}from'./chunk-NQVTVL24.mjs';import {a as a$a,h,l}from'./chunk-SCJ3RG7B.mjs';import {c}from'./chunk-PJINRIA6.mjs';import {a as a$8}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-35AM4QEA.mjs';import {a as a$9}from'./chunk-6ZQE5SHE.mjs';import {b as b$5}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {HelpIcon}from'@baseline-ui/icons/16';import Mr,{useMemo,useState,useCallback,useRef}from'react';import {flushSync}from'react-dom';import {themeVars}from'@baseline-ui/tokens';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var ne={"ar-AE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0623\u062F\u0627\u0629 \u0627\u0646\u062A\u0642\u0627\u0621 \u0627\u0644\u0644\u0648\u0646",colorSwatch:"\u062A\u063A\u064A\u064A\u0631 \u0627\u0644\u0623\u0644\u0648\u0627\u0646",transparent:"\u0634\u0641\u0627\u0641",twoDimensionalSlider:"\u0645\u064F\u0646\u0632\u0644\u0642 2D"},"bg-BG":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0421\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0437\u0430 \u0438\u0437\u0431\u0438\u0440\u0430\u043D\u0435 \u043D\u0430 \u0446\u0432\u044F\u0442",colorSwatch:"\u0446\u0432\u0435\u0442\u043D\u0430 \u043C\u043E\u0441\u0442\u0440\u0430",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u0435\u043D",twoDimensionalSlider:"2D \u043F\u043B\u044A\u0437\u0433\u0430\u0447"},"cs-CZ":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDb\u011Br barvy",colorSwatch:"barevn\xFD vzorek",transparent:"pr\u016Fhledn\xFD",twoDimensionalSlider:"2D posuvn\xEDk"},"da-DK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farvev\xE6lger",colorSwatch:"farvepr\xF8ve",transparent:"gennemsigtig",twoDimensionalSlider:"2D-skyder"},"de-DE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Farbw\xE4hler",colorSwatch:"Farbfeld",transparent:"transparent",twoDimensionalSlider:"2D-Schieberegler"},"el-GR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u0395\u03C0\u03B9\u03BB\u03BF\u03B3\u03AD\u03B1\u03C2 \u03C7\u03C1\u03C9\u03BC\u03AC\u03C4\u03C9\u03BD",colorSwatch:"\u03C7\u03C1\u03C9\u03BC\u03B1\u03C4\u03B9\u03BA\u03CC \u03B4\u03B5\u03AF\u03B3\u03BC\u03B1",transparent:"\u03B4\u03B9\u03B1\u03C6\u03B1\u03BD\u03AD\u03C2",twoDimensionalSlider:"\u03A1\u03C5\u03B8\u03BC\u03B9\u03C3\u03C4\u03B9\u03BA\u03CC 2D"},"en-US":{colorPicker:"Color picker",twoDimensionalSlider:"2D slider",colorNameAndValue:e=>`${e.name}: ${e.value}`,colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorSwatch:"color swatch",transparent:"transparent"},"es-ES":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de color",colorSwatch:"muestra de color",transparent:"transparente",twoDimensionalSlider:"Regulador 2D"},"et-EE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rvivalija",colorSwatch:"v\xE4rvin\xE4idis",transparent:"l\xE4bipaistev",twoDimensionalSlider:"2D-liugur"},"fi-FI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xE4rimuokkain",colorSwatch:"v\xE4rimalli",transparent:"l\xE4pin\xE4kyv\xE4",twoDimensionalSlider:"2D-liukus\xE4\xE4din"},"fr-FR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\xA0: ${e.value}`,colorPicker:"S\xE9lecteur de couleurs",colorSwatch:"\xC9chantillon de couleurs",transparent:"Transparent",twoDimensionalSlider:"Curseur\xA02D"},"he-IL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u05D1\u05D5\u05D7\u05E8 \u05D4\u05E6\u05D1\u05E2\u05D9\u05DD",colorSwatch:"\u05D3\u05D5\u05D2\u05DE\u05D9\u05EA \u05E6\u05D1\u05E2",transparent:"\u05E9\u05E7\u05D5\u05E3",twoDimensionalSlider:"\u05DE\u05D7\u05D5\u05D5\u05DF \u05D3\u05D5 \u05DE\u05D9\u05DE\u05D3\u05D9"},"hr-HR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Odabir boje",colorSwatch:"uzorak boje",transparent:"transparentno",twoDimensionalSlider:"2D kliza\u010D"},"hu-HU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Sz\xEDnv\xE1laszt\xF3",colorSwatch:"sz\xEDnt\xE1r",transparent:"\xE1tl\xE1tsz\xF3",twoDimensionalSlider:"2D-cs\xFAszka"},"it-IT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selettore colore",colorSwatch:"campione di colore",transparent:"trasparente",twoDimensionalSlider:"Cursore 2D"},"ja-JP":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name} : ${e.value}`,colorPicker:"\u30AB\u30E9\u30FC\u30D4\u30C3\u30AB\u30FC",colorSwatch:"\u30AB\u30E9\u30FC\u30B9\u30A6\u30A9\u30C3\u30C1",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u30B9\u30E9\u30A4\u30C0\u30FC"},"ko-KR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\uC0C9\uC0C1 \uD53C\uCEE4",colorSwatch:"\uC0C9\uC0C1 \uACAC\uBCF8",transparent:"\uD22C\uBA85\uB3C4",twoDimensionalSlider:"2D \uC2AC\uB77C\uC774\uB354"},"lt-LT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Spalv\u0173 parinkiklis",colorSwatch:"spalv\u0173 pavyzdys",transparent:"skaidrus",twoDimensionalSlider:"2D slankiklis"},"lv-LV":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kr\u0101su atlas\u012Bt\u0101js",colorSwatch:"kr\u0101su paraugs",transparent:"caursp\u012Bd\u012Bgs",twoDimensionalSlider:"2D sl\u012Bdnis"},"nb-NO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Fargevelger",colorSwatch:"fargekart",transparent:"gjennomsiktig",twoDimensionalSlider:"2D-glidebryter"},"nl-NL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Kleurkiezer",colorSwatch:"kleurstaal",transparent:"transparant",twoDimensionalSlider:"2D-schuifregelaar"},"pl-PL":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Pr\xF3bnik kolor\xF3w",colorSwatch:"pr\xF3bka koloru",transparent:"przezroczysty",twoDimensionalSlider:"Suwak 2D"},"pt-BR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cores",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"pt-PT":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Seletor de cores",colorSwatch:"amostra de cor",transparent:"transparente",twoDimensionalSlider:"Controle deslizante 2D"},"ro-RO":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Selector de culori",colorSwatch:"specimen de culoare",transparent:"transparent",twoDimensionalSlider:"Glisor 2D"},"ru-RU":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432",colorSwatch:"\u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u043E\u0431\u0440\u0430\u0437\u0435\u0446",transparent:"\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u0439",twoDimensionalSlider:"\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A 2D"},"sk-SK":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"V\xFDber farieb",colorSwatch:"vzorkovn\xEDk farieb",transparent:"transparentn\xFD",twoDimensionalSlider:"2D jazdec"},"sl-SI":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Izbirnik barv",colorSwatch:"barvna paleta",transparent:"prozorno",twoDimensionalSlider:"2D drsnik"},"sr-SP":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Bira\u010D boja",colorSwatch:"Uzorak boje",transparent:"providno",twoDimensionalSlider:"2D kliza\u010D"},"sv-SE":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"F\xE4rgv\xE4ljaren",colorSwatch:"f\xE4rgruta",transparent:"genomskinlig",twoDimensionalSlider:"2D-reglage"},"tr-TR":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"Renk Se\xE7ici",colorSwatch:"renk \xF6rne\u011Fi",transparent:"saydam",twoDimensionalSlider:"2D s\xFCrg\xFC"},"uk-UA":{colorInputLabel:e=>`${e.label}, ${e.channelLabel}`,colorNameAndValue:e=>`${e.name}: ${e.value}`,colorPicker:"\u041F\u0430\u043B\u0456\u0442\u0440\u0430 \u043A\u043E\u043B\u044C\u043E\u0440\u0456\u0432",colorSwatch:"\u0437\u0440\u0430\u0437\u043E\u043A \u043A\u043E\u043B\u044C\u043E\u0440\u0443",transparent:"\u043F\u0440\u043E\u0437\u043E\u0440\u0438\u0439",twoDimensionalSlider:"\u041F\u043E\u0432\u0437\u0443\u043D\u043E\u043A 2D"},"zh-CN":{colorInputLabel:e=>`${e.label}\u3001${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u62FE\u8272\u5668",colorSwatch:"\u989C\u8272\u8272\u677F",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u5757"},"zh-TW":{colorInputLabel:e=>`${e.label}\uFF0C${e.channelLabel}`,colorNameAndValue:e=>`${e.name}\uFF1A${e.value}`,colorPicker:"\u6AA2\u8272\u5668",colorSwatch:"\u8272\u7968",transparent:"\u900F\u660E",twoDimensionalSlider:"2D \u6ED1\u687F"}};var Ye=e=>[0,60,120,180,240,300,360].map(r=>e.withChannelValue("hue",r).toString("css")).join(", "),Je=e=>`${e.withChannelValue("saturation",0)}, transparent`,wr={hue:Ye,saturation:Je,lightness:()=>"black, transparent, white"},Ar={hue:Ye,saturation:Je,brightness:()=>"black, transparent"};function Ze({direction:e,state:r,zChannel:l,xChannel:t,yChannel:a}){return useMemo(()=>{let y=e==="rtl"?"left":"right",C={},g=r.value.getChannelValue(l);switch(r.value.getColorSpace()){case "rgb":{let i=a$1("rgb(0, 0, 0)");C={background:[`linear-gradient(to ${y}, ${i.withChannelValue(t,0)}, ${i.withChannelValue(t,255)})`,`linear-gradient(to top, ${i.withChannelValue(a,0)}, ${i.withChannelValue(a,255)})`,i.withChannelValue(l,g)].join(","),backgroundBlendMode:"screen"};break}case "hsl":{let i=r.value.getColorChannels(),s=a$1("hsl(0, 100%, 50%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${wr[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}case "hsb":{let i=r.value.getColorChannels(),s=a$1("hsb(0, 100%, 100%)").withChannelValue(l,g),c=i.filter(n=>n!==l).map(n=>`linear-gradient(to ${n===t?y:"top"}, ${Ar[n](s)})`).reverse();l==="hue"&&c.push(s.toString("css")),C={background:c.join(", ")};break}}let{x:f,y:d}=r.getThumbPosition();e==="rtl"&&(f=1-f);let z={forcedColorAdjust:"none"};return {colorAreaStyleProps:{style:{position:"relative",touchAction:"none",...z,...C}},thumbStyleProps:{style:{position:"absolute",left:`${f*100}%`,top:`${d*100}%`,transform:"translate(-50%, -50%)",touchAction:"none",...z}}}},[e,r,l,t,a])}function er(e,r){let{isDisabled:l$1,inputXRef:t,inputYRef:a,containerRef:u,"aria-label":y,xName:C,yName:g,form:f}=e,d=b$2(ne,"@react-aria/color"),{addGlobalListener:z,removeGlobalListener:i}=a$9(),{direction:s,locale:c$1}=b$1(),[n,v]=useState(null),b=useCallback((o=t)=>{o.current&&a$a(o.current);},[t]);a$b(t,r.defaultValue,r.setValue);let[S,h$1]=useState(false),[I,x]=useState(false),{xChannel:_,yChannel:m,zChannel:A}=r.channels,j$1=r.xChannelStep,N=r.yChannelStep,k=useRef(null),O=(o,p,w)=>{r.setDragging(true),h$1(true),o(),r.setDragging(false),b(p),v(w);},{keyboardProps:$}=j({shortcuts:{PageUp:()=>O(()=>{r.incrementY(r.yChannelPageStep);},a,"y"),PageDown:()=>O(()=>{r.decrementY(r.yChannelPageStep);},a,"y"),Home:()=>O(()=>{s==="rtl"?r.incrementX(r.xChannelPageStep):r.decrementX(r.xChannelPageStep);},t,"x"),End:()=>O(()=>{s==="rtl"?r.decrementX(r.xChannelPageStep):r.incrementX(r.xChannelPageStep);},t,"x")},allowRepeats:true}),J={onMoveStart(){k.current=null,r.setDragging(true);},onMove({deltaX:o,deltaY:p,pointerType:w,shiftKey:Z}){let{incrementX:U,decrementX:se,incrementY:ce,decrementY:T,xChannelPageStep:q,xChannelStep:B,yChannelPageStep:ke,yChannelStep:Pe,getThumbPosition:Sr,setColorFromPoint:gr}=r;k.current==null&&(k.current=Sr());let{width:xr,height:kr}=u.current?.getBoundingClientRect()||{width:0,height:0},we=o!==0||p!==0;if(w==="keyboard"){let Ae=Z&&q>B?q:B,$e=Z&&ke>Pe?ke:Pe;o>0&&s==="ltr"||o<0&&s==="rtl"?U(Ae):o<0&&s==="ltr"||o>0&&s==="rtl"?se(Ae):p>0?T($e):p<0&&ce($e),h$1(we),n=we&&Math.abs(p)>Math.abs(o)?"y":"x",v(n);}else k.current.x+=(s==="rtl"?-1:1)*o/xr,k.current.y+=p/kr,gr(k.current.x,k.current.y);},onMoveEnd(){M.current=false,r.setDragging(false),b(n==="x"?t:a);}},{moveProps:sr}=a$c(J),{focusWithinProps:cr}=b$3({onFocusWithinChange:o=>{o||(h$1(false),x(false));}}),F=useRef(void 0),M=useRef(false),{moveProps:dr}=a$c({onMoveStart(){M.current&&J.onMoveStart();},onMove(o){M.current&&J.onMove(o);},onMoveEnd(){M.current&&J.onMoveEnd();}}),pe=o=>{let p=b$5(u.current);r.isDragging||(F.current=o,h$1(false),b(),r.setDragging(true),typeof PointerEvent<"u"?z(p,"pointerup",R,false):(z(p,"mouseup",R,false),z(p,"touchend",R,false)));},R=o=>{let p=b$5(u.current);(o.pointerId??o.changedTouches?.[0].identifier)===F.current&&(h$1(false),b(),r.setDragging(false),F.current=void 0,M.current=false,typeof PointerEvent<"u"?i(p,"pointerup",R,false):(i(p,"mouseup",R,false),i(p,"touchend",R,false)));},ue=(o,p,w,Z)=>{let U=o.getBoundingClientRect(),{width:se,height:ce}=U,T=(w-U.x)/se,q=(Z-U.y)/ce;s==="rtl"&&(T=1-T);let B=b$5(u.current);T>=0&&T<=1&&q>=0&&q<=1&&!r.isDragging&&F.current===void 0&&(M.current=true,h$1(false),F.current=p,r.setColorFromPoint(T,q),b(),r.setDragging(true),typeof PointerEvent<"u"?z(B,"pointerup",E,false):(z(B,"mouseup",E,false),z(B,"touchend",E,false)));},E=o=>{let p=o.pointerId??o.changedTouches?.[0].identifier;if(M.current&&p===F.current){M.current=false,h$1(false),F.current=void 0,r.setDragging(false),b();let w=b$5(u.current);typeof PointerEvent<"u"?i(w,"pointerup",E,false):(i(w,"mouseup",E,false),i(w,"touchend",E,false));}},mr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||ue(o.currentTarget,o.pointerId,o.clientX,o.clientY);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||ue(o.currentTarget,void 0,o.clientX,o.clientY);},onTouchStart:o=>{ue(o.currentTarget,o.changedTouches[0].identifier,o.changedTouches[0].clientX,o.changedTouches[0].clientY);}}},dr),yr=l$1?{}:c({...typeof PointerEvent<"u"?{onPointerDown:o=>{o.pointerType==="mouse"&&(o.button!==0||o.altKey||o.ctrlKey||o.metaKey)||pe(o.pointerId);}}:{onMouseDown:o=>{o.button!==0||o.altKey||o.ctrlKey||o.metaKey||pe(void 0);},onTouchStart:o=>{pe(o.changedTouches[0].identifier);}}},cr,$,sr),{focusProps:br}=a$d({onFocus:()=>{v("x");}}),{focusProps:_r}=a$d({onFocus:()=>{v("y");}}),ve=o=>{let{target:p}=o;x(true),p===t.current?r.setXValue(parseFloat(p.value)):p===a.current&&r.setYValue(parseFloat(p.value));},W=h()||l(),P=r.getDisplayColor(),Se=useCallback(o=>`${I||S?d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}):[d.format("colorNameAndValue",{name:P.getChannelName(o,c$1),value:P.formatChannelValue(o,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(o===m?_:m,c$1),value:P.formatChannelValue(o===m?_:m,c$1)}),d.format("colorNameAndValue",{name:P.getChannelName(A,c$1),value:P.formatChannelValue(A,c$1)})].join(", ")}, ${P.getColorName(c$1)}`,[c$1,P,d,I,S,_,m,A]),H=d.format("colorPicker"),fr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),zr=a$e({...e,"aria-label":y?d.format("colorInputLabel",{label:y,channelLabel:H}):H}),hr=a$e({...e,"aria-label":y?`${y}, ${H}`:void 0},W?H:void 0),ge=d.format("twoDimensionalSlider"),{visuallyHiddenProps:xe}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}}),{colorAreaStyleProps:Cr,thumbStyleProps:vr}=Ze({direction:s,state:r,xChannel:_,yChannel:m,zChannel:A});return {colorAreaProps:{...hr,...mr,...Cr,role:"group"},thumbProps:{...yr,...vr,role:"presentation"},xInputProps:{...fr,...xe,...br,type:"range",min:r.value.getChannelRange(_).minValue,max:r.value.getChannelRange(_).maxValue,step:j$1,"aria-roledescription":ge,"aria-valuetext":Se(_),"aria-orientation":"horizontal","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(_),name:C,form:f,tabIndex:W||!n||n==="x"?void 0:-1,"aria-hidden":W||!n||n==="x"||S?void 0:"true",onChange:ve},yInputProps:{...zr,...xe,..._r,type:"range",min:r.value.getChannelRange(m).minValue,max:r.value.getChannelRange(m).maxValue,step:N,"aria-roledescription":ge,"aria-valuetext":Se(m),"aria-orientation":"vertical","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"],disabled:l$1,value:r.value.getChannelValue(m),name:g,form:f,tabIndex:W||n==="y"?void 0:-1,"aria-hidden":W||n==="y"||S?void 0:"true",onChange:ve}}}function rr(e,r){let{trackRef:l,inputRef:t,orientation:a,channel:u,"aria-label":y,name:C,form:g}=e,{locale:f,direction:d}=b$1();!e.label&&!y&&!e["aria-labelledby"]&&(y=r.value.getChannelName(u,f));let{groupProps:z,trackProps:i,labelProps:s,outputProps:c$1}=a$g({...e,"aria-label":y},r,l),{inputProps:n,thumbProps:v}=b$4({index:0,orientation:a,isDisabled:e.isDisabled,name:C,form:g,trackRef:l,inputRef:t},r),b=r.getDisplayColor(),S=()=>{let x;switch(a==="vertical"?x="top":d==="ltr"?x="right":x="left",u){case "hue":{let _=[0,60,120,180,240,300,360].map(m=>b.withChannelValue("hue",m).toString("css")).join(", ");return `linear-gradient(to ${x}, ${_})`}case "lightness":{let _=r.getThumbMinValue(0),m=r.getThumbMaxValue(0),A=b.withChannelValue(u,_).toString("css"),j=b.withChannelValue(u,(m-_)/2).toString("css"),N=b.withChannelValue(u,m).toString("css");return `linear-gradient(to ${x}, ${A}, ${j}, ${N})`}case "saturation":case "brightness":case "red":case "green":case "blue":case "alpha":{let _=b.withChannelValue(u,r.getThumbMinValue(0)).toString("css"),m=b.withChannelValue(u,r.getThumbMaxValue(0)).toString("css");return `linear-gradient(to ${x}, ${_}, ${m})`}default:throw new Error("Unknown color channel: "+u)}},h={forcedColorAdjust:"none"};u==="hue"?n["aria-valuetext"]+=`, ${b.getHueName(f)}`:u!=="alpha"&&(n["aria-valuetext"]+=`, ${b.getColorName(f)}`);let{visuallyHiddenProps:I}=a$f({style:{opacity:"0.0001",width:"100%",height:"100%",pointerEvents:"none"}});return {trackProps:{...c(z,i),style:{...i.style,...h,background:S()}},inputProps:{...n,style:{...n.style,...I.style}},thumbProps:{...v,style:{...v.style,...h}},labelProps:s,outputProps:c$1}}function or(e,r,l){let{isDisabled:t,isReadOnly:a,isRequired:u,isWheelDisabled:y,validationBehavior:C="aria",onKeyDown:g,onKeyUp:f}=e,{colorValue:d,inputValue:z,increment:i,decrement:s,incrementToMax:c$1,decrementToMin:n,commit:v,commitValidation:b}=r,S=c$2(),{spinButtonProps:h}=a$h({isDisabled:t,isReadOnly:a,isRequired:u,maxValue:16777215,minValue:0,onIncrement:i,onIncrementToMax:c$1,onDecrement:s,onDecrementToMin:n,value:d?d.toHexInt():void 0,textValue:d?d.toString("hex"):void 0}),[I,x]=useState(false),{focusWithinProps:_}=b$3({isDisabled:t,onFocusWithinChange:x}),m=useCallback($=>{Math.abs($.deltaY)<=Math.abs($.deltaX)||($.deltaY>0?i():$.deltaY<0&&s());},[s,i]);a$i({onScroll:m,isDisabled:y||t||a||!I},l);let{keyboardProps:j$1}=j({isDisabled:t||a,shortcuts:{Enter:()=>(flushSync(()=>{v();}),b(),{shouldPreventDefault:false})},onKeyDown:g,onKeyUp:f}),N=$=>{r.validate($)&&r.setInputValue($);},{inputProps:k,...O}=a$j({...e,id:S,value:z,defaultValue:"!",validate:void 0,[c$3]:r,type:"text",autoComplete:"off",onChange:N,onKeyDown:void 0,onKeyUp:void 0},r,l);return a$b(l,r.defaultColorValue,r.setColorValue),k=c(j$1,k,h,_,{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false",onBlur:v}),C==="native"&&(k["aria-required"]=void 0),{inputProps:k,...O}}function ie(e){let{color:r,colorName:l}=e,t=r||"#fff0",a=useMemo(()=>typeof t=="string"?a$1(t):t,[t]),{locale:u}=b$1(),y=a$8(e,{labelable:true}),C=b$2(ne,"@react-aria/color"),g=c$2(e.id);return l||(l=a.getChannelValue("alpha")===0?C.format("transparent"):a.getColorName(u)),{colorSwatchProps:{...y,role:"img","aria-roledescription":C.format("colorSwatch"),"aria-label":[l,e["aria-label"]||""].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]?`${g} ${e["aria-labelledby"]}`:void 0,id:g,style:{backgroundColor:a.toString("css"),forcedColorAdjust:"none"}},color:a||null}}var nl="_1dbkl53 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6m3",il="_1dbkl5e",pl=a({defaultClassName:"_1dbkl54 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6me _1yep5z6m6 _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6ey _1yep5z6m5 _1yep5z6dy",variantClassNames:{isHovered:{true:"_1dbkl55"},isFocusVisible:{true:"_1dbkl56"},isDisabled:{true:"z9nup82 _1yep5z611l"},labelPosition:{top:"_1dbkl58",start:"_1dbkl59"}},defaultVariants:{},compoundVariants:[]}),ul="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kz _1yep5z6l0 _1yep5z6l1",sl=a({defaultClassName:"_1dbkl50 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6dy _1yep5z6ez",variantClassNames:{labelPosition:{top:"_1yep5z6oy _1yep5z6oz _1yep5z6p0",start:"_1dbkl52"}},defaultVariants:{},compoundVariants:[]}),cl="_1dbkl5l _1yep5z6je _1yep5z6jf _1yep5z6jg _1yep5z69f _1yep5z69g _1yep5z69h",dl="_1dbkl5f z9nup86",ml="_1dbkl5m _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv",lr="_1dbkl5k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6m6",yl="_1yep5z63r _1yep5z63s _1yep5z63t _1yep5z619 _1yep5z61a _1yep5z61b _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6dy _1yep5z6ez _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6jz _1yep5z6k0 _1yep5z6k1",bl=a({defaultClassName:"_1dbkl5h _1dbkl5g _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6g9",variantClassNames:{includesCustomColorPicker:{true:"_1yep5z6nm _1yep5z6nn _1yep5z6no"}},defaultVariants:{},compoundVariants:[]}),_l="_1dbkl5v _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",fl=a({defaultClassName:"_1dbkl5q _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6br _1yep5z6bs _1yep5z6bt _1yep5z6d3 _1yep5z6d4 _1yep5z6d5 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocused:{true:"_1dbkl5r _1yep5z613w"},isHovered:{true:"_1dbkl5s"},allowAlpha:{false:"_1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z618m"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isFocused:false},"_1yep5z61qj"]]}),zl=a({defaultClassName:"_1dbkl5a _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62c _1yep5z62d _1yep5z62e _1yep5z63i _1yep5z63j _1yep5z63k _1yep5z616 _1yep5z617 _1yep5z618 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e _1yep5z6f9 _1yep5z6m5 _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6lt",variantClassNames:{isHovered:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z618s _1yep5z618q _1yep5z618t _1yep5z614w"},isDisabled:{true:"_1yep5z611u"}},defaultVariants:{},compoundVariants:[]}),hl="_1dbkl5g",Cl="_1dbkl5u",vl="_1dbkl5j _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69f _1yep5z69g _1yep5z69h",Sl="_1dbkl5x",gl="_1dbkl5w",xl="_1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69l _1yep5z69m _1yep5z69n",kl=a({defaultClassName:"_1dbkl5n _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6ma _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6mf _1yep5z6mi",variantClassNames:{isFocusVisible:{true:"_1dbkl5o _1yep5z618q _1yep5z614w _1yep5z618s"}},defaultVariants:{},compoundVariants:[]}),Pl="z9nup83 z9nup85 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6lw _1yep5z6lx _1yep5z6lz _1yep5z6ly _1yep5z6iw _1yep5z6ix _1yep5z6iy";var jl=[{id:"hex",label:"HEX"},{id:"rgb",label:"RGB"}],Nl=a$1("#000000").toFormat("hsla"),fe="hsla",ze="hexa";function jr(e){if(typeof document>"u")return "#000000";let r=document.createElement("canvas").getContext("2d");return a$k(r,"Failed to get canvas context"),r.fillStyle=e,r.fillStyle}function Ml(e$1){if(typeof e$1=="string")try{return e(e$1).toFormat(fe)}catch{return a$1(jr(e$1)).toFormat(fe)}else if(e$1)return e$1.toFormat(fe);return null}function Fl(e,r){return e?.getChannelValue("alpha")?r?.toString(ze)===e.toString(ze):!r?.getChannelValue("alpha")}function Tl(e,r,l){return r?.label?r.label:e?.getChannelValue("alpha")===0?l:e?.toString("rgba")}var he="NONE";function Ol(e$1,r){let l=r?.map(a=>({id:e(a.color).toString(ze),label:a.label}))||[],t={id:he,label:e$1};return [...l,t]}var Rl=(e,{optionProps:r,isFocusVisible:l,isSelected:t},a)=>(a$k(e.value&&"label"in e.value,"Item must have label"),jsx("li",{...r,ref:a,className:lr,children:jsx(Ce,{color:e.value.id,isFocusVisible:l,isSelected:t,"aria-label":e.value.label,isInteractive:true})})),ar=(e,r=4)=>{let l=e.getChannelValue("alpha")===0,t=`repeating-conic-gradient(transparent 0% 25%, ${themeVars.color.background.secondary.medium} 25% 50%)`;return {backgroundImage:l?t:`linear-gradient(${e.toString("hexa")}, ${e.toString("hexa")}), ${t}`,backgroundSize:`${r}px ${r}px`}};var nr=a({defaultClassName:"_1344e9q0 _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m0 _1yep5z6is _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv z9nup8a",variantClassNames:{isFocusVisible:{true:"_1344e9q1"},isDisabled:{true:"_1344e9q2"},removeBlendMode:{true:"_1344e9q3"},isSelected:{true:"_1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618v"},isHovered:{true:"_1344e9q5"}},defaultVariants:{},compoundVariants:[[{isSelected:false,isFocusVisible:true},"_1344e9q6"],[{isSelected:true,isFocusVisible:true},"_1344e9q7 _1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve"],[{isSelected:true,isDisabled:true},"_1yep5z61vb _1yep5z61v9 _1yep5z61rf _1yep5z61ve _1yep5z61rp"],[{isHovered:true,isSelected:false},"_1yep5z61ve _1yep5z61vb _1yep5z61v9 _1yep5z61rj"]]}),ir="_1yep5z6fa",pr="_1344e9q9 _1yep5z6fp";var Ce=Mr.forwardRef(({color:e$1,isFocusVisible:r,isSelected:l,isInteractive:t,isDisabled:a,style:u,className:y,id:C,tooltip:g,isIndeterminate:f,indeterminateIcon:d$1=HelpIcon,noneLabel:z,"data-block-id":i,"data-block-class":s,...c$1},n)=>{let v=e$1&&e$1!==he&&(typeof e$1=="string"?e(e$1):e$1),{formatMessage:b$1}=b(),S=!v,{colorSwatchProps:h}=ie({color:S?"#000000":v}),{hoverProps:I,isHovered:x}=a$2({isDisabled:a||!t}),_=a$3({"data-focus-visible":r,"data-selected":l,"data-hovered":x,"data-block-id":i,"data-block-class":s,"data-disabled":a,"data-interactive":t,"data-indeterminate":f}),m=S?z??b$1(ur.none):h["aria-label"],A=c$1["aria-label"]??m,{tooltipProps:j}=a$4({tooltip:g,label:A}),N=jsx("div",{...c(I,_,S?{}:h),style:u,"aria-label":S?z??b$1(ur.none):h["aria-label"],role:"img",className:a$6(nr({removeBlendMode:S,isFocusVisible:r,isDisabled:!!a,isSelected:!!l,isHovered:x}),"BaselineUI-ColorSwatch",y),ref:n,id:C,...c$1,children:jsxs(a$5,{display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"full",height:"full",width:"full",opacity:a?"medium":void 0,style:v&&!f?ar(v,4):void 0,children:[S&&!f?jsx("div",{className:pr}):null,f&&d$1?jsx(d$1,{role:"presentation",size:16,className:ir,"aria-hidden":"true"}):null]})});return j&&!a?jsx(a$7,{...j,children:jsx(d,{children:N})}):N});Ce.displayName="ColorSwatch";var ur=c$1({none:{id:"bui.colorSwatch.none",defaultMessage:"None"}});export{fe as A,ze as B,Ml as C,Fl as D,Tl as E,he as F,Ol as G,Rl as H,Ce as I,er as a,or as b,rr as c,nl as d,il as e,pl as f,ul as g,sl as h,cl as i,dl as j,ml as k,yl as l,bl as m,_l as n,fl as o,zl as p,hl as q,Cl as r,vl as s,Sl as t,gl as u,xl as v,kl as w,Pl as x,jl as y,Nl as z};
|
package/dist/chunk-VNJDCKLQ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b as b$4,a as a$7,c as c$4}from'./chunk-TN7FPPGM.mjs';import {c,d,b as b$5,e as e$1,f as f$2}from'./chunk-NMSOOQB2.mjs';import {e,c as c$2,f as f$1}from'./chunk-D6AOHRAV.mjs';import {a as a$9}from'./chunk-WID7IWNC.mjs';import {f,d as d$1}from'./chunk-X6K4M542.mjs';import {b as b$3}from'./chunk-64ZD4EKW.mjs';import {a as a$1,c as c$3,b as b$7}from'./chunk-L3SNGDBH.mjs';import {b as b$6}from'./chunk-DF2D7NE6.mjs';import {a as a$6,b as b$1}from'./chunk-KCHAWPUN.mjs';import {a as a$a}from'./chunk-JZXLV6JU.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$8}from'./chunk-FDDB7QNQ.mjs';import {a as a$2}from'./chunk-LRFFL765.mjs';import {b,c as c$1}from'./chunk-PJINRIA6.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import R,{useRef,createElement,useContext,useEffect}from'react';import {CheckmarkIcon}from'@baseline-ui/icons/24';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var O=R.forwardRef(({item:e,isDisabled:i,isFocusVisible:o,isSelected:r,liProps:n,showSelectedIcon:l,description:p,descriptionProps:S,labelProps:L,isFocused:y,isPressed:u,_state:c$2},s)=>{a(e.value&&a$1(e.value),"Item cannot be a section");let a$6=useRef(null),{icon:t,label:m}=e.value,{hoverProps:d$1,isHovered:g}=a$2({isDisabled:i},a$6),f=a$3({"data-selected":r,"data-disabled":i,"data-focused":y,"data-hovered":g,"data-pressed":u,"data-focus-visible":o,"data-selection-mode":c$2.selectionManager.selectionMode});return jsxs("li",{...c$1(n,d$1,f),className:a$5(d({isHovered:g,isFocused:o,isFirstChild:c$2.collection.getFirstKey()===e.key,isLastChild:c$2.collection.getLastKey()===e.key,isDisabled:i}),n.className,"BaselineUI-ListBox-Option"),style:n.style,ref:b(s,a$6),children:[jsxs(a$4,{display:"flex",alignItems:"center",gap:"lg",children:[l?jsx("span",{"aria-hidden":true,style:{height:24,width:24},children:r?jsx(CheckmarkIcon,{size:24}):null}):null,t?jsx(t,{size:24}):null,jsx("span",{...L,children:m})]}),p?jsx("span",{className:c({isDisabled:i}),...S,children:p}):null]})});O.displayName="DefaultListOption";var le=({item:e,children:i,state:o,dragState:r,elementRef:n,...l})=>{let{dragProps:p}=d$1({key:e.key},r,n);return jsxs(Fragment,{children:[jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"before"},...l}),i(p),o.collection.getKeyAfter(e.key)==null&&jsx(c$4,{target:{type:"item",key:e.key,dropPosition:"after"},...l})]})};le.displayName="DraggableListOption";var C=R.forwardRef(({item:e$1,renderOption:i=(a,t,m)=>jsx(O,{item:a,liProps:t.optionProps,...t,ref:m}),showSelectedIcon:o,state:r,dragState:n,dropState:l,orientation:p,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,optionStyle:u,optionClassName:c},s)=>{let a$2=R.useRef(null),t=e({key:e$1.key},r,a$2),{value:m}=e$1;a(m&&a$1(m),"ListSection should not be passed to ListOption");let d={isFocusVisible:t.isFocusVisible,isSelected:t.isSelected,isFocused:t.isFocused,isDisabled:t.isDisabled,isPressed:t.isPressed},g={style:b$1(u,m,d),className:a$6(c,m,d)};return n&&l?jsx(le,{orientation:p,state:r,item:e$1,dropState:l,dragState:n,elementRef:a$2,renderDropIndicator:S,dropIndicatorStyle:L,dropIndicatorClassName:y,children:f=>i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...c$1(t.optionProps,f),...g}},b(a$2,s))}):i(e$1,{...t,showSelectedIcon:o,_state:r,optionProps:{...t.optionProps,...g}},b(a$2,s))});C.displayName="Option";var me=({section:e,state:i,sectionClassName:o,sectionStyle:r,showSectionHeader:n,renderSectionHeader:l,withSectionHeaderPadding:p=false,...S})=>{let L=R.useRef(null),{itemProps:y,groupProps:u,headingProps:c}=f$1({heading:n?l?.(e,L)||e.rendered:void 0,"aria-label":e["aria-label"]}),s=i.collection.getChildren?.(e.key);a(s,"children must be defined");let{value:a$1}=e;a(a$1&&b$7(a$1),"section must be a ListSection");let t=typeof r=="function"?r(a$1):r,m=typeof o=="function"?o(a$1):o;return jsxs(Fragment,{children:[e.key===i.collection.getFirstKey()?null:jsx(a$a,{UNSAFE_omitRole:true}),jsxs("li",{...y,style:{...y.style,...t},className:a$5(f$2,m,"BaselineUI-ListBox-Section"),children:[e.rendered&&n?l?.(e,L,c)||jsx(a$4,{...c,className:a$5("BaselineUI-ListBox-SectionHeader",e$1),ref:L,paddingX:"lg",typography:"label.md.medium",color:"text.primary",paddingInlineStart:p?"5xl":"lg",paddingInlineEnd:"lg",children:e.rendered}):null,jsx("ul",{...u,children:[...s].map(d=>jsx(C,{item:d,state:i,...S},d.key))})]})]})};var He=R.createContext(null),T=R.forwardRef(({className:e,layout:i="stack",orientation:o="vertical",showSelectedIcon:r=true,style:n,renderOption:l,enableReorder:p=false,shouldSelectOnPressUp:S=false,"data-block-id":L,"data-block-class":y,renderDragPreview:u,onReorder:c,state:s,listBoxHandle:a,...t},m)=>{let d=R.useRef(null),{direction:g}=b$2(),f$1=R.useRef(null),{listBoxProps:Le}=c$2({...t,shouldSelectOnPressUp:p||S,keyboardDelegate:new b$3({collection:s.collection,ref:f$1,layout:i,orientation:o,direction:g,disabledKeys:s.disabledKeys})},s,f$1);b$4({handle:a},s,f$1);let{collectionProps:ye,dragState:ue,dropState:Se}=a$7({...t,onReorder:c,layout:i,orientation:o,enableReorder:p,preview:d},s,f$1),{isFocusVisible:ge,isFocused:xe,focusProps:Pe}=a$8(),Ie=a$3({"data-block-id":L,"data-block-class":y,"data-layout":i,"data-empty":s.collection.size===0,"data-focused":xe,"data-focus-visible":ge,"data-orientation":o});return a$9({ref:f$1,isDisabled:!p}),jsxs("ul",{...c$1(Le,Pe,Ie,ye),className:a$5(b$5,"BaselineUI-ListBox",e),style:n,ref:b(m,f$1),children:[[...s.collection].map(b=>{let E={key:b.key,state:s,dragState:ue,dropState:Se,renderOption:l,renderDropIndicator:t.renderDropIndicator,renderSectionHeader:t.renderSectionHeader,showSelectedIcon:r,orientation:o,dropIndicatorStyle:t.dropIndicatorStyle,dropIndicatorClassName:t.dropIndicatorClassName,optionStyle:t.optionStyle,optionClassName:t.optionClassName,sectionClassName:t.sectionClassName,sectionStyle:t.sectionStyle,showSectionHeader:t.showSectionHeader,withSectionHeaderPadding:t.withSectionHeaderPadding};return b.type==="section"?createElement(me,{...E,key:b.key,section:b}):createElement(C,{...E,key:b.key,item:b})}),u?jsx(f,{ref:d,children:u}):null]})});T.displayName="ListBoxCore";var de=R.forwardRef((e,i)=>{let o=c$3(),r=b$6({...e,children:o});return jsx(T,{...e,ref:i,state:r})});de.displayName="ListBoxStandalone";var fe=R.forwardRef((e,i)=>{let o=useContext(He);return useEffect(()=>{if(!e.items&&!o)throw new Error("ListBox: You must provide a `state` or `items` prop to render the listbox.")},[e.items,o]),o?jsx(T,{...e,ref:i,state:o}):jsx(de,{...e,ref:i})});fe.displayName="ListBox";export{O as a,He as b,fe as c};
|
package/dist/chunk-VQ45RUYJ.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1,c}from'./chunk-KRVEGSVY.mjs';import {d as d$2}from'./chunk-D2NVLRIU.mjs';import {a as a$5}from'./chunk-FTV6OWMI.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,i as i$2}from'./chunk-OS6PVCFX.mjs';import {e,f}from'./chunk-A63HMTSM.mjs';import {a}from'./chunk-UR42GQO4.mjs';import {j,i as i$1,c as c$1}from'./chunk-NQVTVL24.mjs';import {d as d$1}from'./chunk-IIBBR266.mjs';import {o,p,d as d$3,a as a$6,e as e$1,i as i$3}from'./chunk-SCJ3RG7B.mjs';import {c as c$2,a as a$4}from'./chunk-PJINRIA6.mjs';import {c as c$3}from'./chunk-35AM4QEA.mjs';import {i,b as b$2,a as a$3,j as j$1,h}from'./chunk-TYOEGCPS.mjs';import {useRef,useEffect}from'react';import {flushSync}from'react-dom';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function Y(u){return i$3()?u.altKey:u.ctrlKey}function le(u,e){let r=`[data-key="${CSS.escape(String(e))}"]`,l=u.current?.dataset.collection;return l&&(r=`[data-collection="${CSS.escape(l)}"]${r}`),u.current?.querySelector(r)}var Ce=new WeakMap;function Ie(u){let e=c$3();return Ce.set(u,e),e}function ke(u){return Ce.get(u)}var xe=1e3;function Re(u){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:l}=u,i=useRef({search:"",timeout:void 0}),T=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let a=e.getKeyForSearch(i.current.search,r.focusedKey);a==null&&(a=e.getKeyForSearch(i.current.search)),a!=null&&(r.setFocusedKey(a),l&&l(a));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}},b=c=>{let a=We(c.key);if(!(!a||c.ctrlKey||c.metaKey||c.altKey||!h(c.currentTarget,j$1(c))||i.current.search.length===0&&a===" ")){if(i.current.search+=a,e.getKeyForSearch!=null){let y=e.getKeyForSearch(i.current.search,r.focusedKey);if(y==null&&(y=e.getKeyForSearch(i.current.search)),y!=null)r.setFocusedKey(y),l&&l(y),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},xe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?T:void 0,onKeyDown:e.getKeyForSearch?b:void 0}}}function We(u){return u.length===1||!/^[A-Z]/i.test(u)?u:""}function Pt(u){let{selectionManager:e$2,keyboardDelegate:r,ref:l,autoFocus:i$3=false,shouldFocusWrap:T=false,disallowEmptySelection:b$3=false,disallowSelectAll:c$3=false,escapeKeyBehavior:a$4="clearSelection",selectOnFocus:y=e$2.selectionBehavior==="replace",disallowTypeAhead:ie=false,shouldUseVirtualFocus:g,allowsTabNavigation:V=false,scrollRef:f$1=l,linkBehavior:v="action",UNSTABLE_focusOnEntry:H}=u,{direction:C}=b(),Z=o(),d$1=(n,o,m)=>{if(o!=null){if(e$2.isLink(o)&&v==="selection"&&y&&!Y(n)){flushSync(()=>{e$2.setFocusedKey(o,m);});let p=le(l,o),E=e$2.getItemProps(o);if(p){Z.open(p,n,E.href,E.routerOptions);return}return false}if(e$2.setFocusedKey(o,m),e$2.isLink(o)&&v==="override")return false;if(n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y&&!Y(n)){e$2.replaceSelection(o);return}}return false},_=n=>{if(r.getKeyBelow){let o=e$2.focusedKey!=null?r.getKeyBelow?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},F=n=>{if(r.getKeyAbove){let o=e$2.focusedKey!=null?r.getKeyAbove?.(e$2.focusedKey):r.getLastKey?.();if(o==null&&T&&(o=r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o);return}}return false},W=n=>{if(r.getFirstKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getFirstKey(e$2.focusedKey,i$2(n));if(e$2.setFocusedKey(o),o!=null){if(i$2(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},A=n=>{if(r.getKeyLeftOf){let o=e$2.focusedKey!=null?r.getKeyLeftOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getFirstKey?.(e$2.focusedKey):r.getLastKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"first":"last");return}}return false},I=n=>{if(r.getKeyRightOf){let o=e$2.focusedKey!=null?r.getKeyRightOf?.(e$2.focusedKey):r.getFirstKey?.();if(o==null&&T&&(o=C==="rtl"?r.getLastKey?.(e$2.focusedKey):r.getFirstKey?.(e$2.focusedKey)),o!=null){d$1(n,o,C==="rtl"?"last":"first");return}}return false},k=n=>{if(r.getLastKey){if(e$2.focusedKey===null&&n.shiftKey)return false;let o=r.getLastKey(e$2.focusedKey,i$2(n));if(e$2.setFocusedKey(o),o!=null){if(i$2(n)&&n.shiftKey&&e$2.selectionMode==="multiple"){e$2.extendSelection(o);return}else if(y){e$2.replaceSelection(o);return}}}return false},z=n=>{if(r.getKeyPageBelow&&e$2.focusedKey!=null){let o=r.getKeyPageBelow(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},J=n=>{if(r.getKeyPageAbove&&e$2.focusedKey!=null){let o=r.getKeyPageAbove(e$2.focusedKey);if(o!=null)return d$1(n,o)}return false},w=()=>{if(e$2.selectionMode==="multiple"&&c$3!==true){e$2.selectAll();return}return false},x=()=>{if(a$4==="clearSelection"&&!b$3&&e$2.selectedKeys.size!==0){e$2.clearSelection();return}return false},K=()=>{if(!V&&l.current){let n=d$2(l.current,{tabbable:true}),o,m;do m=n.lastChild(),m&&(o=m);while(m);let p=a$3(l.current),E=i(p);o&&(!h(o,E)||E&&!d$3(E))&&a$6(o);}return {shouldContinuePropagation:true,shouldPreventDefault:false}},Q=()=>(!V&&l.current&&l.current.focus(),{shouldContinuePropagation:true,shouldPreventDefault:false}),P=(n,o)=>({[e$1()?n+"+Shift+Alt":n+"+Shift+Control"]:o,[n+"+Shift"]:o,[e$1()?n+"+Alt":n+"+Control"]:o,[n]:o}),{keyboardProps:se}=j({shortcuts:{...P("ArrowDown",_),...P("ArrowUp",F),...P("ArrowLeft",A),...P("ArrowRight",I),...P("PageDown",z),...P("PageUp",J)},allowRepeats:true}),{keyboardProps:ue}=j({shortcuts:{...P("Home",W),...P("End",k),"Mod+A":w,Escape:x,Tab:K,"Tab+Shift":Q}}),j$2=useRef({top:0,left:0});a(f$1,"scroll",()=>{j$2.current={top:f$1.current?.scrollTop??0,left:f$1.current?.scrollLeft??0};});let ce=n=>{if(e$2.isFocused){h(n.currentTarget,j$1(n))||e$2.setFocused(false);return}if(!h(n.currentTarget,j$1(n)))return;let o=c$1();e$2.setFocused(true);let m=p=>{p!=null&&(e$2.setFocusedKey(p),y&&!e$2.isSelected(p)&&e$2.replaceSelection(p));};if(H&&(o==="keyboard"||o==="virtual"))m(H==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e$2.focusedKey==null){let p=n.relatedTarget;p&&n.currentTarget.compareDocumentPosition(p)&Node.DOCUMENT_POSITION_FOLLOWING?m(e$2.lastSelectedKey??r.getLastKey?.()):m(e$2.firstSelectedKey??r.getFirstKey?.());}else f$1.current&&(f$1.current.scrollTop=j$2.current.top,f$1.current.scrollLeft=j$2.current.left);if(e$2.focusedKey!=null&&f$1.current){let p=le(l,e$2.focusedKey),E=b$2(p);p instanceof E.HTMLElement&&(!h(p,i(E.document))&&!g&&a$6(p),(o==="keyboard"||H&&o==="virtual")&&f(p,{containingElement:l.current}));}},ae=n=>{h(n.currentTarget,n.relatedTarget)||e$2.setFocused(false);},S=useRef(false);a(l,b$1,g?n=>{let{detail:o}=n;n.stopPropagation(),e$2.setFocused(true),o?.focusStrategy==="first"&&(S.current=true);}:void 0);let R=r.getFirstKey?.()??null;d(()=>{if(S.current)if(R==null){let n=i();a$1(l.current),c(n,null),e$2.collection.size>0&&(S.current=false);}else e$2.setFocusedKey(R),S.current=false;},[R,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(S.current=false);},[e$2.focusedKey]),a(l,a$2,g?n=>{n.stopPropagation(),e$2.setFocused(false),n.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let X=useRef(i$3),B=useRef(false);useEffect(()=>{if(X.current){let n=null;i$3==="first"&&(n=r.getFirstKey?.()??null),i$3==="last"&&(n=r.getLastKey?.()??null);let o=e$2.selectedKeys;if(o.size){for(let m of o)if(e$2.canSelectItem(m)){n=m;break}}e$2.setFocused(true),e$2.setFocusedKey(n),n!=null&&y&&!o.size&&e$2.canSelectItem(n)&&e$2.replaceSelection(n),n==null&&!g&&l.current&&i$1(l.current),e$2.collection.size>0&&(X.current=false,B.current=true);}});let t=useRef(e$2.focusedKey),s=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==t.current||B.current)&&f$1.current&&l.current){let n=c$1(),o=le(l,e$2.focusedKey),m=b$2(o);if(!(o instanceof m.HTMLElement))return;(n==="keyboard"||B.current)&&(s.current&&cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{f$1.current&&(e(f$1.current,o),n!=="virtual"&&f(o,{containingElement:l.current}));}));}!g&&e$2.isFocused&&e$2.focusedKey==null&&t.current!=null&&l.current&&i$1(l.current),t.current=e$2.focusedKey,B.current=false;}),useEffect(()=>()=>{s.current&&cancelAnimationFrame(s.current);},[]),a(l,"react-aria-focus-scope-restore",n=>{n.preventDefault(),e$2.setFocused(true);});let M={...c$2(ue,se),onFocus:ce,onBlur:ae,onMouseDown(n){f$1.current===j$1(n)&&n.preventDefault();}},{typeSelectProps:$}=Re({keyboardDelegate:r,selectionManager:e$2});ie||(M=c$2($,M));let he;g||(he=e$2.focusedKey==null?0:-1);let Ve=Ie(e$2.collection);return {collectionProps:c$2(M,{tabIndex:he,"data-collection":Ve})}}function Ut(u){let{id:e,selectionManager:r,key:l,ref:i$3,shouldSelectOnPressUp:T,shouldUseVirtualFocus:b,focus:c,isDisabled:a,onAction:y,allowsDifferentPressOrigin:ie,linkBehavior:g="action"}=u,V=o();e=c$3(e);let f=t=>{if(t.pointerType==="keyboard"&&Y(t))r.toggleSelection(l);else {if(r.selectionMode==="none")return;if(r.isLink(l)){if(g==="selection"&&i$3.current){let s=r.getItemProps(l);V.open(i$3.current,t,s.href,s.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(g==="override"||g==="none")return}r.selectionMode==="single"?r.isSelected(l)&&!r.disallowEmptySelection?r.toggleSelection(l):r.replaceSelection(l):t&&t.shiftKey?r.extendSelection(l):r.selectionBehavior==="toggle"||t&&(i$2(t)||t.pointerType==="touch"||t.pointerType==="virtual")?r.toggleSelection(l):r.replaceSelection(l);}};useEffect(()=>{l===r.focusedKey&&r.isFocused&&(b?a$1(i$3.current):c?c():i(a$3(i$3.current))!==i$3.current&&i$3.current&&i$1(i$3.current));},[i$3,l,r.focusedKey,r.childFocusStrategy,r.isFocused,b]),a=a||r.isDisabled(l);let v={};!b&&!a?v={tabIndex:l===r.focusedKey?0:-1,onFocus(t){j$1(t)===i$3.current&&r.setFocusedKey(l);}}:a&&(v.onMouseDown=t=>{t.preventDefault();}),useEffect(()=>{a&&r.focusedKey===l&&r.setFocusedKey(null);},[r,a,l]);let H=r.isLink(l)&&g==="override",C=y&&u.UNSTABLE_itemBehavior==="action",Z=r.isLink(l)&&g!=="selection"&&g!=="none",d=!a&&r.canSelectItem(l)&&!H&&!C,_=(y||Z)&&!a,F=_&&(r.selectionBehavior==="replace"?!d:!d||r.isEmpty),W=_&&d&&r.selectionBehavior==="replace",A=F||W,I=useRef(null),k=A&&d,z=useRef(false),J=useRef(false),w=r.getItemProps(l),x=t=>{y&&(y(),i$3.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),Z&&i$3.current&&V.open(i$3.current,t,w.href,w.routerOptions);},K={ref:i$3};T?(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,t.pointerType==="keyboard"&&(!A||Ne(t.key))&&f(t);},ie?(K.onPressUp=F?void 0:t=>{t.pointerType==="mouse"&&d&&f(t);},K.onPress=F?x:t=>{t.pointerType!=="keyboard"&&t.pointerType!=="mouse"&&d&&f(t);}):K.onPress=t=>{if(F||W&&t.pointerType!=="mouse"){if(t.pointerType==="keyboard"&&!Ue(t.key))return;x(t);}else t.pointerType!=="keyboard"&&d&&f(t);}):(K.onPressStart=t=>{I.current=t.pointerType,z.current=k,J.current=F,d&&(t.pointerType==="mouse"&&!F||t.pointerType==="keyboard"&&(!_||Ne(t.key)))&&f(t);},K.onPress=t=>{(t.pointerType==="touch"||t.pointerType==="pen"||t.pointerType==="virtual"||t.pointerType==="keyboard"&&A&&Ue(t.key)||t.pointerType==="mouse"&&J.current)&&(A?x(t):d&&f(t));});let Q=ke(r.collection);if(v["data-collection"]=Q,v["data-key"]=l,K.preventFocusOnPress=b,b&&(K=c$2(K,{onPressStart(t){t.pointerType!=="touch"&&(r.setFocused(true),r.setFocusedKey(l));},onPress(t){t.pointerType==="touch"&&(r.setFocused(true),r.setFocusedKey(l));}})),w)for(let t of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])w[t]&&(K[t]=a$4(K[t],w[t]));let{pressProps:P,isPressed:se}=d$1(K),ue=W?t=>{I.current==="mouse"&&(t.stopPropagation(),t.preventDefault(),x(t));}:void 0,{longPressProps:j}=a$5({isDisabled:!k,onLongPress(t){t.pointerType==="touch"&&(f(t),r.setSelectionBehavior("toggle"));}}),ce=t=>{if(I.current!=="touch"||!z.current)return;let s=j$1(t),$=(s.nodeType===Node.ELEMENT_NODE?s:s.parentElement)?.closest('[draggable="true"]');($==null||$===t.currentTarget||!t.currentTarget.contains($))&&t.preventDefault();},ae=g!=="none"&&r.isLink(l)?t=>{p.isOpening||t.preventDefault();}:void 0,S=c$2(v,d||F||b&&!a?P:{},k?j:{},{onDoubleClick:ue,onDragStartCapture:ce,onClick:ae,id:e},b?{onMouseDown:t=>t.preventDefault()}:void 0),R=t=>{let s=t;for(;s&&s!==i$3.current;){let M=s.getAttribute("data-collection");if(M!=null)return M!==Q;s=s.parentElement;}return d$3(t)},X=S.onPointerDown;S.onPointerDown=t=>{let s=j$1(t);if(s&&s!==i$3.current&&R(s)){t.stopPropagation();return}X?.(t);};let B=S.onMouseDown;return S.onMouseDown=t=>{let s=j$1(t);if(s&&s!==i$3.current&&R(s)){t.stopPropagation();return}B?.(t);},{itemProps:S,isPressed:se,isSelected:r.isSelected(l),isFocused:r.isFocused&&r.focusedKey===l,isDisabled:a,allowsSelection:d,hasAction:A}}function Ue(u){return u==="Enter"}function Ne(u){return u===" "}export{le as a,Re as b,Pt as c,Ut as d};
|
package/dist/chunk-VQHI3ZCW.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-HNKEI45D.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-MPJXTZ6L.mjs';import {a as a$2}from'./chunk-54MWEZUP.mjs';import {f}from'./chunk-CFDIUF4H.mjs';import {a as a$8}from'./chunk-KFJE5ZBK.mjs';import {a as a$6}from'./chunk-5LGYS5CZ.mjs';import {b}from'./chunk-A455VRNY.mjs';import {a as a$7}from'./chunk-5IC46G5J.mjs';import {a as a$b}from'./chunk-22VRCVTH.mjs';import {b as b$3,c as c$2}from'./chunk-QVFGEXDU.mjs';import {a as a$a}from'./chunk-LRFFL765.mjs';import {b as b$2,c as c$3}from'./chunk-NQVTVL24.mjs';import {c,b as b$1}from'./chunk-PJINRIA6.mjs';import {a as a$9}from'./chunk-SVIYLH7R.mjs';import {a as a$1,c as c$1}from'./chunk-35AM4QEA.mjs';import {a as a$c}from'./chunk-TYOEGCPS.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import F,{useRef,useEffect,useState,useMemo}from'react';import {motion}from'motion/react';import {jsxs,jsx,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function k(t,a,o){let c$1=a$9(t,{labelable:true}),{hoverProps:f}=a$a({onHoverStart:()=>a?.open(true),onHoverEnd:()=>a?.close()},o);return {tooltipProps:c(c$1,f,{role:"tooltip"})}}function V(t,a,o){let{isDisabled:c$4,trigger:f,shouldCloseOnPress:b=true}=t,g=c$1(),p=useRef(false),i=useRef(false),r=()=>{(p.current||i.current)&&a.open(i.current);},n=y=>{!p.current&&!i.current&&a.close(y);};useEffect(()=>{let y=x=>{o&&o.current&&x.key==="Escape"&&(x.stopPropagation(),a.close(true));},v=a$c(o?.current);if(a.isOpen)return v.addEventListener("keydown",y,true),()=>{v.removeEventListener("keydown",y,true);}},[o,a]);let P=()=>{f!=="focus"&&(c$3()==="pointer"?p.current=true:p.current=false,r());},l=()=>{f!=="focus"&&(i.current=false,p.current=false,n());},T=()=>{b&&(i.current=false,p.current=false,n(true));},u=()=>{b$2()&&(i.current=true,r());},m=()=>{i.current=false,p.current=false,n(true);},{hoverProps:e}=a$a({isDisabled:c$4,onHoverStart:P,onHoverEnd:l}),{focusableProps:s}=c$2({isDisabled:c$4,onFocus:u,onBlur:m},o);return {triggerProps:{"aria-describedby":a.isOpen?g:void 0,...c(s,e,{onPointerDown:T,onKeyDown:T}),tabIndex:void 0},tooltipProps:{id:g}}}var be=1500,se=500,O={},ge=0,E=false,d=null,z=null;function j(t={}){let{delay:a=be,closeDelay:o=se}=t,{isOpen:c,open:f,close:b}=a$b(t),[g,p]=useState(false),i=useMemo(()=>`${++ge}`,[]),r=useRef(null),n=useRef(b),P=()=>{O[i]=u;},l=()=>{for(let e in O)e!==i&&(O[e](true,true),delete O[e]);},T=e=>{r.current&&clearTimeout(r.current),r.current=null,l(),P(),p(!!e),E=true,f(),d&&(clearTimeout(d),d=null),z&&(clearTimeout(z),z=null);},u=(e,s)=>{p(!!s),e||o<=0?(r.current&&clearTimeout(r.current),r.current=null,n.current()):r.current||(r.current=setTimeout(()=>{r.current=null,n.current();},o)),d&&(clearTimeout(d),d=null),E&&(z&&clearTimeout(z),z=setTimeout(()=>{delete O[i],z=null,E=false;},Math.max(se,o)));},m=()=>{l(),P(),!c&&!E?(d&&clearTimeout(d),d=setTimeout(()=>{d=null,E=true,T(false);},a)):c||T(true);};return useEffect(()=>{n.current=b;},[b]),useEffect(()=>()=>{r.current&&clearTimeout(r.current),O[i]&&delete O[i];},[i]),{isOpen:c,shouldSkipAnimation:g,open:e=>{!e&&a>0&&!r.current?m():T(E);},close:u}}var pe=a({defaultClassName:"_1jwycy80",variantClassNames:{placement:{bottom:"_1jwycy81",left:"_1jwycy82",right:"_1jwycy83",top:"_1jwycy84"},variant:{default:"_1jwycy85",inverse:"_1jwycy86"}},defaultVariants:{},compoundVariants:[]}),ne=a({defaultClassName:"_1jwycy87 _1yep5z6al _1yep5z6am _1yep5z6an _1yep5z6b9 _1yep5z6ba _1yep5z6bb _1yep5z6bx _1yep5z6by _1yep5z6bz _1yep5z6cl _1yep5z6cm _1yep5z6cn",variantClassNames:{size:{md:"_1yep5z63u _1yep5z63v _1yep5z63w _1yep5z61i _1yep5z61j _1yep5z61k _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6e7",sm:"_1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dv"},variant:{default:"_1yep5z6gh _1yep5z6f3",inverse:"_1yep5z6d7 _1yep5z6g9 _1yep5z6ey"}},defaultVariants:{},compoundVariants:[]});var I=F.forwardRef(({children:t,state:a,triggerRef:o,positionProps:c$1,placement:f,lastPlacement:b$2,onPlacementChange:g,variant:p,size:i,tooltipProps:r,includeArrow:n,id:P,"aria-label":l,"aria-labelledby":T,"aria-describedby":u,"aria-details":m},e)=>{let s=useRef(null),{tooltipProps:y}=k({isOpen:a.isOpen,id:P,"aria-label":l,"aria-labelledby":T,"aria-describedby":u,"aria-details":m},a,s),v=useRef(null);a$1(()=>{if(s.current&&!o.current?.closest('[aria-hidden="true"], [inert]'))return b(s.current)},[o]);let{overlayProps:x,arrowProps:M,placement:R,updatePosition:h}=a$2({arrowSize:n?13:0,targetRef:o,arrowBoundaryOffset:n?8:0,offset:n?12:2,overlayRef:v,placement:f,...c$1,isOpen:true});a$3({ref:v,threshold:1,onIntersect:h}),a$4({ref:o,onResize:h}),useEffect(()=>{R&&g(R);},[R,g]);let S=R??b$2,A=S==="center"?"bottom":S,{transitionProps:fe}=a$5({placement:S});return jsxs(motion.span,{...c(x,fe),ref:b$1(e,v,s),"data-placement":A,children:[n?jsx("div",{className:pe({placement:A,variant:p}),...M}):null,jsx("div",{...c(y,r),className:ne({variant:p,size:i}),children:t})]})});I.displayName="TooltipContent";var me=F.forwardRef(({children:t,placement:a="bottom",delay:o=1e3,closeDelay:c=500,variant:f$1="default",size:b="md",includeArrow:g=true,portalContainer:p,className:i,style:r,"data-block-id":n,"data-block-class":P,...l},T)=>{let u=F.useRef(null),m=!!l.text,e=!m||l.isDisabled,s=j({...l,delay:o,closeDelay:c,isDisabled:e}),{triggerProps:y,tooltipProps:v}=V({...l,isDisabled:e},s,u),x=F.useRef({isDisabled:e,hasText:m});F.useEffect(()=>{let A=x.current;s.isOpen&&(A.hasText&&!m?s.close(true):e&&!A.isDisabled?s.close():!e&&A.isDisabled&&b$2()&&u.current&&u.current===f(u.current)&&s.open(true)),x.current={isDisabled:e,hasText:m};},[e,m,s]);let M=a$6(p),[R,h]=F.useState("bottom"),S=F.isValidElement(t)?jsx(b$3,{...y,ref:u,children:t}):typeof t=="function"?t({triggerProps:y,triggerRef:u}):t;return !F.isValidElement(t)&&typeof t!="function"&&t!=null&&t!==""&&typeof t!="boolean"&&a$7("Tooltip:non-element-children","Tooltip: children must be a single element or a render function to trigger the tooltip. Other children render without a trigger, so the tooltip never opens."),jsxs(Fragment,{children:[S,s.isOpen&&m?jsx(a$8,{disableFocusManagement:true,portalContainer:M,className:i,style:r,"data-block-id":n,"data-block-class":P,children:jsx(I,{ref:T,state:s,triggerRef:u,positionProps:l,placement:a,lastPlacement:R,onPlacementChange:h,tooltipProps:v,variant:f$1,size:b,includeArrow:g,id:l.id,"aria-label":l["aria-label"],"aria-labelledby":l["aria-labelledby"],"aria-describedby":l["aria-describedby"],"aria-details":l["aria-details"],children:l.text})}):null]})});me.displayName="Tooltip";export{me as a};
|