@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
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), theme_corners = require("../theme/corners.js"), useAudioVisualizer = require("./useAudioVisualizer-D7bStvIe.js"), misc = require("./misc-PmT7cZzC.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), css_wrapper = "AudioLevel-module_wrapper__0F9Fl", css_barContainer = "AudioLevel-module_barContainer__QV0Vu", css_bar = "AudioLevel-module_bar__889Me";
|
|
5
|
+
|
|
6
|
+
const AudioLevel = React.memo(function(rawProps) {
|
|
7
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {width: width = 100, height: height = 4, gap: gap = 0, audioStream: audioStream, playing: playing = !1, levelName: levelName, minActiveBars: minActiveBars = 0, barCount: barCount = 5, intensity: intensity = 3.5, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, releasePerSeconds: releasePerSeconds = 1.5, borderRadius: borderRadius = theme_corners.corners["corner-xs"], borderColor: borderColor = "transparent", borderWidth: borderWidth = 0, backgroundColorActive: backgroundColorActive = "var(--feedback-positive)", backgroundColor: backgroundColor = "var(--core-surface-primary-tint)"} = props, divAttributes = tslib_es6.__rest(props, [ "width", "height", "gap", "audioStream", "playing", "levelName", "minActiveBars", "barCount", "intensity", "peakIntensity", "risePerSeconds", "releasePerSeconds", "borderRadius", "borderColor", "borderWidth", "backgroundColorActive", "backgroundColor" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", totalBars = Math.min(1e3, Math.max(1, Math.floor(Number.isFinite(barCount) ? barCount : 5))), minBars = Math.max(0, Math.min(Math.floor(Number.isFinite(minActiveBars) ? minActiveBars : 0), totalBars)), [measuredBars, setMeasuredBars] = React.useState(null), activeBars = Math.max(minBars, Math.min(null != measuredBars ? measuredBars : minBars, totalBars)), accessibleName = null == levelName ? void 0 : levelName.trim(), intensityIntervals = React.useMemo(() => Array.from({
|
|
8
|
+
length: totalBars
|
|
9
|
+
}, (_, index) => index), [ totalBars ]), visualizerSettings = React.useMemo(() => ({
|
|
10
|
+
intensityMultiplier: intensity,
|
|
11
|
+
peakIntensity: peakIntensity,
|
|
12
|
+
risePerSecond: risePerSeconds,
|
|
13
|
+
releasePerSecond: releasePerSeconds
|
|
14
|
+
}), [ intensity, peakIntensity, risePerSeconds, releasePerSeconds ]);
|
|
15
|
+
useAudioVisualizer.useAudioVisualizer(audioStream, playing, visualizerSettings, ({intensity: nextIntensity}) => {
|
|
16
|
+
setMeasuredBars(Math.round(minBars + nextIntensity * (totalBars - minBars)));
|
|
17
|
+
}, () => setMeasuredBars(null));
|
|
18
|
+
const cssVars = React.useMemo(() => ({
|
|
19
|
+
"--level-width": misc.setStyle(width),
|
|
20
|
+
"--level-height": misc.setStyle(height),
|
|
21
|
+
"--level-gap": misc.setStyle(gap),
|
|
22
|
+
"--level-bar-border-radius": misc.setStyle(borderRadius),
|
|
23
|
+
"--level-border-color": borderColor,
|
|
24
|
+
"--level-border-width": misc.setStyle(borderWidth),
|
|
25
|
+
"--level-color": backgroundColorActive,
|
|
26
|
+
"--level-bg-color": backgroundColor
|
|
27
|
+
}), [ width, height, gap, borderRadius, borderColor, borderWidth, backgroundColorActive, backgroundColor ]);
|
|
28
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
29
|
+
id: divId,
|
|
30
|
+
className: `${css_wrapper}${divClass}`,
|
|
31
|
+
style: Object.assign(Object.assign({}, cssVars), divStyle)
|
|
32
|
+
}, rest, {
|
|
33
|
+
role: accessibleName ? "meter" : void 0,
|
|
34
|
+
"aria-hidden": !accessibleName || void 0,
|
|
35
|
+
"aria-label": accessibleName || void 0,
|
|
36
|
+
"aria-valuemin": accessibleName ? 0 : void 0,
|
|
37
|
+
"aria-valuemax": accessibleName ? totalBars : void 0,
|
|
38
|
+
"aria-valuenow": accessibleName ? activeBars : void 0,
|
|
39
|
+
children: intensityIntervals.map(barIndex => {
|
|
40
|
+
const isActive = barIndex < activeBars;
|
|
41
|
+
return jsxRuntime.jsx("div", {
|
|
42
|
+
className: css_barContainer,
|
|
43
|
+
children: jsxRuntime.jsx("div", {
|
|
44
|
+
className: css_bar,
|
|
45
|
+
style: {
|
|
46
|
+
opacity: isActive ? 1 : 0
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
}, barIndex);
|
|
50
|
+
})
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
exports.AudioLevel = AudioLevel;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-PmT7cZzC.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js");
|
|
5
|
+
|
|
6
|
+
const AvatarGroupContext = React.createContext(null);
|
|
7
|
+
|
|
8
|
+
var css = {
|
|
9
|
+
wrapper: "Avatar-module_wrapper__ab1D7 flexBox-module_row__z24tF type-module_body-m-regular__LuQBA",
|
|
10
|
+
user: "Avatar-module_user__ZQv0Q flexBox-module_row__z24tF",
|
|
11
|
+
image: "Avatar-module_image__ieqGp",
|
|
12
|
+
xs: "Avatar-module_xs__oSaLL type-module_body-xs-regular__ZAFft",
|
|
13
|
+
s: "Avatar-module_s__lpCvw type-module_body-s-regular__vRHSP",
|
|
14
|
+
m: "Avatar-module_m__WNGhX type-module_body-m-regular__LuQBA",
|
|
15
|
+
l: "Avatar-module_l__jPakz type-module_body-l-regular__lOYbg",
|
|
16
|
+
xl: "Avatar-module_xl__mW58F type-module_body-xl-regular__pF2kC",
|
|
17
|
+
overflowLabel: "Avatar-module_overflowLabel__ufKMl",
|
|
18
|
+
overflow: "Avatar-module_overflow__oNLjK"
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** A new source gets a fresh loading state, including when switching back to an earlier photo. */ function AvatarImage({image: image, lazyLoad: lazyLoad, initials: initials}) {
|
|
22
|
+
const [loaded, setLoaded] = React.useState(!1), syncLoadedImage = React.useCallback(element => {
|
|
23
|
+
(null == element ? void 0 : element.complete) && element.naturalWidth > 0 && setLoaded(!0);
|
|
24
|
+
}, []);
|
|
25
|
+
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
26
|
+
children: [ !loaded && initials, jsxRuntime.jsx("img", {
|
|
27
|
+
ref: syncLoadedImage,
|
|
28
|
+
className: css.image,
|
|
29
|
+
src: image,
|
|
30
|
+
alt: "",
|
|
31
|
+
loading: lazyLoad ? "lazy" : "eager",
|
|
32
|
+
decoding: "async",
|
|
33
|
+
"data-loaded": loaded,
|
|
34
|
+
onLoad: () => setLoaded(!0),
|
|
35
|
+
onError: () => setLoaded(!1)
|
|
36
|
+
}) ]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function AvatarComponent(rawProps) {
|
|
41
|
+
var _a, _b, _c, _d;
|
|
42
|
+
const group = React.useContext(AvatarGroupContext), ownProps = Object.fromEntries(Object.entries(rawProps).filter(([, value]) => void 0 !== value)), props = resolveColorProps.resolveColorProps(group ? Object.assign(Object.assign({}, group.avatarProps), ownProps) : rawProps), {info: info, displayText: displayText, name: name, email: email, image: image = "", lazyLoad: lazyLoad = !1, size: size = 34, textSize: textSize = "m", textColor: textColor, backgroundColor: backgroundColor, borderWidth: borderWidth = 0, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderWidth: outerBorderWidth = 0, outerBorderColor: outerBorderColor, onClick: onClick, onKeyDown: onKeyDown, onToolTip: onToolTip, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur, tabIndex: tabIndex = 0, className: className, style: style} = props, divAttributes = tslib_es6.__rest(props, [ "info", "displayText", "name", "email", "image", "lazyLoad", "size", "textSize", "textColor", "backgroundColor", "borderWidth", "borderColor", "borderColorHover", "outerBorderWidth", "outerBorderColor", "onClick", "onKeyDown", "onToolTip", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "tabIndex", "className", "style" ]), forwardedAttributes = Object.assign({}, divAttributes);
|
|
43
|
+
for (const [key, value] of Object.entries(forwardedAttributes)) key.startsWith("on") && "function" == typeof value && (forwardedAttributes[key] = event => value(event, info));
|
|
44
|
+
const ref = React.useRef(null), hovered = React.useRef(!1), focused = React.useRef(!1), displayName = null !== (_a = null == name ? void 0 : name.trim()) && void 0 !== _a ? _a : "", displayEmail = null !== (_b = null == email ? void 0 : email.trim()) && void 0 !== _b ? _b : "", label = displayName || displayEmail, parts = displayName.split(/\s+/);
|
|
45
|
+
let initials = displayEmail.charAt(0);
|
|
46
|
+
displayName && (initials = parts[0].charAt(0), parts.length > 1 && (initials += parts[parts.length - 1].charAt(0)));
|
|
47
|
+
const avatarVars = {
|
|
48
|
+
"--avatar-size": misc.setStyle(size),
|
|
49
|
+
"--avatar-border": `${borderWidth}px`,
|
|
50
|
+
"--avatar-color": null != textColor ? textColor : "var(--core-text-primary)",
|
|
51
|
+
"--avatar-bg-color": null != backgroundColor ? backgroundColor : "var(--core-surface-secondary)",
|
|
52
|
+
"--avatar-border-color": null != borderColor ? borderColor : "var(--core-surface-primary)",
|
|
53
|
+
"--avatar-border-color-hover": null != borderColorHover ? borderColorHover : "var(--core-link-primary)",
|
|
54
|
+
"--avatar-outer-border-size": `${outerBorderWidth}px`,
|
|
55
|
+
"--avatar-outer-border-color": null != outerBorderColor ? outerBorderColor : "var(--core-surface-primary)",
|
|
56
|
+
"--avatar-cursor": onClick ? "pointer" : "default"
|
|
57
|
+
}, avatar = jsxRuntime.jsx("div", Object.assign({}, forwardedAttributes, {
|
|
58
|
+
ref: ref,
|
|
59
|
+
className: `${css.wrapper}${className ? ` ${className}` : ""}`,
|
|
60
|
+
style: Object.assign(Object.assign({}, style), avatarVars),
|
|
61
|
+
onMouseEnter: event => {
|
|
62
|
+
hovered.current = !0, null == onMouseEnter || onMouseEnter(event, info), null == onToolTip || onToolTip({
|
|
63
|
+
payload: {
|
|
64
|
+
label: label
|
|
65
|
+
},
|
|
66
|
+
ref: ref,
|
|
67
|
+
event: event
|
|
68
|
+
}, info);
|
|
69
|
+
},
|
|
70
|
+
onMouseLeave: event => {
|
|
71
|
+
hovered.current = !1, null == onMouseLeave || onMouseLeave(event, info), focused.current || null == onToolTip || onToolTip(null, info);
|
|
72
|
+
},
|
|
73
|
+
onFocus: event => {
|
|
74
|
+
focused.current = !0, null == onFocus || onFocus(event, info), null == onToolTip || onToolTip({
|
|
75
|
+
payload: {
|
|
76
|
+
label: label
|
|
77
|
+
},
|
|
78
|
+
ref: ref
|
|
79
|
+
}, info);
|
|
80
|
+
},
|
|
81
|
+
onBlur: event => {
|
|
82
|
+
focused.current = !1, null == onBlur || onBlur(event, info), hovered.current || null == onToolTip || onToolTip(null, info);
|
|
83
|
+
},
|
|
84
|
+
onClick: onClick ? event => onClick(event, info) : void 0,
|
|
85
|
+
onKeyDown: event => {
|
|
86
|
+
null == onKeyDown || onKeyDown(event, info), !onClick || event.defaultPrevented || event.repeat || misc.accessibleKeyDown(event, () => event.currentTarget.click());
|
|
87
|
+
},
|
|
88
|
+
role: null !== (_c = divAttributes.role) && void 0 !== _c ? _c : onClick ? "button" : "img",
|
|
89
|
+
tabIndex: onClick ? tabIndex : void 0,
|
|
90
|
+
"aria-label": null !== (_d = divAttributes["aria-label"]) && void 0 !== _d ? _d : `User Avatar - ${label || "Unknown User"}`,
|
|
91
|
+
children: jsxRuntime.jsx("div", {
|
|
92
|
+
"aria-hidden": !0,
|
|
93
|
+
className: `${css.user} ${css[textSize]}`,
|
|
94
|
+
children: image ? jsxRuntime.jsx(AvatarImage, {
|
|
95
|
+
image: image,
|
|
96
|
+
lazyLoad: lazyLoad,
|
|
97
|
+
initials: initials
|
|
98
|
+
}, image) : displayText ? jsxRuntime.jsx("span", {
|
|
99
|
+
className: css.overflowLabel,
|
|
100
|
+
style: {
|
|
101
|
+
"--avatar-label-length": displayText.length
|
|
102
|
+
},
|
|
103
|
+
children: displayText
|
|
104
|
+
}) : initials
|
|
105
|
+
})
|
|
106
|
+
}));
|
|
107
|
+
return group ? jsxRuntime.jsx("div", {
|
|
108
|
+
className: group.itemClassName,
|
|
109
|
+
children: avatar
|
|
110
|
+
}) : avatar;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const Avatar = React.memo(AvatarComponent);
|
|
114
|
+
|
|
115
|
+
/** Internal overflow renderer: shares the avatar's frame, tooltip, and keyboard behavior. */ exports.Avatar = Avatar,
|
|
116
|
+
exports.AvatarGroupContext = AvatarGroupContext, exports.AvatarOverflow = function({count: count, onClick: onClick}) {
|
|
117
|
+
const label = `${count} more ${1 === count ? "avatar" : "avatars"}`;
|
|
118
|
+
return jsxRuntime.jsx(AvatarComponent, {
|
|
119
|
+
className: css.overflow,
|
|
120
|
+
name: label,
|
|
121
|
+
displayText: `+${count}`,
|
|
122
|
+
"aria-label": label,
|
|
123
|
+
onClick: onClick
|
|
124
|
+
});
|
|
125
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), Avatar = require("./Avatar-a2GHmu1o.js"), css_wrapper = "AvatarGroup-module_wrapper__MtOyq flexBox-module_rowStart__4tcxS", css_avatar = "AvatarGroup-module_avatar__5NVpW";
|
|
5
|
+
|
|
6
|
+
function flattenChildren(children, parentKey = "") {
|
|
7
|
+
return React.Children.toArray(children).flatMap(child => {
|
|
8
|
+
if (!React.isValidElement(child)) return [ child ];
|
|
9
|
+
const key = `${parentKey}/${child.key}`;
|
|
10
|
+
return child.type === React.Fragment ? flattenChildren(child.props.children, key) : [ React.cloneElement(child, {
|
|
11
|
+
key: key
|
|
12
|
+
}) ];
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const AvatarGroup = React.memo(rawProps => {
|
|
17
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {avatars: avatars = [], children: children, limit: limit, onMore: onMore, size: size = 40, lazyLoad: lazyLoad = !1, textSize: textSize = "m", borderWidth: borderWidth, backgroundColor: backgroundColor, overlap: overlap = 8, gap: gap = 0, groupName: groupName, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderWidth: outerBorderWidth = 3, outerBorderColor: outerBorderColor = "var(--core-surface-primary)", margin: margin = 0, onToolTip: onToolTip} = props, divAttributes = tslib_es6.__rest(props, [ "avatars", "children", "limit", "onMore", "size", "lazyLoad", "textSize", "borderWidth", "backgroundColor", "overlap", "gap", "groupName", "borderColor", "borderColorHover", "outerBorderWidth", "outerBorderColor", "margin", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), accessibleName = (null == groupName ? void 0 : groupName.trim()) || "people", nativeAttributes = Object.fromEntries(Object.entries(rest).filter(([key]) => "role" !== key && !key.startsWith("aria-"))), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", cssVars = React.useMemo(() => ({
|
|
18
|
+
"--ag-gap": `${null != gap ? gap : 0}px`,
|
|
19
|
+
"--ag-margin": `${null != margin ? margin : 0}px`,
|
|
20
|
+
"--ag-overlap": (overlap > 0 ? -overlap : 0) + "px"
|
|
21
|
+
}), [ overlap, gap, margin ]), context = React.useMemo(() => ({
|
|
22
|
+
itemClassName: css_avatar,
|
|
23
|
+
avatarProps: {
|
|
24
|
+
backgroundColor: backgroundColor,
|
|
25
|
+
size: size,
|
|
26
|
+
lazyLoad: lazyLoad,
|
|
27
|
+
textSize: textSize,
|
|
28
|
+
borderWidth: borderWidth,
|
|
29
|
+
borderColor: borderColor,
|
|
30
|
+
borderColorHover: borderColorHover,
|
|
31
|
+
outerBorderWidth: outerBorderWidth,
|
|
32
|
+
outerBorderColor: outerBorderColor,
|
|
33
|
+
onToolTip: onToolTip
|
|
34
|
+
}
|
|
35
|
+
}), [ backgroundColor, size, lazyLoad, textSize, borderWidth, borderColor, borderColorHover, outerBorderWidth, outerBorderColor, onToolTip ]), allChildren = React.useMemo(() => flattenChildren(children), [ children ]), allAvatars = null != avatars ? avatars : [], itemCount = void 0 !== children ? allChildren.length : allAvatars.length, visibleCount = void 0 !== limit && Number.isFinite(limit) ? Math.max(0, Math.floor(limit)) : itemCount, overflowCount = Math.max(0, itemCount - visibleCount), renderedAvatars = void 0 !== children ? allChildren.slice(0, visibleCount) : allAvatars.slice(0, visibleCount).map((avatar, index) => {
|
|
36
|
+
var _a;
|
|
37
|
+
return jsxRuntime.jsx(Avatar.Avatar, {
|
|
38
|
+
name: [ avatar.first, avatar.last ].filter(Boolean).join(" "),
|
|
39
|
+
email: avatar.email,
|
|
40
|
+
image: avatar.image,
|
|
41
|
+
textColor: avatar.textColor,
|
|
42
|
+
backgroundColor: avatar.backgroundColor
|
|
43
|
+
}, void 0 !== avatar.id ? `id:${avatar.id}` : `fallback:${null !== (_a = avatar.email) && void 0 !== _a ? _a : ""}:${index}`);
|
|
44
|
+
}), classNames = React.useMemo(() => `${css_wrapper}${divClass}`, [ divClass ]);
|
|
45
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
46
|
+
id: divId,
|
|
47
|
+
className: classNames,
|
|
48
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
49
|
+
}, nativeAttributes, {
|
|
50
|
+
role: "group",
|
|
51
|
+
"aria-label": accessibleName,
|
|
52
|
+
children: jsxRuntime.jsxs(Avatar.AvatarGroupContext.Provider, {
|
|
53
|
+
value: context,
|
|
54
|
+
children: [ renderedAvatars, overflowCount > 0 && jsxRuntime.jsx(Avatar.AvatarOverflow, {
|
|
55
|
+
count: overflowCount,
|
|
56
|
+
onClick: onMore ? () => onMore(void 0 !== children ? {
|
|
57
|
+
source: "children",
|
|
58
|
+
more: allChildren.slice(visibleCount),
|
|
59
|
+
all: [ ...allChildren ]
|
|
60
|
+
} : {
|
|
61
|
+
source: "avatars",
|
|
62
|
+
more: allAvatars.slice(visibleCount),
|
|
63
|
+
all: [ ...allAvatars ]
|
|
64
|
+
}) : void 0
|
|
65
|
+
}) ]
|
|
66
|
+
})
|
|
67
|
+
}));
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
exports.AvatarGroup = AvatarGroup;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), css_badge = "Badge-module_badge__RsuMz flexBox-module_row__z24tF type-module_body-xs-medium__s3KvF";
|
|
5
|
+
|
|
6
|
+
const Badge = React.memo(rawProps => {
|
|
7
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {count: count, variant: variant = "dark", hideZero: hideZero = !0, backgroundColor: backgroundColor, textColor: textColor, className: className, style: style} = props, divAttributes = tslib_es6.__rest(props, [ "count", "variant", "hideZero", "backgroundColor", "textColor", "className", "style" ]);
|
|
8
|
+
if (null == count) return null;
|
|
9
|
+
if ("number" == typeof count && (!Number.isFinite(count) || hideZero && 0 === count)) return null;
|
|
10
|
+
if ("string" == typeof count && !count.trim()) return null;
|
|
11
|
+
const displayCount = "number" == typeof count && count > 99 ? "99+" : String(count), cssVars = {
|
|
12
|
+
"--badge-color": null != textColor ? textColor : "light" === variant ? "var(--core-text-primary)" : "var(--core-text-light)",
|
|
13
|
+
"--badge-bg": null != backgroundColor ? backgroundColor : "light" === variant ? "var(--core-badge-secondary)" : "var(--core-badge-primary)"
|
|
14
|
+
};
|
|
15
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
16
|
+
className: `${css_badge}${className ? ` ${className}` : ""}`,
|
|
17
|
+
style: Object.assign(Object.assign({}, style), cssVars),
|
|
18
|
+
role: "status",
|
|
19
|
+
"aria-live": "polite",
|
|
20
|
+
"aria-atomic": "true"
|
|
21
|
+
}, divAttributes, {
|
|
22
|
+
children: displayCount
|
|
23
|
+
}));
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
exports.Badge = Badge;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-PmT7cZzC.js"), theme_corners = require("../theme/corners.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), Badge = require("./Badge-DtVP2qH0.js"), Dot = require("./Dot-0Dv8WX0n.js"), Icon = require("./Icon-COY7IZkK.js"), ProgressIndicator = require("./ProgressIndicator-Ddj5dfEA.js"), sharedTypes = require("./sharedTypes-BDMIewR9.js"), css = {
|
|
5
|
+
button: "Button-module_button__2ZuB7 flexBox-module_row__z24tF",
|
|
6
|
+
label: "Button-module_label__UJ3Zt",
|
|
7
|
+
children: "Button-module_children__7Eljd",
|
|
8
|
+
count: "Button-module_count__DFxVB flexBox-module_row__z24tF",
|
|
9
|
+
icon: "Button-module_icon__-43u5 flexBox-module_row__z24tF",
|
|
10
|
+
xs: "Button-module_xs__cF6m0 type-module_body-xs-regular__ZAFft",
|
|
11
|
+
m: "Button-module_m__DR-gs type-module_body-m-regular__LuQBA",
|
|
12
|
+
l: "Button-module_l__0E0yI type-module_body-l-regular__lOYbg",
|
|
13
|
+
xl: "Button-module_xl__nx4V0 type-module_body-xl-regular__pF2kC",
|
|
14
|
+
s: "Button-module_s__dSKOL type-module_body-s-regular__vRHSP",
|
|
15
|
+
labelHidden: "Button-module_labelHidden__JlWR-",
|
|
16
|
+
centerProgress: "Button-module_centerProgress__IduwZ"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const ButtonComponent = React.forwardRef((rawProps, buttonRef) => {
|
|
20
|
+
const props = resolveColorProps.resolveColorProps(rawProps), {children: children, disabled: disabled = !1, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, onFocus: onFocus, onBlur: onBlur, buttonSize: buttonSize = "m", gap: gap = sharedTypes.buttonStyleDefaults.gap, padding: padding, paddingTop: paddingTop, paddingBottom: paddingBottom, variant: variant = "outline", label: label, textSize: textSize = "m", iconRight: iconRight, iconLeft: iconLeft, iconFill: iconFill = !1, count: count = (void 0 === props.count ? void 0 : Number(props.count)), showDot: showDot, tooltip: tooltip, round: round = !1, state: state = "normal", fill: fill = !1, iconSize: iconSize = (void 0 === props.iconSize ? 20 : Number(props.iconSize)), width: width = "min-content", underline: underline = !1, borderRadius: borderRadius, borderWidth: borderWidth, borderColor: borderColor, iconColor: iconColor, backgroundColor: backgroundColor, backgroundColorDisabled: backgroundColorDisabled, textColor: textColor, transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, paddingRight: paddingRight, paddingLeft: paddingLeft, progress: progress = !1, working: working = !1, duration: duration, trigger: trigger = !1, destructive: destructive = !1, link: link, target: target = "_self", onClick: onClick, onToolTip: onToolTip} = props, divAttributes = tslib_es6.__rest(props, [ "children", "disabled", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur", "buttonSize", "gap", "padding", "paddingTop", "paddingBottom", "variant", "label", "textSize", "iconRight", "iconLeft", "iconFill", "count", "showDot", "tooltip", "round", "state", "fill", "iconSize", "width", "underline", "borderRadius", "borderWidth", "borderColor", "iconColor", "backgroundColor", "backgroundColorDisabled", "textColor", "transition", "variants", "initial", "animate", "exit", "paddingRight", "paddingLeft", "progress", "working", "duration", "trigger", "destructive", "link", "target", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = backgroundColor, resolvedBackgroundColorDisabled = backgroundColorDisabled, [hovered, setHovered] = React.useState(!1), hoveredRef = React.useRef(!1), focusedRef = React.useRef(!1), isDisabled = disabled || "disabled" === state, btnState = isDisabled ? "disabled" : hovered || "hover" === state ? "hover" : "normal", [lockedWidth, setLockedWidth] = React.useState(void 0), [timedWorking, setTimedWorking] = React.useState(!1), playing = working || timedWorking, timer = React.useRef(null), inFlight = React.useRef(!1), wasTriggered = React.useRef(!1), replayTimedTrigger = React.useRef(!1), latestAction = React.useRef({
|
|
21
|
+
onClick: onClick,
|
|
22
|
+
isDisabled: isDisabled,
|
|
23
|
+
working: working
|
|
24
|
+
});
|
|
25
|
+
React.useEffect(() => {
|
|
26
|
+
latestAction.current = {
|
|
27
|
+
onClick: onClick,
|
|
28
|
+
isDisabled: isDisabled,
|
|
29
|
+
working: working
|
|
30
|
+
};
|
|
31
|
+
}, [ onClick, isDisabled, working ]);
|
|
32
|
+
const ref = React.useRef(null), lockCurrentWidth = React.useCallback(() => {
|
|
33
|
+
ref.current && setLockedWidth(ref.current.offsetWidth);
|
|
34
|
+
}, []);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
(isDisabled || working) && null !== timer.current && (clearTimeout(timer.current),
|
|
37
|
+
timer.current = null, inFlight.current = !1, setTimedWorking(!1));
|
|
38
|
+
}, [ isDisabled, working ]), React.useEffect(() => () => {
|
|
39
|
+
replayTimedTrigger.current = null !== timer.current && wasTriggered.current, null !== timer.current && clearTimeout(timer.current),
|
|
40
|
+
timer.current = null, inFlight.current = !1;
|
|
41
|
+
}, []);
|
|
42
|
+
const handleClick = React.useCallback(event => {
|
|
43
|
+
if (!(isDisabled || working || inFlight.current)) {
|
|
44
|
+
if (null == onToolTip || onToolTip(null), progress && void 0 !== duration && Number.isFinite(duration) && duration > 0) return null == event || event.preventDefault(),
|
|
45
|
+
lockCurrentWidth(), inFlight.current = !0, setTimedWorking(!0), void (timer.current = setTimeout(() => {
|
|
46
|
+
var _a, _b;
|
|
47
|
+
timer.current = null, inFlight.current = !1, setTimedWorking(!1), latestAction.current.isDisabled || latestAction.current.working || null === (_b = (_a = latestAction.current).onClick) || void 0 === _b || _b.call(_a, void 0);
|
|
48
|
+
}, 1e3 * duration));
|
|
49
|
+
null == onClick || onClick(event), link && !(null == event ? void 0 : event.defaultPrevented) && void 0 !== globalThis.window && globalThis.window.open(link, target);
|
|
50
|
+
}
|
|
51
|
+
}, [ isDisabled, working, onToolTip, progress, duration, lockCurrentWidth, onClick, link, target ]);
|
|
52
|
+
React.useEffect(() => {
|
|
53
|
+
working && lockCurrentWidth();
|
|
54
|
+
}, [ working, lockCurrentWidth ]), React.useEffect(() => {
|
|
55
|
+
playing || setLockedWidth(void 0);
|
|
56
|
+
}, [ playing ]), React.useImperativeHandle(buttonRef, () => ({
|
|
57
|
+
triggerClick: () => handleClick(void 0)
|
|
58
|
+
}), [ handleClick ]), React.useEffect(() => {
|
|
59
|
+
!trigger || wasTriggered.current && !replayTimedTrigger.current ? trigger || (wasTriggered.current = !1) : (wasTriggered.current = !0,
|
|
60
|
+
replayTimedTrigger.current = !1, handleClick(void 0));
|
|
61
|
+
}, [ trigger, handleClick ]);
|
|
62
|
+
const destructiveColor = React.useCallback(icon => {
|
|
63
|
+
if (icon) {
|
|
64
|
+
if ("disabled" === btnState) return "var(--core-text-disabled)";
|
|
65
|
+
if ("solid" === variant) return "var(--core-text-light)";
|
|
66
|
+
}
|
|
67
|
+
return destructive ? "var(--feedback-warning)" : "var(--core-text-primary)";
|
|
68
|
+
}, [ destructive, variant, btnState ]), solid = React.useMemo(() => ({
|
|
69
|
+
border: "0px",
|
|
70
|
+
iconColor: {
|
|
71
|
+
normal: iconColor || destructiveColor(!0),
|
|
72
|
+
hover: iconColor || destructiveColor(!0),
|
|
73
|
+
disabled: iconColor || destructiveColor(!0)
|
|
74
|
+
},
|
|
75
|
+
background: {
|
|
76
|
+
normal: resolvedBackgroundColor || (destructive ? "var(--feedback-warning)" : "var(--core-button-primary)"),
|
|
77
|
+
hover: resolvedBackgroundColor || (destructive ? "var(--feedback-warning)" : "var(--core-button-primary)"),
|
|
78
|
+
disabled: resolvedBackgroundColorDisabled || "var(--core-button-disabled)"
|
|
79
|
+
},
|
|
80
|
+
borderColor: {
|
|
81
|
+
normal: "transparent",
|
|
82
|
+
hover: "transparent",
|
|
83
|
+
disabled: "transparent"
|
|
84
|
+
},
|
|
85
|
+
color: {
|
|
86
|
+
normal: textColor || (destructive ? "white" : "var(--core-text-light)"),
|
|
87
|
+
hover: textColor || (destructive ? "white" : "var(--core-text-light)"),
|
|
88
|
+
disabled: "var(--core-text-disabled)"
|
|
89
|
+
}
|
|
90
|
+
}), [ textColor, destructive, destructiveColor, resolvedBackgroundColor, resolvedBackgroundColorDisabled, iconColor ]), outline = React.useMemo(() => ({
|
|
91
|
+
border: "1px",
|
|
92
|
+
iconColor: {
|
|
93
|
+
normal: iconColor || destructiveColor(!0),
|
|
94
|
+
hover: iconColor || destructiveColor(!0),
|
|
95
|
+
disabled: iconColor || destructiveColor(!0)
|
|
96
|
+
},
|
|
97
|
+
background: {
|
|
98
|
+
normal: resolvedBackgroundColor || "var(--core-surface-primary)",
|
|
99
|
+
hover: resolvedBackgroundColor || "var(--core-surface-primary)",
|
|
100
|
+
disabled: resolvedBackgroundColorDisabled || "var(--core-surface-primary)"
|
|
101
|
+
},
|
|
102
|
+
borderColor: {
|
|
103
|
+
normal: destructive ? "var(--feedback-warning)" : "var(--core-outline-primary)",
|
|
104
|
+
hover: destructive ? "var(--feedback-warning)" : "var(--core-outline-primary)",
|
|
105
|
+
disabled: "var(--core-outline-primary)"
|
|
106
|
+
},
|
|
107
|
+
color: {
|
|
108
|
+
normal: textColor || (destructive ? "var(--feedback-warning)" : "var(--core-text-primary)"),
|
|
109
|
+
hover: textColor || (destructive ? "var(--feedback-warning)" : "var(--core-text-special)"),
|
|
110
|
+
disabled: "var(--core-text-disabled)"
|
|
111
|
+
}
|
|
112
|
+
}), [ textColor, destructive, destructiveColor, resolvedBackgroundColor, resolvedBackgroundColorDisabled, iconColor ]), text = React.useMemo(() => ({
|
|
113
|
+
border: "1px",
|
|
114
|
+
iconColor: {
|
|
115
|
+
normal: iconColor || destructiveColor(!0),
|
|
116
|
+
hover: iconColor || destructiveColor(!0),
|
|
117
|
+
disabled: iconColor || "var(--core-text-disabled)"
|
|
118
|
+
},
|
|
119
|
+
background: {
|
|
120
|
+
normal: resolvedBackgroundColor || "transparent",
|
|
121
|
+
hover: resolvedBackgroundColor || "transparent",
|
|
122
|
+
disabled: resolvedBackgroundColorDisabled || "transparent"
|
|
123
|
+
},
|
|
124
|
+
borderColor: {
|
|
125
|
+
normal: "transparent",
|
|
126
|
+
hover: "transparent",
|
|
127
|
+
disabled: "transparent"
|
|
128
|
+
},
|
|
129
|
+
color: {
|
|
130
|
+
normal: textColor || destructiveColor(!1),
|
|
131
|
+
hover: textColor || destructiveColor(!1),
|
|
132
|
+
disabled: "var(--core-text-disabled)"
|
|
133
|
+
}
|
|
134
|
+
}), [ destructiveColor, textColor, iconColor, resolvedBackgroundColor, resolvedBackgroundColorDisabled ]), colorStyles = React.useMemo(() => ({
|
|
135
|
+
solid: solid,
|
|
136
|
+
outline: outline,
|
|
137
|
+
text: text
|
|
138
|
+
}), [ solid, outline, text ]), resolvedBorderWidth = misc.setStyle(borderWidth, colorStyles[variant].border), resolvedBorderColor = null != borderColor ? borderColor : colorStyles[variant].borderColor[btnState], autoSize = "auto" === buttonSize, height = autoSize ? "auto" : "number" == typeof buttonSize ? Number.isFinite(buttonSize) && buttonSize > 0 ? buttonSize : sharedTypes.buttonStyleDefaults.sizes.m : null !== (_a = sharedTypes.buttonStyleDefaults.sizes[buttonSize]) && void 0 !== _a ? _a : sharedTypes.buttonStyleDefaults.sizes.m;
|
|
139
|
+
var _a;
|
|
140
|
+
const resolvedGap = Number.isFinite(gap) ? Math.max(0, gap) : sharedTypes.buttonStyleDefaults.gap, hasChildren = null != children, verticalPadding = hasChildren || autoSize ? sharedTypes.buttonStyleDefaults.padding.childrenTop : 0, bottomPadding = hasChildren || autoSize ? sharedTypes.buttonStyleDefaults.padding.childrenBottom : 0, getSidePadding = side => {
|
|
141
|
+
if (void 0 !== padding) return;
|
|
142
|
+
if (round) return 0;
|
|
143
|
+
const base = "text" === variant ? "var(--spacing-xs)" : sharedTypes.buttonStyleDefaults.padding.horizontal;
|
|
144
|
+
return ("left" === side ? iconLeft : iconRight) ? `calc(${base} - var(--spacing-xs))` : base;
|
|
145
|
+
}, roundWidth = autoSize ? `calc(${iconSize + verticalPadding + bottomPadding}px + 2 * ${resolvedBorderWidth})` : height, handleMouseEnter = React.useCallback(event => {
|
|
146
|
+
null == onMouseEnter || onMouseEnter(event), isDisabled || (hoveredRef.current = !0,
|
|
147
|
+
setHovered(!0), tooltip && (null == onToolTip || onToolTip({
|
|
148
|
+
type: sharedTypes.ToolTipType.button,
|
|
149
|
+
payload: {
|
|
150
|
+
label: tooltip
|
|
151
|
+
},
|
|
152
|
+
event: event,
|
|
153
|
+
ref: ref
|
|
154
|
+
})));
|
|
155
|
+
}, [ onMouseEnter, isDisabled, tooltip, onToolTip ]), handleMouseLeave = React.useCallback(event => {
|
|
156
|
+
null == onMouseLeave || onMouseLeave(event), hoveredRef.current = !1, setHovered(!1),
|
|
157
|
+
tooltip && !focusedRef.current && (null == onToolTip || onToolTip(null));
|
|
158
|
+
}, [ onMouseLeave, tooltip, onToolTip ]), handleFocus = React.useCallback(event => {
|
|
159
|
+
null == onFocus || onFocus(event), focusedRef.current = !0, tooltip && !isDisabled && (null == onToolTip || onToolTip({
|
|
160
|
+
type: sharedTypes.ToolTipType.button,
|
|
161
|
+
payload: {
|
|
162
|
+
label: tooltip
|
|
163
|
+
},
|
|
164
|
+
ref: ref
|
|
165
|
+
}));
|
|
166
|
+
}, [ onFocus, tooltip, isDisabled, onToolTip ]), handleBlur = React.useCallback(event => {
|
|
167
|
+
null == onBlur || onBlur(event), focusedRef.current = !1, tooltip && !hoveredRef.current && (null == onToolTip || onToolTip(null));
|
|
168
|
+
}, [ onBlur, tooltip, onToolTip ]), buttonContent = null != children ? children : label, hasContent = null != buttonContent && !1 !== buttonContent && "" !== buttonContent, setStyle = React.useCallback(value => void 0 === value ? "unset" : "number" == typeof value ? `${value}px` : value, []), setWidth = React.useMemo(() => playing && lockedWidth && "min-content" === width ? setStyle(lockedWidth) : "fill" === width ? "100%" : width && "fill" !== width ? setStyle(width) : "min-content", [ playing, lockedWidth, width, setStyle ]), resolvedPaddingRight = null != paddingRight ? paddingRight : getSidePadding("right"), resolvedPaddingLeft = null != paddingLeft ? paddingLeft : getSidePadding("left"), buttonStyle = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
|
|
169
|
+
color: colorStyles[variant].color[btnState],
|
|
170
|
+
backgroundColor: fill && !isDisabled ? "var(--core-surface-primary)" : colorStyles[variant].background[btnState],
|
|
171
|
+
backgroundClip: "padding-box"
|
|
172
|
+
}, void 0 === resolvedPaddingRight ? {} : {
|
|
173
|
+
paddingRight: resolvedPaddingRight
|
|
174
|
+
}), void 0 === resolvedPaddingLeft ? {} : {
|
|
175
|
+
paddingLeft: resolvedPaddingLeft
|
|
176
|
+
}), void 0 === paddingTop ? {} : {
|
|
177
|
+
paddingTop: paddingTop
|
|
178
|
+
}), void 0 === paddingBottom ? {} : {
|
|
179
|
+
paddingBottom: paddingBottom
|
|
180
|
+
}), {
|
|
181
|
+
borderRadius: null != borderRadius ? borderRadius : theme_corners.corners["corner-round"],
|
|
182
|
+
height: height,
|
|
183
|
+
maxHeight: autoSize ? "unset" : height,
|
|
184
|
+
minHeight: autoSize ? 0 : height,
|
|
185
|
+
flex: "fill" === width ? 1 : "unset",
|
|
186
|
+
width: round && "min-content" === width ? roundWidth : setWidth,
|
|
187
|
+
maxWidth: round && "min-content" === width ? "unset" : setWidth,
|
|
188
|
+
minWidth: 0,
|
|
189
|
+
gap: resolvedGap,
|
|
190
|
+
borderWidth: resolvedBorderWidth,
|
|
191
|
+
borderStyle: "solid",
|
|
192
|
+
borderColor: resolvedBorderColor,
|
|
193
|
+
cursor: isDisabled || playing ? "default" : "pointer",
|
|
194
|
+
transition: "all var(--motion-water-duration) var(--motion-water) 0s"
|
|
195
|
+
}), progressColor = React.useMemo(() => destructive ? "var(--feedback-warning)" : colorStyles[variant].color[btnState], [ destructive, colorStyles, variant, btnState ]), iconDivSize = React.useMemo(() => round || iconSize ? setStyle(iconSize) : "unset", [ round, iconSize, setStyle ]), cssVars = React.useMemo(() => ({
|
|
196
|
+
"--ui-button-decoration": underline ? "underline" : "unset",
|
|
197
|
+
"--ui-button-icon-size": iconDivSize,
|
|
198
|
+
"--ui-button-gap": `${resolvedGap}px`,
|
|
199
|
+
"--ui-button-padding": "number" == typeof padding ? `${padding}px` : void 0 !== padding ? padding : round && !autoSize ? "0px" : `${verticalPadding}px 0 ${bottomPadding}px`
|
|
200
|
+
}), [ underline, iconDivSize, resolvedGap, padding, round, autoSize, verticalPadding, bottomPadding ]);
|
|
201
|
+
return jsxRuntime.jsxs(react.motion.button, Object.assign({
|
|
202
|
+
id: divId,
|
|
203
|
+
type: "button",
|
|
204
|
+
className: `${css.button} ${css[textSize]}${divClass}`,
|
|
205
|
+
ref: ref,
|
|
206
|
+
onMouseEnter: handleMouseEnter,
|
|
207
|
+
onMouseLeave: handleMouseLeave,
|
|
208
|
+
onFocus: handleFocus,
|
|
209
|
+
onBlur: handleBlur,
|
|
210
|
+
style: Object.assign(Object.assign(Object.assign({}, divStyle), buttonStyle), cssVars),
|
|
211
|
+
transition: transition,
|
|
212
|
+
variants: variants,
|
|
213
|
+
initial: initial,
|
|
214
|
+
animate: animate,
|
|
215
|
+
exit: exit,
|
|
216
|
+
onClick: e => handleClick(e)
|
|
217
|
+
}, rest, {
|
|
218
|
+
disabled: isDisabled || playing,
|
|
219
|
+
"aria-disabled": isDisabled || playing,
|
|
220
|
+
"aria-busy": playing,
|
|
221
|
+
children: [ !playing && iconLeft && jsxRuntime.jsx("div", {
|
|
222
|
+
className: css.icon,
|
|
223
|
+
"aria-hidden": "true",
|
|
224
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
225
|
+
name: iconLeft,
|
|
226
|
+
size: iconSize,
|
|
227
|
+
strokeColor: colorStyles[variant].iconColor[btnState],
|
|
228
|
+
pointer: !1,
|
|
229
|
+
tabIndex: -1,
|
|
230
|
+
fill: iconFill
|
|
231
|
+
})
|
|
232
|
+
}), playing && iconLeft && jsxRuntime.jsx("div", {
|
|
233
|
+
className: css.icon,
|
|
234
|
+
"aria-hidden": "true",
|
|
235
|
+
children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
236
|
+
decorative: !0,
|
|
237
|
+
show: playing,
|
|
238
|
+
size: iconSize,
|
|
239
|
+
color: progressColor,
|
|
240
|
+
inline: !0
|
|
241
|
+
})
|
|
242
|
+
}), playing && !iconLeft && !iconRight && jsxRuntime.jsx("div", {
|
|
243
|
+
className: css.centerProgress,
|
|
244
|
+
"aria-hidden": "true",
|
|
245
|
+
children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
246
|
+
decorative: !0,
|
|
247
|
+
show: playing,
|
|
248
|
+
size: iconSize,
|
|
249
|
+
color: progressColor,
|
|
250
|
+
inline: !1
|
|
251
|
+
})
|
|
252
|
+
}), hasContent && jsxRuntime.jsx("div", {
|
|
253
|
+
className: `${css.label}${hasChildren ? ` ${css.children}` : ""}${!playing || iconLeft || iconRight ? "" : ` ${css.labelHidden}`}`,
|
|
254
|
+
children: buttonContent
|
|
255
|
+
}), playing && iconRight && jsxRuntime.jsx("div", {
|
|
256
|
+
className: css.icon,
|
|
257
|
+
"aria-hidden": "true",
|
|
258
|
+
children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
259
|
+
decorative: !0,
|
|
260
|
+
show: playing,
|
|
261
|
+
size: iconSize,
|
|
262
|
+
color: progressColor,
|
|
263
|
+
inline: !0
|
|
264
|
+
})
|
|
265
|
+
}), !playing && iconRight && jsxRuntime.jsx("div", {
|
|
266
|
+
className: css.icon,
|
|
267
|
+
"aria-hidden": "true",
|
|
268
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
269
|
+
name: iconRight,
|
|
270
|
+
size: iconSize,
|
|
271
|
+
strokeColor: colorStyles[variant].iconColor[btnState],
|
|
272
|
+
pointer: !1,
|
|
273
|
+
tabIndex: -1,
|
|
274
|
+
fill: iconFill
|
|
275
|
+
})
|
|
276
|
+
}), jsxRuntime.jsx(Dot.Dot, {
|
|
277
|
+
show: !playing && showDot
|
|
278
|
+
}), !playing && void 0 !== count && 0 !== count && jsxRuntime.jsx("div", {
|
|
279
|
+
className: css.count,
|
|
280
|
+
children: jsxRuntime.jsx(Badge.Badge, {
|
|
281
|
+
variant: "light",
|
|
282
|
+
count: count,
|
|
283
|
+
"aria-live": "off"
|
|
284
|
+
})
|
|
285
|
+
}) ]
|
|
286
|
+
}));
|
|
287
|
+
});
|
|
288
|
+
|
|
289
|
+
ButtonComponent.displayName = "Button";
|
|
290
|
+
|
|
291
|
+
const Button = React.memo(ButtonComponent);
|
|
292
|
+
|
|
293
|
+
exports.Button = Button;
|