@apple-pie/slice 0.1.59 → 0.2.0

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 (704) hide show
  1. package/README.md +17 -1
  2. package/dist/cjs/chunks/ActionButton-DhHiZwXV.js +200 -0
  3. package/dist/cjs/chunks/Attachment-DhyXAQUf.js +351 -0
  4. package/dist/cjs/chunks/AudioBubble-DS5Oea-b.js +46 -0
  5. package/dist/cjs/chunks/AudioLevel-uQJ-v5Qz.js +54 -0
  6. package/dist/cjs/chunks/Avatar-a2GHmu1o.js +125 -0
  7. package/dist/cjs/chunks/AvatarGroup-CWpoauJP.js +70 -0
  8. package/dist/cjs/chunks/Badge-DtVP2qH0.js +26 -0
  9. package/dist/cjs/chunks/Button-Cr5SlNim.js +293 -0
  10. package/dist/cjs/chunks/ButtonBar-DDupZZ_u.js +96 -0
  11. package/dist/cjs/chunks/Camera-bjjzmzar.js +560 -0
  12. package/dist/cjs/chunks/CheckBox-DBaKpMhg.js +66 -0
  13. package/dist/cjs/chunks/Chip-DsZHDLKG.js +203 -0
  14. package/dist/cjs/chunks/ContentEditable-BaxU62Mg.js +144 -0
  15. package/dist/cjs/chunks/DialogBox-C-ZvHDH6.js +204 -0
  16. package/dist/cjs/chunks/Dot-0Dv8WX0n.js +92 -0
  17. package/dist/cjs/chunks/DrggablePanel-zi27w3wY.js +251 -0
  18. package/dist/cjs/chunks/DropDown-BcTjhAtE.js +269 -0
  19. package/dist/cjs/chunks/ErrorSummary-DDz7nQWX.js +166 -0
  20. package/dist/cjs/chunks/{FileIcon-63XvrV1q.js → FileIcon-BM8n3o-c.js} +68 -40
  21. package/dist/cjs/chunks/FileList-T2_mhI_t.js +204 -0
  22. package/dist/cjs/chunks/FlexBox-DTCyWJeT.js +278 -0
  23. package/dist/cjs/chunks/FlexDiv-5YN9Hgxy.js +7 -0
  24. package/dist/cjs/chunks/Icon-COY7IZkK.js +7821 -0
  25. package/dist/cjs/chunks/IconButton-KJr15EW6.js +10 -0
  26. package/dist/cjs/chunks/{IndexedDB-ClIpb2ob.js → IndexedDB-DwKh2Gfp.js} +1 -1
  27. package/dist/cjs/chunks/ModalController-D0S9VnNH.js +143 -0
  28. package/dist/cjs/chunks/ModalHostContext-DLgUa9Vl.js +5 -0
  29. package/dist/cjs/chunks/Overlay-CVZLmK8H.js +77 -0
  30. package/dist/cjs/chunks/Pager-QEUi0r59.js +146 -0
  31. package/dist/cjs/chunks/PopMenu-DkxhTcwD.js +423 -0
  32. package/dist/cjs/chunks/PopMenuController-CmS28S4h.js +32 -0
  33. package/dist/cjs/chunks/ProgressIndicator-Ddj5dfEA.js +237 -0
  34. package/dist/cjs/chunks/PromptInput-DtepCo-l.js +248 -0
  35. package/dist/cjs/chunks/RadioButton-B2HGjkQk.js +101 -0
  36. package/dist/cjs/chunks/RadioButtonList-Oc7oMivb.js +88 -0
  37. package/dist/cjs/chunks/Slider-Y7zMFKiM.js +170 -0
  38. package/dist/cjs/chunks/Spacer-CM7sstpQ.js +22 -0
  39. package/dist/cjs/chunks/Switch-CWJh4Pi4.js +70 -0
  40. package/dist/cjs/chunks/Tab-DFvjUNPs.js +96 -0
  41. package/dist/cjs/chunks/TabBar-lB0aqabp.js +186 -0
  42. package/dist/cjs/chunks/TextArea-UudvZQ9R.js +189 -0
  43. package/dist/cjs/chunks/TextField-QzgdqFys.js +312 -0
  44. package/dist/cjs/chunks/Tip-BxS2Wzz3.js +115 -0
  45. package/dist/cjs/chunks/ToggleButton-De8_kkMd.js +53 -0
  46. package/dist/cjs/chunks/UploadArea-BtqwFTDl.js +223 -0
  47. package/dist/cjs/chunks/Video-C1GATYS9.js +396 -0
  48. package/dist/cjs/chunks/VideoController-CnYz7Sdt.js +169 -0
  49. package/dist/cjs/chunks/{WSConnection-CDWOkk8n.js → WSConnection-DZKTeDtZ.js} +1 -1
  50. package/dist/cjs/chunks/{WebRTCConnection-b8jZNRYr.js → WebRTCConnection-DIUG7Gx3.js} +1 -1
  51. package/dist/cjs/chunks/_types-3m6769Z0.js +910 -0
  52. package/dist/cjs/chunks/_types-C_Jf14DZ.js +273 -0
  53. package/dist/cjs/chunks/audioVisualizer-Bak7PWOv.js +71 -0
  54. package/dist/cjs/chunks/breakpoints-BDw1OJh9.js +18 -0
  55. package/dist/cjs/chunks/{browserChannelsStore-PGtTaJyY.js → browserChannelsStore-DHE7Vr4_.js} +4 -2
  56. package/dist/cjs/chunks/colors-hDzzq_Dk.js +62 -0
  57. package/dist/cjs/chunks/files-RYD9L_pI.js +25 -0
  58. package/dist/cjs/chunks/getVideoControls-LxSY7z8h.js +19 -0
  59. package/dist/cjs/chunks/getWaterTransition-s_55VKK2.js +11 -0
  60. package/dist/cjs/chunks/{localDBStore-BRd0iQuq.js → localDBStore-CTWlm2t-.js} +6 -2
  61. package/dist/cjs/chunks/{microphoneStore-DljI0Zpj.js → microphoneStore-D7DuvQeX.js} +1 -1
  62. package/dist/cjs/chunks/{misc-BallZ366.js → misc-PmT7cZzC.js} +29 -38
  63. package/dist/cjs/chunks/{modalStore-BexwvT-T.js → modalStore-BCn998Jz.js} +20 -17
  64. package/dist/cjs/chunks/popMenuStore-DqyTqDrl.js +20 -0
  65. package/dist/cjs/chunks/resolveColor-DkYThq2J.js +9 -0
  66. package/dist/cjs/chunks/resolveColorProps-DE1k1P-Z.js +17 -0
  67. package/dist/cjs/chunks/resolveShortcut-DiQdb8VR.js +38 -0
  68. package/dist/cjs/chunks/sharedTypes-BDMIewR9.js +22 -0
  69. package/dist/cjs/chunks/{sseStore-cSWpKohM.js → sseStore-DfS7e3vY.js} +3 -3
  70. package/dist/cjs/chunks/themes-bwU5x3_5.js +34 -0
  71. package/dist/cjs/chunks/toastStore-BxX1AtE7.js +33 -0
  72. package/dist/cjs/chunks/type.module-Dk5b_rHG.js +28 -0
  73. package/dist/cjs/chunks/{uploads-worker-DzrC-YiR.js → uploads-worker-stCHn8-D.js} +1 -1
  74. package/dist/cjs/chunks/{uploadsStore-BajO-auR.js → uploadsStore-Ck3gzZuD.js} +2 -2
  75. package/dist/cjs/chunks/useAudioVisualizer-D7bStvIe.js +42 -0
  76. package/dist/cjs/chunks/useModalHost-B8oi4tfb.js +52 -0
  77. package/dist/cjs/chunks/usePrefersReducedMotion-GpD17CAE.js +16 -0
  78. package/dist/cjs/chunks/viewState-CMugA-g4.js +627 -0
  79. package/dist/cjs/chunks/{volumeStore-DzgmrI6q.js → volumeStore-BoEoo9wA.js} +1 -1
  80. package/dist/cjs/chunks/{webRTCStore-BXHg9abP.js → webRTCStore-OGkXAovD.js} +6 -2
  81. package/dist/cjs/chunks/{windowStore-DpNMptuw.js → windowStore-HYnXbosz.js} +1 -1
  82. package/dist/cjs/components/Attachment/index.js +26 -0
  83. package/dist/cjs/components/AudioBubble/index.js +11 -8
  84. package/dist/cjs/components/AudioLevel/index.js +9 -0
  85. package/dist/cjs/components/Avatar/index.js +5 -3
  86. package/dist/cjs/components/AvatarGroup/index.js +4 -3
  87. package/dist/cjs/components/Badge/index.js +4 -3
  88. package/dist/cjs/components/Button/index.js +14 -11
  89. package/dist/cjs/components/ButtonBar/index.js +11 -9
  90. package/dist/cjs/components/Camera/index.js +15 -9
  91. package/dist/cjs/components/CheckBox/index.js +11 -10
  92. package/dist/cjs/components/Chip/index.js +13 -10
  93. package/dist/cjs/components/ContentEditable/index.js +8 -0
  94. package/dist/cjs/components/DataTable/index.js +12 -10
  95. package/dist/cjs/components/DialogBox/index.js +21 -0
  96. package/dist/cjs/components/Dot/index.js +8 -3
  97. package/dist/cjs/components/DraggablePanel/index.js +10 -10
  98. package/dist/cjs/components/DropDown/index.js +12 -10
  99. package/dist/cjs/components/ErrorSummary/index.js +10 -7
  100. package/dist/cjs/components/FileIcon/index.js +8 -9
  101. package/dist/cjs/components/FileList/index.js +16 -10
  102. package/dist/cjs/components/FlexBox/index.js +23 -0
  103. package/dist/cjs/components/FlexDiv/index.js +11 -5
  104. package/dist/cjs/components/Icon/index.js +8 -7
  105. package/dist/cjs/components/IconButton/index.js +15 -21
  106. package/dist/cjs/components/ModalController/index.js +11 -6
  107. package/dist/cjs/components/Overlay/index.js +9 -3
  108. package/dist/cjs/components/Pager/index.js +9 -3
  109. package/dist/cjs/components/PopMenu/index.js +17 -0
  110. package/dist/cjs/components/PopMenuController/index.js +18 -0
  111. package/dist/cjs/components/Progress/index.js +13 -10
  112. package/dist/cjs/components/PromptInput/index.js +19 -13
  113. package/dist/cjs/components/RadioButton/index.js +11 -10
  114. package/dist/cjs/components/RadioButtonList/index.js +12 -10
  115. package/dist/cjs/components/Slider/index.js +4 -8
  116. package/dist/cjs/components/Spacer/index.js +2 -2
  117. package/dist/cjs/components/Switch/index.js +9 -3
  118. package/dist/cjs/components/Tab/index.js +15 -0
  119. package/dist/cjs/components/TabBar/index.js +15 -11
  120. package/dist/cjs/components/TextArea/index.js +11 -12
  121. package/dist/cjs/components/Textfield/index.js +15 -11
  122. package/dist/cjs/components/Tip/index.js +9 -4
  123. package/dist/cjs/components/Toast/index.js +13 -10
  124. package/dist/cjs/components/ToggleButton/index.js +14 -11
  125. package/dist/cjs/components/UploadArea/index.js +18 -12
  126. package/dist/cjs/components/Video/index.js +18 -14
  127. package/dist/cjs/components/VideoController/index.js +17 -13
  128. package/dist/cjs/hooks/useAudioRecorder.js +1 -1
  129. package/dist/cjs/hooks/useBindWebRTC.js +4 -3
  130. package/dist/cjs/hooks/useClipboard.js +3 -2
  131. package/dist/cjs/hooks/useDoubleClick.js +6 -4
  132. package/dist/cjs/hooks/useInfiniteScroll.js +1 -1
  133. package/dist/cjs/hooks/useMdStreamBuffer.js +7 -2
  134. package/dist/cjs/hooks/useMicrophone.js +1 -1
  135. package/dist/cjs/hooks/useObserveTheme.js +4 -4
  136. package/dist/cjs/hooks/useTheme.js +9 -1
  137. package/dist/cjs/hooks/useToolTip.js +27 -32
  138. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  139. package/dist/cjs/hooks/useWindow.js +13 -23
  140. package/dist/cjs/hooks.js +13 -12
  141. package/dist/cjs/index.js +55 -47
  142. package/dist/cjs/providers/ThemeProvider.js +4 -3
  143. package/dist/cjs/providers/themeServer.test.js +398 -403
  144. package/dist/cjs/providers.js +4 -3
  145. package/dist/cjs/stores/LocalDB.js +8 -6
  146. package/dist/cjs/stores/SSE.js +4 -3
  147. package/dist/cjs/stores/WS.js +4 -3
  148. package/dist/cjs/stores/WebRTC.js +8 -6
  149. package/dist/cjs/stores/activeTab.js +1 -1
  150. package/dist/cjs/stores/browserChannel.js +5 -4
  151. package/dist/cjs/stores/microphone.js +2 -2
  152. package/dist/cjs/stores/modal.js +1 -1
  153. package/dist/cjs/stores/popMenu.js +7 -0
  154. package/dist/cjs/stores/tip.js +1 -1
  155. package/dist/cjs/stores/toast.js +1 -1
  156. package/dist/cjs/stores/uploads.js +2 -2
  157. package/dist/cjs/stores/video.js +1 -1
  158. package/dist/cjs/stores/volume.js +2 -2
  159. package/dist/cjs/stores/window.js +2 -2
  160. package/dist/cjs/stores.js +38 -34
  161. package/dist/cjs/theme/colors.js +479 -231
  162. package/dist/cjs/theme/themes.js +3 -30
  163. package/dist/cjs/theme/type.js +31 -0
  164. package/dist/cjs/theme.js +10 -3
  165. package/dist/cjs/utils/index.js +24 -5
  166. package/dist/cjs/utils/objects/index.js +2 -2
  167. package/dist/cjs/workers/uploads/uploads.js +2 -2
  168. package/dist/css/type.module.css +27 -0
  169. package/dist/esm/chunks/ActionButton-guWI4qko.mjs +235 -0
  170. package/dist/esm/chunks/Attachment-BTSb0hKX.mjs +370 -0
  171. package/dist/esm/chunks/AudioBubble-D15lr4H6.mjs +68 -0
  172. package/dist/esm/chunks/AudioLevel-BcNrcGlh.mjs +63 -0
  173. package/dist/esm/chunks/Avatar-C4JzdLTW.mjs +132 -0
  174. package/dist/esm/chunks/AvatarGroup-Cn33-JkE.mjs +78 -0
  175. package/dist/esm/chunks/Badge-DpnuS-Ey.mjs +32 -0
  176. package/dist/esm/chunks/Button-BwTo8mSI.mjs +315 -0
  177. package/dist/esm/chunks/ButtonBar-BwHxexlC.mjs +111 -0
  178. package/dist/esm/chunks/Camera-DWmX5FZ-.mjs +585 -0
  179. package/dist/esm/chunks/CheckBox-CjmPDfLi.mjs +76 -0
  180. package/dist/esm/chunks/Chip-BfyUpZbH.mjs +223 -0
  181. package/dist/esm/chunks/ContentEditable-BvlyAJve.mjs +154 -0
  182. package/dist/esm/chunks/DialogBox-W9i6k5mv.mjs +224 -0
  183. package/dist/esm/chunks/Dot-CG395pS6.mjs +104 -0
  184. package/dist/esm/chunks/DrggablePanel-0Ef6TYrd.mjs +270 -0
  185. package/dist/esm/chunks/DropDown-CiB0Rp_P.mjs +286 -0
  186. package/dist/esm/chunks/ErrorSummary-3XoZyvmX.mjs +192 -0
  187. package/dist/esm/chunks/{FileIcon-B7_cbtHF.mjs → FileIcon-hKJZoGIx.mjs} +73 -53
  188. package/dist/esm/chunks/FileList-DxB0ZORo.mjs +220 -0
  189. package/dist/esm/chunks/FlexBox-VfQehVtm.mjs +296 -0
  190. package/dist/esm/chunks/FlexDiv-BZ5PBnE3.mjs +6 -0
  191. package/dist/esm/chunks/Icon-43T0fkr6.mjs +7841 -0
  192. package/dist/esm/chunks/IconButton-oqYTUJit.mjs +12 -0
  193. package/dist/esm/chunks/{IndexedDB-CB92RX6-.mjs → IndexedDB-DjCLZUf0.mjs} +1 -1
  194. package/dist/esm/chunks/ModalController-fvF-RWS8.mjs +169 -0
  195. package/dist/esm/chunks/ModalHostContext-BrT_g7sc.mjs +5 -0
  196. package/dist/esm/chunks/Overlay-C_FMcUyg.mjs +93 -0
  197. package/dist/esm/chunks/Pager-LqYNCZ8I.mjs +158 -0
  198. package/dist/esm/chunks/PopMenu-BkXfm6Sz.mjs +455 -0
  199. package/dist/esm/chunks/PopMenuController-Dj3uvc8F.mjs +44 -0
  200. package/dist/esm/chunks/ProgressIndicator-CR3pA1Me.mjs +266 -0
  201. package/dist/esm/chunks/PromptInput-Bq18i1Ac.mjs +266 -0
  202. package/dist/esm/chunks/RadioButton-DTUKMjvM.mjs +109 -0
  203. package/dist/esm/chunks/RadioButtonList-DsOgpe0m.mjs +99 -0
  204. package/dist/esm/chunks/Slider-DaZTE-eD.mjs +176 -0
  205. package/dist/esm/chunks/Spacer-CsJxUJ7E.mjs +24 -0
  206. package/dist/esm/chunks/Switch-BDFgMC0b.mjs +84 -0
  207. package/dist/esm/chunks/Tab-B8yJ9Qy4.mjs +105 -0
  208. package/dist/esm/chunks/TabBar-2kQmtcwW.mjs +214 -0
  209. package/dist/esm/chunks/TextArea-C32MToPG.mjs +201 -0
  210. package/dist/esm/chunks/TextField-BXrN1QkD.mjs +344 -0
  211. package/dist/esm/chunks/Tip-4R9wW1mE.mjs +133 -0
  212. package/dist/esm/chunks/ToggleButton-CGHa458C.mjs +61 -0
  213. package/dist/esm/chunks/UploadArea-Dq7ST-RG.mjs +237 -0
  214. package/dist/esm/chunks/Video-KuG0k3ly.mjs +418 -0
  215. package/dist/esm/chunks/VideoController-DQoDDY1a.mjs +201 -0
  216. package/dist/esm/chunks/{WSConnection-BENe51Ue.mjs → WSConnection-ByCYrNOq.mjs} +1 -1
  217. package/dist/esm/chunks/{WebRTCConnection-Cwx1C6Ta.mjs → WebRTCConnection-DTjS3UUU.mjs} +1 -1
  218. package/dist/esm/chunks/_types-B6NStINb.mjs +296 -0
  219. package/dist/esm/chunks/_types-ntN11tyz.mjs +910 -0
  220. package/dist/esm/chunks/audioVisualizer-BMSpJwTS.mjs +71 -0
  221. package/dist/esm/chunks/breakpoints-Dn9DgpJe.mjs +18 -0
  222. package/dist/esm/chunks/{browserChannelsStore-oGeBSxAT.mjs → browserChannelsStore-s7VUhLS9.mjs} +6 -2
  223. package/dist/esm/chunks/colors-DZ9xpMoE.mjs +63 -0
  224. package/dist/esm/chunks/files-6nwSZlJK.mjs +26 -0
  225. package/dist/esm/chunks/getVideoControls-aoqr4T3P.mjs +20 -0
  226. package/dist/esm/chunks/getWaterTransition-CrDSFJdk.mjs +12 -0
  227. package/dist/esm/chunks/{localDBStore-ZwQD3ino.mjs → localDBStore-DYhPmkHz.mjs} +7 -3
  228. package/dist/esm/chunks/{microphoneStore-D8VxjdFZ.mjs → microphoneStore-BzSEbtfK.mjs} +1 -1
  229. package/dist/esm/chunks/{misc-DBIXjc2Q.mjs → misc-DI5GSqkt.mjs} +24 -34
  230. package/dist/esm/chunks/{modalStore-GWNWh1tE.mjs → modalStore-BgYt3q8T.mjs} +20 -17
  231. package/dist/esm/chunks/popMenuStore-DtApFGaq.mjs +18 -0
  232. package/dist/esm/chunks/resolveColor-Kvs7kDyy.mjs +9 -0
  233. package/dist/esm/chunks/resolveColorProps-CwAU25V-.mjs +17 -0
  234. package/dist/esm/chunks/resolveShortcut-C43ivgMc.mjs +37 -0
  235. package/dist/esm/chunks/sharedTypes-DYXO7VNa.mjs +25 -0
  236. package/dist/esm/chunks/{sseStore-CZqJmpUR.mjs → sseStore-Duybemwt.mjs} +7 -3
  237. package/dist/esm/chunks/themes-DCtDY7XT.mjs +40 -0
  238. package/dist/esm/chunks/toastStore-Ds1Kx4-O.mjs +29 -0
  239. package/dist/esm/chunks/type.module--fVZ2ic7.mjs +28 -0
  240. package/dist/esm/chunks/{uploads-worker-DuyqBeHz.mjs → uploads-worker-CpJtBCvY.mjs} +1 -1
  241. package/dist/esm/chunks/{uploadsStore-D9Ftk4Ke.mjs → uploadsStore-B_7wyr8k.mjs} +1 -1
  242. package/dist/esm/chunks/useAudioVisualizer-Dw8XLBmS.mjs +42 -0
  243. package/dist/esm/chunks/useModalHost-DiYFB7Mq.mjs +51 -0
  244. package/dist/esm/chunks/usePrefersReducedMotion-BWAwMMLE.mjs +15 -0
  245. package/dist/esm/chunks/viewState-D7e7CrHf.mjs +659 -0
  246. package/dist/esm/chunks/{volumeStore-hrteUkB-.mjs → volumeStore-mqWIRL0J.mjs} +1 -1
  247. package/dist/esm/chunks/{webRTCStore-B2ri-_li.mjs → webRTCStore-BepH2O9l.mjs} +7 -3
  248. package/dist/esm/chunks/{windowStore-DIdy_IoC.mjs → windowStore-C8rGk_0b.mjs} +1 -1
  249. package/dist/esm/components/Attachment/index.mjs +71 -0
  250. package/dist/esm/components/AudioBubble/index.mjs +21 -11
  251. package/dist/esm/components/AudioLevel/index.mjs +21 -0
  252. package/dist/esm/components/Avatar/index.mjs +9 -3
  253. package/dist/esm/components/AvatarGroup/index.mjs +10 -4
  254. package/dist/esm/components/Badge/index.mjs +8 -2
  255. package/dist/esm/components/Button/index.mjs +27 -17
  256. package/dist/esm/components/ButtonBar/index.mjs +22 -14
  257. package/dist/esm/components/Camera/index.mjs +37 -13
  258. package/dist/esm/components/CheckBox/index.mjs +20 -16
  259. package/dist/esm/components/Chip/index.mjs +27 -17
  260. package/dist/esm/components/ContentEditable/index.mjs +17 -0
  261. package/dist/esm/components/DataTable/index.mjs +27 -21
  262. package/dist/esm/components/DialogBox/index.mjs +75 -0
  263. package/dist/esm/components/Dot/index.mjs +28 -2
  264. package/dist/esm/components/DraggablePanel/index.mjs +16 -20
  265. package/dist/esm/components/DropDown/index.mjs +25 -15
  266. package/dist/esm/components/ErrorSummary/index.mjs +22 -10
  267. package/dist/esm/components/FileIcon/index.mjs +8 -16
  268. package/dist/esm/components/FileList/index.mjs +40 -16
  269. package/dist/esm/components/FlexBox/index.mjs +39 -0
  270. package/dist/esm/components/FlexDiv/index.mjs +33 -3
  271. package/dist/esm/components/Icon/index.mjs +15 -11
  272. package/dist/esm/components/IconButton/index.mjs +31 -19
  273. package/dist/esm/components/ModalController/index.mjs +33 -9
  274. package/dist/esm/components/Overlay/index.mjs +30 -2
  275. package/dist/esm/components/Pager/index.mjs +31 -3
  276. package/dist/esm/components/PopMenu/index.mjs +59 -0
  277. package/dist/esm/components/PopMenuController/index.mjs +63 -0
  278. package/dist/esm/components/Progress/index.mjs +21 -11
  279. package/dist/esm/components/PromptInput/index.mjs +43 -21
  280. package/dist/esm/components/RadioButton/index.mjs +18 -14
  281. package/dist/esm/components/RadioButtonList/index.mjs +23 -17
  282. package/dist/esm/components/Slider/index.mjs +5 -23
  283. package/dist/esm/components/Spacer/index.mjs +2 -2
  284. package/dist/esm/components/Switch/index.mjs +30 -2
  285. package/dist/esm/components/Tab/index.mjs +51 -0
  286. package/dist/esm/components/TabBar/index.mjs +32 -16
  287. package/dist/esm/components/TextArea/index.mjs +17 -23
  288. package/dist/esm/components/Textfield/index.mjs +33 -17
  289. package/dist/esm/components/Tip/index.mjs +29 -3
  290. package/dist/esm/components/Toast/index.mjs +23 -13
  291. package/dist/esm/components/ToggleButton/index.mjs +30 -22
  292. package/dist/esm/components/UploadArea/index.mjs +41 -17
  293. package/dist/esm/components/Video/index.mjs +34 -24
  294. package/dist/esm/components/VideoController/index.mjs +44 -26
  295. package/dist/esm/hooks/useAudioRecorder.mjs +1 -1
  296. package/dist/esm/hooks/useBindWebRTC.mjs +12 -6
  297. package/dist/esm/hooks/useClipboard.mjs +9 -3
  298. package/dist/esm/hooks/useDoubleClick.mjs +8 -5
  299. package/dist/esm/hooks/useInfiniteScroll.mjs +1 -1
  300. package/dist/esm/hooks/useMdStreamBuffer.mjs +9 -3
  301. package/dist/esm/hooks/useMicrophone.mjs +1 -1
  302. package/dist/esm/hooks/useObserveTheme.mjs +5 -1
  303. package/dist/esm/hooks/useTheme.mjs +5 -1
  304. package/dist/esm/hooks/useToolTip.mjs +28 -33
  305. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  306. package/dist/esm/hooks/useWindow.mjs +6 -22
  307. package/dist/esm/hooks.mjs +16 -10
  308. package/dist/esm/index.mjs +96 -60
  309. package/dist/esm/providers/ThemeProvider.mjs +5 -1
  310. package/dist/esm/providers/themeServer.test.mjs +398 -403
  311. package/dist/esm/providers.mjs +5 -1
  312. package/dist/esm/stores/LocalDB.mjs +10 -4
  313. package/dist/esm/stores/SSE.mjs +10 -4
  314. package/dist/esm/stores/WS.mjs +9 -3
  315. package/dist/esm/stores/WebRTC.mjs +10 -4
  316. package/dist/esm/stores/activeTab.mjs +1 -1
  317. package/dist/esm/stores/browserChannel.mjs +9 -3
  318. package/dist/esm/stores/microphone.mjs +2 -2
  319. package/dist/esm/stores/modal.mjs +1 -1
  320. package/dist/esm/stores/popMenu.mjs +3 -0
  321. package/dist/esm/stores/tip.mjs +1 -1
  322. package/dist/esm/stores/toast.mjs +1 -1
  323. package/dist/esm/stores/uploads.mjs +3 -3
  324. package/dist/esm/stores/video.mjs +1 -1
  325. package/dist/esm/stores/volume.mjs +2 -2
  326. package/dist/esm/stores/window.mjs +2 -2
  327. package/dist/esm/stores.mjs +28 -20
  328. package/dist/esm/theme/colors.mjs +479 -231
  329. package/dist/esm/theme/themes.mjs +6 -35
  330. package/dist/esm/theme/type.mjs +31 -0
  331. package/dist/esm/theme.mjs +5 -1
  332. package/dist/esm/utils/index.mjs +37 -12
  333. package/dist/esm/utils/objects/index.mjs +8 -8
  334. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  335. package/dist/styles.css +5106 -3872
  336. package/dist/types/components/Attachment/Attachment.d.ts +2 -0
  337. package/dist/types/components/Attachment/AttachmentImagePreview.d.ts +6 -0
  338. package/dist/types/components/Attachment/_types.d.ts +47 -0
  339. package/dist/types/components/Attachment/index.d.ts +3 -0
  340. package/dist/types/components/Attachment/useContentThumbnail.d.ts +19 -0
  341. package/dist/types/components/AudioBubble/AudioBubble.d.ts +1 -1
  342. package/dist/types/components/AudioBubble/_types.d.ts +4 -3
  343. package/dist/types/components/AudioLevel/AudioLevel.d.ts +5 -0
  344. package/dist/types/components/AudioLevel/_types.d.ts +22 -0
  345. package/dist/types/components/AudioLevel/index.d.ts +2 -0
  346. package/dist/types/components/Avatar/Avatar.d.ts +6 -1
  347. package/dist/types/components/Avatar/_types.d.ts +28 -15
  348. package/dist/types/components/AvatarGroup/AvatarGroup.d.ts +1 -1
  349. package/dist/types/components/AvatarGroup/AvatarGroupContext.d.ts +7 -0
  350. package/dist/types/components/AvatarGroup/_types.d.ts +26 -15
  351. package/dist/types/components/AvatarGroup/index.d.ts +1 -1
  352. package/dist/types/components/Badge/Badge.d.ts +1 -1
  353. package/dist/types/components/Badge/_types.d.ts +11 -3
  354. package/dist/types/components/Button/Button.d.ts +19 -52
  355. package/dist/types/components/Button/_types.d.ts +18 -14
  356. package/dist/types/components/ButtonBar/ButtonBar.d.ts +0 -14
  357. package/dist/types/components/ButtonBar/_types.d.ts +16 -13
  358. package/dist/types/components/Camera/Camera.d.ts +2 -4
  359. package/dist/types/components/Camera/_types.d.ts +25 -29
  360. package/dist/types/components/Camera/cameraSession.d.ts +59 -0
  361. package/dist/types/components/Camera/index.d.ts +1 -1
  362. package/dist/types/components/CheckBox/CheckBox.d.ts +1 -1
  363. package/dist/types/components/CheckBox/_types.d.ts +16 -4
  364. package/dist/types/components/Chip/Chip.d.ts +1 -1
  365. package/dist/types/components/Chip/_types.d.ts +35 -19
  366. package/dist/types/components/ContentEditable/ContentEditable.d.ts +3 -0
  367. package/dist/types/components/ContentEditable/_types.d.ts +26 -0
  368. package/dist/types/components/ContentEditable/index.d.ts +2 -0
  369. package/dist/types/components/DataTable/DataTable.d.ts +1 -1
  370. package/dist/types/components/DataTable/_types.d.ts +21 -11
  371. package/dist/types/components/DataTable/_useResizeColumn.d.ts +1 -1
  372. package/dist/types/components/DataTable/_useRowWindow.d.ts +1 -0
  373. package/dist/types/components/DataTable/compareValues.d.ts +2 -0
  374. package/dist/types/components/DialogBox/DialogBox.d.ts +6 -0
  375. package/dist/types/components/DialogBox/_types.d.ts +68 -0
  376. package/dist/types/components/DialogBox/index.d.ts +3 -0
  377. package/dist/types/components/DialogBox/parseSections.d.ts +7 -0
  378. package/dist/types/components/DialogBox/sections.d.ts +20 -0
  379. package/dist/types/components/DialogBox/useDialogBox.d.ts +4 -0
  380. package/dist/types/components/Dot/Dot.d.ts +1 -1
  381. package/dist/types/components/Dot/_types.d.ts +8 -2
  382. package/dist/types/components/DraggablePanel/DrggablePanel.d.ts +5 -55
  383. package/dist/types/components/DraggablePanel/_types.d.ts +46 -0
  384. package/dist/types/components/DraggablePanel/index.d.ts +1 -0
  385. package/dist/types/components/DraggablePanel/panelConstraints.d.ts +3 -0
  386. package/dist/types/components/DropDown/_types.d.ts +45 -16
  387. package/dist/types/components/DropDown/resolveOptions.d.ts +11 -0
  388. package/dist/types/components/ErrorSummary/ErrorSummary.d.ts +30 -2
  389. package/dist/types/components/ErrorSummary/_types.d.ts +16 -4
  390. package/dist/types/components/FileIcon/FileIcon.d.ts +1 -2
  391. package/dist/types/components/FileIcon/_types.d.ts +11 -6
  392. package/dist/types/components/FileIcon/index.d.ts +2 -2
  393. package/dist/types/components/FileList/FileList.d.ts +2 -2
  394. package/dist/types/components/FileList/_types.d.ts +16 -6
  395. package/dist/types/components/FileList/fileListValues.d.ts +5 -0
  396. package/dist/types/components/FlexBox/FlexBox.d.ts +3 -0
  397. package/dist/types/components/FlexBox/_types.d.ts +62 -0
  398. package/dist/types/components/FlexBox/index.d.ts +2 -0
  399. package/dist/types/components/FlexDiv/FlexDiv.d.ts +2 -64
  400. package/dist/types/components/FlexDiv/_types.d.ts +4 -146
  401. package/dist/types/components/Icon/Icon.d.ts +1 -1
  402. package/dist/types/components/Icon/_types.d.ts +910 -132
  403. package/dist/types/components/Icon/iconRegistry.d.ts +3 -2
  404. package/dist/types/components/Icon/index.d.ts +1 -0
  405. package/dist/types/components/IconButton/ActionButton.d.ts +19 -0
  406. package/dist/types/components/IconButton/IconButton.d.ts +1 -1
  407. package/dist/types/components/IconButton/_types.d.ts +24 -72
  408. package/dist/types/components/IconButton/index.d.ts +1 -2
  409. package/dist/types/components/ModalController/ModalController.d.ts +2 -2
  410. package/dist/types/components/ModalController/ModalHostContext.d.ts +1 -0
  411. package/dist/types/components/ModalController/_types.d.ts +3 -5
  412. package/dist/types/components/ModalController/useModalHost.d.ts +3 -0
  413. package/dist/types/components/Overlay/Overlay.d.ts +1 -1
  414. package/dist/types/components/Overlay/_types.d.ts +7 -8
  415. package/dist/types/components/Pager/Pager.d.ts +1 -1
  416. package/dist/types/components/Pager/_types.d.ts +21 -5
  417. package/dist/types/components/Pager/pagerLogic.d.ts +9 -0
  418. package/dist/types/components/PopMenu/PopMenu.d.ts +3 -0
  419. package/dist/types/components/PopMenu/PopMenuContext.d.ts +10 -0
  420. package/dist/types/components/PopMenu/PopMenuGroup.d.ts +2 -0
  421. package/dist/types/components/PopMenu/PopMenuItem.d.ts +3 -0
  422. package/dist/types/components/PopMenu/_types.d.ts +110 -0
  423. package/dist/types/components/PopMenu/index.d.ts +4 -0
  424. package/dist/types/components/PopMenu/usePopMenu.d.ts +17 -0
  425. package/dist/types/components/PopMenu/usePopMenuPortal.d.ts +3 -0
  426. package/dist/types/components/PopMenuController/PopMenuController.d.ts +2 -0
  427. package/dist/types/components/PopMenuController/index.d.ts +1 -0
  428. package/dist/types/components/Progress/DoneCheck/DoneCheck.d.ts +1 -1
  429. package/dist/types/components/Progress/DoneCheck/_types.d.ts +5 -2
  430. package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +2 -4
  431. package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +19 -7
  432. package/dist/types/components/Progress/ProgressIndicator/useSpinnerPlayback.d.ts +3 -0
  433. package/dist/types/components/PromptInput/PromptInput.d.ts +50 -15
  434. package/dist/types/components/PromptInput/_types.d.ts +45 -8
  435. package/dist/types/components/PromptInput/index.d.ts +1 -1
  436. package/dist/types/components/PromptInput/promptText.d.ts +6 -0
  437. package/dist/types/components/RadioButton/RadioGroupContext.d.ts +11 -0
  438. package/dist/types/components/RadioButton/_types.d.ts +24 -13
  439. package/dist/types/components/RadioButtonList/_types.d.ts +17 -19
  440. package/dist/types/components/RadioButtonList/index.d.ts +1 -1
  441. package/dist/types/components/Slider/Slider.d.ts +1 -1
  442. package/dist/types/components/Slider/_types.d.ts +15 -9
  443. package/dist/types/components/Slider/sliderLogic.d.ts +6 -0
  444. package/dist/types/components/Spacer/index.d.ts +1 -1
  445. package/dist/types/components/Switch/_types.d.ts +18 -7
  446. package/dist/types/components/Tab/Tab.d.ts +3 -0
  447. package/dist/types/components/Tab/_types.d.ts +26 -0
  448. package/dist/types/components/Tab/index.d.ts +2 -0
  449. package/dist/types/components/TabBar/TabBar.d.ts +1 -1
  450. package/dist/types/components/TabBar/_types.d.ts +14 -37
  451. package/dist/types/components/TabBar/index.d.ts +1 -1
  452. package/dist/types/components/TabBar/shared.d.ts +22 -0
  453. package/dist/types/components/TextArea/TextArea.d.ts +1 -1
  454. package/dist/types/components/TextArea/_types.d.ts +32 -11
  455. package/dist/types/components/TextArea/index.d.ts +1 -1
  456. package/dist/types/components/Textfield/TextField.d.ts +2 -2
  457. package/dist/types/components/Textfield/_types.d.ts +41 -37
  458. package/dist/types/components/Tip/Tip.d.ts +1 -2
  459. package/dist/types/components/Tip/_types.d.ts +11 -18
  460. package/dist/types/components/Tip/useTipVisibility.d.ts +6 -0
  461. package/dist/types/components/Toast/Toast.d.ts +2 -2
  462. package/dist/types/components/Toast/_types.d.ts +25 -12
  463. package/dist/types/components/Toast/index.d.ts +1 -1
  464. package/dist/types/components/Toast/useToastLifecycle.d.ts +15 -0
  465. package/dist/types/components/ToggleButton/ToggleButton.d.ts +2 -2
  466. package/dist/types/components/ToggleButton/_types.d.ts +18 -30
  467. package/dist/types/components/UploadArea/UploadArea.d.ts +27 -19
  468. package/dist/types/components/UploadArea/_types.d.ts +23 -20
  469. package/dist/types/components/UploadArea/index.d.ts +1 -1
  470. package/dist/types/components/UploadArea/selection.d.ts +7 -0
  471. package/dist/types/components/UploadArea/useFileSelection.d.ts +30 -0
  472. package/dist/types/components/Video/Video.d.ts +2 -72
  473. package/dist/types/components/Video/_types.d.ts +37 -11
  474. package/dist/types/components/Video/getVideoControls.d.ts +3 -0
  475. package/dist/types/components/Video/index.d.ts +1 -1
  476. package/dist/types/components/VideoController/VideoController.d.ts +1 -1
  477. package/dist/types/components/VideoController/_types.d.ts +6 -1
  478. package/dist/types/components/playHelpers.d.ts +10 -233
  479. package/dist/types/components/sharedTypes.d.ts +31 -0
  480. package/dist/types/hooks/index.d.ts +1 -1
  481. package/dist/types/hooks/useToolTip/useToolTip.d.ts +1 -0
  482. package/dist/types/hooks/useWindow/useWindow.d.ts +5 -16
  483. package/dist/types/index.d.ts +39 -30
  484. package/dist/types/stores/index.d.ts +1 -0
  485. package/dist/types/stores/popMenu/_types.d.ts +13 -0
  486. package/dist/types/stores/popMenu/index.d.ts +2 -0
  487. package/dist/types/stores/popMenu/popMenuStore.d.ts +12 -0
  488. package/dist/types/stores/toast/_types.d.ts +6 -11
  489. package/dist/types/stores/toast/toastStore.d.ts +6 -6
  490. package/dist/types/stores/window/windowStore.d.ts +2 -2
  491. package/dist/types/theme/breakpoints/breakpoints.d.ts +11 -0
  492. package/dist/types/theme/colors/palette.d.ts +461 -0
  493. package/dist/types/theme/colors/recipes.d.ts +34 -0
  494. package/dist/types/theme/colors/resolveColor.d.ts +7 -0
  495. package/dist/types/theme/colors/types.d.ts +8 -92
  496. package/dist/types/theme/index.d.ts +4 -0
  497. package/dist/types/theme/type/type.d.ts +1 -0
  498. package/dist/types/theme/type/types.d.ts +3 -0
  499. package/dist/types/utils/audio/useAudioVisualizer.d.ts +3 -0
  500. package/dist/types/utils/functions/colors.d.ts +7 -0
  501. package/dist/types/utils/functions/files.d.ts +3 -4
  502. package/dist/types/utils/functions/misc.d.ts +12 -2
  503. package/dist/types/utils/functions/resolveColorProps.d.ts +2 -0
  504. package/dist/types/utils/functions/resolveShortcut.d.ts +3 -0
  505. package/dist/types/utils/index.d.ts +5 -1
  506. package/dist/types/utils/objects/audioVisualizer/audioVisualizer.d.ts +3 -0
  507. package/dist/types/utils/styling/getWaterTransition.d.ts +4 -0
  508. package/dist/types/utils/styling/reduceMotionTargets.d.ts +4 -0
  509. package/dist/types/utils/styling/usePrefersReducedMotion.d.ts +2 -0
  510. package/package.json +195 -193
  511. package/scripts/README.md +19 -0
  512. package/dist/cjs/chunks/AudioBubble-DAtkPfFK.js +0 -55
  513. package/dist/cjs/chunks/Avatar-BI8Gvsp7.js +0 -82
  514. package/dist/cjs/chunks/AvatarGroup-1IxbG6-D.js +0 -41
  515. package/dist/cjs/chunks/Badge-DMey3Pf3.js +0 -22
  516. package/dist/cjs/chunks/Button-BjmkIu7l.js +0 -265
  517. package/dist/cjs/chunks/ButtonBar-BxA8GQPM.js +0 -72
  518. package/dist/cjs/chunks/Camera-ByjATQDE.js +0 -380
  519. package/dist/cjs/chunks/CheckBox-DZng-9wI.js +0 -51
  520. package/dist/cjs/chunks/Chip-CqUDN_QK.js +0 -80
  521. package/dist/cjs/chunks/DivInput-GYDtuy4a.js +0 -101
  522. package/dist/cjs/chunks/Dot-BgyxIyrr.js +0 -72
  523. package/dist/cjs/chunks/DrggablePanel-BjOFnl0l.js +0 -224
  524. package/dist/cjs/chunks/DropDown-C0vZNCK4.js +0 -105
  525. package/dist/cjs/chunks/ErrorSummary-CVzk_ASK.js +0 -88
  526. package/dist/cjs/chunks/FileList-6qXKA_Ux.js +0 -223
  527. package/dist/cjs/chunks/FlexDiv-LwjVh6ls.js +0 -178
  528. package/dist/cjs/chunks/Grouper-BlWyuh_b.js +0 -63
  529. package/dist/cjs/chunks/Icon-BTjtQLNe.js +0 -1473
  530. package/dist/cjs/chunks/IconButton-C0yNYhI6.js +0 -182
  531. package/dist/cjs/chunks/Label-DsMFZd91.js +0 -106
  532. package/dist/cjs/chunks/Level-VKdsTW_-.js +0 -63
  533. package/dist/cjs/chunks/Modal-Dp5Wg1Bw.js +0 -128
  534. package/dist/cjs/chunks/ModalController-Cb2_7DtS.js +0 -81
  535. package/dist/cjs/chunks/Overlay-hOm9sYjr.js +0 -41
  536. package/dist/cjs/chunks/Pager-CPhi9uyP.js +0 -36
  537. package/dist/cjs/chunks/ProgressIndicator-CMsc_Npc.js +0 -140
  538. package/dist/cjs/chunks/PromptInput-6eDiLG4g.js +0 -161
  539. package/dist/cjs/chunks/RadioButton-DMxqwM6_.js +0 -55
  540. package/dist/cjs/chunks/RadioButtonList-kG_Y1d4X.js +0 -73
  541. package/dist/cjs/chunks/Slider-DGJomZGG.js +0 -169
  542. package/dist/cjs/chunks/Spacer-Z97EoNtJ.js +0 -26
  543. package/dist/cjs/chunks/Switch-CfzJd19R.js +0 -44
  544. package/dist/cjs/chunks/TabBar-C2aNS0Sd.js +0 -183
  545. package/dist/cjs/chunks/TextArea-G_MUJAHw.js +0 -77
  546. package/dist/cjs/chunks/TextField-CWIGERkd.js +0 -190
  547. package/dist/cjs/chunks/Tip-B7RF879X.js +0 -89
  548. package/dist/cjs/chunks/Toast-pkSkNuZo.js +0 -185
  549. package/dist/cjs/chunks/ToggleButton-DPc2x2EV.js +0 -45
  550. package/dist/cjs/chunks/UploadArea-DyVGwChS.js +0 -132
  551. package/dist/cjs/chunks/Video-Dh-_ouTP.js +0 -301
  552. package/dist/cjs/chunks/VideoController-CVm1CtaE.js +0 -95
  553. package/dist/cjs/chunks/_types-DxINS-ge.js +0 -140
  554. package/dist/cjs/chunks/audioVisualizer-C74sRH6D.js +0 -60
  555. package/dist/cjs/chunks/colors-BDwwQ2Y3.js +0 -27
  556. package/dist/cjs/chunks/debounce-Bi3gt_i6.js +0 -18
  557. package/dist/cjs/chunks/sharedTypes-XAbs742N.js +0 -6
  558. package/dist/cjs/chunks/toastStore-Bwus7v5O.js +0 -17
  559. package/dist/cjs/chunks/viewState-BVtEQ4sR.js +0 -497
  560. package/dist/cjs/components/DivInput/index.js +0 -7
  561. package/dist/cjs/components/Grouper/index.js +0 -14
  562. package/dist/cjs/components/Label/index.js +0 -12
  563. package/dist/cjs/components/Level/index.js +0 -7
  564. package/dist/cjs/components/Modal/index.js +0 -15
  565. package/dist/esm/chunks/AudioBubble-B8vlO9fq.mjs +0 -69
  566. package/dist/esm/chunks/Avatar-BMHnrzr3.mjs +0 -88
  567. package/dist/esm/chunks/AvatarGroup-BoBXPEbH.mjs +0 -47
  568. package/dist/esm/chunks/Badge-C7xDwrvC.mjs +0 -26
  569. package/dist/esm/chunks/Button-C6sTA1hG.mjs +0 -283
  570. package/dist/esm/chunks/ButtonBar-Bh3-UpMU.mjs +0 -82
  571. package/dist/esm/chunks/Camera-BXSLetAD.mjs +0 -398
  572. package/dist/esm/chunks/CheckBox-DkXJwLeU.mjs +0 -61
  573. package/dist/esm/chunks/Chip-XTbAoiHl.mjs +0 -92
  574. package/dist/esm/chunks/DivInput-TsyOx4x2.mjs +0 -113
  575. package/dist/esm/chunks/Dot-D0NtTwqi.mjs +0 -78
  576. package/dist/esm/chunks/DrggablePanel-BK9ukIbF.mjs +0 -236
  577. package/dist/esm/chunks/DropDown-F7yIB6EJ.mjs +0 -115
  578. package/dist/esm/chunks/ErrorSummary-SseJ5z1U.mjs +0 -101
  579. package/dist/esm/chunks/FileList-Bv9yn2QS.mjs +0 -231
  580. package/dist/esm/chunks/FlexDiv-3OxQ9y_1.mjs +0 -188
  581. package/dist/esm/chunks/Grouper-BcrjlgM-.mjs +0 -83
  582. package/dist/esm/chunks/Icon-He4S-Q8N.mjs +0 -1487
  583. package/dist/esm/chunks/IconButton-BGL-_8VW.mjs +0 -197
  584. package/dist/esm/chunks/Label-BouM6sY2.mjs +0 -119
  585. package/dist/esm/chunks/Level-CTkhQuiZ.mjs +0 -68
  586. package/dist/esm/chunks/Modal-BnbUOsKH.mjs +0 -142
  587. package/dist/esm/chunks/ModalController-Dk2VZcXW.mjs +0 -92
  588. package/dist/esm/chunks/Overlay-D5cMQSvL.mjs +0 -47
  589. package/dist/esm/chunks/Pager-4-2T_ZbJ.mjs +0 -42
  590. package/dist/esm/chunks/ProgressIndicator-DBf_bLtr.mjs +0 -156
  591. package/dist/esm/chunks/PromptInput-I10dUhFO.mjs +0 -175
  592. package/dist/esm/chunks/RadioButton-ZD7w9pql.mjs +0 -63
  593. package/dist/esm/chunks/RadioButtonList-h2_5VM4X.mjs +0 -81
  594. package/dist/esm/chunks/Slider-2Q6yVb8H.mjs +0 -183
  595. package/dist/esm/chunks/Spacer-Rj8PKnt3.mjs +0 -28
  596. package/dist/esm/chunks/Switch-C4zkPOMU.mjs +0 -50
  597. package/dist/esm/chunks/TabBar-bYgmIa-q.mjs +0 -205
  598. package/dist/esm/chunks/TextArea-BS0Iu1RB.mjs +0 -87
  599. package/dist/esm/chunks/TextField-BT1quQpj.mjs +0 -210
  600. package/dist/esm/chunks/Tip-B4Tg6gIC.mjs +0 -99
  601. package/dist/esm/chunks/Toast-DWHhX64K.mjs +0 -203
  602. package/dist/esm/chunks/ToggleButton-KAplYW5q.mjs +0 -53
  603. package/dist/esm/chunks/UploadArea-D_ytxxSf.mjs +0 -142
  604. package/dist/esm/chunks/Video-BHSzz3Wx.mjs +0 -316
  605. package/dist/esm/chunks/VideoController-D9ihYFYq.mjs +0 -114
  606. package/dist/esm/chunks/_types-FIe85AYv.mjs +0 -140
  607. package/dist/esm/chunks/audioVisualizer-BiB7Hun_.mjs +0 -60
  608. package/dist/esm/chunks/colors-DAIBQReF.mjs +0 -30
  609. package/dist/esm/chunks/debounce-BPsURiHk.mjs +0 -19
  610. package/dist/esm/chunks/sharedTypes-DdC4rvjp.mjs +0 -8
  611. package/dist/esm/chunks/toastStore-CRMyZAzS.mjs +0 -15
  612. package/dist/esm/chunks/viewState-BdLOLJlv.mjs +0 -527
  613. package/dist/esm/components/DivInput/index.mjs +0 -13
  614. package/dist/esm/components/Grouper/index.mjs +0 -47
  615. package/dist/esm/components/Label/index.mjs +0 -11
  616. package/dist/esm/components/Level/index.mjs +0 -15
  617. package/dist/esm/components/Modal/index.mjs +0 -57
  618. package/dist/types/components/DataTable/_resolveVirtualizeRows.test.d.ts +0 -1
  619. package/dist/types/components/DataTable/_useReorderColumns.test.d.ts +0 -1
  620. package/dist/types/components/DataTable/_useResizeColumn.test.d.ts +0 -1
  621. package/dist/types/components/DataTable/_useRowWindow.test.d.ts +0 -1
  622. package/dist/types/components/DataTable/columnHelper.test.d.ts +0 -1
  623. package/dist/types/components/DataTable/viewState.test.d.ts +0 -1
  624. package/dist/types/components/DivInput/DivInput.d.ts +0 -3
  625. package/dist/types/components/DivInput/_types.d.ts +0 -24
  626. package/dist/types/components/DivInput/index.d.ts +0 -2
  627. package/dist/types/components/Grouper/Grouper.d.ts +0 -3
  628. package/dist/types/components/Grouper/_types.d.ts +0 -20
  629. package/dist/types/components/Grouper/index.d.ts +0 -2
  630. package/dist/types/components/Icon/iconRegistry.test.d.ts +0 -1
  631. package/dist/types/components/IconButton/_animation.d.ts +0 -18
  632. package/dist/types/components/IconButton/_animation.test.d.ts +0 -1
  633. package/dist/types/components/Label/Label.d.ts +0 -3
  634. package/dist/types/components/Label/_types.d.ts +0 -25
  635. package/dist/types/components/Label/index.d.ts +0 -3
  636. package/dist/types/components/Level/Level.d.ts +0 -5
  637. package/dist/types/components/Level/_types.d.ts +0 -21
  638. package/dist/types/components/Level/index.d.ts +0 -2
  639. package/dist/types/components/Modal/Modal.d.ts +0 -3
  640. package/dist/types/components/Modal/_types.d.ts +0 -49
  641. package/dist/types/components/Modal/index.d.ts +0 -2
  642. package/dist/types/hooks/useActiveTab/useActiveTab.test.d.ts +0 -1
  643. package/dist/types/hooks/useAudioRecorder/useAudioRecorder.test.d.ts +0 -1
  644. package/dist/types/hooks/useBindWebRTC/useBindWebRTC.test.d.ts +0 -1
  645. package/dist/types/hooks/useClipboard/useClipboard.test.d.ts +0 -1
  646. package/dist/types/hooks/useDoubleClick/useDoubleClick.test.d.ts +0 -1
  647. package/dist/types/hooks/useInfiniteScroll/useInfiniteScroll.test.d.ts +0 -1
  648. package/dist/types/hooks/useIntersecting/useIntersecting.test.d.ts +0 -1
  649. package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.test.d.ts +0 -1
  650. package/dist/types/hooks/useLastUpdated/useLastUpdated.test.d.ts +0 -1
  651. package/dist/types/hooks/useLocalStore/useLocalStore.test.d.ts +0 -1
  652. package/dist/types/hooks/useMdStreamBuffer/useMdStreamBuffer.test.d.ts +0 -1
  653. package/dist/types/hooks/useMicrophone/useMicrophone.test.d.ts +0 -1
  654. package/dist/types/hooks/useObserveTheme/useObserveTheme.test.d.ts +0 -1
  655. package/dist/types/hooks/useTheme/useTheme.test.d.ts +0 -1
  656. package/dist/types/hooks/useToolTip/useToolTip.test.d.ts +0 -1
  657. package/dist/types/hooks/useTrackRenders/useTrackRenders.test.d.ts +0 -1
  658. package/dist/types/hooks/useWindow/useWindow.test.d.ts +0 -1
  659. package/dist/types/providers/themeServer.test.d.ts +0 -1
  660. package/dist/types/stores/LocalDB/localDBStore.test.d.ts +0 -1
  661. package/dist/types/stores/SSE/sseStore.test.d.ts +0 -1
  662. package/dist/types/stores/WS/wsStore.test.d.ts +0 -1
  663. package/dist/types/stores/WebRTC/webRTCStore.test.d.ts +0 -1
  664. package/dist/types/stores/activeTab/activeTabStore.test.d.ts +0 -1
  665. package/dist/types/stores/browserChannel/browserChannelsStore.test.d.ts +0 -1
  666. package/dist/types/stores/microphone/microphoneStore.test.d.ts +0 -1
  667. package/dist/types/stores/modal/modalStore.test.d.ts +0 -1
  668. package/dist/types/stores/tip/tipStore.test.d.ts +0 -1
  669. package/dist/types/stores/toast/toastStore.test.d.ts +0 -1
  670. package/dist/types/stores/uploads/uploadsStore.test.d.ts +0 -1
  671. package/dist/types/stores/video/videoStore.test.d.ts +0 -1
  672. package/dist/types/stores/volume/volumeStore.test.d.ts +0 -1
  673. package/dist/types/stores/window/windowStore.test.d.ts +0 -1
  674. package/dist/types/utils/functions/colors.test.d.ts +0 -1
  675. package/dist/types/utils/functions/debounce.test.d.ts +0 -1
  676. package/dist/types/utils/functions/files.test.d.ts +0 -1
  677. package/dist/types/utils/functions/misc.test.d.ts +0 -1
  678. package/dist/types/utils/functions/rafThrottle.test.d.ts +0 -1
  679. package/dist/types/utils/objects/IndexedDB/IndexedDB.test.d.ts +0 -1
  680. package/dist/types/utils/objects/MDStreamBuffer/MdStreamBuffer.test.d.ts +0 -1
  681. package/dist/types/utils/objects/SSEConnection/SSEConnection.test.d.ts +0 -1
  682. package/dist/types/utils/objects/WSConnection/WSConnection.test.d.ts +0 -1
  683. package/dist/types/utils/objects/WebRTCConnection/WebRTCConnection.test.d.ts +0 -1
  684. package/dist/types/utils/objects/audioVisualizer/audioVisualizer.test.d.ts +0 -1
  685. package/dist/types/utils/objects/browserChannel/broadcastChannel.test.d.ts +0 -1
  686. package/dist/types/workers/uploads/uploads-worker.test.d.ts +0 -1
  687. /package/dist/cjs/chunks/{MdStreamBuffer-DiL2zm2P.js → MdStreamBuffer-B0KtaR_k.js} +0 -0
  688. /package/dist/cjs/chunks/{SSEConnection-CTxnFASS.js → SSEConnection-BXWkgT66.js} +0 -0
  689. /package/dist/cjs/chunks/{activeTabStore-C8afog5l.js → activeTabStore-D2gxAoK6.js} +0 -0
  690. /package/dist/cjs/chunks/{broadcastChannel-DLSijpj_.js → broadcastChannel-DdPZ3LUB.js} +0 -0
  691. /package/dist/cjs/chunks/{magic-string.es-DRDyITUv.js → magic-string.es-DsAR0Q7u.js} +0 -0
  692. /package/dist/cjs/chunks/{rafThrottle-DdNEpMIw.js → rafThrottle-BRdLzPo7.js} +0 -0
  693. /package/dist/cjs/chunks/{tipStore-BKFK6F3e.js → tipStore-DDHyGeyK.js} +0 -0
  694. /package/dist/cjs/chunks/{tslib.es6-B2uEaXWi.js → tslib.es6-B8JY5ZGw.js} +0 -0
  695. /package/dist/cjs/chunks/{videoStore-BYmE3fJZ.js → videoStore-B0l9iBw4.js} +0 -0
  696. /package/dist/esm/chunks/{MdStreamBuffer-D2Yh0SCY.mjs → MdStreamBuffer-CcO5IBxD.mjs} +0 -0
  697. /package/dist/esm/chunks/{SSEConnection-B3iPwyF_.mjs → SSEConnection-B5rVxalP.mjs} +0 -0
  698. /package/dist/esm/chunks/{activeTabStore-BsoH1tFV.mjs → activeTabStore-CCstpXAC.mjs} +0 -0
  699. /package/dist/esm/chunks/{broadcastChannel-DahousoM.mjs → broadcastChannel-CPT0S33H.mjs} +0 -0
  700. /package/dist/esm/chunks/{magic-string.es-DOKITkor.mjs → magic-string.es-CI4cCGRB.mjs} +0 -0
  701. /package/dist/esm/chunks/{rafThrottle-BX9f7-D1.mjs → rafThrottle-Dl8Z5sJ-.mjs} +0 -0
  702. /package/dist/esm/chunks/{tipStore-CF42G3w9.mjs → tipStore-CBvk303u.mjs} +0 -0
  703. /package/dist/esm/chunks/{tslib.es6-DatKI43-.mjs → tslib.es6-CpnJrDBv.mjs} +0 -0
  704. /package/dist/esm/chunks/{videoStore-CiDDAB4E.mjs → videoStore-Cd-Lewfy.mjs} +0 -0
@@ -0,0 +1,92 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), usePrefersReducedMotion = require("./usePrefersReducedMotion-GpD17CAE.js"), css_dot = "Dot-module_dot__RNz87 flexBox-module_row__z24tF";
5
+
6
+ const DEFAULT_VARIANTS = {
7
+ initial: {
8
+ opacity: 0
9
+ },
10
+ animate: {
11
+ opacity: 1
12
+ },
13
+ exit: {
14
+ opacity: 0
15
+ }
16
+ }, DEFAULT_TRANSITION = {
17
+ type: "tween",
18
+ ease: [ .36, 0, .64, 1 ],
19
+ duration: .25
20
+ }, Dot = React.memo(rawProps => {
21
+ const props = resolveColorProps.resolveColorProps(rawProps), reduceMotion = usePrefersReducedMotion.usePrefersReducedMotion(), themeMotion = hooks_useTheme.useTheme().current.motion, {size: size = 8, offSet: offSet = 2, topOffset: topOffset = offSet, rightOffset: rightOffset = offSet, border: border = 3, position: position = "corner", color: color, transition: transition, motionValues: motionValues, show: show = !1, state: state} = props, divAttributes = tslib_es6.__rest(props, [ "size", "offSet", "topOffset", "rightOffset", "border", "position", "color", "transition", "motionValues", "show", "state" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", variants = React.useMemo(() => motionValues ? Object.assign(Object.assign({}, DEFAULT_VARIANTS), motionValues) : DEFAULT_VARIANTS, [ motionValues ]), trans = React.useMemo(() => {
22
+ var _a;
23
+ const curve = null === (_a = themeMotion["motion-water"].match(/cubic-bezier\(([^)]+)\)/)) || void 0 === _a ? void 0 : _a[1].split(",").map(Number), durationText = themeMotion["motion-water-duration"], duration = Number.parseFloat(durationText) / (durationText.endsWith("ms") ? 1e3 : 1);
24
+ return Object.assign(Object.assign(Object.assign(Object.assign({}, DEFAULT_TRANSITION), 4 === (null == curve ? void 0 : curve.length) && curve.every(Number.isFinite) ? {
25
+ ease: curve
26
+ } : {}), Number.isFinite(duration) && duration >= 0 ? {
27
+ duration: duration
28
+ } : {}), transition);
29
+ }, [ themeMotion, transition ]), bgColor = React.useMemo(() => {
30
+ if (color) return color;
31
+ if (state) switch (state) {
32
+ case "red":
33
+ return "var(--feedback-warning)";
34
+
35
+ case "yellow":
36
+ return "var(--feedback-attention)";
37
+
38
+ case "green":
39
+ return "var(--feedback-positive)";
40
+
41
+ case "blue":
42
+ return "var(--core-gp-logo-primary)";
43
+
44
+ case "grey":
45
+ return "var(--core-text-secondary)";
46
+ }
47
+ return "var(--core-gp-logo-primary)";
48
+ }, [ state, color ]), cssVars = React.useMemo(() => ({
49
+ "--dot-size": `${size}px`,
50
+ "--dot-display": "inline" === position ? "inline-flex" : "flex",
51
+ "--dot-position": "inline" === position ? "relative" : "absolute",
52
+ "--dot-top": "inline" === position ? "unset" : -topOffset + "px",
53
+ "--dot-right": "inline" === position ? "unset" : -rightOffset + "px",
54
+ "--dot-vertical-align": "inline" === position ? "middle" : "unset",
55
+ "--dot-border": `${border}px solid`,
56
+ "--dot-border-color": "var(--core-surface-primary)",
57
+ "--dot-bg": `${bgColor}`
58
+ }), [ size, position, topOffset, rightOffset, border, bgColor ]);
59
+ return reduceMotion ? show ? jsxRuntime.jsx("div", Object.assign({
60
+ id: divId,
61
+ className: `${css_dot}${divClass}`,
62
+ style: Object.assign(Object.assign({}, divStyle), cssVars),
63
+ role: "status",
64
+ "aria-live": "polite",
65
+ "aria-label": "Blue dot indicating active or new"
66
+ }, rest, {
67
+ children: jsxRuntime.jsx("div", {
68
+ className: "dot"
69
+ })
70
+ })) : null : jsxRuntime.jsx(react.AnimatePresence, {
71
+ initial: !1,
72
+ children: show && jsxRuntime.jsx(react.motion.div, Object.assign({
73
+ id: divId,
74
+ className: `${css_dot}${divClass}`,
75
+ style: Object.assign(Object.assign({}, divStyle), cssVars),
76
+ initial: "initial",
77
+ animate: "animate",
78
+ exit: "exit",
79
+ transition: trans,
80
+ variants: variants,
81
+ role: "status",
82
+ "aria-live": "polite",
83
+ "aria-label": "Blue dot indicating active or new"
84
+ }, rest, {
85
+ children: jsxRuntime.jsx("div", {
86
+ className: "dot"
87
+ })
88
+ }))
89
+ });
90
+ });
91
+
92
+ exports.Dot = Dot;
@@ -0,0 +1,251 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react");
5
+
6
+ require("../theme/colors.js");
7
+
8
+ var theme_corners = require("../theme/corners.js");
9
+
10
+ require("../theme/type.js"), require("./resolveColor-DkYThq2J.js"), require("./breakpoints-BDw1OJh9.js");
11
+
12
+ var misc = require("./misc-PmT7cZzC.js");
13
+
14
+ require("./broadcastChannel-DdPZ3LUB.js"), require("./files-RYD9L_pI.js"), require("./webRTCStore-OGkXAovD.js"),
15
+ require("./microphoneStore-D7DuvQeX.js"), require("./volumeStore-BoEoo9wA.js");
16
+
17
+ var hooks_useObserveResize = require("../hooks/useObserveResize.js"), resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), usePrefersReducedMotion = require("./usePrefersReducedMotion-GpD17CAE.js"), css_panel = "DraggablePanel-module_panel__vuq2R flexBox-module_columnStart__C7P44", css_content = "DraggablePanel-module_content__SBL0T flexBox-module_columnStart__C7P44", css_handle = "DraggablePanel-module_handle__LPZw8", css_rail = "DraggablePanel-module_rail__P-7yb", css_highlight = "DraggablePanel-module_highlight__5d-cs";
18
+
19
+ const defaults_initial = 250, defaults_min = 250, defaults_max = 500;
20
+
21
+ function resolve(value, containerWidth, fallback) {
22
+ return !Number.isFinite(value) || value < 0 ? fallback : value <= 1 ? void 0 === containerWidth ? 0 : containerWidth * value : Math.max(50, value);
23
+ }
24
+
25
+ /** Relative widths wait for a real container measurement; fixed widths are SSR-safe. */ const defaultConstraints = {
26
+ initial: 250,
27
+ min: 250,
28
+ max: 500
29
+ }, DraggablePanel = React.memo(function(rawProps) {
30
+ var _a, _b, _c;
31
+ const props = resolveColorProps.resolveColorProps(rawProps), {children: children, sizeConstraints: sizeConstraints = defaultConstraints, isClosed: isClosed = !0, resizeHandle: resizeHandle, resizeHandleLabel: resizeHandleLabel = "Resize panel", borderRight: borderRight = "1px solid var(--core-outline-secondary)", borderLeft: borderLeft = "1px solid var(--core-outline-secondary)", backgroundColor: backgroundColor = "transparent", drags: drags = "right", isTouchDevice: isTouchDevice = !1, disableOnContext: disableOnContext = !1, dragHandle: dragHandle = !0, dragHandleStyle: dragHandleStyle = {
32
+ height: 24,
33
+ width: 9
34
+ }, transitionDurationOnInit: transitionDurationOnInit, containerRef: containerRef, onResize: onResize, onResizeStart: onResizeStart, onResizeEnd: onResizeEnd, onContextMenu: onContextMenu, id: id, className: className, style: style} = props, attributes = tslib_es6.__rest(props, [ "children", "sizeConstraints", "isClosed", "resizeHandle", "resizeHandleLabel", "borderRight", "borderLeft", "backgroundColor", "drags", "isTouchDevice", "disableOnContext", "dragHandle", "dragHandleStyle", "transitionDurationOnInit", "containerRef", "onResize", "onResizeStart", "onResizeEnd", "onContextMenu", "id", "className", "style" ]), div = React.useRef(null), handle = React.useRef(null), generatedId = React.useId(), panelId = null != id ? id : generatedId, containerSize = hooks_useObserveResize.useObserveResize(containerRef), [windowWidth, setWindowWidth] = React.useState(), containerWidth = containerRef ? containerSize.width || void 0 : windowWidth, {initial: initial, min: min, max: max} = function(values, containerWidth) {
35
+ const min = resolve(values.min, containerWidth, defaults_min), max = Math.max(min, resolve(values.max, containerWidth, defaults_max));
36
+ return {
37
+ initial: Math.min(max, Math.max(min, resolve(values.initial, containerWidth, defaults_initial))),
38
+ min: min,
39
+ max: max
40
+ };
41
+ }(sizeConstraints, containerWidth), [lastWidth, setLastWidth] = React.useState(), [dragWidth, setDragWidth] = React.useState(), [highlight, setHighlight] = React.useState(!1), timer = React.useRef(void 0), gesture = React.useRef(void 0), latest = React.useRef({
42
+ onResize: onResize,
43
+ onResizeStart: onResizeStart,
44
+ onResizeEnd: onResizeEnd,
45
+ min: min,
46
+ max: max
47
+ });
48
+ React.useLayoutEffect(() => {
49
+ latest.current = {
50
+ onResize: onResize,
51
+ onResizeStart: onResizeStart,
52
+ onResizeEnd: onResizeEnd,
53
+ min: min,
54
+ max: max
55
+ };
56
+ });
57
+ const reducedMotion = usePrefersReducedMotion.usePrefersReducedMotion(), width = Math.min(max, Math.max(min, null !== (_a = null != dragWidth ? dragWidth : lastWidth) && void 0 !== _a ? _a : initial)), unresolvedInitial = void 0 === lastWidth && void 0 === containerWidth && sizeConstraints.initial >= 0 && sizeConstraints.initial <= 1, closed = isClosed || Boolean(drags) && (width <= 1 || unresolvedInitial), [settled, setSettled] = React.useState(!1);
58
+ React.useEffect(() => {
59
+ void 0 !== containerWidth && setSettled(!0);
60
+ }, [ containerWidth ]), React.useEffect(() => {
61
+ var _a;
62
+ if (containerRef) return;
63
+ const view = null === (_a = div.current) || void 0 === _a ? void 0 : _a.ownerDocument.defaultView;
64
+ if (!view) return;
65
+ const update = () => setWindowWidth(view.innerWidth);
66
+ return update(), view.addEventListener("resize", update), () => view.removeEventListener("resize", update);
67
+ }, [ containerRef ]);
68
+ const clearHighlightTimer = React.useCallback(() => {
69
+ void 0 !== timer.current && clearTimeout(timer.current), timer.current = void 0;
70
+ }, []), hideHighlight = () => {
71
+ clearHighlightTimer(), gesture.current || setHighlight(!1);
72
+ }, info = (nextWidth, height, deltaWidth = 0) => ({
73
+ div: div,
74
+ divWidth: nextWidth,
75
+ divHeight: height,
76
+ deltaWidth: deltaWidth
77
+ }), finish = React.useCallback(notify => {
78
+ var _a, _b, _c, _d, _e, _f;
79
+ const active = gesture.current;
80
+ if (!active) return;
81
+ if (gesture.current = void 0, active.release(), !notify) return void clearHighlightTimer();
82
+ const finalWidth = Math.min(latest.current.max, Math.max(latest.current.min, active.width));
83
+ setLastWidth(finalWidth), setDragWidth(void 0), clearHighlightTimer(), setHighlight(!1);
84
+ const update = {
85
+ div: div,
86
+ divWidth: finalWidth,
87
+ divHeight: null !== (_b = null === (_a = div.current) || void 0 === _a ? void 0 : _a.offsetHeight) && void 0 !== _b ? _b : active.height,
88
+ deltaWidth: 0
89
+ };
90
+ null === (_d = (_c = latest.current).onResize) || void 0 === _d || _d.call(_c, update),
91
+ null === (_f = (_e = latest.current).onResizeEnd) || void 0 === _f || _f.call(_e, update);
92
+ }, [ clearHighlightTimer ]);
93
+ React.useLayoutEffect(() => {
94
+ gesture.current && finish(!0);
95
+ }, [ isClosed, drags, min, max, finish ]), React.useEffect(() => () => {
96
+ finish(!1), clearHighlightTimer();
97
+ }, [ finish, clearHighlightTimer ]);
98
+ const railWidth = isTouchDevice ? 44 : null !== (_b = null == resizeHandle ? void 0 : resizeHandle.width) && void 0 !== _b ? _b : 10, offset = isTouchDevice ? -22 : -railWidth / 2, variables = {
99
+ "--panel-bg": null != backgroundColor ? backgroundColor : "transparent"
100
+ };
101
+ return jsxRuntime.jsxs("div", Object.assign({}, attributes, {
102
+ id: panelId,
103
+ ref: div,
104
+ className: `${css_panel}${className ? ` ${className}` : ""}`,
105
+ onContextMenu: event => {
106
+ null == onContextMenu || onContextMenu(event), disableOnContext && event.preventDefault();
107
+ },
108
+ style: Object.assign(Object.assign(Object.assign({}, style), variables), {
109
+ overflow: "visible",
110
+ flexShrink: 0,
111
+ width: isClosed ? 0 : drags ? unresolvedInitial ? "0px" : width : "100%",
112
+ height: "100%",
113
+ maxWidth: drags ? max : "unset",
114
+ transition: (() => {
115
+ if (void 0 !== dragWidth || reducedMotion) return "none";
116
+ if (!settled && void 0 !== transitionDurationOnInit) {
117
+ return `width ${"number" == typeof transitionDurationOnInit ? `${Math.max(0, transitionDurationOnInit)}ms` : transitionDurationOnInit} var(--motion-water)`;
118
+ }
119
+ return "width var(--motion-water-duration) var(--motion-water)";
120
+ })(),
121
+ borderRight: closed || "right" !== drags ? "none" : null != borderRight ? borderRight : void 0,
122
+ borderLeft: closed || "left" !== drags ? "none" : null != borderLeft ? borderLeft : void 0
123
+ }),
124
+ children: [ jsxRuntime.jsx("div", {
125
+ className: css_content,
126
+ inert: closed || void 0,
127
+ "aria-hidden": closed || void 0,
128
+ children: children
129
+ }), jsxRuntime.jsxs("div", {
130
+ ref: handle,
131
+ className: css_rail,
132
+ role: "separator",
133
+ "aria-orientation": "vertical",
134
+ "aria-label": resizeHandleLabel.trim() || "Resize panel",
135
+ "aria-controls": panelId,
136
+ "aria-valuemin": min,
137
+ "aria-valuemax": max,
138
+ "aria-valuenow": width,
139
+ "aria-valuetext": `${Math.round(width)} pixels`,
140
+ tabIndex: closed || !drags ? -1 : 0,
141
+ onKeyDown: event => {
142
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
143
+ if (event.currentTarget.removeAttribute("data-pointer-focus"), !drags || closed || gesture.current || event.altKey || event.ctrlKey || event.metaKey) return;
144
+ const current = width;
145
+ let next;
146
+ if ("Home" === event.key) next = min; else if ("End" === event.key) next = max; else {
147
+ if ("ArrowLeft" !== event.key && "ArrowRight" !== event.key) return;
148
+ next = current + ("ArrowRight" === event.key ? 1 : -1) * (event.shiftKey ? 50 : 10) * ("right" === drags ? 1 : -1);
149
+ }
150
+ if (event.preventDefault(), next = Math.min(max, Math.max(min, next)), next === current) return;
151
+ const height = null !== (_b = null === (_a = div.current) || void 0 === _a ? void 0 : _a.offsetHeight) && void 0 !== _b ? _b : 0;
152
+ null === (_d = (_c = latest.current).onResize) || void 0 === _d || _d.call(_c, info(current, height)),
153
+ null === (_f = (_e = latest.current).onResizeStart) || void 0 === _f || _f.call(_e, info(current, height)),
154
+ setLastWidth(next), null === (_h = (_g = latest.current).onResize) || void 0 === _h || _h.call(_g, info(next, height, (next - current) * ("right" === drags ? 1 : -1))),
155
+ null === (_k = (_j = latest.current).onResize) || void 0 === _k || _k.call(_j, info(next, height)),
156
+ null === (_m = (_l = latest.current).onResizeEnd) || void 0 === _m || _m.call(_l, info(next, height));
157
+ },
158
+ onPointerDown: event => {
159
+ var _a, _b, _c, _d;
160
+ if (closed || !drags || 0 !== event.button || !event.isPrimary || gesture.current) return;
161
+ event.preventDefault();
162
+ const panel = div.current, rail = event.currentTarget, document = rail.ownerDocument, view = document.defaultView;
163
+ if (!panel || !view) return;
164
+ rail.setAttribute("data-pointer-focus", ""), rail.focus({
165
+ preventScroll: !0
166
+ }), clearHighlightTimer();
167
+ const root = document.documentElement, previous = {
168
+ userSelect: root.style.userSelect,
169
+ webkitUserSelect: root.style.webkitUserSelect
170
+ }, startWidth = panel.offsetWidth, active = {
171
+ pointerId: event.pointerId,
172
+ startX: event.clientX,
173
+ startWidth: startWidth,
174
+ width: startWidth,
175
+ height: panel.offsetHeight,
176
+ release: () => {}
177
+ };
178
+ gesture.current = active;
179
+ const move = next => {
180
+ var _a, _b;
181
+ if (next.pointerId !== active.pointerId) return;
182
+ next.preventDefault();
183
+ const delta = next.clientX - active.startX, nextWidth = active.startWidth + ("right" === drags ? delta : -delta);
184
+ nextWidth < min || nextWidth > max || (active.width = nextWidth, panel.style.width = `${nextWidth}px`,
185
+ rail.setAttribute("aria-valuenow", String(nextWidth)), rail.setAttribute("aria-valuetext", `${Math.round(nextWidth)} pixels`),
186
+ null === (_b = (_a = latest.current).onResize) || void 0 === _b || _b.call(_a, info(nextWidth, active.height, delta)));
187
+ }, end = next => {
188
+ next.pointerId === active.pointerId && finish(!0);
189
+ }, cancel = () => finish(!0), handleEscape = next => {
190
+ "Escape" === next.key && finish(!0);
191
+ };
192
+ active.release = () => {
193
+ document.removeEventListener("pointermove", move), document.removeEventListener("pointerup", end),
194
+ document.removeEventListener("pointercancel", end), rail.removeEventListener("lostpointercapture", cancel),
195
+ view.removeEventListener("blur", cancel), view.removeEventListener("keydown", handleEscape),
196
+ rail.hasPointerCapture(active.pointerId) && rail.releasePointerCapture(active.pointerId),
197
+ root.style.userSelect = previous.userSelect, root.style.webkitUserSelect = previous.webkitUserSelect;
198
+ }, document.addEventListener("pointermove", move, {
199
+ passive: !1
200
+ }), document.addEventListener("pointerup", end), document.addEventListener("pointercancel", end),
201
+ rail.addEventListener("lostpointercapture", cancel), view.addEventListener("blur", cancel),
202
+ view.addEventListener("keydown", handleEscape), root.style.userSelect = "none",
203
+ root.style.webkitUserSelect = "none";
204
+ try {
205
+ rail.setPointerCapture(active.pointerId);
206
+ } catch (_e) {}
207
+ setDragWidth(startWidth), setHighlight(!0);
208
+ const update = info(startWidth, active.height);
209
+ null === (_b = (_a = latest.current).onResize) || void 0 === _b || _b.call(_a, update),
210
+ null === (_d = (_c = latest.current).onResizeStart) || void 0 === _d || _d.call(_c, update);
211
+ },
212
+ onPointerEnter: () => {
213
+ clearHighlightTimer(), timer.current = setTimeout(() => setHighlight(!0), isTouchDevice ? 0 : 350);
214
+ },
215
+ onPointerLeave: hideHighlight,
216
+ onFocus: () => {
217
+ clearHighlightTimer(), setHighlight(!0);
218
+ },
219
+ onBlur: event => {
220
+ event.currentTarget.removeAttribute("data-pointer-focus"), hideHighlight();
221
+ },
222
+ onPointerCancel: () => finish(!0),
223
+ style: {
224
+ display: closed || !drags ? "none" : "flex",
225
+ width: railWidth,
226
+ backgroundColor: null !== (_c = null == resizeHandle ? void 0 : resizeHandle.color) && void 0 !== _c ? _c : "transparent",
227
+ right: "right" === drags ? offset : void 0,
228
+ left: "left" === drags ? offset : void 0
229
+ },
230
+ children: [ dragHandle && !closed && jsxRuntime.jsx(DragHandle, Object.assign({}, dragHandleStyle)), jsxRuntime.jsx("span", {
231
+ className: css_highlight,
232
+ "data-active": highlight || void 0
233
+ }) ]
234
+ }) ]
235
+ }));
236
+ }), DragHandle = React.memo(rawProps => {
237
+ const props = resolveColorProps.resolveColorProps(rawProps), {width: width = 6, height: height = 6, radius: radius = theme_corners.corners["corner-round"], stroke: stroke = 1, color: color = "var(--core-surface-primary-tint)", strokeColor: strokeColor = "var(--core-outline-secondary)"} = props, cssVars = React.useMemo(() => ({
238
+ "--drag-handle-width": `${width}px`,
239
+ "--drag-handle-height": `${height}px`,
240
+ "--drag-handle-radius": misc.setStyle(radius),
241
+ "--drag-handle-border": `${stroke}px`,
242
+ "--drag-handle-border-color": `${strokeColor}`,
243
+ "--drag-handle-bg": `${color}`
244
+ }), [ width, height, radius, stroke, color, strokeColor ]);
245
+ return jsxRuntime.jsx("div", {
246
+ className: css_handle,
247
+ style: cssVars
248
+ });
249
+ });
250
+
251
+ exports.DraggablePanel = DraggablePanel;
@@ -0,0 +1,269 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-B8JY5ZGw.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-PmT7cZzC.js"), theme_corners = require("../theme/corners.js");
5
+
6
+ require("./resolveColor-DkYThq2J.js"), require("./broadcastChannel-DdPZ3LUB.js"),
7
+ require("./files-RYD9L_pI.js");
8
+
9
+ var resolveColorProps = require("./resolveColorProps-DE1k1P-Z.js"), type_module = require("./type.module-Dk5b_rHG.js"), usePrefersReducedMotion = require("./usePrefersReducedMotion-GpD17CAE.js"), Icon = require("./Icon-COY7IZkK.js"), css = {
10
+ field: "DropDown-module_field__Me5dj",
11
+ message: "DropDown-module_message__msDvZ",
12
+ wrapper: "DropDown-module_wrapper__CyX0u",
13
+ face: "DropDown-module_face__6gyF3",
14
+ faceText: "DropDown-module_faceText__glhB3",
15
+ label: "DropDown-module_label__Mrwbp",
16
+ chevron: "DropDown-module_chevron__LkYsE",
17
+ select: "DropDown-module_select__mzNnv",
18
+ xs: "DropDown-module_xs__7L71q type-module_body-xs-regular__ZAFft",
19
+ s: "DropDown-module_s__vAxXD type-module_body-s-regular__vRHSP",
20
+ m: "DropDown-module_m__K6JPk type-module_body-m-regular__LuQBA",
21
+ l: "DropDown-module_l__Kib48 type-module_body-l-regular__lOYbg",
22
+ xl: "DropDown-module_xl__mwc0C type-module_body-xl-regular__pF2kC",
23
+ labelSlot: "DropDown-module_labelSlot__RRaeq",
24
+ separator: "DropDown-module_separator__2eu0p"
25
+ };
26
+
27
+ const emptyOptions = [], invalidChild = "DropDown children must be native <option> elements. Fragments and conditional options are allowed.";
28
+
29
+ function optionText(children) {
30
+ let text = "";
31
+ return React.Children.forEach(children, child => {
32
+ if (null != child && "boolean" != typeof child) if ("string" != typeof child && "number" != typeof child && "bigint" != typeof child) {
33
+ if (!React.isValidElement(child) || child.type !== React.Fragment) throw new Error("DropDown option content must be plain text.");
34
+ text += optionText(child.props.children);
35
+ } else text += String(child);
36
+ }), text;
37
+ }
38
+
39
+ function collectOptions(children, elements) {
40
+ React.Children.forEach(children, child => {
41
+ if (null != child && "boolean" != typeof child && ("string" != typeof child || "" !== child.trim())) {
42
+ if (!React.isValidElement(child)) throw new Error(invalidChild);
43
+ if (child.type !== React.Fragment) {
44
+ if ("option" !== child.type) throw new Error(invalidChild);
45
+ elements.push(child);
46
+ } else collectOptions(child.props.children, elements);
47
+ }
48
+ });
49
+ }
50
+
51
+ function resolveOptions(items, children) {
52
+ if (void 0 !== items && null != children) throw new Error("DropDown accepts either options or <option> children, not both.");
53
+ if (null == children) return {
54
+ options: null != items ? items : emptyOptions,
55
+ elements: void 0
56
+ };
57
+ const elements = [];
58
+ collectOptions(children, elements);
59
+ return {
60
+ options: elements.map(element => {
61
+ var _a;
62
+ const props = element.props;
63
+ if (void 0 !== props.selected) throw new Error("Use DropDown value or defaultValue instead of selected on <option>.");
64
+ if (void 0 !== props.value && "string" != typeof props.value && "number" != typeof props.value) throw new Error("DropDown <option> values must be strings or numbers.");
65
+ const text = optionText(props.children).replace(/[\t\n\f\r ]+/g, " ").trim();
66
+ return {
67
+ value: void 0 === props.value ? text : String(props.value),
68
+ label: null !== (_a = props.label) && void 0 !== _a ? _a : text,
69
+ disabled: props.disabled
70
+ };
71
+ }),
72
+ elements: elements
73
+ };
74
+ }
75
+
76
+ const useClientLayoutEffect = "undefined" == typeof window ? React.useEffect : React.useLayoutEffect, withoutAria = attributes => Object.fromEntries(Object.entries(attributes).filter(([key]) => !key.startsWith("aria-") && "role" !== key));
77
+
78
+ function resolveValueKey(value, valueKey) {
79
+ if (valueKey && null !== value && "object" == typeof value) return value[valueKey];
80
+ }
81
+
82
+ function formValue(option, index, valueKey) {
83
+ if (void 0 !== option.formValue) return option.formValue;
84
+ const value = option.value;
85
+ if ("string" == typeof value || "number" == typeof value || "boolean" == typeof value || "bigint" == typeof value) return String(value);
86
+ const key = resolveValueKey(value, valueKey);
87
+ return String("string" == typeof key || "number" == typeof key || "boolean" == typeof key || "bigint" == typeof key ? key : index);
88
+ }
89
+
90
+ function optionLabel(option) {
91
+ return void 0 !== option.label ? option.label : "object" == typeof option.value ? "Select an option" : String(option.value);
92
+ }
93
+
94
+ function DropDownComponent(rawProps) {
95
+ var _a, _b, _c, _d;
96
+ const props = resolveColorProps.resolveColorProps(rawProps), {name: name, inputName: inputName, inputId: inputId, inputAttributes: inputAttributes = {}, label: label, variant: variant = "simple", behavior: behavior = "persistent", labelSize: labelSize = "m", stackedGap: stackedGap = 2, stackedLabelTextSize: stackedLabelTextSize = "body-xs-regular", labelBackgroundColor: labelBackgroundColor = "var(--core-surface-primary)", tip: tip, errorMessage: errorMessage, textColorError: textColorError = "var(--feedback-warning)", labelColor: labelColor = "var(--core-text-primary)", textSize: textSize = "m", width: width = "100%", height: height = "auto", inline: inline = !1, value: value, defaultValue: defaultValue, valueKey: valueKey, options: optionItems, children: children, placeholder: placeholderProp, borderRadius: borderRadius = theme_corners.corners["corner-m"], backgroundColor: backgroundColor, iconColor: iconColor = "var(--core-text-primary)", textColor: textColor = "var(--core-text-primary)", textColorDisabled: textColorDisabled = "var(--core-text-disabled)", textColorPlaceholder: textColorPlaceholder = "var(--core-text-tertiary)", borderWidth: borderWidth = 1, borderColor: borderColor = "var(--core-outline-primary)", borderColorFocused: borderColorFocused = "var(--core-link-primary)", borderColorError: borderColorError = "var(--feedback-warning)", borderColorDisabled: borderColorDisabled = "var(--core-outline-primary)", padding: padding, paddingLeft: paddingLeft, paddingRight: paddingRight, paddingTop: paddingTop, paddingBottom: paddingBottom, borderStyle: borderStyle = "box", iconSize: iconSize = 20, disabled: disabled = !1, error: error = !1, gap: gap = 8, onChange: onChange, onChangeOption: onChangeOption, className: className, style: style} = props, spanAttributes = tslib_es6.__rest(props, [ "name", "inputName", "inputId", "inputAttributes", "label", "variant", "behavior", "labelSize", "stackedGap", "stackedLabelTextSize", "labelBackgroundColor", "tip", "errorMessage", "textColorError", "labelColor", "textSize", "width", "height", "inline", "value", "defaultValue", "valueKey", "options", "children", "placeholder", "borderRadius", "backgroundColor", "iconColor", "textColor", "textColorDisabled", "textColorPlaceholder", "borderWidth", "borderColor", "borderColorFocused", "borderColorError", "borderColorDisabled", "padding", "paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderStyle", "iconSize", "disabled", "error", "gap", "onChange", "onChangeOption", "className", "style" ]), {options: options, elements: optionElements} = React.useMemo(() => resolveOptions(optionItems, children), [ optionItems, children ]), placeholder = null != placeholderProp ? placeholderProp : "" === (null === (_a = options[0]) || void 0 === _a ? void 0 : _a.value), generatedId = React.useId(), id = inputId || generatedId, hasLabel = Boolean(null == label ? void 0 : label.trim()), ref = React.useRef(null), wrapperRef = React.useRef(null), faceRef = React.useRef(null), reduced = usePrefersReducedMotion.usePrefersReducedMotion(), message = null === (_b = error ? errorMessage : tip) || void 0 === _b ? void 0 : _b.trim(), messageId = `${id}-message`, initialValue = React.useRef(void 0 === defaultValue ? null === (_c = options[0]) || void 0 === _c ? void 0 : _c.value : defaultValue), [localSelection, setLocalSelection] = React.useState({
97
+ value: initialValue.current
98
+ }), localValue = localSelection.value, [isFocused, setIsFocused] = React.useState(!1), controlled = void 0 !== value, selectedValue = (() => {
99
+ var _a;
100
+ return controlled ? value : void 0 === localValue ? null === (_a = options[0]) || void 0 === _a ? void 0 : _a.value : localValue;
101
+ })(), index = null == selectedValue ? -1 : options.findIndex(option => function(left, right, valueKey) {
102
+ if (Object.is(left, right)) return !0;
103
+ const key = resolveValueKey(left, valueKey);
104
+ return void 0 !== key && Object.is(key, resolveValueKey(right, valueKey));
105
+ }(option.value, selectedValue, valueKey)), option = options[index], appearing = "stacked" === variant && "appear" === behavior && !reduced && hasLabel, collapsedLabel = appearing && (index < 0 || placeholder && ("" === selectedValue || 0 === index)), nativeValue = option ? formValue(option, index, valueKey) : "", latestNativeValue = React.useRef(nativeValue);
106
+ latestNativeValue.current = nativeValue, React.useEffect(() => {
107
+ !controlled && void 0 === localValue && options.length && setLocalSelection({
108
+ value: options[0].value
109
+ });
110
+ }, [ controlled, localValue, options ]), React.useEffect(() => {
111
+ const select = ref.current, form = null == select ? void 0 : select.form;
112
+ if (!select || !form) return;
113
+ let resetTimer;
114
+ const reset = event => {
115
+ clearTimeout(resetTimer), resetTimer = setTimeout(() => {
116
+ event.defaultPrevented || (controlled ? select.value = latestNativeValue.current : setLocalSelection({
117
+ value: initialValue.current
118
+ }));
119
+ }, 0);
120
+ };
121
+ return form.addEventListener("reset", reset), () => {
122
+ clearTimeout(resetTimer), form.removeEventListener("reset", reset);
123
+ };
124
+ }, [ controlled, inputAttributes.form ]), React.useEffect(() => {
125
+ disabled && setIsFocused(!1);
126
+ }, [ disabled ]), useClientLayoutEffect(() => {
127
+ const wrapper = wrapperRef.current, face = faceRef.current;
128
+ if (!wrapper || !face) return;
129
+ const slot = face.querySelector("[data-label-slot]"), floatingLabel = null == slot ? void 0 : slot.querySelector("label"), measure = () => {
130
+ var _a, _b;
131
+ "outlined" === variant && floatingLabel && wrapper.style.setProperty("--dd-label-font-size", getComputedStyle(floatingLabel).fontSize),
132
+ face.style.setProperty("--dd-column-top", `${face.offsetTop}px`);
133
+ const padding = getComputedStyle(wrapper), leftInset = Number.parseFloat(padding.paddingLeft) + Number.parseFloat(padding.borderLeftWidth), rightInset = Number.parseFloat(padding.paddingRight) + Number.parseFloat(padding.borderRightWidth);
134
+ if (null === (_a = wrapper.parentElement) || void 0 === _a || _a.style.setProperty("--dd-content-left", `${leftInset}px`),
135
+ null === (_b = wrapper.parentElement) || void 0 === _b || _b.style.setProperty("--dd-content-right", `${rightInset}px`),
136
+ "stacked" === variant && slot) {
137
+ const style = getComputedStyle(slot), space = (Number.parseFloat(style.height) || 0) + (Number.parseFloat(style.marginBottom) || 0);
138
+ wrapper.style.setProperty("--dd-label-space", `${space}px`);
139
+ }
140
+ };
141
+ measure();
142
+ const observer = new ResizeObserver(measure);
143
+ return observer.observe(wrapper), observer.observe(face), slot && observer.observe(slot),
144
+ () => observer.disconnect();
145
+ }, [ variant, label, labelSize, stackedLabelTextSize, stackedGap, padding, paddingLeft, paddingRight, paddingTop, paddingBottom, width, height, iconSize, message, style ]);
146
+ const getBorder = () => "none" === borderStyle ? "none" : `${misc.setStyle(borderWidth)} solid ${disabled ? borderColorDisabled : error ? borderColorError : isFocused ? borderColorFocused : borderColor}`, sidePadding = {};
147
+ null != paddingTop && (sidePadding.paddingTop = misc.setStyle(paddingTop)), null != paddingRight && (sidePadding.paddingRight = misc.setStyle(paddingRight)),
148
+ null != paddingBottom && (sidePadding.paddingBottom = misc.setStyle(paddingBottom)),
149
+ null != paddingLeft && (sidePadding.paddingLeft = misc.setStyle(paddingLeft));
150
+ const cssVars = {
151
+ "--dd-gap": misc.setStyle(gap),
152
+ "--dd-height": misc.setStyle(height),
153
+ "--dd-width": misc.setStyle(width),
154
+ "--dd-margin": inline ? "0 var(--spacing-xs)" : "0",
155
+ "--dd-border-radius": "box" === borderStyle ? misc.setStyle(borderRadius) : "0px",
156
+ "--dd-border": "box" === borderStyle ? getBorder() : "none",
157
+ "--dd-border-bottom": getBorder(),
158
+ "--dd-color": disabled ? textColorDisabled : placeholder && (collapsedLabel || index <= 0) ? textColorPlaceholder : textColor,
159
+ "--dd-bg-color": void 0 !== backgroundColor ? backgroundColor : "underline" === borderStyle ? "transparent" : "var(--core-surface-secondary)",
160
+ "--dd-padding": null != padding ? misc.setStyle(padding) : "none" === borderStyle ? "0 0 var(--spacing-s) 0" : "outlined" === variant ? "calc(var(--spacing-s) + var(--dd-label-font-size, 0px) / 2) var(--spacing-m) var(--spacing-s)" : "var(--spacing-s) calc(var(--spacing-m) - var(--spacing-xs)) var(--spacing-s) var(--spacing-m)",
161
+ "--dd-icon-size": misc.setStyle(iconSize),
162
+ "--dd-label-color": disabled ? textColorDisabled : labelColor,
163
+ "--dd-display": inline ? "inline-flex" : "flex",
164
+ "--dd-stacked-gap": misc.setStyle(Number.isFinite(stackedGap) ? Math.max(0, stackedGap) : 2),
165
+ "--dd-label-background": labelBackgroundColor
166
+ };
167
+ return jsxRuntime.jsxs("span", {
168
+ className: css.field,
169
+ style: cssVars,
170
+ children: [ jsxRuntime.jsxs("span", Object.assign({}, withoutAria(spanAttributes), {
171
+ ref: wrapperRef,
172
+ "data-variant": variant,
173
+ "data-appear": appearing || void 0,
174
+ "data-collapsed-label": collapsedLabel || void 0,
175
+ className: `${css.wrapper}${className ? ` ${className}` : ""}`,
176
+ style: Object.assign(Object.assign(Object.assign({}, style), cssVars), sidePadding),
177
+ children: [ hasLabel && "simple" === variant && jsxRuntime.jsx("label", {
178
+ className: `${css.label} ${css[labelSize]}`,
179
+ htmlFor: id,
180
+ children: label
181
+ }), hasLabel && "simple" === variant && jsxRuntime.jsx("span", {
182
+ className: `${css.separator} ${css[labelSize]}`,
183
+ "aria-hidden": "true",
184
+ children: "|"
185
+ }), jsxRuntime.jsxs("span", {
186
+ ref: faceRef,
187
+ className: `${css.face} ${css[textSize]}`,
188
+ children: [ hasLabel && "simple" !== variant && jsxRuntime.jsx("span", {
189
+ className: css.labelSlot,
190
+ "data-label-slot": !0,
191
+ children: jsxRuntime.jsx("label", {
192
+ className: `${css.label} ${null !== (_d = type_module.typeCss[stackedLabelTextSize]) && void 0 !== _d ? _d : type_module.typeCss["body-xs-regular"]}`,
193
+ htmlFor: id,
194
+ children: label
195
+ })
196
+ }), jsxRuntime.jsx("span", {
197
+ className: css.faceText,
198
+ "aria-hidden": "true",
199
+ children: (collapsedLabel ? label : option ? optionLabel(option).replace(/^--\s*/, "") : placeholder ? "Select an option" : "") || " "
200
+ }) ]
201
+ }), jsxRuntime.jsx("span", {
202
+ className: css.chevron,
203
+ "aria-hidden": "true",
204
+ children: jsxRuntime.jsx(Icon.Icon, {
205
+ name: "arrows.chevron-down",
206
+ size: iconSize,
207
+ strokeColor: disabled ? textColorDisabled : iconColor
208
+ })
209
+ }), jsxRuntime.jsxs("select", Object.assign({}, withoutAria(inputAttributes), {
210
+ className: `${css.select} ${css[textSize]}`,
211
+ value: nativeValue,
212
+ ref: ref,
213
+ id: id,
214
+ name: name,
215
+ disabled: disabled,
216
+ "aria-label": (null == inputName ? void 0 : inputName.trim()) ? inputName.trim() : hasLabel ? void 0 : (null == name ? void 0 : name.trim()) || "Select an option",
217
+ "aria-invalid": error || void 0,
218
+ "aria-describedby": message ? messageId : void 0,
219
+ onFocus: event => {
220
+ var _a;
221
+ setIsFocused(!0), null === (_a = inputAttributes.onFocus) || void 0 === _a || _a.call(inputAttributes, event);
222
+ },
223
+ onBlur: event => {
224
+ var _a;
225
+ setIsFocused(!1), null === (_a = inputAttributes.onBlur) || void 0 === _a || _a.call(inputAttributes, event);
226
+ },
227
+ onChange: event => {
228
+ var _a;
229
+ if (disabled) return;
230
+ const selectedIndex = null === (_a = event.currentTarget.selectedOptions[0]) || void 0 === _a ? void 0 : _a.getAttribute("data-index");
231
+ if (null == selectedIndex) return;
232
+ const nextIndex = Number(selectedIndex), next = options[nextIndex];
233
+ next && !next.disabled && nextIndex !== index && (controlled || setLocalSelection({
234
+ value: next.value
235
+ }), null == onChange || onChange(next.value, next, nextIndex), null == onChangeOption || onChangeOption(next));
236
+ },
237
+ children: [ index < 0 && jsxRuntime.jsx("option", {
238
+ value: "",
239
+ hidden: !0,
240
+ disabled: !0
241
+ }), options.map((item, i) => {
242
+ const element = null == optionElements ? void 0 : optionElements[i], key = formValue(item, i, valueKey), attributes = {
243
+ value: formValue(item, i, valueKey),
244
+ "data-index": i,
245
+ disabled: item.disabled
246
+ };
247
+ return element ? React.cloneElement(element, Object.assign(Object.assign({}, attributes), {
248
+ key: key
249
+ })) : jsxRuntime.jsx("option", Object.assign({}, attributes, {
250
+ children: optionLabel(item)
251
+ }), key);
252
+ }) ]
253
+ })) ]
254
+ })), message && jsxRuntime.jsx("span", {
255
+ id: messageId,
256
+ className: `${css.message} ${type_module.typeCss["body-xs-regular"]}`,
257
+ style: {
258
+ color: error ? textColorError : "var(--core-text-tertiary)"
259
+ },
260
+ children: message
261
+ }) ]
262
+ });
263
+ }
264
+
265
+ DropDownComponent.displayName = "DropDown";
266
+
267
+ const DropDown = React.memo(DropDownComponent);
268
+
269
+ exports.DropDown = DropDown;