@wordpress/ui 0.9.1-next.v.202603161435.0 → 0.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 (655) hide show
  1. package/CHANGELOG.md +76 -1
  2. package/CONTRIBUTING.md +180 -0
  3. package/README.md +34 -6
  4. package/build/alert-dialog/context.cjs +39 -0
  5. package/build/alert-dialog/context.cjs.map +7 -0
  6. package/build/alert-dialog/index.cjs +37 -0
  7. package/build/alert-dialog/index.cjs.map +7 -0
  8. package/build/alert-dialog/popup.cjs +165 -0
  9. package/build/alert-dialog/popup.cjs.map +7 -0
  10. package/build/alert-dialog/root.cjs +152 -0
  11. package/build/alert-dialog/root.cjs.map +7 -0
  12. package/build/alert-dialog/trigger.cjs +38 -0
  13. package/build/alert-dialog/trigger.cjs.map +7 -0
  14. package/build/alert-dialog/types.cjs +19 -0
  15. package/build/alert-dialog/types.cjs.map +7 -0
  16. package/build/badge/badge.cjs +14 -14
  17. package/build/badge/badge.cjs.map +2 -2
  18. package/build/button/button.cjs +18 -8
  19. package/build/button/button.cjs.map +3 -3
  20. package/build/card/content.cjs +4 -4
  21. package/build/card/content.cjs.map +2 -2
  22. package/build/card/full-bleed.cjs +4 -4
  23. package/build/card/full-bleed.cjs.map +2 -2
  24. package/build/card/header.cjs +4 -4
  25. package/build/card/header.cjs.map +2 -2
  26. package/build/card/root.cjs +6 -6
  27. package/build/card/root.cjs.map +2 -2
  28. package/build/card/title.cjs +14 -21
  29. package/build/card/title.cjs.map +3 -3
  30. package/build/collapsible-card/content.cjs +24 -3
  31. package/build/collapsible-card/content.cjs.map +4 -4
  32. package/build/collapsible-card/context.cjs +35 -0
  33. package/build/collapsible-card/context.cjs.map +7 -0
  34. package/build/collapsible-card/header-description.cjs +52 -0
  35. package/build/collapsible-card/header-description.cjs.map +7 -0
  36. package/build/collapsible-card/header.cjs +39 -18
  37. package/build/collapsible-card/header.cjs.map +2 -2
  38. package/build/collapsible-card/index.cjs +3 -0
  39. package/build/collapsible-card/index.cjs.map +2 -2
  40. package/build/collapsible-card/types.cjs.map +1 -1
  41. package/build/dialog/action.cjs +4 -2
  42. package/build/dialog/action.cjs.map +2 -2
  43. package/build/dialog/close-icon.cjs +2 -1
  44. package/build/dialog/close-icon.cjs.map +2 -2
  45. package/build/dialog/footer.cjs +3 -3
  46. package/build/dialog/footer.cjs.map +2 -2
  47. package/build/dialog/header.cjs +3 -3
  48. package/build/dialog/header.cjs.map +2 -2
  49. package/build/dialog/popup.cjs +24 -6
  50. package/build/dialog/popup.cjs.map +2 -2
  51. package/build/dialog/title.cjs +10 -19
  52. package/build/dialog/title.cjs.map +3 -3
  53. package/build/dialog/types.cjs.map +1 -1
  54. package/build/empty-state/actions.cjs +66 -0
  55. package/build/empty-state/actions.cjs.map +7 -0
  56. package/build/empty-state/description.cjs +69 -0
  57. package/build/empty-state/description.cjs.map +7 -0
  58. package/build/empty-state/icon.cjs +69 -0
  59. package/build/empty-state/icon.cjs.map +7 -0
  60. package/build/empty-state/index.cjs +46 -0
  61. package/build/empty-state/index.cjs.map +7 -0
  62. package/build/empty-state/root.cjs +66 -0
  63. package/build/empty-state/root.cjs.map +7 -0
  64. package/build/empty-state/title.cjs +71 -0
  65. package/build/empty-state/title.cjs.map +7 -0
  66. package/build/empty-state/types.cjs +19 -0
  67. package/build/empty-state/types.cjs.map +7 -0
  68. package/build/empty-state/visual.cjs +66 -0
  69. package/build/empty-state/visual.cjs.map +7 -0
  70. package/build/form/index.cjs +27 -0
  71. package/build/form/index.cjs.map +7 -0
  72. package/build/form/input-control/index.cjs +31 -0
  73. package/build/form/input-control/index.cjs.map +7 -0
  74. package/build/form/input-control/input-control.cjs +50 -0
  75. package/build/form/input-control/input-control.cjs.map +7 -0
  76. package/build/form/input-control/types.cjs +19 -0
  77. package/build/form/input-control/types.cjs.map +7 -0
  78. package/build/form/primitives/field/description.cjs +17 -4
  79. package/build/form/primitives/field/description.cjs.map +3 -3
  80. package/build/form/primitives/field/details.cjs +4 -4
  81. package/build/form/primitives/field/details.cjs.map +2 -2
  82. package/build/form/primitives/field/label.cjs +8 -8
  83. package/build/form/primitives/field/label.cjs.map +2 -2
  84. package/build/form/primitives/field/root.cjs +2 -2
  85. package/build/form/primitives/field/root.cjs.map +1 -1
  86. package/build/form/primitives/fieldset/description.cjs +20 -4
  87. package/build/form/primitives/fieldset/description.cjs.map +3 -3
  88. package/build/form/primitives/fieldset/details.cjs +3 -3
  89. package/build/form/primitives/fieldset/details.cjs.map +2 -2
  90. package/build/form/primitives/fieldset/legend.cjs +8 -7
  91. package/build/form/primitives/fieldset/legend.cjs.map +2 -2
  92. package/build/form/primitives/fieldset/root.cjs +2 -2
  93. package/build/form/primitives/fieldset/root.cjs.map +1 -1
  94. package/build/form/primitives/input/input.cjs +23 -7
  95. package/build/form/primitives/input/input.cjs.map +3 -3
  96. package/build/form/primitives/input-layout/input-layout.cjs +15 -5
  97. package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
  98. package/build/form/primitives/input-layout/slot.cjs +6 -5
  99. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  100. package/build/form/primitives/select/item.cjs +5 -5
  101. package/build/form/primitives/select/item.cjs.map +2 -2
  102. package/build/form/primitives/select/popup.cjs +9 -9
  103. package/build/form/primitives/select/popup.cjs.map +2 -2
  104. package/build/form/primitives/select/trigger.cjs +6 -6
  105. package/build/form/primitives/select/trigger.cjs.map +2 -2
  106. package/build/form/primitives/select/types.cjs.map +1 -1
  107. package/build/form/primitives/textarea/textarea.cjs +23 -4
  108. package/build/form/primitives/textarea/textarea.cjs.map +3 -3
  109. package/build/form/types.cjs +19 -0
  110. package/build/form/types.cjs.map +7 -0
  111. package/build/icon-button/icon-button.cjs +2 -2
  112. package/build/icon-button/icon-button.cjs.map +1 -1
  113. package/build/index.cjs +11 -2
  114. package/build/index.cjs.map +2 -2
  115. package/build/link/link.cjs +18 -8
  116. package/build/link/link.cjs.map +3 -3
  117. package/build/notice/action-button.cjs +3 -3
  118. package/build/notice/action-button.cjs.map +2 -2
  119. package/build/notice/action-link.cjs +3 -3
  120. package/build/notice/action-link.cjs.map +2 -2
  121. package/build/notice/actions.cjs +3 -3
  122. package/build/notice/actions.cjs.map +2 -2
  123. package/build/notice/close-icon.cjs +3 -3
  124. package/build/notice/close-icon.cjs.map +2 -2
  125. package/build/notice/description.cjs +3 -3
  126. package/build/notice/description.cjs.map +2 -2
  127. package/build/notice/index.cjs.map +1 -1
  128. package/build/notice/root.cjs +5 -5
  129. package/build/notice/root.cjs.map +2 -2
  130. package/build/notice/title.cjs +3 -3
  131. package/build/notice/title.cjs.map +2 -2
  132. package/build/popover/arrow.cjs +94 -0
  133. package/build/popover/arrow.cjs.map +7 -0
  134. package/build/popover/close.cjs +45 -0
  135. package/build/popover/close.cjs.map +7 -0
  136. package/build/popover/context.cjs +76 -0
  137. package/build/popover/context.cjs.map +7 -0
  138. package/build/popover/description.cjs +70 -0
  139. package/build/popover/description.cjs.map +7 -0
  140. package/build/popover/index.cjs +49 -0
  141. package/build/popover/index.cjs.map +7 -0
  142. package/build/popover/popup.cjs +138 -0
  143. package/build/popover/popup.cjs.map +7 -0
  144. package/build/popover/root.cjs +35 -0
  145. package/build/popover/root.cjs.map +7 -0
  146. package/build/popover/title.cjs +56 -0
  147. package/build/popover/title.cjs.map +7 -0
  148. package/build/popover/trigger.cjs +38 -0
  149. package/build/popover/trigger.cjs.map +7 -0
  150. package/build/popover/types.cjs +19 -0
  151. package/build/popover/types.cjs.map +7 -0
  152. package/build/stack/stack.cjs +2 -2
  153. package/build/stack/stack.cjs.map +1 -1
  154. package/build/tabs/context.cjs +121 -0
  155. package/build/tabs/context.cjs.map +7 -0
  156. package/build/tabs/list.cjs +3 -4
  157. package/build/tabs/list.cjs.map +2 -2
  158. package/build/tabs/panel.cjs +5 -3
  159. package/build/tabs/panel.cjs.map +2 -2
  160. package/build/tabs/root.cjs +2 -1
  161. package/build/tabs/root.cjs.map +2 -2
  162. package/build/tabs/tab.cjs +5 -3
  163. package/build/tabs/tab.cjs.map +2 -2
  164. package/build/text/text.cjs +20 -5
  165. package/build/text/text.cjs.map +3 -3
  166. package/build/tooltip/popup.cjs +7 -6
  167. package/build/tooltip/popup.cjs.map +2 -2
  168. package/build/tooltip/root.cjs.map +2 -2
  169. package/build/tooltip/types.cjs.map +1 -1
  170. package/build/utils/types.cjs.map +1 -1
  171. package/build/utils/use-deprioritized-initial-focus.cjs +64 -0
  172. package/build/utils/use-deprioritized-initial-focus.cjs.map +7 -0
  173. package/build/visually-hidden/visually-hidden.cjs +2 -2
  174. package/build/visually-hidden/visually-hidden.cjs.map +2 -2
  175. package/build-module/alert-dialog/context.mjs +14 -0
  176. package/build-module/alert-dialog/context.mjs.map +7 -0
  177. package/build-module/alert-dialog/index.mjs +10 -0
  178. package/build-module/alert-dialog/index.mjs.map +7 -0
  179. package/build-module/alert-dialog/popup.mjs +132 -0
  180. package/build-module/alert-dialog/popup.mjs.map +7 -0
  181. package/build-module/alert-dialog/root.mjs +133 -0
  182. package/build-module/alert-dialog/root.mjs.map +7 -0
  183. package/build-module/alert-dialog/trigger.mjs +13 -0
  184. package/build-module/alert-dialog/trigger.mjs.map +7 -0
  185. package/build-module/alert-dialog/types.mjs +1 -0
  186. package/build-module/alert-dialog/types.mjs.map +7 -0
  187. package/build-module/badge/badge.mjs +14 -14
  188. package/build-module/badge/badge.mjs.map +2 -2
  189. package/build-module/button/button.mjs +18 -8
  190. package/build-module/button/button.mjs.map +3 -3
  191. package/build-module/card/content.mjs +4 -4
  192. package/build-module/card/content.mjs.map +2 -2
  193. package/build-module/card/full-bleed.mjs +4 -4
  194. package/build-module/card/full-bleed.mjs.map +2 -2
  195. package/build-module/card/header.mjs +4 -4
  196. package/build-module/card/header.mjs.map +2 -2
  197. package/build-module/card/root.mjs +6 -6
  198. package/build-module/card/root.mjs.map +2 -2
  199. package/build-module/card/title.mjs +14 -21
  200. package/build-module/card/title.mjs.map +3 -3
  201. package/build-module/collapsible-card/content.mjs +24 -3
  202. package/build-module/collapsible-card/content.mjs.map +3 -3
  203. package/build-module/collapsible-card/context.mjs +10 -0
  204. package/build-module/collapsible-card/context.mjs.map +7 -0
  205. package/build-module/collapsible-card/header-description.mjs +27 -0
  206. package/build-module/collapsible-card/header-description.mjs.map +7 -0
  207. package/build-module/collapsible-card/header.mjs +40 -19
  208. package/build-module/collapsible-card/header.mjs.map +2 -2
  209. package/build-module/collapsible-card/index.mjs +2 -0
  210. package/build-module/collapsible-card/index.mjs.map +2 -2
  211. package/build-module/dialog/action.mjs +4 -2
  212. package/build-module/dialog/action.mjs.map +2 -2
  213. package/build-module/dialog/close-icon.mjs +2 -1
  214. package/build-module/dialog/close-icon.mjs.map +2 -2
  215. package/build-module/dialog/footer.mjs +3 -3
  216. package/build-module/dialog/footer.mjs.map +2 -2
  217. package/build-module/dialog/header.mjs +3 -3
  218. package/build-module/dialog/header.mjs.map +2 -2
  219. package/build-module/dialog/popup.mjs +24 -6
  220. package/build-module/dialog/popup.mjs.map +2 -2
  221. package/build-module/dialog/title.mjs +10 -9
  222. package/build-module/dialog/title.mjs.map +2 -2
  223. package/build-module/empty-state/actions.mjs +31 -0
  224. package/build-module/empty-state/actions.mjs.map +7 -0
  225. package/build-module/empty-state/description.mjs +34 -0
  226. package/build-module/empty-state/description.mjs.map +7 -0
  227. package/build-module/empty-state/icon.mjs +34 -0
  228. package/build-module/empty-state/icon.mjs.map +7 -0
  229. package/build-module/empty-state/index.mjs +16 -0
  230. package/build-module/empty-state/index.mjs.map +7 -0
  231. package/build-module/empty-state/root.mjs +31 -0
  232. package/build-module/empty-state/root.mjs.map +7 -0
  233. package/build-module/empty-state/title.mjs +36 -0
  234. package/build-module/empty-state/title.mjs.map +7 -0
  235. package/build-module/empty-state/types.mjs +1 -0
  236. package/build-module/empty-state/types.mjs.map +7 -0
  237. package/build-module/empty-state/visual.mjs +31 -0
  238. package/build-module/empty-state/visual.mjs.map +7 -0
  239. package/build-module/form/index.mjs +4 -0
  240. package/build-module/form/index.mjs.map +7 -0
  241. package/build-module/form/input-control/index.mjs +6 -0
  242. package/build-module/form/input-control/index.mjs.map +7 -0
  243. package/build-module/form/input-control/input-control.mjs +25 -0
  244. package/build-module/form/input-control/input-control.mjs.map +7 -0
  245. package/build-module/form/input-control/types.mjs +1 -0
  246. package/build-module/form/input-control/types.mjs.map +7 -0
  247. package/build-module/form/primitives/field/description.mjs +17 -4
  248. package/build-module/form/primitives/field/description.mjs.map +3 -3
  249. package/build-module/form/primitives/field/details.mjs +4 -4
  250. package/build-module/form/primitives/field/details.mjs.map +2 -2
  251. package/build-module/form/primitives/field/label.mjs +8 -8
  252. package/build-module/form/primitives/field/label.mjs.map +2 -2
  253. package/build-module/form/primitives/field/root.mjs +2 -2
  254. package/build-module/form/primitives/field/root.mjs.map +1 -1
  255. package/build-module/form/primitives/fieldset/description.mjs +20 -4
  256. package/build-module/form/primitives/fieldset/description.mjs.map +3 -3
  257. package/build-module/form/primitives/fieldset/details.mjs +3 -3
  258. package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
  259. package/build-module/form/primitives/fieldset/legend.mjs +8 -7
  260. package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
  261. package/build-module/form/primitives/fieldset/root.mjs +2 -2
  262. package/build-module/form/primitives/fieldset/root.mjs.map +1 -1
  263. package/build-module/form/primitives/input/input.mjs +23 -7
  264. package/build-module/form/primitives/input/input.mjs.map +3 -3
  265. package/build-module/form/primitives/input-layout/input-layout.mjs +15 -5
  266. package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
  267. package/build-module/form/primitives/input-layout/slot.mjs +6 -5
  268. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  269. package/build-module/form/primitives/select/item.mjs +5 -5
  270. package/build-module/form/primitives/select/item.mjs.map +2 -2
  271. package/build-module/form/primitives/select/popup.mjs +9 -9
  272. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  273. package/build-module/form/primitives/select/trigger.mjs +6 -6
  274. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  275. package/build-module/form/primitives/textarea/textarea.mjs +23 -4
  276. package/build-module/form/primitives/textarea/textarea.mjs.map +3 -3
  277. package/build-module/form/types.mjs +1 -0
  278. package/build-module/form/types.mjs.map +7 -0
  279. package/build-module/icon-button/icon-button.mjs +2 -2
  280. package/build-module/icon-button/icon-button.mjs.map +1 -1
  281. package/build-module/index.mjs +7 -1
  282. package/build-module/index.mjs.map +2 -2
  283. package/build-module/link/link.mjs +18 -8
  284. package/build-module/link/link.mjs.map +3 -3
  285. package/build-module/notice/action-button.mjs +3 -3
  286. package/build-module/notice/action-button.mjs.map +2 -2
  287. package/build-module/notice/action-link.mjs +3 -3
  288. package/build-module/notice/action-link.mjs.map +2 -2
  289. package/build-module/notice/actions.mjs +3 -3
  290. package/build-module/notice/actions.mjs.map +2 -2
  291. package/build-module/notice/close-icon.mjs +3 -3
  292. package/build-module/notice/close-icon.mjs.map +2 -2
  293. package/build-module/notice/description.mjs +3 -3
  294. package/build-module/notice/description.mjs.map +2 -2
  295. package/build-module/notice/index.mjs.map +1 -1
  296. package/build-module/notice/root.mjs +5 -5
  297. package/build-module/notice/root.mjs.map +2 -2
  298. package/build-module/notice/title.mjs +3 -3
  299. package/build-module/notice/title.mjs.map +2 -2
  300. package/build-module/popover/arrow.mjs +59 -0
  301. package/build-module/popover/arrow.mjs.map +7 -0
  302. package/build-module/popover/close.mjs +20 -0
  303. package/build-module/popover/close.mjs.map +7 -0
  304. package/build-module/popover/context.mjs +57 -0
  305. package/build-module/popover/context.mjs.map +7 -0
  306. package/build-module/popover/description.mjs +35 -0
  307. package/build-module/popover/description.mjs.map +7 -0
  308. package/build-module/popover/index.mjs +18 -0
  309. package/build-module/popover/index.mjs.map +7 -0
  310. package/build-module/popover/popup.mjs +105 -0
  311. package/build-module/popover/popup.mjs.map +7 -0
  312. package/build-module/popover/root.mjs +10 -0
  313. package/build-module/popover/root.mjs.map +7 -0
  314. package/build-module/popover/title.mjs +31 -0
  315. package/build-module/popover/title.mjs.map +7 -0
  316. package/build-module/popover/trigger.mjs +13 -0
  317. package/build-module/popover/trigger.mjs.map +7 -0
  318. package/build-module/popover/types.mjs +1 -0
  319. package/build-module/popover/types.mjs.map +7 -0
  320. package/build-module/stack/stack.mjs +2 -2
  321. package/build-module/stack/stack.mjs.map +1 -1
  322. package/build-module/tabs/context.mjs +101 -0
  323. package/build-module/tabs/context.mjs.map +7 -0
  324. package/build-module/tabs/list.mjs +3 -4
  325. package/build-module/tabs/list.mjs.map +2 -2
  326. package/build-module/tabs/panel.mjs +5 -3
  327. package/build-module/tabs/panel.mjs.map +2 -2
  328. package/build-module/tabs/root.mjs +2 -1
  329. package/build-module/tabs/root.mjs.map +2 -2
  330. package/build-module/tabs/tab.mjs +5 -3
  331. package/build-module/tabs/tab.mjs.map +2 -2
  332. package/build-module/text/text.mjs +20 -5
  333. package/build-module/text/text.mjs.map +3 -3
  334. package/build-module/tooltip/popup.mjs +7 -6
  335. package/build-module/tooltip/popup.mjs.map +2 -2
  336. package/build-module/tooltip/root.mjs.map +2 -2
  337. package/build-module/utils/use-deprioritized-initial-focus.mjs +39 -0
  338. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +7 -0
  339. package/build-module/visually-hidden/visually-hidden.mjs +2 -2
  340. package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
  341. package/build-types/alert-dialog/context.d.ts +11 -0
  342. package/build-types/alert-dialog/context.d.ts.map +1 -0
  343. package/build-types/alert-dialog/index.d.ts +4 -0
  344. package/build-types/alert-dialog/index.d.ts.map +1 -0
  345. package/build-types/alert-dialog/popup.d.ts +4 -0
  346. package/build-types/alert-dialog/popup.d.ts.map +1 -0
  347. package/build-types/alert-dialog/root.d.ts +18 -0
  348. package/build-types/alert-dialog/root.d.ts.map +1 -0
  349. package/build-types/alert-dialog/stories/index.story.d.ts +56 -0
  350. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -0
  351. package/build-types/alert-dialog/test/index.test.d.ts +2 -0
  352. package/build-types/alert-dialog/test/index.test.d.ts.map +1 -0
  353. package/build-types/alert-dialog/trigger.d.ts +7 -0
  354. package/build-types/alert-dialog/trigger.d.ts.map +1 -0
  355. package/build-types/alert-dialog/types.d.ts +105 -0
  356. package/build-types/alert-dialog/types.d.ts.map +1 -0
  357. package/build-types/badge/badge.d.ts.map +1 -1
  358. package/build-types/button/button.d.ts.map +1 -1
  359. package/build-types/card/stories/index.story.d.ts.map +1 -1
  360. package/build-types/card/title.d.ts.map +1 -1
  361. package/build-types/collapsible/panel.d.ts +2 -1
  362. package/build-types/collapsible/panel.d.ts.map +1 -1
  363. package/build-types/collapsible/root.d.ts +2 -1
  364. package/build-types/collapsible/root.d.ts.map +1 -1
  365. package/build-types/collapsible/trigger.d.ts +2 -1
  366. package/build-types/collapsible/trigger.d.ts.map +1 -1
  367. package/build-types/collapsible-card/content.d.ts.map +1 -1
  368. package/build-types/collapsible-card/context.d.ts +4 -0
  369. package/build-types/collapsible-card/context.d.ts.map +1 -0
  370. package/build-types/collapsible-card/header-description.d.ts +15 -0
  371. package/build-types/collapsible-card/header-description.d.ts.map +1 -0
  372. package/build-types/collapsible-card/header.d.ts.map +1 -1
  373. package/build-types/collapsible-card/index.d.ts +2 -1
  374. package/build-types/collapsible-card/index.d.ts.map +1 -1
  375. package/build-types/collapsible-card/stories/index.story.d.ts +10 -0
  376. package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
  377. package/build-types/collapsible-card/types.d.ts +21 -0
  378. package/build-types/collapsible-card/types.d.ts.map +1 -1
  379. package/build-types/dialog/action.d.ts.map +1 -1
  380. package/build-types/dialog/close-icon.d.ts.map +1 -1
  381. package/build-types/dialog/popup.d.ts.map +1 -1
  382. package/build-types/dialog/stories/index.story.d.ts +8 -6
  383. package/build-types/dialog/stories/index.story.d.ts.map +1 -1
  384. package/build-types/dialog/title.d.ts +12 -2
  385. package/build-types/dialog/title.d.ts.map +1 -1
  386. package/build-types/dialog/types.d.ts +13 -6
  387. package/build-types/dialog/types.d.ts.map +1 -1
  388. package/build-types/empty-state/actions.d.ts +7 -0
  389. package/build-types/empty-state/actions.d.ts.map +1 -0
  390. package/build-types/empty-state/description.d.ts +7 -0
  391. package/build-types/empty-state/description.d.ts.map +1 -0
  392. package/build-types/empty-state/icon.d.ts +7 -0
  393. package/build-types/empty-state/icon.d.ts.map +1 -0
  394. package/build-types/empty-state/index.d.ts +8 -0
  395. package/build-types/empty-state/index.d.ts.map +1 -0
  396. package/build-types/empty-state/root.d.ts +6 -0
  397. package/build-types/empty-state/root.d.ts.map +1 -0
  398. package/build-types/empty-state/stories/index.story.d.ts +8 -0
  399. package/build-types/empty-state/stories/index.story.d.ts.map +1 -0
  400. package/build-types/empty-state/test/actions.test.d.ts +2 -0
  401. package/build-types/empty-state/test/actions.test.d.ts.map +1 -0
  402. package/build-types/empty-state/test/description.test.d.ts +2 -0
  403. package/build-types/empty-state/test/description.test.d.ts.map +1 -0
  404. package/build-types/empty-state/test/icon.test.d.ts +2 -0
  405. package/build-types/empty-state/test/icon.test.d.ts.map +1 -0
  406. package/build-types/empty-state/test/root.test.d.ts +2 -0
  407. package/build-types/empty-state/test/root.test.d.ts.map +1 -0
  408. package/build-types/empty-state/test/title.test.d.ts +2 -0
  409. package/build-types/empty-state/test/title.test.d.ts.map +1 -0
  410. package/build-types/empty-state/test/visual.test.d.ts +2 -0
  411. package/build-types/empty-state/test/visual.test.d.ts.map +1 -0
  412. package/build-types/empty-state/title.d.ts +6 -0
  413. package/build-types/empty-state/title.d.ts.map +1 -0
  414. package/build-types/empty-state/types.d.ts +40 -0
  415. package/build-types/empty-state/types.d.ts.map +1 -0
  416. package/build-types/empty-state/visual.d.ts +7 -0
  417. package/build-types/empty-state/visual.d.ts.map +1 -0
  418. package/build-types/form/index.d.ts +3 -0
  419. package/build-types/form/index.d.ts.map +1 -0
  420. package/build-types/form/input-control/index.d.ts +2 -0
  421. package/build-types/form/input-control/index.d.ts.map +1 -0
  422. package/build-types/form/input-control/input-control.d.ts +6 -0
  423. package/build-types/form/input-control/input-control.d.ts.map +1 -0
  424. package/build-types/form/input-control/stories/index.story.d.ts +16 -0
  425. package/build-types/form/input-control/stories/index.story.d.ts.map +1 -0
  426. package/build-types/form/input-control/test/index.test.d.ts +2 -0
  427. package/build-types/form/input-control/test/index.test.d.ts.map +1 -0
  428. package/build-types/form/input-control/types.d.ts +4 -0
  429. package/build-types/form/input-control/types.d.ts.map +1 -0
  430. package/build-types/form/primitives/field/description.d.ts +2 -1
  431. package/build-types/form/primitives/field/description.d.ts.map +1 -1
  432. package/build-types/form/primitives/field/details.d.ts +2 -1
  433. package/build-types/form/primitives/field/details.d.ts.map +1 -1
  434. package/build-types/form/primitives/field/label.d.ts +2 -1
  435. package/build-types/form/primitives/field/label.d.ts.map +1 -1
  436. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  437. package/build-types/form/primitives/fieldset/description.d.ts +2 -1
  438. package/build-types/form/primitives/fieldset/description.d.ts.map +1 -1
  439. package/build-types/form/primitives/fieldset/details.d.ts +2 -1
  440. package/build-types/form/primitives/fieldset/details.d.ts.map +1 -1
  441. package/build-types/form/primitives/fieldset/legend.d.ts +2 -1
  442. package/build-types/form/primitives/fieldset/legend.d.ts.map +1 -1
  443. package/build-types/form/primitives/fieldset/root.d.ts +2 -1
  444. package/build-types/form/primitives/fieldset/root.d.ts.map +1 -1
  445. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
  446. package/build-types/form/primitives/input/input.d.ts.map +1 -1
  447. package/build-types/form/primitives/input/stories/index.story.d.ts +2 -0
  448. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
  449. package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -1
  450. package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
  451. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +5 -0
  452. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
  453. package/build-types/form/primitives/select/item.d.ts +6 -2
  454. package/build-types/form/primitives/select/item.d.ts.map +1 -1
  455. package/build-types/form/primitives/select/popup.d.ts +11 -1
  456. package/build-types/form/primitives/select/popup.d.ts.map +1 -1
  457. package/build-types/form/primitives/select/trigger.d.ts +12 -2
  458. package/build-types/form/primitives/select/trigger.d.ts.map +1 -1
  459. package/build-types/form/primitives/select/types.d.ts +13 -3
  460. package/build-types/form/primitives/select/types.d.ts.map +1 -1
  461. package/build-types/form/primitives/textarea/textarea.d.ts.map +1 -1
  462. package/build-types/form/stories/shared.d.ts +3 -0
  463. package/build-types/form/stories/shared.d.ts.map +1 -0
  464. package/build-types/form/types.d.ts +30 -0
  465. package/build-types/form/types.d.ts.map +1 -0
  466. package/build-types/index.d.ts +4 -1
  467. package/build-types/index.d.ts.map +1 -1
  468. package/build-types/link/link.d.ts.map +1 -1
  469. package/build-types/notice/index.d.ts +0 -1
  470. package/build-types/notice/index.d.ts.map +1 -1
  471. package/build-types/popover/arrow.d.ts +10 -0
  472. package/build-types/popover/arrow.d.ts.map +1 -0
  473. package/build-types/popover/close.d.ts +11 -0
  474. package/build-types/popover/close.d.ts.map +1 -0
  475. package/build-types/popover/context.d.ts +22 -0
  476. package/build-types/popover/context.d.ts.map +1 -0
  477. package/build-types/popover/description.d.ts +10 -0
  478. package/build-types/popover/description.d.ts.map +1 -0
  479. package/build-types/popover/index.d.ts +9 -0
  480. package/build-types/popover/index.d.ts.map +1 -0
  481. package/build-types/popover/popup.d.ts +11 -0
  482. package/build-types/popover/popup.d.ts.map +1 -0
  483. package/build-types/popover/root.d.ts +37 -0
  484. package/build-types/popover/root.d.ts.map +1 -0
  485. package/build-types/popover/stories/index.story.d.ts +211 -0
  486. package/build-types/popover/stories/index.story.d.ts.map +1 -0
  487. package/build-types/popover/stories/utils.d.ts +25 -0
  488. package/build-types/popover/stories/utils.d.ts.map +1 -0
  489. package/build-types/popover/test/index.test.d.ts +2 -0
  490. package/build-types/popover/test/index.test.d.ts.map +1 -0
  491. package/build-types/popover/title.d.ts +20 -0
  492. package/build-types/popover/title.d.ts.map +1 -0
  493. package/build-types/popover/trigger.d.ts +10 -0
  494. package/build-types/popover/trigger.d.ts.map +1 -0
  495. package/build-types/popover/types.d.ts +83 -0
  496. package/build-types/popover/types.d.ts.map +1 -0
  497. package/build-types/tabs/context.d.ts +26 -0
  498. package/build-types/tabs/context.d.ts.map +1 -0
  499. package/build-types/tabs/list.d.ts +2 -1
  500. package/build-types/tabs/list.d.ts.map +1 -1
  501. package/build-types/tabs/panel.d.ts +2 -1
  502. package/build-types/tabs/panel.d.ts.map +1 -1
  503. package/build-types/tabs/root.d.ts +2 -1
  504. package/build-types/tabs/root.d.ts.map +1 -1
  505. package/build-types/tabs/tab.d.ts +2 -1
  506. package/build-types/tabs/tab.d.ts.map +1 -1
  507. package/build-types/text/stories/index.story.d.ts +4 -0
  508. package/build-types/text/stories/index.story.d.ts.map +1 -1
  509. package/build-types/text/text.d.ts.map +1 -1
  510. package/build-types/tooltip/popup.d.ts.map +1 -1
  511. package/build-types/tooltip/root.d.ts +13 -0
  512. package/build-types/tooltip/root.d.ts.map +1 -1
  513. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  514. package/build-types/tooltip/stories/usage-guidelines.story.d.ts +21 -0
  515. package/build-types/tooltip/stories/usage-guidelines.story.d.ts.map +1 -0
  516. package/build-types/tooltip/types.d.ts +4 -0
  517. package/build-types/tooltip/types.d.ts.map +1 -1
  518. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts +2 -0
  519. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts.map +1 -0
  520. package/build-types/utils/types.d.ts +6 -2
  521. package/build-types/utils/types.d.ts.map +1 -1
  522. package/build-types/utils/use-deprioritized-initial-focus.d.ts +36 -0
  523. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -0
  524. package/build-types/visually-hidden/stories/index.story.d.ts +7 -0
  525. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  526. package/build-types/visually-hidden/visually-hidden.d.ts +34 -0
  527. package/build-types/visually-hidden/visually-hidden.d.ts.map +1 -1
  528. package/package.json +17 -16
  529. package/src/alert-dialog/context.tsx +22 -0
  530. package/src/alert-dialog/index.ts +3 -0
  531. package/src/alert-dialog/popup.tsx +116 -0
  532. package/src/alert-dialog/root.tsx +226 -0
  533. package/src/alert-dialog/stories/index.story.tsx +305 -0
  534. package/src/alert-dialog/style.module.css +21 -0
  535. package/src/alert-dialog/test/index.test.tsx +1509 -0
  536. package/src/alert-dialog/trigger.tsx +15 -0
  537. package/src/alert-dialog/types.ts +119 -0
  538. package/src/badge/badge.tsx +11 -14
  539. package/src/badge/style.module.css +0 -4
  540. package/src/button/button.tsx +2 -0
  541. package/src/button/style.module.css +9 -3
  542. package/src/card/stories/index.story.tsx +4 -5
  543. package/src/card/style.module.css +4 -10
  544. package/src/card/test/index.test.tsx +17 -1
  545. package/src/card/title.tsx +14 -12
  546. package/src/collapsible-card/content.tsx +16 -3
  547. package/src/collapsible-card/context.ts +7 -0
  548. package/src/collapsible-card/header-description.tsx +43 -0
  549. package/src/collapsible-card/header.tsx +47 -24
  550. package/src/collapsible-card/index.ts +2 -1
  551. package/src/collapsible-card/stories/index.story.tsx +102 -4
  552. package/src/collapsible-card/style.module.css +34 -2
  553. package/src/collapsible-card/test/index.test.tsx +96 -9
  554. package/src/collapsible-card/types.ts +22 -0
  555. package/src/dialog/action.tsx +8 -2
  556. package/src/dialog/close-icon.tsx +1 -0
  557. package/src/dialog/popup.tsx +23 -3
  558. package/src/dialog/stories/index.story.tsx +33 -28
  559. package/src/dialog/style.module.css +18 -14
  560. package/src/dialog/test/index.test.tsx +180 -4
  561. package/src/dialog/title.tsx +21 -9
  562. package/src/dialog/types.ts +20 -6
  563. package/src/empty-state/actions.tsx +24 -0
  564. package/src/empty-state/description.tsx +31 -0
  565. package/src/empty-state/icon.tsx +24 -0
  566. package/src/empty-state/index.ts +8 -0
  567. package/src/empty-state/root.tsx +23 -0
  568. package/src/empty-state/stories/index.story.tsx +64 -0
  569. package/src/empty-state/style.module.css +53 -0
  570. package/src/empty-state/test/actions.test.tsx +18 -0
  571. package/src/empty-state/test/description.test.tsx +26 -0
  572. package/src/empty-state/test/icon.test.tsx +13 -0
  573. package/src/empty-state/test/root.test.tsx +13 -0
  574. package/src/empty-state/test/title.test.tsx +26 -0
  575. package/src/empty-state/test/visual.test.tsx +17 -0
  576. package/src/empty-state/title.tsx +29 -0
  577. package/src/empty-state/types.ts +45 -0
  578. package/src/empty-state/visual.tsx +24 -0
  579. package/src/form/index.ts +3 -0
  580. package/src/form/input-control/index.ts +1 -0
  581. package/src/form/input-control/input-control.tsx +33 -0
  582. package/src/form/input-control/stories/index.story.tsx +163 -0
  583. package/src/form/input-control/test/index.test.tsx +53 -0
  584. package/src/form/input-control/types.ts +5 -0
  585. package/src/form/primitives/field/description.tsx +6 -1
  586. package/src/form/primitives/field/details.tsx +4 -2
  587. package/src/form/primitives/field/label.tsx +9 -5
  588. package/src/form/primitives/field/stories/index.story.tsx +2 -7
  589. package/src/form/primitives/field/test/index.test.tsx +11 -0
  590. package/src/form/primitives/fieldset/description.tsx +9 -1
  591. package/src/form/primitives/fieldset/legend.tsx +9 -4
  592. package/src/form/primitives/fieldset/stories/index.story.tsx +2 -7
  593. package/src/form/primitives/fieldset/test/index.test.tsx +22 -0
  594. package/src/form/primitives/input/input.tsx +6 -1
  595. package/src/form/primitives/input/stories/index.story.tsx +7 -0
  596. package/src/form/primitives/input/style.module.css +4 -0
  597. package/src/form/primitives/input-layout/input-layout.tsx +2 -0
  598. package/src/form/primitives/input-layout/slot.tsx +6 -2
  599. package/src/form/primitives/input-layout/stories/index.story.tsx +22 -1
  600. package/src/form/primitives/input-layout/style.module.css +3 -3
  601. package/src/form/primitives/select/popup.tsx +5 -2
  602. package/src/form/primitives/select/test/index.test.tsx +60 -1
  603. package/src/form/primitives/select/types.ts +14 -4
  604. package/src/form/primitives/stories/overview.mdx +15 -0
  605. package/src/form/primitives/textarea/textarea.tsx +11 -2
  606. package/src/form/stories/shared.tsx +21 -0
  607. package/src/form/types.ts +34 -0
  608. package/src/index.ts +4 -1
  609. package/src/link/link.tsx +2 -0
  610. package/src/link/style.module.css +11 -1
  611. package/src/notice/index.ts +0 -2
  612. package/src/notice/style.module.css +6 -6
  613. package/src/popover/arrow.tsx +49 -0
  614. package/src/popover/close.tsx +24 -0
  615. package/src/popover/context.tsx +100 -0
  616. package/src/popover/description.tsx +29 -0
  617. package/src/popover/index.ts +9 -0
  618. package/src/popover/popup.tsx +106 -0
  619. package/src/popover/root.tsx +41 -0
  620. package/src/popover/stories/index.story.tsx +1315 -0
  621. package/src/popover/stories/utils.tsx +91 -0
  622. package/src/popover/style.module.css +64 -0
  623. package/src/popover/test/index.test.tsx +727 -0
  624. package/src/popover/title.tsx +47 -0
  625. package/src/popover/trigger.tsx +17 -0
  626. package/src/popover/types.ts +113 -0
  627. package/src/tabs/context.tsx +170 -0
  628. package/src/tabs/list.tsx +0 -1
  629. package/src/tabs/panel.tsx +3 -0
  630. package/src/tabs/root.tsx +6 -1
  631. package/src/tabs/style.module.css +3 -3
  632. package/src/tabs/tab.tsx +3 -0
  633. package/src/tabs/test/index.test.tsx +162 -0
  634. package/src/text/stories/index.story.tsx +4 -2
  635. package/src/text/style.module.css +62 -36
  636. package/src/text/test/index.test.tsx +1 -4
  637. package/src/text/text.tsx +8 -1
  638. package/src/tooltip/popup.tsx +2 -1
  639. package/src/tooltip/root.tsx +13 -0
  640. package/src/tooltip/stories/index.story.tsx +20 -15
  641. package/src/tooltip/stories/usage-guidelines.mdx +91 -0
  642. package/src/tooltip/stories/usage-guidelines.story.tsx +119 -0
  643. package/src/tooltip/style.module.css +2 -2
  644. package/src/tooltip/test/index.test.tsx +61 -0
  645. package/src/tooltip/types.ts +5 -0
  646. package/src/utils/css/field.module.css +12 -9
  647. package/src/utils/css/focus.module.css +7 -5
  648. package/src/utils/css/global-css-defense.module.css +117 -0
  649. package/src/utils/css/item-popup.module.css +3 -2
  650. package/src/utils/css/select-trigger.module.css +1 -0
  651. package/src/utils/test/use-deprioritized-initial-focus.test.tsx +230 -0
  652. package/src/utils/types.ts +7 -2
  653. package/src/utils/use-deprioritized-initial-focus.ts +84 -0
  654. package/src/visually-hidden/stories/index.story.tsx +25 -0
  655. package/src/visually-hidden/visually-hidden.tsx +34 -0
package/CHANGELOG.md CHANGED
@@ -2,7 +2,73 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 0.9.0-next.0 (2026-03-16)
5
+ ## 0.11.0 (2026-04-15)
6
+
7
+ ### Breaking Changes
8
+
9
+ - `Text`: Apply `margin: 0`, removing user-agent margins when the component renders as block-level elements (for example `p` or `h1`–`h6` via `render` prop) ([#76970](https://github.com/WordPress/gutenberg/pull/76970)).
10
+ - `AlertDialog`: Revise component API ([#76937](https://github.com/WordPress/gutenberg/pull/76937)):
11
+ - `AlertDialog.Root`: moved `intent` prop to `AlertDialog.Popup`;
12
+ - `AlertDialog.Popup`: moved `onConfirm` prop to `AlertDialog.Root` (now optional; supports async handlers, `{ close: false }` to keep the dialog open, and `{ error: '...' }` to display a built-in error message);
13
+ - `AlertDialog.Popup`: removed `loading` prop (async flows are now handled internally via `Promise`-returning `onConfirm`);
14
+ - `AlertDialog.Popup`: made `children` optional in favor of a new `description` prop, which describes the alert dialog semantically.
15
+
16
+ ### New Features
17
+
18
+ - Add `Popover` primitive ([#76438](https://github.com/WordPress/gutenberg/pull/76438)).
19
+
20
+ ### Bug Fixes
21
+
22
+ - `Card.Title`, `EmptyState.Title`, `EmptyState.Description`: Fix ref and props being lost when a custom `render` element is provided ([#77160](https://github.com/WordPress/gutenberg/pull/77160)).
23
+ - `Tabs.List`: Fix `render` prop being silently discarded ([#77160](https://github.com/WordPress/gutenberg/pull/77160)).
24
+ - `Card`: Set default foreground color on `Card.Root` so content and `currentColor` icons (for example the `CollapsibleCard` chevron) are themeable by default ([#77013](https://github.com/WordPress/gutenberg/pull/77013)).
25
+
26
+ ### Enhancements
27
+
28
+ - `Dialog`: Update `Header` layout to support multiple trailing elements alongside the title ([#77161](https://github.com/WordPress/gutenberg/pull/77161), [#77334](https://github.com/WordPress/gutenberg/pull/77334)).
29
+ - `Dialog`: Use `Text` internally for `Dialog.Title`, adopting the `heading-xl` variant for consistent typography ([#77161](https://github.com/WordPress/gutenberg/pull/77161)).
30
+ - `Dialog`, `AlertDialog`, `Tooltip`, `Select`: Add `container` prop to `Popup` for custom portal targets ([#77163](https://github.com/WordPress/gutenberg/pull/77163)).
31
+ - Add defensive styles against global WordPress stylesheets like common.css and forms.css ([#76783](https://github.com/WordPress/gutenberg/pull/76783)).
32
+ - `VisuallyHidden`: Improve Storybook stories and documentation for the `render` prop composition pattern.
33
+
34
+ ### Internal
35
+
36
+ - `Card`: Remove redundant `margin: 0` from `Card.Title` now that `Text` applies it by default ([#77187](https://github.com/WordPress/gutenberg/pull/77187)).
37
+ - Normalize `render` prop handling across components and document conventions in `CONTRIBUTING.md` ([#77160](https://github.com/WordPress/gutenberg/pull/77160)).
38
+ - `AlertDialog`: Rewrite internals to use Base UI's `AlertDialog` primitives directly instead of `Dialog` wrappers. Introduces an internal state machine for async confirm flows ([#76937](https://github.com/WordPress/gutenberg/pull/76937)).
39
+ - `Field.Label`, `Fieldset.Legend`, `Field.Details`: Refactor `VisuallyHidden` composition to preserve semantic HTML elements when visually hiding content.
40
+ - `Badge`: Use `Text` component for typography ([#77295](https://github.com/WordPress/gutenberg/pull/77295)).
41
+ - Update `@base-ui/react` from `1.3.0` to `1.4.0` ([#77308](https://github.com/WordPress/gutenberg/pull/77308)).
42
+
43
+ ## 0.10.0 (2026-04-01)
44
+
45
+ ### New Features
46
+
47
+ - Add `AlertDialog` primitive ([#76847](https://github.com/WordPress/gutenberg/pull/76847)).
48
+ - Add `InputControl` component ([#76653](https://github.com/WordPress/gutenberg/pull/76653)).
49
+ - `Dialog`: Expose `initialFocus` and `finalFocus` props on `Dialog.Popup` for custom focus management ([#76860](https://github.com/WordPress/gutenberg/pull/76860)).
50
+ - `CollapsibleCard`: Add `HeaderDescription` subcomponent for supplementary header content with `aria-describedby` relationship ([#76867](https://github.com/WordPress/gutenberg/pull/76867)).
51
+
52
+ ### Bug Fixes
53
+
54
+ - `Card`: Add `overflow: clip` to `Card.Root` to prevent child content from overflowing rounded corners ([#76678](https://github.com/WordPress/gutenberg/pull/76678)).
55
+ - `CollapsibleCard`: do not animate the focus ring when expanding/collapsing the card ([#76459](https://github.com/WordPress/gutenberg/pull/76459)).
56
+
57
+ ### Enhancements
58
+
59
+ - `Dialog.Root`: expose `disablePointerDismissal` prop ([#76847](https://github.com/WordPress/gutenberg/pull/76847)).
60
+ - `Dialog.Popup`: Default `initialFocus` now deprioritizes the close icon, focusing the first tabbable content element instead (following WAI-ARIA APG guidance) ([#76910](https://github.com/WordPress/gutenberg/pull/76910)).
61
+
62
+ ### Internal
63
+
64
+ - Extract `useDeprioritizedInitialFocus` shared hook for reuse across overlay components ([#76910](https://github.com/WordPress/gutenberg/pull/76910)).
65
+ - `Tabs`: Add development-mode validation for Tab/Panel count matching ([#75170](https://github.com/WordPress/gutenberg/pull/75170)).
66
+
67
+ ### TypeScript
68
+
69
+ - Remove `NoticeIntent` type from package exports ([#76791](https://github.com/WordPress/gutenberg/pull/76791)).
70
+
71
+ ## 0.9.0 (2026-03-18)
6
72
 
7
73
  ### New Features
8
74
 
@@ -13,15 +79,24 @@
13
79
 
14
80
  ### Bug Fixes
15
81
 
82
+ - `InputLayout.Slot`: Forward the incoming `className` prop instead of letting it be silently overwritten by the rest spread ([#76459](https://github.com/WordPress/gutenberg/pull/76459)).
16
83
  - `VisuallyHidden`: Add `word-break: normal` to prevent text wrapping issues in screen reader content ([#75539](https://github.com/WordPress/gutenberg/pull/75539)).
17
84
 
18
85
  ### Enhancements
19
86
 
20
87
  - `Badge`: Add border, update text color, and apply `neutral-strong` background to `none` intent for better contrast against neutral surfaces ([#76356](https://github.com/WordPress/gutenberg/pull/76356)).
88
+ - `Dialog`: Use `--wpds-dimension-surface-width-*` design tokens for width constraints ([#76494](https://github.com/WordPress/gutenberg/pull/76494)).
21
89
  - `Notice`: Improve narrow layout by letting description and actions span the icon column when a title is present ([#76202](https://github.com/WordPress/gutenberg/pull/76202)).
22
90
  - `Notice`: Use `Text` component for `Title` and `Description` typography ([#75870](https://github.com/WordPress/gutenberg/pull/75870)).
91
+ - `Card`: Use `Text` component for `Title` typography ([#76642](https://github.com/WordPress/gutenberg/pull/76642)).
23
92
  - `Card`, `CollapsibleCard`: update padding to match legacy `Card` component ([#76368](https://github.com/WordPress/gutenberg/pull/76368)).
24
93
  - `CollapsibleCard`: move trigger to the header ([#76265](https://github.com/WordPress/gutenberg/pull/76265)).
94
+ - `CollapsibleCard`: add animations ([#76378](https://github.com/WordPress/gutenberg/pull/76378)).
95
+ - `CollapsibleCard`: allows the browser page search to find and expand the panel contents via the `hiddenUntilFound` prop. ([#76498](https://github.com/WordPress/gutenberg/pull/76498)).
96
+
97
+ ### Internal
98
+
99
+ - Update `@base-ui/react` from 1.2.0 to [1.3.0](https://github.com/mui/base-ui/blob/master/CHANGELOG.md#v130) ([#76603](https://github.com/WordPress/gutenberg/pull/76603)).
25
100
 
26
101
  ## 0.8.0 (2026-03-04)
27
102
 
package/CONTRIBUTING.md CHANGED
@@ -26,6 +26,161 @@ src/
26
26
  - The folder name should match the primary component name
27
27
  - The `index.ts` file should contain only the public API exports for the component(s)
28
28
 
29
+ ## Public APIs
30
+
31
+ The package has a single entrypoint which exports all of the components of the package, and nothing else.
32
+
33
+ Specifically:
34
+
35
+ - Components are implemented as [compound components](#compound-components). Exported components will define their own subcomponents as properties of the top-level export.
36
+ - Example: `import { Button } from '@wordpress/ui'; // Button, Button.Icon, etc.`
37
+ - TypeScript types are not exported. If you need access to a component's prop types, use `React.ComponentProps`.
38
+ - Example: `type ButtonProps = React.ComponentProps< typeof Button >;`
39
+ - Styles are defined in the built JavaScript files and are not loaded separately.
40
+
41
+ The package follows [semantic versioning](https://semver.org/), and the following are considered to be "the public API" for consideration of backwards-incompatible changes:
42
+
43
+ - Component definitions (e.g. removing a component)
44
+ - Component props (e.g. renaming, removing, or changing a props supported types such that existing usage would break in an update)
45
+ - CSS properties prefixed with `--wp-ui-` (e.g. changing a CSS property such that it would negatively impact a user's experience)
46
+
47
+ ## Compound Components
48
+
49
+ This package follows the [compound component approach outlined in the `@wordpress/components` contributing guidelines](https://github.com/WordPress/gutenberg/blob/trunk/packages/components/CONTRIBUTING.md#compound-components).
50
+
51
+ Some components will use a bare name (e.g. `Button`), while others will have a "root" component with modular children (e.g. `Tooltip.Root`). Use the base component name when it works standalone and any subcomponents are optional enhancements. Only introduce `.Root` when the component is modular and consumers are expected to compose multiple parts.
52
+
53
+ Why?
54
+
55
+ - `.Root` primarily coordinates, and isn't useful on its own
56
+ - For example, a `Button` is useful on its own (renders an interactive element), unlike `Tabs.Root`
57
+ - `.Root` has required subparts, signalling an expectation that it must be composed
58
+ - A non-root component can still have _optional_ sub-parts, like a `Button.Icon`
59
+
60
+ ## `render` Prop and Ref Forwarding
61
+
62
+ All `@wordpress/ui` components support a `render` prop (via the `ComponentProps` utility type) that lets consumers swap the underlying HTML element. This section codifies the two canonical implementation patterns, the rules for handling `render`, and common anti-patterns to avoid.
63
+
64
+ ### Canonical Patterns
65
+
66
+ The correct approach depends on whether the component wraps a Base UI primitive or renders its own element.
67
+
68
+ #### Pattern A: Custom components — `useRender` + `mergeProps`
69
+
70
+ For components that do **not** wrap a Base UI primitive, use `useRender` and `mergeProps` from `@base-ui/react`. Destructure `render` from props (required by the `useRender` API), and pass it together with `ref` and merged props:
71
+
72
+ ```tsx
73
+ import { useRender, mergeProps } from '@base-ui/react';
74
+ import { forwardRef } from '@wordpress/element';
75
+
76
+ export const Root = forwardRef( function MyComponent( { render, className, ...restProps }, ref ) {
77
+ const element = useRender( {
78
+ render,
79
+ defaultTagName: 'div',
80
+ ref,
81
+ props: mergeProps( { className: styles.root }, restProps ),
82
+ } );
83
+
84
+ return element;
85
+ } );
86
+ ```
87
+
88
+ `useRender` handles element creation, ref composition, and prop merging.
89
+
90
+ #### Pattern B: Wrapper components — pass `ref` explicitly, spread `...props`
91
+
92
+ For components that wrap a Base UI primitive or another `@wordpress/ui` component, pass the forwarded `ref` explicitly and spread `...props` (which carries `render` through implicitly):
93
+
94
+ ```tsx
95
+ import { Collapsible as _Collapsible } from '@base-ui/react/collapsible';
96
+ import { forwardRef } from '@wordpress/element';
97
+
98
+ export const Trigger = forwardRef( function MyTrigger( props, ref ) {
99
+ return <_Collapsible.Trigger ref={ ref } { ...props } />;
100
+ } );
101
+ ```
102
+
103
+ The inner component (Base UI or `@wordpress/ui`) handles `render` and ref composition internally.
104
+
105
+ ### Explicit vs Implicit `render` Handling
106
+
107
+ **Prefer implicit handling (via `...props` rest spread) unless the component needs to interact with `render`.**
108
+
109
+ "Interact" means one of:
110
+
111
+ 1. **Assign a default** — the component overrides the default element (e.g., `render = DEFAULT_TAG`).
112
+ 2. **Transform** — the component wraps or modifies the value before passing it.
113
+ 3. **Discard** — the component intentionally prevents element customization. In this case, destructure `render` to remove it from rest props, **and** `Omit` it from the type so consumers get a TypeScript error instead of silent no-op behavior.
114
+ 4. **Pass to `useRender`** — Pattern A components where the hook API requires it as a named argument.
115
+
116
+ In all other cases, let `render` flow through `...props`. Destructuring `render` only to write `render={ render }` is ceremony with no behavioral effect.
117
+
118
+ ### Overriding the Default Element
119
+
120
+ When a component needs to render a different element than its inner component's default (e.g., a `<div>` instead of `<span>`), hoist the default to a **module-level constant** and assign it as a destructuring default.
121
+
122
+ The default can be a **JSX element** or a **render function**, depending on what the component needs:
123
+
124
+ ```tsx
125
+ // JSX element — suitable when you only need to swap the tag.
126
+ const DEFAULT_TAG = <div />;
127
+
128
+ export const Title = forwardRef( function MyTitle(
129
+ { render = DEFAULT_TAG, className, children, ...props },
130
+ ref
131
+ ) {
132
+ return (
133
+ <Text ref={ ref } render={ render } className={ className } { ...props }>
134
+ { children }
135
+ </Text>
136
+ );
137
+ } );
138
+ ```
139
+
140
+ ```tsx
141
+ // Render function — useful when the default needs to compose
142
+ // other components or add additional props.
143
+ const DEFAULT_RENDER = ( props: React.ComponentProps< typeof Stack > ) => (
144
+ <Stack { ...props } direction="column" gap="sm" />
145
+ );
146
+
147
+ export const Root = forwardRef( function MyRoot(
148
+ { className, render = DEFAULT_RENDER, ...restProps },
149
+ ref
150
+ ) {
151
+ return (
152
+ <_Field.Root ref={ ref } className={ className } render={ render } { ...restProps } />
153
+ );
154
+ } );
155
+ ```
156
+
157
+ When using a JSX element, React elements are immutable descriptors — `useRender` calls `cloneElement` on them (creating a new element), never mutating the original. In both cases, a hoisted constant avoids allocating a fresh object every render and gives React/Base UI a stable reference for equality checks.
158
+
159
+ ### Anti-patterns
160
+
161
+ #### Bundling `ref` and `props` into a render fallback
162
+
163
+ ```tsx
164
+ // BAD: ref and props are lost when consumer provides render
165
+ render={ render ?? <div ref={ ref } { ...props } /> }
166
+ ```
167
+
168
+ When `render` is provided by the consumer, `ref` and `...props` remain on the unused fallback element and never reach the actual rendered element. Always pass `ref` and `...props` separately to the inner component.
169
+
170
+ #### Unnecessary explicit destructure
171
+
172
+ ```tsx
173
+ // BAD: destructure-and-pass-through with no interaction
174
+ function MyComponent( { render, ...props }, ref ) {
175
+ return <Inner ref={ ref } render={ render } { ...props } />;
176
+ }
177
+
178
+ // GOOD: let render flow through ...props
179
+ function MyComponent( props, ref ) {
180
+ return <Inner ref={ ref } { ...props } />;
181
+ }
182
+ ```
183
+
29
184
  ## CSS Architecture
30
185
 
31
186
  ### CSS Layers
@@ -101,3 +256,28 @@ If a higher layer sets `.special-button { --button-bg: red; }`, that override wi
101
256
  ### Disabled State Styling
102
257
 
103
258
  For components built on Base UI, use the `data-disabled` attribute when styling disabled states rather than targeting `disabled` or `aria-disabled` directly. Base UI applies `data-disabled` consistently regardless of whether the underlying implementation uses the native `disabled` attribute or `aria-disabled` (which depends on the `focusableWhenDisabled` prop). This keeps styles decoupled from the specific HTML attribute and avoids verbose selectors that would need to target both.
259
+
260
+ ### Global CSS defense (wp-admin)
261
+
262
+ WordPress loads broad, **unlayered** global styles in the admin (`common.css`, `forms.css`) that target bare elements (`input`, `button`, `a`, `p`, headings, and so on). In the cascade, **unlayered rules always win over layered rules**, no matter how specific the layered selector is. That means normal `@wordpress/ui` styles, which live in `@layer wp-ui-*`, can be overridden by admin CSS and components may look wrong in wp-admin (borders, focus rings, typography, colors, and more).
263
+
264
+ **What it is:** [`global-css-defense.module.css`](src/utils/css/global-css-defense.module.css) is a shared, **unlayered** stylesheet that defines small, class-scoped rules (for example `.input`, `.textarea`, `.button`, `.a`, `p.p`, `:is(h1,…,h6).heading`, `.div`). Those classes are applied on the actual DOM nodes that need protection. Because the declarations are unlayered and use classes, they compete with admin styles on similar footing and can win by specificity.
265
+
266
+ **How it works (custom property bridge):** Each defended property is expressed with an internal custom property and a fallback, for example:
267
+
268
+ ```css
269
+ .input {
270
+ font-size: var( --_gcd-input-font-size, inherit );
271
+ }
272
+ ```
273
+
274
+ - The **fallback** encodes the default that `@wordpress/ui` wants when nothing else is set, so many components need no extra declarations.
275
+ - A component’s **layered** module can set `--_gcd-*` on a wrapper or the element itself. Custom property resolution is not blocked by cascade layers the same way longhand properties are, so the layered stylesheet can still supply the real token values while the unlayered rule applies them in a context where admin CSS would otherwise win.
276
+
277
+ Use the `--_gcd-*` prefix only inside this package; treat these variables as implementation details, not public theming API.
278
+
279
+ **When to use it:** Whenever you introduce or change a primitive that renders a native element commonly styled by wp-admin globals, wire in the matching defense class from `global-css-defense.module.css` (see existing usages in `Button`, `Input`, `Textarea`, `Link`, `Text`, field descriptions, and related form primitives). If admin styles affect a new element type, extend the defense module with a new class and the same bridge pattern rather than duplicating unlayered overrides inside individual components.
280
+
281
+ **Testing:** In Storybook, enable **WordPress global CSS** from the toolbar and compare stories with that mode on and off; appearance should match aside from intentional differences.
282
+
283
+ Long term, Core may reduce the need for this by [scoping](https://core.trac.wordpress.org/ticket/64939). Until then, this module is the supported way to keep components predictable inside wp-admin.
package/README.md CHANGED
@@ -24,16 +24,44 @@ Install using NPM:
24
24
  npm install @wordpress/ui
25
25
  ```
26
26
 
27
- As an implementation of the design system and companion to the `@wordpress/theme` package, these components depend on CSS custom properties defined by the theme package. This is managed on your behalf in a WordPress admin page context, but you will need to install and include the base theme stylesheet yourself if you're using the components in an application outside WordPress:
27
+ ## Setup
28
+
29
+ As an implementation of the design system and companion to the `@wordpress/theme` package, these components depend on CSS custom properties defined by the theme package. What you need to set up depends on whether you're building for a WordPress context, and how much of the theming features you want to use.
30
+
31
+ ### Within WordPress
32
+
33
+ Stylesheets are managed on your behalf in a WordPress context, so you don't need to worry about loading them yourself.
34
+
35
+ ### Outside WordPress
36
+
37
+ While the components ship with basic fallbacks for every CSS custom property, it's recommended that you install and load the design tokens stylesheet to support the full range of theming capabilities:
28
38
 
29
39
  ```
30
40
  npm install @wordpress/theme
31
41
  ```
32
42
 
33
- ```tsx
43
+ ```js
34
44
  import '@wordpress/theme/design-tokens.css';
35
45
  ```
36
46
 
47
+ This stylesheet is universal and does not have a separate RTL version.
48
+
49
+ Also, to ensure that portaled popovers appear correctly, add these isolation styles to your application's layout root element:
50
+
51
+ ```css
52
+ .root {
53
+ isolation: isolate;
54
+ }
55
+ ```
56
+
57
+ Finally, in order to support overlay elements such as backdrops to correctly cover the whole browser viewport even when scrolled, add the following style to your global styles:
58
+
59
+ ```css
60
+ body {
61
+ position: relative;
62
+ }
63
+ ```
64
+
37
65
  ## Usage
38
66
 
39
67
  ### Basic Component Usage
@@ -104,10 +132,10 @@ Interactive components that manage internal state (such as open/closed, selected
104
132
 
105
133
  For a given state `x`, the convention is:
106
134
 
107
- | Prop | Purpose |
108
- | --- | --- |
109
- | `defaultX` | Sets the initial value in **uncontrolled** mode. The component manages subsequent state changes internally. |
110
- | `x` | Sets the current value in **controlled** mode. The consumer is responsible for updating the value in response to changes. |
135
+ | Prop | Purpose |
136
+ | ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
137
+ | `defaultX` | Sets the initial value in **uncontrolled** mode. The component manages subsequent state changes internally. |
138
+ | `x` | Sets the current value in **controlled** mode. The consumer is responsible for updating the value in response to changes. |
111
139
  | `onXChange` | Callback invoked when the state changes. Receives the new value as its first argument. Works in both controlled and uncontrolled modes. |
112
140
 
113
141
  For example, a component with an open/closed state would expose:
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/alert-dialog/context.tsx
21
+ var context_exports = {};
22
+ __export(context_exports, {
23
+ AlertDialogContext: () => AlertDialogContext
24
+ });
25
+ module.exports = __toCommonJS(context_exports);
26
+ var import_element = require("@wordpress/element");
27
+ var noop = async () => {
28
+ };
29
+ var AlertDialogContext = (0, import_element.createContext)({
30
+ phase: "idle",
31
+ showSpinner: false,
32
+ errorMessage: void 0,
33
+ confirm: noop
34
+ });
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ AlertDialogContext
38
+ });
39
+ //# sourceMappingURL=context.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/context.tsx"],
4
+ "sourcesContent": ["import { createContext } from '@wordpress/element';\n\ntype Phase = 'idle' | 'pending' | 'closing';\n\ninterface AlertDialogContextValue {\n\tphase: Phase;\n\tshowSpinner: boolean;\n\terrorMessage?: string;\n\tconfirm: () => Promise< void >;\n}\n\nconst noop = async () => {};\n\nconst AlertDialogContext = createContext< AlertDialogContextValue >( {\n\tphase: 'idle',\n\tshowSpinner: false,\n\terrorMessage: undefined,\n\tconfirm: noop,\n} );\n\nexport { AlertDialogContext };\nexport type { Phase };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA8B;AAW9B,IAAM,OAAO,YAAY;AAAC;AAE1B,IAAM,yBAAqB,8BAA0C;AAAA,EACpE,OAAO;AAAA,EACP,aAAa;AAAA,EACb,cAAc;AAAA,EACd,SAAS;AACV,CAAE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // packages/ui/src/alert-dialog/index.ts
21
+ var alert_dialog_exports = {};
22
+ __export(alert_dialog_exports, {
23
+ Popup: () => import_popup.Popup,
24
+ Root: () => import_root.Root,
25
+ Trigger: () => import_trigger.Trigger
26
+ });
27
+ module.exports = __toCommonJS(alert_dialog_exports);
28
+ var import_root = require("./root.cjs");
29
+ var import_trigger = require("./trigger.cjs");
30
+ var import_popup = require("./popup.cjs");
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ Popup,
34
+ Root,
35
+ Trigger
36
+ });
37
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/index.ts"],
4
+ "sourcesContent": ["export { Root } from './root';\nexport { Trigger } from './trigger';\nexport { Popup } from './popup';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;AACrB,qBAAwB;AACxB,mBAAsB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,165 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // packages/ui/src/alert-dialog/popup.tsx
31
+ var popup_exports = {};
32
+ __export(popup_exports, {
33
+ Popup: () => Popup
34
+ });
35
+ module.exports = __toCommonJS(popup_exports);
36
+ var import_alert_dialog = require("@base-ui/react/alert-dialog");
37
+ var import_clsx = __toESM(require("clsx"));
38
+ var import_element = require("@wordpress/element");
39
+ var import_i18n = require("@wordpress/i18n");
40
+ var import_theme = require("@wordpress/theme");
41
+ var import_button = require("../button/index.cjs");
42
+
43
+ // packages/ui/src/dialog/style.module.css
44
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='0289d42d13']")) {
45
+ const style = document.createElement("style");
46
+ style.setAttribute("data-wp-hash", "0289d42d13");
47
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._074affe4c56b4f2f__backdrop{background-color:#00000059;inset:0;position:fixed;z-index:var(--wp-ui-dialog-z-index,initial);&[data-ending-style],&[data-starting-style]{opacity:0}&[data-open]{opacity:1}@media not (prefers-reduced-motion){transition:opacity .2s ease-out}}._8acaa98861620d4d__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border-radius:var(--wpds-border-radius-lg,8px);box-shadow:var(--wpds-elevation-lg,0 5px 15px 0 #00000014,0 15px 27px 0 #00000012,0 30px 36px 0 #0000000a,0 50px 43px 0 #00000005);box-sizing:border-box;color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);left:50%;line-height:var(--wpds-typography-line-height-md,24px);max-height:calc(100vh - var(--wpds-dimension-padding-2xl, 24px)*2);min-width:var(--wpds-dimension-surface-width-sm,320px);overflow:auto;padding:var(--wpds-dimension-padding-2xl,24px);position:fixed;top:50%;transform:translate(-50%,-50%);width:calc(100vw - var(--wpds-dimension-padding-2xl, 24px)*2);z-index:var(--wp-ui-dialog-z-index,initial);&[data-ending-style],&[data-starting-style]{opacity:0;transform:translate(-50%,-50%) scale(.9)}@media not (prefers-reduced-motion){transition:opacity .2s cubic-bezier(1,0,.2,1),transform .2s cubic-bezier(1,0,.2,1);&[data-open]{transition:opacity .2s cubic-bezier(.29,0,0,1),transform .2s cubic-bezier(.29,0,0,1)}}@media (min-width:480px){min-width:var(--wpds-dimension-surface-width-md,400px)}&._7acfa67ebf092988__is-small{max-width:var(--wpds-dimension-surface-width-md,400px)}&._1eeeed880cb5769d__is-medium{max-width:var(--wpds-dimension-surface-width-lg,560px)}&._99f900b2267e22d0__is-large{max-width:var(--wpds-dimension-surface-width-2xl,960px)}&.b49f7ff9c06fe387__is-stretch{max-width:none}&.dcd4c2f5036cbf1a__is-full{height:100vh}}._76fb3b28fcbd45fc__header{align-items:center;display:flex;gap:var(--wpds-dimension-gap-sm,8px);margin-bottom:var(--wpds-dimension-gap-lg,16px)}.f636832002af749e__title{--_gcd-heading-margin:0 auto 0 0;margin-inline-end:auto;&:dir(rtl){--_gcd-heading-margin:0 0 0 auto}}._00eeb4f220cddae3__footer{align-items:center;display:flex;gap:var(--wpds-dimension-gap-sm,8px);justify-content:flex-end;margin-top:var(--wpds-dimension-gap-lg,16px);padding-top:var(--wpds-dimension-padding-lg,16px)}}'));
48
+ document.head.appendChild(style);
49
+ }
50
+ var style_default = { "backdrop": "_074affe4c56b4f2f__backdrop", "popup": "_8acaa98861620d4d__popup", "is-small": "_7acfa67ebf092988__is-small", "is-medium": "_1eeeed880cb5769d__is-medium", "is-large": "_99f900b2267e22d0__is-large", "is-stretch": "b49f7ff9c06fe387__is-stretch", "is-full": "dcd4c2f5036cbf1a__is-full", "header": "_76fb3b28fcbd45fc__header", "title": "f636832002af749e__title", "footer": "_00eeb4f220cddae3__footer" };
51
+
52
+ // packages/ui/src/alert-dialog/popup.tsx
53
+ var import_lock_unlock = require("../lock-unlock.cjs");
54
+ var import_stack = require("../stack/index.cjs");
55
+ var import_text = require("../text/index.cjs");
56
+ var import_context = require("./context.cjs");
57
+
58
+ // packages/ui/src/alert-dialog/style.module.css
59
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='113a8b8edd']")) {
60
+ const style = document.createElement("style");
61
+ style.setAttribute("data-wp-hash", "113a8b8edd");
62
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._837a6eb481252f50__header{margin-bottom:var(--wpds-dimension-gap-lg,16px)}.dbff6618234a2a93__error-message{align-self:flex-end;color:var(--wpds-color-fg-content-error,#470000)}}@layer wp-ui-compositions{._2ddc2fc9155a1dad__irreversible-action{--wp-ui-button-background-color:var(--wpds-color-bg-interactive-error-strong,#cc1818);--wp-ui-button-background-color-active:var(--wpds-color-bg-interactive-error-strong-active,#b90000);--wp-ui-button-foreground-color:var(--wpds-color-fg-interactive-error-strong,#f2efef);--wp-ui-button-foreground-color-active:var(--wpds-color-fg-interactive-error-strong-active,#f2efef)}}"));
63
+ document.head.appendChild(style);
64
+ }
65
+ var style_default2 = { "header": "_837a6eb481252f50__header", "error-message": "dbff6618234a2a93__error-message", "irreversible-action": "_2ddc2fc9155a1dad__irreversible-action" };
66
+
67
+ // packages/ui/src/alert-dialog/popup.tsx
68
+ var import_jsx_runtime = require("react/jsx-runtime");
69
+ var ThemeProvider = (0, import_lock_unlock.unlock)(import_theme.privateApis).ThemeProvider;
70
+ var Popup = (0, import_element.forwardRef)(
71
+ function AlertDialogPopup({
72
+ className,
73
+ container,
74
+ intent = "default",
75
+ title,
76
+ description,
77
+ children,
78
+ confirmButtonText = (0, import_i18n.__)("OK"),
79
+ cancelButtonText = (0, import_i18n.__)("Cancel"),
80
+ ...props
81
+ }, ref) {
82
+ const { phase, showSpinner, errorMessage, confirm } = (0, import_element.useContext)(import_context.AlertDialogContext);
83
+ const confirmClassName = intent === "irreversible" ? style_default2["irreversible-action"] : void 0;
84
+ const buttonsDisabled = phase !== "idle" || void 0;
85
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert_dialog.AlertDialog.Portal, { container, children: [
86
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert_dialog.AlertDialog.Backdrop, { className: style_default.backdrop }),
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
88
+ import_alert_dialog.AlertDialog.Popup,
89
+ {
90
+ ref,
91
+ className: (0, import_clsx.default)(
92
+ style_default.popup,
93
+ className,
94
+ style_default["is-medium"]
95
+ ),
96
+ ...props,
97
+ children: [
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
99
+ import_stack.Stack,
100
+ {
101
+ direction: "column",
102
+ gap: "sm",
103
+ className: style_default2.header,
104
+ children: [
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
+ import_text.Text,
107
+ {
108
+ variant: "heading-xl",
109
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert_dialog.AlertDialog.Title, {}),
110
+ children: title
111
+ }
112
+ ),
113
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
114
+ import_text.Text,
115
+ {
116
+ variant: "body-md",
117
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert_dialog.AlertDialog.Description, {}),
118
+ children: description
119
+ }
120
+ )
121
+ ]
122
+ }
123
+ ),
124
+ children,
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_stack.Stack, { direction: "column", gap: "md", children: [
126
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: style_default.footer, children: [
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
128
+ import_alert_dialog.AlertDialog.Close,
129
+ {
130
+ render: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "minimal" }),
131
+ disabled: buttonsDisabled,
132
+ children: cancelButtonText
133
+ }
134
+ ),
135
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ import_button.Button,
137
+ {
138
+ className: confirmClassName,
139
+ onClick: confirm,
140
+ loading: showSpinner || void 0,
141
+ disabled: buttonsDisabled,
142
+ children: confirmButtonText
143
+ }
144
+ )
145
+ ] }),
146
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
147
+ import_text.Text,
148
+ {
149
+ variant: "body-sm",
150
+ className: style_default2["error-message"],
151
+ children: errorMessage
152
+ }
153
+ )
154
+ ] })
155
+ ]
156
+ }
157
+ ) })
158
+ ] });
159
+ }
160
+ );
161
+ // Annotate the CommonJS export names for ESM import in node:
162
+ 0 && (module.exports = {
163
+ Popup
164
+ });
165
+ //# sourceMappingURL=popup.cjs.map