@baseline-ui/core 3.2.1 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.css +1 -1
- package/dist/Accordion.mjs +1 -1
- package/dist/ActionButton.css +1 -1
- package/dist/ActionButton.mjs +1 -1
- package/dist/ActionGroup.css +1 -1
- package/dist/ActionGroup.mjs +1 -1
- package/dist/ActionIconButton.css +1 -1
- package/dist/ActionIconButton.mjs +1 -1
- package/dist/Actionable.mjs +1 -1
- package/dist/AlertDialog.css +1 -1
- package/dist/AlertDialog.mjs +1 -1
- package/dist/AudioPlayer.css +1 -1
- package/dist/AudioPlayer.mjs +1 -1
- package/dist/Avatar.mjs +1 -1
- package/dist/ButtonSelect.css +1 -1
- package/dist/ButtonSelect.mjs +1 -1
- package/dist/Calendar.css +1 -1
- package/dist/Calendar.mjs +1 -1
- package/dist/Checkbox.mjs +1 -1
- package/dist/ColorInput.css +1 -1
- package/dist/ColorInput.mjs +1 -1
- package/dist/ColorSwatch.mjs +1 -1
- package/dist/ColorSwatchPicker.mjs +1 -1
- package/dist/ComboBox.css +1 -1
- package/dist/ComboBox.mjs +1 -1
- package/dist/DateField.css +1 -1
- package/dist/DateField.mjs +1 -1
- package/dist/DateFormat.mjs +1 -1
- package/dist/Dialog.css +1 -1
- package/dist/Dialog.mjs +1 -1
- package/dist/Disclosure.mjs +1 -1
- package/dist/DomNodeRenderer.mjs +1 -1
- package/dist/Drawer.css +1 -1
- package/dist/Drawer.mjs +1 -1
- package/dist/Editor.css +1 -1
- package/dist/Editor.mjs +1 -1
- package/dist/FileInput.css +1 -1
- package/dist/FileInput.mjs +1 -1
- package/dist/FileList.css +1 -1
- package/dist/FileList.mjs +1 -1
- package/dist/FileUploader.css +1 -1
- package/dist/FileUploader.mjs +1 -1
- package/dist/FrameProvider.mjs +1 -1
- package/dist/FreehandCanvas.css +1 -1
- package/dist/FreehandCanvas.mjs +1 -1
- package/dist/GridList.mjs +1 -1
- package/dist/Group.mjs +1 -1
- package/dist/I18nProvider.mjs +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/ImageDropZone.css +1 -1
- package/dist/ImageDropZone.mjs +1 -1
- package/dist/ImageGallery.css +1 -1
- package/dist/ImageGallery.mjs +1 -1
- package/dist/InlineAlert.css +1 -1
- package/dist/InlineAlert.mjs +1 -1
- package/dist/InlineToolbar.mjs +2 -2
- package/dist/Kbd.mjs +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/ListBox.mjs +1 -1
- package/dist/Menu.css +1 -1
- package/dist/Menu.mjs +1 -1
- package/dist/MessageFormat.mjs +1 -1
- package/dist/Modal.mjs +1 -1
- package/dist/NumberFormat.mjs +1 -1
- package/dist/NumberInput.css +1 -1
- package/dist/NumberInput.mjs +1 -1
- package/dist/Pagination.css +1 -1
- package/dist/Pagination.mjs +1 -1
- package/dist/Panel.mjs +1 -1
- package/dist/PointPicker.mjs +1 -1
- package/dist/Popover.mjs +1 -1
- package/dist/Portal.mjs +1 -1
- package/dist/Preview.css +1 -1
- package/dist/Preview.mjs +1 -1
- package/dist/ProgressBar.mjs +1 -1
- package/dist/ProgressSpinner.mjs +1 -1
- package/dist/RadioGroup.mjs +1 -1
- package/dist/Reaction.mjs +1 -1
- package/dist/ScrollControlButton.mjs +1 -1
- package/dist/SearchInput.css +1 -1
- package/dist/SearchInput.mjs +1 -1
- package/dist/Select.css +1 -1
- package/dist/Select.mjs +1 -1
- package/dist/Separator.mjs +1 -1
- package/dist/Slider.css +1 -1
- package/dist/Slider.mjs +1 -1
- package/dist/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.css +1 -1
- package/dist/Tabs.mjs +1 -1
- package/dist/Tag.mjs +1 -1
- package/dist/TagGroup.mjs +1 -1
- package/dist/TaggedPagination.css +1 -1
- package/dist/TaggedPagination.mjs +1 -1
- package/dist/Text.mjs +1 -1
- package/dist/TextInput.mjs +1 -1
- package/dist/ThemeProvider.mjs +1 -1
- package/dist/TimeField.mjs +1 -1
- package/dist/Toast.css +1 -1
- package/dist/Toast.mjs +1 -1
- package/dist/ToggleButton.css +1 -1
- package/dist/ToggleButton.mjs +1 -1
- package/dist/ToggleIconButton.mjs +1 -1
- package/dist/Toolbar.css +1 -1
- package/dist/Toolbar.mjs +1 -1
- package/dist/Tooltip.mjs +1 -1
- package/dist/TreeView.css +1 -1
- package/dist/TreeView.mjs +1 -1
- package/dist/UNSAFE_ListBox.mjs +1 -1
- package/dist/Virtualizer.mjs +1 -1
- package/dist/{chunk-UUBOEBYZ.mjs → chunk-22MA6EYO.mjs} +1 -1
- package/dist/{chunk-3UH5CQQF.mjs → chunk-22VRCVTH.mjs} +2 -2
- package/dist/chunk-235S3EB7.mjs +10 -0
- package/dist/chunk-24R46WQW.mjs +10 -0
- package/dist/chunk-2F3CFR22.mjs +10 -0
- package/dist/{chunk-CHTLOFCT.mjs → chunk-2JGVUCP5.mjs} +1 -1
- package/dist/{chunk-4SBMUWOY.mjs → chunk-2LFMBQKQ.mjs} +2 -2
- package/dist/{chunk-TK4QXU3W.mjs → chunk-2VOWBYNS.mjs} +1 -1
- package/dist/{chunk-TO2TQ2LE.mjs → chunk-335C37NB.mjs} +1 -1
- package/dist/{chunk-DAN5WASP.mjs → chunk-36ZMHBG5.mjs} +2 -2
- package/dist/chunk-3BEG3MEX.mjs +10 -0
- package/dist/chunk-3BG6K2G2.mjs +10 -0
- package/dist/{chunk-SNQDFFKP.mjs → chunk-3DWFAHR2.mjs} +1 -1
- package/dist/{chunk-FOEGHU3P.mjs → chunk-3KCSUNRV.mjs} +1 -1
- package/dist/{chunk-TZ4MVY4E.mjs → chunk-3WKDIXCM.mjs} +1 -1
- package/dist/chunk-4AG2RUAZ.mjs +10 -0
- package/dist/{chunk-7OCDKTTZ.mjs → chunk-4EANTENO.mjs} +1 -1
- package/dist/{chunk-JJPCZOOI.mjs → chunk-4EAXDHSV.mjs} +2 -2
- package/dist/{chunk-UQJGSVXP.mjs → chunk-4I7K4CCG.mjs} +2 -2
- package/dist/{chunk-QR2AF3KT.mjs → chunk-4JQUB53Q.mjs} +1 -1
- package/dist/chunk-4MHBLLHV.mjs +11 -0
- package/dist/chunk-4P247R4V.mjs +10 -0
- package/dist/{chunk-RXSYDMT6.mjs → chunk-4QBHQCCK.mjs} +2 -2
- package/dist/chunk-4RSUKS23.mjs +10 -0
- package/dist/chunk-4S4GGUSH.mjs +10 -0
- package/dist/chunk-4W5VP4NV.mjs +10 -0
- package/dist/chunk-5BKC373Y.mjs +10 -0
- package/dist/chunk-5FK5AJ7A.mjs +10 -0
- package/dist/{chunk-FWAK2OZM.mjs → chunk-5KJF7IQN.mjs} +1 -1
- package/dist/{chunk-F2O4AP7P.mjs → chunk-5MUEJ5WI.mjs} +1 -1
- package/dist/{chunk-XZSDCUID.mjs → chunk-5SHHWKFM.mjs} +1 -1
- package/dist/{chunk-WAOWR7MR.mjs → chunk-5USQ6HBY.mjs} +1 -1
- package/dist/{chunk-4DTPDMSQ.mjs → chunk-5VNC6UYE.mjs} +2 -2
- package/dist/chunk-5ZC64ZG7.mjs +10 -0
- package/dist/{chunk-246VHB32.mjs → chunk-6G7EUNZW.mjs} +1 -1
- package/dist/chunk-6QQEK5I6.mjs +10 -0
- package/dist/chunk-76DKF2SK.mjs +10 -0
- package/dist/{chunk-4BYKAG4W.mjs → chunk-7L5UOGZA.mjs} +1 -1
- package/dist/chunk-7MMO7S3R.mjs +10 -0
- package/dist/{chunk-HDVWQ6RL.mjs → chunk-7P7VZMTO.mjs} +1 -1
- package/dist/{chunk-CFLEBB5T.mjs → chunk-7SKQUEHP.mjs} +1 -1
- package/dist/chunk-7SQRBY7N.mjs +10 -0
- package/dist/chunk-7TE4MFKC.mjs +10 -0
- package/dist/chunk-7XGNJE7J.mjs +10 -0
- package/dist/{chunk-UCQJ6FJO.mjs → chunk-AD3MLX6G.mjs} +1 -1
- package/dist/chunk-AELTF2DE.mjs +10 -0
- package/dist/chunk-AI6WQPRX.mjs +10 -0
- package/dist/chunk-AK7XHUQW.mjs +10 -0
- package/dist/chunk-AM5FU4Y7.mjs +10 -0
- package/dist/chunk-AYQN3OH2.mjs +10 -0
- package/dist/chunk-B3EZOXNU.mjs +10 -0
- package/dist/chunk-BBYODNBO.mjs +10 -0
- package/dist/chunk-BGQRLALS.mjs +10 -0
- package/dist/chunk-BGRGRUG4.mjs +10 -0
- package/dist/chunk-BHJCYKFJ.mjs +11 -0
- package/dist/{chunk-K6MB234H.mjs → chunk-BIDNNBRG.mjs} +1 -1
- package/dist/{chunk-RBZ7SIZR.mjs → chunk-BROSGYL3.mjs} +1 -1
- package/dist/chunk-BTPAZDGG.mjs +10 -0
- package/dist/{chunk-TNU3YDGL.mjs → chunk-BXNNVZOQ.mjs} +1 -1
- package/dist/chunk-BYDJXA5A.mjs +10 -0
- package/dist/chunk-C2VP5IEB.mjs +10 -0
- package/dist/{chunk-I3YGB2BE.mjs → chunk-C4WHTPLY.mjs} +2 -2
- package/dist/chunk-CIPPPD6E.mjs +10 -0
- package/dist/{chunk-EU75HMPG.mjs → chunk-CLGLEEFO.mjs} +2 -2
- package/dist/{chunk-MXKP7NQ4.mjs → chunk-COHK4QQW.mjs} +2 -2
- package/dist/chunk-CTSDHAAV.mjs +10 -0
- package/dist/chunk-CU6D2EA6.mjs +10 -0
- package/dist/{chunk-SAZLJ66W.mjs → chunk-CY6W27WG.mjs} +1 -1
- package/dist/{chunk-34TYNTXM.mjs → chunk-D4NW56YQ.mjs} +1 -1
- package/dist/chunk-DAN62T2M.mjs +10 -0
- package/dist/{chunk-KAVZW4RV.mjs → chunk-DAS5QGJX.mjs} +1 -1
- package/dist/{chunk-PAQQ7MQG.mjs → chunk-DF2D7NE6.mjs} +1 -1
- package/dist/{chunk-H2E7GKGB.mjs → chunk-DSV6CCI6.mjs} +2 -2
- package/dist/{chunk-GX2IOGYR.mjs → chunk-DZDZZRWE.mjs} +1 -1
- package/dist/{chunk-3L7GTQXK.mjs → chunk-E22TWF63.mjs} +2 -2
- package/dist/{chunk-DRYSJSKA.mjs → chunk-E3FP4B25.mjs} +1 -1
- package/dist/chunk-ETM4MNG4.mjs +10 -0
- package/dist/chunk-EUVUJQ2Z.mjs +10 -0
- package/dist/chunk-F7WPMQ3P.mjs +16 -0
- package/dist/chunk-FOKMDEP7.mjs +10 -0
- package/dist/chunk-FPFGTGUC.mjs +10 -0
- package/dist/chunk-FPM5UJRF.mjs +10 -0
- package/dist/{chunk-TJEK54BW.mjs → chunk-G77E7EDE.mjs} +1 -1
- package/dist/chunk-GCBMNOA6.mjs +10 -0
- package/dist/chunk-GFKZXGWJ.mjs +10 -0
- package/dist/{chunk-CPSUI4IW.mjs → chunk-GFTIEY5K.mjs} +1 -1
- package/dist/{chunk-IVVZSESM.mjs → chunk-GL5GUKT7.mjs} +2 -2
- package/dist/chunk-GMALMQWI.mjs +10 -0
- package/dist/chunk-GQIS4QBN.mjs +10 -0
- package/dist/chunk-GUPSQSPC.mjs +0 -0
- package/dist/chunk-HH4VLTF3.mjs +10 -0
- package/dist/chunk-I7LPPUZS.mjs +10 -0
- package/dist/chunk-IEOHIOGL.mjs +10 -0
- package/dist/chunk-IHES52NR.mjs +10 -0
- package/dist/{chunk-AGYQLGBZ.mjs → chunk-IIURKT24.mjs} +1 -1
- package/dist/chunk-IUXXTORQ.mjs +10 -0
- package/dist/{chunk-XIXHGXIN.mjs → chunk-IVGNOQSQ.mjs} +1 -1
- package/dist/chunk-IWZXZ5LU.mjs +10 -0
- package/dist/{chunk-HXTAOYOD.mjs → chunk-IXRSSEHQ.mjs} +1 -1
- package/dist/chunk-J4OPD7OL.mjs +10 -0
- package/dist/{chunk-J7RVOP5G.mjs → chunk-JDIGAVFU.mjs} +1 -1
- package/dist/{chunk-NSC53QWT.mjs → chunk-JZXLV6JU.mjs} +1 -1
- package/dist/chunk-K4TTZX4T.mjs +10 -0
- package/dist/{chunk-4ZJMZB5B.mjs → chunk-K5RYVERS.mjs} +1 -1
- package/dist/chunk-K7VOXFSK.mjs +10 -0
- package/dist/{chunk-WL27JGVG.mjs → chunk-KG2EHFYA.mjs} +1 -1
- package/dist/chunk-KGS3UWPG.mjs +10 -0
- package/dist/{chunk-W3ZGXUFP.mjs → chunk-KJ6ZSO3I.mjs} +1 -1
- package/dist/{chunk-AMYRLAIC.mjs → chunk-KT4FTBJ2.mjs} +1 -1
- package/dist/chunk-KUDCYGII.mjs +10 -0
- package/dist/{chunk-YCI6BEXQ.mjs → chunk-KVIV5RTE.mjs} +1 -1
- package/dist/chunk-KX7WG3L4.mjs +10 -0
- package/dist/chunk-LJZ7ZS4C.mjs +10 -0
- package/dist/{chunk-BZTAFNPW.mjs → chunk-LPI2NIDI.mjs} +1 -1
- package/dist/{chunk-2HMLSXNO.mjs → chunk-MBRNO6IW.mjs} +1 -1
- package/dist/chunk-MDE2FQHX.mjs +10 -0
- package/dist/chunk-MFB3SWO7.mjs +29 -0
- package/dist/{chunk-J7K7I5U2.mjs → chunk-MIF6BAPG.mjs} +1 -1
- package/dist/chunk-MYJ733MN.mjs +10 -0
- package/dist/chunk-MZIQ27JP.mjs +10 -0
- package/dist/chunk-NJKSUI2F.mjs +10 -0
- package/dist/chunk-NKC4MIX3.mjs +10 -0
- package/dist/{chunk-XB657BXX.mjs → chunk-NMGKHMH3.mjs} +1 -1
- package/dist/{chunk-TDPODC62.mjs → chunk-NMSOOQB2.mjs} +1 -1
- package/dist/{chunk-GEZGEZAP.mjs → chunk-NQIZ3U7Q.mjs} +2 -2
- package/dist/chunk-NRQSR3G7.mjs +10 -0
- package/dist/{chunk-6Z6HOW6T.mjs → chunk-NUCSMH4S.mjs} +2 -2
- package/dist/chunk-NYCG264A.mjs +10 -0
- package/dist/chunk-NZNOHFLD.mjs +10 -0
- package/dist/chunk-O4DA3TPW.mjs +11 -0
- package/dist/{chunk-4PYEGHW5.mjs → chunk-O7IU5NHN.mjs} +2 -2
- package/dist/chunk-ONEE6UCM.mjs +10 -0
- package/dist/chunk-OQPYPKZV.mjs +10 -0
- package/dist/{chunk-F3HQNHR5.mjs → chunk-OYSOPCTA.mjs} +1 -1
- package/dist/chunk-OZMADP4Z.mjs +10 -0
- package/dist/chunk-P7BN7QDF.mjs +10 -0
- package/dist/chunk-PD5ZXNGT.mjs +10 -0
- package/dist/{chunk-WICBTAMY.mjs → chunk-PG3WDHSK.mjs} +1 -1
- package/dist/chunk-PMDRFB75.mjs +10 -0
- package/dist/chunk-PPHSLODC.mjs +10 -0
- package/dist/chunk-PYV5J322.mjs +11 -0
- package/dist/{chunk-TPNZG6FA.mjs → chunk-Q4SEEMIX.mjs} +1 -1
- package/dist/{chunk-IE3E4KQ6.mjs → chunk-Q6PGYMYI.mjs} +2 -2
- package/dist/chunk-QAAOC64D.mjs +10 -0
- package/dist/chunk-QJYPCVSD.mjs +10 -0
- package/dist/chunk-QU34XSML.mjs +10 -0
- package/dist/chunk-QUQ4VYCN.mjs +10 -0
- package/dist/chunk-R3HHMCE5.mjs +10 -0
- package/dist/chunk-R4MOUAJW.mjs +10 -0
- package/dist/{chunk-CGFLGZL4.mjs → chunk-R6TFTLMV.mjs} +1 -1
- package/dist/{chunk-H4ZIN7W3.mjs → chunk-R7R7JDA3.mjs} +2 -2
- package/dist/{chunk-2NO2ITVE.mjs → chunk-RO5ZRU3Y.mjs} +1 -1
- package/dist/{chunk-AV4ZP5SY.mjs → chunk-RPIUPWPO.mjs} +1 -1
- package/dist/chunk-RXSX2RKA.mjs +10 -0
- package/dist/{chunk-HT55YHTN.mjs → chunk-S2XIFW52.mjs} +2 -2
- package/dist/chunk-S4HLMIFK.mjs +10 -0
- package/dist/{chunk-FTYXFTJV.mjs → chunk-SBR5UAUY.mjs} +2 -2
- package/dist/chunk-SD43KVTU.mjs +10 -0
- package/dist/{chunk-YS3Y5KGV.mjs → chunk-SGZWUG3H.mjs} +2 -2
- package/dist/chunk-SLFKSR3T.mjs +10 -0
- package/dist/chunk-SLSJEMQ4.mjs +10 -0
- package/dist/{chunk-K6X2BHPP.mjs → chunk-STMDFIUL.mjs} +1 -1
- package/dist/chunk-SVIYLH7R.mjs +10 -0
- package/dist/chunk-SVTTHYTR.mjs +10 -0
- package/dist/{chunk-GXOXYPQQ.mjs → chunk-SVV6DLJH.mjs} +1 -1
- package/dist/chunk-SZCVQU55.mjs +10 -0
- package/dist/chunk-SZN2J2ER.mjs +10 -0
- package/dist/{chunk-RM2Y4D2M.mjs → chunk-SZTFMBPY.mjs} +1 -1
- package/dist/chunk-TAT552A5.mjs +10 -0
- package/dist/{chunk-IHLJTHGQ.mjs → chunk-TDYBXLYP.mjs} +1 -1
- package/dist/{chunk-ZNN43VZV.mjs → chunk-TFSBTGTQ.mjs} +2 -2
- package/dist/{chunk-ENDOKA57.mjs → chunk-TH4XPZEO.mjs} +1 -1
- package/dist/chunk-TSHZ7JSR.mjs +10 -0
- package/dist/{chunk-WN6FAICZ.mjs → chunk-TUJLNJPJ.mjs} +2 -2
- package/dist/chunk-TUY23KMK.mjs +10 -0
- package/dist/{chunk-LQMEFFFM.mjs → chunk-U3T5JTZ7.mjs} +1 -1
- package/dist/chunk-UDMNDUBO.mjs +10 -0
- package/dist/chunk-UFN2OAM2.mjs +10 -0
- package/dist/{chunk-ZLAY7NNY.mjs → chunk-UI2VBG26.mjs} +1 -1
- package/dist/chunk-UNGYVWKZ.mjs +10 -0
- package/dist/{chunk-545KDVGI.mjs → chunk-UO75BAPM.mjs} +2 -2
- package/dist/chunk-UUTMZQQA.mjs +15 -0
- package/dist/chunk-UZ672WDX.mjs +10 -0
- package/dist/chunk-VETO7WNN.mjs +10 -0
- package/dist/chunk-VGFPT43C.mjs +10 -0
- package/dist/{chunk-GKODQS6E.mjs → chunk-VJUBKX3W.mjs} +2 -2
- package/dist/{chunk-ODDEW5IV.mjs → chunk-W7OTSFZS.mjs} +1 -1
- package/dist/chunk-WHN2SEWO.mjs +10 -0
- package/dist/{chunk-6DU65N7Q.mjs → chunk-WTAJLO6E.mjs} +2 -2
- package/dist/{chunk-NVS22MIQ.mjs → chunk-X5Z54UUE.mjs} +1 -1
- package/dist/chunk-XD43CVDT.mjs +10 -0
- package/dist/{chunk-5KD2MNNX.mjs → chunk-XDTKLQJB.mjs} +1 -1
- package/dist/chunk-XMGPNXZH.mjs +10 -0
- package/dist/chunk-XWJJ4V3O.mjs +10 -0
- package/dist/{chunk-D3IZ4HBL.mjs → chunk-Y2MIU76N.mjs} +1 -1
- package/dist/chunk-YF63IQQR.mjs +10 -0
- package/dist/{chunk-2RCST7ET.mjs → chunk-YHI2PD3M.mjs} +1 -1
- package/dist/chunk-YMYMFVW4.mjs +10 -0
- package/dist/chunk-YPEAGD2G.mjs +10 -0
- package/dist/chunk-YQHHE5AT.mjs +10 -0
- package/dist/{chunk-UCNHDT36.mjs → chunk-YS3Z53YT.mjs} +2 -2
- package/dist/{chunk-OFWPRDTC.mjs → chunk-YU5NRJT6.mjs} +2 -2
- package/dist/{chunk-TEQE6WCH.mjs → chunk-ZFGTKLCU.mjs} +1 -1
- package/dist/{chunk-DECHIERQ.mjs → chunk-ZQOR4LCM.mjs} +1 -1
- package/dist/{chunk-ZAMDRHQY.mjs → chunk-ZZIQF6XD.mjs} +1 -1
- package/dist/hooks/useContainerScopedRef.mjs +1 -1
- package/dist/hooks/useDevice.mjs +1 -1
- package/dist/hooks/useI18n.mjs +1 -1
- package/dist/hooks/useIntersectionObserver.mjs +1 -1
- package/dist/hooks/useLiveInteractionModality.mjs +1 -1
- package/dist/hooks/useLocalStorage.mjs +1 -1
- package/dist/hooks/useMedia.mjs +1 -1
- package/dist/hooks/useMutationObserver.mjs +1 -1
- package/dist/hooks/usePortalContainer.mjs +1 -1
- package/dist/hooks/usePreventFocus.mjs +1 -1
- package/dist/hooks/useResizeObserver.mjs +1 -1
- package/dist/hooks/useTextSelection.mjs +1 -1
- package/dist/hooks/useUndoRedo.mjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +423 -199
- package/dist/index.js +21 -20
- package/dist/index.mjs +1 -1
- package/dist/react-aria.mjs +1 -1
- package/dist/react-stately.mjs +1 -1
- package/dist/utils/colors.mjs +1 -1
- package/dist/utils/dom.mjs +1 -1
- package/dist/utils/isInShadowDOM.mjs +1 -1
- package/dist/utils/keyboards.mjs +1 -1
- package/messages.json +1 -1
- package/package.json +6 -6
- package/sbom.json +27 -77
- package/dist/chunk-3BL5D3CA.mjs +0 -10
- package/dist/chunk-3FYY26ED.mjs +0 -10
- package/dist/chunk-3JL2TJZL.mjs +0 -10
- package/dist/chunk-3W6RWDIE.mjs +0 -10
- package/dist/chunk-47I3USMC.mjs +0 -10
- package/dist/chunk-4I4TIV2G.mjs +0 -10
- package/dist/chunk-4MRHG5IU.mjs +0 -10
- package/dist/chunk-4TAUFBXO.mjs +0 -10
- package/dist/chunk-55YEATL7.mjs +0 -10
- package/dist/chunk-5TDFLLMX.mjs +0 -10
- package/dist/chunk-63KRQW56.mjs +0 -10
- package/dist/chunk-66NJ7EYY.mjs +0 -10
- package/dist/chunk-6DGD7BZA.mjs +0 -10
- package/dist/chunk-6IRWW75G.mjs +0 -10
- package/dist/chunk-6Y6BYHT4.mjs +0 -10
- package/dist/chunk-6ZFBX7C7.mjs +0 -10
- package/dist/chunk-7PRJIPFA.mjs +0 -10
- package/dist/chunk-7VHON5HL.mjs +0 -10
- package/dist/chunk-A24DWFQ2.mjs +0 -10
- package/dist/chunk-AC7OXVHA.mjs +0 -10
- package/dist/chunk-AKES5B6C.mjs +0 -10
- package/dist/chunk-AL3FICFA.mjs +0 -10
- package/dist/chunk-AQYBKDT2.mjs +0 -16
- package/dist/chunk-AUOQSTS5.mjs +0 -10
- package/dist/chunk-AZRPXTYJ.mjs +0 -10
- package/dist/chunk-B7PSE5KC.mjs +0 -10
- package/dist/chunk-BGMVPFYK.mjs +0 -10
- package/dist/chunk-BJVFZYUV.mjs +0 -10
- package/dist/chunk-BU5H25MV.mjs +0 -10
- package/dist/chunk-C3W4WN2O.mjs +0 -10
- package/dist/chunk-C5P23FUW.mjs +0 -10
- package/dist/chunk-CAWUDHAE.mjs +0 -10
- package/dist/chunk-D5EEZT5J.mjs +0 -10
- package/dist/chunk-DSSMBDVA.mjs +0 -10
- package/dist/chunk-EA6GA4WC.mjs +0 -10
- package/dist/chunk-EADUR7IC.mjs +0 -10
- package/dist/chunk-EK3RIYMV.mjs +0 -10
- package/dist/chunk-EX2LI2CV.mjs +0 -10
- package/dist/chunk-F2X474RV.mjs +0 -10
- package/dist/chunk-G3K2DXNP.mjs +0 -10
- package/dist/chunk-GLT45FXJ.mjs +0 -10
- package/dist/chunk-GS4C6CYA.mjs +0 -10
- package/dist/chunk-HONWMHMX.mjs +0 -10
- package/dist/chunk-HZHAKW6I.mjs +0 -10
- package/dist/chunk-INDVRI57.mjs +0 -10
- package/dist/chunk-JDLUGVXG.mjs +0 -10
- package/dist/chunk-JF4BWG7T.mjs +0 -10
- package/dist/chunk-JQ4ZGZPV.mjs +0 -15
- package/dist/chunk-JUXBZ2ZN.mjs +0 -10
- package/dist/chunk-KEVERVHK.mjs +0 -10
- package/dist/chunk-KKJ6XIU3.mjs +0 -10
- package/dist/chunk-KLNQ24LT.mjs +0 -10
- package/dist/chunk-KPEONVLU.mjs +0 -10
- package/dist/chunk-KUEDQO7P.mjs +0 -10
- package/dist/chunk-KY3JKXSX.mjs +0 -10
- package/dist/chunk-LRZ6BQFQ.mjs +0 -10
- package/dist/chunk-LTIDSWDM.mjs +0 -10
- package/dist/chunk-LZFTBNPW.mjs +0 -10
- package/dist/chunk-M5M3EPG5.mjs +0 -10
- package/dist/chunk-MFH2E2GU.mjs +0 -10
- package/dist/chunk-MFNWPTNI.mjs +0 -10
- package/dist/chunk-MHUFXHRU.mjs +0 -10
- package/dist/chunk-MI7DCFP2.mjs +0 -10
- package/dist/chunk-MNAD5FJH.mjs +0 -10
- package/dist/chunk-MRJFGHFW.mjs +0 -10
- package/dist/chunk-MVK5CB64.mjs +0 -10
- package/dist/chunk-N53SGN23.mjs +0 -10
- package/dist/chunk-N7MTFSWR.mjs +0 -10
- package/dist/chunk-O66FNQSB.mjs +0 -10
- package/dist/chunk-OAY74XPB.mjs +0 -10
- package/dist/chunk-OC42IZG2.mjs +0 -10
- package/dist/chunk-OHZK2ZDA.mjs +0 -10
- package/dist/chunk-OMT6ZWSV.mjs +0 -11
- package/dist/chunk-PDWICYVZ.mjs +0 -29
- package/dist/chunk-PF3OQKXP.mjs +0 -10
- package/dist/chunk-PFKPY3N7.mjs +0 -10
- package/dist/chunk-Q4BSQC65.mjs +0 -10
- package/dist/chunk-QKKV24WQ.mjs +0 -10
- package/dist/chunk-QQGK5M66.mjs +0 -10
- package/dist/chunk-RCBUNCHV.mjs +0 -10
- package/dist/chunk-RFTDIXEG.mjs +0 -10
- package/dist/chunk-RRB5F4E4.mjs +0 -11
- package/dist/chunk-RWHDD6Z7.mjs +0 -10
- package/dist/chunk-RZEGMPV2.mjs +0 -11
- package/dist/chunk-SMAYNDQQ.mjs +0 -10
- package/dist/chunk-T2XIDX6U.mjs +0 -10
- package/dist/chunk-TBDKTTIY.mjs +0 -10
- package/dist/chunk-TDXALNX3.mjs +0 -10
- package/dist/chunk-THRAJMLX.mjs +0 -10
- package/dist/chunk-TIHKHXTS.mjs +0 -10
- package/dist/chunk-TKQOQVZD.mjs +0 -10
- package/dist/chunk-TO6OQF2Y.mjs +0 -10
- package/dist/chunk-TVENHRYC.mjs +0 -10
- package/dist/chunk-UCZZLAPB.mjs +0 -10
- package/dist/chunk-ULCYKB34.mjs +0 -10
- package/dist/chunk-UOMNE4F4.mjs +0 -10
- package/dist/chunk-V3L4SVVF.mjs +0 -10
- package/dist/chunk-VDSLDZLT.mjs +0 -10
- package/dist/chunk-VJ3SWDRJ.mjs +0 -10
- package/dist/chunk-WA35CT3D.mjs +0 -10
- package/dist/chunk-WRQ4FPJE.mjs +0 -10
- package/dist/chunk-WWSGOGLA.mjs +0 -10
- package/dist/chunk-X3AXUU3H.mjs +0 -10
- package/dist/chunk-XCL4K4MY.mjs +0 -10
- package/dist/chunk-XTH6B5FE.mjs +0 -10
- package/dist/chunk-XWLESSHN.mjs +0 -10
- package/dist/chunk-Y4DRSGEJ.mjs +0 -10
- package/dist/chunk-YB3KW7JC.mjs +0 -10
- package/dist/chunk-YIGT3OP2.mjs +0 -10
- package/dist/chunk-YVYMYKYN.mjs +0 -10
- package/dist/chunk-ZFLLIBX5.mjs +0 -10
- package/dist/chunk-ZGRRD3TU.mjs +0 -10
- package/dist/chunk-ZP4YB5RP.mjs +0 -10
- /package/dist/{chunk-FKYHERP4.mjs → chunk-3K2H3JOE.mjs} +0 -0
- /package/dist/{chunk-FXCHST4Z.mjs → chunk-JQQGRJ5J.mjs} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-ETM4MNG4.mjs';import {b as b$1,a as a$1,d,j}from'./chunk-SD43KVTU.mjs';import Z,{createContext,useContext,useRef,useCallback}from'react';import'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function b(e){if(typeof window>"u"||window.navigator==null)return false;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(n=>e.test(n.brand))||e.test(window.navigator.userAgent)}function g(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):false}function l(e){if(process.env.NODE_ENV==="test")return e;let t=null;return ()=>(t==null&&(t=e()),t)}var E=l(function(){return g(/^Mac/i)}),N=l(function(){return g(/^iPhone/i)}),v=l(function(){return g(/^iPad/i)||E()&&navigator.maxTouchPoints>1}),S=l(function(){return N()||v()}),ne=l(function(){return E()||S()}),w=l(function(){return b(/AppleWebKit/i)&&(S()||!k())});l(function(){return w()&&!k()&&!V()});var k=l(function(){return b(/Chrome|CriOS|CrMo/i)}),m=l(function(){return b(/Android/i)}),V=l(function(){return b(/(Firefox|FxiOS)/i)});function L(e){e.focus({preventScroll:true});}var K=typeof Element<"u"&&"checkVisibility"in Element.prototype;function B(e){let t=b$1(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return false;let{display:n,visibility:i}=e.style,r=n!=="none"&&i!=="hidden"&&i!=="collapse";if(r){let{getComputedStyle:s}=b$1(e),{display:o,visibility:a}=s(e);r=o!=="none"&&a!=="hidden"&&a!=="collapse";}return r}function W(e,t){return !e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):true)}function h(e,t){return K?e.checkVisibility({visibilityProperty:true})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&B(e)&&W(e,t)&&(!e.parentElement||h(e.parentElement,e))}var M=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],F=M.join(':not([hidden]):not([data-bui-avoid-focus="true"]),')+',[tabindex]:not([disabled]):not([hidden]):not([data-bui-avoid-focus="true"])';M.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var I=M.join(':not([hidden]):not([tabindex="-1"]),');function fe(e,t){return e.matches(F)&&!x(e)&&(t?.skipVisibilityCheck||h(e))}function de(e){return e.matches(I)&&h(e)&&!x(e)}function x(e){let t=e;for(;t!=null;){if(t instanceof b$1(t).HTMLElement&&t.inert)return true;t=t.parentElement;}return false}function be(e){return e.pointerType===""&&e.isTrusted?true:m()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Ee(e){return !m()&&e.width===0&&e.height===0||m()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var z=createContext({isNative:true,open:G,useHref:e=>e});function R(){return useContext(z)}function Q(e,t){let n=e.getAttribute("target");return (!n||n==="_self")&&e.origin===location.origin&&!e.hasAttribute("download")&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function y(e,t,n=true){let{metaKey:i,ctrlKey:r,altKey:s,shiftKey:o}=t,a=w()&&E()&&!v()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:r,altKey:s,shiftKey:o}):new MouseEvent("click",{metaKey:i,ctrlKey:r,altKey:s,shiftKey:o,detail:1,bubbles:true,cancelable:true});y.isOpening=n,L(e),e.dispatchEvent(a),y.isOpening=false;}y.isOpening=false;function U(e,t){if(e instanceof b$1(e).HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=a$1(e).createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n);}}function G(e,t){U(e,n=>y(n,t));}function Le(e){let n=R().useHref(e.href??"");return {"data-href":e.href?n:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function xe(e){let n=R().useHref(e?.href??""),i={};if(e)for(let r of ["href","target","rel","download","ping","referrerPolicy"])r in e&&e[r]!==void 0&&(i[r]=r==="href"?n:e[r]);return i}function Re(e,t,n,i){let r=b$1(e.currentTarget);!t.isNative&&e.currentTarget instanceof r.HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&Q(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,i));}var O=new WeakMap,C=new WeakSet;function P(e){return "propertyName"in e}function J(){let e=new Map,t=new Set,n=o=>{let a=j(o);if(!P(o)||!a)return;let u=e.get(a);u&&(u.delete(o.propertyName),u.size===0&&(a.removeEventListener("transitioncancel",n),e.delete(a)),e.size===0&&D(s));},i=(o,a)=>{let u=e.get(o);u||(u=new Set,e.set(o,u),o.addEventListener("transitioncancel",n,{once:true})),u.add(a);},s={transitionsByElement:e,transitionCallbacks:t,track:i,onTransitionStart:o=>{let a=j(o);!P(o)||!a||i(a,o.propertyName);},onTransitionEnd:n};return s}function H(e){let t=O.get(e);return t||(t=J(),O.set(e,t)),t}function X(e){let t=[],n=e?.getRootNode()??null;d(n)&&t.push(n);let i=a$1(e).body;return i&&t.push(i),t}function D(e){for(let t of e.transitionCallbacks)t(true);e.transitionCallbacks.clear();}function q(e,t){let n=d(e)?e:a$1(e),i=d(e)?e.getAnimations?.():a$1(e).getAnimations?.();for(let r of i??[]){if(r.playState==="finished"||!("transitionProperty"in r))continue;let s=r.effect?.target;s&&s.getRootNode()===n&&t.track(s,r.transitionProperty);}}function A(e){if(typeof window>"u")return;let t=X(e).filter(i=>!C.has(i));if(t.length===0)return;let n=H(a$1(e));for(let i of t)C.add(i),i.addEventListener("transitionrun",n.onTransitionStart),i.addEventListener("transitionend",n.onTransitionEnd),q(i,n);}typeof document<"u"&&(document.readyState!=="loading"?A():document.addEventListener("DOMContentLoaded",()=>A()));function Y(e){for(let[t]of e.transitionsByElement)"isConnected"in t&&(!t.isConnected||!t.ownerDocument?.defaultView)&&e.transitionsByElement.delete(t);e.transitionsByElement.size===0&&D(e);}function Ne(e,t){A(t);let n=H(a$1(t)),i=requestAnimationFrame(()=>{Y(n),n.transitionsByElement.size===0?e(false):n.transitionCallbacks.add(e);});return ()=>{cancelAnimationFrame(i),n.transitionCallbacks.delete(e);}}var te=Z.useInsertionEffect??a;function We(e){let t=useRef(null);return te(()=>{t.current=e;},[e]),useCallback((...n)=>{let i=t.current;return i?.(...n)},[])}function je(e,t){a(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null);}});}export{L as a,h as b,fe as c,de as d,E as e,N as f,v as g,S as h,ne as i,w as j,k,m as l,be as m,Ee as n,R as o,y as p,Le as q,xe as r,Re as s,Ne as t,We as u,je as v};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-2MS356Q7.mjs';import {f,d,b,h,g as g$1}from'./chunk-PG3WDHSK.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {c as c$1}from'./chunk-4EAXDHSV.mjs';import {a}from'./chunk-B3EZOXNU.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import A 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
|
+
function g({className:t}){return jsx("span",{className:t,"aria-hidden":"true","data-testid":"textinput-resize-grip",children:jsxs("svg",{width:"6",height:"6",viewBox:"0 0 6 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsx("path",{d:"M4.72031 3.71962C5.01321 3.42683 5.488 3.42676 5.78086 3.71962C6.07352 4.01249 6.07358 4.48733 5.78086 4.78016L4.78086 5.78016C4.48803 6.07299 4.01322 6.07286 3.72031 5.78016C3.42742 5.48727 3.42742 5.01251 3.72031 4.71962L4.72031 3.71962Z",fill:"currentColor"}),jsx("path",{d:"M4.22031 0.219616C4.51321 -0.0731691 4.988 -0.0732413 5.28086 0.219616C5.57352 0.512488 5.57358 0.987325 5.28086 1.28016L1.27988 5.28016C0.986955 5.57268 0.512099 5.57293 0.219333 5.28016C-0.073139 4.98737 -0.0730827 4.51244 0.219333 4.21962L4.22031 0.219616Z",fill:"currentColor"})]})})}var F=A.forwardRef(({labelPosition:t="top",className:w,style:y,labelProps:z,isDisabled:r=false,isReadOnly:e=false,label:i,message:a$4,"data-block-id":k,"data-block-class":L,validationState:B="valid",isFocused:G=false,variant:H="primary",children:R,fieldProps:M,wrapperRef:T,wrapperClassName:Z,isInvalid:E,isMultiLine:s=false},V)=>{let{hoverProps:W,isHovered:b$1}=a({isDisabled:r}),n=E?"error":B,l=a$1({isReadOnly:e,validationState:n});return jsxs("div",{className:a$3(g$1({labelPosition:t}),w),"data-block-id":k,"data-block-class":L,style:y,ref:V,children:[i||t==="start"&&a$4?jsxs("div",{className:f({labelPosition:t,hasMessage:!!a$4}),children:[jsx(a$2,{...z,elementType:"label",color:"text.secondary",typography:"label.md.medium",children:i}),t==="start"&&a$4]}):null,jsxs("div",{className:a$3({[c$1]:r}),children:[jsxs("div",{...c(M,W),className:a$3(h({validationState:n,isHovered:b$1,isFocused:G,variant:H,isReadOnly:e,isDisabled:r,isMultiLine:s}),Z),ref:T,children:[R,l?jsx(l,{className:d({validationState:n,isReadOnly:e,isMultiLine:s}),size:16}):null,s&&!e&&!r?jsx(g,{className:b}):null]}),t==="top"&&a$4]})]})});F.displayName="SharedInput";
|
|
11
|
+
export{F as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$3}from'./chunk-
|
|
1
|
+
import {a as a$3}from'./chunk-AELTF2DE.mjs';import {a as a$2}from'./chunk-TAYP2OGC.mjs';import {a as a$4}from'./chunk-GL5GUKT7.mjs';import {B as B$1}from'./chunk-4MHBLLHV.mjs';import {b}from'./chunk-TUJLNJPJ.mjs';import {a as a$6}from'./chunk-O7XK2WIX.mjs';import {a as a$5}from'./chunk-OQPYPKZV.mjs';import {c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$7}from'./chunk-4QEH5CGK.mjs';import {UploadIcon}from'@baseline-ui/icons/20';import a$1 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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a as a$2}from'./chunk-
|
|
1
|
+
import {a as a$2}from'./chunk-KVIV5RTE.mjs';import {c,d,e,f,i,g,h as h$1}from'./chunk-5BKC373Y.mjs';import {a as a$4}from'./chunk-XD43CVDT.mjs';import {l,t}from'./chunk-YQHHE5AT.mjs';import {a as a$3}from'./chunk-TAT552A5.mjs';import {b,c as c$1}from'./chunk-DZDZZRWE.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
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-YCI6BEXQ.mjs';import {c,d,e,f,i,g,h as h$1}from'./
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
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:
|
|
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$1){return jsx(t,{target:t$1,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};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-RSKKEGJZ.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {b}from'./chunk-3WKDIXCM.mjs';import r 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=r.forwardRef(({className:n,style:p,node:e,"data-block-id":f,"data-block-class":l,...i},c)=>{let o=r.useRef(null);r.useEffect(()=>{if(!e)return;let t=o.current;return t?.append(e),()=>{t?.contains(e)&&e.remove();}},[e]);let{pressProps:R,isPressed:N}=d(i);return jsx("div",{...R,className:n,style:p,"data-block-id":f,"data-block-class":l,...a$1({"data-pressed":N}),"data-testid":"dom-node-renderer",ref:b(c,o)})});a.displayName="DomNodeRenderer";export{a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b,a as a$5}from'./chunk-7TE4MFKC.mjs';import {a as a$1,f as f$1}from'./chunk-AD3MLX6G.mjs';import {a as a$3}from'./chunk-5BAHJXOI.mjs';import {b as b$2,a as a$g,q}from'./chunk-K7VOXFSK.mjs';import {a as a$a}from'./chunk-2MS356Q7.mjs';import {a as a$f}from'./chunk-WTAJLO6E.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-TUJLNJPJ.mjs';import {a as a$e}from'./chunk-3BG6K2G2.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 {j as j$1}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.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};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {c as c$1,a as a$4,d,b as b$1,e}from'./chunk-X5Z54UUE.mjs';import {c as c$3,b as b$5}from'./chunk-ONEE6UCM.mjs';import {b as b$4}from'./chunk-6G7EUNZW.mjs';import {a as a$7}from'./chunk-CY6W27WG.mjs';import {a as a$5}from'./chunk-O7XK2WIX.mjs';import {b as b$2}from'./chunk-KG2EHFYA.mjs';import {b as b$3}from'./chunk-N2XGJKZG.mjs';import {d as d$1}from'./chunk-GQIS4QBN.mjs';import {a as a$2}from'./chunk-SGZWUG3H.mjs';import {a}from'./chunk-STMDFIUL.mjs';import {c as c$4}from'./chunk-HH4VLTF3.mjs';import {b as b$6}from'./chunk-4S4GGUSH.mjs';import {j,f as f$1}from'./chunk-KUDCYGII.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {q}from'./chunk-PPHSLODC.mjs';import {c,b}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import {XIcon as XIcon$1}from'@baseline-ui/icons/8';import {CheckmarkIcon as CheckmarkIcon$1,XIcon}from'@baseline-ui/icons/12';import {CheckmarkIcon}from'@baseline-ui/icons/16';import f,{useState,useRef,useEffect}from'react';import {jsx,jsxs}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var H=new WeakMap;function ge(i,e,a){let{direction:o}=b$3(),r=i.keyboardDelegate||new b$4({collection:e.collection,ref:a,orientation:"horizontal",direction:o,disabledKeys:e.disabledKeys,disabledBehavior:e.selectionManager.disabledBehavior}),{labelProps:p,fieldProps:t,descriptionProps:s,errorMessageProps:l}=a$7({...i,labelElementType:"span",ref:a}),{gridProps:u}=b$5({...i,...t,keyboardDelegate:r,shouldFocusWrap:true,linkBehavior:"override",keyboardNavigationBehavior:"tab"},e,a),[c$1,g]=useState(false),{focusWithinProps:m}=b$6({onFocusWithinChange:g}),b=a$6(i),n=useRef(e.collection.size);return useEffect(()=>{a.current&&n.current>0&&e.collection.size===0&&c$1&&a.current.focus(),n.current=e.collection.size;},[e.collection.size,c$1,a]),H.set(e,{onRemove:i.onRemove}),{gridProps:c(u,b,{role:e.collection.size?"grid":"group","aria-atomic":false,"aria-relevant":"additions","aria-live":c$1?"polite":"off",...m,...t}),labelProps:p,descriptionProps:s,errorMessageProps:l}}var ee={"ar-AE":{removeButtonLabel:"\u0625\u0632\u0627\u0644\u0629",removeDescription:"\u0627\u0636\u063A\u0637 \u0639\u0644\u0649 \u0645\u0641\u062A\u0627\u062D DELETE \u0644\u0625\u0632\u0627\u0644\u0629 \u0639\u0644\u0627\u0645\u0629."},"bg-BG":{removeButtonLabel:"\u041F\u0440\u0435\u043C\u0430\u0445\u0432\u0430\u043D\u0435",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0435\u0442\u0435 Delete, \u0437\u0430 \u0434\u0430 \u043F\u0440\u0435\u043C\u0430\u0445\u043D\u0435\u0442\u0435 \u043C\u0430\u0440\u043A\u0435\u0440\u0430."},"cs-CZ":{removeButtonLabel:"Odebrat",removeDescription:"Stisknut\xEDm kl\xE1vesy Delete odeberete zna\u010Dku."},"da-DK":{removeButtonLabel:"Fjern",removeDescription:"Tryk p\xE5 Slet for at fjerne tag."},"de-DE":{removeButtonLabel:"Entfernen",removeDescription:"Auf \u201EL\xF6schen\u201C dr\xFCcken, um das Tag zu entfernen."},"el-GR":{removeButtonLabel:"\u039A\u03B1\u03C4\u03AC\u03C1\u03B3\u03B7\u03C3\u03B7",removeDescription:"\u03A0\u03B1\u03C4\u03AE\u03C3\u03C4\u03B5 \u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B3\u03B9\u03B1 \u03BD\u03B1 \u03BA\u03B1\u03C4\u03B1\u03C1\u03B3\u03AE\u03C3\u03B5\u03C4\u03B5 \u03C4\u03B7\u03BD \u03B5\u03C4\u03B9\u03BA\u03AD\u03C4\u03B1."},"en-US":{removeDescription:"Press Delete to remove tag.",removeButtonLabel:"Remove"},"es-ES":{removeButtonLabel:"Quitar",removeDescription:"Pulse Eliminar para quitar la etiqueta."},"et-EE":{removeButtonLabel:"Eemalda",removeDescription:"Sildi eemaldamiseks vajutage kustutusklahvi Delete."},"fi-FI":{removeButtonLabel:"Poista",removeDescription:"Poista tunniste painamalla Poista-painiketta."},"fr-FR":{removeButtonLabel:"Supprimer",removeDescription:"Appuyez sur Supprimer pour supprimer l\u2019\xE9tiquette."},"he-IL":{removeButtonLabel:"\u05D4\u05E1\u05E8",removeDescription:"\u05DC\u05D7\u05E5 \u05E2\u05DC \u05DE\u05D7\u05E7 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05E1\u05D9\u05E8 \u05EA\u05D2."},"hr-HR":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Delete za uklanjanje oznake."},"hu-HU":{removeButtonLabel:"Elt\xE1vol\xEDt\xE1s",removeDescription:"Nyomja meg a Delete billenty\u0171t a c\xEDmke elt\xE1vol\xEDt\xE1s\xE1hoz."},"it-IT":{removeButtonLabel:"Rimuovi",removeDescription:"Premi Elimina per rimuovere il tag."},"ja-JP":{removeButtonLabel:"\u524A\u9664",removeDescription:"\u30BF\u30B0\u3092\u524A\u9664\u3059\u308B\u306B\u306F\u3001Delete \u30AD\u30FC\u3092\u62BC\u3057\u307E\u3059\u3002"},"ko-KR":{removeButtonLabel:"\uC81C\uAC70",removeDescription:"\uD0DC\uADF8\uB97C \uC81C\uAC70\uD558\uB824\uBA74 Delete \uD0A4\uB97C \uB204\uB974\uC2ED\uC2DC\uC624."},"lt-LT":{removeButtonLabel:"Pa\u0161alinti",removeDescription:"Nor\u0117dami pa\u0161alinti \u017Eym\u0105, paspauskite \u201EDelete\u201C klavi\u0161\u0105."},"lv-LV":{removeButtonLabel:"No\u0146emt",removeDescription:"Nospiediet Delete [Dz\u0113st], lai no\u0146emtu tagu."},"nb-NO":{removeButtonLabel:"Fjern",removeDescription:"Trykk p\xE5 Slett for \xE5 fjerne taggen."},"nl-NL":{removeButtonLabel:"Verwijderen",removeDescription:"Druk op Verwijderen om de tag te verwijderen."},"pl-PL":{removeButtonLabel:"Usu\u0144",removeDescription:"Naci\u015Bnij Usu\u0144, aby usun\u0105\u0107 znacznik."},"pt-BR":{removeButtonLabel:"Remover",removeDescription:"Pressione Delete para remover a tag."},"pt-PT":{removeButtonLabel:"Eliminar",removeDescription:"Prima Delete para eliminar a tag."},"ro-RO":{removeButtonLabel:"\xCEndep\u0103rta\u0163i",removeDescription:"Ap\u0103sa\u021Bi pe Delete (\u0218tergere) pentru a elimina eticheta."},"ru-RU":{removeButtonLabel:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C",removeDescription:"\u041D\u0430\u0436\u043C\u0438\u0442\u0435 DELETE, \u0447\u0442\u043E\u0431\u044B \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0442\u0435\u0433."},"sk-SK":{removeButtonLabel:"Odstr\xE1ni\u0165",removeDescription:"Ak chcete odstr\xE1ni\u0165 zna\u010Dku, stla\u010Dte kl\xE1ves Delete."},"sl-SI":{removeButtonLabel:"Odstrani",removeDescription:"Pritisnite Delete, da odstranite oznako."},"sr-SP":{removeButtonLabel:"Ukloni",removeDescription:"Pritisnite Obri\u0161i da biste uklonili oznaku."},"sv-SE":{removeButtonLabel:"Ta bort",removeDescription:"Tryck p\xE5 Radera f\xF6r att ta bort taggen."},"tr-TR":{removeButtonLabel:"Kald\u0131r",removeDescription:"Etiketi kald\u0131rmak i\xE7in Sil tu\u015Funa bas\u0131n."},"uk-UA":{removeButtonLabel:"\u0412\u0438\u043B\u0443\u0447\u0438\u0442\u0438",removeDescription:"\u041D\u0430\u0442\u0438\u0441\u043D\u0456\u0442\u044C Delete, \u0449\u043E\u0431 \u0432\u0438\u043B\u0443\u0447\u0438\u0442\u0438 \u0442\u0435\u0433."},"zh-CN":{removeButtonLabel:"\u5220\u9664",removeDescription:"\u6309\u4E0B\u201C\u5220\u9664\u201D\u4EE5\u5220\u9664\u6807\u8BB0\u3002"},"zh-TW":{removeButtonLabel:"\u79FB\u9664",removeDescription:"\u6309 Delete \u9375\u4EE5\u79FB\u9664\u6A19\u8A18\u3002"}};function I(i,e,a){let{item:o}=i,r=b$2(ee,"@react-aria/tag"),p=c$2(),{onRemove:t}=H.get(e)||{},{rowProps:s,gridCellProps:l,...u}=c$3({node:o},e,a),{descriptionProps:c$1,...g}=u,m=e.disabledKeys.has(o.key)||o.props.isDisabled,{keyboardProps:b}=j({isDisabled:m,shortcuts:{Delete:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));},Backspace:()=>{e.selectionManager.isSelected(o.key)?t?.(new Set(e.selectionManager.selectedKeys)):t?.(new Set([o.key]));}},allowRepeats:true}),n=f$1();n==="virtual"&&typeof window<"u"&&"ontouchstart"in window&&(n="pointer");let T=t&&(n==="keyboard"||n==="virtual")?r.format("removeDescription"):"",P=d$1(T,a),D=o.key===e.selectionManager.focusedKey,L=e.selectionManager.focusedKey!=null,y=-1;!m&&(D||!L)&&(y=0);let k=a$6(o.props),B=q(o.props),{focusableProps:h}=c$4({...o.props,isDisabled:m},a);return {removeButtonProps:{"aria-label":r.format("removeButtonLabel"),"aria-labelledby":`${p} ${s.id}`,isDisabled:m,id:p,onPress:()=>t?t(new Set([o.key])):null},rowProps:c(h,s,k,B,{tabIndex:y,...t?b:{},"aria-describedby":P["aria-describedby"]}),gridCellProps:c(l,{"aria-errormessage":i["aria-errormessage"],"aria-label":i["aria-label"]}),...g,allowsRemoving:!!t}}var te=f.createContext(null),re=f.createContext(null);var ae=f.forwardRef((i,e)=>{let a=f.useContext(te),o=f.useContext(re);return a&&o?jsx(se,{...i,ref:e,groupCtx:a,itemCtx:o}):jsx(ie,{...i,ref:e})});ae.displayName="Tag";var ie=f.forwardRef(({children:i,variant:e="neutral",size:a$2="md",icon:o,isDisabled:r=false,isSelected:p=false,onRemove:t,className:s,style:l,"data-block-id":u,"data-block-class":c$1},g)=>{let{focusProps:m,isFocusVisible:b}=a({within:true}),{hoverProps:n,isHovered:T}=a$1({isDisabled:r}),{hoverProps:P,isHovered:D}=a$1({isDisabled:r}),L=!!t;return jsx(w,{ref:g,outerProps:c(m,P),variant:e,size:a$2,Icon:o,isDisabled:r,isSelected:p,isFocusVisible:b,isTagHovered:D,allowsRemoving:L,allowsSelection:false,removeButtonProps:n,defaultRemoveProps:{"aria-label":"Remove",disabled:r,onClick:t},isRemoveHovered:T,className:s,style:l,"data-block-id":u,"data-block-class":c$1,children:i})});ie.displayName="TagStandalone";var se=f.forwardRef(({groupCtx:i,itemCtx:e,variant:a$3,...o},r)=>{let{state:p,variant:t,size:s}=i,{item:l}=e,u=f.useRef(null),{rowProps:c$1,gridCellProps:g,removeButtonProps:m,allowsRemoving:b$1,isDisabled:n,isSelected:T,allowsSelection:P}=I({item:l},p,u),D=f.useRef(null),{buttonProps:L}=a$2({...m,excludeFromTabOrder:true},D),{focusProps:y,isFocusVisible:k}=a({within:true}),{hoverProps:B,isHovered:h}=a$1({isDisabled:n}),{hoverProps:ne,isHovered:le}=a$1({isDisabled:n}),me=l.value?.icon,pe=l.value?.data?.variant??a$3??t,ce=o.size??s??"md";return jsx(w,{ref:b(u,r),outerProps:c(c$1,y,ne),gridCellProps:g,variant:pe,size:ce,Icon:me,isDisabled:n,isSelected:T,isFocusVisible:k,isTagHovered:le,allowsRemoving:b$1,allowsSelection:P,removeButtonProps:c(L,B),isRemoveHovered:h,children:l.rendered})});se.displayName="TagInGroup";var w=f.forwardRef(({children:i,outerProps:e$1,gridCellProps:a,variant:o="neutral",size:r,Icon:p,isDisabled:t,isSelected:s,isFocusVisible:l,isTagHovered:u,allowsRemoving:c$2,allowsSelection:g,removeButtonProps:m,defaultRemoveProps:b,isRemoveHovered:n,className:T,style:P,"data-block-id":D,"data-block-class":L},y)=>{let k=r==="md"?XIcon:XIcon$1,B=r==="md"?CheckmarkIcon:CheckmarkIcon$1;return jsx("div",{...e$1,ref:y,"aria-disabled":t||void 0,className:a$3(b$1({isFocusVisible:l,variant:o,isDisabled:t,allowsRemoving:c$2,isSelected:s,allowsSelection:g,isHovered:u,size:r}),e({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag",T),style:P,"data-block-id":D,"data-block-class":L,children:jsxs("div",{...a,className:c$1,children:[s?jsx(B,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,!s&&p?jsx(p,{size:r==="md"?16:12,className:a$3(a$4({variant:o,isDisabled:t,isSelected:s}),"BaselineUI-Tag-Icon")}):null,jsx(a$5,{paddingY:r==="md"?"sm":"none",typography:r==="sm"?"label.sm.medium":"label.md.medium",children:i}),c$2?jsx("button",{type:"button",...c(m,b??{}),className:d({variant:o,isHovered:n}),children:jsx(k,{size:r==="md"?12:8})}):null]})})});w.displayName="TagView";export{ge as a,te as b,re as c,ae as d};
|
|
@@ -0,0 +1,10 @@
|
|
|
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-VGFPT43C.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};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-MIF6BAPG.mjs';import {d}from'./chunk-PD5ZXNGT.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {a as a$2}from'./chunk-R6TFTLMV.mjs';import {b}from'./chunk-4S4GGUSH.mjs';import {b as b$1}from'./chunk-KUDCYGII.mjs';import {a as a$4}from'./chunk-B3EZOXNU.mjs';import {r}from'./chunk-PPHSLODC.mjs';import {c as c$2,a as a$3}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SVIYLH7R.mjs';import {c as c$1,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
|
+
var c=new WeakMap;function R(e){return typeof e=="string"?e.replace(/\s*/g,""):""+e}function N(e,o){let r=c.get(e);if(!r)throw new Error("Unknown list");return `${r.id}-option-${R(o)}`}function j(e,o,r){let t=a(e,{labelable:true}),i=e.selectionBehavior||"toggle",s=e.orientation||"vertical",n=e.linkBehavior||(i==="replace"?"action":"override");i==="toggle"&&n==="action"&&(n="override");let{listProps:d}=a$1({...e,ref:r,selectionManager:o.selectionManager,collection:o.collection,disabledKeys:o.disabledKeys,linkBehavior:n}),{focusWithinProps:p}=b({onFocusWithin:e.onFocus,onBlurWithin:e.onBlur,onFocusWithinChange:e.onFocusChange}),m=c$1(e.id);c.set(o,{id:m,shouldUseVirtualFocus:e.shouldUseVirtualFocus,shouldSelectOnPressUp:e.shouldSelectOnPressUp,shouldFocusOnHover:e.shouldFocusOnHover,isVirtualized:e.isVirtualized,onAction:e.onAction,linkBehavior:n,UNSTABLE_itemBehavior:e.UNSTABLE_itemBehavior});let{labelProps:b$1,fieldProps:f}=a$2({...e,id:m,labelElementType:"span"});return {labelProps:b$1,listBoxProps:c$2(t,p,o.selectionManager.selectionMode==="multiple"?{"aria-multiselectable":"true"}:{},{role:"listbox","aria-orientation":s,...c$2(f,d)})}}var K=new WeakMap;function B(e){let o=K.get(e);if(o!=null)return o;let r=0,t=i=>{for(let s of i)s.type==="section"?t(b$2(s,e)):s.type==="item"&&r++;};return t(e),K.set(e,r),r}function _(e$1,o,r$1){let{key:t}=e$1,i=c.get(o),s=e$1.isDisabled??o.selectionManager.isDisabled(t),n=e$1.isSelected??o.selectionManager.isSelected(t),d$1=e$1.shouldSelectOnPressUp??i?.shouldSelectOnPressUp,p=e$1.shouldFocusOnHover??i?.shouldFocusOnHover,m=e$1.shouldUseVirtualFocus??i?.shouldUseVirtualFocus,b=e$1.isVirtualized??i?.isVirtualized,f=e(void 0,r$1),g=e(void 0,r$1),h={role:"option","aria-disabled":s||void 0,"aria-selected":o.selectionManager.selectionMode!=="none"?n:void 0,"aria-label":e$1["aria-label"],"aria-labelledby":f,"aria-describedby":g},l=o.collection.getItem(t);if(b){let v=Number(l?.index);h["aria-posinset"]=Number.isNaN(v)?void 0:v+1,h["aria-setsize"]=B(o.collection);}let A=i?.onAction?()=>i?.onAction?.(t):void 0,L=N(o,t),{itemProps:w,isPressed:E,isFocused:O,hasAction:H,allowsSelection:z}=d({selectionManager:o.selectionManager,key:t,ref:r$1,shouldSelectOnPressUp:d$1,allowsDifferentPressOrigin:d$1&&p,isVirtualized:b,shouldUseVirtualFocus:m,isDisabled:s,onAction:A||l?.props?.onAction?a$3(l?.props?.onAction,A):void 0,linkBehavior:i?.linkBehavior,UNSTABLE_itemBehavior:i?.UNSTABLE_itemBehavior,id:L}),{hoverProps:C}=a$4({isDisabled:s||!p,onHoverStart(){b$1()||(o.selectionManager.setFocused(true),o.selectionManager.setFocusedKey(t));}}),S=a(l?.props);delete S.id;let W=r(l?.props);return {optionProps:{...h,...c$2(S,w,C,W),id:L},labelProps:{id:f},descriptionProps:{id:g},isFocused:O,isFocusVisible:O&&o.selectionManager.isFocused&&b$1(),isSelected:n,isDisabled:s,isPressed:E,allowsSelection:z,hasAction:H}}function $(e$1){let{heading:o,"aria-label":r}=e$1,t=e([!!o]);return {itemProps:{role:"presentation"},headingProps:o?{id:t,role:"presentation",onMouseDown:i=>{i.preventDefault();}}:{},groupProps:{role:"group","aria-label":r,"aria-labelledby":o?t:void 0}}}export{c as a,N as b,j as c,B as d,_ as e,$ as f};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$4}from'./chunk-QUQ4VYCN.mjs';import {a as a$d}from'./chunk-ZZIQF6XD.mjs';import {a as a$f}from'./chunk-WTAJLO6E.mjs';import {a as a$3,b as b$1}from'./chunk-DAN62T2M.mjs';import {a as a$2}from'./chunk-XDTKLQJB.mjs';import {a as a$g}from'./chunk-UDMNDUBO.mjs';import {b as b$5}from'./chunk-TUJLNJPJ.mjs';import {a as a$c}from'./chunk-O7XK2WIX.mjs';import {a as a$e}from'./chunk-3BG6K2G2.mjs';import {a as a$1}from'./chunk-RPIUPWPO.mjs';import {a as a$h}from'./chunk-GMALMQWI.mjs';import {b as b$2}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {b as b$4,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 {j}from'./chunk-KUDCYGII.mjs';import {a as a$7}from'./chunk-B3EZOXNU.mjs';import {a as a$9}from'./chunk-RT4LMB6X.mjs';import {b,c}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$5}from'./chunk-4QEH5CGK.mjs';import B from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {sprinkles}from'@baseline-ui/tokens';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var se="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3",pe="_14uvjig3 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69i _1yep5z69j _1yep5z69k",de="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6kz _1yep5z6l0 _1yep5z6l1 _1yep5z6jz _1yep5z6k0 _1yep5z6k1",ne=a({defaultClassName:"_14uvjig0 _1yep5z6dy _1yep5z6ez",variantClassNames:{isDisabled:{true:"_1yep5z611l"},hasNumberInput:{false:"_1yep5z6p1 _1yep5z6p2 _1yep5z6p3"}},defaultVariants:{},compoundVariants:[]}),me=a({defaultClassName:"_14uvjigb _1yep5z6b0 _1yep5z6b1 _1yep5z6b2 _1yep5z6bo _1yep5z6bp _1yep5z6bq _1yep5z6cc _1yep5z6cd _1yep5z6ce _1yep5z6d0 _1yep5z6d1 _1yep5z6d2 _1yep5z6gh _1yep5z6m5 _1yep5z6lq",variantClassNames:{active:{true:"_14uvjigc _1yep5z6136 _1yep5z618x _1yep5z618p"},isDisabled:{true:"_14uvjigd _1yep5z613a"},isReadOnly:{true:"_1yep5z615l _1yep5z615m _1yep5z615n"},isFocusVisible:{true:"_14uvjigf _1yep5z6136 _1yep5z6189"},isHovered:{true:"_14uvjigg _1yep5z6136"}},defaultVariants:{},compoundVariants:[]}),ue="z9nup8a _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z6kt _1yep5z6ku _1yep5z6kv",ye="_14uvjig4 z9nup87 _1yep5z6gd _1yep5z6m3",ce=a({defaultClassName:"_14uvjig5 _1yep5z6gh _1yep5z6iw _1yep5z6ix _1yep5z6iy _1yep5z6m4",variantClassNames:{active:{true:"_1yep5z6136"},isFocusVisible:{true:"_1yep5z6136"},isDisabled:{true:"_1yep5z613a"},isHovered:{true:"_1yep5z6136"}},defaultVariants:{},compoundVariants:[]});var N=B.forwardRef(({className:v,style:h,onChange:r,onChangeEnd:p,numberFormatOptions:o,isDisabled:i,step:S,minValue:d,maxValue:x,value:c,"aria-label":l,"aria-labelledby":e,"aria-details":n,"aria-describedby":m,"data-block-id":f,"data-block-class":H,defaultValue:k,isReadOnly:b$1,label:_,id:T,includeNumberInput:u,numberInputClassName:P,numberInputStyle:y},ze)=>{let I=B.useRef(null),F={onChange:r===void 0?void 0:g=>{r(g[0]);},isDisabled:i||b$1,step:S,minValue:d,maxValue:x,onChangeEnd:p===void 0?void 0:g=>{p(g[0]);},value:c===void 0?void 0:[c],defaultValue:k===void 0?void 0:[k],"aria-label":l,"aria-labelledby":e,"aria-details":n,"aria-describedby":m,id:T,label:_},ge=a$1(o),z=a$2({...F,numberFormatter:ge}),{trackProps:ve,groupProps:he,labelProps:O}=a$3(F,z,I),L=jsx(a$4,{variant:"ghost",showStepper:false,className:P,"aria-label":l,"aria-labelledby":O.id,isDisabled:i,isReadOnly:b$1,value:z.getThumbValue(0),formatOptions:o,onChange:g=>{Number.isNaN(g)||(z.setThumbDragging(0,true),z.setThumbValue(0,g),z.setThumbDragging(0,false));},style:{width:60,textAlign:"right",flexShrink:0,...y}});return jsxs("div",{...he,style:h,"data-block-id":f,"data-block-class":H,className:a$5(se,"BaselineUI-Slider",v),children:[_?jsxs("div",{className:de,children:[jsx("label",{...O,className:a$5(ne({isDisabled:i,hasNumberInput:!!u}),"BaselineUI-Slider-Label"),children:_}),u?L:null]}):null,jsxs("div",{className:pe,children:[jsx("div",{...ve,className:a$5(ye,"BaselineUI-Slider-Track"),ref:b(I,ze),"data-testid":"track",children:jsx(Se,{state:z,trackRef:I,isDisabled:i,isReadOnly:b$1})}),u&&!_?L:null]})]})});N.displayName="Slider";function Se({state:v,trackRef:h,isDisabled:r,isReadOnly:p}){let o=B.useRef(null),{thumbProps:i,inputProps:S,isDragging:d}=b$1({trackRef:h,inputRef:o},v),{focusProps:x,isFocused:c$1,isFocusVisible:l}=a$6(),{hoverProps:e,isHovered:n}=a$7({isDisabled:r}),{direction:m}=b$2(),f=a$8({"data-disabled":r,"data-readonly":p,"data-hovered":n,"data-focus-visible":l,"data-dragging":d,"data-focused":c$1});return jsxs(Fragment,{children:[jsx("div",{className:a$5(ce({isDisabled:r,isFocusVisible:l,active:d,isHovered:n}),"BaselineUI-Slider-TrackHighlight"),style:{width:m==="rtl"?`calc(100% - ${i.style?.left})`:i.style?.left},"data-testid":"track-highlight"}),jsxs("div",{...c(i,e,f),className:a$5(ue,"BaselineUI-Slider-ThumbHandle"),"data-testid":"thumb",children:[jsx("div",{className:a$5(me({isDisabled:r,isFocusVisible:l,active:d,isReadOnly:p,isHovered:n}),"BaselineUI-Slider-Thumb")}),jsx(b$3,{children:jsx("input",{ref:o,...c(S,x)})})]})]})}var _e=B.forwardRef(({className:v,style:h,onChange:r,"data-block-id":p,icon:o,formatValue:i=m=>m,tooltip:S=true,iconTooltip:d=true,popoverContentProps:x,isDisabled:c,onTriggerPress:l,...e},n)=>{let m=a$9(n),[f,H]=a$a(e.value,e.defaultValue||0,r),[k,b]=B.useState(false),{keyboardProps:_}=j({onKeyDown:y=>{(y.key==="Enter"||y.key==="Escape")&&b(false);}}),{tooltipProps:T}=a$b({label:e["aria-label"],tooltip:S}),u=i(f||0),P=T?.isDisabled||e["aria-label"]?`${e["aria-label"]}, ${u}`:u.toString();return jsxs(a$c,{display:"flex",flexDirection:"row",gap:"md",paddingX:"md",alignItems:"center",className:a$5("BaselineUI-IconSlider",v),"data-block-id":p,style:h,ref:m,children:[o?jsx(a$d,{icon:o,label:e["aria-label"],tooltip:d,"aria-hidden":"true",size:24,isFocusable:false,className:sprinkles({color:"icon.primary"})}):null,jsxs(b$4,{type:"dialog",isOpen:k,onOpenChange:b,children:[jsx(j$1,{children:jsx(a$e,{...T,children:jsx(b$5,{label:u,variant:"popover","aria-label":P,isDisabled:c,style:{fontVariantNumeric:"tabular-nums",minWidth:68,justifyContent:"space-between"},onPressStart:l})})}),jsx(a$f,{placement:"bottom start",...x,children:jsx(a$g,{size:"content","aria-label":P,children:jsx(a$h,{autoFocus:true,children:jsx(a$c,{paddingY:"sm",paddingX:"lg",marginY:"md",style:{width:215},..._,children:jsx(N,{...e,onChange:y=>{H(y),r?.(y);},value:f})})})})})]})]})});_e.displayName="IconSlider";export{N as a,_e as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-Y2MIU76N.mjs';import {c}from'./chunk-ETM4MNG4.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XD43CVDT.mjs';import {e}from'./chunk-K7VOXFSK.mjs';import {t}from'./chunk-YQHHE5AT.mjs';import {a as a$1}from'./chunk-4QEH5CGK.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
|
|
@@ -7,4 +7,4 @@ import {a}from'./chunk-UCZZLAPB.mjs';import {e}from'./chunk-5TDFLLMX.mjs';import
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
function s(a$2){return a({getItems:(o,r)=>r.map(i=>({"text/plain":i.label})),renderDropIndicator(o){return jsx(t,{target:o,className:({isDropTarget:r})=>a$1(e({isDropTarget:r}),"BaselineUI-DropIndicator")})},...a$2})}export{s as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a}from'./chunk-
|
|
1
|
+
import {a}from'./chunk-XMGPNXZH.mjs';import {b}from'./chunk-N2XGJKZG.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
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$b}from'./chunk-5USQ6HBY.mjs';import {c as c$4,a as a$c,b as b$5}from'./chunk-BROSGYL3.mjs';import {b}from'./chunk-SZTFMBPY.mjs';import {e,f,g}from'./chunk-PG3WDHSK.mjs';import {a as a$5}from'./chunk-CY6W27WG.mjs';import {a as a$a}from'./chunk-6QQEK5I6.mjs';import {d}from'./chunk-W6QO7FPZ.mjs';import {c}from'./chunk-4EAXDHSV.mjs';import {d as d$1}from'./chunk-GMALMQWI.mjs';import {b as b$1}from'./chunk-N2XGJKZG.mjs';import {b as b$3}from'./chunk-K5RYVERS.mjs';import {a as a$4}from'./chunk-FPM5UJRF.mjs';import {a as a$9}from'./chunk-4QBHQCCK.mjs';import {a as a$2}from'./chunk-RSKKEGJZ.mjs';import {a as a$7}from'./chunk-STMDFIUL.mjs';import {c as c$3}from'./chunk-HH4VLTF3.mjs';import {b as b$2}from'./chunk-4S4GGUSH.mjs';import {j}from'./chunk-KUDCYGII.mjs';import {a as a$8}from'./chunk-B3EZOXNU.mjs';import {d as d$2}from'./chunk-F7WPMQ3P.mjs';import {a as a$1}from'./chunk-RT4LMB6X.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a as a$6}from'./chunk-SVIYLH7R.mjs';import {c as c$2}from'./chunk-ETM4MNG4.mjs';import {b as b$4,j as j$1}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$3}from'./chunk-4QEH5CGK.mjs';import Se,{useMemo,useState}from'react';import {jsxs,jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var A=new WeakMap;function k(e,a,r){let{value:i,children:d,"aria-label":l,"aria-labelledby":p,onPressStart:s,onPressEnd:n,onPressChange:u,onPress:c,onPressUp:v,onClick:R}=e,o=e.isDisabled||a.isDisabled,_=d!=null,P=l!=null||p!=null;!_&&!P&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let f=a.selectedValue===i,g=M=>{M.stopPropagation(),a.setSelectedValue(i);},{pressProps:V,isPressed:z}=d$2({onPressStart:s,onPressEnd:n,onPressChange:u,onPress:c,onPressUp:v,onClick:R,isDisabled:o}),{pressProps:x,isPressed:G}=d$2({onPressStart:s,onPressEnd:n,onPressChange:u,onPressUp:v,onClick:R,isDisabled:o,onPress(M){c?.(M),a.setSelectedValue(i),r.current?.focus();}}),{focusableProps:L}=c$3(c$1(e,{onFocus:()=>a.setLastFocusedValue(i)}),r),t=c$1(V,L),D=a$6(e,{labelable:true}),b=-1;a.selectedValue!=null?a.selectedValue===i&&(b=0):(a.lastFocusedValue===i||a.lastFocusedValue==null)&&(b=0),o&&(b=void 0);let{name:y,form:S,descriptionId:_e,errorMessageId:ze,validationBehavior:H}=A.get(a);a$9(r,a.defaultSelectedValue,a.setSelectedValue),a$a({validationBehavior:H},a,r);let B=a$b();return {labelProps:c$1(x,useMemo(()=>({onClick:M=>M.preventDefault(),onMouseDown:M=>M.preventDefault()}),[])),inputProps:c$1(D,{...t,type:"radio",name:y,form:S,tabIndex:b,disabled:o,required:a.isRequired&&H==="native",checked:f,value:i,onChange:g,"aria-describedby":[e["aria-describedby"],B.id,a.isInvalid?ze:null,_e].filter(Boolean).join(" ")||void 0}),descriptionProps:B,isDisabled:o,isSelected:f,isPressed:z||G}}function w(e,a,r){let{name:i,form:d,isReadOnly:l,isRequired:p,isDisabled:s,orientation:n="vertical",validationBehavior:u="aria"}=e,{direction:c}=b$1(),{isInvalid:v,validationErrors:R,validationDetails:o}=a.displayValidation,{labelProps:_,fieldProps:P,descriptionProps:f,errorMessageProps:g}=a$5({...e,labelElementType:"span",isInvalid:a.isInvalid,errorMessage:e.errorMessage||R,ref:r}),V=a$6(e,{labelable:true}),{focusWithinProps:z}=b$2({onBlurWithin(t){e.onBlur?.(t),a.selectedValue||a.setLastFocusedValue(null);},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange});function x(t,D){let b=d$1(D.currentTarget,{from:j$1(D),accept:S=>S instanceof b$4(S).HTMLInputElement&&S.type==="radio"}),y;return t==="next"?(y=b.nextNode(),y||(b.currentNode=D.currentTarget,y=b.firstChild())):(y=b.previousNode(),y||(b.currentNode=D.currentTarget,y=b.lastChild())),y?(y.focus(),a.setSelectedValue(y.value),true):false}let{keyboardProps:G}=j({shortcuts:{ArrowRight:t=>x(c==="rtl"&&n!=="vertical"?"prev":"next",t),ArrowLeft:t=>x(c==="rtl"&&n!=="vertical"?"next":"prev",t),ArrowDown:t=>x("next",t),ArrowUp:t=>x("prev",t)},allowRepeats:true}),L=c$2(i);return A.set(a,{name:L,form:d,descriptionId:f.id,errorMessageId:g.id,validationBehavior:u}),{radioGroupProps:c$1(V,{role:"radiogroup",...G,"aria-invalid":a.isInvalid||void 0,"aria-errormessage":e["aria-errormessage"],"aria-readonly":l||void 0,"aria-required":p||void 0,"aria-disabled":s||void 0,"aria-orientation":n,...P,...z}),labelProps:_,descriptionProps:f,errorMessageProps:g,isInvalid:v,validationErrors:R,validationDetails:o}}var Oe=Math.round(Math.random()*1e10),Le=0;function T(e){let a=useMemo(()=>e.name||`radio-group-${Oe}-${++Le}`,[e.name]),[r,i]=a$4(e.value,e.defaultValue??null,e.onChange),[d$1]=useState(r),[l,p]=useState(null),s=d({...e,value:r}),n=c=>{!e.isReadOnly&&!e.isDisabled&&(i(c),s.commitValidation());},u=s.displayValidation.isInvalid;return {...s,name:a,selectedValue:r,defaultSelectedValue:e.value!==void 0?d$1:e.defaultValue??null,setSelectedValue:n,lastFocusedValue:l,setLastFocusedValue:p,isDisabled:e.isDisabled||false,isReadOnly:e.isReadOnly||false,isRequired:e.isRequired||false,validationState:e.validationState||(u?"invalid":null),isInvalid:u}}var Re="_1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69c _1yep5z69d _1yep5z69e",Pe=a({defaultClassName:"cw3m0n5 _1yep5z6f0 _1yep5z6dv",variantClassNames:{isDisabled:{true:"_1yep5z611l"}},defaultVariants:{},compoundVariants:[]}),ve="cw3m0n4",ge="_1yep5z6ai _1yep5z6aj _1yep5z6ak _1yep5z6b6 _1yep5z6b7 _1yep5z6b8 _1yep5z6bu _1yep5z6bv _1yep5z6bw _1yep5z6ci _1yep5z6cj _1yep5z6ck _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z69i _1yep5z69j _1yep5z69k _1yep5z6m0",Ve=a({defaultClassName:"cw3m0n0 _1yep5z61k2 _1yep5z61k3 _1yep5z61k4 _1yep5z61kq _1yep5z61kr _1yep5z61ks _1yep5z61le _1yep5z61lf _1yep5z61lg _1yep5z61m2 _1yep5z61m3 _1yep5z61m4 _1yep5z61ob _1yep5z61us",variantClassNames:{isHovered:{true:"cw3m0n1"},isReadOnly:{true:"cw3m0n2"}},defaultVariants:{},compoundVariants:[[{isHovered:true,isReadOnly:false},"cw3m0n3"]]});var he=({label:e,description:a},{isSelected:r,isFocusVisible:i,isDisabled:d,optionLabelPosition:l,isHovered:p,isReadOnly:s})=>jsxs("div",{className:b$5({labelPosition:l}),children:[jsx("div",{className:a$3(c$4({isSelected:r,isFocusVisible:i,isDisabled:d,isReadOnly:s,isHovered:p}),Ve({isHovered:p})),children:r?jsx("div",{className:ve}):null}),e?jsxs("div",{className:Re,children:[jsx("span",{className:a$c({isDisabled:d}),children:e}),a?jsx("span",{className:Pe({isDisabled:d}),children:a}):null]}):null]}),xe=({state:e,renderOption:a=he,item:r,optionLabelPosition:i="end",optionStyle:d,optionClassName:l,isReadOnly:p,...s})=>{let n=!!s.isDisabled||!!s.disabledValues?.includes(r.id),u=Se.useRef(null),{inputProps:c,isPressed:v,isSelected:R,labelProps:o}=k({...s,isDisabled:n,children:r.label,value:r.id},e,u),{focusProps:_,isFocusVisible:P,isFocused:f}=a$7(),{hoverProps:g,isHovered:V}=a$8({isDisabled:n},u),z=a$2({"data-selected":R,"data-focused":f,"data-focus-visible":P,"data-hovered":V,"data-disabled":n,"data-pressed":v,"data-read-only":p});return jsxs("label",{...c$1(o,g,z),style:d,className:a$3("BaselineUI-Radio-Item",l),children:[jsx(b$3,{children:jsx("input",{...c$1(c,_),ref:u})}),a(r,{isFocusVisible:P,isSelected:R,isFocused:f,isHovered:V,isDisabled:n,optionLabelPosition:i,isReadOnly:p})]})};var De=Se.forwardRef(({className:e$1,style:a,optionsContainerClassName:r,optionsContainerStyle:i,items:d,labelPosition:l="top",renderOption:p,"aria-label":s,"aria-labelledby":n,"aria-describedby":u,"aria-details":c$2,"data-block-id":v,"data-block-class":R,...o},_)=>{let P=a$1(_),f$1=T(o),{radioGroupProps:g$1,labelProps:V,descriptionProps:z,errorMessageProps:x}=w({...o,"aria-label":s,"aria-labelledby":n,"aria-describedby":u,"aria-details":c$2},f$1,P),G=b({...o,descriptionProps:z,errorMessageProps:x,labelPosition:l}),L=a$2({"data-orientation":o.orientation,"data-block-id":v,"data-block-class":R,"data-disabled":o.isDisabled,"data-readonly":o.isReadOnly});return jsxs("div",{...c$1(g$1,L),className:a$3(g({labelPosition:l}),"BaselineUI-RadioGroup",e$1),style:a,ref:P,children:[o.label||G?jsxs("div",{className:f({labelPosition:l,hasMessage:!!G}),children:[jsx("span",{...V,className:a$3(e,"BaselineUI-RadioGroup-Label"),children:o.label}),l==="start"&&G]}):null,jsx("div",{className:a$3(ge,{[c]:o.isDisabled},r),style:i,children:d.map(t=>jsx(xe,{state:f$1,renderOption:p,item:t,optionLabelPosition:o.optionLabelPosition,optionStyle:o.optionStyle,optionClassName:o.optionClassName,isReadOnly:o.isReadOnly,isDisabled:o.isDisabled,disabledValues:o.disabledValues,value:t.id},t.id))}),l==="top"&&G]})});De.displayName="RadioGroup";export{De as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {d}from'./chunk-SD43KVTU.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {a}from'./chunk-CV6JQGJ3.mjs';import {jsx,Fragment}from'react/jsx-runtime
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
function r(o){return o?d(o.getRootNode()):false}export{r as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {b,a}from'./chunk-SD43KVTU.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 u(n,t){let e=b(t),i=a(t);if(i==null||e==null)return;let c,d=`meta[name="${CSS.escape(n)}"], meta[property="${CSS.escape(n)}"]`,o=i.querySelector(d);return o&&o instanceof e.HTMLMetaElement&&(n==="csp-nonce"&&o.nonce&&(c??=o.nonce||void 0),o.content&&(c??=o.content||void 0)),n==="csp-nonce"&&(c??=e.__webpack_nonce__||globalThis.__webpack_nonce__||void 0),c}var f=new WeakMap;function s(n){let t=a(n),e=f.get(t);return e??=u("csp-nonce",t),e!==void 0&&f.set(t,e),e}export{u as a,s as b};
|
|
@@ -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
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var w=e=>p(e)?e.document:E(e)?e:e?.ownerDocument??(typeof document<"u"?document:void 0),s=e=>w(e)?.defaultView??(typeof window<"u"?window:void 0);function f(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function p(e){return typeof e=="object"&&e!=null&&"window"in e&&e.window===e}function E(e){return f(e)&&e.nodeType===9}function a(e){return f(e)&&e.nodeType===11&&"host"in e}function y(e,t,n,o){if(n==null||e==null)return ()=>{};let r=Array.isArray(e)?e:[e];for(let l of r)l.addEventListener(t,n,o);return ()=>{for(let l of r)l.removeEventListener(t,n,o);}}function h(e,t,n,o){if(e==null)return ()=>{};let r=new Array,l=Array.isArray(e)?e:[e];for(let i of l){let d=i.style.getPropertyValue(t),m=i.style.getPropertyPriority(t);i.style.setProperty(t,n,o),r.unshift(()=>{d?i.style.setProperty(t,d,m):i.style.removeProperty(t);});}return ()=>{for(let i of r)i();}}var T=true;function u(){return T}function P(e,t){if(!e||!t)return false;let n=t;for(;n!=null;){if(n===e)return true;let o=n.assignedSlot;o?n=o:a(n)?n=n.host:n=n.parentNode;}return false}var L=(e=document)=>{let t=e.activeElement;for(;t&&"shadowRoot"in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function O(e){let t=e.target;if(t&&"shadowRoot"in t&&t.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return t}function c(e,t=document){if(typeof t.getElementById=="function"){let o=t.getElementById(e);if(o)return o}let n=t.children||[];for(let o of n){if(o.getAttribute&&o.getAttribute("id")===e)return o;if(o.shadowRoot){let l=c(e,o.shadowRoot);if(l)return l}let r=c(e,o);if(r)return r}return null}function A(e,t){if(t===null)return [];t=t??s(e);let n=[t];if(!e||e===t)return n;let o="getRootNode"in t?t.getRootNode():null,r=e.getRootNode()??null;for(;a(r)&&r!==o;)n.push(r),r=r.host.getRootNode();return n}function W(e){if(!e)return false;let t=e.getRootNode(),n=s(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return false;let o=t.activeElement;return o!=null&&e.contains(o)}export{w as a,s as b,f as c,a as d,y as e,h as f,u as g,P as h,L as i,O as j,c as k,A as l,W as m};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {c}from'./chunk-HH4VLTF3.mjs';import {d}from'./chunk-F7WPMQ3P.mjs';import {c as c$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SVIYLH7R.mjs';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -7,4 +7,4 @@ import {d as d$1}from'./chunk-BGMVPFYK.mjs';import {d}from'./chunk-AQYBKDT2.mjs'
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
function g(t,i){let{elementType:e="button",isDisabled:n,onPress:f,onPressStart:d$
|
|
10
|
+
function g(t,i){let{elementType:e="button",isDisabled:n,onPress:f,onPressStart:d$1,onPressEnd:m,onPressUp:b,onPressChange:c$2,preventFocusOnPress:B,allowFocusWhenDisabled:A,onClick:T,href:P,target:x,rel:E,type:s="button"}=t,r;e==="button"?r={type:s,disabled:n,form:t.form,formAction:t.formAction,formEncType:t.formEncType,formMethod:t.formMethod,formNoValidate:t.formNoValidate,formTarget:t.formTarget,name:t.name,value:t.value}:r={role:"button",href:e==="a"&&!n?P:void 0,target:e==="a"?x:void 0,type:e==="input"?s:void 0,disabled:e==="input"?n:void 0,"aria-disabled":!n||e==="input"?void 0:n,rel:e==="a"?E:void 0};let{pressProps:M,isPressed:L}=d({onPressStart:d$1,onPressEnd:m,onPressChange:c$2,onPress:f,onPressUp:b,onClick:T,isDisabled:n,preventFocusOnPress:B,ref:i}),{focusableProps:o}=c(t,i);A&&(o.tabIndex=n?-1:o.tabIndex);let O=c$1(o,M,a(t,{labelable:true}));return {isPressed:L,buttonProps:c$1(r,O,{"aria-haspopup":t["aria-haspopup"],"aria-expanded":t["aria-expanded"],"aria-controls":t["aria-controls"],"aria-pressed":t["aria-pressed"],"aria-current":t["aria-current"],"aria-disabled":t["aria-disabled"]})}}export{g as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$1}from'./chunk-66CUIXA6.mjs';import {b as b$1}from'./chunk-3WKDIXCM.mjs';import {a}from'./chunk-SD43KVTU.mjs';import {b}from'./chunk-RMUV6NJJ.mjs';import*as y from'dompurify';import c,{useId}from'react';import {jsx}from'react/jsx-runtime';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var I=(e,t)=>{e.setAttribute("height",typeof t=="number"?`${t}px`:t),e.setAttribute("width",typeof t=="number"?`${t}px`:t);},R=(e,t,n)=>{let o=e.querySelector("title"),i=a(e);if(o)o.textContent=t,o.setAttribute("id",n);else {let r=i.createElement("title");r.textContent=t,r.setAttribute("id",n),e.prepend(r);}},T=(e,t)=>{t&&e.classList.add(t);},w=(e,t)=>{let n=t.createElement("span");n.innerHTML=y.default.sanitize(e);let o=n.querySelector("svg");return a$1(o,"Icon: svg prop must be a valid svg string"),o},x=c.forwardRef(({size:e,title:t,className:n,style:o,color:i,...r},v)=>{let u=useId(),f=b(),l=c.useRef(null),m="svg"in r?r.svg:void 0,a$1=c.useMemo(()=>{if(m&&!f){let b=a(l.current),s=w(m,b);return e&&I(s,e),t&&R(s,t,u),T(s,n),s.outerHTML}},[m,e,t,n,u,f]);return jsx("span",{className:n,ref:b$1(v,l),style:{display:"contents",...o,color:i},dangerouslySetInnerHTML:a$1?{__html:a$1}:void 0})});x.displayName="Icon";export{x as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a}from'./chunk-XPISSX5R.mjs';import {useState,useMemo}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var F={};a(F,{useListData:()=>w,useTreeData:()=>L});function w(S){let{initialItems:m=[],initialSelectedKeys:c,getKey:a=K=>K.id??K.key,filter:r,initialFilterText:e=""}=S,[t,n]=useState({items:m,selectedKeys:c==="all"?"all":new Set(c||[]),filterText:e}),u=useMemo(()=>r?t.items.filter(K=>r(K,t.filterText)):t.items,[t.items,t.filterText,r]);return {...t,items:u,...B({getKey:a},n),getItem(K){return t.items.find(p=>a(p)===K)}}}function B(S,m){let{cursor:c,getKey:a}=S;return {setSelectedKeys(r){m(e=>({...e,selectedKeys:r}));},addKeysToSelection(r){m(e=>e.selectedKeys==="all"?e:r==="all"?{...e,selectedKeys:"all"}:{...e,selectedKeys:new Set([...e.selectedKeys,...r])});},removeKeysFromSelection(r){m(e=>{if(r==="all")return {...e,selectedKeys:new Set};let t=e.selectedKeys==="all"?new Set(e.items.map(a)):new Set(e.selectedKeys);for(let n of r)t.delete(n);return {...e,selectedKeys:t}});},setFilterText(r){m(e=>({...e,filterText:r}));},insert(r,...e){m(t=>M(t,r,...e));},insertBefore(r,...e){m(t=>{let n=t.items.findIndex(u=>a?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return M(t,n,...e)});},insertAfter(r,...e){m(t=>{let n=t.items.findIndex(u=>a?.(u)===r);if(n===-1)if(t.items.length===0)n=0;else return t;return M(t,n+1,...e)});},prepend(...r){m(e=>M(e,0,...r));},append(...r){m(e=>M(e,e.items.length,...r));},remove(...r){m(e=>{let t=new Set(r),n=e.items.filter(K=>!t.has(a(K))),u="all";if(e.selectedKeys!=="all"){u=new Set(e.selectedKeys);for(let K of r)u.delete(K);}return c==null&&n.length===0&&(u=new Set),{...e,items:n,selectedKeys:u}});},removeSelectedItems(){m(r=>{if(r.selectedKeys==="all")return {...r,items:[],selectedKeys:new Set};let e=r.selectedKeys,t=r.items.filter(n=>!e.has(a(n)));return {...r,items:t,selectedKeys:new Set}});},move(r,e){m(t=>{let n=t.items.findIndex(p=>a(p)===r);if(n===-1)return t;let u=t.items.slice(),[K]=u.splice(n,1);return u.splice(e,0,K),{...t,items:u}});},moveBefore(r,e){m(t=>{let n=t.items.findIndex(p=>a(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>a(k)===p)).sort((p,k)=>p-k);return N(t,K,n)});},moveAfter(r,e){m(t=>{let n=t.items.findIndex(p=>a(p)===r);if(n===-1)return t;let K=(Array.isArray(e)?e:[...e]).map(p=>t.items.findIndex(k=>a(k)===p)).sort((p,k)=>p-k);return N(t,K,n+1)});},update(r,e){m(t=>{let n=t.items.findIndex(K=>a(K)===r);if(n===-1)return t;let u;return typeof e=="function"?u=e(t.items[n]):u=e,{...t,items:[...t.items.slice(0,n),u,...t.items.slice(n+1)]}});}}}function M(S,m,...c){return {...S,items:[...S.items.slice(0,m),...c,...S.items.slice(m)]}}function N(S,m,c){c-=m.filter(e=>e<c).length;let a=m.map(e=>({from:e,to:c++}));for(let e=0;e<a.length;e++){let t=a[e].from;for(let n=e;n<a.length;n++)a[n].from>t&&a[n].from--;}for(let e=0;e<a.length;e++){let t=a[e];for(let n=a.length-1;n>e;n--){let u=a[n];u.from<t.to?t.to++:u.from++;}}let r=S.items.slice();for(let e of a){let[t]=r.splice(e.from,1);r.splice(e.to,0,t);}return {...S,items:r}}function L(S){let{initialItems:m=[],initialSelectedKeys:c,getKey:a=l=>l.id??l.key,getChildren:r=l=>l.children}=S,[e,t]=useState(()=>k(m,new Map)),{items:n,nodeMap:u}=e,[K,p]=useState(new Set(c||[]));function k(l=[],o,s){return l==null&&(l=[]),{items:l.map(T=>{let y={key:a(T),parentKey:s??null,value:T,children:null};return y.children=k(r(T),o,y.key).items,o.set(y.key,y),y}),nodeMap:o}}function x(l,o,s,T){let y=o==null?null:T.get(o);if(y==null)return {items:l,nodeMap:T};let d=new Map(T),i=s(y);for(i==null?b(y,d):I(i,d);y&&y.parentKey;){let f=d.get(y.parentKey),v={key:f.key,parentKey:f.parentKey,value:f.value,children:null},h=f.children;i==null&&h&&(h=h.filter(g=>g!==y)),v.children=h?.map(g=>g===y?i:g)??null,d.set(v.key,v),i=v,y=f;}return i==null&&(l=l.filter(f=>f!==y)),{items:l.map(f=>f===y?i:f),nodeMap:d}}function I(l,o){if(o.set(l.key,l),l.children)for(let s of l.children)I(s,o);}function b(l,o){if(o.delete(l.key),l.children)for(let s of l.children)b(s,o);}return {items:n,selectedKeys:K,setSelectedKeys:p,getItem(l){return u.get(l)},insert(l,o,...s){t(({items:T,nodeMap:y})=>{let{items:d,nodeMap:i}=k(s,new Map(y),l);return l==null?{items:[...T.slice(0,o),...d,...T.slice(o)],nodeMap:i}:x(T,l,f=>({key:f.key,parentKey:f.parentKey,value:f.value,children:[...f.children.slice(0,o),...d,...f.children.slice(o)]}),i)});},insertBefore(l,...o){let s=u.get(l);if(!s)return;let T=u.get(s.parentKey),d=(T?T.children:n).indexOf(s);this.insert(T?.key??null,d,...o);},insertAfter(l,...o){let s=u.get(l);if(!s)return;let T=u.get(s.parentKey),d=(T?T.children:n).indexOf(s);this.insert(T?.key??null,d+1,...o);},prepend(l,...o){this.insert(l,0,...o);},append(l,...o){if(l==null)this.insert(null,n.length,...o);else {let s=u.get(l);if(!s)return;this.insert(l,s.children.length,...o);}},remove(...l){if(l.length===0)return;let o=n,s=u,T;for(let d of l)T=x(o,d,()=>null,s),s=T.nodeMap,o=T.items;t(T);let y=new Set(K);for(let d of K)T.nodeMap.has(d)||y.delete(d);p(y);},removeSelectedItems(){this.remove(...K);},move(l,o,s){t(({items:T,nodeMap:y})=>{let d=o;for(;d!=null;){if(d===l)throw new Error("Cannot move an item to be a child of itself.");d=y.get(d)?.parentKey??null;}let i=y.get(l);if(!i)return {items:T,nodeMap:y};let{items:f,nodeMap:v}=x(T,l,()=>null,y),h={...i,parentKey:o};return o==null?(I(h,v),{items:[...f.slice(0,s),h,...f.slice(s)],nodeMap:v}):x(f,o,g=>({key:g.key,parentKey:g.parentKey,value:g.value,children:[...g.children.slice(0,s),h,...g.children.slice(s)]}),v)});},moveBefore(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,f=null;i!=null&&(f=y.get(i)??null);let v=f?.children?f.children.indexOf(d):T.indexOf(d);return A(s,o,f,v,x,I)});},moveAfter(l,o){t(s=>{let{items:T,nodeMap:y}=s,d=y.get(l);if(!d)return s;let i=d.parentKey??null,f=null;i!=null&&(f=y.get(i)??null);let v=f?.children?f.children.indexOf(d):T.indexOf(d);return v++,A(s,o,f,v,x,I)});},update(l,o){t(({items:s,nodeMap:T})=>x(s,l,y=>{let d={key:y.key,parentKey:y.parentKey,value:o,children:null},i=k(r(o),T,d.key);return d.children=i.items,d},T));}}}function A(S,m,c,a,r,e){let{items:t,nodeMap:n}=S,u=c,K=new Set(m);for(;u!=null;){if(K.has(u.key))throw new Error("Cannot move an item to be a child of itself.");u=u.parentKey!=null?n.get(u.parentKey)??null:null;}let p=a,k=Array.isArray(m)?m:[...m],x=new Map,I=[],b=t,l=n,o=0;function s(i,{inorder:f,postorder:v}){if(f?.(i),i!=null)for(let h of i.children??[])s(h,{inorder:f,postorder:v}),v?.(h);}function T(i){k.includes(i.key)&&x.set(i.key,o++);}function y(i){if(k.includes(i.key)){I.push({...l.get(i.key),parentKey:c?.key??null});let{items:f,nodeMap:v}=r(b,i.key,()=>null,l);b=f,l=v;}(i.parentKey===c||i.parentKey===c?.key)&&k.includes(i.key)&&(c?.children?c.children.indexOf(i):t.indexOf(i))<p&&a--;}s({children:t},{inorder:T,postorder:y});let d=I.sort((i,f)=>x.get(i.key)>x.get(f.key)?1:-1);return !c||c.key==null?(d.forEach(i=>{e(i,l);}),{items:[...b.slice(0,a),...d,...b.slice(a)],nodeMap:l}):r(b,c.key,i=>({key:i.key,parentKey:i.parentKey,value:i.value,children:[...i.children.slice(0,a),...d,...i.children.slice(a)]}),l)}export{w as a,L as b,F as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,b as b$1}from'./chunk-
|
|
1
|
+
import {a,b as b$1}from'./chunk-4S4GGUSH.mjs';import {b,h as h$1}from'./chunk-KUDCYGII.mjs';import {useRef,useState,useCallback}from'react';/**
|
|
2
2
|
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var b=new Set(["id"]),u=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),c=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),P=new Set(["dir","lang","hidden","inert","translate","suppressHydrationWarning"]),r=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),M=/^(data-.*)$/;function O(n,a={}){let{labelable:i,isLink:s,global:e,events:l=e,propNames:p}=a,t={};for(let o in n)Object.prototype.hasOwnProperty.call(n,o)&&(b.has(o)||i&&u.has(o)||s&&c.has(o)||e&&P.has(o)||l&&(r.has(o)||o.endsWith("Capture")&&r.has(o.slice(0,-7)))||p?.has(o)||M.test(o))&&(t[o]=n[o]);return t}export{O as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$3}from'./chunk-KVIV5RTE.mjs';import {q}from'./chunk-K7VOXFSK.mjs';import {b as b$2}from'./chunk-UO75BAPM.mjs';import {c,b}from'./chunk-DZDZZRWE.mjs';import {a as a$2}from'./chunk-O7XK2WIX.mjs';import {a as a$4}from'./chunk-VGFPT43C.mjs';import {b as b$1}from'./chunk-K5RYVERS.mjs';import {j}from'./chunk-SD43KVTU.mjs';import {a}from'./chunk-JQQGRJ5J.mjs';import {a as a$1}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
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var P="_1x35j5g0 _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jk _1yep5z6jl _1yep5z6jm _1yep5z6m3 _1yep5z6m6",D=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:[]}),V="_1x35j5g5 _1yep5z66 _1yep5z67 _1yep5z68 _1yep5z62i _1yep5z62j _1yep5z62k _1yep5z6j8 _1yep5z6j9 _1yep5z6ja _1yep5z6jz _1yep5z6k0 _1yep5z6k1 _1yep5z69l _1yep5z69m _1yep5z69n _1yep5z6m3",S=a({defaultClassName:"_1x35j5g7 _1yep5z6dy _1yep5z6ey",variantClassNames:{isLoading:{true:"_1yep5z611j"}},defaultVariants:{},compoundVariants:[]}),H="_1yep5z64r _1yep5z64s _1yep5z64t _1yep5z673 _1yep5z674 _1yep5z675 _1yep5z689 _1yep5z68a _1yep5z68b _1yep5z65x _1yep5z65y _1yep5z65z",A="_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"}),X=a$1(sprinkles({display:"flex",flexDirection:"column",width:"full",paddingY:"md"}),"BaselineUI-Box");function Z({item:e,isFocusVisible:g,isDisabled:i,onRemove:t,loadingLabel:a,removeHintLabel:s}){let{formatMessage:p}=b(),n=!!e.isLoading,l=!!(e.errorMessage||e.errorExplanation),b$3=!i&&!n&&!!t,c=(typeof a=="function"?a({fileName:e.name}):a)??p(O.loading,{fileName:e.name}),y=e.name;return n?y=c:b$3&&(y=(typeof s=="function"?s({fileName:e.name}):s)??p(O.removeHint,{fileName:e.name})),jsxs("div",{className:D({isDisabled:i,isFocusVisible:g,isError:l}),"data-error":l||void 0,children:[jsx(b$1,{children:jsx(b$2,{slot:"label",children:y})}),jsxs("div",{className:V,children:[jsx(AttachmentsIcon,{width:16,height:16,className:Q}),jsx("span",{className:A,children:jsx("span",{className:S({isLoading:n}),title:e.name,children:e.name})}),jsxs(a$2,{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:H,"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]})]}),jsxs(b$2,{slot:"description",elementType:"div",className:l?X:void 0,children:[e.errorMessage?jsx(a$2,{elementType:"span",typography:"label.sm.medium",color:"support.error.medium",children:e.errorMessage}):null,e.errorExplanation?jsx(a$2,{elementType:"span",typography:"label.sm.medium",color:"text.helper",children:e.errorExplanation}):null]})]})}var U=d.forwardRef(({className:e,style:g,items:i,onRemove:t,disabledKeys:a,loadingLabel:s,removeHintLabel:p,"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c},y)=>{let u=a==="all",_=d.useMemo(()=>new Set(a&&a!=="all"?a:[]),[a]),j$1=d.useMemo(()=>new Map(i.map(r=>[r.id,r])),[i]),N=d.useMemo(()=>i.map(r=>({id:r.id,label:r.name})),[i]),R=d.useCallback((r,{isFocusVisible:h})=>{let f=j$1.get(r.id);return f?jsx(Z,{item:f,isFocusVisible:h,isDisabled:u||_.has(f.id),onRemove:t,loadingLabel:s,removeHintLabel:p}):null},[j$1,u,_,t,s,p]);if(!i.length)return null;let K=u?N.map(r=>r.id):_,Y=r=>{if(!t||r.key!=="Delete"&&r.key!=="Backspace"||u)return;let z=j(r)?.closest("[data-key]")?.dataset.key;z&&(_.has(z)||j$1.get(z)?.isLoading||(r.preventDefault(),t(z)));};return jsx(a$2,{ref:y,className:a$1("BaselineUI-FileList",e),style:g,onKeyDown:Y,children:jsx(q,{"aria-label":n,"aria-labelledby":l,"aria-describedby":b,"aria-details":c,items:N,selectionMode:"none",disabledKeys:K,className:P,renderOption:R})})});U.displayName="FileList";var O=c({loading:{id:"bui.fileList.loading",defaultMessage:"Loading {fileName}"},removeHint:{id:"bui.fileList.removeHint",defaultMessage:"{fileName}, press Delete or Backspace to remove"}});export{U as a};
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* This notice may not be removed from this file.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
var p=10,y=5,h=class{delegate=null;state=null;direction="ltr";pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null};setup(r,a,n){this.delegate=r,this.state=a,this.direction=n;}getDropTargetFromPoint(r,a,n){let i=this.delegate.getDropTargetFromPoint(r,a,n);return !i||i.type==="root"?i:this.resolveDropTarget(i,r,a,n)}resolveDropTarget(r,a,n,i){let t=this.pointerTracking,u=n-t.lastY,o=a-t.lastX,f=t.yDirection,l=t.xDirection;if(Math.abs(u)>y&&(f=u>0?"down":"up",t.yDirection=f,t.lastY=n),Math.abs(o)>p&&(l=o>0?"right":"left",t.xDirection=l,t.lastX=a),r.dropPosition==="before"){let g=this.state.collection.getKeyBefore(r.key);for(;g!=null;){let c=this.state.collection.getItem(g);if(c?.type==="item")break;g=c?.parentKey??null;}if(g!=null){let c={type:"item",key:g,dropPosition:"after"};i(c)&&(r=c);}}let e=this.getPotentialTargets(r,i);if(e.length===0)return {type:"root"};let d;return e.length>1?d=this.selectTarget(e,r,a,n,f,l):(d=e[0],t.boundaryContext=null),d}getPotentialTargets(r,a){if(r.dropPosition==="on")return [r];let n=r,i=this.state.collection,t=i.getItem(n.key);for(;t&&t?.type!=="item"&&t.nextKey!=null;)n.key=t.nextKey,t=i.getItem(t.nextKey);let u=[n];if(t&&t.hasChildNodes&&this.state.expandedKeys.has(t.key)&&i.getChildren&&n.dropPosition==="after"){let l=t.firstChildKey!=null?i.getItem(t.firstChildKey):null;for(;l&&l.type!=="item";)l=l.nextKey!=null?i.getItem(l.nextKey):null;if(l?.type==="item"){let e={type:"item",key:l.key,dropPosition:"before"};return a(e)?[e]:[]}}if(t?.nextKey!=null)return [r];let o=t?.parentKey,f=[];for(;o!=null;){let l=i.getItem(o),e=l?.nextKey!=null?i.getItem(l.nextKey):null;if(!e||e.parentKey!==o){let g={type:"item",key:o,dropPosition:"after"};
|
|
10
|
+
var p=10,y=5,h=class{delegate=null;state=null;direction="ltr";pointerTracking={lastY:0,lastX:0,yDirection:null,xDirection:null,boundaryContext:null};setup(r,a,n){this.delegate=r,this.state=a,this.direction=n;}getDropTargetFromPoint(r,a,n){let i=this.delegate.getDropTargetFromPoint(r,a,n);return !i||i.type==="root"?i:this.resolveDropTarget(i,r,a,n)}resolveDropTarget(r,a,n,i){let t=this.pointerTracking,u=n-t.lastY,o=a-t.lastX,f=t.yDirection,l=t.xDirection;if(Math.abs(u)>y&&(f=u>0?"down":"up",t.yDirection=f,t.lastY=n),Math.abs(o)>p&&(l=o>0?"right":"left",t.xDirection=l,t.lastX=a),r.dropPosition==="before"){let g=this.state.collection.getKeyBefore(r.key);for(;g!=null;){let c=this.state.collection.getItem(g);if(c?.type==="item")break;g=c?.parentKey??null;}if(g!=null){let c={type:"item",key:g,dropPosition:"after"};i(c)&&(r=c);}}let e=this.getPotentialTargets(r,i);if(e.length===0)return {type:"root"};let d;return e.length>1?d=this.selectTarget(e,r,a,n,f,l):(d=e[0],t.boundaryContext=null),d}getPotentialTargets(r,a){if(r.dropPosition==="on")return [r];let n=r,i=this.state.collection,t=i.getItem(n.key);for(;t&&t?.type!=="item"&&t.nextKey!=null;)n.key=t.nextKey,t=i.getItem(t.nextKey);let u=[n];if(t&&t.hasChildNodes&&this.state.expandedKeys.has(t.key)&&i.getChildren&&n.dropPosition==="after"){let l=t.firstChildKey!=null?i.getItem(t.firstChildKey):null;for(;l&&l.type!=="item";)l=l.nextKey!=null?i.getItem(l.nextKey):null;if(l?.type==="item"){let e={type:"item",key:l.key,dropPosition:"before"};return a(e)?[e]:[]}}if(t?.nextKey!=null)return [r];let o=t?.parentKey,f=[];for(;o!=null;){let l=i.getItem(o),e=l?.nextKey!=null?i.getItem(l.nextKey):null;if(!e||e.parentKey!==o){if(l?.type==="item"){let g={type:"item",key:o,dropPosition:"after"};a(g)&&f.push(g);}if(e)break}o=l?.parentKey;}if(f.length>0&&u.push(...f),u.length===1){let l=i.getKeyAfter(n.key),e=l!=null?i.getItem(l):null;if(l!=null&&e&&t&&e.level!=null&&t.level!=null&&e.level>t.level){let d={type:"item",key:l,dropPosition:"before"};if(a(d))return [d]}}return u.filter(a)}selectTarget(r,a,n,i,t,u){if(r.length<2)return r[0];let o=this.pointerTracking,l=this.state.collection.getItem(a.key)?.parentKey;if(l==null)return r[0];if(!o.boundaryContext||o.boundaryContext.parentKey!==l){let s=o.yDirection==="up"?r.length-1:0;o.boundaryContext={parentKey:l,preferredTargetIndex:s,lastSwitchY:i,lastSwitchX:n};}let e=o.boundaryContext,d=Math.abs(n-e.lastSwitchX);if(Math.abs(i-e.lastSwitchY)>y&&t){let s=e.preferredTargetIndex||0;t==="down"&&s===0?e.preferredTargetIndex=r.length-1:t==="up"&&s===r.length-1&&(e.preferredTargetIndex=0),o.xDirection=null;}if(d>p&&u){let s=e.preferredTargetIndex||0;u==="left"?this.direction==="ltr"?s<r.length-1&&(e.preferredTargetIndex=s+1,e.lastSwitchX=n):s>0&&(e.preferredTargetIndex=s-1,e.lastSwitchX=n):u==="right"&&(this.direction==="ltr"?s>0&&(e.preferredTargetIndex=s-1,e.lastSwitchX=n):s<r.length-1&&(e.preferredTargetIndex=s+1,e.lastSwitchX=n)),o.yDirection=null;}let c=Math.max(0,Math.min(e.preferredTargetIndex||0,r.length-1));return r[c]}};export{h as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {e}from'./chunk-UZ672WDX.mjs';import {useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
function d(){return Object.prototype.hasOwnProperty.call(HTMLElement.prototype,"inert")}function p({ref:n,isDisabled:o}){useEffect(()=>{if(!n.current||o)return;let t=n.current;if(d())return t.hasAttribute("inert")?void 0:(t.setAttribute("inert","true"),()=>{t.removeAttribute("inert");});let i=new Map,u=t.hasAttribute("aria-hidden")?t.getAttribute("aria-hidden")==="true":null;t.setAttribute("aria-hidden","true");let s=()=>{if(!n.current)return;let r=e(n.current);for(let e of r)i.has(e)||(i.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1"));};s();let a=new MutationObserver(r=>{for(let e of r)if(e.type==="childList"){for(let c of e.removedNodes)c instanceof Element&&i.delete(c);s();}});return a.observe(n.current,{childList:true,subtree:true,attributes:false}),()=>{a.disconnect();for(let[r,e]of i.entries())r.isConnected&&(e===null?r.removeAttribute("tabindex"):r.setAttribute("tabindex",e));u===null?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",u?"true":"false");}},[n,o]);}export{p as a};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {a as a$3}from'./chunk-CWPFUB7B.mjs';import {a as a$e}from'./chunk-NV7KQVPE.mjs';import {a as a$f}from'./chunk-KVIV5RTE.mjs';import {f,b as b$4,i,g,a as a$b,h,c as c$2,e as e$1,d}from'./chunk-5VNC6UYE.mjs';import {a as a$9}from'./chunk-XD43CVDT.mjs';import {q as q$1}from'./chunk-K7VOXFSK.mjs';import {p,t}from'./chunk-YQHHE5AT.mjs';import {a as a$a}from'./chunk-NMSOOQB2.mjs';import {a as a$8}from'./chunk-W7OTSFZS.mjs';import {a as a$7,b as b$5}from'./chunk-KCHAWPUN.mjs';import {b as b$3,e}from'./chunk-4RSUKS23.mjs';import {b}from'./chunk-UO75BAPM.mjs';import {b as b$2,c as c$1}from'./chunk-DZDZZRWE.mjs';import {a as a$d}from'./chunk-O7XK2WIX.mjs';import {a as a$c}from'./chunk-VGFPT43C.mjs';import {a as a$4}from'./chunk-3BG6K2G2.mjs';import {a as a$6}from'./chunk-FPM5UJRF.mjs';import {a}from'./chunk-SGZWUG3H.mjs';import {a as a$1}from'./chunk-B3EZOXNU.mjs';import {a as a$5}from'./chunk-RT4LMB6X.mjs';import {b as b$1,c}from'./chunk-3WKDIXCM.mjs';import {a as a$2}from'./chunk-4QEH5CGK.mjs';import {sprinkles}from'@baseline-ui/tokens';import J,{useRef,useLayoutEffect,useState,useContext,useEffect,useCallback,useMemo}from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import {XIcon}from'@baseline-ui/icons/12';import {useReducedMotion,motion}from'motion/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 Me=t$1=>a$9({getItems:(e,o)=>o.map(s=>({"text/plain":s.label})),renderDropIndicator(e){return jsx(t,{target:e,className:({isDropTarget:o})=>a$2(a$a({isDropTarget:o}),"BaselineUI-DropIndicator")})},...t$1});function q(t,e){return t.find(o=>o.id===e)}function Re(t,e,o){let s=[...t],l=s.filter(r=>o.has(r.id)),n=s.filter(r=>!o.has(r.id)),i=n.findIndex(r=>r.id===e);return n.flatMap((r,c)=>c===i?[...l,r]:r)}function Ee(t,e,o){let s=[...t],l=s.filter(r=>o.has(r.id)),n=s.filter(r=>!o.has(r.id)),i=n.findIndex(r=>r.id===e);return n.flatMap((r,c)=>c===i?[r,...l]:r)}function V(t){return t.map(e=>({id:e.id,label:e.label,data:{src:e.src,alt:e.alt}}))}function E(t){return t.map(e=>({id:e.id,label:e.label,src:e.data?.src,alt:e.data?.alt}))}var K={src:"src",alt:"alt"},T={sm:102,md:170};function Ke(t,e){let o=q(t,e);return {[K.src]:o?.data?.src||"",[K.alt]:o?.data?.alt||"",key:String(e)}}function He(t){let e=t[K.src];return e?{src:String(e),alt:t[K.alt]?String(t[K.alt]):""}:null}function _e({fit:t,imageDimensions:e,item:o,isSelected:s}){let l={display:"block",objectFit:t},n=typeof e=="function"?o?e(o,{isSelected:s}):void 0:e;if(!n)return l;let i=typeof n.width=="string"?T[n.width]:n.width;return l.width=i,l.aspectRatio="height"in n?`${i} / ${n.height}`:n.aspectRatio.toString(),l}var ze=J.forwardRef(({className:t,children:e,style:o,isDisabled:s,onTruncatedChange:l,onHoverChange:n},i)=>{let r=useRef(null),{buttonProps:c$1}=a({elementType:"span",isDisabled:s},r);useLayoutEffect(()=>{r.current&&l?.(r.current.scrollWidth>r.current.clientWidth);},[e,l]);let{hoverProps:I}=a$1({isDisabled:s,onHoverChange:n});return jsx(b,{elementType:"span",slot:"label",...c(c$1,I),className:a$2(t,"BaselineUI-AdaptiveText"),tabIndex:-1,ref:b$1(r,i),style:o,role:void 0,children:e})});ze.displayName="Label";var re=J.memo(J.forwardRef(({children:t,isOpen:e,isDisabled:o,...s},l)=>{let[n,i]=useState(false),[r,c]=useState(false),I=a$3(),S=o||!r||I;return jsx(a$4,{text:t,variant:"inverse",includeArrow:false,size:"sm",placement:"bottom start",isOpen:(n||e)&&r,isDisabled:S,children:jsx(ze,{...s,isDisabled:S,onTruncatedChange:c,onHoverChange:i,ref:l,children:t})})}));re.displayName="AdaptiveText";var mt=({fit:t,item:e,deleteElement:o,loadingLabel:s})=>{let{formatMessage:l}=b$2(),{isLoading:n,imgProps:i}=a$e({src:e.data?.src,alt:e.data?.alt||""});return jsxs("div",{className:e$1,children:[n?jsx(a$f,{"aria-label":s??l(H.loading)}):jsx("div",{role:"img",className:d({isLoading:n}),"aria-label":i.alt||"",style:{backgroundImage:`url(${i.src})`,backgroundSize:t}}),o]})},Fe=({item:t,options:{isFocusVisible:e,isSelected:o,isFocused:s,isDisabled:l,isPressed:n},fit:i="contain",onDelete:r,className:c,imageClassName:I,imageLabelClassName:S,imageDimensions:A,style:_,layoutTransition:L=true,deleteLabel:U,loadingLabel:z,renderImage:F=(w,{deleteElement:G})=>jsx(mt,{item:w,deleteElement:G,fit:i,loadingLabel:z})})=>{let{formatMessage:w}=b$2(),G=r?jsx("div",{className:a$b,children:jsx(a$c,{"aria-label":U??w(H.delete),size:"xs",icon:XIcon,onPress:()=>{r(t.id);},UNSAFE_isVisuallyInteractiveOnly:true})}):null,v=E([t])[0],k=useCallback(C=>{let f={},m=typeof C=="function"?C(v,{isSelected:o}):C;return m&&(f.width=typeof m.width=="string"?T[m.width]:m.width,f.aspectRatio="height"in m?`${f.width} / ${m.height}`:m?.aspectRatio?.toString()),f},[v,o]),x=useMemo(()=>({isFocusVisible:e,isSelected:o,isFocused:s,isDisabled:l,isPressed:n}),[e,o,s,l,n]),O=!useReducedMotion()&&(typeof L=="boolean"?L:true),b=typeof L=="object"?L:void 0,$=k(A),W=O?motion.div:"div";return jsxs(W,{...O?{layout:"position",initial:false,transition:b}:{},className:a$2(c$2,a$7(c,v,x)),style:b$5(_,v,x),children:[jsx(a$d,{display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center",flexGrow:0,children:jsx("div",{className:a$2(g({isFocusVisible:e,isSelected:o,isLoading:true}),a$7(I,v,x)),style:$,"data-image-key":t.id,children:F(t,{deleteElement:G??void 0,onDelete:r})})}),jsx(re,{className:a$2(h({isFocusVisible:e,isSelected:o}),S),style:{maxWidth:$.width},isOpen:e,children:t.label})]})};function ft(t,e){return t==="all"?true:"has"in t&&typeof t.has=="function"?t.has(e):[...t].includes(e)}var Xe=J.forwardRef(({className:t$1,style:e$1,fit:o="cover",onReorder:s,"data-block-id":l,"data-block-class":n,onDelete:i$1,imageWidth:r=T.sm,aspectRatio:c=3/4,items:I,defaultItems:S=[],onKeyDown:A,imageContainerClassName:_,imageClassName:L,labelClassName:U,onListChange:z,renderImage:F,layoutTransition:w,imageDimensions:G,imageContainerStyle:v,deleteConfirmationTitle:k="Are you sure you want to delete this item?",deleteLabel:x,cancelLabel:ae,loadingLabel:O,...b},$)=>{let{isVirtualized:W}=useContext(p),C=a$5($),[f$1,m]=useState([]),{formatMessage:ne}=b$2();useEffect(()=>{(c||r)&&console.warn("ImageGallery: aspectRatio and imageWidth are deprecated. Use imageDimensions instead.");},[r,c]);let Q=J.useMemo(()=>G??{width:r,aspectRatio:c},[G,r,c]),[P,je]=a$6(b.selectedKeys,b.defaultSelectedKeys??[],b.onSelectionChange),qe=J.useMemo(()=>I?V(I):void 0,[I]),Je=J.useMemo(()=>V(S),[]),[u,B]=a$6(qe,Je,z?a=>{z?.(E(a));}:void 0),Qe=useCallback(a=>{let p=a.target.key,d=a.keys;if(a.target.dropPosition==="before"){let g=Re(u,p,d);B(g);}else if(a.target.dropPosition==="after"){let g=Ee(u,p,d);B(g);}s?.(a);},[u,s,B]),{dragAndDropHooks:Ye}=Me({onReorder:Qe,isDisabled:!s,renderDragPreview:a=>jsx(i,{items:a,containerClassName:".BaselineUI-ImageGallery",previewClassName:g(),itemDataAttribute:"data-image-key",showCount:true,renderFallback:p=>{let d=He(p);if(!d)return null;let g=q(u,p.key),N=g?E([g])[0]:void 0;return jsx("img",{...d,style:_e({fit:o,imageDimensions:Q,item:N,isSelected:ft(P,p.key)})})}}),getItems:a=>[...a].map(p=>Ke(u,p)),renderDropIndicator(a){return jsx(t,{target:a,className:a$2(b$4({isVirtualized:!!W}),"BaselineUI-DropIndicator")})}}),Ze=useCallback(()=>{i$1&&f$1.length&&(B(u.filter(a=>!f$1.includes(a.id))),i$1(f$1),m([]));},[f$1,u,i$1,B]),Ve=useCallback((a,p)=>{let d={id:a.id,label:a.label,src:a.data?.src,alt:a.data?.alt};return jsx(Fe,{item:a,options:p,fit:o,onDelete:i$1?g=>{m([g]);}:void 0,renderImage:F,className:a$7(_,d,p),imageClassName:L,imageLabelClassName:U,imageDimensions:Q,style:v,layoutTransition:w,deleteLabel:x,loadingLabel:O},a.id)},[o,i$1,F,_,L,U,Q,v,w,x,O]);return useEffect(()=>{let a=C.current;if(!a)return;let p=d=>{if(A?.(d),d.key==="Backspace"||d.key==="Delete"){if(!i$1)return;if(P==="all"){let et=new Set(b.disabledKeys);m(u.map(Y=>Y.id).filter(Y=>!et.has(Y)));return}let g=[...P];if(g.length){m(g);return}let N=d.target.closest("[data-key]");if(!N||!a.contains(N))return;m([N.dataset.key]);}};return a.addEventListener("keydown",p),()=>{a.removeEventListener("keydown",p);}},[C,i$1,A,P,u,b.disabledKeys]),jsxs(Fragment,{children:[jsx(q$1,{...b,ref:C,style:e$1,className:a$2(f,"BaselineUI-ImageGallery",t$1),"data-block-id":l,"data-block-class":n,selectedKeys:P,items:u,dragAndDropHooks:Ye,layout:"grid",orientation:"vertical",renderOption:Ve,onSelectionChange:je,optionClassName:s&&!W?sprinkles({marginLeft:"sm"}):void 0}),jsx(b$3,{isOpen:!![...f$1].length,onOpenChange:a=>{a||m([]);},children:jsx(e,{isDismissable:true,children:jsx(a$8,{showCloseButton:false,title:typeof k=="function"?k(P==="all"?"all":new Set(P)):k,primaryActionLabel:x??ne(H.delete),cancelLabel:ae??ne(H.cancel),onCancel:()=>{m([]);},onPrimaryAction:Ze,autoFocusButton:"cancel"})})})]})});Xe.displayName="ImageGallery";var H=c$1({delete:{id:"bui.imageGallery.delete",defaultMessage:"Delete"},cancel:{id:"bui.imageGallery.cancel",defaultMessage:"Cancel"},loading:{id:"bui.imageGallery.loading",defaultMessage:"Loading"}});export{Xe 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,b as b$1}from'./chunk-GQIS4QBN.mjs';import {b,j,h}from'./chunk-SD43KVTU.mjs';import {useRef,useEffect}from'react';/**
|
|
2
|
+
* Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
|
|
5
|
+
* AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT.
|
|
6
|
+
* UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES.
|
|
7
|
+
* This notice may not be removed from this file.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
var C=16,g=50,O=30;function _({ref:s,isDisabled:f}){let S=useRef(null),w=useRef({isScrollableX:true,isScrollableY:true}),u=useRef({x:0,y:0}),o=useRef(void 0),R=useRef(0);useEffect(()=>{if(f||!s.current)return;let e=s.current,m=b(e),d=a(e)?e:b$1(e),v=m.getComputedStyle(d);S.current=d,w.current={isScrollableX:/(auto|scroll)/.test(v.overflowX),isScrollableY:/(auto|scroll)/.test(v.overflowY)};},[f,s]),useEffect(()=>{if(f||!s.current||!S.current)return;let e=S.current,m=()=>{if(!e)return;let{isScrollableX:t,isScrollableY:r}=w.current,{x:n,y:a}=u.current;t&&n!==0&&(e.scrollLeft+=n),r&&a!==0&&(e.scrollTop+=a),o.current=requestAnimationFrame(m);},d=(t,r)=>t<g?-O*(1-t/g):t>r-g?O*(1-(r-t)/g):0,v=(t,r,n,a)=>{let E=performance.now();if(E-R.current<C)return;let b=d(t,n),p=d(r,a);(b!==u.current.x||p!==u.current.y)&&(u.current={x:b,y:p},R.current=E,(b!==0||p!==0)&&!o.current&&(o.current=requestAnimationFrame(m)));},y=t=>{if(t.preventDefault(),!e)return;let r=t,n=e.getBoundingClientRect(),a=r.clientX-n.left,E=r.clientY-n.top;v(a,E,n.width,n.height);},c=new Set,l=()=>{c.clear(),u.current={x:0,y:0},o.current&&(cancelAnimationFrame(o.current),o.current=void 0);},h$1=t=>{let r=j(t);r&&c.add(r);},x=t=>{let r=j(t);r&&c.delete(r);for(let n of c)h(e,n)||c.delete(n);c.size===0&&l();};return e.addEventListener("dragenter",h$1),e.addEventListener("dragover",y),e.addEventListener("dragleave",x),e.addEventListener("dragend",l),e.addEventListener("drop",l),()=>{e.removeEventListener("dragenter",h$1),e.removeEventListener("dragover",y),e.removeEventListener("dragleave",x),e.removeEventListener("dragend",l),e.removeEventListener("drop",l),l();}},[f,s]);}export{_ as a};
|