@kismet-ux/constellation 1.9.0 → 1.11.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 (406) hide show
  1. package/dist/brand/Logo/logo.css +4 -1
  2. package/dist/form/Checkbox/checkbox.css +48 -34
  3. package/dist/form/Checkbox/checkbox.d.ts +5 -0
  4. package/dist/form/Checkbox/checkbox.d.ts.map +1 -1
  5. package/dist/form/Checkbox/checkbox.js +6 -55
  6. package/dist/form/Checkbox/checkbox.js.map +1 -1
  7. package/dist/form/Checkbox/checkbox.module.scss.js +1 -1
  8. package/dist/form/Combobox/combobox.css +35 -0
  9. package/dist/form/Combobox/combobox.d.ts +41 -0
  10. package/dist/form/Combobox/combobox.d.ts.map +1 -0
  11. package/dist/form/Combobox/combobox.js +152 -0
  12. package/dist/form/Combobox/combobox.js.map +1 -0
  13. package/dist/form/Combobox/combobox.module.scss.js +6 -0
  14. package/dist/form/Combobox/combobox.module.scss.js.map +1 -0
  15. package/dist/form/Combobox/index.d.ts +2 -0
  16. package/dist/form/Combobox/index.d.ts.map +1 -0
  17. package/dist/form/DatePicker/date-picker.d.ts.map +1 -1
  18. package/dist/form/DatePicker/date-picker.js +5 -53
  19. package/dist/form/DatePicker/date-picker.js.map +1 -1
  20. package/dist/form/Input/input.css +12 -0
  21. package/dist/form/Input/input.d.ts +1 -1
  22. package/dist/form/Input/input.d.ts.map +1 -1
  23. package/dist/form/Input/input.js +23 -3
  24. package/dist/form/Input/input.js.map +1 -1
  25. package/dist/form/Select/select.css +46 -2
  26. package/dist/form/Select/select.d.ts +31 -3
  27. package/dist/form/Select/select.d.ts.map +1 -1
  28. package/dist/form/Select/select.js +35 -21
  29. package/dist/form/Select/select.js.map +1 -1
  30. package/dist/form/Select/select.module.scss.js +2 -2
  31. package/dist/form/index.d.ts +1 -0
  32. package/dist/form/index.d.ts.map +1 -1
  33. package/dist/form.d.ts +1 -1
  34. package/dist/form.js +2 -1
  35. package/dist/form.js.map +1 -1
  36. package/dist/hooks/index.d.ts +1 -0
  37. package/dist/hooks/index.d.ts.map +1 -1
  38. package/dist/hooks/layout/index.d.ts +1 -0
  39. package/dist/hooks/layout/index.d.ts.map +1 -1
  40. package/dist/hooks/layout/use-flip.d.ts +37 -0
  41. package/dist/hooks/layout/use-flip.d.ts.map +1 -0
  42. package/dist/hooks/layout/use-flip.js +128 -0
  43. package/dist/hooks/layout/use-flip.js.map +1 -0
  44. package/dist/hooks/use-motion.d.ts +30 -0
  45. package/dist/hooks/use-motion.d.ts.map +1 -0
  46. package/dist/hooks/use-motion.js +93 -0
  47. package/dist/hooks/use-motion.js.map +1 -0
  48. package/dist/index-2nHZOukj.d.ts +200 -0
  49. package/dist/index-3Ui8TAHy.d.ts +200 -0
  50. package/dist/index-59JuNTZm.d.ts +537 -0
  51. package/dist/index-5QXWn0de.d.ts +200 -0
  52. package/dist/index-98ozinMf.d.ts +498 -0
  53. package/dist/index-Ah3YQTri.d.ts +566 -0
  54. package/dist/index-As2iBOIu.d.ts +527 -0
  55. package/dist/index-B1Vw0zoR.d.ts +566 -0
  56. package/dist/index-B25sLBMr.d.ts +498 -0
  57. package/dist/index-B4B8aA9X.d.ts +272 -0
  58. package/dist/index-B97hn7Xp.d.ts +514 -0
  59. package/dist/index-B9B7JjTb.d.ts +204 -0
  60. package/dist/index-BFWt_pYt.d.ts +566 -0
  61. package/dist/index-BFZp_Pu6.d.ts +566 -0
  62. package/dist/index-BGL4DvKQ.d.ts +293 -0
  63. package/dist/index-BGP_J4I2.d.ts +498 -0
  64. package/dist/index-BHhoIUD_.d.ts +354 -0
  65. package/dist/index-BI0iaWmp.d.ts +222 -0
  66. package/dist/index-BMSRpHb6.d.ts +273 -0
  67. package/dist/index-BRQWKmfq.d.ts +566 -0
  68. package/dist/index-BTARYt96.d.ts +537 -0
  69. package/dist/index-BTrpuZdU.d.ts +566 -0
  70. package/dist/index-BWTwKQsp.d.ts +354 -0
  71. package/dist/index-B_05Skyi.d.ts +566 -0
  72. package/dist/index-BcQqBGNu.d.ts +200 -0
  73. package/dist/index-Be23E9xD.d.ts +298 -0
  74. package/dist/index-Bf44Z8ak.d.ts +514 -0
  75. package/dist/index-Bg42sKjg.d.ts +498 -0
  76. package/dist/index-Bg_0OPMx.d.ts +566 -0
  77. package/dist/index-BgjRk9l7.d.ts +537 -0
  78. package/dist/index-BhLEMn3N.d.ts +537 -0
  79. package/dist/index-BiqECuUj.d.ts +204 -0
  80. package/dist/index-BjUQiAs1.d.ts +130 -0
  81. package/dist/index-BlKqvax0.d.ts +204 -0
  82. package/dist/index-Bnb0JFqx.d.ts +514 -0
  83. package/dist/index-BpSD6t7A.d.ts +566 -0
  84. package/dist/index-BpxKwrv_.d.ts +537 -0
  85. package/dist/index-Brh7JZAQ.d.ts +514 -0
  86. package/dist/index-C-n7hM4G.d.ts +354 -0
  87. package/dist/index-C0wKb28S.d.ts +514 -0
  88. package/dist/index-C129uthr.d.ts +566 -0
  89. package/dist/index-C1ef0QtQ.d.ts +204 -0
  90. package/dist/index-C4BACHGE.d.ts +272 -0
  91. package/dist/index-C5JU8WTE.d.ts +514 -0
  92. package/dist/index-C63UYi-T.d.ts +195 -0
  93. package/dist/index-C8LoYkC7.d.ts +250 -0
  94. package/dist/index-C9-ECLyr.d.ts +566 -0
  95. package/dist/index-C9B1F-mr.d.ts +293 -0
  96. package/dist/index-CAVmbwa8.d.ts +514 -0
  97. package/dist/index-CBz-v5eM.d.ts +184 -0
  98. package/dist/index-CCpdo0n4.d.ts +130 -0
  99. package/dist/index-CDC_ZncW.d.ts +566 -0
  100. package/dist/index-CFQj-KtR.d.ts +184 -0
  101. package/dist/index-CFaxW5hv.d.ts +184 -0
  102. package/dist/index-CG9DKbG9.d.ts +498 -0
  103. package/dist/index-CGhG7YeI.d.ts +354 -0
  104. package/dist/index-CHC6kRbR.d.ts +537 -0
  105. package/dist/index-CH_q-5fk.d.ts +537 -0
  106. package/dist/index-CIK_SmBm.d.ts +200 -0
  107. package/dist/index-CJ1KPFOf.d.ts +537 -0
  108. package/dist/index-CJ5FEGRG.d.ts +537 -0
  109. package/dist/index-CKX2VNKk.d.ts +240 -0
  110. package/dist/index-CL7kYZ90.d.ts +231 -0
  111. package/dist/index-CNl03fCW.d.ts +498 -0
  112. package/dist/index-CO8Jq0pz.d.ts +298 -0
  113. package/dist/index-CQ-aS-rp.d.ts +566 -0
  114. package/dist/index-CQjzBv4q.d.ts +537 -0
  115. package/dist/index-CRVO4SlF.d.ts +537 -0
  116. package/dist/index-CSQFy2xe.d.ts +195 -0
  117. package/dist/index-CWM2ewRz.d.ts +566 -0
  118. package/dist/index-CY6Xq36O.d.ts +204 -0
  119. package/dist/index-CYGOs6JT.d.ts +273 -0
  120. package/dist/index-CYPFkjfk.d.ts +204 -0
  121. package/dist/index-C_hJJ1fH.d.ts +527 -0
  122. package/dist/index-CcM-XHTL.d.ts +273 -0
  123. package/dist/index-CdGF_eEO.d.ts +514 -0
  124. package/dist/index-CdJTE9Lh.d.ts +566 -0
  125. package/dist/index-CdOt-pqR.d.ts +537 -0
  126. package/dist/index-CgeR_2Gi.d.ts +220 -0
  127. package/dist/index-CjUoZbDi.d.ts +354 -0
  128. package/dist/index-CjV6KsFc.d.ts +263 -0
  129. package/dist/index-Ck8LtgBW.d.ts +557 -0
  130. package/dist/index-Cknm9FUU.d.ts +299 -0
  131. package/dist/index-Clv3CnXv.d.ts +184 -0
  132. package/dist/index-Cm4wnJ29.d.ts +514 -0
  133. package/dist/index-Cmz3q-CI.d.ts +273 -0
  134. package/dist/index-CnMBzCft.d.ts +514 -0
  135. package/dist/index-CnVW0FnZ.d.ts +272 -0
  136. package/dist/index-CpIHT-uo.d.ts +231 -0
  137. package/dist/index-CtBEDM0b.d.ts +514 -0
  138. package/dist/index-CtVSiQeY.d.ts +130 -0
  139. package/dist/index-Cu107rOs.d.ts +293 -0
  140. package/dist/index-CxyTd3Ag.d.ts +354 -0
  141. package/dist/index-CywSNvOU.d.ts +200 -0
  142. package/dist/index-CzJL7Lro.d.ts +566 -0
  143. package/dist/index-CzJnKY3r.d.ts +272 -0
  144. package/dist/index-D-R9eOxe.d.ts +354 -0
  145. package/dist/index-D-hdgIbs.d.ts +273 -0
  146. package/dist/index-D-slQ9w4.d.ts +537 -0
  147. package/dist/index-D0jdNDaH.d.ts +204 -0
  148. package/dist/index-D1ir--Li.d.ts +566 -0
  149. package/dist/index-D29_-MCZ.d.ts +354 -0
  150. package/dist/index-D2glATpo.d.ts +273 -0
  151. package/dist/index-D6ATtbor.d.ts +298 -0
  152. package/dist/index-D6HktSlo.d.ts +514 -0
  153. package/dist/index-DB4UBCvy.d.ts +537 -0
  154. package/dist/index-DBd0PU9y.d.ts +222 -0
  155. package/dist/index-DE2Nm-iT.d.ts +354 -0
  156. package/dist/index-DEeJuuvm.d.ts +231 -0
  157. package/dist/index-DHhzBSfL.d.ts +498 -0
  158. package/dist/index-DKpWNCb6.d.ts +204 -0
  159. package/dist/index-DMewi97i.d.ts +566 -0
  160. package/dist/index-DN0gtpck.d.ts +354 -0
  161. package/dist/index-DO23vZ-R.d.ts +514 -0
  162. package/dist/index-DTb2-z6E.d.ts +130 -0
  163. package/dist/index-DV-CN7c0.d.ts +231 -0
  164. package/dist/index-DWgCs62z.d.ts +566 -0
  165. package/dist/index-D_6Qu6ia.d.ts +200 -0
  166. package/dist/index-D_vn8O-I.d.ts +293 -0
  167. package/dist/index-Daq4m4Rf.d.ts +514 -0
  168. package/dist/index-Db6cXpr6.d.ts +537 -0
  169. package/dist/index-DbZ1s2E-.d.ts +514 -0
  170. package/dist/index-DbevJPuY.d.ts +354 -0
  171. package/dist/index-DepmPwP7.d.ts +537 -0
  172. package/dist/index-DfnTWQCz.d.ts +514 -0
  173. package/dist/index-Dfu8WhiS.d.ts +273 -0
  174. package/dist/index-DggMYd7c.d.ts +298 -0
  175. package/dist/index-DhS2nQjt.d.ts +200 -0
  176. package/dist/index-Dn3bC8Ki.d.ts +222 -0
  177. package/dist/index-Dn9bGZvU.d.ts +195 -0
  178. package/dist/index-DnDt7A4Y.d.ts +354 -0
  179. package/dist/index-DpdYKBP2.d.ts +498 -0
  180. package/dist/index-DunP9qIK.d.ts +537 -0
  181. package/dist/index-DxO6-qt5.d.ts +498 -0
  182. package/dist/index-ESQ8WM_8.d.ts +130 -0
  183. package/dist/index-GVz409cm.d.ts +222 -0
  184. package/dist/index-HAx-aLZ0.d.ts +273 -0
  185. package/dist/index-Iuzs6nt9.d.ts +498 -0
  186. package/dist/index-LnEpnlTq.d.ts +566 -0
  187. package/dist/index-Mm1i2OdU.d.ts +537 -0
  188. package/dist/index-P0oxVi77.d.ts +537 -0
  189. package/dist/index-Q5JuPFoN.d.ts +293 -0
  190. package/dist/index-RJviLtvo.d.ts +566 -0
  191. package/dist/index-SnQCbfte.d.ts +498 -0
  192. package/dist/index-Th9It0ZT.d.ts +354 -0
  193. package/dist/index-UHHmyQM5.d.ts +272 -0
  194. package/dist/index-VyGmJYQZ.d.ts +537 -0
  195. package/dist/index-WYH70le_.d.ts +195 -0
  196. package/dist/index-Wj9RYtTX.d.ts +273 -0
  197. package/dist/index-Y-wMZeUG.d.ts +298 -0
  198. package/dist/index-Zo2rSdXz.d.ts +273 -0
  199. package/dist/index-ZwpWgV4n.d.ts +272 -0
  200. package/dist/index-_oZ4knIl.d.ts +272 -0
  201. package/dist/index-an222nAK.d.ts +354 -0
  202. package/dist/index-daV0QTe0.d.ts +537 -0
  203. package/dist/index-eGZu2HLC.d.ts +231 -0
  204. package/dist/index-eswPA0Un.d.ts +204 -0
  205. package/dist/index-gf6-wf_1.d.ts +566 -0
  206. package/dist/index-hdVr9Wrv.d.ts +566 -0
  207. package/dist/index-iygiXYw2.d.ts +537 -0
  208. package/dist/index-jR29ZGLD.d.ts +514 -0
  209. package/dist/index-kHgI28TP.d.ts +272 -0
  210. package/dist/index-lY4_UCOs.d.ts +566 -0
  211. package/dist/index-miXK87yJ.d.ts +231 -0
  212. package/dist/index-mwbGtZkk.d.ts +273 -0
  213. package/dist/index-ru2DFXcm.d.ts +195 -0
  214. package/dist/index-uj1ll_u-.d.ts +204 -0
  215. package/dist/index-vfq-aH7U.d.ts +537 -0
  216. package/dist/index-xqUz9XjP.d.ts +537 -0
  217. package/dist/index.css +74 -18
  218. package/dist/index.d.ts +121 -13
  219. package/dist/index.js +34 -28
  220. package/dist/index.js.map +1 -1
  221. package/dist/internal/use-scroll-lock.d.ts +15 -0
  222. package/dist/internal/use-scroll-lock.d.ts.map +1 -1
  223. package/dist/internal/use-scroll-lock.js +26 -8
  224. package/dist/internal/use-scroll-lock.js.map +1 -1
  225. package/dist/layout/AppContent/app-content.css +1 -1
  226. package/dist/layout/AppContentBands/app-content-bands.css +21 -0
  227. package/dist/layout/AppContentBands/app-content-bands.d.ts +26 -0
  228. package/dist/layout/AppContentBands/app-content-bands.d.ts.map +1 -0
  229. package/dist/layout/AppContentBands/app-content-bands.js +65 -0
  230. package/dist/layout/AppContentBands/app-content-bands.js.map +1 -0
  231. package/dist/layout/AppContentBands/app-content-bands.module.scss.js +6 -0
  232. package/dist/layout/AppContentBands/app-content-bands.module.scss.js.map +1 -0
  233. package/dist/layout/AppContentBands/index.d.ts +2 -0
  234. package/dist/layout/AppContentBands/index.d.ts.map +1 -0
  235. package/dist/layout/AppContentFooter/app-content-footer.css +9 -0
  236. package/dist/layout/AppContentFooter/app-content-footer.d.ts +38 -0
  237. package/dist/layout/AppContentFooter/app-content-footer.d.ts.map +1 -0
  238. package/dist/layout/AppContentFooter/app-content-footer.js +42 -0
  239. package/dist/layout/AppContentFooter/app-content-footer.js.map +1 -0
  240. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js +6 -0
  241. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js.map +1 -0
  242. package/dist/layout/AppContentFooter/index.d.ts +2 -0
  243. package/dist/layout/AppContentFooter/index.d.ts.map +1 -0
  244. package/dist/layout/AppContentMain/app-content-main.css +6 -0
  245. package/dist/layout/AppContentMain/app-content-main.d.ts +37 -0
  246. package/dist/layout/AppContentMain/app-content-main.d.ts.map +1 -0
  247. package/dist/layout/AppContentMain/app-content-main.js +41 -0
  248. package/dist/layout/AppContentMain/app-content-main.js.map +1 -0
  249. package/dist/layout/AppContentMain/app-content-main.module.scss.js +6 -0
  250. package/dist/layout/AppContentMain/app-content-main.module.scss.js.map +1 -0
  251. package/dist/layout/AppContentMain/index.d.ts +2 -0
  252. package/dist/layout/AppContentMain/index.d.ts.map +1 -0
  253. package/dist/layout/AppFooter/app-footer.js +1 -1
  254. package/dist/layout/AppSidebar/app-sidebar.js +1 -1
  255. package/dist/layout/AppSidebarHeader/app-sidebar-header.css +2 -3
  256. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts +10 -2
  257. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts.map +1 -1
  258. package/dist/layout/AppSidebarHeader/app-sidebar-header.js +12 -32
  259. package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -1
  260. package/dist/layout/Collapse/collapse.css +4 -1
  261. package/dist/layout/Column/column.css +6 -0
  262. package/dist/layout/Column/column.d.ts.map +1 -1
  263. package/dist/layout/Column/column.js +3 -1
  264. package/dist/layout/Column/column.js.map +1 -1
  265. package/dist/layout/Column/column.module.scss.js +1 -1
  266. package/dist/layout/Container/container.css +42 -0
  267. package/dist/layout/Container/container.d.ts.map +1 -1
  268. package/dist/layout/Container/container.js +37 -9
  269. package/dist/layout/Container/container.js.map +1 -1
  270. package/dist/layout/Container/container.module.scss.js +1 -1
  271. package/dist/layout/Grid/grid.css +28 -0
  272. package/dist/layout/Grid/grid.d.ts.map +1 -1
  273. package/dist/layout/Grid/grid.js +40 -4
  274. package/dist/layout/Grid/grid.js.map +1 -1
  275. package/dist/layout/Grid/grid.module.scss.js +1 -1
  276. package/dist/layout/Row/row.css +42 -0
  277. package/dist/layout/Row/row.d.ts.map +1 -1
  278. package/dist/layout/Row/row.js +5 -3
  279. package/dist/layout/Row/row.js.map +1 -1
  280. package/dist/layout/Row/row.module.scss.js +1 -1
  281. package/dist/layout/Sidebar/sidebar.css +4 -2
  282. package/dist/layout/Sidebar/sidebar.js +1 -1
  283. package/dist/layout/index.d.ts +2 -0
  284. package/dist/layout/index.d.ts.map +1 -1
  285. package/dist/layout.d.ts +3 -3
  286. package/dist/layout.js +2 -0
  287. package/dist/layout.js.map +1 -1
  288. package/dist/navigation/DropdownMenu/dropdown-menu.d.ts.map +1 -1
  289. package/dist/navigation/DropdownMenu/dropdown-menu.js +1 -1
  290. package/dist/navigation/DropdownMenu/dropdown-menu.js.map +1 -1
  291. package/dist/navigation/NavUser/nav-user.js +2 -2
  292. package/dist/navigation/Sheet/sheet.css +40 -6
  293. package/dist/navigation/Sheet/sheet.d.ts +22 -0
  294. package/dist/navigation/Sheet/sheet.d.ts.map +1 -1
  295. package/dist/navigation/Sheet/sheet.js +5 -30
  296. package/dist/navigation/Sheet/sheet.js.map +1 -1
  297. package/dist/navigation/Sheet/sheet.module.scss.js +1 -1
  298. package/dist/navigation.d.ts +22 -0
  299. package/dist/row-CuhTBQhK.d.ts +21 -0
  300. package/dist/settings/AppearanceDropdown/appearance-dropdown.js +1 -1
  301. package/dist/settings/AppearanceTabs/appearance-tabs.js +2 -27
  302. package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -1
  303. package/dist/tokens.css +59 -17
  304. package/dist/tooltip-1qYeAGE9.d.ts +45 -0
  305. package/dist/tooltip-3IOkYFQ-.d.ts +45 -0
  306. package/dist/tooltip-540OmbEG.d.ts +46 -0
  307. package/dist/tooltip-91Nq_Hl8.d.ts +46 -0
  308. package/dist/tooltip-B56sWYK0.d.ts +46 -0
  309. package/dist/tooltip-BIrIF-4z.d.ts +45 -0
  310. package/dist/tooltip-BOipKW5l.d.ts +46 -0
  311. package/dist/tooltip-BPC0RH8i.d.ts +46 -0
  312. package/dist/tooltip-BST1BOCn.d.ts +45 -0
  313. package/dist/tooltip-BhuxNQwX.d.ts +45 -0
  314. package/dist/tooltip-BpAJwi3K.d.ts +46 -0
  315. package/dist/tooltip-C0LBu2Iu.d.ts +45 -0
  316. package/dist/tooltip-C1ZwALiG.d.ts +45 -0
  317. package/dist/tooltip-C55-HA0w.d.ts +45 -0
  318. package/dist/tooltip-CHn6WuDv.d.ts +46 -0
  319. package/dist/tooltip-CNjH7zKO.d.ts +45 -0
  320. package/dist/tooltip-CSBby1OT.d.ts +45 -0
  321. package/dist/tooltip-CXFRzR0L.d.ts +45 -0
  322. package/dist/tooltip-ChpsbkOU.d.ts +46 -0
  323. package/dist/tooltip-CspTy2ZW.d.ts +46 -0
  324. package/dist/tooltip-CvComAZD.d.ts +46 -0
  325. package/dist/tooltip-D19vhhRn.d.ts +45 -0
  326. package/dist/tooltip-D32S1g-7.d.ts +46 -0
  327. package/dist/tooltip-DAvBN683.d.ts +45 -0
  328. package/dist/tooltip-DQz4_i4m.d.ts +45 -0
  329. package/dist/tooltip-DVYPUAb1.d.ts +46 -0
  330. package/dist/tooltip-DXoSckt9.d.ts +46 -0
  331. package/dist/tooltip-Dtoq3bn_.d.ts +46 -0
  332. package/dist/tooltip-DxO_DWMO.d.ts +46 -0
  333. package/dist/tooltip-DxdGb3dX.d.ts +45 -0
  334. package/dist/tooltip-DzAzC0d7.d.ts +45 -0
  335. package/dist/tooltip-Lk4RpuSh.d.ts +45 -0
  336. package/dist/tooltip-ReFyHDhU.d.ts +45 -0
  337. package/dist/tooltip-_wdlSYAb.d.ts +46 -0
  338. package/dist/tooltip-nKcM19C9.d.ts +45 -0
  339. package/dist/types/layout/container.d.ts +28 -1
  340. package/dist/types/layout/container.d.ts.map +1 -1
  341. package/dist/types/layout/grid.d.ts +42 -0
  342. package/dist/types/layout/grid.d.ts.map +1 -1
  343. package/dist/types/layout/row.d.ts +7 -0
  344. package/dist/types/layout/row.d.ts.map +1 -1
  345. package/dist/typography/Typography/typography-variants.d.ts +3 -0
  346. package/dist/typography/Typography/typography-variants.d.ts.map +1 -1
  347. package/dist/typography/Typography/typography-variants.js +25 -0
  348. package/dist/typography/Typography/typography-variants.js.map +1 -1
  349. package/dist/typography/Typography/typography.css +105 -41
  350. package/dist/typography/Typography/typography.d.ts +20 -0
  351. package/dist/typography/Typography/typography.d.ts.map +1 -1
  352. package/dist/typography/Typography/typography.js +11 -2
  353. package/dist/typography/Typography/typography.js.map +1 -1
  354. package/dist/typography/Typography/typography.module.scss.js +1 -1
  355. package/dist/typography-CTGVc_Gg.d.ts +41 -0
  356. package/dist/typography.d.ts +2 -2
  357. package/dist/ui/Alert/alert-provider.d.ts.map +1 -1
  358. package/dist/ui/Alert/alert-provider.js +1 -1
  359. package/dist/ui/Alert/alert-provider.js.map +1 -1
  360. package/dist/ui/Button/button-variants.d.ts +1 -0
  361. package/dist/ui/Button/button-variants.d.ts.map +1 -1
  362. package/dist/ui/Button/button-variants.js +3 -0
  363. package/dist/ui/Button/button-variants.js.map +1 -1
  364. package/dist/ui/Button/button.css +68 -14
  365. package/dist/ui/Button/button.d.ts.map +1 -1
  366. package/dist/ui/Button/button.js +2 -2
  367. package/dist/ui/Button/button.js.map +1 -1
  368. package/dist/ui/Button/button.module.scss.js +1 -1
  369. package/dist/ui/Chip/chip.css +32 -11
  370. package/dist/ui/Chip/chip.d.ts +16 -0
  371. package/dist/ui/Chip/chip.d.ts.map +1 -1
  372. package/dist/ui/Chip/chip.js +4 -2
  373. package/dist/ui/Chip/chip.js.map +1 -1
  374. package/dist/ui/CodeBlock/code-block.css +8 -3
  375. package/dist/ui/Dialog/dialog.css +70 -0
  376. package/dist/ui/Dialog/dialog.d.ts +45 -2
  377. package/dist/ui/Dialog/dialog.d.ts.map +1 -1
  378. package/dist/ui/Dialog/dialog.js +256 -7
  379. package/dist/ui/Dialog/dialog.js.map +1 -1
  380. package/dist/ui/Dialog/dialog.module.scss.js +1 -1
  381. package/dist/ui/Icon/icon.css +14 -7
  382. package/dist/ui/ProgressBar/progress-bar.css +10 -3
  383. package/dist/ui/StatCard/stat-card.css +13 -0
  384. package/dist/ui/StatCard/stat-card.d.ts +9 -0
  385. package/dist/ui/StatCard/stat-card.d.ts.map +1 -1
  386. package/dist/ui/StatCard/stat-card.js +2 -2
  387. package/dist/ui/StatCard/stat-card.js.map +1 -1
  388. package/dist/ui/StatusDot/status-dot.css +4 -1
  389. package/dist/ui/StepProgress/step-progress.css +12 -4
  390. package/dist/ui/Switch/switch.css +6 -2
  391. package/dist/ui/Tooltip/tooltip.d.ts.map +1 -1
  392. package/dist/ui/Tooltip/tooltip.js +1 -1
  393. package/dist/ui/Tooltip/tooltip.js.map +1 -1
  394. package/dist/ui.d.ts +3 -3
  395. package/dist/user/UserInfo/user-info.js +1 -1
  396. package/dist/utils/index.d.ts +1 -0
  397. package/dist/utils/index.d.ts.map +1 -1
  398. package/dist/utils/portal.d.ts +34 -0
  399. package/dist/utils/portal.d.ts.map +1 -0
  400. package/dist/utils/portal.js +40 -0
  401. package/dist/utils/portal.js.map +1 -0
  402. package/dist/utils.d.ts +35 -1
  403. package/dist/utils.js +1 -0
  404. package/dist/utils.js.map +1 -1
  405. package/package.json +3 -2
  406. package/src/styles/_mixins.scss +30 -0
@@ -6,10 +6,12 @@ import cn from 'clsx';
6
6
  import { XIcon } from 'lucide-react';
7
7
  import * as React from 'react';
8
8
  import { createPortal } from 'react-dom';
9
+ import { prefersReducedMotion } from '../../hooks/use-motion.js';
9
10
  import { Slot } from '../../internal/slot.js';
10
11
  import { useAnimationState, DEFAULT_ANIMATION_DURATION } from '../../internal/use-animation-state.js';
11
12
  import { useFocusTrap } from '../../internal/use-focus-trap.js';
12
13
  import { useScrollLock } from '../../internal/use-scroll-lock.js';
14
+ import { isInConstellationPortal } from '../../utils/portal.js';
13
15
  import s from './dialog.module.scss.js';
14
16
 
15
17
  const DialogContext = React.createContext(null);
@@ -51,15 +53,249 @@ function DialogClose({ asChild, onClick, children, ...props }) {
51
53
  return (jsx(Comp, { "data-slot": 'dialog-close', onClick: handleClick, ...props, children: children }));
52
54
  }
53
55
  // ── Overlay ──────────────────────────────────────────────
54
- function DialogOverlay({ className, ...props }) {
56
+ function DialogOverlay({ className, passThrough = false, ...props }) {
55
57
  const { open, onOpenChange } = useDialog();
56
- return (jsx("div", { "data-slot": 'dialog-overlay', "data-state": open ? 'open' : 'closed', className: cn(s['dialog-overlay'], className), onClick: () => onOpenChange(false), "aria-hidden": 'true', ...props }));
58
+ return (jsx("div", { "data-slot": 'dialog-overlay', "data-state": open ? 'open' : 'closed', "data-pass-through": passThrough ? '' : undefined, className: cn(s['dialog-overlay'], className),
59
+ // A pass-through scrim cannot be clicked at all — the click goes to the
60
+ // page under it, and DialogContent's document listener decides.
61
+ onClick: passThrough ? undefined : () => onOpenChange(false), "aria-hidden": 'true', ...props }));
57
62
  }
58
- function DialogContent({ className, children, width = 'max', ...props }) {
63
+ /**
64
+ * Grow from `origin` on open, and shrink back into it on close.
65
+ *
66
+ * The animation is CSS. JavaScript supplies only the one thing a stylesheet
67
+ * cannot know — where on screen the panel came from — and flips a modifier;
68
+ * the transition between the two states does everything else. Closing is the
69
+ * same two states in the other order, so the exit is the entrance backwards by
70
+ * construction rather than a second animation kept in step by hand.
71
+ *
72
+ * The phase is React state, not an attribute poked in an effect, and that
73
+ * matters: the panel has to be PAINTED once in its `from` state before it can
74
+ * transition out of it. Setting both in one frame collapses them and nothing
75
+ * moves — which is exactly how the contents ended up at full strength from the
76
+ * first frame instead of building in as the box grew.
77
+ */
78
+ function useMorphFrom(origin, state, duration) {
79
+ const ref = React.useRef(null);
80
+ const restingRef = React.useRef(null);
81
+ /*
82
+ * `from` is a starting position, and someone who has asked for less motion
83
+ * never travels — so they open in the resting state directly. Starting them
84
+ * at `from` would leave the panel wearing the modifier that hides its own
85
+ * contents, with nothing scheduled to take it off.
86
+ */
87
+ const [phase, setPhase] = React.useState(origin && !prefersReducedMotion() ? 'from' : 'to');
88
+ const rectOf = React.useCallback(() => {
89
+ if (!origin)
90
+ return null;
91
+ if (origin instanceof DOMRect)
92
+ return origin;
93
+ const el = origin.current;
94
+ return el ? el.getBoundingClientRect() : null;
95
+ }, [origin]);
96
+ /*
97
+ * Both ends are absolute pixels with no transform. Interpolating between
98
+ * `left: 283px` and `left: 50%` while a `translate(-50%, -50%)` also changes
99
+ * is not a straight line, and it shows.
100
+ */
101
+ const settled = React.useRef(false);
102
+ /*
103
+ * Force the pending style changes to be recalculated NOW.
104
+ *
105
+ * Everything below happens inside one task, and the browser is free to
106
+ * coalesce it into a single recalculation — which would see only the end
107
+ * state and have nothing to animate between. Reading a computed length is
108
+ * what makes the intermediate state real. It has to be a genuine style read:
109
+ * `void el.offsetWidth` proved unreliable here, returning the pre-pin width.
110
+ */
111
+ const reflow = (el) => getComputedStyle(el).width;
112
+ const pin = (el, r) => {
113
+ if (!el || !r)
114
+ return;
115
+ el.style.left = `${r.left}px`;
116
+ el.style.top = `${r.top}px`;
117
+ el.style.width = `${r.width}px`;
118
+ el.style.height = `${r.height}px`;
119
+ el.style.transform = 'none';
120
+ // Written here rather than from React state so the flag and the geometry
121
+ // it describes are always set in the same breath. The stylesheet hangs the
122
+ // travel transition and `overflow: hidden` off it — both belong to a panel
123
+ // whose box is being driven from here, and neither to one at rest.
124
+ el.dataset.morphPinned = '';
125
+ };
126
+ /*
127
+ * Give the box back to the stylesheet.
128
+ *
129
+ * The panel travels between two measured rectangles, which means it spends
130
+ * the journey wearing an inline `width` and `height`. Those must not outlive
131
+ * the journey: a dialog whose content can change — a disclosure opening, a
132
+ * list growing, a field validating — was frozen at whatever it measured on
133
+ * open, and `overflow: hidden` then clipped whatever no longer fit, so the
134
+ * buttons at the foot of a card left the card.
135
+ *
136
+ * Released with transitions suppressed. The declaration that animates the
137
+ * travel goes away with the flag, but the base rule's `transition: all` does
138
+ * not, and a panel snapping from a pinned pixel height to `auto` is a change
139
+ * it will happily animate — badly, since `auto` is not interpolable and the
140
+ * intermediate frames come out as a jump.
141
+ */
142
+ const release = (el) => {
143
+ if (!el)
144
+ return;
145
+ el.style.transitionProperty = 'none';
146
+ for (const prop of ['left', 'top', 'width', 'height', 'transform']) {
147
+ el.style.removeProperty(prop);
148
+ }
149
+ delete el.dataset.morphPinned;
150
+ reflow(el);
151
+ el.style.removeProperty('transition-property');
152
+ };
153
+ /*
154
+ * A callback ref, not a layout effect, and that is the whole trick.
155
+ *
156
+ * The panel does not exist on the render that opens the dialog — the mount
157
+ * is one state update behind — so a layout effect keyed on the phase runs
158
+ * once against a null node and never fires again, because the phase has not
159
+ * changed by the time the element finally lands. Attaching the measurement
160
+ * to the node itself means it happens exactly when there is a node, which is
161
+ * the actual precondition.
162
+ */
163
+ const attach = React.useCallback((node) => {
164
+ ref.current = node;
165
+ if (!node || !origin || settled.current || prefersReducedMotion())
166
+ return;
167
+ // The resting box, read before anything is pinned: where the panel would
168
+ // sit on its own, and therefore where it is travelling to.
169
+ restingRef.current = node.getBoundingClientRect();
170
+ // A starting position must not animate into place.
171
+ node.style.transitionProperty = 'none';
172
+ pin(node, rectOf());
173
+ reflow(node);
174
+ }, [origin, rectOf]);
175
+ /*
176
+ * Leave `from` one paint later.
177
+ *
178
+ * A plain effect, not a layout effect: it runs AFTER the browser has
179
+ * painted, which is the requirement — the panel has to have been drawn at
180
+ * the tile's size once, or there is nothing to travel from.
181
+ */
182
+ React.useEffect(() => {
183
+ const el = ref.current;
184
+ if (!el || !origin || settled.current || state !== 'open' || prefersReducedMotion())
185
+ return;
186
+ el.style.removeProperty('transition-property');
187
+ /*
188
+ * Settle that removal on its own. A transition compares the style before a
189
+ * change with the style after it, and `transition-property: none` in the
190
+ * "before" half means no transition is generated at all — so restoring the
191
+ * property and moving the panel inside one recalculation animates nothing.
192
+ */
193
+ reflow(el);
194
+ settled.current = true;
195
+ setPhase('to');
196
+ }, [origin, state]);
197
+ /*
198
+ * The travel itself, in both directions, and the handover at each end.
199
+ *
200
+ * `to` pins the resting box and then lets go of it once the panel has
201
+ * arrived, so the dialog sizes to its content for as long as it is open.
202
+ * `from` has to put the box back before it can travel home — and it measures
203
+ * where the panel actually IS rather than trusting the rectangle recorded on
204
+ * open, because between the two the content may well have changed the height.
205
+ */
206
+ React.useLayoutEffect(() => {
207
+ if (!origin || !settled.current || prefersReducedMotion())
208
+ return;
209
+ const el = ref.current;
210
+ if (!el)
211
+ return;
212
+ if (phase === 'from') {
213
+ // Freeze the panel exactly where it stands — mid-travel included, since
214
+ // a rect read during a transition is the animated position — and only
215
+ // then send it home, or there is no geometry to leave from.
216
+ const here = el.getBoundingClientRect();
217
+ el.style.transitionProperty = 'none';
218
+ pin(el, here);
219
+ reflow(el);
220
+ el.style.removeProperty('transition-property');
221
+ reflow(el);
222
+ pin(el, rectOf());
223
+ return;
224
+ }
225
+ pin(el, restingRef.current);
226
+ /*
227
+ * Hand the box back when the journey ends. `transitionend` is the honest
228
+ * signal, but it never fires for a property whose two ends are equal — a
229
+ * tile already the height of the panel, most obviously — so the timer is
230
+ * not a belt-and-braces fallback, it is the path taken whenever the panel
231
+ * did not have to travel in that dimension.
232
+ */
233
+ let done = false;
234
+ const finish = () => {
235
+ if (done)
236
+ return;
237
+ done = true;
238
+ release(el);
239
+ };
240
+ const onEnd = (e) => {
241
+ if (e.target === el && (e.propertyName === 'height' || e.propertyName === 'width'))
242
+ finish();
243
+ };
244
+ el.addEventListener('transitionend', onEnd);
245
+ const timer = window.setTimeout(finish, duration + 60);
246
+ return () => {
247
+ el.removeEventListener('transitionend', onEnd);
248
+ window.clearTimeout(timer);
249
+ };
250
+ }, [phase, origin, rectOf, duration]);
251
+ // Closing puts the modifier back, and the opening animation runs in reverse.
252
+ React.useLayoutEffect(() => {
253
+ if (origin && state === 'closed' && !prefersReducedMotion())
254
+ setPhase('from');
255
+ }, [state, origin]);
256
+ return { ref: attach, phase, duration };
257
+ }
258
+ function DialogContent({ className, children, width = 'max', origin, measure, overlay = 'blocking', style, ...props }) {
59
259
  const { open, onOpenChange, onAfterClose, titleId, descriptionId } = useDialog();
60
- const { mounted, state } = useAnimationState(open, DEFAULT_ANIMATION_DURATION);
260
+ /*
261
+ * A morph travels further than a fade, so it needs longer — and the unmount
262
+ * timer has to use the SAME number, or the panel is torn out of the DOM
263
+ * part way through its exit.
264
+ */
265
+ const duration = origin ? 300 : DEFAULT_ANIMATION_DURATION;
266
+ const { mounted, state } = useAnimationState(open, duration);
267
+ const { ref: morphRef, phase: morphPhase } = useMorphFrom(origin, state, duration);
61
268
  const focusTrapRef = useFocusTrap(open);
62
- useScrollLock(mounted);
269
+ const passThrough = overlay === 'pass-through';
270
+ // A live page behind the panel has to be scrollable, or half of what you can
271
+ // now click is out of reach.
272
+ useScrollLock(mounted && !passThrough);
273
+ /*
274
+ * With a scrim that cannot be clicked, dismissing is a document listener —
275
+ * the one thing the library otherwise refuses to do, because a native
276
+ * listener sees clicks React's tree never shows it.
277
+ *
278
+ * That is exactly why it works here. A handler on the page that calls
279
+ * `stopPropagation()` never reaches this, so an element can claim a click
280
+ * and keep the dialog open; anything that does not, dismisses. The check is
281
+ * on the panel itself rather than on the click's coordinates, so a Select or
282
+ * a menu portaled out of the panel keeps it open too.
283
+ */
284
+ const contentRef = React.useRef(null);
285
+ React.useEffect(() => {
286
+ if (!open || !passThrough)
287
+ return undefined;
288
+ const onDocumentClick = (e) => {
289
+ const target = e.target;
290
+ if (!target || contentRef.current?.contains(target))
291
+ return;
292
+ if (isInConstellationPortal(target))
293
+ return;
294
+ onOpenChange(false);
295
+ };
296
+ document.addEventListener('click', onDocumentClick);
297
+ return () => document.removeEventListener('click', onDocumentClick);
298
+ }, [open, passThrough, onOpenChange]);
63
299
  const wasClosingRef = React.useRef(false);
64
300
  const onAfterCloseRef = React.useRef(onAfterClose);
65
301
  onAfterCloseRef.current = onAfterClose;
@@ -88,8 +324,21 @@ function DialogContent({ className, children, width = 'max', ...props }) {
88
324
  }, [open, onOpenChange]);
89
325
  if (!mounted || state === 'idle')
90
326
  return null;
91
- const widthClass = width === 'min' ? s['dialog-width-min'] : '';
92
- return createPortal(jsxs("div", { ref: focusTrapRef, children: [jsx("div", { "data-slot": 'dialog-overlay', "data-state": state, className: s['dialog-overlay'], onClick: () => onOpenChange(false), "aria-hidden": 'true' }), jsxs("div", { "data-slot": 'dialog-content', "data-state": state, role: 'dialog', "aria-modal": 'true', "aria-labelledby": titleId, "aria-describedby": descriptionId, className: cn(s['dialog-content'], widthClass, className), onClick: e => e.stopPropagation(), ...props, children: [children, jsx(DialogClose, { className: s['close-button'], asChild: true, children: jsxs(Button, { variant: 'ghost', theme: 'inherit', iconOnly: true, size: 'sm', children: [jsx(XIcon, {}), jsx("span", { className: 'srOnly', children: "Close" })] }) })] })] }), document.body);
327
+ const widthClass = measure ? s['dialog-measure'] : width === 'min' ? s['dialog-width-min'] : '';
328
+ const measureValue = measure
329
+ ? ['text', 'content', 'wide'].includes(measure)
330
+ ? `var(--measure-${measure})`
331
+ : measure
332
+ : undefined;
333
+ return createPortal(jsxs("div", { "data-constellation-portal": '', ref: focusTrapRef, children: [jsx("div", { "data-slot": 'dialog-overlay', "data-state": state, "data-pass-through": passThrough ? '' : undefined, className: s['dialog-overlay'],
334
+ // A pass-through scrim never takes the click: it goes to the page
335
+ // underneath, and the document listener above decides what it meant.
336
+ onClick: passThrough ? undefined : () => onOpenChange(false), "aria-hidden": 'true' }), jsxs("div", { ref: node => {
337
+ contentRef.current = node;
338
+ morphRef(node);
339
+ }, "data-slot": 'dialog-content', "data-state": state, "data-morph": origin ? '' : undefined, "data-morph-state": origin ? morphPhase : undefined, role: 'dialog', "aria-modal": passThrough ? undefined : 'true', "aria-labelledby": titleId, "aria-describedby": descriptionId, className: cn(s['dialog-content'], widthClass, className), style: measureValue
340
+ ? { ...style, '--dialog-measure': measureValue }
341
+ : style, onClick: e => e.stopPropagation(), ...props, children: [children, jsx(DialogClose, { className: s['close-button'], asChild: true, children: jsxs(Button, { variant: 'ghost', theme: 'inherit', iconOnly: true, size: 'sm', children: [jsx(XIcon, {}), jsx("span", { className: 'srOnly', children: "Close" })] }) })] })] }), document.body);
93
342
  }
94
343
  // ── Semantic sub-components ──────────────────────────────
95
344
  function DialogHeader({ className, ...props }) {
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sources":["../../../src/ui/Dialog/dialog.tsx"],"sourcesContent":["import { Row } from '@constellation/layout/Row';\nimport { Typography, type TypographyVariant } from '@constellation/typography/Typography';\nimport { Button } from '@constellation/ui/Button';\nimport cn from 'clsx';\nimport { XIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { Slot } from '../../internal/slot';\nimport { DEFAULT_ANIMATION_DURATION, useAnimationState } from '../../internal/use-animation-state';\nimport { useFocusTrap } from '../../internal/use-focus-trap';\nimport { useScrollLock } from '../../internal/use-scroll-lock';\nimport s from './dialog.module.scss';\n\n// ── Context ──────────────────────────────────────────────\n\ntype DialogContextValue = {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onAfterClose?: () => void;\n titleId: string;\n descriptionId: string;\n};\n\nconst DialogContext = React.createContext<DialogContextValue | null>(null);\n\nfunction useDialog() {\n const ctx = React.useContext(DialogContext);\n if (!ctx) throw new Error('Dialog compound components must be used within <Dialog>');\n return ctx;\n}\n\n// ── Root ─────────────────────────────────────────────────\n\nexport interface DialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n onAfterClose?: () => void;\n children?: React.ReactNode;\n}\n\nfunction Dialog({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n onAfterClose,\n children,\n}: DialogProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const open = isControlled ? controlledOpen : internalOpen;\n const titleId = React.useId();\n const descriptionId = React.useId();\n\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n return (\n <DialogContext.Provider\n value={{ open, onOpenChange: handleOpenChange, onAfterClose, titleId, descriptionId }}\n >\n {children}\n </DialogContext.Provider>\n );\n}\n\n// ── Trigger ──────────────────────────────────────────────\n\nexport interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nfunction DialogTrigger({ asChild, onClick, children, ...props }: DialogTriggerProps) {\n const { onOpenChange } = useDialog();\n const Comp = asChild ? Slot : 'button';\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n onOpenChange(true);\n };\n\n return (\n <Comp data-slot={'dialog-trigger'} onClick={handleClick} {...props}>\n {children}\n </Comp>\n );\n}\n\n// ── Close ────────────────────────────────────────────────\n\nexport interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nfunction DialogClose({ asChild, onClick, children, ...props }: DialogCloseProps) {\n const { onOpenChange } = useDialog();\n const Comp = asChild ? Slot : 'button';\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n onOpenChange(false);\n };\n\n return (\n <Comp data-slot={'dialog-close'} onClick={handleClick} {...props}>\n {children}\n </Comp>\n );\n}\n\n// ── Overlay ──────────────────────────────────────────────\n\nfunction DialogOverlay({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n const { open, onOpenChange } = useDialog();\n\n return (\n <div\n data-slot={'dialog-overlay'}\n data-state={open ? 'open' : 'closed'}\n className={cn(s['dialog-overlay'], className)}\n onClick={() => onOpenChange(false)}\n aria-hidden={'true'}\n {...props}\n />\n );\n}\n\n// ── Content ──────────────────────────────────────────────\n\nexport type DialogContentProps = React.HTMLAttributes<HTMLDivElement> & {\n width?: 'max' | 'min';\n};\n\nfunction DialogContent({ className, children, width = 'max', ...props }: DialogContentProps) {\n const { open, onOpenChange, onAfterClose, titleId, descriptionId } = useDialog();\n const { mounted, state } = useAnimationState(open, DEFAULT_ANIMATION_DURATION);\n const focusTrapRef = useFocusTrap(open);\n useScrollLock(mounted);\n\n const wasClosingRef = React.useRef(false);\n const onAfterCloseRef = React.useRef(onAfterClose);\n onAfterCloseRef.current = onAfterClose;\n\n React.useEffect(() => {\n if (state === 'closed') {\n wasClosingRef.current = true;\n } else if (state === 'idle' && wasClosingRef.current) {\n wasClosingRef.current = false;\n onAfterCloseRef.current?.();\n }\n }, [state]);\n\n React.useEffect(() => {\n if (!open) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n // A nested layer (an open Select, DatePicker or menu) marks Escape as\n // handled with preventDefault. Escape should dismiss the topmost layer\n // only, so the modal ignores an event something inside it already took.\n if (e.key === 'Escape' && !e.defaultPrevented) {\n onOpenChange(false);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [open, onOpenChange]);\n\n if (!mounted || state === 'idle') return null;\n\n const widthClass = width === 'min' ? s['dialog-width-min'] : '';\n\n return createPortal(\n <div ref={focusTrapRef}>\n <div\n data-slot={'dialog-overlay'}\n data-state={state}\n className={s['dialog-overlay']}\n onClick={() => onOpenChange(false)}\n aria-hidden={'true'}\n />\n <div\n data-slot={'dialog-content'}\n data-state={state}\n role={'dialog'}\n aria-modal={'true'}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n className={cn(s['dialog-content'], widthClass, className)}\n onClick={e => e.stopPropagation()}\n {...props}\n >\n {children}\n <DialogClose className={s['close-button']} asChild>\n <Button variant={'ghost'} theme={'inherit'} iconOnly size={'sm'}>\n <XIcon />\n <span className={'srOnly'}>Close</span>\n </Button>\n </DialogClose>\n </div>\n </div>,\n document.body,\n );\n}\n\n// ── Semantic sub-components ──────────────────────────────\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot={'dialog-header'} className={cn(s['dialog-header'], className)} {...props} />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <Row\n data-slot={'dialog-footer'}\n gap={1}\n justify={'space-between'}\n className={cn(s['dialog-footer'], className)}\n {...props}\n />\n );\n}\n\n/**\n * Renders the dialog's heading. Defaults to `<Typography variant='h6'>`\n * so consumers can write `<DialogTitle>My dialog</DialogTitle>` without\n * manually wrapping in Typography. Override the variant with the\n * `variant` prop, or opt out entirely with `asChild` to supply a custom\n * element (e.g., a Heading component).\n */\nfunction DialogTitle({\n className,\n asChild,\n variant = 'h6',\n ...props\n}: React.ComponentProps<'h2'> & {\n asChild?: boolean;\n variant?: TypographyVariant;\n}) {\n const { titleId } = useDialog();\n\n if (asChild) {\n return (\n <Slot\n id={titleId}\n data-slot={'dialog-title'}\n className={cn(s['dialog-title'], className)}\n {...props}\n />\n );\n }\n\n return (\n <Typography\n id={titleId}\n variant={variant}\n data-slot={'dialog-title'}\n className={cn(s['dialog-title'], className)}\n {...props}\n />\n );\n}\n\n/**\n * Renders the dialog's supporting description text. Defaults to\n * `<Typography variant='body2'>`. Override with `variant` or supply a\n * custom element via `asChild`.\n */\nfunction DialogDescription({\n className,\n asChild,\n variant = 'body2',\n ...props\n}: React.ComponentProps<'p'> & {\n asChild?: boolean;\n variant?: TypographyVariant;\n}) {\n const { descriptionId } = useDialog();\n\n if (asChild) {\n return (\n <Slot\n id={descriptionId}\n data-slot={'dialog-description'}\n className={cn(s['dialog-description'], className)}\n {...props}\n />\n );\n }\n\n return (\n <Typography\n id={descriptionId}\n variant={variant}\n data-slot={'dialog-description'}\n className={cn(s['dialog-description'], className)}\n {...props}\n />\n );\n}\n\n// ── Kept for API compat but no-ops now ───────────────────\n\nfunction DialogPortal({ children }: { children?: React.ReactNode }) {\n return <>{children}</>;\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAA4B,IAAI,CAAC;AAE1E,SAAS,SAAS,GAAA;IAChB,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC;AAC3C,IAAA,IAAI,CAAC,GA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T,OAAO,EACP,OAAO,GAAG,OAAO,EACjB,GAAG,KAAK,EAIT,EAAA;AACC,IAAA,MAAM,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE;IAErC,IAAI,OAAO,EAAE;QACX,QACEA,GAAA,CAAC,IAAI,EAAA,EACH,EAAE,EAAE,aAAa,EAAA,WAAA,EACN,oBAAoB,EAC/B,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,EAAA,GAC7C,KAAK,EAAA,CACT;IAEN;AAEA,IAAA,QACEA,GAAA,CAAC,UAAU,EAAA,EACT,EAAE,EAAE,aAAa,EACjB,OAAO,EAAE,OAAO,EAAA,WAAA,EACL,oBAAoB,EAC/B,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,EAAA,GAC7C,KAAK,EAAA,CACT;AAEN;AAEA;AAEA,SAAS,YAAY,CAAC,EAAE,QAAQ,EAAkC,EAAA;IAChE,OAAOA,GAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI;AACxB;;"}
1
+ {"version":3,"file":"dialog.js","sources":["../../../src/ui/Dialog/dialog.tsx"],"sourcesContent":["import { Row } from '@constellation/layout/Row';\nimport { Typography, type TypographyVariant } from '@constellation/typography/Typography';\nimport { Button } from '@constellation/ui/Button';\nimport cn from 'clsx';\nimport { XIcon } from 'lucide-react';\nimport * as React from 'react';\nimport { createPortal } from 'react-dom';\nimport { prefersReducedMotion } from '../../hooks/use-motion';\nimport { Slot } from '../../internal/slot';\nimport { DEFAULT_ANIMATION_DURATION, useAnimationState } from '../../internal/use-animation-state';\nimport { useFocusTrap } from '../../internal/use-focus-trap';\nimport { useScrollLock } from '../../internal/use-scroll-lock';\nimport { isInConstellationPortal } from '../../utils/portal';\nimport s from './dialog.module.scss';\n\n// ── Context ──────────────────────────────────────────────\n\ntype DialogContextValue = {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n onAfterClose?: () => void;\n titleId: string;\n descriptionId: string;\n};\n\nconst DialogContext = React.createContext<DialogContextValue | null>(null);\n\nfunction useDialog() {\n const ctx = React.useContext(DialogContext);\n if (!ctx) throw new Error('Dialog compound components must be used within <Dialog>');\n return ctx;\n}\n\n// ── Root ─────────────────────────────────────────────────\n\nexport interface DialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n onAfterClose?: () => void;\n children?: React.ReactNode;\n}\n\nfunction Dialog({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n onAfterClose,\n children,\n}: DialogProps) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const isControlled = controlledOpen !== undefined;\n const open = isControlled ? controlledOpen : internalOpen;\n const titleId = React.useId();\n const descriptionId = React.useId();\n\n const handleOpenChange = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setInternalOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange],\n );\n\n return (\n <DialogContext.Provider\n value={{ open, onOpenChange: handleOpenChange, onAfterClose, titleId, descriptionId }}\n >\n {children}\n </DialogContext.Provider>\n );\n}\n\n// ── Trigger ──────────────────────────────────────────────\n\nexport interface DialogTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nfunction DialogTrigger({ asChild, onClick, children, ...props }: DialogTriggerProps) {\n const { onOpenChange } = useDialog();\n const Comp = asChild ? Slot : 'button';\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n onOpenChange(true);\n };\n\n return (\n <Comp data-slot={'dialog-trigger'} onClick={handleClick} {...props}>\n {children}\n </Comp>\n );\n}\n\n// ── Close ────────────────────────────────────────────────\n\nexport interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean;\n}\n\nfunction DialogClose({ asChild, onClick, children, ...props }: DialogCloseProps) {\n const { onOpenChange } = useDialog();\n const Comp = asChild ? Slot : 'button';\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n onOpenChange(false);\n };\n\n return (\n <Comp data-slot={'dialog-close'} onClick={handleClick} {...props}>\n {children}\n </Comp>\n );\n}\n\n// ── Overlay ──────────────────────────────────────────────\n\nfunction DialogOverlay({\n className,\n passThrough = false,\n ...props\n}: React.HTMLAttributes<HTMLDivElement> & { passThrough?: boolean }) {\n const { open, onOpenChange } = useDialog();\n\n return (\n <div\n data-slot={'dialog-overlay'}\n data-state={open ? 'open' : 'closed'}\n data-pass-through={passThrough ? '' : undefined}\n className={cn(s['dialog-overlay'], className)}\n // A pass-through scrim cannot be clicked at all — the click goes to the\n // page under it, and DialogContent's document listener decides.\n onClick={passThrough ? undefined : () => onOpenChange(false)}\n aria-hidden={'true'}\n {...props}\n />\n );\n}\n\n// ── Content ──────────────────────────────────────────────\n\nexport type DialogContentProps = React.HTMLAttributes<HTMLDivElement> & {\n width?: 'max' | 'min';\n /**\n * Give the panel a real width instead of letting its content decide.\n *\n * `width` is `max-content`/`min-content`, which is fine for a confirm but\n * wrong for anything with a form in it: the panel ends up as narrow as the\n * longest line allows and every row inside is squashed. Takes the same\n * vocabulary as `Container` — `text`, `content`, `wide`, or a CSS length —\n * and stays capped by the viewport either way.\n */\n measure?: 'text' | 'content' | 'wide' | (string & {});\n /**\n * The element the dialog came from, so it grows out of it and shrinks back\n * into it rather than fading in over the top of the page.\n *\n * Pass the tile, row or card that was clicked. Where a modal has an obvious\n * origin on screen, morphing from it says \"this is that thing, larger\" — a\n * dialog that fades in centre-screen makes the reader find their place\n * again when it closes.\n *\n * A `DOMRect` is accepted too, for the case where the origin has since been\n * unmounted or moved.\n */\n origin?: React.RefObject<HTMLElement | null> | DOMRect | null;\n /**\n * Whether the scrim takes the pointer.\n *\n * `blocking` (the default) is a modal in the usual sense: the page behind is\n * dimmed and inert, and a click on the scrim dismisses.\n *\n * `pass-through` dims the page but leaves it live, for a panel that is a\n * DETAIL VIEW of something still on screen — a tile in a grid, a row in a\n * table. Clicking the next tile should show the next thing, not spend one\n * click closing and a second one opening. The dialog still dismisses on a\n * click that lands outside it, so a click on the empty background behaves as\n * it always did; a handler that calls `stopPropagation()` keeps it open,\n * which is how the tile says \"I am taking this click\".\n *\n * Scroll is not locked in this mode, for the same reason: the thing you want\n * to look at next may be further down the page.\n */\n overlay?: 'blocking' | 'pass-through';\n};\n\n/**\n * Grow from `origin` on open, and shrink back into it on close.\n *\n * The animation is CSS. JavaScript supplies only the one thing a stylesheet\n * cannot know — where on screen the panel came from — and flips a modifier;\n * the transition between the two states does everything else. Closing is the\n * same two states in the other order, so the exit is the entrance backwards by\n * construction rather than a second animation kept in step by hand.\n *\n * The phase is React state, not an attribute poked in an effect, and that\n * matters: the panel has to be PAINTED once in its `from` state before it can\n * transition out of it. Setting both in one frame collapses them and nothing\n * moves — which is exactly how the contents ended up at full strength from the\n * first frame instead of building in as the box grew.\n */\nfunction useMorphFrom(origin: DialogContentProps['origin'], state: string, duration: number) {\n const ref = React.useRef<HTMLDivElement | null>(null);\n const restingRef = React.useRef<DOMRect | null>(null);\n /*\n * `from` is a starting position, and someone who has asked for less motion\n * never travels — so they open in the resting state directly. Starting them\n * at `from` would leave the panel wearing the modifier that hides its own\n * contents, with nothing scheduled to take it off.\n */\n const [phase, setPhase] = React.useState<'from' | 'to'>(\n origin && !prefersReducedMotion() ? 'from' : 'to',\n );\n\n const rectOf = React.useCallback(() => {\n if (!origin) return null;\n if (origin instanceof DOMRect) return origin;\n const el = (origin as React.RefObject<HTMLElement | null>).current;\n return el ? el.getBoundingClientRect() : null;\n }, [origin]);\n\n /*\n * Both ends are absolute pixels with no transform. Interpolating between\n * `left: 283px` and `left: 50%` while a `translate(-50%, -50%)` also changes\n * is not a straight line, and it shows.\n */\n const settled = React.useRef(false);\n\n /*\n * Force the pending style changes to be recalculated NOW.\n *\n * Everything below happens inside one task, and the browser is free to\n * coalesce it into a single recalculation — which would see only the end\n * state and have nothing to animate between. Reading a computed length is\n * what makes the intermediate state real. It has to be a genuine style read:\n * `void el.offsetWidth` proved unreliable here, returning the pre-pin width.\n */\n const reflow = (el: HTMLElement) => getComputedStyle(el).width;\n\n const pin = (el: HTMLElement | null, r: DOMRect | null) => {\n if (!el || !r) return;\n el.style.left = `${r.left}px`;\n el.style.top = `${r.top}px`;\n el.style.width = `${r.width}px`;\n el.style.height = `${r.height}px`;\n el.style.transform = 'none';\n // Written here rather than from React state so the flag and the geometry\n // it describes are always set in the same breath. The stylesheet hangs the\n // travel transition and `overflow: hidden` off it — both belong to a panel\n // whose box is being driven from here, and neither to one at rest.\n el.dataset.morphPinned = '';\n };\n\n /*\n * Give the box back to the stylesheet.\n *\n * The panel travels between two measured rectangles, which means it spends\n * the journey wearing an inline `width` and `height`. Those must not outlive\n * the journey: a dialog whose content can change — a disclosure opening, a\n * list growing, a field validating — was frozen at whatever it measured on\n * open, and `overflow: hidden` then clipped whatever no longer fit, so the\n * buttons at the foot of a card left the card.\n *\n * Released with transitions suppressed. The declaration that animates the\n * travel goes away with the flag, but the base rule's `transition: all` does\n * not, and a panel snapping from a pinned pixel height to `auto` is a change\n * it will happily animate — badly, since `auto` is not interpolable and the\n * intermediate frames come out as a jump.\n */\n const release = (el: HTMLElement | null) => {\n if (!el) return;\n el.style.transitionProperty = 'none';\n for (const prop of ['left', 'top', 'width', 'height', 'transform']) {\n el.style.removeProperty(prop);\n }\n delete el.dataset.morphPinned;\n reflow(el);\n el.style.removeProperty('transition-property');\n };\n\n /*\n * A callback ref, not a layout effect, and that is the whole trick.\n *\n * The panel does not exist on the render that opens the dialog — the mount\n * is one state update behind — so a layout effect keyed on the phase runs\n * once against a null node and never fires again, because the phase has not\n * changed by the time the element finally lands. Attaching the measurement\n * to the node itself means it happens exactly when there is a node, which is\n * the actual precondition.\n */\n const attach = React.useCallback(\n (node: HTMLDivElement | null) => {\n ref.current = node;\n if (!node || !origin || settled.current || prefersReducedMotion()) return;\n // The resting box, read before anything is pinned: where the panel would\n // sit on its own, and therefore where it is travelling to.\n restingRef.current = node.getBoundingClientRect();\n // A starting position must not animate into place.\n node.style.transitionProperty = 'none';\n pin(node, rectOf());\n reflow(node);\n },\n [origin, rectOf],\n );\n\n /*\n * Leave `from` one paint later.\n *\n * A plain effect, not a layout effect: it runs AFTER the browser has\n * painted, which is the requirement — the panel has to have been drawn at\n * the tile's size once, or there is nothing to travel from.\n */\n React.useEffect(() => {\n const el = ref.current;\n if (!el || !origin || settled.current || state !== 'open' || prefersReducedMotion()) return;\n el.style.removeProperty('transition-property');\n /*\n * Settle that removal on its own. A transition compares the style before a\n * change with the style after it, and `transition-property: none` in the\n * \"before\" half means no transition is generated at all — so restoring the\n * property and moving the panel inside one recalculation animates nothing.\n */\n reflow(el);\n settled.current = true;\n setPhase('to');\n }, [origin, state]);\n\n /*\n * The travel itself, in both directions, and the handover at each end.\n *\n * `to` pins the resting box and then lets go of it once the panel has\n * arrived, so the dialog sizes to its content for as long as it is open.\n * `from` has to put the box back before it can travel home — and it measures\n * where the panel actually IS rather than trusting the rectangle recorded on\n * open, because between the two the content may well have changed the height.\n */\n React.useLayoutEffect(() => {\n if (!origin || !settled.current || prefersReducedMotion()) return;\n const el = ref.current;\n if (!el) return;\n\n if (phase === 'from') {\n // Freeze the panel exactly where it stands — mid-travel included, since\n // a rect read during a transition is the animated position — and only\n // then send it home, or there is no geometry to leave from.\n const here = el.getBoundingClientRect();\n el.style.transitionProperty = 'none';\n pin(el, here);\n reflow(el);\n el.style.removeProperty('transition-property');\n reflow(el);\n pin(el, rectOf());\n return;\n }\n\n pin(el, restingRef.current);\n\n /*\n * Hand the box back when the journey ends. `transitionend` is the honest\n * signal, but it never fires for a property whose two ends are equal — a\n * tile already the height of the panel, most obviously — so the timer is\n * not a belt-and-braces fallback, it is the path taken whenever the panel\n * did not have to travel in that dimension.\n */\n let done = false;\n const finish = () => {\n if (done) return;\n done = true;\n release(el);\n };\n const onEnd = (e: TransitionEvent) => {\n if (e.target === el && (e.propertyName === 'height' || e.propertyName === 'width')) finish();\n };\n el.addEventListener('transitionend', onEnd);\n const timer = window.setTimeout(finish, duration + 60);\n return () => {\n el.removeEventListener('transitionend', onEnd);\n window.clearTimeout(timer);\n };\n }, [phase, origin, rectOf, duration]);\n\n // Closing puts the modifier back, and the opening animation runs in reverse.\n React.useLayoutEffect(() => {\n if (origin && state === 'closed' && !prefersReducedMotion()) setPhase('from');\n }, [state, origin]);\n\n return { ref: attach, phase, duration };\n}\n\nfunction DialogContent({\n className,\n children,\n width = 'max',\n origin,\n measure,\n overlay = 'blocking',\n style,\n ...props\n}: DialogContentProps) {\n const { open, onOpenChange, onAfterClose, titleId, descriptionId } = useDialog();\n /*\n * A morph travels further than a fade, so it needs longer — and the unmount\n * timer has to use the SAME number, or the panel is torn out of the DOM\n * part way through its exit.\n */\n const duration = origin ? 300 : DEFAULT_ANIMATION_DURATION;\n const { mounted, state } = useAnimationState(open, duration);\n const { ref: morphRef, phase: morphPhase } = useMorphFrom(origin, state, duration);\n const focusTrapRef = useFocusTrap(open);\n const passThrough = overlay === 'pass-through';\n // A live page behind the panel has to be scrollable, or half of what you can\n // now click is out of reach.\n useScrollLock(mounted && !passThrough);\n\n /*\n * With a scrim that cannot be clicked, dismissing is a document listener —\n * the one thing the library otherwise refuses to do, because a native\n * listener sees clicks React's tree never shows it.\n *\n * That is exactly why it works here. A handler on the page that calls\n * `stopPropagation()` never reaches this, so an element can claim a click\n * and keep the dialog open; anything that does not, dismisses. The check is\n * on the panel itself rather than on the click's coordinates, so a Select or\n * a menu portaled out of the panel keeps it open too.\n */\n const contentRef = React.useRef<HTMLDivElement | null>(null);\n React.useEffect(() => {\n if (!open || !passThrough) return undefined;\n\n const onDocumentClick = (e: MouseEvent) => {\n const target = e.target as Element | null;\n if (!target || contentRef.current?.contains(target)) return;\n if (isInConstellationPortal(target)) return;\n onOpenChange(false);\n };\n\n document.addEventListener('click', onDocumentClick);\n return () => document.removeEventListener('click', onDocumentClick);\n }, [open, passThrough, onOpenChange]);\n\n const wasClosingRef = React.useRef(false);\n const onAfterCloseRef = React.useRef(onAfterClose);\n onAfterCloseRef.current = onAfterClose;\n\n React.useEffect(() => {\n if (state === 'closed') {\n wasClosingRef.current = true;\n } else if (state === 'idle' && wasClosingRef.current) {\n wasClosingRef.current = false;\n onAfterCloseRef.current?.();\n }\n }, [state]);\n\n React.useEffect(() => {\n if (!open) return;\n\n const handleKeyDown = (e: KeyboardEvent) => {\n // A nested layer (an open Select, DatePicker or menu) marks Escape as\n // handled with preventDefault. Escape should dismiss the topmost layer\n // only, so the modal ignores an event something inside it already took.\n if (e.key === 'Escape' && !e.defaultPrevented) {\n onOpenChange(false);\n }\n };\n\n document.addEventListener('keydown', handleKeyDown);\n return () => document.removeEventListener('keydown', handleKeyDown);\n }, [open, onOpenChange]);\n\n if (!mounted || state === 'idle') return null;\n\n const widthClass = measure ? s['dialog-measure'] : width === 'min' ? s['dialog-width-min'] : '';\n const measureValue = measure\n ? ['text', 'content', 'wide'].includes(measure)\n ? `var(--measure-${measure})`\n : measure\n : undefined;\n\n return createPortal(\n <div data-constellation-portal={''} ref={focusTrapRef}>\n <div\n data-slot={'dialog-overlay'}\n data-state={state}\n data-pass-through={passThrough ? '' : undefined}\n className={s['dialog-overlay']}\n // A pass-through scrim never takes the click: it goes to the page\n // underneath, and the document listener above decides what it meant.\n onClick={passThrough ? undefined : () => onOpenChange(false)}\n aria-hidden={'true'}\n />\n <div\n ref={node => {\n contentRef.current = node;\n morphRef(node);\n }}\n data-slot={'dialog-content'}\n data-state={state}\n data-morph={origin ? '' : undefined}\n data-morph-state={origin ? morphPhase : undefined}\n role={'dialog'}\n // Not modal when the page behind it is still live, and saying so is\n // the difference between a screen reader offering the rest of the page\n // or hiding it.\n aria-modal={passThrough ? undefined : 'true'}\n aria-labelledby={titleId}\n aria-describedby={descriptionId}\n className={cn(s['dialog-content'], widthClass, className)}\n style={\n measureValue\n ? ({ ...style, '--dialog-measure': measureValue } as React.CSSProperties)\n : style\n }\n onClick={e => e.stopPropagation()}\n {...props}\n >\n {children}\n <DialogClose className={s['close-button']} asChild>\n <Button variant={'ghost'} theme={'inherit'} iconOnly size={'sm'}>\n <XIcon />\n <span className={'srOnly'}>Close</span>\n </Button>\n </DialogClose>\n </div>\n </div>,\n document.body,\n );\n}\n\n// ── Semantic sub-components ──────────────────────────────\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot={'dialog-header'} className={cn(s['dialog-header'], className)} {...props} />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <Row\n data-slot={'dialog-footer'}\n gap={1}\n justify={'space-between'}\n className={cn(s['dialog-footer'], className)}\n {...props}\n />\n );\n}\n\n/**\n * Renders the dialog's heading. Defaults to `<Typography variant='h6'>`\n * so consumers can write `<DialogTitle>My dialog</DialogTitle>` without\n * manually wrapping in Typography. Override the variant with the\n * `variant` prop, or opt out entirely with `asChild` to supply a custom\n * element (e.g., a Heading component).\n */\nfunction DialogTitle({\n className,\n asChild,\n variant = 'h6',\n ...props\n}: React.ComponentProps<'h2'> & {\n asChild?: boolean;\n variant?: TypographyVariant;\n}) {\n const { titleId } = useDialog();\n\n if (asChild) {\n return (\n <Slot\n id={titleId}\n data-slot={'dialog-title'}\n className={cn(s['dialog-title'], className)}\n {...props}\n />\n );\n }\n\n return (\n <Typography\n id={titleId}\n variant={variant}\n data-slot={'dialog-title'}\n className={cn(s['dialog-title'], className)}\n {...props}\n />\n );\n}\n\n/**\n * Renders the dialog's supporting description text. Defaults to\n * `<Typography variant='body2'>`. Override with `variant` or supply a\n * custom element via `asChild`.\n */\nfunction DialogDescription({\n className,\n asChild,\n variant = 'body2',\n ...props\n}: React.ComponentProps<'p'> & {\n asChild?: boolean;\n variant?: TypographyVariant;\n}) {\n const { descriptionId } = useDialog();\n\n if (asChild) {\n return (\n <Slot\n id={descriptionId}\n data-slot={'dialog-description'}\n className={cn(s['dialog-description'], className)}\n {...props}\n />\n );\n }\n\n return (\n <Typography\n id={descriptionId}\n variant={variant}\n data-slot={'dialog-description'}\n className={cn(s['dialog-description'], className)}\n {...props}\n />\n );\n}\n\n// ── Kept for API compat but no-ops now ───────────────────\n\nfunction DialogPortal({ children }: { children?: React.ReactNode }) {\n return <>{children}</>;\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;AAyBA,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAA4B,IAAI,CAAC;AAE1E,SAAS,SAAS,GAAA;IAChB,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC;AAC3C,IAAA,IAAI,CAAC,GAAG;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC;AACpF,IAAA,OAAO,GAAG;AACZ;AAYA,SAAS,MAAM,CAAC,EACd,IAAI,EAAE,cAAc,EACpB,WAAW,GAAG,KAAK,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,GACI,EAAA;AACZ,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;AACnE,IAAA,MAAM,YAAY,GAAG,cAAc,KAAK,SAAS;IACjD,MAAM,IAAI,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY;AACzD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,EAAE;AAC7B,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,EAAE;IAEnC,MAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CACxC,CAAC,IAAa,KAAI;AAChB,QAAA,IAAI,CAAC,YAAY;YAAE,eAAe,CAAC,IAAI,CAAC;AACxC,QAAA,YAAY,GAAG,IAAI,CAAC;AACtB,IAAA,CAAC,EACD,CAAC,YA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AAC,CAAC,oBAAoB,CAAC,EAAE,SAAS,CAAC,EAAA,GAC7C,KAAK,EAAA,CACT;AAEN;AAEA;AAEA,SAAS,YAAY,CAAC,EAAE,QAAQ,EAAkC,EAAA;IAChE,OAAOA,GAAA,CAAAE,QAAA,EAAA,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAI;AACxB;;"}
@@ -1,6 +1,6 @@
1
1
  import './dialog.css';
2
2
 
3
- var s = {"dialog-overlay":"dialog-module_dialog-overlay__m4sZN","dialog-content":"dialog-module_dialog-content__FgQr2","dialog-width-min":"dialog-module_dialog-width-min__dbFaL","close-button":"dialog-module_close-button__MA_5T","dialog-header":"dialog-module_dialog-header__H2vDS","dialog-footer":"dialog-module_dialog-footer__8E1_f"};
3
+ var s = {"dialog-overlay":"dialog-module_dialog-overlay__m4sZN","dialog-content":"dialog-module_dialog-content__FgQr2","dialog-width-min":"dialog-module_dialog-width-min__dbFaL","dialog-measure":"dialog-module_dialog-measure__ajXF_","close-button":"dialog-module_close-button__MA_5T","dialog-header":"dialog-module_dialog-header__H2vDS","dialog-footer":"dialog-module_dialog-footer__8E1_f"};
4
4
 
5
5
  export { s as default };
6
6
  //# sourceMappingURL=dialog.module.scss.js.map
@@ -51,37 +51,44 @@
51
51
  border: 1px solid;
52
52
  }
53
53
  .icon-module_icon--outlined__9I-E-.icon-module_icon--primary__BjgWE {
54
- background-color: color-mix(in srgb, var(--primary-hover) 20%, transparent);
54
+ /* On the solid, for the reason Button gives. */
55
+ background-color: color-mix(in srgb, var(--primary-main) 16%, transparent);
55
56
  border-color: var(--primary-outlined-border);
56
57
  color: var(--primary-outlined-border);
57
58
  }
58
59
  .icon-module_icon--outlined__9I-E-.icon-module_icon--secondary__zl-HC {
59
- background-color: color-mix(in srgb, var(--secondary-hover) 20%, transparent);
60
+ /* On the solid, for the reason Button gives. */
61
+ background-color: color-mix(in srgb, var(--secondary-main) 16%, transparent);
60
62
  border-color: var(--secondary-outlined-border);
61
63
  color: var(--secondary-outlined-border);
62
64
  }
63
65
  .icon-module_icon--outlined__9I-E-.icon-module_icon--destructive__6BcZn {
64
- background-color: color-mix(in srgb, var(--destructive-hover) 20%, transparent);
66
+ /* On the solid, for the reason Button gives. */
67
+ background-color: color-mix(in srgb, var(--destructive-main) 16%, transparent);
65
68
  border-color: var(--destructive-outlined-border);
66
69
  color: var(--destructive-outlined-border);
67
70
  }
68
71
  .icon-module_icon--outlined__9I-E-.icon-module_icon--warning__UGmqH {
69
- background-color: color-mix(in srgb, var(--warning-hover) 20%, transparent);
72
+ /* On the solid, for the reason Button gives. */
73
+ background-color: color-mix(in srgb, var(--warning-main) 16%, transparent);
70
74
  border-color: var(--warning-outlined-border);
71
75
  color: var(--warning-outlined-border);
72
76
  }
73
77
  .icon-module_icon--outlined__9I-E-.icon-module_icon--success__arbgh {
74
- background-color: color-mix(in srgb, var(--success-hover) 20%, transparent);
78
+ /* On the solid, for the reason Button gives. */
79
+ background-color: color-mix(in srgb, var(--success-main) 16%, transparent);
75
80
  border-color: var(--success-outlined-border);
76
81
  color: var(--success-outlined-border);
77
82
  }
78
83
  .icon-module_icon--outlined__9I-E-.icon-module_icon--info__8Rgda {
79
- background-color: color-mix(in srgb, var(--info-hover) 20%, transparent);
84
+ /* On the solid, for the reason Button gives. */
85
+ background-color: color-mix(in srgb, var(--info-main) 16%, transparent);
80
86
  border-color: var(--info-outlined-border);
81
87
  color: var(--info-outlined-border);
82
88
  }
83
89
  .icon-module_icon--outlined__9I-E-.icon-module_icon--slate__xUH7A {
84
- background-color: color-mix(in srgb, var(--slate-hover) 20%, transparent);
90
+ /* On the solid, for the reason Button gives. */
91
+ background-color: color-mix(in srgb, var(--slate-main) 16%, transparent);
85
92
  border-color: var(--slate-outlined-border);
86
93
  color: var(--slate-outlined-border);
87
94
  }
@@ -100,11 +100,18 @@
100
100
  }
101
101
  }
102
102
  @media (prefers-reduced-motion: reduce) {
103
- .progress-bar-module_progress-bar--indeterminate__aRllV .progress-bar-module_progress-bar-fill__6-qZt,
104
- .progress-bar-module_progress-bar--animated__vcqbL.progress-bar-module_progress-bar--striped__GLD2b .progress-bar-module_progress-bar-fill__6-qZt {
103
+ :root:not([data-motion=full]) .progress-bar-module_progress-bar--indeterminate__aRllV .progress-bar-module_progress-bar-fill__6-qZt,
104
+ :root:not([data-motion=full]) .progress-bar-module_progress-bar--animated__vcqbL.progress-bar-module_progress-bar--striped__GLD2b .progress-bar-module_progress-bar-fill__6-qZt {
105
105
  animation: none;
106
106
  }
107
- .progress-bar-module_progress-bar-fill__6-qZt {
107
+ :root:not([data-motion=full]) .progress-bar-module_progress-bar-fill__6-qZt {
108
108
  transition: none;
109
109
  }
110
+ }
111
+ :root[data-motion=reduced] .progress-bar-module_progress-bar--indeterminate__aRllV .progress-bar-module_progress-bar-fill__6-qZt,
112
+ :root[data-motion=reduced] .progress-bar-module_progress-bar--animated__vcqbL.progress-bar-module_progress-bar--striped__GLD2b .progress-bar-module_progress-bar-fill__6-qZt {
113
+ animation: none;
114
+ }
115
+ :root[data-motion=reduced] .progress-bar-module_progress-bar-fill__6-qZt {
116
+ transition: none;
110
117
  }
@@ -3,6 +3,19 @@
3
3
  --stat-card-icon-color: var(--text-secondary);
4
4
  --stat-card-icon-size: 2.5rem;
5
5
  --line-height-default: 1.3;
6
+ text-align: left;
7
+ }
8
+
9
+ .stat-card-module_stat-card__Siea4:where(button) {
10
+ cursor: pointer;
11
+ transition: background-color 150ms ease;
12
+ width: 100%;
13
+ }
14
+ .stat-card-module_stat-card__Siea4:where(button):hover {
15
+ background-color: var(--action-hover);
16
+ }
17
+ .stat-card-module_stat-card__Siea4:where(button)[aria-pressed=true] {
18
+ background-color: var(--action-selected);
6
19
  }
7
20
 
8
21
  .stat-card-module_stat-card-icon__VMLCm {
@@ -25,6 +25,15 @@ export interface StatCardProps extends React.ComponentPropsWithoutRef<'div'> {
25
25
  direction?: StatCardDirection;
26
26
  /** Surface variant. */
27
27
  variant?: StatCardVariant;
28
+ /**
29
+ * The element the card renders as.
30
+ *
31
+ * A figure that FILTERS the thing it counts is a control, and should be a
32
+ * real one: `el='button'` makes the whole card the target, so it takes
33
+ * focus, answers the keyboard, and reads as pressable rather than as a
34
+ * number that happens to react to a click.
35
+ */
36
+ el?: React.ElementType<React.HTMLAttributes<HTMLDivElement>>;
28
37
  }
29
38
  declare const StatCard: React.ForwardRefExoticComponent<StatCardProps & React.RefAttributes<HTMLDivElement>>;
30
39
  export { StatCard };
@@ -1 +1 @@
1
- {"version":3,"file":"stat-card.d.ts","sourceRoot":"","sources":["../../../src/ui/StatCard/stat-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,MAAM,cAAc,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC;AACvD,MAAM,MAAM,aAAa,GACvB,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AACjG,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAuCjD,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC;IAC1E,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,wCAAwC;IACxC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,KAAK,CAAC,EAA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ACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,sBAAsB;IACtB,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,uBAAuB;IACvB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B;;;;;;;OAOG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;CAC9D;AAED,QAAA,MAAM,QAAQ,sFAgHb,CAAC;AAGF,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -32,7 +32,7 @@ const statCardTypographyBySize = {
32
32
  trend: 'body1',
33
33
  },
34
34
  };
35
- const StatCard = React.forwardRef(({ label, value, icon, description, trend, trendLabel, theme, size, direction, variant, className, children, ...props }, ref) => {
35
+ const StatCard = React.forwardRef(({ label, value, icon, description, trend, trendLabel, theme, size, direction, variant, el, className, children, ...props }, ref) => {
36
36
  const resolvedTheme = theme ?? DEFAULT_STAT_CARD_THEME;
37
37
  const resolvedSize = size ?? DEFAULT_STAT_CARD_SIZE;
38
38
  const resolvedVariant = variant ?? DEFAULT_STAT_CARD_VARIANT;
@@ -48,7 +48,7 @@ const StatCard = React.forwardRef(({ label, value, icon, description, trend, tre
48
48
  variant: resolvedVariant,
49
49
  };
50
50
  const typographyConfig = statCardTypographyBySize[resolvedSize];
51
- return (jsxs(Container, { ref: ref, "data-slot": 'stat-card', gap: 1, styled: isFilled || isOutlined, padding: isFilled || isOutlined ? 'md' : 'none', outlined: isFilled || isOutlined, theme: containerTheme, className: cn(statCardVariants(variantOptions), className), ...rootProps, children: [jsxs(Container, { styled: false, gap: 2, direction: resolvedDirection, align: resolvedDirection === 'row' ? 'start' : 'center', children: [icon ? (jsx("span", { "data-slot": 'stat-card-icon', className: s['stat-card-icon'], "aria-hidden": 'true', children: icon })) : null, jsxs(Column, { "data-slot": 'stat-card-header', className: s['stat-card-header'], align: resolvedDirection === 'row' ? 'start' : 'center', children: [jsx(Typography, { "data-slot": 'stat-card-label', variant: typographyConfig.label, className: s['stat-card-label'], align: resolvedDirection === 'row' ? undefined : 'center', children: label }), value ? (jsx(Typography, { "data-slot": 'stat-card-value', variant: typographyConfig.value, className: s['stat-card-value'], align: resolvedDirection === 'row' ? undefined : 'center', children: jsx("strong", { children: value }) })) : null, description ? (jsx(Typography, { "data-slot": 'stat-card-description', variant: typographyConfig.description, theme: 'muted', className: s['stat-card-description'], children: description })) : null, trend ? (jsxs(Typography, { "data-slot": 'stat-card-trend', variant: typographyConfig.trend, theme: trendTheme, className: s['stat-card-trend'], children: [trend === 'up' ? jsx(TrendingUpIcon, { "aria-hidden": 'true' }) : null, trend === 'down' ? jsx(TrendingDownIcon, { "aria-hidden": 'true' }) : null, trendLabel] })) : null] })] }), children] }));
51
+ return (jsxs(Container, { ref: ref, el: el, "data-slot": 'stat-card', gap: 1, styled: isFilled || isOutlined, padding: isFilled || isOutlined ? 'md' : 'none', outlined: isFilled || isOutlined, theme: containerTheme, className: cn(statCardVariants(variantOptions), className), ...rootProps, children: [jsxs(Container, { styled: false, gap: 2, direction: resolvedDirection, align: resolvedDirection === 'row' ? 'start' : 'center', children: [icon ? (jsx("span", { "data-slot": 'stat-card-icon', className: s['stat-card-icon'], "aria-hidden": 'true', children: icon })) : null, jsxs(Column, { "data-slot": 'stat-card-header', className: s['stat-card-header'], align: resolvedDirection === 'row' ? 'start' : 'center', children: [jsx(Typography, { "data-slot": 'stat-card-label', variant: typographyConfig.label, className: s['stat-card-label'], align: resolvedDirection === 'row' ? undefined : 'center', children: label }), value ? (jsx(Typography, { "data-slot": 'stat-card-value', variant: typographyConfig.value, className: s['stat-card-value'], align: resolvedDirection === 'row' ? undefined : 'center', children: jsx("strong", { children: value }) })) : null, description ? (jsx(Typography, { "data-slot": 'stat-card-description', variant: typographyConfig.description, theme: 'muted', className: s['stat-card-description'], children: description })) : null, trend ? (jsxs(Typography, { "data-slot": 'stat-card-trend', variant: typographyConfig.trend, theme: trendTheme, className: s['stat-card-trend'], children: [trend === 'up' ? jsx(TrendingUpIcon, { "aria-hidden": 'true' }) : null, trend === 'down' ? jsx(TrendingDownIcon, { "aria-hidden": 'true' }) : null, trendLabel] })) : null] })] }), children] }));
52
52
  });
53
53
  StatCard.displayName = 'StatCard';
54
54