@kismet-ux/constellation 1.8.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 (414) hide show
  1. package/README.md +36 -0
  2. package/dist/brand/Logo/logo.css +4 -1
  3. package/dist/form/Checkbox/checkbox.css +48 -34
  4. package/dist/form/Checkbox/checkbox.d.ts +5 -0
  5. package/dist/form/Checkbox/checkbox.d.ts.map +1 -1
  6. package/dist/form/Checkbox/checkbox.js +6 -55
  7. package/dist/form/Checkbox/checkbox.js.map +1 -1
  8. package/dist/form/Checkbox/checkbox.module.scss.js +1 -1
  9. package/dist/form/Combobox/combobox.css +35 -0
  10. package/dist/form/Combobox/combobox.d.ts +41 -0
  11. package/dist/form/Combobox/combobox.d.ts.map +1 -0
  12. package/dist/form/Combobox/combobox.js +152 -0
  13. package/dist/form/Combobox/combobox.js.map +1 -0
  14. package/dist/form/Combobox/combobox.module.scss.js +6 -0
  15. package/dist/form/Combobox/combobox.module.scss.js.map +1 -0
  16. package/dist/form/Combobox/index.d.ts +2 -0
  17. package/dist/form/Combobox/index.d.ts.map +1 -0
  18. package/dist/form/DatePicker/date-picker.d.ts.map +1 -1
  19. package/dist/form/DatePicker/date-picker.js +5 -53
  20. package/dist/form/DatePicker/date-picker.js.map +1 -1
  21. package/dist/form/Input/input.css +12 -0
  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 +54 -1
  26. package/dist/form/Select/select.d.ts +41 -3
  27. package/dist/form/Select/select.d.ts.map +1 -1
  28. package/dist/form/Select/select.js +43 -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-BSSQnlm_.d.ts → index-B9B7JjTb.d.ts} +3 -1
  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-ibcvWtdH.d.ts → index-CRrCqjAW.d.ts} +11 -1
  117. package/dist/index-CSQFy2xe.d.ts +195 -0
  118. package/dist/index-CWM2ewRz.d.ts +566 -0
  119. package/dist/index-CY6Xq36O.d.ts +204 -0
  120. package/dist/index-CYGOs6JT.d.ts +273 -0
  121. package/dist/index-CYPFkjfk.d.ts +204 -0
  122. package/dist/index-C_hJJ1fH.d.ts +527 -0
  123. package/dist/index-CcM-XHTL.d.ts +273 -0
  124. package/dist/index-CdGF_eEO.d.ts +514 -0
  125. package/dist/index-CdJTE9Lh.d.ts +566 -0
  126. package/dist/index-CdOt-pqR.d.ts +537 -0
  127. package/dist/index-CgeR_2Gi.d.ts +220 -0
  128. package/dist/index-CjUoZbDi.d.ts +354 -0
  129. package/dist/index-CjV6KsFc.d.ts +263 -0
  130. package/dist/index-Ck8LtgBW.d.ts +557 -0
  131. package/dist/index-Cknm9FUU.d.ts +299 -0
  132. package/dist/index-Clv3CnXv.d.ts +184 -0
  133. package/dist/index-Cm4wnJ29.d.ts +514 -0
  134. package/dist/index-Cmz3q-CI.d.ts +273 -0
  135. package/dist/index-CnMBzCft.d.ts +514 -0
  136. package/dist/index-CnVW0FnZ.d.ts +272 -0
  137. package/dist/index-CpIHT-uo.d.ts +231 -0
  138. package/dist/index-CtBEDM0b.d.ts +514 -0
  139. package/dist/index-CtVSiQeY.d.ts +130 -0
  140. package/dist/index-Cu107rOs.d.ts +293 -0
  141. package/dist/index-CxyTd3Ag.d.ts +354 -0
  142. package/dist/index-CywSNvOU.d.ts +200 -0
  143. package/dist/index-CzJL7Lro.d.ts +566 -0
  144. package/dist/index-CzJnKY3r.d.ts +272 -0
  145. package/dist/index-D-R9eOxe.d.ts +354 -0
  146. package/dist/index-D-hdgIbs.d.ts +273 -0
  147. package/dist/index-D-slQ9w4.d.ts +537 -0
  148. package/dist/index-D0jdNDaH.d.ts +204 -0
  149. package/dist/index-D1ir--Li.d.ts +566 -0
  150. package/dist/index-D29_-MCZ.d.ts +354 -0
  151. package/dist/index-D2glATpo.d.ts +273 -0
  152. package/dist/index-D6ATtbor.d.ts +298 -0
  153. package/dist/index-D6HktSlo.d.ts +514 -0
  154. package/dist/index-DB4UBCvy.d.ts +537 -0
  155. package/dist/index-DBd0PU9y.d.ts +222 -0
  156. package/dist/index-DE2Nm-iT.d.ts +354 -0
  157. package/dist/index-DEeJuuvm.d.ts +231 -0
  158. package/dist/index-DHhzBSfL.d.ts +498 -0
  159. package/dist/index-DKpWNCb6.d.ts +204 -0
  160. package/dist/index-DMewi97i.d.ts +566 -0
  161. package/dist/index-DN0gtpck.d.ts +354 -0
  162. package/dist/index-DO23vZ-R.d.ts +514 -0
  163. package/dist/index-DTb2-z6E.d.ts +130 -0
  164. package/dist/index-DV-CN7c0.d.ts +231 -0
  165. package/dist/index-DWgCs62z.d.ts +566 -0
  166. package/dist/index-D_6Qu6ia.d.ts +200 -0
  167. package/dist/index-D_vn8O-I.d.ts +293 -0
  168. package/dist/index-Daq4m4Rf.d.ts +514 -0
  169. package/dist/index-Db6cXpr6.d.ts +537 -0
  170. package/dist/index-DbZ1s2E-.d.ts +514 -0
  171. package/dist/index-DbevJPuY.d.ts +354 -0
  172. package/dist/index-DepmPwP7.d.ts +537 -0
  173. package/dist/index-DfnTWQCz.d.ts +514 -0
  174. package/dist/index-Dfu8WhiS.d.ts +273 -0
  175. package/dist/index-DggMYd7c.d.ts +298 -0
  176. package/dist/index-DhS2nQjt.d.ts +200 -0
  177. package/dist/index-Dn3bC8Ki.d.ts +222 -0
  178. package/dist/index-Dn9bGZvU.d.ts +195 -0
  179. package/dist/index-DnDt7A4Y.d.ts +354 -0
  180. package/dist/index-DpdYKBP2.d.ts +498 -0
  181. package/dist/index-DunP9qIK.d.ts +537 -0
  182. package/dist/index-DxO6-qt5.d.ts +498 -0
  183. package/dist/index-ESQ8WM_8.d.ts +130 -0
  184. package/dist/index-GVz409cm.d.ts +222 -0
  185. package/dist/index-HAx-aLZ0.d.ts +273 -0
  186. package/dist/{index-CkQ6wNCc.d.ts → index-Iuzs6nt9.d.ts} +3 -3
  187. package/dist/index-LnEpnlTq.d.ts +566 -0
  188. package/dist/index-Mihuyg_o.d.ts +204 -0
  189. package/dist/index-Mm1i2OdU.d.ts +537 -0
  190. package/dist/index-P0oxVi77.d.ts +537 -0
  191. package/dist/index-Q5JuPFoN.d.ts +293 -0
  192. package/dist/index-RJviLtvo.d.ts +566 -0
  193. package/dist/index-SnQCbfte.d.ts +498 -0
  194. package/dist/index-Th9It0ZT.d.ts +354 -0
  195. package/dist/index-UHHmyQM5.d.ts +272 -0
  196. package/dist/index-VyGmJYQZ.d.ts +537 -0
  197. package/dist/index-WYH70le_.d.ts +195 -0
  198. package/dist/index-Wj9RYtTX.d.ts +273 -0
  199. package/dist/index-Y-wMZeUG.d.ts +298 -0
  200. package/dist/index-ZgohDspB.d.ts +498 -0
  201. package/dist/index-Zo2rSdXz.d.ts +273 -0
  202. package/dist/index-ZwpWgV4n.d.ts +272 -0
  203. package/dist/index-_oZ4knIl.d.ts +272 -0
  204. package/dist/index-an222nAK.d.ts +354 -0
  205. package/dist/index-daV0QTe0.d.ts +537 -0
  206. package/dist/index-eGZu2HLC.d.ts +231 -0
  207. package/dist/index-eswPA0Un.d.ts +204 -0
  208. package/dist/index-gf6-wf_1.d.ts +566 -0
  209. package/dist/index-hdVr9Wrv.d.ts +566 -0
  210. package/dist/index-iygiXYw2.d.ts +537 -0
  211. package/dist/index-jR29ZGLD.d.ts +514 -0
  212. package/dist/index-kHgI28TP.d.ts +272 -0
  213. package/dist/index-lY4_UCOs.d.ts +566 -0
  214. package/dist/index-miXK87yJ.d.ts +231 -0
  215. package/dist/index-mwbGtZkk.d.ts +273 -0
  216. package/dist/index-ru2DFXcm.d.ts +195 -0
  217. package/dist/index-uj1ll_u-.d.ts +204 -0
  218. package/dist/index-vfq-aH7U.d.ts +537 -0
  219. package/dist/index-xqUz9XjP.d.ts +537 -0
  220. package/dist/index.css +74 -18
  221. package/dist/index.d.ts +78 -12
  222. package/dist/index.js +34 -28
  223. package/dist/index.js.map +1 -1
  224. package/dist/internal/use-scroll-lock.d.ts +15 -0
  225. package/dist/internal/use-scroll-lock.d.ts.map +1 -1
  226. package/dist/internal/use-scroll-lock.js +26 -8
  227. package/dist/internal/use-scroll-lock.js.map +1 -1
  228. package/dist/layout/AppContent/app-content.css +1 -1
  229. package/dist/layout/AppContentBands/app-content-bands.css +21 -0
  230. package/dist/layout/AppContentBands/app-content-bands.d.ts +26 -0
  231. package/dist/layout/AppContentBands/app-content-bands.d.ts.map +1 -0
  232. package/dist/layout/AppContentBands/app-content-bands.js +65 -0
  233. package/dist/layout/AppContentBands/app-content-bands.js.map +1 -0
  234. package/dist/layout/AppContentBands/app-content-bands.module.scss.js +6 -0
  235. package/dist/layout/AppContentBands/app-content-bands.module.scss.js.map +1 -0
  236. package/dist/layout/AppContentBands/index.d.ts +2 -0
  237. package/dist/layout/AppContentBands/index.d.ts.map +1 -0
  238. package/dist/layout/AppContentFooter/app-content-footer.css +9 -0
  239. package/dist/layout/AppContentFooter/app-content-footer.d.ts +38 -0
  240. package/dist/layout/AppContentFooter/app-content-footer.d.ts.map +1 -0
  241. package/dist/layout/AppContentFooter/app-content-footer.js +42 -0
  242. package/dist/layout/AppContentFooter/app-content-footer.js.map +1 -0
  243. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js +6 -0
  244. package/dist/layout/AppContentFooter/app-content-footer.module.scss.js.map +1 -0
  245. package/dist/layout/AppContentFooter/index.d.ts +2 -0
  246. package/dist/layout/AppContentFooter/index.d.ts.map +1 -0
  247. package/dist/layout/AppContentMain/app-content-main.css +6 -0
  248. package/dist/layout/AppContentMain/app-content-main.d.ts +37 -0
  249. package/dist/layout/AppContentMain/app-content-main.d.ts.map +1 -0
  250. package/dist/layout/AppContentMain/app-content-main.js +41 -0
  251. package/dist/layout/AppContentMain/app-content-main.js.map +1 -0
  252. package/dist/layout/AppContentMain/app-content-main.module.scss.js +6 -0
  253. package/dist/layout/AppContentMain/app-content-main.module.scss.js.map +1 -0
  254. package/dist/layout/AppContentMain/index.d.ts +2 -0
  255. package/dist/layout/AppContentMain/index.d.ts.map +1 -0
  256. package/dist/layout/AppFooter/app-footer.js +1 -1
  257. package/dist/layout/AppSidebar/app-sidebar.js +1 -1
  258. package/dist/layout/AppSidebarHeader/app-sidebar-header.css +2 -3
  259. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts +10 -2
  260. package/dist/layout/AppSidebarHeader/app-sidebar-header.d.ts.map +1 -1
  261. package/dist/layout/AppSidebarHeader/app-sidebar-header.js +12 -32
  262. package/dist/layout/AppSidebarHeader/app-sidebar-header.js.map +1 -1
  263. package/dist/layout/Collapse/collapse.css +4 -1
  264. package/dist/layout/Column/column.css +6 -0
  265. package/dist/layout/Column/column.d.ts.map +1 -1
  266. package/dist/layout/Column/column.js +3 -1
  267. package/dist/layout/Column/column.js.map +1 -1
  268. package/dist/layout/Column/column.module.scss.js +1 -1
  269. package/dist/layout/Container/container.css +43 -1
  270. package/dist/layout/Container/container.d.ts.map +1 -1
  271. package/dist/layout/Container/container.js +38 -7
  272. package/dist/layout/Container/container.js.map +1 -1
  273. package/dist/layout/Container/container.module.scss.js +1 -1
  274. package/dist/layout/Grid/grid.css +28 -0
  275. package/dist/layout/Grid/grid.d.ts.map +1 -1
  276. package/dist/layout/Grid/grid.js +40 -4
  277. package/dist/layout/Grid/grid.js.map +1 -1
  278. package/dist/layout/Grid/grid.module.scss.js +1 -1
  279. package/dist/layout/Row/row.css +42 -0
  280. package/dist/layout/Row/row.d.ts.map +1 -1
  281. package/dist/layout/Row/row.js +5 -3
  282. package/dist/layout/Row/row.js.map +1 -1
  283. package/dist/layout/Row/row.module.scss.js +1 -1
  284. package/dist/layout/Sidebar/sidebar.css +4 -2
  285. package/dist/layout/Sidebar/sidebar.d.ts.map +1 -1
  286. package/dist/layout/Sidebar/sidebar.js +1 -1
  287. package/dist/layout/Sidebar/sidebar.js.map +1 -1
  288. package/dist/layout/index.d.ts +2 -0
  289. package/dist/layout/index.d.ts.map +1 -1
  290. package/dist/layout.d.ts +3 -3
  291. package/dist/layout.js +2 -0
  292. package/dist/layout.js.map +1 -1
  293. package/dist/navigation/DropdownMenu/dropdown-menu.d.ts.map +1 -1
  294. package/dist/navigation/DropdownMenu/dropdown-menu.js +1 -1
  295. package/dist/navigation/DropdownMenu/dropdown-menu.js.map +1 -1
  296. package/dist/navigation/NavUser/nav-user.js +2 -2
  297. package/dist/navigation/Sheet/sheet.css +40 -6
  298. package/dist/navigation/Sheet/sheet.d.ts +22 -0
  299. package/dist/navigation/Sheet/sheet.d.ts.map +1 -1
  300. package/dist/navigation/Sheet/sheet.js +5 -30
  301. package/dist/navigation/Sheet/sheet.js.map +1 -1
  302. package/dist/navigation/Sheet/sheet.module.scss.js +1 -1
  303. package/dist/navigation.d.ts +22 -0
  304. package/dist/row-CuhTBQhK.d.ts +21 -0
  305. package/dist/settings/AppearanceDropdown/appearance-dropdown.js +1 -1
  306. package/dist/settings/AppearanceTabs/appearance-tabs.js +2 -27
  307. package/dist/settings/AppearanceTabs/appearance-tabs.js.map +1 -1
  308. package/dist/tokens.css +59 -17
  309. package/dist/tooltip-1qYeAGE9.d.ts +45 -0
  310. package/dist/tooltip-3IOkYFQ-.d.ts +45 -0
  311. package/dist/tooltip-540OmbEG.d.ts +46 -0
  312. package/dist/tooltip-91Nq_Hl8.d.ts +46 -0
  313. package/dist/tooltip-B56sWYK0.d.ts +46 -0
  314. package/dist/tooltip-BIrIF-4z.d.ts +45 -0
  315. package/dist/tooltip-BOipKW5l.d.ts +46 -0
  316. package/dist/tooltip-BPC0RH8i.d.ts +46 -0
  317. package/dist/tooltip-BST1BOCn.d.ts +45 -0
  318. package/dist/tooltip-BhuxNQwX.d.ts +45 -0
  319. package/dist/tooltip-BpAJwi3K.d.ts +46 -0
  320. package/dist/tooltip-C0LBu2Iu.d.ts +45 -0
  321. package/dist/tooltip-C1ZwALiG.d.ts +45 -0
  322. package/dist/tooltip-C55-HA0w.d.ts +45 -0
  323. package/dist/tooltip-CHn6WuDv.d.ts +46 -0
  324. package/dist/tooltip-CNjH7zKO.d.ts +45 -0
  325. package/dist/tooltip-CSBby1OT.d.ts +45 -0
  326. package/dist/tooltip-CXFRzR0L.d.ts +45 -0
  327. package/dist/tooltip-ChpsbkOU.d.ts +46 -0
  328. package/dist/tooltip-CspTy2ZW.d.ts +46 -0
  329. package/dist/tooltip-CvComAZD.d.ts +46 -0
  330. package/dist/tooltip-D19vhhRn.d.ts +45 -0
  331. package/dist/tooltip-D32S1g-7.d.ts +46 -0
  332. package/dist/tooltip-DAvBN683.d.ts +45 -0
  333. package/dist/tooltip-DQz4_i4m.d.ts +45 -0
  334. package/dist/tooltip-DVYPUAb1.d.ts +46 -0
  335. package/dist/tooltip-DXoSckt9.d.ts +46 -0
  336. package/dist/tooltip-Dtoq3bn_.d.ts +46 -0
  337. package/dist/tooltip-DxO_DWMO.d.ts +46 -0
  338. package/dist/tooltip-DxdGb3dX.d.ts +45 -0
  339. package/dist/tooltip-DzAzC0d7.d.ts +45 -0
  340. package/dist/tooltip-Lk4RpuSh.d.ts +45 -0
  341. package/dist/tooltip-ReFyHDhU.d.ts +45 -0
  342. package/dist/tooltip-_wdlSYAb.d.ts +46 -0
  343. package/dist/{tooltip-XagXjWLB.d.ts → tooltip-cjwkBINy.d.ts} +4 -0
  344. package/dist/tooltip-nKcM19C9.d.ts +45 -0
  345. package/dist/types/layout/container.d.ts +30 -1
  346. package/dist/types/layout/container.d.ts.map +1 -1
  347. package/dist/types/layout/grid.d.ts +42 -0
  348. package/dist/types/layout/grid.d.ts.map +1 -1
  349. package/dist/types/layout/row.d.ts +7 -0
  350. package/dist/types/layout/row.d.ts.map +1 -1
  351. package/dist/typography/Typography/typography-variants.d.ts +3 -0
  352. package/dist/typography/Typography/typography-variants.d.ts.map +1 -1
  353. package/dist/typography/Typography/typography-variants.js +25 -0
  354. package/dist/typography/Typography/typography-variants.js.map +1 -1
  355. package/dist/typography/Typography/typography.css +105 -41
  356. package/dist/typography/Typography/typography.d.ts +20 -0
  357. package/dist/typography/Typography/typography.d.ts.map +1 -1
  358. package/dist/typography/Typography/typography.js +11 -2
  359. package/dist/typography/Typography/typography.js.map +1 -1
  360. package/dist/typography/Typography/typography.module.scss.js +1 -1
  361. package/dist/typography-CTGVc_Gg.d.ts +41 -0
  362. package/dist/typography.d.ts +2 -2
  363. package/dist/ui/Alert/alert-provider.d.ts.map +1 -1
  364. package/dist/ui/Alert/alert-provider.js +1 -1
  365. package/dist/ui/Alert/alert-provider.js.map +1 -1
  366. package/dist/ui/Button/button-variants.d.ts +1 -0
  367. package/dist/ui/Button/button-variants.d.ts.map +1 -1
  368. package/dist/ui/Button/button-variants.js +3 -0
  369. package/dist/ui/Button/button-variants.js.map +1 -1
  370. package/dist/ui/Button/button.css +146 -77
  371. package/dist/ui/Button/button.d.ts +4 -0
  372. package/dist/ui/Button/button.d.ts.map +1 -1
  373. package/dist/ui/Button/button.js +8 -2
  374. package/dist/ui/Button/button.js.map +1 -1
  375. package/dist/ui/Button/button.module.scss.js +1 -1
  376. package/dist/ui/Chip/chip.css +32 -11
  377. package/dist/ui/Chip/chip.d.ts +16 -0
  378. package/dist/ui/Chip/chip.d.ts.map +1 -1
  379. package/dist/ui/Chip/chip.js +4 -2
  380. package/dist/ui/Chip/chip.js.map +1 -1
  381. package/dist/ui/CodeBlock/code-block.css +8 -3
  382. package/dist/ui/Dialog/dialog.css +70 -0
  383. package/dist/ui/Dialog/dialog.d.ts +45 -2
  384. package/dist/ui/Dialog/dialog.d.ts.map +1 -1
  385. package/dist/ui/Dialog/dialog.js +256 -7
  386. package/dist/ui/Dialog/dialog.js.map +1 -1
  387. package/dist/ui/Dialog/dialog.module.scss.js +1 -1
  388. package/dist/ui/Icon/icon.css +14 -7
  389. package/dist/ui/ProgressBar/progress-bar.css +10 -3
  390. package/dist/ui/StatCard/stat-card.css +13 -0
  391. package/dist/ui/StatCard/stat-card.d.ts +9 -0
  392. package/dist/ui/StatCard/stat-card.d.ts.map +1 -1
  393. package/dist/ui/StatCard/stat-card.js +2 -2
  394. package/dist/ui/StatCard/stat-card.js.map +1 -1
  395. package/dist/ui/StatusDot/status-dot.css +4 -1
  396. package/dist/ui/StepProgress/step-progress.css +12 -4
  397. package/dist/ui/Switch/switch.css +6 -2
  398. package/dist/ui/Tooltip/tooltip.d.ts.map +1 -1
  399. package/dist/ui/Tooltip/tooltip.js +1 -1
  400. package/dist/ui/Tooltip/tooltip.js.map +1 -1
  401. package/dist/ui.d.ts +3 -3
  402. package/dist/user/UserInfo/user-info.js +1 -1
  403. package/dist/utils/index.d.ts +1 -0
  404. package/dist/utils/index.d.ts.map +1 -1
  405. package/dist/utils/portal.d.ts +34 -0
  406. package/dist/utils/portal.d.ts.map +1 -0
  407. package/dist/utils/portal.js +40 -0
  408. package/dist/utils/portal.js.map +1 -0
  409. package/dist/utils.d.ts +35 -1
  410. package/dist/utils.js +1 -0
  411. package/dist/utils.js.map +1 -1
  412. package/package.json +3 -2
  413. package/src/styles/_mixins.scss +30 -0
  414. package/vite-plugin.mjs +7 -2
@@ -8,6 +8,22 @@ export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement>, Varian
8
8
  * so one value is enough for every `variant`.
9
9
  */
10
10
  color?: string;
11
+ /**
12
+ * Render the caller's own element instead of a `<span>`, keeping the chip's
13
+ * styling.
14
+ *
15
+ * A chip is a status marker by default and a span is right for that. But a
16
+ * row of chips is often a CHOICE — pick a variant, filter a list — and that
17
+ * needs real button semantics: focusable, keyboard-operable, `aria-pressed`.
18
+ * Styling a `<span>` to look tappable does not give any of that.
19
+ *
20
+ * ```tsx
21
+ * <Chip asChild variant={'outline'}>
22
+ * <button type={'button'} aria-pressed={on} onClick={pick}>Diced</button>
23
+ * </Chip>
24
+ * ```
25
+ */
26
+ asChild?: boolean;
11
27
  }
12
28
  /**
13
29
  * A small status marker.
@@ -1 +1 @@
1
- {"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC;IAChF;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,mFAkCT,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../src/ui/Chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,WAAW,SACf,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,OAAO,YAAY,CAAC;IAChF;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,IAAI,mFAqCT,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import cn from 'clsx';
3
3
  import * as React from 'react';
4
+ import { Slot } from '../../internal/slot.js';
4
5
  import { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children.js';
5
6
  import { chipVariants } from './chip-variants.js';
6
7
 
@@ -12,8 +13,9 @@ import { chipVariants } from './chip-variants.js';
12
13
  * `dashed` marks the value as provisional — a guess rather than a reading —
13
14
  * which is a distinction worth drawing without spending a second colour on it.
14
15
  */
15
- const Chip = React.forwardRef(({ className, size, theme, variant, shape, dashed, mono, uppercase, wrap, color, style, children, ...props }, ref) => {
16
- return (jsx("span", { "data-slot": 'chip', ref: ref, className: cn(chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }), className), style: color ? { ...style, '--chip-color': color } : style, ...props, children: withAriaHiddenChildren(children) }));
16
+ const Chip = React.forwardRef(({ className, size, theme, variant, shape, dashed, mono, uppercase, wrap, color, asChild, style, children, ...props }, ref) => {
17
+ const Comp = asChild ? Slot : 'span';
18
+ return (jsx(Comp, { "data-slot": 'chip', ref: ref, className: cn(chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }), className), style: color ? { ...style, '--chip-color': color } : style, ...props, children: withAriaHiddenChildren(children) }));
17
19
  });
18
20
  Chip.displayName = 'Chip';
19
21
 
@@ -1 +1 @@
1
- {"version":3,"file":"chip.js","sources":["../../../src/ui/Chip/chip.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { chipVariants } from './chip-variants';\n\nexport interface ChipProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\n /**\n * Any colour outside the theme scale — a category hue, a dietary marker.\n * Overrides the whole set of colour roles the theme would otherwise supply,\n * so one value is enough for every `variant`.\n */\n color?: string;\n}\n\n/**\n * A small status marker.\n *\n * `variant` chooses how much weight it carries: `soft` (a tinted fill, the\n * default) reads as ambient, `outline` recedes further, and `solid` is a claim.\n * `dashed` marks the value as provisional — a guess rather than a reading —\n * which is a distinction worth drawing without spending a second colour on it.\n */\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(\n (\n {\n className,\n size,\n theme,\n variant,\n shape,\n dashed,\n mono,\n uppercase,\n wrap,\n color,\n style,\n children,\n ...props\n },\n ref,\n ) => {\n return (\n <span\n data-slot={'chip'}\n ref={ref}\n className={cn(\n chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }),\n className,\n )}\n style={color ? ({ ...style, '--chip-color': color } as React.CSSProperties) : style}\n {...props}\n >\n {withAriaHiddenChildren(children)}\n </span>\n );\n },\n);\nChip.displayName = 'Chip';\n\nexport { Chip };\n"],"names":["_jsx"],"mappings":";;;;;;AAgBA;;;;;;;AAOG;AACH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CACE,EACE,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG,KACD;AACF,IAAA,QACEA,GAAA,CAAA,MAAA,EAAA,EAAA,WAAA,EACa,MAAM,EACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAC5E,SAAS,CACV,EACD,KAAK,EAAE,KAAK,GAAI,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,KAAK,EAA0B,GAAG,KAAK,EAAA,GAC/E,KAAK,EAAA,QAAA,EAER,sBAAsB,CAAC,QAAQ,CAAC,EAAA,CAC5B;AAEX,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM;;"}
1
+ {"version":3,"file":"chip.js","sources":["../../../src/ui/Chip/chip.tsx"],"sourcesContent":["import { type VariantProps } from 'class-variance-authority';\nimport cn from 'clsx';\nimport * as React from 'react';\nimport { Slot } from '../../internal/slot';\nimport { withAriaHiddenChildren } from '../../internal/with-aria-hidden-children';\nimport { chipVariants } from './chip-variants';\n\nexport interface ChipProps\n extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {\n /**\n * Any colour outside the theme scale — a category hue, a dietary marker.\n * Overrides the whole set of colour roles the theme would otherwise supply,\n * so one value is enough for every `variant`.\n */\n color?: string;\n /**\n * Render the caller's own element instead of a `<span>`, keeping the chip's\n * styling.\n *\n * A chip is a status marker by default and a span is right for that. But a\n * row of chips is often a CHOICE — pick a variant, filter a list — and that\n * needs real button semantics: focusable, keyboard-operable, `aria-pressed`.\n * Styling a `<span>` to look tappable does not give any of that.\n *\n * ```tsx\n * <Chip asChild variant={'outline'}>\n * <button type={'button'} aria-pressed={on} onClick={pick}>Diced</button>\n * </Chip>\n * ```\n */\n asChild?: boolean;\n}\n\n/**\n * A small status marker.\n *\n * `variant` chooses how much weight it carries: `soft` (a tinted fill, the\n * default) reads as ambient, `outline` recedes further, and `solid` is a claim.\n * `dashed` marks the value as provisional — a guess rather than a reading —\n * which is a distinction worth drawing without spending a second colour on it.\n */\nconst Chip = React.forwardRef<HTMLSpanElement, ChipProps>(\n (\n {\n className,\n size,\n theme,\n variant,\n shape,\n dashed,\n mono,\n uppercase,\n wrap,\n color,\n asChild,\n style,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'span';\n\n return (\n <Comp\n data-slot={'chip'}\n ref={ref}\n className={cn(\n chipVariants({ size, theme, variant, shape, dashed, mono, uppercase, wrap }),\n className,\n )}\n style={color ? ({ ...style, '--chip-color': color } as React.CSSProperties) : style}\n {...props}\n >\n {withAriaHiddenChildren(children)}\n </Comp>\n );\n },\n);\nChip.displayName = 'Chip';\n\nexport { Chip };\n"],"names":["_jsx"],"mappings":";;;;;;;AAiCA;;;;;;;AAOG;AACH,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAC3B,CACE,EACE,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,MAAM,EACN,IAAI,EACJ,SAAS,EACT,IAAI,EACJ,KAAK,EACL,OAAO,EACP,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACT,EACD,GAAG,KACD;IACF,MAAM,IAAI,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM;AAEpC,IAAA,QACEA,GAAA,CAAC,IAAI,EAAA,EAAA,WAAA,EACQ,MAAM,EACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAC5E,SAAS,CACV,EACD,KAAK,EAAE,KAAK,GAAI,EAAE,GAAG,KAAK,EAAE,cAAc,EAAE,KAAK,EAA0B,GAAG,KAAK,EAAA,GAC/E,KAAK,EAAA,QAAA,EAER,sBAAsB,CAAC,QAAQ,CAAC,EAAA,CAC5B;AAEX,CAAC;AAEH,IAAI,CAAC,WAAW,GAAG,MAAM;;"}
@@ -209,9 +209,14 @@
209
209
  }
210
210
 
211
211
  @media (prefers-reduced-motion: reduce) {
212
- .code-block-module_code-block-content--collapsible__EZKCv,
213
- .code-block-module_code-block-collapse-fade__Y0TgX,
214
- .code-block-module_code-block-toggle-icon__yL-sy {
212
+ :root:not([data-motion=full]) .code-block-module_code-block-content--collapsible__EZKCv,
213
+ :root:not([data-motion=full]) .code-block-module_code-block-collapse-fade__Y0TgX,
214
+ :root:not([data-motion=full]) .code-block-module_code-block-toggle-icon__yL-sy {
215
215
  transition: none;
216
216
  }
217
+ }
218
+ :root[data-motion=reduced] .code-block-module_code-block-content--collapsible__EZKCv,
219
+ :root[data-motion=reduced] .code-block-module_code-block-collapse-fade__Y0TgX,
220
+ :root[data-motion=reduced] .code-block-module_code-block-toggle-icon__yL-sy {
221
+ transition: none;
217
222
  }
@@ -1,9 +1,13 @@
1
+ @charset "UTF-8";
1
2
  .dialog-module_dialog-overlay__m4sZN {
2
3
  background-color: var(--background-modal);
3
4
  inset: 0;
4
5
  position: fixed;
5
6
  z-index: var(--z-modal);
6
7
  }
8
+ .dialog-module_dialog-overlay__m4sZN[data-pass-through] {
9
+ pointer-events: none;
10
+ }
7
11
  .dialog-module_dialog-overlay__m4sZN[data-state=open] {
8
12
  animation: dialog-module_fadeIn__8JmIQ 200ms;
9
13
  }
@@ -35,6 +39,9 @@
35
39
  .dialog-module_dialog-content__FgQr2.dialog-module_dialog-width-min__dbFaL {
36
40
  width: min-content;
37
41
  }
42
+ .dialog-module_dialog-content__FgQr2.dialog-module_dialog-measure__ajXF_ {
43
+ width: var(--dialog-measure);
44
+ }
38
45
  .dialog-module_dialog-content__FgQr2[data-state=open] {
39
46
  animation: dialog-module_fadeIn__8JmIQ 200ms, dialog-module_zoomIn__ezGtu 200ms;
40
47
  }
@@ -77,6 +84,69 @@
77
84
  }
78
85
  }
79
86
 
87
+ /*
88
+ * A morphing dialog animates its own transform from the element it came from,
89
+ * so the stock zoom must not also be running — two animations on one
90
+ * transform is a judder, not a crossfade.
91
+ */
92
+ /*
93
+ * A morphing dialog travels between two explicit geometries; see
94
+ * `useMorphFrom`. Everything here is keyed off `data-morph-state`, so the
95
+ * exit is the entrance with the value flipped rather than a second animation.
96
+ */
97
+ .dialog-module_dialog-content__FgQr2[data-morph] {
98
+ animation: none;
99
+ /*
100
+ * …and the stock EXIT must not hide the panel.
101
+ *
102
+ * `[data-state='closed']` pairs its keyframes with a bare `opacity: 0` to
103
+ * hold the faded-out state after they finish. Cancelling the animation above
104
+ * leaves that declaration standing on its own, so a morphing panel went
105
+ * transparent on the first frame of its exit and then travelled home
106
+ * invisibly. Which looks exactly like having no exit animation at all.
107
+ */
108
+ opacity: 1;
109
+ /*
110
+ * Both of these belong to a panel whose box is being DRIVEN, and neither to
111
+ * one at rest — so they hang off the flag `pin()`/`release()` maintain
112
+ * rather than off `[data-morph]`.
113
+ *
114
+ * `overflow: hidden` is right while the box is a measured rectangle
115
+ * travelling between two sizes: content must not spill out of a panel that
116
+ * is still smaller than it. It is wrong the moment the panel arrives, where
117
+ * it overrode the base rule's `overflow-y: auto` and turned a dialog too
118
+ * tall for the screen into one whose lower half was simply cut off.
119
+ *
120
+ * The transition is scoped for the same reason: once the geometry is back
121
+ * with the stylesheet, `width` is `max-content` and `height` is `auto`, and
122
+ * animating a panel between two content-derived sizes every time a
123
+ * disclosure opens is a wobble, not a transition.
124
+ */
125
+ }
126
+ .dialog-module_dialog-content__FgQr2[data-morph][data-morph-pinned] {
127
+ overflow: hidden;
128
+ transition: left 300ms var(--easing-default), top 300ms var(--easing-default), width 300ms var(--easing-default), height 300ms var(--easing-default);
129
+ }
130
+ .dialog-module_dialog-content__FgQr2[data-morph] {
131
+ /*
132
+ * What the tile already shows STAYS, and everything else fills in.
133
+ *
134
+ * A child marked `data-morph-keep` is the part the panel and the tile have
135
+ * in common — the name, its marks, the size. It is present from the first
136
+ * frame, so the panel opens as a bigger version of the tile rather than as
137
+ * an empty box that fills up. The rest are the fields the tile has no room
138
+ * for: they arrive as the box grows large enough to hold them, and they
139
+ * leave before it has finished collapsing.
140
+ */
141
+ }
142
+ .dialog-module_dialog-content__FgQr2[data-morph] > *:not([data-morph-keep]) {
143
+ transition: opacity 160ms ease 90ms;
144
+ }
145
+ .dialog-module_dialog-content__FgQr2[data-morph][data-morph-state=from] > *:not([data-morph-keep]) {
146
+ opacity: 0;
147
+ transition-delay: 0ms;
148
+ }
149
+
80
150
  @keyframes dialog-module_fadeIn__8JmIQ {
81
151
  from {
82
152
  opacity: 0;
@@ -16,11 +16,54 @@ export interface DialogCloseProps extends React.ButtonHTMLAttributes<HTMLButtonE
16
16
  asChild?: boolean;
17
17
  }
18
18
  declare function DialogClose({ asChild, onClick, children, ...props }: DialogCloseProps): React.JSX.Element;
19
- declare function DialogOverlay({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
19
+ declare function DialogOverlay({ className, passThrough, ...props }: React.HTMLAttributes<HTMLDivElement> & {
20
+ passThrough?: boolean;
21
+ }): React.JSX.Element;
20
22
  export type DialogContentProps = React.HTMLAttributes<HTMLDivElement> & {
21
23
  width?: 'max' | 'min';
24
+ /**
25
+ * Give the panel a real width instead of letting its content decide.
26
+ *
27
+ * `width` is `max-content`/`min-content`, which is fine for a confirm but
28
+ * wrong for anything with a form in it: the panel ends up as narrow as the
29
+ * longest line allows and every row inside is squashed. Takes the same
30
+ * vocabulary as `Container` — `text`, `content`, `wide`, or a CSS length —
31
+ * and stays capped by the viewport either way.
32
+ */
33
+ measure?: 'text' | 'content' | 'wide' | (string & {});
34
+ /**
35
+ * The element the dialog came from, so it grows out of it and shrinks back
36
+ * into it rather than fading in over the top of the page.
37
+ *
38
+ * Pass the tile, row or card that was clicked. Where a modal has an obvious
39
+ * origin on screen, morphing from it says "this is that thing, larger" — a
40
+ * dialog that fades in centre-screen makes the reader find their place
41
+ * again when it closes.
42
+ *
43
+ * A `DOMRect` is accepted too, for the case where the origin has since been
44
+ * unmounted or moved.
45
+ */
46
+ origin?: React.RefObject<HTMLElement | null> | DOMRect | null;
47
+ /**
48
+ * Whether the scrim takes the pointer.
49
+ *
50
+ * `blocking` (the default) is a modal in the usual sense: the page behind is
51
+ * dimmed and inert, and a click on the scrim dismisses.
52
+ *
53
+ * `pass-through` dims the page but leaves it live, for a panel that is a
54
+ * DETAIL VIEW of something still on screen — a tile in a grid, a row in a
55
+ * table. Clicking the next tile should show the next thing, not spend one
56
+ * click closing and a second one opening. The dialog still dismisses on a
57
+ * click that lands outside it, so a click on the empty background behaves as
58
+ * it always did; a handler that calls `stopPropagation()` keeps it open,
59
+ * which is how the tile says "I am taking this click".
60
+ *
61
+ * Scroll is not locked in this mode, for the same reason: the thing you want
62
+ * to look at next may be further down the page.
63
+ */
64
+ overlay?: 'blocking' | 'pass-through';
22
65
  };
23
- declare function DialogContent({ className, children, width, ...props }: DialogContentProps): React.ReactPortal | null;
66
+ declare function DialogContent({ className, children, width, origin, measure, overlay, style, ...props }: DialogContentProps): React.ReactPortal | null;
24
67
  declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
25
68
  declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
26
69
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/Dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAI1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4B/B,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,MAAM,CAAC,EACd,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,EAAE,WAAW,qBAsBb;AAID,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAclF;AAID,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAc9E;AAID,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,qBAanF;AAID,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CACvB,CAAC;AAEF,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAa,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,4BAsE1F;AAID,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUzE;AAED;;;;;;GAMG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,OAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAID,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAEjE;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/ui/Dialog/dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAI1F,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA8B/B,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,MAAM,CAAC,EACd,IAAI,EAAE,cAAc,EACpB,WAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,QAAQ,GACT,EAAE,WAAW,qBAsBb;AAID,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,qBAclF;AAID,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrF,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBAc9E;AAID,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,qBAgBlE;AAID,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG;IACtE,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACtB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACtD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC;IAC9D;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;CACvC,CAAC;AA6MF,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,KAAa,EACb,MAAM,EACN,OAAO,EACP,OAAoB,EACpB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,kBAAkB,4BAgIpB;AAID,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAIzE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAUzE;AAED;;;;;;GAMG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,OAAO,EACP,OAAc,EACd,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAED;;;;GAIG;AACH,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAiB,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,qBAuBA;AAID,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAEjE;AAED,OAAO,EACL,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,WAAW,EACX,aAAa,GACd,CAAC"}
@@ -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 }) {