@apple-pie/slice 0.1.59 → 0.2.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/README.md +17 -1
- package/dist/cjs/chunks/ActionButton-DhHiZwXV.js +200 -0
- package/dist/cjs/chunks/Attachment-DhyXAQUf.js +351 -0
- package/dist/cjs/chunks/AudioBubble-DS5Oea-b.js +46 -0
- package/dist/cjs/chunks/AudioLevel-uQJ-v5Qz.js +54 -0
- package/dist/cjs/chunks/Avatar-a2GHmu1o.js +125 -0
- package/dist/cjs/chunks/AvatarGroup-CWpoauJP.js +70 -0
- package/dist/cjs/chunks/Badge-DtVP2qH0.js +26 -0
- package/dist/cjs/chunks/Button-Cr5SlNim.js +293 -0
- package/dist/cjs/chunks/ButtonBar-DDupZZ_u.js +96 -0
- package/dist/cjs/chunks/Camera-bjjzmzar.js +560 -0
- package/dist/cjs/chunks/CheckBox-DBaKpMhg.js +66 -0
- package/dist/cjs/chunks/Chip-DsZHDLKG.js +203 -0
- package/dist/cjs/chunks/ContentEditable-BaxU62Mg.js +144 -0
- package/dist/cjs/chunks/DialogBox-C-ZvHDH6.js +204 -0
- package/dist/cjs/chunks/Dot-0Dv8WX0n.js +92 -0
- package/dist/cjs/chunks/DrggablePanel-zi27w3wY.js +251 -0
- package/dist/cjs/chunks/DropDown-BcTjhAtE.js +269 -0
- package/dist/cjs/chunks/ErrorSummary-DDz7nQWX.js +166 -0
- package/dist/cjs/chunks/{FileIcon-63XvrV1q.js → FileIcon-BM8n3o-c.js} +68 -40
- package/dist/cjs/chunks/FileList-T2_mhI_t.js +204 -0
- package/dist/cjs/chunks/FlexBox-DTCyWJeT.js +278 -0
- package/dist/cjs/chunks/FlexDiv-5YN9Hgxy.js +7 -0
- package/dist/cjs/chunks/Icon-COY7IZkK.js +7821 -0
- package/dist/cjs/chunks/IconButton-KJr15EW6.js +10 -0
- package/dist/cjs/chunks/{IndexedDB-ClIpb2ob.js → IndexedDB-DwKh2Gfp.js} +1 -1
- package/dist/cjs/chunks/ModalController-D0S9VnNH.js +143 -0
- package/dist/cjs/chunks/ModalHostContext-DLgUa9Vl.js +5 -0
- package/dist/cjs/chunks/Overlay-CVZLmK8H.js +77 -0
- package/dist/cjs/chunks/Pager-QEUi0r59.js +146 -0
- package/dist/cjs/chunks/PopMenu-DkxhTcwD.js +423 -0
- package/dist/cjs/chunks/PopMenuController-CmS28S4h.js +32 -0
- package/dist/cjs/chunks/ProgressIndicator-Ddj5dfEA.js +237 -0
- package/dist/cjs/chunks/PromptInput-DtepCo-l.js +248 -0
- package/dist/cjs/chunks/RadioButton-B2HGjkQk.js +101 -0
- package/dist/cjs/chunks/RadioButtonList-Oc7oMivb.js +88 -0
- package/dist/cjs/chunks/Slider-Y7zMFKiM.js +170 -0
- package/dist/cjs/chunks/Spacer-CM7sstpQ.js +22 -0
- package/dist/cjs/chunks/Switch-CWJh4Pi4.js +70 -0
- package/dist/cjs/chunks/Tab-DFvjUNPs.js +96 -0
- package/dist/cjs/chunks/TabBar-lB0aqabp.js +186 -0
- package/dist/cjs/chunks/TextArea-UudvZQ9R.js +189 -0
- package/dist/cjs/chunks/TextField-QzgdqFys.js +312 -0
- package/dist/cjs/chunks/Tip-BxS2Wzz3.js +115 -0
- package/dist/cjs/chunks/ToggleButton-De8_kkMd.js +53 -0
- package/dist/cjs/chunks/UploadArea-BtqwFTDl.js +223 -0
- package/dist/cjs/chunks/Video-C1GATYS9.js +396 -0
- package/dist/cjs/chunks/VideoController-CnYz7Sdt.js +169 -0
- package/dist/cjs/chunks/{WSConnection-CDWOkk8n.js → WSConnection-DZKTeDtZ.js} +1 -1
- package/dist/cjs/chunks/{WebRTCConnection-b8jZNRYr.js → WebRTCConnection-DIUG7Gx3.js} +1 -1
- package/dist/cjs/chunks/_types-3m6769Z0.js +910 -0
- package/dist/cjs/chunks/_types-C_Jf14DZ.js +273 -0
- package/dist/cjs/chunks/audioVisualizer-Bak7PWOv.js +71 -0
- package/dist/cjs/chunks/breakpoints-BDw1OJh9.js +18 -0
- package/dist/cjs/chunks/{browserChannelsStore-PGtTaJyY.js → browserChannelsStore-DHE7Vr4_.js} +4 -2
- package/dist/cjs/chunks/colors-hDzzq_Dk.js +62 -0
- package/dist/cjs/chunks/files-RYD9L_pI.js +25 -0
- package/dist/cjs/chunks/getVideoControls-LxSY7z8h.js +19 -0
- package/dist/cjs/chunks/getWaterTransition-s_55VKK2.js +11 -0
- package/dist/cjs/chunks/{localDBStore-BRd0iQuq.js → localDBStore-CTWlm2t-.js} +6 -2
- package/dist/cjs/chunks/{microphoneStore-DljI0Zpj.js → microphoneStore-D7DuvQeX.js} +1 -1
- package/dist/cjs/chunks/{misc-BallZ366.js → misc-PmT7cZzC.js} +29 -38
- package/dist/cjs/chunks/{modalStore-BexwvT-T.js → modalStore-BCn998Jz.js} +20 -17
- package/dist/cjs/chunks/popMenuStore-DqyTqDrl.js +20 -0
- package/dist/cjs/chunks/resolveColor-DkYThq2J.js +9 -0
- package/dist/cjs/chunks/resolveColorProps-DE1k1P-Z.js +17 -0
- package/dist/cjs/chunks/resolveShortcut-DiQdb8VR.js +38 -0
- package/dist/cjs/chunks/sharedTypes-BDMIewR9.js +22 -0
- package/dist/cjs/chunks/{sseStore-cSWpKohM.js → sseStore-DfS7e3vY.js} +3 -3
- package/dist/cjs/chunks/themes-bwU5x3_5.js +34 -0
- package/dist/cjs/chunks/toastStore-BxX1AtE7.js +33 -0
- package/dist/cjs/chunks/type.module-Dk5b_rHG.js +28 -0
- package/dist/cjs/chunks/{uploads-worker-DzrC-YiR.js → uploads-worker-stCHn8-D.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-BajO-auR.js → uploadsStore-Ck3gzZuD.js} +2 -2
- package/dist/cjs/chunks/useAudioVisualizer-D7bStvIe.js +42 -0
- package/dist/cjs/chunks/useModalHost-B8oi4tfb.js +52 -0
- package/dist/cjs/chunks/usePrefersReducedMotion-GpD17CAE.js +16 -0
- package/dist/cjs/chunks/viewState-CMugA-g4.js +627 -0
- package/dist/cjs/chunks/{volumeStore-DzgmrI6q.js → volumeStore-BoEoo9wA.js} +1 -1
- package/dist/cjs/chunks/{webRTCStore-BXHg9abP.js → webRTCStore-OGkXAovD.js} +6 -2
- package/dist/cjs/chunks/{windowStore-DpNMptuw.js → windowStore-HYnXbosz.js} +1 -1
- package/dist/cjs/components/Attachment/index.js +26 -0
- package/dist/cjs/components/AudioBubble/index.js +11 -8
- package/dist/cjs/components/AudioLevel/index.js +9 -0
- package/dist/cjs/components/Avatar/index.js +5 -3
- package/dist/cjs/components/AvatarGroup/index.js +4 -3
- package/dist/cjs/components/Badge/index.js +4 -3
- package/dist/cjs/components/Button/index.js +14 -11
- package/dist/cjs/components/ButtonBar/index.js +11 -9
- package/dist/cjs/components/Camera/index.js +15 -9
- package/dist/cjs/components/CheckBox/index.js +11 -10
- package/dist/cjs/components/Chip/index.js +13 -10
- package/dist/cjs/components/ContentEditable/index.js +8 -0
- package/dist/cjs/components/DataTable/index.js +12 -10
- package/dist/cjs/components/DialogBox/index.js +21 -0
- package/dist/cjs/components/Dot/index.js +8 -3
- package/dist/cjs/components/DraggablePanel/index.js +10 -10
- package/dist/cjs/components/DropDown/index.js +12 -10
- package/dist/cjs/components/ErrorSummary/index.js +10 -7
- package/dist/cjs/components/FileIcon/index.js +8 -9
- package/dist/cjs/components/FileList/index.js +16 -10
- package/dist/cjs/components/FlexBox/index.js +23 -0
- package/dist/cjs/components/FlexDiv/index.js +11 -5
- package/dist/cjs/components/Icon/index.js +8 -7
- package/dist/cjs/components/IconButton/index.js +15 -21
- package/dist/cjs/components/ModalController/index.js +11 -6
- package/dist/cjs/components/Overlay/index.js +9 -3
- package/dist/cjs/components/Pager/index.js +9 -3
- package/dist/cjs/components/PopMenu/index.js +17 -0
- package/dist/cjs/components/PopMenuController/index.js +18 -0
- package/dist/cjs/components/Progress/index.js +13 -10
- package/dist/cjs/components/PromptInput/index.js +19 -13
- package/dist/cjs/components/RadioButton/index.js +11 -10
- package/dist/cjs/components/RadioButtonList/index.js +12 -10
- package/dist/cjs/components/Slider/index.js +4 -8
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +9 -3
- package/dist/cjs/components/Tab/index.js +15 -0
- package/dist/cjs/components/TabBar/index.js +15 -11
- package/dist/cjs/components/TextArea/index.js +11 -12
- package/dist/cjs/components/Textfield/index.js +15 -11
- package/dist/cjs/components/Tip/index.js +9 -4
- package/dist/cjs/components/Toast/index.js +13 -10
- package/dist/cjs/components/ToggleButton/index.js +14 -11
- package/dist/cjs/components/UploadArea/index.js +18 -12
- package/dist/cjs/components/Video/index.js +18 -14
- package/dist/cjs/components/VideoController/index.js +17 -13
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +4 -3
- package/dist/cjs/hooks/useClipboard.js +3 -2
- package/dist/cjs/hooks/useDoubleClick.js +6 -4
- package/dist/cjs/hooks/useInfiniteScroll.js +1 -1
- package/dist/cjs/hooks/useMdStreamBuffer.js +7 -2
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useObserveTheme.js +4 -4
- package/dist/cjs/hooks/useTheme.js +9 -1
- package/dist/cjs/hooks/useToolTip.js +27 -32
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks/useWindow.js +13 -23
- package/dist/cjs/hooks.js +13 -12
- package/dist/cjs/index.js +55 -47
- package/dist/cjs/providers/ThemeProvider.js +4 -3
- package/dist/cjs/providers/themeServer.test.js +398 -403
- package/dist/cjs/providers.js +4 -3
- package/dist/cjs/stores/LocalDB.js +8 -6
- package/dist/cjs/stores/SSE.js +4 -3
- package/dist/cjs/stores/WS.js +4 -3
- package/dist/cjs/stores/WebRTC.js +8 -6
- package/dist/cjs/stores/activeTab.js +1 -1
- package/dist/cjs/stores/browserChannel.js +5 -4
- package/dist/cjs/stores/microphone.js +2 -2
- package/dist/cjs/stores/modal.js +1 -1
- package/dist/cjs/stores/popMenu.js +7 -0
- package/dist/cjs/stores/tip.js +1 -1
- package/dist/cjs/stores/toast.js +1 -1
- package/dist/cjs/stores/uploads.js +2 -2
- package/dist/cjs/stores/video.js +1 -1
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +38 -34
- package/dist/cjs/theme/colors.js +479 -231
- package/dist/cjs/theme/themes.js +3 -30
- package/dist/cjs/theme/type.js +31 -0
- package/dist/cjs/theme.js +10 -3
- package/dist/cjs/utils/index.js +24 -5
- package/dist/cjs/utils/objects/index.js +2 -2
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/css/type.module.css +27 -0
- package/dist/esm/chunks/ActionButton-guWI4qko.mjs +235 -0
- package/dist/esm/chunks/Attachment-BTSb0hKX.mjs +370 -0
- package/dist/esm/chunks/AudioBubble-D15lr4H6.mjs +68 -0
- package/dist/esm/chunks/AudioLevel-BcNrcGlh.mjs +63 -0
- package/dist/esm/chunks/Avatar-C4JzdLTW.mjs +132 -0
- package/dist/esm/chunks/AvatarGroup-Cn33-JkE.mjs +78 -0
- package/dist/esm/chunks/Badge-DpnuS-Ey.mjs +32 -0
- package/dist/esm/chunks/Button-BwTo8mSI.mjs +315 -0
- package/dist/esm/chunks/ButtonBar-BwHxexlC.mjs +111 -0
- package/dist/esm/chunks/Camera-DWmX5FZ-.mjs +585 -0
- package/dist/esm/chunks/CheckBox-CjmPDfLi.mjs +76 -0
- package/dist/esm/chunks/Chip-BfyUpZbH.mjs +223 -0
- package/dist/esm/chunks/ContentEditable-BvlyAJve.mjs +154 -0
- package/dist/esm/chunks/DialogBox-W9i6k5mv.mjs +224 -0
- package/dist/esm/chunks/Dot-CG395pS6.mjs +104 -0
- package/dist/esm/chunks/DrggablePanel-0Ef6TYrd.mjs +270 -0
- package/dist/esm/chunks/DropDown-CiB0Rp_P.mjs +286 -0
- package/dist/esm/chunks/ErrorSummary-3XoZyvmX.mjs +192 -0
- package/dist/esm/chunks/{FileIcon-B7_cbtHF.mjs → FileIcon-hKJZoGIx.mjs} +73 -53
- package/dist/esm/chunks/FileList-DxB0ZORo.mjs +220 -0
- package/dist/esm/chunks/FlexBox-VfQehVtm.mjs +296 -0
- package/dist/esm/chunks/FlexDiv-BZ5PBnE3.mjs +6 -0
- package/dist/esm/chunks/Icon-43T0fkr6.mjs +7841 -0
- package/dist/esm/chunks/IconButton-oqYTUJit.mjs +12 -0
- package/dist/esm/chunks/{IndexedDB-CB92RX6-.mjs → IndexedDB-DjCLZUf0.mjs} +1 -1
- package/dist/esm/chunks/ModalController-fvF-RWS8.mjs +169 -0
- package/dist/esm/chunks/ModalHostContext-BrT_g7sc.mjs +5 -0
- package/dist/esm/chunks/Overlay-C_FMcUyg.mjs +93 -0
- package/dist/esm/chunks/Pager-LqYNCZ8I.mjs +158 -0
- package/dist/esm/chunks/PopMenu-BkXfm6Sz.mjs +455 -0
- package/dist/esm/chunks/PopMenuController-Dj3uvc8F.mjs +44 -0
- package/dist/esm/chunks/ProgressIndicator-CR3pA1Me.mjs +266 -0
- package/dist/esm/chunks/PromptInput-Bq18i1Ac.mjs +266 -0
- package/dist/esm/chunks/RadioButton-DTUKMjvM.mjs +109 -0
- package/dist/esm/chunks/RadioButtonList-DsOgpe0m.mjs +99 -0
- package/dist/esm/chunks/Slider-DaZTE-eD.mjs +176 -0
- package/dist/esm/chunks/Spacer-CsJxUJ7E.mjs +24 -0
- package/dist/esm/chunks/Switch-BDFgMC0b.mjs +84 -0
- package/dist/esm/chunks/Tab-B8yJ9Qy4.mjs +105 -0
- package/dist/esm/chunks/TabBar-2kQmtcwW.mjs +214 -0
- package/dist/esm/chunks/TextArea-C32MToPG.mjs +201 -0
- package/dist/esm/chunks/TextField-BXrN1QkD.mjs +344 -0
- package/dist/esm/chunks/Tip-4R9wW1mE.mjs +133 -0
- package/dist/esm/chunks/ToggleButton-CGHa458C.mjs +61 -0
- package/dist/esm/chunks/UploadArea-Dq7ST-RG.mjs +237 -0
- package/dist/esm/chunks/Video-KuG0k3ly.mjs +418 -0
- package/dist/esm/chunks/VideoController-DQoDDY1a.mjs +201 -0
- package/dist/esm/chunks/{WSConnection-BENe51Ue.mjs → WSConnection-ByCYrNOq.mjs} +1 -1
- package/dist/esm/chunks/{WebRTCConnection-Cwx1C6Ta.mjs → WebRTCConnection-DTjS3UUU.mjs} +1 -1
- package/dist/esm/chunks/_types-B6NStINb.mjs +296 -0
- package/dist/esm/chunks/_types-ntN11tyz.mjs +910 -0
- package/dist/esm/chunks/audioVisualizer-BMSpJwTS.mjs +71 -0
- package/dist/esm/chunks/breakpoints-Dn9DgpJe.mjs +18 -0
- package/dist/esm/chunks/{browserChannelsStore-oGeBSxAT.mjs → browserChannelsStore-s7VUhLS9.mjs} +6 -2
- package/dist/esm/chunks/colors-DZ9xpMoE.mjs +63 -0
- package/dist/esm/chunks/files-6nwSZlJK.mjs +26 -0
- package/dist/esm/chunks/getVideoControls-aoqr4T3P.mjs +20 -0
- package/dist/esm/chunks/getWaterTransition-CrDSFJdk.mjs +12 -0
- package/dist/esm/chunks/{localDBStore-ZwQD3ino.mjs → localDBStore-DYhPmkHz.mjs} +7 -3
- package/dist/esm/chunks/{microphoneStore-D8VxjdFZ.mjs → microphoneStore-BzSEbtfK.mjs} +1 -1
- package/dist/esm/chunks/{misc-DBIXjc2Q.mjs → misc-DI5GSqkt.mjs} +24 -34
- package/dist/esm/chunks/{modalStore-GWNWh1tE.mjs → modalStore-BgYt3q8T.mjs} +20 -17
- package/dist/esm/chunks/popMenuStore-DtApFGaq.mjs +18 -0
- package/dist/esm/chunks/resolveColor-Kvs7kDyy.mjs +9 -0
- package/dist/esm/chunks/resolveColorProps-CwAU25V-.mjs +17 -0
- package/dist/esm/chunks/resolveShortcut-C43ivgMc.mjs +37 -0
- package/dist/esm/chunks/sharedTypes-DYXO7VNa.mjs +25 -0
- package/dist/esm/chunks/{sseStore-CZqJmpUR.mjs → sseStore-Duybemwt.mjs} +7 -3
- package/dist/esm/chunks/themes-DCtDY7XT.mjs +40 -0
- package/dist/esm/chunks/toastStore-Ds1Kx4-O.mjs +29 -0
- package/dist/esm/chunks/type.module--fVZ2ic7.mjs +28 -0
- package/dist/esm/chunks/{uploads-worker-DuyqBeHz.mjs → uploads-worker-CpJtBCvY.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-D9Ftk4Ke.mjs → uploadsStore-B_7wyr8k.mjs} +1 -1
- package/dist/esm/chunks/useAudioVisualizer-Dw8XLBmS.mjs +42 -0
- package/dist/esm/chunks/useModalHost-DiYFB7Mq.mjs +51 -0
- package/dist/esm/chunks/usePrefersReducedMotion-BWAwMMLE.mjs +15 -0
- package/dist/esm/chunks/viewState-D7e7CrHf.mjs +659 -0
- package/dist/esm/chunks/{volumeStore-hrteUkB-.mjs → volumeStore-mqWIRL0J.mjs} +1 -1
- package/dist/esm/chunks/{webRTCStore-B2ri-_li.mjs → webRTCStore-BepH2O9l.mjs} +7 -3
- package/dist/esm/chunks/{windowStore-DIdy_IoC.mjs → windowStore-C8rGk_0b.mjs} +1 -1
- package/dist/esm/components/Attachment/index.mjs +71 -0
- package/dist/esm/components/AudioBubble/index.mjs +21 -11
- package/dist/esm/components/AudioLevel/index.mjs +21 -0
- package/dist/esm/components/Avatar/index.mjs +9 -3
- package/dist/esm/components/AvatarGroup/index.mjs +10 -4
- package/dist/esm/components/Badge/index.mjs +8 -2
- package/dist/esm/components/Button/index.mjs +27 -17
- package/dist/esm/components/ButtonBar/index.mjs +22 -14
- package/dist/esm/components/Camera/index.mjs +37 -13
- package/dist/esm/components/CheckBox/index.mjs +20 -16
- package/dist/esm/components/Chip/index.mjs +27 -17
- package/dist/esm/components/ContentEditable/index.mjs +17 -0
- package/dist/esm/components/DataTable/index.mjs +27 -21
- package/dist/esm/components/DialogBox/index.mjs +75 -0
- package/dist/esm/components/Dot/index.mjs +28 -2
- package/dist/esm/components/DraggablePanel/index.mjs +16 -20
- package/dist/esm/components/DropDown/index.mjs +25 -15
- package/dist/esm/components/ErrorSummary/index.mjs +22 -10
- package/dist/esm/components/FileIcon/index.mjs +8 -16
- package/dist/esm/components/FileList/index.mjs +40 -16
- package/dist/esm/components/FlexBox/index.mjs +39 -0
- package/dist/esm/components/FlexDiv/index.mjs +33 -3
- package/dist/esm/components/Icon/index.mjs +15 -11
- package/dist/esm/components/IconButton/index.mjs +31 -19
- package/dist/esm/components/ModalController/index.mjs +33 -9
- package/dist/esm/components/Overlay/index.mjs +30 -2
- package/dist/esm/components/Pager/index.mjs +31 -3
- package/dist/esm/components/PopMenu/index.mjs +59 -0
- package/dist/esm/components/PopMenuController/index.mjs +63 -0
- package/dist/esm/components/Progress/index.mjs +21 -11
- package/dist/esm/components/PromptInput/index.mjs +43 -21
- package/dist/esm/components/RadioButton/index.mjs +18 -14
- package/dist/esm/components/RadioButtonList/index.mjs +23 -17
- package/dist/esm/components/Slider/index.mjs +5 -23
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +30 -2
- package/dist/esm/components/Tab/index.mjs +51 -0
- package/dist/esm/components/TabBar/index.mjs +32 -16
- package/dist/esm/components/TextArea/index.mjs +17 -23
- package/dist/esm/components/Textfield/index.mjs +33 -17
- package/dist/esm/components/Tip/index.mjs +29 -3
- package/dist/esm/components/Toast/index.mjs +23 -13
- package/dist/esm/components/ToggleButton/index.mjs +30 -22
- package/dist/esm/components/UploadArea/index.mjs +41 -17
- package/dist/esm/components/Video/index.mjs +34 -24
- package/dist/esm/components/VideoController/index.mjs +44 -26
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +12 -6
- package/dist/esm/hooks/useClipboard.mjs +9 -3
- package/dist/esm/hooks/useDoubleClick.mjs +8 -5
- package/dist/esm/hooks/useInfiniteScroll.mjs +1 -1
- package/dist/esm/hooks/useMdStreamBuffer.mjs +9 -3
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useObserveTheme.mjs +5 -1
- package/dist/esm/hooks/useTheme.mjs +5 -1
- package/dist/esm/hooks/useToolTip.mjs +28 -33
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks/useWindow.mjs +6 -22
- package/dist/esm/hooks.mjs +16 -10
- package/dist/esm/index.mjs +96 -60
- package/dist/esm/providers/ThemeProvider.mjs +5 -1
- package/dist/esm/providers/themeServer.test.mjs +398 -403
- package/dist/esm/providers.mjs +5 -1
- package/dist/esm/stores/LocalDB.mjs +10 -4
- package/dist/esm/stores/SSE.mjs +10 -4
- package/dist/esm/stores/WS.mjs +9 -3
- package/dist/esm/stores/WebRTC.mjs +10 -4
- package/dist/esm/stores/activeTab.mjs +1 -1
- package/dist/esm/stores/browserChannel.mjs +9 -3
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- package/dist/esm/stores/popMenu.mjs +3 -0
- package/dist/esm/stores/tip.mjs +1 -1
- package/dist/esm/stores/toast.mjs +1 -1
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/video.mjs +1 -1
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +28 -20
- package/dist/esm/theme/colors.mjs +479 -231
- package/dist/esm/theme/themes.mjs +6 -35
- package/dist/esm/theme/type.mjs +31 -0
- package/dist/esm/theme.mjs +5 -1
- package/dist/esm/utils/index.mjs +37 -12
- package/dist/esm/utils/objects/index.mjs +8 -8
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +5106 -3872
- package/dist/types/components/Attachment/Attachment.d.ts +2 -0
- package/dist/types/components/Attachment/AttachmentImagePreview.d.ts +6 -0
- package/dist/types/components/Attachment/_types.d.ts +47 -0
- package/dist/types/components/Attachment/index.d.ts +3 -0
- package/dist/types/components/Attachment/useContentThumbnail.d.ts +19 -0
- package/dist/types/components/AudioBubble/AudioBubble.d.ts +1 -1
- package/dist/types/components/AudioBubble/_types.d.ts +4 -3
- package/dist/types/components/AudioLevel/AudioLevel.d.ts +5 -0
- package/dist/types/components/AudioLevel/_types.d.ts +22 -0
- package/dist/types/components/AudioLevel/index.d.ts +2 -0
- package/dist/types/components/Avatar/Avatar.d.ts +6 -1
- package/dist/types/components/Avatar/_types.d.ts +28 -15
- package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/types/components/AvatarGroup/AvatarGroupContext.d.ts +7 -0
- package/dist/types/components/AvatarGroup/_types.d.ts +26 -15
- package/dist/types/components/AvatarGroup/index.d.ts +1 -1
- package/dist/types/components/Badge/Badge.d.ts +1 -1
- package/dist/types/components/Badge/_types.d.ts +11 -3
- package/dist/types/components/Button/Button.d.ts +19 -52
- package/dist/types/components/Button/_types.d.ts +18 -14
- package/dist/types/components/ButtonBar/ButtonBar.d.ts +0 -14
- package/dist/types/components/ButtonBar/_types.d.ts +16 -13
- package/dist/types/components/Camera/Camera.d.ts +2 -4
- package/dist/types/components/Camera/_types.d.ts +25 -29
- package/dist/types/components/Camera/cameraSession.d.ts +59 -0
- package/dist/types/components/Camera/index.d.ts +1 -1
- package/dist/types/components/CheckBox/CheckBox.d.ts +1 -1
- package/dist/types/components/CheckBox/_types.d.ts +16 -4
- package/dist/types/components/Chip/Chip.d.ts +1 -1
- package/dist/types/components/Chip/_types.d.ts +35 -19
- package/dist/types/components/ContentEditable/ContentEditable.d.ts +3 -0
- package/dist/types/components/ContentEditable/_types.d.ts +26 -0
- package/dist/types/components/ContentEditable/index.d.ts +2 -0
- package/dist/types/components/DataTable/DataTable.d.ts +1 -1
- package/dist/types/components/DataTable/_types.d.ts +21 -11
- package/dist/types/components/DataTable/_useResizeColumn.d.ts +1 -1
- package/dist/types/components/DataTable/_useRowWindow.d.ts +1 -0
- package/dist/types/components/DataTable/compareValues.d.ts +2 -0
- package/dist/types/components/DialogBox/DialogBox.d.ts +6 -0
- package/dist/types/components/DialogBox/_types.d.ts +68 -0
- package/dist/types/components/DialogBox/index.d.ts +3 -0
- package/dist/types/components/DialogBox/parseSections.d.ts +7 -0
- package/dist/types/components/DialogBox/sections.d.ts +20 -0
- package/dist/types/components/DialogBox/useDialogBox.d.ts +4 -0
- package/dist/types/components/Dot/Dot.d.ts +1 -1
- package/dist/types/components/Dot/_types.d.ts +8 -2
- package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +5 -55
- package/dist/types/components/DraggablePanel/_types.d.ts +46 -0
- package/dist/types/components/DraggablePanel/index.d.ts +1 -0
- package/dist/types/components/DraggablePanel/panelConstraints.d.ts +3 -0
- package/dist/types/components/DropDown/_types.d.ts +45 -16
- package/dist/types/components/DropDown/resolveOptions.d.ts +11 -0
- package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +30 -2
- package/dist/types/components/ErrorSummary/_types.d.ts +16 -4
- package/dist/types/components/FileIcon/FileIcon.d.ts +1 -2
- package/dist/types/components/FileIcon/_types.d.ts +11 -6
- package/dist/types/components/FileIcon/index.d.ts +2 -2
- package/dist/types/components/FileList/FileList.d.ts +2 -2
- package/dist/types/components/FileList/_types.d.ts +16 -6
- package/dist/types/components/FileList/fileListValues.d.ts +5 -0
- package/dist/types/components/FlexBox/FlexBox.d.ts +3 -0
- package/dist/types/components/FlexBox/_types.d.ts +62 -0
- package/dist/types/components/FlexBox/index.d.ts +2 -0
- package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -64
- package/dist/types/components/FlexDiv/_types.d.ts +4 -146
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Icon/_types.d.ts +910 -132
- package/dist/types/components/Icon/iconRegistry.d.ts +3 -2
- package/dist/types/components/Icon/index.d.ts +1 -0
- package/dist/types/components/IconButton/ActionButton.d.ts +19 -0
- package/dist/types/components/IconButton/IconButton.d.ts +1 -1
- package/dist/types/components/IconButton/_types.d.ts +24 -72
- package/dist/types/components/IconButton/index.d.ts +1 -2
- package/dist/types/components/ModalController/ModalController.d.ts +2 -2
- package/dist/types/components/ModalController/ModalHostContext.d.ts +1 -0
- package/dist/types/components/ModalController/_types.d.ts +3 -5
- package/dist/types/components/ModalController/useModalHost.d.ts +3 -0
- package/dist/types/components/Overlay/Overlay.d.ts +1 -1
- package/dist/types/components/Overlay/_types.d.ts +7 -8
- package/dist/types/components/Pager/Pager.d.ts +1 -1
- package/dist/types/components/Pager/_types.d.ts +21 -5
- package/dist/types/components/Pager/pagerLogic.d.ts +9 -0
- package/dist/types/components/PopMenu/PopMenu.d.ts +3 -0
- package/dist/types/components/PopMenu/PopMenuContext.d.ts +10 -0
- package/dist/types/components/PopMenu/PopMenuGroup.d.ts +2 -0
- package/dist/types/components/PopMenu/PopMenuItem.d.ts +3 -0
- package/dist/types/components/PopMenu/_types.d.ts +110 -0
- package/dist/types/components/PopMenu/index.d.ts +4 -0
- package/dist/types/components/PopMenu/usePopMenu.d.ts +17 -0
- package/dist/types/components/PopMenu/usePopMenuPortal.d.ts +3 -0
- package/dist/types/components/PopMenuController/PopMenuController.d.ts +2 -0
- package/dist/types/components/PopMenuController/index.d.ts +1 -0
- package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +1 -1
- package/dist/types/components/Progress/DoneCheck/_types.d.ts +5 -2
- package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +2 -4
- package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +19 -7
- package/dist/types/components/Progress/ProgressIndicator/useSpinnerPlayback.d.ts +3 -0
- package/dist/types/components/PromptInput/PromptInput.d.ts +50 -15
- package/dist/types/components/PromptInput/_types.d.ts +45 -8
- package/dist/types/components/PromptInput/index.d.ts +1 -1
- package/dist/types/components/PromptInput/promptText.d.ts +6 -0
- package/dist/types/components/RadioButton/RadioGroupContext.d.ts +11 -0
- package/dist/types/components/RadioButton/_types.d.ts +24 -13
- package/dist/types/components/RadioButtonList/_types.d.ts +17 -19
- package/dist/types/components/RadioButtonList/index.d.ts +1 -1
- package/dist/types/components/Slider/Slider.d.ts +1 -1
- package/dist/types/components/Slider/_types.d.ts +15 -9
- package/dist/types/components/Slider/sliderLogic.d.ts +6 -0
- package/dist/types/components/Spacer/index.d.ts +1 -1
- package/dist/types/components/Switch/_types.d.ts +18 -7
- package/dist/types/components/Tab/Tab.d.ts +3 -0
- package/dist/types/components/Tab/_types.d.ts +26 -0
- package/dist/types/components/Tab/index.d.ts +2 -0
- package/dist/types/components/TabBar/TabBar.d.ts +1 -1
- package/dist/types/components/TabBar/_types.d.ts +14 -37
- package/dist/types/components/TabBar/index.d.ts +1 -1
- package/dist/types/components/TabBar/shared.d.ts +22 -0
- package/dist/types/components/TextArea/TextArea.d.ts +1 -1
- package/dist/types/components/TextArea/_types.d.ts +32 -11
- package/dist/types/components/TextArea/index.d.ts +1 -1
- package/dist/types/components/Textfield/TextField.d.ts +2 -2
- package/dist/types/components/Textfield/_types.d.ts +41 -37
- package/dist/types/components/Tip/Tip.d.ts +1 -2
- package/dist/types/components/Tip/_types.d.ts +11 -18
- package/dist/types/components/Tip/useTipVisibility.d.ts +6 -0
- package/dist/types/components/Toast/Toast.d.ts +2 -2
- package/dist/types/components/Toast/_types.d.ts +25 -12
- package/dist/types/components/Toast/index.d.ts +1 -1
- package/dist/types/components/Toast/useToastLifecycle.d.ts +15 -0
- package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/types/components/ToggleButton/_types.d.ts +18 -30
- package/dist/types/components/UploadArea/UploadArea.d.ts +27 -19
- package/dist/types/components/UploadArea/_types.d.ts +23 -20
- package/dist/types/components/UploadArea/index.d.ts +1 -1
- package/dist/types/components/UploadArea/selection.d.ts +7 -0
- package/dist/types/components/UploadArea/useFileSelection.d.ts +30 -0
- package/dist/types/components/Video/Video.d.ts +2 -72
- package/dist/types/components/Video/_types.d.ts +37 -11
- package/dist/types/components/Video/getVideoControls.d.ts +3 -0
- package/dist/types/components/Video/index.d.ts +1 -1
- package/dist/types/components/VideoController/VideoController.d.ts +1 -1
- package/dist/types/components/VideoController/_types.d.ts +6 -1
- package/dist/types/components/playHelpers.d.ts +10 -233
- package/dist/types/components/sharedTypes.d.ts +31 -0
- package/dist/types/hooks/index.d.ts +1 -1
- package/dist/types/hooks/useToolTip/useToolTip.d.ts +1 -0
- package/dist/types/hooks/useWindow/useWindow.d.ts +5 -16
- package/dist/types/index.d.ts +39 -30
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/popMenu/_types.d.ts +13 -0
- package/dist/types/stores/popMenu/index.d.ts +2 -0
- package/dist/types/stores/popMenu/popMenuStore.d.ts +12 -0
- package/dist/types/stores/toast/_types.d.ts +6 -11
- package/dist/types/stores/toast/toastStore.d.ts +6 -6
- package/dist/types/stores/window/windowStore.d.ts +2 -2
- package/dist/types/theme/breakpoints/breakpoints.d.ts +11 -0
- package/dist/types/theme/colors/palette.d.ts +461 -0
- package/dist/types/theme/colors/recipes.d.ts +34 -0
- package/dist/types/theme/colors/resolveColor.d.ts +7 -0
- package/dist/types/theme/colors/types.d.ts +8 -92
- package/dist/types/theme/index.d.ts +4 -0
- package/dist/types/theme/type/type.d.ts +1 -0
- package/dist/types/theme/type/types.d.ts +3 -0
- package/dist/types/utils/audio/useAudioVisualizer.d.ts +3 -0
- package/dist/types/utils/functions/colors.d.ts +7 -0
- package/dist/types/utils/functions/files.d.ts +3 -4
- package/dist/types/utils/functions/misc.d.ts +12 -2
- package/dist/types/utils/functions/resolveColorProps.d.ts +2 -0
- package/dist/types/utils/functions/resolveShortcut.d.ts +3 -0
- package/dist/types/utils/index.d.ts +5 -1
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +3 -0
- package/dist/types/utils/styling/getWaterTransition.d.ts +4 -0
- package/dist/types/utils/styling/reduceMotionTargets.d.ts +4 -0
- package/dist/types/utils/styling/usePrefersReducedMotion.d.ts +2 -0
- package/package.json +195 -193
- package/scripts/README.md +19 -0
- package/dist/cjs/chunks/AudioBubble-DAtkPfFK.js +0 -55
- package/dist/cjs/chunks/Avatar-BI8Gvsp7.js +0 -82
- package/dist/cjs/chunks/AvatarGroup-1IxbG6-D.js +0 -41
- package/dist/cjs/chunks/Badge-DMey3Pf3.js +0 -22
- package/dist/cjs/chunks/Button-BjmkIu7l.js +0 -265
- package/dist/cjs/chunks/ButtonBar-BxA8GQPM.js +0 -72
- package/dist/cjs/chunks/Camera-ByjATQDE.js +0 -380
- package/dist/cjs/chunks/CheckBox-DZng-9wI.js +0 -51
- package/dist/cjs/chunks/Chip-CqUDN_QK.js +0 -80
- package/dist/cjs/chunks/DivInput-GYDtuy4a.js +0 -101
- package/dist/cjs/chunks/Dot-BgyxIyrr.js +0 -72
- package/dist/cjs/chunks/DrggablePanel-BjOFnl0l.js +0 -224
- package/dist/cjs/chunks/DropDown-C0vZNCK4.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-CVzk_ASK.js +0 -88
- package/dist/cjs/chunks/FileList-6qXKA_Ux.js +0 -223
- package/dist/cjs/chunks/FlexDiv-LwjVh6ls.js +0 -178
- package/dist/cjs/chunks/Grouper-BlWyuh_b.js +0 -63
- package/dist/cjs/chunks/Icon-BTjtQLNe.js +0 -1473
- package/dist/cjs/chunks/IconButton-C0yNYhI6.js +0 -182
- package/dist/cjs/chunks/Label-DsMFZd91.js +0 -106
- package/dist/cjs/chunks/Level-VKdsTW_-.js +0 -63
- package/dist/cjs/chunks/Modal-Dp5Wg1Bw.js +0 -128
- package/dist/cjs/chunks/ModalController-Cb2_7DtS.js +0 -81
- package/dist/cjs/chunks/Overlay-hOm9sYjr.js +0 -41
- package/dist/cjs/chunks/Pager-CPhi9uyP.js +0 -36
- package/dist/cjs/chunks/ProgressIndicator-CMsc_Npc.js +0 -140
- package/dist/cjs/chunks/PromptInput-6eDiLG4g.js +0 -161
- package/dist/cjs/chunks/RadioButton-DMxqwM6_.js +0 -55
- package/dist/cjs/chunks/RadioButtonList-kG_Y1d4X.js +0 -73
- package/dist/cjs/chunks/Slider-DGJomZGG.js +0 -169
- package/dist/cjs/chunks/Spacer-Z97EoNtJ.js +0 -26
- package/dist/cjs/chunks/Switch-CfzJd19R.js +0 -44
- package/dist/cjs/chunks/TabBar-C2aNS0Sd.js +0 -183
- package/dist/cjs/chunks/TextArea-G_MUJAHw.js +0 -77
- package/dist/cjs/chunks/TextField-CWIGERkd.js +0 -190
- package/dist/cjs/chunks/Tip-B7RF879X.js +0 -89
- package/dist/cjs/chunks/Toast-pkSkNuZo.js +0 -185
- package/dist/cjs/chunks/ToggleButton-DPc2x2EV.js +0 -45
- package/dist/cjs/chunks/UploadArea-DyVGwChS.js +0 -132
- package/dist/cjs/chunks/Video-Dh-_ouTP.js +0 -301
- package/dist/cjs/chunks/VideoController-CVm1CtaE.js +0 -95
- package/dist/cjs/chunks/_types-DxINS-ge.js +0 -140
- package/dist/cjs/chunks/audioVisualizer-C74sRH6D.js +0 -60
- package/dist/cjs/chunks/colors-BDwwQ2Y3.js +0 -27
- package/dist/cjs/chunks/debounce-Bi3gt_i6.js +0 -18
- package/dist/cjs/chunks/sharedTypes-XAbs742N.js +0 -6
- package/dist/cjs/chunks/toastStore-Bwus7v5O.js +0 -17
- package/dist/cjs/chunks/viewState-BVtEQ4sR.js +0 -497
- package/dist/cjs/components/DivInput/index.js +0 -7
- package/dist/cjs/components/Grouper/index.js +0 -14
- package/dist/cjs/components/Label/index.js +0 -12
- package/dist/cjs/components/Level/index.js +0 -7
- package/dist/cjs/components/Modal/index.js +0 -15
- package/dist/esm/chunks/AudioBubble-B8vlO9fq.mjs +0 -69
- package/dist/esm/chunks/Avatar-BMHnrzr3.mjs +0 -88
- package/dist/esm/chunks/AvatarGroup-BoBXPEbH.mjs +0 -47
- package/dist/esm/chunks/Badge-C7xDwrvC.mjs +0 -26
- package/dist/esm/chunks/Button-C6sTA1hG.mjs +0 -283
- package/dist/esm/chunks/ButtonBar-Bh3-UpMU.mjs +0 -82
- package/dist/esm/chunks/Camera-BXSLetAD.mjs +0 -398
- package/dist/esm/chunks/CheckBox-DkXJwLeU.mjs +0 -61
- package/dist/esm/chunks/Chip-XTbAoiHl.mjs +0 -92
- package/dist/esm/chunks/DivInput-TsyOx4x2.mjs +0 -113
- package/dist/esm/chunks/Dot-D0NtTwqi.mjs +0 -78
- package/dist/esm/chunks/DrggablePanel-BK9ukIbF.mjs +0 -236
- package/dist/esm/chunks/DropDown-F7yIB6EJ.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-SseJ5z1U.mjs +0 -101
- package/dist/esm/chunks/FileList-Bv9yn2QS.mjs +0 -231
- package/dist/esm/chunks/FlexDiv-3OxQ9y_1.mjs +0 -188
- package/dist/esm/chunks/Grouper-BcrjlgM-.mjs +0 -83
- package/dist/esm/chunks/Icon-He4S-Q8N.mjs +0 -1487
- package/dist/esm/chunks/IconButton-BGL-_8VW.mjs +0 -197
- package/dist/esm/chunks/Label-BouM6sY2.mjs +0 -119
- package/dist/esm/chunks/Level-CTkhQuiZ.mjs +0 -68
- package/dist/esm/chunks/Modal-BnbUOsKH.mjs +0 -142
- package/dist/esm/chunks/ModalController-Dk2VZcXW.mjs +0 -92
- package/dist/esm/chunks/Overlay-D5cMQSvL.mjs +0 -47
- package/dist/esm/chunks/Pager-4-2T_ZbJ.mjs +0 -42
- package/dist/esm/chunks/ProgressIndicator-DBf_bLtr.mjs +0 -156
- package/dist/esm/chunks/PromptInput-I10dUhFO.mjs +0 -175
- package/dist/esm/chunks/RadioButton-ZD7w9pql.mjs +0 -63
- package/dist/esm/chunks/RadioButtonList-h2_5VM4X.mjs +0 -81
- package/dist/esm/chunks/Slider-2Q6yVb8H.mjs +0 -183
- package/dist/esm/chunks/Spacer-Rj8PKnt3.mjs +0 -28
- package/dist/esm/chunks/Switch-C4zkPOMU.mjs +0 -50
- package/dist/esm/chunks/TabBar-bYgmIa-q.mjs +0 -205
- package/dist/esm/chunks/TextArea-BS0Iu1RB.mjs +0 -87
- package/dist/esm/chunks/TextField-BT1quQpj.mjs +0 -210
- package/dist/esm/chunks/Tip-B4Tg6gIC.mjs +0 -99
- package/dist/esm/chunks/Toast-DWHhX64K.mjs +0 -203
- package/dist/esm/chunks/ToggleButton-KAplYW5q.mjs +0 -53
- package/dist/esm/chunks/UploadArea-D_ytxxSf.mjs +0 -142
- package/dist/esm/chunks/Video-BHSzz3Wx.mjs +0 -316
- package/dist/esm/chunks/VideoController-D9ihYFYq.mjs +0 -114
- package/dist/esm/chunks/_types-FIe85AYv.mjs +0 -140
- package/dist/esm/chunks/audioVisualizer-BiB7Hun_.mjs +0 -60
- package/dist/esm/chunks/colors-DAIBQReF.mjs +0 -30
- package/dist/esm/chunks/debounce-BPsURiHk.mjs +0 -19
- package/dist/esm/chunks/sharedTypes-DdC4rvjp.mjs +0 -8
- package/dist/esm/chunks/toastStore-CRMyZAzS.mjs +0 -15
- package/dist/esm/chunks/viewState-BdLOLJlv.mjs +0 -527
- package/dist/esm/components/DivInput/index.mjs +0 -13
- package/dist/esm/components/Grouper/index.mjs +0 -47
- package/dist/esm/components/Label/index.mjs +0 -11
- package/dist/esm/components/Level/index.mjs +0 -15
- package/dist/esm/components/Modal/index.mjs +0 -57
- package/dist/types/components/DataTable/_resolveVirtualizeRows.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useReorderColumns.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useResizeColumn.test.d.ts +0 -1
- package/dist/types/components/DataTable/_useRowWindow.test.d.ts +0 -1
- package/dist/types/components/DataTable/columnHelper.test.d.ts +0 -1
- package/dist/types/components/DataTable/viewState.test.d.ts +0 -1
- package/dist/types/components/DivInput/DivInput.d.ts +0 -3
- package/dist/types/components/DivInput/_types.d.ts +0 -24
- package/dist/types/components/DivInput/index.d.ts +0 -2
- package/dist/types/components/Grouper/Grouper.d.ts +0 -3
- package/dist/types/components/Grouper/_types.d.ts +0 -20
- package/dist/types/components/Grouper/index.d.ts +0 -2
- package/dist/types/components/Icon/iconRegistry.test.d.ts +0 -1
- package/dist/types/components/IconButton/_animation.d.ts +0 -18
- package/dist/types/components/IconButton/_animation.test.d.ts +0 -1
- package/dist/types/components/Label/Label.d.ts +0 -3
- package/dist/types/components/Label/_types.d.ts +0 -25
- package/dist/types/components/Label/index.d.ts +0 -3
- package/dist/types/components/Level/Level.d.ts +0 -5
- package/dist/types/components/Level/_types.d.ts +0 -21
- package/dist/types/components/Level/index.d.ts +0 -2
- package/dist/types/components/Modal/Modal.d.ts +0 -3
- package/dist/types/components/Modal/_types.d.ts +0 -49
- package/dist/types/components/Modal/index.d.ts +0 -2
- package/dist/types/hooks/useActiveTab/useActiveTab.test.d.ts +0 -1
- package/dist/types/hooks/useAudioRecorder/useAudioRecorder.test.d.ts +0 -1
- package/dist/types/hooks/useBindWebRTC/useBindWebRTC.test.d.ts +0 -1
- package/dist/types/hooks/useClipboard/useClipboard.test.d.ts +0 -1
- package/dist/types/hooks/useDoubleClick/useDoubleClick.test.d.ts +0 -1
- package/dist/types/hooks/useInfiniteScroll/useInfiniteScroll.test.d.ts +0 -1
- package/dist/types/hooks/useIntersecting/useIntersecting.test.d.ts +0 -1
- package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.test.d.ts +0 -1
- package/dist/types/hooks/useLastUpdated/useLastUpdated.test.d.ts +0 -1
- package/dist/types/hooks/useLocalStore/useLocalStore.test.d.ts +0 -1
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.test.d.ts +0 -1
- package/dist/types/hooks/useMicrophone/useMicrophone.test.d.ts +0 -1
- package/dist/types/hooks/useObserveTheme/useObserveTheme.test.d.ts +0 -1
- package/dist/types/hooks/useTheme/useTheme.test.d.ts +0 -1
- package/dist/types/hooks/useToolTip/useToolTip.test.d.ts +0 -1
- package/dist/types/hooks/useTrackRenders/useTrackRenders.test.d.ts +0 -1
- package/dist/types/hooks/useWindow/useWindow.test.d.ts +0 -1
- package/dist/types/providers/themeServer.test.d.ts +0 -1
- package/dist/types/stores/LocalDB/localDBStore.test.d.ts +0 -1
- package/dist/types/stores/SSE/sseStore.test.d.ts +0 -1
- package/dist/types/stores/WS/wsStore.test.d.ts +0 -1
- package/dist/types/stores/WebRTC/webRTCStore.test.d.ts +0 -1
- package/dist/types/stores/activeTab/activeTabStore.test.d.ts +0 -1
- package/dist/types/stores/browserChannel/browserChannelsStore.test.d.ts +0 -1
- package/dist/types/stores/microphone/microphoneStore.test.d.ts +0 -1
- package/dist/types/stores/modal/modalStore.test.d.ts +0 -1
- package/dist/types/stores/tip/tipStore.test.d.ts +0 -1
- package/dist/types/stores/toast/toastStore.test.d.ts +0 -1
- package/dist/types/stores/uploads/uploadsStore.test.d.ts +0 -1
- package/dist/types/stores/video/videoStore.test.d.ts +0 -1
- package/dist/types/stores/volume/volumeStore.test.d.ts +0 -1
- package/dist/types/stores/window/windowStore.test.d.ts +0 -1
- package/dist/types/utils/functions/colors.test.d.ts +0 -1
- package/dist/types/utils/functions/debounce.test.d.ts +0 -1
- package/dist/types/utils/functions/files.test.d.ts +0 -1
- package/dist/types/utils/functions/misc.test.d.ts +0 -1
- package/dist/types/utils/functions/rafThrottle.test.d.ts +0 -1
- package/dist/types/utils/objects/IndexedDB/IndexedDB.test.d.ts +0 -1
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.test.d.ts +0 -1
- package/dist/types/utils/objects/SSEConnection/SSEConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/WSConnection/WSConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.test.d.ts +0 -1
- package/dist/types/utils/objects/audioVisualizer/audioVisualizer.test.d.ts +0 -1
- package/dist/types/utils/objects/browserChannel/broadcastChannel.test.d.ts +0 -1
- package/dist/types/workers/uploads/uploads-worker.test.d.ts +0 -1
- /package/dist/cjs/chunks/{MdStreamBuffer-DiL2zm2P.js → MdStreamBuffer-B0KtaR_k.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-CTxnFASS.js → SSEConnection-BXWkgT66.js} +0 -0
- /package/dist/cjs/chunks/{activeTabStore-C8afog5l.js → activeTabStore-D2gxAoK6.js} +0 -0
- /package/dist/cjs/chunks/{broadcastChannel-DLSijpj_.js → broadcastChannel-DdPZ3LUB.js} +0 -0
- /package/dist/cjs/chunks/{magic-string.es-DRDyITUv.js → magic-string.es-DsAR0Q7u.js} +0 -0
- /package/dist/cjs/chunks/{rafThrottle-DdNEpMIw.js → rafThrottle-BRdLzPo7.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-BKFK6F3e.js → tipStore-DDHyGeyK.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-B2uEaXWi.js → tslib.es6-B8JY5ZGw.js} +0 -0
- /package/dist/cjs/chunks/{videoStore-BYmE3fJZ.js → videoStore-B0l9iBw4.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-D2Yh0SCY.mjs → MdStreamBuffer-CcO5IBxD.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-B3iPwyF_.mjs → SSEConnection-B5rVxalP.mjs} +0 -0
- /package/dist/esm/chunks/{activeTabStore-BsoH1tFV.mjs → activeTabStore-CCstpXAC.mjs} +0 -0
- /package/dist/esm/chunks/{broadcastChannel-DahousoM.mjs → broadcastChannel-CPT0S33H.mjs} +0 -0
- /package/dist/esm/chunks/{magic-string.es-DOKITkor.mjs → magic-string.es-CI4cCGRB.mjs} +0 -0
- /package/dist/esm/chunks/{rafThrottle-BX9f7-D1.mjs → rafThrottle-Dl8Z5sJ-.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CF42G3w9.mjs → tipStore-CBvk303u.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-DatKI43-.mjs → tslib.es6-CpnJrDBv.mjs} +0 -0
- /package/dist/esm/chunks/{videoStore-CiDDAB4E.mjs → videoStore-Cd-Lewfy.mjs} +0 -0
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as __rest } from "./tslib.es6-DatKI43-.mjs";
|
|
3
|
-
|
|
4
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
import { motion } from "motion/react";
|
|
7
|
-
|
|
8
|
-
import React, { useRef, useState, useEffect, useCallback, useMemo } from "react";
|
|
9
|
-
|
|
10
|
-
import { s as setStyle } from "./misc-DBIXjc2Q.mjs";
|
|
11
|
-
|
|
12
|
-
import { corners } from "../theme/corners.mjs";
|
|
13
|
-
|
|
14
|
-
import { B as Badge } from "./Badge-C7xDwrvC.mjs";
|
|
15
|
-
|
|
16
|
-
import { D as Dot } from "./Dot-D0NtTwqi.mjs";
|
|
17
|
-
|
|
18
|
-
import { I as Icon } from "./Icon-He4S-Q8N.mjs";
|
|
19
|
-
|
|
20
|
-
import { T as ToolTipType } from "./sharedTypes-DdC4rvjp.mjs";
|
|
21
|
-
|
|
22
|
-
var AnimationPreset, AnimationType, css_button = "IconButton-module_button__rziqa flexBox-module_row__z24tF", css_label = "IconButton-module_label__qWGFD flexBox-module_row__z24tF type-module_body-l-regular__lOYbg", css_icon = "IconButton-module_icon__2DDWy flexBox-module_row__z24tF", css_count = "IconButton-module_count__6r373 flexBox-module_row__z24tF";
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Helper for quick popular animation effects
|
|
26
|
-
*/ !function(AnimationPreset) {
|
|
27
|
-
AnimationPreset.Rotate = "rotate", AnimationPreset.Fade = "fade", AnimationPreset.Scale = "scale";
|
|
28
|
-
}(AnimationPreset || (AnimationPreset = {})), function(AnimationType) {
|
|
29
|
-
AnimationType.Rotate = "rotate", AnimationType.Fade = "opacity", AnimationType.Scale = "scale";
|
|
30
|
-
}(AnimationType || (AnimationType = {}));
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Resolves presets to a button animation
|
|
34
|
-
*/
|
|
35
|
-
const presetAnimation = {
|
|
36
|
-
[AnimationPreset.Rotate]: {
|
|
37
|
-
animation: {
|
|
38
|
-
type: AnimationType.Rotate,
|
|
39
|
-
value: {
|
|
40
|
-
on: 0,
|
|
41
|
-
off: 180
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
transition: {
|
|
45
|
-
on: {
|
|
46
|
-
duration: .25,
|
|
47
|
-
ease: "linear"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
[AnimationPreset.Fade]: {
|
|
52
|
-
animation: {
|
|
53
|
-
type: AnimationType.Fade,
|
|
54
|
-
value: {
|
|
55
|
-
off: 0,
|
|
56
|
-
on: 1
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
transition: {
|
|
60
|
-
on: {
|
|
61
|
-
duration: .25,
|
|
62
|
-
ease: "easeInOut"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
[AnimationPreset.Scale]: {
|
|
67
|
-
animation: {
|
|
68
|
-
type: AnimationType.Scale,
|
|
69
|
-
value: {
|
|
70
|
-
off: 0,
|
|
71
|
-
on: 1
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
transition: {
|
|
75
|
-
on: {
|
|
76
|
-
duration: .25,
|
|
77
|
-
ease: "linear"
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, resolveVariants = (presets, custom) => {
|
|
82
|
-
const animations = [];
|
|
83
|
-
let transition;
|
|
84
|
-
if (presets) {
|
|
85
|
-
const presetAnimations = presetAnimation[presets].animation, presetTransition = presetAnimation[presets].transition, animationEntries = Array.isArray(presetAnimations) ? presetAnimations : [ presetAnimations ];
|
|
86
|
-
animations.push(...animationEntries), presetTransition && (transition = presetTransition);
|
|
87
|
-
}
|
|
88
|
-
if (custom) {
|
|
89
|
-
const customAnimations = custom.animation, customTransition = custom.transition, customAnimationEntries = Array.isArray(customAnimations) ? customAnimations : [ customAnimations ];
|
|
90
|
-
animations.push(...customAnimationEntries), customTransition && (transition = customTransition);
|
|
91
|
-
}
|
|
92
|
-
return (animations => {
|
|
93
|
-
if (!animations) return;
|
|
94
|
-
const variants = {
|
|
95
|
-
initial: {},
|
|
96
|
-
animate: {},
|
|
97
|
-
exit: {}
|
|
98
|
-
}, {animation: animation, transition: transition} = animations, animationEntries = Array.isArray(animation) ? animation : [ animation ], {on: on, off: off} = null != transition ? transition : {};
|
|
99
|
-
for (const entry of animationEntries) {
|
|
100
|
-
const {type: type, value: value} = entry;
|
|
101
|
-
variants.initial = Object.assign(Object.assign({}, variants.initial), {
|
|
102
|
-
[type]: value.off
|
|
103
|
-
}), variants.animate = Object.assign(Object.assign({}, variants.animate), {
|
|
104
|
-
[type]: value.on,
|
|
105
|
-
transition: on
|
|
106
|
-
}), variants.exit = Object.assign(Object.assign({}, variants.exit), {
|
|
107
|
-
[type]: value.off,
|
|
108
|
-
transition: null != off ? off : on
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
return variants;
|
|
112
|
-
})({
|
|
113
|
-
animation: animations,
|
|
114
|
-
transition: transition
|
|
115
|
-
});
|
|
116
|
-
}, IconButton = React.memo(props => {
|
|
117
|
-
const {frameSize: frameSize = 36, iconSize: iconSize = 20, round: round = !0, icon: icon = "more", borderRadius: borderRadius = corners["corner-xs"], border: border = !1, tooltip: tooltip, color: color, colorOn: colorOn, iconFill: iconFill = !1, backgroundColor: backgroundColor = "var(--core-surface-secondary)", backgroundColorHover: backgroundColorHover = "var(--core-outline-primary)", backgroundColorOn: backgroundColorOn = "var(--core-outline-primary)", iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-primary)", transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, fillColor: fillColor, label: label, hover: hover = !0, count: count = 0, toggle: toggle = !1, toggleIcon: toggleIcon = !1, isToggled: isToggled = !1, disabled: disabled = !1, showDot: showDot = !1, buttonSize: buttonSize = "m", presetAnimations: presetAnimations, customAnimations: customAnimations, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = __rest(props, [ "frameSize", "iconSize", "round", "icon", "borderRadius", "border", "tooltip", "color", "colorOn", "iconFill", "backgroundColor", "backgroundColorHover", "backgroundColorOn", "iconColor", "iconColorOn", "iconColorHover", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "buttonSize", "presetAnimations", "customAnimations", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = useRef(null), [on, setOn] = useState(isToggled), [hovered, setHovered] = useState(!1);
|
|
118
|
-
useEffect(() => setOn(isToggled), [ isToggled ]);
|
|
119
|
-
const handleClick = useCallback(e => {
|
|
120
|
-
disabled || (tooltip && onToolTip(null), toggle && setOn(!on), onClick(e));
|
|
121
|
-
}, [ disabled, tooltip, onToolTip, on, onClick, toggle ]), handleMouseEnter = useCallback(e => {
|
|
122
|
-
if (setHovered(!0), !(null == ref ? void 0 : ref.current) || !tooltip) return;
|
|
123
|
-
const tip = {
|
|
124
|
-
type: ToolTipType.button,
|
|
125
|
-
payload: {
|
|
126
|
-
label: tooltip
|
|
127
|
-
},
|
|
128
|
-
event: e,
|
|
129
|
-
ref: ref
|
|
130
|
-
};
|
|
131
|
-
onToolTip(tip);
|
|
132
|
-
}, [ tooltip, onToolTip ]), handleMouseLeave = useCallback(() => {
|
|
133
|
-
setHovered(!1), tooltip && onToolTip(null);
|
|
134
|
-
}, [ tooltip, onToolTip ]), bgColorNormal = useMemo(() => on ? backgroundColorOn : null != backgroundColor ? backgroundColor : "var(--core-surface-secondary)", [ backgroundColorOn, backgroundColor, on ]), bgHoverColor = useMemo(() => hover && on ? backgroundColorOn : hover ? backgroundColorHover : null != backgroundColor ? backgroundColor : "transparent", [ hover, backgroundColor, backgroundColorOn, backgroundColorHover, on ]), textColor = useMemo(() => on ? colorOn : null != color ? color : "var(--core-text-primary)", [ on, colorOn, color ]), setIconColor = useMemo(() => on ? iconColorOn : hovered ? iconColorHover : null != iconColor ? iconColor : "var(--core-text-primary)", [ on, iconColorOn, iconColor, iconColorHover, hovered ]), size = useMemo(() => buttonSize ? "s" === buttonSize ? 24 : "m" === buttonSize ? 36 : "l" === buttonSize ? 44 : "xl" === buttonSize ? 56 : void 0 : frameSize, [ frameSize, buttonSize ]), cssVars = useMemo(() => ({
|
|
135
|
-
"--ib-bg-color": bgColorNormal,
|
|
136
|
-
"--ib-bg-color-hover": disabled ? bgColorNormal : bgHoverColor,
|
|
137
|
-
"--ib-icon-size": `${null != iconSize ? iconSize : 0}px`,
|
|
138
|
-
"--ib-button-size": `${null != size ? size : 0}px`,
|
|
139
|
-
"--ib-border-radius": round ? "100%" : setStyle(borderRadius, corners["corner-none"]),
|
|
140
|
-
"--ib-border": border ? "1px" : 0,
|
|
141
|
-
"--ib-color": textColor,
|
|
142
|
-
"--ib-cursor": disabled ? "default" : "pointer"
|
|
143
|
-
}), [ bgColorNormal, bgHoverColor, textColor, border, size, borderRadius, iconSize, round, disabled ]);
|
|
144
|
-
return jsxs(motion.button, Object.assign({
|
|
145
|
-
id: divId,
|
|
146
|
-
type: "button",
|
|
147
|
-
className: `${css_button}${divClass}`,
|
|
148
|
-
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
149
|
-
onClick: e => handleClick(e),
|
|
150
|
-
onMouseOutCapture: handleMouseLeave,
|
|
151
|
-
onMouseOverCapture: handleMouseEnter,
|
|
152
|
-
transition: transition,
|
|
153
|
-
variants: variants,
|
|
154
|
-
initial: initial,
|
|
155
|
-
animate: animate,
|
|
156
|
-
exit: exit,
|
|
157
|
-
disabled: disabled,
|
|
158
|
-
"aria-disabled": disabled,
|
|
159
|
-
ref: ref
|
|
160
|
-
}, rest, {
|
|
161
|
-
children: [ jsx(motion.div, {
|
|
162
|
-
className: css_icon,
|
|
163
|
-
style: {
|
|
164
|
-
opacity: disabled ? .3 : 1
|
|
165
|
-
},
|
|
166
|
-
variants: resolveVariants(presetAnimations, customAnimations),
|
|
167
|
-
initial: isToggled ? "animate" : "initial",
|
|
168
|
-
animate: on ? "animate" : "exit",
|
|
169
|
-
children: jsx(Icon, {
|
|
170
|
-
name: icon,
|
|
171
|
-
strokeColor: setIconColor,
|
|
172
|
-
fillColor: fillColor,
|
|
173
|
-
disabled: disabled,
|
|
174
|
-
size: iconSize,
|
|
175
|
-
fill: iconFill,
|
|
176
|
-
toggle: !!toggleIcon && on,
|
|
177
|
-
pointer: !0
|
|
178
|
-
})
|
|
179
|
-
}), label && jsx("div", {
|
|
180
|
-
className: css_label,
|
|
181
|
-
children: label
|
|
182
|
-
}), jsx(Dot, {
|
|
183
|
-
show: showDot
|
|
184
|
-
}), 0 !== count && jsx("div", {
|
|
185
|
-
className: css_count,
|
|
186
|
-
children: jsx(Badge, {
|
|
187
|
-
variant: "light",
|
|
188
|
-
count: count,
|
|
189
|
-
hideNull: !0
|
|
190
|
-
})
|
|
191
|
-
}) ]
|
|
192
|
-
}));
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Resolves button animation to motion variants
|
|
197
|
-
*/ export { AnimationPreset as A, IconButton as I, AnimationType as a };
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as __rest } from "./tslib.es6-DatKI43-.mjs";
|
|
3
|
-
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
import { useCallback, useMemo } from "react";
|
|
7
|
-
|
|
8
|
-
import { s as setStyle } from "./misc-DBIXjc2Q.mjs";
|
|
9
|
-
|
|
10
|
-
import { corners } from "../theme/corners.mjs";
|
|
11
|
-
|
|
12
|
-
var LabelBackground, css = {
|
|
13
|
-
label: "Label-module_label__RaRvM",
|
|
14
|
-
button: "Label-module_button__N8bcQ type-module_body-m-regular__LuQBA",
|
|
15
|
-
xs: "Label-module_xs__K9Ai6 type-module_body-xs-regular__ZAFft",
|
|
16
|
-
s: "Label-module_s__Zh8Gp type-module_body-s-regular__vRHSP",
|
|
17
|
-
m: "Label-module_m__BJtGL type-module_body-m-regular__LuQBA",
|
|
18
|
-
l: "Label-module_l__t70tt type-module_body-l-regular__lOYbg",
|
|
19
|
-
xl: "Label-module_xl__bX0ub type-module_body-xl-regular__pF2kC"
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
function resolveSemanticBackground(backgroundColor) {
|
|
23
|
-
if (!backgroundColor || "string" != typeof backgroundColor) return;
|
|
24
|
-
const semanticKey = backgroundColor;
|
|
25
|
-
return LabelBackground[semanticKey] ? LabelBackground[semanticKey] : Object.values(LabelBackground).find(value => value === backgroundColor);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function Label(props) {
|
|
29
|
-
const {children: children, label: label, backgroundColor: backgroundColor = "transparent", borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", borderRadius: borderRadius = corners["corner-xs"], padding: padding, textColor: textColor = "var(--core-text-primary)", textSize: textSize = "s", onClick: onClick} = props, divAttributes = __rest(props, [ "children", "label", "backgroundColor", "borderWidth", "borderSize", "borderColor", "borderRadius", "padding", "textColor", "textSize", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", isInteractive = Boolean(onClick), resolvedBackgroundColor = backgroundColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, handleClick = useCallback(e => {
|
|
30
|
-
isInteractive && (null == onClick || onClick(e));
|
|
31
|
-
}, [ isInteractive, onClick ]), setBgColor = useMemo(() => {
|
|
32
|
-
if (!resolvedBackgroundColor) return "transparent";
|
|
33
|
-
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
34
|
-
if (!fill) return resolvedBackgroundColor;
|
|
35
|
-
switch (fill) {
|
|
36
|
-
case "red":
|
|
37
|
-
return "var(--feedback-warning)";
|
|
38
|
-
|
|
39
|
-
case "green":
|
|
40
|
-
return "var(--feedback-positive)";
|
|
41
|
-
|
|
42
|
-
case "yellow":
|
|
43
|
-
return "var(--array-yellow)";
|
|
44
|
-
|
|
45
|
-
case "grey":
|
|
46
|
-
case "white":
|
|
47
|
-
return "var(--core-surface-secondary)";
|
|
48
|
-
|
|
49
|
-
case "lightGrey":
|
|
50
|
-
return "var(--core-button-disabled)";
|
|
51
|
-
|
|
52
|
-
case "blue":
|
|
53
|
-
return "var(--core-button-primary)";
|
|
54
|
-
|
|
55
|
-
default:
|
|
56
|
-
return "var(--core-surface-primary)";
|
|
57
|
-
}
|
|
58
|
-
}, [ resolvedBackgroundColor ]), setBorderColor = useMemo(() => {
|
|
59
|
-
if (!resolvedBackgroundColor) return borderColor;
|
|
60
|
-
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
61
|
-
if (!fill) return borderColor;
|
|
62
|
-
switch (fill) {
|
|
63
|
-
case "red":
|
|
64
|
-
return "var(--feedback-warning)";
|
|
65
|
-
|
|
66
|
-
case "green":
|
|
67
|
-
return "var(--feedback-positive)";
|
|
68
|
-
|
|
69
|
-
case "yellow":
|
|
70
|
-
return "var(--array-yellow-label)";
|
|
71
|
-
|
|
72
|
-
case "grey":
|
|
73
|
-
case "lightGrey":
|
|
74
|
-
case "white":
|
|
75
|
-
return "var(--core-outline-primary)";
|
|
76
|
-
|
|
77
|
-
case "blue":
|
|
78
|
-
return "var(--core-button-primary)";
|
|
79
|
-
|
|
80
|
-
default:
|
|
81
|
-
return "var(--core-surface-primary)";
|
|
82
|
-
}
|
|
83
|
-
}, [ resolvedBackgroundColor, borderColor ]), setPadding = useMemo(() => {
|
|
84
|
-
if (null != padding) return "number" == typeof padding ? `${padding}px` : padding;
|
|
85
|
-
return `var(--spacing-xxs) ${"xs" === textSize || "s" === textSize ? "var(--spacing-xs)" : "var(--spacing-s)"}`;
|
|
86
|
-
}, [ padding, textSize ]), cssVars = useMemo(() => ({
|
|
87
|
-
"--label-padding": setPadding,
|
|
88
|
-
"--label-border-radius": setStyle(borderRadius),
|
|
89
|
-
"--label-cursor": onClick ? "pointer" : "default",
|
|
90
|
-
"--label-color": textColor,
|
|
91
|
-
"--label-bg-color": setBgColor,
|
|
92
|
-
"--label-border-size": setStyle(resolvedBorderWidth),
|
|
93
|
-
"--label-border-color": setBorderColor
|
|
94
|
-
}), [ setPadding, borderRadius, onClick, textColor, setBorderColor, setBgColor, resolvedBorderWidth ]);
|
|
95
|
-
return isInteractive ? jsx("button", Object.assign({
|
|
96
|
-
id: divId,
|
|
97
|
-
type: "button",
|
|
98
|
-
className: `${css.button} ${css[textSize]}${divClass}`,
|
|
99
|
-
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
100
|
-
"aria-label": "Label button",
|
|
101
|
-
onClick: e => handleClick(e)
|
|
102
|
-
}, rest, {
|
|
103
|
-
children: null != children ? children : label
|
|
104
|
-
})) : jsx("span", Object.assign({
|
|
105
|
-
id: divId,
|
|
106
|
-
className: `${css.label} ${css[textSize]}${divClass}`,
|
|
107
|
-
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
108
|
-
}, rest, {
|
|
109
|
-
children: null != children ? children : label
|
|
110
|
-
}));
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
!function(LabelBackground) {
|
|
114
|
-
LabelBackground.red = "red", LabelBackground.yellow = "yellow", LabelBackground.green = "green",
|
|
115
|
-
LabelBackground.blue = "blue", LabelBackground.grey = "grey", LabelBackground.lightGrey = "lightGrey",
|
|
116
|
-
LabelBackground.white = "white";
|
|
117
|
-
}(LabelBackground || (LabelBackground = {}));
|
|
118
|
-
|
|
119
|
-
export { Label as L, LabelBackground as a };
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as __rest } from "./tslib.es6-DatKI43-.mjs";
|
|
3
|
-
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
import React, { useRef, useState, useMemo, useEffect } from "react";
|
|
7
|
-
|
|
8
|
-
import { corners } from "../theme/corners.mjs";
|
|
9
|
-
|
|
10
|
-
import { s as setStyle } from "./misc-DBIXjc2Q.mjs";
|
|
11
|
-
|
|
12
|
-
import { A as AudioVisualizer } from "./audioVisualizer-BiB7Hun_.mjs";
|
|
13
|
-
|
|
14
|
-
import "./broadcastChannel-DahousoM.mjs";
|
|
15
|
-
|
|
16
|
-
var css_wrapper = "Level-module_wrapper__yOfXw", css_barContainer = "Level-module_barContainer__QMUdv", css_bar = "Level-module_bar__MnApX";
|
|
17
|
-
|
|
18
|
-
const Level = React.memo(function(props) {
|
|
19
|
-
const {width: width = 100, height: height = 4, gap: gap = 0, audioStream: audioStream, playing: playing = !1, minIntensity: minIntensity = 0, maxIntensity: maxIntensity = 5, intensity: intensity = 3.5, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, releasePerSeconds: releasePerSeconds, ReleasePerSeconds: ReleasePerSeconds = 1.5, borderRadius: borderRadius = corners["corner-xs"], borderColor: borderColor = "transparent", borderWidth: borderWidth = 0, colorActive: colorActive = "var(--feedback-positive)", backgroundColor: backgroundColor = "var(--core-surface-primary-tint)"} = props, divAttributes = __rest(props, [ "width", "height", "gap", "audioStream", "playing", "minIntensity", "maxIntensity", "intensity", "peakIntensity", "risePerSeconds", "releasePerSeconds", "ReleasePerSeconds", "borderRadius", "borderColor", "borderWidth", "colorActive", "backgroundColor" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = useRef(null), [normalizedIntensity, setNormalizedIntensity] = useState(0), totalBars = Math.max(1, Math.floor(maxIntensity)), minBars = Math.max(0, Math.min(Math.floor(minIntensity), totalBars)), releaseRate = null != releasePerSeconds ? releasePerSeconds : ReleasePerSeconds, intensityIntervals = useMemo(() => new Array(totalBars).fill(0).map((_, index) => index), [ totalBars ]), activeBars = useMemo(() => {
|
|
20
|
-
const scaledBars = Math.round(minBars + normalizedIntensity * (totalBars - minBars));
|
|
21
|
-
return Math.max(minBars, Math.min(scaledBars, totalBars));
|
|
22
|
-
}, [ minBars, normalizedIntensity, totalBars ]), visualizerSettings = useMemo(() => ({
|
|
23
|
-
intensityMultiplier: intensity,
|
|
24
|
-
peakIntensity: peakIntensity,
|
|
25
|
-
risePerSecond: risePerSeconds,
|
|
26
|
-
releasePerSecond: releaseRate,
|
|
27
|
-
onUpdate: ({intensity: nextIntensity}) => setNormalizedIntensity(nextIntensity)
|
|
28
|
-
}), [ intensity, peakIntensity, releaseRate, risePerSeconds ]);
|
|
29
|
-
useEffect(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
if (null === (_a = visualizerRef.current) || void 0 === _a || _a.dispose(), visualizerRef.current = null,
|
|
32
|
-
!audioStream) return void setNormalizedIntensity(0);
|
|
33
|
-
const visualizer = new AudioVisualizer(audioStream, visualizerSettings);
|
|
34
|
-
return visualizerRef.current = visualizer, playing && visualizer.start(), () => {
|
|
35
|
-
visualizer.dispose(), visualizerRef.current === visualizer && (visualizerRef.current = null);
|
|
36
|
-
};
|
|
37
|
-
}, [ audioStream, playing, visualizerSettings ]), useEffect(() => {
|
|
38
|
-
visualizerRef.current && (playing ? visualizerRef.current.start() : (visualizerRef.current.stop(),
|
|
39
|
-
setNormalizedIntensity(0)));
|
|
40
|
-
}, [ playing ]);
|
|
41
|
-
const cssVars = useMemo(() => ({
|
|
42
|
-
"--level-width": setStyle(width),
|
|
43
|
-
"--level-height": setStyle(height),
|
|
44
|
-
"--level-gap": setStyle(gap),
|
|
45
|
-
"--level-bar-border-radius": setStyle(borderRadius),
|
|
46
|
-
"--level-border-color": borderColor,
|
|
47
|
-
"--level-border-width": setStyle(borderWidth),
|
|
48
|
-
"--level-color": colorActive,
|
|
49
|
-
"--level-bg-color": backgroundColor
|
|
50
|
-
}), [ width, height, gap, borderRadius, borderColor, borderWidth, colorActive, backgroundColor ]);
|
|
51
|
-
return jsx("div", Object.assign({
|
|
52
|
-
id: divId,
|
|
53
|
-
className: `${css_wrapper}${divClass}`,
|
|
54
|
-
style: Object.assign(Object.assign({}, cssVars), divStyle)
|
|
55
|
-
}, rest, {
|
|
56
|
-
children: intensityIntervals.map(barIndex => jsx("div", {
|
|
57
|
-
className: css_barContainer,
|
|
58
|
-
children: jsx("div", {
|
|
59
|
-
className: css_bar,
|
|
60
|
-
style: {
|
|
61
|
-
opacity: barIndex < activeBars ? 1 : 0
|
|
62
|
-
}
|
|
63
|
-
})
|
|
64
|
-
}, barIndex))
|
|
65
|
-
}));
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
export { Level as L };
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as __rest } from "./tslib.es6-DatKI43-.mjs";
|
|
3
|
-
|
|
4
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
import React, { useRef, useState, useCallback, useMemo, useEffect } from "react";
|
|
7
|
-
|
|
8
|
-
import { corners } from "../theme/corners.mjs";
|
|
9
|
-
|
|
10
|
-
import { s as setStyle } from "./misc-DBIXjc2Q.mjs";
|
|
11
|
-
|
|
12
|
-
import { B as Button } from "./Button-C6sTA1hG.mjs";
|
|
13
|
-
|
|
14
|
-
import { I as Icon } from "./Icon-He4S-Q8N.mjs";
|
|
15
|
-
|
|
16
|
-
import { I as IconButton } from "./IconButton-BGL-_8VW.mjs";
|
|
17
|
-
|
|
18
|
-
var css = {
|
|
19
|
-
wrapper: "Modal-module_wrapper__34Hds flexBox-module_columnBetween__ERfp7",
|
|
20
|
-
title: "Modal-module_title__A5OeE flexBox-module_rowBetween__5FEvi",
|
|
21
|
-
titleBlock: "Modal-module_titleBlock__HUepX flexBox-module_rowStart__4tcxS",
|
|
22
|
-
titleIcon: "Modal-module_titleIcon__xJYzy flexBox-module_row__z24tF",
|
|
23
|
-
contentWrapper: "Modal-module_contentWrapper__Swyjx flexBox-module_columnStart__C7P44 scrollBars-module_scrollbars__c-ZPl",
|
|
24
|
-
content: "Modal-module_content__dWO-B flexBox-module_columnStart__C7P44",
|
|
25
|
-
actions: "Modal-module_actions__hY6zi flexBox-module_rowBetween__5FEvi",
|
|
26
|
-
leftActions: "Modal-module_leftActions__-M-DM flexBox-module_rowStart__4tcxS",
|
|
27
|
-
rightActions: "Modal-module_rightActions__IFgrN flexBox-module_rowEnd__rVdVm",
|
|
28
|
-
xs: "Modal-module_xs__iPcS9 type-module_body-xs-medium__s3KvF",
|
|
29
|
-
s: "Modal-module_s__31sYS type-module_body-s-medium__tjdFc",
|
|
30
|
-
m: "Modal-module_m__Iz82L type-module_body-m-medium__uW1on",
|
|
31
|
-
l: "Modal-module_l__pntdS type-module_body-l-medium__BqRC7",
|
|
32
|
-
xl: "Modal-module_xl__MR-68 type-module_body-xl-medium__BeyrH"
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const Modal = React.memo(props => {
|
|
36
|
-
const {children: children, id: id, className: className, style: style, minWidth: minWidth = 300, minHeight: minHeight = 200, maxHeight: maxHeight = 400, maxWidth: maxWidth = 400, padding: padding, close: close = !0, title: title, titleTextSize: titleTextSize = "l", contentTextSize: contentTextSize = "m", actions: actions, titleIcon: titleIcon, titleIconFill: titleIconFill = !0, titleBorderColor: titleBorderColor = "var(--core-outline-primary)", titleBorderWidth: titleBorderWidth = 0, actionsBorderColor: actionsBorderColor = "var(--core-outline-primary)", actionsBorderWidth: actionsBorderWidth = 0, autoBorderBottom: autoBorderBottom = !0, onAction: onAction, onReject: onReject, onResolve: onResolve, onClose: onClose, onToolTip: onToolTip, onDragPointerDown: onDragPointerDown, backgroundColor: backgroundColor = "var(--core-surface-secondary)", scrollHandleColor: scrollHandleColor = "var(--core-text-disabled)", scrollHandleColorHover: scrollHandleColorHover = "var(--core-text-disabled)", titleColor: titleColor = "var(--core-text-special)", borderColor: borderColor = "var(--core-outline-primary)", borderRadius: borderRadius = corners["corner-m"], borderWidth: borderWidth = 1} = props, rest = __rest(props, [ "children", "id", "className", "style", "minWidth", "minHeight", "maxHeight", "maxWidth", "padding", "close", "title", "titleTextSize", "contentTextSize", "actions", "titleIcon", "titleIconFill", "titleBorderColor", "titleBorderWidth", "actionsBorderColor", "actionsBorderWidth", "autoBorderBottom", "onAction", "onReject", "onResolve", "onClose", "onToolTip", "onDragPointerDown", "backgroundColor", "scrollHandleColor", "scrollHandleColorHover", "titleColor", "borderColor", "borderRadius", "borderWidth" ]), contentWrapperRef = useRef(null), modalStyle = null != style ? style : {}, modalClass = className ? ` ${className}` : "", [scrolls, setScrolls] = useState(!1), getScrolls = useCallback(() => {
|
|
37
|
-
var _a, _b;
|
|
38
|
-
const height = null === (_a = contentWrapperRef.current) || void 0 === _a ? void 0 : _a.offsetHeight, scrollHeight = null === (_b = contentWrapperRef.current) || void 0 === _b ? void 0 : _b.scrollHeight;
|
|
39
|
-
return !(!height || !scrollHeight) && height < scrollHeight;
|
|
40
|
-
}, []), setActionBorderWidth = useMemo(() => scrolls && 0 === actionsBorderWidth && autoBorderBottom ? "1px" : setStyle(actionsBorderWidth), [ actionsBorderWidth, scrolls, autoBorderBottom ]), setContentPaddingTops = useMemo(() => {
|
|
41
|
-
if (scrolls && autoBorderBottom) {
|
|
42
|
-
if ("string" == typeof padding) {
|
|
43
|
-
return padding.split(" ")[0];
|
|
44
|
-
}
|
|
45
|
-
return setStyle(padding, "var(--spacing-m)");
|
|
46
|
-
}
|
|
47
|
-
return "0";
|
|
48
|
-
}, [ scrolls, padding, autoBorderBottom ]), cssVars = useMemo(() => ({
|
|
49
|
-
"--modal-min-width": setStyle(minWidth),
|
|
50
|
-
"--modal-min-height": setStyle(minHeight),
|
|
51
|
-
"--modal-max-height": setStyle(maxHeight),
|
|
52
|
-
"--modal-max-width": setStyle(maxWidth),
|
|
53
|
-
"--modal-border-color": borderColor,
|
|
54
|
-
"--modal-title-color": titleColor,
|
|
55
|
-
"--modal-border-radius": setStyle(borderRadius),
|
|
56
|
-
"--modal-border-width": setStyle(borderWidth),
|
|
57
|
-
"--modal-padding": setStyle(padding, "var(--spacing-m) var(--spacing-l)"),
|
|
58
|
-
"--modal-background-color": backgroundColor,
|
|
59
|
-
"--modal-title-border-color": titleBorderColor,
|
|
60
|
-
"--modal-title-border-width": setStyle(titleBorderWidth),
|
|
61
|
-
"--modal-actions-border-color": actionsBorderColor,
|
|
62
|
-
"--modal-scroll-handle": setStyle(scrollHandleColor),
|
|
63
|
-
"--modal-scroll-handle-hover": setStyle(scrollHandleColorHover),
|
|
64
|
-
"--modal-actions-border-width": setActionBorderWidth,
|
|
65
|
-
"--modal-content-padding-tops": setContentPaddingTops
|
|
66
|
-
}), [ minWidth, minHeight, maxHeight, maxWidth, borderColor, titleColor, borderRadius, borderWidth, padding, titleBorderWidth, titleBorderColor, actionsBorderColor, backgroundColor, scrollHandleColor, scrollHandleColorHover, setContentPaddingTops, setActionBorderWidth ]);
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
children && maxHeight && setScrolls(getScrolls());
|
|
69
|
-
}, [ children, maxHeight, getScrolls ]);
|
|
70
|
-
const renderActions = position => null == actions ? void 0 : actions.map((action, index) => action.position || "left" !== position ? action.position && position !== action.position ? null : jsx(Button, {
|
|
71
|
-
variant: action.primary ? "solid" : "outline",
|
|
72
|
-
label: action.label,
|
|
73
|
-
onClick: e => (action => {
|
|
74
|
-
const resolves = !action.promise || "resolve" === action.promise, rejects = "reject" === action.promise;
|
|
75
|
-
null == onAction || onAction(action.value), resolves && (null == onResolve || onResolve(action.value)),
|
|
76
|
-
rejects && (null == onReject || onReject(new Error("Modal rejected", {
|
|
77
|
-
cause: action.value
|
|
78
|
-
})));
|
|
79
|
-
})(action),
|
|
80
|
-
round: !0 === action.round,
|
|
81
|
-
iconLeft: action.iconLeft,
|
|
82
|
-
iconRight: action.iconRight,
|
|
83
|
-
tooltip: action.tooltip,
|
|
84
|
-
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
85
|
-
}, `${action.id}_${index}`) : null);
|
|
86
|
-
return jsxs("div", Object.assign({
|
|
87
|
-
id: id,
|
|
88
|
-
className: `${css.wrapper}${modalClass}`,
|
|
89
|
-
style: Object.assign(Object.assign({}, modalStyle), cssVars)
|
|
90
|
-
}, rest, {
|
|
91
|
-
children: [ (title || close) && jsxs("div", {
|
|
92
|
-
className: `${css.title} ${css[titleTextSize]}`,
|
|
93
|
-
onPointerDown: onDragPointerDown,
|
|
94
|
-
children: [ jsxs("div", {
|
|
95
|
-
className: css.titleBlock,
|
|
96
|
-
children: [ titleIcon && jsx("div", {
|
|
97
|
-
className: css.titleIcon,
|
|
98
|
-
children: jsx(Icon, {
|
|
99
|
-
name: titleIcon,
|
|
100
|
-
fill: titleIconFill,
|
|
101
|
-
size: 20
|
|
102
|
-
})
|
|
103
|
-
}), title ]
|
|
104
|
-
}), close && jsx("div", {
|
|
105
|
-
className: css.close,
|
|
106
|
-
children: jsx("div", {
|
|
107
|
-
className: css.titleIcon,
|
|
108
|
-
children: jsx(IconButton, {
|
|
109
|
-
tooltip: "close",
|
|
110
|
-
"aria-label": "close",
|
|
111
|
-
icon: "x",
|
|
112
|
-
onClick: () => {
|
|
113
|
-
null == onReject || onReject(new Error("Modal was closed", {
|
|
114
|
-
cause: "user action"
|
|
115
|
-
})), null == onClose || onClose();
|
|
116
|
-
},
|
|
117
|
-
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
118
|
-
})
|
|
119
|
-
})
|
|
120
|
-
}) ]
|
|
121
|
-
}), jsx("div", {
|
|
122
|
-
className: css.contentWrapper,
|
|
123
|
-
ref: contentWrapperRef,
|
|
124
|
-
children: jsx("div", {
|
|
125
|
-
className: `${css.content} ${css[contentTextSize]}`,
|
|
126
|
-
children: children
|
|
127
|
-
})
|
|
128
|
-
}), actions && actions.length > 0 && jsxs("div", {
|
|
129
|
-
className: css.actions,
|
|
130
|
-
onPointerDown: onDragPointerDown,
|
|
131
|
-
children: [ jsx("div", {
|
|
132
|
-
className: css.leftActions,
|
|
133
|
-
children: renderActions("left")
|
|
134
|
-
}), jsx("div", {
|
|
135
|
-
className: css.rightActions,
|
|
136
|
-
children: renderActions("right")
|
|
137
|
-
}) ]
|
|
138
|
-
}) ]
|
|
139
|
-
}));
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
export { Modal as M };
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
import { useDragControls, AnimatePresence, motion } from "motion/react";
|
|
5
|
-
|
|
6
|
-
import { useRef } from "react";
|
|
7
|
-
|
|
8
|
-
import "./microphoneStore-D8VxjdFZ.mjs";
|
|
9
|
-
|
|
10
|
-
import "./volumeStore-hrteUkB-.mjs";
|
|
11
|
-
|
|
12
|
-
import "./webRTCStore-B2ri-_li.mjs";
|
|
13
|
-
|
|
14
|
-
import { O as Overlay } from "./Overlay-D5cMQSvL.mjs";
|
|
15
|
-
|
|
16
|
-
import { u as useModal, a as useModalActions } from "./modalStore-GWNWh1tE.mjs";
|
|
17
|
-
|
|
18
|
-
var css_container = "ModalController-module_container__3cSaO", css_box = "ModalController-module_box__cPzOz", css_wrapper = "ModalController-module_wrapper__HkOoX flexBox-module_row__z24tF";
|
|
19
|
-
|
|
20
|
-
const defaultTransition = {
|
|
21
|
-
ease: "easeOut",
|
|
22
|
-
duration: .25,
|
|
23
|
-
delay: .1
|
|
24
|
-
}, defaultVariants = {
|
|
25
|
-
initial: {
|
|
26
|
-
opacity: 0,
|
|
27
|
-
y: 20
|
|
28
|
-
},
|
|
29
|
-
animate: {
|
|
30
|
-
opacity: 1,
|
|
31
|
-
y: 0
|
|
32
|
-
},
|
|
33
|
-
exit: {
|
|
34
|
-
opacity: 0,
|
|
35
|
-
y: 20
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
function ModalController(props) {
|
|
40
|
-
const {dragConstraintsRef: dragConstraintsRef, transition: transition = defaultTransition, variants: variants = defaultVariants, initial: initial = "initial", animate: animate = "animate", exit: exit = "exit", draggable: draggable = !0, overlayOpacity: overlayOpacity = .7, overlayColor: overlayColor = "rgb(0,0,0)"} = props, controls = useDragControls(), modal = useModal(), resolve = useModalActions().resolve, reject = useModalActions().reject, hide = useModalActions().hide, ModalComponent = null == modal ? void 0 : modal.component, modalProps = null == modal ? void 0 : modal.props, ref = useRef(null), constraints = null != dragConstraintsRef ? dragConstraintsRef : ref;
|
|
41
|
-
return jsxs(Fragment, {
|
|
42
|
-
children: [ jsx(Overlay, {
|
|
43
|
-
show: !!modal,
|
|
44
|
-
type: "dark",
|
|
45
|
-
opacity: overlayOpacity,
|
|
46
|
-
color: overlayColor,
|
|
47
|
-
onClick: () => hide()
|
|
48
|
-
}), jsx(AnimatePresence, {
|
|
49
|
-
children: modal && ModalComponent && jsx("div", {
|
|
50
|
-
className: css_container,
|
|
51
|
-
ref: ref,
|
|
52
|
-
children: jsx("div", {
|
|
53
|
-
className: css_box,
|
|
54
|
-
children: jsx(motion.div, {
|
|
55
|
-
className: css_wrapper,
|
|
56
|
-
variants: variants,
|
|
57
|
-
initial: initial,
|
|
58
|
-
animate: animate,
|
|
59
|
-
exit: exit,
|
|
60
|
-
transition: transition,
|
|
61
|
-
drag: draggable,
|
|
62
|
-
dragListener: !draggable && void 0,
|
|
63
|
-
dragControls: draggable ? controls : void 0,
|
|
64
|
-
dragConstraints: draggable ? constraints : void 0,
|
|
65
|
-
dragElastic: draggable ? 0 : void 0,
|
|
66
|
-
dragMomentum: !draggable && void 0,
|
|
67
|
-
children: jsx(ModalComponent, Object.assign({}, modalProps, {
|
|
68
|
-
onResolve: value => {
|
|
69
|
-
"function" == typeof (null == modalProps ? void 0 : modalProps.onResolve) && modalProps.onResolve(value),
|
|
70
|
-
resolve(value);
|
|
71
|
-
},
|
|
72
|
-
onReject: error => {
|
|
73
|
-
"function" == typeof (null == modalProps ? void 0 : modalProps.onReject) && modalProps.onReject(error),
|
|
74
|
-
reject(error);
|
|
75
|
-
},
|
|
76
|
-
onClose: () => {
|
|
77
|
-
"function" == typeof (null == modalProps ? void 0 : modalProps.onClose) && modalProps.onClose(),
|
|
78
|
-
hide();
|
|
79
|
-
},
|
|
80
|
-
onDragPointerDown: e => {
|
|
81
|
-
"function" == typeof (null == modalProps ? void 0 : modalProps.onDragPointerDown) && (null == modalProps || modalProps.onDragPointerDown(e)),
|
|
82
|
-
controls.start(e);
|
|
83
|
-
}
|
|
84
|
-
}))
|
|
85
|
-
})
|
|
86
|
-
})
|
|
87
|
-
})
|
|
88
|
-
}) ]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export { ModalController as M };
|