@tribepad/themis 1.0.0 → 1.0.1

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 (326) hide show
  1. package/dist/elements/Accordion/index.js +325 -66
  2. package/dist/elements/Accordion/index.js.map +1 -1
  3. package/dist/elements/Accordion/index.mjs +317 -3
  4. package/dist/elements/Accordion/index.mjs.map +1 -1
  5. package/dist/elements/Avatar/index.js +461 -45
  6. package/dist/elements/Avatar/index.js.map +1 -1
  7. package/dist/elements/Avatar/index.mjs +456 -3
  8. package/dist/elements/Avatar/index.mjs.map +1 -1
  9. package/dist/elements/Badge/index.js +238 -36
  10. package/dist/elements/Badge/index.js.map +1 -1
  11. package/dist/elements/Badge/index.mjs +234 -4
  12. package/dist/elements/Badge/index.mjs.map +1 -1
  13. package/dist/elements/Breadcrumbs/index.js +808 -39
  14. package/dist/elements/Breadcrumbs/index.js.map +1 -1
  15. package/dist/elements/Breadcrumbs/index.mjs +810 -7
  16. package/dist/elements/Breadcrumbs/index.mjs.map +1 -1
  17. package/dist/elements/Button/index.js +282 -19
  18. package/dist/elements/Button/index.js.map +1 -1
  19. package/dist/elements/Button/index.mjs +283 -4
  20. package/dist/elements/Button/index.mjs.map +1 -1
  21. package/dist/elements/ButtonGroup/index.js +229 -56
  22. package/dist/elements/ButtonGroup/index.js.map +1 -1
  23. package/dist/elements/ButtonGroup/index.mjs +222 -3
  24. package/dist/elements/ButtonGroup/index.mjs.map +1 -1
  25. package/dist/elements/Card/Card.d.ts.map +1 -1
  26. package/dist/elements/Card/index.js +563 -67
  27. package/dist/elements/Card/index.js.map +1 -1
  28. package/dist/elements/Card/index.mjs +560 -6
  29. package/dist/elements/Card/index.mjs.map +1 -1
  30. package/dist/elements/Carousel/index.js +782 -14
  31. package/dist/elements/Carousel/index.js.map +1 -1
  32. package/dist/elements/Carousel/index.mjs +786 -8
  33. package/dist/elements/Carousel/index.mjs.map +1 -1
  34. package/dist/elements/Chart/index.js +1833 -36
  35. package/dist/elements/Chart/index.js.map +1 -1
  36. package/dist/elements/Chart/index.mjs +1832 -4
  37. package/dist/elements/Chart/index.mjs.map +1 -1
  38. package/dist/elements/Checkbox/index.js +310 -39
  39. package/dist/elements/Checkbox/index.js.map +1 -1
  40. package/dist/elements/Checkbox/index.mjs +306 -4
  41. package/dist/elements/Checkbox/index.mjs.map +1 -1
  42. package/dist/elements/CheckboxGroup/index.js +445 -59
  43. package/dist/elements/CheckboxGroup/index.js.map +1 -1
  44. package/dist/elements/CheckboxGroup/index.mjs +439 -4
  45. package/dist/elements/CheckboxGroup/index.mjs.map +1 -1
  46. package/dist/elements/DatePicker/index.js +871 -89
  47. package/dist/elements/DatePicker/index.js.map +1 -1
  48. package/dist/elements/DatePicker/index.mjs +853 -4
  49. package/dist/elements/DatePicker/index.mjs.map +1 -1
  50. package/dist/elements/Dropdown/index.js +189 -35
  51. package/dist/elements/Dropdown/index.js.map +1 -1
  52. package/dist/elements/Dropdown/index.mjs +184 -2
  53. package/dist/elements/Dropdown/index.mjs.map +1 -1
  54. package/dist/elements/FileField/index.js +1532 -129
  55. package/dist/elements/FileField/index.js.map +1 -1
  56. package/dist/elements/FileField/index.mjs +1507 -7
  57. package/dist/elements/FileField/index.mjs.map +1 -1
  58. package/dist/elements/FormLayout/index.js +166 -11
  59. package/dist/elements/FormLayout/index.js.map +1 -1
  60. package/dist/elements/FormLayout/index.mjs +167 -2
  61. package/dist/elements/FormLayout/index.mjs.map +1 -1
  62. package/dist/elements/Modal/index.js +228 -46
  63. package/dist/elements/Modal/index.js.map +1 -1
  64. package/dist/elements/Modal/index.mjs +220 -1
  65. package/dist/elements/Modal/index.mjs.map +1 -1
  66. package/dist/elements/NumberField/index.js +659 -48
  67. package/dist/elements/NumberField/index.js.map +1 -1
  68. package/dist/elements/NumberField/index.mjs +654 -6
  69. package/dist/elements/NumberField/index.mjs.map +1 -1
  70. package/dist/elements/OTPInput/index.js +729 -6
  71. package/dist/elements/OTPInput/index.js.map +1 -1
  72. package/dist/elements/OTPInput/index.mjs +732 -2
  73. package/dist/elements/OTPInput/index.mjs.map +1 -1
  74. package/dist/elements/Panel/index.js +326 -27
  75. package/dist/elements/Panel/index.js.map +1 -1
  76. package/dist/elements/Panel/index.mjs +323 -2
  77. package/dist/elements/Panel/index.mjs.map +1 -1
  78. package/dist/elements/Progress/index.js +181 -22
  79. package/dist/elements/Progress/index.js.map +1 -1
  80. package/dist/elements/Progress/index.mjs +181 -3
  81. package/dist/elements/Progress/index.mjs.map +1 -1
  82. package/dist/elements/RadioGroup/index.js +358 -34
  83. package/dist/elements/RadioGroup/index.js.map +1 -1
  84. package/dist/elements/RadioGroup/index.mjs +359 -4
  85. package/dist/elements/RadioGroup/index.mjs.map +1 -1
  86. package/dist/elements/Resizable/components/ResizableHandle.d.ts +0 -8
  87. package/dist/elements/Resizable/components/ResizableHandle.d.ts.map +1 -1
  88. package/dist/elements/Resizable/components/ResizablePanel.d.ts +0 -8
  89. package/dist/elements/Resizable/components/ResizablePanel.d.ts.map +1 -1
  90. package/dist/elements/Resizable/components/ResizablePanelGroup.d.ts +0 -8
  91. package/dist/elements/Resizable/components/ResizablePanelGroup.d.ts.map +1 -1
  92. package/dist/elements/Resizable/components/ResizablePopover.d.ts +0 -8
  93. package/dist/elements/Resizable/components/ResizablePopover.d.ts.map +1 -1
  94. package/dist/elements/Resizable/index.js +1568 -51
  95. package/dist/elements/Resizable/index.js.map +1 -1
  96. package/dist/elements/Resizable/index.mjs +1566 -6
  97. package/dist/elements/Resizable/index.mjs.map +1 -1
  98. package/dist/elements/Select/index.js +580 -22
  99. package/dist/elements/Select/index.js.map +1 -1
  100. package/dist/elements/Select/index.mjs +582 -2
  101. package/dist/elements/Select/index.mjs.map +1 -1
  102. package/dist/elements/Skeleton/index.js +77 -15
  103. package/dist/elements/Skeleton/index.js.map +1 -1
  104. package/dist/elements/Skeleton/index.mjs +78 -3
  105. package/dist/elements/Skeleton/index.mjs.map +1 -1
  106. package/dist/elements/Switch/index.js +153 -21
  107. package/dist/elements/Switch/index.js.map +1 -1
  108. package/dist/elements/Switch/index.mjs +149 -5
  109. package/dist/elements/Switch/index.mjs.map +1 -1
  110. package/dist/elements/Table/index.js +589 -68
  111. package/dist/elements/Table/index.js.map +1 -1
  112. package/dist/elements/Table/index.mjs +578 -5
  113. package/dist/elements/Table/index.mjs.map +1 -1
  114. package/dist/elements/Tabs/index.js +328 -63
  115. package/dist/elements/Tabs/index.js.map +1 -1
  116. package/dist/elements/Tabs/index.mjs +320 -3
  117. package/dist/elements/Tabs/index.mjs.map +1 -1
  118. package/dist/elements/TextField/index.js +695 -51
  119. package/dist/elements/TextField/index.js.map +1 -1
  120. package/dist/elements/TextField/index.mjs +684 -7
  121. package/dist/elements/TextField/index.mjs.map +1 -1
  122. package/dist/elements/TimeField/index.js +244 -33
  123. package/dist/elements/TimeField/index.js.map +1 -1
  124. package/dist/elements/TimeField/index.mjs +238 -2
  125. package/dist/elements/TimeField/index.mjs.map +1 -1
  126. package/dist/elements/Toast/index.js +727 -48
  127. package/dist/elements/Toast/index.js.map +1 -1
  128. package/dist/elements/Toast/index.mjs +724 -5
  129. package/dist/elements/Toast/index.mjs.map +1 -1
  130. package/dist/elements/Tooltip/index.js +315 -49
  131. package/dist/elements/Tooltip/index.js.map +1 -1
  132. package/dist/elements/Tooltip/index.mjs +310 -4
  133. package/dist/elements/Tooltip/index.mjs.map +1 -1
  134. package/dist/elements/index.js +12417 -799
  135. package/dist/elements/index.js.map +1 -1
  136. package/dist/elements/index.mjs +12233 -40
  137. package/dist/elements/index.mjs.map +1 -1
  138. package/dist/index.js +12452 -825
  139. package/dist/index.js.map +1 -1
  140. package/dist/index.mjs +12262 -42
  141. package/dist/index.mjs.map +1 -1
  142. package/dist/schemas/index.js +47 -21
  143. package/dist/schemas/index.js.map +1 -1
  144. package/dist/schemas/index.mjs +47 -2
  145. package/dist/schemas/index.mjs.map +1 -1
  146. package/dist/styles/index.js +161 -147
  147. package/dist/styles/index.js.map +1 -1
  148. package/dist/styles/index.mjs +128 -2
  149. package/dist/styles/index.mjs.map +1 -1
  150. package/dist/utils/index.js +7 -7
  151. package/dist/utils/index.js.map +1 -1
  152. package/dist/utils/index.mjs +9 -2
  153. package/dist/utils/index.mjs.map +1 -1
  154. package/package.json +1 -1
  155. package/dist/Carousel-NTZX5TOW.js +0 -16
  156. package/dist/Carousel-NTZX5TOW.js.map +0 -1
  157. package/dist/Carousel-YH3DOQJU.mjs +0 -7
  158. package/dist/Carousel-YH3DOQJU.mjs.map +0 -1
  159. package/dist/chunk-2HIUTHMU.mjs +0 -234
  160. package/dist/chunk-2HIUTHMU.mjs.map +0 -1
  161. package/dist/chunk-34GTFTDO.js +0 -431
  162. package/dist/chunk-34GTFTDO.js.map +0 -1
  163. package/dist/chunk-3H7ASYR7.js +0 -250
  164. package/dist/chunk-3H7ASYR7.js.map +0 -1
  165. package/dist/chunk-3IEN7JOP.js +0 -316
  166. package/dist/chunk-3IEN7JOP.js.map +0 -1
  167. package/dist/chunk-3JHN4GAL.js +0 -326
  168. package/dist/chunk-3JHN4GAL.js.map +0 -1
  169. package/dist/chunk-3MJPASQU.js +0 -232
  170. package/dist/chunk-3MJPASQU.js.map +0 -1
  171. package/dist/chunk-3XD2JUL3.js +0 -572
  172. package/dist/chunk-3XD2JUL3.js.map +0 -1
  173. package/dist/chunk-3YOY2VJ6.js +0 -189
  174. package/dist/chunk-3YOY2VJ6.js.map +0 -1
  175. package/dist/chunk-4DU5JSXB.js +0 -408
  176. package/dist/chunk-4DU5JSXB.js.map +0 -1
  177. package/dist/chunk-4E4E2GSS.js +0 -352
  178. package/dist/chunk-4E4E2GSS.js.map +0 -1
  179. package/dist/chunk-4NHAP4AN.mjs +0 -3
  180. package/dist/chunk-4NHAP4AN.mjs.map +0 -1
  181. package/dist/chunk-4S33J5NY.mjs +0 -415
  182. package/dist/chunk-4S33J5NY.mjs.map +0 -1
  183. package/dist/chunk-5SMGRT3G.mjs +0 -354
  184. package/dist/chunk-5SMGRT3G.mjs.map +0 -1
  185. package/dist/chunk-5SVLJN2C.mjs +0 -22
  186. package/dist/chunk-5SVLJN2C.mjs.map +0 -1
  187. package/dist/chunk-66WTU4EB.mjs +0 -299
  188. package/dist/chunk-66WTU4EB.mjs.map +0 -1
  189. package/dist/chunk-6S25NMOT.mjs +0 -335
  190. package/dist/chunk-6S25NMOT.mjs.map +0 -1
  191. package/dist/chunk-6SP7UB3D.js +0 -4
  192. package/dist/chunk-6SP7UB3D.js.map +0 -1
  193. package/dist/chunk-6TYWWQHM.mjs +0 -565
  194. package/dist/chunk-6TYWWQHM.mjs.map +0 -1
  195. package/dist/chunk-A3YUJA6W.mjs +0 -384
  196. package/dist/chunk-A3YUJA6W.mjs.map +0 -1
  197. package/dist/chunk-A6KEDVUR.js +0 -61
  198. package/dist/chunk-A6KEDVUR.js.map +0 -1
  199. package/dist/chunk-A77RUEWL.js +0 -730
  200. package/dist/chunk-A77RUEWL.js.map +0 -1
  201. package/dist/chunk-AA4IKMPE.mjs +0 -3
  202. package/dist/chunk-AA4IKMPE.mjs.map +0 -1
  203. package/dist/chunk-AKIA6GW6.mjs +0 -163
  204. package/dist/chunk-AKIA6GW6.mjs.map +0 -1
  205. package/dist/chunk-AL6P275L.mjs +0 -435
  206. package/dist/chunk-AL6P275L.mjs.map +0 -1
  207. package/dist/chunk-AZ3RJYTB.js +0 -37
  208. package/dist/chunk-AZ3RJYTB.js.map +0 -1
  209. package/dist/chunk-B5Q4UPL6.js +0 -32
  210. package/dist/chunk-B5Q4UPL6.js.map +0 -1
  211. package/dist/chunk-B6DHPMDP.mjs +0 -335
  212. package/dist/chunk-B6DHPMDP.mjs.map +0 -1
  213. package/dist/chunk-BDXKKMBZ.mjs +0 -184
  214. package/dist/chunk-BDXKKMBZ.mjs.map +0 -1
  215. package/dist/chunk-BL6E2DLZ.mjs +0 -52
  216. package/dist/chunk-BL6E2DLZ.mjs.map +0 -1
  217. package/dist/chunk-CGFDS4XS.mjs +0 -121
  218. package/dist/chunk-CGFDS4XS.mjs.map +0 -1
  219. package/dist/chunk-CJIW5TKI.js +0 -139
  220. package/dist/chunk-CJIW5TKI.js.map +0 -1
  221. package/dist/chunk-CKNISJOQ.js +0 -314
  222. package/dist/chunk-CKNISJOQ.js.map +0 -1
  223. package/dist/chunk-D6CBOECS.mjs +0 -1757
  224. package/dist/chunk-D6CBOECS.mjs.map +0 -1
  225. package/dist/chunk-DDWEVC2S.js +0 -166
  226. package/dist/chunk-DDWEVC2S.js.map +0 -1
  227. package/dist/chunk-DZ556D2F.mjs +0 -176
  228. package/dist/chunk-DZ556D2F.mjs.map +0 -1
  229. package/dist/chunk-E2KQFV3O.mjs +0 -10
  230. package/dist/chunk-E2KQFV3O.mjs.map +0 -1
  231. package/dist/chunk-EMMLADSC.js +0 -126
  232. package/dist/chunk-EMMLADSC.js.map +0 -1
  233. package/dist/chunk-EP4WOI5D.mjs +0 -926
  234. package/dist/chunk-EP4WOI5D.mjs.map +0 -1
  235. package/dist/chunk-FJRXLJC2.mjs +0 -160
  236. package/dist/chunk-FJRXLJC2.mjs.map +0 -1
  237. package/dist/chunk-FKQI434R.js +0 -345
  238. package/dist/chunk-FKQI434R.js.map +0 -1
  239. package/dist/chunk-FPKEAJRZ.mjs +0 -100
  240. package/dist/chunk-FPKEAJRZ.mjs.map +0 -1
  241. package/dist/chunk-FWQYB22U.js +0 -183
  242. package/dist/chunk-FWQYB22U.js.map +0 -1
  243. package/dist/chunk-GD5GHTMA.js +0 -189
  244. package/dist/chunk-GD5GHTMA.js.map +0 -1
  245. package/dist/chunk-GE5XTSDZ.js +0 -447
  246. package/dist/chunk-GE5XTSDZ.js.map +0 -1
  247. package/dist/chunk-GVE47ZAX.mjs +0 -32
  248. package/dist/chunk-GVE47ZAX.mjs.map +0 -1
  249. package/dist/chunk-HK46BT5U.mjs +0 -18
  250. package/dist/chunk-HK46BT5U.mjs.map +0 -1
  251. package/dist/chunk-HQVRMR6N.js +0 -365
  252. package/dist/chunk-HQVRMR6N.js.map +0 -1
  253. package/dist/chunk-HSGBJPJO.mjs +0 -398
  254. package/dist/chunk-HSGBJPJO.mjs.map +0 -1
  255. package/dist/chunk-I3AUTOMZ.mjs +0 -125
  256. package/dist/chunk-I3AUTOMZ.mjs.map +0 -1
  257. package/dist/chunk-IEI5LD5C.mjs +0 -1161
  258. package/dist/chunk-IEI5LD5C.mjs.map +0 -1
  259. package/dist/chunk-IIPTC2X7.mjs +0 -118
  260. package/dist/chunk-IIPTC2X7.mjs.map +0 -1
  261. package/dist/chunk-J7TLHF2Q.js +0 -4
  262. package/dist/chunk-J7TLHF2Q.js.map +0 -1
  263. package/dist/chunk-JJOWXFXQ.mjs +0 -765
  264. package/dist/chunk-JJOWXFXQ.mjs.map +0 -1
  265. package/dist/chunk-JPTSS2OA.mjs +0 -3
  266. package/dist/chunk-JPTSS2OA.mjs.map +0 -1
  267. package/dist/chunk-KFXXRLTP.js +0 -396
  268. package/dist/chunk-KFXXRLTP.js.map +0 -1
  269. package/dist/chunk-KPRRBSG6.mjs +0 -272
  270. package/dist/chunk-KPRRBSG6.mjs.map +0 -1
  271. package/dist/chunk-NFSBGRDB.mjs +0 -57
  272. package/dist/chunk-NFSBGRDB.mjs.map +0 -1
  273. package/dist/chunk-NGJVCFTM.js +0 -219
  274. package/dist/chunk-NGJVCFTM.js.map +0 -1
  275. package/dist/chunk-NSQ6MZJ6.mjs +0 -728
  276. package/dist/chunk-NSQ6MZJ6.mjs.map +0 -1
  277. package/dist/chunk-NYQYHT76.mjs +0 -296
  278. package/dist/chunk-NYQYHT76.mjs.map +0 -1
  279. package/dist/chunk-OLJJGI5B.js +0 -1193
  280. package/dist/chunk-OLJJGI5B.js.map +0 -1
  281. package/dist/chunk-Q3572X2J.js +0 -292
  282. package/dist/chunk-Q3572X2J.js.map +0 -1
  283. package/dist/chunk-QH7N7D4I.mjs +0 -210
  284. package/dist/chunk-QH7N7D4I.mjs.map +0 -1
  285. package/dist/chunk-R7XUIV25.js +0 -466
  286. package/dist/chunk-R7XUIV25.js.map +0 -1
  287. package/dist/chunk-RFFO4KPM.js +0 -135
  288. package/dist/chunk-RFFO4KPM.js.map +0 -1
  289. package/dist/chunk-RFX7QKA7.mjs +0 -180
  290. package/dist/chunk-RFX7QKA7.mjs.map +0 -1
  291. package/dist/chunk-SN5LFAP3.js +0 -940
  292. package/dist/chunk-SN5LFAP3.js.map +0 -1
  293. package/dist/chunk-T4COXKQ3.js +0 -24
  294. package/dist/chunk-T4COXKQ3.js.map +0 -1
  295. package/dist/chunk-TS54QM27.js +0 -125
  296. package/dist/chunk-TS54QM27.js.map +0 -1
  297. package/dist/chunk-UE2S4PCX.mjs +0 -220
  298. package/dist/chunk-UE2S4PCX.mjs.map +0 -1
  299. package/dist/chunk-UTW3QX2A.mjs +0 -282
  300. package/dist/chunk-UTW3QX2A.mjs.map +0 -1
  301. package/dist/chunk-V74LGMAE.js +0 -1767
  302. package/dist/chunk-V74LGMAE.js.map +0 -1
  303. package/dist/chunk-VIREG536.js +0 -12
  304. package/dist/chunk-VIREG536.js.map +0 -1
  305. package/dist/chunk-VY7M7346.js +0 -4
  306. package/dist/chunk-VY7M7346.js.map +0 -1
  307. package/dist/chunk-W3TJOO7H.mjs +0 -319
  308. package/dist/chunk-W3TJOO7H.mjs.map +0 -1
  309. package/dist/chunk-WIUOB36M.js +0 -54
  310. package/dist/chunk-WIUOB36M.js.map +0 -1
  311. package/dist/chunk-WJGLM4CY.js +0 -291
  312. package/dist/chunk-WJGLM4CY.js.map +0 -1
  313. package/dist/chunk-WNURH5OO.mjs +0 -453
  314. package/dist/chunk-WNURH5OO.mjs.map +0 -1
  315. package/dist/chunk-X25TNRSD.mjs +0 -364
  316. package/dist/chunk-X25TNRSD.mjs.map +0 -1
  317. package/dist/chunk-Y3GT7ETK.js +0 -108
  318. package/dist/chunk-Y3GT7ETK.js.map +0 -1
  319. package/dist/chunk-Z4FRNOF6.mjs +0 -115
  320. package/dist/chunk-Z4FRNOF6.mjs.map +0 -1
  321. package/dist/chunk-ZMYLD3BN.js +0 -166
  322. package/dist/chunk-ZMYLD3BN.js.map +0 -1
  323. package/dist/chunk-ZP2KV6EX.js +0 -815
  324. package/dist/chunk-ZP2KV6EX.js.map +0 -1
  325. package/dist/chunk-ZVKXFELU.js +0 -366
  326. package/dist/chunk-ZVKXFELU.js.map +0 -1
@@ -1,60 +1,739 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
- var chunkR7XUIV25_js = require('../../chunk-R7XUIV25.js');
4
- require('../../chunk-3YOY2VJ6.js');
5
- require('../../chunk-Y3GT7ETK.js');
6
- require('../../chunk-B5Q4UPL6.js');
7
- require('../../chunk-VIREG536.js');
4
+ var react = require('react');
5
+ var reactAria = require('react-aria');
6
+ var reactStately = require('react-stately');
7
+ var classVarianceAuthority = require('class-variance-authority');
8
+ var lucideReact = require('lucide-react');
9
+ var clsx = require('clsx');
10
+ var tailwindMerge = require('tailwind-merge');
11
+ var reactAriaComponents = require('react-aria-components');
12
+ var jsxRuntime = require('react/jsx-runtime');
13
+ var zod = require('zod');
8
14
 
9
-
10
-
11
- Object.defineProperty(exports, "DismissReasonSchema", {
12
- enumerable: true,
13
- get: function () { return chunkR7XUIV25_js.DismissReasonSchema; }
14
- });
15
- Object.defineProperty(exports, "ToastOptionsSchema", {
16
- enumerable: true,
17
- get: function () { return chunkR7XUIV25_js.ToastOptionsSchema; }
18
- });
19
- Object.defineProperty(exports, "ToastProvider", {
20
- enumerable: true,
21
- get: function () { return chunkR7XUIV25_js.ToastProvider; }
15
+ // src/elements/Toast/Toast.tsx
16
+ function cn(...inputs) {
17
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
18
+ }
19
+ var PRESSED_STYLES = "data-[pressed]:scale-[0.97]";
20
+ var HOVER_STYLES = "data-[hovered]:shadow-md";
21
+ var HIGH_CONTRAST_HOVER = "hc:data-[hovered]:outline hc:data-[hovered]:outline-2 hc:data-[hovered]:outline-foreground";
22
+ var HIGH_CONTRAST_PRESSED = "hc:data-[pressed]:outline hc:data-[pressed]:outline-2 hc:data-[pressed]:outline-offset-1 hc:data-[pressed]:outline-foreground";
23
+ var ButtonGroupContext = react.createContext(null);
24
+ ButtonGroupContext.displayName = "ButtonGroupContext";
25
+ function useButtonGroupContext() {
26
+ return react.useContext(ButtonGroupContext);
27
+ }
28
+ var ButtonGroupItemContext = react.createContext(null);
29
+ ButtonGroupItemContext.displayName = "ButtonGroupItemContext";
30
+ function useButtonGroupItemContext() {
31
+ return react.useContext(ButtonGroupItemContext);
32
+ }
33
+ classVarianceAuthority.cva("inline-flex items-center gap-0", {
34
+ variants: {
35
+ orientation: {
36
+ horizontal: "flex-row",
37
+ vertical: "flex-col w-full"
38
+ }
39
+ },
40
+ defaultVariants: {
41
+ orientation: "horizontal"
42
+ }
22
43
  });
23
- Object.defineProperty(exports, "ToastProviderPropsSchema", {
24
- enumerable: true,
25
- get: function () { return chunkR7XUIV25_js.ToastProviderPropsSchema; }
44
+ var buttonGroupItemVariants = classVarianceAuthority.cva("", {
45
+ variants: {
46
+ orientation: {
47
+ // min-w-[44px] ensures visual layer fills touch target width (for icon buttons)
48
+ horizontal: "min-w-[44px]",
49
+ // flex (overrides inline-flex) + min-h-[44px] makes visual layer fill touch target,
50
+ // eliminating gaps between stacked buttons in vertical orientation
51
+ vertical: "flex min-h-[44px]"
52
+ },
53
+ position: {
54
+ first: "",
55
+ middle: "",
56
+ last: "",
57
+ only: ""
58
+ // Single button - no modifications needed
59
+ }
60
+ },
61
+ compoundVariants: [
62
+ // ==========================================================================
63
+ // Horizontal Orientation
64
+ // ==========================================================================
65
+ {
66
+ orientation: "horizontal",
67
+ position: "first",
68
+ className: "rounded-r-none border-r-0"
69
+ },
70
+ {
71
+ orientation: "horizontal",
72
+ position: "middle",
73
+ className: "rounded-none border-r-0"
74
+ },
75
+ {
76
+ orientation: "horizontal",
77
+ position: "last",
78
+ className: "rounded-l-none"
79
+ },
80
+ // ==========================================================================
81
+ // Vertical Orientation
82
+ // Note: w-full is handled by Button's effectiveFullWidth for both layers
83
+ // ==========================================================================
84
+ {
85
+ orientation: "vertical",
86
+ position: "first",
87
+ className: "rounded-b-none border-b-0"
88
+ },
89
+ {
90
+ orientation: "vertical",
91
+ position: "middle",
92
+ className: "rounded-none border-b-0"
93
+ },
94
+ {
95
+ orientation: "vertical",
96
+ position: "last",
97
+ className: "rounded-t-none"
98
+ }
99
+ ],
100
+ defaultVariants: {
101
+ orientation: "horizontal",
102
+ position: "only"
103
+ }
26
104
  });
27
- Object.defineProperty(exports, "ToastVariantSchema", {
28
- enumerable: true,
29
- get: function () { return chunkR7XUIV25_js.ToastVariantSchema; }
105
+ classVarianceAuthority.cva("bg-[var(--border)]", {
106
+ variants: {
107
+ orientation: {
108
+ horizontal: "w-px h-6 mx-1",
109
+ vertical: "h-px w-full my-1"
110
+ }
111
+ },
112
+ defaultVariants: {
113
+ orientation: "horizontal"
114
+ }
30
115
  });
31
- Object.defineProperty(exports, "Toaster", {
32
- enumerable: true,
33
- get: function () { return chunkR7XUIV25_js.Toaster; }
116
+ var buttonOuterVariants = classVarianceAuthority.cva(
117
+ "inline-flex justify-center min-h-[44px] min-w-[44px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50",
118
+ {
119
+ variants: {
120
+ fullWidth: {
121
+ true: "w-full",
122
+ false: ""
123
+ },
124
+ inVerticalGroup: {
125
+ true: "items-stretch",
126
+ false: "items-center"
127
+ }
128
+ },
129
+ defaultVariants: {
130
+ fullWidth: false,
131
+ inVerticalGroup: false
132
+ }
133
+ }
134
+ );
135
+ var buttonVisualVariants = classVarianceAuthority.cva(
136
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 relative cursor-pointer",
137
+ {
138
+ variants: {
139
+ variant: {
140
+ default: "bg-[var(--primary-action)] text-[var(--primary-action-foreground)] shadow-md hover:bg-[var(--primary-action-hover)] data-[pressed]:bg-[var(--primary-action)]/80",
141
+ destructive: "bg-[var(--destructive-background)] text-[var(--destructive-foreground)] shadow-md hover:bg-[var(--destructive-background)]/90 data-[pressed]:bg-[var(--destructive-background)]/80",
142
+ outline: "border border-[var(--input-border)] bg-[var(--page-background)] hover:bg-[var(--input-border)] data-[pressed]:bg-[var(--input-border)]",
143
+ secondary: "bg-[var(--secondary)] text-[var(--secondary-foreground)] shadow-md hover:bg-[var(--secondary)]/80 data-[pressed]:bg-[var(--secondary)]/70",
144
+ ghost: "hover:bg-[var(--accent)] hover:text-[var(--accent-foreground)] data-[pressed]:bg-[var(--accent)]",
145
+ link: "text-[var(--text-link)] underline-offset-4 hover:underline data-[pressed]:text-[var(--text-link-hover)]"
146
+ },
147
+ fullWidth: {
148
+ true: "w-full",
149
+ false: ""
150
+ },
151
+ visualSize: {
152
+ default: "h-10 px-4 py-2",
153
+ sm: "h-9 rounded-md px-3 text-xs",
154
+ lg: "h-11 rounded-md px-8",
155
+ icon: "h-10 w-10",
156
+ dot: "h-5 w-5 rounded-full p-0 min-h-0 min-w-0"
157
+ },
158
+ paywall: {
159
+ true: "!bg-[var(--paywall)] !text-[var(--paywall-foreground)] !shadow-md hover:!bg-[var(--paywall)]/90 !cursor-not-allowed !border-transparent",
160
+ false: ""
161
+ }
162
+ },
163
+ defaultVariants: {
164
+ variant: "default",
165
+ visualSize: "default",
166
+ paywall: false
167
+ }
168
+ }
169
+ );
170
+ var Button = react.memo(react.forwardRef(
171
+ ({
172
+ className,
173
+ buttonVisualClassName,
174
+ variant,
175
+ size,
176
+ visualSize,
177
+ fullWidth,
178
+ loading = false,
179
+ loadingText = "Loading...",
180
+ shortcut,
181
+ children,
182
+ isDisabled,
183
+ paywall = false,
184
+ paywallRedirect,
185
+ paywallDescription,
186
+ onPress,
187
+ ...props
188
+ }, ref) => {
189
+ const paywallDescriptionId = react.useId();
190
+ const groupContext = useButtonGroupContext();
191
+ const itemContext = useButtonGroupItemContext();
192
+ const effectiveVariant = variant ?? groupContext?.variant ?? "default";
193
+ const effectiveSize = size ?? groupContext?.size;
194
+ const effectiveIsDisabled = isDisabled ?? groupContext?.isDisabled ?? false;
195
+ const isInVerticalGroup = groupContext?.orientation === "vertical";
196
+ const effectiveFullWidth = fullWidth || isInVerticalGroup;
197
+ const positionClassName = itemContext ? buttonGroupItemVariants({
198
+ orientation: groupContext?.orientation ?? "horizontal",
199
+ position: itemContext.position
200
+ }) : "";
201
+ const effectiveVisualSize = visualSize ?? effectiveSize ?? "default";
202
+ if (process.env.NODE_ENV !== "production") {
203
+ if ((effectiveVisualSize === "dot" || effectiveVisualSize === "icon") && !props["aria-label"] && !children) {
204
+ console.warn(
205
+ '[Button] visualSize="dot" or "icon" requires aria-label when no visible text is provided (WCAG 1.1.1)'
206
+ );
207
+ }
208
+ }
209
+ const handlePress = (e) => {
210
+ if (paywall) {
211
+ if (paywallRedirect) {
212
+ window.open(paywallRedirect, "_blank", "noopener,noreferrer");
213
+ }
214
+ return;
215
+ }
216
+ onPress?.(e);
217
+ };
218
+ const computedIsDisabled = effectiveIsDisabled || loading || void 0;
219
+ return /* @__PURE__ */ jsxRuntime.jsx(
220
+ reactAriaComponents.Button,
221
+ {
222
+ ref,
223
+ isDisabled: computedIsDisabled,
224
+ "aria-disabled": paywall ? true : void 0,
225
+ "aria-describedby": paywall ? paywallDescriptionId : void 0,
226
+ onPress: handlePress,
227
+ className: cn(buttonOuterVariants({ fullWidth: effectiveFullWidth, inVerticalGroup: isInVerticalGroup }), className),
228
+ ...props,
229
+ children: (renderProps) => (
230
+ /* Layer 2: Visual Button */
231
+ /* @__PURE__ */ jsxRuntime.jsxs(
232
+ "span",
233
+ {
234
+ className: cn(
235
+ buttonVisualVariants({
236
+ variant: effectiveVariant,
237
+ visualSize: effectiveVisualSize,
238
+ paywall,
239
+ fullWidth: effectiveFullWidth
240
+ }),
241
+ // Position styling from ButtonGroup context (border-radius adjustments)
242
+ positionClassName,
243
+ buttonVisualClassName,
244
+ // Layer 2 interaction styles (no focus - focus ring is on Layer 1)
245
+ PRESSED_STYLES,
246
+ HOVER_STYLES,
247
+ HIGH_CONTRAST_HOVER,
248
+ HIGH_CONTRAST_PRESSED
249
+ ),
250
+ "data-pressed": renderProps.isPressed || void 0,
251
+ children: [
252
+ loading && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
253
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "motion-safe:animate-spin", "aria-hidden": "true" }),
254
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", "aria-live": "polite", children: loadingText })
255
+ ] }),
256
+ !loading && children,
257
+ paywall && /* @__PURE__ */ jsxRuntime.jsx(
258
+ lucideReact.Zap,
259
+ {
260
+ "data-testid": "zap-icon",
261
+ "aria-hidden": "true",
262
+ className: "ml-1"
263
+ }
264
+ ),
265
+ paywall && /* @__PURE__ */ jsxRuntime.jsxs("span", { id: paywallDescriptionId, className: "sr-only", children: [
266
+ "Premium feature: ",
267
+ paywallDescription || "Upgrade required to access this feature"
268
+ ] }),
269
+ renderProps.isFocusVisible && shortcut && /* @__PURE__ */ jsxRuntime.jsx("kbd", { className: "ml-auto hidden text-xs opacity-60 lg:inline", children: shortcut }),
270
+ renderProps.isPressed && /* @__PURE__ */ jsxRuntime.jsx(
271
+ "span",
272
+ {
273
+ className: "absolute inset-0 rounded-[inherit] bg-current opacity-10 motion-safe:animate-in motion-safe:zoom-in-95",
274
+ "aria-hidden": "true"
275
+ }
276
+ )
277
+ ]
278
+ }
279
+ )
280
+ )
281
+ }
282
+ );
283
+ }
284
+ ));
285
+ Button.displayName = "Button";
286
+ var DismissReasonSchema = zod.z.enum(["timeout", "user", "programmatic"]);
287
+ var ToastVariantSchema = zod.z.enum([
288
+ "default",
289
+ "primary",
290
+ "destructive",
291
+ "accent"
292
+ ]);
293
+ var ToasterPositionSchema = zod.z.enum([
294
+ "top-left",
295
+ "top-center",
296
+ "top-right",
297
+ "bottom-left",
298
+ "bottom-center",
299
+ "bottom-right"
300
+ ]);
301
+ var ToastOptionsSchema = zod.z.object({
302
+ /**
303
+ * Visual variant determining background and foreground colors
304
+ * @default 'default'
305
+ */
306
+ variant: ToastVariantSchema.default("default"),
307
+ /**
308
+ * Auto-dismiss timeout in milliseconds
309
+ * - Values 1-4999ms are clamped to 5000ms (WCAG 2.2 timing requirement)
310
+ * - Set to 0 for persistent toasts (no auto-dismiss)
311
+ * @default 5000
312
+ */
313
+ timeout: zod.z.number().min(0).default(5e3),
314
+ /**
315
+ * Callback fired when toast is dismissed
316
+ * @param key - Unique identifier of the toast
317
+ * @param reason - Why the toast was dismissed ('timeout' | 'user' | 'programmatic')
318
+ */
319
+ onClose: zod.z.function().optional()
34
320
  });
35
- Object.defineProperty(exports, "ToasterPositionSchema", {
36
- enumerable: true,
37
- get: function () { return chunkR7XUIV25_js.ToasterPositionSchema; }
321
+ var ToastProviderPropsSchema = zod.z.object({
322
+ /**
323
+ * Maximum number of toasts visible at once
324
+ * Additional toasts are queued and shown as others dismiss
325
+ * @default 3
326
+ */
327
+ maxVisibleToasts: zod.z.number().min(1).default(3)
38
328
  });
39
- Object.defineProperty(exports, "ToasterPropsSchema", {
40
- enumerable: true,
41
- get: function () { return chunkR7XUIV25_js.ToasterPropsSchema; }
329
+ var ToasterPropsSchema = zod.z.object({
330
+ /**
331
+ * Position of the toast region on screen
332
+ * @default 'bottom-right'
333
+ */
334
+ position: ToasterPositionSchema.default("bottom-right"),
335
+ /**
336
+ * Accessible label for the toast region landmark
337
+ * Used by screen readers to identify the notification area
338
+ * @default 'Notifications'
339
+ */
340
+ "aria-label": zod.z.string().default("Notifications"),
341
+ /**
342
+ * Additional CSS classes for the toast region
343
+ */
344
+ className: zod.z.string().optional()
42
345
  });
43
- Object.defineProperty(exports, "toast", {
44
- enumerable: true,
45
- get: function () { return chunkR7XUIV25_js.toast; }
46
- });
47
- Object.defineProperty(exports, "toastQueue", {
48
- enumerable: true,
49
- get: function () { return chunkR7XUIV25_js.toastQueue; }
50
- });
51
- Object.defineProperty(exports, "toastVariants", {
52
- enumerable: true,
53
- get: function () { return chunkR7XUIV25_js.toastVariants; }
54
- });
55
- Object.defineProperty(exports, "toasterVariants", {
56
- enumerable: true,
57
- get: function () { return chunkR7XUIV25_js.toasterVariants; }
346
+ var toastVariants = classVarianceAuthority.cva(
347
+ [
348
+ // Fixed width for consistent appearance
349
+ "pointer-events-auto relative flex w-[356px] items-center justify-between",
350
+ "space-x-4 overflow-hidden rounded-lg border p-4 pr-12 shadow-lg",
351
+ // Animations with reduced-motion support
352
+ "transition-all duration-300",
353
+ "motion-reduce:transition-none motion-reduce:animate-none",
354
+ "data-[entering]:animate-in data-[entering]:slide-in-from-left",
355
+ "data-[exiting]:animate-out data-[exiting]:slide-out-to-right-full",
356
+ "data-[exiting]:fade-out-80",
357
+ // Touch interaction for swipe
358
+ "touch-pan-y"
359
+ ],
360
+ {
361
+ variants: {
362
+ variant: {
363
+ default: [
364
+ "bg-[var(--content-background)]",
365
+ "text-[var(--content-foreground)]",
366
+ "border-[var(--border)]"
367
+ ],
368
+ primary: [
369
+ "bg-[var(--primary)]",
370
+ "text-[var(--primary-foreground)]",
371
+ "border-[var(--primary)]"
372
+ ],
373
+ destructive: [
374
+ "bg-[var(--destructive-background)]",
375
+ "text-[var(--destructive-foreground)]",
376
+ "border-[var(--destructive-background)]"
377
+ ],
378
+ accent: [
379
+ "bg-[var(--accent-background)]",
380
+ "text-[var(--accent-foreground)]",
381
+ "border-[var(--accent-background)]"
382
+ ]
383
+ }
384
+ },
385
+ defaultVariants: {
386
+ variant: "default"
387
+ }
388
+ }
389
+ );
390
+ var toasterVariants = classVarianceAuthority.cva(
391
+ [
392
+ "fixed z-50 flex flex-col gap-2 p-4",
393
+ "pointer-events-none",
394
+ "max-h-screen overflow-hidden"
395
+ ],
396
+ {
397
+ variants: {
398
+ position: {
399
+ "top-left": "top-0 left-0 items-start",
400
+ "top-center": "top-0 left-1/2 -translate-x-1/2 items-center",
401
+ "top-right": "top-0 right-0 items-end",
402
+ "bottom-left": "bottom-0 left-0 items-start",
403
+ "bottom-center": "bottom-0 left-1/2 -translate-x-1/2 items-center",
404
+ "bottom-right": "bottom-0 right-0 items-end"
405
+ }
406
+ },
407
+ defaultVariants: {
408
+ position: "bottom-right"
409
+ }
410
+ }
411
+ );
412
+ var CloseButton = react.memo(
413
+ react.forwardRef(
414
+ ({ variant = "default", className, onPress }, ref) => {
415
+ const hoverStyles = variant === "default" ? "hover:bg-[var(--accent-background)]/20" : "hover:bg-white/20";
416
+ return /* @__PURE__ */ jsxRuntime.jsx(
417
+ Button,
418
+ {
419
+ ref,
420
+ variant: "ghost",
421
+ visualSize: "icon",
422
+ onPress,
423
+ className: cn(
424
+ "absolute right-2 top-2",
425
+ hoverStyles,
426
+ className
427
+ ),
428
+ "aria-label": "Dismiss notification",
429
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4", "aria-hidden": "true" })
430
+ }
431
+ );
432
+ }
433
+ )
434
+ );
435
+ CloseButton.displayName = "CloseButton";
436
+ var internalQueue = new reactStately.ToastQueue({
437
+ maxVisibleToasts: 3
58
438
  });
439
+ var totalActiveToasts = 0;
440
+ var toastCountListeners = /* @__PURE__ */ new Set();
441
+ function incrementTotalToasts() {
442
+ totalActiveToasts++;
443
+ toastCountListeners.forEach((fn) => fn());
444
+ }
445
+ function decrementTotalToasts() {
446
+ totalActiveToasts = Math.max(0, totalActiveToasts - 1);
447
+ toastCountListeners.forEach((fn) => fn());
448
+ }
449
+ function getTotalActiveToasts() {
450
+ return totalActiveToasts;
451
+ }
452
+ function subscribeToTotalCount(fn) {
453
+ toastCountListeners.add(fn);
454
+ return () => toastCountListeners.delete(fn);
455
+ }
456
+ var toastQueue = {
457
+ /**
458
+ * Add a toast to the queue
459
+ */
460
+ add: (content, options) => internalQueue.add(content, options),
461
+ /**
462
+ * Close a specific toast by key
463
+ */
464
+ close: (key) => {
465
+ internalQueue.close(key);
466
+ },
467
+ /**
468
+ * Close all toasts (visible and queued)
469
+ */
470
+ closeAll: () => {
471
+ internalQueue.visibleToasts.forEach((toast2) => {
472
+ internalQueue.close(toast2.key);
473
+ });
474
+ },
475
+ /**
476
+ * Pause all toast timers
477
+ */
478
+ pauseAll: () => {
479
+ internalQueue.pauseAll();
480
+ },
481
+ /**
482
+ * Resume all toast timers
483
+ */
484
+ resumeAll: () => {
485
+ internalQueue.resumeAll();
486
+ },
487
+ /**
488
+ * Get the visible toasts
489
+ */
490
+ get visibleToasts() {
491
+ return internalQueue.visibleToasts;
492
+ },
493
+ /**
494
+ * Subscribe to queue changes
495
+ */
496
+ subscribe: (fn) => internalQueue.subscribe(fn),
497
+ /**
498
+ * Get total active toasts (visible + queued)
499
+ */
500
+ get totalCount() {
501
+ return totalActiveToasts;
502
+ }
503
+ };
504
+ function getInternalQueue() {
505
+ return internalQueue;
506
+ }
507
+ function enforceMinTimeout(timeout) {
508
+ if (timeout === 0) return 0;
509
+ return Math.max(timeout, 5e3);
510
+ }
511
+ function toast(content, options) {
512
+ const validated = ToastOptionsSchema.parse(options ?? {});
513
+ const timeout = enforceMinTimeout(validated.timeout);
514
+ const dismissReason = "timeout";
515
+ incrementTotalToasts();
516
+ const key = toastQueue.add(
517
+ {
518
+ key: "",
519
+ // Will be set by queue
520
+ content,
521
+ variant: validated.variant,
522
+ timeout,
523
+ onClose: validated.onClose
524
+ },
525
+ {
526
+ timeout,
527
+ onClose: () => {
528
+ decrementTotalToasts();
529
+ if (validated.onClose) {
530
+ validated.onClose(
531
+ key,
532
+ dismissReason
533
+ );
534
+ }
535
+ }
536
+ }
537
+ );
538
+ return key;
539
+ }
540
+ var ToastItem = react.memo(
541
+ react.forwardRef(({ toast: toast2, state }, forwardedRef) => {
542
+ const internalRef = react.useRef(null);
543
+ const ref = forwardedRef || internalRef;
544
+ const { toastProps, contentProps } = reactAria.useToast(
545
+ { toast: toast2 },
546
+ state,
547
+ ref
548
+ );
549
+ const [touchStart, setTouchStart] = react.useState(null);
550
+ const [translateX, setTranslateX] = react.useState(0);
551
+ const SWIPE_THRESHOLD = 50;
552
+ const handleTouchStart = react.useCallback((e) => {
553
+ const touch = e.touches[0];
554
+ if (touch) {
555
+ setTouchStart(touch.clientX);
556
+ }
557
+ }, []);
558
+ const handleTouchMove = react.useCallback(
559
+ (e) => {
560
+ if (touchStart === null) return;
561
+ const touch = e.touches[0];
562
+ if (!touch) return;
563
+ const diff = touch.clientX - touchStart;
564
+ if (diff > 0) {
565
+ setTranslateX(diff);
566
+ }
567
+ },
568
+ [touchStart]
569
+ );
570
+ const handleTouchEnd = react.useCallback(() => {
571
+ if (translateX > SWIPE_THRESHOLD) {
572
+ state.close(toast2.key);
573
+ }
574
+ setTranslateX(0);
575
+ setTouchStart(null);
576
+ }, [translateX, state, toast2.key]);
577
+ const handleCloseClick = react.useCallback(() => {
578
+ state.close(toast2.key);
579
+ }, [state, toast2.key]);
580
+ const { content } = toast2;
581
+ const variant = content.variant ?? "default";
582
+ const accessibleName = typeof content.content === "string" ? content.content : "Notification";
583
+ return /* @__PURE__ */ jsxRuntime.jsxs(
584
+ "div",
585
+ {
586
+ ...toastProps,
587
+ ref,
588
+ className: cn(toastVariants({ variant })),
589
+ "aria-label": accessibleName,
590
+ style: {
591
+ transform: translateX > 0 ? `translateX(${translateX}px)` : void 0,
592
+ opacity: translateX > 0 ? 1 - translateX / 200 : void 0
593
+ },
594
+ onTouchStart: handleTouchStart,
595
+ onTouchMove: handleTouchMove,
596
+ onTouchEnd: handleTouchEnd,
597
+ children: [
598
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ...contentProps, className: "flex-1 min-w-0", children: typeof content.content === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-medium", children: content.content }) : content.content }),
599
+ /* @__PURE__ */ jsxRuntime.jsx(
600
+ CloseButton,
601
+ {
602
+ variant,
603
+ onPress: handleCloseClick
604
+ }
605
+ )
606
+ ]
607
+ }
608
+ );
609
+ })
610
+ );
611
+ ToastItem.displayName = "ToastItem";
612
+ var ToastContext = react.createContext(null);
613
+ function ToastProvider({
614
+ children,
615
+ maxVisibleToasts = 3
616
+ }) {
617
+ ToastProviderPropsSchema.parse({ maxVisibleToasts });
618
+ const queue = react.useMemo(() => {
619
+ return getInternalQueue();
620
+ }, []);
621
+ return /* @__PURE__ */ jsxRuntime.jsx(ToastContext.Provider, { value: queue, children });
622
+ }
623
+ ToastProvider.displayName = "ToastProvider";
624
+ function StackedToastIndicator({ queuedCount }) {
625
+ if (queuedCount <= 0) return null;
626
+ const stackLayers = Math.min(queuedCount, 2);
627
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative w-[356px] pointer-events-none", "aria-hidden": "true", children: [
628
+ /* @__PURE__ */ jsxRuntime.jsx(
629
+ "div",
630
+ {
631
+ className: cn(
632
+ "absolute left-1/2 -translate-x-1/2 w-[340px] h-4 rounded-lg shadow-lg",
633
+ "bg-[var(--content-background)] border border-[var(--border)]",
634
+ "opacity-60",
635
+ "transition-all duration-200"
636
+ ),
637
+ style: { top: 0 }
638
+ }
639
+ ),
640
+ stackLayers >= 2 && /* @__PURE__ */ jsxRuntime.jsx(
641
+ "div",
642
+ {
643
+ className: cn(
644
+ "absolute left-1/2 -translate-x-1/2 w-[324px] h-2 rounded-b-lg shadow-lg",
645
+ "bg-[var(--content-background)] border border-t-0 border-[var(--border)]",
646
+ "opacity-40",
647
+ "transition-all duration-200"
648
+ ),
649
+ style: { top: 14 }
650
+ }
651
+ ),
652
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-4" }),
653
+ /* @__PURE__ */ jsxRuntime.jsxs(
654
+ "div",
655
+ {
656
+ className: "text-sm text-[var(--content-foreground)] opacity-70 text-center py-2 pointer-events-auto",
657
+ "aria-live": "polite",
658
+ children: [
659
+ "+",
660
+ queuedCount,
661
+ " more notification",
662
+ queuedCount > 1 ? "s" : ""
663
+ ]
664
+ }
665
+ )
666
+ ] });
667
+ }
668
+ var Toaster = react.memo(
669
+ react.forwardRef((props, forwardedRef) => {
670
+ const validated = ToasterPropsSchema.parse(props);
671
+ const {
672
+ position = "bottom-right",
673
+ "aria-label": ariaLabel = "Notifications",
674
+ className
675
+ } = validated;
676
+ const internalRef = react.useRef(null);
677
+ const ref = forwardedRef || internalRef;
678
+ const internalQueueRef = getInternalQueue();
679
+ const state = reactStately.useToastQueue(internalQueueRef);
680
+ const totalCount = react.useSyncExternalStore(
681
+ subscribeToTotalCount,
682
+ getTotalActiveToasts,
683
+ getTotalActiveToasts
684
+ );
685
+ const { regionProps } = reactAria.useToastRegion(
686
+ { "aria-label": ariaLabel },
687
+ state,
688
+ ref
689
+ );
690
+ const queuedCount = Math.max(0, totalCount - state.visibleToasts.length);
691
+ const handleClearAll = react.useCallback(() => {
692
+ state.visibleToasts.forEach((toast2) => {
693
+ state.close(toast2.key);
694
+ });
695
+ }, [state]);
696
+ if (state.visibleToasts.length === 0) {
697
+ return null;
698
+ }
699
+ return /* @__PURE__ */ jsxRuntime.jsxs(
700
+ "div",
701
+ {
702
+ ...regionProps,
703
+ ref,
704
+ className: cn(toasterVariants({ position }), className),
705
+ children: [
706
+ state.visibleToasts.map((toast2) => /* @__PURE__ */ jsxRuntime.jsx(ToastItem, { toast: toast2, state }, toast2.key)),
707
+ /* @__PURE__ */ jsxRuntime.jsx(StackedToastIndicator, { queuedCount }),
708
+ state.visibleToasts.length >= 2 && /* @__PURE__ */ jsxRuntime.jsx(
709
+ Button,
710
+ {
711
+ variant: "secondary",
712
+ visualSize: "sm",
713
+ onPress: handleClearAll,
714
+ "aria-label": "Clear all notifications",
715
+ className: "mt-2 pointer-events-auto",
716
+ children: "Clear All"
717
+ }
718
+ )
719
+ ]
720
+ }
721
+ );
722
+ })
723
+ );
724
+ Toaster.displayName = "Toaster";
725
+
726
+ exports.DismissReasonSchema = DismissReasonSchema;
727
+ exports.ToastOptionsSchema = ToastOptionsSchema;
728
+ exports.ToastProvider = ToastProvider;
729
+ exports.ToastProviderPropsSchema = ToastProviderPropsSchema;
730
+ exports.ToastVariantSchema = ToastVariantSchema;
731
+ exports.Toaster = Toaster;
732
+ exports.ToasterPositionSchema = ToasterPositionSchema;
733
+ exports.ToasterPropsSchema = ToasterPropsSchema;
734
+ exports.toast = toast;
735
+ exports.toastQueue = toastQueue;
736
+ exports.toastVariants = toastVariants;
737
+ exports.toasterVariants = toasterVariants;
59
738
  //# sourceMappingURL=index.js.map
60
739
  //# sourceMappingURL=index.js.map