@apple-pie/slice 0.1.29 → 0.1.31
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 +174 -4
- package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-k7qS53g6.js} +3 -5
- package/dist/cjs/chunks/Avatar-hP8GuwvD.js +82 -0
- package/dist/cjs/chunks/{AvatarGroup-DYN73N5x.js → AvatarGroup-DMy34q7_.js} +1 -3
- package/dist/cjs/chunks/Badge-D2TbyfJS.js +22 -0
- package/dist/cjs/chunks/{Button-B1qbfQgN.js → Button-CTsHZBEB.js} +1 -3
- package/dist/cjs/chunks/{ButtonBar-zpC3sClM.js → ButtonBar-BRb1PTmw.js} +1 -3
- package/dist/cjs/chunks/{Camera-CCzynmXT.js → Camera-CKv087kr.js} +3 -5
- package/dist/cjs/chunks/CheckBox-VRIL1FHh.js +51 -0
- package/dist/cjs/chunks/Chip-Dr3vKvRY.js +77 -0
- package/dist/cjs/chunks/{DivInput-932r3bvF.js → DivInput-Ci0gaCWL.js} +1 -3
- package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-C0MvSJOl.js} +1 -3
- package/dist/cjs/chunks/{DrggablePanel-u8C-Y4dA.js → DrggablePanel-DflouLUs.js} +3 -5
- package/dist/cjs/chunks/DropDown-BS1H62yj.js +104 -0
- package/dist/cjs/chunks/ErrorSummary-B3tof7ir.js +85 -0
- package/dist/cjs/chunks/{FileIcon-Dxn9OL10.js → FileIcon-Te8MaqTs.js} +2 -2
- package/dist/cjs/chunks/FileList-CDcfKIV6.js +222 -0
- package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-wO8IY0Zf.js} +2 -3
- package/dist/cjs/chunks/Grouper-DyGkzdvz.js +61 -0
- package/dist/cjs/chunks/{Icon-BFiN8Wzm.js → Icon-BFZ_5Qv3.js} +4 -7
- package/dist/cjs/chunks/IconButton-CgsuJIuF.js +82 -0
- package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-Dgwal8na.js} +1 -1
- package/dist/cjs/chunks/Label-BuyhcJbF.js +102 -0
- package/dist/cjs/chunks/Modal-ByRyv3wy.js +101 -0
- package/dist/cjs/chunks/ModalController-xjflFsjF.js +68 -0
- package/dist/cjs/chunks/Overlay-FooE9M_s.js +41 -0
- package/dist/cjs/chunks/Pager-B-cuwffo.js +36 -0
- package/dist/cjs/chunks/ProgressIndicator-ByZ_aYAZ.js +138 -0
- package/dist/cjs/chunks/{PromptInput-C8-V67sS.js → PromptInput--grtHPvy.js} +2 -4
- package/dist/cjs/chunks/RadioButton-DP2X1dA_.js +55 -0
- package/dist/cjs/chunks/{RadioButtonList-DvJV6Qdg.js → RadioButtonList-COGNW5y3.js} +1 -2
- package/dist/cjs/chunks/{Slider-D8OYGFsN.js → Slider-G1a8UKef.js} +2 -6
- package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-CsRCleXv.js} +1 -1
- package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-OBVHKn_D.js} +1 -2
- package/dist/cjs/chunks/{TabBar-VzxuAesC.js → TabBar-C1HkBaxE.js} +2 -4
- package/dist/cjs/chunks/TextArea-BEmNI_HZ.js +74 -0
- package/dist/cjs/chunks/{TextField-BpoLF6pZ.js → TextField-D9_COA9H.js} +3 -5
- package/dist/cjs/chunks/Tip-2W0u_oQN.js +88 -0
- package/dist/cjs/chunks/Toast-B9jX6ioq.js +177 -0
- package/dist/cjs/chunks/ToggleButton-C_Gu5dYR.js +39 -0
- package/dist/cjs/chunks/UploadArea-ENFAf4tE.js +127 -0
- package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-CZ22tcLz.js} +1 -1
- package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-Ca73jeFf.js} +1 -1
- package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-lxYIvhN8.js} +1 -1
- package/dist/cjs/chunks/{misc-CTl4GDxI.js → misc-DZAbObFp.js} +16 -19
- package/dist/cjs/chunks/modalStore-D4bOjuWd.js +70 -0
- package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Bq7sVvyA.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-mD8pcsGP.js → uploads-worker-CD-annza.js} +2 -2
- package/dist/cjs/chunks/{uploadsStore-CxWIctvI.js → uploadsStore-CUeB10zx.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-oYwlRVN0.js → volumeStore-roYTyKJ2.js} +3 -3
- package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BdJv-RF0.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/Modal/index.js +13 -0
- package/dist/cjs/components/ModalController/index.js +7 -0
- 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 +6 -6
- package/dist/cjs/components/ToggleButton/index.js +8 -8
- package/dist/cjs/components/UploadArea/index.js +7 -7
- package/dist/cjs/hooks/useAudioRecorder.js +4 -5
- package/dist/cjs/hooks/useLocalStore.js +3 -9
- package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
- package/dist/cjs/hooks/useMicrophone.js +7 -11
- 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 +3 -3
- package/dist/cjs/index.js +9 -7
- package/dist/cjs/providers/ThemeProvider.js +1 -13
- 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/microphone.js +2 -2
- package/dist/cjs/stores/modal.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/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +18 -15
- package/dist/cjs/theme/colors.js +1 -1
- package/dist/cjs/theme/type.js +1 -1
- package/dist/cjs/utils/index.js +2 -2
- package/dist/cjs/utils/objects/index.js +2 -2
- package/dist/cjs/workers/uploads/uploads.js +2 -2
- package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-DfrxyTX_.mjs} +3 -7
- package/dist/esm/chunks/Avatar-pA41Pcyl.mjs +88 -0
- package/dist/esm/chunks/{AvatarGroup-CBGi99eo.mjs → AvatarGroup-CZBtWjnj.mjs} +2 -6
- package/dist/esm/chunks/Badge-pLwG0zm7.mjs +26 -0
- package/dist/esm/chunks/{Button-CYFpitCp.mjs → Button-BJoMLZIs.mjs} +6 -10
- package/dist/esm/chunks/{ButtonBar-ieMA0SHi.mjs → ButtonBar-BO2RUJ8R.mjs} +3 -7
- package/dist/esm/chunks/{Camera-jn9CcaD0.mjs → Camera-4MNA52HG.mjs} +5 -9
- package/dist/esm/chunks/CheckBox-7KAsvZld.mjs +61 -0
- package/dist/esm/chunks/Chip-BuGvCLLU.mjs +87 -0
- package/dist/esm/chunks/{DivInput-BVhcU0y0.mjs → DivInput-D0YzSWjJ.mjs} +2 -6
- package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-h26m47Z-.mjs} +1 -5
- package/dist/esm/chunks/{DrggablePanel-G5HHlntD.mjs → DrggablePanel-Bh6HLPMX.mjs} +2 -6
- package/dist/esm/chunks/DropDown-NgMYjjXn.mjs +112 -0
- package/dist/esm/chunks/ErrorSummary-nNm9qymE.mjs +90 -0
- package/dist/esm/chunks/{FileIcon-fJV_Cl6v.mjs → FileIcon-BqyV1wut.mjs} +2 -2
- package/dist/esm/chunks/FileList-C1tOvoc0.mjs +230 -0
- package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-CkK-DAyg.mjs} +3 -6
- package/dist/esm/chunks/Grouper-CyrOkuu2.mjs +73 -0
- package/dist/esm/chunks/{Icon-BOJAk-hM.mjs → Icon-DjW0Krm8.mjs} +3 -8
- package/dist/esm/chunks/IconButton-DdLhTUl0.mjs +96 -0
- package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-DVoDikoA.mjs} +1 -1
- package/dist/esm/chunks/Label-DhmJ_Sln.mjs +113 -0
- package/dist/esm/chunks/Modal-FztrJsQo.mjs +113 -0
- package/dist/esm/chunks/ModalController-C1BnM5Dz.mjs +76 -0
- package/dist/esm/chunks/Overlay-Dsy55Bxm.mjs +47 -0
- package/dist/esm/chunks/Pager-BqSdwL0L.mjs +42 -0
- package/dist/esm/chunks/ProgressIndicator-BnqZFATV.mjs +146 -0
- package/dist/esm/chunks/{PromptInput-COJnOFZf.mjs → PromptInput-CRkcPXJu.mjs} +3 -7
- package/dist/esm/chunks/RadioButton-DXq3yniV.mjs +63 -0
- package/dist/esm/chunks/{RadioButtonList-XqlqadYn.mjs → RadioButtonList-BgOskHCP.mjs} +3 -6
- package/dist/esm/chunks/{Slider-CU0Zdlpu.mjs → Slider-DPOy9uNI.mjs} +4 -10
- package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-BJd_D0Fn.mjs} +1 -1
- package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DHqlyizo.mjs} +1 -4
- package/dist/esm/chunks/{TabBar-v8Dp4dr-.mjs → TabBar-RBXExqMK.mjs} +5 -9
- package/dist/esm/chunks/TextArea-CIlx_P26.mjs +80 -0
- package/dist/esm/chunks/{TextField-j4q0RUzH.mjs → TextField-CX72ybwH.mjs} +5 -9
- package/dist/esm/chunks/Tip-COBSyEjm.mjs +96 -0
- package/dist/esm/chunks/Toast-BTm3HxDD.mjs +189 -0
- package/dist/esm/chunks/ToggleButton-DujsCKF3.mjs +47 -0
- package/dist/esm/chunks/UploadArea-D--Nt8Ed.mjs +135 -0
- package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-BMXcuW3f.mjs} +1 -1
- package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-36E3160Z.mjs} +2 -2
- package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-Cexu82zH.mjs} +1 -1
- package/dist/esm/chunks/{misc-Bjbro8Xe.mjs → misc-CTGTuM2J.mjs} +16 -19
- package/dist/esm/chunks/modalStore-Crg_QmSJ.mjs +68 -0
- package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-Dow4NXkZ.mjs} +2 -2
- package/dist/esm/chunks/{uploads-worker-7X9EwX9N.mjs → uploads-worker-Dhyp4ot3.mjs} +2 -2
- package/dist/esm/chunks/{uploadsStore-B7VECR5Q.mjs → uploadsStore-DT4lFybE.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-GZnCDBMU.mjs → volumeStore-RAxdmQ60.mjs} +3 -3
- package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-C4AZexIa.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/Modal/index.mjs +45 -0
- package/dist/esm/components/ModalController/index.mjs +15 -0
- 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 +6 -6
- package/dist/esm/components/ToggleButton/index.mjs +9 -11
- package/dist/esm/components/UploadArea/index.mjs +9 -11
- package/dist/esm/hooks/useAudioRecorder.mjs +4 -5
- package/dist/esm/hooks/useLocalStore.mjs +3 -9
- package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
- package/dist/esm/hooks/useMicrophone.mjs +7 -11
- 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 +2 -4
- package/dist/esm/index.mjs +53 -47
- package/dist/esm/providers/ThemeProvider.mjs +0 -14
- 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/microphone.mjs +2 -2
- package/dist/esm/stores/modal.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/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +14 -12
- package/dist/esm/theme/colors.mjs +1 -1
- package/dist/esm/theme/type.mjs +1 -1
- package/dist/esm/utils/index.mjs +9 -9
- package/dist/esm/utils/objects/index.mjs +6 -6
- package/dist/esm/workers/uploads/uploads.mjs +2 -2
- package/dist/styles.css +8436 -0
- package/dist/types/components/Modal/Modal.d.ts +3 -0
- package/dist/types/components/Modal/_types.d.ts +46 -0
- package/dist/types/components/Modal/index.d.ts +2 -0
- package/dist/types/components/ModalController/ModalController.d.ts +2 -0
- package/dist/types/components/ModalController/_types.d.ts +13 -0
- package/dist/types/components/ModalController/index.d.ts +2 -0
- package/dist/types/components/Overlay/_types.d.ts +4 -0
- package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +2 -1
- package/dist/types/components/Toast/_types.d.ts +2 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/providers/ThemeProvider.d.ts +0 -6
- package/dist/types/stores/index.d.ts +1 -0
- package/dist/types/stores/modal/_types.d.ts +27 -0
- package/dist/types/stores/modal/index.d.ts +2 -0
- package/dist/types/stores/modal/modalStore.d.ts +20 -0
- package/dist/types/stores/toast/_types.d.ts +3 -1
- package/package.json +8 -3
- package/dist/cjs/chunks/Avatar-vIquH-Uk.js +0 -84
- package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
- package/dist/cjs/chunks/CheckBox-DNctUlTA.js +0 -53
- package/dist/cjs/chunks/Chip-BN4qBz6w.js +0 -79
- package/dist/cjs/chunks/DropDown-BZbrZOkx.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
- package/dist/cjs/chunks/FileList-D5_igVaC.js +0 -225
- package/dist/cjs/chunks/Grouper-D6rSl9nK.js +0 -63
- package/dist/cjs/chunks/IconButton-Cv-po19M.js +0 -84
- package/dist/cjs/chunks/Label-BQ6flU4-.js +0 -103
- package/dist/cjs/chunks/Overlay-DDOvMM6L.js +0 -37
- package/dist/cjs/chunks/Pager-GH2y7l5h.js +0 -38
- package/dist/cjs/chunks/ProgressIndicator-7pLk4Dvn.js +0 -138
- package/dist/cjs/chunks/RadioButton-3CzhKBn6.js +0 -56
- package/dist/cjs/chunks/TextArea-CBNHvcK3.js +0 -76
- package/dist/cjs/chunks/Tip-CUKFhP9K.js +0 -90
- package/dist/cjs/chunks/Toast-CKqGjsEk.js +0 -169
- package/dist/cjs/chunks/ToggleButton-BdCsChJM.js +0 -40
- package/dist/cjs/chunks/UploadArea-M9oc-No2.js +0 -129
- package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
- package/dist/esm/chunks/Avatar-Ds6MWC2c.mjs +0 -92
- package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
- package/dist/esm/chunks/CheckBox-CoOmnGWD.mjs +0 -65
- package/dist/esm/chunks/Chip-ClG6cUX0.mjs +0 -91
- package/dist/esm/chunks/DropDown-AuQW_DWv.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
- package/dist/esm/chunks/FileList-CxHaEEUi.mjs +0 -235
- package/dist/esm/chunks/Grouper-CyWZ8tfm.mjs +0 -77
- package/dist/esm/chunks/IconButton-Ck0IMn4i.mjs +0 -100
- package/dist/esm/chunks/Label-DSfCcKtQ.mjs +0 -116
- package/dist/esm/chunks/Overlay-DiSvgIQP.mjs +0 -45
- package/dist/esm/chunks/Pager-ByJ2Cr0n.mjs +0 -46
- package/dist/esm/chunks/ProgressIndicator-d2JGUDW_.mjs +0 -148
- package/dist/esm/chunks/RadioButton-BB73OY2a.mjs +0 -66
- package/dist/esm/chunks/TextArea-DGF43RON.mjs +0 -84
- package/dist/esm/chunks/Tip-Bj9d-230.mjs +0 -100
- package/dist/esm/chunks/Toast-CoioLlEG.mjs +0 -181
- package/dist/esm/chunks/ToggleButton-CwTm8Yx0.mjs +0 -51
- package/dist/esm/chunks/UploadArea-DAwoJxtr.mjs +0 -139
- package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
- /package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-CbG_VeRI.js} +0 -0
- /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-ACoOeeTO.js} +0 -0
- /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-k-3V1fz_.js} +0 -0
- /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-MOSbvvnZ.js} +0 -0
- /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-B0_3srZN.js} +0 -0
- /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-CaoYvh12.js} +0 -0
- /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-CthHPjrO.js} +0 -0
- /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-CPB7RHKY.js} +0 -0
- /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-6eHe6esp.js} +0 -0
- /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-CzpRaW14.js} +0 -0
- /package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-4AJH8WaN.mjs} +0 -0
- /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-qNnkZUOe.mjs} +0 -0
- /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-CEStVWlB.mjs} +0 -0
- /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BUNbarKP.mjs} +0 -0
- /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-D-qeA9gU.mjs} +0 -0
- /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-D5b6tZ5a.mjs} +0 -0
- /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-U5H1I85x.mjs} +0 -0
- /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-pvswaezx.mjs} +0 -0
- /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-80oOTYsj.mjs} +0 -0
- /package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-BX2F90pK.mjs} +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-CTl4GDxI.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
5
|
-
wrapper: "Tip-module_wrapper__D7ACT flexBox-module_rowStart__4tcxS",
|
|
6
|
-
xs: "Tip-module_xs__wsz9y type-module_body-xs-regular__ZAFft",
|
|
7
|
-
s: "Tip-module_s__Wvz3q type-module_body-s-regular__vRHSP",
|
|
8
|
-
m: "Tip-module_m__9qJbB type-module_body-m-regular__LuQBA",
|
|
9
|
-
l: "Tip-module_l__OdNuh type-module_body-l-regular__lOYbg"
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Tip-module_wrapper__D7ACT {\n\tpadding: var(--tooltip-padding) !important;\n\tposition: fixed;\n\tborder: var(--tooltip-border);\n\tborder-radius: var(--tooltip-border-radius);\n\tbackground: var(--tooltip-background);\n\twhite-space: nowrap;\n\tz-index: var(--elevation-describe);\n}\n\n.Tip-module_xs__wsz9y {\n}\n\n.Tip-module_s__Wvz3q {\n}\n\n.Tip-module_m__9qJbB {\n}\n.Tip-module_l__OdNuh {\n}\n");
|
|
13
|
-
|
|
14
|
-
const tipBasePos = {
|
|
15
|
-
left: 0,
|
|
16
|
-
top: 0
|
|
17
|
-
}, TipBase = React.forwardRef((props, ref) => {
|
|
18
|
-
var _a;
|
|
19
|
-
const {tip: tip, size: size = "s", backgroundColor: backgroundColor, bgColor: bgColor, textColor: textColor, color: color, border: border = !0, borderColor: borderColor, padding: padding, borderRadius: borderRadius, radius: radius, coords: coords, showDelay: showDelay = 500, hideDelay: hideDelay = 2500} = props, divAttributes = tslib_es6.__rest(props, [ "tip", "size", "backgroundColor", "bgColor", "textColor", "color", "border", "borderColor", "padding", "borderRadius", "radius", "coords", "showDelay", "hideDelay" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [pos, setPos] = React.useState(tipBasePos), [ready, setReady] = React.useState(!1), [animate, setAnimate] = React.useState(!1), timer = React.useRef(null), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedTextColor = null != textColor ? textColor : color, resolvedBorderRadius = null != borderRadius ? borderRadius : radius;
|
|
20
|
-
React.useEffect(() => {
|
|
21
|
-
timer.current && clearTimeout(timer.current);
|
|
22
|
-
const {x: x, y: y} = null != coords ? coords : {
|
|
23
|
-
x: 0,
|
|
24
|
-
y: 0
|
|
25
|
-
};
|
|
26
|
-
return x > 0 && y > 0 ? timer.current = setTimeout(() => {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
setPos({
|
|
29
|
-
left: null !== (_a = null == coords ? void 0 : coords.x) && void 0 !== _a ? _a : 0,
|
|
30
|
-
top: null !== (_b = null == coords ? void 0 : coords.y) && void 0 !== _b ? _b : 0
|
|
31
|
-
}), setReady(!0), timer.current && clearTimeout(timer.current), timer.current = setTimeout(() => {
|
|
32
|
-
setReady(!1), setPos({
|
|
33
|
-
left: 0,
|
|
34
|
-
top: 0
|
|
35
|
-
});
|
|
36
|
-
}, hideDelay);
|
|
37
|
-
}, showDelay) : (setReady(!1), setPos({
|
|
38
|
-
left: 0,
|
|
39
|
-
top: 0
|
|
40
|
-
})), () => {
|
|
41
|
-
timer.current && clearTimeout(timer.current);
|
|
42
|
-
};
|
|
43
|
-
}, [ coords, showDelay, hideDelay ]), React.useEffect(() => setAnimate(ready), [ ready ]);
|
|
44
|
-
const cssVars = React.useMemo(() => ({
|
|
45
|
-
"--tooltip-padding": null != padding ? padding : "3px 6px",
|
|
46
|
-
"--tooltip-background": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
|
|
47
|
-
"--tooltip-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
|
|
48
|
-
"--tooltip-border": border ? `1px solid ${null != borderColor ? borderColor : "var(--core-outline-primary)"}` : "unset",
|
|
49
|
-
"--tooltip-border-radius": null != resolvedBorderRadius ? resolvedBorderRadius : "4px"
|
|
50
|
-
}), [ padding, resolvedBackgroundColor, resolvedTextColor, border, borderColor, resolvedBorderRadius ]), coordStyle = React.useMemo(() => {
|
|
51
|
-
const {left: left, top: top} = pos;
|
|
52
|
-
return {
|
|
53
|
-
left: `${null != left ? left : 0}px`,
|
|
54
|
-
top: `${null != top ? top : 0}px`
|
|
55
|
-
};
|
|
56
|
-
}, [ pos ]), classNames = React.useMemo(() => misc.filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]);
|
|
57
|
-
return jsxRuntime.jsx(react.motion.div, Object.assign({
|
|
58
|
-
ref: ref,
|
|
59
|
-
id: divId,
|
|
60
|
-
className: classNames,
|
|
61
|
-
onKeyDown: () => null,
|
|
62
|
-
style: Object.assign(Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), coordStyle), {
|
|
63
|
-
visibility: ready ? "visible" : "hidden"
|
|
64
|
-
}),
|
|
65
|
-
initial: {
|
|
66
|
-
opacity: 0
|
|
67
|
-
},
|
|
68
|
-
animate: animate ? {
|
|
69
|
-
opacity: 1,
|
|
70
|
-
transition: {
|
|
71
|
-
ease: "easeInOut",
|
|
72
|
-
duration: .25
|
|
73
|
-
}
|
|
74
|
-
} : void 0,
|
|
75
|
-
exit: {
|
|
76
|
-
opacity: 0,
|
|
77
|
-
transition: {
|
|
78
|
-
duration: 0
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}, rest, {
|
|
82
|
-
children: null === (_a = null == tip ? void 0 : tip.payload) || void 0 === _a ? void 0 : _a.label
|
|
83
|
-
}));
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
TipBase.displayName = "Tip";
|
|
87
|
-
|
|
88
|
-
const Tip = React.memo(TipBase);
|
|
89
|
-
|
|
90
|
-
exports.Tip = Tip;
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
|
-
|
|
6
|
-
require("../theme/colors.js");
|
|
7
|
-
|
|
8
|
-
var misc = require("./misc-CTl4GDxI.js");
|
|
9
|
-
|
|
10
|
-
require("../hooks/useWindow.js");
|
|
11
|
-
|
|
12
|
-
var ToastType, Icon = require("./Icon-BFiN8Wzm.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
13
|
-
wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
|
|
14
|
-
close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
|
|
15
|
-
s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
|
|
16
|
-
m: "Toast-module_m__JtmLz type-module_body-m-regular__LuQBA",
|
|
17
|
-
l: "Toast-module_l__-W0PD type-module_body-l-regular__lOYbg"
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Toast-module_wrapper__1uj9O {\n\tpadding: var(--toast-padding) !important;\n\tcolor: var(--toast-color);\n\tposition: var(--toast-position);\n\tborder: var(--toast-border);\n\tborder-radius: var(--toast-border-radius);\n\tbackground: var(--toast-background);\n\tz-index: var(--elevation-status);\n\tgap: 16px;\n\tbox-shadow: var(--surface-shadow-soft);\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.Toast-module_close__i10-s {\n\tmin-height: 20px;\n\tmax-height: 20px;\n\tmin-width: 20px;\n\tmax-width: 20px;\n\tcursor: pointer;\n}\n\n.Toast-module_s__kc5Ef {\n}\n\n.Toast-module_m__JtmLz {\n}\n.Toast-module_l__-W0PD {\n}\n"),
|
|
21
|
-
exports.ToastType = void 0, (ToastType = exports.ToastType || (exports.ToastType = {})).Success = "success",
|
|
22
|
-
ToastType.Error = "error", ToastType.Warning = "warning", ToastType.Info = "info";
|
|
23
|
-
|
|
24
|
-
const ToastBase = React.forwardRef((props, ref) => {
|
|
25
|
-
const {message: message = null, size: size = "m", border: border = !0, padding: padding, radius: radius = 8, container: container = "window", showDelay: showDelay = 0, duration: duration = 5e3, position: position = "bottom", offset: offset = 24, close: close = !0, type: type = exports.ToastType.Info, didHide: didHide = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "message", "size", "border", "padding", "radius", "container", "showDelay", "duration", "position", "offset", "close", "type", "didHide" ]), theme = hooks_useTheme.useTheme(), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [ready, setReady] = React.useState(!1), [content, setContent] = React.useState(null), timer = React.useRef(null);
|
|
26
|
-
React.useEffect(() => {
|
|
27
|
-
timer.current && clearTimeout(timer.current);
|
|
28
|
-
return message && message.length > 0 ? timer.current = setTimeout(() => {
|
|
29
|
-
setContent(message), timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
|
|
30
|
-
setReady(!1);
|
|
31
|
-
}, duration));
|
|
32
|
-
}, showDelay) : setContent(null), () => {
|
|
33
|
-
timer.current && clearTimeout(timer.current);
|
|
34
|
-
};
|
|
35
|
-
}, [ message, showDelay, duration ]), React.useEffect(() => setReady(null !== content), [ content ]);
|
|
36
|
-
const defaultPadding = React.useMemo(() => close ? "10px 12px 10px 16px" : "10px 16px", [ close ]), colorScheme = React.useMemo(() => {
|
|
37
|
-
switch (type) {
|
|
38
|
-
case "success":
|
|
39
|
-
return {
|
|
40
|
-
border: "var(--array-land-label)",
|
|
41
|
-
bg: "var(--array-land)",
|
|
42
|
-
text: "var(--array-land-label)"
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
case "warning":
|
|
46
|
-
return {
|
|
47
|
-
border: "var(--array-orange-label)",
|
|
48
|
-
bg: "var(--array-orange)",
|
|
49
|
-
text: "var(--array-orange-label)"
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
case "error":
|
|
53
|
-
return {
|
|
54
|
-
border: "var(--feedback-warning)",
|
|
55
|
-
bg: "var(--array-magenta)",
|
|
56
|
-
text: "var(--feedback-warning)"
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
default:
|
|
60
|
-
return {
|
|
61
|
-
border: "var(--core-outline-primary)",
|
|
62
|
-
bg: "var(--core-surface-secondary)",
|
|
63
|
-
text: "var(--core-text-primary)"
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}, [ type ]), cssVars = React.useMemo(() => ({
|
|
67
|
-
"--toast-padding": misc.setStyle(padding, defaultPadding),
|
|
68
|
-
"--toast-background": colorScheme.bg,
|
|
69
|
-
"--toast-color": colorScheme.text,
|
|
70
|
-
"--toast-border": border ? `1px solid ${colorScheme.border}` : "unset",
|
|
71
|
-
"--toast-border-radius": misc.setStyle(radius, 4),
|
|
72
|
-
"--toast-position": "window" === container ? "fixed" : "absolute"
|
|
73
|
-
}), [ padding, border, colorScheme, radius, defaultPadding, container ]), variants = React.useMemo(() => {
|
|
74
|
-
const positionShow = "bottom" === position ? {
|
|
75
|
-
bottom: offset
|
|
76
|
-
} : {
|
|
77
|
-
top: offset
|
|
78
|
-
}, positionHide = "bottom" === position ? {
|
|
79
|
-
bottom: -offset
|
|
80
|
-
} : {
|
|
81
|
-
top: -offset
|
|
82
|
-
}, transition = {
|
|
83
|
-
ease: "easeInOut",
|
|
84
|
-
duration: .25
|
|
85
|
-
};
|
|
86
|
-
return {
|
|
87
|
-
initial: Object.assign({
|
|
88
|
-
opacity: 0
|
|
89
|
-
}, positionHide),
|
|
90
|
-
animate: Object.assign(Object.assign({
|
|
91
|
-
opacity: 1
|
|
92
|
-
}, positionShow), {
|
|
93
|
-
transition: transition
|
|
94
|
-
}),
|
|
95
|
-
exit: Object.assign(Object.assign({
|
|
96
|
-
opacity: 0
|
|
97
|
-
}, positionHide), {
|
|
98
|
-
transition: transition
|
|
99
|
-
})
|
|
100
|
-
};
|
|
101
|
-
}, [ position, offset ]), classNames = React.useMemo(() => misc.filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]), handleClose = React.useCallback(() => {
|
|
102
|
-
setReady(!1);
|
|
103
|
-
}, []), handleMouseOver = React.useCallback(() => {
|
|
104
|
-
timer.current && clearTimeout(timer.current);
|
|
105
|
-
}, []), handleMouseOut = React.useCallback(() => {
|
|
106
|
-
timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
|
|
107
|
-
setContent(null);
|
|
108
|
-
}, duration));
|
|
109
|
-
}, [ duration ]), iconColor = React.useMemo(() => {
|
|
110
|
-
switch (type) {
|
|
111
|
-
case exports.ToastType.Error:
|
|
112
|
-
return theme.current.colors["feedback-warning"];
|
|
113
|
-
|
|
114
|
-
case exports.ToastType.Success:
|
|
115
|
-
return theme.current.colors["array-land-label"];
|
|
116
|
-
|
|
117
|
-
case exports.ToastType.Warning:
|
|
118
|
-
return theme.current.colors["array-orange-label"];
|
|
119
|
-
|
|
120
|
-
default:
|
|
121
|
-
return theme.current.colors["core-text-primary"];
|
|
122
|
-
}
|
|
123
|
-
}, [ type, theme ]);
|
|
124
|
-
return jsxRuntime.jsx(react.AnimatePresence, {
|
|
125
|
-
onExitComplete: () => didHide(),
|
|
126
|
-
initial: !1,
|
|
127
|
-
children: ready && jsxRuntime.jsxs(react.motion.div, Object.assign({
|
|
128
|
-
ref: ref,
|
|
129
|
-
id: divId,
|
|
130
|
-
className: classNames
|
|
131
|
-
}, rest, {
|
|
132
|
-
onMouseEnter: handleMouseOver,
|
|
133
|
-
onMouseLeave: handleMouseOut,
|
|
134
|
-
onFocus: handleMouseOver,
|
|
135
|
-
onBlur: handleMouseOut,
|
|
136
|
-
style: Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), {
|
|
137
|
-
visibility: ready ? "visible" : "hidden"
|
|
138
|
-
}),
|
|
139
|
-
variants: variants,
|
|
140
|
-
initial: "initial",
|
|
141
|
-
animate: "animate",
|
|
142
|
-
exit: "exit",
|
|
143
|
-
children: [ jsxRuntime.jsx("div", {
|
|
144
|
-
role: "status",
|
|
145
|
-
"aria-live": "polite",
|
|
146
|
-
className: css.message,
|
|
147
|
-
children: content
|
|
148
|
-
}), ("Infinite" === duration || close) && jsxRuntime.jsx("div", {
|
|
149
|
-
className: css.close,
|
|
150
|
-
tabIndex: 0,
|
|
151
|
-
role: "button",
|
|
152
|
-
"aria-label": "dismiss message",
|
|
153
|
-
onKeyDown: e => misc.accessibleKeyDown(e, handleClose),
|
|
154
|
-
onClick: handleClose,
|
|
155
|
-
children: jsxRuntime.jsx(Icon.Icon, {
|
|
156
|
-
name: "x",
|
|
157
|
-
size: 20,
|
|
158
|
-
strokeColor: iconColor
|
|
159
|
-
})
|
|
160
|
-
}) ]
|
|
161
|
-
}))
|
|
162
|
-
});
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
ToastBase.displayName = "Toast";
|
|
166
|
-
|
|
167
|
-
const Toast = React.memo(ToastBase);
|
|
168
|
-
|
|
169
|
-
exports.Toast = Toast;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), IconButton = require("./IconButton-Cv-po19M.js"), Label = require("./Label-BQ6flU4-.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_toggleButton = "ToggleButton-module_toggleButton__H7KgI flexBox-module_rowStart__4tcxS";
|
|
4
|
-
|
|
5
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.ToggleButton-module_toggleButton__H7KgI {\n\twidth: min-content;\n\tgap: var(--tb-gap);\n}\n"),
|
|
6
|
-
exports.ToggleButton = function(props) {
|
|
7
|
-
const {label: label, textSize: textSize, icon: icon, selected: selected = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-surface-primary)", bgColor: bgColor = "var(--core-surface-secondary)", bgColorOn: bgColorOn = "var(--core-link-primary)", iconSize: iconSize = 20, buttonSize: buttonSize = "m", tooltip: tooltip, gap: gap = 4, unselect: unselect = !0, fill: fill = !1, disabled: disabled = !1, onChange: onChange, onSelect: onSelect, onToolTip: onToolTip, children: children} = props, handleClick = () => {
|
|
8
|
-
if (!unselect && selected) return;
|
|
9
|
-
const newState = !selected;
|
|
10
|
-
null == onChange || onChange(newState), newState && (null == onSelect || onSelect());
|
|
11
|
-
}, cssVars = React.useMemo(() => ({
|
|
12
|
-
"--tb-gap": `${gap}px`
|
|
13
|
-
}), [ gap ]);
|
|
14
|
-
return jsxRuntime.jsxs("div", {
|
|
15
|
-
className: css_toggleButton,
|
|
16
|
-
style: cssVars,
|
|
17
|
-
children: [ icon && jsxRuntime.jsx(IconButton.IconButton, {
|
|
18
|
-
icon: icon,
|
|
19
|
-
buttonSize: buttonSize,
|
|
20
|
-
tooltip: tooltip,
|
|
21
|
-
toggle: !selected,
|
|
22
|
-
isToggled: selected,
|
|
23
|
-
bgColorOn: bgColorOn,
|
|
24
|
-
bgColor: bgColor,
|
|
25
|
-
iconColor: iconColor,
|
|
26
|
-
iconColorOn: iconColorOn,
|
|
27
|
-
onClick: handleClick,
|
|
28
|
-
iconSize: iconSize,
|
|
29
|
-
iconFill: fill,
|
|
30
|
-
disabled: disabled,
|
|
31
|
-
onToolTip: onToolTip
|
|
32
|
-
}), (children || label) && jsxRuntime.jsx(Label.Label, {
|
|
33
|
-
textSize: textSize,
|
|
34
|
-
borderSize: 0,
|
|
35
|
-
padding: 0,
|
|
36
|
-
onClick: handleClick,
|
|
37
|
-
children: null != children ? children : label
|
|
38
|
-
}) ]
|
|
39
|
-
});
|
|
40
|
-
};
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-CTl4GDxI.js"), FileList = require("./FileList-D5_igVaC.js"), Icon = require("./Icon-BFiN8Wzm.js"), ProgressIndicator = require("./ProgressIndicator-7pLk4Dvn.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
|
|
5
|
-
wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
|
|
6
|
-
icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
|
|
7
|
-
title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
|
|
8
|
-
message: "UploadArea-module_message__U1ZVM flexBox-module_row__z24tF",
|
|
9
|
-
files: "UploadArea-module_files__Q796x flexBox-module_column__ezvMq",
|
|
10
|
-
xs: "UploadArea-module_xs__-AoM7 type-module_body-xs-regular__ZAFft",
|
|
11
|
-
s: "UploadArea-module_s__wy1zN type-module_body-s-regular__vRHSP",
|
|
12
|
-
m: "UploadArea-module_m__bKuFN type-module_body-m-regular__LuQBA",
|
|
13
|
-
l: "UploadArea-module_l__KG9YN type-module_body-l-regular__lOYbg"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.UploadArea-module_wrapper__aircC {\n\tpadding: var(--ua-padding) !important;\n\tborder: var(--ua-border) var(--ua-border-style) var(--ua-border-color);\n\tborder-radius: var(--ua-radius);\n\tbackground: var(--ua-bg-color);\n\tgap: 8px;\n\tcursor: var(--ua-cursor);\n\twidth: var(--ua-width);\n\theight: var(--ua-height);\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.UploadArea-module_icon__M7n-m {\n\tmin-height: var(--ua-icon-size);\n\theight: var(--ua-icon-size);\n\tmin-width: var(--ua-icon-size);\n\twidth: var(--ua-icon-size);\n\tpointer-events: none;\n}\n\n.UploadArea-module_title__VbNGq {\n\tpointer-events: none;\n}\n\n.UploadArea-module_message__U1ZVM {\n\tcolor: var(--core-text-tertiary);\n\tpointer-events: none;\n\tgap: 8px;\n}\n\n.UploadArea-module_files__Q796x {\n\tmargin-top: 16px !important;\n\twidth: 100%;\n}\n\n.UploadArea-module_xs__-AoM7 {\n}\n\n.UploadArea-module_s__wy1zN {\n}\n\n.UploadArea-module_m__bKuFN {\n}\n\n.UploadArea-module_l__KG9YN {\n}\n");
|
|
17
|
-
|
|
18
|
-
const imageTypes = [ "png", "jpg", "jpeg", "gif", "svg", "heic", "heif" ], videoTypes = [ "mp4", "avi", "mov", "wmv", "flv" ], documentTypes = [ "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx" ], audioTypes = [ "mp3", "wav", "ogg", "aac", "flac" ], textTypes = [ "txt", "rtf", "md", "csv", "json", "xml" ], allTypes = [ ...imageTypes, ...videoTypes, ...documentTypes, ...audioTypes, ...textTypes ];
|
|
19
|
-
|
|
20
|
-
var FileTypes;
|
|
21
|
-
|
|
22
|
-
!function(FileTypes) {
|
|
23
|
-
FileTypes.images = "images", FileTypes.videos = "videos", FileTypes.documents = "documents",
|
|
24
|
-
FileTypes.audio = "audio", FileTypes.text = "text", FileTypes.all = "all", FileTypes.custom = "custom";
|
|
25
|
-
}(FileTypes || (FileTypes = {}));
|
|
26
|
-
|
|
27
|
-
const UploadAreaBase = React.forwardRef((props, ref) => {
|
|
28
|
-
const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", borderWidth: borderWidth, border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", borderRadius: borderRadius, radius: radius = 8, padding: padding = 32, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = React.useState(!1), inputRef = React.useRef(null), dragDepth = React.useRef(0), inputId = React.useId(), titleId = React.useId(), messageId = React.useId(), isInteractive = !busy && files.length < 1, resolvedBorderWidth = null != borderWidth ? borderWidth : border, resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, handleClickUpload = React.useCallback(() => {
|
|
29
|
-
var _a;
|
|
30
|
-
isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
|
|
31
|
-
null === (_a = inputRef.current) || void 0 === _a || _a.click());
|
|
32
|
-
}, [ isInteractive ]), handleFileInputChange = React.useCallback(e => {
|
|
33
|
-
busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
|
|
34
|
-
}, [ busy, onUpload ]), hasFilesInDrag = React.useCallback(e => {
|
|
35
|
-
var _a, _b;
|
|
36
|
-
return Array.from(null !== (_b = null === (_a = e.dataTransfer) || void 0 === _a ? void 0 : _a.types) && void 0 !== _b ? _b : []).includes("Files");
|
|
37
|
-
}, []), handleDragEnter = React.useCallback(e => {
|
|
38
|
-
e.preventDefault(), !busy && hasFilesInDrag(e) && (dragDepth.current += 1, 1 === dragDepth.current && setHovered(!0));
|
|
39
|
-
}, [ busy, hasFilesInDrag ]), handleDragLeave = React.useCallback(e => {
|
|
40
|
-
e.preventDefault(), busy || (dragDepth.current = Math.max(0, dragDepth.current - 1),
|
|
41
|
-
0 === dragDepth.current && setHovered(!1));
|
|
42
|
-
}, [ busy ]), handleDrop = React.useCallback(e => {
|
|
43
|
-
var _a;
|
|
44
|
-
if (e.preventDefault(), busy) return;
|
|
45
|
-
dragDepth.current = 0, setHovered(!1);
|
|
46
|
-
const files = Array.from(null !== (_a = e.dataTransfer.files) && void 0 !== _a ? _a : []);
|
|
47
|
-
null == onUpload || onUpload(files);
|
|
48
|
-
}, [ busy, onUpload ]), iconStrokeColor = React.useMemo(() => hovered ? iconColorHover : iconColor, [ hovered, iconColor, iconColorHover ]), cssVars = React.useMemo(() => ({
|
|
49
|
-
"--ua-border": `${resolvedBorderWidth}px`,
|
|
50
|
-
"--ua-border-style": borderStyle,
|
|
51
|
-
"--ua-border-color": hovered || busy ? borderColorHover : borderColor,
|
|
52
|
-
"--ua-radius": `${resolvedBorderRadius}px`,
|
|
53
|
-
"--ua-padding": misc.setStyle(padding),
|
|
54
|
-
"--ua-bg-color": hovered ? resolvedBackgroundColorHover : resolvedBackgroundColor,
|
|
55
|
-
"--ua-icon-size": `${iconSize}px`,
|
|
56
|
-
"--ua-cursor": busy || files.length > 0 ? "default" : "pointer",
|
|
57
|
-
"--ua-width": misc.setStyle(width),
|
|
58
|
-
"--ua-height": misc.setStyle(height)
|
|
59
|
-
}), [ resolvedBorderWidth, borderStyle, borderColor, borderColorHover, resolvedBorderRadius, padding, resolvedBackgroundColor, resolvedBackgroundColorHover, iconSize, busy, hovered, height, files.length, width ]);
|
|
60
|
-
return jsxRuntime.jsxs("div", {
|
|
61
|
-
className: css.wrapper,
|
|
62
|
-
style: cssVars,
|
|
63
|
-
ref: ref,
|
|
64
|
-
role: isInteractive ? "button" : void 0,
|
|
65
|
-
"aria-label": isInteractive ? "Click to upload files" : void 0,
|
|
66
|
-
"aria-describedby": `${titleId} ${messageId}`,
|
|
67
|
-
"aria-disabled": !isInteractive,
|
|
68
|
-
tabIndex: isInteractive ? 0 : -1,
|
|
69
|
-
onClick: isInteractive ? handleClickUpload : void 0,
|
|
70
|
-
onKeyDown: isInteractive ? e => misc.accessibleKeyDown(e, () => handleClickUpload()) : void 0,
|
|
71
|
-
onDragEnter: handleDragEnter,
|
|
72
|
-
onDragOver: e => {
|
|
73
|
-
e.preventDefault();
|
|
74
|
-
},
|
|
75
|
-
onDragLeave: handleDragLeave,
|
|
76
|
-
onDrop: handleDrop,
|
|
77
|
-
children: [ jsxRuntime.jsx("div", {
|
|
78
|
-
className: css.icon,
|
|
79
|
-
children: jsxRuntime.jsx(Icon.Icon, {
|
|
80
|
-
size: iconSize,
|
|
81
|
-
name: icon,
|
|
82
|
-
strokeColor: iconStrokeColor,
|
|
83
|
-
pointer: !1
|
|
84
|
-
})
|
|
85
|
-
}), jsxRuntime.jsx("div", {
|
|
86
|
-
id: titleId,
|
|
87
|
-
className: css.title,
|
|
88
|
-
children: title
|
|
89
|
-
}), jsxRuntime.jsxs("div", {
|
|
90
|
-
id: messageId,
|
|
91
|
-
className: `${css.message} ${css[textSize]}`,
|
|
92
|
-
children: [ busy && showProgress && jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
|
|
93
|
-
show: !0,
|
|
94
|
-
size: 20,
|
|
95
|
-
inline: !0,
|
|
96
|
-
color: iconStrokeColor
|
|
97
|
-
}), busy ? busyMessage : message ]
|
|
98
|
-
}), files.length > 0 && jsxRuntime.jsx("div", {
|
|
99
|
-
className: css.files,
|
|
100
|
-
children: jsxRuntime.jsx(FileList.FileList, {
|
|
101
|
-
files: files,
|
|
102
|
-
bgColor: "var(--core-surface-primary)",
|
|
103
|
-
size: "m",
|
|
104
|
-
direction: "column",
|
|
105
|
-
gap: 8,
|
|
106
|
-
iconSize: 24,
|
|
107
|
-
padding: "10px",
|
|
108
|
-
canRemove: canRemove
|
|
109
|
-
})
|
|
110
|
-
}), jsxRuntime.jsx("input", {
|
|
111
|
-
id: inputId,
|
|
112
|
-
ref: inputRef,
|
|
113
|
-
type: "file",
|
|
114
|
-
hidden: !0,
|
|
115
|
-
disabled: busy,
|
|
116
|
-
multiple: multiple,
|
|
117
|
-
accept: acceptedTypes ? acceptedTypes.join(", ") : void 0,
|
|
118
|
-
onChange: handleFileInputChange
|
|
119
|
-
}) ]
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
UploadAreaBase.displayName = "UploadArea";
|
|
124
|
-
|
|
125
|
-
const UploadArea = React.memo(UploadAreaBase);
|
|
126
|
-
|
|
127
|
-
exports.UploadArea = UploadArea, exports.allTypes = allTypes, exports.audioTypes = audioTypes,
|
|
128
|
-
exports.documentTypes = documentTypes, exports.imageTypes = imageTypes, exports.textTypes = textTypes,
|
|
129
|
-
exports.videoTypes = videoTypes;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.styleInject = function(css, ref) {
|
|
4
|
-
void 0 === ref && (ref = {});
|
|
5
|
-
var insertAt = ref.insertAt;
|
|
6
|
-
if (css && "undefined" != typeof document) {
|
|
7
|
-
var head = document.head || document.getElementsByTagName("head")[0], style = document.createElement("style");
|
|
8
|
-
style.type = "text/css", "top" === insertAt && head.firstChild ? head.insertBefore(style, head.firstChild) : head.appendChild(style),
|
|
9
|
-
style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));
|
|
10
|
-
}
|
|
11
|
-
};
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
|
|
3
|
-
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
|
-
import React, { useRef, useState, useMemo, useEffect, useCallback } from "react";
|
|
7
|
-
|
|
8
|
-
import { n as normalizedPercent, a as accessibleKeyDown, s as setStyle } from "./misc-Bjbro8Xe.mjs";
|
|
9
|
-
|
|
10
|
-
import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
|
|
11
|
-
|
|
12
|
-
var css_wrapper = "Avatar-module_wrapper__ab1D7 flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_user = "Avatar-module_user__ZQv0Q flexBox-module_row__z24tF type-module_body-m-regular__LuQBA";
|
|
13
|
-
|
|
14
|
-
styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Avatar-module_wrapper__ab1D7 {\n\tposition: relative;\n\tmin-height: var(--avatar-size);\n\tmin-width: var(--avatar-size);\n\tmax-height: var(--avatar-size);\n\tmax-width: var(--avatar-size);\n\theight: var(--avatar-size);\n\twidth: var(--avatar-size);\n\tborder: var(--avatar-outer-border-size) solid var(--avatar-outer-border-color);\n\tborder-radius: 100%;\n\toutline: 0;\n}\n\n.Avatar-module_user__ZQv0Q {\n\tfont-size: var(--avatar-font-size) !important;\n\theight: 100%;\n\twidth: 100%;\n\tline-height: 1em;\n\ttext-transform: uppercase;\n\tborder-radius: 100%;\n\tborder: var(--avatar-border) solid var(--avatar-border-color);\n\tbackground-color: var(--avatar-bg-color);\n\tcolor: var(--avatar-color);\n\tbackground-image: var(--avatar-bg-image);\n\tbackground-size: cover;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\ttransition: border-color var(--motion-water-duration) var(--motion-water) 0s;\n\t&:hover {\n\t\tborder-color: var(--avatar-border-color-hover);\n\t}\n}\n");
|
|
15
|
-
|
|
16
|
-
const Avatar = React.memo(props => {
|
|
17
|
-
var _a;
|
|
18
|
-
const {email: email, name: name, image: image = "", textColor: textColor, borderWidth: borderWidth, borderSize: borderSize = 0, color: color, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderSize: outerBorderSize, outerBorderColor: outerBorderColor, backgroundColor: backgroundColor, bgColor: bgColor, onClick: onClick, onKeyDown: onKeyDown, fontSize: fontSize, onToolTip: onToolTip = () => null, size: size = 34, frame: frame = 34, tabIndex: tabIndex = 0} = props, divAttributes = __rest(props, [ "email", "name", "image", "textColor", "borderWidth", "borderSize", "color", "borderColor", "borderColorHover", "outerBorderSize", "outerBorderColor", "backgroundColor", "bgColor", "onClick", "onKeyDown", "fontSize", "onToolTip", "size", "frame", "tabIndex" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = useRef(null), [textSize, setTextSize] = useState("inherit"), resolvedTextColor = null != textColor ? textColor : color, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, initials = useMemo(() => {
|
|
19
|
-
if (!name && !email) return "";
|
|
20
|
-
if (name) {
|
|
21
|
-
let last;
|
|
22
|
-
const parts = name.trim().split(" "), first = parts[0];
|
|
23
|
-
return parts.length > 1 && (last = parts.at(-1)), `${first.charAt(0)}${last ? last.charAt(0) : ""}`;
|
|
24
|
-
}
|
|
25
|
-
return email ? email.charAt(0) : void 0;
|
|
26
|
-
}, [ name, email ]), bgImage = useMemo(() => image ? `url(${image})` : "", [ image ]);
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
var _a;
|
|
29
|
-
if (void 0 !== fontSize) {
|
|
30
|
-
if ("auto" === fontSize || "number" == typeof fontSize && fontSize <= 1) {
|
|
31
|
-
const parentHeight = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.offsetHeight;
|
|
32
|
-
if (!parentHeight) return void setTextSize("inherit");
|
|
33
|
-
let size = .5;
|
|
34
|
-
"number" == typeof fontSize && (size = fontSize);
|
|
35
|
-
const fSize = Math.round(parentHeight * size);
|
|
36
|
-
return void setTextSize(fSize);
|
|
37
|
-
}
|
|
38
|
-
if ("string" == typeof fontSize && fontSize.includes("%")) {
|
|
39
|
-
const normalized = normalizedPercent(fontSize);
|
|
40
|
-
return void setTextSize(normalized);
|
|
41
|
-
}
|
|
42
|
-
setTextSize(fontSize);
|
|
43
|
-
} else setTextSize("inherit");
|
|
44
|
-
}, [ fontSize ]);
|
|
45
|
-
const displayContent = useMemo(() => image ? null : initials, [ image, initials ]), onMouseEnter = useCallback(event => {
|
|
46
|
-
var _a;
|
|
47
|
-
const payload = {
|
|
48
|
-
label: null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : ""
|
|
49
|
-
};
|
|
50
|
-
onToolTip({
|
|
51
|
-
payload: payload,
|
|
52
|
-
event: event
|
|
53
|
-
});
|
|
54
|
-
}, [ name, email, onToolTip ]), onMouseLeave = useCallback(() => {
|
|
55
|
-
onToolTip(null);
|
|
56
|
-
}, [ onToolTip ]), handleKeyDown = useCallback(event => {
|
|
57
|
-
null == onKeyDown || onKeyDown(event), onClick && !event.defaultPrevented && accessibleKeyDown(event, () => onClick(event));
|
|
58
|
-
}, [ onClick, onKeyDown ]), avatarVars = useMemo(() => ({
|
|
59
|
-
"--avatar-size": setStyle(size),
|
|
60
|
-
"--avatar-frame": setStyle(frame),
|
|
61
|
-
"--avatar-border": `${resolvedBorderWidth}px`,
|
|
62
|
-
"--avatar-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
|
|
63
|
-
"--avatar-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
|
|
64
|
-
"--avatar-border-color": null != borderColor ? borderColor : "var(--core-outline-primary)",
|
|
65
|
-
"--avatar-border-color-hover": null != borderColorHover ? borderColorHover : "var(--core-outline-special)",
|
|
66
|
-
"--avatar-bg-image": `${bgImage}`,
|
|
67
|
-
"--avatar-font-size": setStyle(textSize),
|
|
68
|
-
"--avatar-outer-border-size": setStyle(outerBorderSize),
|
|
69
|
-
"--avatar-outer-border-color": null != outerBorderColor ? outerBorderColor : "var(--core-surface-primary)"
|
|
70
|
-
}), [ size, frame, resolvedBorderWidth, resolvedTextColor, resolvedBackgroundColor, borderColor, borderColorHover, bgImage, textSize, outerBorderSize, outerBorderColor ]), classNames = useMemo(() => `${css_wrapper}${divClass}`, [ divClass ]);
|
|
71
|
-
return jsx("div", Object.assign({
|
|
72
|
-
id: divId,
|
|
73
|
-
className: classNames,
|
|
74
|
-
style: Object.assign(Object.assign({}, divStyle), avatarVars),
|
|
75
|
-
onMouseEnter: onMouseEnter,
|
|
76
|
-
onMouseLeave: onMouseLeave,
|
|
77
|
-
onClick: onClick,
|
|
78
|
-
onKeyDown: handleKeyDown,
|
|
79
|
-
role: onClick ? "button" : "img",
|
|
80
|
-
tabIndex: onClick ? tabIndex : void 0,
|
|
81
|
-
"aria-label": `User Avatar - ${null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : "Unknown User"}`
|
|
82
|
-
}, rest, {
|
|
83
|
-
children: jsx("div", {
|
|
84
|
-
ref: ref,
|
|
85
|
-
"aria-hidden": !0,
|
|
86
|
-
className: css_user,
|
|
87
|
-
children: displayContent
|
|
88
|
-
})
|
|
89
|
-
}));
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
export { Avatar as A };
|