@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,178 +0,0 @@
1
- 'use client';
2
- "use strict";
3
-
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
5
-
6
- require("../theme/colors.js");
7
-
8
- var misc = require("./misc-QpU0XEOW.js");
9
-
10
- require("../hooks/useWindow.js");
11
-
12
- var ToastType, Icon = require("./Icon-BtcHXeqE.js"), ProgressIndicator = require("./ProgressIndicator-D06PqCQk.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
13
- wrapper: "Toast-module_wrapper__1uj9O flexBox-module_rowBetween__5FEvi",
14
- close: "Toast-module_close__i10-s flexBox-module_row__z24tF",
15
- message: "Toast-module_message__3dP0P flexBox-module_rowStart__4tcxS",
16
- progress: "Toast-module_progress__SWsbA flexBox-module_row__z24tF",
17
- s: "Toast-module_s__kc5Ef type-module_body-s-regular__vRHSP",
18
- m: "Toast-module_m__JtmLz type-module_body-m-regular__LuQBA",
19
- l: "Toast-module_l__-W0PD type-module_body-l-regular__lOYbg"
20
- };
21
-
22
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Toast-module_wrapper__1uj9O {\n\tpadding: var(--toast-padding) !important;\n\tcolor: var(--toast-color);\n\tposition: var(--toast-position);\n\tborder: var(--toast-border);\n\tborder-radius: var(--toast-border-radius);\n\tbackground: var(--toast-background);\n\tz-index: var(--elevation-status);\n\tgap: 16px;\n\tbox-shadow: var(--surface-shadow-soft);\n\tleft: 50%;\n\ttransform: translateX(-50%);\n}\n\n.Toast-module_close__i10-s {\n\tmin-height: 20px;\n\tmax-height: 20px;\n\tmin-width: 20px;\n\tmax-width: 20px;\n\tcursor: pointer;\n}\n\n.Toast-module_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"),
23
- exports.ToastType = void 0, (ToastType = exports.ToastType || (exports.ToastType = {})).Success = "success",
24
- ToastType.Error = "error", ToastType.Warning = "warning", ToastType.Info = "info";
25
-
26
- const ToastBase = React.forwardRef((props, ref) => {
27
- 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 = exports.ToastType.Info, didHide: didHide = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "message", "size", "border", "padding", "radius", "container", "showDelay", "duration", "position", "offset", "close", "progress", "type", "didHide" ]), theme = hooks_useTheme.useTheme(), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? `${className}` : "", [ready, setReady] = React.useState(!1), [content, setContent] = React.useState(null), timer = React.useRef(null);
28
- React.useEffect(() => {
29
- timer.current && clearTimeout(timer.current);
30
- return message && message.length > 0 ? timer.current = setTimeout(() => {
31
- setContent(message), timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
32
- setReady(!1);
33
- }, duration));
34
- }, showDelay) : setContent(null), () => {
35
- timer.current && clearTimeout(timer.current);
36
- };
37
- }, [ message, showDelay, duration ]), React.useEffect(() => setReady(null !== content), [ content ]);
38
- const defaultPadding = React.useMemo(() => close ? "10px 12px 10px 16px" : "10px 16px", [ close ]), colorScheme = React.useMemo(() => {
39
- switch (type) {
40
- case "success":
41
- return {
42
- border: "var(--array-land-label)",
43
- bg: "var(--array-land)",
44
- text: "var(--array-land-label)"
45
- };
46
-
47
- case "warning":
48
- return {
49
- border: "var(--array-orange-label)",
50
- bg: "var(--array-orange)",
51
- text: "var(--array-orange-label)"
52
- };
53
-
54
- case "error":
55
- return {
56
- border: "var(--feedback-warning)",
57
- bg: "var(--array-magenta)",
58
- text: "var(--feedback-warning)"
59
- };
60
-
61
- default:
62
- return {
63
- border: "var(--core-outline-primary)",
64
- bg: "var(--core-surface-secondary)",
65
- text: "var(--core-text-primary)"
66
- };
67
- }
68
- }, [ type ]), cssVars = React.useMemo(() => ({
69
- "--toast-padding": misc.setStyle(padding, defaultPadding),
70
- "--toast-background": colorScheme.bg,
71
- "--toast-color": colorScheme.text,
72
- "--toast-border": border ? `1px solid ${colorScheme.border}` : "unset",
73
- "--toast-border-radius": misc.setStyle(radius, 4),
74
- "--toast-position": "window" === container ? "fixed" : "absolute"
75
- }), [ padding, border, colorScheme, radius, defaultPadding, container ]), variants = React.useMemo(() => {
76
- const positionShow = "bottom" === position ? {
77
- bottom: offset
78
- } : {
79
- top: offset
80
- }, positionHide = "bottom" === position ? {
81
- bottom: -offset
82
- } : {
83
- top: -offset
84
- }, transition = {
85
- ease: "easeInOut",
86
- duration: .25
87
- };
88
- return {
89
- initial: Object.assign({
90
- opacity: 0
91
- }, positionHide),
92
- animate: Object.assign(Object.assign({
93
- opacity: 1
94
- }, positionShow), {
95
- transition: transition
96
- }),
97
- exit: Object.assign(Object.assign({
98
- opacity: 0
99
- }, positionHide), {
100
- transition: transition
101
- })
102
- };
103
- }, [ position, offset ]), classNames = React.useMemo(() => misc.filterClasses([ css.wrapper, css[size], divClass ]), [ size, divClass ]), handleClose = React.useCallback(() => {
104
- setReady(!1);
105
- }, []), handleMouseOver = React.useCallback(() => {
106
- timer.current && clearTimeout(timer.current);
107
- }, []), handleMouseOut = React.useCallback(() => {
108
- timer.current && clearTimeout(timer.current), "Infinite" !== duration && (timer.current = setTimeout(() => {
109
- setContent(null);
110
- }, duration));
111
- }, [ duration ]), showProgress = React.useMemo(() => void 0 !== progress ? progress : "Infinite" === duration, [ progress, duration ]), iconColor = React.useMemo(() => {
112
- switch (type) {
113
- case exports.ToastType.Error:
114
- return theme.current.colors["feedback-warning"];
115
-
116
- case exports.ToastType.Success:
117
- return theme.current.colors["array-land-label"];
118
-
119
- case exports.ToastType.Warning:
120
- return theme.current.colors["array-orange-label"];
121
-
122
- default:
123
- return theme.current.colors["core-text-primary"];
124
- }
125
- }, [ type, theme ]);
126
- return jsxRuntime.jsx(react.AnimatePresence, {
127
- onExitComplete: () => didHide(),
128
- initial: !1,
129
- children: ready && jsxRuntime.jsxs(react.motion.div, Object.assign({
130
- ref: ref,
131
- id: divId,
132
- className: classNames
133
- }, rest, {
134
- onMouseEnter: handleMouseOver,
135
- onMouseLeave: handleMouseOut,
136
- onFocus: handleMouseOver,
137
- onBlur: handleMouseOut,
138
- style: Object.assign(Object.assign(Object.assign({}, divStyle), cssVars), {
139
- visibility: ready ? "visible" : "hidden"
140
- }),
141
- variants: variants,
142
- initial: "initial",
143
- animate: "animate",
144
- exit: "exit",
145
- children: [ jsxRuntime.jsxs("div", {
146
- role: "status",
147
- "aria-live": "polite",
148
- className: css.message,
149
- children: [ showProgress && jsxRuntime.jsx("div", {
150
- className: css.progress,
151
- children: jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
152
- show: !0,
153
- inline: !0,
154
- color: iconColor
155
- })
156
- }), content ]
157
- }), ("Infinite" === duration || close) && jsxRuntime.jsx("div", {
158
- className: css.close,
159
- tabIndex: 0,
160
- role: "button",
161
- "aria-label": "dismiss message",
162
- onKeyDown: e => misc.accessibleKeyDown(e, handleClose),
163
- onClick: handleClose,
164
- children: jsxRuntime.jsx(Icon.Icon, {
165
- name: "x",
166
- size: 20,
167
- strokeColor: iconColor
168
- })
169
- }) ]
170
- }))
171
- });
172
- });
173
-
174
- ToastBase.displayName = "Toast";
175
-
176
- const Toast = React.memo(ToastBase);
177
-
178
- exports.Toast = Toast;
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- var jsxRuntime = require("react/jsx-runtime"), React = require("react"), IconButton = require("./IconButton-CF4cR7Tr.js"), Label = require("./Label-htjXHiQ4.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_toggleButton = "ToggleButton-module_toggleButton__H7KgI flexBox-module_rowStart__4tcxS";
4
-
5
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.ToggleButton-module_toggleButton__H7KgI {\n\twidth: min-content;\n\tgap: var(--tb-gap);\n}\n"),
6
- exports.ToggleButton = function(props) {
7
- const {label: label, textSize: textSize, icon: icon, selected: selected = !1, iconColor: iconColor = "var(--core-text-primary)", iconColorOn: iconColorOn = "var(--core-surface-primary)", bgColor: bgColor = "var(--core-surface-secondary)", bgColorOn: bgColorOn = "var(--core-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 = () => {
8
- if (!unselect && selected) return;
9
- const newState = !selected;
10
- null == onChange || onChange(newState), newState && (null == onSelect || onSelect());
11
- }, cssVars = React.useMemo(() => ({
12
- "--tb-gap": `${gap}px`
13
- }), [ gap ]);
14
- return jsxRuntime.jsxs("div", {
15
- className: css_toggleButton,
16
- style: cssVars,
17
- children: [ icon && jsxRuntime.jsx(IconButton.IconButton, {
18
- icon: icon,
19
- buttonSize: buttonSize,
20
- tooltip: tooltip,
21
- toggle: !selected,
22
- isToggled: selected,
23
- bgColorOn: bgColorOn,
24
- bgColor: bgColor,
25
- iconColor: iconColor,
26
- iconColorOn: iconColorOn,
27
- onClick: handleClick,
28
- iconSize: iconSize,
29
- iconFill: fill,
30
- disabled: disabled,
31
- onToolTip: onToolTip
32
- }), (children || label) && jsxRuntime.jsx(Label.Label, {
33
- textSize: textSize,
34
- borderSize: 0,
35
- padding: 0,
36
- onClick: handleClick,
37
- children: null != children ? children : label
38
- }) ]
39
- });
40
- };
@@ -1,129 +0,0 @@
1
- 'use client';
2
- "use strict";
3
-
4
- var jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-QpU0XEOW.js"), FileList = require("./FileList-sDq1jK0b.js"), Icon = require("./Icon-BtcHXeqE.js"), ProgressIndicator = require("./ProgressIndicator-D06PqCQk.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
5
- wrapper: "UploadArea-module_wrapper__aircC flexBox-module_column__ezvMq",
6
- icon: "UploadArea-module_icon__M7n-m flexBox-module_row__z24tF",
7
- title: "UploadArea-module_title__VbNGq type-module_body-l-bold__Fh2dt",
8
- message: "UploadArea-module_message__U1ZVM flexBox-module_row__z24tF",
9
- files: "UploadArea-module_files__Q796x flexBox-module_column__ezvMq",
10
- xs: "UploadArea-module_xs__-AoM7 type-module_body-xs-regular__ZAFft",
11
- s: "UploadArea-module_s__wy1zN type-module_body-s-regular__vRHSP",
12
- m: "UploadArea-module_m__bKuFN type-module_body-m-regular__LuQBA",
13
- l: "UploadArea-module_l__KG9YN type-module_body-l-regular__lOYbg"
14
- };
15
-
16
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.UploadArea-module_wrapper__aircC {\n\tpadding: var(--ua-padding) !important;\n\tborder: var(--ua-border) var(--ua-border-style) var(--ua-border-color);\n\tborder-radius: var(--ua-radius);\n\tbackground: var(--ua-bg-color);\n\tgap: 8px;\n\tcursor: var(--ua-cursor);\n\twidth: var(--ua-width);\n\theight: var(--ua-height);\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.UploadArea-module_icon__M7n-m {\n\tmin-height: var(--ua-icon-size);\n\theight: var(--ua-icon-size);\n\tmin-width: var(--ua-icon-size);\n\twidth: var(--ua-icon-size);\n\tpointer-events: none;\n}\n\n.UploadArea-module_title__VbNGq {\n\tpointer-events: none;\n}\n\n.UploadArea-module_message__U1ZVM {\n\tcolor: var(--core-text-tertiary);\n\tpointer-events: none;\n\tgap: 8px;\n}\n\n.UploadArea-module_files__Q796x {\n\tmargin-top: 16px !important;\n\twidth: 100%;\n}\n\n.UploadArea-module_xs__-AoM7 {\n}\n\n.UploadArea-module_s__wy1zN {\n}\n\n.UploadArea-module_m__bKuFN {\n}\n\n.UploadArea-module_l__KG9YN {\n}\n");
17
-
18
- const imageTypes = [ "png", "jpg", "jpeg", "gif", "svg", "heic", "heif" ], videoTypes = [ "mp4", "avi", "mov", "wmv", "flv" ], documentTypes = [ "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx" ], audioTypes = [ "mp3", "wav", "ogg", "aac", "flac" ], textTypes = [ "txt", "rtf", "md", "csv", "json", "xml" ], allTypes = [ ...imageTypes, ...videoTypes, ...documentTypes, ...audioTypes, ...textTypes ];
19
-
20
- var FileTypes;
21
-
22
- !function(FileTypes) {
23
- FileTypes.images = "images", FileTypes.videos = "videos", FileTypes.documents = "documents",
24
- FileTypes.audio = "audio", FileTypes.text = "text", FileTypes.all = "all", FileTypes.custom = "custom";
25
- }(FileTypes || (FileTypes = {}));
26
-
27
- const UploadAreaBase = React.forwardRef((props, ref) => {
28
- const {icon: icon = "upload", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", title: title = "Upload Files", width: width = "100%", height: height = "auto", message: message = "Drag and drop files here or click to upload", busyMessage: busyMessage = "Uploading in progress", iconSize: iconSize = 24, textSize: textSize = "m", borderWidth: borderWidth, border: border = 1, borderStyle: borderStyle = "dashed", borderColor: borderColor = "var(--core-outline-primary)", borderColorHover: borderColorHover = "var(--core-outline-special)", borderRadius: borderRadius, radius: radius = 8, padding: padding = 32, backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-surface-special)", acceptedTypes: acceptedTypes = allTypes, multiple: multiple = !0, busy: busy = !1, canRemove: canRemove = !0, showProgress: showProgress = !0, files: files = [], onUpload: onUpload} = props, [hovered, setHovered] = React.useState(!1), inputRef = React.useRef(null), dragDepth = React.useRef(0), inputId = React.useId(), titleId = React.useId(), messageId = React.useId(), isInteractive = !busy && files.length < 1, resolvedBorderWidth = null != borderWidth ? borderWidth : border, resolvedBorderRadius = null != borderRadius ? borderRadius : radius, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, handleClickUpload = React.useCallback(() => {
29
- var _a;
30
- isInteractive && (null == inputRef ? void 0 : inputRef.current) && (inputRef.current.value = "",
31
- null === (_a = inputRef.current) || void 0 === _a || _a.click());
32
- }, [ isInteractive ]), handleFileInputChange = React.useCallback(e => {
33
- busy || e.target.files && (null == onUpload || onUpload(Array.from(e.target.files)));
34
- }, [ busy, onUpload ]), hasFilesInDrag = React.useCallback(e => {
35
- var _a, _b;
36
- return Array.from(null !== (_b = null === (_a = e.dataTransfer) || void 0 === _a ? void 0 : _a.types) && void 0 !== _b ? _b : []).includes("Files");
37
- }, []), handleDragEnter = React.useCallback(e => {
38
- e.preventDefault(), !busy && hasFilesInDrag(e) && (dragDepth.current += 1, 1 === dragDepth.current && setHovered(!0));
39
- }, [ busy, hasFilesInDrag ]), handleDragLeave = React.useCallback(e => {
40
- e.preventDefault(), busy || (dragDepth.current = Math.max(0, dragDepth.current - 1),
41
- 0 === dragDepth.current && setHovered(!1));
42
- }, [ busy ]), handleDrop = React.useCallback(e => {
43
- var _a;
44
- if (e.preventDefault(), busy) return;
45
- dragDepth.current = 0, setHovered(!1);
46
- const files = Array.from(null !== (_a = e.dataTransfer.files) && void 0 !== _a ? _a : []);
47
- null == onUpload || onUpload(files);
48
- }, [ busy, onUpload ]), iconStrokeColor = React.useMemo(() => hovered ? iconColorHover : iconColor, [ hovered, iconColor, iconColorHover ]), cssVars = React.useMemo(() => ({
49
- "--ua-border": `${resolvedBorderWidth}px`,
50
- "--ua-border-style": borderStyle,
51
- "--ua-border-color": hovered || busy ? borderColorHover : borderColor,
52
- "--ua-radius": `${resolvedBorderRadius}px`,
53
- "--ua-padding": misc.setStyle(padding),
54
- "--ua-bg-color": hovered ? resolvedBackgroundColorHover : resolvedBackgroundColor,
55
- "--ua-icon-size": `${iconSize}px`,
56
- "--ua-cursor": busy || files.length > 0 ? "default" : "pointer",
57
- "--ua-width": misc.setStyle(width),
58
- "--ua-height": misc.setStyle(height)
59
- }), [ resolvedBorderWidth, borderStyle, borderColor, borderColorHover, resolvedBorderRadius, padding, resolvedBackgroundColor, resolvedBackgroundColorHover, iconSize, busy, hovered, height, files.length, width ]);
60
- return jsxRuntime.jsxs("div", {
61
- className: css.wrapper,
62
- style: cssVars,
63
- ref: ref,
64
- role: isInteractive ? "button" : void 0,
65
- "aria-label": isInteractive ? "Click to upload files" : void 0,
66
- "aria-describedby": `${titleId} ${messageId}`,
67
- "aria-disabled": !isInteractive,
68
- tabIndex: isInteractive ? 0 : -1,
69
- onClick: isInteractive ? handleClickUpload : void 0,
70
- onKeyDown: isInteractive ? e => misc.accessibleKeyDown(e, () => handleClickUpload()) : void 0,
71
- onDragEnter: handleDragEnter,
72
- onDragOver: e => {
73
- e.preventDefault();
74
- },
75
- onDragLeave: handleDragLeave,
76
- onDrop: handleDrop,
77
- children: [ jsxRuntime.jsx("div", {
78
- className: css.icon,
79
- children: jsxRuntime.jsx(Icon.Icon, {
80
- size: iconSize,
81
- name: icon,
82
- strokeColor: iconStrokeColor,
83
- pointer: !1
84
- })
85
- }), jsxRuntime.jsx("div", {
86
- id: titleId,
87
- className: css.title,
88
- children: title
89
- }), jsxRuntime.jsxs("div", {
90
- id: messageId,
91
- className: `${css.message} ${css[textSize]}`,
92
- children: [ busy && showProgress && jsxRuntime.jsx(ProgressIndicator.ProgressIndicator, {
93
- show: !0,
94
- size: 20,
95
- inline: !0,
96
- color: iconStrokeColor
97
- }), busy ? busyMessage : message ]
98
- }), files.length > 0 && jsxRuntime.jsx("div", {
99
- className: css.files,
100
- children: jsxRuntime.jsx(FileList.FileList, {
101
- files: files,
102
- bgColor: "var(--core-surface-primary)",
103
- size: "m",
104
- direction: "column",
105
- gap: 8,
106
- iconSize: 24,
107
- padding: "10px",
108
- canRemove: canRemove
109
- })
110
- }), jsxRuntime.jsx("input", {
111
- id: inputId,
112
- ref: inputRef,
113
- type: "file",
114
- hidden: !0,
115
- disabled: busy,
116
- multiple: multiple,
117
- accept: acceptedTypes ? acceptedTypes.join(", ") : void 0,
118
- onChange: handleFileInputChange
119
- }) ]
120
- });
121
- });
122
-
123
- UploadAreaBase.displayName = "UploadArea";
124
-
125
- const UploadArea = React.memo(UploadAreaBase);
126
-
127
- exports.UploadArea = UploadArea, exports.allTypes = allTypes, exports.audioTypes = audioTypes,
128
- exports.documentTypes = documentTypes, exports.imageTypes = imageTypes, exports.textTypes = textTypes,
129
- exports.videoTypes = videoTypes;
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- exports.styleInject = function(css, ref) {
4
- void 0 === ref && (ref = {});
5
- var insertAt = ref.insertAt;
6
- if (css && "undefined" != typeof document) {
7
- var head = document.head || document.getElementsByTagName("head")[0], style = document.createElement("style");
8
- style.type = "text/css", "top" === insertAt && head.firstChild ? head.insertBefore(style, head.firstChild) : head.appendChild(style),
9
- style.styleSheet ? style.styleSheet.cssText = css : style.appendChild(document.createTextNode(css));
10
- }
11
- };
@@ -1,92 +0,0 @@
1
- 'use client';
2
- import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
3
-
4
- import { jsx } from "react/jsx-runtime";
5
-
6
- import React, { useRef, useState, useMemo, useEffect, useCallback } from "react";
7
-
8
- import { n as normalizedPercent, a as accessibleKeyDown, s as setStyle } from "./misc-wS74txaa.mjs";
9
-
10
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
11
-
12
- var css_wrapper = "Avatar-module_wrapper__ab1D7 flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_user = "Avatar-module_user__ZQv0Q flexBox-module_row__z24tF type-module_body-m-regular__LuQBA";
13
-
14
- styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Avatar-module_wrapper__ab1D7 {\n\tposition: relative;\n\tmin-height: var(--avatar-size);\n\tmin-width: var(--avatar-size);\n\tmax-height: var(--avatar-size);\n\tmax-width: var(--avatar-size);\n\theight: var(--avatar-size);\n\twidth: var(--avatar-size);\n\tborder: var(--avatar-outer-border-size) solid var(--avatar-outer-border-color);\n\tborder-radius: 100%;\n\toutline: 0;\n}\n\n.Avatar-module_user__ZQv0Q {\n\tfont-size: var(--avatar-font-size) !important;\n\theight: 100%;\n\twidth: 100%;\n\tline-height: 1em;\n\ttext-transform: uppercase;\n\tborder-radius: 100%;\n\tborder: var(--avatar-border) solid var(--avatar-border-color);\n\tbackground-color: var(--avatar-bg-color);\n\tcolor: var(--avatar-color);\n\tbackground-image: var(--avatar-bg-image);\n\tbackground-size: cover;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\ttransition: border-color var(--motion-water-duration) var(--motion-water) 0s;\n\t&:hover {\n\t\tborder-color: var(--avatar-border-color-hover);\n\t}\n}\n");
15
-
16
- const Avatar = React.memo(props => {
17
- var _a;
18
- const {email: email, name: name, image: image = "", textColor: textColor, borderWidth: borderWidth, borderSize: borderSize = 0, color: color, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderSize: outerBorderSize, outerBorderColor: outerBorderColor, backgroundColor: backgroundColor, bgColor: bgColor, onClick: onClick, onKeyDown: onKeyDown, fontSize: fontSize, onToolTip: onToolTip = () => null, size: size = 34, frame: frame = 34, tabIndex: tabIndex = 0} = props, divAttributes = __rest(props, [ "email", "name", "image", "textColor", "borderWidth", "borderSize", "color", "borderColor", "borderColorHover", "outerBorderSize", "outerBorderColor", "backgroundColor", "bgColor", "onClick", "onKeyDown", "fontSize", "onToolTip", "size", "frame", "tabIndex" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = useRef(null), [textSize, setTextSize] = useState("inherit"), resolvedTextColor = null != textColor ? textColor : color, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, initials = useMemo(() => {
19
- if (!name && !email) return "";
20
- if (name) {
21
- let last;
22
- const parts = name.trim().split(" "), first = parts[0];
23
- return parts.length > 1 && (last = parts.at(-1)), `${first.charAt(0)}${last ? last.charAt(0) : ""}`;
24
- }
25
- return email ? email.charAt(0) : void 0;
26
- }, [ name, email ]), bgImage = useMemo(() => image ? `url(${image})` : "", [ image ]);
27
- useEffect(() => {
28
- var _a;
29
- if (void 0 !== fontSize) {
30
- if ("auto" === fontSize || "number" == typeof fontSize && fontSize <= 1) {
31
- const parentHeight = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.offsetHeight;
32
- if (!parentHeight) return void setTextSize("inherit");
33
- let size = .5;
34
- "number" == typeof fontSize && (size = fontSize);
35
- const fSize = Math.round(parentHeight * size);
36
- return void setTextSize(fSize);
37
- }
38
- if ("string" == typeof fontSize && fontSize.includes("%")) {
39
- const normalized = normalizedPercent(fontSize);
40
- return void setTextSize(normalized);
41
- }
42
- setTextSize(fontSize);
43
- } else setTextSize("inherit");
44
- }, [ fontSize ]);
45
- const displayContent = useMemo(() => image ? null : initials, [ image, initials ]), onMouseEnter = useCallback(event => {
46
- var _a;
47
- const payload = {
48
- label: null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : ""
49
- };
50
- onToolTip({
51
- payload: payload,
52
- event: event
53
- });
54
- }, [ name, email, onToolTip ]), onMouseLeave = useCallback(() => {
55
- onToolTip(null);
56
- }, [ onToolTip ]), handleKeyDown = useCallback(event => {
57
- null == onKeyDown || onKeyDown(event), onClick && !event.defaultPrevented && accessibleKeyDown(event, () => onClick(event));
58
- }, [ onClick, onKeyDown ]), avatarVars = useMemo(() => ({
59
- "--avatar-size": setStyle(size),
60
- "--avatar-frame": setStyle(frame),
61
- "--avatar-border": `${resolvedBorderWidth}px`,
62
- "--avatar-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
63
- "--avatar-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
64
- "--avatar-border-color": null != borderColor ? borderColor : "var(--core-outline-primary)",
65
- "--avatar-border-color-hover": null != borderColorHover ? borderColorHover : "var(--core-outline-special)",
66
- "--avatar-bg-image": `${bgImage}`,
67
- "--avatar-font-size": setStyle(textSize),
68
- "--avatar-outer-border-size": setStyle(outerBorderSize),
69
- "--avatar-outer-border-color": null != outerBorderColor ? outerBorderColor : "var(--core-surface-primary)"
70
- }), [ size, frame, resolvedBorderWidth, resolvedTextColor, resolvedBackgroundColor, borderColor, borderColorHover, bgImage, textSize, outerBorderSize, outerBorderColor ]), classNames = useMemo(() => `${css_wrapper}${divClass}`, [ divClass ]);
71
- return jsx("div", Object.assign({
72
- id: divId,
73
- className: classNames,
74
- style: Object.assign(Object.assign({}, divStyle), avatarVars),
75
- onMouseEnter: onMouseEnter,
76
- onMouseLeave: onMouseLeave,
77
- onClick: onClick,
78
- onKeyDown: handleKeyDown,
79
- role: onClick ? "button" : "img",
80
- tabIndex: onClick ? tabIndex : void 0,
81
- "aria-label": `User Avatar - ${null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : "Unknown User"}`
82
- }, rest, {
83
- children: jsx("div", {
84
- ref: ref,
85
- "aria-hidden": !0,
86
- className: css_user,
87
- children: displayContent
88
- })
89
- }));
90
- });
91
-
92
- export { Avatar as A };
@@ -1,30 +0,0 @@
1
- 'use client';
2
- import { a as __rest } from "./tslib.es6-C-olHjXV.mjs";
3
-
4
- import { jsx } from "react/jsx-runtime";
5
-
6
- import React, { useMemo } from "react";
7
-
8
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
9
-
10
- var css_badge = "Badge-module_badge__RsuMz flexBox-module_row__z24tF type-module_body-xs-medium__s3KvF";
11
-
12
- 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}.Badge-module_badge__RsuMz {\n\tline-height: 1em;\n\tcolor: var(--badge-color);\n\tbackground: var(--badge-bg);\n\tpadding: 2px 8px;\n\tmin-width: 24px;\n\twidth: min-content;\n\tborder-radius: 8px;\n\twhite-space: nowrap;\n}\n");
13
-
14
- const Badge = React.memo(props => {
15
- const {count: count, variant: variant = "dark", hideNull: hideNull = !0} = props, divAttributes = __rest(props, [ "count", "variant", "hideNull" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", displayCount = useMemo(() => void 0 === count ? "0" : "string" == typeof count ? count : count > 99 ? "99+" : count.toString(), [ count ]), cssVars = useMemo(() => ({
16
- "--badge-color": "light" === variant ? "var(--core-text-primary)" : "var(--core-text-light)",
17
- "--badge-bg": "light" === variant ? "var(--core-badge-secondary)" : "var(--core-badge-primary)"
18
- }), [ variant ]);
19
- return void 0 === count || "" === count || hideNull && 0 === count ? null : jsx("div", Object.assign({
20
- id: divId,
21
- className: `${css_badge}${divClass}`,
22
- style: Object.assign(Object.assign({}, divStyle), cssVars),
23
- role: "status",
24
- "aria-live": "polite"
25
- }, rest, {
26
- children: displayCount
27
- }));
28
- });
29
-
30
- export { Badge as B };
@@ -1,65 +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 { motion } from "motion/react";
7
-
8
- import React, { useState, useEffect, useMemo, useCallback } from "react";
9
-
10
- import { a as accessibleKeyDown } from "./misc-wS74txaa.mjs";
11
-
12
- import { I as Icon } from "./Icon--RjjODc9.mjs";
13
-
14
- import { s as styleInject } from "./style-inject.es-D0BjEaN8.mjs";
15
-
16
- var 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";
17
-
18
- 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.CheckBox-module_wrapper__uRsjI {\n\tmin-height: var(--cb-size);\n\theight: var(--cb-size);\n\twidth: auto;\n\tgap: 6px;\n\tcursor: pointer;\n\toverflow: hidden;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\toutline: none;\n\tborder: 0;\n}\n\n.CheckBox-module_icon__FoDJN {\n\tmin-width: var(--cb-size);\n\tmax-width: var(--cb-size);\n\tmin-height: var(--cb-size);\n\tmax-height: var(--cb-size);\n}\n\n.CheckBox-module_label__0AiBp {\n\tcolor: var(--cb-label-color);\n\ttransition: color var(--motion-water-duration) var(--motion-water-easing) 0s;\n}\n");
19
-
20
- const CheckBox = React.memo(props => {
21
- const {size: size = 20, checked: checked = !1, disabled: disabled = !1, color: color, children: children, onChange: onChange = () => null} = props, divAttributes = __rest(props, [ "size", "checked", "disabled", "color", "children", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = __rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = useState(checked);
22
- useEffect(() => setState(checked), [ checked ]);
23
- const iconName = useMemo(() => !0 === state ? "checkbox checked" : "mixed" === state ? "checkbox partial" : "checkbox", [ state ]), iconColor = 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 = useMemo(() => color || (disabled ? "var(--core-text-disabled)" : "var(--core-text-primary)"), [ color, disabled ]), cssVars = useMemo(() => ({
24
- "--cb-size": `${size}px`,
25
- "--cb-label-color": labelColor
26
- }), [ size, labelColor ]), handleToggle = useCallback(() => {
27
- if (disabled) return;
28
- let newState = !1;
29
- switch (state) {
30
- case !0:
31
- break;
32
-
33
- case "mixed":
34
- case !1:
35
- newState = !0;
36
- }
37
- setState(newState), onChange(newState);
38
- }, [ state, disabled, onChange ]);
39
- return jsxs(motion.div, Object.assign({
40
- id: divId,
41
- className: `${css_wrapper}${divClass}`,
42
- style: Object.assign(Object.assign({}, divStyle), cssVars),
43
- onClick: handleToggle,
44
- onKeyDown: e => accessibleKeyDown(e, handleToggle),
45
- tabIndex: disabled ? -1 : 0,
46
- role: "checkbox",
47
- "aria-checked": state,
48
- "aria-disabled": disabled,
49
- "aria-label": String(children)
50
- }, rest, {
51
- children: [ jsx("div", {
52
- className: css_icon,
53
- children: jsx(Icon, {
54
- name: iconName,
55
- strokeColor: iconColor,
56
- size: size
57
- })
58
- }), children && jsx("span", {
59
- className: css_label,
60
- children: children
61
- }) ]
62
- }));
63
- });
64
-
65
- export { CheckBox as C };