@apple-pie/slice 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/README.md +174 -4
  2. package/dist/cjs/chunks/{AudioBubble-DisHuKIC.js → AudioBubble-k7qS53g6.js} +3 -5
  3. package/dist/cjs/chunks/Avatar-hP8GuwvD.js +82 -0
  4. package/dist/cjs/chunks/{AvatarGroup-DYN73N5x.js → AvatarGroup-DMy34q7_.js} +1 -3
  5. package/dist/cjs/chunks/Badge-D2TbyfJS.js +22 -0
  6. package/dist/cjs/chunks/{Button-B1qbfQgN.js → Button-CTsHZBEB.js} +1 -3
  7. package/dist/cjs/chunks/{ButtonBar-zpC3sClM.js → ButtonBar-BRb1PTmw.js} +1 -3
  8. package/dist/cjs/chunks/{Camera-CCzynmXT.js → Camera-CKv087kr.js} +3 -5
  9. package/dist/cjs/chunks/CheckBox-VRIL1FHh.js +51 -0
  10. package/dist/cjs/chunks/Chip-Dr3vKvRY.js +77 -0
  11. package/dist/cjs/chunks/{DivInput-932r3bvF.js → DivInput-Ci0gaCWL.js} +1 -3
  12. package/dist/cjs/chunks/{Dot-fKIwhjYA.js → Dot-C0MvSJOl.js} +1 -3
  13. package/dist/cjs/chunks/{DrggablePanel-u8C-Y4dA.js → DrggablePanel-DflouLUs.js} +3 -5
  14. package/dist/cjs/chunks/DropDown-BS1H62yj.js +104 -0
  15. package/dist/cjs/chunks/ErrorSummary-B3tof7ir.js +85 -0
  16. package/dist/cjs/chunks/{FileIcon-Dxn9OL10.js → FileIcon-Te8MaqTs.js} +2 -2
  17. package/dist/cjs/chunks/FileList-CDcfKIV6.js +222 -0
  18. package/dist/cjs/chunks/{FlexDiv-D4aSJC_G.js → FlexDiv-wO8IY0Zf.js} +2 -3
  19. package/dist/cjs/chunks/Grouper-DyGkzdvz.js +61 -0
  20. package/dist/cjs/chunks/{Icon-BFiN8Wzm.js → Icon-BFZ_5Qv3.js} +4 -7
  21. package/dist/cjs/chunks/IconButton-CgsuJIuF.js +82 -0
  22. package/dist/cjs/chunks/{IndexedDB-BaVmQgkK.js → IndexedDB-Dgwal8na.js} +1 -1
  23. package/dist/cjs/chunks/Label-BuyhcJbF.js +102 -0
  24. package/dist/cjs/chunks/Modal-ByRyv3wy.js +101 -0
  25. package/dist/cjs/chunks/ModalController-xjflFsjF.js +68 -0
  26. package/dist/cjs/chunks/Overlay-FooE9M_s.js +41 -0
  27. package/dist/cjs/chunks/Pager-B-cuwffo.js +36 -0
  28. package/dist/cjs/chunks/ProgressIndicator-ByZ_aYAZ.js +138 -0
  29. package/dist/cjs/chunks/{PromptInput-C8-V67sS.js → PromptInput--grtHPvy.js} +2 -4
  30. package/dist/cjs/chunks/RadioButton-DP2X1dA_.js +55 -0
  31. package/dist/cjs/chunks/{RadioButtonList-DvJV6Qdg.js → RadioButtonList-COGNW5y3.js} +1 -2
  32. package/dist/cjs/chunks/{Slider-D8OYGFsN.js → Slider-G1a8UKef.js} +2 -6
  33. package/dist/cjs/chunks/{Spacer-CyZAUR5N.js → Spacer-CsRCleXv.js} +1 -1
  34. package/dist/cjs/chunks/{Switch-Crm-nHYI.js → Switch-OBVHKn_D.js} +1 -2
  35. package/dist/cjs/chunks/{TabBar-VzxuAesC.js → TabBar-C1HkBaxE.js} +2 -4
  36. package/dist/cjs/chunks/TextArea-BEmNI_HZ.js +74 -0
  37. package/dist/cjs/chunks/{TextField-BpoLF6pZ.js → TextField-D9_COA9H.js} +3 -5
  38. package/dist/cjs/chunks/Tip-2W0u_oQN.js +88 -0
  39. package/dist/cjs/chunks/Toast-B9jX6ioq.js +177 -0
  40. package/dist/cjs/chunks/ToggleButton-C_Gu5dYR.js +39 -0
  41. package/dist/cjs/chunks/UploadArea-ENFAf4tE.js +127 -0
  42. package/dist/cjs/chunks/{WSConnection-DrOC8Z0R.js → WSConnection-CZ22tcLz.js} +1 -1
  43. package/dist/cjs/chunks/{localDBStore-zyDhaEiP.js → localDBStore-Ca73jeFf.js} +1 -1
  44. package/dist/cjs/chunks/{microphoneStore-D1fV_8QQ.js → microphoneStore-lxYIvhN8.js} +1 -1
  45. package/dist/cjs/chunks/{misc-CTl4GDxI.js → misc-DZAbObFp.js} +16 -19
  46. package/dist/cjs/chunks/modalStore-D4bOjuWd.js +70 -0
  47. package/dist/cjs/chunks/{sseStore-1OeJ9TRP.js → sseStore-Bq7sVvyA.js} +2 -2
  48. package/dist/cjs/chunks/{uploads-worker-mD8pcsGP.js → uploads-worker-CD-annza.js} +2 -2
  49. package/dist/cjs/chunks/{uploadsStore-CxWIctvI.js → uploadsStore-CUeB10zx.js} +2 -2
  50. package/dist/cjs/chunks/{volumeStore-oYwlRVN0.js → volumeStore-roYTyKJ2.js} +3 -3
  51. package/dist/cjs/chunks/{windowStore-CCxCOUqa.js → windowStore-BdJv-RF0.js} +1 -1
  52. package/dist/cjs/components/AudioBubble/index.js +7 -7
  53. package/dist/cjs/components/Avatar/index.js +3 -4
  54. package/dist/cjs/components/AvatarGroup/index.js +4 -4
  55. package/dist/cjs/components/Badge/index.js +3 -3
  56. package/dist/cjs/components/Button/index.js +7 -8
  57. package/dist/cjs/components/ButtonBar/index.js +7 -7
  58. package/dist/cjs/components/Camera/index.js +8 -8
  59. package/dist/cjs/components/CheckBox/index.js +7 -7
  60. package/dist/cjs/components/Chip/index.js +7 -8
  61. package/dist/cjs/components/DivInput/index.js +3 -4
  62. package/dist/cjs/components/Dot/index.js +3 -3
  63. package/dist/cjs/components/DraggablePanel/index.js +6 -6
  64. package/dist/cjs/components/DropDown/index.js +7 -7
  65. package/dist/cjs/components/ErrorSummary/index.js +6 -7
  66. package/dist/cjs/components/FileIcon/index.js +6 -7
  67. package/dist/cjs/components/FileList/index.js +7 -7
  68. package/dist/cjs/components/FlexDiv/index.js +3 -4
  69. package/dist/cjs/components/Grouper/index.js +7 -8
  70. package/dist/cjs/components/Icon/index.js +6 -7
  71. package/dist/cjs/components/IconButton/index.js +6 -7
  72. package/dist/cjs/components/Label/index.js +3 -4
  73. package/dist/cjs/components/Modal/index.js +13 -0
  74. package/dist/cjs/components/ModalController/index.js +7 -0
  75. package/dist/cjs/components/Overlay/index.js +3 -3
  76. package/dist/cjs/components/Pager/index.js +3 -4
  77. package/dist/cjs/components/Progress/index.js +5 -6
  78. package/dist/cjs/components/PromptInput/index.js +9 -10
  79. package/dist/cjs/components/RadioButton/index.js +7 -7
  80. package/dist/cjs/components/RadioButtonList/index.js +8 -8
  81. package/dist/cjs/components/Slider/index.js +4 -5
  82. package/dist/cjs/components/Spacer/index.js +2 -2
  83. package/dist/cjs/components/Switch/index.js +3 -3
  84. package/dist/cjs/components/TabBar/index.js +9 -9
  85. package/dist/cjs/components/TextArea/index.js +8 -8
  86. package/dist/cjs/components/Textfield/index.js +9 -9
  87. package/dist/cjs/components/Tip/index.js +3 -4
  88. package/dist/cjs/components/Toast/index.js +6 -6
  89. package/dist/cjs/components/ToggleButton/index.js +8 -8
  90. package/dist/cjs/components/UploadArea/index.js +7 -7
  91. package/dist/cjs/hooks/useAudioRecorder.js +4 -5
  92. package/dist/cjs/hooks/useLocalStore.js +3 -9
  93. package/dist/cjs/hooks/useMdStreamBuffer.js +2 -2
  94. package/dist/cjs/hooks/useMicrophone.js +7 -11
  95. package/dist/cjs/hooks/useObserveTheme.js +3 -3
  96. package/dist/cjs/hooks/useTheme.js +2 -3
  97. package/dist/cjs/hooks/useTrackRenders.js +2 -2
  98. package/dist/cjs/hooks.js +3 -3
  99. package/dist/cjs/index.js +9 -7
  100. package/dist/cjs/providers/ThemeProvider.js +1 -13
  101. package/dist/cjs/providers.js +4 -5
  102. package/dist/cjs/stores/LocalDB.js +3 -3
  103. package/dist/cjs/stores/SSE.js +2 -2
  104. package/dist/cjs/stores/WS.js +2 -2
  105. package/dist/cjs/stores/microphone.js +2 -2
  106. package/dist/cjs/stores/modal.js +7 -0
  107. package/dist/cjs/stores/tip.js +1 -1
  108. package/dist/cjs/stores/toast.js +1 -1
  109. package/dist/cjs/stores/uploads.js +2 -2
  110. package/dist/cjs/stores/volume.js +2 -2
  111. package/dist/cjs/stores/window.js +2 -2
  112. package/dist/cjs/stores.js +18 -15
  113. package/dist/cjs/theme/colors.js +1 -1
  114. package/dist/cjs/theme/type.js +1 -1
  115. package/dist/cjs/utils/index.js +2 -2
  116. package/dist/cjs/utils/objects/index.js +2 -2
  117. package/dist/cjs/workers/uploads/uploads.js +2 -2
  118. package/dist/esm/chunks/{AudioBubble-D052QyPH.mjs → AudioBubble-DfrxyTX_.mjs} +3 -7
  119. package/dist/esm/chunks/Avatar-pA41Pcyl.mjs +88 -0
  120. package/dist/esm/chunks/{AvatarGroup-CBGi99eo.mjs → AvatarGroup-CZBtWjnj.mjs} +2 -6
  121. package/dist/esm/chunks/Badge-pLwG0zm7.mjs +26 -0
  122. package/dist/esm/chunks/{Button-CYFpitCp.mjs → Button-BJoMLZIs.mjs} +6 -10
  123. package/dist/esm/chunks/{ButtonBar-ieMA0SHi.mjs → ButtonBar-BO2RUJ8R.mjs} +3 -7
  124. package/dist/esm/chunks/{Camera-jn9CcaD0.mjs → Camera-4MNA52HG.mjs} +5 -9
  125. package/dist/esm/chunks/CheckBox-7KAsvZld.mjs +61 -0
  126. package/dist/esm/chunks/Chip-BuGvCLLU.mjs +87 -0
  127. package/dist/esm/chunks/{DivInput-BVhcU0y0.mjs → DivInput-D0YzSWjJ.mjs} +2 -6
  128. package/dist/esm/chunks/{Dot-DZE134mJ.mjs → Dot-h26m47Z-.mjs} +1 -5
  129. package/dist/esm/chunks/{DrggablePanel-G5HHlntD.mjs → DrggablePanel-Bh6HLPMX.mjs} +2 -6
  130. package/dist/esm/chunks/DropDown-NgMYjjXn.mjs +112 -0
  131. package/dist/esm/chunks/ErrorSummary-nNm9qymE.mjs +90 -0
  132. package/dist/esm/chunks/{FileIcon-fJV_Cl6v.mjs → FileIcon-BqyV1wut.mjs} +2 -2
  133. package/dist/esm/chunks/FileList-C1tOvoc0.mjs +230 -0
  134. package/dist/esm/chunks/{FlexDiv-DnY1_qk4.mjs → FlexDiv-CkK-DAyg.mjs} +3 -6
  135. package/dist/esm/chunks/Grouper-CyrOkuu2.mjs +73 -0
  136. package/dist/esm/chunks/{Icon-BOJAk-hM.mjs → Icon-DjW0Krm8.mjs} +3 -8
  137. package/dist/esm/chunks/IconButton-DdLhTUl0.mjs +96 -0
  138. package/dist/esm/chunks/{IndexedDB-Dk7a4fPS.mjs → IndexedDB-DVoDikoA.mjs} +1 -1
  139. package/dist/esm/chunks/Label-DhmJ_Sln.mjs +113 -0
  140. package/dist/esm/chunks/Modal-FztrJsQo.mjs +113 -0
  141. package/dist/esm/chunks/ModalController-C1BnM5Dz.mjs +76 -0
  142. package/dist/esm/chunks/Overlay-Dsy55Bxm.mjs +47 -0
  143. package/dist/esm/chunks/Pager-BqSdwL0L.mjs +42 -0
  144. package/dist/esm/chunks/ProgressIndicator-BnqZFATV.mjs +146 -0
  145. package/dist/esm/chunks/{PromptInput-COJnOFZf.mjs → PromptInput-CRkcPXJu.mjs} +3 -7
  146. package/dist/esm/chunks/RadioButton-DXq3yniV.mjs +63 -0
  147. package/dist/esm/chunks/{RadioButtonList-XqlqadYn.mjs → RadioButtonList-BgOskHCP.mjs} +3 -6
  148. package/dist/esm/chunks/{Slider-CU0Zdlpu.mjs → Slider-DPOy9uNI.mjs} +4 -10
  149. package/dist/esm/chunks/{Spacer-C5651N0N.mjs → Spacer-BJd_D0Fn.mjs} +1 -1
  150. package/dist/esm/chunks/{Switch-RfA431T4.mjs → Switch-DHqlyizo.mjs} +1 -4
  151. package/dist/esm/chunks/{TabBar-v8Dp4dr-.mjs → TabBar-RBXExqMK.mjs} +5 -9
  152. package/dist/esm/chunks/TextArea-CIlx_P26.mjs +80 -0
  153. package/dist/esm/chunks/{TextField-j4q0RUzH.mjs → TextField-CX72ybwH.mjs} +5 -9
  154. package/dist/esm/chunks/Tip-COBSyEjm.mjs +96 -0
  155. package/dist/esm/chunks/Toast-BTm3HxDD.mjs +189 -0
  156. package/dist/esm/chunks/ToggleButton-DujsCKF3.mjs +47 -0
  157. package/dist/esm/chunks/UploadArea-D--Nt8Ed.mjs +135 -0
  158. package/dist/esm/chunks/{WSConnection-DV7k84B4.mjs → WSConnection-BMXcuW3f.mjs} +1 -1
  159. package/dist/esm/chunks/{localDBStore-Dnpo5nSv.mjs → localDBStore-36E3160Z.mjs} +2 -2
  160. package/dist/esm/chunks/{microphoneStore-Dr3lxoWX.mjs → microphoneStore-Cexu82zH.mjs} +1 -1
  161. package/dist/esm/chunks/{misc-Bjbro8Xe.mjs → misc-CTGTuM2J.mjs} +16 -19
  162. package/dist/esm/chunks/modalStore-Crg_QmSJ.mjs +68 -0
  163. package/dist/esm/chunks/{sseStore-DjrfpNAS.mjs → sseStore-Dow4NXkZ.mjs} +2 -2
  164. package/dist/esm/chunks/{uploads-worker-7X9EwX9N.mjs → uploads-worker-Dhyp4ot3.mjs} +2 -2
  165. package/dist/esm/chunks/{uploadsStore-B7VECR5Q.mjs → uploadsStore-DT4lFybE.mjs} +1 -1
  166. package/dist/esm/chunks/{volumeStore-GZnCDBMU.mjs → volumeStore-RAxdmQ60.mjs} +3 -3
  167. package/dist/esm/chunks/{windowStore-CAzx2-QV.mjs → windowStore-C4AZexIa.mjs} +1 -1
  168. package/dist/esm/components/AudioBubble/index.mjs +4 -6
  169. package/dist/esm/components/Avatar/index.mjs +3 -5
  170. package/dist/esm/components/AvatarGroup/index.mjs +4 -6
  171. package/dist/esm/components/Badge/index.mjs +2 -4
  172. package/dist/esm/components/Button/index.mjs +8 -10
  173. package/dist/esm/components/ButtonBar/index.mjs +4 -6
  174. package/dist/esm/components/Camera/index.mjs +6 -8
  175. package/dist/esm/components/CheckBox/index.mjs +4 -6
  176. package/dist/esm/components/Chip/index.mjs +5 -7
  177. package/dist/esm/components/DivInput/index.mjs +3 -5
  178. package/dist/esm/components/Dot/index.mjs +2 -4
  179. package/dist/esm/components/DraggablePanel/index.mjs +3 -5
  180. package/dist/esm/components/DropDown/index.mjs +4 -6
  181. package/dist/esm/components/ErrorSummary/index.mjs +3 -5
  182. package/dist/esm/components/FileIcon/index.mjs +3 -5
  183. package/dist/esm/components/FileList/index.mjs +6 -8
  184. package/dist/esm/components/FlexDiv/index.mjs +2 -4
  185. package/dist/esm/components/Grouper/index.mjs +5 -7
  186. package/dist/esm/components/Icon/index.mjs +4 -6
  187. package/dist/esm/components/IconButton/index.mjs +7 -9
  188. package/dist/esm/components/Label/index.mjs +3 -5
  189. package/dist/esm/components/Modal/index.mjs +45 -0
  190. package/dist/esm/components/ModalController/index.mjs +15 -0
  191. package/dist/esm/components/Overlay/index.mjs +2 -4
  192. package/dist/esm/components/Pager/index.mjs +3 -5
  193. package/dist/esm/components/Progress/index.mjs +4 -6
  194. package/dist/esm/components/PromptInput/index.mjs +11 -13
  195. package/dist/esm/components/RadioButton/index.mjs +4 -6
  196. package/dist/esm/components/RadioButtonList/index.mjs +5 -7
  197. package/dist/esm/components/Slider/index.mjs +4 -6
  198. package/dist/esm/components/Spacer/index.mjs +2 -2
  199. package/dist/esm/components/Switch/index.mjs +2 -4
  200. package/dist/esm/components/TabBar/index.mjs +8 -10
  201. package/dist/esm/components/TextArea/index.mjs +9 -11
  202. package/dist/esm/components/Textfield/index.mjs +10 -12
  203. package/dist/esm/components/Tip/index.mjs +3 -5
  204. package/dist/esm/components/Toast/index.mjs +6 -6
  205. package/dist/esm/components/ToggleButton/index.mjs +9 -11
  206. package/dist/esm/components/UploadArea/index.mjs +9 -11
  207. package/dist/esm/hooks/useAudioRecorder.mjs +4 -5
  208. package/dist/esm/hooks/useLocalStore.mjs +3 -9
  209. package/dist/esm/hooks/useMdStreamBuffer.mjs +2 -2
  210. package/dist/esm/hooks/useMicrophone.mjs +7 -11
  211. package/dist/esm/hooks/useObserveTheme.mjs +0 -2
  212. package/dist/esm/hooks/useTheme.mjs +0 -2
  213. package/dist/esm/hooks/useTrackRenders.mjs +2 -2
  214. package/dist/esm/hooks.mjs +2 -4
  215. package/dist/esm/index.mjs +53 -47
  216. package/dist/esm/providers/ThemeProvider.mjs +0 -14
  217. package/dist/esm/providers.mjs +0 -2
  218. package/dist/esm/stores/LocalDB.mjs +3 -3
  219. package/dist/esm/stores/SSE.mjs +3 -3
  220. package/dist/esm/stores/WS.mjs +2 -2
  221. package/dist/esm/stores/microphone.mjs +2 -2
  222. package/dist/esm/stores/modal.mjs +3 -0
  223. package/dist/esm/stores/tip.mjs +1 -1
  224. package/dist/esm/stores/toast.mjs +1 -1
  225. package/dist/esm/stores/uploads.mjs +3 -3
  226. package/dist/esm/stores/volume.mjs +2 -2
  227. package/dist/esm/stores/window.mjs +2 -2
  228. package/dist/esm/stores.mjs +14 -12
  229. package/dist/esm/theme/colors.mjs +1 -1
  230. package/dist/esm/theme/type.mjs +1 -1
  231. package/dist/esm/utils/index.mjs +9 -9
  232. package/dist/esm/utils/objects/index.mjs +6 -6
  233. package/dist/esm/workers/uploads/uploads.mjs +2 -2
  234. package/dist/styles.css +8436 -0
  235. package/dist/types/components/Modal/Modal.d.ts +3 -0
  236. package/dist/types/components/Modal/_types.d.ts +46 -0
  237. package/dist/types/components/Modal/index.d.ts +2 -0
  238. package/dist/types/components/ModalController/ModalController.d.ts +2 -0
  239. package/dist/types/components/ModalController/_types.d.ts +13 -0
  240. package/dist/types/components/ModalController/index.d.ts +2 -0
  241. package/dist/types/components/Overlay/_types.d.ts +4 -0
  242. package/dist/types/components/Progress/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  243. package/dist/types/components/Progress/ProgressIndicator/_types.d.ts +2 -1
  244. package/dist/types/components/Toast/_types.d.ts +2 -0
  245. package/dist/types/index.d.ts +5 -0
  246. package/dist/types/providers/ThemeProvider.d.ts +0 -6
  247. package/dist/types/stores/index.d.ts +1 -0
  248. package/dist/types/stores/modal/_types.d.ts +27 -0
  249. package/dist/types/stores/modal/index.d.ts +2 -0
  250. package/dist/types/stores/modal/modalStore.d.ts +20 -0
  251. package/dist/types/stores/toast/_types.d.ts +3 -1
  252. package/package.json +8 -3
  253. package/dist/cjs/chunks/Avatar-vIquH-Uk.js +0 -84
  254. package/dist/cjs/chunks/Badge-DjPJ_iJX.js +0 -24
  255. package/dist/cjs/chunks/CheckBox-DNctUlTA.js +0 -53
  256. package/dist/cjs/chunks/Chip-BN4qBz6w.js +0 -79
  257. package/dist/cjs/chunks/DropDown-BZbrZOkx.js +0 -105
  258. package/dist/cjs/chunks/ErrorSummary-K_rPxGWK.js +0 -87
  259. package/dist/cjs/chunks/FileList-D5_igVaC.js +0 -225
  260. package/dist/cjs/chunks/Grouper-D6rSl9nK.js +0 -63
  261. package/dist/cjs/chunks/IconButton-Cv-po19M.js +0 -84
  262. package/dist/cjs/chunks/Label-BQ6flU4-.js +0 -103
  263. package/dist/cjs/chunks/Overlay-DDOvMM6L.js +0 -37
  264. package/dist/cjs/chunks/Pager-GH2y7l5h.js +0 -38
  265. package/dist/cjs/chunks/ProgressIndicator-7pLk4Dvn.js +0 -138
  266. package/dist/cjs/chunks/RadioButton-3CzhKBn6.js +0 -56
  267. package/dist/cjs/chunks/TextArea-CBNHvcK3.js +0 -76
  268. package/dist/cjs/chunks/Tip-CUKFhP9K.js +0 -90
  269. package/dist/cjs/chunks/Toast-CKqGjsEk.js +0 -169
  270. package/dist/cjs/chunks/ToggleButton-BdCsChJM.js +0 -40
  271. package/dist/cjs/chunks/UploadArea-M9oc-No2.js +0 -129
  272. package/dist/cjs/chunks/style-inject.es-CMuL-BfJ.js +0 -11
  273. package/dist/esm/chunks/Avatar-Ds6MWC2c.mjs +0 -92
  274. package/dist/esm/chunks/Badge-CC0zSLMf.mjs +0 -30
  275. package/dist/esm/chunks/CheckBox-CoOmnGWD.mjs +0 -65
  276. package/dist/esm/chunks/Chip-ClG6cUX0.mjs +0 -91
  277. package/dist/esm/chunks/DropDown-AuQW_DWv.mjs +0 -115
  278. package/dist/esm/chunks/ErrorSummary-EzCqVifm.mjs +0 -94
  279. package/dist/esm/chunks/FileList-CxHaEEUi.mjs +0 -235
  280. package/dist/esm/chunks/Grouper-CyWZ8tfm.mjs +0 -77
  281. package/dist/esm/chunks/IconButton-Ck0IMn4i.mjs +0 -100
  282. package/dist/esm/chunks/Label-DSfCcKtQ.mjs +0 -116
  283. package/dist/esm/chunks/Overlay-DiSvgIQP.mjs +0 -45
  284. package/dist/esm/chunks/Pager-ByJ2Cr0n.mjs +0 -46
  285. package/dist/esm/chunks/ProgressIndicator-d2JGUDW_.mjs +0 -148
  286. package/dist/esm/chunks/RadioButton-BB73OY2a.mjs +0 -66
  287. package/dist/esm/chunks/TextArea-DGF43RON.mjs +0 -84
  288. package/dist/esm/chunks/Tip-Bj9d-230.mjs +0 -100
  289. package/dist/esm/chunks/Toast-CoioLlEG.mjs +0 -181
  290. package/dist/esm/chunks/ToggleButton-CwTm8Yx0.mjs +0 -51
  291. package/dist/esm/chunks/UploadArea-DAwoJxtr.mjs +0 -139
  292. package/dist/esm/chunks/style-inject.es-D0BjEaN8.mjs +0 -11
  293. /package/dist/cjs/chunks/{MdStreamBuffer-CvLO7CVi.js → MdStreamBuffer-CbG_VeRI.js} +0 -0
  294. /package/dist/cjs/chunks/{SSEConnection-C-1OzEOp.js → SSEConnection-ACoOeeTO.js} +0 -0
  295. /package/dist/cjs/chunks/{_types-Bdqd2vHh.js → _types-k-3V1fz_.js} +0 -0
  296. /package/dist/cjs/chunks/{audioVisualizer-EIfIjWH7.js → audioVisualizer-MOSbvvnZ.js} +0 -0
  297. /package/dist/cjs/chunks/{colors-njquvHkx.js → colors-B0_3srZN.js} +0 -0
  298. /package/dist/cjs/chunks/{debounce-BF4i6uIC.js → debounce-CaoYvh12.js} +0 -0
  299. /package/dist/cjs/chunks/{sharedTypes-gCECyn2N.js → sharedTypes-CthHPjrO.js} +0 -0
  300. /package/dist/cjs/chunks/{tipStore-Ck4NLvml.js → tipStore-CPB7RHKY.js} +0 -0
  301. /package/dist/cjs/chunks/{toastStore-CSStgB9d.js → toastStore-6eHe6esp.js} +0 -0
  302. /package/dist/cjs/chunks/{tslib.es6-C8dZW5nY.js → tslib.es6-CzpRaW14.js} +0 -0
  303. /package/dist/esm/chunks/{MdStreamBuffer-By7pHJQL.mjs → MdStreamBuffer-4AJH8WaN.mjs} +0 -0
  304. /package/dist/esm/chunks/{SSEConnection-DcA3wFsO.mjs → SSEConnection-qNnkZUOe.mjs} +0 -0
  305. /package/dist/esm/chunks/{_types-BVrr_Khp.mjs → _types-CEStVWlB.mjs} +0 -0
  306. /package/dist/esm/chunks/{audioVisualizer-ZgT77nUw.mjs → audioVisualizer-BUNbarKP.mjs} +0 -0
  307. /package/dist/esm/chunks/{colors-FQ0uNQcW.mjs → colors-D-qeA9gU.mjs} +0 -0
  308. /package/dist/esm/chunks/{debounce-Bst1jxMS.mjs → debounce-D5b6tZ5a.mjs} +0 -0
  309. /package/dist/esm/chunks/{sharedTypes-tn9-uJvb.mjs → sharedTypes-U5H1I85x.mjs} +0 -0
  310. /package/dist/esm/chunks/{tipStore-CL5a95Bl.mjs → tipStore-pvswaezx.mjs} +0 -0
  311. /package/dist/esm/chunks/{toastStore-D2PEIqCo.mjs → toastStore-80oOTYsj.mjs} +0 -0
  312. /package/dist/esm/chunks/{tslib.es6-C-olHjXV.mjs → tslib.es6-BX2F90pK.mjs} +0 -0
package/README.md CHANGED
@@ -27,6 +27,7 @@ npm install zustand
27
27
  ## Quick Start
28
28
 
29
29
  ```tsx
30
+ import '@apple-pie/slice/styles.css';
30
31
  import { Avatar, Button, ThemeProvider, useTheme } from '@apple-pie/slice';
31
32
 
32
33
  function ThemeToggle() {
@@ -50,7 +51,56 @@ export default function App() {
50
51
  }
51
52
  ```
52
53
 
53
- `ThemeProvider` is the default theme bootstrap for the library. It sets the active `data-slice-theme` value on the document root, renders a `data-slice-theme-scope` wrapper, and pulls in the packaged theme CSS token files used by components and Storybook. When `global` is enabled, it also applies the active theme's `core-surface-primary` color to the root document element and `document.body` backgrounds. In Safari, this also drives the browser header color.
54
+ Slice styles are loaded from `@apple-pie/slice/styles.css`.
55
+
56
+ Slice uses Funnel Sans as its default typeface. Load the font in your app so the theme typography renders correctly.
57
+
58
+ ```css
59
+ @import url("https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap");
60
+ ```
61
+
62
+ `ThemeProvider` is the default theme bootstrap for the library. It sets the active `data-slice-theme` value on the document root and renders a `data-slice-theme-scope` wrapper. When `global` is enabled, it also applies the active theme's `core-surface-primary` color to the root document element and `document.body` backgrounds. In Safari, this also drives the browser header color.
63
+
64
+ ## Modal System
65
+
66
+ Slice includes a presentational `Modal`, a `ModalController` for global rendering and overlay management, and an optional Zustand `ModalStore` for imperative `show`, `hide`, and promise-based modal flows.
67
+
68
+ ```tsx
69
+ import { Button, FlexDiv, Modal, ModalController } from '@apple-pie/slice';
70
+ import { useModalActions } from '@apple-pie/slice/stores/modal';
71
+ import { useRef } from 'react';
72
+
73
+ export function ConfirmExample() {
74
+ const actions = useModalActions();
75
+ const boundsRef = useRef<HTMLDivElement>(null);
76
+
77
+ const openModal = async () => {
78
+ try {
79
+ const result = await actions.modalResponse<'yes' | 'no'>({
80
+ component: Modal,
81
+ props: {
82
+ title: 'Continue?',
83
+ children: 'Are you sure you want to continue?',
84
+ actions: [
85
+ { id: 'no', label: 'No', value: 'no' },
86
+ { id: 'yes', label: 'Yes', value: 'yes', primary: true },
87
+ ],
88
+ },
89
+ });
90
+ console.log(result);
91
+ } catch (error) {
92
+ console.error(error);
93
+ }
94
+ };
95
+
96
+ return (
97
+ <FlexDiv ref={boundsRef} height={320} justify="center" align="center">
98
+ <Button onClick={openModal}>Open Modal</Button>
99
+ <ModalController dragConstraintsRef={boundsRef} />
100
+ </FlexDiv>
101
+ );
102
+ }
103
+ ```
54
104
 
55
105
  ## Package Surface
56
106
 
@@ -85,7 +135,9 @@ Example subpath imports:
85
135
  ```ts
86
136
  import { Avatar } from '@apple-pie/slice/components/Avatar';
87
137
  import { useTheme } from '@apple-pie/slice/hooks/useTheme';
138
+ import { ModalController } from '@apple-pie/slice/components/ModalController';
88
139
  import { ThemeProvider } from '@apple-pie/slice/providers/ThemeProvider';
140
+ import { useModalActions } from '@apple-pie/slice/stores/modal';
89
141
  import { useUploadsActions } from '@apple-pie/slice/stores/uploads';
90
142
  import { lightTheme } from '@apple-pie/slice/theme/themes';
91
143
  import { IndexedDB } from '@apple-pie/slice/utils/objects';
@@ -93,13 +145,131 @@ import { IndexedDB } from '@apple-pie/slice/utils/objects';
93
145
 
94
146
  ## What’s Included
95
147
 
96
- - 30+ React components covering inputs, navigation, overlays, feedback, media, layout, upload, and utility UI
148
+ - 35+ exported React UI components covering input, feedback, modal, overlay, media, layout, and upload flows
97
149
  - Theme tokens and presets for colors, corners, elevations, motion, typography, and full light/dark themes
98
- - React hooks for theme state, resize observation, keyboard shortcuts, local storage, double-click, tooltips, and window helpers
99
- - Optional Zustand stores for `LocalDB`, `SSE`, `WS`, `tip`, `toast`, `uploads`, and `window`
150
+ - Exported React hooks for theme state, resize observation, keyboard shortcuts, local storage, audio, microphone, tooltips, and window helpers
151
+ - Optional Zustand stores for `LocalDB`, `modal`, `microphone`, `SSE`, `WS`, `tip`, `toast`, `uploads`, `volume`, and `window`
100
152
  - Worker-backed uploads via `@apple-pie/slice/workers/uploads`
101
153
  - Utility functions plus low-level `IndexedDB`, `SSEConnection`, and `WSConnection` helpers
102
154
 
155
+ ## Exported Components
156
+
157
+ Top-level component exports currently include:
158
+
159
+ - `AudioBubble`
160
+ - `Avatar`
161
+ - `AvatarGroup`
162
+ - `Badge`
163
+ - `Button`
164
+ - `ButtonBar`
165
+ - `Camera`
166
+ - `CheckBox`
167
+ - `Chip`
168
+ - `DivInput`
169
+ - `DoneCheck`
170
+ - `Dot`
171
+ - `DraggablePanel`
172
+ - `DropDown`
173
+ - `ErrorSummary`
174
+ - `FileIcon`
175
+ - `FlexDiv`
176
+ - `Grouper`
177
+ - `Icon`
178
+ - `IconButton`
179
+ - `Label`
180
+ - `Modal`
181
+ - `ModalController`
182
+ - `Overlay`
183
+ - `Pager`
184
+ - `ProgressIndicator`
185
+ - `PromptInput`
186
+ - `RadioButton`
187
+ - `RadioButtonList`
188
+ - `Slider`
189
+ - `Spacer`
190
+ - `Switch`
191
+ - `TabBar`
192
+ - `TextArea`
193
+ - `TextField`
194
+ - `Tip`
195
+ - `Toast`
196
+ - `ToggleButton`
197
+ - `UploadArea`
198
+
199
+ Supporting exports also include:
200
+
201
+ - `ThemeProvider`
202
+ - `ToastType`
203
+ - `FileIconNames`
204
+ - `SliceIcons`
205
+ - `LabelBackground`
206
+
207
+ ## Exported Hooks
208
+
209
+ Top-level hook exports currently include:
210
+
211
+ - `useAudioRecorder`
212
+ - `useDoubleClick`
213
+ - `useKeyboardShortcuts`
214
+ - `useLastUpdated`
215
+ - `useLocalStore`
216
+ - `useMDStreamBuffer`
217
+ - `useMicrophone`
218
+ - `useObserveResize`
219
+ - `useObserveTheme`
220
+ - `useTheme`
221
+ - `useToolTip`
222
+ - `useWindow`
223
+
224
+ Type exports alongside hooks include:
225
+
226
+ - `KeyboardShortcut`
227
+ - `KeyboardShortcuts`
228
+ - `MicOption`
229
+ - `UseMicrophoneReturn`
230
+ - `WindowGeolocation`
231
+ - `WindowGeolocationError`
232
+ - `BreakPoints`
233
+
234
+ ## Exported Stores
235
+
236
+ Store subpaths currently include:
237
+
238
+ - `@apple-pie/slice/stores/LocalDB`
239
+ - `@apple-pie/slice/stores/modal`
240
+ - `@apple-pie/slice/stores/microphone`
241
+ - `@apple-pie/slice/stores/SSE`
242
+ - `@apple-pie/slice/stores/WS`
243
+ - `@apple-pie/slice/stores/tip`
244
+ - `@apple-pie/slice/stores/toast`
245
+ - `@apple-pie/slice/stores/uploads`
246
+ - `@apple-pie/slice/stores/volume`
247
+ - `@apple-pie/slice/stores/window`
248
+
249
+ The shared stores barrel is also available at:
250
+
251
+ - `@apple-pie/slice/stores`
252
+
253
+ ## Theme Exports
254
+
255
+ Theme exports currently include:
256
+
257
+ - `light`
258
+ - `dark`
259
+ - `lightTheme`
260
+ - `darkTheme`
261
+ - `motion`
262
+ - `elevations`
263
+ - `Elevation`
264
+
265
+ Type exports alongside theme values include:
266
+
267
+ - `SliceTheme`
268
+ - `Colors`
269
+ - `Corners`
270
+ - `Type`
271
+ - `Elevations`
272
+
103
273
  ## Upload Worker Example
104
274
 
105
275
  ```tsx
@@ -1,17 +1,15 @@
1
1
  'use client';
2
2
  "use strict";
3
3
 
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
5
5
 
6
6
  require("../theme/colors.js");
7
7
 
8
- var colors = require("./colors-njquvHkx.js"), audioVisualizer = require("./audioVisualizer-EIfIjWH7.js");
8
+ var colors = require("./colors-B0_3srZN.js"), audioVisualizer = require("./audioVisualizer-MOSbvvnZ.js");
9
9
 
10
10
  require("../hooks/useWindow.js");
11
11
 
12
- var styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
13
-
14
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AudioBubble-module_wrapper__f2yKg {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\toverflow: visible;\n\tz-index: var(--elevation-status);\n}\n\n.AudioBubble-module_bubble__bpPT3 {\n\tmin-height: var(--ab-size);\n\tmin-width: var(--ab-size);\n\theight: var(--ab-size);\n\twidth: var(--ab-size);\n\tborder-radius: 100%;\n\tbackground: var(--ab-bg-color);\n\tbox-shadow: var(--ab-box-shadow);\n\ttransition: transform 40ms linear 0s;\n}\n");
12
+ var css_wrapper = "AudioBubble-module_wrapper__f2yKg flexBox-module_row__z24tF", css_bubble = "AudioBubble-module_bubble__bpPT3 flexBox-module_row__z24tF";
15
13
 
16
14
  const AudioBubble = React.memo(props => {
17
15
  const {current: current} = hooks_useTheme.useTheme(), color = current.colors["core-text-primary"], {audioStream: audioStream, playing: playing = !1, size: size = 64, backgroundColor: backgroundColor = "var(--core-text-primary)", glow: glow = !0, glowColor: glowColor = colors.addOpacity(color, .1), glowSize: glowSize = 48, glowOffset: glowOffset = 18, minScale: minScale = 1, maxScale: maxScale = 3, intensity: intensity = 2.2, peakIntensity: peakIntensity = .5, risePerSeconds: risePerSeconds = 4, ReleasePerSeconds: ReleasePerSeconds = 1.5} = props, divAttributes = tslib_es6.__rest(props, [ "audioStream", "playing", "size", "backgroundColor", "glow", "glowColor", "glowSize", "glowOffset", "minScale", "maxScale", "intensity", "peakIntensity", "risePerSeconds", "ReleasePerSeconds" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", visualizerRef = React.useRef(null), [scale, setScale] = React.useState(minScale), visualizerSettings = React.useMemo(() => ({
@@ -0,0 +1,82 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), css_wrapper = "Avatar-module_wrapper__ab1D7 flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_user = "Avatar-module_user__ZQv0Q flexBox-module_row__z24tF type-module_body-m-regular__LuQBA";
5
+
6
+ const Avatar = React.memo(props => {
7
+ var _a;
8
+ const {email: email, name: name, image: image = "", textColor: textColor, borderWidth: borderWidth, borderSize: borderSize = 0, color: color, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderSize: outerBorderSize, outerBorderColor: outerBorderColor, backgroundColor: backgroundColor, bgColor: bgColor, onClick: onClick, onKeyDown: onKeyDown, fontSize: fontSize, onToolTip: onToolTip = () => null, size: size = 34, frame: frame = 34, tabIndex: tabIndex = 0} = props, divAttributes = tslib_es6.__rest(props, [ "email", "name", "image", "textColor", "borderWidth", "borderSize", "color", "borderColor", "borderColorHover", "outerBorderSize", "outerBorderColor", "backgroundColor", "bgColor", "onClick", "onKeyDown", "fontSize", "onToolTip", "size", "frame", "tabIndex" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", ref = React.useRef(null), [textSize, setTextSize] = React.useState("inherit"), resolvedTextColor = null != textColor ? textColor : color, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, initials = React.useMemo(() => {
9
+ if (!name && !email) return "";
10
+ if (name) {
11
+ let last;
12
+ const parts = name.trim().split(" "), first = parts[0];
13
+ return parts.length > 1 && (last = parts.at(-1)), `${first.charAt(0)}${last ? last.charAt(0) : ""}`;
14
+ }
15
+ return email ? email.charAt(0) : void 0;
16
+ }, [ name, email ]), bgImage = React.useMemo(() => image ? `url(${image})` : "", [ image ]);
17
+ React.useEffect(() => {
18
+ var _a;
19
+ if (void 0 !== fontSize) {
20
+ if ("auto" === fontSize || "number" == typeof fontSize && fontSize <= 1) {
21
+ const parentHeight = null === (_a = ref.current) || void 0 === _a ? void 0 : _a.offsetHeight;
22
+ if (!parentHeight) return void setTextSize("inherit");
23
+ let size = .5;
24
+ "number" == typeof fontSize && (size = fontSize);
25
+ const fSize = Math.round(parentHeight * size);
26
+ return void setTextSize(fSize);
27
+ }
28
+ if ("string" == typeof fontSize && fontSize.includes("%")) {
29
+ const normalized = misc.normalizedPercent(fontSize);
30
+ return void setTextSize(normalized);
31
+ }
32
+ setTextSize(fontSize);
33
+ } else setTextSize("inherit");
34
+ }, [ fontSize ]);
35
+ const displayContent = React.useMemo(() => image ? null : initials, [ image, initials ]), onMouseEnter = React.useCallback(event => {
36
+ var _a;
37
+ const payload = {
38
+ label: null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : ""
39
+ };
40
+ onToolTip({
41
+ payload: payload,
42
+ event: event
43
+ });
44
+ }, [ name, email, onToolTip ]), onMouseLeave = React.useCallback(() => {
45
+ onToolTip(null);
46
+ }, [ onToolTip ]), handleKeyDown = React.useCallback(event => {
47
+ null == onKeyDown || onKeyDown(event), onClick && !event.defaultPrevented && misc.accessibleKeyDown(event, () => onClick(event));
48
+ }, [ onClick, onKeyDown ]), avatarVars = React.useMemo(() => ({
49
+ "--avatar-size": misc.setStyle(size),
50
+ "--avatar-frame": misc.setStyle(frame),
51
+ "--avatar-border": `${resolvedBorderWidth}px`,
52
+ "--avatar-color": null != resolvedTextColor ? resolvedTextColor : "var(--core-text-primary)",
53
+ "--avatar-bg-color": null != resolvedBackgroundColor ? resolvedBackgroundColor : "var(--core-surface-secondary)",
54
+ "--avatar-border-color": null != borderColor ? borderColor : "var(--core-outline-primary)",
55
+ "--avatar-border-color-hover": null != borderColorHover ? borderColorHover : "var(--core-outline-special)",
56
+ "--avatar-bg-image": `${bgImage}`,
57
+ "--avatar-font-size": misc.setStyle(textSize),
58
+ "--avatar-outer-border-size": misc.setStyle(outerBorderSize),
59
+ "--avatar-outer-border-color": null != outerBorderColor ? outerBorderColor : "var(--core-surface-primary)"
60
+ }), [ size, frame, resolvedBorderWidth, resolvedTextColor, resolvedBackgroundColor, borderColor, borderColorHover, bgImage, textSize, outerBorderSize, outerBorderColor ]), classNames = React.useMemo(() => `${css_wrapper}${divClass}`, [ divClass ]);
61
+ return jsxRuntime.jsx("div", Object.assign({
62
+ id: divId,
63
+ className: classNames,
64
+ style: Object.assign(Object.assign({}, divStyle), avatarVars),
65
+ onMouseEnter: onMouseEnter,
66
+ onMouseLeave: onMouseLeave,
67
+ onClick: onClick,
68
+ onKeyDown: handleKeyDown,
69
+ role: onClick ? "button" : "img",
70
+ tabIndex: onClick ? tabIndex : void 0,
71
+ "aria-label": `User Avatar - ${null !== (_a = null != name ? name : email) && void 0 !== _a ? _a : "Unknown User"}`
72
+ }, rest, {
73
+ children: jsxRuntime.jsx("div", {
74
+ ref: ref,
75
+ "aria-hidden": !0,
76
+ className: css_user,
77
+ children: displayContent
78
+ })
79
+ }));
80
+ });
81
+
82
+ exports.Avatar = Avatar;
@@ -1,9 +1,7 @@
1
1
  'use client';
2
2
  "use strict";
3
3
 
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Avatar = require("./Avatar-vIquH-Uk.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "AvatarGroup-module_wrapper__MtOyq flexBox-module_rowStart__4tcxS", css_avatar = "AvatarGroup-module_avatar__5NVpW";
5
-
6
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.AvatarGroup-module_wrapper__MtOyq {\n\tgap: var(--ag-gap);\n\tmargin: var(--ag-margin);\n}\n\n.AvatarGroup-module_avatar__5NVpW {\n\tdisplay: inline-block;\n\tmargin-left: var(--ag-overlap);\n\tborder-radius: 100%;\n\t&:first-child {\n\t\tmargin-left: 0;\n\t}\n}\n");
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), Avatar = require("./Avatar-hP8GuwvD.js"), css_wrapper = "AvatarGroup-module_wrapper__MtOyq flexBox-module_rowStart__4tcxS", css_avatar = "AvatarGroup-module_avatar__5NVpW";
7
5
 
8
6
  const AvatarGroup = React.memo(props => {
9
7
  const {avatars: avatars = [], size: size = 32, borderWidth: borderWidth, borderSize: borderSize = 3, overlap: overlap = 8, gap: gap = 0, borderColor: borderColor, borderColorHover: borderColorHover, outerBorderSize: outerBorderSize = 3, outerBorderColor: outerBorderColor = "var(--core-surface-primary)", margin: margin = 0, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "avatars", "size", "borderWidth", "borderSize", "overlap", "gap", "borderColor", "borderColorHover", "outerBorderSize", "outerBorderColor", "margin", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, cssVars = React.useMemo(() => ({
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), css_badge = "Badge-module_badge__RsuMz flexBox-module_row__z24tF type-module_body-xs-medium__s3KvF";
5
+
6
+ const Badge = React.memo(props => {
7
+ const {count: count, variant: variant = "dark", hideNull: hideNull = !0} = props, divAttributes = tslib_es6.__rest(props, [ "count", "variant", "hideNull" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", displayCount = React.useMemo(() => void 0 === count ? "0" : "string" == typeof count ? count : count > 99 ? "99+" : count.toString(), [ count ]), cssVars = React.useMemo(() => ({
8
+ "--badge-color": "light" === variant ? "var(--core-text-primary)" : "var(--core-text-light)",
9
+ "--badge-bg": "light" === variant ? "var(--core-badge-secondary)" : "var(--core-badge-primary)"
10
+ }), [ variant ]);
11
+ return void 0 === count || "" === count || hideNull && 0 === count ? null : jsxRuntime.jsx("div", Object.assign({
12
+ id: divId,
13
+ className: `${css_badge}${divClass}`,
14
+ style: Object.assign(Object.assign({}, divStyle), cssVars),
15
+ role: "status",
16
+ "aria-live": "polite"
17
+ }, rest, {
18
+ children: displayCount
19
+ }));
20
+ });
21
+
22
+ exports.Badge = Badge;
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  "use strict";
3
3
 
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-DjPJ_iJX.js"), Dot = require("./Dot-fKIwhjYA.js"), Icon = require("./Icon-BFiN8Wzm.js"), ProgressIndicator = require("./ProgressIndicator-7pLk4Dvn.js"), sharedTypes = require("./sharedTypes-gCECyn2N.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css = {
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), Badge = require("./Badge-D2TbyfJS.js"), Dot = require("./Dot-C0MvSJOl.js"), Icon = require("./Icon-BFZ_5Qv3.js"), ProgressIndicator = require("./ProgressIndicator-ByZ_aYAZ.js"), sharedTypes = require("./sharedTypes-CthHPjrO.js"), css = {
5
5
  button: "Button-module_button__2ZuB7 flexBox-module_row__z24tF",
6
6
  label: "Button-module_label__UJ3Zt",
7
7
  count: "Button-module_count__DFxVB flexBox-module_row__z24tF",
@@ -12,8 +12,6 @@ var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/
12
12
  s: "Button-module_s__dSKOL type-module_body-s-regular__vRHSP"
13
13
  };
14
14
 
15
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Button-module_button__2ZuB7 {\n\tposition: relative;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\tbackground-image: none;\n\toutline: none;\n}\n\n.Button-module_label__UJ3Zt {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\twhite-space: nowrap;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n\t&:hover {\n\t\ttext-decoration: var(--ui-button-decoration);\n\t}\n}\n\n.Button-module_count__DFxVB {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(10px) translateY(-2px);\n}\n\n.Button-module_icon__-43u5 {\n\tmin-width: var(--ui-button-icon-size);\n\tmin-height: var(--ui-button-icon-size);\n\theight: var(--ui-button-icon-size);\n\twidth: var(--ui-button-icon-size);\n}\n\n.Button-module_xs__cF6m0 {\n}\n\n.Button-module_m__DR-gs {\n}\n\n.Button-module_l__0E0yI {\n}\n\n.Button-module_s__dSKOL {\n}\n");
16
-
17
15
  const ButtonComponent = React.forwardRef((props, buttonRef) => {
18
16
  const {children: children, size: size = "medium", variant: variant = "outline", label: label, labelSize: labelSize = "m", iconRight: iconRight, iconLeft: iconLeft, iconFill: iconFill = !1, count: count = (void 0 === props.count ? void 0 : Number(props.count)), showDot: showDot, tooltip: tooltip, round: round = !1, state: state = "normal", fill: fill = !1, iconSize: iconSize = (void 0 === props.iconSize ? 20 : Number(props.iconSize)), width: width = "min-content", underline: underline = !1, borderRadius: borderRadius, iconColor: iconColor, backgroundColor: backgroundColor, backgroundColorDisabled: backgroundColorDisabled, bgColor: bgColor, bgColorDisabled: bgColorDisabled, labelColor: labelColor, transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, paddingRight: paddingRight, paddingLeft: paddingLeft, progress: progress = !1, working: working = !1, duration: duration, trigger: trigger = !1, destructive: destructive = !1, onClick: onClick = () => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "children", "size", "variant", "label", "labelSize", "iconRight", "iconLeft", "iconFill", "count", "showDot", "tooltip", "round", "state", "fill", "iconSize", "width", "underline", "borderRadius", "iconColor", "backgroundColor", "backgroundColorDisabled", "bgColor", "bgColorDisabled", "labelColor", "transition", "variants", "initial", "animate", "exit", "paddingRight", "paddingLeft", "progress", "working", "duration", "trigger", "destructive", "onClick", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorDisabled = null != backgroundColorDisabled ? backgroundColorDisabled : bgColorDisabled, [btnState, setBtnState] = React.useState(state), [lockedWidth, setLockedWidth] = React.useState(void 0), [playing, setPlaying] = React.useState(working), ref = React.useRef(null), lockCurrentWidth = React.useCallback(() => {
19
17
  ref.current && setLockedWidth(ref.current.offsetWidth);
@@ -1,9 +1,7 @@
1
1
  'use client';
2
2
  "use strict";
3
3
 
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-CTl4GDxI.js"), Icon = require("./Icon-BFiN8Wzm.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "ButtonBar-module_wrapper__FYZ3s flexBox-module_rowStart__4tcxS", css_button = "ButtonBar-module_button__bMR3h flexBox-module_row__z24tF", css_selected = "ButtonBar-module_selected__wKvmi";
5
-
6
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.ButtonBar-module_wrapper__FYZ3s {\n\tborder-radius: var(--bb-border-radius);\n\tborder: var(--bb-border-size) solid var(--bb-border-color);\n\toverflow: hidden;\n}\n\n.ButtonBar-module_label__UcAS1 {\n\tcolor: var(--bb-label-color);\n\tpadding-right: 4px;\n}\n\n.ButtonBar-module_button__bMR3h {\n\theight: var(--bb-button-size);\n\twidth: var(--bb-button-size);\n\tmin-height: var(--bb-button-size);\n\tmin-width: var(--bb-button-size);\n\tcursor: pointer;\n\tbackground: var(--bb-bg-color);\n\tborder: 0;\n\tborder-right: var(--bb-border-size) solid var(--bb-border-color);\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tappearance: none;\n\t-webkit-appearance: none;\n\t&:first-child {\n\t\tpadding-left: 4px;\n\t}\n\t&:last-child {\n\t\tborder-right: none;\n\t\tpadding-right: 4px;\n\t}\n\t&:hover {\n\t\tbackground: var(--bb-bg-color-hover);\n\t}\n}\n\n.ButtonBar-module_selected__wKvmi {\n\tbackground: var(--bb-bg-color-active);\n\tcolor: var(--core-link-primary);\n}\n");
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "ButtonBar-module_wrapper__FYZ3s flexBox-module_rowStart__4tcxS", css_button = "ButtonBar-module_button__bMR3h flexBox-module_row__z24tF", css_selected = "ButtonBar-module_selected__wKvmi";
7
5
 
8
6
  const ButtonBar = React.memo(function(props) {
9
7
  const {buttons: buttons = [], selected: selected, toggle: toggle = !0, buttonSize: buttonSize = "m", frameSize: frameSize = 36, iconSize: iconSize = 20, borderWidth: borderWidth, borderSize: borderSize = 0, borderRadius: borderRadius = 100, borderColor: borderColor = "var(--core-outline-primary)", backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, backgroundColorActive: backgroundColorActive, bgColor: bgColor = "var(--core-surface-secondary)", bgColorHover: bgColorHover = "var(--core-outline-primary)", bgColorActive: bgColorActive = "var(--core-outline-primary)", labelColor: labelColor = "var(--core-text-primary)", onClick: onClick = button => null, onChange: onChange = button => null, onToolTip: onToolTip = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "buttons", "selected", "toggle", "buttonSize", "frameSize", "iconSize", "borderWidth", "borderSize", "borderRadius", "borderColor", "backgroundColor", "backgroundColorHover", "backgroundColorActive", "bgColor", "bgColorHover", "bgColorActive", "labelColor", "onClick", "onChange", "onToolTip" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, resolvedBackgroundColorActive = null != backgroundColorActive ? backgroundColorActive : bgColorActive, [hovered, setHovered] = React.useState(-1), [selectedIndex, setSelectedIndex] = React.useState(selected);
@@ -1,17 +1,15 @@
1
1
  'use client';
2
2
  "use strict";
3
3
 
4
- var tslib_es6 = require("./tslib.es6-C8dZW5nY.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), hooks_useTheme = require("../hooks/useTheme.js");
5
5
 
6
6
  require("../theme/colors.js");
7
7
 
8
- var misc = require("./misc-CTl4GDxI.js"), colors = require("./colors-njquvHkx.js");
8
+ var misc = require("./misc-DZAbObFp.js"), colors = require("./colors-B0_3srZN.js");
9
9
 
10
10
  require("../hooks/useWindow.js");
11
11
 
12
- var Avatar = require("./Avatar-vIquH-Uk.js"), Icon = require("./Icon-BFiN8Wzm.js"), styleInject_es = require("./style-inject.es-CMuL-BfJ.js"), css_wrapper = "Camera-module_wrapper__GOsKp flexBox-module_column__ezvMq", css_video = "Camera-module_video__Q2r9B", css_controls = "Camera-module_controls__qXYoL flexBox-module_rowBetween__5FEvi", css_controlsRight = "Camera-module_controlsRight__VcIz7 flexBox-module_rowEnd__rVdVm", css_controlsCenter = "Camera-module_controlsCenter__e-erq flexBox-module_row__z24tF", css_controlsLeft = "Camera-module_controlsLeft__bR4TN flexBox-module_rowStart__4tcxS", css_error = "Camera-module_error__t0w-d flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_poster = "Camera-module_poster__Gun-v flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_snapshotFrame = "Camera-module_snapshotFrame__YM6Eu flexBox-module_row__z24tF", css_clear = "Camera-module_clear__aaCfT", css_snapshot = "Camera-module_snapshot__odQH0", css_toolbarButton = "Camera-module_toolbarButton__mnmoF flexBox-module_columnStartCenter__PKcrG", css_buttonIcon = "Camera-module_buttonIcon__a-VBR flexBox-module_row__z24tF", css_buttonLabel = "Camera-module_buttonLabel__6BEs1 flexBox-module_row__z24tF type-module_body-xs-regular__ZAFft";
13
-
14
- styleInject_es.styleInject(".flexBox-module_row__z24tF {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__5FEvi {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__4tcxS {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__rVdVm {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__ezvMq {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__C7P44 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__PKcrG {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__ERfp7 {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__lLJuc {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__ZAFft {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__s3KvF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__Lhqqq {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__vRHSP {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__tjdFc {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__Iy-VX {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__LuQBA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__uW1on {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__UBcvQ {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__lOYbg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__BqRC7 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__Fh2dt {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-xl-regular__pF2kC {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-medium__BeyrH {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-xl-bold__Ruknj {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xl);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-medium__z8L3G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-bold__0O3g6 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__KXxEB {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__cJeEA {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__eRe05 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Xmwtf {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 30px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-medium__5q1m3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 500;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-xl-bold__k9VFV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 600;\n\tfont-size: 36px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Camera-module_wrapper__GOsKp {\n\tposition: relative;\n\twidth: 100%;\n\theight: 100%;\n\tbackground-color: var(--core-surface-secondary);\n\toverflow: hidden;\n\tborder-radius: 4px;\n}\n\n.Camera-module_video__Q2r9B {\n\twidth: 100%;\n\theight: 100%;\n\tobject-fit: cover;\n}\n\n.Camera-module_controls__qXYoL {\n\tposition: absolute;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\tpadding: 16px !important;\n\tgap: 16px;\n\tbackground-color: var(--camera-controls-bg);\n\ttransform: var(--camera-controls-transform);\n\ttransition: transform var(--motion-water-duration) var(--motion-water) 0s;\n}\n\n.Camera-module_controlsRight__VcIz7 {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsCenter__e-erq {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_controlsLeft__bR4TN {\n\tgap: 12px;\n\tflex: 1;\n}\n\n.Camera-module_error__t0w-d {\n\tposition: absolute;\n\ttop: 50%;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n\tcolor: var(--feedback-warning);\n}\n\n.Camera-module_poster__Gun-v {\n\tposition: absolute;\n\taspect-ratio: 1 / 1;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\tcolor: var(--core-text-primary);\n}\n\n.Camera-module_snapshotFrame__YM6Eu {\n\tposition: absolute;\n\tmax-width: 25%;\n\theight: min-content;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 1;\n}\n\n.Camera-module_clear__aaCfT {\n\tposition: absolute;\n\ttop: 16px;\n\tright: 16px;\n\tz-index: 3;\n}\n\n.Camera-module_snapshot__odQH0 {\n\twidth: 100%;\n\tborder: 1px solid var(--core-outline-special);\n\tz-index: 2;\n}\n\n.Camera-module_toolbarButton__mnmoF {\n\tgap: 4px;\n\tcursor: pointer;\n\tuser-select: none;\n\t-webkit-user-select: none;\n}\n\n.Camera-module_buttonIcon__a-VBR {\n\tmin-height: var(--toolbar-button-size);\n\tmax-height: var(--toolbar-button-size);\n\tmin-width: var(--toolbar-button-size);\n\tmax-width: var(--toolbar-button-size);\n\tbackground: var(--toolbar-button-bg-color);\n\tborder: 1px solid transparent;\n\tborder-radius: 100%;\n\topacity: var(--toolbar-button-opacity);\n\ttransition: background, border var(--motion-water-duration)\n\t\tvar(--motion-water) 0s;\n}\n\n.Camera-module_buttonIcon__a-VBR:hover {\n\tborder: 1px solid var(--core-outline-special);\n}\n\n.Camera-module_buttonLabel__6BEs1 {\n\tcolor: var(--toolbar-button-label-color);\n}\n");
12
+ var Avatar = require("./Avatar-hP8GuwvD.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "Camera-module_wrapper__GOsKp flexBox-module_column__ezvMq", css_video = "Camera-module_video__Q2r9B", css_controls = "Camera-module_controls__qXYoL flexBox-module_rowBetween__5FEvi", css_controlsRight = "Camera-module_controlsRight__VcIz7 flexBox-module_rowEnd__rVdVm", css_controlsCenter = "Camera-module_controlsCenter__e-erq flexBox-module_row__z24tF", css_controlsLeft = "Camera-module_controlsLeft__bR4TN flexBox-module_rowStart__4tcxS", css_error = "Camera-module_error__t0w-d flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_poster = "Camera-module_poster__Gun-v flexBox-module_row__z24tF type-module_body-m-regular__LuQBA", css_snapshotFrame = "Camera-module_snapshotFrame__YM6Eu flexBox-module_row__z24tF", css_clear = "Camera-module_clear__aaCfT", css_snapshot = "Camera-module_snapshot__odQH0", css_toolbarButton = "Camera-module_toolbarButton__mnmoF flexBox-module_columnStartCenter__PKcrG", css_buttonIcon = "Camera-module_buttonIcon__a-VBR flexBox-module_row__z24tF", css_buttonLabel = "Camera-module_buttonLabel__6BEs1 flexBox-module_row__z24tF type-module_body-xs-regular__ZAFft";
15
13
 
16
14
  const Camera = React.memo(React.forwardRef((props, ref) => {
17
15
  const videoElement = React.useRef(null), containerElement = React.useRef(null), controlsTimer = React.useRef(null), {noVideoPoster: noVideoPoster, width: width, height: height, showControlBar: showControlBar = !0, autoHideControlBar: autoHideControlBar = !0, startCameraOff: startCameraOff = !1, startAudioMuted: startAudioMuted = !1, playLocalAudio: playLocalAudio = !1, pipSnapshot: pipSnapshot = !0, userProfile: userProfile, sessionSettings: sessionSettings, onChangeProfile: onChangeProfile, onChangeSettings: onChangeSettings, onSnapshot: onSnapshot, onVideoStream: onVideoStream, onNoVideo: onNoVideo, onNoAudio: onNoAudio} = props, theme = hooks_useTheme.useTheme(), [cameraSupport, setCameraSupport] = React.useState(void 0), [cameraError, setCameraError] = React.useState(void 0), [hovered, setHovered] = React.useState(!1), [cameraOn, setCameraOn] = React.useState(!1), [micMuted, setMicMuted] = React.useState(startAudioMuted), [snapshot, setSnapshot] = React.useState(void 0), [settings, setSettings] = React.useState(!1), [profile, setProfile] = React.useState(!1), [deviceList, setDeviceList] = React.useState([]), constraints = React.useMemo(() => {
@@ -0,0 +1,51 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), react = require("motion/react"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), css_wrapper = "CheckBox-module_wrapper__uRsjI flexBox-module_row__z24tF", css_icon = "CheckBox-module_icon__FoDJN flexBox-module_row__z24tF", css_label = "CheckBox-module_label__0AiBp type-module_body-m-regular__LuQBA";
5
+
6
+ const CheckBox = React.memo(props => {
7
+ const {size: size = 20, checked: checked = !1, disabled: disabled = !1, color: color, children: children, onChange: onChange = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "size", "checked", "disabled", "color", "children", "onChange" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [state, setState] = React.useState(checked);
8
+ React.useEffect(() => setState(checked), [ checked ]);
9
+ const iconName = React.useMemo(() => !0 === state ? "checkbox checked" : "mixed" === state ? "checkbox partial" : "checkbox", [ state ]), iconColor = React.useMemo(() => color || (disabled ? "var(--core-icon-disabled)" : "mixed" === state ? "var(--core-icon-primary)" : state ? "var(--core-text-special)" : "var(--core-icon-secondary"), [ color, disabled, state ]), labelColor = React.useMemo(() => color || (disabled ? "var(--core-text-disabled)" : "var(--core-text-primary)"), [ color, disabled ]), cssVars = React.useMemo(() => ({
10
+ "--cb-size": `${size}px`,
11
+ "--cb-label-color": labelColor
12
+ }), [ size, labelColor ]), handleToggle = React.useCallback(() => {
13
+ if (disabled) return;
14
+ let newState = !1;
15
+ switch (state) {
16
+ case !0:
17
+ break;
18
+
19
+ case "mixed":
20
+ case !1:
21
+ newState = !0;
22
+ }
23
+ setState(newState), onChange(newState);
24
+ }, [ state, disabled, onChange ]);
25
+ return jsxRuntime.jsxs(react.motion.div, Object.assign({
26
+ id: divId,
27
+ className: `${css_wrapper}${divClass}`,
28
+ style: Object.assign(Object.assign({}, divStyle), cssVars),
29
+ onClick: handleToggle,
30
+ onKeyDown: e => misc.accessibleKeyDown(e, handleToggle),
31
+ tabIndex: disabled ? -1 : 0,
32
+ role: "checkbox",
33
+ "aria-checked": state,
34
+ "aria-disabled": disabled,
35
+ "aria-label": String(children)
36
+ }, rest, {
37
+ children: [ jsxRuntime.jsx("div", {
38
+ className: css_icon,
39
+ children: jsxRuntime.jsx(Icon.Icon, {
40
+ name: iconName,
41
+ strokeColor: iconColor,
42
+ size: size
43
+ })
44
+ }), children && jsxRuntime.jsx("span", {
45
+ className: css_label,
46
+ children: children
47
+ }) ]
48
+ }));
49
+ });
50
+
51
+ exports.CheckBox = CheckBox;
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ "use strict";
3
+
4
+ var tslib_es6 = require("./tslib.es6-CzpRaW14.js"), jsxRuntime = require("react/jsx-runtime"), React = require("react"), misc = require("./misc-DZAbObFp.js"), Icon = require("./Icon-BFZ_5Qv3.js"), sharedTypes = require("./sharedTypes-CthHPjrO.js"), css = {
5
+ chip: "Chip-module_chip__0nys- flexBox-module_row__z24tF",
6
+ icon: "Chip-module_icon__dtR-K flexBox-module_row__z24tF",
7
+ xs: "Chip-module_xs__s-KNG type-module_body-xs-regular__ZAFft",
8
+ s: "Chip-module_s__2KTXi type-module_body-s-regular__vRHSP",
9
+ m: "Chip-module_m__l2u3N type-module_body-m-regular__LuQBA",
10
+ l: "Chip-module_l__3MqPN type-module_body-l-regular__lOYbg"
11
+ };
12
+
13
+ const Chip = React.memo(props => {
14
+ const {children: children, label: label, icon: icon, tooltip: tooltip, iconSize: iconSize = 20, disabled: disabled = !1, focused: focused = !1, iconPosition: iconPosition = "left", labelSize: labelSize = "m", labelColor: labelColor = "var(--core-text-primary)", labelColorHover: labelColorHover = "var(--core-text-special)", iconColor: iconColor = "var(--core-text-primary)", iconColorHover: iconColorHover = "var(--core-text-special)", backgroundColor: backgroundColor, backgroundColorHover: backgroundColorHover, borderWidth: borderWidth, borderSize: borderSize = 1, borderColor: borderColor = "var(--core-text-primary)", borderColorHover: borderColorHover = "var(--core-text-special)", borderColorDisabled: borderColorDisabled = "var(--core-text-disabled)", bgColor: bgColor = "transparent", bgColorHover: bgColorHover = "var(--core-surface-secondary)", borderRadius: borderRadius = 8, paddingTop: paddingTop, paddingTops: paddingTops = 8, paddingSides: paddingSides = 16, gap: gap = 4, onToolTip: onToolTip = () => null, onClick: onClick = () => null} = props, divAttributes = tslib_es6.__rest(props, [ "children", "label", "icon", "tooltip", "iconSize", "disabled", "focused", "iconPosition", "labelSize", "labelColor", "labelColorHover", "iconColor", "iconColorHover", "backgroundColor", "backgroundColorHover", "borderWidth", "borderSize", "borderColor", "borderColorHover", "borderColorDisabled", "bgColor", "bgColorHover", "borderRadius", "paddingTop", "paddingTops", "paddingSides", "gap", "onToolTip", "onClick" ]), {id: divId, className: className, style: style} = divAttributes, rest = tslib_es6.__rest(divAttributes, [ "id", "className", "style" ]), divStyle = null != style ? style : {}, divClass = className ? ` ${className}` : "", [isHovered, setIsHovered] = React.useState(!1), resolvedBackgroundColor = null != backgroundColor ? backgroundColor : bgColor, resolvedBackgroundColorHover = null != backgroundColorHover ? backgroundColorHover : bgColorHover, resolvedBorderWidth = null != borderWidth ? borderWidth : borderSize, resolvedPaddingTop = null != paddingTop ? paddingTop : paddingTops, handleClick = React.useCallback(e => {
15
+ disabled || onClick(e);
16
+ }, [ disabled, onClick ]), handleMouseEnter = React.useCallback((enter, event) => {
17
+ if (enter) {
18
+ if (tooltip) {
19
+ const tip = {
20
+ type: sharedTypes.ToolTipType.button,
21
+ payload: {
22
+ label: tooltip
23
+ },
24
+ ref: null,
25
+ event: event
26
+ };
27
+ onToolTip(tip);
28
+ }
29
+ setIsHovered(!0);
30
+ } else onToolTip(null), setIsHovered(!1);
31
+ }, [ tooltip, onToolTip ]), padding = React.useMemo(() => {
32
+ if (!icon) return `${resolvedPaddingTop}px ${paddingSides}px`;
33
+ return `${resolvedPaddingTop}px ${"right" === iconPosition ? paddingSides - 4 : paddingSides}px ${resolvedPaddingTop}px ${"right" === iconPosition ? paddingSides : paddingSides - 4}px`;
34
+ }, [ icon, iconPosition, resolvedPaddingTop, paddingSides ]), computedIconColor = React.useMemo(() => disabled ? "var(--core-text-disabled)" : isHovered ? null != iconColorHover ? iconColorHover : "var(--core-text-special)" : null != iconColor ? iconColor : "var(--core-text-primary)", [ iconColor, disabled, isHovered, iconColorHover ]), cssVars = React.useMemo(() => ({
35
+ "--ui-chip-padding": padding,
36
+ "--ui-chip-gap": misc.setStyle(gap),
37
+ "--ui-chip-border-radius": misc.setStyle(borderRadius),
38
+ "--ui-chip-border-size": misc.setStyle(resolvedBorderWidth),
39
+ "--ui-chip-border-color": disabled ? borderColorDisabled : borderColor,
40
+ "--ui-chip-border-color-hover": disabled ? borderColorDisabled : borderColorHover,
41
+ "--ui-chip-bg-color": resolvedBackgroundColor,
42
+ "--ui-chip-bg-color-hover": disabled ? resolvedBackgroundColor : resolvedBackgroundColorHover,
43
+ "--ui-chip-label-color": disabled ? "var(--core-text-disabled)" : labelColor,
44
+ "--ui-chip-label-color-hover": disabled ? "var(--core-text-disabled)" : labelColorHover,
45
+ "--ui-chip-cursor": disabled ? "default" : "pointer"
46
+ }), [ padding, resolvedBackgroundColor, borderColor, borderColorDisabled, borderColorHover, resolvedBorderWidth, resolvedBackgroundColorHover, labelColorHover, labelColor, gap, borderRadius, disabled ]);
47
+ return jsxRuntime.jsxs("div", Object.assign({
48
+ id: divId,
49
+ className: `${css.chip}${divClass}`,
50
+ style: Object.assign(Object.assign({}, divStyle), cssVars),
51
+ onKeyDown: e => misc.accessibleKeyDown(e, () => handleClick(e)),
52
+ onClick: handleClick,
53
+ onMouseEnter: e => handleMouseEnter(!0, e),
54
+ onMouseLeave: e => handleMouseEnter(!1, e)
55
+ }, rest, {
56
+ children: [ icon && "right" !== iconPosition && jsxRuntime.jsx("div", {
57
+ className: css.icon,
58
+ children: jsxRuntime.jsx(Icon.Icon, {
59
+ name: icon,
60
+ size: iconSize,
61
+ strokeColor: computedIconColor
62
+ })
63
+ }), jsxRuntime.jsx("div", {
64
+ className: css[labelSize],
65
+ children: null != children ? children : label
66
+ }), icon && "right" === iconPosition && jsxRuntime.jsx("div", {
67
+ className: css.icon,
68
+ children: jsxRuntime.jsx(Icon.Icon, {
69
+ name: icon,
70
+ size: iconSize,
71
+ strokeColor: computedIconColor
72
+ })
73
+ }) ]
74
+ }));
75
+ });
76
+
77
+ exports.Chip = Chip;