@apple-pie/slice 0.1.30 → 0.1.32
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 +36 -276
- package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-Dh2IlYW0.js} +3 -5
- package/dist/cjs/chunks/Avatar-WcBAu25_.js +82 -0
- package/dist/cjs/chunks/{AvatarGroup-DhGp_qLw.js → AvatarGroup-eUkVdeTf.js} +1 -3
- package/dist/cjs/chunks/Badge-4tBynWZe.js +22 -0
- package/dist/cjs/chunks/{Button-PsJx1WmV.js → Button-QJ5lsSAz.js} +1 -3
- package/dist/cjs/chunks/{ButtonBar-8zm6a_h7.js → ButtonBar-DcpvT1vD.js} +1 -3
- package/dist/cjs/chunks/{Camera-zFyIXcge.js → Camera-iDyPLq9h.js} +3 -5
- package/dist/cjs/chunks/CheckBox-CmZJd8u2.js +51 -0
- package/dist/cjs/chunks/Chip-Bd1bSYeC.js +77 -0
- package/dist/cjs/chunks/{DivInput-2cMdJQ9U.js → DivInput-BY9pQ6ty.js} +1 -3
- package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-BeWDLajy.js} +1 -3
- package/dist/cjs/chunks/{DrggablePanel-P7TgBI3j.js → DrggablePanel-DzY5wTco.js} +3 -5
- package/dist/cjs/chunks/DropDown-Cn_nX8u7.js +104 -0
- package/dist/cjs/chunks/ErrorSummary-D-0uVwyV.js +85 -0
- package/dist/cjs/chunks/{FileIcon-PuDoz0mF.js → FileIcon-JfY2AYqG.js} +2 -2
- package/dist/cjs/chunks/FileList-Dc1nfpR2.js +222 -0
- package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-B5Pi0-aJ.js} +2 -3
- package/dist/cjs/chunks/Grouper-DKZkTlow.js +61 -0
- package/dist/cjs/chunks/{Icon-BtcHXeqE.js → Icon-BVYVJp9J.js} +4 -7
- package/dist/cjs/chunks/IconButton-CP1Wsvsx.js +82 -0
- package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-CeiVT55Z.js} +1 -1
- package/dist/cjs/chunks/Label-DIs1rOey.js +102 -0
- package/dist/cjs/chunks/Level-3yxetsco.js +58 -0
- package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-BudWFoNw.js} +38 -16
- package/dist/cjs/chunks/Modal-CjpQdoOe.js +127 -0
- package/dist/cjs/chunks/{ModalController-13xmvKnm.js → ModalController-Cp2PXOOS.js} +1 -3
- package/dist/cjs/chunks/{Overlay-GXu6nMnw.js → Overlay-DRpHYZek.js} +1 -3
- package/dist/cjs/chunks/Pager-ChnTKwml.js +36 -0
- package/dist/cjs/chunks/{ProgressIndicator-D06PqCQk.js → ProgressIndicator-CFiAU-aF.js} +2 -6
- package/dist/cjs/chunks/{PromptInput-DuE4vGxR.js → PromptInput-BFWR0TaP.js} +2 -4
- package/dist/cjs/chunks/RadioButton-Bi-FP41j.js +55 -0
- package/dist/cjs/chunks/{RadioButtonList-N7Fmvr5W.js → RadioButtonList-JHPKMCoX.js} +1 -2
- package/dist/cjs/chunks/{Slider-BSy8xciG.js → Slider-D97ws1Cl.js} +1 -3
- package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-DvI2M1wZ.js} +1 -1
- package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-DDSSprb7.js} +1 -2
- package/dist/cjs/chunks/{TabBar-BtFfMwiB.js → TabBar-TllSeSzb.js} +2 -4
- package/dist/cjs/chunks/TextArea-DjZRDixt.js +74 -0
- package/dist/cjs/chunks/{TextField-Bh2EA082.js → TextField-CKA3K0AN.js} +3 -5
- package/dist/cjs/chunks/Tip-BdGXN-TQ.js +88 -0
- package/dist/cjs/chunks/Toast-COrDS_50.js +177 -0
- package/dist/cjs/chunks/ToggleButton-hoOMzBZc.js +39 -0
- package/dist/cjs/chunks/UploadArea-ClG8ZgRZ.js +127 -0
- package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-Brxc2hEv.js} +1 -1
- package/dist/cjs/chunks/WebRTCConnection-eWP4lueC.js +252 -0
- package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-SS_r0C6F.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-DM_8bhFr.js} +27 -4
- package/dist/cjs/chunks/{misc-QpU0XEOW.js → misc-4xyXRU2K.js} +1 -1
- package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Ag-UnuQq.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-Az040BSN.js → uploads-worker-CI-SZptI.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-8mOTz0Qe.js → uploadsStore-DR2hc4ct.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-Pv23v12t.js → volumeStore-DtTHf-9_.js} +5 -4
- package/dist/cjs/chunks/webRTCStore-DWWn7k-0.js +55 -0
- package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BUo9Du_e.js} +1 -1
- package/dist/cjs/components/AudioBubble/index.js +7 -7
- package/dist/cjs/components/Avatar/index.js +3 -4
- package/dist/cjs/components/AvatarGroup/index.js +4 -4
- package/dist/cjs/components/Badge/index.js +3 -3
- package/dist/cjs/components/Button/index.js +7 -8
- package/dist/cjs/components/ButtonBar/index.js +7 -7
- package/dist/cjs/components/Camera/index.js +8 -8
- package/dist/cjs/components/CheckBox/index.js +7 -7
- package/dist/cjs/components/Chip/index.js +7 -8
- package/dist/cjs/components/DivInput/index.js +3 -4
- package/dist/cjs/components/Dot/index.js +3 -3
- package/dist/cjs/components/DraggablePanel/index.js +6 -6
- package/dist/cjs/components/DropDown/index.js +7 -7
- package/dist/cjs/components/ErrorSummary/index.js +6 -7
- package/dist/cjs/components/FileIcon/index.js +6 -7
- package/dist/cjs/components/FileList/index.js +7 -7
- package/dist/cjs/components/FlexDiv/index.js +3 -4
- package/dist/cjs/components/Grouper/index.js +7 -8
- package/dist/cjs/components/Icon/index.js +6 -7
- package/dist/cjs/components/IconButton/index.js +6 -7
- package/dist/cjs/components/Label/index.js +3 -4
- package/dist/cjs/components/Level/index.js +7 -0
- package/dist/cjs/components/Modal/index.js +7 -8
- package/dist/cjs/components/ModalController/index.js +4 -4
- package/dist/cjs/components/Overlay/index.js +3 -3
- package/dist/cjs/components/Pager/index.js +3 -4
- package/dist/cjs/components/Progress/index.js +5 -6
- package/dist/cjs/components/PromptInput/index.js +9 -10
- package/dist/cjs/components/RadioButton/index.js +7 -7
- package/dist/cjs/components/RadioButtonList/index.js +8 -8
- package/dist/cjs/components/Slider/index.js +4 -5
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +9 -9
- package/dist/cjs/components/TextArea/index.js +8 -8
- package/dist/cjs/components/Textfield/index.js +9 -9
- package/dist/cjs/components/Tip/index.js +3 -4
- package/dist/cjs/components/Toast/index.js +7 -8
- package/dist/cjs/components/ToggleButton/index.js +8 -8
- package/dist/cjs/components/UploadArea/index.js +7 -7
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useBindWebRTC.js +60 -0
- package/dist/cjs/hooks/useLocalStore.js +3 -3
- package/dist/cjs/hooks/useMdStreamBuffer.js +55 -30
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useObserveTheme.js +3 -3
- package/dist/cjs/hooks/useTheme.js +2 -3
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +9 -6
- package/dist/cjs/index.js +19 -17
- package/dist/cjs/providers/ThemeProvider.js +6 -17
- package/dist/cjs/providers/themeServer.js +15 -9
- package/dist/cjs/providers.js +4 -5
- package/dist/cjs/stores/LocalDB.js +3 -3
- package/dist/cjs/stores/SSE.js +2 -2
- package/dist/cjs/stores/WS.js +2 -2
- package/dist/cjs/stores/WebRTC.js +9 -0
- package/dist/cjs/stores/microphone.js +5 -4
- package/dist/cjs/stores/modal.js +1 -1
- 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/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +18 -13
- package/dist/cjs/theme/type.js +1 -1
- package/dist/cjs/utils/index.js +4 -3
- package/dist/cjs/utils/objects/index.js +4 -3
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-cYlxxQ7c.mjs} +3 -7
- package/dist/esm/chunks/Avatar-D84wF2os.mjs +88 -0
- package/dist/esm/chunks/{AvatarGroup-C7YRtPmJ.mjs → AvatarGroup-DiwfbRxH.mjs} +2 -6
- package/dist/esm/chunks/Badge-DuUb5-80.mjs +26 -0
- package/dist/esm/chunks/{Button-BQS3rwrS.mjs → Button-BIgwWrPJ.mjs} +6 -10
- package/dist/esm/chunks/{ButtonBar-GLNRjmjv.mjs → ButtonBar-vNvnvw7u.mjs} +3 -7
- package/dist/esm/chunks/{Camera-CAp0Y2gN.mjs → Camera-BMwkTJPq.mjs} +5 -9
- package/dist/esm/chunks/CheckBox-Cpoxy8w_.mjs +61 -0
- package/dist/esm/chunks/Chip-BayNVv7N.mjs +87 -0
- package/dist/esm/chunks/{DivInput-g6F1YWTo.mjs → DivInput-CWRUxy1y.mjs} +2 -6
- package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-v_kcIWV2.mjs} +1 -5
- package/dist/esm/chunks/{DrggablePanel-C0AmJy8g.mjs → DrggablePanel-yEeGeE1w.mjs} +2 -6
- package/dist/esm/chunks/DropDown-QQhwAg_J.mjs +112 -0
- package/dist/esm/chunks/ErrorSummary-DzIZMIll.mjs +90 -0
- package/dist/esm/chunks/{FileIcon-BQ2zZIW5.mjs → FileIcon-6UlkbKzk.mjs} +2 -2
- package/dist/esm/chunks/FileList-vMiGJByw.mjs +230 -0
- package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-B1m7aY04.mjs} +3 -6
- package/dist/esm/chunks/Grouper-BDrAnfDF.mjs +73 -0
- package/dist/esm/chunks/{Icon--RjjODc9.mjs → Icon-D4A6_c4x.mjs} +3 -8
- package/dist/esm/chunks/IconButton-B_W-aOsB.mjs +96 -0
- package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-CTqfKmp1.mjs} +1 -1
- package/dist/esm/chunks/Label-I75yz3gq.mjs +113 -0
- package/dist/esm/chunks/Level-DgczkKBr.mjs +63 -0
- package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-CoQWQwRL.mjs} +38 -16
- package/dist/esm/chunks/Modal-CwwyijaO.mjs +139 -0
- package/dist/esm/chunks/{ModalController-BO5FkAqu.mjs → ModalController-IyB9lDRa.mjs} +2 -6
- package/dist/esm/chunks/{Overlay-sXM7cEYc.mjs → Overlay-C-yori3-.mjs} +1 -5
- package/dist/esm/chunks/Pager-BEtfyKtq.mjs +42 -0
- package/dist/esm/chunks/{ProgressIndicator-B5oByN3i.mjs → ProgressIndicator-BV0ginXb.mjs} +2 -8
- package/dist/esm/chunks/{PromptInput-Cwd53ux7.mjs → PromptInput-Cn5fRYap.mjs} +3 -7
- package/dist/esm/chunks/RadioButton-DWlg6ldv.mjs +63 -0
- package/dist/esm/chunks/{RadioButtonList-C_heuiis.mjs → RadioButtonList-D9FdlhPL.mjs} +3 -6
- package/dist/esm/chunks/{Slider-XEV0D2Rd.mjs → Slider-B2WZkZSg.mjs} +3 -7
- package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-7Oj0SlD0.mjs} +1 -1
- package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DRhnznnO.mjs} +1 -4
- package/dist/esm/chunks/{TabBar-kPZ6ZJxr.mjs → TabBar-D6VR71ye.mjs} +5 -9
- package/dist/esm/chunks/TextArea-CkB5rJjI.mjs +80 -0
- package/dist/esm/chunks/{TextField-DwVKlLI_.mjs → TextField-BIXmkjEz.mjs} +5 -9
- package/dist/esm/chunks/Tip-CTdrwLky.mjs +96 -0
- package/dist/esm/chunks/Toast-8bUziIgh.mjs +189 -0
- package/dist/esm/chunks/ToggleButton-BOFITa8_.mjs +47 -0
- package/dist/esm/chunks/UploadArea-DE2ccDVx.mjs +135 -0
- package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-CHudrD62.mjs} +1 -1
- package/dist/esm/chunks/WebRTCConnection-DQbNa7Z9.mjs +252 -0
- package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-CaYiqITY.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-COEGtgyX.mjs} +26 -3
- package/dist/esm/chunks/{misc-wS74txaa.mjs → misc-2MIIqzsX.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-nW9CMec_.mjs} +2 -2
- package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-C81Qhn1z.mjs} +1 -1
- package/dist/esm/chunks/{uploads-worker-CYp-F4dz.mjs → uploads-worker-CMomtRvm.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-DeRMJ5c9.mjs → uploadsStore-CsfpSOTS.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-BX7QcrL-.mjs → volumeStore-TSYPqbHx.mjs} +5 -4
- package/dist/esm/chunks/webRTCStore-CVCDJzj5.mjs +57 -0
- package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-BvejIR82.mjs} +1 -1
- package/dist/esm/components/AudioBubble/index.mjs +4 -6
- package/dist/esm/components/Avatar/index.mjs +3 -5
- package/dist/esm/components/AvatarGroup/index.mjs +4 -6
- package/dist/esm/components/Badge/index.mjs +2 -4
- package/dist/esm/components/Button/index.mjs +8 -10
- package/dist/esm/components/ButtonBar/index.mjs +4 -6
- package/dist/esm/components/Camera/index.mjs +6 -8
- package/dist/esm/components/CheckBox/index.mjs +4 -6
- package/dist/esm/components/Chip/index.mjs +5 -7
- package/dist/esm/components/DivInput/index.mjs +3 -5
- package/dist/esm/components/Dot/index.mjs +2 -4
- package/dist/esm/components/DraggablePanel/index.mjs +3 -5
- package/dist/esm/components/DropDown/index.mjs +4 -6
- package/dist/esm/components/ErrorSummary/index.mjs +3 -5
- package/dist/esm/components/FileIcon/index.mjs +3 -5
- package/dist/esm/components/FileList/index.mjs +6 -8
- package/dist/esm/components/FlexDiv/index.mjs +2 -4
- package/dist/esm/components/Grouper/index.mjs +5 -7
- package/dist/esm/components/Icon/index.mjs +4 -6
- package/dist/esm/components/IconButton/index.mjs +7 -9
- package/dist/esm/components/Label/index.mjs +3 -5
- package/dist/esm/components/Level/index.mjs +11 -0
- package/dist/esm/components/Modal/index.mjs +10 -12
- package/dist/esm/components/ModalController/index.mjs +4 -6
- package/dist/esm/components/Overlay/index.mjs +2 -4
- package/dist/esm/components/Pager/index.mjs +3 -5
- package/dist/esm/components/Progress/index.mjs +4 -6
- package/dist/esm/components/PromptInput/index.mjs +11 -13
- package/dist/esm/components/RadioButton/index.mjs +4 -6
- package/dist/esm/components/RadioButtonList/index.mjs +5 -7
- package/dist/esm/components/Slider/index.mjs +4 -6
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -4
- package/dist/esm/components/TabBar/index.mjs +8 -10
- package/dist/esm/components/TextArea/index.mjs +9 -11
- package/dist/esm/components/Textfield/index.mjs +10 -12
- package/dist/esm/components/Tip/index.mjs +3 -5
- package/dist/esm/components/Toast/index.mjs +5 -7
- package/dist/esm/components/ToggleButton/index.mjs +9 -11
- package/dist/esm/components/UploadArea/index.mjs +9 -11
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useBindWebRTC.mjs +72 -0
- package/dist/esm/hooks/useLocalStore.mjs +3 -3
- package/dist/esm/hooks/useMdStreamBuffer.mjs +56 -28
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useObserveTheme.mjs +0 -2
- package/dist/esm/hooks/useTheme.mjs +0 -2
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +14 -4
- package/dist/esm/index.mjs +62 -52
- package/dist/esm/providers/ThemeProvider.mjs +6 -19
- package/dist/esm/providers/themeServer.mjs +11 -6
- package/dist/esm/providers.mjs +0 -2
- package/dist/esm/stores/LocalDB.mjs +3 -3
- package/dist/esm/stores/SSE.mjs +3 -3
- package/dist/esm/stores/WS.mjs +2 -2
- package/dist/esm/stores/WebRTC.mjs +7 -0
- package/dist/esm/stores/microphone.mjs +2 -2
- package/dist/esm/stores/modal.mjs +1 -1
- 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/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +17 -13
- package/dist/esm/theme/type.mjs +1 -1
- package/dist/esm/utils/index.mjs +11 -9
- package/dist/esm/utils/objects/index.mjs +8 -6
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +8476 -0
- package/dist/types/components/Level/Level.d.ts +5 -0
- package/dist/types/components/Level/_types.d.ts +21 -0
- package/dist/types/components/Level/index.d.ts +2 -0
- package/dist/types/components/Modal/_types.d.ts +4 -0
- package/dist/types/components/Toast/_types.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useBindWebRTC/index.d.ts +1 -0
- package/dist/types/hooks/useBindWebRTC/useBindWebRTC.d.ts +15 -0
- package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -1
- package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +6 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/providers/ThemeProvider.d.ts +1 -6
- package/dist/types/providers/themeServer.d.ts +7 -3
- package/dist/types/stores/WebRTC/_types.d.ts +16 -0
- package/dist/types/stores/WebRTC/index.d.ts +2 -0
- package/dist/types/stores/WebRTC/webRTCStore.d.ts +21 -0
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/microphone/index.d.ts +1 -1
- package/dist/types/stores/microphone/microphoneStore.d.ts +14 -1
- package/dist/types/stores/toast/_types.d.ts +1 -0
- package/dist/types/stores/volume/_types.d.ts +3 -1
- package/dist/types/stores/volume/volumeStore.d.ts +6 -2
- package/dist/types/utils/functions/files.d.ts +1 -1
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +10 -0
- package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +2 -0
- package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +37 -3
- package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +13 -4
- package/dist/types/utils/objects/index.d.ts +2 -0
- package/package.json +8 -3
- package/dist/cjs/chunks/Avatar-CqUSRzVd.js +0 -84
- package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
- package/dist/cjs/chunks/CheckBox-Cbh6UK-7.js +0 -53
- package/dist/cjs/chunks/Chip-DcS8dtW2.js +0 -79
- package/dist/cjs/chunks/DropDown-B0970yVe.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
- package/dist/cjs/chunks/FileList-sDq1jK0b.js +0 -225
- package/dist/cjs/chunks/Grouper-Ccd-x_Nb.js +0 -63
- package/dist/cjs/chunks/IconButton-CF4cR7Tr.js +0 -84
- package/dist/cjs/chunks/Label-htjXHiQ4.js +0 -103
- package/dist/cjs/chunks/Modal-C0Z59meI.js +0 -101
- package/dist/cjs/chunks/Pager-D2_fshTy.js +0 -38
- package/dist/cjs/chunks/RadioButton-DPB2ZGVf.js +0 -56
- package/dist/cjs/chunks/TextArea-CRiPRF8v.js +0 -76
- package/dist/cjs/chunks/Tip-C5keUoHx.js +0 -90
- package/dist/cjs/chunks/Toast-CyiFOsI3.js +0 -178
- package/dist/cjs/chunks/ToggleButton-D5_WnW0o.js +0 -40
- package/dist/cjs/chunks/UploadArea-KqES_OLl.js +0 -129
- package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
- package/dist/esm/chunks/Avatar-29zhNfxX.mjs +0 -92
- package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
- package/dist/esm/chunks/CheckBox-7TiT2U47.mjs +0 -65
- package/dist/esm/chunks/Chip-CKsojimU.mjs +0 -91
- package/dist/esm/chunks/DropDown-mwo8fY7p.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
- package/dist/esm/chunks/FileList-fh-x9Dzm.mjs +0 -235
- package/dist/esm/chunks/Grouper-naJMvpB9.mjs +0 -77
- package/dist/esm/chunks/IconButton-ByBYppAj.mjs +0 -100
- package/dist/esm/chunks/Label-C04tD7UZ.mjs +0 -116
- package/dist/esm/chunks/Modal-B9ad9OfJ.mjs +0 -115
- package/dist/esm/chunks/Pager-Bz0FpgO5.mjs +0 -46
- package/dist/esm/chunks/RadioButton-CLeRiZ8x.mjs +0 -66
- package/dist/esm/chunks/TextArea-CxscPLwN.mjs +0 -84
- package/dist/esm/chunks/Tip-C6EcX7_M.mjs +0 -100
- package/dist/esm/chunks/Toast-D4uMNvaa.mjs +0 -192
- package/dist/esm/chunks/ToggleButton-C0QIflzX.mjs +0 -51
- package/dist/esm/chunks/UploadArea-je-1NhGb.mjs +0 -139
- package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
- /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-DfjLAlOG.js} +0 -0
- /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-DMyBIF8s.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-BxPvUj4h.js} +0 -0
- /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-4n0sNFRA.js} +0 -0
- /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-_IK-La-Z.js} +0 -0
- /package/dist/cjs/chunks/{modalStore-7VjHHM8X.js → modalStore-CFsfK3ba.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-C0ZHzH_T.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-dqD9-c30.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-BN1N7WXv.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-DsF7Wv4Y.js} +0 -0
- /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-iFKOV9Uo.mjs} +0 -0
- /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-DrNviSG6.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BsmpLZyK.mjs} +0 -0
- /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-BAATtfbL.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-CYBH5qXQ.mjs} +0 -0
- /package/dist/esm/chunks/{modalStore-BpWnLtOF.mjs → modalStore-DmaeMv7z.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-CyrInj1b.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-B_MUZfr2.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-DAprlBVj.mjs} +0 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import React, { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
7
|
+
|
|
8
|
+
import { s as setStyle } from "./misc-2MIIqzsX.mjs";
|
|
9
|
+
|
|
10
|
+
import { I as Icon } from "./Icon-D4A6_c4x.mjs";
|
|
11
|
+
|
|
12
|
+
var css = {
|
|
13
|
+
wrapper: "DropDown-module_wrapper__CyX0u flexBox-module_rowStart__4tcxS",
|
|
14
|
+
face: "DropDown-module_face__6gyF3 flexBox-module_rowStart__4tcxS",
|
|
15
|
+
faceText: "DropDown-module_faceText__glhB3",
|
|
16
|
+
label: "DropDown-module_label__Mrwbp flexBox-module_rowStart__4tcxS",
|
|
17
|
+
xs: "DropDown-module_xs__7L71q type-module_body-xs-regular__ZAFft",
|
|
18
|
+
s: "DropDown-module_s__vAxXD type-module_body-s-regular__vRHSP",
|
|
19
|
+
m: "DropDown-module_m__K6JPk type-module_body-m-regular__LuQBA",
|
|
20
|
+
l: "DropDown-module_l__Kib48 type-module_body-l-regular__lOYbg",
|
|
21
|
+
chevron: "DropDown-module_chevron__LkYsE flexBox-module_rowStart__4tcxS",
|
|
22
|
+
select: "DropDown-module_select__mzNnv"
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
function resolveValueKey(value, valueKey) {
|
|
26
|
+
if (valueKey && value && "object" == typeof value) return value[valueKey];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function DropDownComponent(props) {
|
|
30
|
+
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", inline: inline = !1, selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 8, backgroundColor: backgroundColor = "var(--core-surface-secondary)", bgColor: bgColor = "var(--core-surface-secondary)", iconColor: iconColor = "var(--core-text-primary)", textColor: textColor = "var(--core-text-primary)", borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", paddingLeft: paddingLeft = "10px", paddingRight: paddingRight = "8px", paddingTop: paddingTop = "8px", paddingBottom: paddingBottom = "8px", borderStyle: borderStyle = "box", iconSize: iconSize = 20, disabled: disabled = !1, error: error = !1, gap: gap = 8, onChange: onChange = () => null, onOption: onOption = () => null} = props, divAttributes = __rest(props, [ "name", "label", "labelColor", "size", "width", "height", "inline", "selectedIndex", "selectedValue", "valueKey", "options", "placeholder", "borderRadius", "backgroundColor", "bgColor", "iconColor", "textColor", "borderWidth", "borderSize", "borderColor", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderStyle", "iconSize", "disabled", "error", "gap", "onChange", "onOption" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, [index, setIndex] = useState(null != selectedIndex ? selectedIndex : 0), [selectedText, setSelectedText] = useState("Select an option"), ref = useRef(null);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (null == selectedValue && void 0 !== selectedIndex && (null == ref ? void 0 : ref.current)) {
|
|
33
|
+
if (!(null == options ? void 0 : options[selectedIndex])) return;
|
|
34
|
+
const label = options[selectedIndex].label || "Select an option";
|
|
35
|
+
setIndex(selectedIndex), setSelectedText(label), ref.current.selectedIndex = selectedIndex;
|
|
36
|
+
}
|
|
37
|
+
}, [ selectedIndex, options, selectedValue ]), useEffect(() => {
|
|
38
|
+
if (!options || 0 === options.length || null == selectedValue) return;
|
|
39
|
+
const selectedKey = resolveValueKey(selectedValue, valueKey), foundIndex = options.findIndex(option => {
|
|
40
|
+
var _a, _b;
|
|
41
|
+
return (null == option ? void 0 : option.value) === selectedValue || void 0 !== selectedKey && resolveValueKey(null == option ? void 0 : option.value, valueKey) === selectedKey || (null === (_a = null == option ? void 0 : option.label) || void 0 === _a ? void 0 : _a.toLowerCase()) === String(selectedValue).toLowerCase() || (null === (_b = null == option ? void 0 : option.alt) || void 0 === _b ? void 0 : _b.toLowerCase()) === String(selectedValue).toLowerCase();
|
|
42
|
+
});
|
|
43
|
+
if (-1 !== foundIndex) {
|
|
44
|
+
const label = options[foundIndex].label || "Select an option";
|
|
45
|
+
setSelectedText(label), setIndex(foundIndex), ref.current && (ref.current.selectedIndex = foundIndex);
|
|
46
|
+
}
|
|
47
|
+
}, [ selectedValue, options, valueKey ]);
|
|
48
|
+
const handleChange = useCallback(i => {
|
|
49
|
+
if (!options) return;
|
|
50
|
+
const label = options[i].label || "Select an option";
|
|
51
|
+
setIndex(i), setSelectedText(label), index !== i && (onChange(i, options[i]), onOption(options[i]));
|
|
52
|
+
}, [ options, index, onChange, onOption ]), renderedOptions = useMemo(() => options ? options.map((option, i) => jsx("option", {
|
|
53
|
+
value: i,
|
|
54
|
+
onMouseUp: () => handleChange(i),
|
|
55
|
+
children: null == option ? void 0 : option.label
|
|
56
|
+
}, `${null == option ? void 0 : option.value}_${i}`)) : null, [ options, handleChange ]), displayText = useMemo(() => selectedText.replace("-- ", ""), [ selectedText ]), handleMouseDown = useCallback(e => {
|
|
57
|
+
disabled && e.preventDefault();
|
|
58
|
+
}, [ disabled ]), handleSelectChange = useCallback(e => {
|
|
59
|
+
handleChange(e.target.selectedIndex);
|
|
60
|
+
}, [ handleChange ]), setTextColor = useMemo(() => disabled ? "var(--core-text-disabled)" : placeholder && 0 === index ? "var(--core-text-tertiary)" : textColor, [ disabled, placeholder, index, textColor ]), setLabelColor = useMemo(() => disabled ? "var(--core-text-disabled)" : labelColor, [ disabled, labelColor ]), setIconColor = useMemo(() => disabled ? "var(--core-text-disabled)" : iconColor, [ disabled, iconColor ]), setBorderColor = useMemo(() => disabled ? "var(--core-outline-primary)" : error ? "var(--feedback-warning)" : borderColor, [ disabled, error, borderColor ]), setPadding = useMemo(() => "box" === borderStyle ? `${setStyle(paddingTop)} ${setStyle(paddingRight)} ${setStyle(paddingBottom)} ${setStyle(paddingLeft)}` : `0 0 ${setStyle(paddingBottom)} 0`, [ paddingTop, paddingRight, paddingBottom, paddingLeft, borderStyle ]), setBorder = useMemo(() => "box" === borderStyle ? `${setStyle(resolvedBorderWidth)} solid ${setBorderColor}` : "unset", [ resolvedBorderWidth, setBorderColor, borderStyle ]), setBorderBottom = useMemo(() => "none" !== borderStyle ? `${setStyle(resolvedBorderWidth)} solid ${setStyle(borderColor)}` : "unset", [ resolvedBorderWidth, borderColor, borderStyle ]), setBorderRadius = useMemo(() => "box" !== borderStyle ? 0 : `${borderRadius}px`, [ borderStyle, borderRadius ]), cssVars = useMemo(() => ({
|
|
61
|
+
"--dd-gap": setStyle(gap),
|
|
62
|
+
"--dd-height": setStyle(height),
|
|
63
|
+
"--dd-width": setStyle(width),
|
|
64
|
+
"--dd-margin": inline ? "0 4px" : "0",
|
|
65
|
+
"--dd-border-radius": setBorderRadius,
|
|
66
|
+
"--dd-border": setBorder,
|
|
67
|
+
"--dd-border-bottom": setBorderBottom,
|
|
68
|
+
"--dd-color": setTextColor,
|
|
69
|
+
"--dd-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "transparent",
|
|
70
|
+
"--dd-padding": setPadding,
|
|
71
|
+
"--dd-icon-size": `${iconSize}px`,
|
|
72
|
+
"--dd-label-color": setLabelColor,
|
|
73
|
+
"--dd-display": inline ? "inline-flex" : "flex"
|
|
74
|
+
}), [ gap, height, width, setBorderRadius, setBorder, setBorderBottom, setTextColor, resolvedBackgroundColor, setPadding, setLabelColor, iconSize, inline ]);
|
|
75
|
+
return jsxs("span", Object.assign({
|
|
76
|
+
id: divId,
|
|
77
|
+
className: `${css.wrapper}${divClass}`,
|
|
78
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
79
|
+
}, rest, {
|
|
80
|
+
children: [ label && jsx("span", {
|
|
81
|
+
className: `${css.label} ${css[size]}`,
|
|
82
|
+
children: label
|
|
83
|
+
}), jsx("span", {
|
|
84
|
+
className: `${css.face} ${css[size]}`,
|
|
85
|
+
children: jsx("span", {
|
|
86
|
+
className: css.faceText,
|
|
87
|
+
children: displayText
|
|
88
|
+
})
|
|
89
|
+
}), jsx("span", {
|
|
90
|
+
className: css.chevron,
|
|
91
|
+
children: jsx(Icon, {
|
|
92
|
+
name: "chevron down",
|
|
93
|
+
size: iconSize,
|
|
94
|
+
strokeColor: setIconColor
|
|
95
|
+
})
|
|
96
|
+
}), jsx("select", {
|
|
97
|
+
className: css.select,
|
|
98
|
+
value: index,
|
|
99
|
+
ref: ref,
|
|
100
|
+
onMouseDown: handleMouseDown,
|
|
101
|
+
onChange: handleSelectChange,
|
|
102
|
+
"aria-label": name,
|
|
103
|
+
children: renderedOptions
|
|
104
|
+
}) ]
|
|
105
|
+
}));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
DropDownComponent.displayName = "DropDown";
|
|
109
|
+
|
|
110
|
+
const DropDown = React.memo(DropDownComponent);
|
|
111
|
+
|
|
112
|
+
export { DropDown as D };
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import React, { useMemo, useCallback } from "react";
|
|
9
|
+
|
|
10
|
+
import { useTheme } from "../hooks/useTheme.mjs";
|
|
11
|
+
|
|
12
|
+
import "../theme/colors.mjs";
|
|
13
|
+
|
|
14
|
+
import { a as addOpacity } from "./colors-BAATtfbL.mjs";
|
|
15
|
+
|
|
16
|
+
import "../hooks/useWindow.mjs";
|
|
17
|
+
|
|
18
|
+
var css = {
|
|
19
|
+
errorBox: "ErrorSummary-module_errorBox__hjY50 flexBox-module_columnStart__C7P44",
|
|
20
|
+
error: "ErrorSummary-module_error__QX1mr flexBox-module_columnStart__C7P44",
|
|
21
|
+
p: "ErrorSummary-module_p__N-2Po",
|
|
22
|
+
ul: "ErrorSummary-module_ul__Xv0K7",
|
|
23
|
+
li: "ErrorSummary-module_li__0ciEx",
|
|
24
|
+
xs: "ErrorSummary-module_xs__pTqMn type-module_body-xs-regular__ZAFft",
|
|
25
|
+
s: "ErrorSummary-module_s__u2sIP type-module_body-s-regular__vRHSP",
|
|
26
|
+
m: "ErrorSummary-module_m__-QyP- type-module_body-m-regular__LuQBA",
|
|
27
|
+
l: "ErrorSummary-module_l__bb1xZ type-module_body-l-regular__lOYbg"
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const ErrorSummary = React.memo(props => {
|
|
31
|
+
const {current: current} = useTheme(), warning = current.colors["feedback-warning"], bg = addOpacity(warning, .1), {entries: entries, textSize: textSize = "m", textColor: textColor = warning, backgroundColor: backgroundColor, bgColor: bgColor = bg, autoNumber: autoNumber = !0} = props, divAttributes = __rest(props, [ "entries", "textSize", "textColor", "backgroundColor", "bgColor", "autoNumber" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, variants = useMemo(() => ({
|
|
32
|
+
enter: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
maxHeight: 0
|
|
35
|
+
},
|
|
36
|
+
animate: {
|
|
37
|
+
opacity: 1,
|
|
38
|
+
maxHeight: 500
|
|
39
|
+
},
|
|
40
|
+
exit: {
|
|
41
|
+
opacity: 0,
|
|
42
|
+
maxHeight: 0
|
|
43
|
+
}
|
|
44
|
+
}), []), transition = useMemo(() => ({
|
|
45
|
+
ease: "easeInOut",
|
|
46
|
+
duration: .25
|
|
47
|
+
}), []), renderMessages = useCallback(messages => messages ? messages.map(message => jsx("li", {
|
|
48
|
+
className: `${css.li} ${css[textSize]}`,
|
|
49
|
+
children: message
|
|
50
|
+
}, message)) : null, [ textSize ]), renderedErrors = useMemo(() => {
|
|
51
|
+
if (!entries) return null;
|
|
52
|
+
const addNumbers = autoNumber && entries.length > 1;
|
|
53
|
+
return entries.map((error, index) => {
|
|
54
|
+
let messages;
|
|
55
|
+
error.message && (messages = Array.isArray(error.message) ? error.message : [ error.message ]);
|
|
56
|
+
return jsxs("div", {
|
|
57
|
+
className: css.error,
|
|
58
|
+
children: [ jsx("p", {
|
|
59
|
+
className: `${css.p} ${css[textSize]}`,
|
|
60
|
+
children: jsx("strong", {
|
|
61
|
+
children: `${addNumbers ? `${index + 1}. ` : ""}${error.title}`
|
|
62
|
+
})
|
|
63
|
+
}), messages && jsx("ul", {
|
|
64
|
+
className: css.ul,
|
|
65
|
+
children: renderMessages(messages)
|
|
66
|
+
}) ]
|
|
67
|
+
}, `${error.title}_${index}`);
|
|
68
|
+
});
|
|
69
|
+
}, [ entries, autoNumber, renderMessages, textSize ]), cssVars = useMemo(() => ({
|
|
70
|
+
"--error-text-color": textColor,
|
|
71
|
+
"--error-bg-color": resolvedBackgroundColor
|
|
72
|
+
}), [ textColor, resolvedBackgroundColor ]);
|
|
73
|
+
return jsx(AnimatePresence, {
|
|
74
|
+
initial: !1,
|
|
75
|
+
children: entries && entries.length > 0 && jsx(motion.div, Object.assign({
|
|
76
|
+
id: divId,
|
|
77
|
+
className: `${css.errorBox}${divClass}`,
|
|
78
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
79
|
+
initial: "enter",
|
|
80
|
+
animate: "animate",
|
|
81
|
+
exit: "exit",
|
|
82
|
+
variants: variants,
|
|
83
|
+
transition: transition
|
|
84
|
+
}, rest, {
|
|
85
|
+
children: renderedErrors
|
|
86
|
+
}))
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export { ErrorSummary as E };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
3
|
|
|
4
4
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ import { useTheme } from "../hooks/useTheme.mjs";
|
|
|
9
9
|
|
|
10
10
|
import "../theme/colors.mjs";
|
|
11
11
|
|
|
12
|
-
import { a as accessibleKeyDown } from "./misc-
|
|
12
|
+
import { a as accessibleKeyDown } from "./misc-2MIIqzsX.mjs";
|
|
13
13
|
|
|
14
14
|
import "../hooks/useWindow.mjs";
|
|
15
15
|
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import React, { useCallback, useMemo } from "react";
|
|
7
|
+
|
|
8
|
+
import { s as setStyle, a as accessibleKeyDown } from "./misc-2MIIqzsX.mjs";
|
|
9
|
+
|
|
10
|
+
import { F as FileIcon } from "./FileIcon-6UlkbKzk.mjs";
|
|
11
|
+
|
|
12
|
+
import { I as Icon } from "./Icon-D4A6_c4x.mjs";
|
|
13
|
+
|
|
14
|
+
import { P as ProgressIndicator } from "./ProgressIndicator-BV0ginXb.mjs";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Split a file name into its display name and extension.
|
|
18
|
+
*/ var css = {
|
|
19
|
+
wrapper: "FileList-module_wrapper__9-rrl flexBox-module_rowStart__4tcxS",
|
|
20
|
+
file: "FileList-module_file__61dkh flexBox-module_rowStart__4tcxS",
|
|
21
|
+
fileName: "FileList-module_fileName__amame flexBox-module_row__z24tF",
|
|
22
|
+
meta: "FileList-module_meta__unbpG flexBox-module_columnStart__C7P44",
|
|
23
|
+
status: "FileList-module_status__H1s6f type-module_body-xs-regular__ZAFft",
|
|
24
|
+
error: "FileList-module_error__UZ4-T",
|
|
25
|
+
fileIcon: "FileList-module_fileIcon__xDWW8 flexBox-module_row__z24tF",
|
|
26
|
+
icon: "FileList-module_icon__JR0HE flexBox-module_row__z24tF",
|
|
27
|
+
xs: "FileList-module_xs__i2S-5 type-module_body-xs-regular__ZAFft",
|
|
28
|
+
s: "FileList-module_s__4q0ae type-module_body-s-regular__vRHSP",
|
|
29
|
+
m: "FileList-module_m__hWqBx type-module_body-m-regular__LuQBA",
|
|
30
|
+
l: "FileList-module_l__tHDNp type-module_body-l-regular__lOYbg",
|
|
31
|
+
xl: "FileList-module_xl__fxW11 type-module_body-xl-regular__pF2kC"
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* utility get file name from file item
|
|
36
|
+
*/
|
|
37
|
+
/**
|
|
38
|
+
* display the remove button if not uploading
|
|
39
|
+
*/
|
|
40
|
+
function displayClose(uploading) {
|
|
41
|
+
return uploading ? {
|
|
42
|
+
display: "none"
|
|
43
|
+
} : {
|
|
44
|
+
display: "flex"
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const FileList = React.memo(props => {
|
|
49
|
+
const {files: files = [], onChange: onChange, onToolTip: onToolTip, maxWidth: maxWidth, minWidth: minWidth, direction: direction = "row", padding: padding, gap: gap = 10, size: size = "s", iconSize: iconSize = 24, backgroundColor: backgroundColor, bgColor: bgColor, canRemove: canRemove = !0} = props, divAttributes = __rest(props, [ "files", "onChange", "onToolTip", "maxWidth", "minWidth", "direction", "padding", "gap", "size", "iconSize", "backgroundColor", "bgColor", "canRemove" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, fileNameToFileItem = useCallback(fileName => {
|
|
50
|
+
const {ext: ext, name: name} = function(fileName) {
|
|
51
|
+
var _a;
|
|
52
|
+
const ext = null !== (_a = fileName.split(".").pop()) && void 0 !== _a ? _a : "unknown";
|
|
53
|
+
return {
|
|
54
|
+
name: fileName,
|
|
55
|
+
ext: ext
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Map a file extension to the corresponding file icon name.
|
|
60
|
+
*/ (fileName);
|
|
61
|
+
return {
|
|
62
|
+
name: name,
|
|
63
|
+
ext: ext,
|
|
64
|
+
icon: function(extension) {
|
|
65
|
+
switch (extension) {
|
|
66
|
+
case "png":
|
|
67
|
+
case "jpeg":
|
|
68
|
+
case "jpg":
|
|
69
|
+
case "gif":
|
|
70
|
+
case "heic":
|
|
71
|
+
return "image";
|
|
72
|
+
|
|
73
|
+
case "docx":
|
|
74
|
+
case "doc":
|
|
75
|
+
case "txt":
|
|
76
|
+
return "text";
|
|
77
|
+
|
|
78
|
+
case "md":
|
|
79
|
+
return "md";
|
|
80
|
+
|
|
81
|
+
case "html":
|
|
82
|
+
case "js":
|
|
83
|
+
case "ts":
|
|
84
|
+
case "tsx":
|
|
85
|
+
case "json":
|
|
86
|
+
case "py":
|
|
87
|
+
return "code";
|
|
88
|
+
|
|
89
|
+
case "xls":
|
|
90
|
+
case "xlsx":
|
|
91
|
+
case "csv":
|
|
92
|
+
return "sheet";
|
|
93
|
+
|
|
94
|
+
case "ppt":
|
|
95
|
+
case "pptx":
|
|
96
|
+
return "preso";
|
|
97
|
+
|
|
98
|
+
case "pdf":
|
|
99
|
+
return "pdf";
|
|
100
|
+
|
|
101
|
+
case "mp3":
|
|
102
|
+
case "aif":
|
|
103
|
+
case "wav":
|
|
104
|
+
return "audio";
|
|
105
|
+
|
|
106
|
+
case "mp4":
|
|
107
|
+
case "mov":
|
|
108
|
+
return "video";
|
|
109
|
+
|
|
110
|
+
case "clipboard":
|
|
111
|
+
return "clipboard";
|
|
112
|
+
|
|
113
|
+
default:
|
|
114
|
+
return "other";
|
|
115
|
+
}
|
|
116
|
+
}(ext)
|
|
117
|
+
};
|
|
118
|
+
}, []), displayList = useMemo(() => files.map((item, index) => {
|
|
119
|
+
var _a;
|
|
120
|
+
const fileName = function(item) {
|
|
121
|
+
return "string" == typeof item.file ? item.file : item.file.name;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* cal progress as a percentage string
|
|
125
|
+
*/ (item), fileMeta = fileNameToFileItem(fileName), progress = function(uploading, progress) {
|
|
126
|
+
if (void 0 === progress || Number.isNaN(progress)) return uploading ? "0%" : "100%";
|
|
127
|
+
const percent = progress <= 1 ? 100 * progress : progress, clamped = Math.max(0, Math.min(100, percent));
|
|
128
|
+
return `${Math.round(clamped)}%`;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* display the progress indicator if uploading
|
|
132
|
+
*/ (item.uploading, item.progress);
|
|
133
|
+
return Object.assign(Object.assign({}, fileMeta), {
|
|
134
|
+
key: `${fileMeta.name}-${index}`,
|
|
135
|
+
index: index,
|
|
136
|
+
uploading: null !== (_a = item.uploading) && void 0 !== _a && _a,
|
|
137
|
+
progress: progress,
|
|
138
|
+
error: item.error
|
|
139
|
+
});
|
|
140
|
+
}), [ files, fileNameToFileItem ]), handleRemove = useCallback(index => {
|
|
141
|
+
const updated = files.filter((_, itemIndex) => itemIndex !== index);
|
|
142
|
+
null == onChange || onChange(updated);
|
|
143
|
+
}, [ files, onChange ]), handleMouseOver = useCallback(e => {
|
|
144
|
+
const toolTip = {
|
|
145
|
+
payload: {
|
|
146
|
+
label: "Remove file"
|
|
147
|
+
},
|
|
148
|
+
ref: {
|
|
149
|
+
current: e.currentTarget
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
null == onToolTip || onToolTip(toolTip);
|
|
153
|
+
}, [ onToolTip ]), handleMouseOut = useCallback(() => {
|
|
154
|
+
null == onToolTip || onToolTip(null);
|
|
155
|
+
}, [ onToolTip ]), cssVars = useMemo(() => ({
|
|
156
|
+
"--file-max-width": "column" === direction ? "100%" : setStyle(maxWidth),
|
|
157
|
+
"--file-min-width": "column" !== direction || minWidth ? setStyle(minWidth) : "100%",
|
|
158
|
+
"--file-gap": setStyle(gap),
|
|
159
|
+
"--file-direction": direction,
|
|
160
|
+
"--file-wrap": "column" === direction ? "nowrap" : "wrap",
|
|
161
|
+
"--file-padding": padding ? setStyle(padding) : "4px 4px 4px 2px",
|
|
162
|
+
"--file-icon-size": setStyle(iconSize),
|
|
163
|
+
"--file-overflow": "column" === direction ? "unset" : "hidden",
|
|
164
|
+
"--file-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)"
|
|
165
|
+
}), [ maxWidth, gap, direction, minWidth, padding, iconSize, resolvedBackgroundColor ]), fileCSSVars = useCallback((progress, error) => ({
|
|
166
|
+
"--file-progress": `${progress}`,
|
|
167
|
+
"--file-border-color": error ? "var(--feedback-warning)" : "var(--core-outline-primary)"
|
|
168
|
+
}), []);
|
|
169
|
+
return jsx("div", Object.assign({
|
|
170
|
+
className: `${css.wrapper}${divClass}`,
|
|
171
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
172
|
+
id: divId
|
|
173
|
+
}, rest, {
|
|
174
|
+
children: displayList.map(i => {
|
|
175
|
+
return jsxs("div", {
|
|
176
|
+
className: `${css.file} ${css[size]}`,
|
|
177
|
+
style: fileCSSVars(i.progress, i.error),
|
|
178
|
+
children: [ jsx("div", {
|
|
179
|
+
className: css.fileIcon,
|
|
180
|
+
children: jsx(FileIcon, {
|
|
181
|
+
name: i.icon,
|
|
182
|
+
size: iconSize
|
|
183
|
+
})
|
|
184
|
+
}), jsxs("div", {
|
|
185
|
+
className: css.meta,
|
|
186
|
+
children: [ jsx("div", {
|
|
187
|
+
className: css.fileName,
|
|
188
|
+
children: i.name
|
|
189
|
+
}), i.error && jsx("div", {
|
|
190
|
+
className: `${css.status} ${i.error ? css.error : ""}`,
|
|
191
|
+
children: i.error
|
|
192
|
+
}) ]
|
|
193
|
+
}), jsx("div", {
|
|
194
|
+
className: css.icon,
|
|
195
|
+
style: (uploading = i.uploading, uploading ? {
|
|
196
|
+
display: "flex"
|
|
197
|
+
} : {
|
|
198
|
+
display: "none"
|
|
199
|
+
}),
|
|
200
|
+
children: jsx(ProgressIndicator, {
|
|
201
|
+
inline: !0,
|
|
202
|
+
size: 20,
|
|
203
|
+
show: i.uploading
|
|
204
|
+
})
|
|
205
|
+
}), canRemove && jsx("div", {
|
|
206
|
+
className: css.icon,
|
|
207
|
+
style: displayClose(i.uploading),
|
|
208
|
+
role: "button",
|
|
209
|
+
"aria-label": "remove file",
|
|
210
|
+
onMouseOver: handleMouseOver,
|
|
211
|
+
onMouseOut: handleMouseOut,
|
|
212
|
+
onFocus: handleMouseOver,
|
|
213
|
+
onBlur: handleMouseOut,
|
|
214
|
+
onClick: () => handleRemove(i.index),
|
|
215
|
+
onKeyDown: e => accessibleKeyDown(e, () => handleRemove(i.index)),
|
|
216
|
+
tabIndex: 0,
|
|
217
|
+
children: jsx(Icon, {
|
|
218
|
+
name: "x",
|
|
219
|
+
style: {
|
|
220
|
+
pointerEvents: "none"
|
|
221
|
+
}
|
|
222
|
+
})
|
|
223
|
+
}) ]
|
|
224
|
+
}, i.key);
|
|
225
|
+
var uploading;
|
|
226
|
+
})
|
|
227
|
+
}));
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
export { FileList as F };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
3
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -7,12 +7,9 @@ import { motion } from "motion/react";
|
|
|
7
7
|
|
|
8
8
|
import React, { useMemo, useCallback } from "react";
|
|
9
9
|
|
|
10
|
-
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
11
|
-
|
|
12
10
|
var Size, Preset, css_flexDiv = "FlexDiv-module_flexDiv__EY5A- type-module_body-m-regular__LuQBA";
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
function(Size) {
|
|
12
|
+
!function(Size) {
|
|
16
13
|
Size.Grow = "grow", Size.Fill = "fill", Size.Fit = "fit", Size.Viewport = "viewport",
|
|
17
14
|
Size.Auto = "auto";
|
|
18
15
|
}(Size || (Size = {})), function(Preset) {
|
|
@@ -175,7 +172,7 @@ const FlexDiv = React.memo(React.forwardRef((props, ref) => {
|
|
|
175
172
|
id: divId,
|
|
176
173
|
ref: ref,
|
|
177
174
|
className: `${css_flexDiv} ${null != className ? className : ""}`,
|
|
178
|
-
style: Object.assign(Object.assign({},
|
|
175
|
+
style: Object.assign(Object.assign({}, style), wrapperStyle),
|
|
179
176
|
transition: transition,
|
|
180
177
|
variants: variants,
|
|
181
178
|
initial: enter,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { useAnimate } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import React, { useState, useEffect, useCallback, useMemo } from "react";
|
|
9
|
+
|
|
10
|
+
import { useTheme } from "../hooks/useTheme.mjs";
|
|
11
|
+
|
|
12
|
+
import "../theme/colors.mjs";
|
|
13
|
+
|
|
14
|
+
import "../hooks/useWindow.mjs";
|
|
15
|
+
|
|
16
|
+
import { B as Badge } from "./Badge-DuUb5-80.mjs";
|
|
17
|
+
|
|
18
|
+
import { I as Icon } from "./Icon-D4A6_c4x.mjs";
|
|
19
|
+
|
|
20
|
+
var css_header = "Grouper-module_header__D5fV0 flexBox-module_rowBetween__5FEvi", css_title = "Grouper-module_title__ZKqTP flexBox-module_rowBetween__5FEvi type-module_body-m-regular__LuQBA", css_content = "Grouper-module_content__Mof50 flexBox-module_rowBetween__5FEvi", css_icon = "Grouper-module_icon__14Jis flexBox-module_row__z24tF";
|
|
21
|
+
|
|
22
|
+
const Grouper = React.memo(props => {
|
|
23
|
+
const theme = useTheme(), {title: title = "Group Title", toggle: toggle = !0, open: open = !0, hasIcon: hasIcon = !0, iconName: iconName = "chevron down", iconSize: iconSize = 18, frameSize: frameSize = 64, border: border = 0, count: count = 0, unframed: unframed = !1, hideNull: hideNull = !0, showFilterBadge: showFilterBadge = !1, onChange: onChange = () => null, onClick: onClick = () => null} = props, divAttributes = __rest(props, [ "title", "toggle", "open", "hasIcon", "iconName", "iconSize", "frameSize", "border", "count", "unframed", "hideNull", "showFilterBadge", "onChange", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = useState(open), [icon, animateIcon] = useAnimate();
|
|
24
|
+
useEffect(() => setState(open), [ open ]);
|
|
25
|
+
const animate = useCallback(state => {
|
|
26
|
+
const animation = {
|
|
27
|
+
rotate: state ? 0 : 180
|
|
28
|
+
};
|
|
29
|
+
animateIcon(icon.current, Object.assign({}, animation), {
|
|
30
|
+
ease: "easeInOut",
|
|
31
|
+
duration: .25
|
|
32
|
+
});
|
|
33
|
+
}, [ animateIcon, icon ]), handleToggle = useCallback(() => {
|
|
34
|
+
toggle && (onClick(), onChange(!state), animate(!state), setState(!state));
|
|
35
|
+
}, [ toggle, onClick, onChange, state, animate ]), cssVars = useMemo(() => ({
|
|
36
|
+
"--grouper-height": unframed ? "auto" : `${frameSize}px`,
|
|
37
|
+
"--grouper-border": border ? `${border}px` : "0",
|
|
38
|
+
"--grouper-icon-size": `${iconSize}px`
|
|
39
|
+
}), [ frameSize, iconSize, border, unframed ]);
|
|
40
|
+
return jsx("button", Object.assign({
|
|
41
|
+
id: divId,
|
|
42
|
+
type: "button",
|
|
43
|
+
className: `${css_header}${divClass}`,
|
|
44
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
45
|
+
onClick: handleToggle,
|
|
46
|
+
"aria-expanded": state
|
|
47
|
+
}, rest, {
|
|
48
|
+
children: jsxs("div", {
|
|
49
|
+
className: css_content,
|
|
50
|
+
children: [ jsxs("div", {
|
|
51
|
+
className: css_title,
|
|
52
|
+
children: [ title, jsx(Badge, {
|
|
53
|
+
hideNull: hideNull,
|
|
54
|
+
count: count,
|
|
55
|
+
variant: "light"
|
|
56
|
+
}), showFilterBadge && jsx(Icon, {
|
|
57
|
+
name: "filter",
|
|
58
|
+
size: 16,
|
|
59
|
+
strokeColor: theme.current.colors["core-text-disabled"]
|
|
60
|
+
}) ]
|
|
61
|
+
}), hasIcon && jsx("div", {
|
|
62
|
+
ref: icon,
|
|
63
|
+
className: css_icon,
|
|
64
|
+
children: jsx(Icon, {
|
|
65
|
+
name: iconName,
|
|
66
|
+
size: iconSize
|
|
67
|
+
})
|
|
68
|
+
}) ]
|
|
69
|
+
})
|
|
70
|
+
}));
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export { Grouper as G };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
2
|
+
import { _ as __rest } from "./tslib.es6-C81Qhn1z.mjs";
|
|
3
3
|
|
|
4
4
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
@@ -9,21 +9,16 @@ import { useTheme } from "../hooks/useTheme.mjs";
|
|
|
9
9
|
|
|
10
10
|
import "../theme/colors.mjs";
|
|
11
11
|
|
|
12
|
-
import { a as accessibleKeyDown } from "./misc-
|
|
12
|
+
import { a as accessibleKeyDown } from "./misc-2MIIqzsX.mjs";
|
|
13
13
|
|
|
14
14
|
import "../hooks/useWindow.mjs";
|
|
15
15
|
|
|
16
|
-
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
17
|
-
|
|
18
16
|
var css_icon = "Icon-module_icon__szG-X";
|
|
19
17
|
|
|
20
|
-
styleInject(".Icon-module_icon__szG-X {\n\tcursor: var(--cursor);\n\tuser-select: none;\n\tpointer-events: var(--pointer-events);\n\t--webkit-user-select: none;\n\t-webkit-tap-highlight-color: transparent;\n\toutline: none;\n\tborder: 0;\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n\npath,\ncircle,\nrect,\npolyline,\npolygon,\nline {\n\ttransition: stroke, fill var(--motion-water-duration) var(--motion-water);\n}\n");
|
|
21
|
-
|
|
22
18
|
/**
|
|
23
19
|
* Static icon registry created once at module load.
|
|
24
20
|
* Each entry stores only icon line content renderers.
|
|
25
|
-
*/
|
|
26
|
-
const STATIC_ICON_REGISTRY = new Map([ [ "talk", {
|
|
21
|
+
*/ const STATIC_ICON_REGISTRY = new Map([ [ "talk", {
|
|
27
22
|
line: ({strokeColor: strokeColor, fillColor: fillColor}) => jsxs(Fragment, {
|
|
28
23
|
children: [ jsx("path", {
|
|
29
24
|
d: "M10,2.5c4.14,0,7.5,3.36,7.5,7.5s-3.36,7.5-7.5,7.5-7.5-3.36-7.5-7.5,3.36-7.5,7.5-7.5M10,1C5.03,1,1,5.03,1,10s4.03,9,9,9,9-4.03,9-9S14.97,1,10,1h0Z",
|