@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
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { motion } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import React, { useRef, useState, useEffect, useCallback, useMemo } from "react";
|
|
9
|
+
|
|
10
|
+
import { B as Badge } from "./Badge-pLwG0zm7.mjs";
|
|
11
|
+
|
|
12
|
+
import { D as Dot } from "./Dot-h26m47Z-.mjs";
|
|
13
|
+
|
|
14
|
+
import { I as Icon } from "./Icon-DjW0Krm8.mjs";
|
|
15
|
+
|
|
16
|
+
import { T as ToolTipType } from "./sharedTypes-U5H1I85x.mjs";
|
|
17
|
+
|
|
18
|
+
var css_button = "IconButton-module_button__rziqa flexBox-module_row__z24tF", css_label = "IconButton-module_label__qWGFD flexBox-module_row__z24tF type-module_body-l-regular__lOYbg", css_icon = "IconButton-module_icon__2DDWy flexBox-module_row__z24tF", css_count = "IconButton-module_count__6r373 flexBox-module_row__z24tF";
|
|
19
|
+
|
|
20
|
+
const IconButton = React.memo(props => {
|
|
21
|
+
const {frameSize: frameSize = 36, iconSize: iconSize = 20, round: round = !0, icon: icon = "more", borderRadius: borderRadius = 4, border: border = !1, tooltip: tooltip, color: color, colorOn: colorOn, iconFill: iconFill = !1, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorOn: bgColorOn = "var(--core-outline-primary)", iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-primary)", transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, fillColor: fillColor, label: label, hover: hover = !0, count: count = 0, toggle: toggle = !1, toggleIcon: toggleIcon = !1, isToggled: isToggled = !1, disabled: disabled = !1, showDot: showDot = !1, buttonSize: buttonSize = "m", onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = __rest(props, [ "frameSize", "iconSize", "round", "icon", "borderRadius", "border", "tooltip", "color", "colorOn", "iconFill", "bgColor", "bgColorHover", "bgColorOn", "iconColor", "iconColorOn", "iconColorHover", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "buttonSize", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = useRef(null), [on, setOn] = useState(isToggled), [hovered, setHovered] = useState(!1);
|
|
22
|
+
useEffect(() => setOn(isToggled), [ isToggled ]);
|
|
23
|
+
const handleClick = useCallback(e => {
|
|
24
|
+
disabled || (tooltip && onToolTip(null), toggle && setOn(!on), onClick(e));
|
|
25
|
+
}, [ disabled, tooltip, onToolTip, on, onClick, toggle ]), handleMouseEnter = useCallback(e => {
|
|
26
|
+
if (setHovered(!0), !(null == ref ? void 0 : ref.current) || !tooltip) return;
|
|
27
|
+
const tip = {
|
|
28
|
+
type: ToolTipType.button,
|
|
29
|
+
payload: {
|
|
30
|
+
label: tooltip
|
|
31
|
+
},
|
|
32
|
+
event: e,
|
|
33
|
+
ref: ref
|
|
34
|
+
};
|
|
35
|
+
onToolTip(tip);
|
|
36
|
+
}, [ tooltip, onToolTip ]), handleMouseLeave = useCallback(() => {
|
|
37
|
+
setHovered(!1), tooltip && onToolTip(null);
|
|
38
|
+
}, [ tooltip, onToolTip ]), bgColorNormal = useMemo(() => on ? bgColorOn : null != bgColor ? bgColor : "var(--core-surface-secondary)", [ bgColorOn, bgColor, on ]), bgHoverColor = useMemo(() => hover && on ? bgColorOn : hover ? bgColorHover : null != bgColor ? bgColor : "transparent", [ hover, bgColor, bgColorOn, bgColorHover, on ]), textColor = useMemo(() => on ? colorOn : null != color ? color : "var(--core-text-primary)", [ on, colorOn, color ]), setIconColor = useMemo(() => on ? iconColorOn : hovered ? iconColorHover : null != iconColor ? iconColor : "var(--core-text-primary)", [ on, iconColorOn, iconColor, iconColorHover, hovered ]), size = useMemo(() => buttonSize ? "s" === buttonSize ? 24 : "m" === buttonSize ? 36 : "l" === buttonSize ? 44 : "xl" === buttonSize ? 56 : void 0 : frameSize, [ frameSize, buttonSize ]), cssVars = useMemo(() => ({
|
|
39
|
+
"--ib-bg-color": bgColorNormal,
|
|
40
|
+
"--ib-bg-color-hover": disabled ? bgColorNormal : bgHoverColor,
|
|
41
|
+
"--ib-icon-size": `${null != iconSize ? iconSize : 0}px`,
|
|
42
|
+
"--ib-button-size": `${null != size ? size : 0}px`,
|
|
43
|
+
"--ib-border-radius": round ? "100%" : `${null != borderRadius ? borderRadius : 0}px`,
|
|
44
|
+
"--ib-border": border ? "1px" : 0,
|
|
45
|
+
"--ib-color": textColor,
|
|
46
|
+
"--ib-cursor": disabled ? "default" : "pointer"
|
|
47
|
+
}), [ bgColorNormal, bgHoverColor, textColor, border, size, borderRadius, iconSize, round, disabled ]);
|
|
48
|
+
return jsxs(motion.button, Object.assign({
|
|
49
|
+
id: divId,
|
|
50
|
+
type: "button",
|
|
51
|
+
className: `${css_button}${divClass}`,
|
|
52
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
53
|
+
onClick: e => handleClick(e),
|
|
54
|
+
onMouseOutCapture: handleMouseLeave,
|
|
55
|
+
onMouseOverCapture: handleMouseEnter,
|
|
56
|
+
transition: transition,
|
|
57
|
+
variants: variants,
|
|
58
|
+
initial: initial,
|
|
59
|
+
animate: animate,
|
|
60
|
+
exit: exit,
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
"aria-disabled": disabled,
|
|
63
|
+
ref: ref
|
|
64
|
+
}, rest, {
|
|
65
|
+
children: [ jsx("div", {
|
|
66
|
+
className: css_icon,
|
|
67
|
+
style: {
|
|
68
|
+
opacity: disabled ? .3 : 1
|
|
69
|
+
},
|
|
70
|
+
children: jsx(Icon, {
|
|
71
|
+
name: icon,
|
|
72
|
+
strokeColor: setIconColor,
|
|
73
|
+
fillColor: fillColor,
|
|
74
|
+
disabled: disabled,
|
|
75
|
+
size: iconSize,
|
|
76
|
+
fill: iconFill,
|
|
77
|
+
toggle: !!toggleIcon && on,
|
|
78
|
+
pointer: !0
|
|
79
|
+
})
|
|
80
|
+
}), label && jsx("div", {
|
|
81
|
+
className: css_label,
|
|
82
|
+
children: label
|
|
83
|
+
}), jsx(Dot, {
|
|
84
|
+
show: showDot
|
|
85
|
+
}), 0 !== count && jsx("div", {
|
|
86
|
+
className: css_count,
|
|
87
|
+
children: jsx(Badge, {
|
|
88
|
+
variant: "light",
|
|
89
|
+
count: count,
|
|
90
|
+
hideNull: !0
|
|
91
|
+
})
|
|
92
|
+
}) ]
|
|
93
|
+
}));
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export { IconButton as I };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { useCallback, useMemo } from "react";
|
|
7
|
+
|
|
8
|
+
import { s as setStyle } from "./misc-CTGTuM2J.mjs";
|
|
9
|
+
|
|
10
|
+
var LabelBackground, css = {
|
|
11
|
+
label: "Label-module_label__RaRvM",
|
|
12
|
+
button: "Label-module_button__N8bcQ type-module_body-m-regular__LuQBA",
|
|
13
|
+
xs: "Label-module_xs__K9Ai6 type-module_body-xs-regular__ZAFft",
|
|
14
|
+
s: "Label-module_s__Zh8Gp type-module_body-s-regular__vRHSP",
|
|
15
|
+
m: "Label-module_m__BJtGL type-module_body-m-regular__LuQBA",
|
|
16
|
+
l: "Label-module_l__t70tt type-module_body-l-regular__lOYbg"
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function resolveSemanticBackground(backgroundColor) {
|
|
20
|
+
if (!backgroundColor || "string" != typeof backgroundColor) return;
|
|
21
|
+
const semanticKey = backgroundColor;
|
|
22
|
+
return LabelBackground[semanticKey] ? LabelBackground[semanticKey] : Object.values(LabelBackground).find(value => value === backgroundColor);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function Label(props) {
|
|
26
|
+
const {children: children, label: label, backgroundColor: backgroundColor, borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", bgColor: bgColor = "transparent", borderRadius: borderRadius = 4, padding: padding, textColor: textColor = "var(--core-text-primary)", textSize: textSize = "s", onClick: onClick} = props, divAttributes = __rest(props, [ "children", "label", "backgroundColor", "borderWidth", "borderSize", "borderColor", "bgColor", "borderRadius", "padding", "textColor", "textSize", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", isInteractive = Boolean(onClick), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, handleClick = useCallback(e => {
|
|
27
|
+
isInteractive && (null == onClick || onClick(e));
|
|
28
|
+
}, [ isInteractive, onClick ]), setBgColor = useMemo(() => {
|
|
29
|
+
if (!resolvedBackgroundColor) return "transparent";
|
|
30
|
+
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
31
|
+
if (!fill) return resolvedBackgroundColor;
|
|
32
|
+
switch (fill) {
|
|
33
|
+
case "red":
|
|
34
|
+
return "var(--feedback-warning)";
|
|
35
|
+
|
|
36
|
+
case "green":
|
|
37
|
+
return "var(--feedback-positive)";
|
|
38
|
+
|
|
39
|
+
case "yellow":
|
|
40
|
+
return "var(--array-yellow)";
|
|
41
|
+
|
|
42
|
+
case "grey":
|
|
43
|
+
case "white":
|
|
44
|
+
return "var(--core-surface-secondary)";
|
|
45
|
+
|
|
46
|
+
case "lightGrey":
|
|
47
|
+
return "var(--core-button-disabled)";
|
|
48
|
+
|
|
49
|
+
case "blue":
|
|
50
|
+
return "var(--core-button-primary)";
|
|
51
|
+
|
|
52
|
+
default:
|
|
53
|
+
return "var(--core-surface-primary)";
|
|
54
|
+
}
|
|
55
|
+
}, [ resolvedBackgroundColor ]), setBorderColor = useMemo(() => {
|
|
56
|
+
if (!resolvedBackgroundColor) return borderColor;
|
|
57
|
+
const fill = resolveSemanticBackground(resolvedBackgroundColor);
|
|
58
|
+
if (!fill) return borderColor;
|
|
59
|
+
switch (fill) {
|
|
60
|
+
case "red":
|
|
61
|
+
return "var(--feedback-warning)";
|
|
62
|
+
|
|
63
|
+
case "green":
|
|
64
|
+
return "var(--feedback-positive)";
|
|
65
|
+
|
|
66
|
+
case "yellow":
|
|
67
|
+
return "var(--array-yellow-label)";
|
|
68
|
+
|
|
69
|
+
case "grey":
|
|
70
|
+
case "lightGrey":
|
|
71
|
+
case "white":
|
|
72
|
+
return "var(--core-outline-primary)";
|
|
73
|
+
|
|
74
|
+
case "blue":
|
|
75
|
+
return "var(--core-button-primary)";
|
|
76
|
+
|
|
77
|
+
default:
|
|
78
|
+
return "var(--core-surface-primary)";
|
|
79
|
+
}
|
|
80
|
+
}, [ resolvedBackgroundColor, borderColor ]), setPadding = useMemo(() => padding ? setStyle(padding) : "2px 4px", [ padding ]), cssVars = useMemo(() => ({
|
|
81
|
+
"--label-padding": setPadding,
|
|
82
|
+
"--label-border-radius": setStyle(borderRadius),
|
|
83
|
+
"--label-cursor": onClick ? "pointer" : "default",
|
|
84
|
+
"--label-color": textColor,
|
|
85
|
+
"--label-bg-color": setBgColor,
|
|
86
|
+
"--label-border-size": setStyle(resolvedBorderWidth),
|
|
87
|
+
"--label-border-color": setBorderColor
|
|
88
|
+
}), [ setPadding, borderRadius, onClick, textColor, setBorderColor, setBgColor, resolvedBorderWidth ]);
|
|
89
|
+
return isInteractive ? jsx("button", Object.assign({
|
|
90
|
+
id: divId,
|
|
91
|
+
type: "button",
|
|
92
|
+
className: `${css.button} ${css[textSize]}${divClass}`,
|
|
93
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
94
|
+
"aria-label": "Label button",
|
|
95
|
+
onClick: e => handleClick(e)
|
|
96
|
+
}, rest, {
|
|
97
|
+
children: null != children ? children : label
|
|
98
|
+
})) : jsx("span", Object.assign({
|
|
99
|
+
id: divId,
|
|
100
|
+
className: `${css.label} ${css[textSize]}${divClass}`,
|
|
101
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
102
|
+
}, rest, {
|
|
103
|
+
children: null != children ? children : label
|
|
104
|
+
}));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
!function(LabelBackground) {
|
|
108
|
+
LabelBackground.red = "red", LabelBackground.yellow = "yellow", LabelBackground.green = "green",
|
|
109
|
+
LabelBackground.blue = "blue", LabelBackground.grey = "grey", LabelBackground.lightGrey = "lightGrey",
|
|
110
|
+
LabelBackground.white = "white";
|
|
111
|
+
}(LabelBackground || (LabelBackground = {}));
|
|
112
|
+
|
|
113
|
+
export { Label as L, LabelBackground as a };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
2
|
+
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
import React, { useMemo } from "react";
|
|
6
|
+
|
|
7
|
+
import { s as setStyle } from "./misc-CTGTuM2J.mjs";
|
|
8
|
+
|
|
9
|
+
import { B as Button } from "./Button-BJoMLZIs.mjs";
|
|
10
|
+
|
|
11
|
+
import { I as Icon } from "./Icon-DjW0Krm8.mjs";
|
|
12
|
+
|
|
13
|
+
import { I as IconButton } from "./IconButton-DdLhTUl0.mjs";
|
|
14
|
+
|
|
15
|
+
var css = {
|
|
16
|
+
wrapper: "Modal-module_wrapper__34Hds flexBox-module_columnBetween__ERfp7",
|
|
17
|
+
title: "Modal-module_title__A5OeE flexBox-module_rowBetween__5FEvi",
|
|
18
|
+
titleBlock: "Modal-module_titleBlock__HUepX flexBox-module_rowStart__4tcxS",
|
|
19
|
+
titleIcon: "Modal-module_titleIcon__xJYzy flexBox-module_row__z24tF",
|
|
20
|
+
content: "Modal-module_content__dWO-B flexBox-module_columnStart__C7P44",
|
|
21
|
+
actions: "Modal-module_actions__hY6zi flexBox-module_rowBetween__5FEvi",
|
|
22
|
+
leftActions: "Modal-module_leftActions__-M-DM flexBox-module_rowStart__4tcxS",
|
|
23
|
+
rightActions: "Modal-module_rightActions__IFgrN flexBox-module_rowEnd__rVdVm",
|
|
24
|
+
xs: "Modal-module_xs__iPcS9 type-module_body-xs-medium__s3KvF",
|
|
25
|
+
s: "Modal-module_s__31sYS type-module_body-s-medium__tjdFc",
|
|
26
|
+
m: "Modal-module_m__Iz82L type-module_body-m-medium__uW1on",
|
|
27
|
+
l: "Modal-module_l__pntdS type-module_body-l-medium__BqRC7",
|
|
28
|
+
xl: "Modal-module_xl__MR-68 type-module_body-xl-medium__BeyrH"
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const Modal = React.memo(props => {
|
|
32
|
+
const {children: children, id: id, className: className, style: style, minWidth: minWidth = 300, minHeight: minHeight = 200, maxHeight: maxHeight = 400, maxWidth: maxWidth = 400, padding: padding, close: close = !0, title: title, titleSize: titleSize = "l", contentSize: contentSize = "m", actions: actions, titleIcon: titleIcon, titleIconFill: titleIconFill = !0, titleBorderColor: titleBorderColor = "var(--core-outline-primary)", titleBorderWidth: titleBorderWidth = 0, actionsBorderColor: actionsBorderColor = "var(--core-outline-primary)", actionsBorderWidth: actionsBorderWidth = 0, onAction: onAction, onReject: onReject, onResolve: onResolve, onClose: onClose, onToolTip: onToolTip, onDragPointerDown: onDragPointerDown, backgroundColor: backgroundColor = "var(--core-surface-secondary)", titleColor: titleColor = "var(--core-text-special)", borderColor: borderColor = "var(--core-outline-primary)", borderRadius: borderRadius = 8, borderWidth: borderWidth = 1} = props, rest = __rest(props, [ "children", "id", "className", "style", "minWidth", "minHeight", "maxHeight", "maxWidth", "padding", "close", "title", "titleSize", "contentSize", "actions", "titleIcon", "titleIconFill", "titleBorderColor", "titleBorderWidth", "actionsBorderColor", "actionsBorderWidth", "onAction", "onReject", "onResolve", "onClose", "onToolTip", "onDragPointerDown", "backgroundColor", "titleColor", "borderColor", "borderRadius", "borderWidth" ]), modalStyle = null != style ? style : {}, modalClass = className ? ` ${className}` : "", cssVars = useMemo(() => ({
|
|
33
|
+
"--modal-min-width": setStyle(minWidth),
|
|
34
|
+
"--modal-min-height": setStyle(minHeight),
|
|
35
|
+
"--modal-max-height": setStyle(maxHeight),
|
|
36
|
+
"--modal-max-width": setStyle(maxWidth),
|
|
37
|
+
"--modal-border-color": borderColor,
|
|
38
|
+
"--modal-title-color": titleColor,
|
|
39
|
+
"--modal-border-radius": setStyle(borderRadius),
|
|
40
|
+
"--modal-border-width": setStyle(borderWidth),
|
|
41
|
+
"--modal-padding": setStyle(padding, 16),
|
|
42
|
+
"--modal-background-color": backgroundColor,
|
|
43
|
+
"--modal-title-border-color": titleBorderColor,
|
|
44
|
+
"--modal-title-border-width": setStyle(titleBorderWidth),
|
|
45
|
+
"--modal-actions-border-color": actionsBorderColor,
|
|
46
|
+
"--modal-actions-border-width": setStyle(actionsBorderWidth)
|
|
47
|
+
}), [ minWidth, minHeight, maxHeight, maxWidth, borderColor, titleColor, borderRadius, borderWidth, padding, titleBorderWidth, titleBorderColor, actionsBorderWidth, actionsBorderColor, backgroundColor ]), renderActions = position => null == actions ? void 0 : actions.map((action, index) => action.position || "left" !== position ? action.position && position !== action.position ? null : jsx(Button, {
|
|
48
|
+
variant: action.primary ? "solid" : "outline",
|
|
49
|
+
label: action.label,
|
|
50
|
+
onClick: e => (action => {
|
|
51
|
+
const resolves = !action.promise || "resolve" === action.promise, rejects = "reject" === action.promise;
|
|
52
|
+
null == onAction || onAction(action.value), resolves && (null == onResolve || onResolve(action.value)),
|
|
53
|
+
rejects && (null == onReject || onReject(new Error("Modal rejected", {
|
|
54
|
+
cause: action.value
|
|
55
|
+
})));
|
|
56
|
+
})(action),
|
|
57
|
+
round: !0 === action.round,
|
|
58
|
+
iconLeft: action.iconLeft,
|
|
59
|
+
iconRight: action.iconRight,
|
|
60
|
+
tooltip: action.tooltip,
|
|
61
|
+
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
62
|
+
}, `${action.id}_${index}`) : null);
|
|
63
|
+
return jsxs("div", Object.assign({
|
|
64
|
+
id: id,
|
|
65
|
+
className: `${css.wrapper}${modalClass}`,
|
|
66
|
+
style: Object.assign(Object.assign({}, modalStyle), cssVars)
|
|
67
|
+
}, rest, {
|
|
68
|
+
children: [ (title || close) && jsxs("div", {
|
|
69
|
+
className: `${css.title} ${css[titleSize]}`,
|
|
70
|
+
children: [ jsxs("div", {
|
|
71
|
+
className: css.titleBlock,
|
|
72
|
+
onPointerDown: onDragPointerDown,
|
|
73
|
+
children: [ titleIcon && jsx("div", {
|
|
74
|
+
className: css.titleIcon,
|
|
75
|
+
children: jsx(Icon, {
|
|
76
|
+
name: titleIcon,
|
|
77
|
+
fill: titleIconFill,
|
|
78
|
+
size: 20
|
|
79
|
+
})
|
|
80
|
+
}), title ]
|
|
81
|
+
}), close && jsx("div", {
|
|
82
|
+
className: css.close,
|
|
83
|
+
children: jsx("div", {
|
|
84
|
+
className: css.titleIcon,
|
|
85
|
+
children: jsx(IconButton, {
|
|
86
|
+
tooltip: "close",
|
|
87
|
+
icon: "x",
|
|
88
|
+
onClick: () => {
|
|
89
|
+
null == onReject || onReject(new Error("Modal was closed", {
|
|
90
|
+
cause: "user action"
|
|
91
|
+
})), null == onClose || onClose();
|
|
92
|
+
},
|
|
93
|
+
onToolTip: tip => null == onToolTip ? void 0 : onToolTip(tip)
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
}) ]
|
|
97
|
+
}), jsx("div", {
|
|
98
|
+
className: `${css.content} ${css[contentSize]}`,
|
|
99
|
+
children: children
|
|
100
|
+
}), actions && actions.length > 0 && jsxs("div", {
|
|
101
|
+
className: css.actions,
|
|
102
|
+
children: [ jsx("div", {
|
|
103
|
+
className: css.leftActions,
|
|
104
|
+
children: renderActions("left")
|
|
105
|
+
}), jsx("div", {
|
|
106
|
+
className: css.rightActions,
|
|
107
|
+
children: renderActions("right")
|
|
108
|
+
}) ]
|
|
109
|
+
}) ]
|
|
110
|
+
}));
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export { Modal as M };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
import { useDragControls, AnimatePresence, motion } from "motion/react";
|
|
4
|
+
|
|
5
|
+
import { O as Overlay } from "./Overlay-Dsy55Bxm.mjs";
|
|
6
|
+
|
|
7
|
+
import { u as useModal, a as useModalActions } from "./modalStore-Crg_QmSJ.mjs";
|
|
8
|
+
|
|
9
|
+
var css_wrapper = "ModalController-module_wrapper__HkOoX flexBox-module_row__z24tF";
|
|
10
|
+
|
|
11
|
+
const defaultTransition = {
|
|
12
|
+
ease: "easeOut",
|
|
13
|
+
duration: .25,
|
|
14
|
+
delay: .1
|
|
15
|
+
}, defaultVariants = {
|
|
16
|
+
initial: {
|
|
17
|
+
opacity: 0,
|
|
18
|
+
y: 20
|
|
19
|
+
},
|
|
20
|
+
animate: {
|
|
21
|
+
opacity: 1,
|
|
22
|
+
y: 0
|
|
23
|
+
},
|
|
24
|
+
exit: {
|
|
25
|
+
opacity: 0,
|
|
26
|
+
y: 20
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function ModalController(props) {
|
|
31
|
+
const {dragConstraintsRef: dragConstraintsRef, transition: transition = defaultTransition, variants: variants = defaultVariants, initial: initial = "initial", animate: animate = "animate", exit: exit = "exit", draggable: draggable = !0, overlayOpacity: overlayOpacity = .7, overlayColor: overlayColor = "rgb(0,0,0)"} = props, controls = useDragControls(), modal = useModal(), resolve = useModalActions().resolve, reject = useModalActions().reject, hide = useModalActions().hide, ModalComponent = null == modal ? void 0 : modal.component, modalProps = null == modal ? void 0 : modal.props;
|
|
32
|
+
return jsxs(Fragment, {
|
|
33
|
+
children: [ jsx(Overlay, {
|
|
34
|
+
show: !!modal,
|
|
35
|
+
type: "dark",
|
|
36
|
+
opacity: overlayOpacity,
|
|
37
|
+
color: overlayColor,
|
|
38
|
+
onClick: () => hide()
|
|
39
|
+
}), jsx(AnimatePresence, {
|
|
40
|
+
children: modal && ModalComponent && jsx(motion.div, {
|
|
41
|
+
className: css_wrapper,
|
|
42
|
+
variants: variants,
|
|
43
|
+
initial: initial,
|
|
44
|
+
animate: animate,
|
|
45
|
+
exit: exit,
|
|
46
|
+
transition: transition,
|
|
47
|
+
drag: draggable,
|
|
48
|
+
dragListener: !draggable && void 0,
|
|
49
|
+
dragControls: draggable ? controls : void 0,
|
|
50
|
+
dragConstraints: draggable ? dragConstraintsRef : void 0,
|
|
51
|
+
dragElastic: draggable ? 0 : void 0,
|
|
52
|
+
dragMomentum: !draggable && void 0,
|
|
53
|
+
children: jsx(ModalComponent, Object.assign({}, modalProps, {
|
|
54
|
+
onResolve: value => {
|
|
55
|
+
"function" == typeof (null == modalProps ? void 0 : modalProps.onResolve) && modalProps.onResolve(value),
|
|
56
|
+
resolve(value);
|
|
57
|
+
},
|
|
58
|
+
onReject: error => {
|
|
59
|
+
"function" == typeof (null == modalProps ? void 0 : modalProps.onReject) && modalProps.onReject(error),
|
|
60
|
+
reject(error);
|
|
61
|
+
},
|
|
62
|
+
onClose: () => {
|
|
63
|
+
"function" == typeof (null == modalProps ? void 0 : modalProps.onClose) && modalProps.onClose(),
|
|
64
|
+
hide();
|
|
65
|
+
},
|
|
66
|
+
onDragPointerDown: e => {
|
|
67
|
+
"function" == typeof (null == modalProps ? void 0 : modalProps.onDragPointerDown) && (null == modalProps || modalProps.onDragPointerDown(e)),
|
|
68
|
+
controls.start(e);
|
|
69
|
+
}
|
|
70
|
+
}))
|
|
71
|
+
})
|
|
72
|
+
}) ]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export { ModalController as M };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
7
|
+
|
|
8
|
+
import React, { useMemo, useCallback } from "react";
|
|
9
|
+
|
|
10
|
+
var css_overlay = "Overlay-module_overlay__EkbfA";
|
|
11
|
+
|
|
12
|
+
const defaultTransition = {
|
|
13
|
+
ease: "easeOut",
|
|
14
|
+
duration: .25
|
|
15
|
+
}, Overlay = React.memo(props => {
|
|
16
|
+
const {children: children, show: show = !1, type: type = "clear", global: global = !1, overlay: overlay, color: color = "rgb(0,0,0)", opacity: opacity = 0, transition: transition = defaultTransition, onClick: onClick = () => null, toggleOverlay: toggleOverlay = () => null} = props, divAttributes = __rest(props, [ "children", "show", "type", "global", "overlay", "color", "opacity", "transition", "onClick", "toggleOverlay" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", computedOpacity = useMemo(() => "clear" === type ? 0 : void 0 !== opacity ? opacity : "dark" === type ? .8 : 0, [ type, opacity ]), handleClick = useCallback(() => {
|
|
17
|
+
global && toggleOverlay(!1), onClick();
|
|
18
|
+
}, [ global, toggleOverlay, onClick ]), handleContextMenu = useCallback(e => {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
}, []), cssVars = useMemo(() => ({
|
|
21
|
+
"--overlay-color": null != color ? color : "rgb(0,0,0)"
|
|
22
|
+
}), [ color ]);
|
|
23
|
+
return jsx(AnimatePresence, {
|
|
24
|
+
initial: !1,
|
|
25
|
+
children: show && jsx(motion.div, Object.assign({
|
|
26
|
+
id: divId,
|
|
27
|
+
className: `${css_overlay}${divClass}`,
|
|
28
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
29
|
+
initial: {
|
|
30
|
+
opacity: 0
|
|
31
|
+
},
|
|
32
|
+
animate: {
|
|
33
|
+
opacity: computedOpacity
|
|
34
|
+
},
|
|
35
|
+
exit: {
|
|
36
|
+
opacity: 0
|
|
37
|
+
},
|
|
38
|
+
onClick: handleClick,
|
|
39
|
+
transition: transition,
|
|
40
|
+
onContextMenu: handleContextMenu
|
|
41
|
+
}, rest, {
|
|
42
|
+
children: children
|
|
43
|
+
}))
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export { Overlay as O };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
3
|
+
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
import React, { useState, useMemo, useEffect, useCallback } from "react";
|
|
7
|
+
|
|
8
|
+
import { a as accessibleKeyDown } from "./misc-CTGTuM2J.mjs";
|
|
9
|
+
|
|
10
|
+
var css_wrapper = "Pager-module_wrapper__eutVg flexBox-module_row__z24tF", css_bullet = "Pager-module_bullet__TxyR5 flexBox-module_row__z24tF", css_selected = "Pager-module_selected__C6xbR";
|
|
11
|
+
|
|
12
|
+
const Pager = React.memo(props => {
|
|
13
|
+
const {size: size = 8, index: index = 0, color: color, colorHover: colorHover, colorOn: colorOn, pages: pages = 2, gap: gap = 4, onChange: onChange = () => null} = props, divAttributes = __rest(props, [ "size", "index", "color", "colorHover", "colorOn", "pages", "gap", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [selected, setSelected] = useState(index), bullets = useMemo(() => Array.from({
|
|
14
|
+
length: pages
|
|
15
|
+
}, (_, i) => i), [ pages ]);
|
|
16
|
+
useEffect(() => setSelected(index), [ index ]);
|
|
17
|
+
const handleClick = useCallback(i => {
|
|
18
|
+
setSelected(i), onChange(i);
|
|
19
|
+
}, [ onChange ]), cssVars = useMemo(() => ({
|
|
20
|
+
"--pager-gap": `${gap}px`,
|
|
21
|
+
"--pager-size": `${size}px`,
|
|
22
|
+
"--pager-color": null != color ? color : "var(--core-text-disabled)",
|
|
23
|
+
"--pager-colorOn": null != colorOn ? colorOn : "var(--core-text-primary)",
|
|
24
|
+
"--pager-colorHover": null != colorHover ? colorHover : "var(--core-text-disabled)"
|
|
25
|
+
}), [ gap, size, color, colorOn, colorHover ]);
|
|
26
|
+
return jsx("div", Object.assign({
|
|
27
|
+
id: divId,
|
|
28
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
29
|
+
className: `${css_wrapper}${divClass}`
|
|
30
|
+
}, rest, {
|
|
31
|
+
children: bullets.map(bulletId => jsx("input", {
|
|
32
|
+
className: `${css_bullet} ${selected === bulletId ? css_selected : ""}`,
|
|
33
|
+
type: "button",
|
|
34
|
+
onClick: () => handleClick(bulletId),
|
|
35
|
+
onKeyDown: e => accessibleKeyDown(e, () => handleClick(bulletId)),
|
|
36
|
+
onTouchStart: () => handleClick(bulletId),
|
|
37
|
+
tabIndex: bulletId
|
|
38
|
+
}, `paging_bullet_${bulletId}`))
|
|
39
|
+
}));
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export { Pager as P };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
import React, { useState, useEffect, useMemo, useId, useRef } from "react";
|
|
5
|
+
|
|
6
|
+
import { useTheme } from "../hooks/useTheme.mjs";
|
|
7
|
+
|
|
8
|
+
import "../theme/colors.mjs";
|
|
9
|
+
|
|
10
|
+
import { a as __rest } from "./tslib.es6-BX2F90pK.mjs";
|
|
11
|
+
|
|
12
|
+
import "../hooks/useWindow.mjs";
|
|
13
|
+
|
|
14
|
+
import { I as Icon } from "./Icon-DjW0Krm8.mjs";
|
|
15
|
+
|
|
16
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
17
|
+
|
|
18
|
+
var css$1_wrapper = "DoneCheck-module_wrapper__AlISD flexBox-module_row__z24tF", css$1_icon = "DoneCheck-module_icon__bKaFp flexBox-module_row__z24tF";
|
|
19
|
+
|
|
20
|
+
const DoneCheck = React.memo(props => {
|
|
21
|
+
const theme = useTheme(), {size: size = 88, stroke: stroke = 1.5, color: color = theme.current.colors["feedback-positive"], play: play = !0, delay: delay = 5, duration: duration = 1, didStart: didStart, didEnd: didEnd} = props, [playing, setPlaying] = useState(!play);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
let frameOne = 0, frameTwo = 0;
|
|
24
|
+
return play ? (setPlaying(!1), frameOne = requestAnimationFrame(() => {
|
|
25
|
+
frameTwo = requestAnimationFrame(() => {
|
|
26
|
+
setPlaying(!0);
|
|
27
|
+
});
|
|
28
|
+
})) : setPlaying(!0), () => {
|
|
29
|
+
frameOne && cancelAnimationFrame(frameOne), frameTwo && cancelAnimationFrame(frameTwo);
|
|
30
|
+
};
|
|
31
|
+
}, [ play ]);
|
|
32
|
+
const transition = useMemo(() => `scale ${duration}s var(--motion-spring) ${delay}s`, [ delay, duration ]), cssVars = useMemo(() => ({
|
|
33
|
+
"--icon-size": `${size}px`,
|
|
34
|
+
"--icon-scale": playing ? 1 : 0,
|
|
35
|
+
"--icon-transition": play ? transition : "unset"
|
|
36
|
+
}), [ size, playing, play, transition ]);
|
|
37
|
+
return jsx("div", {
|
|
38
|
+
className: css$1_wrapper,
|
|
39
|
+
role: "status",
|
|
40
|
+
"aria-live": "polite",
|
|
41
|
+
children: jsx("div", {
|
|
42
|
+
className: css$1_icon,
|
|
43
|
+
style: cssVars,
|
|
44
|
+
onTransitionEnd: () => null == didEnd ? void 0 : didEnd(),
|
|
45
|
+
onTransitionStart: () => null == didStart ? void 0 : didStart(),
|
|
46
|
+
children: jsx(Icon, {
|
|
47
|
+
name: "check circle",
|
|
48
|
+
size: size,
|
|
49
|
+
color: color,
|
|
50
|
+
stroke: stroke,
|
|
51
|
+
strokeColor: color
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
var css_container = "ProgressIndicator-module_container__pW2gW flexBox-module_column__ezvMq";
|
|
58
|
+
|
|
59
|
+
function ProgressIndicator(props) {
|
|
60
|
+
const theme = useTheme(), {size: size = 20, inset: inset = !0, secondsPerSpin: secondsPerSpin = 1, show: show = !1, color: color = theme.current.colors["core-icon-primary"], stroke: stroke = 1.5, inline: inline = !1, duration: duration, didStart: didStart = () => null, didStop: didStop = () => null} = props, divAttributes = __rest(props, [ "size", "inset", "secondsPerSpin", "show", "color", "stroke", "inline", "duration", "didStart", "didStop" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [playing, setPlaying] = useState(show), gradientId = useId().replace(/:/g, ""), timer = useRef(null);
|
|
61
|
+
useEffect(() => (show ? (setPlaying(!0), didStart(), duration && (timer.current = setTimeout(() => {
|
|
62
|
+
setPlaying(!1), didStop();
|
|
63
|
+
}, 1e3 * duration))) : (setPlaying(!1), didStop()), () => {
|
|
64
|
+
(null == timer ? void 0 : timer.current) && clearTimeout(timer.current);
|
|
65
|
+
}), [ show, didStart, didStop, duration ]);
|
|
66
|
+
const cssVars = useMemo(() => ({
|
|
67
|
+
"--pi-position": inline ? "relative" : "absolute",
|
|
68
|
+
"--pi-inset": inline ? "unset" : "0",
|
|
69
|
+
"--pi-icon-size": `${null != size ? size : 0}px`,
|
|
70
|
+
"--pi-display": inline ? "inline-flex" : "flex"
|
|
71
|
+
}), [ inline, size ]), openCircle = useMemo(() => OpenCircle(size, secondsPerSpin, color, stroke, playing, inset, gradientId), [ size, secondsPerSpin, color, stroke, playing, inset, gradientId ]);
|
|
72
|
+
return jsx(AnimatePresence, {
|
|
73
|
+
initial: !0,
|
|
74
|
+
children: show && jsx(motion.div, Object.assign({
|
|
75
|
+
id: divId,
|
|
76
|
+
className: `${css_container}${divClass}`,
|
|
77
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
78
|
+
initial: {
|
|
79
|
+
opacity: 0
|
|
80
|
+
},
|
|
81
|
+
animate: {
|
|
82
|
+
opacity: 1
|
|
83
|
+
},
|
|
84
|
+
exit: {
|
|
85
|
+
opacity: 0
|
|
86
|
+
}
|
|
87
|
+
}, rest, {
|
|
88
|
+
children: openCircle
|
|
89
|
+
}))
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const OpenCircle = (size, secondsPerSpin, color, stroke = 1.5, playing = !1, inset = !0, gradientId = "strokeFill") => {
|
|
94
|
+
const edgeRadius = 10 - stroke / 2, edgeStartX = 10 + edgeRadius * Math.cos(-.4), edgeStartY = 10 + edgeRadius * Math.sin(-.4), path = inset ? "M 17.371 6.886 C 17.776 7.843 18 8.895 18 10 C 18 14.418 14.418 18 10 18 C 5.582 18 2 14.418 2 10 C 2 5.582 5.582 2 10 2" : `M ${edgeStartX.toFixed(3)} ${edgeStartY.toFixed(3)} A ${edgeRadius.toFixed(3)} ${edgeRadius.toFixed(3)} 0 1 1 10 ${(10 - edgeRadius).toFixed(3)}`;
|
|
95
|
+
return jsxs(motion.svg, {
|
|
96
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
97
|
+
width: size,
|
|
98
|
+
height: size,
|
|
99
|
+
viewBox: "0 0 20 20",
|
|
100
|
+
role: "img",
|
|
101
|
+
"aria-label": "Loading spinner",
|
|
102
|
+
transition: {
|
|
103
|
+
ease: "linear",
|
|
104
|
+
repeatType: "loop",
|
|
105
|
+
repeat: playing ? Number.POSITIVE_INFINITY : 0,
|
|
106
|
+
duration: secondsPerSpin
|
|
107
|
+
},
|
|
108
|
+
animate: playing ? {
|
|
109
|
+
rotate: 360
|
|
110
|
+
} : {
|
|
111
|
+
rotate: 0
|
|
112
|
+
},
|
|
113
|
+
children: [ jsx("title", {
|
|
114
|
+
children: "Loading"
|
|
115
|
+
}), jsx("defs", {
|
|
116
|
+
children: jsxs("linearGradient", {
|
|
117
|
+
id: gradientId,
|
|
118
|
+
x1: "0",
|
|
119
|
+
y1: "0",
|
|
120
|
+
x2: "20",
|
|
121
|
+
y2: "0",
|
|
122
|
+
gradientUnits: "userSpaceOnUse",
|
|
123
|
+
children: [ jsx("stop", {
|
|
124
|
+
offset: "0%",
|
|
125
|
+
stopColor: color,
|
|
126
|
+
stopOpacity: 1
|
|
127
|
+
}), jsx("stop", {
|
|
128
|
+
offset: "50%",
|
|
129
|
+
stopColor: color,
|
|
130
|
+
stopOpacity: 1
|
|
131
|
+
}), jsx("stop", {
|
|
132
|
+
offset: "100%",
|
|
133
|
+
stopColor: color,
|
|
134
|
+
stopOpacity: 0
|
|
135
|
+
}) ]
|
|
136
|
+
})
|
|
137
|
+
}), jsx(motion.path, {
|
|
138
|
+
d: path,
|
|
139
|
+
fill: "transparent",
|
|
140
|
+
strokeWidth: stroke,
|
|
141
|
+
stroke: `url(#${gradientId})`
|
|
142
|
+
}) ]
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
export { DoneCheck as D, ProgressIndicator as P };
|