@baseline-ui/core 3.8.0 → 3.9.1
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.css +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.css +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Breadcrumbs.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.css +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.css +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/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.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.css +1 -1
- package/dist/FileInput.mjs +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.css +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/Menu.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.css +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.css +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.mjs +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.css +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.css +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.css +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.css +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.css +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-64IFEFOT.mjs → chunk-26YOMQXV.mjs} +1 -1
- package/dist/chunk-2SKD7TKS.mjs +10 -0
- package/dist/{chunk-Z73YU5ZQ.mjs → chunk-2UDXAKWA.mjs} +1 -1
- package/dist/{chunk-ETM4MNG4.mjs → chunk-35AM4QEA.mjs} +1 -1
- package/dist/{chunk-XO7MAUFC.mjs → chunk-3COKCTB2.mjs} +2 -2
- package/dist/chunk-3JOOFCEF.mjs +10 -0
- package/dist/{chunk-4S4GGUSH.mjs → chunk-3PBFSDMT.mjs} +1 -1
- package/dist/{chunk-G5MSZV5O.mjs → chunk-3V4W6OGG.mjs} +1 -1
- package/dist/{chunk-CU6D2EA6.mjs → chunk-3ZX5CLZO.mjs} +1 -1
- package/dist/chunk-45EAFDOZ.mjs +10 -0
- package/dist/{chunk-IROFSPEN.mjs → chunk-4HOAPQDQ.mjs} +1 -1
- package/dist/{chunk-KHDWTXGG.mjs → chunk-4PZGQTXE.mjs} +1 -1
- package/dist/{chunk-655SS7D4.mjs → chunk-54MWEZUP.mjs} +1 -1
- package/dist/chunk-5GZAORDK.mjs +10 -0
- package/dist/{chunk-BA5OA5DY.mjs → chunk-5LGYS5CZ.mjs} +1 -1
- package/dist/chunk-5MR5L5JZ.mjs +10 -0
- package/dist/{chunk-XAM3AXXK.mjs → chunk-64ZD4EKW.mjs} +1 -1
- package/dist/{chunk-YS3Z53YT.mjs → chunk-67QIBKUN.mjs} +1 -1
- package/dist/{chunk-SOWGXN5P.mjs → chunk-6CSP66NI.mjs} +1 -1
- package/dist/{chunk-LSPDPDB6.mjs → chunk-6HTOSJOJ.mjs} +1 -1
- package/dist/{chunk-YNJD34U4.mjs → chunk-6NUHEJGL.mjs} +1 -1
- package/dist/{chunk-ZLDFLERD.mjs → chunk-6PBBHYCA.mjs} +1 -1
- package/dist/chunk-6RN7DKRF.mjs +10 -0
- package/dist/{chunk-LLSXABBJ.mjs → chunk-A2B2LTRA.mjs} +1 -1
- package/dist/{chunk-I7LPPUZS.mjs → chunk-A455VRNY.mjs} +1 -1
- package/dist/{chunk-GQIS4QBN.mjs → chunk-A63HMTSM.mjs} +1 -1
- package/dist/chunk-AALXW5AP.mjs +10 -0
- package/dist/{chunk-5GW36EQJ.mjs → chunk-AC44TKUI.mjs} +1 -1
- package/dist/{chunk-TCVES3WI.mjs → chunk-ADEALCJB.mjs} +1 -1
- package/dist/{chunk-SGZWUG3H.mjs → chunk-ALMW6S4I.mjs} +1 -1
- package/dist/{chunk-6DETJFO2.mjs → chunk-ARMWQYH2.mjs} +1 -1
- package/dist/chunk-B3W7VMJR.mjs +10 -0
- package/dist/{chunk-ZZ7YJ2FN.mjs → chunk-B5NICAFU.mjs} +1 -1
- package/dist/{chunk-Q6R75IOP.mjs → chunk-BFW26T6V.mjs} +1 -1
- package/dist/{chunk-EGLD5KVP.mjs → chunk-BK3RBPST.mjs} +1 -1
- package/dist/{chunk-CTTNZESA.mjs → chunk-BPLTQDXX.mjs} +1 -1
- package/dist/{chunk-4WVW4KEK.mjs → chunk-BSFG32AL.mjs} +1 -1
- package/dist/{chunk-HKVAL4BB.mjs → chunk-C4XJOYAW.mjs} +1 -1
- package/dist/{chunk-UZ672WDX.mjs → chunk-CFDIUF4H.mjs} +1 -1
- package/dist/{chunk-6CEV43ZA.mjs → chunk-CHBF3XQ6.mjs} +1 -1
- package/dist/chunk-CIOPWCOS.mjs +10 -0
- package/dist/{chunk-UI2VBG26.mjs → chunk-CKUHFL5G.mjs} +1 -1
- package/dist/chunk-CR66GYHT.mjs +10 -0
- package/dist/{chunk-GMALMQWI.mjs → chunk-D2NVLRIU.mjs} +1 -1
- package/dist/{chunk-JHA7DIPG.mjs → chunk-D6AOHRAV.mjs} +1 -1
- package/dist/chunk-DFMPVQM3.mjs +10 -0
- package/dist/{chunk-MHAPHPNN.mjs → chunk-DHZKZ3AV.mjs} +1 -1
- package/dist/{chunk-K5RYVERS.mjs → chunk-DLJHL4V7.mjs} +1 -1
- package/dist/{chunk-4Y4WKIL5.mjs → chunk-DOFT4BQH.mjs} +1 -1
- package/dist/{chunk-235S3EB7.mjs → chunk-DPFX25HC.mjs} +1 -1
- package/dist/{chunk-73UBSCJ2.mjs → chunk-DRQHSYY3.mjs} +1 -1
- package/dist/chunk-DZFNVFYT.mjs +10 -0
- package/dist/chunk-DZJTPX2G.mjs +10 -0
- package/dist/chunk-E2VXJPSE.mjs +10 -0
- package/dist/{chunk-54WJJ3EM.mjs → chunk-E3TD3EJQ.mjs} +1 -1
- package/dist/{chunk-EFFODO2N.mjs → chunk-E6DZSC2G.mjs} +1 -1
- package/dist/{chunk-I7SMG6PT.mjs → chunk-EISLHUT5.mjs} +1 -1
- package/dist/chunk-ENUU2IVX.mjs +10 -0
- package/dist/{chunk-OQPYPKZV.mjs → chunk-ES3IQZSH.mjs} +1 -1
- package/dist/{chunk-KVIV5RTE.mjs → chunk-F3EOLTFM.mjs} +1 -1
- package/dist/chunk-F4YBUGLD.mjs +10 -0
- package/dist/{chunk-STMDFIUL.mjs → chunk-FDDB7QNQ.mjs} +1 -1
- package/dist/{chunk-Z4QTH4TB.mjs → chunk-FTV6OWMI.mjs} +1 -1
- package/dist/chunk-G76NJ3IU.mjs +10 -0
- package/dist/{chunk-INFMXVHD.mjs → chunk-GIUNLLWW.mjs} +1 -1
- package/dist/{chunk-OHTPDCQA.mjs → chunk-GLIN7JAI.mjs} +1 -1
- package/dist/{chunk-S4HLMIFK.mjs → chunk-GOCBU65X.mjs} +1 -1
- package/dist/{chunk-D4NW56YQ.mjs → chunk-GPT4DR4P.mjs} +1 -1
- package/dist/{chunk-PMMLDGSP.mjs → chunk-H2SJLW7T.mjs} +1 -1
- package/dist/{chunk-GCBMNOA6.mjs → chunk-HNKEI45D.mjs} +1 -1
- package/dist/chunk-IBBDZQPO.mjs +10 -0
- package/dist/{chunk-F7WPMQ3P.mjs → chunk-IIBBR266.mjs} +1 -1
- package/dist/{chunk-PSAOTHYG.mjs → chunk-INHZHYOF.mjs} +1 -1
- package/dist/{chunk-BGRGRUG4.mjs → chunk-IOHULFEP.mjs} +1 -1
- package/dist/{chunk-TUY23KMK.mjs → chunk-IVM5IBQS.mjs} +1 -1
- package/dist/{chunk-FX3THTOK.mjs → chunk-J7BCMF23.mjs} +1 -1
- package/dist/chunk-JB3UIJ3I.mjs +10 -0
- package/dist/{chunk-UFN2OAM2.mjs → chunk-JC22ELJM.mjs} +1 -1
- package/dist/chunk-JDDA4R2D.mjs +10 -0
- package/dist/{chunk-RRYP54UI.mjs → chunk-JIGOXUY4.mjs} +1 -1
- package/dist/{chunk-KX7WG3L4.mjs → chunk-JOK6I52O.mjs} +1 -1
- package/dist/{chunk-6GV3YWV7.mjs → chunk-JTGVIAOK.mjs} +1 -1
- package/dist/{chunk-RIVN2JT3.mjs → chunk-JXJZIKEY.mjs} +1 -1
- package/dist/chunk-K276BGP2.mjs +10 -0
- package/dist/{chunk-TIGGKOJQ.mjs → chunk-KADD66HZ.mjs} +1 -1
- package/dist/{chunk-QAAOC64D.mjs → chunk-KBLJ34QI.mjs} +1 -1
- package/dist/{chunk-X3ACY7IY.mjs → chunk-KFJE5ZBK.mjs} +1 -1
- package/dist/{chunk-23WMOYTQ.mjs → chunk-KMSNBINF.mjs} +1 -1
- package/dist/{chunk-SZCVQU55.mjs → chunk-KMZ3YVPE.mjs} +1 -1
- package/dist/{chunk-C4WHTPLY.mjs → chunk-KRVEGSVY.mjs} +1 -1
- package/dist/chunk-KSWXLIZH.mjs +10 -0
- package/dist/{chunk-VPVF5N62.mjs → chunk-L5H5GE3H.mjs} +1 -1
- package/dist/{chunk-6TRBOQVN.mjs → chunk-L6ISOTLH.mjs} +1 -1
- package/dist/chunk-LHLY432N.mjs +10 -0
- package/dist/{chunk-2JGVUCP5.mjs → chunk-LN2NT32E.mjs} +1 -1
- package/dist/{chunk-B3EZOXNU.mjs → chunk-LRFFL765.mjs} +1 -1
- package/dist/{chunk-PCR5FD43.mjs → chunk-LXZOYBTL.mjs} +1 -1
- package/dist/{chunk-3WX5PZ6X.mjs → chunk-LZEZW5RE.mjs} +1 -1
- package/dist/{chunk-GYIIVZDE.mjs → chunk-M7BCIQ2J.mjs} +1 -1
- package/dist/{chunk-2VOWBYNS.mjs → chunk-MPJXTZ6L.mjs} +1 -1
- package/dist/{chunk-SAATXQOW.mjs → chunk-MUQR2YER.mjs} +1 -1
- package/dist/{chunk-NUCSMH4S.mjs → chunk-N4NDPTX6.mjs} +1 -1
- package/dist/{chunk-65PMDBYL.mjs → chunk-NN6HKMC4.mjs} +1 -1
- package/dist/{chunk-KUDCYGII.mjs → chunk-NQVTVL24.mjs} +1 -1
- package/dist/{chunk-6Z3GYFG5.mjs → chunk-NWYRVUTX.mjs} +1 -1
- package/dist/{chunk-RINS2TBF.mjs → chunk-NYNS3UDR.mjs} +1 -1
- package/dist/{chunk-UCIAWI4E.mjs → chunk-OAOIUNNG.mjs} +1 -1
- package/dist/chunk-OGIKNHLU.mjs +10 -0
- package/dist/{chunk-5USQ6HBY.mjs → chunk-OKEXEU3C.mjs} +1 -1
- package/dist/{chunk-6MUTSHZO.mjs → chunk-OMCGORTH.mjs} +1 -1
- package/dist/{chunk-3IPRT57V.mjs → chunk-OO3ZVB2T.mjs} +2 -2
- package/dist/{chunk-TZGK36KC.mjs → chunk-OS6PVCFX.mjs} +1 -1
- package/dist/{chunk-3WKDIXCM.mjs → chunk-PJINRIA6.mjs} +1 -1
- package/dist/{chunk-6DYTFYPO.mjs → chunk-PLRUMLNB.mjs} +1 -1
- package/dist/{chunk-YF63IQQR.mjs → chunk-PQIDCA7P.mjs} +1 -1
- package/dist/{chunk-6Q5PNIYZ.mjs → chunk-PSUZMSD3.mjs} +1 -1
- package/dist/{chunk-VFO35ZLL.mjs → chunk-Q3FYMLAA.mjs} +1 -1
- package/dist/chunk-QKNNMY2Q.mjs +10 -0
- package/dist/{chunk-Y2MIU76N.mjs → chunk-QSFRMY47.mjs} +1 -1
- package/dist/{chunk-HH4VLTF3.mjs → chunk-QVFGEXDU.mjs} +1 -1
- package/dist/{chunk-MBRNO6IW.mjs → chunk-R5JHN4X6.mjs} +1 -1
- package/dist/{chunk-NLVJYKSA.mjs → chunk-R7Y36JCO.mjs} +1 -1
- package/dist/chunk-RFCTQQMD.mjs +10 -0
- package/dist/{chunk-5ZC64ZG7.mjs → chunk-RXADOJLS.mjs} +1 -1
- package/dist/{chunk-PPHSLODC.mjs → chunk-SCJ3RG7B.mjs} +1 -1
- package/dist/{chunk-PMDRFB75.mjs → chunk-SI7LO2L4.mjs} +1 -1
- package/dist/chunk-SJRYJGTL.mjs +10 -0
- package/dist/{chunk-ZC5WXVNV.mjs → chunk-SY24O432.mjs} +1 -1
- package/dist/{chunk-KQOXSF4J.mjs → chunk-SYA6LAFU.mjs} +1 -1
- package/dist/{chunk-IIURKT24.mjs → chunk-SZNDCHMJ.mjs} +1 -1
- package/dist/{chunk-QUWRO3HT.mjs → chunk-TEQHGF4G.mjs} +1 -1
- package/dist/{chunk-TYKMNZJ4.mjs → chunk-TGLVJRZE.mjs} +1 -1
- package/dist/{chunk-GFBRKKX4.mjs → chunk-TN7FPPGM.mjs} +1 -1
- package/dist/chunk-TYOEGCPS.mjs +10 -0
- package/dist/{chunk-R6TFTLMV.mjs → chunk-U6M2GCPD.mjs} +1 -1
- package/dist/{chunk-6QQEK5I6.mjs → chunk-UBC32WQB.mjs} +1 -1
- package/dist/{chunk-TU7JTGGE.mjs → chunk-UCRJ3AR5.mjs} +1 -1
- package/dist/{chunk-BTPAZDGG.mjs → chunk-UI4SJCQU.mjs} +1 -1
- package/dist/{chunk-7SQRBY7N.mjs → chunk-UKBBSYRC.mjs} +1 -1
- package/dist/{chunk-IM3E5JL4.mjs → chunk-UPOQXYUI.mjs} +1 -1
- package/dist/{chunk-22MA6EYO.mjs → chunk-UQJB6AGO.mjs} +1 -1
- package/dist/{chunk-AI6WQPRX.mjs → chunk-UR42GQO4.mjs} +1 -1
- package/dist/{chunk-OTDBW5FO.mjs → chunk-V6DZG4PM.mjs} +1 -1
- package/dist/{chunk-S2XIFW52.mjs → chunk-VEIBPZDL.mjs} +1 -1
- package/dist/{chunk-3TLWTZRL.mjs → chunk-VKWXATZ3.mjs} +1 -1
- package/dist/{chunk-54ZKQAA3.mjs → chunk-VNJDCKLQ.mjs} +1 -1
- package/dist/{chunk-F3THHK5C.mjs → chunk-VPN55UVA.mjs} +1 -1
- package/dist/{chunk-QMV2O57M.mjs → chunk-VQ45RUYJ.mjs} +1 -1
- package/dist/chunk-VQHI3ZCW.mjs +10 -0
- package/dist/{chunk-BGQRLALS.mjs → chunk-VSGVHATE.mjs} +1 -1
- package/dist/{chunk-MHO7BDER.mjs → chunk-VWSTMBQK.mjs} +1 -1
- package/dist/chunk-VYBJ36ZR.mjs +10 -0
- package/dist/{chunk-YDUKC7QS.mjs → chunk-W3YUV7IF.mjs} +1 -1
- package/dist/{chunk-4QBHQCCK.mjs → chunk-WAPBLICF.mjs} +1 -1
- package/dist/{chunk-CIPPPD6E.mjs → chunk-WD2TPSZV.mjs} +1 -1
- package/dist/{chunk-ZE2B6BS7.mjs → chunk-WGZUNJGH.mjs} +1 -1
- package/dist/{chunk-TAT552A5.mjs → chunk-WID7IWNC.mjs} +1 -1
- package/dist/{chunk-HV7DKEN7.mjs → chunk-WSRXTVYB.mjs} +1 -1
- package/dist/{chunk-O7IU5NHN.mjs → chunk-WXILHRBE.mjs} +1 -1
- package/dist/{chunk-4I7K4CCG.mjs → chunk-X34RHNLT.mjs} +1 -1
- package/dist/{chunk-XOS3JIQX.mjs → chunk-X6K4M542.mjs} +1 -1
- package/dist/{chunk-57YWI7EG.mjs → chunk-XC5H4EVW.mjs} +1 -1
- package/dist/chunk-XF65LVBQ.mjs +10 -0
- package/dist/{chunk-EJYSTNXD.mjs → chunk-XKNL5LSL.mjs} +1 -1
- package/dist/{chunk-4P247R4V.mjs → chunk-Y6PZKRST.mjs} +1 -1
- package/dist/{chunk-GIT77HDD.mjs → chunk-YK3KAPIK.mjs} +1 -1
- package/dist/{chunk-OVJT5F2R.mjs → chunk-YQFS4UHL.mjs} +1 -1
- package/dist/{chunk-5YKRWGEJ.mjs → chunk-YSQ3YHJN.mjs} +2 -2
- package/dist/{chunk-PSUCNVCE.mjs → chunk-Z2PHVVX4.mjs} +2 -2
- package/dist/{chunk-VQ2K6Q3G.mjs → chunk-Z7JRM3NW.mjs} +2 -2
- package/dist/chunk-Z7UPVYL5.mjs +10 -0
- package/dist/hooks/useDevice.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/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/index.css +1 -1
- package/dist/index.d.ts +48 -34
- 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/package.json +5 -5
- package/sbom.json +13 -13
- package/dist/chunk-2BG2JLFC.mjs +0 -10
- package/dist/chunk-2JRDTJWJ.mjs +0 -10
- package/dist/chunk-2OXYNLVN.mjs +0 -10
- package/dist/chunk-2TXFCYPO.mjs +0 -10
- package/dist/chunk-464QF4AV.mjs +0 -10
- package/dist/chunk-46VEK5WC.mjs +0 -10
- package/dist/chunk-7DCQF3EP.mjs +0 -10
- package/dist/chunk-AGERZJ3X.mjs +0 -10
- package/dist/chunk-BROSGYL3.mjs +0 -10
- package/dist/chunk-BSSLS6MF.mjs +0 -10
- package/dist/chunk-CY6W27WG.mjs +0 -10
- package/dist/chunk-EXX7ZFGI.mjs +0 -10
- package/dist/chunk-FWPWBCOS.mjs +0 -10
- package/dist/chunk-GJ6ZPLFR.mjs +0 -10
- package/dist/chunk-HU75NQMI.mjs +0 -10
- package/dist/chunk-LDWNE2JT.mjs +0 -10
- package/dist/chunk-MN7USKSC.mjs +0 -10
- package/dist/chunk-N7MIERZH.mjs +0 -10
- package/dist/chunk-NKC4MIX3.mjs +0 -10
- package/dist/chunk-NWWH62TU.mjs +0 -10
- package/dist/chunk-PG3WDHSK.mjs +0 -10
- package/dist/chunk-PR3CD3UC.mjs +0 -10
- package/dist/chunk-SBR5UAUY.mjs +0 -10
- package/dist/chunk-SD43KVTU.mjs +0 -10
- package/dist/chunk-SND4G3LM.mjs +0 -10
- package/dist/chunk-SZTFMBPY.mjs +0 -10
- package/dist/chunk-UCDGZFQ7.mjs +0 -10
- package/dist/chunk-VQPEDDH6.mjs +0 -10
- package/dist/chunk-WQBA2P6W.mjs +0 -10
- package/dist/chunk-XC2S3RLC.mjs +0 -10
- package/dist/chunk-XWKTG7NR.mjs +0 -10
- package/dist/chunk-YLL2APKH.mjs +0 -10
package/dist/chunk-AGERZJ3X.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$k}from'./chunk-SBR5UAUY.mjs';import {a as a$m}from'./chunk-NLVJYKSA.mjs';import {c as c$2}from'./chunk-54ZKQAA3.mjs';import {c as c$4}from'./chunk-HU75NQMI.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-3TLWTZRL.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-WQBA2P6W.mjs';import {a as a$i}from'./chunk-SOWGXN5P.mjs';import {a as a$c}from'./chunk-Z73YU5ZQ.mjs';import {a as a$d}from'./chunk-RIVN2JT3.mjs';import {b as b$5,e as e$1}from'./chunk-VPVF5N62.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-INFMXVHD.mjs';import {a as a$h}from'./chunk-DIL5HL6K.mjs';import {a as a$l}from'./chunk-2OXYNLVN.mjs';import {a as a$g}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$o}from'./chunk-4EAXDHSV.mjs';import {a as a$j}from'./chunk-KX7WG3L4.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {b as b$6,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$9}from'./chunk-22MA6EYO.mjs';import {a as a$f}from'./chunk-VDUFLHKK.mjs';import {a as a$8}from'./chunk-22VRCVTH.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {a as a$b}from'./chunk-FPM5UJRF.mjs';import {a as a$5}from'./chunk-HPUUQKKH.mjs';import {a as a$1}from'./chunk-SGZWUG3H.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {b as b$1,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import 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),{isFocusVisible:f$1,focusProps:I$1}=a$2(),P=a$3({"data-block-id":a$5["data-block-id"],"data-focused":f$1,"data-focus-visible":f$1,"data-disabled":a$5.isDisabled,"data-hovered":m,"data-pressed":g}),B=c(),N=c(),y=!!e||typeof l=="string";return jsxs("button",{...c$1(d,c$2,I$1,P),style:a$5.style,className:a$4(f({isHovered:m,isFocusVisible:f$1||a$5.isOpen,isDisabled:a$5.isDisabled,labelPosition:a$5.labelPosition}),"BaselineUI-ColorInputButton",a$5.className),ref:b$1(n,i),id:B,"aria-labelledby":[a$5["aria-labelledby"]||B,y&&N].filter(Boolean).join(" "),children:[jsx(I,{color:o?.toString("hexa"),isIndeterminate:r,indeterminateIcon:t,noneLabel:s}),e?jsx("div",{className:j,id:N,"aria-hidden":"true",children:l}):y&&jsx(b,{id:N,"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(I=>I.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:I}=b$3(),{formatMessage:P}=b$2(),B$1=io.useRef(null),N=a$j(B$1.current),[y,M]=a$k(l$1,[]),h=io.useMemo(()=>Array.isArray(y)?y.filter(p=>Ft(p)):[],[y]),O=io.useRef(null),[K,Mo]=io.useState(o),uo=io.useMemo(()=>h.map(p=>({id:p,label:a$7(p).getColorName(I),description:p})),[h,I]),W=useCallback(()=>{let p=m$1==="active"?o:K;if(h.includes(p.toString(B))){O.current?.querySelector(`[data-key='${p.toString(B)}']`)?.classList.add(t);return}M([...h,p.toString(B)]);},[h,o,M,K,m$1]);useEffect(()=>{let p=O.current;function b(Q){Q.animationName===u&&j$2(Q)?.classList.remove(t);}return p?.addEventListener("animationend",b),()=>{p?.removeEventListener("animationend",b);}},[]);let w=c(),J=jsx(a$l,{ref:B$1,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??P(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??P(Jo.cancel),size:"sm",variant:"secondary",onPress:p}),jsx(b$4,{label:a??P(Jo.add),variant:"primary",onPress:()=>{W(),p();},size:"sm"})]})})]}),[K,W,P,d,i$1,c$1,n,a]),Oo=useCallback(p=>{a$6(p instanceof Set,"Key must be a set");let b=[...p][0];b&&(e(a$7(b).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:[!!h.length&&h.includes(o.toString(B))&&jsx(a$l,{variant:"secondary",size:"md",elementType:"div",icon:MinusIcon,"aria-label":t$1,onPress:()=>{M(h.filter(p=>p!==o.toString(B)));}}),m$1==="active"&&J,m$1==="lazy"&&(N==="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)})]}))]})]}),!!h.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:I,customColorsLabel:P,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,colorPresetsLabel:h$1,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:b,indeterminateIcon:Q,...L},lt)=>{let Z=io.useRef(null),at=io.useRef(null),X=a$8(L),{triggerProps:oe,overlayProps:st}=a$9({type:"listbox"},X,Z),nt=a$a(L.portalContainer),[Y,wo]=a$b(g$1===void 0?void 0:C(g$1),C(m$1),v=>i?.(v?.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:b,indeterminateLabel:K,transparentLabel:Mo}),it=a?ee:false,te=useMemo(()=>Do.filter(v=>l||v.id!==F),[Do,l]),mt=f||j(To.addColor),pt=I||j(To.removeColor),ut=P||j(To.customColors),re=jsx(Ze,{color:Y||z,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},storePickedColorKey:d,addColorButtonLabel:mt,removeColorButtonLabel:pt,customColorsLabel:ut,addLabel:B,cancelLabel:N,newColorLabel:y,colorFormatLabel:M,pickerMode:w,allowAlpha:r,isIndeterminate:!!b,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:[L.label?jsx("label",{id:fo,className:h({labelPosition:s}),children:L.label}):null,W?W({isOpen:X.isOpen,color:Y,ref:Z,colorName:it,triggerProps:c$1(oe,{onPress:uo}),labelId:fo,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O}):jsx(no,{...c$1(oe,{onPress:uo,...L.label?{"aria-labelledby":fo}:{"aria-label":L["aria-label"]}}),ref:Z,isOpen:X.isOpen,isDisabled:L.isDisabled,labelPosition:s,color:Y,colorLabel:a,colorName:ee,isIndeterminate:b,indeterminateIcon:Q,noneLabel:O})]}),jsx(a$c,{...L,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":L.label?fo:void 0,"aria-label":L["aria-label"],children:[n&&w==="active"?jsxs(Fragment,{children:[jsx(xo,{color:Y||z,setColor:wo,allowAlpha:r,colorFormatLabel:M,onChangeEnd:v=>{c$2?.(v?.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:h$1,color:Y,setColor:v=>{wo(v),c$2?.(v?.toFormat("rgba")||null);},isIndeterminate:!!b})]}),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:I,colorName:P,triggerProps:B,isIndeterminate:N,indeterminateIcon:y,noneLabel:M})=>jsx(a$g,{...m,children:r==="standard"?jsx(no,{...B,"aria-label":n["aria-label"],ref:I,isOpen:g,isDisabled:n.isDisabled,color:f,colorLabel:false,colorName:P,isIndeterminate:N,indeterminateIcon:y,noneLabel:M}):jsx(Fo,{...B,isOpen:g,icon:TextIcon,color:f?.toString("hexa"),ref:I,isDisabled:n.isDisabled,"aria-label":n["aria-label"],isIndeterminate:N,indeterminateIcon:y})}),[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-BROSGYL3.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-JQQGRJ5J.mjs';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var _=a({defaultClassName:"_16vugd0b _1yep5z6ez _1yep5z6dy",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),t=a({defaultClassName:"_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6it _1yep5z6iu _1yep5z6iv z9nup88",variantClassNames:{labelPosition:{end:"_1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z6w1 _1yep5z6w2 _1yep5z6w3",start:"_1yep5z6166 _1yep5z6167 _1yep5z6168 _1yep5z617i _1yep5z617j _1yep5z617k"}},defaultVariants:{},compoundVariants:[]}),i=a({defaultClassName:"_16vugd03 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6mh _1yep5z6mf _1yep5z6hi _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6fc _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m5 _1yep5z6lq _1yep5z6m0",variantClassNames:{isIndeterminate:{true:"_1yep5z618x _1yep5z6130"},isSelected:{true:"_16vugd05"},isFocusVisible:{true:"_16vugd06"},isHovered:{true:"_1yep5z6142"},isDisabled:{true:"_16vugd08 _1yep5z6146"},isReadOnly:{true:"_16vugd09 _1yep5z611s _1yep5z6190 _1yep5z618y _1yep5z6146"},hasError:{true:"_1yep5z613e _1yep5z6190 _1yep5z618y"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61pj"],[{isSelected:true,isDisabled:false,isReadOnly:false,hasError:false},"_1yep5z61vg"],[{isSelected:true,isDisabled:true},"_1yep5z61pt _1yep5z61of"],[{isSelected:true,isDisabled:true,hasError:false},"_1yep5z61vg"],[{isHovered:true,isSelected:true,isReadOnly:false},"_1yep5z61pp _1yep5z61of"],[{isHovered:true,isSelected:true,isReadOnly:false,hasError:false},"_1yep5z61vg"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false},"_1yep5z61pp _1yep5z61of"],[{isHovered:true,isSelected:false,isIndeterminate:true,isReadOnly:false,hasError:false},"_1yep5z61vg"]]});export{_ as a,t as b,i as c};
|
package/dist/chunk-BSSLS6MF.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-4QEH5CGK.mjs';import {createContext,forwardRef,useEffect,useImperativeHandle,useMemo,useContext}from'react';import {usePanelRef,Panel,useGroupRef,useDefaultLayout,Group,Separator}from'react-resizable-panels';import {jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var b=createContext({});function h(){return useContext(b)}function m(e){return typeof e=="number"?`${e}%`:e}var S=forwardRef(({className:e,isCollapsible:r=false,id:t,onResize:i,defaultSize:d,minSize:f,maxSize:p,collapsedSize:u,...P},o)=>{let a$1=usePanelRef(),g=c(),c$1=t??g,{autoSaveId:l}=h();return useEffect(()=>{l&&!t&&console.warn("Panel: A stable `id` prop is required for size persistence to work correctly when `autoSaveId` is set on the parent `PanelGroup`. Without it, panel sizes will not be saved or restored.");},[l,t]),useImperativeHandle(o,()=>({resize:n=>a$1.current?.resize(n)})),jsx(Panel,{className:a("BaselineUI-Panel",e),collapsible:r,panelRef:a$1,id:c$1,defaultSize:m(d),minSize:m(f),maxSize:m(p),collapsedSize:m(u),onResize:i?n=>{i(n.asPercentage);}:void 0,...P})});S.displayName="Panel";var U={getItem:()=>null,setItem:()=>{}},V={getItem:e=>{try{return localStorage.getItem(e)}catch{return null}},setItem:(e,r)=>{try{localStorage.setItem(e,r);}catch(t){if(t?.name!=="SecurityError")throw t}}},q=forwardRef(({className:e,autoSaveId:r,direction:t,onLayout:i,...d},f)=>{let p=useGroupRef();useImperativeHandle(f,()=>({setLayout:o=>{let a=p.current;if(!a)return;let g=a.getLayout(),c=Object.keys(g);if(c.length>0){let l={};for(let n of c)n in o&&(l[n]=o[n]);a.setLayout(l);}else a.setLayout(o);}}));let u=useDefaultLayout({id:r??"",storage:r?V:U}),P=useMemo(()=>({autoSaveId:r}),[r]);return jsx(b.Provider,{value:P,children:jsx(Group,{className:a("BaselineUI-PanelGroup",e),groupRef:p,orientation:t,defaultLayout:r?u.defaultLayout:void 0,onLayoutChanged:o=>{r&&u.onLayoutChanged(o),i&&i(o);},...d})})});q.displayName="PanelGroup";var z="_6abhjk0";var D=({className:e,isDisabled:r=false,...t})=>jsx(Separator,{disabled:r,className:a(z,"BaselineUI-PanelResizeHandle",e),...t});D.displayName="PanelResizeHandle";export{S as a,q as b,D as c};
|
package/dist/chunk-CY6W27WG.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-R6TFTLMV.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {e}from'./chunk-ETM4MNG4.mjs';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function M(e$1){let{description:o,errorMessage:t,isInvalid:a$1,validationState:s,ref:l}=e$1,{labelProps:f,fieldProps:r}=a(e$1),d=e([!!o,!!t,a$1,s],l),n=e([!!o,!!t,a$1,s],l);return r=c(r,{"aria-describedby":[d,n,e$1["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{labelProps:f,fieldProps:r,descriptionProps:{id:d},errorMessageProps:{id:n}}}export{M as a};
|
package/dist/chunk-EXX7ZFGI.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c,a as a$1,d,e}from'./chunk-57YWI7EG.mjs';import {a as a$7}from'./chunk-464QF4AV.mjs';import {a as a$3}from'./chunk-EFFODO2N.mjs';import {a as a$6}from'./chunk-Z73YU5ZQ.mjs';import {a,b as b$2}from'./chunk-SZTFMBPY.mjs';import {b as b$1,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$4}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2OXYNLVN.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,j}from'./chunk-MBRNO6IW.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$1}from'./chunk-ETM4MNG4.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import {CalendarIcon}from'@baseline-ui/icons/16';import {createCalendar,toCalendarDateTime,Time,toZoned}from'@internationalized/date';import n from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var N=n.forwardRef(({className:z,labelPosition:g,"data-block-id":E,"data-block-class":U,pickerType:s="none",openCalendarLabel:j$1,...e$1},W)=>{let{locale:G}=b(),{formatMessage:Y}=b$1(),l={...e$1,validationState:void 0,isInvalid:e$1.validationState==="error"||!!e$1.errorMessage||void 0},a$9=c({...l,locale:G,createCalendar:createCalendar}),r=e$1.value||e$1.defaultValue||e$1.placeholderValue,d$1=r&&"timeZone"in r?r.timeZone:void 0,[p,_]=n.useState(d$1);r&&d$1!==p&&_(d$1);let y=e$1.errorMessage||a$9.displayValidation.validationErrors.join(" "),D=c$1(),q=a({...e$1,errorMessage:y})==="warningMessage"?{...l,"aria-describedby":[e$1["aria-describedby"],D].filter(Boolean).join(" ")}:l,m=n.useRef(null),{labelProps:J,fieldProps:K,descriptionProps:Q,inputProps:X,errorMessageProps:$,isInvalid:ee}=a$1(q,a$9,m),ae=b$2({...e$1,errorMessage:y,descriptionProps:Q,errorMessageProps:$,warningMessageProps:{id:D},labelPosition:g}),{focusProps:oe,isFocused:te}=a$2({within:true}),ie=a$9.value,re=e$1.isDisabled||e$1.isReadOnly,[ne,se]=n.useState(false),le=e$1["aria-label"]??(typeof e$1.label=="string"?e$1.label:void 0),de=t=>{let i=a$9.value;if(i!=null&&"hour"in i)a$9.setValue(i.set({year:t.year,month:t.month,day:t.day}));else if(i==null&&(a$9.granularity==="hour"||a$9.granularity==="minute"||a$9.granularity==="second")){let c=e$1.placeholderValue,b=toCalendarDateTime(t,c&&"hour"in c?c:new Time);a$9.setValue(p?toZoned(b,p):b);}else a$9.setValue(t);};return jsxs(a$3,{className:a$8("BaselineUI-DateField",z),labelProps:J,fieldProps:K,ref:W,wrapperRef:m,wrapperClassName:d,labelPosition:g,message:ae,isFocused:te||ne,"data-block-id":E,"data-block-class":U,isInvalid:ee,...e$1,children:[jsx(b$3,{children:jsx("input",{...X})}),jsx(a$4,{display:"flex",flexDirection:"row",paddingRight:s==="none"?"md":void 0,style:{flex:1},...oe,children:a$9.segments.map((t,i)=>jsx(e,{segment:t,state:a$9},i))}),s==="presentation"?jsx(a$4,{color:"text.secondary",display:"flex",alignItems:"center",paddingRight:"md",children:jsx(CalendarIcon,{size:16})}):null,s==="calendar"?jsxs(b$4,{type:"dialog",onOpenChange:se,children:[jsx(j,{children:({triggerProps:t,triggerRef:i})=>jsx(a$5,{...t,ref:i,icon:CalendarIcon,variant:"primary",size:"sm",isDisabled:re,"aria-label":j$1??Y(fe.openCalendar)})}),jsx(a$6,{placement:"bottom end",offset:2,triggerRef:m,children:jsx(a$7,{value:ie,onChange:de,minValue:e$1.minValue,maxValue:e$1.maxValue,isDisabled:e$1.isDisabled,isReadOnly:e$1.isReadOnly,isDateUnavailable:e$1.isDateUnavailable,headerVariant:"selectMonthAndYear","aria-label":le})})]}):null]})});N.displayName="DateField";var fe=c$2({openCalendar:{defaultMessage:"Open calendar",id:"bui.dateField.openCalendar"}});export{N as a};
|
package/dist/chunk-FWPWBCOS.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b,a as a$5}from'./chunk-EJYSTNXD.mjs';import {a as a$1,f as f$1}from'./chunk-5GW36EQJ.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-3IPRT57V.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-Z73YU5ZQ.mjs';import {a as a$7,b as b$1}from'./chunk-SZTFMBPY.mjs';import {f}from'./chunk-UZ672WDX.mjs';import {a as a$c}from'./chunk-R6TFTLMV.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$e}from'./chunk-2BG2JLFC.mjs';import {a as a$4}from'./chunk-CIPPPD6E.mjs';import {a as a$i}from'./chunk-5IC46G5J.mjs';import {a as a$d}from'./chunk-VDUFLHKK.mjs';import {a as a$b}from'./chunk-RSKKEGJZ.mjs';import {a as a$9}from'./chunk-STMDFIUL.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j as j$1}from'./chunk-KUDCYGII.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {a as a$2}from'./chunk-RT4LMB6X.mjs';import {a as a$6,c as c$1,b as b$3}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {j,h}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$h}from'./chunk-4QEH5CGK.mjs';import x,{useMemo,useState,useRef,useEffect}from'react';import {useGranularEffect}from'granular-hooks';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var De=a({defaultClassName:"_18v88n10 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m3",variantClassNames:{labelPosition:{top:"_1yep5z6163 _1yep5z6164 _1yep5z6165",start:"_1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z617i _1yep5z617j _1yep5z617k _1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),ke=a({defaultClassName:"_18v88n1p _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ey _1yep5z6m3 _1yep5z6me _1yep5z6m6 _1yep5z6dy",variantClassNames:{isDisabled:{true:"_18v88n1q _1yep5z611l"},labelPosition:{top:"_18v88n1r",start:"_18v88n1s"}},defaultVariants:{},compoundVariants:[]}),Oe=a({defaultClassName:"_18v88n1t _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6m0",variantClassNames:{validationState:{valid:"_18v88n1u",error:"_1yep5z610x",warning:"_1yep5z6117"},isReadOnly:{true:"_1yep5z611s"}},defaultVariants:{},compoundVariants:[]}),Te=a({defaultClassName:"_18v88n1d _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{validationState:{valid:"_18v88n1e",error:"_1yep5z613e",warning:"_18v88n1g"},isHovered:{true:"_18v88n1h"},isFocused:{true:"_1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z6190 _1yep5z618y _1yep5z613w _1yep5z618r _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"_18v88n1j"},variant:{primary:"_18v88n1k",ghost:"_18v88n1l"},isReadOnly:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61vj _1yep5z61vh _1yep5z61qi"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_18v88n1n"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61qj"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61qj"],[{isReadOnly:true,variant:"primary",isFocused:false},"_18v88n1o"]]}),Fe=a({defaultClassName:"_18v88n13 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),He=a({defaultClassName:"_18v88n19 _1yep5z6jb _1yep5z6jc _1yep5z6jd",variantClassNames:{labelPosition:{top:"_1yep5z6tp _1yep5z6tq _1yep5z6tr",start:"_1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6163 _1yep5z6164 _1yep5z6165"},hasMessage:{true:"_18v88n1c"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61tv _1yep5z61tw _1yep5z61tx"]]}),Se="_18v88n1y",Ke=a({defaultClassName:"_18v88n15 _1yep5z699 _1yep5z69a _1yep5z69b _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isHovered:{true:"_1yep5z612v _1yep5z615b _1yep5z618p"},isOpen:{true:"_1yep5z615b _1yep5z618p"}},defaultVariants:{},compoundVariants:[]});function K(n,s,c,p){if(s!=="number"||n===void 0||n==="")return n;let u=Number.parseFloat(n);if(Number.isNaN(u))return n;let e=u;return c!==void 0&&(e=Math.max(e,c)),p!==void 0&&(e=Math.min(e,p)),e===u?n:String(e)}function Ue(n,s){return n.selectedKey==null||s!==n.selectedItem?.textValue}function We({allowsCustomValue:n,onValueChange:s,inputType:c,minValue:p,maxValue:u},e,g,_){let[j$2,d]=useState(null),a=useRef(false),C=useRef(null),P=!Ue(e,e.inputValue),w=(o,r)=>{C.current=r==null?null:{key:r,value:o},s?.({value:o,key:r});},I=o=>{!a.current||!Ue(e,o)||(w(o,null),a.current=false);};useEffect(()=>{if(!s)return;let o=g.current,r=y=>{d(j(y));};return o?.addEventListener("focusin",r),()=>{o?.removeEventListener("focusin",r);}},[s,g,e.selectedKey]),useGranularEffect(()=>{if(e.selectedKey==null||e.selectedItem==null){e.selectionManager.isEmpty&&(C.current=null);return}let o=e.selectedKey,r=e.selectedItem.textValue,y=C.current?.key!==o;!y&&(C.current?.value===r||a.current&&!P)||(w(r,o),y&&(a.current=false));},[e.selectedKey,e.selectedItem?.textValue,P],[s,e.selectedItem]);let D=()=>{j$2===_.current&&n&&a.current&&(a.current=false);};useEffect(()=>{if(!s)return;let o=_.current,r=()=>{a.current=true;};return o?.addEventListener("input",r),()=>{o?.removeEventListener("input",r);}},[_,s]);let{keyboardProps:k}=j$1({isDisabled:!s,onKeyDown:o=>{if(n&&o.key==="Enter"&&a.current){let r=K(_.current?.value,c,p,u);I(r??""),a.current=false;}else o.key==="Escape"&&(e.selectedKey!=null&&(a.current=false),e.close());o.continuePropagation();}});return {inputProps:k,commitCustomValue:I,disarmPendingEdit:D}}var Ge=x.forwardRef(({renderOption:n,optionStyle:s,optionClassName:c,...p},u)=>jsx(a$1,{items:p.items,listBoxProps:{renderOption:n,optionStyle:s,optionClassName:c},children:e=>jsx(Je,{...p,collection:e,ref:u})}));Ge.displayName="ComboBox";var Je=x.forwardRef(({className:n,style:s,inputStyle:c$2,inputClassName:p,"data-block-id":u,"data-block-class":e,label:g,items:_,isInvalid:j$2=false,labelPosition:d$1="top",validationState:a="valid",variant:C="primary",toggleLabel:P,showIcon:w=true,filter:I,filterItems:D,readOnly:k,minValue:o,maxValue:r,inputType:y="text",onInputSubmit:A,onValueChange:q$1,tooltip:Qe,collection:Xe,onTriggerPress:U,...t},Ye)=>{let O=a$2(Ye),{contains:Ze}=a$3({sensitivity:"base"}),f$2=t.isReadOnly??k,W=j$2||a==="error"||!!t.errorMessage,v=b({...t,isReadOnly:f$2,defaultFilter:D===false?void 0:I||Ze,defaultItems:_,collection:Xe,children:void 0,validationState:W?"invalid":"valid"}),G=x.useRef(null),z=x.useRef(null),J=x.useRef(null),T=x.useRef(null),Q=x.useRef(null),{inputProps:$e,commitCustomValue:et,disarmPendingEdit:tt}=We({onValueChange:q$1,allowsCustomValue:t.allowsCustomValue,inputType:y,minValue:o,maxValue:r},v,O,z),X=i=>{let m=K(i,y,o,r)??"";return m!==i&&!A&&!q$1&&a$i("bui.comboBox.clampNoCallback","ComboBox: minValue/maxValue clamped a value but no onInputSubmit or onValueChange callback is provided. The constraint cannot be enforced without a callback to notify the consumer."),A?.(m),m},Y=()=>{let i=z.current?.value??"";!t.allowsCustomValue||!i||et(X(i));};a$4({ref:z,onInteractOutside:i=>{let m=j(i);if(h(O.current,m)||h(T.current,m))return;let h$1=z.current;if(!h$1||f(h$1)!==h$1){tt();return}v.isOpen&&(Y(),v.close());}});let{buttonProps:L,inputProps:Z,listBoxProps:$,labelProps:ot,errorMessageProps:rt,descriptionProps:at,validationErrors:nt}=a$5({...t,onBlur:a$6(t.onBlur,Y),inputRef:z,defaultItems:_,buttonRef:G,listBoxRef:J,popoverRef:T,isReadOnly:f$2,validationState:W?"invalid":"valid"},v),F=t.errorMessage||nt.join(" "),ee=c(),st=a$7({...t,errorMessage:F})==="warningMessage",N=b$1({...t,errorMessage:F,descriptionProps:at,errorMessageProps:rt,warningMessageProps:{id:ee},labelPosition:d$1});F&&(a="error");let{hoverProps:it,isHovered:te}=a$8({isDisabled:t.isDisabled}),{isFocused:oe,focusProps:lt,isFocusVisible:re}=a$9(),ae=a$a({isReadOnly:f$2,validationState:a}),pt=a$b({"data-read-only":f$2,"data-disabled":t.isDisabled,"data-validation-state":a,"data-focused":oe,"data-focus-visible":re}),{labelProps:ut,fieldProps:dt}=a$c({label:g,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],"aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]}),{keyboardProps:mt}=j$1({onKeyDown:i=>{t.allowsCustomValue&&i.key==="Enter"&&X(z.current?.value??"");}}),{tooltipProps:ne}=a$d({tooltip:Qe,label:t["aria-label"]}),{pressProps:ct}=d({onPress:U}),se=P?.trim()||void 0,ie=i=>{let{triggerProps:m,triggerRef:h}=i??{};return jsxs("div",{className:a$h(De({labelPosition:d$1}),n,"BaselineUI-ComboBox"),"data-block-id":u,"data-block-class":e,style:s,ref:O,children:[g||d$1==="start"&&N?jsxs("div",{className:He({labelPosition:d$1,hasMessage:!!N}),children:[jsx("label",{...c$1(ot,ut),className:Fe({isDisabled:t.isDisabled}),children:g}),d$1==="start"&&N]}):null,jsxs("div",{...it,className:Te({validationState:a,isHovered:te,isFocused:oe,variant:C,isReadOnly:!!f$2,isDisabled:!!t.isDisabled}),ref:Q,children:[jsx("input",{...c$1(ct,m,Z,$e,lt,pt,dt,mt,y==="number"?{type:"number",min:o,max:r,onKeyDown:B=>{(B.key==="ArrowUp"||B.key==="ArrowDown")&&B.preventDefault();}}:null,{"aria-describedby":[m?.["aria-describedby"],Z["aria-describedby"],st?ee:void 0].filter(Boolean).join(" ")||void 0}),id:t.id,ref:b$3(h,z),className:a$h(ke({isDisabled:t.isDisabled,labelPosition:d$1}),"BaselineUI-ComboBox-Input",p),style:c$2}),ae&&w?jsx(ae,{className:Oe({validationState:a,isReadOnly:f$2}),size:16}):null,jsx(b$4,{...L,onPressStart:B=>{L.onPressStart?.(B),U?.(B);},ref:G,"data-testid":"combobox-toggle-button",variant:"popover",label:null,"aria-label":se??L["aria-label"],"aria-labelledby":se?void 0:L["aria-labelledby"],className:Ke({isFocusVisible:!t.isDisabled&&!f$2&&re,isHovered:!t.isDisabled&&!f$2&&te,isOpen:v.isOpen})})]}),d$1==="top"&&N]})};return jsxs(Fragment,{children:[ne?jsx(a$e,{...ne,children:ie}):ie(),jsx(a$f,{ref:T,triggerRef:Q,state:v,isNonModal:true,crossOffset:-2,className:"BaselineUI-ComboBox-Popover",children:jsx(b$2.Provider,{value:v,children:jsx(a$g.Provider,{value:useMemo(()=>({...$,ref:J}),[$]),children:jsx(q,{selectionMode:"single",className:a$h(f$1,Se,"BaselineUI-ComboBox-ListBox")})})})})]})});Je.displayName="ComboBoxInner";export{Ge as a};
|
package/dist/chunk-GJ6ZPLFR.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$b}from'./chunk-5USQ6HBY.mjs';import {c as c$4,a as a$c,b as b$5}from'./chunk-BROSGYL3.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,g}from'./chunk-PG3WDHSK.mjs';import {a as a$5}from'./chunk-CY6W27WG.mjs';import {a as a$a}from'./chunk-6QQEK5I6.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-4QBHQCCK.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {b as b$4,j as j$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Se,{useMemo,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var N=new WeakMap;function w(e,a,r){let{value:t,children:p,"aria-label":n,"aria-labelledby":u,onPressStart:s,onPressEnd:l,onPressChange:d,onPress:m,onPressUp:v,onClick:g}=e,o=e.isDisabled||a.isDisabled,V=p!=null,x=n!=null||u!=null;!V&&!x&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let R=a.selectedValue===t,G=M=>{M.stopPropagation(),a.setSelectedValue(t);},{pressProps:D,isPressed:_}=d$2({onPressStart:s,onPressEnd:l,onPressChange:d,onPress:m,onPressUp:v,onClick:g,isDisabled:o}),{pressProps:P,isPressed:f}=d$2({onPressStart:s,onPressEnd:l,onPressChange:d,onPressUp:v,onClick:g,isDisabled:o,onPress(M){m?.(M),a.setSelectedValue(t),r.current?.focus();}}),{focusableProps:I}=c$3(c$1(e,{onFocus:()=>a.setLastFocusedValue(t)}),r),i=c$1(D,I),z=a$6(e,{labelable:true}),b=-1;a.selectedValue!=null?a.selectedValue===t&&(b=0):(a.lastFocusedValue===t||a.lastFocusedValue==null)&&(b=0),o&&(b=void 0);let{name:y,form:S,descriptionId:_e,errorMessageId:ze,validationBehavior:B}=N.get(a);a$9(r,a.defaultSelectedValue,a.setSelectedValue),a$a({validationBehavior:B},a,r);let W=a$b();return {labelProps:c$1(P,useMemo(()=>({onClick:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault()}),[])),inputProps:c$1(z,{...i,type:"radio",name:y,form:S,tabIndex:b,disabled:o,required:a.isRequired&&B==="native",checked:R,value:t,onChange:G,"aria-describedby":[e["aria-describedby"],W.id,a.isInvalid?ze:null,_e].filter(Boolean).join(" ")||void 0}),descriptionProps:W,isDisabled:o,isSelected:R,isPressed:_||f}}function T(e,a,r){let{name:t,form:p,isReadOnly:n,isRequired:u,isDisabled:s,orientation:l="vertical",validationBehavior:d="aria"}=e,{direction:m}=b$1(),{isInvalid:v,validationErrors:g,validationDetails:o}=a.displayValidation,{labelProps:V,fieldProps:x,descriptionProps:R,errorMessageProps:G}=a$5({...e,labelElementType:"span",isInvalid:a.isInvalid,errorMessage:e.errorMessage||g,ref:r}),D=a$6(e,{labelable:true}),{focusWithinProps:_}=b$2({onBlurWithin(i){e.onBlur?.(i),a.selectedValue||a.setLastFocusedValue(null);},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function P(i,z){let b=d$1(z.currentTarget,{from:j$1(z),accept:S=>S instanceof b$4(S).HTMLInputElement&&S.type==="radio"}),y;return i==="next"?(y=b.nextNode(),y||(b.currentNode=z.currentTarget,y=b.firstChild())):(y=b.previousNode(),y||(b.currentNode=z.currentTarget,y=b.lastChild())),y?(y.focus(),a.setSelectedValue(y.value),true):false}let{keyboardProps:f}=j({shortcuts:{ArrowRight:i=>P(m==="rtl"&&l!=="vertical"?"prev":"next",i),ArrowLeft:i=>P(m==="rtl"&&l!=="vertical"?"next":"prev",i),ArrowDown:i=>P("next",i),ArrowUp:i=>P("prev",i)},allowRepeats:true}),I=c$2(t);return N.set(a,{name:I,form:p,descriptionId:R.id,errorMessageId:G.id,validationBehavior:d}),{radioGroupProps:c$1(D,{role:"radiogroup",...f,"aria-invalid":a.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":n||void 0,"aria-required":u||void 0,"aria-disabled":s||void 0,"aria-orientation":l,...x,..._}),labelProps:V,descriptionProps:R,errorMessageProps:G,isInvalid:v,validationErrors:g,validationDetails:o}}var Oe=Math.round(Math.random()*1e10),Le=0;function E(e){let a=useMemo(()=>e.name||`radio-group-${Oe}-${++Le}`,[e.name]),[r,t]=a$4(e.value,e.defaultValue??null,e.onChange),[p]=useState(r),[n,u]=useState(null),s=d({...e,value:r}),l=m=>{!e.isReadOnly&&!e.isDisabled&&(t(m),s.commitValidation());},d$1=s.displayValidation.isInvalid;return {...s,name:a,selectedValue:r,defaultSelectedValue:e.value!==void 0?p:e.defaultValue??null,setSelectedValue:l,lastFocusedValue:n,setLastFocusedValue:u,isDisabled:e.isDisabled||false,isReadOnly:e.isReadOnly||false,isRequired:e.isRequired||false,validationState:e.validationState||(d$1?"invalid":null),isInvalid:d$1}}var Re="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",Pe=a({defaultClassName:"cw3m0n5 _1yep5z6f0 _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),ve="cw3m0n4",ge="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m0",Ve=a({defaultClassName:"cw3m0n0 _1yep5z61k2 _1yep5z61k3 _1yep5z61k4 _1yep5z61kq _1yep5z61kr _1yep5z61ks _1yep5z61le _1yep5z61lf _1yep5z61lg _1yep5z61m2 _1yep5z61m3 _1yep5z61m4 _1yep5z61ob _1yep5z61us",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var he=({label:e,description:a},{isSelected:r,isFocusVisible:t,isDisabled:p,optionLabelPosition:n,isHovered:u,isReadOnly:s},l,d)=>jsxs("div",{className:b$5({labelPosition:n}),children:[jsx("div",{className:a$3(c$4({isSelected:r,isFocusVisible:t,isDisabled:p,isReadOnly:s,isHovered:u}),Ve({isHovered:u})),children:r?jsx("div",{className:ve}):null}),e?jsxs("div",{className:Re,children:[jsx("span",{id:l,className:a$c({isDisabled:p}),children:e}),a?jsx("span",{...d,className:Pe({isDisabled:p}),children:a}):null]}):null]}),xe=({state:e,renderOption:a,item:r,optionLabelPosition:t="end",optionStyle:p,optionClassName:n,isReadOnly:u,...s})=>{let l=!!s.isDisabled||!!s.disabledValues?.includes(r.id),d=Se.useRef(null),m=c$2(),v=!a&&!!r.label&&!!r.description,{inputProps:g,isPressed:o,isSelected:V,labelProps:x,descriptionProps:R}=w({...s,isDisabled:l,children:r.label,value:r.id,"aria-labelledby":v?m:s["aria-labelledby"]},e,d),{focusProps:G,isFocusVisible:D,isFocused:_}=a$7(),{hoverProps:P,isHovered:f}=a$8({isDisabled:l},d),I=a$2({"data-selected":V,"data-focused":_,"data-focus-visible":D,"data-hovered":f,"data-disabled":l,"data-pressed":o,"data-read-only":u}),i={isFocusVisible:D,isSelected:V,isFocused:_,isHovered:f,isDisabled:l,optionLabelPosition:t,isReadOnly:u};return jsxs("label",{...c$1(x,P,I),style:p,className:a$3("BaselineUI-Radio-Item",n),children:[jsx(b$3,{children:jsx("input",{...c$1(g,G),ref:d})}),a?a(r,i):he(r,i,v?m:void 0,R)]})};var De=Se.forwardRef(({className:e$1,style:a,optionsContainerClassName:r,optionsContainerStyle:t,items:p,labelPosition:n="top",renderOption:u,"aria-label":s,"aria-labelledby":l,"aria-describedby":d,"aria-details":m,"data-block-id":v,"data-block-class":g$1,...o},V)=>{let x=a$1(V),R=E(o),{radioGroupProps:G,labelProps:D,descriptionProps:_,errorMessageProps:P}=T({...o,"aria-label":s,"aria-labelledby":l,"aria-describedby":d,"aria-details":m},R,x),f$1=b({...o,descriptionProps:_,errorMessageProps:P,labelPosition:n}),I=a$2({"data-orientation":o.orientation,"data-block-id":v,"data-block-class":g$1,"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly});return jsxs("div",{...c$1(G,I),className:a$3(g({labelPosition:n}),"BaselineUI-RadioGroup",e$1),style:a,ref:x,children:[o.label||f$1?jsxs("div",{className:f({labelPosition:n,hasMessage:!!f$1}),children:[jsx("span",{...D,className:a$3(e,"BaselineUI-RadioGroup-Label"),children:o.label}),n==="start"&&f$1]}):null,jsx("div",{className:a$3(ge,{[c]:o.isDisabled},r),style:t,children:p.map(i=>jsx(xe,{state:R,renderOption:u,item:i,optionLabelPosition:o.optionLabelPosition,optionStyle:o.optionStyle,optionClassName:o.optionClassName,isReadOnly:o.isReadOnly,isDisabled:o.isDisabled,disabledValues:o.disabledValues,value:i.id},i.id))}),n==="top"&&f$1]})});De.displayName="RadioGroup";export{De as a};
|
package/dist/chunk-HU75NQMI.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$6}from'./chunk-ZE2B6BS7.mjs';import {a as a$e}from'./chunk-PSAOTHYG.mjs';import {k,j,g,c,i,f as f$1,h as h$1,e as e$1,d as d$1,b as b$5,a as a$h}from'./chunk-5GW36EQJ.mjs';import {b as b$3,a as a$g,q as q$1,n,c as c$4}from'./chunk-3IPRT57V.mjs';import {a as a$b}from'./chunk-AMW7LGCF.mjs';import {a as a$9}from'./chunk-QUWRO3HT.mjs';import {b as b$6}from'./chunk-XAM3AXXK.mjs';import {b as b$7}from'./chunk-QMV2O57M.mjs';import {p}from'./chunk-6Z3GYFG5.mjs';import {b as b$8}from'./chunk-DF2D7NE6.mjs';import {a as a$3}from'./chunk-2MS356Q7.mjs';import {a as a$k}from'./chunk-SOWGXN5P.mjs';import {a as a$d}from'./chunk-Z73YU5ZQ.mjs';import {a as a$c,b as b$2}from'./chunk-SZTFMBPY.mjs';import {d,h,e,f,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$f}from'./chunk-JZXLV6JU.mjs';import {a as a$m}from'./chunk-CY6W27WG.mjs';import {b,c as c$2}from'./chunk-IDIZSV2Y.mjs';import {a as a$u}from'./chunk-6QQEK5I6.mjs';import {d as d$3}from'./chunk-W6QO7FPZ.mjs';import {b as b$4}from'./chunk-INFMXVHD.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {a as a$j}from'./chunk-2BG2JLFC.mjs';import {a as a$a}from'./chunk-BA5OA5DY.mjs';import {a as a$l}from'./chunk-USMC34OO.mjs';import {a as a$s}from'./chunk-K5RYVERS.mjs';import {a as a$p}from'./chunk-IROFSPEN.mjs';import {a as a$i}from'./chunk-VDUFLHKK.mjs';import {a as a$q}from'./chunk-22VRCVTH.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {a as a$r}from'./chunk-FPM5UJRF.mjs';import {a as a$t}from'./chunk-4QBHQCCK.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {j as j$1,d as d$2}from'./chunk-KUDCYGII.mjs';import {c as c$1,b as b$1,a as a$o}from'./chunk-3WKDIXCM.mjs';import {a as a$n}from'./chunk-SVIYLH7R.mjs';import {c as c$3}from'./chunk-ETM4MNG4.mjs';import {h as h$2,j as j$2}from'./chunk-SD43KVTU.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import W,{useCallback,useContext,useEffect,useMemo,useRef,useState}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {CaretDownIcon}from'@baseline-ui/icons/8';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var $=new WeakMap;function ue(t,e,a){let{keyboardDelegate:n,isDisabled:f,isRequired:y,name:c,form:S,validationBehavior:i="aria"}=t,x=a$l({usage:"search",sensitivity:"base"}),l=useMemo(()=>n||new b$6(e.collection,e.disabledKeys,a,x),[n,e.collection,e.disabledKeys,x,a]),{menuTriggerProps:m,menuProps:s}=c$4({isDisabled:f,type:"listbox"},e,a),{keyboardProps:d}=j$1({shortcuts:{ArrowLeft:()=>{if(e.selectionManager.selectionMode==="multiple")return false;let u=e.selectedKey!=null?l.getKeyAbove?.(e.selectedKey):l.getFirstKey?.();u!=null&&e.setSelectedKey(u);},ArrowRight:()=>{if(e.selectionManager.selectionMode==="multiple")return false;let u=e.selectedKey!=null?l.getKeyBelow?.(e.selectedKey):l.getFirstKey?.();u!=null&&e.setSelectedKey(u);}},allowRepeats:true,onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp}),{typeSelectProps:o}=b$7({keyboardDelegate:l,selectionManager:e.selectionManager,onTypeSelect(u){e.setSelectedKey(u);}}),{isInvalid:g,validationErrors:b,validationDetails:T}=e.displayValidation,{labelProps:O,fieldProps:r,descriptionProps:M,errorMessageProps:p}=a$m({...t,labelElementType:"span",isInvalid:g,errorMessage:t.errorMessage||b,ref:a});e.selectionManager.selectionMode==="multiple"&&(o={});let B=a$n(t,{labelable:true}),P=c$1(o,m,r),C=c$3();return $.set(e,{isDisabled:f,isRequired:y,name:c,form:S,validationBehavior:i}),{labelProps:{...O,onClick:()=>{t.isDisabled||(a.current?.focus(),d$2("keyboard"));}},triggerProps:c$1(B,{...P,isDisabled:f,onKeyDown:a$o(P.onKeyDown,d.onKeyDown),onKeyUp:d.onKeyUp,"aria-labelledby":[C,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(u){e.isFocused||(t.onFocus&&t.onFocus(u),t.onFocusChange&&t.onFocusChange(true),e.setFocused(true));},onBlur(u){e.isOpen||(t.onBlur&&t.onBlur(u),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));}}),valueProps:{id:C},menuProps:{...s,onAction:void 0,autoFocus:e.focusStrategy||true,shouldSelectOnPressUp:true,shouldFocusOnHover:true,disallowEmptySelection:true,linkBehavior:"selection",onBlur:u=>{h$2(u.currentTarget,u.relatedTarget)||(t.onBlur&&t.onBlur(u),t.onFocusChange&&t.onFocusChange(false),e.setFocused(false));},"aria-labelledby":[r["aria-labelledby"],P["aria-label"]&&!r["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:M,errorMessageProps:p,isInvalid:g,validationErrors:b,validationDetails:T,hiddenSelectProps:{isDisabled:f,name:c,label:t.label,state:e,triggerRef:a,form:S}}}function vt(t,e,a){let n=$.get(e)||{},{autoComplete:f,name:y=n.name,form:c=n.form,isDisabled:S=n.isDisabled}=t,{validationBehavior:i,isRequired:x}=n,{visuallyHiddenProps:l}=a$s({style:{position:"fixed",top:0,left:0}});a$t(t.selectRef,e.defaultValue,e.setValue),a$u({validationBehavior:i,focus:()=>a.current?.focus()},e,t.selectRef);let m=e.setValue,s=useCallback(d=>{let o=j$2(d);o.multiple?m(Array.from(o.selectedOptions,g=>g.value)):m(d.currentTarget.value);},[m]);return {containerProps:{...l,"aria-hidden":true,"data-react-aria-prevent-focus":true,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:f,disabled:S,multiple:e.selectionManager.selectionMode==="multiple",required:i==="native"&&x,name:y,form:c,value:e.value??"",onChange:s,onInput:s}}}function me(t){let{state:e,triggerRef:a,label:n,name:f,form:y,isDisabled:c}=t,S=useRef(null),i=useRef(null),{containerProps:x,selectProps:l}=vt({...t,selectRef:e.collection.size<=300?S:i},e,a),m=Array.isArray(e.value)?e.value:[e.value];if(e.collection.size<=300)return jsx("div",{...x,"data-testid":"hidden-select-container",children:jsxs("label",{children:[n,jsxs("select",{...l,ref:S,children:[jsx("option",{value:"",label:"\xA0",children:"\xA0"}),[...e.collection.getKeys()].map(s=>{let d=e.collection.getItem(s);if(d&&d.type==="item")return jsx("option",{value:d.key,children:d.textValue},d.key)}),e.collection.size===0&&f&&m.map((s,d)=>jsx("option",{value:s??""},d))]})]})});if(f){let s=$.get(e)||{},{validationBehavior:d}=s;m.length===0&&(m=[null]);let o=m.map((g,b)=>{let T={type:"hidden",autoComplete:l.autoComplete,name:f,form:y,disabled:c,value:g??""};return d==="native"?jsx("input",{...T,ref:b===0?i:null,style:{display:"none"},type:"text",required:b===0?l.required:false,onChange:()=>{}},b):jsx("input",{...T,ref:b===0?i:null},b)});return jsx(Fragment,{children:o})}return null}function fe(t){let{selectionMode:e="single",shouldCloseOnSelect:a=e==="single"}=t,n=a$q(t),[f,y]=useState(null),c=useMemo(()=>t.defaultValue!==void 0?t.defaultValue:e==="single"?t.defaultSelectedKey??null:[],[t.defaultValue,t.defaultSelectedKey,e]),S=useMemo(()=>t.value!==void 0?t.value:e==="single"?t.selectedKey:void 0,[t.value,t.selectedKey,e]),[i,x]=a$r(S,c,t.onChange),l=e==="single"&&Array.isArray(i)?i[0]:i,m=r=>{if(e==="single"){let M=Array.isArray(r)?r[0]??null:r;x(M),M!==l&&t.onSelectionChange?.(M);}else {let M=[];Array.isArray(r)?M=r:r!=null&&(M=[r]),x(M);}},s=b$8({...t,selectionMode:e,disallowEmptySelection:e==="single",allowDuplicateSelectionEvents:true,selectedKeys:useMemo(()=>It(l),[l]),onSelectionChange:r=>{if(r!=="all"){if(e==="single"){let M=r.values().next().value??null;m(M);}else m([...r]);a&&n.close(),g.commitValidation();}}}),d=s.selectionManager.firstSelectedKey,o=useMemo(()=>[...s.selectionManager.selectedKeys].map(r=>s.collection.getItem(r)).filter(r=>r!=null),[s.selectionManager.selectedKeys,s.collection]),g=d$3({...t,value:Array.isArray(l)&&l.length===0?null:l}),[b,T]=useState(false),[O]=useState(l);return {...g,...s,...n,value:l,defaultValue:c??O,setValue:m,selectedKey:d,setSelectedKey:m,selectedItem:o[0]??null,selectedItems:o,defaultSelectedKey:t.defaultSelectedKey??(t.selectionMode==="single"?O:null),focusStrategy:f,open(r=null){(s.collection.size!==0||t.allowsEmptyCollection)&&(y(r),n.open());},toggle(r=null){(s.collection.size!==0||t.allowsEmptyCollection)&&(y(r),n.toggle());},isFocused:b,setFocused:T}}function It(t){if(t!==void 0)return t===null?[]:Array.isArray(t)?t:[t]}var q=W.forwardRef(({variant:t,isOpen:e,validationState:a$9="valid",valueProps:n,className:f,style:y,value:c$2,"data-block-id":S,"data-block-class":i$1,fallbackValue:x,selectionMode:l="single",onRemove:m,maxCount:s=2,moreLabel:d$1,...o},g$1)=>{let{formatMessage:b$2}=b(),T=c$2?.[0]??null,O=T?.label??x,r=T?.icon??null,M=W.useRef(null),p=!!(l==="multiple"&&c$2&&c$2?.length>0),{buttonProps:B,isPressed:P}=a({...o,elementType:"div",isDisabled:o.isDisabled||o.isReadOnly},M),{hoverProps:C,isHovered:u}=a$1({isDisabled:o.isDisabled}),{focusProps:D,isFocused:j$1,isFocusVisible:I}=a$2(),E=a$3({isReadOnly:o.isReadOnly,validationState:a$9});o.isReadOnly&&(B.disabled=false);let L=a$4({"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly,"data-focused":j$1,"data-focus-visible":I,"data-hovered":u,"data-pressed":P,"data-open":e,"data-block-id":S,"data-block-class":i$1}),F=o["aria-labelledby"]?.split(/\s+/).filter(R=>R&&R!==n?.id).join(" ")||void 0,ne=useCallback(()=>{a$5(Array.isArray(c$2),"value must be an array");let R=c$2.slice(0,s),k$1=c$2.slice(s),X=[...R,...k$1.length>0?[{label:(typeof d$1=="function"?d$1({count:k$1.length}):d$1)??b$2(Vt.more,{count:k$1.length}),id:"remaining-value"}]:[]];return jsx(a$6,{items:X,onRemove:o.isReadOnly?void 0:_=>{_.has("remaining-value")?m?.(new Set(k$1.map(N=>N.id))):m?.(_);},"aria-labelledby":F,className:k,isDisabled:o.isDisabled})},[c$2,s,b$2,d$1,F,o.isDisabled,m,o.isReadOnly]),U=l==="multiple";return jsxs("div",{...c$1(U?Object.fromEntries(Object.entries(B).filter(([R])=>R.startsWith("on"))):c$1(B,D),C,L),ref:U?g$1:b$1(g$1,M),className:a$8(i({isFocused:I,isDisabled:!!o.isDisabled,isOpen:e,isHovered:u,variant:t,isReadOnly:!!o.isReadOnly,areTagsVisible:p}),h({variant:t,isHovered:u,isFocused:I,validationState:a$9,isDisabled:!!o.isDisabled,isReadOnly:o.isReadOnly}),f,"BaselineUI-Select-Button"),"data-testid":"select-button",style:y,children:[jsxs(a$7,{display:"flex",flexDirection:"row",alignItems:"center",gap:"md",flex:1,paddingRight:"md",children:[l==="multiple"&&c$2&&c$2.length>0?jsxs(Fragment,{children:[jsx("span",{...n,hidden:true,"aria-label":c$2.map(R=>R.label).join(", ")}),ne()]}):jsxs("span",{className:k,children:[r?jsx(r,{size:24}):null,jsx("span",{...n,children:O})]}),E?jsx("span",{"aria-hidden":true,className:a$8(d({validationState:a$9,isReadOnly:!!o.isReadOnly}),j),children:jsx(E,{size:16})}):null]}),jsx("div",{...U?{...c$1(B,D),ref:M}:{},className:g,children:jsx(CaretDownIcon,{size:8,className:c({isOpen:e})})})]})});q.displayName="SelectButton";var Vt=c$2({more:{id:"bui.select.more",defaultMessage:"+{count} more"}});var Tt=W.createContext({state:null,popoverAnchorRef:null}),Se=W.forwardRef(({className:t,style:e$2,labelPosition:a="top",variant:n="primary","data-block-id":f$2,"data-block-class":y,onTriggerPress:c,placement:S="bottom start",triggerClassName:i,triggerStyle:x,state:l,optionStyle:m,optionClassName:s,showSectionHeader:d,hideSelectAll:o,hideClear:g,clearLabel:b$1,searchLabel:T,selectAllLabel:O,moreLabel:r,renderTrigger:M=({buttonProps:P,selectedValue:C,valueProps:u,isOpen:D,ref:j,selectionMode:I,onRemove:E,maxCount:L})=>jsx(q,{...P,className:i,style:x,isOpen:D,isReadOnly:p$1.isReadOnly,ref:j,variant:n,validationState:p$1.validationState,valueProps:u,value:C,fallbackValue:p$1.placeholder,selectionMode:I,onRemove:E,maxCount:L,moreLabel:r}),...p$1},B)=>{let{popoverAnchorRef:P}=useContext(Tt),C=W.useRef(null),{formatMessage:u}=b(),D=T??u(ye.search),j=useContext(a$9),{isVirtualized:I}=useContext(p),E=a$a(p$1.portalContainer),{labelProps:L,triggerProps:F,valueProps:ne,menuProps:U,descriptionProps:R,errorMessageProps:k}=ue({...a$b(p$1),validationState:p$1.validationState==="error"?"invalid":"valid"},l,C),X=c$3(),_=a$c(p$1)==="warningMessage",N=b$2({...p$1,descriptionProps:R,errorMessageProps:k,warningMessageProps:{id:X},labelPosition:a}),Kt=w=>{L.onClick?.(w),!(p$1.isDisabled||!F.id)&&a$p(C.current,F.id)?.focus();},Ot=l.selectedItems?.map(w=>w.value)??null;return jsxs(Fragment,{children:[jsxs("div",{style:e$2,className:a$8(g$1({labelPosition:a}),"BaselineUI-Select",t),"data-block-id":f$2,"data-block-class":y,ref:B,children:[p$1.label||N?jsxs("div",{className:f({labelPosition:a,hasMessage:!!N}),children:[p$1.label?jsx("div",{...L,onClick:Kt,className:a$8(e,"BaselineUI-Select-Label"),children:p$1.label}):null,a==="start"&&N]}):null,jsx(me,{state:l,triggerRef:C,isDisabled:p$1.isDisabled,label:p$1.label,name:p$1.name}),M({buttonProps:c$1({onPressStart:c,"aria-labelledby":L.id},F,_?{"aria-describedby":[F["aria-describedby"],X].filter(Boolean).join(" ")}:null),selectedValue:Ot,valueProps:ne,isOpen:l.isOpen,ref:C,selectionMode:p$1.selectionMode??"single",onRemove:w=>{l.selectionManager.setSelectedKeys(new Set([...l.selectionManager.selectedKeys].filter(ie=>!w.has(ie))));},maxCount:p$1.maxCount??2}),a==="top"&&N]}),l?jsx(b$3.Provider,{value:l,children:jsx(a$d,{placement:S,state:l,portalContainer:E,offset:2,triggerRef:P||C,style:e$2,className:"BaselineUI-Select-Popover",...p$1,children:jsxs(a$7,{display:"flex",flex:1,flexDirection:"column",className:f$1,children:[j?jsxs(Fragment,{children:[jsx(a$e,{size:"sm","aria-label":D,placeholder:D,className:a$8(h$1,"BaselineUI-Select-SearchInput"),autoFocus:true}),jsx(a$f,{})]}):null,jsx(a$g.Provider,{value:U,children:jsx(q$1,{label:p$1.label,escapeKeyBehavior:"none",className:e$1({isVirtualized:I}),optionStyle:m,optionClassName:s,showSectionHeader:d})}),l.selectionManager.selectionMode==="multiple"&&(!o||!g)&&jsxs(a$7,{display:"flex",flexDirection:"row",className:d$1,children:[!o&&jsx(b$4,{variant:"ghost",size:"md",label:O??u(ye.selectAll),"data-testid":"select-all-button",onPress:()=>{if(l.selectionManager.isSelectAll)return;let ie=[...l.collection.getKeys()].filter(ge=>!l.selectionManager.disabledKeys.has(ge)&&l.selectionManager.canSelectItem(ge));l.selectionManager.setSelectedKeys(new Set(ie));},className:b$5}),!o&&!g&&jsx(a$f,{orientation:"vertical"}),!g&&jsx(b$4,{variant:"ghost",label:b$1??u(ye.clear),size:"md","data-testid":"select-clear-button",onPress:()=>{l.selectionManager.isEmpty||l.selectionManager.clearSelection();},className:b$5})]})]})})}):null]})});Se.displayName="SelectCore";var Ct=W.forwardRef(({collection:t,...e},a)=>{let n=fe({...e,collection:t,validationState:e.validationState==="error"?"invalid":"valid",children:void 0});return jsx(Se,{...e,ref:a,state:n})});Ct.displayName="SelectStandalone";var oe=W.forwardRef(({optionStyle:t,optionClassName:e,showSectionHeader:a,...n$1},f)=>{let{state:y}=useContext(Tt);useEffect(()=>{a$5(y||n$1.items,"Select: A `state` that can be passed via context or `items` are required.");},[n$1.items,y]);let c=useMemo(()=>({renderOption:(S,i)=>jsx(n,{...i,item:S,selectionIcon:i.selectionMode==="multiple"?"checkbox":"checkmark"}),optionStyle:t,optionClassName:e,showSectionHeader:a}),[t,e,a]);return y?jsx(Se,{...n$1,optionStyle:t,optionClassName:e,showSectionHeader:a,ref:f,state:y}):jsx(a$h,{items:n$1.items,listBoxProps:c,children:S=>jsx(Ct,{collection:S,...n$1,ref:f})})});oe.displayName="Select";var ye=c$2({selectAll:{id:"bui.select.selectAll",defaultMessage:"Select All"},clear:{id:"bui.select.clear",defaultMessage:"Clear"},search:{id:"bui.select.search",defaultMessage:"Search"}});var ht=W.forwardRef(({className:t,style:e,variant:a,"data-block-id":n,"data-block-class":f,icon:y,tooltip:c=true,iconTooltip:S=true,...i},x)=>{let l=W.useRef(null),{tooltipProps:m}=a$i({label:i["aria-label"],tooltip:c}),s=useCallback(({buttonProps:d,selectedValue:o,valueProps:g,isOpen:b,ref:T})=>jsx(a$j,{...m,children:jsx(q,{...d,className:i.triggerClassName,style:i.triggerStyle,isOpen:b,isReadOnly:i.isReadOnly,ref:T,variant:a,validationState:i.validationState,value:o,fallbackValue:i.placeholder,valueProps:g,moreLabel:i.moreLabel})}),[i,m,a]);return jsxs(a$7,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$8("BaselineUI-IconSelect",t),"data-block-id":n,"data-block-class":f,style:e,ref:b$1(x,l),children:[y?jsx(a$k,{icon:y,label:i["aria-label"],tooltip:S,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary",display:"flex",flexShrink:0})}):null,jsx(oe,{...i,renderTrigger:s})]})});ht.displayName="IconSelect";export{fe as a,Tt as b,oe as c,ht as d};
|
package/dist/chunk-LDWNE2JT.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-EFFODO2N.mjs';import {a as a$1,b}from'./chunk-SZTFMBPY.mjs';import {c as c$1}from'./chunk-PG3WDHSK.mjs';import {a}from'./chunk-7SQRBY7N.mjs';import {a as a$3}from'./chunk-RSKKEGJZ.mjs';import {a as a$2}from'./chunk-STMDFIUL.mjs';import {c as c$2}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w 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 A=w.forwardRef(({className:F,validationState:s,variant:H="primary",labelPosition:r="top",inputStyle:d,inputClassName:v,isMultiLine:t=false,rows:N,inputRef:D,"data-block-id":L,"data-block-class":h,...e},k)=>{let B=w.useRef(null),a$6=D??B,{inputProps:o,labelProps:O,descriptionProps:j,errorMessageProps:C,validationErrors:U}=a({...e,inputElementType:t?"textarea":"input",validationState:s==="error"||e.errorMessage?"invalid":s?"valid":void 0},a$6),n=e.errorMessage||U.join(" "),m=c(),V=a$1({...e,errorMessage:n})==="warningMessage",W=b({...e,errorMessage:n,descriptionProps:j,errorMessageProps:C,warningMessageProps:{id:m},labelPosition:r});n&&(s="error");let{isFocused:u,focusProps:c$3,isFocusVisible:_}=a$2(),f=V?{"aria-describedby":[o["aria-describedby"],m].filter(Boolean).join(" ")}:null,T=a$3({"data-readonly":e.isReadOnly,"data-disabled":e.isDisabled,"data-validation-state":s,"data-focused":u,"data-focus-visible":_}),g=a$4(c$1({isDisabled:e.isDisabled,labelPosition:r,isMultiLine:t}),"BaselineUI-TextInput-Input",v);return jsx(a$5,{variant:H,labelProps:O,isFocused:u,message:W,ref:k,labelPosition:r,className:a$4("BaselineUI-TextInput",F),validationState:s,isMultiLine:t,"data-block-id":L,"data-block-class":h,...e,children:t?jsx("textarea",{...c$2(o,c$3,T,f),className:g,style:d,rows:N,ref:a$6}):jsx("input",{...c$2(o,c$3,T,f),className:g,style:d,ref:a$6})})});A.displayName="TextInput";export{A as a};
|
package/dist/chunk-MN7USKSC.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$5}from'./chunk-JZXLV6JU.mjs';import {a as a$2}from'./chunk-7SQRBY7N.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$4}from'./chunk-2OXYNLVN.mjs';import {a as a$1}from'./chunk-FPM5UJRF.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import {CaretLeftIcon,CaretRightIcon}from'@baseline-ui/icons/24';import {useGranularEffect}from'granular-hooks';import Y,{useCallback,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var $=a({defaultClassName:"_1bwul1t8 _1yep5z6m6 _1yep5z6me _1yep5z6ey _1yep5z6g9",variantClassNames:{size:{xs:"_1bwul1t9 _1yep5z6q7 _1yep5z6q8 _1yep5z6q9 _1yep5z6nv _1yep5z6nw _1yep5z6nx _1yep5z610e",sm:"_1bwul1ta _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610h",md:"_1bwul1tb _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z610k"}},defaultVariants:{},compoundVariants:[]}),E=a({defaultClassName:"_1bwul1t3 _1yep5z6ez",variantClassNames:{size:{xs:"_1yep5z610e",sm:"_1yep5z610h",md:"_1yep5z610k"},isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),G={xs:"_1bwul1t0",sm:"_1bwul1t1",md:"_1bwul1t2"};var J=Y.forwardRef(({className:Q,style:X,size:p="md",isDisabled:a,decrementAriaLabel:Z,incrementAriaLabel:j,"data-block-id":V,"data-block-class":ee,label:te,onChange:k,onBlur:B,onKeyDown:F,minValue:r=Number.NEGATIVE_INFINITY,maxValue:n=Number.POSITIVE_INFINITY,defaultValue:ne,value:ae,description:w=y=>`${y} / ${n}`,onInputChange:re,onChangeSuccess:ie,step:b$1=1,valueToLabelMap:u,isDecrementButtonDisabled:oe,isIncrementButtonDisabled:se,...l},le)=>{let y=b(),de=Y.useRef(null),q=c(),O=c(),i=useCallback(e=>u?u.get(e)??e.toString():e.toString(),[u]),S=useCallback(e=>{if(u){let D=[...u.entries()].find(([,me])=>me===e);if(D)return D[0]}let o=e.trim();return /^-?\d+$/.test(o)?Number(o):Number.NaN},[u]),[t,c$1]=a$1(ae,ne??1,ie),[g,m]=useState(i(t)??""),z=t<=r||a||oe,x=t>=n||a||se,f=useCallback(e=>{if(!e){m(i(t));return}k?.(e);let o=S(e);if(Number.isNaN(o)){m(i(t)??"");return}o>=r&&o<=n&&!a&&!l.isReadOnly?(c$1(o),m(i(o))):m(i(t));},[k,S,r,n,a,l.isReadOnly,i,t,c$1]),_=useCallback(e=>e>=r&&e<=n,[r,n]),pe=useCallback(e=>{f(g),B?.(e);},[g,f,B]),P=useCallback(()=>{if(x)return;let e=Math.min(t+b$1,n);_(e)&&c$1(e);},[t,x,_,n,c$1,b$1]),h=useCallback(()=>{if(z)return;let e=Math.max(t-b$1,r);_(e)&&c$1(e);},[t,z,_,r,c$1,b$1]),ue=useCallback(e=>{if(l.isReadOnly)e.continuePropagation();else switch(e.key){case "Enter":{f(g);break}case "ArrowUp":{P();break}case "ArrowDown":{h();break}default:e.continuePropagation();}F?.(e);},[l.isReadOnly,F,f,g,P,h]);useGranularEffect(()=>{m(i(t));},[t],[i]);let v=typeof w=="function"?w(t):w,{inputProps:ce}=a$2({...l,value:g?.toString(),isDisabled:a,onBlur:pe,onChange:e=>{m(e),re?.(e);},onKeyDown:ue,"aria-labelledby":q,"aria-describedby":v?O:void 0},de);return jsxs(a$3,{className:a$6(G[p],Q),display:"flex",flexDirection:"row",alignItems:"center","data-block-id":V,"data-block-class":ee,style:X,ref:le,"aria-disabled":a,children:[jsx("span",{id:q,className:E({size:p,isDisabled:a}),children:te}),jsxs(a$3,{display:"flex",flexDirection:"row",borderRadius:"sm",borderColor:"border.subtle",borderStyle:"solid",borderWidth:1,style:{height:"inherit"},children:[jsx(a$4,{icon:CaretLeftIcon,elementType:"div",size:p,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-DecrementButton",isExcludedFromRovingFocus:true,isDisabled:z||l.isReadOnly,excludeFromTabOrder:true,onPress:h,"aria-label":Z||y.formatMessage(L.prevPage),tooltip:true}),jsx(a$5,{orientation:"vertical"}),jsx("input",{...ce,className:$({size:p}),min:r,max:n}),jsx(a$5,{orientation:"vertical"}),jsx(a$4,{icon:CaretRightIcon,elementType:"div",size:p,variant:"secondary",style:{height:"100%"},className:"BaselineUI-TaggedPagination-IncrementButton",isExcludedFromRovingFocus:true,isDisabled:x||l.isReadOnly,excludeFromTabOrder:true,onPress:P,"aria-label":j||y.formatMessage(L.nextPage),tooltip:true})]}),v?jsx("span",{id:O,className:E({size:p,isDisabled:a}),children:v}):null]})});J.displayName="TaggedPagination";var L=c$1({nextPage:{defaultMessage:"Next Page",id:"bui.taggedPagination.nextPage"},prevPage:{defaultMessage:"Previous Page",id:"bui.taggedPagination.prevPage"}});export{J as a};
|
package/dist/chunk-N7MIERZH.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-WQBA2P6W.mjs';import {a as a$d}from'./chunk-SOWGXN5P.mjs';import {a as a$f}from'./chunk-Z73YU5ZQ.mjs';import {a as a$3,b as b$2}from'./chunk-TIGGKOJQ.mjs';import {a as a$2}from'./chunk-XDTKLQJB.mjs';import {a as a$g}from'./chunk-RIVN2JT3.mjs';import {b as b$1}from'./chunk-SZTFMBPY.mjs';import {b as b$6}from'./chunk-INFMXVHD.mjs';import {a as a$c}from'./chunk-DIL5HL6K.mjs';import {a as a$e}from'./chunk-2BG2JLFC.mjs';import {a as a$1}from'./chunk-RPIUPWPO.mjs';import {a as a$h}from'./chunk-GMALMQWI.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {b as b$4}from'./chunk-K5RYVERS.mjs';import {b as b$5,j as j$1}from'./chunk-MBRNO6IW.mjs';import {a as a$b}from'./chunk-VDUFLHKK.mjs';import {a as a$a}from'./chunk-FPM5UJRF.mjs';import {a as a$8}from'./chunk-RSKKEGJZ.mjs';import {a as a$6}from'./chunk-STMDFIUL.mjs';import {a as a$7}from'./chunk-B3EZOXNU.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {b,c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import A from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var ne="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",me="_14uvjig3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",ue="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6jz _1yep5z6k0 _1yep5z6k1",ye=a({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"},hasNumberInput:{false:"_1yep5z6p1 _1yep5z6p2 _1yep5z6p3"}},defaultVariants:{},compoundVariants:[]}),ce=a({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6gh _1yep5z6m5 _1yep5z6lq",variantClassNames:{active:{true:"_14uvjigc _1yep5z6136 _1yep5z618x _1yep5z618p"},isDisabled:{true:"_14uvjigd _1yep5z613a"},isReadOnly:{true:"_1yep5z615l _1yep5z615m _1yep5z615n"},isFocusVisible:{true:"_14uvjigf _1yep5z6136 _1yep5z6189"},isHovered:{true:"_14uvjigg _1yep5z6136"}},defaultVariants:{},compoundVariants:[]}),fe="z9nup8a _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",be="_14uvjig4 z9nup87 _1yep5z6gd _1yep5z6m3",_e=a({defaultClassName:"_14uvjig5 _1yep5z6gh _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6m4",variantClassNames:{active:{true:"_1yep5z6136"},isFocusVisible:{true:"_1yep5z6136"},isDisabled:{true:"_1yep5z613a"},isHovered:{true:"_1yep5z6136"}},defaultVariants:{},compoundVariants:[]});var N=A.forwardRef(({className:g,style:v,onChange:i,onChangeEnd:p,numberFormatOptions:o,isDisabled:e,step:h,minValue:d,maxValue:S,value:u,"aria-label":s,"aria-labelledby":r,"aria-details":n,"aria-describedby":m,"data-block-id":y,"data-block-class":I,defaultValue:T,isReadOnly:c$1,label:f,description:x,id:j,includeNumberInput:b$2,numberInputClassName:k,numberInputStyle:he},Se)=>{let H=A.useRef(null),F=c(),O={onChange:i===void 0?void 0:z=>{i(z[0]);},isDisabled:e||c$1,step:h,minValue:d,maxValue:S,onChangeEnd:p===void 0?void 0:z=>{p(z[0]);},value:u===void 0?void 0:[u],defaultValue:T===void 0?void 0:[T],"aria-label":s,"aria-labelledby":r,"aria-details":n,"aria-describedby":[x?F:void 0,m].filter(Boolean).join(" ")||void 0,id:j,label:f},xe=a$1(o),_=a$2({...O,numberFormatter:xe}),{trackProps:je,groupProps:ke,labelProps:L}=a$3(O,_,H),U=jsx(a$4,{variant:"ghost",showStepper:false,className:k,"aria-label":s,"aria-labelledby":L.id,isDisabled:e,isReadOnly:c$1,value:_.getThumbValue(0),formatOptions:o,onChange:z=>{Number.isNaN(z)||(_.setThumbDragging(0,true),_.setThumbValue(0,z),_.setThumbDragging(0,false));},style:{width:60,textAlign:"right",flexShrink:0,...he}});return jsxs("div",{...ke,style:v,"data-block-id":y,"data-block-class":I,className:a$5(ne,"BaselineUI-Slider",g),children:[f?jsxs("div",{className:ue,children:[jsx("label",{...L,className:a$5(ye({isDisabled:e,hasNumberInput:!!b$2}),"BaselineUI-Slider-Label"),children:f}),b$2?U:null]}):null,jsxs("div",{className:me,children:[jsx("div",{...je,className:a$5(be,"BaselineUI-Slider-Track"),ref:b(H,Se),"data-testid":"track",children:jsx(Pe,{state:_,trackRef:H,isDisabled:e,isReadOnly:c$1})}),b$2&&!f?U:null]}),b$1({description:x,descriptionProps:{id:F},errorMessageProps:{},isDisabled:e})]})});N.displayName="Slider";function Pe({state:g,trackRef:v,isDisabled:i,isReadOnly:p}){let o=A.useRef(null),{thumbProps:e,inputProps:h,isDragging:d}=b$2({trackRef:v,inputRef:o},g),{focusProps:S,isFocused:u,isFocusVisible:s}=a$6(),{hoverProps:r,isHovered:n}=a$7({isDisabled:i}),{direction:m}=b$3(),y=a$8({"data-disabled":i,"data-readonly":p,"data-hovered":n,"data-focus-visible":s,"data-dragging":d,"data-focused":u});return jsxs(Fragment,{children:[jsx("div",{className:a$5(_e({isDisabled:i,isFocusVisible:s,active:d,isHovered:n}),"BaselineUI-Slider-TrackHighlight"),style:{width:m==="rtl"?`calc(100% - ${e.style?.left})`:e.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...c$1(e,r,y),className:a$5(fe,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:a$5(ce({isDisabled:i,isFocusVisible:s,active:d,isReadOnly:p,isHovered:n}),"BaselineUI-Slider-Thumb")}),jsx(b$4,{children:jsx("input",{ref:o,...c$1(h,S)})})]})]})}var ve=A.forwardRef(({className:g,style:v,onChange:i,"data-block-id":p,icon:o,formatValue:e=m=>m,tooltip:h=true,iconTooltip:d=true,popoverContentProps:S,isDisabled:u,onTriggerPress:s,...r},n)=>{let m=a$9(n),[y,I]=a$a(r.value,r.defaultValue||0,i),[T,c]=A.useState(false),{keyboardProps:f}=j({onKeyDown:k=>{k.key==="Enter"||k.key==="Escape"?c(false):k.continuePropagation();}}),{tooltipProps:x}=a$b({label:r["aria-label"],tooltip:h}),j$2=e(y||0),b=x?.isDisabled||r["aria-label"]?`${r["aria-label"]}, ${j$2}`:j$2.toString();return jsxs(a$c,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$5("BaselineUI-IconSlider",g),"data-block-id":p,style:v,ref:m,children:[o?jsx(a$d,{icon:o,label:r["aria-label"],tooltip:d,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsxs(b$5,{type:"dialog",isOpen:T,onOpenChange:c,children:[jsx(j$1,{children:jsx(a$e,{...x,children:jsx(b$6,{label:j$2,variant:"popover","aria-label":b,isDisabled:u,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"},onPressStart:s})})}),jsx(a$f,{placement:"bottom start",...S,children:jsx(a$g,{size:"content","aria-label":b,children:jsx(a$h,{autoFocus:true,children:jsx(a$c,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},...f,children:jsx(N,{...r,onChange:I,value:y})})})})})]})]})});ve.displayName="IconSlider";export{N as a,ve as b};
|
package/dist/chunk-NKC4MIX3.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-JBXZ6ZHP.mjs';import {a as a$1}from'./chunk-BGRGRUG4.mjs';import {a as a$3}from'./chunk-PG3WDHSK.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$4}from'./chunk-4QEH5CGK.mjs';import w from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var f="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",u="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6kz _1yep5z6l0 _1yep5z6l1",h=a({defaultClassName:"_12vfhl44",variantClassNames:{variant:{success:"_1yep5z612d",error:"_1yep5z6128",active:"_1yep5z612n"}},defaultVariants:{},compoundVariants:[]}),B="_1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ez _1yep5z6dy",j="_12vfhl43 _1yep5z6gd _1yep5z6m3",b="_12vfhl42 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",C="_1yep5z64l _1yep5z64m _1yep5z64n _1yep5z629 _1yep5z62a _1yep5z62b _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k",x=a({defaultClassName:"_12vfhl40 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6dy _1yep5z6ey",variantClassNames:{hasLabel:{false:"_1yep5z6py _1yep5z6pz _1yep5z6q0"}},defaultVariants:{},compoundVariants:[]});var N=w.forwardRef(({className:k,style:P,variant:p="active",showValue:y,description:V,errorMessage:T,"data-block-id":H,"data-block-class":L,...s},W)=>{let t=c(),o=p==="error"?T:V,{labelProps:I,progressBarProps:_}=a$1({...s,"aria-describedby":[o?t:void 0,s["aria-describedby"]].filter(Boolean).join(" ")||void 0}),{minValue:i=0,maxValue:R=100,value:E=0,label:r}=s,z=R-i,M=z>0?a$2((E-i)/z,0,1):0,q=`${Math.round(M*100)}%`,n=jsx("output",{className:x({hasLabel:!!r}),children:_["aria-valuetext"]});return jsxs("div",{..._,style:P,className:a$4(f,"BaselineUI-ProgressBar",k),"data-block-id":H,"data-block-class":L,ref:W,children:[r?jsxs("div",{className:u,children:[jsx("label",{...I,className:B,children:r}),y?n:null]}):null,jsxs("div",{className:C,children:[jsxs("div",{className:b,children:[jsx("div",{className:j,children:jsx("div",{style:{width:q},className:h({variant:p})})}),!r&&y?n:null]}),o?jsx("div",{className:a$3({hasError:p==="error"}),id:t,children:o}):null]})]})});N.displayName="ProgressBar";export{N as a};
|
package/dist/chunk-NWWH62TU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-KQOXSF4J.mjs';import {b,c as c$1,a as a$1}from'./chunk-BROSGYL3.mjs';import {a}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon,MinusIcon}from'@baseline-ui/icons/12';import P from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var y=({label:r,...c})=>{let{isSelected:t,isIndeterminate:e,isFocusVisible:n,isDisabled:s,isReadOnly:l,isHovered:a,isInvalid:k}=c;return jsxs(Fragment,{children:[jsxs("div",{className:c$1({isSelected:t&&!e,isIndeterminate:e,isFocusVisible:n,isDisabled:s,isReadOnly:l,hasError:k,isHovered:a}),children:[t&&!e?jsx(CheckmarkIcon,{size:12}):null,e?jsx(MinusIcon,{size:12}):null]}),r?jsx("span",{className:a$1({isDisabled:s}),children:r}):null]})},d=P.forwardRef(({className:r,style:c$1,label:t,labelPosition:e="end",slot:n,...s},l)=>jsx(c,{...s,className:a(b({labelPosition:e}),"BaselineUI-Checkbox",r),style:c$1,slot:n,ref:l,children:a=>jsx(y,{label:t,...a})}));d.displayName="Checkbox";export{d as a};
|
package/dist/chunk-PG3WDHSK.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-JQQGRJ5J.mjs';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var y=a({defaultClassName:"nrh1ehy _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z6f0 _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z611l"},hasError:{true:"_1yep5z610x"},labelPosition:{start:"nrh1eh11",top:"nrh1eh12"}},defaultVariants:{},compoundVariants:[]}),i="nrh1ehx _1yep5z6jb _1yep5z6jc _1yep5z6jd",n=a({defaultClassName:"nrh1ehm _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6ey _1yep5z6m3 _1yep5z6me _1yep5z6m6 _1yep5z6dy",variantClassNames:{isDisabled:{true:"nrh1ehn"},labelPosition:{top:"nrh1eho",start:"nrh1ehp"},isMultiLine:{true:"nrh1ehq"}},defaultVariants:{},compoundVariants:[]}),z=a({defaultClassName:"nrh1ehr _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6m0",variantClassNames:{validationState:{valid:"nrh1ehs",error:"_1yep5z610x",warning:"_1yep5z6117"},isReadOnly:{true:"_1yep5z611s"},isMultiLine:{true:"_1yep5z6rd _1yep5z6re _1yep5z6rf _1yep5z616r _1yep5z616s _1yep5z616t"}},defaultVariants:{},compoundVariants:[]}),s="_1yep5z6ez _1yep5z6dy",_=a({defaultClassName:"nrh1eh3 _1yep5z6jb _1yep5z6jc _1yep5z6jd",variantClassNames:{labelPosition:{top:"_1yep5z6tp _1yep5z6tq _1yep5z6tr",start:"_1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6163 _1yep5z6164 _1yep5z6165"},hasMessage:{true:"nrh1eh6"}},defaultVariants:{},compoundVariants:[[{labelPosition:"start",hasMessage:false},"_1yep5z61tv _1yep5z61tw _1yep5z61tx"]]}),o=a({defaultClassName:"nrh1eh0 _1yep5z6m3",variantClassNames:{labelPosition:{top:"_1yep5z615r _1yep5z615s _1yep5z615t _1yep5z6163 _1yep5z6164 _1yep5z6165",start:"_1yep5z615r _1yep5z615s _1yep5z615t _1yep5z6160 _1yep5z6161 _1yep5z6162 _1yep5z617i _1yep5z617j _1yep5z617k _1yep5z6w1 _1yep5z6w2 _1yep5z6w3"}},defaultVariants:{},compoundVariants:[]}),l=a({defaultClassName:"nrh1eh7 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{validationState:{valid:"nrh1eh8",error:"_1yep5z613e",warning:"nrh1eha"},isHovered:{true:"nrh1ehb"},isFocused:{true:"_1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z6190 _1yep5z618y _1yep5z613w _1yep5z618r _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"nrh1ehd"},variant:{primary:"nrh1ehe",ghost:"nrh1ehf"},isReadOnly:{true:"_1yep5z6xm _1yep5z6xn _1yep5z6xo _1yep5z6ya _1yep5z6yb _1yep5z6yc _1yep5z6yy _1yep5z6yz _1yep5z6z0 _1yep5z6zm _1yep5z6zn _1yep5z6zo"},isMultiLine:{true:"nrh1ehh _1yep5z616c _1yep5z616d _1yep5z616e"}},defaultVariants:{},compoundVariants:[[{variant:"ghost",isHovered:true,isFocused:false,validationState:"valid"},"_1yep5z61qi _1yep5z61vh _1yep5z61vj"],[{variant:"ghost",isFocused:false,isHovered:false,validationState:"valid"},"_1yep5z61qu"],[{isHovered:true,validationState:"valid",isDisabled:false,isReadOnly:false,isFocused:false,variant:"primary"},"_1yep5z61qj"],[{isHovered:true,validationState:"warning",isDisabled:false,isReadOnly:false,isFocused:false},"_1yep5z61qj"],[{isReadOnly:true,variant:"primary",isFocused:false},"nrh1ehi"],[{isReadOnly:true,isFocused:true},"_1yep5z61jk _1yep5z61jl _1yep5z61jm _1yep5z61k8 _1yep5z61k9 _1yep5z61ka _1yep5z61kw _1yep5z61kx _1yep5z61ky _1yep5z61lk _1yep5z61ll _1yep5z61lm"],[{isHovered:true,isFocused:false,isDisabled:false,isReadOnly:false},"nrh1ehj"],[{isMultiLine:true,isReadOnly:true},"nrh1ehk"],[{isMultiLine:true,isDisabled:true},"nrh1ehl"]]});export{y as a,i as b,n as c,z as d,s as e,_ as f,o as g,l as h};
|
package/dist/chunk-PR3CD3UC.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./chunk-23WMOYTQ.mjs';import {a as a$4}from'./chunk-OVJT5F2R.mjs';import {c as c$2}from'./chunk-6DYTFYPO.mjs';import {a as a$3}from'./chunk-TAT552A5.mjs';import {l}from'./chunk-6Z3GYFG5.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import {CaretDownIcon}from'@baseline-ui/icons/12';import p from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var R=a({defaultClassName:"_1enn18vd _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),z=a({defaultClassName:"_1enn18v2 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z61f _1yep5z61g _1yep5z61h _1yep5z6dw _1yep5z6f1 _1yep5z6g9 _1yep5z6m6",variantClassNames:{allowsSorting:{true:"_1enn18v3"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"}},defaultVariants:{},compoundVariants:[]}),I=a({defaultClassName:"_1enn18vi _1yep5z6m8 _1yep5z6m7 _1yep5z6is _1yep5z6lq",variantClassNames:{isDropTarget:{true:"_1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),w=a({defaultClassName:"_1enn18v8 _1yep5z6m6 _1yep5z6lt _1yep5z6lq",variantClassNames:{isHovered:{true:"_1yep5z612t"},isSelected:{true:"_1yep5z612u"},isFocusVisible:{true:"_1yep5z614w _1yep5z618s _1yep5z618q _1yep5z618t"},isDisabled:{true:"_1enn18vc"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"_1enn18vf",variantClassNames:{sortDirection:{ascending:"_1enn18vg",descending:"_1enn18vh"}},defaultVariants:{},compoundVariants:[]}),B="_1enn18v5",E="_1enn18v0",H="_1enn18v1",S="_1enn18v6",h="_1enn18v7";var L=p.forwardRef(({className:e,style:r,...a},t)=>jsx(c,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,E,"BaselineUI-Table"),style:r,...a}));L.displayName="Table";var M=p.forwardRef(({className:e,style:r,...a},t)=>jsx(d,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,H,"BaselineUI-TableHeader"),style:r,...a}));M.displayName="TableHeader";var A=p.forwardRef(({className:e$1,style:r,children:a,...t},o)=>jsx(e,{ref:o,className:n=>a$1(typeof e$1=="function"?e$1(n):e$1,z({allowsSorting:n.allowsSorting,isFocusVisible:n.isFocusVisible}),"BaselineUI-Column"),style:r,...t,children:n=>jsxs(Fragment,{children:[typeof a=="function"?a(n):a,n.allowsSorting&&n.sortDirection?jsx(CaretDownIcon,{className:P({sortDirection:n.sortDirection}),"aria-hidden":"true"}):null]})}));A.displayName="Column";var V=p.forwardRef(({children:e,className:r,dependencies:a,isLoading:t,items:o,onLoadMore:n,scrollOffset:U,loadingLabel:k,style:q,...j},K)=>{let{formatMessage:G}=b();return process.env.NODE_ENV!=="production"&&t&&!n&&console.warn("[Baseline UI] TableBody: `isLoading` is set but `onLoadMore` is not provided. The loading spinner will not be displayed. Either provide `onLoadMore` or remove `isLoading`."),jsxs(f,{ref:K,className:J=>a$1(typeof r=="function"?r(J):r,B,"BaselineUI-TableBody"),style:q,...j,children:[o&&typeof e=="function"?jsx(l,{items:o,dependencies:a,children:e}):typeof e=="function"?null:e,n?jsx(i,{className:a$1(S,"BaselineUI-TableLoadMoreItem"),isLoading:t,onLoadMore:n,scrollOffset:U,children:t?jsx("div",{className:a$1(h,"BaselineUI-TableLoadMoreItemContent"),children:jsx(a$2,{"aria-label":k??G(W.loading),size:"sm"})}):null}):null]})});V.displayName="TableBody";var N=p.forwardRef(({className:e,style:r,...a},t)=>jsx(g,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,w({isHovered:o.isHovered,isSelected:o.isSelected,isFocusVisible:o.isFocusVisible,isDisabled:o.isDisabled}),"BaselineUI-Row"),style:r,...a}));N.displayName="Row";var F=p.forwardRef(({className:e,style:r,...a},t)=>jsx(h$1,{ref:t,className:o=>a$1(typeof e=="function"?e(o):e,R({isFocusVisible:o.isFocusVisible}),"BaselineUI-Cell"),style:r,...a}));F.displayName="Cell";var W=c$1({loading:{defaultMessage:"Loading",id:"bui.table.loading"}});function Y(e){let{scrollRef:r,...a}=e;return a$3({ref:r??{current:null},isDisabled:!r}),a$4({getItems:t=>[...t].map(o=>({"text/plain":String(o)})),renderDropIndicator(t){return jsx(c$2,{target:t,className:({isDropTarget:o})=>a$1(I({isDropTarget:o}),"BaselineUI-DropIndicator")})},...a})}export{L as a,M as b,A as c,V as d,N as e,F as f,Y as g};
|
package/dist/chunk-SBR5UAUY.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {useState,useRef}from'react';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function i(o,r){let[c,s]=useState(()=>{try{let t=window.localStorage.getItem(o);return t?JSON.parse(t):r}catch(t){return console.log(t),r}}),a=useRef(c);return [c,t=>{try{let e=typeof t=="function"?t(a.current):t;a.current=e,s(e),window.localStorage.setItem(o,JSON.stringify(e));}catch(e){console.log(e);}}]}export{i as a};
|
package/dist/chunk-SD43KVTU.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var w=e=>p(e)?e.document:E(e)?e:e?.ownerDocument??(typeof document<"u"?document:void 0),s=e=>w(e)?.defaultView??(typeof window<"u"?window:void 0);function f(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function p(e){return typeof e=="object"&&e!=null&&"window"in e&&e.window===e}function E(e){return f(e)&&e.nodeType===9}function a(e){return f(e)&&e.nodeType===11&&"host"in e}function y(e,t,n,o){if(n==null||e==null)return ()=>{};let r=Array.isArray(e)?e:[e];for(let l of r)l.addEventListener(t,n,o);return ()=>{for(let l of r)l.removeEventListener(t,n,o);}}function h(e,t,n,o){if(e==null)return ()=>{};let r=new Array,l=Array.isArray(e)?e:[e];for(let i of l){let d=i.style.getPropertyValue(t),m=i.style.getPropertyPriority(t);i.style.setProperty(t,n,o),r.unshift(()=>{d?i.style.setProperty(t,d,m):i.style.removeProperty(t);});}return ()=>{for(let i of r)i();}}var T=true;function u(){return T}function P(e,t){if(!e||!t)return false;let n=t;for(;n!=null;){if(n===e)return true;let o=n.assignedSlot;o?n=o:a(n)?n=n.host:n=n.parentNode;}return false}var L=(e=document)=>{let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function O(e){let t=e.target;if(t&&"shadowRoot"in t&&t.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return t}function c(e,t=document){if(typeof t.getElementById=="function"){let o=t.getElementById(e);if(o)return o}let n=t.children||[];for(let o of n){if(o.getAttribute&&o.getAttribute("id")===e)return o;if(o.shadowRoot){let l=c(e,o.shadowRoot);if(l)return l}let r=c(e,o);if(r)return r}return null}function A(e,t){if(t===null)return [];t=t??s(e);let n=[t];if(!e||e===t)return n;let o="getRootNode"in t?t.getRootNode():null,r=e.getRootNode()??null;for(;a(r)&&r!==o;)n.push(r),r=r.host.getRootNode();return n}function W(e){if(!e)return false;let t=e.getRootNode(),n=s(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return false;let o=t.activeElement;return o!=null&&e.contains(o)}export{w as a,s as b,f as c,a as d,y as e,h as f,u as g,P as h,L as i,O as j,c as k,A as l,W as m};
|
package/dist/chunk-SND4G3LM.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {b}from'./chunk-HZM2XZP4.mjs';import {c as c$1}from'./chunk-54ZKQAA3.mjs';import {I as I$1}from'./chunk-3TLWTZRL.mjs';import {a as a$1}from'./chunk-6GV3YWV7.mjs';import {a}from'./chunk-DIL5HL6K.mjs';import {a as a$5}from'./chunk-2BG2JLFC.mjs';import {a as a$4}from'./chunk-VDUFLHKK.mjs';import {d}from'./chunk-HH4VLTF3.mjs';import {a as a$3}from'./chunk-SVIYLH7R.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import J,{useMemo,useState,useEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var B="ujkypy0 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e",I="_1yep5z61sj _1yep5z61sk _1yep5z61sl _1yep5z61ih _1yep5z61ii _1yep5z61ij";var D=J.forwardRef(({className:n,style:s,items:t,optionsContainerClassName:c$2,label:o,icon:i,value:a$4,defaultValue:l,onChange:d,isDisabled:C,optionClassName:E,optionStyle:F,labelPosition:P="top","data-block-id":M,"data-block-class":v,shouldFocusWrap:K,tooltip:q=true,"aria-label":m,"aria-labelledby":y,"aria-describedby":H,"aria-details":L,...U},W)=>{let b$1=useMemo(()=>t.map(e=>({id:e.color,label:e.label})),[t]),z=e=>(t.find(f=>f.color===e)??t.find(f=>b(f.color,e)))?.color??e,k=c(),[h,A]=useState(!!a$4);return a$4&&!h&&A(true),useEffect(()=>{!o&&!m&&!y&&console.warn("ColorSwatchPicker: Please provide a label or aria-label for accessibility.");},[o,m,y]),jsxs(a,{...a$3(U),className:a$2("BaselineUI-ColorSwatchPicker",n),"data-block-id":M,"data-block-class":v,display:"flex",flexDirection:P==="top"?"column":"row",alignItems:P==="top"?"flex-start":"center",justifyContent:"space-between",gap:"md",style:s,ref:W,children:[i||o?jsxs(a,{display:"flex",alignItems:"center",gap:"md",children:[i?jsx(i,{"aria-hidden":"true",size:24,className:sprinkles({color:"icon.primary"})}):null,o?jsx(a$1,{id:k,type:"label",size:"sm",children:o}):null]}):null,jsx(c$1,{className:a$2(I,c$2),selectionMode:"single",items:b$1,orientation:"horizontal",defaultSelectedKeys:l?[z(l)]:void 0,disabledKeys:C?b$1.map(e=>e.id):void 0,isDisabled:C,selectedKeys:a$4?[z(a$4)]:h?[]:void 0,onSelectionChange:e=>{d?.([...e][0]);},optionClassName:E,optionStyle:F,renderOption:(...e)=>Z(...e,q),shouldFocusWrap:K,"aria-label":m,"aria-describedby":H,"aria-details":L,"aria-labelledby":o?k:y})]})});D.displayName="ColorSwatchPicker";var Z=({key:n,textValue:s},{isSelected:t,isFocusVisible:c,isDisabled:o,optionProps:i},a,l)=>{let{tooltipProps:d$1}=a$4({label:s,tooltip:l});return jsx(a$5,{...d$1,children:jsx(d,{children:jsx("li",{...i,"data-disabled":o||void 0,className:a$2(B,i.className),ref:a,children:jsx(I$1,{isFocusVisible:c,color:n,isSelected:t,"aria-label":s,isInteractive:true,isDisabled:o,tooltip:false})})})})};export{D as a};
|
package/dist/chunk-SZTFMBPY.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a}from'./chunk-PG3WDHSK.mjs';import {jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
function M({description:r,errorMessage:t,warningMessage:a}){return r?"description":t?"errorMessage":a?"warningMessage":null}function d({description:r,errorMessageProps:t,descriptionProps:a$1,warningMessage:o,warningMessageProps:g,errorMessage:c,labelPosition:i,isDisabled:e}){switch(M({description:r,errorMessage:c,warningMessage:o})){case "description":return jsx("div",{...a$1,className:a({isDisabled:e,labelPosition:i}),"aria-disabled":e,children:r});case "errorMessage":return jsx("div",{...t,className:a({hasError:true,labelPosition:i}),"aria-disabled":e,children:c});case "warningMessage":return jsx("div",{...g,className:a({isDisabled:e,labelPosition:i}),"aria-disabled":e,children:o});default:return null}}export{M as a,d as b};
|
package/dist/chunk-UCDGZFQ7.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-2JGVUCP5.mjs';import {a as a$6}from'./chunk-E3FP4B25.mjs';import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {CheckmarkIcon as CheckmarkIcon$1}from'@baseline-ui/icons/16';import {CheckmarkIcon}from'@baseline-ui/icons/20';import h from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var R="_1yep5z6jb _1yep5z6jc _1yep5z6jd",x=a({defaultClassName:"_9b1tml0",variantClassNames:{isSelected:{true:"_9b1tml1",false:"_9b1tml2"},isDisabled:{true:"z9nup82"},isHovered:{true:"_9b1tml4"},isFocusVisible:{true:"_9b1tml5"},isReadOnly:{true:"_9b1tml6"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isFocusVisible:true,isReadOnly:false},"_9b1tml7"],[{isSelected:true,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml8"],[{isSelected:false,isHovered:true,isDisabled:false,isReadOnly:false},"_9b1tml9"],[{isSelected:true,isDisabled:true},"_9b1tmla"],[{isSelected:true,isReadOnly:true},"_9b1tmlb"]]}),z=a({defaultClassName:"_9b1tmlf _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6ey _1yep5z6lq _1yep5z6e9",variantClassNames:{isSelected:{true:"_9b1tmlg"},size:{sm:"_9b1tmlh",md:"_9b1tmli"},isDisabled:{true:"_9b1tmlj"},isReadOnly:{true:"_1yep5z611h"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"_1yep5z61o6"],[{isSelected:true,isDisabled:true},"_1yep5z61o6"],[{isSelected:false,isDisabled:true},"_1yep5z61o4"]]}),C=a({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var N=h.forwardRef(({className:P,count:V,style:D,size:t="md",icon:H,"data-block-id":I,"data-block-class":O,...a},T)=>{let l={isRequired:false},j=H||(t==="md"?CheckmarkIcon:CheckmarkIcon$1);!a["aria-label"]&&!a["aria-labelledby"]&&console.warn("You must provide either an `aria-label` or `aria-labelledby` prop to the `Reaction` component.");let s=h.useRef(null),d=a$1({...a,...l}),{inputProps:F,isPressed:w,isDisabled:r,isReadOnly:i,isSelected:c$1}=a$2({...a,...l},d,s),{focusProps:M,isFocused:q,isFocusVisible:n}=a$3(),{hoverProps:A,isHovered:b$1}=a$4({isDisabled:r}),B=a$5({"data-block-id":I,"data-block-class":O,"data-focused":q,"data-focus-visible":n,"data-disabled":r,"data-hovered":b$1,"data-pressed":w,"data-selected":c$1});return jsxs("label",{ref:T,style:D,className:a$7(R,"BaselineUI-Reaction",P),...B,children:[jsx(b,{children:jsx("input",{...c(F,M),ref:s})}),jsxs("div",{...A,className:x({isSelected:c$1,isFocusVisible:n,isHovered:b$1,isReadOnly:i,isDisabled:r}),children:[jsx("div",{className:C({isDisabled:r,isReadOnly:i}),children:jsx(j,{size:t==="md"?20:16})}),jsx("div",{className:z({isSelected:d.isSelected,isDisabled:r,isReadOnly:i,size:t}),children:jsx(a$6,{value:V})})]})]})});N.displayName="Reaction";export{N as a};
|
package/dist/chunk-VQPEDDH6.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$4}from'./chunk-YLL2APKH.mjs';import {a as a$9}from'./chunk-TUY23KMK.mjs';import {a as a$8}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-DF2D7NE6.mjs';import {a as a$b}from'./chunk-Z73YU5ZQ.mjs';import {b as b$3,e as e$1}from'./chunk-VPVF5N62.mjs';import {b,c as c$1}from'./chunk-IDIZSV2Y.mjs';import {b as b$6}from'./chunk-INFMXVHD.mjs';import {a as a$3}from'./chunk-DIL5HL6K.mjs';import {a as a$6}from'./chunk-2OXYNLVN.mjs';import {a as a$2}from'./chunk-GMALMQWI.mjs';import {b as b$5}from'./chunk-N2XGJKZG.mjs';import {b as b$7,j as j$2}from'./chunk-MBRNO6IW.mjs';import {e}from'./chunk-TZGK36KC.mjs';import {a as a$5}from'./chunk-66CUIXA6.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,b as b$4}from'./chunk-3WKDIXCM.mjs';import {b as b$2,a as a$1}from'./chunk-ETM4MNG4.mjs';import {j as j$1,b as b$8,i,a as a$a,h}from'./chunk-SD43KVTU.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import k,{useState,useRef,useCallback,useMemo,useEffect,createElement}from'react';import {MoreIcon}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 Oe=0,O="UNSUPPORTED_IN_MENU";function ve(e){return useMemo(()=>k.Children.toArray(e).map(t=>{let o=t,a=`item${++Oe}`,r=w(o,b$7),u=Te(o),s,f;if(r){let m=w(r,j$2);a$5(m),s=Te(m),f=w(r,a$b).props.children;}else u?s=u:s=o;let{onPress:y,label:n,"aria-label":l,iconStart:p,isDisabled:v,icon:E}=s.props,d=n||l||O;a$5(typeof d=="string","ActionGroup children must have a string label");let b=`${a}-${d}`;return createElement(a$8,{...{key:b,onPress:y,textValue:d,"aria-label":l,icon:p||E,dialogContent:f,isDisabled:v},key:b},o)}),[e])}function w(e,t){if(t)for(let o of k.Children.toArray(e)){if(!k.isValidElement(o))continue;let a=o;if(a.type===t)return a;if(a.props.children){let r=w(a.props.children,t);if(r)return r}}}function Te(e){return w(e,b$6)||w(e,a$6)}var Ke=new Set(["text","search","password","tel","url"]);function N({props:e,ref:t}){let{toolbarProps:o}=a$9(e,t),a=o.onKeyDownCapture,{direction:r}=b$5(),u=r==="rtl",s=e.orientation??"horizontal",f=n=>{let l=t.current;if(!l)return;let p=i(a$a(l));if(!p||!h(l,p)||p.dataset.buiAvoidFocus!=="true")return;let v=Fe(l),E=v.indexOf(p);if(E===-1)return;let d=B({key:n,orientation:s,isRTL:u});if(!d)return;let b=E+d;for(;b>=0&&b<v.length;){let R=v[b];if(R.dataset.buiAvoidFocus!=="true"&&!R.matches('[disabled], [aria-disabled="true"]')){R.focus();return}b+=d;}},y=n=>{a?.(n),f(n.key);};return {toolbarProps:{...o,onKeyDownCapture:n=>{let l=j$1(n);(!Re(l)||s==="horizontal"&&Ee(n,l,s))&&y(n);},onKeyDown:n=>{let l=j$1(n);n.isDefaultPrevented()||!Re(l)||(n.key==="Tab"||s==="vertical"&&!Ue(l)&&Ee(n,l,s))&&y(n);}}}}function Ee(e,t,o){let{key:a}=e,{selectionStart:r,selectionEnd:u,value:s}=t;return !Ve(a,o)||e.nativeEvent.isComposing||r!==u||e.shiftKey||e.altKey||e.ctrlKey||e.metaKey?false:B({key:a,orientation:o,isRTL:b$8(t).getComputedStyle(t).direction==="rtl"})===-1?r===0:u===s.length}function Ve(e,t){return B({key:e,orientation:t,isRTL:false})!==null}function Ue(e){return e.hasAttribute("list")||e.getAttribute("role")==="combobox"}function B({key:e,orientation:t,isRTL:o}){return t==="vertical"?e==="ArrowUp"?-1:e==="ArrowDown"?1:null:e==="ArrowLeft"?o?1:-1:e==="ArrowRight"?o?-1:1:null}var We='button, [role="button"], input, [tabindex]';function Fe(e){let t=[],o=a=>{t.push(...a.querySelectorAll(We));for(let r of a.querySelectorAll("*"))r.shadowRoot&&o(r.shadowRoot);};return o(e),t}function Re(e){let t=e.tagName.toLowerCase();return t==="textarea"||t==="input"&&Ke.has(e.type)}var he="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m3 _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6lv",we={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var V=k.forwardRef(({className:e$2,style:t,children:o,collapsibleMenuProps:a$7,"data-block-id":r,"data-block-class":u,renderSpacer:s,onKeyDown:f,isSingleTabStop:y=true,moreLabel:n,"aria-controls":l,...p},v)=>{let{formatMessage:E}=b(),[d,b$4]=useState(),R=ve(o),m=b$1({...p,children:R}),g=a(v),z=useRef(null),[{visibleItems:W,isMeasuring:F},j$1]=b$2({visibleItems:m.collection.size,isMeasuring:false}),D=useCallback(()=>{let i=c=>{if(z.current&&g.current){let T=[...z.current.children],S=g.current.getBoundingClientRect().width,_e=c<m.collection.size,_=0,X=0;if(_e){let I=T.pop();I&&(_+=Ae(I,false,true));}for(let[I,He]of T.entries())if(_+=Ae(He,I===0,I===T.length-1),Math.round(_)<=Math.round(S))X++;else break;return X}return c};j$1(function*(){yield {visibleItems:m.collection.size,isMeasuring:true};let c=i(m.collection.size),T=c<m.collection.size&&c>0;yield {visibleItems:c,isMeasuring:T},T&&(yield {visibleItems:i(c),isMeasuring:false});});},[j$1,g,m.collection.size]),xe=useMemo(()=>({get current(){return g.current?.parentElement}}),[g]);e({ref:xe,onResize:D}),a$1(D,[m.collection,D]);let{toolbarProps:Ne}=N({props:{...p,isSingleTabStop:y},ref:g}),J=[...m.collection],ze=J.slice(0,W),A=J.slice(W).filter(i=>i.textValue!==O),De=A.length>0;useEffect(()=>{b$4(void 0);},[A.length]),useEffect(()=>{p.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[p.orientation]);let{keyboardProps:Se}=j({onKeyDown:f});return jsxs(a$2,{children:[jsx("div",{...c(Se,Ne),...l?{"aria-controls":l}:{},className:e$2,"data-block-id":r,"data-block-class":u,"data-collapse":true,style:{...t,flexBasis:F?"100%":void 0},ref:g,children:jsxs("div",{ref:z,className:he,children:[ze.map(i=>i.rendered),De?jsxs(Fragment,{children:[!F&&s?jsx(a$3,{flexGrow:1}):null,jsx(a$4,{placement:"bottom end",renderTrigger:({buttonProps:i,ref:c})=>jsx(a$6,{...i,size:"md",icon:MoreIcon,"aria-label":n??E($e.more),variant:"toolbar",ref:c,tooltip:true,"data-testid":"toolbar-overflow-button"}),...a$7,disabledKeys:A.filter(i=>i.props?.isDisabled).map(i=>i.key),items:A.map(i=>{let c=i.textValue||i["aria-label"];return a$5(c,"ActionItem must have a label"),{id:i.key,label:c,icon:i.props.icon}}),onAction:i=>{let c=m.collection.getItem(i);a$5(c,"Item not found");let{onPress:T,dialogContent:S}=c.props;T?.(),b$4(S);}})]}):null]})}),jsx(b$3,{isOpen:!!d,onOpenChange:i=>{i||b$4(void 0);},children:jsx(e$1,{enableDrawer:"auto",style:{zIndex:1e5},children:d?k.cloneElement(d,{inheritDrawer:true}):null})})]})});V.displayName="CollapsibleToolbar";function Ae(e,t,o){let r=b$8(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:Ce(r.marginLeft))+(o?0:Ce(r.marginRight))}function Ce(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var $e=c$1({more:{id:"bui.toolbar.more",defaultMessage:"More"}});var U=k.forwardRef(({className:e,style:t,isSingleTabStop:o=true,"data-block-id":a,"data-block-class":r,"aria-controls":u,onKeyDown:s,...f},y)=>{let n=k.useRef(null),{toolbarProps:l}=N({props:{...f,isSingleTabStop:o},ref:n}),{keyboardProps:p}=j({onKeyDown:s});return jsx("div",{...c(p,l),...u?{"aria-controls":u}:{},className:a$7(we[f.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":a,"data-block-class":r,ref:b$4(y,n),children:f.children})});U.displayName="WrappedToolbar";var Le=k.forwardRef((e,t)=>{let o=e.isCollapsible?V:U;return jsx(o,{...e,ref:t})});Le.displayName="Toolbar";export{Le as a};
|
package/dist/chunk-WQBA2P6W.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$1,b as b$1}from'./chunk-5ZC64ZG7.mjs';import {b as b$2}from'./chunk-SZTFMBPY.mjs';import {e,f,c,d,h as h$1,g}from'./chunk-PG3WDHSK.mjs';import {a as a$7}from'./chunk-JZXLV6JU.mjs';import {a as a$6}from'./chunk-2OXYNLVN.mjs';import {c as c$2}from'./chunk-4EAXDHSV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import {MinusIcon,PlusIcon}from'@baseline-ui/icons/8';import {ReadOnlyIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import M,{useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var h=a({defaultClassName:"_1lnwne1 z9nup81",variantClassNames:{isHoveredOrFocused:{true:"_1lnwne2"},isInteractive:{false:"z9nup82"}},defaultVariants:{},compoundVariants:[[{isHoveredOrFocused:true,isInteractive:true},"_1lnwne4"]]}),w="_1lnwne0";var P=M.forwardRef(({className:_,style:k,labelPosition:n="top",variant:H="primary",showStepper:L=true,...e$1},S)=>{let m=M.useRef(null),{locale:U}=b(),z=a$1({...e$1,locale:U}),{hoverProps:E,isHovered:t}=a$2({isDisabled:e$1.isDisabled}),{focusProps:A,isFocusVisible:V,isFocused:s}=a$3(),{labelProps:T,decrementButtonProps:W,inputProps:q,incrementButtonProps:G,groupProps:J,descriptionProps:K,errorMessageProps:Q}=b$1(e$1,z,m),d$1=useMemo(()=>e$1.isReadOnly?ReadOnlyIcon:e$1.isInvalid?ErrorCircleFilledIcon:null,[e$1.isInvalid,e$1.isReadOnly]),o=b$2({description:e$1.description,errorMessageProps:Q,descriptionProps:K,errorMessage:e$1.errorMessage,labelPosition:n,isDisabled:e$1.isDisabled}),X=a$4({"data-disabled":e$1.isDisabled,"data-readonly":e$1.isReadOnly,"data-hovered":t,"data-focused":s,"data-focus-visible":V,"data-invalid":e$1.isInvalid,"data-block-id":e$1["data-block-id"],"data-block-class":e$1["data-block-class"]});return jsxs("div",{style:k,className:a$5(g({labelPosition:n}),"BaselineUI-NumberInput",_),...X,ref:S,children:[e$1.label?jsxs("div",{className:f({labelPosition:n,hasMessage:!!o}),children:[jsx("label",{...T,className:e,children:e$1.label}),n==="start"&&o]}):null,jsxs("div",{className:a$5({[c$2]:e$1.isDisabled}),children:[jsxs("div",{...c$1(J,E),className:a$5(h$1({isHovered:t,isDisabled:!!e$1.isDisabled,isReadOnly:!!e$1.isReadOnly,validationState:e$1.isInvalid?"error":"valid",isFocused:s,variant:H}),{[w]:n==="start"},"BaselineUI-NumberInput-Container"),children:[jsx("input",{...c$1(q,A),ref:m,className:a$5("BaselineUI-NumberInput-Input",c({isDisabled:e$1.isDisabled,labelPosition:n}))}),d$1?jsx(d$1,{className:d({validationState:"error",isReadOnly:e$1.isReadOnly}),size:16}):null,L?jsxs("div",{className:h({isHoveredOrFocused:t||s,isInteractive:!e$1.isReadOnly&&!e$1.isDisabled}),children:[jsx(a$6,{variant:"secondary",size:"xxs",icon:MinusIcon,...W,className:"BaselineUI-NumberInput-DecrementButton",isExcludedFromRovingFocus:true}),jsx(a$7,{style:{height:16},orientation:"vertical"}),jsx(a$6,{variant:"secondary",size:"xxs",icon:PlusIcon,...G,className:"BaselineUI-NumberInput-DecrementButton BaselineUI-NumberInput-IncrementButton",isExcludedFromRovingFocus:true})]}):null]}),n==="top"&&o]})]})});P.displayName="NumberInput";export{P as a};
|
package/dist/chunk-XC2S3RLC.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-2JGVUCP5.mjs';import {a as a$1}from'./chunk-7SKQUEHP.mjs';import {a as a$7}from'./chunk-DIL5HL6K.mjs';import {b}from'./chunk-K5RYVERS.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-STMDFIUL.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {c}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import T 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 D=a({defaultClassName:"bpklwaa z9nup88",variantClassNames:{isReadOnly:{true:"bpklwab"},isDisabled:{true:"bpklwac"},isSelected:{true:"bpklwad"},isFocused:{true:"bpklwae"}},defaultVariants:{},compoundVariants:[[{isSelected:true,isDisabled:false,isReadOnly:false},"bpklwaf"]]}),R=a({defaultClassName:"bpklwal",variantClassNames:{isDisabled:{true:"bpklwam"},isSelected:{true:"bpklwan"},isReadOnly:{true:"bpklwao"}},defaultVariants:{},compoundVariants:[]}),P=a({defaultClassName:"bpklwag",variantClassNames:{isDisabled:{true:"bpklwah"}},defaultVariants:{},compoundVariants:[]}),B=a({defaultClassName:"bpklwa0",variantClassNames:{labelPosition:{top:"bpklwa1",left:"bpklwa2"},hasDescription:{true:"bpklwa3"}},defaultVariants:{},compoundVariants:[[{labelPosition:"left",hasDescription:true},"bpklwa4"]]}),I=a({defaultClassName:"bpklwa8",variantClassNames:{isDisabled:{true:"bpklwa9"}},defaultVariants:{},compoundVariants:[]}),L=a({defaultClassName:"bpklwai",variantClassNames:{labelPosition:{top:"bpklwaj",left:"bpklwak"}},defaultVariants:{},compoundVariants:[]}),O=a({defaultClassName:"bpklwa5",variantClassNames:{labelPosition:{top:"bpklwa6",left:"bpklwa7"}},defaultVariants:{},compoundVariants:[]});var H=T.forwardRef(({className:U,description:s,label:o,labelPosition:d="top",statusLabel:r,style:F,"data-block-id":E,"data-block-class":K,...a},j)=>{let w=T.useRef(null),f=c(),k=c(),t=a$1(a),n=!!a.isDisabled,p=!!s&&!!o&&!a["aria-label"]&&!a["aria-labelledby"],z=p?[f,r&&k].filter(Boolean).join(" "):a["aria-labelledby"],{inputProps:M,isPressed:W,labelProps:_,descriptionProps:A}=a$2({...a,children:o,"aria-labelledby":z},t,w),{isFocusVisible:c$2,focusProps:X}=a$3(),{hoverProps:q,isHovered:G}=a$4({isDisabled:a.isDisabled}),J=a$5({"data-block-id":E,"data-block-class":K,"data-focused":c$2,"data-disabled":a.isDisabled,"data-focus-visible":c$2,"data-selected":t.isSelected,"data-readonly":a.isReadOnly,"data-hovered":G,"data-pressed":W}),h=jsx("div",{className:a$6(D({isSelected:t.isSelected,isDisabled:n,isFocused:c$2,isReadOnly:!!a.isReadOnly}),"BaselineUI-Switch-Track"),children:jsx("div",{className:a$6(R({isSelected:t.isSelected,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly}),"BaselineUI-Switch-Knob"),"data-testid":"switch-knob"})}),v=o?jsx("span",{id:p?f:void 0,className:a$6(P({isDisabled:n}),"BaselineUI-Switch-Label"),children:o}):null;return jsxs("label",{...c$1(J,_,q),className:a$6(B({labelPosition:d,hasDescription:!!s}),"BaselineUI-Switch",U),style:F,ref:j,children:[s?jsxs("span",{className:L({labelPosition:d}),children:[v,jsx(a$7,{...A,elementType:"span",className:"BaselineUI-Switch-Description",color:n?"text.interactive.disabled":"text.helper",typography:"label.sm.medium",children:s})]}):v,jsx(b,{children:jsx("input",{...c$1(M,X),ref:w})}),r?jsxs("div",{className:O({labelPosition:d}),children:[jsx("span",{id:p?k:void 0,className:a$6("BaselineUI-Switch-Status-Label",I({isDisabled:n})),children:t.isSelected?r.on:r.off}),h]}):h]})});H.displayName="Switch";export{H as a};
|
package/dist/chunk-XWKTG7NR.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {c as c$1}from'./chunk-RO5ZRU3Y.mjs';import {a as a$6}from'./chunk-2OXYNLVN.mjs';import {a as a$3}from'./chunk-66CUIXA6.mjs';import {a as a$4}from'./chunk-RSKKEGJZ.mjs';import {a as a$1}from'./chunk-STMDFIUL.mjs';import {a as a$2}from'./chunk-B3EZOXNU.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$5}from'./chunk-ETM4MNG4.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {TrashIcon}from'@baseline-ui/icons/16';import*as V from'dompurify';import F from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var N="_1vm2oh49 _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6gc",o="_1vm2oh48 _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6kk _1yep5z6kl _1yep5z6km",j=a({defaultClassName:"_1vm2oh40 mnnh5s1 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6m9 _1yep5z6m7 _1yep5z6is _1yep5z6ma _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6lq _1yep5z6m5 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{accent:{theme:"_1vm2oh41",positive:"_1vm2oh42"},isInline:{true:"mnnh5s2 _1yep5z6x1 _1yep5z6x2 _1yep5z6x3 _1yep5z6xp _1yep5z6xq _1yep5z6xr _1yep5z6yd _1yep5z6ye _1yep5z6yf _1yep5z6z1 _1yep5z6z2 _1yep5z6z3 _1yep5z613z _1yep5z618y _1yep5z6190",false:"_1yep5z6135"},isFocusVisible:{true:"_1yep5z614b _1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"mnnh5s8 z9nup82 _1yep5z6zt"},isHovered:{true:"_1vm2oh47"}},defaultVariants:{},compoundVariants:[[{accent:"positive",isInline:true},"_1yep5z61pm"],[{accent:"theme",isInline:true},"_1yep5z61pb"],[{accent:"positive",isInline:false},"_1yep5z61po"],[{accent:"theme",isInline:false},"_1yep5z61pd"],[{isFocusVisible:true,isInline:true},"_1yep5z61rf _1yep5z61v9 _1yep5z61vb _1yep5z61vc"],[{isHovered:true,isInline:true},"_1yep5z61vc _1yep5z61rf _1yep5z61v9 _1yep5z61vb"],[{isHovered:true,isInline:false,accent:"positive"},"_1yep5z61pn"],[{isHovered:true,isInline:false,accent:"theme"},"_1yep5z61pf"],[{isHovered:true,isInline:true,accent:"theme"},"_1yep5z61pc"]]});var B=F.forwardRef(({className:R,style:T,isDisabled:e,isInline:a=true,imageAlt:y,imageSrc:p,svgSrc:t,textValue:r,textStyle:q,onPress:E,onDelete:n,deleteAriaLabel:M,addAriaLabel:z,accent:L="positive","data-block-id":U,"data-block-class":Y,..._},A)=>{let{focusProps:m,isFocused:G,isFocusVisible:l}=a$1({within:true}),{isHovered:u,hoverProps:v}=a$2({isDisabled:e}),{pressProps:c$2}=d({isDisabled:e,onPress:E});a$3(p||t||r,"Preview must have content. You must provide either an `imageSrc`, `svgSrc`, or `textValue` prop.");let f=a$4({"data-hovered":u,"data-focus-visible":l,"data-focused":G,"data-disabled":e}),[J,K]=F.useState("");return a$5(()=>{K(typeof t=="string"?V.default.sanitize(t):"");},[t]),jsxs("div",{..._,className:a$7(j({isInline:a,isFocusVisible:l,isDisabled:e,isHovered:u,accent:L}),"BaselineUI-Preview",R),"data-block-id":U,"data-block-class":Y,"aria-label":_["aria-label"]||y||r,style:T,ref:A,children:[typeof t=="string"?jsx("button",{disabled:e,...c(v,m,c$2,f),className:o,"aria-label":z,dangerouslySetInnerHTML:{__html:J}}):jsxs("button",{...c(v,m,c$2,f),disabled:e,style:q,"aria-label":z,className:o,children:[p?jsx("img",{src:p,alt:y,className:c$1({isInline:a,isDisabled:e})}):null,!!t&&typeof t=="object"&&t,r]}),n?jsx(a$6,{isDisabled:e,className:N,"aria-label":M,size:"xs",icon:TrashIcon,onPress:n}):null]})});B.displayName="Preview";export{B as a};
|
package/dist/chunk-YLL2APKH.mjs
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {j,l,m,k,o,i,h}from'./chunk-3IPRT57V.mjs';import {a as a$3}from'./chunk-Z73YU5ZQ.mjs';import {a as a$2}from'./chunk-KCHAWPUN.mjs';import {b}from'./chunk-INFMXVHD.mjs';import {a}from'./chunk-BA5OA5DY.mjs';import {e}from'./chunk-RINS2TBF.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import z,{useEffect,useContext}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
-
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
-
*
|
|
4
|
-
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
-
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
-
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
-
* This notice may not be removed from this file.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
var D="xyd2ss0 _1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z6sa _1yep5z6sb _1yep5z6sc _1yep5z6um _1yep5z6un _1yep5z6uo _1yep5z6vs _1yep5z6vt _1yep5z6vu _1yep5z6tg _1yep5z6th _1yep5z6ti _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z618r _1yep5z618q _1yep5z614z _1yep5z618u _1yep5z612s";var P=e=>e!=null&&typeof e=="object"&&!(Symbol.iterator in e);function G(e,o,r){let t=P(o)||P(r),i=o!=null&&!P(o)||r!=null&&!P(r);return e&&i?"Menu: an object `selectionMode` expects `selectedKeys`/`defaultSelectedKeys` to be records keyed by section id.":!e&&t?"Menu: a per-section `selectedKeys`/`defaultSelectedKeys` record requires the object form of `selectionMode`.":null}var Q=z.forwardRef(({defaultOpen:e,onOpenChange:o,isOpen:r,isDisabled:t,contentClassName:i,trigger:l$1,placement:a$3="bottom start",isNonModal:c,shouldFlip:n,shouldUpdatePosition:M,boundaryElement:p,boundaryAxis:d,horizontalBoundaryBehavior:x,crossOffset:Z,offset:$,triggerLabel:_,renderTrigger:b$1=({buttonProps:m,ref:y})=>jsx(b,{...m,variant:"popover",ref:y,"data-testid":"menu-trigger"}),portalContainer:ee,selectionMode:u,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:I,disabledKeys:h,disallowEmptySelection:K,itemClassName:C,optionClassName:R,optionStyle:oe,renderOption:re,...w},te)=>{let m=a(ee),y=u!=null&&typeof u=="object",N=z.useMemo(()=>h==null?void 0:new Set(h),[h]),ne=z.useMemo(()=>C?(se,ie)=>a$1(C,a$2(R,se,ie)):R,[C,R]),k=G(y,v,S);if(k)throw new Error(k);return useEffect(()=>{!_&&!b$1&&console.warn("The `triggerLabel` prop is required when no `renderTrigger` or `children` is provided.");},[b$1,_]),jsxs(j,{defaultOpen:e,onOpenChange:o,isOpen:r,trigger:l$1==="longPress"&&!t?"longPress":"press",children:[jsx(W,{isDisabled:t,renderTrigger:b$1,triggerLabel:_}),jsx(X,{placement:a$3,isNonModal:c,shouldFlip:n,shouldUpdatePosition:M,boundaryElement:p,boundaryAxis:d,horizontalBoundaryBehavior:x,crossOffset:Z,offset:$||2,className:"BaselineUI-Menu-Popover",portalContainer:m,children:jsx(l,{...w,disabledKeys:N,...y?{}:{selectionMode:u,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:I,disallowEmptySelection:K},className:a$1(D,i),ref:te,children:V(w.items,m,{onAction:w.onAction,disabledKeys:N,contentClassName:i,optionClassName:ne,optionStyle:oe,renderOption:re,selection:y?{modes:u,selectedKeys:v,defaultSelectedKeys:S,onSelectionChange:I,disallowEmptySelection:K}:void 0})})})]})});function V(e,o$1,r){let{onAction:t,disabledKeys:i,contentClassName:l$1,selection:a,...c}=r;return e.map((n,M)=>{if("children"in n){let p=n,d=a?.modes[p.id];return jsx(m,{section:p,componentName:"Menu",isFirstCollectionItem:M===0,showSectionHeader:!!p.title,...c,...d?{selectionMode:d,selectedKeys:a?.selectedKeys?.[p.id],defaultSelectedKeys:a?.defaultSelectedKeys?.[p.id],disabledKeys:i,disallowEmptySelection:a?.disallowEmptySelection,onSelectionChange:x=>{a?.onSelectionChange?.(x,{sectionId:p.id});}}:{}},p.id)}return n.items?jsxs(k,{children:[jsx(o,{item:n,componentName:"Menu",...c}),jsx(X,{className:"BaselineUI-Menu-SubmenuPopover",portalContainer:o$1,children:jsx(l,{className:a$1(D,l$1),onAction:t,disabledKeys:i,children:V(n.items,o$1,r)})})]},n.id):jsx(o,{item:n,componentName:"Menu",...c},n.id)})}var W=z.forwardRef(({renderTrigger:e,triggerLabel:o,isDisabled:r,...t},i$1)=>{let l=useContext(i);return e?.({buttonProps:{...t,isDisabled:r,label:typeof o=="function"?o(l?.isOpen||false):o,isOpen:l?.isOpen||false,className:"BaselineUI-Menu-Trigger"},ref:i$1})});W.displayName="MyTrigger";var X=({children:e$1,...o})=>{let r=useContext(i),[t]=e(o,void 0,h);return r?.isOpen?jsx(a$3,{...t,state:r,children:e$1}):null};Q.displayName="Menu";export{Q as a};
|