@mieweb/ui 0.1.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 (459) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +696 -0
  3. package/dist/brands/bluehive.cjs +18 -0
  4. package/dist/brands/bluehive.cjs.map +1 -0
  5. package/dist/brands/bluehive.css +136 -0
  6. package/dist/brands/bluehive.d.cts +16 -0
  7. package/dist/brands/bluehive.d.ts +16 -0
  8. package/dist/brands/bluehive.js +3 -0
  9. package/dist/brands/bluehive.js.map +1 -0
  10. package/dist/brands/enterprise-health.css +260 -0
  11. package/dist/brands/index.cjs +55 -0
  12. package/dist/brands/index.cjs.map +1 -0
  13. package/dist/brands/index.d.cts +100 -0
  14. package/dist/brands/index.d.ts +100 -0
  15. package/dist/brands/index.js +10 -0
  16. package/dist/brands/index.js.map +1 -0
  17. package/dist/brands/mieweb.css +138 -0
  18. package/dist/brands/types.cjs +20 -0
  19. package/dist/brands/types.cjs.map +1 -0
  20. package/dist/brands/types.d.cts +188 -0
  21. package/dist/brands/types.d.ts +188 -0
  22. package/dist/brands/types.js +3 -0
  23. package/dist/brands/types.js.map +1 -0
  24. package/dist/brands/waggleline.css +164 -0
  25. package/dist/brands/webchart.css +138 -0
  26. package/dist/chunk-265CFCCX.js +173 -0
  27. package/dist/chunk-265CFCCX.js.map +1 -0
  28. package/dist/chunk-2J2V4TMJ.cjs +139 -0
  29. package/dist/chunk-2J2V4TMJ.cjs.map +1 -0
  30. package/dist/chunk-2O7D6F67.cjs +63 -0
  31. package/dist/chunk-2O7D6F67.cjs.map +1 -0
  32. package/dist/chunk-3NJ72QU6.js +55 -0
  33. package/dist/chunk-3NJ72QU6.js.map +1 -0
  34. package/dist/chunk-4AWW5WPF.js +161 -0
  35. package/dist/chunk-4AWW5WPF.js.map +1 -0
  36. package/dist/chunk-4LNS5QDP.cjs +84 -0
  37. package/dist/chunk-4LNS5QDP.cjs.map +1 -0
  38. package/dist/chunk-4LTN2LEN.js +79 -0
  39. package/dist/chunk-4LTN2LEN.js.map +1 -0
  40. package/dist/chunk-4MHTSFPX.js +205 -0
  41. package/dist/chunk-4MHTSFPX.js.map +1 -0
  42. package/dist/chunk-4YRAEFYW.js +233 -0
  43. package/dist/chunk-4YRAEFYW.js.map +1 -0
  44. package/dist/chunk-53K3KWXQ.cjs +753 -0
  45. package/dist/chunk-53K3KWXQ.cjs.map +1 -0
  46. package/dist/chunk-6DP6RKUA.cjs +15 -0
  47. package/dist/chunk-6DP6RKUA.cjs.map +1 -0
  48. package/dist/chunk-6HFFWEM3.cjs +22 -0
  49. package/dist/chunk-6HFFWEM3.cjs.map +1 -0
  50. package/dist/chunk-6OCIIIAI.js +128 -0
  51. package/dist/chunk-6OCIIIAI.js.map +1 -0
  52. package/dist/chunk-6Q4SU72T.js +300 -0
  53. package/dist/chunk-6Q4SU72T.js.map +1 -0
  54. package/dist/chunk-AU5ADTYD.cjs +326 -0
  55. package/dist/chunk-AU5ADTYD.cjs.map +1 -0
  56. package/dist/chunk-AWIULTJW.js +190 -0
  57. package/dist/chunk-AWIULTJW.js.map +1 -0
  58. package/dist/chunk-B26RIQ5R.js +97 -0
  59. package/dist/chunk-B26RIQ5R.js.map +1 -0
  60. package/dist/chunk-B3L43JGH.js +98 -0
  61. package/dist/chunk-B3L43JGH.js.map +1 -0
  62. package/dist/chunk-B7DA35BY.cjs +496 -0
  63. package/dist/chunk-B7DA35BY.cjs.map +1 -0
  64. package/dist/chunk-B7YGVKTE.cjs +184 -0
  65. package/dist/chunk-B7YGVKTE.cjs.map +1 -0
  66. package/dist/chunk-BR2XGATJ.cjs +40 -0
  67. package/dist/chunk-BR2XGATJ.cjs.map +1 -0
  68. package/dist/chunk-BTJHYGPI.cjs +27 -0
  69. package/dist/chunk-BTJHYGPI.cjs.map +1 -0
  70. package/dist/chunk-BXK5TNJE.cjs +329 -0
  71. package/dist/chunk-BXK5TNJE.cjs.map +1 -0
  72. package/dist/chunk-C6MDPPPL.js +82 -0
  73. package/dist/chunk-C6MDPPPL.js.map +1 -0
  74. package/dist/chunk-CEHWXAAI.js +22 -0
  75. package/dist/chunk-CEHWXAAI.js.map +1 -0
  76. package/dist/chunk-CLNOI5J7.js +38 -0
  77. package/dist/chunk-CLNOI5J7.js.map +1 -0
  78. package/dist/chunk-CP7NPDQW.js +99 -0
  79. package/dist/chunk-CP7NPDQW.js.map +1 -0
  80. package/dist/chunk-CQCYXHCU.cjs +256 -0
  81. package/dist/chunk-CQCYXHCU.cjs.map +1 -0
  82. package/dist/chunk-D5IBXXF2.js +243 -0
  83. package/dist/chunk-D5IBXXF2.js.map +1 -0
  84. package/dist/chunk-DMA74PZ7.js +240 -0
  85. package/dist/chunk-DMA74PZ7.js.map +1 -0
  86. package/dist/chunk-EF46XW4Z.cjs +270 -0
  87. package/dist/chunk-EF46XW4Z.cjs.map +1 -0
  88. package/dist/chunk-EKIQE524.cjs +78 -0
  89. package/dist/chunk-EKIQE524.cjs.map +1 -0
  90. package/dist/chunk-F3SOEIN2.js +11 -0
  91. package/dist/chunk-F3SOEIN2.js.map +1 -0
  92. package/dist/chunk-FFJVCQ5R.cjs +128 -0
  93. package/dist/chunk-FFJVCQ5R.cjs.map +1 -0
  94. package/dist/chunk-FHY3K6PL.cjs +24 -0
  95. package/dist/chunk-FHY3K6PL.cjs.map +1 -0
  96. package/dist/chunk-FIUNOH6W.js +13 -0
  97. package/dist/chunk-FIUNOH6W.js.map +1 -0
  98. package/dist/chunk-FIXAVBUA.cjs +200 -0
  99. package/dist/chunk-FIXAVBUA.cjs.map +1 -0
  100. package/dist/chunk-FQ5G7J24.js +297 -0
  101. package/dist/chunk-FQ5G7J24.js.map +1 -0
  102. package/dist/chunk-G2DOD34H.js +215 -0
  103. package/dist/chunk-G2DOD34H.js.map +1 -0
  104. package/dist/chunk-GV5JQBPX.js +110 -0
  105. package/dist/chunk-GV5JQBPX.js.map +1 -0
  106. package/dist/chunk-H2CIKJQI.js +32 -0
  107. package/dist/chunk-H2CIKJQI.js.map +1 -0
  108. package/dist/chunk-HB7C7NB5.js +20 -0
  109. package/dist/chunk-HB7C7NB5.js.map +1 -0
  110. package/dist/chunk-HLW3XD5R.cjs +322 -0
  111. package/dist/chunk-HLW3XD5R.cjs.map +1 -0
  112. package/dist/chunk-HRA4FUO6.cjs +425 -0
  113. package/dist/chunk-HRA4FUO6.cjs.map +1 -0
  114. package/dist/chunk-IY7UQPDO.cjs +122 -0
  115. package/dist/chunk-IY7UQPDO.cjs.map +1 -0
  116. package/dist/chunk-JFAXLE2J.js +217 -0
  117. package/dist/chunk-JFAXLE2J.js.map +1 -0
  118. package/dist/chunk-JYMQJ32S.cjs +115 -0
  119. package/dist/chunk-JYMQJ32S.cjs.map +1 -0
  120. package/dist/chunk-KJOFWJHV.js +406 -0
  121. package/dist/chunk-KJOFWJHV.js.map +1 -0
  122. package/dist/chunk-KJZNEVYM.js +61 -0
  123. package/dist/chunk-KJZNEVYM.js.map +1 -0
  124. package/dist/chunk-KMN7JX2X.cjs +67 -0
  125. package/dist/chunk-KMN7JX2X.cjs.map +1 -0
  126. package/dist/chunk-LEE3NMNP.cjs +429 -0
  127. package/dist/chunk-LEE3NMNP.cjs.map +1 -0
  128. package/dist/chunk-LZEY55QZ.cjs +219 -0
  129. package/dist/chunk-LZEY55QZ.cjs.map +1 -0
  130. package/dist/chunk-MKJDBXX4.cjs +171 -0
  131. package/dist/chunk-MKJDBXX4.cjs.map +1 -0
  132. package/dist/chunk-MTZPVOP6.js +99 -0
  133. package/dist/chunk-MTZPVOP6.js.map +1 -0
  134. package/dist/chunk-N3QTYHRZ.cjs +134 -0
  135. package/dist/chunk-N3QTYHRZ.cjs.map +1 -0
  136. package/dist/chunk-N5EKL4DH.js +148 -0
  137. package/dist/chunk-N5EKL4DH.js.map +1 -0
  138. package/dist/chunk-NAATBUHR.cjs +231 -0
  139. package/dist/chunk-NAATBUHR.cjs.map +1 -0
  140. package/dist/chunk-NH2JVQ6V.cjs +272 -0
  141. package/dist/chunk-NH2JVQ6V.cjs.map +1 -0
  142. package/dist/chunk-NIHESA7O.js +114 -0
  143. package/dist/chunk-NIHESA7O.js.map +1 -0
  144. package/dist/chunk-NXRLGHEC.js +98 -0
  145. package/dist/chunk-NXRLGHEC.js.map +1 -0
  146. package/dist/chunk-O5HS7ZND.cjs +81 -0
  147. package/dist/chunk-O5HS7ZND.cjs.map +1 -0
  148. package/dist/chunk-O7WRE2WX.js +195 -0
  149. package/dist/chunk-O7WRE2WX.js.map +1 -0
  150. package/dist/chunk-ONWOB76P.js +319 -0
  151. package/dist/chunk-ONWOB76P.js.map +1 -0
  152. package/dist/chunk-OR5DRJCW.cjs +13 -0
  153. package/dist/chunk-OR5DRJCW.cjs.map +1 -0
  154. package/dist/chunk-ORUPC5TV.cjs +244 -0
  155. package/dist/chunk-ORUPC5TV.cjs.map +1 -0
  156. package/dist/chunk-OT36EMM5.js +22 -0
  157. package/dist/chunk-OT36EMM5.js.map +1 -0
  158. package/dist/chunk-OW2BWGST.js +238 -0
  159. package/dist/chunk-OW2BWGST.js.map +1 -0
  160. package/dist/chunk-OWPWP46L.js +92 -0
  161. package/dist/chunk-OWPWP46L.js.map +1 -0
  162. package/dist/chunk-P52GA3GJ.cjs +101 -0
  163. package/dist/chunk-P52GA3GJ.cjs.map +1 -0
  164. package/dist/chunk-PEFJAWNR.cjs +121 -0
  165. package/dist/chunk-PEFJAWNR.cjs.map +1 -0
  166. package/dist/chunk-PF3XWKE5.cjs +343 -0
  167. package/dist/chunk-PF3XWKE5.cjs.map +1 -0
  168. package/dist/chunk-QBWVTJKF.js +548 -0
  169. package/dist/chunk-QBWVTJKF.js.map +1 -0
  170. package/dist/chunk-QDGZBDBI.cjs +99 -0
  171. package/dist/chunk-QDGZBDBI.cjs.map +1 -0
  172. package/dist/chunk-QL2YTVTR.js +163 -0
  173. package/dist/chunk-QL2YTVTR.js.map +1 -0
  174. package/dist/chunk-QYJ7RQJ2.cjs +239 -0
  175. package/dist/chunk-QYJ7RQJ2.cjs.map +1 -0
  176. package/dist/chunk-QZLRB3UG.js +727 -0
  177. package/dist/chunk-QZLRB3UG.js.map +1 -0
  178. package/dist/chunk-R4DM4635.cjs +109 -0
  179. package/dist/chunk-R4DM4635.cjs.map +1 -0
  180. package/dist/chunk-RCMF6KZA.js +75 -0
  181. package/dist/chunk-RCMF6KZA.js.map +1 -0
  182. package/dist/chunk-RRQGH7C5.cjs +187 -0
  183. package/dist/chunk-RRQGH7C5.cjs.map +1 -0
  184. package/dist/chunk-S6UNPMAS.cjs +84 -0
  185. package/dist/chunk-S6UNPMAS.cjs.map +1 -0
  186. package/dist/chunk-SJ3BF4BO.cjs +199 -0
  187. package/dist/chunk-SJ3BF4BO.cjs.map +1 -0
  188. package/dist/chunk-SN52QMRT.js +58 -0
  189. package/dist/chunk-SN52QMRT.js.map +1 -0
  190. package/dist/chunk-SOFX4T7M.js +124 -0
  191. package/dist/chunk-SOFX4T7M.js.map +1 -0
  192. package/dist/chunk-SWMRCGL4.cjs +24 -0
  193. package/dist/chunk-SWMRCGL4.cjs.map +1 -0
  194. package/dist/chunk-SWV5E75F.cjs +94 -0
  195. package/dist/chunk-SWV5E75F.cjs.map +1 -0
  196. package/dist/chunk-T4ME7QCT.js +22 -0
  197. package/dist/chunk-T4ME7QCT.js.map +1 -0
  198. package/dist/chunk-TA6FVVCM.js +207 -0
  199. package/dist/chunk-TA6FVVCM.js.map +1 -0
  200. package/dist/chunk-UHSPAFY6.js +82 -0
  201. package/dist/chunk-UHSPAFY6.js.map +1 -0
  202. package/dist/chunk-ULOA7WBW.js +82 -0
  203. package/dist/chunk-ULOA7WBW.js.map +1 -0
  204. package/dist/chunk-UZUBLXVC.js +307 -0
  205. package/dist/chunk-UZUBLXVC.js.map +1 -0
  206. package/dist/chunk-VDMQCSXT.cjs +234 -0
  207. package/dist/chunk-VDMQCSXT.cjs.map +1 -0
  208. package/dist/chunk-VV4N4WY6.cjs +121 -0
  209. package/dist/chunk-VV4N4WY6.cjs.map +1 -0
  210. package/dist/chunk-VWXGUNBR.cjs +574 -0
  211. package/dist/chunk-VWXGUNBR.cjs.map +1 -0
  212. package/dist/chunk-WN2FJE23.js +474 -0
  213. package/dist/chunk-WN2FJE23.js.map +1 -0
  214. package/dist/chunk-XHJGYBYG.cjs +262 -0
  215. package/dist/chunk-XHJGYBYG.cjs.map +1 -0
  216. package/dist/chunk-XXOBTAKA.js +390 -0
  217. package/dist/chunk-XXOBTAKA.js.map +1 -0
  218. package/dist/chunk-Z3TFPXVN.cjs +84 -0
  219. package/dist/chunk-Z3TFPXVN.cjs.map +1 -0
  220. package/dist/chunk-ZJCPW6MS.cjs +54 -0
  221. package/dist/chunk-ZJCPW6MS.cjs.map +1 -0
  222. package/dist/chunk-ZO46CFVN.cjs +4 -0
  223. package/dist/chunk-ZO46CFVN.cjs.map +1 -0
  224. package/dist/chunk-ZQ4XMJH7.js +3 -0
  225. package/dist/chunk-ZQ4XMJH7.js.map +1 -0
  226. package/dist/components/Alert/index.cjs +25 -0
  227. package/dist/components/Alert/index.cjs.map +1 -0
  228. package/dist/components/Alert/index.d.cts +39 -0
  229. package/dist/components/Alert/index.d.ts +39 -0
  230. package/dist/components/Alert/index.js +4 -0
  231. package/dist/components/Alert/index.js.map +1 -0
  232. package/dist/components/AudioPlayer/index.cjs +29 -0
  233. package/dist/components/AudioPlayer/index.cjs.map +1 -0
  234. package/dist/components/AudioPlayer/index.d.cts +83 -0
  235. package/dist/components/AudioPlayer/index.d.ts +83 -0
  236. package/dist/components/AudioPlayer/index.js +4 -0
  237. package/dist/components/AudioPlayer/index.js.map +1 -0
  238. package/dist/components/AudioRecorder/index.cjs +29 -0
  239. package/dist/components/AudioRecorder/index.cjs.map +1 -0
  240. package/dist/components/AudioRecorder/index.d.cts +106 -0
  241. package/dist/components/AudioRecorder/index.d.ts +106 -0
  242. package/dist/components/AudioRecorder/index.js +4 -0
  243. package/dist/components/AudioRecorder/index.js.map +1 -0
  244. package/dist/components/Avatar/index.cjs +25 -0
  245. package/dist/components/Avatar/index.cjs.map +1 -0
  246. package/dist/components/Avatar/index.d.cts +62 -0
  247. package/dist/components/Avatar/index.d.ts +62 -0
  248. package/dist/components/Avatar/index.js +4 -0
  249. package/dist/components/Avatar/index.js.map +1 -0
  250. package/dist/components/Badge/index.cjs +17 -0
  251. package/dist/components/Badge/index.cjs.map +1 -0
  252. package/dist/components/Badge/index.d.cts +25 -0
  253. package/dist/components/Badge/index.d.ts +25 -0
  254. package/dist/components/Badge/index.js +4 -0
  255. package/dist/components/Badge/index.js.map +1 -0
  256. package/dist/components/Breadcrumb/index.cjs +17 -0
  257. package/dist/components/Breadcrumb/index.cjs.map +1 -0
  258. package/dist/components/Breadcrumb/index.d.cts +47 -0
  259. package/dist/components/Breadcrumb/index.d.ts +47 -0
  260. package/dist/components/Breadcrumb/index.js +4 -0
  261. package/dist/components/Breadcrumb/index.js.map +1 -0
  262. package/dist/components/Button/index.cjs +17 -0
  263. package/dist/components/Button/index.cjs.map +1 -0
  264. package/dist/components/Button/index.d.cts +32 -0
  265. package/dist/components/Button/index.d.ts +32 -0
  266. package/dist/components/Button/index.js +4 -0
  267. package/dist/components/Button/index.js.map +1 -0
  268. package/dist/components/Card/index.cjs +65 -0
  269. package/dist/components/Card/index.cjs.map +1 -0
  270. package/dist/components/Card/index.d.cts +119 -0
  271. package/dist/components/Card/index.d.ts +119 -0
  272. package/dist/components/Card/index.js +4 -0
  273. package/dist/components/Card/index.js.map +1 -0
  274. package/dist/components/Checkbox/index.cjs +21 -0
  275. package/dist/components/Checkbox/index.cjs.map +1 -0
  276. package/dist/components/Checkbox/index.d.cts +63 -0
  277. package/dist/components/Checkbox/index.d.ts +63 -0
  278. package/dist/components/Checkbox/index.js +4 -0
  279. package/dist/components/Checkbox/index.js.map +1 -0
  280. package/dist/components/DateInput/index.cjs +15 -0
  281. package/dist/components/DateInput/index.cjs.map +1 -0
  282. package/dist/components/DateInput/index.d.cts +55 -0
  283. package/dist/components/DateInput/index.d.ts +55 -0
  284. package/dist/components/DateInput/index.js +6 -0
  285. package/dist/components/DateInput/index.js.map +1 -0
  286. package/dist/components/Dropdown/index.cjs +35 -0
  287. package/dist/components/Dropdown/index.cjs.map +1 -0
  288. package/dist/components/Dropdown/index.d.cts +102 -0
  289. package/dist/components/Dropdown/index.d.ts +102 -0
  290. package/dist/components/Dropdown/index.js +6 -0
  291. package/dist/components/Dropdown/index.js.map +1 -0
  292. package/dist/components/Input/index.cjs +17 -0
  293. package/dist/components/Input/index.cjs.map +1 -0
  294. package/dist/components/Input/index.d.cts +32 -0
  295. package/dist/components/Input/index.d.ts +32 -0
  296. package/dist/components/Input/index.js +4 -0
  297. package/dist/components/Input/index.js.map +1 -0
  298. package/dist/components/Modal/index.cjs +43 -0
  299. package/dist/components/Modal/index.cjs.map +1 -0
  300. package/dist/components/Modal/index.d.cts +82 -0
  301. package/dist/components/Modal/index.d.ts +82 -0
  302. package/dist/components/Modal/index.js +6 -0
  303. package/dist/components/Modal/index.js.map +1 -0
  304. package/dist/components/Pagination/index.cjs +21 -0
  305. package/dist/components/Pagination/index.cjs.map +1 -0
  306. package/dist/components/Pagination/index.d.cts +78 -0
  307. package/dist/components/Pagination/index.d.ts +78 -0
  308. package/dist/components/Pagination/index.js +4 -0
  309. package/dist/components/Pagination/index.js.map +1 -0
  310. package/dist/components/PhoneInput/index.cjs +19 -0
  311. package/dist/components/PhoneInput/index.cjs.map +1 -0
  312. package/dist/components/PhoneInput/index.d.cts +80 -0
  313. package/dist/components/PhoneInput/index.d.ts +80 -0
  314. package/dist/components/PhoneInput/index.js +6 -0
  315. package/dist/components/PhoneInput/index.js.map +1 -0
  316. package/dist/components/Progress/index.cjs +29 -0
  317. package/dist/components/Progress/index.cjs.map +1 -0
  318. package/dist/components/Progress/index.d.cts +76 -0
  319. package/dist/components/Progress/index.d.ts +76 -0
  320. package/dist/components/Progress/index.js +4 -0
  321. package/dist/components/Progress/index.js.map +1 -0
  322. package/dist/components/QuickAction/index.cjs +29 -0
  323. package/dist/components/QuickAction/index.cjs.map +1 -0
  324. package/dist/components/QuickAction/index.d.cts +78 -0
  325. package/dist/components/QuickAction/index.d.ts +78 -0
  326. package/dist/components/QuickAction/index.js +4 -0
  327. package/dist/components/QuickAction/index.js.map +1 -0
  328. package/dist/components/Radio/index.cjs +21 -0
  329. package/dist/components/Radio/index.cjs.map +1 -0
  330. package/dist/components/Radio/index.d.cts +72 -0
  331. package/dist/components/Radio/index.d.ts +72 -0
  332. package/dist/components/Radio/index.js +4 -0
  333. package/dist/components/Radio/index.js.map +1 -0
  334. package/dist/components/RecordButton/index.cjs +25 -0
  335. package/dist/components/RecordButton/index.cjs.map +1 -0
  336. package/dist/components/RecordButton/index.d.cts +83 -0
  337. package/dist/components/RecordButton/index.d.ts +83 -0
  338. package/dist/components/RecordButton/index.js +4 -0
  339. package/dist/components/RecordButton/index.js.map +1 -0
  340. package/dist/components/SchedulePicker/index.cjs +45 -0
  341. package/dist/components/SchedulePicker/index.cjs.map +1 -0
  342. package/dist/components/SchedulePicker/index.d.cts +111 -0
  343. package/dist/components/SchedulePicker/index.d.ts +111 -0
  344. package/dist/components/SchedulePicker/index.js +4 -0
  345. package/dist/components/SchedulePicker/index.js.map +1 -0
  346. package/dist/components/Select/index.cjs +19 -0
  347. package/dist/components/Select/index.cjs.map +1 -0
  348. package/dist/components/Select/index.d.cts +79 -0
  349. package/dist/components/Select/index.d.ts +79 -0
  350. package/dist/components/Select/index.js +6 -0
  351. package/dist/components/Select/index.js.map +1 -0
  352. package/dist/components/Skeleton/index.cjs +29 -0
  353. package/dist/components/Skeleton/index.cjs.map +1 -0
  354. package/dist/components/Skeleton/index.d.cts +96 -0
  355. package/dist/components/Skeleton/index.d.ts +96 -0
  356. package/dist/components/Skeleton/index.js +4 -0
  357. package/dist/components/Skeleton/index.js.map +1 -0
  358. package/dist/components/Spinner/index.cjs +25 -0
  359. package/dist/components/Spinner/index.cjs.map +1 -0
  360. package/dist/components/Spinner/index.d.cts +67 -0
  361. package/dist/components/Spinner/index.d.ts +67 -0
  362. package/dist/components/Spinner/index.js +4 -0
  363. package/dist/components/Spinner/index.js.map +1 -0
  364. package/dist/components/Switch/index.cjs +21 -0
  365. package/dist/components/Switch/index.cjs.map +1 -0
  366. package/dist/components/Switch/index.d.cts +41 -0
  367. package/dist/components/Switch/index.d.ts +41 -0
  368. package/dist/components/Switch/index.js +4 -0
  369. package/dist/components/Switch/index.js.map +1 -0
  370. package/dist/components/Table/index.cjs +41 -0
  371. package/dist/components/Table/index.cjs.map +1 -0
  372. package/dist/components/Table/index.d.cts +54 -0
  373. package/dist/components/Table/index.d.ts +54 -0
  374. package/dist/components/Table/index.js +4 -0
  375. package/dist/components/Table/index.js.map +1 -0
  376. package/dist/components/Tabs/index.cjs +33 -0
  377. package/dist/components/Tabs/index.cjs.map +1 -0
  378. package/dist/components/Tabs/index.d.cts +70 -0
  379. package/dist/components/Tabs/index.d.ts +70 -0
  380. package/dist/components/Tabs/index.js +4 -0
  381. package/dist/components/Tabs/index.js.map +1 -0
  382. package/dist/components/Text/index.cjs +21 -0
  383. package/dist/components/Text/index.cjs.map +1 -0
  384. package/dist/components/Text/index.d.cts +35 -0
  385. package/dist/components/Text/index.d.ts +35 -0
  386. package/dist/components/Text/index.js +4 -0
  387. package/dist/components/Text/index.js.map +1 -0
  388. package/dist/components/Textarea/index.cjs +17 -0
  389. package/dist/components/Textarea/index.cjs.map +1 -0
  390. package/dist/components/Textarea/index.d.cts +42 -0
  391. package/dist/components/Textarea/index.d.ts +42 -0
  392. package/dist/components/Textarea/index.js +4 -0
  393. package/dist/components/Textarea/index.js.map +1 -0
  394. package/dist/components/ThemeProvider/index.cjs +36 -0
  395. package/dist/components/ThemeProvider/index.cjs.map +1 -0
  396. package/dist/components/ThemeProvider/index.d.cts +121 -0
  397. package/dist/components/ThemeProvider/index.d.ts +121 -0
  398. package/dist/components/ThemeProvider/index.js +7 -0
  399. package/dist/components/ThemeProvider/index.js.map +1 -0
  400. package/dist/components/Tooltip/index.cjs +14 -0
  401. package/dist/components/Tooltip/index.cjs.map +1 -0
  402. package/dist/components/Tooltip/index.d.cts +55 -0
  403. package/dist/components/Tooltip/index.d.ts +55 -0
  404. package/dist/components/Tooltip/index.js +5 -0
  405. package/dist/components/Tooltip/index.js.map +1 -0
  406. package/dist/components/VisuallyHidden/index.cjs +12 -0
  407. package/dist/components/VisuallyHidden/index.cjs.map +1 -0
  408. package/dist/components/VisuallyHidden/index.d.cts +20 -0
  409. package/dist/components/VisuallyHidden/index.d.ts +20 -0
  410. package/dist/components/VisuallyHidden/index.js +3 -0
  411. package/dist/components/VisuallyHidden/index.js.map +1 -0
  412. package/dist/default-LIRPABBK.js +3 -0
  413. package/dist/default-LIRPABBK.js.map +1 -0
  414. package/dist/default-ZGHKI5WF.cjs +18 -0
  415. package/dist/default-ZGHKI5WF.cjs.map +1 -0
  416. package/dist/enterprise-health-ORQQOLM3.js +3 -0
  417. package/dist/enterprise-health-ORQQOLM3.js.map +1 -0
  418. package/dist/enterprise-health-UDI25OCV.cjs +18 -0
  419. package/dist/enterprise-health-UDI25OCV.cjs.map +1 -0
  420. package/dist/hooks/index.cjs +69 -0
  421. package/dist/hooks/index.cjs.map +1 -0
  422. package/dist/hooks/index.d.cts +179 -0
  423. package/dist/hooks/index.d.ts +179 -0
  424. package/dist/hooks/index.js +8 -0
  425. package/dist/hooks/index.js.map +1 -0
  426. package/dist/index.cjs +33153 -0
  427. package/dist/index.cjs.map +1 -0
  428. package/dist/index.d.cts +8188 -0
  429. package/dist/index.d.ts +8188 -0
  430. package/dist/index.js +32162 -0
  431. package/dist/index.js.map +1 -0
  432. package/dist/mieweb-PV2YKYO7.js +3 -0
  433. package/dist/mieweb-PV2YKYO7.js.map +1 -0
  434. package/dist/mieweb-UJABK5XX.cjs +18 -0
  435. package/dist/mieweb-UJABK5XX.cjs.map +1 -0
  436. package/dist/styles.css +2 -0
  437. package/dist/tailwind-preset.cjs +22 -0
  438. package/dist/tailwind-preset.cjs.map +1 -0
  439. package/dist/tailwind-preset.d.cts +39 -0
  440. package/dist/tailwind-preset.d.ts +39 -0
  441. package/dist/tailwind-preset.js +3 -0
  442. package/dist/tailwind-preset.js.map +1 -0
  443. package/dist/useTheme-B9SWu6ui.d.cts +24 -0
  444. package/dist/useTheme-B9SWu6ui.d.ts +24 -0
  445. package/dist/utils/index.cjs +63 -0
  446. package/dist/utils/index.cjs.map +1 -0
  447. package/dist/utils/index.d.cts +73 -0
  448. package/dist/utils/index.d.ts +73 -0
  449. package/dist/utils/index.js +6 -0
  450. package/dist/utils/index.js.map +1 -0
  451. package/dist/waggleline-6IGA66HR.cjs +18 -0
  452. package/dist/waggleline-6IGA66HR.cjs.map +1 -0
  453. package/dist/waggleline-BMUYAFJF.js +3 -0
  454. package/dist/waggleline-BMUYAFJF.js.map +1 -0
  455. package/dist/webchart-2SLO5ICI.js +3 -0
  456. package/dist/webchart-2SLO5ICI.js.map +1 -0
  457. package/dist/webchart-EHVGP46N.cjs +18 -0
  458. package/dist/webchart-EHVGP46N.cjs.map +1 -0
  459. package/package.json +212 -0
@@ -0,0 +1,727 @@
1
+ import { cn } from './chunk-F3SOEIN2.js';
2
+ import * as React from 'react';
3
+ import { cva } from 'class-variance-authority';
4
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
+
6
+ var audioRecorderVariants = cva(
7
+ [
8
+ "relative flex flex-col gap-3",
9
+ "rounded-xl border border-border",
10
+ "bg-card text-card-foreground",
11
+ "transition-all duration-200"
12
+ ],
13
+ {
14
+ variants: {
15
+ size: {
16
+ sm: "p-3",
17
+ md: "p-4",
18
+ lg: "p-5"
19
+ },
20
+ variant: {
21
+ default: "",
22
+ minimal: "border-none bg-transparent shadow-none",
23
+ elevated: "shadow-lg border-0"
24
+ }
25
+ },
26
+ defaultVariants: {
27
+ size: "md",
28
+ variant: "default"
29
+ }
30
+ }
31
+ );
32
+ var waveformContainerVariants = cva(
33
+ [
34
+ "relative w-full overflow-hidden rounded-lg",
35
+ "bg-neutral-100 dark:bg-neutral-800",
36
+ "transition-all duration-200"
37
+ ],
38
+ {
39
+ variants: {
40
+ state: {
41
+ idle: "opacity-50",
42
+ listening: "opacity-75",
43
+ recording: "",
44
+ paused: "opacity-90",
45
+ stopped: "",
46
+ playback: ""
47
+ }
48
+ },
49
+ defaultVariants: {
50
+ state: "idle"
51
+ }
52
+ }
53
+ );
54
+ var controlButtonVariants = cva(
55
+ [
56
+ "inline-flex items-center justify-center",
57
+ "rounded-full transition-all duration-200",
58
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
59
+ "disabled:pointer-events-none disabled:opacity-50",
60
+ "active:scale-95"
61
+ ],
62
+ {
63
+ variants: {
64
+ variant: {
65
+ primary: [
66
+ "bg-primary-600 text-white",
67
+ "hover:bg-primary-700",
68
+ "active:bg-primary-800"
69
+ ],
70
+ secondary: [
71
+ "bg-neutral-200 text-neutral-700",
72
+ "hover:bg-neutral-300",
73
+ "dark:bg-neutral-700 dark:text-neutral-200",
74
+ "dark:hover:bg-neutral-600"
75
+ ],
76
+ danger: [
77
+ "bg-red-600 text-white",
78
+ "hover:bg-red-700",
79
+ "active:bg-red-800"
80
+ ],
81
+ ghost: [
82
+ "bg-transparent text-neutral-600",
83
+ "hover:bg-neutral-100",
84
+ "dark:text-neutral-400 dark:hover:bg-neutral-800"
85
+ ]
86
+ },
87
+ size: {
88
+ sm: "h-8 w-8",
89
+ md: "h-10 w-10",
90
+ lg: "h-12 w-12"
91
+ }
92
+ },
93
+ defaultVariants: {
94
+ variant: "primary",
95
+ size: "md"
96
+ }
97
+ }
98
+ );
99
+ function formatTime(seconds) {
100
+ const mins = Math.floor(seconds / 60);
101
+ const secs = Math.floor(seconds % 60);
102
+ return `${mins}:${secs.toString().padStart(2, "0")}`;
103
+ }
104
+ function MicrophoneIcon({ className }) {
105
+ return /* @__PURE__ */ jsx(
106
+ "svg",
107
+ {
108
+ className,
109
+ fill: "none",
110
+ viewBox: "0 0 24 24",
111
+ strokeWidth: 2,
112
+ stroke: "currentColor",
113
+ "aria-hidden": "true",
114
+ children: /* @__PURE__ */ jsx(
115
+ "path",
116
+ {
117
+ strokeLinecap: "round",
118
+ strokeLinejoin: "round",
119
+ d: "M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"
120
+ }
121
+ )
122
+ }
123
+ );
124
+ }
125
+ function StopIcon({ className }) {
126
+ return /* @__PURE__ */ jsx(
127
+ "svg",
128
+ {
129
+ className,
130
+ fill: "currentColor",
131
+ viewBox: "0 0 24 24",
132
+ "aria-hidden": "true",
133
+ children: /* @__PURE__ */ jsx("rect", { x: "6", y: "6", width: "12", height: "12", rx: "2" })
134
+ }
135
+ );
136
+ }
137
+ function PlayIcon({ className }) {
138
+ return /* @__PURE__ */ jsx(
139
+ "svg",
140
+ {
141
+ className,
142
+ fill: "currentColor",
143
+ viewBox: "0 0 24 24",
144
+ "aria-hidden": "true",
145
+ children: /* @__PURE__ */ jsx("path", { d: "M8 5.14v14l11-7-11-7z" })
146
+ }
147
+ );
148
+ }
149
+ function PauseIcon({ className }) {
150
+ return /* @__PURE__ */ jsx(
151
+ "svg",
152
+ {
153
+ className,
154
+ fill: "currentColor",
155
+ viewBox: "0 0 24 24",
156
+ "aria-hidden": "true",
157
+ children: /* @__PURE__ */ jsx("path", { d: "M6 4h4v16H6V4zm8 0h4v16h-4V4z" })
158
+ }
159
+ );
160
+ }
161
+ function TrashIcon({ className }) {
162
+ return /* @__PURE__ */ jsx(
163
+ "svg",
164
+ {
165
+ className,
166
+ fill: "none",
167
+ viewBox: "0 0 24 24",
168
+ strokeWidth: 2,
169
+ stroke: "currentColor",
170
+ "aria-hidden": "true",
171
+ children: /* @__PURE__ */ jsx(
172
+ "path",
173
+ {
174
+ strokeLinecap: "round",
175
+ strokeLinejoin: "round",
176
+ d: "M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
177
+ }
178
+ )
179
+ }
180
+ );
181
+ }
182
+ function RecordingIndicator({
183
+ isRecording,
184
+ isPaused
185
+ }) {
186
+ if (!isRecording && !isPaused) return null;
187
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
188
+ /* @__PURE__ */ jsx(
189
+ "div",
190
+ {
191
+ className: cn(
192
+ "h-3 w-3 rounded-full",
193
+ isRecording && !isPaused ? "animate-pulse bg-red-500" : "bg-yellow-500"
194
+ ),
195
+ "aria-hidden": "true"
196
+ }
197
+ ),
198
+ /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-neutral-600 dark:text-neutral-400", children: isPaused ? "Paused" : "Recording" })
199
+ ] });
200
+ }
201
+ function TimeDisplay({
202
+ currentTime,
203
+ duration,
204
+ maxDuration,
205
+ showMax
206
+ }) {
207
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 font-mono text-sm text-neutral-600 dark:text-neutral-400", children: [
208
+ /* @__PURE__ */ jsx("span", { children: formatTime(currentTime) }),
209
+ /* @__PURE__ */ jsx("span", { children: "/" }),
210
+ /* @__PURE__ */ jsx("span", { children: formatTime(showMax && maxDuration ? maxDuration : duration) })
211
+ ] });
212
+ }
213
+ function LiveVisualizer({
214
+ analyser,
215
+ isActive,
216
+ height,
217
+ barColor
218
+ }) {
219
+ const canvasRef = React.useRef(null);
220
+ const animationRef = React.useRef(void 0);
221
+ React.useEffect(() => {
222
+ if (!analyser || !canvasRef.current || !isActive) return;
223
+ const canvas = canvasRef.current;
224
+ const ctx = canvas.getContext("2d");
225
+ if (!ctx) return;
226
+ const bufferLength = analyser.frequencyBinCount;
227
+ const dataArray = new Uint8Array(bufferLength);
228
+ const draw = () => {
229
+ if (!isActive) return;
230
+ analyser.getByteFrequencyData(dataArray);
231
+ ctx.fillStyle = "transparent";
232
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
233
+ const barWidth = canvas.width / bufferLength * 2.5;
234
+ let x = 0;
235
+ for (let i = 0; i < bufferLength; i++) {
236
+ const barHeight = dataArray[i] / 255 * canvas.height;
237
+ ctx.fillStyle = barColor || getComputedStyle(document.documentElement).getPropertyValue(
238
+ "--color-primary-500"
239
+ ) || "#3b82f6";
240
+ ctx.fillRect(x, canvas.height - barHeight, barWidth, barHeight);
241
+ x += barWidth + 1;
242
+ }
243
+ animationRef.current = requestAnimationFrame(draw);
244
+ };
245
+ draw();
246
+ return () => {
247
+ if (animationRef.current) {
248
+ cancelAnimationFrame(animationRef.current);
249
+ }
250
+ };
251
+ }, [analyser, isActive, barColor]);
252
+ return /* @__PURE__ */ jsx(
253
+ "canvas",
254
+ {
255
+ ref: canvasRef,
256
+ width: 600,
257
+ height,
258
+ className: "w-full",
259
+ style: { height }
260
+ }
261
+ );
262
+ }
263
+ function AudioRecorder({
264
+ state: controlledState,
265
+ onStateChange,
266
+ onRecordingComplete,
267
+ onRecordingStart,
268
+ onError,
269
+ maxDuration = 0,
270
+ mimeType = "audio/webm",
271
+ waveColor,
272
+ progressColor,
273
+ cursorColor,
274
+ waveformHeight = 80,
275
+ showTime = true,
276
+ showWaveform = true,
277
+ size,
278
+ variant,
279
+ className,
280
+ "aria-label": ariaLabel = "Audio recorder",
281
+ audioUrl,
282
+ disabled = false,
283
+ renderControls
284
+ }) {
285
+ const [internalState, setInternalState] = React.useState("idle");
286
+ const state = controlledState ?? internalState;
287
+ const [currentTime, setCurrentTime] = React.useState(0);
288
+ const [duration, setDuration] = React.useState(0);
289
+ const [audioBlob, setAudioBlob] = React.useState(null);
290
+ const [audioObjectUrl, setAudioObjectUrl] = React.useState(
291
+ null
292
+ );
293
+ const [pendingBlob, setPendingBlob] = React.useState(null);
294
+ const waveformRef = React.useRef(null);
295
+ const wavesurferRef = React.useRef(null);
296
+ const mediaRecorderRef = React.useRef(null);
297
+ const audioContextRef = React.useRef(null);
298
+ const analyserRef = React.useRef(null);
299
+ const streamRef = React.useRef(null);
300
+ const chunksRef = React.useRef([]);
301
+ const timerRef = React.useRef(void 0);
302
+ const startTimeRef = React.useRef(0);
303
+ const handleStopRef = React.useRef(() => {
304
+ });
305
+ const updateState = React.useCallback(
306
+ (newState) => {
307
+ if (!controlledState) {
308
+ setInternalState(newState);
309
+ }
310
+ onStateChange?.(newState);
311
+ },
312
+ [controlledState, onStateChange]
313
+ );
314
+ const initWaveSurfer = React.useCallback(async () => {
315
+ if (!waveformRef.current || !showWaveform) return;
316
+ const WaveSurferModule = await import('wavesurfer.js');
317
+ const WaveSurfer = WaveSurferModule.default;
318
+ if (wavesurferRef.current) {
319
+ wavesurferRef.current.destroy();
320
+ }
321
+ const computedStyle = getComputedStyle(document.documentElement);
322
+ const defaultWaveColor = computedStyle.getPropertyValue("--color-primary-400").trim() || "#60a5fa";
323
+ const defaultProgressColor = computedStyle.getPropertyValue("--color-primary-600").trim() || "#2563eb";
324
+ const defaultCursorColor = computedStyle.getPropertyValue("--color-primary-800").trim() || "#1e40af";
325
+ wavesurferRef.current = WaveSurfer.create({
326
+ container: waveformRef.current,
327
+ waveColor: waveColor || defaultWaveColor,
328
+ progressColor: progressColor || defaultProgressColor,
329
+ cursorColor: cursorColor || defaultCursorColor,
330
+ cursorWidth: 2,
331
+ height: waveformHeight,
332
+ barWidth: 2,
333
+ barGap: 1,
334
+ barRadius: 2,
335
+ normalize: true,
336
+ hideScrollbar: true
337
+ });
338
+ const ws = wavesurferRef.current;
339
+ ws.on("timeupdate", (time) => {
340
+ setCurrentTime(time);
341
+ });
342
+ ws.on("ready", () => {
343
+ if (wavesurferRef.current) {
344
+ setDuration(wavesurferRef.current.getDuration());
345
+ }
346
+ });
347
+ ws.on("finish", () => {
348
+ updateState("stopped");
349
+ });
350
+ }, [
351
+ showWaveform,
352
+ waveColor,
353
+ progressColor,
354
+ cursorColor,
355
+ waveformHeight,
356
+ updateState
357
+ ]);
358
+ React.useEffect(() => {
359
+ if (audioUrl && wavesurferRef.current) {
360
+ wavesurferRef.current.load(audioUrl);
361
+ updateState("stopped");
362
+ }
363
+ }, [audioUrl, updateState]);
364
+ React.useEffect(() => {
365
+ if (pendingBlob && waveformRef.current && state === "stopped") {
366
+ const loadBlob = async () => {
367
+ if (!wavesurferRef.current) {
368
+ await initWaveSurfer();
369
+ }
370
+ if (wavesurferRef.current && pendingBlob) {
371
+ wavesurferRef.current.loadBlob(pendingBlob);
372
+ setPendingBlob(null);
373
+ }
374
+ };
375
+ const timer = setTimeout(loadBlob, 50);
376
+ return () => clearTimeout(timer);
377
+ }
378
+ }, [pendingBlob, state, initWaveSurfer]);
379
+ React.useEffect(() => {
380
+ initWaveSurfer();
381
+ return () => {
382
+ if (wavesurferRef.current) {
383
+ wavesurferRef.current.destroy();
384
+ }
385
+ if (audioContextRef.current) {
386
+ audioContextRef.current.close();
387
+ }
388
+ if (streamRef.current) {
389
+ streamRef.current.getTracks().forEach((track) => track.stop());
390
+ }
391
+ if (audioObjectUrl) {
392
+ URL.revokeObjectURL(audioObjectUrl);
393
+ }
394
+ if (timerRef.current) {
395
+ clearInterval(timerRef.current);
396
+ }
397
+ };
398
+ }, [initWaveSurfer, audioObjectUrl]);
399
+ const handleRecord = React.useCallback(async () => {
400
+ if (disabled) return;
401
+ try {
402
+ const stream = await navigator.mediaDevices.getUserMedia({ audio: true });
403
+ streamRef.current = stream;
404
+ audioContextRef.current = new AudioContext();
405
+ const source = audioContextRef.current.createMediaStreamSource(stream);
406
+ analyserRef.current = audioContextRef.current.createAnalyser();
407
+ analyserRef.current.fftSize = 256;
408
+ source.connect(analyserRef.current);
409
+ const options = { mimeType };
410
+ if (!MediaRecorder.isTypeSupported(mimeType)) {
411
+ mediaRecorderRef.current = new MediaRecorder(stream);
412
+ } else {
413
+ mediaRecorderRef.current = new MediaRecorder(stream, options);
414
+ }
415
+ chunksRef.current = [];
416
+ mediaRecorderRef.current.ondataavailable = (e) => {
417
+ if (e.data.size > 0) {
418
+ chunksRef.current.push(e.data);
419
+ }
420
+ };
421
+ mediaRecorderRef.current.onstop = async () => {
422
+ const blob = new Blob(chunksRef.current, { type: mimeType });
423
+ setAudioBlob(blob);
424
+ if (audioObjectUrl) {
425
+ URL.revokeObjectURL(audioObjectUrl);
426
+ }
427
+ const url = URL.createObjectURL(blob);
428
+ setAudioObjectUrl(url);
429
+ setPendingBlob(blob);
430
+ onRecordingComplete?.(blob, duration);
431
+ updateState("stopped");
432
+ };
433
+ mediaRecorderRef.current.start(100);
434
+ startTimeRef.current = Date.now();
435
+ updateState("recording");
436
+ onRecordingStart?.();
437
+ timerRef.current = window.setInterval(() => {
438
+ const elapsed = (Date.now() - startTimeRef.current) / 1e3;
439
+ setCurrentTime(elapsed);
440
+ setDuration(elapsed);
441
+ if (maxDuration > 0 && elapsed >= maxDuration) {
442
+ handleStopRef.current();
443
+ }
444
+ }, 100);
445
+ } catch (error) {
446
+ onError?.(error);
447
+ updateState("idle");
448
+ }
449
+ }, [
450
+ disabled,
451
+ mimeType,
452
+ maxDuration,
453
+ audioObjectUrl,
454
+ duration,
455
+ onRecordingComplete,
456
+ onRecordingStart,
457
+ onError,
458
+ updateState
459
+ ]);
460
+ const handlePause = React.useCallback(() => {
461
+ if (mediaRecorderRef.current && mediaRecorderRef.current.state === "recording") {
462
+ mediaRecorderRef.current.pause();
463
+ if (timerRef.current) {
464
+ clearInterval(timerRef.current);
465
+ }
466
+ updateState("paused");
467
+ } else if (wavesurferRef.current && (state === "playback" || state === "stopped")) {
468
+ wavesurferRef.current.pause();
469
+ updateState("paused");
470
+ }
471
+ }, [state, updateState]);
472
+ const handleResume = React.useCallback(() => {
473
+ if (mediaRecorderRef.current && mediaRecorderRef.current.state === "paused") {
474
+ mediaRecorderRef.current.resume();
475
+ const pausedTime = currentTime;
476
+ startTimeRef.current = Date.now() - pausedTime * 1e3;
477
+ timerRef.current = window.setInterval(() => {
478
+ const elapsed = (Date.now() - startTimeRef.current) / 1e3;
479
+ setCurrentTime(elapsed);
480
+ setDuration(elapsed);
481
+ if (maxDuration > 0 && elapsed >= maxDuration) {
482
+ handleStopRef.current();
483
+ }
484
+ }, 100);
485
+ updateState("recording");
486
+ } else if (wavesurferRef.current && state === "paused") {
487
+ wavesurferRef.current.play();
488
+ updateState("playback");
489
+ }
490
+ }, [currentTime, maxDuration, state, updateState]);
491
+ const handleStop = React.useCallback(() => {
492
+ if (timerRef.current) {
493
+ clearInterval(timerRef.current);
494
+ }
495
+ if (mediaRecorderRef.current && (mediaRecorderRef.current.state === "recording" || mediaRecorderRef.current.state === "paused")) {
496
+ mediaRecorderRef.current.stop();
497
+ }
498
+ if (streamRef.current) {
499
+ streamRef.current.getTracks().forEach((track) => track.stop());
500
+ }
501
+ if (audioContextRef.current) {
502
+ audioContextRef.current.close();
503
+ audioContextRef.current = null;
504
+ }
505
+ analyserRef.current = null;
506
+ }, []);
507
+ handleStopRef.current = handleStop;
508
+ const handlePlay = React.useCallback(() => {
509
+ if (wavesurferRef.current) {
510
+ wavesurferRef.current.play();
511
+ updateState("playback");
512
+ }
513
+ }, [updateState]);
514
+ const handleSeek = React.useCallback((time) => {
515
+ if (wavesurferRef.current) {
516
+ const progress = time / wavesurferRef.current.getDuration();
517
+ wavesurferRef.current.seekTo(progress);
518
+ setCurrentTime(time);
519
+ }
520
+ }, []);
521
+ const handleDelete = React.useCallback(() => {
522
+ setAudioBlob(null);
523
+ if (audioObjectUrl) {
524
+ URL.revokeObjectURL(audioObjectUrl);
525
+ setAudioObjectUrl(null);
526
+ }
527
+ setCurrentTime(0);
528
+ setDuration(0);
529
+ updateState("idle");
530
+ }, [audioObjectUrl, updateState]);
531
+ const isRecording = state === "recording";
532
+ const isPaused = state === "paused";
533
+ const isPlaying = state === "playback";
534
+ const hasRecording = audioBlob !== null || audioUrl !== void 0;
535
+ const controlRenderProps = {
536
+ state,
537
+ currentTime,
538
+ duration,
539
+ isRecording,
540
+ isPaused,
541
+ isPlaying,
542
+ onRecord: handleRecord,
543
+ onPause: handlePause,
544
+ onResume: handleResume,
545
+ onStop: handleStop,
546
+ onPlay: handlePlay,
547
+ onSeek: handleSeek,
548
+ formatTime
549
+ };
550
+ return /* @__PURE__ */ jsxs(
551
+ "div",
552
+ {
553
+ className: cn(audioRecorderVariants({ size, variant }), className),
554
+ role: "group",
555
+ "aria-label": ariaLabel,
556
+ children: [
557
+ showWaveform && /* @__PURE__ */ jsx(
558
+ "div",
559
+ {
560
+ className: cn(waveformContainerVariants({ state })),
561
+ style: { height: waveformHeight },
562
+ children: (state === "recording" || state === "listening") && !hasRecording ? /* @__PURE__ */ jsx(
563
+ LiveVisualizer,
564
+ {
565
+ analyser: analyserRef.current,
566
+ isActive: isRecording,
567
+ height: waveformHeight,
568
+ barColor: waveColor
569
+ }
570
+ ) : /* @__PURE__ */ jsx("div", { ref: waveformRef, className: "w-full" })
571
+ }
572
+ ),
573
+ showTime && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
574
+ /* @__PURE__ */ jsx(RecordingIndicator, { isRecording, isPaused }),
575
+ /* @__PURE__ */ jsx(
576
+ TimeDisplay,
577
+ {
578
+ currentTime,
579
+ duration,
580
+ maxDuration,
581
+ showMax: isRecording || isPaused
582
+ }
583
+ )
584
+ ] }),
585
+ renderControls ? renderControls(controlRenderProps) : /* @__PURE__ */ jsx(
586
+ DefaultControls,
587
+ {
588
+ ...controlRenderProps,
589
+ disabled,
590
+ hasRecording,
591
+ onDelete: handleDelete
592
+ }
593
+ )
594
+ ]
595
+ }
596
+ );
597
+ }
598
+ AudioRecorder.displayName = "AudioRecorder";
599
+ function DefaultControls({
600
+ state,
601
+ isRecording,
602
+ isPaused,
603
+ isPlaying,
604
+ hasRecording,
605
+ disabled,
606
+ onRecord,
607
+ onPause,
608
+ onResume,
609
+ onStop,
610
+ onPlay,
611
+ onDelete
612
+ }) {
613
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-center gap-3", children: [
614
+ hasRecording && !isRecording && /* @__PURE__ */ jsx(
615
+ "button",
616
+ {
617
+ type: "button",
618
+ onClick: onDelete,
619
+ disabled,
620
+ className: cn(
621
+ controlButtonVariants({ variant: "ghost", size: "md" })
622
+ ),
623
+ "aria-label": "Delete recording",
624
+ children: /* @__PURE__ */ jsx(TrashIcon, { className: "h-5 w-5" })
625
+ }
626
+ ),
627
+ state === "idle" && /* @__PURE__ */ jsx(
628
+ "button",
629
+ {
630
+ type: "button",
631
+ onClick: onRecord,
632
+ disabled,
633
+ className: cn(
634
+ controlButtonVariants({ variant: "danger", size: "lg" })
635
+ ),
636
+ "aria-label": "Start recording",
637
+ children: /* @__PURE__ */ jsx(MicrophoneIcon, { className: "h-6 w-6" })
638
+ }
639
+ ),
640
+ isRecording && /* @__PURE__ */ jsxs(Fragment, { children: [
641
+ /* @__PURE__ */ jsx(
642
+ "button",
643
+ {
644
+ type: "button",
645
+ onClick: onPause,
646
+ disabled,
647
+ className: cn(
648
+ controlButtonVariants({ variant: "secondary", size: "md" })
649
+ ),
650
+ "aria-label": "Pause recording",
651
+ children: /* @__PURE__ */ jsx(PauseIcon, { className: "h-5 w-5" })
652
+ }
653
+ ),
654
+ /* @__PURE__ */ jsx(
655
+ "button",
656
+ {
657
+ type: "button",
658
+ onClick: onStop,
659
+ disabled,
660
+ className: cn(
661
+ controlButtonVariants({ variant: "danger", size: "lg" })
662
+ ),
663
+ "aria-label": "Stop recording",
664
+ children: /* @__PURE__ */ jsx(StopIcon, { className: "h-6 w-6" })
665
+ }
666
+ )
667
+ ] }),
668
+ isPaused && !hasRecording && /* @__PURE__ */ jsxs(Fragment, { children: [
669
+ /* @__PURE__ */ jsx(
670
+ "button",
671
+ {
672
+ type: "button",
673
+ onClick: onResume,
674
+ disabled,
675
+ className: cn(
676
+ controlButtonVariants({ variant: "danger", size: "lg" })
677
+ ),
678
+ "aria-label": "Resume recording",
679
+ children: /* @__PURE__ */ jsx(MicrophoneIcon, { className: "h-6 w-6" })
680
+ }
681
+ ),
682
+ /* @__PURE__ */ jsx(
683
+ "button",
684
+ {
685
+ type: "button",
686
+ onClick: onStop,
687
+ disabled,
688
+ className: cn(
689
+ controlButtonVariants({ variant: "secondary", size: "md" })
690
+ ),
691
+ "aria-label": "Stop recording",
692
+ children: /* @__PURE__ */ jsx(StopIcon, { className: "h-5 w-5" })
693
+ }
694
+ )
695
+ ] }),
696
+ (state === "stopped" || isPaused && hasRecording) && hasRecording && /* @__PURE__ */ jsx(
697
+ "button",
698
+ {
699
+ type: "button",
700
+ onClick: isPlaying || isPaused ? onPause : onPlay,
701
+ disabled,
702
+ className: cn(
703
+ controlButtonVariants({ variant: "primary", size: "lg" })
704
+ ),
705
+ "aria-label": isPaused ? "Resume playback" : isPlaying ? "Pause playback" : "Play recording",
706
+ children: isPaused || !isPlaying ? /* @__PURE__ */ jsx(PlayIcon, { className: "h-6 w-6" }) : /* @__PURE__ */ jsx(PauseIcon, { className: "h-6 w-6" })
707
+ }
708
+ ),
709
+ isPlaying && /* @__PURE__ */ jsx(
710
+ "button",
711
+ {
712
+ type: "button",
713
+ onClick: onPause,
714
+ disabled,
715
+ className: cn(
716
+ controlButtonVariants({ variant: "primary", size: "lg" })
717
+ ),
718
+ "aria-label": "Pause playback",
719
+ children: /* @__PURE__ */ jsx(PauseIcon, { className: "h-6 w-6" })
720
+ }
721
+ )
722
+ ] });
723
+ }
724
+
725
+ export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants };
726
+ //# sourceMappingURL=chunk-QZLRB3UG.js.map
727
+ //# sourceMappingURL=chunk-QZLRB3UG.js.map