@spark-ui/components 14.0.0-beta.1 → 14.0.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 (382) hide show
  1. package/dist/Button-B6rA3-e5.js +2 -0
  2. package/dist/{Button-C3xHNaGl.js.map → Button-B6rA3-e5.js.map} +1 -1
  3. package/dist/{Button-D32Avk2j.mjs → Button-C3C0aixy.mjs} +4 -4
  4. package/dist/{Button-D32Avk2j.mjs.map → Button-C3C0aixy.mjs.map} +1 -1
  5. package/dist/DialogContent.styles-BSfXHt21.mjs +61 -0
  6. package/dist/DialogContent.styles-BSfXHt21.mjs.map +1 -0
  7. package/dist/DialogContent.styles-bBs6l8Cy.js +2 -0
  8. package/dist/DialogContent.styles-bBs6l8Cy.js.map +1 -0
  9. package/dist/Icon-CF0W0LKr.js +2 -0
  10. package/dist/{Icon-Bf0XrmiR.js.map → Icon-CF0W0LKr.js.map} +1 -1
  11. package/dist/{Icon-D1RueiPY.mjs → Icon-Ck-dhfLd.mjs} +6 -6
  12. package/dist/{Icon-D1RueiPY.mjs.map → Icon-Ck-dhfLd.mjs.map} +1 -1
  13. package/dist/{IconButton-BY3gYXtU.mjs → IconButton-C62-axzv.mjs} +6 -6
  14. package/dist/{IconButton-BY3gYXtU.mjs.map → IconButton-C62-axzv.mjs.map} +1 -1
  15. package/dist/IconButton-D3g86WpZ.js +2 -0
  16. package/dist/{IconButton-Bf-EDzpI.js.map → IconButton-D3g86WpZ.js.map} +1 -1
  17. package/dist/Slot-D2Bbf8Gw.mjs +14 -0
  18. package/dist/{Slot-C98rL4yy.mjs.map → Slot-D2Bbf8Gw.mjs.map} +1 -1
  19. package/dist/Slot-DQ8z2zsy.js +2 -0
  20. package/dist/{Slot-ghrohQLA.js.map → Slot-DQ8z2zsy.js.map} +1 -1
  21. package/dist/Spinner-_Kffli3B.js +2 -0
  22. package/dist/{Spinner-DK8VEsaR.js.map → Spinner-_Kffli3B.js.map} +1 -1
  23. package/dist/{Spinner-CYL5kyzM.mjs → Spinner-jF3-zoh_.mjs} +3 -3
  24. package/dist/{Spinner-CYL5kyzM.mjs.map → Spinner-jF3-zoh_.mjs.map} +1 -1
  25. package/dist/{TextLink-3MEVs3No.mjs → TextLink-BuzFRWO6.mjs} +3 -3
  26. package/dist/{TextLink-3MEVs3No.mjs.map → TextLink-BuzFRWO6.mjs.map} +1 -1
  27. package/dist/TextLink-C3xDLsbC.js +2 -0
  28. package/dist/{TextLink-DD0VO37q.js.map → TextLink-C3xDLsbC.js.map} +1 -1
  29. package/dist/{VisuallyHidden-AoRh4WRK.js → VisuallyHidden-CB6Nx76j.js} +2 -2
  30. package/dist/{VisuallyHidden-AoRh4WRK.js.map → VisuallyHidden-CB6Nx76j.js.map} +1 -1
  31. package/dist/{VisuallyHidden-ByNP7ZUI.mjs → VisuallyHidden-KH1biLx-.mjs} +2 -2
  32. package/dist/{VisuallyHidden-ByNP7ZUI.mjs.map → VisuallyHidden-KH1biLx-.mjs.map} +1 -1
  33. package/dist/accordion/index.d.mts +15 -0
  34. package/dist/accordion/index.js +1 -1
  35. package/dist/accordion/index.js.map +1 -1
  36. package/dist/accordion/index.mjs +90 -608
  37. package/dist/accordion/index.mjs.map +1 -1
  38. package/dist/alert-dialog/AlertDialogPortal.d.ts +1 -1
  39. package/dist/alert-dialog/index.d.mts +38 -0
  40. package/dist/alert-dialog/index.js +1 -34
  41. package/dist/alert-dialog/index.js.map +1 -1
  42. package/dist/alert-dialog/index.mjs +139 -2475
  43. package/dist/alert-dialog/index.mjs.map +1 -1
  44. package/dist/avatar/index.d.mts +15 -0
  45. package/dist/avatar/index.js +1 -1
  46. package/dist/avatar/index.js.map +1 -1
  47. package/dist/avatar/index.mjs +4 -4
  48. package/dist/badge/index.d.mts +1 -0
  49. package/dist/badge/index.js +1 -1
  50. package/dist/badge/index.js.map +1 -1
  51. package/dist/badge/index.mjs +6 -6
  52. package/dist/breadcrumb/index.d.mts +12 -0
  53. package/dist/breadcrumb/index.js +1 -1
  54. package/dist/breadcrumb/index.js.map +1 -1
  55. package/dist/breadcrumb/index.mjs +21 -21
  56. package/dist/button/Button.d.ts +1 -1
  57. package/dist/button/index.d.mts +1 -0
  58. package/dist/button/index.js +1 -1
  59. package/dist/button/index.mjs +1 -1
  60. package/dist/button/variants/index.d.mts +5 -0
  61. package/dist/card/index.d.mts +8 -0
  62. package/dist/card/index.js +1 -1
  63. package/dist/card/index.js.map +1 -1
  64. package/dist/card/index.mjs +2 -2
  65. package/dist/carousel/index.d.mts +19 -0
  66. package/dist/carousel/index.js +1 -1
  67. package/dist/carousel/index.js.map +1 -1
  68. package/dist/carousel/index.mjs +3 -3
  69. package/dist/checkbox/index.d.mts +2 -0
  70. package/dist/checkbox/index.js +1 -1
  71. package/dist/checkbox/index.js.map +1 -1
  72. package/dist/checkbox/index.mjs +128 -364
  73. package/dist/checkbox/index.mjs.map +1 -1
  74. package/dist/chip/index.d.mts +15 -0
  75. package/dist/chip/index.js +1 -1
  76. package/dist/chip/index.js.map +1 -1
  77. package/dist/chip/index.mjs +196 -370
  78. package/dist/chip/index.mjs.map +1 -1
  79. package/dist/chip/variants/index.d.mts +3 -0
  80. package/dist/collapsible/index.d.mts +7 -0
  81. package/dist/collapsible/index.js +1 -1
  82. package/dist/collapsible/index.js.map +1 -1
  83. package/dist/collapsible/index.mjs +38 -213
  84. package/dist/collapsible/index.mjs.map +1 -1
  85. package/dist/combobox/index.d.mts +35 -0
  86. package/dist/combobox/index.js +1 -1
  87. package/dist/combobox/index.js.map +1 -1
  88. package/dist/combobox/index.mjs +7 -7
  89. package/dist/combobox/utils/index.d.mts +14 -0
  90. package/dist/dialog/Dialog.d.ts +13 -13
  91. package/dist/dialog/DialogClose.d.ts +9 -8
  92. package/dist/dialog/DialogContent.d.ts +4 -4
  93. package/dist/dialog/DialogDescription.d.ts +3 -3
  94. package/dist/dialog/DialogOverlay.d.ts +5 -5
  95. package/dist/dialog/DialogPortal.d.ts +4 -4
  96. package/dist/dialog/DialogTitle.d.ts +3 -3
  97. package/dist/dialog/DialogTrigger.d.ts +5 -9
  98. package/dist/dialog/index.d.mts +37 -0
  99. package/dist/dialog/index.js +1 -1
  100. package/dist/dialog/index.js.map +1 -1
  101. package/dist/dialog/index.mjs +149 -159
  102. package/dist/dialog/index.mjs.map +1 -1
  103. package/dist/divider/index.d.mts +6 -0
  104. package/dist/divider/index.js +1 -1
  105. package/dist/divider/index.js.map +1 -1
  106. package/dist/divider/index.mjs +58 -76
  107. package/dist/divider/index.mjs.map +1 -1
  108. package/dist/drawer/Drawer.d.ts +12 -19
  109. package/dist/drawer/DrawerClose.d.ts +9 -5
  110. package/dist/drawer/DrawerContent.d.ts +5 -5
  111. package/dist/drawer/DrawerDescription.d.ts +4 -4
  112. package/dist/drawer/DrawerOverlay.d.ts +5 -5
  113. package/dist/drawer/DrawerPortal.d.ts +4 -4
  114. package/dist/drawer/DrawerTitle.d.ts +5 -5
  115. package/dist/drawer/DrawerTrigger.d.ts +5 -5
  116. package/dist/drawer/index.d.mts +37 -0
  117. package/dist/drawer/index.d.ts +2 -0
  118. package/dist/drawer/index.js +1 -1
  119. package/dist/drawer/index.js.map +1 -1
  120. package/dist/drawer/index.mjs +143 -114
  121. package/dist/drawer/index.mjs.map +1 -1
  122. package/dist/drawer/useRenderSlot.d.ts +3 -0
  123. package/dist/dropdown/index.d.mts +29 -0
  124. package/dist/dropdown/index.js +1 -1
  125. package/dist/dropdown/index.js.map +1 -1
  126. package/dist/dropdown/index.mjs +5 -5
  127. package/dist/file-upload/index.d.mts +22 -0
  128. package/dist/file-upload/index.js +1 -1
  129. package/dist/file-upload/index.js.map +1 -1
  130. package/dist/file-upload/index.mjs +6 -6
  131. package/dist/form-field/index.d.mts +31 -0
  132. package/dist/form-field/index.js +1 -1
  133. package/dist/form-field/index.js.map +1 -1
  134. package/dist/form-field/index.mjs +47 -47
  135. package/dist/icon/index.d.mts +1 -0
  136. package/dist/icon/index.js +1 -1
  137. package/dist/icon/index.mjs +1 -1
  138. package/dist/icon-button/index.d.mts +1 -0
  139. package/dist/icon-button/index.js +1 -1
  140. package/dist/icon-button/index.mjs +1 -1
  141. package/dist/input/index.d.mts +21 -0
  142. package/dist/input/index.js +1 -1
  143. package/dist/input/index.js.map +1 -1
  144. package/dist/input/index.mjs +4 -4
  145. package/dist/input-otp/index.d.mts +14 -0
  146. package/dist/input-otp/index.js +1 -1
  147. package/dist/input-otp/index.js.map +1 -1
  148. package/dist/input-otp/index.mjs +139 -137
  149. package/dist/input-otp/index.mjs.map +1 -1
  150. package/dist/kbd/index.d.mts +1 -0
  151. package/dist/label/index.d.mts +7 -0
  152. package/dist/label/index.js +1 -1
  153. package/dist/label/index.js.map +1 -1
  154. package/dist/label/index.mjs +37 -2
  155. package/dist/label/index.mjs.map +1 -1
  156. package/dist/link-box/index.d.mts +9 -0
  157. package/dist/link-box/index.js +1 -1
  158. package/dist/link-box/index.js.map +1 -1
  159. package/dist/link-box/index.mjs +7 -7
  160. package/dist/pagination/index.d.mts +18 -0
  161. package/dist/pagination/index.js +1 -1
  162. package/dist/pagination/index.js.map +1 -1
  163. package/dist/pagination/index.mjs +126 -844
  164. package/dist/pagination/index.mjs.map +1 -1
  165. package/dist/popover/index.d.mts +17 -0
  166. package/dist/popover/index.js +1 -1
  167. package/dist/popover/index.js.map +1 -1
  168. package/dist/popover/index.mjs +119 -1748
  169. package/dist/popover/index.mjs.map +1 -1
  170. package/dist/portal/index.d.mts +1 -0
  171. package/dist/portal/index.js +1 -1
  172. package/dist/portal/index.js.map +1 -1
  173. package/dist/portal/index.mjs +3 -3
  174. package/dist/portal/index.mjs.map +1 -1
  175. package/dist/progress/index.d.mts +13 -0
  176. package/dist/progress/index.js +1 -6
  177. package/dist/progress/index.js.map +1 -1
  178. package/dist/progress/index.mjs +87 -162
  179. package/dist/progress/index.mjs.map +1 -1
  180. package/dist/progress-tracker/index.d.mts +10 -0
  181. package/dist/progress-tracker/index.js +1 -1
  182. package/dist/progress-tracker/index.js.map +1 -1
  183. package/dist/progress-tracker/index.mjs +14 -14
  184. package/dist/radio-group/index.d.mts +7 -0
  185. package/dist/radio-group/index.js +1 -1
  186. package/dist/radio-group/index.js.map +1 -1
  187. package/dist/radio-group/index.mjs +85 -312
  188. package/dist/radio-group/index.mjs.map +1 -1
  189. package/dist/rating/index.d.mts +1 -0
  190. package/dist/rating/index.js +1 -1
  191. package/dist/rating/index.js.map +1 -1
  192. package/dist/rating/index.mjs +11 -11
  193. package/dist/scrolling-list/index.d.mts +15 -0
  194. package/dist/scrolling-list/index.js +1 -1
  195. package/dist/scrolling-list/index.js.map +1 -1
  196. package/dist/scrolling-list/index.mjs +168 -333
  197. package/dist/scrolling-list/index.mjs.map +1 -1
  198. package/dist/segmented-gauge/index.d.mts +13 -0
  199. package/dist/segmented-gauge/index.js +1 -1
  200. package/dist/segmented-gauge/index.js.map +1 -1
  201. package/dist/segmented-gauge/index.mjs +1 -1
  202. package/dist/select/index.d.mts +21 -0
  203. package/dist/select/index.js +1 -1
  204. package/dist/select/index.js.map +1 -1
  205. package/dist/select/index.mjs +21 -21
  206. package/dist/skeleton/index.d.mts +8 -0
  207. package/dist/skeleton/index.js +1 -1
  208. package/dist/skeleton/index.js.map +1 -1
  209. package/dist/skeleton/index.mjs +2 -2
  210. package/dist/slider/Slider.d.ts +6 -1
  211. package/dist/slider/SliderContext.d.ts +4 -1
  212. package/dist/slider/index.d.mts +8 -0
  213. package/dist/slider/index.js +1 -1
  214. package/dist/slider/index.js.map +1 -1
  215. package/dist/slider/index.mjs +96 -496
  216. package/dist/slider/index.mjs.map +1 -1
  217. package/dist/slot/index.d.mts +1 -0
  218. package/dist/slot/index.js +1 -1
  219. package/dist/slot/index.mjs +1 -1
  220. package/dist/snackbar/index.d.mts +13 -0
  221. package/dist/snackbar/index.js +1 -1
  222. package/dist/snackbar/index.js.map +1 -1
  223. package/dist/snackbar/index.mjs +189 -1105
  224. package/dist/snackbar/index.mjs.map +1 -1
  225. package/dist/spinner/index.d.mts +1 -0
  226. package/dist/spinner/index.js +1 -1
  227. package/dist/spinner/index.mjs +1 -1
  228. package/dist/stepper/index.d.mts +9 -0
  229. package/dist/stepper/index.js +1 -7
  230. package/dist/stepper/index.js.map +1 -1
  231. package/dist/stepper/index.mjs +137 -2317
  232. package/dist/stepper/index.mjs.map +1 -1
  233. package/dist/switch/index.d.mts +1 -0
  234. package/dist/switch/index.js +1 -1
  235. package/dist/switch/index.js.map +1 -1
  236. package/dist/switch/index.mjs +85 -208
  237. package/dist/switch/index.mjs.map +1 -1
  238. package/dist/tabs/index.d.mts +13 -0
  239. package/dist/tabs/index.js +1 -1
  240. package/dist/tabs/index.js.map +1 -1
  241. package/dist/tabs/index.mjs +179 -329
  242. package/dist/tabs/index.mjs.map +1 -1
  243. package/dist/tag/index.d.mts +1 -0
  244. package/dist/tag/index.js +1 -1
  245. package/dist/tag/index.js.map +1 -1
  246. package/dist/tag/index.mjs +2 -2
  247. package/dist/tag/variants/index.d.mts +3 -0
  248. package/dist/text-link/index.d.mts +1 -0
  249. package/dist/text-link/index.js +1 -1
  250. package/dist/text-link/index.mjs +1 -1
  251. package/dist/textarea/index.d.mts +14 -0
  252. package/dist/textarea/index.js +1 -1
  253. package/dist/textarea/index.js.map +1 -1
  254. package/dist/textarea/index.mjs +6 -6
  255. package/dist/toast/index.d.mts +20 -0
  256. package/dist/toast/index.js +1 -1
  257. package/dist/toast/index.js.map +1 -1
  258. package/dist/toast/index.mjs +146 -1008
  259. package/dist/toast/index.mjs.map +1 -1
  260. package/dist/useRenderSlot-DATwjgpo.js +2 -0
  261. package/dist/useRenderSlot-DATwjgpo.js.map +1 -0
  262. package/dist/useRenderSlot-LwWj8QbC.mjs +10 -0
  263. package/dist/useRenderSlot-LwWj8QbC.mjs.map +1 -0
  264. package/dist/visually-hidden/index.d.mts +1 -0
  265. package/dist/visually-hidden/index.js +1 -1
  266. package/dist/visually-hidden/index.mjs +1 -1
  267. package/package.json +7 -6
  268. package/dist/Button-C3xHNaGl.js +0 -2
  269. package/dist/DialogContent.styles-BrhKaHc_.js +0 -2
  270. package/dist/DialogContent.styles-BrhKaHc_.js.map +0 -1
  271. package/dist/DialogContent.styles-WGWJS9dj.mjs +0 -48
  272. package/dist/DialogContent.styles-WGWJS9dj.mjs.map +0 -1
  273. package/dist/Icon-Bf0XrmiR.js +0 -2
  274. package/dist/IconButton-Bf-EDzpI.js +0 -2
  275. package/dist/Slot-C98rL4yy.mjs +0 -14
  276. package/dist/Slot-ghrohQLA.js +0 -2
  277. package/dist/Spinner-DK8VEsaR.js +0 -2
  278. package/dist/TextLink-DD0VO37q.js +0 -2
  279. package/dist/composite-Br3kM5N9.mjs +0 -40
  280. package/dist/composite-Br3kM5N9.mjs.map +0 -1
  281. package/dist/composite-fJD9R7R0.js +0 -2
  282. package/dist/composite-fJD9R7R0.js.map +0 -1
  283. package/dist/detectBrowser-Bc7rk5fI.mjs +0 -44
  284. package/dist/detectBrowser-Bc7rk5fI.mjs.map +0 -1
  285. package/dist/detectBrowser-DTbs_30X.js +0 -2
  286. package/dist/detectBrowser-DTbs_30X.js.map +0 -1
  287. package/dist/downshift.esm-Ncwetv0s.mjs +0 -3038
  288. package/dist/downshift.esm-Ncwetv0s.mjs.map +0 -1
  289. package/dist/downshift.esm-PfCOUbxq.js +0 -37
  290. package/dist/downshift.esm-PfCOUbxq.js.map +0 -1
  291. package/dist/floating-ui.utils.dom-CCN4I08l.js +0 -2
  292. package/dist/floating-ui.utils.dom-CCN4I08l.js.map +0 -1
  293. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +0 -136
  294. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +0 -1
  295. package/dist/index-0KYGKeVg.js +0 -2
  296. package/dist/index-0KYGKeVg.js.map +0 -1
  297. package/dist/index-1WIgmEZh.js +0 -2
  298. package/dist/index-1WIgmEZh.js.map +0 -1
  299. package/dist/index-BRi38DTc.mjs +0 -21
  300. package/dist/index-BRi38DTc.mjs.map +0 -1
  301. package/dist/index-BZAtNKwE.mjs +0 -71
  302. package/dist/index-BZAtNKwE.mjs.map +0 -1
  303. package/dist/index-BZPx6jYI.mjs +0 -9
  304. package/dist/index-BZPx6jYI.mjs.map +0 -1
  305. package/dist/index-BlkdpEIe.mjs +0 -55
  306. package/dist/index-BlkdpEIe.mjs.map +0 -1
  307. package/dist/index-BmAFn37q.mjs +0 -49
  308. package/dist/index-BmAFn37q.mjs.map +0 -1
  309. package/dist/index-C-J_tHdS.js +0 -6
  310. package/dist/index-C-J_tHdS.js.map +0 -1
  311. package/dist/index-C1qb0595.mjs +0 -28
  312. package/dist/index-C1qb0595.mjs.map +0 -1
  313. package/dist/index-C34GgsKQ.mjs +0 -54
  314. package/dist/index-C34GgsKQ.mjs.map +0 -1
  315. package/dist/index-CCKe-Mpx.mjs +0 -7
  316. package/dist/index-CCKe-Mpx.mjs.map +0 -1
  317. package/dist/index-CDBBjNXc.js +0 -2
  318. package/dist/index-CDBBjNXc.js.map +0 -1
  319. package/dist/index-CYjGhVvU.mjs +0 -243
  320. package/dist/index-CYjGhVvU.mjs.map +0 -1
  321. package/dist/index-ChLwd62c.js +0 -2
  322. package/dist/index-ChLwd62c.js.map +0 -1
  323. package/dist/index-Cjj_rUPu.js +0 -2
  324. package/dist/index-Cjj_rUPu.js.map +0 -1
  325. package/dist/index-CyMbLkj0.js +0 -2
  326. package/dist/index-CyMbLkj0.js.map +0 -1
  327. package/dist/index-DFZozV_h.mjs +0 -69
  328. package/dist/index-DFZozV_h.mjs.map +0 -1
  329. package/dist/index-DKuHkHFX.js +0 -2
  330. package/dist/index-DKuHkHFX.js.map +0 -1
  331. package/dist/index-DLHLIYPI.mjs +0 -16
  332. package/dist/index-DLHLIYPI.mjs.map +0 -1
  333. package/dist/index-DO-atGp-.js +0 -2
  334. package/dist/index-DO-atGp-.js.map +0 -1
  335. package/dist/index-DWlg8lkk.mjs +0 -179
  336. package/dist/index-DWlg8lkk.mjs.map +0 -1
  337. package/dist/index-DYxWvftI.js +0 -2
  338. package/dist/index-DYxWvftI.js.map +0 -1
  339. package/dist/index-D_lWkK39.mjs +0 -803
  340. package/dist/index-D_lWkK39.mjs.map +0 -1
  341. package/dist/index-DdkVj7D0.js +0 -18
  342. package/dist/index-DdkVj7D0.js.map +0 -1
  343. package/dist/index-De-6atSi.js +0 -2
  344. package/dist/index-De-6atSi.js.map +0 -1
  345. package/dist/index-DhGWNzsz.mjs +0 -83
  346. package/dist/index-DhGWNzsz.mjs.map +0 -1
  347. package/dist/index-Dkj4QRX8.js +0 -2
  348. package/dist/index-Dkj4QRX8.js.map +0 -1
  349. package/dist/index-DlIFg0Eu.mjs +0 -60
  350. package/dist/index-DlIFg0Eu.mjs.map +0 -1
  351. package/dist/index-DnaHaH_0.js +0 -2
  352. package/dist/index-DnaHaH_0.js.map +0 -1
  353. package/dist/index-MHF2-CYX.js +0 -2
  354. package/dist/index-MHF2-CYX.js.map +0 -1
  355. package/dist/index-MQ0c3ZX_.js +0 -2
  356. package/dist/index-MQ0c3ZX_.js.map +0 -1
  357. package/dist/index-MSR-vgWR.mjs +0 -37
  358. package/dist/index-MSR-vgWR.mjs.map +0 -1
  359. package/dist/index-VL0YEmOW.mjs +0 -125
  360. package/dist/index-VL0YEmOW.mjs.map +0 -1
  361. package/dist/index-tXqxYME3.js +0 -42
  362. package/dist/index-tXqxYME3.js.map +0 -1
  363. package/dist/inertValue-Bif5Sqs6.mjs +0 -522
  364. package/dist/inertValue-Bif5Sqs6.mjs.map +0 -1
  365. package/dist/inertValue-ShwihJSN.js +0 -5
  366. package/dist/inertValue-ShwihJSN.js.map +0 -1
  367. package/dist/useCollapsiblePanel-D1dCo0lf.js +0 -4
  368. package/dist/useCollapsiblePanel-D1dCo0lf.js.map +0 -1
  369. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +0 -287
  370. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +0 -1
  371. package/dist/useFocusWithin-CFNEka2I.js +0 -2
  372. package/dist/useFocusWithin-CFNEka2I.js.map +0 -1
  373. package/dist/useFocusWithin-CoL4390f.mjs +0 -796
  374. package/dist/useFocusWithin-CoL4390f.mjs.map +0 -1
  375. package/dist/useOpenChangeComplete-Dk-u_f2y.js +0 -2
  376. package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +0 -1
  377. package/dist/useOpenChangeComplete-RUbg6RBw.mjs +0 -582
  378. package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +0 -1
  379. package/dist/useTransitionStatus-CktVVKxz.mjs +0 -46
  380. package/dist/useTransitionStatus-CktVVKxz.mjs.map +0 -1
  381. package/dist/useTransitionStatus-CqbEyvIj.js +0 -2
  382. package/dist/useTransitionStatus-CqbEyvIj.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),d=require("react"),g=require("../index-DnaHaH_0.js"),w=require("../index-Dkj4QRX8.js"),re=require("../index-DO-atGp-.js"),C=require("../index-CyMbLkj0.js"),ne=require("../index-MHF2-CYX.js"),j=require("../index-ChLwd62c.js"),oe=require("../index-De-6atSi.js"),ae=require("../index-CDBBjNXc.js"),se=require("@spark-ui/icons/ArrowVerticalLeft"),ie=require("@spark-ui/icons/ArrowVerticalRight"),A=require("../Button-C3xHNaGl.js"),N=require("../Icon-Bf0XrmiR.js"),$=require("@spark-ui/hooks/use-merge-refs"),ce=require("@spark-ui/icons/MoreMenuHorizontal"),le=require("../IconButton-Bf-EDzpI.js"),y=require("../popover/index.js"),de=require("@spark-ui/internal-utils");function ue(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return r.default=e,Object.freeze(r)}const T=ue(d);var P="Tabs",[fe]=re.createContextScope(P,[C.createRovingFocusGroupScope]),_=C.createRovingFocusGroupScope(),[ve,M]=fe(P),W=T.forwardRef((e,r)=>{const{__scopeTabs:s,value:n,onValueChange:o,defaultValue:c,orientation:i="horizontal",dir:u,activationMode:t="automatic",...b}=e,f=oe.useDirection(u),[l,v]=w.useControllableState({prop:n,onChange:o,defaultProp:c??"",caller:P});return a.jsx(ve,{scope:s,baseId:ae.useId(),value:l,onValueChange:v,orientation:i,dir:f,activationMode:t,children:a.jsx(j.Primitive.div,{dir:f,"data-orientation":i,...b,ref:r})})});W.displayName=P;var F="TabsList",D=T.forwardRef((e,r)=>{const{__scopeTabs:s,loop:n=!0,...o}=e,c=M(F,s),i=_(s);return a.jsx(C.Root,{asChild:!0,...i,orientation:c.orientation,dir:c.dir,loop:n,children:a.jsx(j.Primitive.div,{role:"tablist","aria-orientation":c.orientation,...o,ref:r})})});D.displayName=F;var O="TabsTrigger",B=T.forwardRef((e,r)=>{const{__scopeTabs:s,value:n,disabled:o=!1,...c}=e,i=M(O,s),u=_(s),t=H(i.baseId,n),b=U(i.baseId,n),f=n===i.value;return a.jsx(C.Item,{asChild:!0,...u,focusable:!o,active:f,children:a.jsx(j.Primitive.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":b,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:t,...c,ref:r,onMouseDown:w.composeEventHandlers(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?i.onValueChange(n):l.preventDefault()}),onKeyDown:w.composeEventHandlers(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&i.onValueChange(n)}),onFocus:w.composeEventHandlers(e.onFocus,()=>{const l=i.activationMode!=="manual";!f&&!o&&l&&i.onValueChange(n)})})})});B.displayName=O;var G="TabsContent",K=T.forwardRef((e,r)=>{const{__scopeTabs:s,value:n,forceMount:o,children:c,...i}=e,u=M(G,s),t=H(u.baseId,n),b=U(u.baseId,n),f=n===u.value,l=T.useRef(f);return T.useEffect(()=>{const v=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(v)},[]),a.jsx(ne.Presence,{present:o||f,children:({present:v})=>a.jsx(j.Primitive.div,{"data-state":f?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":t,hidden:!v,id:b,tabIndex:0,...i,ref:r,style:{...e.style,animationDuration:l.current?"0s":void 0},children:v&&c})})});K.displayName=G;function H(e,r){return`${e}-trigger-${r}`}function U(e,r){return`${e}-content-${r}`}var be=W,he=D,pe=B,me=K;const J=d.createContext({}),I=()=>{const e=d.useContext(J);if(!e)throw Error("useTabsContext must be used within a TabsContext Provider");return e},xe=g.cva(["flex","data-[orientation=horizontal]:flex-col","data-[orientation=vertical]:flex-row","max-w-full"]),Q=({intent:e="basic",size:r="md",asChild:s=!1,forceMount:n=!1,orientation:o="horizontal",children:c,className:i,ref:u,...t})=>a.jsx(J.Provider,{value:{intent:e,size:r,orientation:o,forceMount:n},children:a.jsx(be,{ref:u,asChild:s,orientation:o,className:xe({className:i}),"data-spark-component":"tabs",activationMode:"automatic",...t,children:c})});Q.displayName="Tabs";const ge=g.cva(["w-full p-lg","focus-visible:u-outline-inset"],{variants:{forceMount:{true:"data-[state=inactive]:hidden",false:""}}}),q=({children:e,asChild:r=!1,className:s,ref:n,...o})=>{const{forceMount:c}=I();return a.jsx(me,{"data-spark-component":"tabs-content",ref:n,forceMount:c||o.forceMount,className:ge({className:s,forceMount:c}),asChild:r,...o,children:e})};q.displayName="Tabs.Content";const Te=g.cva(["relative flex"]),we=g.cva(["flex w-full","data-[orientation=horizontal]:flex-row","data-[orientation=vertical]:flex-col","overflow-y-hidden u-no-scrollbar data-[orientation=vertical]:overflow-x-hidden","after:flex after:shrink after:grow after:border-outline","data-[orientation=horizontal]:after:border-b-sm","data-[orientation=vertical]:after:border-r-sm"]),V=g.cva(["h-auto! flex-none","border-b-sm border-outline","outline-hidden","focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset!"]),ye=(e,r)=>{const[s,n]=d.useState({width:void 0,height:void 0}),o=d.useRef(null),c=d.useRef(r);return d.useEffect(()=>{c.current=r},[r]),d.useEffect(()=>{const i=e&&"current"in e?e.current:e;if(!(!i||o.current))return o.current=new ResizeObserver(([u])=>{const{inlineSize:t,blockSize:b}=u?.borderBoxSize?.[0]??{};c.current?.(u),n({width:t,height:b})}),o.current.observe(i),()=>{o.current&&o.current.unobserve(i)}},[e,o,c]),s},L=({asChild:e=!1,loop:r=!1,children:s,className:n,ref:o,...c})=>{const i=d.useRef(null),u=d.useRef(null),t=o||u,{orientation:b}=I(),{width:f}=ye(i),[l,v]=d.useState({prev:"hidden",next:"hidden"});d.useEffect(()=>{typeof t=="function"||!t.current||v(b!=="horizontal"?{prev:"hidden",next:"hidden"}:{prev:t.current.scrollWidth>t.current.clientWidth?"visible":"hidden",next:t.current.scrollWidth>t.current.clientWidth?"visible":"hidden"})},[b,t,f]),d.useEffect(()=>{if(typeof t=="function"||!t.current||l.prev==="hidden"||r)return;const p=h=>{v({prev:h.scrollLeft>0?"visible":"disabled",next:h.scrollLeft+h.clientWidth<h.scrollWidth?"visible":"disabled"})},x=t.current;return p(x),x.addEventListener("scroll",({target:h})=>p(h)),()=>x.removeEventListener("scroll",({target:h})=>p(h))},[t,l.prev,r]);const R=()=>{if(typeof t=="function"||!t.current)return;const p=r&&t.current.scrollLeft<=0;t.current.scrollTo({left:p?t.current.scrollLeft+t.current.scrollWidth-t.current.clientWidth:t.current.scrollLeft-t.current.clientWidth,behavior:"smooth"})},z=()=>{if(typeof t=="function"||!t.current)return;const p=r&&t.current.scrollLeft+t.current.clientWidth>=t.current.scrollWidth;t.current.scrollTo({left:p?0:t.current.scrollLeft+t.current.clientWidth,behavior:"smooth"})};return a.jsxs("div",{className:Te({className:n}),ref:i,children:[l.prev!=="hidden"&&a.jsx(A.Button,{shape:"square",intent:"surface",size:"sm",className:V(),onClick:R,disabled:l.prev==="disabled","aria-label":"Scroll left",children:a.jsx(N.Icon,{children:a.jsx(se.ArrowVerticalLeft,{})})}),a.jsx(he,{"data-spark-component":"tabs-list",ref:t,className:we(),asChild:e,loop:r,...c,children:s}),l.next!=="hidden"&&a.jsx(A.Button,{shape:"square",intent:"surface",size:"sm",className:V(),onClick:z,disabled:l.next==="disabled","aria-label":"Scroll right",children:a.jsx(N.Icon,{children:a.jsx(ie.ArrowVerticalRight,{})})})]})};L.displayName="Tabs.List";const S=d.createContext(void 0),X=()=>{const e=d.useContext(S);if(!e)throw new Error("TabsPopover components must be used within TabsPopover");return e},Y=d.forwardRef(({"aria-label":e,children:r,...s},n)=>{const{popoverTriggerRef:o}=X(),c=$.useMergeRefs(n,o);return a.jsx(y.Popover.Trigger,{asChild:!0,...s,children:a.jsx(le.IconButton,{ref:c,size:"sm",intent:"surfaceInverse",design:"ghost","aria-label":e,tabIndex:-1,children:a.jsx(N.Icon,{children:r||a.jsx(ce.MoreMenuHorizontal,{})})})})});Y.displayName="Popover.Trigger";const Z=d.forwardRef(({side:e,align:r="start",className:s,...n},o)=>{const{popoverSide:c}=X(),i=g.cx("gap-sm flex flex-col",s);return a.jsx(y.Popover.Content,{ref:o,...n,side:e??c,align:r,className:i})});Z.displayName="Popover.Content";const ee=({popoverSide:e,popoverTriggerRef:r,children:s})=>{const n=d.useMemo(()=>({popoverSide:e,popoverTriggerRef:r}),[e,r]),c=Object.assign((i=>a.jsx(S.Provider,{value:n,children:a.jsx(y.Popover,{...i,children:i.children})})),y.Popover,{Content:Z,Trigger:Y});return a.jsx(S.Provider,{value:n,children:s(c)})};ee.displayName="Popover";const Ce=g.cva(["px-md","relative flex flex-none items-center","border-outline","hover:not-disabled:bg-surface-hovered","after:absolute","data-[state=active]:font-bold","data-[state=inactive]:not-disabled:cursor-pointer","data-[orientation=horizontal]:border-b-sm data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:bottom-[-1px] data-[orientation=horizontal]:after:h-sz-2","data-[orientation=vertical]:border-r-sm data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:right-[-1px] data-[orientation=vertical]:after:w-sz-2","focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset","disabled:cursor-not-allowed disabled:opacity-dim-3","gap-md [&>*:first-child]:ml-md [&>*:last-child]:mr-md","[&>svg:last-child:first-child]:mx-auto"],{variants:{intent:de.makeVariants({main:["data-[state=active]:text-main data-[state=active]:after:bg-main"],support:["data-[state=active]:text-support data-[state=active]:after:bg-support"],basic:["data-[state=active]:text-basic data-[state=active]:after:bg-basic"]}),size:{xs:["h-sz-32 min-w-sz-32 text-caption"],sm:["h-sz-36 min-w-sz-36 text-body-2"],md:["h-sz-40 min-w-sz-40 text-body-1"]},hasMenu:{true:"pr-3xl"},orientation:{horizontal:"",vertical:""}},compoundVariants:[{hasMenu:!0,orientation:"vertical",class:"w-full"}],defaultVariants:{intent:"basic",size:"md",hasMenu:!1,orientation:"horizontal"}}),k=({asChild:e=!1,value:r,disabled:s=!1,children:n,className:o,ref:c,onKeyDown:i,renderMenu:u,...t})=>{const{intent:b,size:f,orientation:l}=I(),v=d.useRef(null),R=d.useRef(null),z=$.useMergeRefs(c,R),p=m=>{m.key==="F10"&&m.shiftKey&&u&&v.current&&(m.preventDefault(),v.current.click()),i?.(m)},x=!!u,h=l==="vertical"?"right":"bottom",E=a.jsx(pe,{"data-spark-component":"tabs-trigger",ref:z,className:Ce({intent:b,size:f,hasMenu:x,orientation:l??"horizontal",className:o}),asChild:e,disabled:s,value:r,onFocus:({target:m})=>m.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),onKeyDown:p,"aria-haspopup":x?"true":void 0,...t,children:n});return x?a.jsxs("div",{className:l==="vertical"?"relative w-full":"relative",children:[E,a.jsx("div",{className:"right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2",children:a.jsx(ee,{popoverSide:h,popoverTriggerRef:v,children:m=>u?.({Popover:m})})})]}):E};k.displayName="Tabs.Trigger";const te=Object.assign(Q,{List:L,Trigger:k,Content:q});te.displayName="Tabs";L.displayName="Tabs.List";k.displayName="Tabs.Trigger";q.displayName="Tabs.Content";exports.Tabs=te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("radix-ui"),s=require("react"),m=require("class-variance-authority"),D=require("@spark-ui/icons/ArrowVerticalLeft"),F=require("@spark-ui/icons/ArrowVerticalRight"),M=require("../Button-B6rA3-e5.js"),j=require("../Icon-CF0W0LKr.js"),q=require("@spark-ui/hooks/use-merge-refs"),K=require("@spark-ui/icons/MoreMenuHorizontal"),H=require("../IconButton-D3g86WpZ.js"),g=require("../popover/index.js"),U=require("@spark-ui/internal-utils"),W=s.createContext({}),R=()=>{const t=s.useContext(W);if(!t)throw Error("useTabsContext must be used within a TabsContext Provider");return t},$=m.cva(["flex","data-[orientation=horizontal]:flex-col","data-[orientation=vertical]:flex-row","max-w-full"]),V=({intent:t="basic",size:o="md",asChild:c=!1,forceMount:i=!1,orientation:n="horizontal",children:a,className:l,ref:d,...e})=>r.jsx(W.Provider,{value:{intent:t,size:o,orientation:n,forceMount:i},children:r.jsx(T.Tabs.Root,{ref:d,asChild:c,orientation:n,className:$({className:l}),"data-spark-component":"tabs",activationMode:"automatic",...e,children:a})});V.displayName="Tabs";const G=m.cva(["w-full p-lg","focus-visible:u-outline-inset"],{variants:{forceMount:{true:"data-[state=inactive]:hidden",false:""}}}),P=({children:t,asChild:o=!1,className:c,ref:i,...n})=>{const{forceMount:a}=R();return r.jsx(T.Tabs.Content,{"data-spark-component":"tabs-content",ref:i,forceMount:a||n.forceMount,className:G({className:c,forceMount:a}),asChild:o,...n,children:t})};P.displayName="Tabs.Content";const J=m.cva(["relative flex"]),Q=m.cva(["flex w-full","data-[orientation=horizontal]:flex-row","data-[orientation=vertical]:flex-col","overflow-y-hidden u-no-scrollbar data-[orientation=vertical]:overflow-x-hidden","after:flex after:shrink after:grow after:border-outline","data-[orientation=horizontal]:after:border-b-sm","data-[orientation=vertical]:after:border-r-sm"]),S=m.cva(["h-auto! flex-none","border-b-sm border-outline","outline-hidden","focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset!"]),X=(t,o)=>{const[c,i]=s.useState({width:void 0,height:void 0}),n=s.useRef(null),a=s.useRef(o);return s.useEffect(()=>{a.current=o},[o]),s.useEffect(()=>{const l=t&&"current"in t?t.current:t;if(!(!l||n.current))return n.current=new ResizeObserver(([d])=>{const{inlineSize:e,blockSize:x}=d?.borderBoxSize?.[0]??{};a.current?.(d),i({width:e,height:x})}),n.current.observe(l),()=>{n.current&&n.current.unobserve(l)}},[t,n,a]),c},N=({asChild:t=!1,loop:o=!1,children:c,className:i,ref:n,...a})=>{const l=s.useRef(null),d=s.useRef(null),e=n||d,{orientation:x}=R(),{width:w}=X(l),[u,h]=s.useState({prev:"hidden",next:"hidden"});s.useEffect(()=>{typeof e=="function"||!e.current||h(x!=="horizontal"?{prev:"hidden",next:"hidden"}:{prev:e.current.scrollWidth>e.current.clientWidth?"visible":"hidden",next:e.current.scrollWidth>e.current.clientWidth?"visible":"hidden"})},[x,e,w]),s.useEffect(()=>{if(typeof e=="function"||!e.current||u.prev==="hidden"||o)return;const v=f=>{h({prev:f.scrollLeft>0?"visible":"disabled",next:f.scrollLeft+f.clientWidth<f.scrollWidth?"visible":"disabled"})},p=e.current;return v(p),p.addEventListener("scroll",({target:f})=>v(f)),()=>p.removeEventListener("scroll",({target:f})=>v(f))},[e,u.prev,o]);const z=()=>{if(typeof e=="function"||!e.current)return;const v=o&&e.current.scrollLeft<=0;e.current.scrollTo({left:v?e.current.scrollLeft+e.current.scrollWidth-e.current.clientWidth:e.current.scrollLeft-e.current.clientWidth,behavior:"smooth"})},y=()=>{if(typeof e=="function"||!e.current)return;const v=o&&e.current.scrollLeft+e.current.clientWidth>=e.current.scrollWidth;e.current.scrollTo({left:v?0:e.current.scrollLeft+e.current.clientWidth,behavior:"smooth"})};return r.jsxs("div",{className:J({className:i}),ref:l,children:[u.prev!=="hidden"&&r.jsx(M.Button,{shape:"square",intent:"surface",size:"sm",className:S(),onClick:z,disabled:u.prev==="disabled","aria-label":"Scroll left",children:r.jsx(j.Icon,{children:r.jsx(D.ArrowVerticalLeft,{})})}),r.jsx(T.Tabs.List,{"data-spark-component":"tabs-list",ref:e,className:Q(),asChild:t,loop:o,...a,children:c}),u.next!=="hidden"&&r.jsx(M.Button,{shape:"square",intent:"surface",size:"sm",className:S(),onClick:y,disabled:u.next==="disabled","aria-label":"Scroll right",children:r.jsx(j.Icon,{children:r.jsx(F.ArrowVerticalRight,{})})})]})};N.displayName="Tabs.List";const C=s.createContext(void 0),E=()=>{const t=s.useContext(C);if(!t)throw new Error("TabsPopover components must be used within TabsPopover");return t},I=s.forwardRef(({"aria-label":t,children:o,...c},i)=>{const{popoverTriggerRef:n}=E(),a=q.useMergeRefs(i,n);return r.jsx(g.Popover.Trigger,{asChild:!0,...c,children:r.jsx(H.IconButton,{ref:a,size:"sm",intent:"surfaceInverse",design:"ghost","aria-label":t,tabIndex:-1,children:r.jsx(j.Icon,{children:o||r.jsx(K.MoreMenuHorizontal,{})})})})});I.displayName="Popover.Trigger";const A=s.forwardRef(({side:t,align:o="start",className:c,...i},n)=>{const{popoverSide:a}=E(),l=m.cx("gap-sm flex flex-col",c);return r.jsx(g.Popover.Content,{ref:n,...i,side:t??a,align:o,className:l})});A.displayName="Popover.Content";const B=({popoverSide:t,popoverTriggerRef:o,children:c})=>{const i=s.useMemo(()=>({popoverSide:t,popoverTriggerRef:o}),[t,o]),a=Object.assign((l=>r.jsx(C.Provider,{value:i,children:r.jsx(g.Popover,{...l,children:l.children})})),g.Popover,{Content:A,Trigger:I});return r.jsx(C.Provider,{value:i,children:c(a)})};B.displayName="Popover";const Y=m.cva(["px-md","relative flex flex-none items-center","border-outline","hover:not-disabled:bg-surface-hovered","after:absolute","data-[state=active]:font-bold","data-[state=inactive]:not-disabled:cursor-pointer","data-[orientation=horizontal]:border-b-sm data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:bottom-[-1px] data-[orientation=horizontal]:after:h-sz-2","data-[orientation=vertical]:border-r-sm data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:right-[-1px] data-[orientation=vertical]:after:w-sz-2","focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset","disabled:cursor-not-allowed disabled:opacity-dim-3","gap-md [&>*:first-child]:ml-md [&>*:last-child]:mr-md","[&>svg:last-child:first-child]:mx-auto"],{variants:{intent:U.makeVariants({main:["data-[state=active]:text-main data-[state=active]:after:bg-main"],support:["data-[state=active]:text-support data-[state=active]:after:bg-support"],basic:["data-[state=active]:text-basic data-[state=active]:after:bg-basic"]}),size:{xs:["h-sz-32 min-w-sz-32 text-caption"],sm:["h-sz-36 min-w-sz-36 text-body-2"],md:["h-sz-40 min-w-sz-40 text-body-1"]},hasMenu:{true:"pr-3xl"},orientation:{horizontal:"",vertical:""}},compoundVariants:[{hasMenu:!0,orientation:"vertical",class:"w-full"}],defaultVariants:{intent:"basic",size:"md",hasMenu:!1,orientation:"horizontal"}}),L=({asChild:t=!1,value:o,disabled:c=!1,children:i,className:n,ref:a,onKeyDown:l,renderMenu:d,...e})=>{const{intent:x,size:w,orientation:u}=R(),h=s.useRef(null),z=s.useRef(null),y=q.useMergeRefs(a,z),v=b=>{b.key==="F10"&&b.shiftKey&&d&&h.current&&(b.preventDefault(),h.current.click()),l?.(b)},p=!!d,f=u==="vertical"?"right":"bottom",k=r.jsx(T.Tabs.Trigger,{"data-spark-component":"tabs-trigger",ref:y,className:Y({intent:x,size:w,hasMenu:p,orientation:u??"horizontal",className:n}),asChild:t,disabled:c,value:o,onFocus:({target:b})=>b.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),onKeyDown:v,"aria-haspopup":p?"true":void 0,...e,children:i});return p?r.jsxs("div",{className:u==="vertical"?"relative w-full":"relative",children:[k,r.jsx("div",{className:"right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2",children:r.jsx(B,{popoverSide:f,popoverTriggerRef:h,children:b=>d?.({Popover:b})})})]}):k};L.displayName="Tabs.Trigger";const O=Object.assign(V,{List:N,Trigger:L,Content:P});O.displayName="Tabs";N.displayName="Tabs.List";L.displayName="Tabs.Trigger";P.displayName="Tabs.Content";exports.Tabs=O;
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../src/tabs/TabsContext.tsx","../../src/tabs/TabsRoot.styles.ts","../../src/tabs/Tabs.tsx","../../src/tabs/TabsContent.styles.ts","../../src/tabs/TabsContent.tsx","../../src/tabs/TabsList.styles.ts","../../src/tabs/useResizeObserver.ts","../../src/tabs/TabsList.tsx","../../src/tabs/TabsPopoverAbstraction.tsx","../../src/tabs/TabsTrigger.styles.ts","../../src/tabs/TabsTrigger.tsx","../../src/tabs/index.ts"],"sourcesContent":["\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","import { Tabs as RadixTabs } from 'radix-ui'\nimport { createContext, useContext } from 'react'\n\nimport type { TabsTriggerVariantsProps } from './TabsTrigger.styles'\n\nexport type TabsContextInterface = TabsTriggerVariantsProps &\n Pick<RadixTabs.TabsProps, 'orientation'> & {\n forceMount?: boolean\n }\n\nexport const TabsContext = createContext<TabsContextInterface>({} as TabsContextInterface)\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext)\n\n if (!context) {\n throw Error('useTabsContext must be used within a TabsContext Provider')\n }\n\n return context\n}\n","import { cva } from 'class-variance-authority'\n\nexport const rootStyles = cva([\n 'flex',\n 'data-[orientation=horizontal]:flex-col',\n 'data-[orientation=vertical]:flex-row',\n 'max-w-full',\n])\n","import { Tabs as RadixTabs } from 'radix-ui'\nimport { type PropsWithChildren, Ref } from 'react'\n\nimport { TabsContext } from './TabsContext'\nimport { rootStyles } from './TabsRoot.styles'\nimport type { TabsTriggerVariantsProps } from './TabsTrigger.styles'\n\nexport interface TabsProps\n extends Omit<RadixTabs.TabsProps, 'activationMode'>,\n PropsWithChildren<Omit<TabsTriggerVariantsProps, 'orientation'>> {\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * Whether to keep inactive tabs content in the DOM.\n * @default false\n */\n forceMount?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\n/**\n * @deprecated\n */\nexport type TabsRootProps = TabsProps\n\nexport const Tabs = ({\n intent = 'basic',\n size = 'md',\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#root\n */\n asChild = false,\n forceMount = false,\n orientation = 'horizontal',\n children,\n className,\n ref,\n ...rest\n}: TabsProps) => {\n return (\n <TabsContext.Provider\n value={{\n intent,\n size,\n orientation,\n forceMount,\n }}\n >\n <RadixTabs.Root\n ref={ref}\n asChild={asChild}\n orientation={orientation}\n className={rootStyles({ className })}\n data-spark-component=\"tabs\"\n activationMode=\"automatic\"\n {...rest}\n >\n {children}\n </RadixTabs.Root>\n </TabsContext.Provider>\n )\n}\n\nTabs.displayName = 'Tabs'\n","import { cva } from 'class-variance-authority'\n\nexport const contentStyles = cva(['w-full p-lg', 'focus-visible:u-outline-inset'], {\n variants: {\n forceMount: {\n true: 'data-[state=inactive]:hidden',\n false: '',\n },\n },\n})\n","import { Tabs as RadixTabs } from 'radix-ui'\nimport { type PropsWithChildren, Ref } from 'react'\n\nimport { contentStyles } from './TabsContent.styles'\nimport { useTabsContext } from './TabsContext'\n\nexport interface TabsContentProps\n extends PropsWithChildren<Omit<RadixTabs.TabsContentProps, 'forceMount'>> {\n /**\n * A unique value that associates the content with a trigger.\n */\n value: string\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.\n */\n forceMount?: true\n ref?: Ref<HTMLDivElement>\n}\n\nexport const TabsContent = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#content\n */\n children,\n asChild = false,\n className,\n ref,\n ...rest\n}: TabsContentProps) => {\n const { forceMount } = useTabsContext()\n\n return (\n <RadixTabs.Content\n data-spark-component=\"tabs-content\"\n ref={ref}\n forceMount={forceMount || rest.forceMount}\n className={contentStyles({ className, forceMount })}\n asChild={asChild}\n {...rest}\n >\n {children}\n </RadixTabs.Content>\n )\n}\n\nTabsContent.displayName = 'Tabs.Content'\n","import { cva } from 'class-variance-authority'\n\nexport const wrapperStyles = cva(['relative flex'])\n\nexport const listStyles = cva([\n 'flex w-full',\n 'data-[orientation=horizontal]:flex-row',\n 'data-[orientation=vertical]:flex-col',\n 'overflow-y-hidden u-no-scrollbar data-[orientation=vertical]:overflow-x-hidden',\n 'after:flex after:shrink after:grow after:border-outline',\n 'data-[orientation=horizontal]:after:border-b-sm',\n 'data-[orientation=vertical]:after:border-r-sm',\n])\n\nexport const navigationArrowStyles = cva([\n 'h-auto! flex-none',\n 'border-b-sm border-outline',\n 'outline-hidden',\n 'focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset!',\n])\n","import { type RefObject, useEffect, useRef, useState } from 'react'\n\ninterface Size {\n width?: number\n height?: number\n}\n\ntype ResizeCallback = (entry?: ResizeObserverEntry) => void\n\nexport const useResizeObserver = <T extends HTMLElement>(\n target: RefObject<T | null> | T | null,\n onResize?: ResizeCallback\n): Size => {\n const [size, setSize] = useState<Size>({ width: undefined, height: undefined })\n const resizeObserverRef = useRef<ResizeObserver>(null)\n const resizeCallbackRef = useRef<ResizeCallback | undefined>(onResize)\n\n useEffect(() => {\n resizeCallbackRef.current = onResize\n }, [onResize])\n\n useEffect(() => {\n const targetElm = target && 'current' in target ? target.current : target\n if (!targetElm || resizeObserverRef.current) {\n return\n }\n\n resizeObserverRef.current = new ResizeObserver(([entry]) => {\n const { inlineSize: width, blockSize: height } = entry?.borderBoxSize?.[0] ?? {}\n resizeCallbackRef.current?.(entry)\n\n setSize({ width, height })\n })\n\n resizeObserverRef.current.observe(targetElm as unknown as HTMLElement)\n\n return () => {\n resizeObserverRef.current &&\n resizeObserverRef.current.unobserve(targetElm as unknown as HTMLElement)\n }\n }, [target, resizeObserverRef, resizeCallbackRef])\n\n return size\n}\n","/* eslint-disable max-lines-per-function */\nimport { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\nimport { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\nimport { Tabs as RadixTabs } from 'radix-ui'\nimport { type ReactElement, Ref, useEffect, useRef, useState } from 'react'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useTabsContext } from './TabsContext'\nimport { listStyles, navigationArrowStyles, wrapperStyles } from './TabsList.styles'\nimport { useResizeObserver } from './useResizeObserver'\n\nexport interface TabsListProps extends Omit<RadixTabs.TabsListProps, 'children'> {\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * When true, keyboard navigation will loop from last tab to first, and vice versa.\n * @default false\n */\n loop?: boolean\n children: ReactElement[] | ReactElement\n ref?: Ref<HTMLDivElement>\n}\n\ntype ArrowState = 'visible' | 'hidden' | 'disabled'\n\nexport const TabsList = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#list\n */\n asChild = false,\n loop = false,\n children,\n className,\n ref,\n ...rest\n}: TabsListProps) => {\n const wrapperRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef(null)\n const listRef = ref || innerRef\n const { orientation } = useTabsContext()\n\n const { width } = useResizeObserver(wrapperRef)\n\n const [arrows, setArrows] = useState<Record<'prev' | 'next', ArrowState>>({\n prev: 'hidden',\n next: 'hidden',\n })\n\n useEffect(() => {\n /**\n * Show/hide arrows\n */\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n if (orientation !== 'horizontal') {\n setArrows({ prev: 'hidden', next: 'hidden' })\n } else {\n setArrows({\n prev: listRef.current.scrollWidth > listRef.current.clientWidth ? 'visible' : 'hidden',\n next: listRef.current.scrollWidth > listRef.current.clientWidth ? 'visible' : 'hidden',\n })\n }\n }, [orientation, listRef, width])\n\n useEffect(() => {\n /**\n * Enable/disable arrows\n */\n if (typeof listRef === 'function' || !listRef.current || arrows.prev === 'hidden' || loop) {\n return\n }\n\n const toggleArrowsVisibility = (target: HTMLDivElement) => {\n setArrows({\n prev: target.scrollLeft > 0 ? 'visible' : 'disabled',\n next: target.scrollLeft + target.clientWidth < target.scrollWidth ? 'visible' : 'disabled',\n })\n }\n\n const currentList = listRef.current\n\n toggleArrowsVisibility(currentList)\n\n currentList.addEventListener('scroll', ({ target }) =>\n toggleArrowsVisibility(target as HTMLDivElement)\n )\n\n return () =>\n currentList.removeEventListener('scroll', ({ target }) =>\n toggleArrowsVisibility(target as HTMLDivElement)\n )\n }, [listRef, arrows.prev, loop])\n\n const handlePrevClick = () => {\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n const shouldLoopForward = loop && listRef.current.scrollLeft <= 0\n\n listRef.current.scrollTo({\n left: shouldLoopForward\n ? listRef.current.scrollLeft + listRef.current.scrollWidth - listRef.current.clientWidth\n : listRef.current.scrollLeft - listRef.current.clientWidth,\n behavior: 'smooth',\n })\n }\n\n const handleNextClick = () => {\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n const shouldLoopBackward =\n loop &&\n listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth\n\n listRef.current.scrollTo({\n left: shouldLoopBackward ? 0 : listRef.current.scrollLeft + listRef.current.clientWidth,\n behavior: 'smooth',\n })\n }\n\n return (\n <div className={wrapperStyles({ className })} ref={wrapperRef}>\n {arrows.prev !== 'hidden' && (\n <Button\n shape=\"square\"\n intent=\"surface\"\n size=\"sm\"\n className={navigationArrowStyles()}\n onClick={handlePrevClick}\n disabled={arrows.prev === 'disabled'}\n aria-label=\"Scroll left\"\n >\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n </Button>\n )}\n\n <RadixTabs.List\n data-spark-component=\"tabs-list\"\n ref={listRef}\n className={listStyles()}\n asChild={asChild}\n loop={loop}\n {...rest}\n >\n {children}\n </RadixTabs.List>\n\n {arrows.next !== 'hidden' && (\n <Button\n shape=\"square\"\n intent=\"surface\"\n size=\"sm\"\n className={navigationArrowStyles()}\n onClick={handleNextClick}\n disabled={arrows.next === 'disabled'}\n aria-label=\"Scroll right\"\n >\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n </Button>\n )}\n </div>\n )\n}\n\nTabsList.displayName = 'Tabs.List'\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { MoreMenuHorizontal } from '@spark-ui/icons/MoreMenuHorizontal'\nimport { cx } from 'class-variance-authority'\nimport {\n type ComponentType,\n createContext,\n forwardRef,\n type ReactNode,\n type RefObject,\n useContext,\n useMemo,\n} from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { Popover as SparkPopover } from '../popover'\nimport type { PopoverProps } from '../popover/Popover'\nimport type { ContentProps as PopoverContentProps } from '../popover/PopoverContent'\nimport type { TriggerProps as PopoverTriggerProps } from '../popover/PopoverTrigger'\n\ninterface TabsPopoverContextValue {\n popoverSide: 'right' | 'bottom'\n popoverTriggerRef: RefObject<HTMLButtonElement | null>\n}\n\nconst TabsPopoverContext = createContext<TabsPopoverContextValue | undefined>(undefined)\n\nconst useTabsPopoverContext = () => {\n const context = useContext(TabsPopoverContext)\n if (!context) {\n throw new Error('TabsPopover components must be used within TabsPopover')\n }\n\n return context\n}\n\n// Trigger component that uses context\ninterface TabsPopoverTriggerProps extends Omit<PopoverTriggerProps, 'asChild' | 'children'> {\n 'aria-label': string\n children?: ReactNode\n}\n\nconst TabsPopoverTrigger = forwardRef<HTMLButtonElement, TabsPopoverTriggerProps>(\n ({ 'aria-label': ariaLabel, children: iconChildren, ...triggerProps }, forwardedRef) => {\n const { popoverTriggerRef } = useTabsPopoverContext()\n const mergedRef = useMergeRefs(forwardedRef, popoverTriggerRef)\n\n return (\n <SparkPopover.Trigger asChild {...triggerProps}>\n <IconButton\n ref={mergedRef}\n size=\"sm\"\n intent=\"surfaceInverse\"\n design=\"ghost\"\n aria-label={ariaLabel}\n tabIndex={-1}\n >\n <Icon>{iconChildren || <MoreMenuHorizontal />}</Icon>\n </IconButton>\n </SparkPopover.Trigger>\n )\n }\n)\n\nTabsPopoverTrigger.displayName = 'Popover.Trigger'\n\n// Content component that uses context\nconst TabsPopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(\n ({ side, align = 'start', className, ...contentProps }, ref) => {\n const { popoverSide } = useTabsPopoverContext()\n const mergedClassName = cx('gap-sm flex flex-col', className)\n\n return (\n <SparkPopover.Content\n ref={ref}\n {...contentProps}\n side={side ?? popoverSide}\n align={align}\n className={mergedClassName}\n />\n )\n }\n)\n\nTabsPopoverContent.displayName = 'Popover.Content'\n\n// Export types\nexport type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger\nexport type TabsPopoverContentComponent = typeof TabsPopoverContent\n\n// Create a type that extends SparkPopover but overrides Content and Trigger\n// Use ComponentType for JSX compatibility and Omit to exclude only Content and Trigger,\n// then add them back with the overridden types\nexport type ConfiguredPopoverComponent = ComponentType<PopoverProps> &\n Omit<typeof SparkPopover, 'Content' | 'Trigger'> & {\n Content: TabsPopoverContentComponent\n Trigger: TabsPopoverTriggerComponent\n }\n\ninterface PopoverAbstractionProps {\n popoverSide: 'right' | 'bottom'\n popoverTriggerRef: RefObject<HTMLButtonElement | null>\n children: (Popover: ConfiguredPopoverComponent) => ReactNode\n}\n\nexport const Popover = ({ popoverSide, popoverTriggerRef, children }: PopoverAbstractionProps) => {\n const contextValue = useMemo(\n () => ({ popoverSide, popoverTriggerRef }),\n [popoverSide, popoverTriggerRef]\n )\n\n const PopoverWrapper: typeof SparkPopover = ((props: PopoverProps) => (\n <TabsPopoverContext.Provider value={contextValue}>\n <SparkPopover {...props}>{props.children}</SparkPopover>\n </TabsPopoverContext.Provider>\n )) as typeof SparkPopover\n\n const PopoverComponent = Object.assign(PopoverWrapper, SparkPopover, {\n Content: TabsPopoverContent,\n Trigger: TabsPopoverTrigger,\n }) as ConfiguredPopoverComponent\n\n return (\n <TabsPopoverContext.Provider value={contextValue}>\n {children(PopoverComponent)}\n </TabsPopoverContext.Provider>\n )\n}\n\nPopover.displayName = 'Popover'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const triggerVariants = cva(\n [\n 'px-md',\n 'relative flex flex-none items-center',\n 'border-outline',\n 'hover:not-disabled:bg-surface-hovered',\n 'after:absolute',\n 'data-[state=active]:font-bold',\n 'data-[state=inactive]:not-disabled:cursor-pointer',\n 'data-[orientation=horizontal]:border-b-sm data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:bottom-[-1px] data-[orientation=horizontal]:after:h-sz-2',\n 'data-[orientation=vertical]:border-r-sm data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:right-[-1px] data-[orientation=vertical]:after:w-sz-2',\n 'focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3',\n 'gap-md [&>*:first-child]:ml-md [&>*:last-child]:mr-md',\n '[&>svg:last-child:first-child]:mx-auto',\n ],\n {\n variants: {\n /**\n * Change the color scheme of the tabs\n * @default basic\n */\n intent: makeVariants<'intent', ['main', 'support', 'basic']>({\n main: ['data-[state=active]:text-main data-[state=active]:after:bg-main'],\n support: ['data-[state=active]:text-support data-[state=active]:after:bg-support'],\n basic: ['data-[state=active]:text-basic data-[state=active]:after:bg-basic'],\n }),\n /**\n * Change the size of the tabs\n * @default md\n */\n size: {\n xs: ['h-sz-32 min-w-sz-32 text-caption'],\n sm: ['h-sz-36 min-w-sz-36 text-body-2'],\n md: ['h-sz-40 min-w-sz-40 text-body-1'],\n },\n hasMenu: {\n true: 'pr-3xl',\n },\n orientation: {\n horizontal: '',\n vertical: '',\n },\n },\n compoundVariants: [\n {\n hasMenu: true,\n orientation: 'vertical',\n class: 'w-full',\n },\n ],\n defaultVariants: {\n intent: 'basic',\n size: 'md',\n hasMenu: false,\n orientation: 'horizontal',\n },\n }\n)\n\nexport type TabsTriggerVariantsProps = VariantProps<typeof triggerVariants>\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { Tabs as RadixTabs } from 'radix-ui'\nimport { type FocusEvent, type KeyboardEvent, type ReactNode, Ref, useRef } from 'react'\n\nimport { useTabsContext } from './TabsContext'\nimport { type ConfiguredPopoverComponent, Popover } from './TabsPopoverAbstraction'\nimport { triggerVariants } from './TabsTrigger.styles'\n\nexport interface TabsTriggerProps extends RadixTabs.TabsTriggerProps {\n /**\n * A unique value that associates the trigger with a content.\n */\n value: string\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean\n /**\n * Function that receives a pre-configured Popover component and returns the popover structure.\n * @example\n * renderMenu={({ Popover }) => (\n * <Popover>\n * <Popover.Trigger aria-label=\"Options\">\n * <CustomIcon />\n * </Popover.Trigger>\n * <Popover.Content>\n * <Button>Action</Button>\n * </Popover.Content>\n * </Popover>\n * )}\n */\n renderMenu?: (props: { Popover: ConfiguredPopoverComponent }) => ReactNode\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const TabsTrigger = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#trigger\n */\n asChild = false,\n value,\n disabled = false,\n children,\n className,\n ref,\n onKeyDown,\n renderMenu,\n ...rest\n}: TabsTriggerProps) => {\n const { intent, size, orientation } = useTabsContext()\n const popoverTriggerRef = useRef<HTMLButtonElement>(null)\n const tabsTriggerRef = useRef<HTMLButtonElement>(null)\n\n // Combine internal ref with forwarded ref\n const mergedRef = useMergeRefs(ref, tabsTriggerRef)\n\n const handleKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {\n // Handle Shift+F10 for popover\n if (e.key === 'F10' && e.shiftKey && renderMenu && popoverTriggerRef.current) {\n e.preventDefault()\n popoverTriggerRef.current.click()\n }\n\n // Call original onKeyDown if provided\n onKeyDown?.(e)\n }\n\n const hasMenu = !!renderMenu\n const popoverSide = orientation === 'vertical' ? 'right' : 'bottom'\n\n const trigger = (\n <RadixTabs.Trigger\n data-spark-component=\"tabs-trigger\"\n ref={mergedRef}\n className={triggerVariants({\n intent,\n size,\n hasMenu,\n orientation: orientation ?? 'horizontal',\n className,\n })}\n asChild={asChild}\n disabled={disabled}\n value={value}\n onFocus={({ target }: FocusEvent<HTMLButtonElement>) =>\n target.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n })\n }\n onKeyDown={handleKeyDown}\n aria-haspopup={hasMenu ? 'true' : undefined}\n {...rest}\n >\n {children}\n </RadixTabs.Trigger>\n )\n\n if (!hasMenu) {\n return trigger\n }\n\n return (\n <div className={orientation === 'vertical' ? 'relative w-full' : 'relative'}>\n {trigger}\n <div className=\"right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2\">\n <Popover popoverSide={popoverSide} popoverTriggerRef={popoverTriggerRef}>\n {PopoverAbstraction => renderMenu?.({ Popover: PopoverAbstraction })}\n </Popover>\n </div>\n </div>\n )\n}\n\nTabsTrigger.displayName = 'Tabs.Trigger'\n","import { Tabs as Root } from './Tabs'\nimport { TabsContent as Content } from './TabsContent'\nimport { TabsList as List } from './TabsList'\nimport { TabsTrigger as Trigger } from './TabsTrigger'\n\nexport const Tabs: typeof Root & {\n List: typeof List\n Trigger: typeof Trigger\n Content: typeof Content\n} = Object.assign(Root, {\n List,\n Trigger,\n Content,\n})\n\nTabs.displayName = 'Tabs'\nList.displayName = 'Tabs.List'\nTrigger.displayName = 'Tabs.Trigger'\nContent.displayName = 'Tabs.Content'\n\nexport { type TabsContentProps } from './TabsContent'\nexport { type TabsListProps } from './TabsList'\nexport { type TabsProps, type TabsRootProps } from './Tabs'\nexport { type TabsTriggerProps } from './TabsTrigger'\n"],"names":["TABS_NAME","createTabsContext","createContextScope","createRovingFocusGroupScope","useRovingFocusGroupScope","TabsProvider","useTabsContext","Tabs","React","props","forwardedRef","__scopeTabs","valueProp","onValueChange","defaultValue","orientation","dir","activationMode","tabsProps","direction","useDirection","value","setValue","useControllableState","jsx","useId","Primitive","TAB_LIST_NAME","TabsList","loop","listProps","context","rovingFocusGroupScope","RovingFocusGroup.Root","TRIGGER_NAME","TabsTrigger","disabled","triggerProps","triggerId","makeTriggerId","contentId","makeContentId","isSelected","RovingFocusGroup.Item","composeEventHandlers","event","isAutomaticActivation","CONTENT_NAME","TabsContent","forceMount","children","contentProps","isMountAnimationPreventedRef","rAF","Presence","present","baseId","Root2","List","Trigger","Content","TabsContext","createContext","useContext","rootStyles","cva","intent","size","asChild","className","ref","rest","RadixTabs.Root","contentStyles","RadixTabs.Content","wrapperStyles","listStyles","navigationArrowStyles","useResizeObserver","target","onResize","setSize","useState","resizeObserverRef","useRef","resizeCallbackRef","useEffect","targetElm","entry","width","height","wrapperRef","innerRef","listRef","arrows","setArrows","toggleArrowsVisibility","currentList","handlePrevClick","shouldLoopForward","handleNextClick","shouldLoopBackward","jsxs","Button","Icon","ArrowVerticalLeft","RadixTabs.List","ArrowVerticalRight","TabsPopoverContext","useTabsPopoverContext","TabsPopoverTrigger","forwardRef","ariaLabel","iconChildren","popoverTriggerRef","mergedRef","useMergeRefs","SparkPopover","IconButton","MoreMenuHorizontal","TabsPopoverContent","side","align","popoverSide","mergedClassName","cx","Popover","contextValue","useMemo","PopoverComponent","triggerVariants","makeVariants","onKeyDown","renderMenu","tabsTriggerRef","handleKeyDown","e","hasMenu","trigger","RadixTabs.Trigger","PopoverAbstraction","Root"],"mappings":"0iCAcA,IAAIA,EAAY,OACZ,CAACC,EAAkC,EAAIC,GAAAA,mBAAmBF,EAAW,CACvEG,EAAAA,2BACF,CAAC,EACGC,EAA2BD,EAAAA,4BAA2B,EACtD,CAACE,GAAcC,CAAc,EAAIL,GAAkBD,CAAS,EAC5DO,EAAOC,EAAM,WACf,CAACC,EAAOC,IAAiB,CACvB,KAAM,CACJ,YAAAC,EACA,MAAOC,EACP,cAAAC,EACA,aAAAC,EACA,YAAAC,EAAc,aACd,IAAAC,EACA,eAAAC,EAAiB,YACjB,GAAGC,CACT,EAAQT,EACEU,EAAYC,GAAAA,aAAaJ,CAAG,EAC5B,CAACK,EAAOC,CAAQ,EAAIC,uBAAqB,CAC7C,KAAMX,EACN,SAAUC,EACV,YAAaC,GAAgB,GAC7B,OAAQ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OAAKuF,SAKF,MAAA,CAAI,UAAW1H,IAAgB,WAAa,kBAAoB,WAC9D,SAAA,CAAA2H,EACDlH,EAAAA,IAAC,MAAA,CAAI,UAAU,uEACb,eAACsG,GAAA,CAAQ,YAAAH,EAA0B,kBAAAT,EAChC,SAAA0B,GAAsBP,IAAa,CAAE,QAASO,CAAA,CAAoB,EACrE,CAAA,CACF,CAAA,EACF,EAXOF,CAaX,EAEAvG,EAAY,YAAc,eCrHnB,MAAM5B,GAIT,OAAO,OAAOsI,EAAM,CAAA,KACtBnF,EAAA,QACAC,EAAA,QACAC,CACF,CAAC,EAEDrD,GAAK,YAAc,OACnBmD,EAAK,YAAc,YACnBC,EAAQ,YAAc,eACtBC,EAAQ,YAAc","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.js","sources":["../../src/tabs/TabsContext.tsx","../../src/tabs/TabsRoot.styles.ts","../../src/tabs/Tabs.tsx","../../src/tabs/TabsContent.styles.ts","../../src/tabs/TabsContent.tsx","../../src/tabs/TabsList.styles.ts","../../src/tabs/useResizeObserver.ts","../../src/tabs/TabsList.tsx","../../src/tabs/TabsPopoverAbstraction.tsx","../../src/tabs/TabsTrigger.styles.ts","../../src/tabs/TabsTrigger.tsx","../../src/tabs/index.ts"],"sourcesContent":["import { Tabs as RadixTabs } from 'radix-ui'\nimport { createContext, useContext } from 'react'\n\nimport type { TabsTriggerVariantsProps } from './TabsTrigger.styles'\n\nexport type TabsContextInterface = TabsTriggerVariantsProps &\n Pick<RadixTabs.TabsProps, 'orientation'> & {\n forceMount?: boolean\n }\n\nexport const TabsContext = createContext<TabsContextInterface>({} as TabsContextInterface)\n\nexport const useTabsContext = () => {\n const context = useContext(TabsContext)\n\n if (!context) {\n throw Error('useTabsContext must be used within a TabsContext Provider')\n }\n\n return context\n}\n","import { cva } from 'class-variance-authority'\n\nexport const rootStyles = cva([\n 'flex',\n 'data-[orientation=horizontal]:flex-col',\n 'data-[orientation=vertical]:flex-row',\n 'max-w-full',\n])\n","import { Tabs as RadixTabs } from 'radix-ui'\nimport { type PropsWithChildren, Ref } from 'react'\n\nimport { TabsContext } from './TabsContext'\nimport { rootStyles } from './TabsRoot.styles'\nimport type { TabsTriggerVariantsProps } from './TabsTrigger.styles'\n\nexport interface TabsProps\n extends Omit<RadixTabs.TabsProps, 'activationMode'>,\n PropsWithChildren<Omit<TabsTriggerVariantsProps, 'orientation'>> {\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * Whether to keep inactive tabs content in the DOM.\n * @default false\n */\n forceMount?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\n/**\n * @deprecated\n */\nexport type TabsRootProps = TabsProps\n\nexport const Tabs = ({\n intent = 'basic',\n size = 'md',\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#root\n */\n asChild = false,\n forceMount = false,\n orientation = 'horizontal',\n children,\n className,\n ref,\n ...rest\n}: TabsProps) => {\n return (\n <TabsContext.Provider\n value={{\n intent,\n size,\n orientation,\n forceMount,\n }}\n >\n <RadixTabs.Root\n ref={ref}\n asChild={asChild}\n orientation={orientation}\n className={rootStyles({ className })}\n data-spark-component=\"tabs\"\n activationMode=\"automatic\"\n {...rest}\n >\n {children}\n </RadixTabs.Root>\n </TabsContext.Provider>\n )\n}\n\nTabs.displayName = 'Tabs'\n","import { cva } from 'class-variance-authority'\n\nexport const contentStyles = cva(['w-full p-lg', 'focus-visible:u-outline-inset'], {\n variants: {\n forceMount: {\n true: 'data-[state=inactive]:hidden',\n false: '',\n },\n },\n})\n","import { Tabs as RadixTabs } from 'radix-ui'\nimport { type PropsWithChildren, Ref } from 'react'\n\nimport { contentStyles } from './TabsContent.styles'\nimport { useTabsContext } from './TabsContext'\n\nexport interface TabsContentProps\n extends PropsWithChildren<Omit<RadixTabs.TabsContentProps, 'forceMount'>> {\n /**\n * A unique value that associates the content with a trigger.\n */\n value: string\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.\n */\n forceMount?: true\n ref?: Ref<HTMLDivElement>\n}\n\nexport const TabsContent = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#content\n */\n children,\n asChild = false,\n className,\n ref,\n ...rest\n}: TabsContentProps) => {\n const { forceMount } = useTabsContext()\n\n return (\n <RadixTabs.Content\n data-spark-component=\"tabs-content\"\n ref={ref}\n forceMount={forceMount || rest.forceMount}\n className={contentStyles({ className, forceMount })}\n asChild={asChild}\n {...rest}\n >\n {children}\n </RadixTabs.Content>\n )\n}\n\nTabsContent.displayName = 'Tabs.Content'\n","import { cva } from 'class-variance-authority'\n\nexport const wrapperStyles = cva(['relative flex'])\n\nexport const listStyles = cva([\n 'flex w-full',\n 'data-[orientation=horizontal]:flex-row',\n 'data-[orientation=vertical]:flex-col',\n 'overflow-y-hidden u-no-scrollbar data-[orientation=vertical]:overflow-x-hidden',\n 'after:flex after:shrink after:grow after:border-outline',\n 'data-[orientation=horizontal]:after:border-b-sm',\n 'data-[orientation=vertical]:after:border-r-sm',\n])\n\nexport const navigationArrowStyles = cva([\n 'h-auto! flex-none',\n 'border-b-sm border-outline',\n 'outline-hidden',\n 'focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset!',\n])\n","import { type RefObject, useEffect, useRef, useState } from 'react'\n\ninterface Size {\n width?: number\n height?: number\n}\n\ntype ResizeCallback = (entry?: ResizeObserverEntry) => void\n\nexport const useResizeObserver = <T extends HTMLElement>(\n target: RefObject<T | null> | T | null,\n onResize?: ResizeCallback\n): Size => {\n const [size, setSize] = useState<Size>({ width: undefined, height: undefined })\n const resizeObserverRef = useRef<ResizeObserver>(null)\n const resizeCallbackRef = useRef<ResizeCallback | undefined>(onResize)\n\n useEffect(() => {\n resizeCallbackRef.current = onResize\n }, [onResize])\n\n useEffect(() => {\n const targetElm = target && 'current' in target ? target.current : target\n if (!targetElm || resizeObserverRef.current) {\n return\n }\n\n resizeObserverRef.current = new ResizeObserver(([entry]) => {\n const { inlineSize: width, blockSize: height } = entry?.borderBoxSize?.[0] ?? {}\n resizeCallbackRef.current?.(entry)\n\n setSize({ width, height })\n })\n\n resizeObserverRef.current.observe(targetElm as unknown as HTMLElement)\n\n return () => {\n resizeObserverRef.current &&\n resizeObserverRef.current.unobserve(targetElm as unknown as HTMLElement)\n }\n }, [target, resizeObserverRef, resizeCallbackRef])\n\n return size\n}\n","/* eslint-disable max-lines-per-function */\nimport { ArrowVerticalLeft } from '@spark-ui/icons/ArrowVerticalLeft'\nimport { ArrowVerticalRight } from '@spark-ui/icons/ArrowVerticalRight'\nimport { Tabs as RadixTabs } from 'radix-ui'\nimport { type ReactElement, Ref, useEffect, useRef, useState } from 'react'\n\nimport { Button } from '../button'\nimport { Icon } from '../icon'\nimport { useTabsContext } from './TabsContext'\nimport { listStyles, navigationArrowStyles, wrapperStyles } from './TabsList.styles'\nimport { useResizeObserver } from './useResizeObserver'\n\nexport interface TabsListProps extends Omit<RadixTabs.TabsListProps, 'children'> {\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * When true, keyboard navigation will loop from last tab to first, and vice versa.\n * @default false\n */\n loop?: boolean\n children: ReactElement[] | ReactElement\n ref?: Ref<HTMLDivElement>\n}\n\ntype ArrowState = 'visible' | 'hidden' | 'disabled'\n\nexport const TabsList = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#list\n */\n asChild = false,\n loop = false,\n children,\n className,\n ref,\n ...rest\n}: TabsListProps) => {\n const wrapperRef = useRef<HTMLDivElement>(null)\n const innerRef = useRef(null)\n const listRef = ref || innerRef\n const { orientation } = useTabsContext()\n\n const { width } = useResizeObserver(wrapperRef)\n\n const [arrows, setArrows] = useState<Record<'prev' | 'next', ArrowState>>({\n prev: 'hidden',\n next: 'hidden',\n })\n\n useEffect(() => {\n /**\n * Show/hide arrows\n */\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n if (orientation !== 'horizontal') {\n setArrows({ prev: 'hidden', next: 'hidden' })\n } else {\n setArrows({\n prev: listRef.current.scrollWidth > listRef.current.clientWidth ? 'visible' : 'hidden',\n next: listRef.current.scrollWidth > listRef.current.clientWidth ? 'visible' : 'hidden',\n })\n }\n }, [orientation, listRef, width])\n\n useEffect(() => {\n /**\n * Enable/disable arrows\n */\n if (typeof listRef === 'function' || !listRef.current || arrows.prev === 'hidden' || loop) {\n return\n }\n\n const toggleArrowsVisibility = (target: HTMLDivElement) => {\n setArrows({\n prev: target.scrollLeft > 0 ? 'visible' : 'disabled',\n next: target.scrollLeft + target.clientWidth < target.scrollWidth ? 'visible' : 'disabled',\n })\n }\n\n const currentList = listRef.current\n\n toggleArrowsVisibility(currentList)\n\n currentList.addEventListener('scroll', ({ target }) =>\n toggleArrowsVisibility(target as HTMLDivElement)\n )\n\n return () =>\n currentList.removeEventListener('scroll', ({ target }) =>\n toggleArrowsVisibility(target as HTMLDivElement)\n )\n }, [listRef, arrows.prev, loop])\n\n const handlePrevClick = () => {\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n const shouldLoopForward = loop && listRef.current.scrollLeft <= 0\n\n listRef.current.scrollTo({\n left: shouldLoopForward\n ? listRef.current.scrollLeft + listRef.current.scrollWidth - listRef.current.clientWidth\n : listRef.current.scrollLeft - listRef.current.clientWidth,\n behavior: 'smooth',\n })\n }\n\n const handleNextClick = () => {\n if (typeof listRef === 'function' || !listRef.current) {\n return\n }\n\n const shouldLoopBackward =\n loop &&\n listRef.current.scrollLeft + listRef.current.clientWidth >= listRef.current.scrollWidth\n\n listRef.current.scrollTo({\n left: shouldLoopBackward ? 0 : listRef.current.scrollLeft + listRef.current.clientWidth,\n behavior: 'smooth',\n })\n }\n\n return (\n <div className={wrapperStyles({ className })} ref={wrapperRef}>\n {arrows.prev !== 'hidden' && (\n <Button\n shape=\"square\"\n intent=\"surface\"\n size=\"sm\"\n className={navigationArrowStyles()}\n onClick={handlePrevClick}\n disabled={arrows.prev === 'disabled'}\n aria-label=\"Scroll left\"\n >\n <Icon>\n <ArrowVerticalLeft />\n </Icon>\n </Button>\n )}\n\n <RadixTabs.List\n data-spark-component=\"tabs-list\"\n ref={listRef}\n className={listStyles()}\n asChild={asChild}\n loop={loop}\n {...rest}\n >\n {children}\n </RadixTabs.List>\n\n {arrows.next !== 'hidden' && (\n <Button\n shape=\"square\"\n intent=\"surface\"\n size=\"sm\"\n className={navigationArrowStyles()}\n onClick={handleNextClick}\n disabled={arrows.next === 'disabled'}\n aria-label=\"Scroll right\"\n >\n <Icon>\n <ArrowVerticalRight />\n </Icon>\n </Button>\n )}\n </div>\n )\n}\n\nTabsList.displayName = 'Tabs.List'\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { MoreMenuHorizontal } from '@spark-ui/icons/MoreMenuHorizontal'\nimport { cx } from 'class-variance-authority'\nimport {\n type ComponentType,\n createContext,\n forwardRef,\n type ReactNode,\n type RefObject,\n useContext,\n useMemo,\n} from 'react'\n\nimport { Icon } from '../icon'\nimport { IconButton } from '../icon-button'\nimport { Popover as SparkPopover } from '../popover'\nimport type { PopoverProps } from '../popover/Popover'\nimport type { ContentProps as PopoverContentProps } from '../popover/PopoverContent'\nimport type { TriggerProps as PopoverTriggerProps } from '../popover/PopoverTrigger'\n\ninterface TabsPopoverContextValue {\n popoverSide: 'right' | 'bottom'\n popoverTriggerRef: RefObject<HTMLButtonElement | null>\n}\n\nconst TabsPopoverContext = createContext<TabsPopoverContextValue | undefined>(undefined)\n\nconst useTabsPopoverContext = () => {\n const context = useContext(TabsPopoverContext)\n if (!context) {\n throw new Error('TabsPopover components must be used within TabsPopover')\n }\n\n return context\n}\n\n// Trigger component that uses context\ninterface TabsPopoverTriggerProps extends Omit<PopoverTriggerProps, 'asChild' | 'children'> {\n 'aria-label': string\n children?: ReactNode\n}\n\nconst TabsPopoverTrigger = forwardRef<HTMLButtonElement, TabsPopoverTriggerProps>(\n ({ 'aria-label': ariaLabel, children: iconChildren, ...triggerProps }, forwardedRef) => {\n const { popoverTriggerRef } = useTabsPopoverContext()\n const mergedRef = useMergeRefs(forwardedRef, popoverTriggerRef)\n\n return (\n <SparkPopover.Trigger asChild {...triggerProps}>\n <IconButton\n ref={mergedRef}\n size=\"sm\"\n intent=\"surfaceInverse\"\n design=\"ghost\"\n aria-label={ariaLabel}\n tabIndex={-1}\n >\n <Icon>{iconChildren || <MoreMenuHorizontal />}</Icon>\n </IconButton>\n </SparkPopover.Trigger>\n )\n }\n)\n\nTabsPopoverTrigger.displayName = 'Popover.Trigger'\n\n// Content component that uses context\nconst TabsPopoverContent = forwardRef<HTMLDivElement, PopoverContentProps>(\n ({ side, align = 'start', className, ...contentProps }, ref) => {\n const { popoverSide } = useTabsPopoverContext()\n const mergedClassName = cx('gap-sm flex flex-col', className)\n\n return (\n <SparkPopover.Content\n ref={ref}\n {...contentProps}\n side={side ?? popoverSide}\n align={align}\n className={mergedClassName}\n />\n )\n }\n)\n\nTabsPopoverContent.displayName = 'Popover.Content'\n\n// Export types\nexport type TabsPopoverTriggerComponent = typeof TabsPopoverTrigger\nexport type TabsPopoverContentComponent = typeof TabsPopoverContent\n\n// Create a type that extends SparkPopover but overrides Content and Trigger\n// Use ComponentType for JSX compatibility and Omit to exclude only Content and Trigger,\n// then add them back with the overridden types\nexport type ConfiguredPopoverComponent = ComponentType<PopoverProps> &\n Omit<typeof SparkPopover, 'Content' | 'Trigger'> & {\n Content: TabsPopoverContentComponent\n Trigger: TabsPopoverTriggerComponent\n }\n\ninterface PopoverAbstractionProps {\n popoverSide: 'right' | 'bottom'\n popoverTriggerRef: RefObject<HTMLButtonElement | null>\n children: (Popover: ConfiguredPopoverComponent) => ReactNode\n}\n\nexport const Popover = ({ popoverSide, popoverTriggerRef, children }: PopoverAbstractionProps) => {\n const contextValue = useMemo(\n () => ({ popoverSide, popoverTriggerRef }),\n [popoverSide, popoverTriggerRef]\n )\n\n const PopoverWrapper: typeof SparkPopover = ((props: PopoverProps) => (\n <TabsPopoverContext.Provider value={contextValue}>\n <SparkPopover {...props}>{props.children}</SparkPopover>\n </TabsPopoverContext.Provider>\n )) as typeof SparkPopover\n\n const PopoverComponent = Object.assign(PopoverWrapper, SparkPopover, {\n Content: TabsPopoverContent,\n Trigger: TabsPopoverTrigger,\n }) as ConfiguredPopoverComponent\n\n return (\n <TabsPopoverContext.Provider value={contextValue}>\n {children(PopoverComponent)}\n </TabsPopoverContext.Provider>\n )\n}\n\nPopover.displayName = 'Popover'\n","import { makeVariants } from '@spark-ui/internal-utils'\nimport { cva, VariantProps } from 'class-variance-authority'\n\nexport const triggerVariants = cva(\n [\n 'px-md',\n 'relative flex flex-none items-center',\n 'border-outline',\n 'hover:not-disabled:bg-surface-hovered',\n 'after:absolute',\n 'data-[state=active]:font-bold',\n 'data-[state=inactive]:not-disabled:cursor-pointer',\n 'data-[orientation=horizontal]:border-b-sm data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:bottom-[-1px] data-[orientation=horizontal]:after:h-sz-2',\n 'data-[orientation=vertical]:border-r-sm data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:right-[-1px] data-[orientation=vertical]:after:w-sz-2',\n 'focus-visible:border-none focus-visible:bg-surface-hovered focus-visible:u-outline-inset',\n 'disabled:cursor-not-allowed disabled:opacity-dim-3',\n 'gap-md [&>*:first-child]:ml-md [&>*:last-child]:mr-md',\n '[&>svg:last-child:first-child]:mx-auto',\n ],\n {\n variants: {\n /**\n * Change the color scheme of the tabs\n * @default basic\n */\n intent: makeVariants<'intent', ['main', 'support', 'basic']>({\n main: ['data-[state=active]:text-main data-[state=active]:after:bg-main'],\n support: ['data-[state=active]:text-support data-[state=active]:after:bg-support'],\n basic: ['data-[state=active]:text-basic data-[state=active]:after:bg-basic'],\n }),\n /**\n * Change the size of the tabs\n * @default md\n */\n size: {\n xs: ['h-sz-32 min-w-sz-32 text-caption'],\n sm: ['h-sz-36 min-w-sz-36 text-body-2'],\n md: ['h-sz-40 min-w-sz-40 text-body-1'],\n },\n hasMenu: {\n true: 'pr-3xl',\n },\n orientation: {\n horizontal: '',\n vertical: '',\n },\n },\n compoundVariants: [\n {\n hasMenu: true,\n orientation: 'vertical',\n class: 'w-full',\n },\n ],\n defaultVariants: {\n intent: 'basic',\n size: 'md',\n hasMenu: false,\n orientation: 'horizontal',\n },\n }\n)\n\nexport type TabsTriggerVariantsProps = VariantProps<typeof triggerVariants>\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { Tabs as RadixTabs } from 'radix-ui'\nimport { type FocusEvent, type KeyboardEvent, type ReactNode, Ref, useRef } from 'react'\n\nimport { useTabsContext } from './TabsContext'\nimport { type ConfiguredPopoverComponent, Popover } from './TabsPopoverAbstraction'\nimport { triggerVariants } from './TabsTrigger.styles'\n\nexport interface TabsTriggerProps extends RadixTabs.TabsTriggerProps {\n /**\n * A unique value that associates the trigger with a content.\n */\n value: string\n /**\n * Change the component to the HTML tag or custom component of the only child. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.\n * @default false\n */\n asChild?: boolean\n /**\n * When true, prevents the user from interacting with the tab.\n * @default false\n */\n disabled?: boolean\n /**\n * Function that receives a pre-configured Popover component and returns the popover structure.\n * @example\n * renderMenu={({ Popover }) => (\n * <Popover>\n * <Popover.Trigger aria-label=\"Options\">\n * <CustomIcon />\n * </Popover.Trigger>\n * <Popover.Content>\n * <Button>Action</Button>\n * </Popover.Content>\n * </Popover>\n * )}\n */\n renderMenu?: (props: { Popover: ConfiguredPopoverComponent }) => ReactNode\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const TabsTrigger = ({\n /**\n * Default Radix Primitive values\n * see https://www.radix-ui.com/docs/primitives/components/tabs#trigger\n */\n asChild = false,\n value,\n disabled = false,\n children,\n className,\n ref,\n onKeyDown,\n renderMenu,\n ...rest\n}: TabsTriggerProps) => {\n const { intent, size, orientation } = useTabsContext()\n const popoverTriggerRef = useRef<HTMLButtonElement>(null)\n const tabsTriggerRef = useRef<HTMLButtonElement>(null)\n\n // Combine internal ref with forwarded ref\n const mergedRef = useMergeRefs(ref, tabsTriggerRef)\n\n const handleKeyDown = (e: KeyboardEvent<HTMLButtonElement>) => {\n // Handle Shift+F10 for popover\n if (e.key === 'F10' && e.shiftKey && renderMenu && popoverTriggerRef.current) {\n e.preventDefault()\n popoverTriggerRef.current.click()\n }\n\n // Call original onKeyDown if provided\n onKeyDown?.(e)\n }\n\n const hasMenu = !!renderMenu\n const popoverSide = orientation === 'vertical' ? 'right' : 'bottom'\n\n const trigger = (\n <RadixTabs.Trigger\n data-spark-component=\"tabs-trigger\"\n ref={mergedRef}\n className={triggerVariants({\n intent,\n size,\n hasMenu,\n orientation: orientation ?? 'horizontal',\n className,\n })}\n asChild={asChild}\n disabled={disabled}\n value={value}\n onFocus={({ target }: FocusEvent<HTMLButtonElement>) =>\n target.scrollIntoView({\n behavior: 'smooth',\n block: 'nearest',\n inline: 'nearest',\n })\n }\n onKeyDown={handleKeyDown}\n aria-haspopup={hasMenu ? 'true' : undefined}\n {...rest}\n >\n {children}\n </RadixTabs.Trigger>\n )\n\n if (!hasMenu) {\n return trigger\n }\n\n return (\n <div className={orientation === 'vertical' ? 'relative w-full' : 'relative'}>\n {trigger}\n <div className=\"right-md mr-md pointer-events-auto absolute top-1/2 -translate-y-1/2\">\n <Popover popoverSide={popoverSide} popoverTriggerRef={popoverTriggerRef}>\n {PopoverAbstraction => renderMenu?.({ Popover: PopoverAbstraction })}\n </Popover>\n </div>\n </div>\n )\n}\n\nTabsTrigger.displayName = 'Tabs.Trigger'\n","import { Tabs as Root } from './Tabs'\nimport { TabsContent as Content } from './TabsContent'\nimport { TabsList as List } from './TabsList'\nimport { TabsTrigger as Trigger } from './TabsTrigger'\n\nexport const Tabs: typeof Root & {\n List: typeof List\n Trigger: typeof Trigger\n Content: typeof Content\n} = Object.assign(Root, {\n List,\n Trigger,\n Content,\n})\n\nTabs.displayName = 'Tabs'\nList.displayName = 'Tabs.List'\nTrigger.displayName = 'Tabs.Trigger'\nContent.displayName = 'Tabs.Content'\n\nexport { type TabsContentProps } from './TabsContent'\nexport { type TabsListProps } from './TabsList'\nexport { type TabsProps, type TabsRootProps } from './Tabs'\nexport { type TabsTriggerProps } from './TabsTrigger'\n"],"names":["TabsContext","createContext","useTabsContext","context","useContext","rootStyles","cva","Tabs","intent","size","asChild","forceMount","orientation","children","className","ref","rest","jsx","RadixTabs","contentStyles","TabsContent","wrapperStyles","listStyles","navigationArrowStyles","useResizeObserver","target","onResize","setSize","useState","resizeObserverRef","useRef","resizeCallbackRef","useEffect","targetElm","entry","width","height","TabsList","loop","wrapperRef","innerRef","listRef","arrows","setArrows","toggleArrowsVisibility","currentList","handlePrevClick","shouldLoopForward","handleNextClick","shouldLoopBackward","jsxs","Button","Icon","ArrowVerticalLeft","ArrowVerticalRight","TabsPopoverContext","useTabsPopoverContext","TabsPopoverTrigger","forwardRef","ariaLabel","iconChildren","triggerProps","forwardedRef","popoverTriggerRef","mergedRef","useMergeRefs","SparkPopover","IconButton","MoreMenuHorizontal","TabsPopoverContent","side","align","contentProps","popoverSide","mergedClassName","cx","Popover","contextValue","useMemo","PopoverComponent","props","triggerVariants","makeVariants","TabsTrigger","value","disabled","onKeyDown","renderMenu","tabsTriggerRef","handleKeyDown","e","hasMenu","trigger","PopoverAbstraction","Root","List","Trigger","Content"],"mappings":"ijBAUaA,EAAcC,EAAAA,cAAoC,EAA0B,EAE5EC,EAAiB,IAAM,CAClC,MAAMC,EAAUC,EAAAA,WAAWJ,CAAW,EAEtC,GAAI,CAACG,EACH,MAAM,MAAM,2DAA2D,EAGzE,OAAOA,CACT,EClBaE,EAAaC,EAAAA,IAAI,CAC5B,OACA,yCACA,uCACA,YACF,CAAC,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