@six-vallees/ui-react 0.5.0 → 0.7.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 (421) hide show
  1. package/README.md +11 -15
  2. package/dist/actions/button-group.d.ts +21 -0
  3. package/dist/actions/button-group.js +8 -0
  4. package/dist/actions/button-group.js.map +1 -0
  5. package/dist/actions/context-menu.d.ts +48 -0
  6. package/dist/actions/context-menu.js +38 -0
  7. package/dist/actions/context-menu.js.map +1 -0
  8. package/dist/actions/dropdown-menu.d.ts +49 -0
  9. package/dist/actions/dropdown-menu.js +38 -0
  10. package/dist/actions/dropdown-menu.js.map +1 -0
  11. package/dist/actions/icon-button.d.ts +34 -0
  12. package/dist/actions/icon-button.js +10 -0
  13. package/dist/actions/icon-button.js.map +1 -0
  14. package/dist/actions/link.d.ts +23 -0
  15. package/dist/actions/link.js +8 -0
  16. package/dist/actions/link.js.map +1 -0
  17. package/dist/actions/menu-styles.d.ts +25 -0
  18. package/dist/actions/menu-styles.js +23 -0
  19. package/dist/actions/menu-styles.js.map +1 -0
  20. package/dist/avatar/avatar.d.ts +30 -0
  21. package/dist/avatar/avatar.js +11 -0
  22. package/dist/avatar/avatar.js.map +1 -0
  23. package/dist/badge/badge.d.ts +32 -0
  24. package/dist/badge/badge.js +10 -0
  25. package/dist/badge/badge.js.map +1 -0
  26. package/dist/button/button.d.ts +7 -4
  27. package/dist/button/button.js +1 -1
  28. package/dist/card/card.d.ts +11 -3
  29. package/dist/card/card.js +1 -1
  30. package/dist/charts/bar-chart.d.ts +50 -11
  31. package/dist/charts/bar-chart.js +7 -2
  32. package/dist/charts/benchmark-table.d.ts +47 -0
  33. package/dist/charts/benchmark-table.js +10 -0
  34. package/dist/charts/benchmark-table.js.map +1 -0
  35. package/dist/charts/delta.d.ts +23 -0
  36. package/dist/charts/delta.js +8 -0
  37. package/dist/charts/delta.js.map +1 -0
  38. package/dist/charts/dot-matrix.d.ts +38 -0
  39. package/dist/charts/dot-matrix.js +13 -0
  40. package/dist/charts/dot-matrix.js.map +1 -0
  41. package/dist/charts/heatmap.d.ts +33 -0
  42. package/dist/charts/heatmap.js +13 -0
  43. package/dist/charts/heatmap.js.map +1 -0
  44. package/dist/charts/lib/scale.d.ts +17 -0
  45. package/dist/charts/lib/scale.js +15 -0
  46. package/dist/charts/lib/scale.js.map +1 -0
  47. package/dist/charts/lib/series.d.ts +76 -44
  48. package/dist/charts/lib/series.js +25 -11
  49. package/dist/charts/lib/use-chart.d.ts +48 -0
  50. package/dist/charts/lib/use-chart.js +16 -0
  51. package/dist/charts/lib/use-chart.js.map +1 -0
  52. package/dist/charts/line-chart.d.ts +52 -19
  53. package/dist/charts/line-chart.js +11 -2
  54. package/dist/charts/meter.d.ts +30 -0
  55. package/dist/charts/meter.js +12 -0
  56. package/dist/charts/meter.js.map +1 -0
  57. package/dist/charts/primitives/chart-frame.d.ts +25 -0
  58. package/dist/charts/primitives/chart-frame.js +8 -0
  59. package/dist/charts/primitives/chart-frame.js.map +1 -0
  60. package/dist/charts/primitives/chart-grid.d.ts +29 -0
  61. package/dist/charts/primitives/chart-grid.js +9 -0
  62. package/dist/charts/primitives/chart-grid.js.map +1 -0
  63. package/dist/charts/primitives/chart-legend.d.ts +23 -0
  64. package/dist/charts/primitives/chart-legend.js +9 -0
  65. package/dist/charts/primitives/chart-legend.js.map +1 -0
  66. package/dist/charts/primitives/chart-tooltip.d.ts +31 -0
  67. package/dist/charts/primitives/chart-tooltip.js +9 -0
  68. package/dist/charts/primitives/chart-tooltip.js.map +1 -0
  69. package/dist/charts/rank-list.d.ts +29 -0
  70. package/dist/charts/rank-list.js +12 -0
  71. package/dist/charts/rank-list.js.map +1 -0
  72. package/dist/charts/ring.d.ts +25 -24
  73. package/dist/charts/ring.js +4 -2
  74. package/dist/charts/scatter-chart.d.ts +42 -0
  75. package/dist/charts/scatter-chart.js +14 -0
  76. package/dist/charts/scatter-chart.js.map +1 -0
  77. package/dist/charts/segmented-bar.d.ts +16 -11
  78. package/dist/charts/segmented-bar.js +6 -2
  79. package/dist/charts/sparkline.d.ts +32 -0
  80. package/dist/charts/sparkline.js +10 -0
  81. package/dist/charts/sparkline.js.map +1 -0
  82. package/dist/charts/stat.d.ts +13 -7
  83. package/dist/charts/stat.js +2 -1
  84. package/dist/chunk-24T7KWXQ.js +84 -0
  85. package/dist/chunk-24T7KWXQ.js.map +1 -0
  86. package/dist/chunk-2NJFAPRG.js +40 -0
  87. package/dist/chunk-2NJFAPRG.js.map +1 -0
  88. package/dist/chunk-3PHVZB3A.js +73 -0
  89. package/dist/chunk-3PHVZB3A.js.map +1 -0
  90. package/dist/chunk-5EGRSN37.js +102 -0
  91. package/dist/chunk-5EGRSN37.js.map +1 -0
  92. package/dist/chunk-7FRDEE43.js +35 -0
  93. package/dist/chunk-7FRDEE43.js.map +1 -0
  94. package/dist/chunk-7YKHLP4S.js +43 -0
  95. package/dist/chunk-7YKHLP4S.js.map +1 -0
  96. package/dist/{chunk-7GXL7U5X.js → chunk-A65X3XYB.js} +4 -3
  97. package/dist/chunk-A65X3XYB.js.map +1 -0
  98. package/dist/chunk-AGKLGZSW.js +74 -0
  99. package/dist/chunk-AGKLGZSW.js.map +1 -0
  100. package/dist/chunk-AQHYE6EF.js +109 -0
  101. package/dist/chunk-AQHYE6EF.js.map +1 -0
  102. package/dist/chunk-AWVTRQZJ.js +117 -0
  103. package/dist/chunk-AWVTRQZJ.js.map +1 -0
  104. package/dist/chunk-BDQUFQE7.js +30 -0
  105. package/dist/chunk-BDQUFQE7.js.map +1 -0
  106. package/dist/chunk-BJKQSXX4.js +54 -0
  107. package/dist/chunk-BJKQSXX4.js.map +1 -0
  108. package/dist/chunk-BKSKRGK7.js +81 -0
  109. package/dist/chunk-BKSKRGK7.js.map +1 -0
  110. package/dist/chunk-BVNDNRPW.js +44 -0
  111. package/dist/chunk-BVNDNRPW.js.map +1 -0
  112. package/dist/chunk-CN6QNKYV.js +24 -0
  113. package/dist/chunk-CN6QNKYV.js.map +1 -0
  114. package/dist/chunk-DD6QBBV2.js +119 -0
  115. package/dist/chunk-DD6QBBV2.js.map +1 -0
  116. package/dist/chunk-DHPFIP7P.js +50 -0
  117. package/dist/chunk-DHPFIP7P.js.map +1 -0
  118. package/dist/chunk-DRJWJ7KG.js +109 -0
  119. package/dist/chunk-DRJWJ7KG.js.map +1 -0
  120. package/dist/chunk-DUJEWU5O.js +72 -0
  121. package/dist/chunk-DUJEWU5O.js.map +1 -0
  122. package/dist/chunk-EKQQBSFF.js +79 -0
  123. package/dist/chunk-EKQQBSFF.js.map +1 -0
  124. package/dist/chunk-EM5UHI3U.js +39 -0
  125. package/dist/chunk-EM5UHI3U.js.map +1 -0
  126. package/dist/chunk-ENL5WNFM.js +101 -0
  127. package/dist/chunk-ENL5WNFM.js.map +1 -0
  128. package/dist/chunk-EVKFEIM2.js +37 -0
  129. package/dist/chunk-EVKFEIM2.js.map +1 -0
  130. package/dist/chunk-EXEJG4IG.js +101 -0
  131. package/dist/chunk-EXEJG4IG.js.map +1 -0
  132. package/dist/chunk-FSVKQPMR.js +45 -0
  133. package/dist/chunk-FSVKQPMR.js.map +1 -0
  134. package/dist/chunk-GASC427L.js +34 -0
  135. package/dist/chunk-GASC427L.js.map +1 -0
  136. package/dist/chunk-GGQ6GQ75.js +24 -0
  137. package/dist/chunk-GGQ6GQ75.js.map +1 -0
  138. package/dist/chunk-GHXR4PCK.js +147 -0
  139. package/dist/chunk-GHXR4PCK.js.map +1 -0
  140. package/dist/chunk-HC3SNY5O.js +52 -0
  141. package/dist/chunk-HC3SNY5O.js.map +1 -0
  142. package/dist/chunk-HJ7ICELB.js +76 -0
  143. package/dist/chunk-HJ7ICELB.js.map +1 -0
  144. package/dist/chunk-I355QWHH.js +40 -0
  145. package/dist/chunk-I355QWHH.js.map +1 -0
  146. package/dist/chunk-I6D5E5ZD.js +34 -0
  147. package/dist/chunk-I6D5E5ZD.js.map +1 -0
  148. package/dist/chunk-IBY25I76.js +49 -0
  149. package/dist/chunk-IBY25I76.js.map +1 -0
  150. package/dist/chunk-IGOTX5DA.js +19 -0
  151. package/dist/chunk-IGOTX5DA.js.map +1 -0
  152. package/dist/chunk-JI4UZW6G.js +39 -0
  153. package/dist/chunk-JI4UZW6G.js.map +1 -0
  154. package/dist/chunk-JZNXMBZ6.js +93 -0
  155. package/dist/chunk-JZNXMBZ6.js.map +1 -0
  156. package/dist/chunk-LAATHRKX.js +39 -0
  157. package/dist/chunk-LAATHRKX.js.map +1 -0
  158. package/dist/chunk-LL5GBPQN.js +64 -0
  159. package/dist/chunk-LL5GBPQN.js.map +1 -0
  160. package/dist/chunk-ML3IXSZV.js +78 -0
  161. package/dist/chunk-ML3IXSZV.js.map +1 -0
  162. package/dist/chunk-MNECWWTU.js +62 -0
  163. package/dist/chunk-MNECWWTU.js.map +1 -0
  164. package/dist/chunk-MPYL4ED3.js +171 -0
  165. package/dist/chunk-MPYL4ED3.js.map +1 -0
  166. package/dist/chunk-MS7ZK2O6.js +65 -0
  167. package/dist/chunk-MS7ZK2O6.js.map +1 -0
  168. package/dist/chunk-MZVQ32JU.js +29 -0
  169. package/dist/chunk-MZVQ32JU.js.map +1 -0
  170. package/dist/chunk-NC4IUB2C.js +33 -0
  171. package/dist/chunk-NC4IUB2C.js.map +1 -0
  172. package/dist/chunk-NCAHIMIB.js +96 -0
  173. package/dist/chunk-NCAHIMIB.js.map +1 -0
  174. package/dist/chunk-NJVKZ5DE.js +114 -0
  175. package/dist/chunk-NJVKZ5DE.js.map +1 -0
  176. package/dist/chunk-OGSHLSI2.js +22 -0
  177. package/dist/chunk-OGSHLSI2.js.map +1 -0
  178. package/dist/chunk-OIAZH5EU.js +36 -0
  179. package/dist/chunk-OIAZH5EU.js.map +1 -0
  180. package/dist/chunk-P22B7HQS.js +45 -0
  181. package/dist/chunk-P22B7HQS.js.map +1 -0
  182. package/dist/chunk-P2CWISVU.js +35 -0
  183. package/dist/chunk-P2CWISVU.js.map +1 -0
  184. package/dist/chunk-P4G5WFHH.js +18 -0
  185. package/dist/chunk-P4G5WFHH.js.map +1 -0
  186. package/dist/chunk-QNIIWNSR.js +78 -0
  187. package/dist/chunk-QNIIWNSR.js.map +1 -0
  188. package/dist/chunk-R23U2FRV.js +23 -0
  189. package/dist/chunk-R23U2FRV.js.map +1 -0
  190. package/dist/chunk-RB6DUG3M.js +9 -0
  191. package/dist/chunk-RB6DUG3M.js.map +1 -0
  192. package/dist/chunk-RKG72NSW.js +26 -0
  193. package/dist/chunk-RKG72NSW.js.map +1 -0
  194. package/dist/chunk-SAVUGRDZ.js +31 -0
  195. package/dist/chunk-SAVUGRDZ.js.map +1 -0
  196. package/dist/chunk-SEMDDFFB.js +37 -0
  197. package/dist/chunk-SEMDDFFB.js.map +1 -0
  198. package/dist/chunk-SNTRWOF6.js +90 -0
  199. package/dist/chunk-SNTRWOF6.js.map +1 -0
  200. package/dist/chunk-SOWWBAOB.js +36 -0
  201. package/dist/chunk-SOWWBAOB.js.map +1 -0
  202. package/dist/chunk-SYGAPDKX.js +45 -0
  203. package/dist/chunk-SYGAPDKX.js.map +1 -0
  204. package/dist/chunk-TBZIUIP2.js +87 -0
  205. package/dist/chunk-TBZIUIP2.js.map +1 -0
  206. package/dist/chunk-TD2NGENS.js +43 -0
  207. package/dist/chunk-TD2NGENS.js.map +1 -0
  208. package/dist/chunk-TH6WBEEL.js +58 -0
  209. package/dist/chunk-TH6WBEEL.js.map +1 -0
  210. package/dist/chunk-TUY3ZMDE.js +42 -0
  211. package/dist/chunk-TUY3ZMDE.js.map +1 -0
  212. package/dist/chunk-U4G72DSG.js +67 -0
  213. package/dist/chunk-U4G72DSG.js.map +1 -0
  214. package/dist/chunk-UG5TRIRZ.js +42 -0
  215. package/dist/chunk-UG5TRIRZ.js.map +1 -0
  216. package/dist/chunk-UOJZEP6N.js +39 -0
  217. package/dist/chunk-UOJZEP6N.js.map +1 -0
  218. package/dist/chunk-V5QWZ3LA.js +77 -0
  219. package/dist/chunk-V5QWZ3LA.js.map +1 -0
  220. package/dist/chunk-VDKJLIEZ.js +291 -0
  221. package/dist/chunk-VDKJLIEZ.js.map +1 -0
  222. package/dist/chunk-W2NESPKL.js +100 -0
  223. package/dist/chunk-W2NESPKL.js.map +1 -0
  224. package/dist/chunk-W3RIYQPO.js +37 -0
  225. package/dist/chunk-W3RIYQPO.js.map +1 -0
  226. package/dist/chunk-WO33CSUW.js +52 -0
  227. package/dist/chunk-WO33CSUW.js.map +1 -0
  228. package/dist/chunk-WSTHL6H7.js +33 -0
  229. package/dist/chunk-WSTHL6H7.js.map +1 -0
  230. package/dist/chunk-WZONN76V.js +55 -0
  231. package/dist/chunk-WZONN76V.js.map +1 -0
  232. package/dist/chunk-XGFM7GVN.js +39 -0
  233. package/dist/chunk-XGFM7GVN.js.map +1 -0
  234. package/dist/chunk-XSYY67X3.js +142 -0
  235. package/dist/chunk-XSYY67X3.js.map +1 -0
  236. package/dist/chunk-YFKM4ZLH.js +111 -0
  237. package/dist/chunk-YFKM4ZLH.js.map +1 -0
  238. package/dist/chunk-YM2TZ5UT.js +42 -0
  239. package/dist/chunk-YM2TZ5UT.js.map +1 -0
  240. package/dist/chunk-YP766ABA.js +268 -0
  241. package/dist/chunk-YP766ABA.js.map +1 -0
  242. package/dist/chunk-YT2PR4LF.js +38 -0
  243. package/dist/chunk-YT2PR4LF.js.map +1 -0
  244. package/dist/chunk-ZI4AJKES.js +29 -0
  245. package/dist/chunk-ZI4AJKES.js.map +1 -0
  246. package/dist/chunk-ZXVCMTM2.js +57 -0
  247. package/dist/chunk-ZXVCMTM2.js.map +1 -0
  248. package/dist/data-display/code-block.d.ts +26 -0
  249. package/dist/data-display/code-block.js +9 -0
  250. package/dist/data-display/code-block.js.map +1 -0
  251. package/dist/data-display/separator.d.ts +11 -0
  252. package/dist/data-display/separator.js +9 -0
  253. package/dist/data-display/separator.js.map +1 -0
  254. package/dist/data-display/stepper.d.ts +27 -0
  255. package/dist/data-display/stepper.js +8 -0
  256. package/dist/data-display/stepper.js.map +1 -0
  257. package/dist/data-display/table.d.ts +43 -0
  258. package/dist/data-display/table.js +24 -0
  259. package/dist/data-display/table.js.map +1 -0
  260. package/dist/data-display/tag.d.ts +27 -0
  261. package/dist/data-display/tag.js +10 -0
  262. package/dist/data-display/tag.js.map +1 -0
  263. package/dist/data-display/timeline.d.ts +24 -0
  264. package/dist/data-display/timeline.js +10 -0
  265. package/dist/data-display/timeline.js.map +1 -0
  266. package/dist/disclosure/accordion.d.ts +18 -0
  267. package/dist/disclosure/accordion.js +15 -0
  268. package/dist/disclosure/accordion.js.map +1 -0
  269. package/dist/disclosure/collapsible.d.ts +14 -0
  270. package/dist/disclosure/collapsible.js +13 -0
  271. package/dist/disclosure/collapsible.js.map +1 -0
  272. package/dist/disclosure/dialog.d.ts +43 -0
  273. package/dist/disclosure/dialog.js +27 -0
  274. package/dist/disclosure/dialog.js.map +1 -0
  275. package/dist/disclosure/hover-card.d.ts +21 -0
  276. package/dist/disclosure/hover-card.js +13 -0
  277. package/dist/disclosure/hover-card.js.map +1 -0
  278. package/dist/dots/dots.d.ts +41 -0
  279. package/dist/dots/dots.js +8 -0
  280. package/dist/dots/dots.js.map +1 -0
  281. package/dist/feedback/alert.d.ts +27 -0
  282. package/dist/feedback/alert.js +13 -0
  283. package/dist/feedback/alert.js.map +1 -0
  284. package/dist/feedback/empty-state.d.ts +28 -0
  285. package/dist/feedback/empty-state.js +8 -0
  286. package/dist/feedback/empty-state.js.map +1 -0
  287. package/dist/feedback/progress.d.ts +19 -0
  288. package/dist/feedback/progress.js +9 -0
  289. package/dist/feedback/progress.js.map +1 -0
  290. package/dist/feedback/skeleton.d.ts +16 -0
  291. package/dist/feedback/skeleton.js +8 -0
  292. package/dist/feedback/skeleton.js.map +1 -0
  293. package/dist/feedback/spinner.d.ts +19 -0
  294. package/dist/feedback/spinner.js +8 -0
  295. package/dist/feedback/spinner.js.map +1 -0
  296. package/dist/feedback/toast.d.ts +35 -0
  297. package/dist/feedback/toast.js +22 -0
  298. package/dist/feedback/toast.js.map +1 -0
  299. package/dist/feedback/tone.d.ts +20 -0
  300. package/dist/feedback/tone.js +11 -0
  301. package/dist/feedback/tone.js.map +1 -0
  302. package/dist/index.d.ts +97 -4
  303. package/dist/index.js +617 -25
  304. package/dist/input/chat-composer.d.ts +40 -0
  305. package/dist/input/chat-composer.js +9 -0
  306. package/dist/input/chat-composer.js.map +1 -0
  307. package/dist/input/checkbox.d.ts +15 -0
  308. package/dist/input/checkbox.js +9 -0
  309. package/dist/input/checkbox.js.map +1 -0
  310. package/dist/input/combobox.d.ts +121 -0
  311. package/dist/input/combobox.js +25 -0
  312. package/dist/input/combobox.js.map +1 -0
  313. package/dist/input/field-styles.d.ts +14 -0
  314. package/dist/input/field-styles.js +9 -0
  315. package/dist/input/field-styles.js.map +1 -0
  316. package/dist/input/input.d.ts +17 -0
  317. package/dist/input/input.js +9 -0
  318. package/dist/input/input.js.map +1 -0
  319. package/dist/input/kbd.d.ts +11 -0
  320. package/dist/input/kbd.js +8 -0
  321. package/dist/input/kbd.js.map +1 -0
  322. package/dist/input/label.d.ts +38 -0
  323. package/dist/input/label.js +11 -0
  324. package/dist/input/label.js.map +1 -0
  325. package/dist/input/radio-group.d.ts +15 -0
  326. package/dist/input/radio-group.js +11 -0
  327. package/dist/input/radio-group.js.map +1 -0
  328. package/dist/input/search-field.d.ts +24 -0
  329. package/dist/input/search-field.js +11 -0
  330. package/dist/input/search-field.js.map +1 -0
  331. package/dist/input/select.d.ts +29 -0
  332. package/dist/input/select.js +25 -0
  333. package/dist/input/select.js.map +1 -0
  334. package/dist/input/slider.d.ts +19 -0
  335. package/dist/input/slider.js +9 -0
  336. package/dist/input/slider.js.map +1 -0
  337. package/dist/input/switch.d.ts +15 -0
  338. package/dist/input/switch.js +9 -0
  339. package/dist/input/switch.js.map +1 -0
  340. package/dist/input/textarea.d.ts +9 -0
  341. package/dist/input/textarea.js +9 -0
  342. package/dist/input/textarea.js.map +1 -0
  343. package/dist/logo/cairn-mark.d.ts +24 -0
  344. package/dist/logo/cairn-mark.js +8 -0
  345. package/dist/logo/cairn-mark.js.map +1 -0
  346. package/dist/marketing/carousel-dots.d.ts +22 -0
  347. package/dist/marketing/carousel-dots.js +8 -0
  348. package/dist/marketing/carousel-dots.js.map +1 -0
  349. package/dist/marketing/cta-band.d.ts +24 -0
  350. package/dist/marketing/cta-band.js +9 -0
  351. package/dist/marketing/cta-band.js.map +1 -0
  352. package/dist/marketing/feature-grid.d.ts +30 -0
  353. package/dist/marketing/feature-grid.js +10 -0
  354. package/dist/marketing/feature-grid.js.map +1 -0
  355. package/dist/marketing/footer.d.ts +33 -0
  356. package/dist/marketing/footer.js +18 -0
  357. package/dist/marketing/footer.js.map +1 -0
  358. package/dist/marketing/hero-badge.d.ts +19 -0
  359. package/dist/marketing/hero-badge.js +8 -0
  360. package/dist/marketing/hero-badge.js.map +1 -0
  361. package/dist/marketing/logo-strip.d.ts +28 -0
  362. package/dist/marketing/logo-strip.js +8 -0
  363. package/dist/marketing/logo-strip.js.map +1 -0
  364. package/dist/marketing/pricing-card.d.ts +37 -0
  365. package/dist/marketing/pricing-card.js +10 -0
  366. package/dist/marketing/pricing-card.js.map +1 -0
  367. package/dist/marketing/section-header.d.ts +23 -0
  368. package/dist/marketing/section-header.js +8 -0
  369. package/dist/marketing/section-header.js.map +1 -0
  370. package/dist/navigation/anchor-rail.d.ts +27 -0
  371. package/dist/navigation/anchor-rail.js +9 -0
  372. package/dist/navigation/anchor-rail.js.map +1 -0
  373. package/dist/navigation/breadcrumb.d.ts +33 -0
  374. package/dist/navigation/breadcrumb.js +20 -0
  375. package/dist/navigation/breadcrumb.js.map +1 -0
  376. package/dist/navigation/nav-bar.d.ts +47 -0
  377. package/dist/navigation/nav-bar.js +21 -0
  378. package/dist/navigation/nav-bar.js.map +1 -0
  379. package/dist/navigation/navigation-menu.d.ts +23 -0
  380. package/dist/navigation/navigation-menu.js +25 -0
  381. package/dist/navigation/navigation-menu.js.map +1 -0
  382. package/dist/navigation/pagination.d.ts +31 -0
  383. package/dist/navigation/pagination.js +20 -0
  384. package/dist/navigation/pagination.js.map +1 -0
  385. package/dist/navigation/side-nav.d.ts +31 -0
  386. package/dist/navigation/side-nav.js +13 -0
  387. package/dist/navigation/side-nav.js.map +1 -0
  388. package/dist/overlay/alert-dialog.d.ts +42 -0
  389. package/dist/overlay/alert-dialog.js +23 -0
  390. package/dist/overlay/alert-dialog.js.map +1 -0
  391. package/dist/overlay/popover.d.ts +41 -0
  392. package/dist/overlay/popover.js +17 -0
  393. package/dist/overlay/popover.js.map +1 -0
  394. package/dist/overlay/sheet.d.ts +47 -0
  395. package/dist/overlay/sheet.js +29 -0
  396. package/dist/overlay/sheet.js.map +1 -0
  397. package/dist/overlay/tooltip.d.ts +31 -0
  398. package/dist/overlay/tooltip.js +15 -0
  399. package/dist/overlay/tooltip.js.map +1 -0
  400. package/dist/tabs/tabs.d.ts +24 -0
  401. package/dist/tabs/tabs.js +15 -0
  402. package/dist/tabs/tabs.js.map +1 -0
  403. package/dist/tabs/toggle-group.d.ts +19 -0
  404. package/dist/tabs/toggle-group.js +11 -0
  405. package/dist/tabs/toggle-group.js.map +1 -0
  406. package/package.json +25 -7
  407. package/dist/chunk-7GXL7U5X.js.map +0 -1
  408. package/dist/chunk-BWYWI4BC.js +0 -43
  409. package/dist/chunk-BWYWI4BC.js.map +0 -1
  410. package/dist/chunk-CZ3JB37A.js +0 -72
  411. package/dist/chunk-CZ3JB37A.js.map +0 -1
  412. package/dist/chunk-G2XJK244.js +0 -96
  413. package/dist/chunk-G2XJK244.js.map +0 -1
  414. package/dist/chunk-OWIUMX76.js +0 -91
  415. package/dist/chunk-OWIUMX76.js.map +0 -1
  416. package/dist/chunk-S4HVXD6Z.js +0 -92
  417. package/dist/chunk-S4HVXD6Z.js.map +0 -1
  418. package/dist/chunk-XGYKA3GE.js +0 -30
  419. package/dist/chunk-XGYKA3GE.js.map +0 -1
  420. package/dist/chunk-YX6MSLUB.js +0 -98
  421. package/dist/chunk-YX6MSLUB.js.map +0 -1
@@ -0,0 +1,90 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/overlay/sheet.tsx
8
+ import * as React from "react";
9
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
10
+ import { cva } from "class-variance-authority";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var sheetVariants = cva(
13
+ // `overflow-hidden` is load-bearing, not tidiness. Without it the sheet itself
14
+ // scrolls: focus moving to a control near the bottom makes the browser scroll
15
+ // the nearest scrollable ancestor into view, and that ancestor is the sheet ,
16
+ // so the header slides off the top and the panel loses its title and its tabs.
17
+ // Only `SheetBody` scrolls, which is why it and only it carries the overflow.
18
+ "fixed z-50 flex flex-col overflow-hidden bg-surface text-on-surface shadow-floating outline-none",
19
+ {
20
+ variants: {
21
+ side: {
22
+ right: "inset-y-0 right-0 h-dvh w-96 max-w-full border-l border-outline",
23
+ left: "inset-y-0 left-0 h-dvh w-96 max-w-full border-r border-outline",
24
+ bottom: "inset-x-0 bottom-0 max-h-[80dvh] w-full border-t border-outline"
25
+ }
26
+ },
27
+ defaultVariants: { side: "right" }
28
+ }
29
+ );
30
+ var Sheet = DialogPrimitive.Root;
31
+ var SheetTrigger = DialogPrimitive.Trigger;
32
+ var SheetClose = DialogPrimitive.Close;
33
+ var SheetPortal = DialogPrimitive.Portal;
34
+ var SheetContent = React.forwardRef(({ className, side, overlay = false, container, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { container: container ?? void 0, children: [
35
+ overlay ? /* @__PURE__ */ jsx(DialogPrimitive.Overlay, { className: "fixed inset-0 z-50 bg-ground-deep/40" }) : null,
36
+ /* @__PURE__ */ jsx(DialogPrimitive.Content, { ref, className: cn(sheetVariants({ side }), className), ...props, children })
37
+ ] }));
38
+ SheetContent.displayName = "SheetContent";
39
+ var SheetHeader = React.forwardRef(
40
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
41
+ "div",
42
+ {
43
+ ref,
44
+ className: cn("flex shrink-0 flex-col gap-gap-sm border-b border-outline p-inset-md", className),
45
+ ...props
46
+ }
47
+ )
48
+ );
49
+ SheetHeader.displayName = "SheetHeader";
50
+ var SheetBody = React.forwardRef(
51
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("min-h-0 flex-1 overflow-y-auto", className), ...props })
52
+ );
53
+ SheetBody.displayName = "SheetBody";
54
+ var SheetFooter = React.forwardRef(
55
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref,
59
+ className: cn("flex shrink-0 flex-col gap-gap-xs border-t border-outline p-inset-md", className),
60
+ ...props
61
+ }
62
+ )
63
+ );
64
+ SheetFooter.displayName = "SheetFooter";
65
+ var SheetTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("sv-title-md", className), ...props }));
66
+ SheetTitle.displayName = "SheetTitle";
67
+ var SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
68
+ DialogPrimitive.Description,
69
+ {
70
+ ref,
71
+ className: cn("sv-body-sm text-on-surface-variant", className),
72
+ ...props
73
+ }
74
+ ));
75
+ SheetDescription.displayName = "SheetDescription";
76
+
77
+ export {
78
+ sheetVariants,
79
+ Sheet,
80
+ SheetTrigger,
81
+ SheetClose,
82
+ SheetPortal,
83
+ SheetContent,
84
+ SheetHeader,
85
+ SheetBody,
86
+ SheetFooter,
87
+ SheetTitle,
88
+ SheetDescription
89
+ };
90
+ //# sourceMappingURL=chunk-SNTRWOF6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/overlay/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Sheet. A panel anchored to one edge, on Radix Dialog.\n *\n * The prop that matters is `modal`, and the default here is deliberately the\n * opposite of Radix's. A **modal** sheet takes the page hostage: focus is\n * trapped, everything behind it is inert, and the rest of the screen is dimmed.\n * That is right for a form you must finish. It is wrong for a companion panel ,\n * an inspector, a comment thread, a filter rail, where the whole point is to\n * keep working in the page while the panel is open. Ship the modal default and\n * every companion panel in the system becomes a trap.\n *\n * So `modal` defaults to false, and Escape-to-close, the labelled dialog role and\n * the focus return still come from Radix. Pass `modal` explicitly when the panel\n * really must be answered before anything else.\n *\n * A `Title` is not optional. Radix warns when one is missing, and it is right to:\n * a dialog with no accessible name is announced as \"dialog\", which tells the user\n * nothing. Use `SheetTitle`, wrap it in `sr-only` if the design has no visible\n * heading, never drop it.\n */\n\nconst sheetVariants = cva(\n // `overflow-hidden` is load-bearing, not tidiness. Without it the sheet itself\n // scrolls: focus moving to a control near the bottom makes the browser scroll\n // the nearest scrollable ancestor into view, and that ancestor is the sheet ,\n // so the header slides off the top and the panel loses its title and its tabs.\n // Only `SheetBody` scrolls, which is why it and only it carries the overflow.\n 'fixed z-50 flex flex-col overflow-hidden bg-surface text-on-surface shadow-floating outline-none',\n {\n variants: {\n side: {\n right: 'inset-y-0 right-0 h-dvh w-96 max-w-full border-l border-outline',\n left: 'inset-y-0 left-0 h-dvh w-96 max-w-full border-r border-outline',\n bottom: 'inset-x-0 bottom-0 max-h-[80dvh] w-full border-t border-outline',\n },\n },\n defaultVariants: { side: 'right' },\n }\n);\n\nexport const Sheet = DialogPrimitive.Root;\nexport const SheetTrigger = DialogPrimitive.Trigger;\nexport const SheetClose = DialogPrimitive.Close;\nexport const SheetPortal = DialogPrimitive.Portal;\n\nexport interface SheetContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>,\n VariantProps<typeof sheetVariants> {\n side?: 'right' | 'left' | 'bottom';\n /** Dim and inert the page behind. Only for a panel that must be answered. */\n overlay?: boolean;\n /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */\n container?: HTMLElement | null;\n}\n\nexport const SheetContent = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n SheetContentProps\n>(({ className, side, overlay = false, container, children, ...props }, ref) => (\n <SheetPortal container={container ?? undefined}>\n {overlay ? (\n <DialogPrimitive.Overlay className=\"fixed inset-0 z-50 bg-ground-deep/40\" />\n ) : null}\n <DialogPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}>\n {children}\n </DialogPrimitive.Content>\n </SheetPortal>\n));\nSheetContent.displayName = 'SheetContent';\n\nexport const SheetHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex shrink-0 flex-col gap-gap-sm border-b border-outline p-inset-md', className)}\n {...props}\n />\n )\n);\nSheetHeader.displayName = 'SheetHeader';\n\nexport const SheetBody = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('min-h-0 flex-1 overflow-y-auto', className)} {...props} />\n )\n);\nSheetBody.displayName = 'SheetBody';\n\nexport const SheetFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex shrink-0 flex-col gap-gap-xs border-t border-outline p-inset-md', className)}\n {...props}\n />\n )\n);\nSheetFooter.displayName = 'SheetFooter';\n\nexport const SheetTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn('sv-title-md', className)} {...props} />\n));\nSheetTitle.displayName = 'SheetTitle';\n\nexport const SheetDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('sv-body-sm text-on-surface-variant', className)}\n {...props}\n />\n));\nSheetDescription.displayName = 'SheetDescription';\n\nexport { sheetVariants };\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,WAA8B;AA8DrC,SAEI,KAFJ;AAtCF,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMpB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,OAAO;AAAA,QACP,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,MAAM,QAAQ;AAAA,EACnC;AACF;AAEO,IAAM,QAAwB;AAC9B,IAAM,eAA+B;AACrC,IAAM,aAA6B;AACnC,IAAM,cAA8B;AAYpC,IAAM,eAAqB,iBAGhC,CAAC,EAAE,WAAW,MAAM,UAAU,OAAO,WAAW,UAAU,GAAG,MAAM,GAAG,QACtE,qBAAC,eAAY,WAAW,aAAa,QAClC;AAAA,YACC,oBAAiB,yBAAhB,EAAwB,WAAU,wCAAuC,IACxE;AAAA,EACJ,oBAAiB,yBAAhB,EAAwB,KAAU,WAAW,GAAG,cAAc,EAAE,KAAK,CAAC,GAAG,SAAS,GAAI,GAAG,OACvF,UACH;AAAA,GACF,CACD;AACD,aAAa,cAAc;AAEpB,IAAM,cAAoB;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wEAAwE,SAAS;AAAA,MAC9F,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,YAAY,cAAc;AAEnB,IAAM,YAAkB;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,kCAAkC,SAAS,GAAI,GAAG,OAAO;AAE1F;AACA,UAAU,cAAc;AAEjB,IAAM,cAAoB;AAAA,EAC/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,wEAAwE,SAAS;AAAA,MAC9F,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,YAAY,cAAc;AAEnB,IAAM,aAAmB,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAiB,uBAAhB,EAAsB,KAAU,WAAW,GAAG,eAAe,SAAS,GAAI,GAAG,OAAO,CACtF;AACD,WAAW,cAAc;AAElB,IAAM,mBAAyB,iBAGpC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,sCAAsC,SAAS;AAAA,IAC5D,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc;","names":[]}
@@ -0,0 +1,36 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/input/checkbox.tsx
8
+ import * as React from "react";
9
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
10
+ import { Check, Minus } from "@phosphor-icons/react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Checkbox = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
13
+ CheckboxPrimitive.Root,
14
+ {
15
+ ref,
16
+ className: cn(
17
+ "peer inline-flex size-5 shrink-0 items-center justify-center border border-on-surface-variant bg-surface text-on-primary",
18
+ "transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:border-on-surface",
19
+ "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary",
20
+ "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",
21
+ "disabled:cursor-not-allowed disabled:opacity-40",
22
+ className
23
+ ),
24
+ ...props,
25
+ children: /* @__PURE__ */ jsxs(CheckboxPrimitive.Indicator, { className: "group/check inline-flex items-center justify-center", children: [
26
+ /* @__PURE__ */ jsx(Check, { size: 14, weight: "bold", "aria-hidden": true, className: "group-data-[state=indeterminate]/check:hidden" }),
27
+ /* @__PURE__ */ jsx(Minus, { size: 14, weight: "bold", "aria-hidden": true, className: "hidden group-data-[state=indeterminate]/check:block" })
28
+ ] })
29
+ }
30
+ ));
31
+ Checkbox.displayName = "Checkbox";
32
+
33
+ export {
34
+ Checkbox
35
+ };
36
+ //# sourceMappingURL=chunk-SOWWBAOB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/input/checkbox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check, Minus } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Checkbox, on Radix Checkbox: a real `role=\"checkbox\"` button with `aria-checked`\n * (including `mixed`), Space to toggle, and a hidden native input inside a form.\n *\n * A square, as everything is. The unchecked box is drawn in `on-surface-variant` rather than\n * the paper hairline: a control's boundary must clear 3:1 against its ground (WCAG 1.4.11), and\n * the hairline does not. Checked takes the ink primary with its paired glyph. Pair it with a\n * `Label` (`htmlFor`), whose click toggles the box.\n */\nexport const Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer inline-flex size-5 shrink-0 items-center justify-center border border-on-surface-variant bg-surface text-on-primary',\n 'transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:border-on-surface',\n 'data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus',\n 'disabled:cursor-not-allowed disabled:opacity-40',\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator className=\"group/check inline-flex items-center justify-center\">\n <Check size={14} weight=\"bold\" aria-hidden className=\"group-data-[state=indeterminate]/check:hidden\" />\n <Minus size={14} weight=\"bold\" aria-hidden className=\"hidden group-data-[state=indeterminate]/check:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = 'Checkbox';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AACnC,SAAS,OAAO,aAAa;AA4BzB,SACE,KADF;AAhBG,IAAM,WAAiB,iBAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAmB;AAAA,EAAlB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,+BAAmB,6BAAlB,EAA4B,WAAU,uDACrC;AAAA,0BAAC,SAAM,MAAM,IAAI,QAAO,QAAO,eAAW,MAAC,WAAU,iDAAgD;AAAA,MACrG,oBAAC,SAAM,MAAM,IAAI,QAAO,QAAO,eAAW,MAAC,WAAU,uDAAsD;AAAA,OAC7G;AAAA;AACF,CACD;AACD,SAAS,cAAc;","names":[]}
@@ -0,0 +1,45 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-DXRY7AS4.js";
4
+
5
+ // src/actions/icon-button.tsx
6
+ import * as React from "react";
7
+ import { Slot } from "@radix-ui/react-slot";
8
+ import { cva } from "class-variance-authority";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var iconButtonVariants = cva(
11
+ "inline-flex shrink-0 items-center justify-center transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:opacity-40",
12
+ {
13
+ variants: {
14
+ variant: {
15
+ primary: "bg-primary text-on-primary hover:bg-primary-hover active:bg-primary-active",
16
+ secondary: "bg-ghost text-on-surface hover:bg-ghost-hover active:bg-ghost-hover",
17
+ outline: "border border-outline-strong bg-surface text-on-surface hover:bg-surface-subtle active:bg-surface-muted",
18
+ ghost: "text-on-surface hover:bg-ghost active:bg-ghost-hover"
19
+ },
20
+ size: {
21
+ sm: "size-8",
22
+ md: "size-10",
23
+ lg: "size-12"
24
+ }
25
+ },
26
+ defaultVariants: { variant: "ghost", size: "md" }
27
+ }
28
+ );
29
+ var GLYPH = { sm: 16, md: 20, lg: 24 };
30
+ var IconButton = React.forwardRef(
31
+ ({ className, variant, size, label, icon: Glyph, weight = "regular", asChild, children, type, ...props }, ref) => {
32
+ const glyph = /* @__PURE__ */ jsx(Glyph, { size: GLYPH[size ?? "md"], weight, "aria-hidden": true });
33
+ if (asChild && React.isValidElement(children)) {
34
+ return /* @__PURE__ */ jsx(Slot, { ref, "aria-label": label, className: cn(iconButtonVariants({ variant, size }), className), ...props, children: React.cloneElement(children, void 0, glyph) });
35
+ }
36
+ return /* @__PURE__ */ jsx("button", { ref, type: type ?? "button", "aria-label": label, className: cn(iconButtonVariants({ variant, size }), className), ...props, children: glyph });
37
+ }
38
+ );
39
+ IconButton.displayName = "IconButton";
40
+
41
+ export {
42
+ iconButtonVariants,
43
+ IconButton
44
+ };
45
+ //# sourceMappingURL=chunk-SYGAPDKX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/actions/icon-button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { Icon as PhosphorIcon } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn IconButton. A square control whose only visible content is a glyph, so `label` is\n * required and becomes the accessible name: an icon names nothing on its own (rule 8). Pair it\n * with a `Tooltip` when sighted users need the word too.\n *\n * Same fills as `Button` (hover steps the fill, press steps it again), same\n * heights (32 / 40 / 48), so an icon button sits on a row of buttons without a seam. `ghost` is\n * the default: an icon action is usually a secondary one.\n */\nconst iconButtonVariants = cva(\n 'inline-flex shrink-0 items-center justify-center transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:opacity-40',\n {\n variants: {\n variant: {\n primary: 'bg-primary text-on-primary hover:bg-primary-hover active:bg-primary-active',\n secondary: 'bg-ghost text-on-surface hover:bg-ghost-hover active:bg-ghost-hover',\n outline: 'border border-outline-strong bg-surface text-on-surface hover:bg-surface-subtle active:bg-surface-muted',\n ghost: 'text-on-surface hover:bg-ghost active:bg-ghost-hover',\n },\n size: {\n sm: 'size-8',\n md: 'size-10',\n lg: 'size-12',\n },\n },\n defaultVariants: { variant: 'ghost', size: 'md' },\n }\n);\n\nconst GLYPH = { sm: 16, md: 20, lg: 24 } as const;\n\nexport interface IconButtonProps\n extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n VariantProps<typeof iconButtonVariants> {\n /** Accessible name. Required: the button shows no text. */\n label: string;\n /** The Phosphor glyph. */\n icon: PhosphorIcon;\n variant?: 'primary' | 'secondary' | 'outline' | 'ghost';\n size?: 'sm' | 'md' | 'lg';\n /** Glyph weight; `fill` marks a pressed or selected state. */\n weight?: 'regular' | 'fill' | 'bold';\n /** Render as the child element (an `<a>`); the glyph is still rendered inside it. */\n asChild?: boolean;\n children?: React.ReactElement;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n ({ className, variant, size, label, icon: Glyph, weight = 'regular', asChild, children, type, ...props }, ref) => {\n const glyph = <Glyph size={GLYPH[size ?? 'md']} weight={weight} aria-hidden />;\n if (asChild && React.isValidElement(children)) {\n return (\n <Slot ref={ref} aria-label={label} className={cn(iconButtonVariants({ variant, size }), className)} {...props}>\n {React.cloneElement(children as React.ReactElement<{ children?: React.ReactNode }>, undefined, glyph)}\n </Slot>\n );\n }\n return (\n <button ref={ref} type={type ?? 'button'} aria-label={label} className={cn(iconButtonVariants({ variant, size }), className)} {...props}>\n {glyph}\n </button>\n );\n }\n);\nIconButton.displayName = 'IconButton';\n\nexport { iconButtonVariants };\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,YAAY;AACrB,SAAS,WAA8B;AAqDrB;AAxClB,IAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WAAW;AAAA,QACX,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,MACA,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,IACF;AAAA,IACA,iBAAiB,EAAE,SAAS,SAAS,MAAM,KAAK;AAAA,EAClD;AACF;AAEA,IAAM,QAAQ,EAAE,IAAI,IAAI,IAAI,IAAI,IAAI,GAAG;AAkBhC,IAAM,aAAmB;AAAA,EAC9B,CAAC,EAAE,WAAW,SAAS,MAAM,OAAO,MAAM,OAAO,SAAS,WAAW,SAAS,UAAU,MAAM,GAAG,MAAM,GAAG,QAAQ;AAChH,UAAM,QAAQ,oBAAC,SAAM,MAAM,MAAM,QAAQ,IAAI,GAAG,QAAgB,eAAW,MAAC;AAC5E,QAAI,WAAiB,qBAAe,QAAQ,GAAG;AAC7C,aACE,oBAAC,QAAK,KAAU,cAAY,OAAO,WAAW,GAAG,mBAAmB,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS,GAAI,GAAG,OACrG,UAAM,mBAAa,UAAgE,QAAW,KAAK,GACtG;AAAA,IAEJ;AACA,WACE,oBAAC,YAAO,KAAU,MAAM,QAAQ,UAAU,cAAY,OAAO,WAAW,GAAG,mBAAmB,EAAE,SAAS,KAAK,CAAC,GAAG,SAAS,GAAI,GAAG,OAC/H,iBACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":[]}
@@ -0,0 +1,87 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/disclosure/dialog.tsx
8
+ import * as React from "react";
9
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
10
+ import { X } from "@phosphor-icons/react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Dialog = DialogPrimitive.Root;
13
+ var DialogTrigger = DialogPrimitive.Trigger;
14
+ var DialogClose = DialogPrimitive.Close;
15
+ var DialogPortal = DialogPrimitive.Portal;
16
+ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
17
+ DialogPrimitive.Overlay,
18
+ {
19
+ ref,
20
+ className: cn(
21
+ "fixed inset-0 z-50 bg-ground-deep/15 backdrop-blur-xs",
22
+ "data-[state=open]:animate-sv-fade-in data-[state=closed]:animate-sv-fade-out motion-reduce:animate-none",
23
+ className
24
+ ),
25
+ ...props
26
+ }
27
+ ));
28
+ DialogOverlay.displayName = "DialogOverlay";
29
+ var DialogContent = React.forwardRef(
30
+ ({ className, container, overlayClassName, closeLabel, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { container: container ?? void 0, children: [
31
+ /* @__PURE__ */ jsx(DialogOverlay, { className: overlayClassName }),
32
+ /* @__PURE__ */ jsxs(
33
+ DialogPrimitive.Content,
34
+ {
35
+ ref,
36
+ className: cn(
37
+ "fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col gap-gap-md overflow-y-auto",
38
+ "border border-outline bg-surface p-inset-lg text-on-surface shadow-floating outline-none",
39
+ "data-[state=open]:animate-sv-zoom-in data-[state=closed]:animate-sv-zoom-out motion-reduce:animate-none",
40
+ className
41
+ ),
42
+ ...props,
43
+ children: [
44
+ children,
45
+ closeLabel ? /* @__PURE__ */ jsx(
46
+ DialogPrimitive.Close,
47
+ {
48
+ "aria-label": closeLabel,
49
+ className: cn(
50
+ "absolute right-3 top-3 inline-flex size-8 items-center justify-center text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-ghost active:bg-ghost-hover",
51
+ "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus"
52
+ ),
53
+ children: /* @__PURE__ */ jsx(X, { size: 16, "aria-hidden": true })
54
+ }
55
+ ) : null
56
+ ]
57
+ }
58
+ )
59
+ ] })
60
+ );
61
+ DialogContent.displayName = "DialogContent";
62
+ function DialogHeader({ className, ...props }) {
63
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-gap-xs pr-8", className), ...props });
64
+ }
65
+ function DialogFooter({ className, ...props }) {
66
+ return /* @__PURE__ */ jsx("div", { className: cn("flex flex-col-reverse gap-gap-sm sm:flex-row sm:justify-end", className), ...props });
67
+ }
68
+ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Title, { ref, className: cn("sv-title-md text-on-surface", className), ...props }));
69
+ DialogTitle.displayName = "DialogTitle";
70
+ var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DialogPrimitive.Description, { ref, className: cn("sv-body-md text-on-surface-variant", className), ...props }));
71
+ DialogDescription.displayName = "DialogDescription";
72
+ DialogHeader.displayName = "DialogHeader";
73
+ DialogFooter.displayName = "DialogFooter";
74
+
75
+ export {
76
+ Dialog,
77
+ DialogTrigger,
78
+ DialogClose,
79
+ DialogPortal,
80
+ DialogOverlay,
81
+ DialogContent,
82
+ DialogHeader,
83
+ DialogFooter,
84
+ DialogTitle,
85
+ DialogDescription
86
+ };
87
+ //# sourceMappingURL=chunk-TBZIUIP2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/disclosure/dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Dialog, on Radix Dialog: modal, focus trapped and returned to the trigger, Escape and\n * scrim click close, the page behind is inert to assistive tech, scroll is locked. A dialog\n * must be named: always render a `DialogTitle` (wrap it in `sr-only` when the design has no\n * visible title), and a `DialogDescription` or pass `aria-describedby={undefined}`.\n *\n * 22/11/2026: the panel is paper on one hairline,\n * square, 24px inset, max 512px wide; it zooms in from 95% with a fade over 200ms. The scrim is\n * ink at 15% with a 4px blur, so the page stays legible behind it. Reduced motion drops the\n * zoom and the fade.\n *\n * The close button is optional (`closeLabel`): no word is baked in, so it renders only when the\n * consumer names it.\n */\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogClose = DialogPrimitive.Close;\nexport const DialogPortal = DialogPrimitive.Portal;\n\nexport const DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-ground-deep/15 backdrop-blur-xs',\n 'data-[state=open]:animate-sv-fade-in data-[state=closed]:animate-sv-fade-out motion-reduce:animate-none',\n className\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = 'DialogOverlay';\n\nexport interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n /** Where the portal mounts. Defaults to `document.body`. See `PopoverContent`. */\n container?: HTMLElement | null;\n /** Classes for the scrim, so it can be raised with the panel. */\n overlayClassName?: string;\n /** Accessible name of a close button in the top corner. Omit for no button. */\n closeLabel?: string;\n}\n\nexport const DialogContent = React.forwardRef<React.ComponentRef<typeof DialogPrimitive.Content>, DialogContentProps>(\n ({ className, container, overlayClassName, closeLabel, children, ...props }, ref) => (\n <DialogPrimitive.Portal container={container ?? undefined}>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-1/2 top-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 flex-col gap-gap-md overflow-y-auto',\n 'border border-outline bg-surface p-inset-lg text-on-surface shadow-floating outline-none',\n 'data-[state=open]:animate-sv-zoom-in data-[state=closed]:animate-sv-zoom-out motion-reduce:animate-none',\n className\n )}\n {...props}\n >\n {children}\n {closeLabel ? (\n <DialogPrimitive.Close\n aria-label={closeLabel}\n className={cn(\n 'absolute right-3 top-3 inline-flex size-8 items-center justify-center text-on-surface transition-colors duration-(--sv-sys-motion-duration-fast) ease-standard hover:bg-ghost active:bg-ghost-hover',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus'\n )}\n >\n <X size={16} aria-hidden />\n </DialogPrimitive.Close>\n ) : null}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n )\n);\nDialogContent.displayName = 'DialogContent';\n\nexport function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('flex flex-col gap-gap-xs pr-8', className)} {...props} />;\n}\n\nexport function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('flex flex-col-reverse gap-gap-sm sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\nexport const DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title ref={ref} className={cn('sv-title-md text-on-surface', className)} {...props} />\n));\nDialogTitle.displayName = 'DialogTitle';\n\nexport const DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description ref={ref} className={cn('sv-body-md text-on-surface-variant', className)} {...props} />\n));\nDialogDescription.displayName = 'DialogDescription';\n\nDialogHeader.displayName = 'DialogHeader';\nDialogFooter.displayName = 'DialogFooter';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AA0BhB,cAyBI,YAzBJ;AATK,IAAM,SAAyB;AAC/B,IAAM,gBAAgC;AACtC,IAAM,cAA8B;AACpC,IAAM,eAA+B;AAErC,IAAM,gBAAsB,iBAGjC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,cAAc,cAAc;AAWrB,IAAM,gBAAsB;AAAA,EACjC,CAAC,EAAE,WAAW,WAAW,kBAAkB,YAAY,UAAU,GAAG,MAAM,GAAG,QAC3E,qBAAiB,wBAAhB,EAAuB,WAAW,aAAa,QAC9C;AAAA,wBAAC,iBAAc,WAAW,kBAAkB;AAAA,IAC5C;AAAA,MAAiB;AAAA,MAAhB;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA;AAAA,UACA,aACC;AAAA,YAAiB;AAAA,YAAhB;AAAA,cACC,cAAY;AAAA,cACZ,WAAW;AAAA,gBACT;AAAA,gBACA;AAAA,cACF;AAAA,cAEA,8BAAC,KAAE,MAAM,IAAI,eAAW,MAAC;AAAA;AAAA,UAC3B,IACE;AAAA;AAAA;AAAA,IACN;AAAA,KACF;AAEJ;AACA,cAAc,cAAc;AAErB,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AAC1F,SAAO,oBAAC,SAAI,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AACpF;AAEO,SAAS,aAAa,EAAE,WAAW,GAAG,MAAM,GAAyC;AAC1F,SAAO,oBAAC,SAAI,WAAW,GAAG,+DAA+D,SAAS,GAAI,GAAG,OAAO;AAClH;AAEO,IAAM,cAAoB,iBAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAiB,uBAAhB,EAAsB,KAAU,WAAW,GAAG,+BAA+B,SAAS,GAAI,GAAG,OAAO,CACtG;AACD,YAAY,cAAc;AAEnB,IAAM,oBAA0B,iBAGrC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAiB,6BAAhB,EAA4B,KAAU,WAAW,GAAG,sCAAsC,SAAS,GAAI,GAAG,OAAO,CACnH;AACD,kBAAkB,cAAc;AAEhC,aAAa,cAAc;AAC3B,aAAa,cAAc;","names":[]}
@@ -0,0 +1,43 @@
1
+ import {
2
+ chartToken
3
+ } from "./chunk-5EGRSN37.js";
4
+ import {
5
+ cn
6
+ } from "./chunk-DXRY7AS4.js";
7
+
8
+ // src/charts/primitives/chart-grid.tsx
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ function ChartGrid({ ticks, min, max, axis = "y", format = String, hideLabels, baseline = true, className }) {
11
+ const span = max - min || 1;
12
+ const pos = (t) => (t - min) / span * 100;
13
+ const base = min <= 0 && max >= 0 ? 0 : min;
14
+ return /* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: cn("pointer-events-none absolute inset-0", className), children: ticks.map((t) => {
15
+ const p = pos(t);
16
+ const isBase = baseline && t === base;
17
+ return axis === "y" ? /* @__PURE__ */ jsxs("div", { className: "absolute inset-x-0", style: { bottom: `${p}%` }, children: [
18
+ /* @__PURE__ */ jsx(
19
+ "div",
20
+ {
21
+ className: cn("w-full border-t", isBase ? "border-solid" : "border-dashed"),
22
+ style: { borderColor: isBase ? chartToken.axis : chartToken.grid }
23
+ }
24
+ ),
25
+ !hideLabels && /* @__PURE__ */ jsx("span", { className: "absolute right-full top-0 -translate-y-1/2 pr-2 sv-body-xs tabular-nums whitespace-nowrap text-chart-label", children: format(t) })
26
+ ] }, t) : /* @__PURE__ */ jsxs("div", { className: "absolute inset-y-0", style: { left: `${p}%` }, children: [
27
+ /* @__PURE__ */ jsx(
28
+ "div",
29
+ {
30
+ className: cn("h-full border-l", isBase ? "border-solid" : "border-dashed"),
31
+ style: { borderColor: isBase ? chartToken.axis : chartToken.grid }
32
+ }
33
+ ),
34
+ !hideLabels && /* @__PURE__ */ jsx("span", { className: "absolute left-0 top-full -translate-x-1/2 pt-2 sv-body-xs tabular-nums whitespace-nowrap text-chart-label", children: format(t) })
35
+ ] }, t);
36
+ }) });
37
+ }
38
+ ChartGrid.displayName = "ChartGrid";
39
+
40
+ export {
41
+ ChartGrid
42
+ };
43
+ //# sourceMappingURL=chunk-TD2NGENS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/charts/primitives/chart-grid.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\nimport { chartToken } from '../lib/series';\n\nexport interface ChartGridProps {\n /** Tick values, in data units. */\n ticks: number[];\n /** Domain the ticks are placed in. */\n min: number;\n max: number;\n /** `y`: horizontal rules with labels on the left. `x`: vertical rules with labels below. */\n axis?: 'y' | 'x';\n format?: (v: number) => string;\n /** Hide the tick labels, keep the rules. */\n hideLabels?: boolean;\n /** Draw the solid baseline at the domain minimum (or at zero when it is in range). */\n baseline?: boolean;\n className?: string;\n}\n\n/**\n * Cairn ChartGrid: the minimal axis of the family. Dashed hairline rules in `grid`, small tick\n * labels in `label`, one solid baseline in `axis`. No frame, no tick marks. Absolutely\n * positioned over its parent plot, which must be `relative`; decorative to assistive tech\n * (the marks carry the values).\n */\nexport function ChartGrid({ ticks, min, max, axis = 'y', format = String, hideLabels, baseline = true, className }: ChartGridProps) {\n const span = max - min || 1;\n const pos = (t: number) => ((t - min) / span) * 100;\n const base = min <= 0 && max >= 0 ? 0 : min;\n return (\n <div aria-hidden=\"true\" className={cn('pointer-events-none absolute inset-0', className)}>\n {ticks.map((t) => {\n const p = pos(t);\n const isBase = baseline && t === base;\n return axis === 'y' ? (\n <div key={t} className=\"absolute inset-x-0\" style={{ bottom: `${p}%` }}>\n <div\n className={cn('w-full border-t', isBase ? 'border-solid' : 'border-dashed')}\n style={{ borderColor: isBase ? chartToken.axis : chartToken.grid }}\n />\n {!hideLabels && (\n <span className=\"absolute right-full top-0 -translate-y-1/2 pr-2 sv-body-xs tabular-nums whitespace-nowrap text-chart-label\">\n {format(t)}\n </span>\n )}\n </div>\n ) : (\n <div key={t} className=\"absolute inset-y-0\" style={{ left: `${p}%` }}>\n <div\n className={cn('h-full border-l', isBase ? 'border-solid' : 'border-dashed')}\n style={{ borderColor: isBase ? chartToken.axis : chartToken.grid }}\n />\n {!hideLabels && (\n <span className=\"absolute left-0 top-full -translate-x-1/2 pt-2 sv-body-xs tabular-nums whitespace-nowrap text-chart-label\">\n {format(t)}\n </span>\n )}\n </div>\n );\n })}\n </div>\n );\n}\nChartGrid.displayName = 'ChartGrid';\n"],"mappings":";;;;;;;;AAmCU,SACE,KADF;AAVH,SAAS,UAAU,EAAE,OAAO,KAAK,KAAK,OAAO,KAAK,SAAS,QAAQ,YAAY,WAAW,MAAM,UAAU,GAAmB;AAClI,QAAM,OAAO,MAAM,OAAO;AAC1B,QAAM,MAAM,CAAC,OAAgB,IAAI,OAAO,OAAQ;AAChD,QAAM,OAAO,OAAO,KAAK,OAAO,IAAI,IAAI;AACxC,SACE,oBAAC,SAAI,eAAY,QAAO,WAAW,GAAG,wCAAwC,SAAS,GACpF,gBAAM,IAAI,CAAC,MAAM;AAChB,UAAM,IAAI,IAAI,CAAC;AACf,UAAM,SAAS,YAAY,MAAM;AACjC,WAAO,SAAS,MACd,qBAAC,SAAY,WAAU,sBAAqB,OAAO,EAAE,QAAQ,GAAG,CAAC,IAAI,GACnE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,GAAG,mBAAmB,SAAS,iBAAiB,eAAe;AAAA,UAC1E,OAAO,EAAE,aAAa,SAAS,WAAW,OAAO,WAAW,KAAK;AAAA;AAAA,MACnE;AAAA,MACC,CAAC,cACA,oBAAC,UAAK,WAAU,8GACb,iBAAO,CAAC,GACX;AAAA,SARM,CAUV,IAEA,qBAAC,SAAY,WAAU,sBAAqB,OAAO,EAAE,MAAM,GAAG,CAAC,IAAI,GACjE;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW,GAAG,mBAAmB,SAAS,iBAAiB,eAAe;AAAA,UAC1E,OAAO,EAAE,aAAa,SAAS,WAAW,OAAO,WAAW,KAAK;AAAA;AAAA,MACnE;AAAA,MACC,CAAC,cACA,oBAAC,UAAK,WAAU,6GACb,iBAAO,CAAC,GACX;AAAA,SARM,CAUV;AAAA,EAEJ,CAAC,GACH;AAEJ;AACA,UAAU,cAAc;","names":[]}
@@ -0,0 +1,58 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/disclosure/accordion.tsx
8
+ import * as React from "react";
9
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
10
+ import { CaretDown } from "@phosphor-icons/react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var Accordion = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Root, { ref, className: cn("border-b border-outline", className), ...props }));
13
+ Accordion.displayName = "Accordion";
14
+ var AccordionItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, { ref, className: cn("border-t border-outline", className), ...props }));
15
+ AccordionItem.displayName = "AccordionItem";
16
+ var AccordionTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
17
+ AccordionPrimitive.Trigger,
18
+ {
19
+ ref,
20
+ className: cn(
21
+ "group/acc flex flex-1 items-center justify-between gap-gap-md px-4 py-6 text-left sv-label-lg text-on-surface",
22
+ "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus",
23
+ "disabled:cursor-not-allowed disabled:opacity-40",
24
+ className
25
+ ),
26
+ ...props,
27
+ children: [
28
+ children,
29
+ /* @__PURE__ */ jsx(
30
+ CaretDown,
31
+ {
32
+ size: 20,
33
+ "aria-hidden": true,
34
+ className: "shrink-0 transition-transform duration-(--sv-sys-motion-duration-base) ease-standard group-data-[state=open]/acc:rotate-180 motion-reduce:transition-none"
35
+ }
36
+ )
37
+ ]
38
+ }
39
+ ) }));
40
+ AccordionTrigger.displayName = "AccordionTrigger";
41
+ var AccordionContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
42
+ AccordionPrimitive.Content,
43
+ {
44
+ ref,
45
+ className: "overflow-hidden data-[state=open]:animate-sv-unroll-down data-[state=closed]:animate-sv-unroll-up motion-reduce:animate-none",
46
+ ...props,
47
+ children: /* @__PURE__ */ jsx("div", { className: cn("px-4 pb-6 sv-body-md text-on-surface-variant", className), children })
48
+ }
49
+ ));
50
+ AccordionContent.displayName = "AccordionContent";
51
+
52
+ export {
53
+ Accordion,
54
+ AccordionItem,
55
+ AccordionTrigger,
56
+ AccordionContent
57
+ };
58
+ //# sourceMappingURL=chunk-TH6WBEEL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/disclosure/accordion.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AccordionPrimitive from '@radix-ui/react-accordion';\nimport { CaretDown } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Accordion, on Radix Accordion: each header is a real heading wrapping a button with\n * `aria-expanded` and `aria-controls`, arrow keys move between headers, Home and End jump.\n *\n * 22/11/2026: full-width rows on hairlines, 16px side inset\n * and 24px top and bottom, the caret on the right turning 180 degrees on the 300ms curve, no\n * hover fill (the row is already the target). The panel unrolls to the height Radix measures\n * (`animate-sv-unroll-down`), and reduced motion opens it at once.\n */\nexport const Accordion = React.forwardRef<\n React.ComponentRef<typeof AccordionPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Root ref={ref} className={cn('border-b border-outline', className)} {...props} />\n));\nAccordion.displayName = 'Accordion';\n\nexport const AccordionItem = React.forwardRef<\n React.ComponentRef<typeof AccordionPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <AccordionPrimitive.Item ref={ref} className={cn('border-t border-outline', className)} {...props} />\n));\nAccordionItem.displayName = 'AccordionItem';\n\nexport const AccordionTrigger = React.forwardRef<\n React.ComponentRef<typeof AccordionPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Header className=\"flex\">\n <AccordionPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group/acc flex flex-1 items-center justify-between gap-gap-md px-4 py-6 text-left sv-label-lg text-on-surface',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-focus',\n 'disabled:cursor-not-allowed disabled:opacity-40',\n className\n )}\n {...props}\n >\n {children}\n <CaretDown\n size={20}\n aria-hidden\n className=\"shrink-0 transition-transform duration-(--sv-sys-motion-duration-base) ease-standard group-data-[state=open]/acc:rotate-180 motion-reduce:transition-none\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n));\nAccordionTrigger.displayName = 'AccordionTrigger';\n\nexport const AccordionContent = React.forwardRef<\n React.ComponentRef<typeof AccordionPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <AccordionPrimitive.Content\n ref={ref}\n className=\"overflow-hidden data-[state=open]:animate-sv-unroll-down data-[state=closed]:animate-sv-unroll-up motion-reduce:animate-none\"\n {...props}\n >\n <div className={cn('px-4 pb-6 sv-body-md text-on-surface-variant', className)}>{children}</div>\n </AccordionPrimitive.Content>\n));\nAccordionContent.displayName = 'AccordionContent';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,wBAAwB;AACpC,SAAS,iBAAiB;AAgBxB,cAiBE,YAjBF;AAJK,IAAM,YAAkB,iBAG7B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAoB,yBAAnB,EAAwB,KAAU,WAAW,GAAG,2BAA2B,SAAS,GAAI,GAAG,OAAO,CACpG;AACD,UAAU,cAAc;AAEjB,IAAM,gBAAsB,iBAGjC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAoB,yBAAnB,EAAwB,KAAU,WAAW,GAAG,2BAA2B,SAAS,GAAI,GAAG,OAAO,CACpG;AACD,cAAc,cAAc;AAErB,IAAM,mBAAyB,iBAGpC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC,oBAAoB,2BAAnB,EAA0B,WAAU,QACnC;AAAA,EAAoB;AAAA,EAAnB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD;AAAA,QAAC;AAAA;AAAA,UACC,MAAM;AAAA,UACN,eAAW;AAAA,UACX,WAAU;AAAA;AAAA,MACZ;AAAA;AAAA;AACF,GACF,CACD;AACD,iBAAiB,cAAc;AAExB,IAAM,mBAAyB,iBAGpC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAoB;AAAA,EAAnB;AAAA,IACC;AAAA,IACA,WAAU;AAAA,IACT,GAAG;AAAA,IAEJ,8BAAC,SAAI,WAAW,GAAG,gDAAgD,SAAS,GAAI,UAAS;AAAA;AAC3F,CACD;AACD,iBAAiB,cAAc;","names":[]}
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import {
4
+ cn
5
+ } from "./chunk-DXRY7AS4.js";
6
+
7
+ // src/feedback/progress.tsx
8
+ import * as React from "react";
9
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
10
+ import { jsx } from "react/jsx-runtime";
11
+ var Progress = React.forwardRef(
12
+ ({ className, value, max = 100, size = "sm", ...props }, ref) => {
13
+ const indeterminate = value === null || value === void 0;
14
+ const pct = indeterminate ? 100 : Math.min(100, Math.max(0, value / max * 100));
15
+ return /* @__PURE__ */ jsx(
16
+ ProgressPrimitive.Root,
17
+ {
18
+ ref,
19
+ value,
20
+ max,
21
+ className: cn("relative w-full overflow-hidden bg-surface-muted", size === "sm" ? "h-1" : "h-2", className),
22
+ ...props,
23
+ children: /* @__PURE__ */ jsx(
24
+ ProgressPrimitive.Indicator,
25
+ {
26
+ className: cn(
27
+ "h-full w-full bg-primary transition-transform duration-(--sv-sys-motion-duration-base) ease-standard motion-reduce:transition-none",
28
+ indeterminate && "animate-sv-breathe motion-reduce:animate-none"
29
+ ),
30
+ style: { transform: `translateX(-${100 - pct}%)` }
31
+ }
32
+ )
33
+ }
34
+ );
35
+ }
36
+ );
37
+ Progress.displayName = "Progress";
38
+
39
+ export {
40
+ Progress
41
+ };
42
+ //# sourceMappingURL=chunk-TUY3ZMDE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/feedback/progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as ProgressPrimitive from '@radix-ui/react-progress';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Progress, on Radix Progress: `role=\"progressbar\"` with `aria-valuenow`, `-valuemax`\n * and the `data-state` of loading, complete or indeterminate. Name it (`aria-label` or\n * `aria-labelledby`): a bar with no name announces a bare percentage.\n *\n * A 4px track on the paper step, the fill in ink, square. The fill moves on the 300ms curve.\n * With `value={null}` the bar is indeterminate and breathes (`animate-sv-breathe`); reduced\n * motion holds it still at full fill.\n */\nexport interface ProgressProps extends React.ComponentPropsWithoutRef<typeof ProgressPrimitive.Root> {\n /** Track height: 4px (`sm`) or 8px (`md`). */\n size?: 'sm' | 'md';\n}\n\nexport const Progress = React.forwardRef<React.ComponentRef<typeof ProgressPrimitive.Root>, ProgressProps>(\n ({ className, value, max = 100, size = 'sm', ...props }, ref) => {\n const indeterminate = value === null || value === undefined;\n const pct = indeterminate ? 100 : Math.min(100, Math.max(0, (value / max) * 100));\n return (\n <ProgressPrimitive.Root\n ref={ref}\n value={value}\n max={max}\n className={cn('relative w-full overflow-hidden bg-surface-muted', size === 'sm' ? 'h-1' : 'h-2', className)}\n {...props}\n >\n <ProgressPrimitive.Indicator\n className={cn(\n 'h-full w-full bg-primary transition-transform duration-(--sv-sys-motion-duration-base) ease-standard motion-reduce:transition-none',\n indeterminate && 'animate-sv-breathe motion-reduce:animate-none'\n )}\n style={{ transform: `translateX(-${100 - pct}%)` }}\n />\n </ProgressPrimitive.Root>\n );\n }\n);\nProgress.displayName = 'Progress';\n"],"mappings":";;;;;AAEA,YAAY,WAAW;AACvB,YAAY,uBAAuB;AA6B3B;AAZD,IAAM,WAAiB;AAAA,EAC5B,CAAC,EAAE,WAAW,OAAO,MAAM,KAAK,OAAO,MAAM,GAAG,MAAM,GAAG,QAAQ;AAC/D,UAAM,gBAAgB,UAAU,QAAQ,UAAU;AAClD,UAAM,MAAM,gBAAgB,MAAM,KAAK,IAAI,KAAK,KAAK,IAAI,GAAI,QAAQ,MAAO,GAAG,CAAC;AAChF,WACE;AAAA,MAAmB;AAAA,MAAlB;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,GAAG,oDAAoD,SAAS,OAAO,QAAQ,OAAO,SAAS;AAAA,QACzG,GAAG;AAAA,QAEJ;AAAA,UAAmB;AAAA,UAAlB;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,iBAAiB;AAAA,YACnB;AAAA,YACA,OAAO,EAAE,WAAW,eAAe,MAAM,GAAG,KAAK;AAAA;AAAA,QACnD;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
@@ -0,0 +1,67 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-DXRY7AS4.js";
4
+
5
+ // src/data-display/stepper.tsx
6
+ import * as React from "react";
7
+ import { Check } from "@phosphor-icons/react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ var Stepper = React.forwardRef(
10
+ ({ className, steps, current, orientation = "horizontal", completeLabel, ...props }, ref) => {
11
+ const vertical = orientation === "vertical";
12
+ return /* @__PURE__ */ jsx("ol", { ref, className: cn("flex", vertical ? "flex-col" : "flex-row items-start", className), ...props, children: steps.map((step, i) => {
13
+ const state = i < current ? "done" : i === current ? "current" : "upcoming";
14
+ const last = i === steps.length - 1;
15
+ return /* @__PURE__ */ jsxs(
16
+ "li",
17
+ {
18
+ "aria-current": state === "current" ? "step" : void 0,
19
+ className: cn("relative flex gap-gap-sm", vertical ? "pb-6 last:pb-0" : "flex-1 flex-col pr-4 last:flex-none last:pr-0"),
20
+ children: [
21
+ /* @__PURE__ */ jsxs("div", { className: cn("flex items-center", vertical ? "flex-col self-stretch" : "flex-row"), children: [
22
+ /* @__PURE__ */ jsx(
23
+ "span",
24
+ {
25
+ className: cn(
26
+ "inline-flex size-8 shrink-0 items-center justify-center sv-label-sm tabular-nums",
27
+ state === "done" && "bg-primary text-on-primary",
28
+ state === "current" && "border-2 border-primary bg-surface text-on-surface",
29
+ state === "upcoming" && "border border-outline-strong bg-surface text-on-surface-variant"
30
+ ),
31
+ children: state === "done" ? /* @__PURE__ */ jsx(Check, { size: 16, weight: "bold", "aria-hidden": true }) : i + 1
32
+ }
33
+ ),
34
+ !last ? /* @__PURE__ */ jsx(
35
+ "span",
36
+ {
37
+ "aria-hidden": true,
38
+ className: cn(
39
+ state === "done" ? "bg-primary" : "bg-outline",
40
+ vertical ? "mt-2 -mb-4 w-px flex-1" : "ml-2 h-px flex-1"
41
+ )
42
+ }
43
+ ) : null
44
+ ] }),
45
+ /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-gap-xs", vertical ? "pt-1.5" : "pr-2"), children: [
46
+ /* @__PURE__ */ jsxs("span", { className: cn("sv-label-lg", state === "upcoming" ? "text-on-surface-variant" : "text-on-surface"), children: [
47
+ step.label,
48
+ state === "done" && completeLabel ? /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
49
+ ", ",
50
+ completeLabel
51
+ ] }) : null
52
+ ] }),
53
+ step.description ? /* @__PURE__ */ jsx("span", { className: "sv-body-sm text-on-surface-variant", children: step.description }) : null
54
+ ] })
55
+ ]
56
+ },
57
+ i
58
+ );
59
+ }) });
60
+ }
61
+ );
62
+ Stepper.displayName = "Stepper";
63
+
64
+ export {
65
+ Stepper
66
+ };
67
+ //# sourceMappingURL=chunk-U4G72DSG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/data-display/stepper.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Check } from '@phosphor-icons/react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn Stepper. Progress through an ordered task, as an ordered list: the order is the\n * structure, `aria-current=\"step\"` marks where the reader is.\n *\n * Square 32px markers carrying the step number in `tabular-nums`: done is the ink primary with\n * a check, current is an ink edge (the `emphasis` 2px border), upcoming is a hairline with the\n * number in the variant tone. Steps join on a hairline that turns ink once passed. Completion\n * is never shown by colour alone: the check replaces the number, and `completeLabel`, when\n * given, is read after a done step's label.\n */\nexport interface StepperStep {\n label: React.ReactNode;\n description?: React.ReactNode;\n}\n\nexport interface StepperProps extends React.OlHTMLAttributes<HTMLOListElement> {\n steps: StepperStep[];\n /** Index of the current step (0-based). Steps before it are done. */\n current: number;\n orientation?: 'horizontal' | 'vertical';\n /** Visually hidden word read after a done step, e.g. the consumer's \"done\". */\n completeLabel?: string;\n}\n\nexport const Stepper = React.forwardRef<HTMLOListElement, StepperProps>(\n ({ className, steps, current, orientation = 'horizontal', completeLabel, ...props }, ref) => {\n const vertical = orientation === 'vertical';\n return (\n <ol ref={ref} className={cn('flex', vertical ? 'flex-col' : 'flex-row items-start', className)} {...props}>\n {steps.map((step, i) => {\n const state = i < current ? 'done' : i === current ? 'current' : 'upcoming';\n const last = i === steps.length - 1;\n return (\n <li\n key={i}\n aria-current={state === 'current' ? 'step' : undefined}\n className={cn('relative flex gap-gap-sm', vertical ? 'pb-6 last:pb-0' : 'flex-1 flex-col pr-4 last:flex-none last:pr-0')}\n >\n <div className={cn('flex items-center', vertical ? 'flex-col self-stretch' : 'flex-row')}>\n <span\n className={cn(\n 'inline-flex size-8 shrink-0 items-center justify-center sv-label-sm tabular-nums',\n state === 'done' && 'bg-primary text-on-primary',\n state === 'current' && 'border-2 border-primary bg-surface text-on-surface',\n state === 'upcoming' && 'border border-outline-strong bg-surface text-on-surface-variant'\n )}\n >\n {state === 'done' ? <Check size={16} weight=\"bold\" aria-hidden /> : i + 1}\n </span>\n {!last ? (\n <span\n aria-hidden\n className={cn(\n state === 'done' ? 'bg-primary' : 'bg-outline',\n vertical ? 'mt-2 -mb-4 w-px flex-1' : 'ml-2 h-px flex-1'\n )}\n />\n ) : null}\n </div>\n <div className={cn('flex flex-col gap-gap-xs', vertical ? 'pt-1.5' : 'pr-2')}>\n <span className={cn('sv-label-lg', state === 'upcoming' ? 'text-on-surface-variant' : 'text-on-surface')}>\n {step.label}\n {state === 'done' && completeLabel ? <span className=\"sr-only\">, {completeLabel}</span> : null}\n </span>\n {step.description ? <span className=\"sv-body-sm text-on-surface-variant\">{step.description}</span> : null}\n </div>\n </li>\n );\n })}\n </ol>\n );\n }\n);\nStepper.displayName = 'Stepper';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,aAAa;AAyCR,SASwB,KATxB;AAdP,IAAM,UAAgB;AAAA,EAC3B,CAAC,EAAE,WAAW,OAAO,SAAS,cAAc,cAAc,eAAe,GAAG,MAAM,GAAG,QAAQ;AAC3F,UAAM,WAAW,gBAAgB;AACjC,WACE,oBAAC,QAAG,KAAU,WAAW,GAAG,QAAQ,WAAW,aAAa,wBAAwB,SAAS,GAAI,GAAG,OACjG,gBAAM,IAAI,CAAC,MAAM,MAAM;AACtB,YAAM,QAAQ,IAAI,UAAU,SAAS,MAAM,UAAU,YAAY;AACjE,YAAM,OAAO,MAAM,MAAM,SAAS;AAClC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,gBAAc,UAAU,YAAY,SAAS;AAAA,UAC7C,WAAW,GAAG,4BAA4B,WAAW,mBAAmB,+CAA+C;AAAA,UAEvH;AAAA,iCAAC,SAAI,WAAW,GAAG,qBAAqB,WAAW,0BAA0B,UAAU,GACrF;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAW;AAAA,oBACT;AAAA,oBACA,UAAU,UAAU;AAAA,oBACpB,UAAU,aAAa;AAAA,oBACvB,UAAU,cAAc;AAAA,kBAC1B;AAAA,kBAEC,oBAAU,SAAS,oBAAC,SAAM,MAAM,IAAI,QAAO,QAAO,eAAW,MAAC,IAAK,IAAI;AAAA;AAAA,cAC1E;AAAA,cACC,CAAC,OACA;AAAA,gBAAC;AAAA;AAAA,kBACC,eAAW;AAAA,kBACX,WAAW;AAAA,oBACT,UAAU,SAAS,eAAe;AAAA,oBAClC,WAAW,2BAA2B;AAAA,kBACxC;AAAA;AAAA,cACF,IACE;AAAA,eACN;AAAA,YACA,qBAAC,SAAI,WAAW,GAAG,4BAA4B,WAAW,WAAW,MAAM,GACzE;AAAA,mCAAC,UAAK,WAAW,GAAG,eAAe,UAAU,aAAa,4BAA4B,iBAAiB,GACpG;AAAA,qBAAK;AAAA,gBACL,UAAU,UAAU,gBAAgB,qBAAC,UAAK,WAAU,WAAU;AAAA;AAAA,kBAAG;AAAA,mBAAc,IAAU;AAAA,iBAC5F;AAAA,cACC,KAAK,cAAc,oBAAC,UAAK,WAAU,sCAAsC,eAAK,aAAY,IAAU;AAAA,eACvG;AAAA;AAAA;AAAA,QA/BK;AAAA,MAgCP;AAAA,IAEJ,CAAC,GACH;AAAA,EAEJ;AACF;AACA,QAAQ,cAAc;","names":[]}
@@ -0,0 +1,42 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-DXRY7AS4.js";
4
+
5
+ // src/marketing/carousel-dots.tsx
6
+ import * as React from "react";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var CarouselDots = React.forwardRef(
9
+ ({ className, count, index, onIndexChange, getLabel, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, role: "group", className: cn("inline-flex items-center", className), ...props, children: Array.from({ length: count }, (_, i) => {
10
+ const active = i === index;
11
+ return /* @__PURE__ */ jsx(
12
+ "button",
13
+ {
14
+ type: "button",
15
+ "aria-label": getLabel(i),
16
+ "aria-current": active ? "true" : void 0,
17
+ onClick: () => onIndexChange?.(i),
18
+ className: cn(
19
+ "group/dot inline-flex h-6 items-center justify-center px-1",
20
+ "outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus"
21
+ ),
22
+ children: /* @__PURE__ */ jsx(
23
+ "span",
24
+ {
25
+ "aria-hidden": true,
26
+ className: cn(
27
+ "block h-2 transition-[width,background-color] duration-(--sv-sys-motion-duration-fast) ease-standard motion-reduce:transition-none",
28
+ active ? "w-8 bg-on-surface" : "w-2 rounded-full bg-on-surface-muted group-hover/dot:bg-on-surface"
29
+ )
30
+ }
31
+ )
32
+ },
33
+ i
34
+ );
35
+ }) })
36
+ );
37
+ CarouselDots.displayName = "CarouselDots";
38
+
39
+ export {
40
+ CarouselDots
41
+ };
42
+ //# sourceMappingURL=chunk-UG5TRIRZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/marketing/carousel-dots.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\n\n/**\n * Cairn CarouselDots, a slide indicator: small round dots, the current\n * one widening into a 32px bar. The dots are SV's motif and one of Cairn's true circles; the\n * active bar is square like every other shape.\n *\n * Each dot is a real button inside a 24px target (WCAG 2.5.8), named by `getLabel` (the\n * consumer's words, e.g. \"Slide 2 of 5\"), the current one marked `aria-current=\"true\"`.\n * Inactive dots are `on-surface-muted` (zinc 500), not a 20% ink, so they clear the 3:1\n * a control needs against the page. The width change rides the fast motion token.\n */\nexport interface CarouselDotsProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n count: number;\n index: number;\n onIndexChange?: (index: number) => void;\n /** Accessible name of each dot. Required. */\n getLabel: (index: number) => string;\n}\n\nexport const CarouselDots = React.forwardRef<HTMLDivElement, CarouselDotsProps>(\n ({ className, count, index, onIndexChange, getLabel, ...props }, ref) => (\n <div ref={ref} role=\"group\" className={cn('inline-flex items-center', className)} {...props}>\n {Array.from({ length: count }, (_, i) => {\n const active = i === index;\n return (\n <button\n key={i}\n type=\"button\"\n aria-label={getLabel(i)}\n aria-current={active ? 'true' : undefined}\n onClick={() => onIndexChange?.(i)}\n className={cn(\n 'group/dot inline-flex h-6 items-center justify-center px-1',\n 'outline-hidden focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus'\n )}\n >\n <span\n aria-hidden\n className={cn(\n 'block h-2 transition-[width,background-color] duration-(--sv-sys-motion-duration-fast) ease-standard motion-reduce:transition-none',\n active ? 'w-8 bg-on-surface' : 'w-2 rounded-full bg-on-surface-muted group-hover/dot:bg-on-surface'\n )}\n />\n </button>\n );\n })}\n </div>\n )\n);\nCarouselDots.displayName = 'CarouselDots';\n"],"mappings":";;;;;AAAA,YAAY,WAAW;AAsCX;AAjBL,IAAM,eAAqB;AAAA,EAChC,CAAC,EAAE,WAAW,OAAO,OAAO,eAAe,UAAU,GAAG,MAAM,GAAG,QAC/D,oBAAC,SAAI,KAAU,MAAK,SAAQ,WAAW,GAAG,4BAA4B,SAAS,GAAI,GAAG,OACnF,gBAAM,KAAK,EAAE,QAAQ,MAAM,GAAG,CAAC,GAAG,MAAM;AACvC,UAAM,SAAS,MAAM;AACrB,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,MAAK;AAAA,QACL,cAAY,SAAS,CAAC;AAAA,QACtB,gBAAc,SAAS,SAAS;AAAA,QAChC,SAAS,MAAM,gBAAgB,CAAC;AAAA,QAChC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QAEA;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,YACX,WAAW;AAAA,cACT;AAAA,cACA,SAAS,sBAAsB;AAAA,YACjC;AAAA;AAAA,QACF;AAAA;AAAA,MAhBK;AAAA,IAiBP;AAAA,EAEJ,CAAC,GACH;AAEJ;AACA,aAAa,cAAc;","names":[]}