@apple-pie/slice 0.1.30 → 0.1.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (334) hide show
  1. package/README.md +36 -276
  2. package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-Dh2IlYW0.js} +3 -5
  3. package/dist/cjs/chunks/Avatar-WcBAu25_.js +82 -0
  4. package/dist/cjs/chunks/{AvatarGroup-DhGp_qLw.js → AvatarGroup-eUkVdeTf.js} +1 -3
  5. package/dist/cjs/chunks/Badge-4tBynWZe.js +22 -0
  6. package/dist/cjs/chunks/{Button-PsJx1WmV.js → Button-QJ5lsSAz.js} +1 -3
  7. package/dist/cjs/chunks/{ButtonBar-8zm6a_h7.js → ButtonBar-DcpvT1vD.js} +1 -3
  8. package/dist/cjs/chunks/{Camera-zFyIXcge.js → Camera-iDyPLq9h.js} +3 -5
  9. package/dist/cjs/chunks/CheckBox-CmZJd8u2.js +51 -0
  10. package/dist/cjs/chunks/Chip-Bd1bSYeC.js +77 -0
  11. package/dist/cjs/chunks/{DivInput-2cMdJQ9U.js → DivInput-BY9pQ6ty.js} +1 -3
  12. package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-BeWDLajy.js} +1 -3
  13. package/dist/cjs/chunks/{DrggablePanel-P7TgBI3j.js → DrggablePanel-DzY5wTco.js} +3 -5
  14. package/dist/cjs/chunks/DropDown-Cn_nX8u7.js +104 -0
  15. package/dist/cjs/chunks/ErrorSummary-D-0uVwyV.js +85 -0
  16. package/dist/cjs/chunks/{FileIcon-PuDoz0mF.js → FileIcon-JfY2AYqG.js} +2 -2
  17. package/dist/cjs/chunks/FileList-Dc1nfpR2.js +222 -0
  18. package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-B5Pi0-aJ.js} +2 -3
  19. package/dist/cjs/chunks/Grouper-DKZkTlow.js +61 -0
  20. package/dist/cjs/chunks/{Icon-BtcHXeqE.js → Icon-BVYVJp9J.js} +4 -7
  21. package/dist/cjs/chunks/IconButton-CP1Wsvsx.js +82 -0
  22. package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-CeiVT55Z.js} +1 -1
  23. package/dist/cjs/chunks/Label-DIs1rOey.js +102 -0
  24. package/dist/cjs/chunks/Level-3yxetsco.js +58 -0
  25. package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-BudWFoNw.js} +38 -16
  26. package/dist/cjs/chunks/Modal-CjpQdoOe.js +127 -0
  27. package/dist/cjs/chunks/{ModalController-13xmvKnm.js → ModalController-Cp2PXOOS.js} +1 -3
  28. package/dist/cjs/chunks/{Overlay-GXu6nMnw.js → Overlay-DRpHYZek.js} +1 -3
  29. package/dist/cjs/chunks/Pager-ChnTKwml.js +36 -0
  30. package/dist/cjs/chunks/{ProgressIndicator-D06PqCQk.js → ProgressIndicator-CFiAU-aF.js} +2 -6
  31. package/dist/cjs/chunks/{PromptInput-DuE4vGxR.js → PromptInput-BFWR0TaP.js} +2 -4
  32. package/dist/cjs/chunks/RadioButton-Bi-FP41j.js +55 -0
  33. package/dist/cjs/chunks/{RadioButtonList-N7Fmvr5W.js → RadioButtonList-JHPKMCoX.js} +1 -2
  34. package/dist/cjs/chunks/{Slider-BSy8xciG.js → Slider-D97ws1Cl.js} +1 -3
  35. package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-DvI2M1wZ.js} +1 -1
  36. package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-DDSSprb7.js} +1 -2
  37. package/dist/cjs/chunks/{TabBar-BtFfMwiB.js → TabBar-TllSeSzb.js} +2 -4
  38. package/dist/cjs/chunks/TextArea-DjZRDixt.js +74 -0
  39. package/dist/cjs/chunks/{TextField-Bh2EA082.js → TextField-CKA3K0AN.js} +3 -5
  40. package/dist/cjs/chunks/Tip-BdGXN-TQ.js +88 -0
  41. package/dist/cjs/chunks/Toast-COrDS_50.js +177 -0
  42. package/dist/cjs/chunks/ToggleButton-hoOMzBZc.js +39 -0
  43. package/dist/cjs/chunks/UploadArea-ClG8ZgRZ.js +127 -0
  44. package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-Brxc2hEv.js} +1 -1
  45. package/dist/cjs/chunks/WebRTCConnection-eWP4lueC.js +252 -0
  46. package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-SS_r0C6F.js} +1 -1
  47. package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-DM_8bhFr.js} +27 -4
  48. package/dist/cjs/chunks/{misc-QpU0XEOW.js → misc-4xyXRU2K.js} +1 -1
  49. package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Ag-UnuQq.js} +2 -2
  50. package/dist/cjs/chunks/{uploads-worker-Az040BSN.js → uploads-worker-CI-SZptI.js} +1 -1
  51. package/dist/cjs/chunks/{uploadsStore-8mOTz0Qe.js → uploadsStore-DR2hc4ct.js} +2 -2
  52. package/dist/cjs/chunks/{volumeStore-Pv23v12t.js → volumeStore-DtTHf-9_.js} +5 -4
  53. package/dist/cjs/chunks/webRTCStore-DWWn7k-0.js +55 -0
  54. package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BUo9Du_e.js} +1 -1
  55. package/dist/cjs/components/AudioBubble/index.js +7 -7
  56. package/dist/cjs/components/Avatar/index.js +3 -4
  57. package/dist/cjs/components/AvatarGroup/index.js +4 -4
  58. package/dist/cjs/components/Badge/index.js +3 -3
  59. package/dist/cjs/components/Button/index.js +7 -8
  60. package/dist/cjs/components/ButtonBar/index.js +7 -7
  61. package/dist/cjs/components/Camera/index.js +8 -8
  62. package/dist/cjs/components/CheckBox/index.js +7 -7
  63. package/dist/cjs/components/Chip/index.js +7 -8
  64. package/dist/cjs/components/DivInput/index.js +3 -4
  65. package/dist/cjs/components/Dot/index.js +3 -3
  66. package/dist/cjs/components/DraggablePanel/index.js +6 -6
  67. package/dist/cjs/components/DropDown/index.js +7 -7
  68. package/dist/cjs/components/ErrorSummary/index.js +6 -7
  69. package/dist/cjs/components/FileIcon/index.js +6 -7
  70. package/dist/cjs/components/FileList/index.js +7 -7
  71. package/dist/cjs/components/FlexDiv/index.js +3 -4
  72. package/dist/cjs/components/Grouper/index.js +7 -8
  73. package/dist/cjs/components/Icon/index.js +6 -7
  74. package/dist/cjs/components/IconButton/index.js +6 -7
  75. package/dist/cjs/components/Label/index.js +3 -4
  76. package/dist/cjs/components/Level/index.js +7 -0
  77. package/dist/cjs/components/Modal/index.js +7 -8
  78. package/dist/cjs/components/ModalController/index.js +4 -4
  79. package/dist/cjs/components/Overlay/index.js +3 -3
  80. package/dist/cjs/components/Pager/index.js +3 -4
  81. package/dist/cjs/components/Progress/index.js +5 -6
  82. package/dist/cjs/components/PromptInput/index.js +9 -10
  83. package/dist/cjs/components/RadioButton/index.js +7 -7
  84. package/dist/cjs/components/RadioButtonList/index.js +8 -8
  85. package/dist/cjs/components/Slider/index.js +4 -5
  86. package/dist/cjs/components/Spacer/index.js +2 -2
  87. package/dist/cjs/components/Switch/index.js +3 -3
  88. package/dist/cjs/components/TabBar/index.js +9 -9
  89. package/dist/cjs/components/TextArea/index.js +8 -8
  90. package/dist/cjs/components/Textfield/index.js +9 -9
  91. package/dist/cjs/components/Tip/index.js +3 -4
  92. package/dist/cjs/components/Toast/index.js +7 -8
  93. package/dist/cjs/components/ToggleButton/index.js +8 -8
  94. package/dist/cjs/components/UploadArea/index.js +7 -7
  95. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  96. package/dist/cjs/hooks/useBindWebRTC.js +60 -0
  97. package/dist/cjs/hooks/useLocalStore.js +3 -3
  98. package/dist/cjs/hooks/useMdStreamBuffer.js +55 -30
  99. package/dist/cjs/hooks/useMicrophone.js +1 -1
  100. package/dist/cjs/hooks/useObserveTheme.js +3 -3
  101. package/dist/cjs/hooks/useTheme.js +2 -3
  102. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  103. package/dist/cjs/hooks.js +9 -6
  104. package/dist/cjs/index.js +19 -17
  105. package/dist/cjs/providers/ThemeProvider.js +6 -17
  106. package/dist/cjs/providers/themeServer.js +15 -9
  107. package/dist/cjs/providers.js +4 -5
  108. package/dist/cjs/stores/LocalDB.js +3 -3
  109. package/dist/cjs/stores/SSE.js +2 -2
  110. package/dist/cjs/stores/WS.js +2 -2
  111. package/dist/cjs/stores/WebRTC.js +9 -0
  112. package/dist/cjs/stores/microphone.js +5 -4
  113. package/dist/cjs/stores/modal.js +1 -1
  114. package/dist/cjs/stores/tip.js +1 -1
  115. package/dist/cjs/stores/toast.js +1 -1
  116. package/dist/cjs/stores/uploads.js +2 -2
  117. package/dist/cjs/stores/volume.js +2 -2
  118. package/dist/cjs/stores/window.js +2 -2
  119. package/dist/cjs/stores.js +18 -13
  120. package/dist/cjs/theme/type.js +1 -1
  121. package/dist/cjs/utils/index.js +4 -3
  122. package/dist/cjs/utils/objects/index.js +4 -3
  123. package/dist/cjs/workers/uploads/uploads.js +2 -2
  124. package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-cYlxxQ7c.mjs} +3 -7
  125. package/dist/esm/chunks/Avatar-D84wF2os.mjs +88 -0
  126. package/dist/esm/chunks/{AvatarGroup-C7YRtPmJ.mjs → AvatarGroup-DiwfbRxH.mjs} +2 -6
  127. package/dist/esm/chunks/Badge-DuUb5-80.mjs +26 -0
  128. package/dist/esm/chunks/{Button-BQS3rwrS.mjs → Button-BIgwWrPJ.mjs} +6 -10
  129. package/dist/esm/chunks/{ButtonBar-GLNRjmjv.mjs → ButtonBar-vNvnvw7u.mjs} +3 -7
  130. package/dist/esm/chunks/{Camera-CAp0Y2gN.mjs → Camera-BMwkTJPq.mjs} +5 -9
  131. package/dist/esm/chunks/CheckBox-Cpoxy8w_.mjs +61 -0
  132. package/dist/esm/chunks/Chip-BayNVv7N.mjs +87 -0
  133. package/dist/esm/chunks/{DivInput-g6F1YWTo.mjs → DivInput-CWRUxy1y.mjs} +2 -6
  134. package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-v_kcIWV2.mjs} +1 -5
  135. package/dist/esm/chunks/{DrggablePanel-C0AmJy8g.mjs → DrggablePanel-yEeGeE1w.mjs} +2 -6
  136. package/dist/esm/chunks/DropDown-QQhwAg_J.mjs +112 -0
  137. package/dist/esm/chunks/ErrorSummary-DzIZMIll.mjs +90 -0
  138. package/dist/esm/chunks/{FileIcon-BQ2zZIW5.mjs → FileIcon-6UlkbKzk.mjs} +2 -2
  139. package/dist/esm/chunks/FileList-vMiGJByw.mjs +230 -0
  140. package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-B1m7aY04.mjs} +3 -6
  141. package/dist/esm/chunks/Grouper-BDrAnfDF.mjs +73 -0
  142. package/dist/esm/chunks/{Icon--RjjODc9.mjs → Icon-D4A6_c4x.mjs} +3 -8
  143. package/dist/esm/chunks/IconButton-B_W-aOsB.mjs +96 -0
  144. package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-CTqfKmp1.mjs} +1 -1
  145. package/dist/esm/chunks/Label-I75yz3gq.mjs +113 -0
  146. package/dist/esm/chunks/Level-DgczkKBr.mjs +63 -0
  147. package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-CoQWQwRL.mjs} +38 -16
  148. package/dist/esm/chunks/Modal-CwwyijaO.mjs +139 -0
  149. package/dist/esm/chunks/{ModalController-BO5FkAqu.mjs → ModalController-IyB9lDRa.mjs} +2 -6
  150. package/dist/esm/chunks/{Overlay-sXM7cEYc.mjs → Overlay-C-yori3-.mjs} +1 -5
  151. package/dist/esm/chunks/Pager-BEtfyKtq.mjs +42 -0
  152. package/dist/esm/chunks/{ProgressIndicator-B5oByN3i.mjs → ProgressIndicator-BV0ginXb.mjs} +2 -8
  153. package/dist/esm/chunks/{PromptInput-Cwd53ux7.mjs → PromptInput-Cn5fRYap.mjs} +3 -7
  154. package/dist/esm/chunks/RadioButton-DWlg6ldv.mjs +63 -0
  155. package/dist/esm/chunks/{RadioButtonList-C_heuiis.mjs → RadioButtonList-D9FdlhPL.mjs} +3 -6
  156. package/dist/esm/chunks/{Slider-XEV0D2Rd.mjs → Slider-B2WZkZSg.mjs} +3 -7
  157. package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-7Oj0SlD0.mjs} +1 -1
  158. package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DRhnznnO.mjs} +1 -4
  159. package/dist/esm/chunks/{TabBar-kPZ6ZJxr.mjs → TabBar-D6VR71ye.mjs} +5 -9
  160. package/dist/esm/chunks/TextArea-CkB5rJjI.mjs +80 -0
  161. package/dist/esm/chunks/{TextField-DwVKlLI_.mjs → TextField-BIXmkjEz.mjs} +5 -9
  162. package/dist/esm/chunks/Tip-CTdrwLky.mjs +96 -0
  163. package/dist/esm/chunks/Toast-8bUziIgh.mjs +189 -0
  164. package/dist/esm/chunks/ToggleButton-BOFITa8_.mjs +47 -0
  165. package/dist/esm/chunks/UploadArea-DE2ccDVx.mjs +135 -0
  166. package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-CHudrD62.mjs} +1 -1
  167. package/dist/esm/chunks/WebRTCConnection-DQbNa7Z9.mjs +252 -0
  168. package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-CaYiqITY.mjs} +2 -2
  169. package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-COEGtgyX.mjs} +26 -3
  170. package/dist/esm/chunks/{misc-wS74txaa.mjs → misc-2MIIqzsX.mjs} +1 -1
  171. package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-nW9CMec_.mjs} +2 -2
  172. package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-C81Qhn1z.mjs} +1 -1
  173. package/dist/esm/chunks/{uploads-worker-CYp-F4dz.mjs → uploads-worker-CMomtRvm.mjs} +1 -1
  174. package/dist/esm/chunks/{uploadsStore-DeRMJ5c9.mjs → uploadsStore-CsfpSOTS.mjs} +1 -1
  175. package/dist/esm/chunks/{volumeStore-BX7QcrL-.mjs → volumeStore-TSYPqbHx.mjs} +5 -4
  176. package/dist/esm/chunks/webRTCStore-CVCDJzj5.mjs +57 -0
  177. package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-BvejIR82.mjs} +1 -1
  178. package/dist/esm/components/AudioBubble/index.mjs +4 -6
  179. package/dist/esm/components/Avatar/index.mjs +3 -5
  180. package/dist/esm/components/AvatarGroup/index.mjs +4 -6
  181. package/dist/esm/components/Badge/index.mjs +2 -4
  182. package/dist/esm/components/Button/index.mjs +8 -10
  183. package/dist/esm/components/ButtonBar/index.mjs +4 -6
  184. package/dist/esm/components/Camera/index.mjs +6 -8
  185. package/dist/esm/components/CheckBox/index.mjs +4 -6
  186. package/dist/esm/components/Chip/index.mjs +5 -7
  187. package/dist/esm/components/DivInput/index.mjs +3 -5
  188. package/dist/esm/components/Dot/index.mjs +2 -4
  189. package/dist/esm/components/DraggablePanel/index.mjs +3 -5
  190. package/dist/esm/components/DropDown/index.mjs +4 -6
  191. package/dist/esm/components/ErrorSummary/index.mjs +3 -5
  192. package/dist/esm/components/FileIcon/index.mjs +3 -5
  193. package/dist/esm/components/FileList/index.mjs +6 -8
  194. package/dist/esm/components/FlexDiv/index.mjs +2 -4
  195. package/dist/esm/components/Grouper/index.mjs +5 -7
  196. package/dist/esm/components/Icon/index.mjs +4 -6
  197. package/dist/esm/components/IconButton/index.mjs +7 -9
  198. package/dist/esm/components/Label/index.mjs +3 -5
  199. package/dist/esm/components/Level/index.mjs +11 -0
  200. package/dist/esm/components/Modal/index.mjs +10 -12
  201. package/dist/esm/components/ModalController/index.mjs +4 -6
  202. package/dist/esm/components/Overlay/index.mjs +2 -4
  203. package/dist/esm/components/Pager/index.mjs +3 -5
  204. package/dist/esm/components/Progress/index.mjs +4 -6
  205. package/dist/esm/components/PromptInput/index.mjs +11 -13
  206. package/dist/esm/components/RadioButton/index.mjs +4 -6
  207. package/dist/esm/components/RadioButtonList/index.mjs +5 -7
  208. package/dist/esm/components/Slider/index.mjs +4 -6
  209. package/dist/esm/components/Spacer/index.mjs +2 -2
  210. package/dist/esm/components/Switch/index.mjs +2 -4
  211. package/dist/esm/components/TabBar/index.mjs +8 -10
  212. package/dist/esm/components/TextArea/index.mjs +9 -11
  213. package/dist/esm/components/Textfield/index.mjs +10 -12
  214. package/dist/esm/components/Tip/index.mjs +3 -5
  215. package/dist/esm/components/Toast/index.mjs +5 -7
  216. package/dist/esm/components/ToggleButton/index.mjs +9 -11
  217. package/dist/esm/components/UploadArea/index.mjs +9 -11
  218. package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
  219. package/dist/esm/hooks/useBindWebRTC.mjs +72 -0
  220. package/dist/esm/hooks/useLocalStore.mjs +3 -3
  221. package/dist/esm/hooks/useMdStreamBuffer.mjs +56 -28
  222. package/dist/esm/hooks/useMicrophone.mjs +1 -1
  223. package/dist/esm/hooks/useObserveTheme.mjs +0 -2
  224. package/dist/esm/hooks/useTheme.mjs +0 -2
  225. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  226. package/dist/esm/hooks.mjs +14 -4
  227. package/dist/esm/index.mjs +62 -52
  228. package/dist/esm/providers/ThemeProvider.mjs +6 -19
  229. package/dist/esm/providers/themeServer.mjs +11 -6
  230. package/dist/esm/providers.mjs +0 -2
  231. package/dist/esm/stores/LocalDB.mjs +3 -3
  232. package/dist/esm/stores/SSE.mjs +3 -3
  233. package/dist/esm/stores/WS.mjs +2 -2
  234. package/dist/esm/stores/WebRTC.mjs +7 -0
  235. package/dist/esm/stores/microphone.mjs +2 -2
  236. package/dist/esm/stores/modal.mjs +1 -1
  237. package/dist/esm/stores/tip.mjs +1 -1
  238. package/dist/esm/stores/toast.mjs +1 -1
  239. package/dist/esm/stores/uploads.mjs +3 -3
  240. package/dist/esm/stores/volume.mjs +2 -2
  241. package/dist/esm/stores/window.mjs +2 -2
  242. package/dist/esm/stores.mjs +17 -13
  243. package/dist/esm/theme/type.mjs +1 -1
  244. package/dist/esm/utils/index.mjs +11 -9
  245. package/dist/esm/utils/objects/index.mjs +8 -6
  246. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  247. package/dist/styles.css +8476 -0
  248. package/dist/types/components/Level/Level.d.ts +5 -0
  249. package/dist/types/components/Level/_types.d.ts +21 -0
  250. package/dist/types/components/Level/index.d.ts +2 -0
  251. package/dist/types/components/Modal/_types.d.ts +4 -0
  252. package/dist/types/components/Toast/_types.d.ts +1 -0
  253. package/dist/types/hooks/index.d.ts +2 -0
  254. package/dist/types/hooks/useBindWebRTC/index.d.ts +1 -0
  255. package/dist/types/hooks/useBindWebRTC/useBindWebRTC.d.ts +15 -0
  256. package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -1
  257. package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.d.ts +6 -1
  258. package/dist/types/index.d.ts +4 -1
  259. package/dist/types/providers/ThemeProvider.d.ts +1 -6
  260. package/dist/types/providers/themeServer.d.ts +7 -3
  261. package/dist/types/stores/WebRTC/_types.d.ts +16 -0
  262. package/dist/types/stores/WebRTC/index.d.ts +2 -0
  263. package/dist/types/stores/WebRTC/webRTCStore.d.ts +21 -0
  264. package/dist/types/stores/index.d.ts +1 -0
  265. package/dist/types/stores/microphone/index.d.ts +1 -1
  266. package/dist/types/stores/microphone/microphoneStore.d.ts +14 -1
  267. package/dist/types/stores/toast/_types.d.ts +1 -0
  268. package/dist/types/stores/volume/_types.d.ts +3 -1
  269. package/dist/types/stores/volume/volumeStore.d.ts +6 -2
  270. package/dist/types/utils/functions/files.d.ts +1 -1
  271. package/dist/types/utils/index.d.ts +2 -2
  272. package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.d.ts +10 -0
  273. package/dist/types/utils/objects/MDStreamBuffer/_types.d.ts +2 -0
  274. package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.d.ts +37 -3
  275. package/dist/types/utils/objects/WebRTCConnection/_types.d.ts +13 -4
  276. package/dist/types/utils/objects/index.d.ts +2 -0
  277. package/package.json +8 -3
  278. package/dist/cjs/chunks/Avatar-CqUSRzVd.js +0 -84
  279. package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
  280. package/dist/cjs/chunks/CheckBox-Cbh6UK-7.js +0 -53
  281. package/dist/cjs/chunks/Chip-DcS8dtW2.js +0 -79
  282. package/dist/cjs/chunks/DropDown-B0970yVe.js +0 -105
  283. package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
  284. package/dist/cjs/chunks/FileList-sDq1jK0b.js +0 -225
  285. package/dist/cjs/chunks/Grouper-Ccd-x_Nb.js +0 -63
  286. package/dist/cjs/chunks/IconButton-CF4cR7Tr.js +0 -84
  287. package/dist/cjs/chunks/Label-htjXHiQ4.js +0 -103
  288. package/dist/cjs/chunks/Modal-C0Z59meI.js +0 -101
  289. package/dist/cjs/chunks/Pager-D2_fshTy.js +0 -38
  290. package/dist/cjs/chunks/RadioButton-DPB2ZGVf.js +0 -56
  291. package/dist/cjs/chunks/TextArea-CRiPRF8v.js +0 -76
  292. package/dist/cjs/chunks/Tip-C5keUoHx.js +0 -90
  293. package/dist/cjs/chunks/Toast-CyiFOsI3.js +0 -178
  294. package/dist/cjs/chunks/ToggleButton-D5_WnW0o.js +0 -40
  295. package/dist/cjs/chunks/UploadArea-KqES_OLl.js +0 -129
  296. package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
  297. package/dist/esm/chunks/Avatar-29zhNfxX.mjs +0 -92
  298. package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
  299. package/dist/esm/chunks/CheckBox-7TiT2U47.mjs +0 -65
  300. package/dist/esm/chunks/Chip-CKsojimU.mjs +0 -91
  301. package/dist/esm/chunks/DropDown-mwo8fY7p.mjs +0 -115
  302. package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
  303. package/dist/esm/chunks/FileList-fh-x9Dzm.mjs +0 -235
  304. package/dist/esm/chunks/Grouper-naJMvpB9.mjs +0 -77
  305. package/dist/esm/chunks/IconButton-ByBYppAj.mjs +0 -100
  306. package/dist/esm/chunks/Label-C04tD7UZ.mjs +0 -116
  307. package/dist/esm/chunks/Modal-B9ad9OfJ.mjs +0 -115
  308. package/dist/esm/chunks/Pager-Bz0FpgO5.mjs +0 -46
  309. package/dist/esm/chunks/RadioButton-CLeRiZ8x.mjs +0 -66
  310. package/dist/esm/chunks/TextArea-CxscPLwN.mjs +0 -84
  311. package/dist/esm/chunks/Tip-C6EcX7_M.mjs +0 -100
  312. package/dist/esm/chunks/Toast-D4uMNvaa.mjs +0 -192
  313. package/dist/esm/chunks/ToggleButton-C0QIflzX.mjs +0 -51
  314. package/dist/esm/chunks/UploadArea-je-1NhGb.mjs +0 -139
  315. package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
  316. /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-DfjLAlOG.js} +0 -0
  317. /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-DMyBIF8s.js} +0 -0
  318. /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-BxPvUj4h.js} +0 -0
  319. /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-4n0sNFRA.js} +0 -0
  320. /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-_IK-La-Z.js} +0 -0
  321. /package/dist/cjs/chunks/{modalStore-7VjHHM8X.js → modalStore-CFsfK3ba.js} +0 -0
  322. /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-C0ZHzH_T.js} +0 -0
  323. /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-dqD9-c30.js} +0 -0
  324. /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-BN1N7WXv.js} +0 -0
  325. /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-DsF7Wv4Y.js} +0 -0
  326. /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-iFKOV9Uo.mjs} +0 -0
  327. /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-DrNviSG6.mjs} +0 -0
  328. /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BsmpLZyK.mjs} +0 -0
  329. /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-BAATtfbL.mjs} +0 -0
  330. /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-CYBH5qXQ.mjs} +0 -0
  331. /package/dist/esm/chunks/{modalStore-BpWnLtOF.mjs → modalStore-DmaeMv7z.mjs} +0 -0
  332. /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-CyrInj1b.mjs} +0 -0
  333. /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-B_MUZfr2.mjs} +0 -0
  334. /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-DAprlBVj.mjs} +0 -0
@@ -1,84 +0,0 @@
1
- 'use client';
2
- import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
3
-
4
- import { jsxs, jsx } from "react/jsx-runtime";
5
-
6
- import React, { useState, useRef, useCallback, useEffect, useMemo } from "react";
7
-
8
- import { B as Button } from "./Button-BQS3rwrS.mjs";
9
-
10
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
11
-
12
- var css_wrapper = "TextArea-module_wrapper__O0sWP flexBox-module_columnStart__C7P44", css_textarea = "TextArea-module_textarea__-R2n0", css_send = "TextArea-module_send__Cub13", css_xs = "TextArea-module_xs__5e748 type-module_body-xs-regular__ZAFft", css_s = "TextArea-module_s__Ac-fq type-module_body-s-regular__vRHSP", css_m = "TextArea-module_m__dod4R type-module_body-m-regular__LuQBA", css_l = "TextArea-module_l__-uLCG type-module_body-l-regular__lOYbg";
13
-
14
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.TextArea-module_wrapper__O0sWP {\n\tposition: relative;\n\tpadding: var(--ta-padding) !important;\n\twidth: var(--ta-width);\n\theight: auto;\n\tborder-radius: var(--ta-border-radius);\n\tbackground-color: var(--ta-bg-color);\n\tbox-shadow: 0 0 0 1px var(--ta-border-color);\n\ttransition: all var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.TextArea-module_textarea__-R2n0 {\n\tborder: 0;\n\toutline: 0;\n\tpadding: 0 16px 0 0;\n\twidth: 100%;\n\theight: 100%;\n\tcolor: var(--core-text-primary);\n\tbackground-color: transparent;\n\tbox-sizing: border-box;\n\tresize: var(--ta-resize);\n\n\t&:disabled {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\t&::placeholder {\n\t\tcolor: var(--core-text-disabled);\n\t}\n\n\toverflow-y: auto;\n\n\t&::-webkit-scrollbar {\n\t\tbackground-color: transparent;\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: transparent;\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--scroll-bar);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--core-surface-primary);\n\t\tcursor: default;\n\t}\n}\n\n.TextArea-module_actions__yunQx {\n\twidth: 100%;\n\tmin-height: 30px;\n\tcolor: var(--core-text-disabled);\n\tgap: 16px;\n}\n\n.TextArea-module_option__2SFx5 {\n\tgap: 4px;\n\twhite-space: nowrap;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tcursor: default;\n}\n\n.TextArea-module_send__Cub13 {\n\tposition: absolute;\n\tbottom: var(--ta-send-icon-offset-bottom);\n\tright: var(--ta-send-icon-offset-right);\n}\n\n.TextArea-module_xs__5e748 {\n}\n\n.TextArea-module_s__Ac-fq {\n}\n\n.TextArea-module_m__dod4R {\n}\n\n.TextArea-module_l__-uLCG {\n}\n");
15
-
16
- const TextArea = React.memo(props => {
17
- const {value: value = "", name: name = "text_area", width: width = "100%", focused: focused = !1, placeholder: placeholder = "Enter text here...", rows: rows = 6, border: border = !0, borderRadius: borderRadius = 4, padding: padding = "16px 4px 16px 16px", error: error = !1, resizable: resizable = !0, hasSend: hasSend = !1, sendOffset: sendOffset = {
18
- bottom: 10,
19
- right: 10
20
- }, sendSize: sendSize = 36, returnSubmits: returnSubmits = !1, backgroundColor: backgroundColor, bgColor: bgColor, minWidth: minWidth, textSize: textSize = "m", disabled: disabled = !1, submitClears: submitClears = !0, onChange: onChange = () => null, onFocus: onFocus = () => null, onBlur: onBlur = () => null, onSubmit: onSubmit = () => null, onKeyDown: onKeyDown = () => null} = props, divAttributes = __rest(props, [ "value", "name", "width", "focused", "placeholder", "rows", "border", "borderRadius", "padding", "error", "resizable", "hasSend", "sendOffset", "sendSize", "returnSubmits", "backgroundColor", "bgColor", "minWidth", "textSize", "disabled", "submitClears", "onChange", "onFocus", "onBlur", "onSubmit", "onKeyDown" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, [isFocused, setIsFocused] = useState(focused), [text, setText] = useState(value), ref = useRef(null), handleResize = useCallback(() => {
21
- (null == ref ? void 0 : ref.current) && (ref.current.style.height = "auto", ref.current.style.height = `${ref.current.scrollHeight}px`);
22
- }, []);
23
- useEffect(() => {
24
- (null == ref ? void 0 : ref.current) && (focused ? ref.current.focus() : ref.current.blur(),
25
- setIsFocused(focused));
26
- }, [ focused ]), useEffect(() => setText(value), [ value ]), useEffect(() => handleResize(), [ rows ]);
27
- const handleChange = useCallback(content => {
28
- onChange(content), setText(content);
29
- }, [ onChange ]), handleFocus = useCallback(() => {
30
- var _a, _b;
31
- (null == ref ? void 0 : ref.current) && ref.current.focus(), setIsFocused(!0), onFocus(null !== (_b = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.value) && void 0 !== _b ? _b : "");
32
- }, [ onFocus ]), handleBlur = useCallback(() => {
33
- var _a, _b;
34
- setIsFocused(!1), onBlur(null !== (_b = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.value) && void 0 !== _b ? _b : "");
35
- }, [ onBlur ]), handleSubmit = useCallback(e => {
36
- null == e || e.preventDefault(), handleFocus(), onSubmit(text), submitClears && setText(""),
37
- (null == ref ? void 0 : ref.current) && (ref.current.value = ""), handleResize();
38
- }, [ handleFocus, onSubmit, text, submitClears, handleResize ]), handleKeyDownWrapper = useCallback(e => {
39
- returnSubmits && "Enter" === e.key && (e.preventDefault(), e.stopPropagation(),
40
- handleSubmit(void 0)), onKeyDown(e);
41
- }, [ returnSubmits, handleSubmit, onKeyDown ]), setStyleValue = useCallback(value => "string" == typeof value ? value : `${value}px`, []), setBorderColor = useMemo(() => border && isFocused ? "var(--core-link-primary)" : border && error ? "var(--feedback-warning)" : border ? "var(--core-outline-primary)" : "transparent", [ isFocused, error, border ]), textClassName = useMemo(() => "xs" === textSize ? css_xs : "l" === textSize ? css_l : "m" === textSize ? css_m : css_s, [ textSize ]), cssVars = useMemo(() => ({
42
- "--ta-border-radius": `${borderRadius}px`,
43
- "--ta-width": `${setStyleValue(width)}`,
44
- "--ta-min-width": minWidth ? `${minWidth}px` : "unset",
45
- "--ta-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
46
- "--ta-border-color": setBorderColor,
47
- "--ta-padding": `${setStyleValue(padding)}`,
48
- "--ta-send-icon-offset-bottom": `${sendOffset.bottom}px`,
49
- "--ta-send-icon-offset-right": `${sendOffset.right}px`,
50
- "--ta-send-icon-size": `${sendSize}px`,
51
- "--ta-resize": resizable ? "vertical" : "none"
52
- }), [ width, minWidth, resolvedBackgroundColor, setBorderColor, padding, sendOffset, sendSize, setStyleValue, borderRadius, resizable ]);
53
- return jsxs("div", Object.assign({
54
- id: divId,
55
- className: `${css_wrapper}${divClass}`,
56
- style: Object.assign(Object.assign({}, divStyle), cssVars),
57
- onBlur: () => handleBlur(),
58
- onFocus: () => handleFocus()
59
- }, rest, {
60
- children: [ hasSend && jsx("div", {
61
- className: css_send,
62
- onMouseDown: e => handleSubmit(e),
63
- children: jsx(Button, {
64
- iconLeft: "arrow up",
65
- size: "medium",
66
- variant: "solid",
67
- round: !0
68
- })
69
- }), jsx("textarea", {
70
- className: `${css_textarea} ${textClassName}`,
71
- ref: ref,
72
- name: name,
73
- value: text,
74
- placeholder: placeholder,
75
- rows: rows,
76
- disabled: disabled,
77
- onChange: e => handleChange(e.target.value),
78
- onInput: () => handleResize(),
79
- onKeyDown: e => handleKeyDownWrapper(e)
80
- }) ]
81
- }));
82
- });
83
-
84
- export { TextArea as T };
@@ -1,100 +0,0 @@
1
- 'use client';
2
- import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
3
-
4
- import { jsx } from "react/jsx-runtime";
5
-
6
- import { motion } from "motion/react";
7
-
8
- import React, { useState, useRef, useEffect, useMemo } from "react";
9
-
10
- import { f as filterClasses } from "./misc-wS74txaa.mjs";
11
-
12
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
13
-
14
- var css = {
15
- wrapper: "Tip-module_wrapper__D7ACT flexBox-module_rowStart__4tcxS",
16
- xs: "Tip-module_xs__wsz9y type-module_body-xs-regular__ZAFft",
17
- s: "Tip-module_s__Wvz3q type-module_body-s-regular__vRHSP",
18
- m: "Tip-module_m__9qJbB type-module_body-m-regular__LuQBA",
19
- l: "Tip-module_l__OdNuh type-module_body-l-regular__lOYbg"
20
- };
21
-
22
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Tip-module_wrapper__D7ACT {\n\tpadding: var(--tooltip-padding) !important;\n\tposition: fixed;\n\tborder: var(--tooltip-border);\n\tborder-radius: var(--tooltip-border-radius);\n\tbackground: var(--tooltip-background);\n\twhite-space: nowrap;\n\tz-index: var(--elevation-describe);\n}\n\n.Tip-module_xs__wsz9y {\n}\n\n.Tip-module_s__Wvz3q {\n}\n\n.Tip-module_m__9qJbB {\n}\n.Tip-module_l__OdNuh {\n}\n");
23
-
24
- const tipBasePos = {
25
- left: 0,
26
- top: 0
27
- }, TipBase = React.forwardRef((props, ref) => {
28
- var _a;
29
- const {tip: tip, size: size = "s", backgroundColor: backgroundColor, bgColor: bgColor, textColor: textColor, color: color, border: border = !0, borderColor: borderColor, padding: padding, borderRadius: borderRadius, radius: radius, coords: coords, showDelay: showDelay = 500, hideDelay: hideDelay = 2500} = props, divAttributes = __rest(props, [ "tip", "size", "backgroundColor", "bgColor", "textColor", "color", "border", "borderColor", "padding", "borderRadius", "radius", "coords", "showDelay", "hideDelay" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [pos, setPos] = useState(tipBasePos), [ready, setReady] = useState(!1), [animate, setAnimate] = useState(!1), timer = useRef(null), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedTextColor = null != textColor ? textColor : color, resolvedBorderRadius = null != borderRadius ? borderRadius : radius;
30
- useEffect(() => {
31
- timer.current && clearTimeout(timer.current);
32
- const {x: x, y: y} = null != coords ? coords : {
33
- x: 0,
34
- y: 0
35
- };
36
- return x > 0 && y > 0 ? timer.current = setTimeout(() => {
37
- var _a, _b;
38
- setPos({
39
- left: null !== (_a = null == coords ? void 0 : coords.x) && void 0 !== _a ? _a : 0,
40
- top: null !== (_b = null == coords ? void 0 : coords.y) && void 0 !== _b ? _b : 0
41
- }), setReady(!0), timer.current && clearTimeout(timer.current), timer.current = setTimeout(() => {
42
- setReady(!1), setPos({
43
- left: 0,
44
- top: 0
45
- });
46
- }, hideDelay);
47
- }, showDelay) : (setReady(!1), setPos({
48
- left: 0,
49
- top: 0
50
- })), () => {
51
- timer.current && clearTimeout(timer.current);
52
- };
53
- }, [ coords, showDelay, hideDelay ]), useEffect(() => setAnimate(ready), [ ready ]);
54
- const cssVars = useMemo(() => ({
55
- "--tooltip-padding": null != padding ? padding : "3px 6px",
56
- "--tooltip-background": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
57
- "--tooltip-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
58
- "--tooltip-border": border ? `1px solid ${null != borderColor ? borderColor : "var(--core-outline-primary)"}` : "unset",
59
- "--tooltip-border-radius": null != resolvedBorderRadius ? resolvedBorderRadius : "4px"
60
- }), [ padding, resolvedBackgroundColor, resolvedTextColor, border, borderColor, resolvedBorderRadius ]), coordStyle = useMemo(() => {
61
- const {left: left, top: top} = pos;
62
- return {
63
- left: `${null != left ? left : 0}px`,
64
- top: `${null != top ? top : 0}px`
65
- };
66
- }, [ pos ]), classNames = useMemo(() => filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]);
67
- return jsx(motion.div, Object.assign({
68
- ref: ref,
69
- id: divId,
70
- className: classNames,
71
- onKeyDown: () => null,
72
- style: Object.assign(Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), coordStyle), {
73
- visibility: ready ? "visible" : "hidden"
74
- }),
75
- initial: {
76
- opacity: 0
77
- },
78
- animate: animate ? {
79
- opacity: 1,
80
- transition: {
81
- ease: "easeInOut",
82
- duration: .25
83
- }
84
- } : void 0,
85
- exit: {
86
- opacity: 0,
87
- transition: {
88
- duration: 0
89
- }
90
- }
91
- }, rest, {
92
- children: null === (_a = null == tip ? void 0 : tip.payload) || void 0 === _a ? void 0 : _a.label
93
- }));
94
- });
95
-
96
- TipBase.displayName = "Tip";
97
-
98
- const Tip = React.memo(TipBase);
99
-
100
- export { Tip as T };
@@ -1,192 +0,0 @@
1
- 'use client';
2
- import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
3
-
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
-
6
- import { AnimatePresence, motion } from "motion/react";
7
-
8
- import React, { useState, useRef, useEffect, useMemo, useCallback } from "react";
9
-
10
- import { useTheme } from "../hooks/useTheme.mjs";
11
-
12
- import "../theme/colors.mjs";
13
-
14
- import { s as setStyle, f as filterClasses, a as accessibleKeyDown } from "./misc-wS74txaa.mjs";
15
-
16
- import "../hooks/useWindow.mjs";
17
-
18
- import { I as Icon } from "./Icon--RjjODc9.mjs";
19
-
20
- import { P as ProgressIndicator } from "./ProgressIndicator-B5oByN3i.mjs";
21
-
22
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
23
-
24
- var ToastType, css = {
25
- wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
26
- close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
27
- message: "Toast-module_message__3dP0P flexBox-module_rowStart__4tcxS",
28
- progress: "Toast-module_progress__SWsbA flexBox-module_row__z24tF",
29
- s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
30
- m: "Toast-module_m__JtmLz type-module_body-m-regular__LuQBA",
31
- l: "Toast-module_l__-W0PD type-module_body-l-regular__lOYbg"
32
- };
33
-
34
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Toast-module_wrapper__1uj9O {\n\tpadding: var(--toast-padding) !important;\n\tcolor: var(--toast-color);\n\tposition: var(--toast-position);\n\tborder: var(--toast-border);\n\tborder-radius: var(--toast-border-radius);\n\tbackground: var(--toast-background);\n\tz-index: var(--elevation-status);\n\tgap: 16px;\n\tbox-shadow: var(--surface-shadow-soft);\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.Toast-module_close__i10-s {\n\tmin-height: 20px;\n\tmax-height: 20px;\n\tmin-width: 20px;\n\tmax-width: 20px;\n\tcursor: pointer;\n}\n\n.Toast-module_message__3dP0P {\n\tgap: 6px;\n}\n\n.Toast-module_progress__SWsbA {\n\tmin-height: 20px;\n\tmax-height: 20px;\n\tmin-width: 20px;\n\tmax-width: 20px;\n}\n\n.Toast-module_s__kc5Ef {\n}\n\n.Toast-module_m__JtmLz {\n}\n.Toast-module_l__-W0PD {\n}\n"),
35
- function(ToastType) {
36
- ToastType.Success = "success", ToastType.Error = "error", ToastType.Warning = "warning",
37
- ToastType.Info = "info";
38
- }(ToastType || (ToastType = {}));
39
-
40
- const ToastBase = React.forwardRef((props, ref) => {
41
- const {message: message = null, size: size = "m", border: border = !0, padding: padding, radius: radius = 8, container: container = "window", showDelay: showDelay = 0, duration: duration = 5e3, position: position = "bottom", offset: offset = 24, close: close = !0, progress: progress, type: type = ToastType.Info, didHide: didHide = () => null} = props, divAttributes = __rest(props, [ "message", "size", "border", "padding", "radius", "container", "showDelay", "duration", "position", "offset", "close", "progress", "type", "didHide" ]), theme = useTheme(), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [ready, setReady] = useState(!1), [content, setContent] = useState(null), timer = useRef(null);
42
- useEffect(() => {
43
- timer.current && clearTimeout(timer.current);
44
- return message && message.length > 0 ? timer.current = setTimeout(() => {
45
- setContent(message), timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
46
- setReady(!1);
47
- }, duration));
48
- }, showDelay) : setContent(null), () => {
49
- timer.current && clearTimeout(timer.current);
50
- };
51
- }, [ message, showDelay, duration ]), useEffect(() => setReady(null !== content), [ content ]);
52
- const defaultPadding = useMemo(() => close ? "10px 12px 10px 16px" : "10px 16px", [ close ]), colorScheme = useMemo(() => {
53
- switch (type) {
54
- case "success":
55
- return {
56
- border: "var(--array-land-label)",
57
- bg: "var(--array-land)",
58
- text: "var(--array-land-label)"
59
- };
60
-
61
- case "warning":
62
- return {
63
- border: "var(--array-orange-label)",
64
- bg: "var(--array-orange)",
65
- text: "var(--array-orange-label)"
66
- };
67
-
68
- case "error":
69
- return {
70
- border: "var(--feedback-warning)",
71
- bg: "var(--array-magenta)",
72
- text: "var(--feedback-warning)"
73
- };
74
-
75
- default:
76
- return {
77
- border: "var(--core-outline-primary)",
78
- bg: "var(--core-surface-secondary)",
79
- text: "var(--core-text-primary)"
80
- };
81
- }
82
- }, [ type ]), cssVars = useMemo(() => ({
83
- "--toast-padding": setStyle(padding, defaultPadding),
84
- "--toast-background": colorScheme.bg,
85
- "--toast-color": colorScheme.text,
86
- "--toast-border": border ? `1px solid ${colorScheme.border}` : "unset",
87
- "--toast-border-radius": setStyle(radius, 4),
88
- "--toast-position": "window" === container ? "fixed" : "absolute"
89
- }), [ padding, border, colorScheme, radius, defaultPadding, container ]), variants = useMemo(() => {
90
- const positionShow = "bottom" === position ? {
91
- bottom: offset
92
- } : {
93
- top: offset
94
- }, positionHide = "bottom" === position ? {
95
- bottom: -offset
96
- } : {
97
- top: -offset
98
- }, transition = {
99
- ease: "easeInOut",
100
- duration: .25
101
- };
102
- return {
103
- initial: Object.assign({
104
- opacity: 0
105
- }, positionHide),
106
- animate: Object.assign(Object.assign({
107
- opacity: 1
108
- }, positionShow), {
109
- transition: transition
110
- }),
111
- exit: Object.assign(Object.assign({
112
- opacity: 0
113
- }, positionHide), {
114
- transition: transition
115
- })
116
- };
117
- }, [ position, offset ]), classNames = useMemo(() => filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]), handleClose = useCallback(() => {
118
- setReady(!1);
119
- }, []), handleMouseOver = useCallback(() => {
120
- timer.current && clearTimeout(timer.current);
121
- }, []), handleMouseOut = useCallback(() => {
122
- timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
123
- setContent(null);
124
- }, duration));
125
- }, [ duration ]), showProgress = useMemo(() => void 0 !== progress ? progress : "Infinite" === duration, [ progress, duration ]), iconColor = useMemo(() => {
126
- switch (type) {
127
- case ToastType.Error:
128
- return theme.current.colors["feedback-warning"];
129
-
130
- case ToastType.Success:
131
- return theme.current.colors["array-land-label"];
132
-
133
- case ToastType.Warning:
134
- return theme.current.colors["array-orange-label"];
135
-
136
- default:
137
- return theme.current.colors["core-text-primary"];
138
- }
139
- }, [ type, theme ]);
140
- return jsx(AnimatePresence, {
141
- onExitComplete: () => didHide(),
142
- initial: !1,
143
- children: ready && jsxs(motion.div, Object.assign({
144
- ref: ref,
145
- id: divId,
146
- className: classNames
147
- }, rest, {
148
- onMouseEnter: handleMouseOver,
149
- onMouseLeave: handleMouseOut,
150
- onFocus: handleMouseOver,
151
- onBlur: handleMouseOut,
152
- style: Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), {
153
- visibility: ready ? "visible" : "hidden"
154
- }),
155
- variants: variants,
156
- initial: "initial",
157
- animate: "animate",
158
- exit: "exit",
159
- children: [ jsxs("div", {
160
- role: "status",
161
- "aria-live": "polite",
162
- className: css.message,
163
- children: [ showProgress && jsx("div", {
164
- className: css.progress,
165
- children: jsx(ProgressIndicator, {
166
- show: !0,
167
- inline: !0,
168
- color: iconColor
169
- })
170
- }), content ]
171
- }), ("Infinite" === duration || close) && jsx("div", {
172
- className: css.close,
173
- tabIndex: 0,
174
- role: "button",
175
- "aria-label": "dismiss message",
176
- onKeyDown: e => accessibleKeyDown(e, handleClose),
177
- onClick: handleClose,
178
- children: jsx(Icon, {
179
- name: "x",
180
- size: 20,
181
- strokeColor: iconColor
182
- })
183
- }) ]
184
- }))
185
- });
186
- });
187
-
188
- ToastBase.displayName = "Toast";
189
-
190
- const Toast = React.memo(ToastBase);
191
-
192
- export { Toast as T, ToastType as a };
@@ -1,51 +0,0 @@
1
- import { jsxs, jsx } from "react/jsx-runtime";
2
-
3
- import { useMemo } from "react";
4
-
5
- import { I as IconButton } from "./IconButton-ByBYppAj.mjs";
6
-
7
- import { L as Label } from "./Label-C04tD7UZ.mjs";
8
-
9
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
10
-
11
- var css_toggleButton = "ToggleButton-module_toggleButton__H7KgI flexBox-module_rowStart__4tcxS";
12
-
13
- function ToggleButton(props) {
14
- const {label: label, textSize: textSize, icon: icon, selected: selected = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-surface-primary)", bgColor: bgColor = "var(--core-surface-secondary)", bgColorOn: bgColorOn = "var(--core-text-special)", iconSize: iconSize = 20, buttonSize: buttonSize = "m", tooltip: tooltip, gap: gap = 4, unselect: unselect = !0, fill: fill = !1, disabled: disabled = !1, onChange: onChange, onSelect: onSelect, onToolTip: onToolTip, children: children} = props, handleClick = () => {
15
- if (!unselect && selected) return;
16
- const newState = !selected;
17
- null == onChange || onChange(newState), newState && (null == onSelect || onSelect());
18
- }, cssVars = useMemo(() => ({
19
- "--tb-gap": `${gap}px`
20
- }), [ gap ]);
21
- return jsxs("div", {
22
- className: css_toggleButton,
23
- style: cssVars,
24
- children: [ icon && jsx(IconButton, {
25
- icon: icon,
26
- buttonSize: buttonSize,
27
- tooltip: tooltip,
28
- toggle: !selected,
29
- isToggled: selected,
30
- bgColorOn: bgColorOn,
31
- bgColor: bgColor,
32
- iconColor: iconColor,
33
- iconColorOn: iconColorOn,
34
- onClick: handleClick,
35
- iconSize: iconSize,
36
- iconFill: fill,
37
- disabled: disabled,
38
- onToolTip: onToolTip
39
- }), (children || label) && jsx(Label, {
40
- textSize: textSize,
41
- borderSize: 0,
42
- padding: 0,
43
- onClick: handleClick,
44
- children: null != children ? children : label
45
- }) ]
46
- });
47
- }
48
-
49
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.ToggleButton-module_toggleButton__H7KgI {\n\twidth: min-content;\n\tgap: var(--tb-gap);\n}\n");
50
-
51
- export { ToggleButton as T };
@@ -1,139 +0,0 @@
1
- 'use client';
2
- import { jsxs, jsx } from "react/jsx-runtime";
3
-
4
- import React, { useState, useRef, useId, useCallback, useMemo } from "react";
5
-
6
- import { s as setStyle, a as accessibleKeyDown } from "./misc-wS74txaa.mjs";
7
-
8
- import { F as FileList } from "./FileList-fh-x9Dzm.mjs";
9
-
10
- import { I as Icon } from "./Icon--RjjODc9.mjs";
11
-
12
- import { P as ProgressIndicator } from "./ProgressIndicator-B5oByN3i.mjs";
13
-
14
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
15
-
16
- var css = {
17
- wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
18
- icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
19
- title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
20
- message: "UploadArea-module_message__U1ZVM flexBox-module_row__z24tF",
21
- files: "UploadArea-module_files__Q796x flexBox-module_column__ezvMq",
22
- xs: "UploadArea-module_xs__-AoM7 type-module_body-xs-regular__ZAFft",
23
- s: "UploadArea-module_s__wy1zN type-module_body-s-regular__vRHSP",
24
- m: "UploadArea-module_m__bKuFN type-module_body-m-regular__LuQBA",
25
- l: "UploadArea-module_l__KG9YN type-module_body-l-regular__lOYbg"
26
- };
27
-
28
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.UploadArea-module_wrapper__aircC {\n\tpadding: var(--ua-padding) !important;\n\tborder: var(--ua-border) var(--ua-border-style) var(--ua-border-color);\n\tborder-radius: var(--ua-radius);\n\tbackground: var(--ua-bg-color);\n\tgap: 8px;\n\tcursor: var(--ua-cursor);\n\twidth: var(--ua-width);\n\theight: var(--ua-height);\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.UploadArea-module_icon__M7n-m {\n\tmin-height: var(--ua-icon-size);\n\theight: var(--ua-icon-size);\n\tmin-width: var(--ua-icon-size);\n\twidth: var(--ua-icon-size);\n\tpointer-events: none;\n}\n\n.UploadArea-module_title__VbNGq {\n\tpointer-events: none;\n}\n\n.UploadArea-module_message__U1ZVM {\n\tcolor: var(--core-text-tertiary);\n\tpointer-events: none;\n\tgap: 8px;\n}\n\n.UploadArea-module_files__Q796x {\n\tmargin-top: 16px !important;\n\twidth: 100%;\n}\n\n.UploadArea-module_xs__-AoM7 {\n}\n\n.UploadArea-module_s__wy1zN {\n}\n\n.UploadArea-module_m__bKuFN {\n}\n\n.UploadArea-module_l__KG9YN {\n}\n");
29
-
30
- const imageTypes = [ "png", "jpg", "jpeg", "gif", "svg", "heic", "heif" ], videoTypes = [ "mp4", "avi", "mov", "wmv", "flv" ], documentTypes = [ "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx" ], audioTypes = [ "mp3", "wav", "ogg", "aac", "flac" ], textTypes = [ "txt", "rtf", "md", "csv", "json", "xml" ], allTypes = [ ...imageTypes, ...videoTypes, ...documentTypes, ...audioTypes, ...textTypes ];
31
-
32
- var FileTypes;
33
-
34
- !function(FileTypes) {
35
- FileTypes.images = "images", FileTypes.videos = "videos", FileTypes.documents = "documents",
36
- FileTypes.audio = "audio", FileTypes.text = "text", FileTypes.all = "all", FileTypes.custom = "custom";
37
- }(FileTypes || (FileTypes = {}));
38
-
39
- const UploadAreaBase = React.forwardRef((props, ref) => {
40
- const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", borderWidth: borderWidth, border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", borderRadius: borderRadius, radius: radius = 8, padding: padding = 32, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = useState(!1), inputRef = useRef(null), dragDepth = useRef(0), inputId = useId(), titleId = useId(), messageId = useId(), isInteractive = !busy && files.length < 1, resolvedBorderWidth = null != borderWidth ? borderWidth : border, resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, handleClickUpload = useCallback(() => {
41
- var _a;
42
- isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
43
- null === (_a = inputRef.current) || void 0 === _a || _a.click());
44
- }, [ isInteractive ]), handleFileInputChange = useCallback(e => {
45
- busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
46
- }, [ busy, onUpload ]), hasFilesInDrag = useCallback(e => {
47
- var _a, _b;
48
- return Array.from(null !== (_b = null === (_a = e.dataTransfer) || void 0 === _a ? void 0 : _a.types) && void 0 !== _b ? _b : []).includes("Files");
49
- }, []), handleDragEnter = useCallback(e => {
50
- e.preventDefault(), !busy && hasFilesInDrag(e) && (dragDepth.current += 1, 1 === dragDepth.current && setHovered(!0));
51
- }, [ busy, hasFilesInDrag ]), handleDragLeave = useCallback(e => {
52
- e.preventDefault(), busy || (dragDepth.current = Math.max(0, dragDepth.current - 1),
53
- 0 === dragDepth.current && setHovered(!1));
54
- }, [ busy ]), handleDrop = useCallback(e => {
55
- var _a;
56
- if (e.preventDefault(), busy) return;
57
- dragDepth.current = 0, setHovered(!1);
58
- const files = Array.from(null !== (_a = e.dataTransfer.files) && void 0 !== _a ? _a : []);
59
- null == onUpload || onUpload(files);
60
- }, [ busy, onUpload ]), iconStrokeColor = useMemo(() => hovered ? iconColorHover : iconColor, [ hovered, iconColor, iconColorHover ]), cssVars = useMemo(() => ({
61
- "--ua-border": `${resolvedBorderWidth}px`,
62
- "--ua-border-style": borderStyle,
63
- "--ua-border-color": hovered || busy ? borderColorHover : borderColor,
64
- "--ua-radius": `${resolvedBorderRadius}px`,
65
- "--ua-padding": setStyle(padding),
66
- "--ua-bg-color": hovered ? resolvedBackgroundColorHover : resolvedBackgroundColor,
67
- "--ua-icon-size": `${iconSize}px`,
68
- "--ua-cursor": busy || files.length > 0 ? "default" : "pointer",
69
- "--ua-width": setStyle(width),
70
- "--ua-height": setStyle(height)
71
- }), [ resolvedBorderWidth, borderStyle, borderColor, borderColorHover, resolvedBorderRadius, padding, resolvedBackgroundColor, resolvedBackgroundColorHover, iconSize, busy, hovered, height, files.length, width ]);
72
- return jsxs("div", {
73
- className: css.wrapper,
74
- style: cssVars,
75
- ref: ref,
76
- role: isInteractive ? "button" : void 0,
77
- "aria-label": isInteractive ? "Click to upload files" : void 0,
78
- "aria-describedby": `${titleId} ${messageId}`,
79
- "aria-disabled": !isInteractive,
80
- tabIndex: isInteractive ? 0 : -1,
81
- onClick: isInteractive ? handleClickUpload : void 0,
82
- onKeyDown: isInteractive ? e => accessibleKeyDown(e, () => handleClickUpload()) : void 0,
83
- onDragEnter: handleDragEnter,
84
- onDragOver: e => {
85
- e.preventDefault();
86
- },
87
- onDragLeave: handleDragLeave,
88
- onDrop: handleDrop,
89
- children: [ jsx("div", {
90
- className: css.icon,
91
- children: jsx(Icon, {
92
- size: iconSize,
93
- name: icon,
94
- strokeColor: iconStrokeColor,
95
- pointer: !1
96
- })
97
- }), jsx("div", {
98
- id: titleId,
99
- className: css.title,
100
- children: title
101
- }), jsxs("div", {
102
- id: messageId,
103
- className: `${css.message} ${css[textSize]}`,
104
- children: [ busy && showProgress && jsx(ProgressIndicator, {
105
- show: !0,
106
- size: 20,
107
- inline: !0,
108
- color: iconStrokeColor
109
- }), busy ? busyMessage : message ]
110
- }), files.length > 0 && jsx("div", {
111
- className: css.files,
112
- children: jsx(FileList, {
113
- files: files,
114
- bgColor: "var(--core-surface-primary)",
115
- size: "m",
116
- direction: "column",
117
- gap: 8,
118
- iconSize: 24,
119
- padding: "10px",
120
- canRemove: canRemove
121
- })
122
- }), jsx("input", {
123
- id: inputId,
124
- ref: inputRef,
125
- type: "file",
126
- hidden: !0,
127
- disabled: busy,
128
- multiple: multiple,
129
- accept: acceptedTypes ? acceptedTypes.join(", ") : void 0,
130
- onChange: handleFileInputChange
131
- }) ]
132
- });
133
- });
134
-
135
- UploadAreaBase.displayName = "UploadArea";
136
-
137
- const UploadArea = React.memo(UploadAreaBase);
138
-
139
- export { UploadArea as U, allTypes as a, audioTypes as b, documentTypes as d, imageTypes as i, textTypes as t, videoTypes as v };