@baseline-ui/core 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.css +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/Avatar.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/Code.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.css +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.css +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.css +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.css +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +2 -2
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Markdown.mjs +1 -1
- package/dist/Menu.css +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/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/Separator.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/StatusCard.mjs +1 -1
- package/dist/Stepper.mjs +1 -1
- package/dist/Switch.mjs +1 -1
- package/dist/Table.mjs +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.css +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.css +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-XJGQXVMR.mjs → chunk-2BXXD6SW.mjs} +2 -2
- package/dist/{chunk-NCADIC3I.mjs → chunk-2EMOQIU7.mjs} +2 -2
- package/dist/{chunk-4FTKS25Q.mjs → chunk-2TH2QRSV.mjs} +2 -2
- package/dist/{chunk-JB3O4ABN.mjs → chunk-2V323KAD.mjs} +1 -1
- package/dist/{chunk-42B24XCP.mjs → chunk-2YTKLY4F.mjs} +1 -1
- package/dist/{chunk-PJM4COF5.mjs → chunk-4C6AJ3TZ.mjs} +2 -2
- package/dist/{chunk-NPJX2CEI.mjs → chunk-5HK56IXH.mjs} +1 -1
- package/dist/chunk-5IXSPQRW.mjs +10 -0
- package/dist/{chunk-IDEAEEBP.mjs → chunk-5K46OAX5.mjs} +2 -2
- package/dist/chunk-5MUEJ5WI.mjs +10 -0
- package/dist/chunk-6EFNC443.mjs +10 -0
- package/dist/{chunk-F6JQN7YM.mjs → chunk-6JWACCHG.mjs} +2 -2
- package/dist/{chunk-XVBOKL6D.mjs → chunk-6NQPENP4.mjs} +1 -1
- package/dist/{chunk-YT36W3OS.mjs → chunk-6PXOVWVM.mjs} +2 -2
- package/dist/chunk-6V7BIFQD.mjs +10 -0
- package/dist/chunk-6VXBFM6Q.mjs +10 -0
- package/dist/{chunk-4BYKAG4W.mjs → chunk-7L5UOGZA.mjs} +1 -1
- package/dist/{chunk-DF3BVX5Z.mjs → chunk-7MQBBSZ2.mjs} +2 -2
- package/dist/{chunk-O66FNQSB.mjs → chunk-7P322KP4.mjs} +1 -1
- package/dist/{chunk-UCZZLAPB.mjs → chunk-AW5WDI2U.mjs} +1 -1
- package/dist/chunk-AYBACQ6U.mjs +10 -0
- package/dist/chunk-B237CJT4.mjs +10 -0
- package/dist/{chunk-PBFIKNYZ.mjs → chunk-B6U6JHD4.mjs} +1 -1
- package/dist/{chunk-VHDXSFQC.mjs → chunk-BBZ2I3RF.mjs} +2 -2
- package/dist/chunk-BCENUHNO.mjs +10 -0
- package/dist/{chunk-DXP33KAB.mjs → chunk-BGHBSM3K.mjs} +2 -2
- package/dist/chunk-BIDNNBRG.mjs +10 -0
- package/dist/chunk-BROSGYL3.mjs +10 -0
- package/dist/{chunk-BW4VAHXR.mjs → chunk-C7AUJO36.mjs} +2 -2
- package/dist/{chunk-THRAJMLX.mjs → chunk-CCA2ABXO.mjs} +2 -2
- package/dist/{chunk-N7MTFSWR.mjs → chunk-CUOTJ7AP.mjs} +2 -2
- package/dist/chunk-CYTHB4M4.mjs +10 -0
- package/dist/chunk-DDLZ6CKC.mjs +10 -0
- package/dist/chunk-DMJHCNBU.mjs +10 -0
- package/dist/{chunk-HFVJXZBG.mjs → chunk-E3DMXJIC.mjs} +2 -2
- package/dist/{chunk-KG5PDPBK.mjs → chunk-E3QDPL77.mjs} +2 -2
- package/dist/chunk-E5GYCA3P.mjs +10 -0
- package/dist/{chunk-LQMY6TXS.mjs → chunk-EGXILQNX.mjs} +1 -1
- package/dist/{chunk-75722G3R.mjs → chunk-EYKIXVM3.mjs} +2 -2
- package/dist/{chunk-XB657BXX.mjs → chunk-GI2O6H4I.mjs} +1 -1
- package/dist/chunk-GVI6EBGJ.mjs +10 -0
- package/dist/chunk-HK3CZVHY.mjs +10 -0
- package/dist/{chunk-WSCZ34XO.mjs → chunk-HVKYWSRF.mjs} +2 -2
- package/dist/chunk-ILAQFMYD.mjs +10 -0
- package/dist/chunk-ITWJSFYK.mjs +10 -0
- package/dist/{chunk-MFH2E2GU.mjs → chunk-IVC2BJRU.mjs} +1 -1
- package/dist/{chunk-TEQE6WCH.mjs → chunk-IXK6S6IH.mjs} +1 -1
- package/dist/{chunk-HXTAOYOD.mjs → chunk-IXRSSEHQ.mjs} +1 -1
- package/dist/{chunk-5ODZPQL2.mjs → chunk-JDIGAVFU.mjs} +2 -2
- package/dist/{chunk-C5P23FUW.mjs → chunk-K6HE4Z2Y.mjs} +1 -1
- package/dist/chunk-K73R5G6G.mjs +10 -0
- package/dist/chunk-KEAM6GSA.mjs +10 -0
- package/dist/{chunk-JBMVWRHN.mjs → chunk-KHOXLBPR.mjs} +2 -2
- package/dist/{chunk-5DOFIGHJ.mjs → chunk-KWHTLY23.mjs} +2 -2
- package/dist/{chunk-4NYPVKDO.mjs → chunk-L6S5GBKS.mjs} +2 -2
- package/dist/chunk-M7OLZJYB.mjs +10 -0
- package/dist/{chunk-VXB5SVQC.mjs → chunk-MAJ74VNE.mjs} +1 -1
- package/dist/{chunk-TDOAVBKD.mjs → chunk-MONDDKB4.mjs} +2 -2
- package/dist/chunk-N26C7NYZ.mjs +10 -0
- package/dist/{chunk-P5GO3XIS.mjs → chunk-N6VKP3UH.mjs} +1 -1
- package/dist/chunk-NADBGP35.mjs +10 -0
- package/dist/chunk-NMSOOQB2.mjs +10 -0
- package/dist/{chunk-ENDOKA57.mjs → chunk-NQO6OQT6.mjs} +1 -1
- package/dist/{chunk-246VHB32.mjs → chunk-NUYBQ7KP.mjs} +1 -1
- package/dist/{chunk-77BAFSDX.mjs → chunk-NZQVKNP4.mjs} +2 -2
- package/dist/{chunk-K3S22PMF.mjs → chunk-P37WUXAI.mjs} +2 -2
- package/dist/{chunk-T3AMYEKR.mjs → chunk-P5LSMA24.mjs} +3 -3
- package/dist/{chunk-CSPZMYVG.mjs → chunk-PA3THES4.mjs} +1 -1
- package/dist/chunk-PG3WDHSK.mjs +10 -0
- package/dist/{chunk-GZ5ZWXIC.mjs → chunk-PNBYTIUO.mjs} +1 -1
- package/dist/{chunk-7HZ5JFYX.mjs → chunk-QDQPVCXN.mjs} +2 -2
- package/dist/{chunk-MXKP7NQ4.mjs → chunk-QSSCSN5S.mjs} +1 -1
- package/dist/chunk-QXOG2ISL.mjs +10 -0
- package/dist/{chunk-EV24JU64.mjs → chunk-QYTY3KJR.mjs} +2 -2
- package/dist/{chunk-3CWP2VCB.mjs → chunk-R2OV7FJO.mjs} +2 -2
- package/dist/{chunk-HLDCVJXD.mjs → chunk-RILRXWGE.mjs} +1 -1
- package/dist/{chunk-WOVAT6U4.mjs → chunk-RJZZIVSY.mjs} +2 -2
- package/dist/chunk-RO5ZRU3Y.mjs +10 -0
- package/dist/chunk-RSTHM3ZF.mjs +10 -0
- package/dist/{chunk-FTYXFTJV.mjs → chunk-SBR5UAUY.mjs} +2 -2
- package/dist/chunk-SHJ2TJYG.mjs +10 -0
- package/dist/{chunk-DRIHXAP3.mjs → chunk-SYFSGF73.mjs} +2 -2
- package/dist/{chunk-J7EAQSKX.mjs → chunk-SZTFMBPY.mjs} +1 -1
- package/dist/chunk-T4R3EXGI.mjs +10 -0
- package/dist/{chunk-WXWGGDTG.mjs → chunk-TBCZKWGQ.mjs} +2 -2
- package/dist/{chunk-JJPCZOOI.mjs → chunk-TCCQDGMI.mjs} +1 -1
- package/dist/{chunk-IHLJTHGQ.mjs → chunk-TDYBXLYP.mjs} +1 -1
- package/dist/{chunk-MI7DCFP2.mjs → chunk-TTYRHIRQ.mjs} +1 -1
- package/dist/{chunk-OC42IZG2.mjs → chunk-UBFMOTBM.mjs} +2 -2
- package/dist/chunk-UCPPKNGF.mjs +10 -0
- package/dist/{chunk-EK3RIYMV.mjs → chunk-UEDBY5JI.mjs} +1 -1
- package/dist/{chunk-ECPG4S5O.mjs → chunk-UN7XC7QV.mjs} +2 -2
- package/dist/{chunk-JUXBZ2ZN.mjs → chunk-UT2I4K7L.mjs} +1 -1
- package/dist/{chunk-J7K7I5U2.mjs → chunk-V37GPPZD.mjs} +1 -1
- package/dist/chunk-VAFIUM63.mjs +29 -0
- package/dist/{chunk-KKJ6XIU3.mjs → chunk-VIVNQZYK.mjs} +2 -2
- package/dist/{chunk-2JANDORZ.mjs → chunk-VOSSQAHC.mjs} +1 -1
- package/dist/chunk-VZFS4QRW.mjs +10 -0
- package/dist/chunk-X5Z54UUE.mjs +10 -0
- package/dist/{chunk-RJWPSJX2.mjs → chunk-X6IJEPSH.mjs} +1 -1
- package/dist/{chunk-7GJMJTRL.mjs → chunk-XEGXSFIP.mjs} +1 -1
- package/dist/{chunk-JQ4ZGZPV.mjs → chunk-XF5UMU6D.mjs} +3 -3
- package/dist/{chunk-5YYWD7PK.mjs → chunk-XJ2DFV56.mjs} +1 -1
- package/dist/{chunk-NSC53QWT.mjs → chunk-XUJJMAKM.mjs} +1 -1
- package/dist/{chunk-U2ODAIZG.mjs → chunk-XZSDCUID.mjs} +1 -1
- package/dist/{chunk-RF4E6MLM.mjs → chunk-Y3YZMICA.mjs} +1 -1
- package/dist/{chunk-TO6OQF2Y.mjs → chunk-YKMSINHH.mjs} +2 -2
- package/dist/{chunk-X3NOIEDZ.mjs → chunk-YWCU4PP7.mjs} +2 -2
- package/dist/chunk-YWQXHVMW.mjs +10 -0
- package/dist/{chunk-FOEGHU3P.mjs → chunk-YX2ASVM3.mjs} +1 -1
- package/dist/{chunk-N4UAXVES.mjs → chunk-Z4HTFTPM.mjs} +2 -2
- package/dist/chunk-ZLZAFTSD.mjs +10 -0
- package/dist/hooks/useContainerScopedRef.mjs +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.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/hooks/useUndoRedo.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +46 -31
- package/dist/index.js +19 -19
- package/dist/index.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 +6 -6
- package/sbom.json +27 -77
- package/dist/chunk-26T2EPFD.mjs +0 -29
- package/dist/chunk-2WAKHFPS.mjs +0 -10
- package/dist/chunk-3NQY5GPQ.mjs +0 -10
- package/dist/chunk-44OUOGJ4.mjs +0 -10
- package/dist/chunk-4N6CLPAY.mjs +0 -10
- package/dist/chunk-5PIO6M4F.mjs +0 -10
- package/dist/chunk-5ULL6IBX.mjs +0 -10
- package/dist/chunk-6IRWW75G.mjs +0 -10
- package/dist/chunk-6ZFBX7C7.mjs +0 -10
- package/dist/chunk-AMQX3KZR.mjs +0 -10
- package/dist/chunk-AZRPXTYJ.mjs +0 -10
- package/dist/chunk-BKDQLDOK.mjs +0 -10
- package/dist/chunk-BXSJTXXY.mjs +0 -10
- package/dist/chunk-CIIO5D3X.mjs +0 -10
- package/dist/chunk-E6VOSF6Z.mjs +0 -10
- package/dist/chunk-ELXWR5TS.mjs +0 -10
- package/dist/chunk-FJ2JRD3H.mjs +0 -10
- package/dist/chunk-HWUESZY2.mjs +0 -10
- package/dist/chunk-I4WMXV4T.mjs +0 -10
- package/dist/chunk-IW4GXU75.mjs +0 -10
- package/dist/chunk-J3MJZQUJ.mjs +0 -10
- package/dist/chunk-J6TYT6BF.mjs +0 -10
- package/dist/chunk-K4N7GVEI.mjs +0 -10
- package/dist/chunk-L452ID76.mjs +0 -10
- package/dist/chunk-LLAMYDGW.mjs +0 -10
- package/dist/chunk-LLVFPC5Q.mjs +0 -10
- package/dist/chunk-NHD7I3X2.mjs +0 -10
- package/dist/chunk-PF3OQKXP.mjs +0 -10
- package/dist/chunk-QY3O34WX.mjs +0 -10
- package/dist/chunk-ROHLZINC.mjs +0 -10
- package/dist/chunk-TIHKHXTS.mjs +0 -10
- package/dist/chunk-UVVONIZB.mjs +0 -10
- package/dist/chunk-WC2NUASA.mjs +0 -10
- package/dist/chunk-WDJ4GXWF.mjs +0 -10
- package/dist/chunk-Y45SV547.mjs +0 -10
- package/dist/chunk-YVYMYKYN.mjs +0 -10
- package/dist/chunk-ZREX7XOO.mjs +0 -10
- /package/dist/{chunk-EZXMEGV7.mjs → chunk-G6VX4SU6.mjs} +0 -0
- /package/dist/{chunk-FXCHST4Z.mjs → chunk-JQQGRJ5J.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-EYKIXVM3.mjs';import {b as b$2}from'./chunk-AC7OXVHA.mjs';import {c,b}from'./chunk-GX2IOGYR.mjs';import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-2V323KAD.mjs';import {b as b$1}from'./chunk-4ZJMZB5B.mjs';import {g}from'./chunk-AUOQSTS5.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MinusIcon}from'@baseline-ui/icons/12';import {AttachmentsIcon,ErrorCircleFilledIcon}from'@baseline-ui/icons/16';import {sprinkles}from'@baseline-ui/tokens';import d from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$3}from'./chunk-YCI6BEXQ.mjs';import {q}from'./chunk-75722G3R.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var T="_1x35j5g0
|
|
10
|
+
var T="_1x35j5g0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3 _1yep5z6m6",P=a({defaultClassName:"_1x35j5g1 _1yep5z68f _1yep5z68g _1yep5z68h _1yep5z663 _1yep5z664 _1yep5z665 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m6",variantClassNames:{isFocusVisible:{true:"_1x35j5g2"},isError:{true:"_1x35j5g3"},isDisabled:{true:"_1x35j5g4"}},defaultVariants:{},compoundVariants:[]}),D="_1x35j5g5 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m3",V=a({defaultClassName:"_1x35j5g7 _1yep5z6dy _1yep5z6ey",variantClassNames:{isLoading:{true:"_1yep5z611j"}},defaultVariants:{},compoundVariants:[]}),S="_1yep5z64r _1yep5z64s _1yep5z64t _1yep5z673 _1yep5z674 _1yep5z675 _1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",H="_1x35j5g6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jw _1yep5z6jx _1yep5z6jy _1yep5z6kt _1yep5z6ku _1yep5z6kv";var Q=sprinkles({color:"icon.secondary"}),W=sprinkles({color:"support.error.medium"});function X({item:e,isFocusVisible:x,isDisabled:i,onRemove:t,loadingLabel:a,removeHintLabel:s}){let{formatMessage:y}=b(),n=!!e.isLoading,l=!!(e.errorMessage||e.errorExplanation),b$3=!i&&!n&&!!t,c=(typeof a=="function"?a({fileName:e.name}):a)??y(A.loading,{fileName:e.name}),m=e.name;return n?m=c:b$3&&(m=(typeof s=="function"?s({fileName:e.name}):s)??y(A.removeHint,{fileName:e.name})),jsxs("div",{className:P({isDisabled:i,isFocusVisible:x,isError:l}),"data-error":l||void 0,children:[jsx(b$1,{children:jsx(b$2,{slot:"label",children:m})}),jsxs("div",{className:D,children:[jsx(AttachmentsIcon,{width:16,height:16,className:Q}),jsx("span",{className:H,children:jsx("span",{className:V({isLoading:n}),title:e.name,children:e.name})}),jsxs(a$1,{elementType:"span",display:"flex",alignItems:"center",gap:"xs",flexShrink:0,children:[l?jsx(ErrorCircleFilledIcon,{width:16,height:16,className:W}):null,n?jsx(a$3,{size:"sm",className:S,"aria-label":c}):t?jsx(a$4,{icon:MinusIcon,size:"xs",variant:"secondary",excludeFromTabOrder:true,preventFocusOnPress:true,isDisabled:i,onPress:()=>{t(e.id);},UNSAFE_isVisuallyInteractiveOnly:true}):null]})]}),l?jsxs(a$1,{display:"flex",flexDirection:"column",width:"full",paddingY:"md",children:[e.errorMessage?jsx(a$1,{elementType:"span",typography:"label.sm.medium",color:"support.error.medium",children:e.errorMessage}):null,e.errorExplanation?jsx(a$1,{elementType:"span",typography:"label.sm.medium",color:"text.helper",children:e.errorExplanation}):null]}):null]})}var R=d.forwardRef(({className:e,style:x,items:i,onRemove:t,disabledKeys:a,loadingLabel:s,removeHintLabel:y,"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c},m)=>{let u=a==="all",_=d.useMemo(()=>new Set(a&&a!=="all"?a:[]),[a]),j=d.useMemo(()=>new Map(i.map(r=>[r.id,r])),[i]),L=d.useMemo(()=>i.map(r=>({id:r.id,label:r.name})),[i]),U=d.useCallback((r,{isFocusVisible:F})=>{let f=j.get(r.id);return f?jsx(X,{item:f,isFocusVisible:F,isDisabled:u||_.has(f.id),onRemove:t,loadingLabel:s,removeHintLabel:y}):null},[j,u,_,t,s,y]);if(!i.length)return null;let K=u?L.map(r=>r.id):_,Y=r=>{if(!t||r.key!=="Delete"&&r.key!=="Backspace"||u)return;let z=g(r)?.closest("[data-key]")?.dataset.key;z&&(_.has(z)||j.get(z)?.isLoading||(r.preventDefault(),t(z)));};return jsx(a$1,{ref:m,className:a$2("BaselineUI-FileList",e),style:x,onKeyDown:Y,children:jsx(q,{"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c,items:L,selectionMode:"none",disabledKeys:K,className:T,renderOption:U})})});R.displayName="FileList";var A=c({loading:{id:"bui.fileList.loading",defaultMessage:"Loading {fileName}"},removeHint:{id:"bui.fileList.removeHint",defaultMessage:"{fileName}, press Delete or Backspace to remove"}});export{R as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJSKA.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.mjs';import {a}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJSKA.mjs';import {a as a$1}from'./chunk-CFLEBB5T.mjs';import {b}from'./chunk-4ZJMZB5B.mjs';import {a as a$5}from'./chunk-RSKKEGJZ.mjs';import {a as a$3}from'./chunk-K6X2BHPP.mjs';import {a as a$4}from'./chunk-3FYY26ED.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 C from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$2}from'./chunk-CHTLOFCT.mjs';import {a as a$6}from'./chunk-DRYSJS
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var k="
|
|
10
|
+
var k="_1yep5z6jb _1yep5z6jc _1yep5z6jd",R=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"]]}),x=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"]]}),z=a({defaultClassName:"_9b1tmlc",variantClassNames:{isDisabled:{true:"_9b1tmld"},isReadOnly:{true:"_9b1tmle"}},defaultVariants:{},compoundVariants:[]});var S=C.forwardRef(({className:N,count:V,style:P,size:t="md",icon:D,"data-block-id":H,"data-block-class":I,...a},O)=>{let l={isRequired:false},T=D||(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=C.useRef(null),d=a$1({...a,...l}),{inputProps:j,isPressed:F,isDisabled:r,isReadOnly:i,isSelected:c}=a$2({...a,...l},d,s),{focusProps:w,isFocused:M,isFocusVisible:n}=a$3(),{hoverProps:q,isHovered:b$1}=a$4({}),A=a$5({"data-block-id":H,"data-block-class":I,"data-focused":M,"data-focus-visible":n,"data-disabled":r,"data-hovered":b$1,"data-pressed":F,"data-selected":c});return jsxs("label",{ref:O,style:P,className:a$7(k,"BaselineUI-Reaction",N),...A,children:[jsx(b,{children:jsx("input",{...j,...w,ref:s})}),jsxs("div",{...q,className:R({isSelected:c,isFocusVisible:n,isHovered:b$1,isReadOnly:i,isDisabled:r}),children:[jsx("div",{className:z({isDisabled:r,isReadOnly:i}),children:jsx(T,{size:t==="md"?20:16})}),jsx("div",{className:x({isSelected:d.isSelected,isDisabled:r,isReadOnly:i,size:t}),children:jsx(a$6,{value:V})})]})]})});S.displayName="Reaction";export{S as a};
|
|
@@ -7,4 +7,4 @@ import {a}from'./chunk-4QEH5CGK.mjs';import z from'react';import {jsx}from'react
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var o="_1ltpw2m2 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662
|
|
10
|
+
var o="_1ltpw2m2 _1yep5z64u _1yep5z64v _1yep5z64w _1yep5z676 _1yep5z677 _1yep5z678 _1yep5z68c _1yep5z68d _1yep5z68e _1yep5z660 _1yep5z661 _1yep5z662 _1yep5z6ez _1yep5z6j5 _1yep5z6j6 _1yep5z6j7 _1yep5z6kk _1yep5z6kl _1yep5z6km _1ltpw2m0",p="_1ltpw2m1 _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6mh _1yep5z6mf _1yep5z6hf _1yep5z6g9 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm";var t=z.forwardRef(({className:_,style:l,children:y},a$1)=>jsx("pre",{className:a(p,"BaselineUI-Code",_),style:l,ref:a$1,children:jsx("code",{className:o,children:y})}));t.displayName="Code";export{t as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-NMSOOQB2.mjs';import {g,e,h,a as a$1,i,c}from'./chunk-KEAM6GSA.mjs';import {b as b$1}from'./chunk-NUYBQ7KP.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {a}from'./chunk-66CUIXA6.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {useGranularEffect}from'granular-hooks';import P,{useCallback,useImperativeHandle}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$2}from'./chunk-GEZGEZAP.mjs';import {a as a$4}from'./chunk-FJ2JRD
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function F(t,o,r){let{direction:i$1}=b(),n=g({...t,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!t.enableReorder,getItems:t.getItems||(
|
|
10
|
+
function F(t,o,r){let{direction:i$1}=b(),n=g({...t,collection:o.collection,selectionManager:o.selectionManager,isDisabled:!t.enableReorder,getItems:t.getItems||(c=>[...c].map(l=>{let p=o.collection.getItem(l);return a(p,"Expected item to be defined."),{"text/plain":p.textValue}}))});e(t,n,r);let a$2=h({...t,collection:o.collection,selectionManager:o.selectionManager}),{collectionProps:e$1}=a$1({...t,keyboardDelegate:new b$1({collection:o.collection,disabledKeys:o.disabledKeys,ref:r,orientation:t.orientation,layout:t.layout,direction:i$1}),dropTargetDelegate:new i(o.collection,r)},a$2,r);return {collectionProps:e$1,dragState:n,dropState:a$2}}function G({type:t="listbox",handle:o},r,i){let n=useCallback(e=>t==="listbox"?i.current?.querySelector(`[data-key="${e}"][role="option"]`):i.current?.querySelector(`[data-key="${e}"][role="row"]`),[t,i]),a=useCallback((e,c)=>{let l=n(e);l&&l?.scrollIntoView({block:"nearest",inline:"nearest",...c});},[n]);useImperativeHandle(o,()=>({scrollIntoView:a,setFocusedKey:e=>{r.selectionManager.setFocused(true),r.selectionManager.setFocusedKey(e),a(e),n(e)?.focus();}}),[a,r.selectionManager,n]),useGranularEffect(()=>{let e=r.selectionManager.focusedKey;a$2(i.current)&&e&&a(e);},[r.selectionManager.focusedKey],[a,i]);}var Q=({dropState:t,orientation:o="vertical",dropIndicatorStyle:r,dropIndicatorClassName:i,renderDropIndicator:n=({isDropTarget:e,isHidden:c,dropIndicatorProps:l,orientation:p},C)=>c?null:jsx("li",{...l,ref:C,"data-drop-target":e,className:a$3(a$4({isDropTarget:e,orientation:p}),"BaselineUI-DropIndicator",i),style:r}),...a})=>{let e=P.useRef(null),{dropIndicatorProps:c$1,isHidden:l,isDropTarget:p}=c(a,t,e);return n({dropIndicatorProps:{...c$1,role:"option"},isHidden:l,isDropTarget:p,orientation:o},e)};export{F as a,G as b,Q as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
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 s=a({defaultClassName:"mnnh5s1 _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6lq _1yep5z6lt _1yep5z6m5 _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv _1yep5z6m3",variantClassNames:{isInline:{true:"mnnh5s2 _1yep5z6x4 _1yep5z6x5 _1yep5z6x6 _1yep5z6xs _1yep5z6xt _1yep5z6xu _1yep5z6yg _1yep5z6yh _1yep5z6yi _1yep5z6z4 _1yep5z6z5 _1yep5z6z6 _1yep5z6140 _1yep5z618z _1yep5z6190",false:"_1yep5z618m _1yep5z612v"},isHovered:{true:"mnnh5s4"},hasLoadedImage:{true:"_1yep5z612u"},includeCheckeredBackground:{true:"mnnh5s6"},showFocusRing:{true:"_1yep5z614b _1yep5z618s _1yep5z618q _1yep5z614w _1yep5z618t"},isDisabled:{true:"mnnh5s8 _1yep5z6zt"}},defaultVariants:{},compoundVariants:[[{isHovered:true,hasLoadedImage:false},"_1yep5z61pl"],[{isHovered:true,hasLoadedImage:true},"mnnh5s9"],[{isInline:true,isDisabled:true},"_1yep5z61qj"],[{hasLoadedImage:true,includeCheckeredBackground:true},"_1yep5z61pd"]]}),p="_1yep5z6d8",i=a({defaultClassName:"mnnh5sa",variantClassNames:{isInline:{true:"mnnh5sb",false:"mnnh5sc"},isDisabled:{true:"mnnh5sd"},hasLoadedImage:{true:"mnnh5s0"}},defaultVariants:{},compoundVariants:[]});export{s as a,p as b,i as c};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b,c}from'./chunk-GX2IOGYR.mjs';import {b as b$1}from'./chunk-AYBACQ6U.mjs';import {a as a$1}from'./chunk-2V323KAD.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {WarningFilledIcon as WarningFilledIcon$1,CheckmarkCircleFilledIcon,InfoCircleFilledIcon as InfoCircleFilledIcon$1,ErrorAltCircleFilledIcon as ErrorAltCircleFilledIcon$1,XIcon}from'@baseline-ui/icons/16';import {WarningFilledIcon,CheckCircleFilledIcon,InfoCircleFilledIcon,ErrorAltCircleFilledIcon}from'@baseline-ui/icons/20';import U 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 u=a({defaultClassName:"kfun6yt _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6af _1yep5z6ag _1yep5z6ah",variantClassNames:{arrangement:{single:"_1yep5z6vy _1yep5z6vz _1yep5z6w0",multi:"_1yep5z6163 _1yep5z6164 _1yep5z6165",compact:"_1yep5z6163 _1yep5z6164 _1yep5z6165"}},defaultVariants:{},compoundVariants:[]}),d=a({defaultClassName:"kfun6y0 _1yep5z63r _1yep5z63s _1yep5z63t _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m3",variantClassNames:{variant:{info:"_1yep5z612l",warning:"_1yep5z612g",error:"_1yep5z6126",success:"_1yep5z612b"},arrangement:{single:"kfun6y5 _1yep5z617i _1yep5z617j _1yep5z617k _1yep5z616i _1yep5z616j _1yep5z616k",multi:"kfun6y6",compact:"kfun6y7 _1yep5z6ms _1yep5z6mt _1yep5z6mu _1yep5z6p4 _1yep5z6p5 _1yep5z6p6 _1yep5z6qa _1yep5z6qb _1yep5z6qc _1yep5z6ny _1yep5z6nz _1yep5z6o0 _1yep5z6169 _1yep5z616a _1yep5z616b _1yep5z6wy _1yep5z6wz _1yep5z6x0"},hasButton:{true:"kfun6y8"},hasCloseButton:{true:"kfun6y9"}},defaultVariants:{},compoundVariants:[[{hasButton:false,arrangement:"single"},"_1yep5z619b _1yep5z619c _1yep5z619d _1yep5z61bn _1yep5z61bo _1yep5z61bp _1yep5z61ct _1yep5z61cu _1yep5z61cv _1yep5z61ah _1yep5z61ai _1yep5z61aj"],[{hasButton:true,arrangement:"compact"},"_1yep5z619b _1yep5z619c _1yep5z619d _1yep5z61bn _1yep5z61bo _1yep5z61bp _1yep5z61ct _1yep5z61cu _1yep5z61cv _1yep5z61ah _1yep5z61ai _1yep5z61aj"],[{hasCloseButton:true,arrangement:"compact"},"_1yep5z61bb _1yep5z61bc _1yep5z61bd _1yep5z61a5 _1yep5z61a6 _1yep5z61a7"]]}),f=a({defaultClassName:"kfun6yq _1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610m",md:"_1yep5z610p"}},defaultVariants:{},compoundVariants:[]}),C=a({defaultClassName:"kfun6ym _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1",variantClassNames:{arrangement:{single:"kfun6yn",multi:"_1yep5z616f _1yep5z616g _1yep5z616h",compact:"_1yep5z6nm _1yep5z6nn _1yep5z6no _1yep5z6py _1yep5z6pz _1yep5z6q0 _1yep5z6r4 _1yep5z6r5 _1yep5z6r6 _1yep5z6os _1yep5z6ot _1yep5z6ou _1yep5z616x _1yep5z616y _1yep5z616z"}},defaultVariants:{},compoundVariants:[]}),v=a({defaultClassName:"kfun6yh _1yep5z6m0",variantClassNames:{variant:{info:"_1yep5z611c",warning:"_1yep5z6117",error:"_1yep5z610x",success:"_1yep5z6112"}},defaultVariants:{},compoundVariants:[]}),j=a({defaultClassName:"kfun6ye _1yep5z6ey",variantClassNames:{size:{sm:"_1yep5z610o",md:"_1yep5z610r"}},defaultVariants:{},compoundVariants:[]}),I=a({defaultClassName:"kfun6ya _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj",variantClassNames:{arrangement:{single:"_1yep5z616i _1yep5z616j _1yep5z616k",multi:"_1yep5z6rg _1yep5z6rh _1yep5z6ri _1yep5z6ts _1yep5z6tt _1yep5z6tu",compact:"_1yep5z6163 _1yep5z6164 _1yep5z6165"}},defaultVariants:{},compoundVariants:[]});var X={error:{sm:ErrorAltCircleFilledIcon$1,md:ErrorAltCircleFilledIcon},info:{sm:InfoCircleFilledIcon$1,md:InfoCircleFilledIcon},success:{sm:CheckmarkCircleFilledIcon,md:CheckCircleFilledIcon},warning:{sm:WarningFilledIcon$1,md:WarningFilledIcon}},k=U.forwardRef(({className:h,description:g,actionLabel:z,onAction:A,style:b$2,variant:i="info",title:N,arrangement:p="single",onClose:y,closeLabel:x,size:s="sm","data-block-id":V,"data-block-class":F,elementProps:n},B)=>{let w=b(),_=z&&jsx(b$1,{variant:p==="compact"?"tertiary":"ghost",label:z,onPress:A}),E=X[i][s];return jsxs("div",{className:a$2(d({variant:i,arrangement:p,hasButton:!!z||!!y,hasCloseButton:!!y}),"BaselineUI-InlineAlert",h),"data-block-id":V,"data-block-class":F,style:b$2,role:"alert",ref:B,...n?.root,children:[jsxs("div",{className:I({arrangement:p}),children:[jsx(E,{className:v({variant:i}),size:16}),jsxs("div",{className:u({arrangement:p}),...n?.content,children:[jsx("h3",{className:j({size:s}),...n?.title,children:N}),jsx("section",{className:f({size:s}),...n?.description,children:g})]}),p==="compact"&&_]}),jsxs("div",{className:C({arrangement:p}),children:[p!=="compact"&&_,y?jsx(a$1,{variant:"secondary",icon:XIcon,size:"sm",onPress:y,"aria-label":x??w.formatMessage(G.close),...n?.close}):null]})]})});k.displayName="InlineAlert";var G=c({close:{defaultMessage:"Close",id:"bui.inlineAlert.close"}});export{k as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {useState}from'react';/**
|
|
1
|
+
import {useState,useRef}from'react';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {useState}from'react';/**
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
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};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b as b$1}from'./chunk-MVK5CB64.mjs';import {t,d}from'./chunk-MRJFGHFW.mjs';import {a}from'./chunk-JDLUGVXG.mjs';import {b}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect,version}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var S="react-aria-clear-focus",I="react-aria-focus";function k(t$1,e){let r=useRef(true),s=useRef(null),o=t(t$1);useEffect(()=>(r.current=true,()=>{r.current=false;}),[]),useEffect(()=>{let n=s.current;r.current?r.current=false:(!n||e.some((i,f)=>!Object.is(i,n[f])))&&o(),s.current=e;},e);}function U(t,e){let r=useRef(true),s=useRef(null);a(()=>(r.current=true,()=>{r.current=false;}),[]),a(()=>{r.current?r.current=false:(!s.current||e.some((o,n)=>!Object.is(o,s[n])))&&t(),s.current=e;},e);}function O(t$1){let{ref:e,box:r,onResize:s}=t$1,o=t(s);useEffect(()=>{let n=e?.current;if(!n)return;let i=b(n);if(typeof i.ResizeObserver>"u")return i.addEventListener("resize",o,false),()=>{i.removeEventListener("resize",o,false);};{let f=new i.ResizeObserver(a=>{a.length&&o();});return f.observe(n,{box:r}),()=>{n&&f.unobserve(n);}}},[e,r]);}function Y(t){return d()?t.metaKey:t.ctrlKey}var y=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Z(t){let e=b(t);return t instanceof e.HTMLInputElement&&!y.has(t.type)||t instanceof e.HTMLTextAreaElement||t instanceof e.HTMLElement&&t.isContentEditable}function L(t$1,e){let{collection:r,onLoadMore:s,scrollOffset:o=1}=t$1,n=useRef(null),i=t(f=>{for(let a of f)a.isIntersecting&&s&&s();});a(()=>(e.current&&(n.current=new IntersectionObserver(i,{root:b$1(e?.current),rootMargin:`0px ${100*o}% ${100*o}% ${100*o}%`}),n.current.observe(e.current)),()=>{n.current&&n.current.disconnect();}),[r,e,o]);}function M(t){let e=version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}export{S as a,I as b,k as c,U as d,O as e,Y as f,Z as g,L as h,M as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1}from'./chunk-OAY74XPB.mjs';import {a as a$4}from'./chunk-
|
|
1
|
+
import {a as a$1}from'./chunk-OAY74XPB.mjs';import {a as a$4}from'./chunk-E5GYCA3P.mjs';import {a as a$6}from'./chunk-XUJJMAKM.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {a as a$3}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-2V323KAD.mjs';import {d}from'./chunk-TCCQDGMI.mjs';import {a as a$2}from'./chunk-K6X2BHPP.mjs';import {b as b$1,c}from'./chunk-TZ4MVY4E.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {XIcon}from'@baseline-ui/icons/20';import g from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-OAY74XPB.mjs';import {a as a$4}from'./chunk-2WAKHF
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var _=a({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7
|
|
10
|
+
var _=a({defaultClassName:"siobe20 _1yep5z6ao _1yep5z6ap _1yep5z6aq _1yep5z6bc _1yep5z6bd _1yep5z6be _1yep5z6d7 _1yep5z6mh _1yep5z6mf _1yep5z6hg _1yep5z6m6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm",variantClassNames:{background:{subtle:"_1yep5z612s",medium:"_1yep5z612t"},isFocusVisible:{true:"_1yep5z618q _1yep5z618s _1yep5z618t _1yep5z614w"}},defaultVariants:{},compoundVariants:[]}),w="siobe24";var v=g.forwardRef(({className:x,style:h,children:D,background:t="medium",title:C,action:i,"data-block-id":k,"data-block-class":N,onCloseRequest:P,contentStyle:R,contentClassName:B,closeLabel:j,...I},F)=>{let{formatMessage:M}=b(),p=g.useRef(null),{dialogProps:V,titleProps:T}=a$1(I,p),{focusProps:q,isFocusVisible:L}=a$2();return jsxs("div",{...c(V,q),className:a$7(_({background:t,isFocusVisible:L}),"BaselineUI-Drawer",x),"data-block-id":k,"data-block-class":N,style:h,ref:b$1(F,p),children:[jsxs(a$3,{paddingLeft:"lg",paddingRight:"sm",backgroundColor:"background.primary.subtle",display:"flex",justifyContent:"space-between",alignItems:"center",gap:"lg",className:w,children:[jsx(a$4,{type:"title",size:"sm",...T,className:d,children:C}),jsxs(a$3,{children:[i?jsx(a$5,{...i,variant:"secondary"}):null,jsx(a$5,{variant:"secondary",size:"md",icon:XIcon,onPress:P,"aria-label":j??M(A.close)})]})]}),jsx(a$6,{variant:t==="subtle"?"primary":"secondary"}),jsx(a$3,{display:"flex",flexDirection:"column",flex:1,style:{overflow:"auto",...R},className:a$7(B,"BaselineUI-Drawer-Content"),children:D})]})});v.displayName="Drawer";var A=c$1({close:{id:"bui.drawer.close",defaultMessage:"Close"}});export{v as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-PG3WDHSK.mjs';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$5}from'./chunk-GVI6EBGJ.mjs';import {a as a$a}from'./chunk-A24DWFQ2.mjs';import {a as a$9}from'./chunk-NGZRN4SF.mjs';import {b as b$1}from'./chunk-PAQQ7MQG.mjs';import {a as a$c}from'./chunk-UN7XC7QV.mjs';import {b as b$3,e as e$1}from'./chunk-7MQBBSZ2.mjs';import {b,c as c$1}from'./chunk-GX2IOGYR.mjs';import {b as b$6}from'./chunk-AYBACQ6U.mjs';import {a as a$4}from'./chunk-O7XK2WIX.mjs';import {a as a$7}from'./chunk-2V323KAD.mjs';import {a as a$3}from'./chunk-KUEDQO7P.mjs';import {b as b$5}from'./chunk-N2XGJKZG.mjs';import {b as b$7,j}from'./chunk-L6S5GBKS.mjs';import {a as a$6}from'./chunk-66CUIXA6.mjs';import {e}from'./chunk-SHJ2TJYG.mjs';import {a as a$2}from'./chunk-BGMVPFYK.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c,b as b$4}from'./chunk-TZ4MVY4E.mjs';import {b as b$2,a as a$1}from'./chunk-JDLUGVXG.mjs';import {b as b$8,f,a as a$b,e as e$2}from'./chunk-AUOQSTS5.mjs';import {a as a$8}from'./chunk-4QEH5CGK.mjs';import _,{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 De=0,S="UNSUPPORTED_IN_MENU";function ge(e){return useMemo(()=>_.Children.toArray(e).map(t=>{let o=t,i=`item${++De}`,r=w(o,b$7),a=be(o),c,m;if(r){let b=w(r,j);a$6(b),c=be(b),m=w(r,a$c).props.children;}else a?c=a:c=o;let{onPress:y,label:p,"aria-label":s,iconStart:f,isDisabled:T,icon:g}=c.props,u=p||s||S;a$6(typeof u=="string","ActionGroup children must have a string label");let v=`${i}-${u}`;return createElement(a$9,{...{key:v,onPress:y,textValue:u,"aria-label":s,icon:f||g,dialogContent:m,isDisabled:T},key:v},o)}),[e])}function w(e,t){if(t)for(let o of _.Children.toArray(e)){if(!_.isValidElement(o))continue;let i=o;if(i.type===t)return i;if(i.props.children){let r=w(i.props.children,t);if(r)return r}}}function be(e){return w(e,b$6)||w(e,a$7)}var Se=new Set(["text","search","password","tel","url"]);function L({props:e,ref:t}){let{toolbarProps:o}=a$a(e,t),{direction:i}=b$5(),r=i==="rtl";return {toolbarProps:{...o,onKeyDownCapture:a=>{let c=a.target,m=a.key,y=()=>{let p=t.current;if(!p)return;let s=f(a$b(p));if(!s||!e$2(p,s)||s.dataset.buiAvoidFocus!=="true")return;let f$1=Be(p),T=f$1.indexOf(s);if(T===-1)return;let g=ke({key:m,orientation:e.orientation??"horizontal",isRTL:r});if(!g)return;let u=T+g;for(;u>=0&&u<f$1.length;){let v=f$1[u];if(v.dataset.buiAvoidFocus!=="true"&&!v.matches('[disabled], [aria-disabled="true"]')){v.focus();return}u+=g;}};if(He(c)&&Se.has(c.type)){let p=c.selectionStart===0,s=c.selectionEnd===c.value.length;(p&&(r&&a.key==="ArrowRight"||!r&&a.key==="ArrowLeft")||s&&(r&&a.key==="ArrowLeft"||!r&&a.key==="ArrowRight"))&&(o.onKeyDownCapture?.(a),y());return}o.onKeyDownCapture?.(a),y();}}}}function ke({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 Oe='button, [role="button"], input, [tabindex]';function Be(e){let t=[],o=i=>{t.push(...i.querySelectorAll(Oe));for(let r of i.querySelectorAll("*"))r.shadowRoot&&o(r.shadowRoot);};return o(e),t}function He(e){return e.tagName.toLowerCase()==="input"}var ye="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6it _1yep5z6iu _1yep5z6iv _1yep5z6m3 _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6lv",ve={horizontal:"xvr3wn0",vertical:"xvr3wn1"};var O=_.forwardRef(({className:e$2,style:t,children:o,collapsibleMenuProps:i,"data-block-id":r,"data-block-class":a$8,renderSpacer:c$1,onKeyDown:m,isSingleTabStop:y=true,moreLabel:p,...s},f)=>{let{formatMessage:T}=b(),[g,u]=useState(),v=ge(o),d=b$1({...s,children:v}),b$4=a(f),M=useRef(null),[{visibleItems:H,isMeasuring:V},U]=b$2({visibleItems:d.collection.size,isMeasuring:false}),x=useCallback(()=>{let n=l=>{if(M.current&&b$4.current){let R=[...M.current.children],z=b$4.current.getBoundingClientRect().width,Le=l<d.collection.size,D=0,j=0;if(Le){let C=R.pop();C&&(D+=he(C,false,true));}for(let[C,xe]of R.entries())if(D+=he(xe,C===0,C===R.length-1),Math.round(D)<=Math.round(z))j++;else break;return j}return l};U(function*(){yield {visibleItems:d.collection.size,isMeasuring:true};let l=n(d.collection.size),R=l<d.collection.size&&l>0;yield {visibleItems:l,isMeasuring:R},R&&(yield {visibleItems:n(l),isMeasuring:false});});},[U,b$4,d.collection.size]),Me=useMemo(()=>({get current(){return b$4.current?.parentElement}}),[b$4]);e({ref:Me,onResize:x}),a$1(x,[d.collection,x]);let{toolbarProps:Ae}=L({props:{...s,isSingleTabStop:y},ref:b$4}),W=[...d.collection],Ie=W.slice(0,H),A=W.slice(H).filter(n=>n.textValue!==S),Ne=A.length>0;useEffect(()=>{u(void 0);},[A.length]),useEffect(()=>{s.orientation==="vertical"&&console.warn("Toolbar: Vertical orientation is not supported when `isCollapsible` is true.");},[s.orientation]);let{keyboardProps:Pe}=a$2({onKeyDown:m});return jsxs(a$3,{children:[jsx("div",{...c(Ae,Pe),className:e$2,"data-block-id":r,"data-block-class":a$8,"data-collapse":true,style:{...t,flexBasis:V?"100%":void 0},ref:b$4,children:jsxs("div",{ref:M,className:ye,children:[Ie.map(n=>n.rendered),Ne?jsxs(Fragment,{children:[!V&&c$1?jsx(a$4,{flexGrow:1}):null,jsx(a$5,{placement:"bottom end",renderTrigger:({buttonProps:n,ref:l})=>jsx(a$7,{...n,size:"md",icon:MoreIcon,"aria-label":p??T(Ke.more),variant:"toolbar",ref:l,tooltip:true}),...i,disabledKeys:A.filter(n=>n.props?.isDisabled).map(n=>n.key),items:A.map(n=>{let l=n.textValue||n["aria-label"];return a$6(l,"ActionItem must have a label"),{id:n.key,label:l,icon:n.props.icon}}),onAction:n=>{let l=d.collection.getItem(n);a$6(l,"Item not found");let{onPress:R,dialogContent:z}=l.props;R?.(),u(z);}})]}):null]})}),jsx(b$3,{isOpen:!!g,onOpenChange:n=>{n||u(void 0);},children:jsx(e$1,{enableDrawer:"auto",style:{zIndex:1e5},children:g?_.cloneElement(g,{inheritDrawer:true}):null})})]})});O.displayName="CollapsibleToolbar";function he(e,t,o){let r=b$8(e).getComputedStyle(e);return e.getBoundingClientRect().width+(t?0:we(r.marginLeft))+(o?0:we(r.marginRight))}function we(e){let t=Number.parseInt(e,10);return Number.isNaN(t)?0:t}var Ke=c$1({more:{id:"bui.toolbar.more",defaultMessage:"More"}});var B=_.forwardRef(({className:e,style:t,isSingleTabStop:o=true,"data-block-id":i,"data-block-class":r,"aria-controls":a,onKeyDown:c$1,...m},y)=>{let p=_.useRef(null),{toolbarProps:s}=L({props:{...m,isSingleTabStop:o},ref:p}),{keyboardProps:f}=a$2({onKeyDown:c$1});return jsx("div",{...c(s,f),...a?{"aria-controls":a}:{},className:a$8(ve[m.orientation||"horizontal"],"BaselineUI-Toolbar",e),style:t,"data-block-id":i,"data-block-class":r,ref:b$4(y,p),children:m.children})});B.displayName="WrappedToolbar";var Ce=_.forwardRef((e,t)=>{let o=e.isCollapsible?O:B;return jsx(o,{...e,ref:t})});Ce.displayName="Toolbar";export{Ce as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1,c as c$1,d}from'./chunk-
|
|
1
|
+
import {a,b as b$1,c as c$1,d}from'./chunk-BBZ2I3RF.mjs';import {c}from'./chunk-L3SNGDBH.mjs';import {b}from'./chunk-PAQQ7MQG.mjs';import {b as b$2}from'./chunk-TZ4MVY4E.mjs';import {a as a$1}from'./chunk-4QEH5CGK.mjs';import v,{useMemo}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a,b as b$1,c as c$1,d}from'./chunk-VHDXSFQC.mjs';import {c}from'./chunk-
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var G="
|
|
10
|
+
var G="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z69i _1yep5z69j _1yep5z69k";var z=({item:e})=>{let p=useMemo(()=>({item:e}),[e]);return jsx(c$1.Provider,{value:p,children:jsx(d,{children:e.rendered})})},x=v.forwardRef(({className:e,style:p,"data-block-id":C,"data-block-class":P,items:i,size:m="md",isDisabled:_=false,...t},k)=>{let L=useMemo(()=>i.map(o=>({...o,data:{variant:o.variant}})),[i]),b$3=c(),n=v.useRef(null),a$2=b({...t,items:L,children:b$3,disabledKeys:_?i.map(o=>o.id):t.disabledKeys}),{gridProps:I}=a(t,a$2,n),R=useMemo(()=>({state:a$2,variant:t.variant,size:m}),[a$2,t.variant,m]);return jsx("div",{...I,className:a$1(G,"BaselineUI-TagGroup",e),style:p,"data-block-id":C,"data-block-class":P,ref:b$2(k,n),children:jsx(b$1.Provider,{value:R,children:[...a$2.collection].map(o=>jsx(z,{item:o},o.key))})})});x.displayName="TagGroup";export{x as a};
|
|
@@ -7,4 +7,4 @@ import {a as a$1}from'./chunk-DD5FWULD.mjs';import {useGranularEffect}from'granu
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var f="SET_STATE",o="UNDO",a="REDO",U=(
|
|
10
|
+
var f="SET_STATE",o="UNDO",a="REDO",U=(u,e)=>{let{past:t,present:n,future:s}=u;switch(e.type){case f:return {past:[...t,n],present:e.data,future:[]};case o:return {past:t.slice(0,t?.length-1),present:t[t?.length-1],future:[n,...s]};case a:return {past:[...t,n],present:s[0],future:s.slice(1)};default:throw new Error("Invalid action type")}},H=(u={},{isDisabled:e,onAction:t})=>{let n=a$1(),[s,c]=useReducer(U,{past:[],present:u,future:[]}),{past:i,present:p,future:T}=s,h=E=>{c({type:f,data:E});},r=useRef(void 0),y=()=>{i.length&&(r.current=o,c({type:o}));},S=()=>{T.length&&(r.current=a,c({type:a}));},l=!!i?.length,R=!!T?.length;return useGranularEffect(()=>{(r.current===o||r.current===a)&&(t?.(p,r.current),r.current=void 0);},[p],[t,n]),{state:p,push:e?()=>{}:h,undo:e?()=>{}:y,redo:e?()=>{}:S,pastStates:i,futureStates:T,canUndo:l,canRedo:R}};export{H as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-BU5H25MV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,
|
|
1
|
+
import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUEDQO7P.mjs';import {a as a$5}from'./chunk-BU5H25MV.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {b as b$1,d,a as a$2,f as f$1}from'./chunk-SHJ2TJYG.mjs';import {d as d$1,e}from'./chunk-MVK5CB64.mjs';import {a}from'./chunk-RXSYDMT6.mjs';import {i,c as c$1}from'./chunk-Y4DRSGEJ.mjs';import {d as d$2}from'./chunk-AQYBKDT2.mjs';import {n,o,c as c$4,a as a$6,h}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$4}from'./chunk-TZ4MVY4E.mjs';import {c as c$3}from'./chunk-JDLUGVXG.mjs';import {f,b as b$2,a as a$3,g,e as e$1}from'./chunk-AUOQSTS5.mjs';import {useRef,useEffect}from'react';import {flushSync}from'react-dom';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a as a$1,c}from'./chunk-I3YGB2BE.mjs';import {d as d$3}from'./chunk-KUED
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function H(s){return h()?s.altKey:s.ctrlKey}function Y(s,e){let t=`[data-key="${CSS.escape(String(e))}"]`,l=s.current?.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),s.current?.querySelector(t)}var be=new WeakMap;function Se(s){let e=c$3();return be.set(s,e),e}function Fe(s){return be.get(s)}var Pe=1e3;function he(s){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=s,i=useRef({search:"",timeout:void 0}),v=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,t.focusedKey);f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null&&(t.setFocusedKey(f),l&&l(f));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}},K=c=>{let f=Oe(c.key);if(!(!f||c.ctrlKey||c.metaKey||c.altKey||!e$1(c.currentTarget,g(c))||i.current.search.length===0&&f===" ")){if(i.current.search+=f,e.getKeyForSearch!=null){let p=e.getKeyForSearch(i.current.search,t.focusedKey);if(p==null&&(p=e.getKeyForSearch(i.current.search)),p!=null)t.setFocusedKey(p),l&&l(p),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?v:void 0,onKeyDown:e.getKeyForSearch?K:void 0}}}function Oe(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function it(s){let{selectionManager:e$3,keyboardDelegate:t,ref:l,autoFocus:i$1=false,shouldFocusWrap:v=false,disallowEmptySelection:K=false,disallowSelectAll:c$3=false,escapeKeyBehavior:f$1="clearSelection",selectOnFocus:p=e$3.selectionBehavior==="replace",disallowTypeAhead:Z=false,shouldUseVirtualFocus:y,allowsTabNavigation:W=false,scrollRef:d$2=l,linkBehavior:T="action",UNSTABLE_focusOnEntry:R}=s,{direction:L}=b(),_=n(),g$1=r=>{if(r.altKey&&r.key==="Tab"&&r.preventDefault(),!l.current||!e$1(l.current,g(r)))return;let u=(n,a)=>{if(n!=null){if(e$3.isLink(n)&&T==="selection"&&p&&!H(r)){flushSync(()=>{e$3.setFocusedKey(n,a);});let o=Y(l,n),w=e$3.getItemProps(n);o&&_.open(o,r,w.href,w.routerOptions);return}if(e$3.setFocusedKey(n,a),e$3.isLink(n)&&T==="override")return;r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&!H(r)&&e$3.replaceSelection(n);}};switch(r.key){case "ArrowDown":{if(t.getKeyBelow){let n=e$3.focusedKey!=null?t.getKeyBelow?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=t.getFirstKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowUp":{if(t.getKeyAbove){let n=e$3.focusedKey!=null?t.getKeyAbove?.(e$3.focusedKey):t.getLastKey?.();n==null&&v&&(n=t.getLastKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowLeft":{if(t.getKeyLeftOf){let n=e$3.focusedKey!=null?t.getKeyLeftOf?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getFirstKey?.(e$3.focusedKey):t.getLastKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"first":"last"));}break}case "ArrowRight":{if(t.getKeyRightOf){let n=e$3.focusedKey!=null?t.getKeyRightOf?.(e$3.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getLastKey?.(e$3.focusedKey):t.getFirstKey?.(e$3.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"last":"first"));}break}case "Home":if(t.getFirstKey){if(e$3.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getFirstKey(e$3.focusedKey,e$2(r));e$3.setFocusedKey(n),n!=null&&(e$2(r)&&r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&e$3.replaceSelection(n));}break;case "End":if(t.getLastKey){if(e$3.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getLastKey(e$3.focusedKey,e$2(r));e$3.setFocusedKey(n),n!=null&&(e$2(r)&&r.shiftKey&&e$3.selectionMode==="multiple"?e$3.extendSelection(n):p&&e$3.replaceSelection(n));}break;case "PageDown":if(t.getKeyPageBelow&&e$3.focusedKey!=null){let n=t.getKeyPageBelow(e$3.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "PageUp":if(t.getKeyPageAbove&&e$3.focusedKey!=null){let n=t.getKeyPageAbove(e$3.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "a":e$2(r)&&e$3.selectionMode==="multiple"&&c$3!==true&&(r.preventDefault(),e$3.selectAll());break;case "Escape":f$1==="clearSelection"&&!K&&e$3.selectedKeys.size!==0&&(r.stopPropagation(),r.preventDefault(),e$3.clearSelection());break;case "Tab":if(!W){if(r.shiftKey)l.current.focus();else {let n=d$3(l.current,{tabbable:true}),a,o;do o=n.lastChild(),o&&(a=o);while(o);let w=a$3(l.current),Q=f(w);a&&(!e$1(a,Q)||Q&&!c$4(Q))&&a$6(a);}break}}},k=useRef({top:0,left:0});a(d$2,"scroll",()=>{k.current={top:d$2.current?.scrollTop??0,left:d$2.current?.scrollLeft??0};});let F=r=>{if(e$3.isFocused){e$1(r.currentTarget,g(r))||e$3.setFocused(false);return}if(!e$1(r.currentTarget,g(r)))return;let u=c$1();e$3.setFocused(true);let n=a=>{a!=null&&(e$3.setFocusedKey(a),p&&!e$3.isSelected(a)&&e$3.replaceSelection(a));};if(R&&(u==="keyboard"||u==="virtual"))n(R==="first"?t.getFirstKey?.():t.getLastKey?.());else if(e$3.focusedKey==null){let a=r.relatedTarget;a&&r.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?n(e$3.lastSelectedKey??t.getLastKey?.()):n(e$3.firstSelectedKey??t.getFirstKey?.());}else d$2.current&&(d$2.current.scrollTop=k.current.top,d$2.current.scrollLeft=k.current.left);if(e$3.focusedKey!=null&&d$2.current){let a=Y(l,e$3.focusedKey),o=b$2(a);a instanceof o.HTMLElement&&(!e$1(a,f(o.document))&&!y&&a$6(a),(u==="keyboard"||R&&u==="virtual")&&e(a,{containingElement:l.current}));}},U=r=>{e$1(r.currentTarget,r.relatedTarget)||e$3.setFocused(false);},b$3=useRef(false);a(l,b$1,y?r=>{let{detail:u}=r;r.stopPropagation(),e$3.setFocused(true),u?.focusStrategy==="first"&&(b$3.current=true);}:void 0);let E=t.getFirstKey?.()??null;d(()=>{if(b$3.current)if(E==null){let r=f();a$1(l.current),c(r,null),e$3.collection.size>0&&(b$3.current=false);}else e$3.setFocusedKey(E),b$3.current=false;},[E,e$3.collection.size]),d(()=>{e$3.collection.size>0&&(b$3.current=false);},[e$3.focusedKey]),a(l,a$2,y?r=>{r.stopPropagation(),e$3.setFocused(false),r.detail?.clearFocusKey&&e$3.setFocusedKey(null);}:void 0);let M=useRef(i$1),D=useRef(false);useEffect(()=>{if(M.current){let r=null;i$1==="first"&&(r=t.getFirstKey?.()??null),i$1==="last"&&(r=t.getLastKey?.()??null);let u=e$3.selectedKeys;if(u.size){for(let n of u)if(e$3.canSelectItem(n)){r=n;break}}e$3.setFocused(true),e$3.setFocusedKey(r),r==null&&!y&&l.current&&i(l.current),e$3.collection.size>0&&(M.current=false,D.current=true);}});let C=useRef(e$3.focusedKey),S=useRef(null);useEffect(()=>{if(e$3.isFocused&&e$3.focusedKey!=null&&(e$3.focusedKey!==C.current||D.current)&&d$2.current&&l.current){let r=c$1(),u=Y(l,e$3.focusedKey),n=b$2(u);if(!(u instanceof n.HTMLElement))return;(r==="keyboard"||D.current)&&(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{d$2.current&&(d$1(d$2.current,u),r!=="virtual"&&e(u,{containingElement:l.current}));}));}!y&&e$3.isFocused&&e$3.focusedKey==null&&C.current!=null&&l.current&&i(l.current),C.current=e$3.focusedKey,D.current=false;}),useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),a(l,"react-aria-focus-scope-restore",r=>{r.preventDefault(),e$3.setFocused(true);});let A={onKeyDown:g$1,onFocus:F,onBlur:U,onMouseDown(r){d$2.current===g(r)&&r.preventDefault();}},{typeSelectProps:m}=he({keyboardDelegate:t,selectionManager:e$3});Z||(A=c$2(m,A));let z;y||(z=e$3.focusedKey==null?0:-1);let J=Se(e$3.collection);return {collectionProps:c$2(A,{tabIndex:z,"data-collection":J})}}function ht(s){let{id:e,selectionManager:t,key:l,ref:i$1,shouldSelectOnPressUp:v,shouldUseVirtualFocus:K,focus:c,isDisabled:f$1,onAction:p,allowsDifferentPressOrigin:Z,linkBehavior:y="action"}=s,W=n();e=c$3(e);let d=o=>{if(o.pointerType==="keyboard"&&H(o))t.toggleSelection(l);else {if(t.selectionMode==="none")return;if(t.isLink(l)){if(y==="selection"&&i$1.current){let w=t.getItemProps(l);W.open(i$1.current,o,w.href,w.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(y==="override"||y==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):o&&o.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||o&&(e$2(o)||o.pointerType==="touch"||o.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l);}};useEffect(()=>{l===t.focusedKey&&t.isFocused&&(K?a$1(i$1.current):c?c():f(a$3(i$1.current))!==i$1.current&&i$1.current&&i(i$1.current));},[i$1,l,t.focusedKey,t.childFocusStrategy,t.isFocused,K]),f$1=f$1||t.isDisabled(l);let T={};!K&&!f$1?T={tabIndex:l===t.focusedKey?0:-1,onFocus(o){g(o)===i$1.current&&t.setFocusedKey(l);}}:f$1&&(T.onMouseDown=o=>{o.preventDefault();}),useEffect(()=>{f$1&&t.focusedKey===l&&t.setFocusedKey(null);},[t,f$1,l]);let R=t.isLink(l)&&y==="override",L=p&&s.UNSTABLE_itemBehavior==="action",_=t.isLink(l)&&y!=="selection"&&y!=="none",g$1=!f$1&&t.canSelectItem(l)&&!R&&!L,k=(p||_)&&!f$1,F=k&&(t.selectionBehavior==="replace"?!g$1:!g$1||t.isEmpty),U=k&&g$1&&t.selectionBehavior==="replace",b=F||U,E=useRef(null),M=b&&g$1,D=useRef(false),C=useRef(false),S=t.getItemProps(l),A=o=>{p&&(p(),i$1.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),_&&i$1.current&&W.open(i$1.current,o,S.href,S.routerOptions);},m={ref:i$1};if(v?(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,o.pointerType==="keyboard"&&(!b||Ee(o.key))&&d(o);},Z?(m.onPressUp=F?void 0:o=>{o.pointerType==="mouse"&&g$1&&d(o);},m.onPress=F?A:o=>{o.pointerType!=="keyboard"&&o.pointerType!=="mouse"&&g$1&&d(o);}):m.onPress=o=>{if(F||U&&o.pointerType!=="mouse"){if(o.pointerType==="keyboard"&&!Te(o.key))return;A(o);}else o.pointerType!=="keyboard"&&g$1&&d(o);}):(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,C.current=F,g$1&&(o.pointerType==="mouse"&&!F||o.pointerType==="keyboard"&&(!k||Ee(o.key)))&&d(o);},m.onPress=o=>{(o.pointerType==="touch"||o.pointerType==="pen"||o.pointerType==="virtual"||o.pointerType==="keyboard"&&b&&Te(o.key)||o.pointerType==="mouse"&&C.current)&&(b?A(o):g$1&&d(o));}),T["data-collection"]=Fe(t.collection),T["data-key"]=l,m.preventFocusOnPress=K,K&&(m=c$2(m,{onPressStart(o){o.pointerType!=="touch"&&(t.setFocused(true),t.setFocusedKey(l));},onPress(o){o.pointerType==="touch"&&(t.setFocused(true),t.setFocusedKey(l));}})),S)for(let o of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])S[o]&&(m[o]=a$4(m[o],S[o]));let{pressProps:z,isPressed:J}=d$2(m),r=U?o=>{E.current==="mouse"&&(o.stopPropagation(),o.preventDefault(),A(o));}:void 0,{longPressProps:u}=a$5({isDisabled:!M,onLongPress(o){o.pointerType==="touch"&&(d(o),t.setSelectionBehavior("toggle"));}}),n$1=o=>{E.current==="touch"&&D.current&&o.preventDefault();},a=y!=="none"&&t.isLink(l)?o$1=>{o.isOpening||o$1.preventDefault();}:void 0;return {itemProps:c$2(T,g$1||F||K&&!f$1?z:{},M?u:{},{onDoubleClick:r,onDragStartCapture:n$1,onClick:a,id:e},K?{onMouseDown:o=>o.preventDefault()}:void 0),isPressed:J,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focusedKey===l,isDisabled:f$1,allowsSelection:g$1,hasAction:b}}function Te(s){return s==="Enter"}function Ee(s){return s===" "}export{Y as a,he as b,it as c,ht as d};
|
|
10
|
+
function H(s){return h()?s.altKey:s.ctrlKey}function Y(s,e){let t=`[data-key="${CSS.escape(String(e))}"]`,l=s.current?.dataset.collection;return l&&(t=`[data-collection="${CSS.escape(l)}"]${t}`),s.current?.querySelector(t)}var be=new WeakMap;function Se(s){let e=c$3();return be.set(s,e),e}function Fe(s){return be.get(s)}var Pe=1e3;function he(s){let{keyboardDelegate:e,selectionManager:t,onTypeSelect:l}=s,i=useRef({search:"",timeout:void 0}),v=c=>{if(i.current.search.length>0&&c.key===" "){if(c.preventDefault(),(!("continuePropagation"in c)||"continuePropagation"in c&&!c.isPropagationStopped())&&c.stopPropagation(),i.current.search+=" ",e.getKeyForSearch!=null){let f=e.getKeyForSearch(i.current.search,t.focusedKey);f==null&&(f=e.getKeyForSearch(i.current.search)),f!=null&&(t.setFocusedKey(f),l&&l(f));}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}},K=c=>{let f=Oe(c.key);if(!(!f||c.ctrlKey||c.metaKey||c.altKey||!e$1(c.currentTarget,g(c))||i.current.search.length===0&&f===" ")){if(i.current.search+=f,e.getKeyForSearch!=null){let p=e.getKeyForSearch(i.current.search,t.focusedKey);if(p==null&&(p=e.getKeyForSearch(i.current.search)),p!=null)t.setFocusedKey(p),l&&l(p),c.preventDefault(),"continuePropagation"in c||c.stopPropagation();else {i.current.search="",clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search="";},Pe);}};return useEffect(()=>{let c=i.current.timeout;return ()=>{clearTimeout(c);}},[i]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?v:void 0,onKeyDown:e.getKeyForSearch?K:void 0}}}function Oe(s){return s.length===1||!/^[A-Z]/i.test(s)?s:""}function it(s){let{selectionManager:e$2,keyboardDelegate:t,ref:l,autoFocus:i$1=false,shouldFocusWrap:v=false,disallowEmptySelection:K=false,disallowSelectAll:c$3=false,escapeKeyBehavior:f$2="clearSelection",selectOnFocus:p=e$2.selectionBehavior==="replace",disallowTypeAhead:Z=false,shouldUseVirtualFocus:y,allowsTabNavigation:W=false,scrollRef:d$2=l,linkBehavior:T="action",UNSTABLE_focusOnEntry:R}=s,{direction:L}=b(),_=n(),g$1=r=>{if(r.altKey&&r.key==="Tab"&&r.preventDefault(),!l.current||!e$1(l.current,g(r)))return;let u=(n,a)=>{if(n!=null){if(e$2.isLink(n)&&T==="selection"&&p&&!H(r)){flushSync(()=>{e$2.setFocusedKey(n,a);});let o=Y(l,n),w=e$2.getItemProps(n);o&&_.open(o,r,w.href,w.routerOptions);return}if(e$2.setFocusedKey(n,a),e$2.isLink(n)&&T==="override")return;r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&!H(r)&&e$2.replaceSelection(n);}};switch(r.key){case "ArrowDown":{if(t.getKeyBelow){let n=e$2.focusedKey!=null?t.getKeyBelow?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowUp":{if(t.getKeyAbove){let n=e$2.focusedKey!=null?t.getKeyAbove?.(e$2.focusedKey):t.getLastKey?.();n==null&&v&&(n=t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n));}break}case "ArrowLeft":{if(t.getKeyLeftOf){let n=e$2.focusedKey!=null?t.getKeyLeftOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getFirstKey?.(e$2.focusedKey):t.getLastKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"first":"last"));}break}case "ArrowRight":{if(t.getKeyRightOf){let n=e$2.focusedKey!=null?t.getKeyRightOf?.(e$2.focusedKey):t.getFirstKey?.();n==null&&v&&(n=L==="rtl"?t.getLastKey?.(e$2.focusedKey):t.getFirstKey?.(e$2.focusedKey)),n!=null&&(r.preventDefault(),u(n,L==="rtl"?"last":"first"));}break}case "Home":if(t.getFirstKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getFirstKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "End":if(t.getLastKey){if(e$2.focusedKey===null&&r.shiftKey)return;r.preventDefault();let n=t.getLastKey(e$2.focusedKey,f$1(r));e$2.setFocusedKey(n),n!=null&&(f$1(r)&&r.shiftKey&&e$2.selectionMode==="multiple"?e$2.extendSelection(n):p&&e$2.replaceSelection(n));}break;case "PageDown":if(t.getKeyPageBelow&&e$2.focusedKey!=null){let n=t.getKeyPageBelow(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "PageUp":if(t.getKeyPageAbove&&e$2.focusedKey!=null){let n=t.getKeyPageAbove(e$2.focusedKey);n!=null&&(r.preventDefault(),u(n));}break;case "a":f$1(r)&&e$2.selectionMode==="multiple"&&c$3!==true&&(r.preventDefault(),e$2.selectAll());break;case "Escape":f$2==="clearSelection"&&!K&&e$2.selectedKeys.size!==0&&(r.stopPropagation(),r.preventDefault(),e$2.clearSelection());break;case "Tab":if(!W){if(r.shiftKey)l.current.focus();else {let n=d$3(l.current,{tabbable:true}),a,o;do o=n.lastChild(),o&&(a=o);while(o);let w=a$3(l.current),Q=f(w);a&&(!e$1(a,Q)||Q&&!c$4(Q))&&a$6(a);}break}}},k=useRef({top:0,left:0});a(d$2,"scroll",()=>{k.current={top:d$2.current?.scrollTop??0,left:d$2.current?.scrollLeft??0};});let F=r=>{if(e$2.isFocused){e$1(r.currentTarget,g(r))||e$2.setFocused(false);return}if(!e$1(r.currentTarget,g(r)))return;let u=c$1();e$2.setFocused(true);let n=a=>{a!=null&&(e$2.setFocusedKey(a),p&&!e$2.isSelected(a)&&e$2.replaceSelection(a));};if(R&&(u==="keyboard"||u==="virtual"))n(R==="first"?t.getFirstKey?.():t.getLastKey?.());else if(e$2.focusedKey==null){let a=r.relatedTarget;a&&r.currentTarget.compareDocumentPosition(a)&Node.DOCUMENT_POSITION_FOLLOWING?n(e$2.lastSelectedKey??t.getLastKey?.()):n(e$2.firstSelectedKey??t.getFirstKey?.());}else d$2.current&&(d$2.current.scrollTop=k.current.top,d$2.current.scrollLeft=k.current.left);if(e$2.focusedKey!=null&&d$2.current){let a=Y(l,e$2.focusedKey),o=b$2(a);a instanceof o.HTMLElement&&(!e$1(a,f(o.document))&&!y&&a$6(a),(u==="keyboard"||R&&u==="virtual")&&e(a,{containingElement:l.current}));}},U=r=>{e$1(r.currentTarget,r.relatedTarget)||e$2.setFocused(false);},b$3=useRef(false);a(l,b$1,y?r=>{let{detail:u}=r;r.stopPropagation(),e$2.setFocused(true),u?.focusStrategy==="first"&&(b$3.current=true);}:void 0);let E=t.getFirstKey?.()??null;d(()=>{if(b$3.current)if(E==null){let r=f();a$1(l.current),c(r,null),e$2.collection.size>0&&(b$3.current=false);}else e$2.setFocusedKey(E),b$3.current=false;},[E,e$2.collection.size]),d(()=>{e$2.collection.size>0&&(b$3.current=false);},[e$2.focusedKey]),a(l,a$2,y?r=>{r.stopPropagation(),e$2.setFocused(false),r.detail?.clearFocusKey&&e$2.setFocusedKey(null);}:void 0);let M=useRef(i$1),D=useRef(false);useEffect(()=>{if(M.current){let r=null;i$1==="first"&&(r=t.getFirstKey?.()??null),i$1==="last"&&(r=t.getLastKey?.()??null);let u=e$2.selectedKeys;if(u.size){for(let n of u)if(e$2.canSelectItem(n)){r=n;break}}e$2.setFocused(true),e$2.setFocusedKey(r),r==null&&!y&&l.current&&i(l.current),e$2.collection.size>0&&(M.current=false,D.current=true);}});let C=useRef(e$2.focusedKey),S=useRef(null);useEffect(()=>{if(e$2.isFocused&&e$2.focusedKey!=null&&(e$2.focusedKey!==C.current||D.current)&&d$2.current&&l.current){let r=c$1(),u=Y(l,e$2.focusedKey),n=b$2(u);if(!(u instanceof n.HTMLElement))return;(r==="keyboard"||D.current)&&(S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{d$2.current&&(d$1(d$2.current,u),r!=="virtual"&&e(u,{containingElement:l.current}));}));}!y&&e$2.isFocused&&e$2.focusedKey==null&&C.current!=null&&l.current&&i(l.current),C.current=e$2.focusedKey,D.current=false;}),useEffect(()=>()=>{S.current&&cancelAnimationFrame(S.current);},[]),a(l,"react-aria-focus-scope-restore",r=>{r.preventDefault(),e$2.setFocused(true);});let A={onKeyDown:g$1,onFocus:F,onBlur:U,onMouseDown(r){d$2.current===g(r)&&r.preventDefault();}},{typeSelectProps:m}=he({keyboardDelegate:t,selectionManager:e$2});Z||(A=c$2(m,A));let z;y||(z=e$2.focusedKey==null?0:-1);let J=Se(e$2.collection);return {collectionProps:c$2(A,{tabIndex:z,"data-collection":J})}}function ht(s){let{id:e,selectionManager:t,key:l,ref:i$1,shouldSelectOnPressUp:v,shouldUseVirtualFocus:K,focus:c,isDisabled:f$2,onAction:p,allowsDifferentPressOrigin:Z,linkBehavior:y="action"}=s,W=n();e=c$3(e);let d=o=>{if(o.pointerType==="keyboard"&&H(o))t.toggleSelection(l);else {if(t.selectionMode==="none")return;if(t.isLink(l)){if(y==="selection"&&i$1.current){let w=t.getItemProps(l);W.open(i$1.current,o,w.href,w.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(y==="override"||y==="none")return}t.selectionMode==="single"?t.isSelected(l)&&!t.disallowEmptySelection?t.toggleSelection(l):t.replaceSelection(l):o&&o.shiftKey?t.extendSelection(l):t.selectionBehavior==="toggle"||o&&(f$1(o)||o.pointerType==="touch"||o.pointerType==="virtual")?t.toggleSelection(l):t.replaceSelection(l);}};useEffect(()=>{l===t.focusedKey&&t.isFocused&&(K?a$1(i$1.current):c?c():f(a$3(i$1.current))!==i$1.current&&i$1.current&&i(i$1.current));},[i$1,l,t.focusedKey,t.childFocusStrategy,t.isFocused,K]),f$2=f$2||t.isDisabled(l);let T={};!K&&!f$2?T={tabIndex:l===t.focusedKey?0:-1,onFocus(o){g(o)===i$1.current&&t.setFocusedKey(l);}}:f$2&&(T.onMouseDown=o=>{o.preventDefault();}),useEffect(()=>{f$2&&t.focusedKey===l&&t.setFocusedKey(null);},[t,f$2,l]);let R=t.isLink(l)&&y==="override",L=p&&s.UNSTABLE_itemBehavior==="action",_=t.isLink(l)&&y!=="selection"&&y!=="none",g$1=!f$2&&t.canSelectItem(l)&&!R&&!L,k=(p||_)&&!f$2,F=k&&(t.selectionBehavior==="replace"?!g$1:!g$1||t.isEmpty),U=k&&g$1&&t.selectionBehavior==="replace",b=F||U,E=useRef(null),M=b&&g$1,D=useRef(false),C=useRef(false),S=t.getItemProps(l),A=o=>{p&&(p(),i$1.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:true}))),_&&i$1.current&&W.open(i$1.current,o,S.href,S.routerOptions);},m={ref:i$1};if(v?(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,o.pointerType==="keyboard"&&(!b||Ee(o.key))&&d(o);},Z?(m.onPressUp=F?void 0:o=>{o.pointerType==="mouse"&&g$1&&d(o);},m.onPress=F?A:o=>{o.pointerType!=="keyboard"&&o.pointerType!=="mouse"&&g$1&&d(o);}):m.onPress=o=>{if(F||U&&o.pointerType!=="mouse"){if(o.pointerType==="keyboard"&&!Te(o.key))return;A(o);}else o.pointerType!=="keyboard"&&g$1&&d(o);}):(m.onPressStart=o=>{E.current=o.pointerType,D.current=M,C.current=F,g$1&&(o.pointerType==="mouse"&&!F||o.pointerType==="keyboard"&&(!k||Ee(o.key)))&&d(o);},m.onPress=o=>{(o.pointerType==="touch"||o.pointerType==="pen"||o.pointerType==="virtual"||o.pointerType==="keyboard"&&b&&Te(o.key)||o.pointerType==="mouse"&&C.current)&&(b?A(o):g$1&&d(o));}),T["data-collection"]=Fe(t.collection),T["data-key"]=l,m.preventFocusOnPress=K,K&&(m=c$2(m,{onPressStart(o){o.pointerType!=="touch"&&(t.setFocused(true),t.setFocusedKey(l));},onPress(o){o.pointerType==="touch"&&(t.setFocused(true),t.setFocusedKey(l));}})),S)for(let o of ["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])S[o]&&(m[o]=a$4(m[o],S[o]));let{pressProps:z,isPressed:J}=d$2(m),r=U?o=>{E.current==="mouse"&&(o.stopPropagation(),o.preventDefault(),A(o));}:void 0,{longPressProps:u}=a$5({isDisabled:!M,onLongPress(o){o.pointerType==="touch"&&(d(o),t.setSelectionBehavior("toggle"));}}),n$1=o=>{E.current==="touch"&&D.current&&o.preventDefault();},a=y!=="none"&&t.isLink(l)?o$1=>{o.isOpening||o$1.preventDefault();}:void 0;return {itemProps:c$2(T,g$1||F||K&&!f$2?z:{},M?u:{},{onDoubleClick:r,onDragStartCapture:n$1,onClick:a,id:e},K?{onMouseDown:o=>o.preventDefault()}:void 0),isPressed:J,isSelected:t.isSelected(l),isFocused:t.isFocused&&t.focusedKey===l,isDisabled:f$2,allowsSelection:g$1,hasAction:b}}function Te(s){return s==="Enter"}function Ee(s){return s===" "}export{Y as a,he as b,it as c,ht as d};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-O7XK2WIX.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import l,{useLayoutEffect}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var C="_1w920rnf _1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6g9 _1yep5z6iw _1yep5z6ix _1yep5z6iy",x=a({defaultClassName:"_1w920rng",variantClassNames:{isVirtualized:{true:"_1w920rnh",false:"_1w920rni"}},defaultVariants:{},compoundVariants:[]}),j="_1w920rn1 _1yep5z6jb _1yep5z6jc _1yep5z6jd _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",k=a({defaultClassName:"_1w920rnc",variantClassNames:{isLoading:{false:"_1w920rnd"}},defaultVariants:{},compoundVariants:[]}),N="_1w920rnb _1yep5z6m4 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",V="_1w920rn0 _1yep5z63l _1yep5z63m _1yep5z63n _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z69 _1yep5z6a _1yep5z6b _1yep5z62l _1yep5z62m _1yep5z62n _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jh _1yep5z6ji _1yep5z6jj _1yep5z6lu",R=a({defaultClassName:"_1w920rn2 _1yep5z6d6 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6it _1yep5z6iu _1yep5z6iv",variantClassNames:{isFocusVisible:{true:"_1yep5z6m9 _1yep5z6m7 _1yep5z6id"},isSelected:{true:"_1yep5z6m9 _1yep5z6m7 _1yep5z6id"},isLoading:{true:"_1yep5z617c _1yep5z617d _1yep5z617e"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rn6 _1yep5z6m9 _1yep5z6m7 _1yep5z6id"]]}),F=a({defaultClassName:"_1w920rn7 _1yep5z63o _1yep5z63p _1yep5z63q _1yep5z61c _1yep5z61d _1yep5z61e _1yep5z63 _1yep5z64 _1yep5z65 _1yep5z62f _1yep5z62g _1yep5z62h _1yep5z6ar _1yep5z6as _1yep5z6at _1yep5z6bf _1yep5z6bg _1yep5z6bh _1yep5z6c3 _1yep5z6c4 _1yep5z6c5 _1yep5z6cr _1yep5z6cs _1yep5z6ct _1yep5z6gd _1yep5z6ey _1yep5z6dy",variantClassNames:{isFocusVisible:{true:"_1w920rn8 _1yep5z6m9 _1yep5z6m7 _1yep5z6id"},isSelected:{true:"_1w920rn9"}},defaultVariants:{},compoundVariants:[[{isFocusVisible:true,isSelected:true},"_1w920rna _1yep5z61va _1yep5z61v9 _1yep5z61rg"]]}),s="_1w920rne";var P=({items:n,containerClassName:i,previewClassName:z,itemDataAttribute:p,showCount:u=false,renderFallback:c})=>{let{length:o}=n,r=l.useRef(null),[d,_]=l.useState(false),a=n.at(-1);return useLayoutEffect(()=>{if(!r.current)return;let t=r.current.closest(i)?.querySelector(`[${p}='${a?.key}']`)?.cloneNode(true);if(!t){_(true);return}return _(false),r.current.prepend(t),()=>{t.remove();}},[a?.key,i,p]),jsxs("div",{className:z,ref:r,children:[d&&a?c?.(a):null,u&&o>1?jsx(a$1,{backgroundColor:"background.secondary.medium",borderRadius:"full",typography:"label.md.medium",color:"text.primary",position:"absolute",paddingX:"md",className:s,children:o}):null]})};export{C as a,x as b,j as c,k as d,N as e,V as f,R as g,F as h,P as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {c as c$1,b}from'./chunk-
|
|
1
|
+
import {c as c$1,b}from'./chunk-QSSCSN5S.mjs';import {a}from'./chunk-V37GPPZD.mjs';import {d}from'./chunk-UBFMOTBM.mjs';import {a as a$1}from'./chunk-34TYNTXM.mjs';import {d as d$1}from'./chunk-KUEDQO7P.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {e as e$2,b as b$2}from'./chunk-MVK5CB64.mjs';import {i as i$1,b as b$3}from'./chunk-Y4DRSGEJ.mjs';import {p,c as c$3}from'./chunk-MRJFGHFW.mjs';import {c as c$2,a as a$3}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-KEVERVHK.mjs';import {c,e}from'./chunk-JDLUGVXG.mjs';import {g,i,f,a as a$4,e as e$1}from'./chunk-AUOQSTS5.mjs';import {useRef}from'react';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-IVC2BJRU.mjs';import {d,c}from'./chunk-KCHAWPUN.mjs';import {d as d$2}from'./chunk-7MQBBSZ2.mjs';import {a as a$5}from'./chunk-FP5EWPOF.mjs';import {a as a$4}from'./chunk-TK4QXU3W.mjs';import {a as a$7}from'./chunk-YX2ASVM3.mjs';import {a as a$1}from'./chunk-F3HQNHR5.mjs';import {a as a$8}from'./chunk-V3L4SVVF.mjs';import {b}from'./chunk-QR2AF3KT.mjs';import {h,g,f,e,a as a$9,c as c$3,d as d$1}from'./chunk-L6S5GBKS.mjs';import {a as a$a}from'./chunk-66CUIXA6.mjs';import {c as c$2}from'./chunk-MVK5CB64.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-TZ4MVY4E.mjs';import {a as a$3}from'./chunk-JDLUGVXG.mjs';import {a as a$b,b as b$1}from'./chunk-AUOQSTS5.mjs';import {a as a$6}from'./chunk-4QEH5CGK.mjs';import be,{useContext,useMemo,useImperativeHandle,useState,useCallback,useEffect,useRef}from'react';import Be from'react-dom';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {assignInlineVars}from'@vanilla-extract/dynamic';import {motion}from'motion/react';import {themeVars}from'@baseline-ui/tokens';import {useGranularEffect}from'granular-hooks';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,5 +7,5 @@ import {a as a$2}from'./chunk-MFH2E2GU.mjs';import {d,c}from'./chunk-KCHAWPUN.mj
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var Pe=({children:r,isOpen:t,popoverContent:n,portalContainer:a,style:e})=>{let[o,p]=useState(false),[s,m]=useState(null),
|
|
10
|
+
var Pe=({children:r,isOpen:t,popoverContent:n,portalContainer:a,style:e})=>{let[o,p]=useState(false),[s,m]=useState(null),l=useRef(null),{setIsPopoverSafelyClosed:i}=useContext(d$2);useEffect(()=>{t?(p(true),l.current&&clearTimeout(l.current)):l.current=setTimeout(()=>{p(false);},300);},[t]),useEffect(()=>()=>{l.current&&clearTimeout(l.current);},[]);let c=a??(n?a$b(n).body:null),f=useRef(null);return c&&(f.current=c),useEffect(()=>{n&&m(n.getBoundingClientRect());},[n]),useEffect(()=>{i(!o);},[o,i]),jsxs(Fragment,{children:[o?Be.createPortal(jsx("div",{"aria-hidden":true,style:{position:"absolute",left:e?.left,top:e?.top,width:s?.width,height:s?.height,zIndex:e?.zIndex?+e.zIndex-1:void 0},className:"BaselineUI-Popover-ClickPreventionLayer","data-testid":"event-leak-prevention-layer"}),f.current??a$b(n).body):null,r]})};var{color:R}=themeVars,ye=({placement:r,arrowProps:t})=>jsxs(Fragment,{children:[jsxs("svg",{...t,className:a$6(t.className,c$3({placement:r}),"BaselineUI-PopoverContent-Arrow"),style:{...t.style,position:"absolute"},width:"15",height:"9",viewBox:"0 0 15 9",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-testid":"arrow",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.019 0h1.228l6.272 7.237L13.791 0h1.228v1h-.772L7.519 8.763.791 1H.019V0Z",fill:R.border.medium}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:R.background.primary.subtle,stroke:R.background.primary.subtle})]}),jsxs("svg",{...t,className:a$6(t.className,d$1({placement:r}),"BaselineUI-PopoverContent-Arrow-Focused"),width:"15",height:"11",viewBox:"0 0 15 11",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t.style,position:"absolute"},"data-testid":"arrow-focused",children:[jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.543371 2H0V0H1.45663L7.5 6.97312L13.5434 0H15V2H14.4566L7.5 10.0269L0.543371 2Z",fill:R.border.interactive.enabled}),jsx("path",{d:"M7.504 6.492 2.248.488h10.511L10.132 3.49 7.504 6.492Z",fill:R.background.primary.subtle,stroke:R.background.primary.subtle})]})]});function ge({triggerRef:r,updatePosition:t,isOpen:n,boundaryElement:a,isDisabled:e=false}){let o=useRef(null),p=useRef(t);p.current=t;let s=useCallback(()=>{o.current&&cancelAnimationFrame(o.current),o.current=requestAnimationFrame(()=>{p.current(),o.current=null;});},[]);useGranularEffect(()=>{if(!n||e||!r.current)return;let m=a$b(r.current),l=b$1(m.body),i=[];l.addEventListener("scroll",s,true),i.push([l,"scroll"]);let c=new Set;a&&c.add(a);let f=c$2(r.current),C=new Set([...c,...f]);for(let u of C)u!==m.body&&(u.addEventListener("scroll",s,true),i.push([u,"scroll"]));return ()=>{o.current&&(cancelAnimationFrame(o.current),o.current=null);for(let[u,b]of i)u.removeEventListener(b,s,true);}},[n,e,a],[s,r]);}var et=["top","bottom","left","right"],z=be.forwardRef(({portalClassName:r,portalStyle:t,className:n,style:a$9,state:e$1,overlayProps:o,underlayClassName:p,children:s,includeArrow:m=false,offset:l=2,portalContainer:i,contentContainerClassName:c$2,contentContainerStyle:f$1,setPopoverStyle:C,"data-block-id":u,"data-block-class":b$1,disableAnimation:x,popoverContainerRef:A,shouldContainFocus:Le,arrowClassName:W,arrowStyle:V,disableFocusManagement:we,boundaryElement:H,boundaryAxis:Oe,horizontalBoundaryBehavior:Me,shouldRepositionOnScroll:_=false,elementHandle:Se,...y},De)=>{let Z=a(A),Te=a$1(i),{container:N,shouldUseContainerAsBoundary:q}=useContext(b),G=useMemo(()=>H===void 0?q&&N?N:void 0:H,[H,q,N]),ke=m?8:0,{underlayProps:xe,popoverProps:v,placement:w,arrowProps:O,updatePosition:I}=a$2({...y,offset:l+ke,popoverRef:Z,containerPadding:y.containerPadding||0,boundaryElement:G,boundaryAxis:Oe,horizontalBoundaryBehavior:Me,shouldCloseOnScroll:!_},e$1);ge({triggerRef:y.triggerRef,updatePosition:I,isOpen:e$1.isOpen,boundaryElement:G,isDisabled:!_}),useImperativeHandle(Se,()=>({updatePosition:I}),[I]),delete v.style?.position;let[J,X]=useState();a$3(()=>{let g=y.triggerRef.current;g&&X(g.offsetWidth);},[y.triggerRef]);let Ae=useCallback(g=>{X(g.target.offsetWidth);},[]);a$4({ref:y.triggerRef,isDisabled:!e$1.isOpen,onResize:Ae});let He=(w==="center"?"bottom":w)||"bottom",d$1=useMemo(()=>({isOpen:e$1.isOpen}),[e$1.isOpen]),{transitionProps:Ne}=a$5({placement:w||"bottom",isDisabled:x}),F=useMemo(()=>({...v.style,...assignInlineVars({[h]:`${J??0}px`}),...d(a$9,d$1)}),[v.style,J,a$9,d$1]);useEffect(()=>{C({left:v.style?.left,top:v.style?.top,zIndex:F.zIndex});},[v.style?.left,v.style?.top,C,F.zIndex]);let Ie=useMemo(()=>({...O,className:a$6(O.className,c(W,d$1)),style:{...O.style,...d(V,d$1)}}),[O,W,V,d$1]);return jsxs(a$7,{portalContainer:Te,style:t,className:r,ref:De,"data-block-id":u,"data-block-class":b$1,shouldContainFocus:Le,disableFocusManagement:we,children:[!y.isNonModal&&jsx("div",{...xe,className:a$6(g,c(p,d$1),"BaselineUI-Popover-Underlay")}),jsxs(motion.div,{...c$1(v,Ne),style:F,ref:Z,className:a$6(e,c(n,d$1),"BaselineUI-Popover-ContentContainer"),"data-placement":et.find(g=>w?.includes(g))??"",children:[m?jsx(ye,{placement:He,arrowProps:Ie}):null,jsx(a$8,{onDismiss:e$1.close}),jsx("div",{...o,style:d(f$1,d$1),className:a$6(f,c(c$2,d$1),"BaselineUI-Popover-Content"),children:typeof s=="function"?s(e$1):s}),jsx(a$8,{onDismiss:e$1.close})]})]})});z.displayName="PopoverContentCore";var ot=be.forwardRef(({state:r,overlayProps:t,portalContainer:n,...a},e)=>{let{state:o,overlayTriggerAria:{overlayProps:p},triggerRef:s}=useContext(a$9),[m,l]=useState({}),i=a$1(n),c=r||o,f=a.triggerRef||s,C=t||p;a$a(f);let[u,b]=useState(null),x=be.useCallback(A=>{b(A);},[i]);return jsx(Pe,{isOpen:c?.isOpen??false,popoverContent:u,portalContainer:i,style:m,children:c?.isOpen?jsx(z,{ref:e,...a,triggerRef:f,overlayProps:C,state:c,portalContainer:i,setPopoverStyle:l,popoverContainerRef:x}):null})});ot.displayName="PopoverContent";
|
|
11
11
|
export{ot as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b as b$1}from'./chunk-
|
|
1
|
+
import {b as b$1}from'./chunk-TCCQDGMI.mjs';import {a as a$1}from'./chunk-2UUKKXBD.mjs';import {a}from'./chunk-ZGRRD3TU.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {c}from'./chunk-TZ4MVY4E.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {MotionConfig,MotionGlobalConfig}from'motion/react';export{MotionGlobalConfig as f}from'motion/react';import {lightTheme,themes,themeVars}from'@baseline-ui/tokens';import {assignInlineVars}from'@vanilla-extract/dynamic';import J,{createContext,useMemo,useEffect,useState}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {b}from'./chunk-
|
|
1
|
+
import {b}from'./chunk-NUYBQ7KP.mjs';import {c}from'./chunk-UBFMOTBM.mjs';import {a}from'./chunk-USMC34OO.mjs';import {useMemo}from'react';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|