@apple-pie/slice 0.1.30 → 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 +10 -1
- 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-DhGp_qLw.js → AvatarGroup-DMy34q7_.js} +1 -3
- package/dist/cjs/chunks/Badge-D2TbyfJS.js +22 -0
- package/dist/cjs/chunks/{Button-PsJx1WmV.js → Button-CTsHZBEB.js} +1 -3
- package/dist/cjs/chunks/{ButtonBar-8zm6a_h7.js → ButtonBar-BRb1PTmw.js} +1 -3
- package/dist/cjs/chunks/{Camera-zFyIXcge.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-2cMdJQ9U.js → DivInput-Ci0gaCWL.js} +1 -3
- package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-C0MvSJOl.js} +1 -3
- package/dist/cjs/chunks/{DrggablePanel-P7TgBI3j.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-PuDoz0mF.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-BtcHXeqE.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-13xmvKnm.js → ModalController-xjflFsjF.js} +1 -3
- package/dist/cjs/chunks/{Overlay-GXu6nMnw.js → Overlay-FooE9M_s.js} +1 -3
- package/dist/cjs/chunks/Pager-B-cuwffo.js +36 -0
- package/dist/cjs/chunks/{ProgressIndicator-D06PqCQk.js → ProgressIndicator-ByZ_aYAZ.js} +2 -6
- package/dist/cjs/chunks/{PromptInput-DuE4vGxR.js → PromptInput--grtHPvy.js} +2 -4
- package/dist/cjs/chunks/RadioButton-DP2X1dA_.js +55 -0
- package/dist/cjs/chunks/{RadioButtonList-N7Fmvr5W.js → RadioButtonList-COGNW5y3.js} +1 -2
- package/dist/cjs/chunks/{Slider-BSy8xciG.js → Slider-G1a8UKef.js} +1 -3
- 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-BtFfMwiB.js → TabBar-C1HkBaxE.js} +2 -4
- package/dist/cjs/chunks/TextArea-BEmNI_HZ.js +74 -0
- package/dist/cjs/chunks/{TextField-Bh2EA082.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-QpU0XEOW.js → misc-DZAbObFp.js} +1 -1
- package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Bq7sVvyA.js} +2 -2
- package/dist/cjs/chunks/{uploads-worker-Az040BSN.js → uploads-worker-CD-annza.js} +1 -1
- package/dist/cjs/chunks/{uploadsStore-8mOTz0Qe.js → uploadsStore-CUeB10zx.js} +2 -2
- package/dist/cjs/chunks/{volumeStore-Pv23v12t.js → volumeStore-roYTyKJ2.js} +1 -1
- 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 +7 -8
- package/dist/cjs/components/ModalController/index.js +4 -4
- package/dist/cjs/components/Overlay/index.js +3 -3
- package/dist/cjs/components/Pager/index.js +3 -4
- package/dist/cjs/components/Progress/index.js +5 -6
- package/dist/cjs/components/PromptInput/index.js +9 -10
- package/dist/cjs/components/RadioButton/index.js +7 -7
- package/dist/cjs/components/RadioButtonList/index.js +8 -8
- package/dist/cjs/components/Slider/index.js +4 -5
- package/dist/cjs/components/Spacer/index.js +2 -2
- package/dist/cjs/components/Switch/index.js +3 -3
- package/dist/cjs/components/TabBar/index.js +9 -9
- package/dist/cjs/components/TextArea/index.js +8 -8
- package/dist/cjs/components/Textfield/index.js +9 -9
- package/dist/cjs/components/Tip/index.js +3 -4
- package/dist/cjs/components/Toast/index.js +7 -8
- package/dist/cjs/components/ToggleButton/index.js +8 -8
- package/dist/cjs/components/UploadArea/index.js +7 -7
- package/dist/cjs/hooks/useAudioRecorder.js +1 -1
- package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
- package/dist/cjs/hooks/useMicrophone.js +1 -1
- package/dist/cjs/hooks/useObserveTheme.js +3 -3
- package/dist/cjs/hooks/useTheme.js +2 -3
- package/dist/cjs/hooks/useTrackRenders.js +2 -2
- package/dist/cjs/hooks.js +3 -3
- package/dist/cjs/index.js +6 -6
- 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 +1 -1
- package/dist/cjs/stores/tip.js +1 -1
- package/dist/cjs/stores/toast.js +1 -1
- package/dist/cjs/stores/uploads.js +2 -2
- package/dist/cjs/stores/volume.js +2 -2
- package/dist/cjs/stores/window.js +2 -2
- package/dist/cjs/stores.js +4 -4
- 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-C7YRtPmJ.mjs → AvatarGroup-CZBtWjnj.mjs} +2 -6
- package/dist/esm/chunks/Badge-pLwG0zm7.mjs +26 -0
- package/dist/esm/chunks/{Button-BQS3rwrS.mjs → Button-BJoMLZIs.mjs} +6 -10
- package/dist/esm/chunks/{ButtonBar-GLNRjmjv.mjs → ButtonBar-BO2RUJ8R.mjs} +3 -7
- package/dist/esm/chunks/{Camera-CAp0Y2gN.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-g6F1YWTo.mjs → DivInput-D0YzSWjJ.mjs} +2 -6
- package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-h26m47Z-.mjs} +1 -5
- package/dist/esm/chunks/{DrggablePanel-C0AmJy8g.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-BQ2zZIW5.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--RjjODc9.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-BO5FkAqu.mjs → ModalController-C1BnM5Dz.mjs} +2 -6
- package/dist/esm/chunks/{Overlay-sXM7cEYc.mjs → Overlay-Dsy55Bxm.mjs} +1 -5
- package/dist/esm/chunks/Pager-BqSdwL0L.mjs +42 -0
- package/dist/esm/chunks/{ProgressIndicator-B5oByN3i.mjs → ProgressIndicator-BnqZFATV.mjs} +2 -8
- package/dist/esm/chunks/{PromptInput-Cwd53ux7.mjs → PromptInput-CRkcPXJu.mjs} +3 -7
- package/dist/esm/chunks/RadioButton-DXq3yniV.mjs +63 -0
- package/dist/esm/chunks/{RadioButtonList-C_heuiis.mjs → RadioButtonList-BgOskHCP.mjs} +3 -6
- package/dist/esm/chunks/{Slider-XEV0D2Rd.mjs → Slider-DPOy9uNI.mjs} +3 -7
- 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-kPZ6ZJxr.mjs → TabBar-RBXExqMK.mjs} +5 -9
- package/dist/esm/chunks/TextArea-CIlx_P26.mjs +80 -0
- package/dist/esm/chunks/{TextField-DwVKlLI_.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-wS74txaa.mjs → misc-CTGTuM2J.mjs} +1 -1
- package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-Dow4NXkZ.mjs} +2 -2
- package/dist/esm/chunks/{uploads-worker-CYp-F4dz.mjs → uploads-worker-Dhyp4ot3.mjs} +1 -1
- package/dist/esm/chunks/{uploadsStore-DeRMJ5c9.mjs → uploadsStore-DT4lFybE.mjs} +1 -1
- package/dist/esm/chunks/{volumeStore-BX7QcrL-.mjs → volumeStore-RAxdmQ60.mjs} +1 -1
- 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 +10 -12
- package/dist/esm/components/ModalController/index.mjs +4 -6
- package/dist/esm/components/Overlay/index.mjs +2 -4
- package/dist/esm/components/Pager/index.mjs +3 -5
- package/dist/esm/components/Progress/index.mjs +4 -6
- package/dist/esm/components/PromptInput/index.mjs +11 -13
- package/dist/esm/components/RadioButton/index.mjs +4 -6
- package/dist/esm/components/RadioButtonList/index.mjs +5 -7
- package/dist/esm/components/Slider/index.mjs +4 -6
- package/dist/esm/components/Spacer/index.mjs +2 -2
- package/dist/esm/components/Switch/index.mjs +2 -4
- package/dist/esm/components/TabBar/index.mjs +8 -10
- package/dist/esm/components/TextArea/index.mjs +9 -11
- package/dist/esm/components/Textfield/index.mjs +10 -12
- package/dist/esm/components/Tip/index.mjs +3 -5
- package/dist/esm/components/Toast/index.mjs +5 -7
- package/dist/esm/components/ToggleButton/index.mjs +9 -11
- package/dist/esm/components/UploadArea/index.mjs +9 -11
- package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
- package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
- package/dist/esm/hooks/useMicrophone.mjs +1 -1
- package/dist/esm/hooks/useObserveTheme.mjs +0 -2
- package/dist/esm/hooks/useTheme.mjs +0 -2
- package/dist/esm/hooks/useTrackRenders.mjs +2 -2
- package/dist/esm/hooks.mjs +2 -4
- package/dist/esm/index.mjs +48 -50
- 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 +1 -1
- package/dist/esm/stores/tip.mjs +1 -1
- package/dist/esm/stores/toast.mjs +1 -1
- package/dist/esm/stores/uploads.mjs +3 -3
- package/dist/esm/stores/volume.mjs +2 -2
- package/dist/esm/stores/window.mjs +2 -2
- package/dist/esm/stores.mjs +13 -13
- 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/_types.d.ts +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/providers/ThemeProvider.d.ts +0 -6
- package/package.json +8 -3
- package/dist/cjs/chunks/Avatar-CqUSRzVd.js +0 -84
- package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
- package/dist/cjs/chunks/CheckBox-Cbh6UK-7.js +0 -53
- package/dist/cjs/chunks/Chip-DcS8dtW2.js +0 -79
- package/dist/cjs/chunks/DropDown-B0970yVe.js +0 -105
- package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
- package/dist/cjs/chunks/FileList-sDq1jK0b.js +0 -225
- package/dist/cjs/chunks/Grouper-Ccd-x_Nb.js +0 -63
- package/dist/cjs/chunks/IconButton-CF4cR7Tr.js +0 -84
- package/dist/cjs/chunks/Label-htjXHiQ4.js +0 -103
- package/dist/cjs/chunks/Modal-C0Z59meI.js +0 -101
- package/dist/cjs/chunks/Pager-D2_fshTy.js +0 -38
- package/dist/cjs/chunks/RadioButton-DPB2ZGVf.js +0 -56
- package/dist/cjs/chunks/TextArea-CRiPRF8v.js +0 -76
- package/dist/cjs/chunks/Tip-C5keUoHx.js +0 -90
- package/dist/cjs/chunks/Toast-CyiFOsI3.js +0 -178
- package/dist/cjs/chunks/ToggleButton-D5_WnW0o.js +0 -40
- package/dist/cjs/chunks/UploadArea-KqES_OLl.js +0 -129
- package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
- package/dist/esm/chunks/Avatar-29zhNfxX.mjs +0 -92
- package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
- package/dist/esm/chunks/CheckBox-7TiT2U47.mjs +0 -65
- package/dist/esm/chunks/Chip-CKsojimU.mjs +0 -91
- package/dist/esm/chunks/DropDown-mwo8fY7p.mjs +0 -115
- package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
- package/dist/esm/chunks/FileList-fh-x9Dzm.mjs +0 -235
- package/dist/esm/chunks/Grouper-naJMvpB9.mjs +0 -77
- package/dist/esm/chunks/IconButton-ByBYppAj.mjs +0 -100
- package/dist/esm/chunks/Label-C04tD7UZ.mjs +0 -116
- package/dist/esm/chunks/Modal-B9ad9OfJ.mjs +0 -115
- package/dist/esm/chunks/Pager-Bz0FpgO5.mjs +0 -46
- package/dist/esm/chunks/RadioButton-CLeRiZ8x.mjs +0 -66
- package/dist/esm/chunks/TextArea-CxscPLwN.mjs +0 -84
- package/dist/esm/chunks/Tip-C6EcX7_M.mjs +0 -100
- package/dist/esm/chunks/Toast-D4uMNvaa.mjs +0 -192
- package/dist/esm/chunks/ToggleButton-C0QIflzX.mjs +0 -51
- package/dist/esm/chunks/UploadArea-je-1NhGb.mjs +0 -139
- package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
- /package/dist/cjs/chunks/{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/{modalStore-7VjHHM8X.js → modalStore-D4bOjuWd.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/{modalStore-BpWnLtOF.mjs → modalStore-Crg_QmSJ.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
package/README.md
CHANGED
|
@@ -27,6 +27,7 @@ npm install zustand
|
|
|
27
27
|
## Quick Start
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
+
import '@apple-pie/slice/styles.css';
|
|
30
31
|
import { Avatar, Button, ThemeProvider, useTheme } from '@apple-pie/slice';
|
|
31
32
|
|
|
32
33
|
function ThemeToggle() {
|
|
@@ -50,7 +51,15 @@ export default function App() {
|
|
|
50
51
|
}
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
Slice styles are loaded from `@apple-pie/slice/styles.css`.
|
|
55
|
+
|
|
56
|
+
Slice uses Funnel Sans as its default typeface. Load the font in your app so the theme typography renders correctly.
|
|
57
|
+
|
|
58
|
+
```css
|
|
59
|
+
@import url("https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap");
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`ThemeProvider` is the default theme bootstrap for the library. It sets the active `data-slice-theme` value on the document root and renders a `data-slice-theme-scope` wrapper. When `global` is enabled, it also applies the active theme's `core-surface-primary` color to the root document element and `document.body` backgrounds. In Safari, this also drives the browser header color.
|
|
54
63
|
|
|
55
64
|
## Modal System
|
|
56
65
|
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
5
|
|
|
6
6
|
require("../theme/colors.js");
|
|
7
7
|
|
|
8
|
-
var colors = require("./colors-
|
|
8
|
+
var colors = require("./colors-B0_3srZN.js"), audioVisualizer = require("./audioVisualizer-MOSbvvnZ.js");
|
|
9
9
|
|
|
10
10
|
require("../hooks/useWindow.js");
|
|
11
11
|
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
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}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n\tz-index: var(--elevation-status);\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
|
|
12
|
+
var css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
|
|
15
13
|
|
|
16
14
|
const AudioBubble = React.memo(props => {
|
|
17
15
|
const {current: current} = hooks_useTheme.useTheme(), color = current.colors["core-text-primary"], {audioStream: audioStream, playing: playing = !1, size: size = 64, backgroundColor: backgroundColor = "var(--core-text-primary)", glow: glow = !0, glowColor: glowColor = colors.addOpacity(color, .1), glowSize: glowSize = 48, glowOffset: glowOffset = 18, minScale: minScale = 1, maxScale: maxScale = 3, intensity: intensity = 2.2, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, ReleasePerSeconds: ReleasePerSeconds = 1.5} = props, divAttributes = tslib_es6.__rest(props, [ "audioStream", "playing", "size", "backgroundColor", "glow", "glowColor", "glowSize", "glowOffset", "minScale", "maxScale", "intensity", "peakIntensity", "risePerSeconds", "ReleasePerSeconds" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = React.useRef(null), [scale, setScale] = React.useState(minScale), visualizerSettings = React.useMemo(() => ({
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), 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";
|
|
5
|
+
|
|
6
|
+
const Avatar = React.memo(props => {
|
|
7
|
+
var _a;
|
|
8
|
+
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 = tslib_es6.__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 = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = React.useRef(null), [textSize, setTextSize] = React.useState("inherit"), resolvedTextColor = null != textColor ? textColor : color, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, initials = React.useMemo(() => {
|
|
9
|
+
if (!name && !email) return "";
|
|
10
|
+
if (name) {
|
|
11
|
+
let last;
|
|
12
|
+
const parts = name.trim().split(" "), first = parts[0];
|
|
13
|
+
return parts.length > 1 && (last = parts.at(-1)), `${first.charAt(0)}${last ? last.charAt(0) : ""}`;
|
|
14
|
+
}
|
|
15
|
+
return email ? email.charAt(0) : void 0;
|
|
16
|
+
}, [ name, email ]), bgImage = React.useMemo(() => image ? `url(${image})` : "", [ image ]);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
var _a;
|
|
19
|
+
if (void 0 !== fontSize) {
|
|
20
|
+
if ("auto" === fontSize || "number" == typeof fontSize && fontSize <= 1) {
|
|
21
|
+
const parentHeight = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.offsetHeight;
|
|
22
|
+
if (!parentHeight) return void setTextSize("inherit");
|
|
23
|
+
let size = .5;
|
|
24
|
+
"number" == typeof fontSize && (size = fontSize);
|
|
25
|
+
const fSize = Math.round(parentHeight * size);
|
|
26
|
+
return void setTextSize(fSize);
|
|
27
|
+
}
|
|
28
|
+
if ("string" == typeof fontSize && fontSize.includes("%")) {
|
|
29
|
+
const normalized = misc.normalizedPercent(fontSize);
|
|
30
|
+
return void setTextSize(normalized);
|
|
31
|
+
}
|
|
32
|
+
setTextSize(fontSize);
|
|
33
|
+
} else setTextSize("inherit");
|
|
34
|
+
}, [ fontSize ]);
|
|
35
|
+
const displayContent = React.useMemo(() => image ? null : initials, [ image, initials ]), onMouseEnter = React.useCallback(event => {
|
|
36
|
+
var _a;
|
|
37
|
+
const payload = {
|
|
38
|
+
label: null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : ""
|
|
39
|
+
};
|
|
40
|
+
onToolTip({
|
|
41
|
+
payload: payload,
|
|
42
|
+
event: event
|
|
43
|
+
});
|
|
44
|
+
}, [ name, email, onToolTip ]), onMouseLeave = React.useCallback(() => {
|
|
45
|
+
onToolTip(null);
|
|
46
|
+
}, [ onToolTip ]), handleKeyDown = React.useCallback(event => {
|
|
47
|
+
null == onKeyDown || onKeyDown(event), onClick && !event.defaultPrevented && misc.accessibleKeyDown(event, () => onClick(event));
|
|
48
|
+
}, [ onClick, onKeyDown ]), avatarVars = React.useMemo(() => ({
|
|
49
|
+
"--avatar-size": misc.setStyle(size),
|
|
50
|
+
"--avatar-frame": misc.setStyle(frame),
|
|
51
|
+
"--avatar-border": `${resolvedBorderWidth}px`,
|
|
52
|
+
"--avatar-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
|
|
53
|
+
"--avatar-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
|
|
54
|
+
"--avatar-border-color": null != borderColor ? borderColor : "var(--core-outline-primary)",
|
|
55
|
+
"--avatar-border-color-hover": null != borderColorHover ? borderColorHover : "var(--core-outline-special)",
|
|
56
|
+
"--avatar-bg-image": `${bgImage}`,
|
|
57
|
+
"--avatar-font-size": misc.setStyle(textSize),
|
|
58
|
+
"--avatar-outer-border-size": misc.setStyle(outerBorderSize),
|
|
59
|
+
"--avatar-outer-border-color": null != outerBorderColor ? outerBorderColor : "var(--core-surface-primary)"
|
|
60
|
+
}), [ size, frame, resolvedBorderWidth, resolvedTextColor, resolvedBackgroundColor, borderColor, borderColorHover, bgImage, textSize, outerBorderSize, outerBorderColor ]), classNames = React.useMemo(() => `${css_wrapper}${divClass}`, [ divClass ]);
|
|
61
|
+
return jsxRuntime.jsx("div", Object.assign({
|
|
62
|
+
id: divId,
|
|
63
|
+
className: classNames,
|
|
64
|
+
style: Object.assign(Object.assign({}, divStyle), avatarVars),
|
|
65
|
+
onMouseEnter: onMouseEnter,
|
|
66
|
+
onMouseLeave: onMouseLeave,
|
|
67
|
+
onClick: onClick,
|
|
68
|
+
onKeyDown: handleKeyDown,
|
|
69
|
+
role: onClick ? "button" : "img",
|
|
70
|
+
tabIndex: onClick ? tabIndex : void 0,
|
|
71
|
+
"aria-label": `User Avatar - ${null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : "Unknown User"}`
|
|
72
|
+
}, rest, {
|
|
73
|
+
children: jsxRuntime.jsx("div", {
|
|
74
|
+
ref: ref,
|
|
75
|
+
"aria-hidden": !0,
|
|
76
|
+
className: css_user,
|
|
77
|
+
children: displayContent
|
|
78
|
+
})
|
|
79
|
+
}));
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
exports.Avatar = Avatar;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
5
|
-
|
|
6
|
-
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}\n\n.AvatarGroup-module_wrapper__MtOyq {\n\tgap: var(--ag-gap);\n\tmargin: var(--ag-margin);\n}\n\n.AvatarGroup-module_avatar__5NVpW {\n\tdisplay: inline-block;\n\tmargin-left: var(--ag-overlap);\n\tborder-radius: 100%;\n\t&:first-child {\n\t\tmargin-left: 0;\n\t}\n}\n");
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Avatar = require("./Avatar-hP8GuwvD.js"), css_wrapper = "AvatarGroup-module_wrapper__MtOyq flexBox-module_rowStart__4tcxS", css_avatar = "AvatarGroup-module_avatar__5NVpW";
|
|
7
5
|
|
|
8
6
|
const AvatarGroup = React.memo(props => {
|
|
9
7
|
const {avatars: avatars = [], size: size = 32, borderWidth: borderWidth, borderSize: borderSize = 3, overlap: overlap = 8, gap: gap = 0, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderSize: outerBorderSize = 3, outerBorderColor: outerBorderColor = "var(--core-surface-primary)", margin: margin = 0, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "avatars", "size", "borderWidth", "borderSize", "overlap", "gap", "borderColor", "borderColorHover", "outerBorderSize", "outerBorderColor", "margin", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, cssVars = React.useMemo(() => ({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), css_badge = "Badge-module_badge__RsuMz flexBox-module_row__z24tF type-module_body-xs-medium__s3KvF";
|
|
5
|
+
|
|
6
|
+
const Badge = React.memo(props => {
|
|
7
|
+
const {count: count, variant: variant = "dark", hideNull: hideNull = !0} = props, divAttributes = tslib_es6.__rest(props, [ "count", "variant", "hideNull" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", displayCount = React.useMemo(() => void 0 === count ? "0" : "string" == typeof count ? count : count > 99 ? "99+" : count.toString(), [ count ]), cssVars = React.useMemo(() => ({
|
|
8
|
+
"--badge-color": "light" === variant ? "var(--core-text-primary)" : "var(--core-text-light)",
|
|
9
|
+
"--badge-bg": "light" === variant ? "var(--core-badge-secondary)" : "var(--core-badge-primary)"
|
|
10
|
+
}), [ variant ]);
|
|
11
|
+
return void 0 === count || "" === count || hideNull && 0 === count ? null : jsxRuntime.jsx("div", Object.assign({
|
|
12
|
+
id: divId,
|
|
13
|
+
className: `${css_badge}${divClass}`,
|
|
14
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
15
|
+
role: "status",
|
|
16
|
+
"aria-live": "polite"
|
|
17
|
+
}, rest, {
|
|
18
|
+
children: displayCount
|
|
19
|
+
}));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.Badge = Badge;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-D2TbyfJS.js"), Dot = require("./Dot-C0MvSJOl.js"), Icon = require("./Icon-BFZ_5Qv3.js"), ProgressIndicator = require("./ProgressIndicator-ByZ_aYAZ.js"), sharedTypes = require("./sharedTypes-CthHPjrO.js"), css = {
|
|
5
5
|
button: "Button-module_button__2ZuB7 flexBox-module_row__z24tF",
|
|
6
6
|
label: "Button-module_label__UJ3Zt",
|
|
7
7
|
count: "Button-module_count__DFxVB flexBox-module_row__z24tF",
|
|
@@ -12,8 +12,6 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
|
|
|
12
12
|
s: "Button-module_s__dSKOL type-module_body-s-regular__vRHSP"
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
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.Button-module_button__2ZuB7 {\n\tposition: relative;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\toutline: none;\n}\n\n.Button-module_label__UJ3Zt {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n\t&:hover {\n\t\ttext-decoration: var(--ui-button-decoration);\n\t}\n}\n\n.Button-module_count__DFxVB {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(10px) translateY(-2px);\n}\n\n.Button-module_icon__-43u5 {\n\tmin-width: var(--ui-button-icon-size);\n\tmin-height: var(--ui-button-icon-size);\n\theight: var(--ui-button-icon-size);\n\twidth: var(--ui-button-icon-size);\n}\n\n.Button-module_xs__cF6m0 {\n}\n\n.Button-module_m__DR-gs {\n}\n\n.Button-module_l__0E0yI {\n}\n\n.Button-module_s__dSKOL {\n}\n");
|
|
16
|
-
|
|
17
15
|
const ButtonComponent = React.forwardRef((props, buttonRef) => {
|
|
18
16
|
const {children: children, size: size = "medium", variant: variant = "outline", label: label, labelSize: labelSize = "m", iconRight: iconRight, iconLeft: iconLeft, iconFill: iconFill = !1, count: count = (void 0 === props.count ? void 0 : Number(props.count)), showDot: showDot, tooltip: tooltip, round: round = !1, state: state = "normal", fill: fill = !1, iconSize: iconSize = (void 0 === props.iconSize ? 20 : Number(props.iconSize)), width: width = "min-content", underline: underline = !1, borderRadius: borderRadius, iconColor: iconColor, backgroundColor: backgroundColor, backgroundColorDisabled: backgroundColorDisabled, bgColor: bgColor, bgColorDisabled: bgColorDisabled, labelColor: labelColor, transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, paddingRight: paddingRight, paddingLeft: paddingLeft, progress: progress = !1, working: working = !1, duration: duration, trigger: trigger = !1, destructive: destructive = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "children", "size", "variant", "label", "labelSize", "iconRight", "iconLeft", "iconFill", "count", "showDot", "tooltip", "round", "state", "fill", "iconSize", "width", "underline", "borderRadius", "iconColor", "backgroundColor", "backgroundColorDisabled", "bgColor", "bgColorDisabled", "labelColor", "transition", "variants", "initial", "animate", "exit", "paddingRight", "paddingLeft", "progress", "working", "duration", "trigger", "destructive", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorDisabled = null != backgroundColorDisabled ? backgroundColorDisabled : bgColorDisabled, [btnState, setBtnState] = React.useState(state), [lockedWidth, setLockedWidth] = React.useState(void 0), [playing, setPlaying] = React.useState(working), ref = React.useRef(null), lockCurrentWidth = React.useCallback(() => {
|
|
19
17
|
ref.current && setLockedWidth(ref.current.offsetWidth);
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
5
|
-
|
|
6
|
-
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}\n\n.ButtonBar-module_wrapper__FYZ3s {\n\tborder-radius: var(--bb-border-radius);\n\tborder: var(--bb-border-size) solid var(--bb-border-color);\n\toverflow: hidden;\n}\n\n.ButtonBar-module_label__UcAS1 {\n\tcolor: var(--bb-label-color);\n\tpadding-right: 4px;\n}\n\n.ButtonBar-module_button__bMR3h {\n\theight: var(--bb-button-size);\n\twidth: var(--bb-button-size);\n\tmin-height: var(--bb-button-size);\n\tmin-width: var(--bb-button-size);\n\tcursor: pointer;\n\tbackground: var(--bb-bg-color);\n\tborder: 0;\n\tborder-right: var(--bb-border-size) solid var(--bb-border-color);\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\t&:first-child {\n\t\tpadding-left: 4px;\n\t}\n\t&:last-child {\n\t\tborder-right: none;\n\t\tpadding-right: 4px;\n\t}\n\t&:hover {\n\t\tbackground: var(--bb-bg-color-hover);\n\t}\n}\n\n.ButtonBar-module_selected__wKvmi {\n\tbackground: var(--bb-bg-color-active);\n\tcolor: var(--core-link-primary);\n}\n");
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "ButtonBar-module_wrapper__FYZ3s flexBox-module_rowStart__4tcxS", css_button = "ButtonBar-module_button__bMR3h flexBox-module_row__z24tF", css_selected = "ButtonBar-module_selected__wKvmi";
|
|
7
5
|
|
|
8
6
|
const ButtonBar = React.memo(function(props) {
|
|
9
7
|
const {buttons: buttons = [], selected: selected, toggle: toggle = !0, buttonSize: buttonSize = "m", frameSize: frameSize = 36, iconSize: iconSize = 20, borderWidth: borderWidth, borderSize: borderSize = 0, borderRadius: borderRadius = 100, borderColor: borderColor = "var(--core-outline-primary)", backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, backgroundColorActive: backgroundColorActive, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorActive: bgColorActive = "var(--core-outline-primary)", labelColor: labelColor = "var(--core-text-primary)", onClick: onClick = button => null, onChange: onChange = button => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "buttons", "selected", "toggle", "buttonSize", "frameSize", "iconSize", "borderWidth", "borderSize", "borderRadius", "borderColor", "backgroundColor", "backgroundColorHover", "backgroundColorActive", "bgColor", "bgColorHover", "bgColorActive", "labelColor", "onClick", "onChange", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, resolvedBackgroundColorActive = null != backgroundColorActive ? backgroundColorActive : bgColorActive, [hovered, setHovered] = React.useState(-1), [selectedIndex, setSelectedIndex] = React.useState(selected);
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
5
|
|
|
6
6
|
require("../theme/colors.js");
|
|
7
7
|
|
|
8
|
-
var misc = require("./misc-
|
|
8
|
+
var misc = require("./misc-DZAbObFp.js"), colors = require("./colors-B0_3srZN.js");
|
|
9
9
|
|
|
10
10
|
require("../hooks/useWindow.js");
|
|
11
11
|
|
|
12
|
-
var Avatar = require("./Avatar-
|
|
13
|
-
|
|
14
|
-
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.Camera-module_wrapper__GOsKp {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: var(--core-surface-secondary);\n\toverflow: hidden;\n\tborder-radius: 4px;\n}\n\n.Camera-module_video__Q2r9B {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n}\n\n.Camera-module_controls__qXYoL {\n\tposition: absolute;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tpadding: 16px !important;\n\tgap: 16px;\n\tbackground-color: var(--camera-controls-bg);\n\ttransform: var(--camera-controls-transform);\n\ttransition: transform var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.Camera-module_controlsRight__VcIz7 {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsCenter__e-erq {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsLeft__bR4TN {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_error__t0w-d {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n\tcolor: var(--feedback-warning);\n}\n\n.Camera-module_poster__Gun-v {\n\tposition: absolute;\n\taspect-ratio: 1 / 1;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tcolor: var(--core-text-primary);\n}\n\n.Camera-module_snapshotFrame__YM6Eu {\n\tposition: absolute;\n\tmax-width: 25%;\n\theight: min-content;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 1;\n}\n\n.Camera-module_clear__aaCfT {\n\tposition: absolute;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 3;\n}\n\n.Camera-module_snapshot__odQH0 {\n\twidth: 100%;\n\tborder: 1px solid var(--core-outline-special);\n\tz-index: 2;\n}\n\n.Camera-module_toolbarButton__mnmoF {\n\tgap: 4px;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.Camera-module_buttonIcon__a-VBR {\n\tmin-height: var(--toolbar-button-size);\n\tmax-height: var(--toolbar-button-size);\n\tmin-width: var(--toolbar-button-size);\n\tmax-width: var(--toolbar-button-size);\n\tbackground: var(--toolbar-button-bg-color);\n\tborder: 1px solid transparent;\n\tborder-radius: 100%;\n\topacity: var(--toolbar-button-opacity);\n\ttransition: background, border var(--motion-water-duration)\n\t\tvar(--motion-water) 0s;\n}\n\n.Camera-module_buttonIcon__a-VBR:hover {\n\tborder: 1px solid var(--core-outline-special);\n}\n\n.Camera-module_buttonLabel__6BEs1 {\n\tcolor: var(--toolbar-button-label-color);\n}\n");
|
|
12
|
+
var Avatar = require("./Avatar-hP8GuwvD.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "Camera-module_wrapper__GOsKp flexBox-module_column__ezvMq", css_video = "Camera-module_video__Q2r9B", css_controls = "Camera-module_controls__qXYoL flexBox-module_rowBetween__5FEvi", css_controlsRight = "Camera-module_controlsRight__VcIz7 flexBox-module_rowEnd__rVdVm", css_controlsCenter = "Camera-module_controlsCenter__e-erq flexBox-module_row__z24tF", css_controlsLeft = "Camera-module_controlsLeft__bR4TN flexBox-module_rowStart__4tcxS", css_error = "Camera-module_error__t0w-d flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_poster = "Camera-module_poster__Gun-v flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_snapshotFrame = "Camera-module_snapshotFrame__YM6Eu flexBox-module_row__z24tF", css_clear = "Camera-module_clear__aaCfT", css_snapshot = "Camera-module_snapshot__odQH0", css_toolbarButton = "Camera-module_toolbarButton__mnmoF flexBox-module_columnStartCenter__PKcrG", css_buttonIcon = "Camera-module_buttonIcon__a-VBR flexBox-module_row__z24tF", css_buttonLabel = "Camera-module_buttonLabel__6BEs1 flexBox-module_row__z24tF type-module_body-xs-regular__ZAFft";
|
|
15
13
|
|
|
16
14
|
const Camera = React.memo(React.forwardRef((props, ref) => {
|
|
17
15
|
const videoElement = React.useRef(null), containerElement = React.useRef(null), controlsTimer = React.useRef(null), {noVideoPoster: noVideoPoster, width: width, height: height, showControlBar: showControlBar = !0, autoHideControlBar: autoHideControlBar = !0, startCameraOff: startCameraOff = !1, startAudioMuted: startAudioMuted = !1, playLocalAudio: playLocalAudio = !1, pipSnapshot: pipSnapshot = !0, userProfile: userProfile, sessionSettings: sessionSettings, onChangeProfile: onChangeProfile, onChangeSettings: onChangeSettings, onSnapshot: onSnapshot, onVideoStream: onVideoStream, onNoVideo: onNoVideo, onNoAudio: onNoAudio} = props, theme = hooks_useTheme.useTheme(), [cameraSupport, setCameraSupport] = React.useState(void 0), [cameraError, setCameraError] = React.useState(void 0), [hovered, setHovered] = React.useState(!1), [cameraOn, setCameraOn] = React.useState(!1), [micMuted, setMicMuted] = React.useState(startAudioMuted), [snapshot, setSnapshot] = React.useState(void 0), [settings, setSettings] = React.useState(!1), [profile, setProfile] = React.useState(!1), [deviceList, setDeviceList] = React.useState([]), constraints = React.useMemo(() => {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "CheckBox-module_wrapper__uRsjI flexBox-module_row__z24tF", css_icon = "CheckBox-module_icon__FoDJN flexBox-module_row__z24tF", css_label = "CheckBox-module_label__0AiBp type-module_body-m-regular__LuQBA";
|
|
5
|
+
|
|
6
|
+
const CheckBox = React.memo(props => {
|
|
7
|
+
const {size: size = 20, checked: checked = !1, disabled: disabled = !1, color: color, children: children, onChange: onChange = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "size", "checked", "disabled", "color", "children", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = React.useState(checked);
|
|
8
|
+
React.useEffect(() => setState(checked), [ checked ]);
|
|
9
|
+
const iconName = React.useMemo(() => !0 === state ? "checkbox checked" : "mixed" === state ? "checkbox partial" : "checkbox", [ state ]), iconColor = React.useMemo(() => color || (disabled ? "var(--core-icon-disabled)" : "mixed" === state ? "var(--core-icon-primary)" : state ? "var(--core-text-special)" : "var(--core-icon-secondary"), [ color, disabled, state ]), labelColor = React.useMemo(() => color || (disabled ? "var(--core-text-disabled)" : "var(--core-text-primary)"), [ color, disabled ]), cssVars = React.useMemo(() => ({
|
|
10
|
+
"--cb-size": `${size}px`,
|
|
11
|
+
"--cb-label-color": labelColor
|
|
12
|
+
}), [ size, labelColor ]), handleToggle = React.useCallback(() => {
|
|
13
|
+
if (disabled) return;
|
|
14
|
+
let newState = !1;
|
|
15
|
+
switch (state) {
|
|
16
|
+
case !0:
|
|
17
|
+
break;
|
|
18
|
+
|
|
19
|
+
case "mixed":
|
|
20
|
+
case !1:
|
|
21
|
+
newState = !0;
|
|
22
|
+
}
|
|
23
|
+
setState(newState), onChange(newState);
|
|
24
|
+
}, [ state, disabled, onChange ]);
|
|
25
|
+
return jsxRuntime.jsxs(react.motion.div, Object.assign({
|
|
26
|
+
id: divId,
|
|
27
|
+
className: `${css_wrapper}${divClass}`,
|
|
28
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
29
|
+
onClick: handleToggle,
|
|
30
|
+
onKeyDown: e => misc.accessibleKeyDown(e, handleToggle),
|
|
31
|
+
tabIndex: disabled ? -1 : 0,
|
|
32
|
+
role: "checkbox",
|
|
33
|
+
"aria-checked": state,
|
|
34
|
+
"aria-disabled": disabled,
|
|
35
|
+
"aria-label": String(children)
|
|
36
|
+
}, rest, {
|
|
37
|
+
children: [ jsxRuntime.jsx("div", {
|
|
38
|
+
className: css_icon,
|
|
39
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
40
|
+
name: iconName,
|
|
41
|
+
strokeColor: iconColor,
|
|
42
|
+
size: size
|
|
43
|
+
})
|
|
44
|
+
}), children && jsxRuntime.jsx("span", {
|
|
45
|
+
className: css_label,
|
|
46
|
+
children: children
|
|
47
|
+
}) ]
|
|
48
|
+
}));
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
exports.CheckBox = CheckBox;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), sharedTypes = require("./sharedTypes-CthHPjrO.js"), css = {
|
|
5
|
+
chip: "Chip-module_chip__0nys- flexBox-module_row__z24tF",
|
|
6
|
+
icon: "Chip-module_icon__dtR-K flexBox-module_row__z24tF",
|
|
7
|
+
xs: "Chip-module_xs__s-KNG type-module_body-xs-regular__ZAFft",
|
|
8
|
+
s: "Chip-module_s__2KTXi type-module_body-s-regular__vRHSP",
|
|
9
|
+
m: "Chip-module_m__l2u3N type-module_body-m-regular__LuQBA",
|
|
10
|
+
l: "Chip-module_l__3MqPN type-module_body-l-regular__lOYbg"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Chip = React.memo(props => {
|
|
14
|
+
const {children: children, label: label, icon: icon, tooltip: tooltip, iconSize: iconSize = 20, disabled: disabled = !1, focused: focused = !1, iconPosition: iconPosition = "left", labelSize: labelSize = "m", labelColor: labelColor = "var(--core-text-primary)", labelColorHover: labelColorHover = "var(--core-text-special)", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-text-primary)", borderColorHover: borderColorHover = "var(--core-text-special)", borderColorDisabled: borderColorDisabled = "var(--core-text-disabled)", bgColor: bgColor = "transparent", bgColorHover: bgColorHover = "var(--core-surface-secondary)", borderRadius: borderRadius = 8, paddingTop: paddingTop, paddingTops: paddingTops = 8, paddingSides: paddingSides = 16, gap: gap = 4, onToolTip: onToolTip = () => null, onClick: onClick = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "children", "label", "icon", "tooltip", "iconSize", "disabled", "focused", "iconPosition", "labelSize", "labelColor", "labelColorHover", "iconColor", "iconColorHover", "backgroundColor", "backgroundColorHover", "borderWidth", "borderSize", "borderColor", "borderColorHover", "borderColorDisabled", "bgColor", "bgColorHover", "borderRadius", "paddingTop", "paddingTops", "paddingSides", "gap", "onToolTip", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [isHovered, setIsHovered] = React.useState(!1), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedPaddingTop = null != paddingTop ? paddingTop : paddingTops, handleClick = React.useCallback(e => {
|
|
15
|
+
disabled || onClick(e);
|
|
16
|
+
}, [ disabled, onClick ]), handleMouseEnter = React.useCallback((enter, event) => {
|
|
17
|
+
if (enter) {
|
|
18
|
+
if (tooltip) {
|
|
19
|
+
const tip = {
|
|
20
|
+
type: sharedTypes.ToolTipType.button,
|
|
21
|
+
payload: {
|
|
22
|
+
label: tooltip
|
|
23
|
+
},
|
|
24
|
+
ref: null,
|
|
25
|
+
event: event
|
|
26
|
+
};
|
|
27
|
+
onToolTip(tip);
|
|
28
|
+
}
|
|
29
|
+
setIsHovered(!0);
|
|
30
|
+
} else onToolTip(null), setIsHovered(!1);
|
|
31
|
+
}, [ tooltip, onToolTip ]), padding = React.useMemo(() => {
|
|
32
|
+
if (!icon) return `${resolvedPaddingTop}px ${paddingSides}px`;
|
|
33
|
+
return `${resolvedPaddingTop}px ${"right" === iconPosition ? paddingSides - 4 : paddingSides}px ${resolvedPaddingTop}px ${"right" === iconPosition ? paddingSides : paddingSides - 4}px`;
|
|
34
|
+
}, [ icon, iconPosition, resolvedPaddingTop, paddingSides ]), computedIconColor = React.useMemo(() => disabled ? "var(--core-text-disabled)" : isHovered ? null != iconColorHover ? iconColorHover : "var(--core-text-special)" : null != iconColor ? iconColor : "var(--core-text-primary)", [ iconColor, disabled, isHovered, iconColorHover ]), cssVars = React.useMemo(() => ({
|
|
35
|
+
"--ui-chip-padding": padding,
|
|
36
|
+
"--ui-chip-gap": misc.setStyle(gap),
|
|
37
|
+
"--ui-chip-border-radius": misc.setStyle(borderRadius),
|
|
38
|
+
"--ui-chip-border-size": misc.setStyle(resolvedBorderWidth),
|
|
39
|
+
"--ui-chip-border-color": disabled ? borderColorDisabled : borderColor,
|
|
40
|
+
"--ui-chip-border-color-hover": disabled ? borderColorDisabled : borderColorHover,
|
|
41
|
+
"--ui-chip-bg-color": resolvedBackgroundColor,
|
|
42
|
+
"--ui-chip-bg-color-hover": disabled ? resolvedBackgroundColor : resolvedBackgroundColorHover,
|
|
43
|
+
"--ui-chip-label-color": disabled ? "var(--core-text-disabled)" : labelColor,
|
|
44
|
+
"--ui-chip-label-color-hover": disabled ? "var(--core-text-disabled)" : labelColorHover,
|
|
45
|
+
"--ui-chip-cursor": disabled ? "default" : "pointer"
|
|
46
|
+
}), [ padding, resolvedBackgroundColor, borderColor, borderColorDisabled, borderColorHover, resolvedBorderWidth, resolvedBackgroundColorHover, labelColorHover, labelColor, gap, borderRadius, disabled ]);
|
|
47
|
+
return jsxRuntime.jsxs("div", Object.assign({
|
|
48
|
+
id: divId,
|
|
49
|
+
className: `${css.chip}${divClass}`,
|
|
50
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars),
|
|
51
|
+
onKeyDown: e => misc.accessibleKeyDown(e, () => handleClick(e)),
|
|
52
|
+
onClick: handleClick,
|
|
53
|
+
onMouseEnter: e => handleMouseEnter(!0, e),
|
|
54
|
+
onMouseLeave: e => handleMouseEnter(!1, e)
|
|
55
|
+
}, rest, {
|
|
56
|
+
children: [ icon && "right" !== iconPosition && jsxRuntime.jsx("div", {
|
|
57
|
+
className: css.icon,
|
|
58
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
59
|
+
name: icon,
|
|
60
|
+
size: iconSize,
|
|
61
|
+
strokeColor: computedIconColor
|
|
62
|
+
})
|
|
63
|
+
}), jsxRuntime.jsx("div", {
|
|
64
|
+
className: css[labelSize],
|
|
65
|
+
children: null != children ? children : label
|
|
66
|
+
}), icon && "right" === iconPosition && jsxRuntime.jsx("div", {
|
|
67
|
+
className: css.icon,
|
|
68
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
69
|
+
name: icon,
|
|
70
|
+
size: iconSize,
|
|
71
|
+
strokeColor: computedIconColor
|
|
72
|
+
})
|
|
73
|
+
}) ]
|
|
74
|
+
}));
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
exports.Chip = Chip;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
5
|
-
|
|
6
|
-
styleInject_es.styleInject(".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.DivInput-module_wrapper__ZQxY- {\n\tpadding: var(--div-input-padding);\n\twidth: var(--div-input-width);\n\tborder-radius: var(--div-input-border-radius);\n\tbackground: var(--div-input-wrapper-bg);\n\t&:hover {\n\t\tbackground: var(--div-input-bg);\n\t}\n}\n\n.DivInput-module_input__J34-l {\n\tcolor: var(--div-input-color);\n\tuser-select: var(--div-input-user-select);\n\t-webkit-user-select: var(--div-input-user-select);\n\ttext-align: var(--div-input-text-align);\n\tpointer-events: all;\n\tbackground: transparent;\n\tborder-radius: 4px;\n\tborder: 0;\n\toutline: none;\n\ttext-overflow: ellipsis;\n\tdisplay: -webkit-box;\n\toverflow: hidden;\n\twhite-space: var(--div-input-white-space);\n\t-webkit-line-clamp: var(--div-input-line-clamp);\n\t-webkit-box-orient: vertical;\n\tcursor: var(--div-input-cursor);\n\ttransition: background var(--motion-water-duration) var(--motion-water) 0s;\n}\n");
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-DZAbObFp.js"), css_wrapper = "DivInput-module_wrapper__ZQxY-", css_input = "DivInput-module_input__J34-l type-module_body-m-regular__LuQBA";
|
|
7
5
|
|
|
8
6
|
const DivInput = React.memo(props => {
|
|
9
7
|
const {value: value = "", name: name = "Input Field", placeholder: placeholder = "Placeholder", isEditable: isEditable = !0, wrap: wrap = !1, focus: focus = !1, width: width = "auto", textAlign: textAlign = "left", clamp: clamp = 3, padding: padding = "0px", onChange: onChange = () => null, onSubmit: onSubmit = () => null, onFocus: onFocus = () => null, onBlur: onBlur = () => null, onDblClick: onDblClick = () => null, onClick: onClick = () => null, borderRadius: borderRadius, radius: radius = 4, backgroundColor: backgroundColor, bgColor: bgColor = "var(--core-surface-secondary)"} = props, divAttributes = tslib_es6.__rest(props, [ "value", "name", "placeholder", "isEditable", "wrap", "focus", "width", "textAlign", "clamp", "padding", "onChange", "onSubmit", "onFocus", "onBlur", "onDblClick", "onClick", "borderRadius", "radius", "backgroundColor", "bgColor" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = React.useRef(null), innerText = React.useRef("" === value ? misc.cleanString(placeholder) : misc.cleanString(value)), [isFocused, setIsFocused] = React.useState(focus), [text, setText] = React.useState(innerText.current), [isPlaceholder, setIsPlaceholder] = React.useState(!1), resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, setCursor = React.useCallback((to, length = 1) => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
5
|
-
|
|
6
|
-
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}.Dot-module_dot__RNz87 {\n\tdisplay: var(--dot-display);\n\tbox-sizing: content-box;\n\tposition: var(--dot-position);\n\ttop: var(--dot-top);\n\tright: var(--dot-right);\n\tvertical-align: var(--dot-vertical-align);\n\tmin-height: var(--dot-size);\n\tmin-width: var(--dot-size);\n\theight: var(--dot-size);\n\twidth: var(--dot-size);\n\tborder: var(--dot-border) solid var(--core-surface-primary);\n\tbackground: var(--dot-bg);\n\tborder-radius: 100%;\n\tz-index: var(--elevation-status);\n}\n");
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), css_dot = "Dot-module_dot__RNz87 flexBox-module_row__z24tF";
|
|
7
5
|
|
|
8
6
|
const DEFAULT_VARIANTS = {
|
|
9
7
|
initial: {
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var tslib_es6 = require("./tslib.es6-
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
|
|
5
5
|
|
|
6
6
|
require("../theme/colors.js");
|
|
7
7
|
|
|
8
|
-
var misc = require("./misc-
|
|
8
|
+
var misc = require("./misc-DZAbObFp.js");
|
|
9
9
|
|
|
10
10
|
require("../hooks/useWindow.js");
|
|
11
11
|
|
|
12
|
-
var hooks_useObserveResize = require("../hooks/useObserveResize.js"),
|
|
13
|
-
|
|
14
|
-
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}\n\n.DraggablePanel-module_panel__vuq2R {\n\tposition: relative;\n\tbackground-color: var(--panel-bg);\n}\n\n.DraggablePanel-module_content__SBL0T {\n\twidth: 100%;\n\theight: 100%;\n\toverflow: hidden;\n}\n\n.DraggablePanel-module_handle__LPZw8 {\n\twidth: var(--drag-handle-width);\n\theight: var(--drag-handle-height);\n\tmin-width: var(--drag-handle-width);\n\tmin-height: var(--drag-handle-height);\n\tborder-radius: var(--drag-handle-radius);\n\tborder: var(--drag-handle-border) solid var(--drag-handle-border-color);\n\tbackground: var(--drag-handle-bg);\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translateX(-50%) translateY(-50%);\n\tz-index: 15000;\n}\n");
|
|
12
|
+
var hooks_useObserveResize = require("../hooks/useObserveResize.js"), css_panel = "DraggablePanel-module_panel__vuq2R flexBox-module_columnStart__C7P44", css_content = "DraggablePanel-module_content__SBL0T flexBox-module_columnStart__C7P44", css_handle = "DraggablePanel-module_handle__LPZw8";
|
|
15
13
|
|
|
16
14
|
function normalizeConstraintValue(value, containerWidth, fallback) {
|
|
17
15
|
let normalized = value;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css = {
|
|
5
|
+
wrapper: "DropDown-module_wrapper__CyX0u flexBox-module_rowStart__4tcxS",
|
|
6
|
+
face: "DropDown-module_face__6gyF3 flexBox-module_rowStart__4tcxS",
|
|
7
|
+
faceText: "DropDown-module_faceText__glhB3",
|
|
8
|
+
label: "DropDown-module_label__Mrwbp flexBox-module_rowStart__4tcxS",
|
|
9
|
+
xs: "DropDown-module_xs__7L71q type-module_body-xs-regular__ZAFft",
|
|
10
|
+
s: "DropDown-module_s__vAxXD type-module_body-s-regular__vRHSP",
|
|
11
|
+
m: "DropDown-module_m__K6JPk type-module_body-m-regular__LuQBA",
|
|
12
|
+
l: "DropDown-module_l__Kib48 type-module_body-l-regular__lOYbg",
|
|
13
|
+
chevron: "DropDown-module_chevron__LkYsE flexBox-module_rowStart__4tcxS",
|
|
14
|
+
select: "DropDown-module_select__mzNnv"
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
function resolveValueKey(value, valueKey) {
|
|
18
|
+
if (valueKey && value && "object" == typeof value) return value[valueKey];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function DropDownComponent(props) {
|
|
22
|
+
const {name: name = "drop-down-select", label: label, labelColor: labelColor = "var(--core-text-primary)", size: size = "m", width: width = "100%", height: height = "auto", inline: inline = !1, selectedIndex: selectedIndex, selectedValue: selectedValue, valueKey: valueKey, options: options = [], placeholder: placeholder = !0, borderRadius: borderRadius = 8, backgroundColor: backgroundColor = "var(--core-surface-secondary)", bgColor: bgColor = "var(--core-surface-secondary)", iconColor: iconColor = "var(--core-text-primary)", textColor: textColor = "var(--core-text-primary)", borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-outline-primary)", paddingLeft: paddingLeft = "10px", paddingRight: paddingRight = "8px", paddingTop: paddingTop = "8px", paddingBottom: paddingBottom = "8px", borderStyle: borderStyle = "box", iconSize: iconSize = 20, disabled: disabled = !1, error: error = !1, gap: gap = 8, onChange: onChange = () => null, onOption: onOption = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "name", "label", "labelColor", "size", "width", "height", "inline", "selectedIndex", "selectedValue", "valueKey", "options", "placeholder", "borderRadius", "backgroundColor", "bgColor", "iconColor", "textColor", "borderWidth", "borderSize", "borderColor", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderStyle", "iconSize", "disabled", "error", "gap", "onChange", "onOption" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, [index, setIndex] = React.useState(null != selectedIndex ? selectedIndex : 0), [selectedText, setSelectedText] = React.useState("Select an option"), ref = React.useRef(null);
|
|
23
|
+
React.useEffect(() => {
|
|
24
|
+
if (null == selectedValue && void 0 !== selectedIndex && (null == ref ? void 0 : ref.current)) {
|
|
25
|
+
if (!(null == options ? void 0 : options[selectedIndex])) return;
|
|
26
|
+
const label = options[selectedIndex].label || "Select an option";
|
|
27
|
+
setIndex(selectedIndex), setSelectedText(label), ref.current.selectedIndex = selectedIndex;
|
|
28
|
+
}
|
|
29
|
+
}, [ selectedIndex, options, selectedValue ]), React.useEffect(() => {
|
|
30
|
+
if (!options || 0 === options.length || null == selectedValue) return;
|
|
31
|
+
const selectedKey = resolveValueKey(selectedValue, valueKey), foundIndex = options.findIndex(option => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (null == option ? void 0 : option.value) === selectedValue || void 0 !== selectedKey && resolveValueKey(null == option ? void 0 : option.value, valueKey) === selectedKey || (null === (_a = null == option ? void 0 : option.label) || void 0 === _a ? void 0 : _a.toLowerCase()) === String(selectedValue).toLowerCase() || (null === (_b = null == option ? void 0 : option.alt) || void 0 === _b ? void 0 : _b.toLowerCase()) === String(selectedValue).toLowerCase();
|
|
34
|
+
});
|
|
35
|
+
if (-1 !== foundIndex) {
|
|
36
|
+
const label = options[foundIndex].label || "Select an option";
|
|
37
|
+
setSelectedText(label), setIndex(foundIndex), ref.current && (ref.current.selectedIndex = foundIndex);
|
|
38
|
+
}
|
|
39
|
+
}, [ selectedValue, options, valueKey ]);
|
|
40
|
+
const handleChange = React.useCallback(i => {
|
|
41
|
+
if (!options) return;
|
|
42
|
+
const label = options[i].label || "Select an option";
|
|
43
|
+
setIndex(i), setSelectedText(label), index !== i && (onChange(i, options[i]), onOption(options[i]));
|
|
44
|
+
}, [ options, index, onChange, onOption ]), renderedOptions = React.useMemo(() => options ? options.map((option, i) => jsxRuntime.jsx("option", {
|
|
45
|
+
value: i,
|
|
46
|
+
onMouseUp: () => handleChange(i),
|
|
47
|
+
children: null == option ? void 0 : option.label
|
|
48
|
+
}, `${null == option ? void 0 : option.value}_${i}`)) : null, [ options, handleChange ]), displayText = React.useMemo(() => selectedText.replace("-- ", ""), [ selectedText ]), handleMouseDown = React.useCallback(e => {
|
|
49
|
+
disabled && e.preventDefault();
|
|
50
|
+
}, [ disabled ]), handleSelectChange = React.useCallback(e => {
|
|
51
|
+
handleChange(e.target.selectedIndex);
|
|
52
|
+
}, [ handleChange ]), setTextColor = React.useMemo(() => disabled ? "var(--core-text-disabled)" : placeholder && 0 === index ? "var(--core-text-tertiary)" : textColor, [ disabled, placeholder, index, textColor ]), setLabelColor = React.useMemo(() => disabled ? "var(--core-text-disabled)" : labelColor, [ disabled, labelColor ]), setIconColor = React.useMemo(() => disabled ? "var(--core-text-disabled)" : iconColor, [ disabled, iconColor ]), setBorderColor = React.useMemo(() => disabled ? "var(--core-outline-primary)" : error ? "var(--feedback-warning)" : borderColor, [ disabled, error, borderColor ]), setPadding = React.useMemo(() => "box" === borderStyle ? `${misc.setStyle(paddingTop)} ${misc.setStyle(paddingRight)} ${misc.setStyle(paddingBottom)} ${misc.setStyle(paddingLeft)}` : `0 0 ${misc.setStyle(paddingBottom)} 0`, [ paddingTop, paddingRight, paddingBottom, paddingLeft, borderStyle ]), setBorder = React.useMemo(() => "box" === borderStyle ? `${misc.setStyle(resolvedBorderWidth)} solid ${setBorderColor}` : "unset", [ resolvedBorderWidth, setBorderColor, borderStyle ]), setBorderBottom = React.useMemo(() => "none" !== borderStyle ? `${misc.setStyle(resolvedBorderWidth)} solid ${misc.setStyle(borderColor)}` : "unset", [ resolvedBorderWidth, borderColor, borderStyle ]), setBorderRadius = React.useMemo(() => "box" !== borderStyle ? 0 : `${borderRadius}px`, [ borderStyle, borderRadius ]), cssVars = React.useMemo(() => ({
|
|
53
|
+
"--dd-gap": misc.setStyle(gap),
|
|
54
|
+
"--dd-height": misc.setStyle(height),
|
|
55
|
+
"--dd-width": misc.setStyle(width),
|
|
56
|
+
"--dd-margin": inline ? "0 4px" : "0",
|
|
57
|
+
"--dd-border-radius": setBorderRadius,
|
|
58
|
+
"--dd-border": setBorder,
|
|
59
|
+
"--dd-border-bottom": setBorderBottom,
|
|
60
|
+
"--dd-color": setTextColor,
|
|
61
|
+
"--dd-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "transparent",
|
|
62
|
+
"--dd-padding": setPadding,
|
|
63
|
+
"--dd-icon-size": `${iconSize}px`,
|
|
64
|
+
"--dd-label-color": setLabelColor,
|
|
65
|
+
"--dd-display": inline ? "inline-flex" : "flex"
|
|
66
|
+
}), [ gap, height, width, setBorderRadius, setBorder, setBorderBottom, setTextColor, resolvedBackgroundColor, setPadding, setLabelColor, iconSize, inline ]);
|
|
67
|
+
return jsxRuntime.jsxs("span", Object.assign({
|
|
68
|
+
id: divId,
|
|
69
|
+
className: `${css.wrapper}${divClass}`,
|
|
70
|
+
style: Object.assign(Object.assign({}, divStyle), cssVars)
|
|
71
|
+
}, rest, {
|
|
72
|
+
children: [ label && jsxRuntime.jsx("span", {
|
|
73
|
+
className: `${css.label} ${css[size]}`,
|
|
74
|
+
children: label
|
|
75
|
+
}), jsxRuntime.jsx("span", {
|
|
76
|
+
className: `${css.face} ${css[size]}`,
|
|
77
|
+
children: jsxRuntime.jsx("span", {
|
|
78
|
+
className: css.faceText,
|
|
79
|
+
children: displayText
|
|
80
|
+
})
|
|
81
|
+
}), jsxRuntime.jsx("span", {
|
|
82
|
+
className: css.chevron,
|
|
83
|
+
children: jsxRuntime.jsx(Icon.Icon, {
|
|
84
|
+
name: "chevron down",
|
|
85
|
+
size: iconSize,
|
|
86
|
+
strokeColor: setIconColor
|
|
87
|
+
})
|
|
88
|
+
}), jsxRuntime.jsx("select", {
|
|
89
|
+
className: css.select,
|
|
90
|
+
value: index,
|
|
91
|
+
ref: ref,
|
|
92
|
+
onMouseDown: handleMouseDown,
|
|
93
|
+
onChange: handleSelectChange,
|
|
94
|
+
"aria-label": name,
|
|
95
|
+
children: renderedOptions
|
|
96
|
+
}) ]
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
DropDownComponent.displayName = "DropDown";
|
|
101
|
+
|
|
102
|
+
const DropDown = React.memo(DropDownComponent);
|
|
103
|
+
|
|
104
|
+
exports.DropDown = DropDown;
|