@wordpress/ui 0.9.1-next.v.202603102151.0 → 0.10.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 (529) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/CONTRIBUTING.md +31 -0
  3. package/README.md +106 -0
  4. package/build/alert-dialog/context.cjs +34 -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 +93 -0
  9. package/build/alert-dialog/popup.cjs.map +7 -0
  10. package/build/alert-dialog/root.cjs +52 -0
  11. package/build/alert-dialog/root.cjs.map +7 -0
  12. package/build/alert-dialog/trigger.cjs +48 -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 +3 -3
  17. package/build/badge/badge.cjs.map +2 -2
  18. package/build/button/button.cjs +9 -9
  19. package/build/button/button.cjs.map +2 -2
  20. package/build/card/content.cjs +3 -3
  21. package/build/card/content.cjs.map +2 -2
  22. package/build/card/full-bleed.cjs +3 -3
  23. package/build/card/full-bleed.cjs.map +2 -2
  24. package/build/card/header.cjs +3 -3
  25. package/build/card/header.cjs.map +2 -2
  26. package/build/card/root.cjs +5 -5
  27. package/build/card/root.cjs.map +2 -2
  28. package/build/card/title.cjs +26 -13
  29. package/build/card/title.cjs.map +3 -3
  30. package/build/collapsible/index.cjs +37 -0
  31. package/build/collapsible/index.cjs.map +7 -0
  32. package/build/collapsible/panel.cjs +38 -0
  33. package/build/collapsible/panel.cjs.map +7 -0
  34. package/build/collapsible/root.cjs +38 -0
  35. package/build/collapsible/root.cjs.map +7 -0
  36. package/build/collapsible/trigger.cjs +38 -0
  37. package/build/collapsible/trigger.cjs.map +7 -0
  38. package/build/collapsible/types.cjs +19 -0
  39. package/build/collapsible/types.cjs.map +7 -0
  40. package/build/collapsible-card/content.cjs +26 -5
  41. package/build/collapsible-card/content.cjs.map +4 -4
  42. package/build/collapsible-card/context.cjs +35 -0
  43. package/build/collapsible-card/context.cjs.map +7 -0
  44. package/build/collapsible-card/header-description.cjs +52 -0
  45. package/build/collapsible-card/header-description.cjs.map +7 -0
  46. package/build/collapsible-card/header.cjs +57 -38
  47. package/build/collapsible-card/header.cjs.map +3 -3
  48. package/build/collapsible-card/index.cjs +3 -0
  49. package/build/collapsible-card/index.cjs.map +2 -2
  50. package/build/collapsible-card/root.cjs +4 -4
  51. package/build/collapsible-card/root.cjs.map +2 -2
  52. package/build/collapsible-card/types.cjs.map +1 -1
  53. package/build/dialog/action.cjs +4 -2
  54. package/build/dialog/action.cjs.map +2 -2
  55. package/build/dialog/close-icon.cjs +2 -1
  56. package/build/dialog/close-icon.cjs.map +2 -2
  57. package/build/dialog/footer.cjs +3 -3
  58. package/build/dialog/footer.cjs.map +2 -2
  59. package/build/dialog/header.cjs +3 -3
  60. package/build/dialog/header.cjs.map +2 -2
  61. package/build/dialog/popup.cjs +22 -5
  62. package/build/dialog/popup.cjs.map +2 -2
  63. package/build/dialog/title.cjs +3 -3
  64. package/build/dialog/title.cjs.map +2 -2
  65. package/build/dialog/types.cjs.map +1 -1
  66. package/build/empty-state/actions.cjs +66 -0
  67. package/build/empty-state/actions.cjs.map +7 -0
  68. package/build/empty-state/description.cjs +66 -0
  69. package/build/empty-state/description.cjs.map +7 -0
  70. package/build/empty-state/icon.cjs +69 -0
  71. package/build/empty-state/icon.cjs.map +7 -0
  72. package/build/empty-state/index.cjs +46 -0
  73. package/build/empty-state/index.cjs.map +7 -0
  74. package/build/empty-state/root.cjs +66 -0
  75. package/build/empty-state/root.cjs.map +7 -0
  76. package/build/empty-state/title.cjs +68 -0
  77. package/build/empty-state/title.cjs.map +7 -0
  78. package/build/empty-state/types.cjs +19 -0
  79. package/build/empty-state/types.cjs.map +7 -0
  80. package/build/empty-state/visual.cjs +66 -0
  81. package/build/empty-state/visual.cjs.map +7 -0
  82. package/build/form/index.cjs +27 -0
  83. package/build/form/index.cjs.map +7 -0
  84. package/build/form/input-control/index.cjs +31 -0
  85. package/build/form/input-control/index.cjs.map +7 -0
  86. package/build/form/input-control/input-control.cjs +50 -0
  87. package/build/form/input-control/input-control.cjs.map +7 -0
  88. package/build/form/input-control/types.cjs +19 -0
  89. package/build/form/input-control/types.cjs.map +7 -0
  90. package/build/form/primitives/field/description.cjs +2 -2
  91. package/build/form/primitives/field/description.cjs.map +1 -1
  92. package/build/form/primitives/field/details.cjs +2 -2
  93. package/build/form/primitives/field/details.cjs.map +1 -1
  94. package/build/form/primitives/field/label.cjs +2 -2
  95. package/build/form/primitives/field/label.cjs.map +1 -1
  96. package/build/form/primitives/field/root.cjs +4 -4
  97. package/build/form/primitives/field/root.cjs.map +2 -2
  98. package/build/form/primitives/fieldset/description.cjs +2 -2
  99. package/build/form/primitives/fieldset/description.cjs.map +1 -1
  100. package/build/form/primitives/fieldset/details.cjs +2 -2
  101. package/build/form/primitives/fieldset/details.cjs.map +1 -1
  102. package/build/form/primitives/fieldset/legend.cjs +2 -2
  103. package/build/form/primitives/fieldset/legend.cjs.map +1 -1
  104. package/build/form/primitives/fieldset/root.cjs +2 -2
  105. package/build/form/primitives/fieldset/root.cjs.map +1 -1
  106. package/build/form/primitives/input/input.cjs +6 -6
  107. package/build/form/primitives/input/input.cjs.map +2 -2
  108. package/build/form/primitives/input-layout/input-layout.cjs +4 -4
  109. package/build/form/primitives/input-layout/input-layout.cjs.map +1 -1
  110. package/build/form/primitives/input-layout/slot.cjs +5 -4
  111. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  112. package/build/form/primitives/select/item.cjs +5 -5
  113. package/build/form/primitives/select/item.cjs.map +2 -2
  114. package/build/form/primitives/select/popup.cjs +7 -7
  115. package/build/form/primitives/select/popup.cjs.map +2 -2
  116. package/build/form/primitives/select/trigger.cjs +7 -7
  117. package/build/form/primitives/select/trigger.cjs.map +2 -2
  118. package/build/form/primitives/textarea/textarea.cjs +3 -3
  119. package/build/form/primitives/textarea/textarea.cjs.map +2 -2
  120. package/build/form/types.cjs +19 -0
  121. package/build/form/types.cjs.map +7 -0
  122. package/build/icon-button/icon-button.cjs +2 -2
  123. package/build/icon-button/icon-button.cjs.map +1 -1
  124. package/build/index.cjs +11 -2
  125. package/build/index.cjs.map +2 -2
  126. package/build/link/link.cjs +8 -8
  127. package/build/link/link.cjs.map +2 -2
  128. package/build/notice/action-button.cjs +2 -2
  129. package/build/notice/action-button.cjs.map +1 -1
  130. package/build/notice/action-link.cjs +2 -2
  131. package/build/notice/action-link.cjs.map +1 -1
  132. package/build/notice/actions.cjs +2 -2
  133. package/build/notice/actions.cjs.map +1 -1
  134. package/build/notice/close-icon.cjs +2 -2
  135. package/build/notice/close-icon.cjs.map +1 -1
  136. package/build/notice/description.cjs +2 -2
  137. package/build/notice/description.cjs.map +1 -1
  138. package/build/notice/index.cjs.map +1 -1
  139. package/build/notice/root.cjs +4 -4
  140. package/build/notice/root.cjs.map +1 -1
  141. package/build/notice/title.cjs +2 -2
  142. package/build/notice/title.cjs.map +1 -1
  143. package/build/stack/stack.cjs +2 -2
  144. package/build/stack/stack.cjs.map +1 -1
  145. package/build/tabs/context.cjs +121 -0
  146. package/build/tabs/context.cjs.map +7 -0
  147. package/build/tabs/list.cjs +3 -3
  148. package/build/tabs/list.cjs.map +2 -2
  149. package/build/tabs/panel.cjs +5 -3
  150. package/build/tabs/panel.cjs.map +2 -2
  151. package/build/tabs/root.cjs +2 -1
  152. package/build/tabs/root.cjs.map +2 -2
  153. package/build/tabs/tab.cjs +5 -3
  154. package/build/tabs/tab.cjs.map +2 -2
  155. package/build/text/text.cjs +2 -2
  156. package/build/text/text.cjs.map +1 -1
  157. package/build/tooltip/popup.cjs +4 -4
  158. package/build/tooltip/popup.cjs.map +1 -1
  159. package/build/tooltip/root.cjs.map +2 -2
  160. package/build/utils/use-deprioritized-initial-focus.cjs +64 -0
  161. package/build/utils/use-deprioritized-initial-focus.cjs.map +7 -0
  162. package/build/visually-hidden/visually-hidden.cjs +2 -2
  163. package/build/visually-hidden/visually-hidden.cjs.map +1 -1
  164. package/build-module/alert-dialog/context.mjs +9 -0
  165. package/build-module/alert-dialog/context.mjs.map +7 -0
  166. package/build-module/alert-dialog/index.mjs +10 -0
  167. package/build-module/alert-dialog/index.mjs.map +7 -0
  168. package/build-module/alert-dialog/popup.mjs +58 -0
  169. package/build-module/alert-dialog/popup.mjs.map +7 -0
  170. package/build-module/alert-dialog/root.mjs +27 -0
  171. package/build-module/alert-dialog/root.mjs.map +7 -0
  172. package/build-module/alert-dialog/trigger.mjs +13 -0
  173. package/build-module/alert-dialog/trigger.mjs.map +7 -0
  174. package/build-module/alert-dialog/types.mjs +1 -0
  175. package/build-module/alert-dialog/types.mjs.map +7 -0
  176. package/build-module/badge/badge.mjs +3 -3
  177. package/build-module/badge/badge.mjs.map +2 -2
  178. package/build-module/button/button.mjs +9 -9
  179. package/build-module/button/button.mjs.map +2 -2
  180. package/build-module/card/content.mjs +3 -3
  181. package/build-module/card/content.mjs.map +2 -2
  182. package/build-module/card/full-bleed.mjs +3 -3
  183. package/build-module/card/full-bleed.mjs.map +2 -2
  184. package/build-module/card/header.mjs +3 -3
  185. package/build-module/card/header.mjs.map +2 -2
  186. package/build-module/card/root.mjs +5 -5
  187. package/build-module/card/root.mjs.map +2 -2
  188. package/build-module/card/title.mjs +16 -13
  189. package/build-module/card/title.mjs.map +2 -2
  190. package/build-module/collapsible/index.mjs +10 -0
  191. package/build-module/collapsible/index.mjs.map +7 -0
  192. package/build-module/collapsible/panel.mjs +13 -0
  193. package/build-module/collapsible/panel.mjs.map +7 -0
  194. package/build-module/collapsible/root.mjs +13 -0
  195. package/build-module/collapsible/root.mjs.map +7 -0
  196. package/build-module/collapsible/trigger.mjs +13 -0
  197. package/build-module/collapsible/trigger.mjs.map +7 -0
  198. package/build-module/collapsible/types.mjs +1 -0
  199. package/build-module/collapsible/types.mjs.map +7 -0
  200. package/build-module/collapsible-card/content.mjs +25 -4
  201. package/build-module/collapsible-card/content.mjs.map +3 -3
  202. package/build-module/collapsible-card/context.mjs +10 -0
  203. package/build-module/collapsible-card/context.mjs.map +7 -0
  204. package/build-module/collapsible-card/header-description.mjs +27 -0
  205. package/build-module/collapsible-card/header-description.mjs.map +7 -0
  206. package/build-module/collapsible-card/header.mjs +59 -40
  207. package/build-module/collapsible-card/header.mjs.map +3 -3
  208. package/build-module/collapsible-card/index.mjs +2 -0
  209. package/build-module/collapsible-card/index.mjs.map +2 -2
  210. package/build-module/collapsible-card/root.mjs +3 -3
  211. package/build-module/collapsible-card/root.mjs.map +2 -2
  212. package/build-module/dialog/action.mjs +4 -2
  213. package/build-module/dialog/action.mjs.map +2 -2
  214. package/build-module/dialog/close-icon.mjs +2 -1
  215. package/build-module/dialog/close-icon.mjs.map +2 -2
  216. package/build-module/dialog/footer.mjs +3 -3
  217. package/build-module/dialog/footer.mjs.map +2 -2
  218. package/build-module/dialog/header.mjs +3 -3
  219. package/build-module/dialog/header.mjs.map +2 -2
  220. package/build-module/dialog/popup.mjs +22 -5
  221. package/build-module/dialog/popup.mjs.map +2 -2
  222. package/build-module/dialog/title.mjs +3 -3
  223. package/build-module/dialog/title.mjs.map +2 -2
  224. package/build-module/empty-state/actions.mjs +31 -0
  225. package/build-module/empty-state/actions.mjs.map +7 -0
  226. package/build-module/empty-state/description.mjs +31 -0
  227. package/build-module/empty-state/description.mjs.map +7 -0
  228. package/build-module/empty-state/icon.mjs +34 -0
  229. package/build-module/empty-state/icon.mjs.map +7 -0
  230. package/build-module/empty-state/index.mjs +16 -0
  231. package/build-module/empty-state/index.mjs.map +7 -0
  232. package/build-module/empty-state/root.mjs +31 -0
  233. package/build-module/empty-state/root.mjs.map +7 -0
  234. package/build-module/empty-state/title.mjs +33 -0
  235. package/build-module/empty-state/title.mjs.map +7 -0
  236. package/build-module/empty-state/types.mjs +1 -0
  237. package/build-module/empty-state/types.mjs.map +7 -0
  238. package/build-module/empty-state/visual.mjs +31 -0
  239. package/build-module/empty-state/visual.mjs.map +7 -0
  240. package/build-module/form/index.mjs +4 -0
  241. package/build-module/form/index.mjs.map +7 -0
  242. package/build-module/form/input-control/index.mjs +6 -0
  243. package/build-module/form/input-control/index.mjs.map +7 -0
  244. package/build-module/form/input-control/input-control.mjs +25 -0
  245. package/build-module/form/input-control/input-control.mjs.map +7 -0
  246. package/build-module/form/input-control/types.mjs +1 -0
  247. package/build-module/form/input-control/types.mjs.map +7 -0
  248. package/build-module/form/primitives/field/description.mjs +2 -2
  249. package/build-module/form/primitives/field/description.mjs.map +1 -1
  250. package/build-module/form/primitives/field/details.mjs +2 -2
  251. package/build-module/form/primitives/field/details.mjs.map +1 -1
  252. package/build-module/form/primitives/field/label.mjs +2 -2
  253. package/build-module/form/primitives/field/label.mjs.map +1 -1
  254. package/build-module/form/primitives/field/root.mjs +4 -4
  255. package/build-module/form/primitives/field/root.mjs.map +2 -2
  256. package/build-module/form/primitives/fieldset/description.mjs +2 -2
  257. package/build-module/form/primitives/fieldset/description.mjs.map +1 -1
  258. package/build-module/form/primitives/fieldset/details.mjs +2 -2
  259. package/build-module/form/primitives/fieldset/details.mjs.map +1 -1
  260. package/build-module/form/primitives/fieldset/legend.mjs +2 -2
  261. package/build-module/form/primitives/fieldset/legend.mjs.map +1 -1
  262. package/build-module/form/primitives/fieldset/root.mjs +2 -2
  263. package/build-module/form/primitives/fieldset/root.mjs.map +1 -1
  264. package/build-module/form/primitives/input/input.mjs +6 -6
  265. package/build-module/form/primitives/input/input.mjs.map +2 -2
  266. package/build-module/form/primitives/input-layout/input-layout.mjs +4 -4
  267. package/build-module/form/primitives/input-layout/input-layout.mjs.map +1 -1
  268. package/build-module/form/primitives/input-layout/slot.mjs +5 -4
  269. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  270. package/build-module/form/primitives/select/item.mjs +5 -5
  271. package/build-module/form/primitives/select/item.mjs.map +2 -2
  272. package/build-module/form/primitives/select/popup.mjs +7 -7
  273. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  274. package/build-module/form/primitives/select/trigger.mjs +7 -7
  275. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  276. package/build-module/form/primitives/textarea/textarea.mjs +3 -3
  277. package/build-module/form/primitives/textarea/textarea.mjs.map +2 -2
  278. package/build-module/form/types.mjs +1 -0
  279. package/build-module/form/types.mjs.map +7 -0
  280. package/build-module/icon-button/icon-button.mjs +2 -2
  281. package/build-module/icon-button/icon-button.mjs.map +1 -1
  282. package/build-module/index.mjs +7 -1
  283. package/build-module/index.mjs.map +2 -2
  284. package/build-module/link/link.mjs +8 -8
  285. package/build-module/link/link.mjs.map +2 -2
  286. package/build-module/notice/action-button.mjs +2 -2
  287. package/build-module/notice/action-button.mjs.map +1 -1
  288. package/build-module/notice/action-link.mjs +2 -2
  289. package/build-module/notice/action-link.mjs.map +1 -1
  290. package/build-module/notice/actions.mjs +2 -2
  291. package/build-module/notice/actions.mjs.map +1 -1
  292. package/build-module/notice/close-icon.mjs +2 -2
  293. package/build-module/notice/close-icon.mjs.map +1 -1
  294. package/build-module/notice/description.mjs +2 -2
  295. package/build-module/notice/description.mjs.map +1 -1
  296. package/build-module/notice/index.mjs.map +1 -1
  297. package/build-module/notice/root.mjs +4 -4
  298. package/build-module/notice/root.mjs.map +1 -1
  299. package/build-module/notice/title.mjs +2 -2
  300. package/build-module/notice/title.mjs.map +1 -1
  301. package/build-module/stack/stack.mjs +2 -2
  302. package/build-module/stack/stack.mjs.map +1 -1
  303. package/build-module/tabs/context.mjs +101 -0
  304. package/build-module/tabs/context.mjs.map +7 -0
  305. package/build-module/tabs/list.mjs +3 -3
  306. package/build-module/tabs/list.mjs.map +2 -2
  307. package/build-module/tabs/panel.mjs +5 -3
  308. package/build-module/tabs/panel.mjs.map +2 -2
  309. package/build-module/tabs/root.mjs +2 -1
  310. package/build-module/tabs/root.mjs.map +2 -2
  311. package/build-module/tabs/tab.mjs +5 -3
  312. package/build-module/tabs/tab.mjs.map +2 -2
  313. package/build-module/text/text.mjs +2 -2
  314. package/build-module/text/text.mjs.map +1 -1
  315. package/build-module/tooltip/popup.mjs +4 -4
  316. package/build-module/tooltip/popup.mjs.map +1 -1
  317. package/build-module/tooltip/root.mjs.map +2 -2
  318. package/build-module/utils/use-deprioritized-initial-focus.mjs +39 -0
  319. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +7 -0
  320. package/build-module/visually-hidden/visually-hidden.mjs +2 -2
  321. package/build-module/visually-hidden/visually-hidden.mjs.map +1 -1
  322. package/build-types/alert-dialog/context.d.ts +8 -0
  323. package/build-types/alert-dialog/context.d.ts.map +1 -0
  324. package/build-types/alert-dialog/index.d.ts +4 -0
  325. package/build-types/alert-dialog/index.d.ts.map +1 -0
  326. package/build-types/alert-dialog/popup.d.ts +4 -0
  327. package/build-types/alert-dialog/popup.d.ts.map +1 -0
  328. package/build-types/alert-dialog/root.d.ts +24 -0
  329. package/build-types/alert-dialog/root.d.ts.map +1 -0
  330. package/build-types/alert-dialog/stories/index.story.d.ts +44 -0
  331. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -0
  332. package/build-types/alert-dialog/test/index.test.d.ts +2 -0
  333. package/build-types/alert-dialog/test/index.test.d.ts.map +1 -0
  334. package/build-types/alert-dialog/trigger.d.ts +6 -0
  335. package/build-types/alert-dialog/trigger.d.ts.map +1 -0
  336. package/build-types/alert-dialog/types.d.ts +70 -0
  337. package/build-types/alert-dialog/types.d.ts.map +1 -0
  338. package/build-types/card/title.d.ts.map +1 -1
  339. package/build-types/collapsible/index.d.ts +5 -0
  340. package/build-types/collapsible/index.d.ts.map +1 -0
  341. package/build-types/collapsible/panel.d.ts +16 -0
  342. package/build-types/collapsible/panel.d.ts.map +1 -0
  343. package/build-types/collapsible/root.d.ts +15 -0
  344. package/build-types/collapsible/root.d.ts.map +1 -0
  345. package/build-types/collapsible/stories/index.story.d.ts +18 -0
  346. package/build-types/collapsible/stories/index.story.d.ts.map +1 -0
  347. package/build-types/collapsible/test/index.test.d.ts +2 -0
  348. package/build-types/collapsible/test/index.test.d.ts.map +1 -0
  349. package/build-types/collapsible/trigger.d.ts +15 -0
  350. package/build-types/collapsible/trigger.d.ts.map +1 -0
  351. package/build-types/collapsible/types.d.ts +22 -0
  352. package/build-types/collapsible/types.d.ts.map +1 -0
  353. package/build-types/collapsible-card/content.d.ts.map +1 -1
  354. package/build-types/collapsible-card/context.d.ts +4 -0
  355. package/build-types/collapsible-card/context.d.ts.map +1 -0
  356. package/build-types/collapsible-card/header-description.d.ts +15 -0
  357. package/build-types/collapsible-card/header-description.d.ts.map +1 -0
  358. package/build-types/collapsible-card/header.d.ts.map +1 -1
  359. package/build-types/collapsible-card/index.d.ts +2 -1
  360. package/build-types/collapsible-card/index.d.ts.map +1 -1
  361. package/build-types/collapsible-card/stories/index.story.d.ts +10 -0
  362. package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
  363. package/build-types/collapsible-card/types.d.ts +21 -0
  364. package/build-types/collapsible-card/types.d.ts.map +1 -1
  365. package/build-types/dialog/action.d.ts.map +1 -1
  366. package/build-types/dialog/close-icon.d.ts.map +1 -1
  367. package/build-types/dialog/popup.d.ts.map +1 -1
  368. package/build-types/dialog/stories/index.story.d.ts +0 -6
  369. package/build-types/dialog/stories/index.story.d.ts.map +1 -1
  370. package/build-types/dialog/types.d.ts +5 -5
  371. package/build-types/dialog/types.d.ts.map +1 -1
  372. package/build-types/empty-state/actions.d.ts +7 -0
  373. package/build-types/empty-state/actions.d.ts.map +1 -0
  374. package/build-types/empty-state/description.d.ts +7 -0
  375. package/build-types/empty-state/description.d.ts.map +1 -0
  376. package/build-types/empty-state/icon.d.ts +7 -0
  377. package/build-types/empty-state/icon.d.ts.map +1 -0
  378. package/build-types/empty-state/index.d.ts +8 -0
  379. package/build-types/empty-state/index.d.ts.map +1 -0
  380. package/build-types/empty-state/root.d.ts +6 -0
  381. package/build-types/empty-state/root.d.ts.map +1 -0
  382. package/build-types/empty-state/stories/index.story.d.ts +8 -0
  383. package/build-types/empty-state/stories/index.story.d.ts.map +1 -0
  384. package/build-types/empty-state/test/actions.test.d.ts +2 -0
  385. package/build-types/empty-state/test/actions.test.d.ts.map +1 -0
  386. package/build-types/empty-state/test/description.test.d.ts +2 -0
  387. package/build-types/empty-state/test/description.test.d.ts.map +1 -0
  388. package/build-types/empty-state/test/icon.test.d.ts +2 -0
  389. package/build-types/empty-state/test/icon.test.d.ts.map +1 -0
  390. package/build-types/empty-state/test/root.test.d.ts +2 -0
  391. package/build-types/empty-state/test/root.test.d.ts.map +1 -0
  392. package/build-types/empty-state/test/title.test.d.ts +2 -0
  393. package/build-types/empty-state/test/title.test.d.ts.map +1 -0
  394. package/build-types/empty-state/test/visual.test.d.ts +2 -0
  395. package/build-types/empty-state/test/visual.test.d.ts.map +1 -0
  396. package/build-types/empty-state/title.d.ts +6 -0
  397. package/build-types/empty-state/title.d.ts.map +1 -0
  398. package/build-types/empty-state/types.d.ts +40 -0
  399. package/build-types/empty-state/types.d.ts.map +1 -0
  400. package/build-types/empty-state/visual.d.ts +7 -0
  401. package/build-types/empty-state/visual.d.ts.map +1 -0
  402. package/build-types/form/index.d.ts +3 -0
  403. package/build-types/form/index.d.ts.map +1 -0
  404. package/build-types/form/input-control/index.d.ts +2 -0
  405. package/build-types/form/input-control/index.d.ts.map +1 -0
  406. package/build-types/form/input-control/input-control.d.ts +6 -0
  407. package/build-types/form/input-control/input-control.d.ts.map +1 -0
  408. package/build-types/form/input-control/stories/index.story.d.ts +16 -0
  409. package/build-types/form/input-control/stories/index.story.d.ts.map +1 -0
  410. package/build-types/form/input-control/test/index.test.d.ts +2 -0
  411. package/build-types/form/input-control/test/index.test.d.ts.map +1 -0
  412. package/build-types/form/input-control/types.d.ts +4 -0
  413. package/build-types/form/input-control/types.d.ts.map +1 -0
  414. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  415. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
  416. package/build-types/form/primitives/input/stories/index.story.d.ts +2 -0
  417. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
  418. package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
  419. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +5 -0
  420. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
  421. package/build-types/form/stories/shared.d.ts +3 -0
  422. package/build-types/form/stories/shared.d.ts.map +1 -0
  423. package/build-types/form/types.d.ts +30 -0
  424. package/build-types/form/types.d.ts.map +1 -0
  425. package/build-types/index.d.ts +4 -1
  426. package/build-types/index.d.ts.map +1 -1
  427. package/build-types/notice/index.d.ts +0 -1
  428. package/build-types/notice/index.d.ts.map +1 -1
  429. package/build-types/tabs/context.d.ts +26 -0
  430. package/build-types/tabs/context.d.ts.map +1 -0
  431. package/build-types/tabs/panel.d.ts.map +1 -1
  432. package/build-types/tabs/root.d.ts.map +1 -1
  433. package/build-types/tabs/tab.d.ts.map +1 -1
  434. package/build-types/tooltip/root.d.ts +12 -0
  435. package/build-types/tooltip/root.d.ts.map +1 -1
  436. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  437. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts +2 -0
  438. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts.map +1 -0
  439. package/build-types/utils/use-deprioritized-initial-focus.d.ts +35 -0
  440. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -0
  441. package/package.json +17 -16
  442. package/src/alert-dialog/context.tsx +14 -0
  443. package/src/alert-dialog/index.ts +3 -0
  444. package/src/alert-dialog/popup.tsx +58 -0
  445. package/src/alert-dialog/root.tsx +48 -0
  446. package/src/alert-dialog/stories/index.story.tsx +254 -0
  447. package/src/alert-dialog/style.module.css +10 -0
  448. package/src/alert-dialog/test/index.test.tsx +537 -0
  449. package/src/alert-dialog/trigger.tsx +15 -0
  450. package/src/alert-dialog/types.ts +83 -0
  451. package/src/badge/style.module.css +5 -2
  452. package/src/button/style.module.css +2 -0
  453. package/src/card/stories/index.story.tsx +1 -1
  454. package/src/card/style.module.css +5 -7
  455. package/src/card/title.tsx +12 -11
  456. package/src/collapsible/index.ts +5 -0
  457. package/src/collapsible/panel.tsx +16 -0
  458. package/src/collapsible/root.tsx +15 -0
  459. package/src/collapsible/stories/index.story.tsx +108 -0
  460. package/src/collapsible/test/index.test.tsx +228 -0
  461. package/src/collapsible/trigger.tsx +15 -0
  462. package/src/collapsible/types.ts +24 -0
  463. package/src/collapsible-card/content.tsx +17 -4
  464. package/src/collapsible-card/context.ts +7 -0
  465. package/src/collapsible-card/header-description.tsx +43 -0
  466. package/src/collapsible-card/header.tsx +50 -45
  467. package/src/collapsible-card/index.ts +2 -1
  468. package/src/collapsible-card/root.tsx +1 -1
  469. package/src/collapsible-card/stories/index.story.tsx +99 -1
  470. package/src/collapsible-card/style.module.css +49 -4
  471. package/src/collapsible-card/test/index.test.tsx +107 -40
  472. package/src/collapsible-card/types.ts +22 -0
  473. package/src/dialog/action.tsx +8 -2
  474. package/src/dialog/close-icon.tsx +1 -0
  475. package/src/dialog/popup.tsx +21 -2
  476. package/src/dialog/stories/index.story.tsx +0 -28
  477. package/src/dialog/style.module.css +5 -5
  478. package/src/dialog/test/index.test.tsx +117 -0
  479. package/src/dialog/types.ts +11 -5
  480. package/src/empty-state/actions.tsx +24 -0
  481. package/src/empty-state/description.tsx +27 -0
  482. package/src/empty-state/icon.tsx +24 -0
  483. package/src/empty-state/index.ts +8 -0
  484. package/src/empty-state/root.tsx +23 -0
  485. package/src/empty-state/stories/index.story.tsx +64 -0
  486. package/src/empty-state/style.module.css +53 -0
  487. package/src/empty-state/test/actions.test.tsx +18 -0
  488. package/src/empty-state/test/description.test.tsx +13 -0
  489. package/src/empty-state/test/icon.test.tsx +13 -0
  490. package/src/empty-state/test/root.test.tsx +13 -0
  491. package/src/empty-state/test/title.test.tsx +13 -0
  492. package/src/empty-state/test/visual.test.tsx +17 -0
  493. package/src/empty-state/title.tsx +23 -0
  494. package/src/empty-state/types.ts +45 -0
  495. package/src/empty-state/visual.tsx +24 -0
  496. package/src/form/index.ts +3 -0
  497. package/src/form/input-control/index.ts +1 -0
  498. package/src/form/input-control/input-control.tsx +33 -0
  499. package/src/form/input-control/stories/index.story.tsx +163 -0
  500. package/src/form/input-control/test/index.test.tsx +53 -0
  501. package/src/form/input-control/types.ts +5 -0
  502. package/src/form/primitives/field/root.tsx +2 -2
  503. package/src/form/primitives/field/stories/index.story.tsx +2 -7
  504. package/src/form/primitives/fieldset/stories/index.story.tsx +2 -7
  505. package/src/form/primitives/input/stories/index.story.tsx +7 -0
  506. package/src/form/primitives/input-layout/slot.tsx +6 -2
  507. package/src/form/primitives/input-layout/stories/index.story.tsx +22 -1
  508. package/src/form/primitives/stories/overview.mdx +15 -0
  509. package/src/form/primitives/textarea/textarea.tsx +1 -1
  510. package/src/form/stories/shared.tsx +19 -0
  511. package/src/form/types.ts +34 -0
  512. package/src/index.ts +4 -1
  513. package/src/notice/index.ts +0 -2
  514. package/src/notice/style.module.css +1 -1
  515. package/src/tabs/context.tsx +170 -0
  516. package/src/tabs/panel.tsx +3 -0
  517. package/src/tabs/root.tsx +6 -1
  518. package/src/tabs/style.module.css +1 -1
  519. package/src/tabs/tab.tsx +3 -0
  520. package/src/tabs/test/index.test.tsx +162 -0
  521. package/src/tooltip/root.tsx +12 -0
  522. package/src/tooltip/stories/index.story.tsx +20 -15
  523. package/src/utils/css/focus.module.css +4 -2
  524. package/src/utils/css/item-popup.module.css +1 -0
  525. package/src/utils/css/select-trigger.module.css +1 -0
  526. package/src/utils/test/use-deprioritized-initial-focus.test.tsx +230 -0
  527. package/src/utils/use-deprioritized-initial-focus.ts +83 -0
  528. package/AGENTS.md +0 -9
  529. package/CLAUDE.md +0 -1
package/CHANGELOG.md CHANGED
@@ -2,22 +2,63 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- ## 0.9.0-next.0 (2026-03-10)
5
+ ## 0.10.0 (2026-04-01)
6
+
7
+ ### New Features
8
+
9
+ - Add `AlertDialog` primitive ([#76847](https://github.com/WordPress/gutenberg/pull/76847)).
10
+ - Add `InputControl` component ([#76653](https://github.com/WordPress/gutenberg/pull/76653)).
11
+ - `Dialog`: Expose `initialFocus` and `finalFocus` props on `Dialog.Popup` for custom focus management ([#76860](https://github.com/WordPress/gutenberg/pull/76860)).
12
+ - `CollapsibleCard`: Add `HeaderDescription` subcomponent for supplementary header content with `aria-describedby` relationship ([#76867](https://github.com/WordPress/gutenberg/pull/76867)).
13
+
14
+ ### Bug Fixes
15
+
16
+ - `Card`: Add `overflow: clip` to `Card.Root` to prevent child content from overflowing rounded corners ([#76678](https://github.com/WordPress/gutenberg/pull/76678)).
17
+ - `CollapsibleCard`: do not animate the focus ring when expanding/collapsing the card ([#76459](https://github.com/WordPress/gutenberg/pull/76459)).
18
+
19
+ ### Enhancements
20
+
21
+ - `Dialog.Root`: expose `disablePointerDismissal` prop ([#76847](https://github.com/WordPress/gutenberg/pull/76847)).
22
+ - `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)).
23
+
24
+ ### Internal
25
+
26
+ - Extract `useDeprioritizedInitialFocus` shared hook for reuse across overlay components ([#76910](https://github.com/WordPress/gutenberg/pull/76910)).
27
+ - `Tabs`: Add development-mode validation for Tab/Panel count matching ([#75170](https://github.com/WordPress/gutenberg/pull/75170)).
28
+
29
+ ### TypeScript
30
+
31
+ - Remove `NoticeIntent` type from package exports ([#76791](https://github.com/WordPress/gutenberg/pull/76791)).
32
+
33
+ ## 0.9.0 (2026-03-18)
6
34
 
7
35
  ### New Features
8
36
 
9
37
  - Add `Text` primitive with predefined typographic variants (`heading-2xl` through `heading-sm`, `body-xl` through `body-sm`) built on design tokens ([#75870](https://github.com/WordPress/gutenberg/pull/75870)).
10
38
  - Add `Card` and `CollapsibleCard` primitives ([#76252](https://github.com/WordPress/gutenberg/pull/76252)).
11
39
  - Add `Link` primitive ([#76013](https://github.com/WordPress/gutenberg/pull/76013)).
40
+ - Add `Collapsible` primitive ([#76280](https://github.com/WordPress/gutenberg/pull/76280)).
12
41
 
13
42
  ### Bug Fixes
14
43
 
44
+ - `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)).
15
45
  - `VisuallyHidden`: Add `word-break: normal` to prevent text wrapping issues in screen reader content ([#75539](https://github.com/WordPress/gutenberg/pull/75539)).
16
46
 
17
47
  ### Enhancements
18
48
 
49
+ - `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)).
50
+ - `Dialog`: Use `--wpds-dimension-surface-width-*` design tokens for width constraints ([#76494](https://github.com/WordPress/gutenberg/pull/76494)).
19
51
  - `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)).
20
52
  - `Notice`: Use `Text` component for `Title` and `Description` typography ([#75870](https://github.com/WordPress/gutenberg/pull/75870)).
53
+ - `Card`: Use `Text` component for `Title` typography ([#76642](https://github.com/WordPress/gutenberg/pull/76642)).
54
+ - `Card`, `CollapsibleCard`: update padding to match legacy `Card` component ([#76368](https://github.com/WordPress/gutenberg/pull/76368)).
55
+ - `CollapsibleCard`: move trigger to the header ([#76265](https://github.com/WordPress/gutenberg/pull/76265)).
56
+ - `CollapsibleCard`: add animations ([#76378](https://github.com/WordPress/gutenberg/pull/76378)).
57
+ - `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)).
58
+
59
+ ### Internal
60
+
61
+ - 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)).
21
62
 
22
63
  ## 0.8.0 (2026-03-04)
23
64
 
package/CONTRIBUTING.md CHANGED
@@ -26,6 +26,37 @@ 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
+
29
60
  ## CSS Architecture
30
61
 
31
62
  ### CSS Layers
package/README.md CHANGED
@@ -96,6 +96,112 @@ function MyComponent() {
96
96
  }
97
97
  ```
98
98
 
99
+ ### Controlled and Uncontrolled Modes
100
+
101
+ Interactive components that manage internal state (such as open/closed, selected value, etc.) follow a consistent prop naming convention that supports both **controlled** and **uncontrolled** usage.
102
+
103
+ #### Prop naming pattern
104
+
105
+ For a given state `x`, the convention is:
106
+
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. |
111
+ | `onXChange` | Callback invoked when the state changes. Receives the new value as its first argument. Works in both controlled and uncontrolled modes. |
112
+
113
+ For example, a component with an open/closed state would expose:
114
+
115
+ - `defaultOpen` — initial open state (uncontrolled)
116
+ - `open` — current open state (controlled)
117
+ - `onOpenChange` — called when the open state changes
118
+
119
+ And a component with a selectable value would expose:
120
+
121
+ - `defaultValue` — initial value (uncontrolled)
122
+ - `value` — current value (controlled)
123
+ - `onValueChange` — called when the value changes
124
+
125
+ #### Uncontrolled usage
126
+
127
+ In uncontrolled mode, the component manages its own state. Use `defaultX` to set the initial value, and optionally `onXChange` to react to changes:
128
+
129
+ ```tsx
130
+ import { Tabs } from '@wordpress/ui';
131
+
132
+ function MyTabs() {
133
+ return (
134
+ <Tabs.Root
135
+ defaultValue="tab1"
136
+ onValueChange={ ( value ) => console.log( value ) }
137
+ >
138
+ <Tabs.List>
139
+ <Tabs.Tab value="tab1">Tab 1</Tabs.Tab>
140
+ <Tabs.Tab value="tab2">Tab 2</Tabs.Tab>
141
+ </Tabs.List>
142
+ <Tabs.Panel value="tab1">Content 1</Tabs.Panel>
143
+ <Tabs.Panel value="tab2">Content 2</Tabs.Panel>
144
+ </Tabs.Root>
145
+ );
146
+ }
147
+ ```
148
+
149
+ #### Controlled usage
150
+
151
+ In controlled mode, the consumer owns the state and passes it via `x`. State changes are handled through `onXChange`:
152
+
153
+ ```tsx
154
+ import { useState } from '@wordpress/element';
155
+ import { CollapsibleCard } from '@wordpress/ui';
156
+
157
+ function MyCard() {
158
+ const [ isOpen, setIsOpen ] = useState( false );
159
+
160
+ return (
161
+ <CollapsibleCard.Root open={ isOpen } onOpenChange={ setIsOpen }>
162
+ <CollapsibleCard.Header>Details</CollapsibleCard.Header>
163
+ <CollapsibleCard.Content>
164
+ Collapsible content here.
165
+ </CollapsibleCard.Content>
166
+ </CollapsibleCard.Root>
167
+ );
168
+ }
169
+ ```
170
+
171
+ When both `x` and `defaultX` are provided, `x` takes precedence and the component behaves in controlled mode. When neither is provided, the component uses its own internal default (typically documented via a `@default` JSDoc tag on the `defaultX` prop).
172
+
173
+ #### Difference from native `onChange`
174
+
175
+ The `onXChange` callback is distinct from the native DOM `onChange` event handler. Native `onChange` fires a `React.ChangeEvent` tied to a specific DOM element, while `onXChange` provides the new **value** directly — making it simpler to use and consistent across all components, including compound and non-form components.
176
+
177
+ Components that wrap native form elements may still support native event handlers (like `onChange`, `onInput`) for interoperability, but `onXChange` is the recommended approach within this package.
178
+
179
+ #### Guidelines for component authors
180
+
181
+ When designing props for a new component:
182
+
183
+ - Always offer both controlled and uncontrolled modes when the component has user-facing state.
184
+ - Name the uncontrolled prop `defaultX`, the controlled prop `x`, and the callback `onXChange`.
185
+ - In JSDoc comments, indicate which mode each prop is for and cross-reference the alternative:
186
+ ```ts
187
+ /**
188
+ * Whether the panel is currently open (controlled).
189
+ *
190
+ * To render an uncontrolled component, use the `defaultOpen` prop instead.
191
+ */
192
+ open?: boolean;
193
+ /**
194
+ * Whether the panel is initially open (uncontrolled).
195
+ * @default false
196
+ */
197
+ defaultOpen?: boolean;
198
+ /**
199
+ * Event handler called when the open state changes.
200
+ */
201
+ onOpenChange?: ( open: boolean ) => void;
202
+ ```
203
+ - Provide a `@default` JSDoc tag for the uncontrolled prop when there is a sensible default.
204
+
99
205
  ## Contributing to this package
100
206
 
101
207
  This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to [npm](https://www.npmjs.com/) and used by [WordPress](https://make.wordpress.org/core/) as well as other software projects.
@@ -0,0 +1,34 @@
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 AlertDialogContext = (0, import_element.createContext)({
28
+ intent: "default"
29
+ });
30
+ // Annotate the CommonJS export names for ESM import in node:
31
+ 0 && (module.exports = {
32
+ AlertDialogContext
33
+ });
34
+ //# 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';\nimport type { RootProps } from './types';\n\ntype Intent = NonNullable< RootProps[ 'intent' ] >;\n\ninterface AlertDialogContextValue {\n\tintent: Intent;\n}\n\nconst AlertDialogContext = createContext< AlertDialogContextValue >( {\n\tintent: 'default',\n} );\n\nexport { AlertDialogContext };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAA8B;AAS9B,IAAM,yBAAqB,8BAA0C;AAAA,EACpE,QAAQ;AACT,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,93 @@
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: () => Popup2
34
+ });
35
+ module.exports = __toCommonJS(popup_exports);
36
+ var import_element = require("@wordpress/element");
37
+ var import_i18n = require("@wordpress/i18n");
38
+ var import_button = require("../button/index.cjs");
39
+ var Dialog = __toESM(require("../dialog/index.cjs"));
40
+ var import_context = require("./context.cjs");
41
+
42
+ // packages/ui/src/alert-dialog/style.module.css
43
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='35295c8521']")) {
44
+ const style = document.createElement("style");
45
+ style.setAttribute("data-wp-hash", "35295c8521");
46
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@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)}}"));
47
+ document.head.appendChild(style);
48
+ }
49
+ var style_default = { "irreversible-action": "_2ddc2fc9155a1dad__irreversible-action" };
50
+
51
+ // packages/ui/src/alert-dialog/popup.tsx
52
+ var import_jsx_runtime = require("react/jsx-runtime");
53
+ var Popup2 = (0, import_element.forwardRef)(
54
+ function AlertDialogPopup({
55
+ title,
56
+ children,
57
+ onConfirm,
58
+ confirmButtonText = (0, import_i18n.__)("OK"),
59
+ cancelButtonText = (0, import_i18n.__)("Cancel"),
60
+ loading
61
+ }, ref) {
62
+ const { intent } = (0, import_element.useContext)(import_context.AlertDialogContext);
63
+ const ConfirmButton = loading !== void 0 ? import_button.Button : Dialog.Action;
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Dialog.Popup, { ref, children: [
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Title, { children: title }) }),
66
+ children,
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Dialog.Footer, { children: [
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ Dialog.Action,
70
+ {
71
+ variant: "minimal",
72
+ disabled: loading || void 0,
73
+ children: cancelButtonText
74
+ }
75
+ ),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
+ ConfirmButton,
78
+ {
79
+ className: intent === "irreversible" ? style_default["irreversible-action"] : void 0,
80
+ onClick: onConfirm,
81
+ loading,
82
+ children: confirmButtonText
83
+ }
84
+ )
85
+ ] })
86
+ ] });
87
+ }
88
+ );
89
+ // Annotate the CommonJS export names for ESM import in node:
90
+ 0 && (module.exports = {
91
+ Popup
92
+ });
93
+ //# sourceMappingURL=popup.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/popup.tsx", "../../src/alert-dialog/style.module.css"],
4
+ "sourcesContent": ["import { forwardRef, useContext } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { Button } from '../button';\nimport * as Dialog from '../dialog';\nimport { AlertDialogContext } from './context';\nimport styles from './style.module.css';\nimport type { PopupProps } from './types';\n\nconst Popup = forwardRef< HTMLDivElement, PopupProps >(\n\tfunction AlertDialogPopup(\n\t\t{\n\t\t\ttitle,\n\t\t\tchildren,\n\t\t\tonConfirm,\n\t\t\tconfirmButtonText = __( 'OK' ),\n\t\t\tcancelButtonText = __( 'Cancel' ),\n\t\t\tloading,\n\t\t},\n\t\tref\n\t) {\n\t\tconst { intent } = useContext( AlertDialogContext );\n\n\t\t// When `loading` is provided, the consumer controls when the dialog\n\t\t// closes (async flow). Use a plain Button so clicking confirm doesn't\n\t\t// auto-close \u2014 the consumer sets `open={false}` after their operation.\n\t\tconst ConfirmButton = loading !== undefined ? Button : Dialog.Action;\n\n\t\treturn (\n\t\t\t<Dialog.Popup ref={ ref }>\n\t\t\t\t<Dialog.Header>\n\t\t\t\t\t<Dialog.Title>{ title }</Dialog.Title>\n\t\t\t\t</Dialog.Header>\n\t\t\t\t{ children }\n\t\t\t\t<Dialog.Footer>\n\t\t\t\t\t<Dialog.Action\n\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t\tdisabled={ loading || undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ cancelButtonText }\n\t\t\t\t\t</Dialog.Action>\n\t\t\t\t\t<ConfirmButton\n\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\tintent === 'irreversible'\n\t\t\t\t\t\t\t\t? styles[ 'irreversible-action' ]\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={ onConfirm }\n\t\t\t\t\t\tloading={ loading }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ confirmButtonText }\n\t\t\t\t\t</ConfirmButton>\n\t\t\t\t</Dialog.Footer>\n\t\t\t</Dialog.Popup>\n\t\t);\n\t}\n);\n\nexport { Popup };\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='35295c8521']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"35295c8521\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@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)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"irreversible-action\":\"_2ddc2fc9155a1dad__irreversible-action\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,eAAAA;AAAA;AAAA;AAAA,qBAAuC;AACvC,kBAAmB;AACnB,oBAAuB;AACvB,aAAwB;AACxB,qBAAmC;;;ACJnC,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,ugBAAugB,CAAC;AACljB,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,uBAAsB,yCAAwC;;;ADwBzE;AAtBL,IAAMC,aAAQ;AAAA,EACb,SAAS,iBACR;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,wBAAoB,gBAAI,IAAK;AAAA,IAC7B,uBAAmB,gBAAI,QAAS;AAAA,IAChC;AAAA,EACD,GACA,KACC;AACD,UAAM,EAAE,OAAO,QAAI,2BAAY,iCAAmB;AAKlD,UAAM,gBAAgB,YAAY,SAAY,uBAAgB;AAE9D,WACC,6CAAQ,cAAP,EAAa,KACb;AAAA,kDAAQ,eAAP,EACA,sDAAQ,cAAP,EAAe,iBAAO,GACxB;AAAA,MACE;AAAA,MACF,6CAAQ,eAAP,EACA;AAAA;AAAA,UAAQ;AAAA,UAAP;AAAA,YACA,SAAQ;AAAA,YACR,UAAW,WAAW;AAAA,YAEpB;AAAA;AAAA,QACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,WACC,WAAW,iBACR,cAAQ,qBAAsB,IAC9B;AAAA,YAEJ,SAAU;AAAA,YACV;AAAA,YAEE;AAAA;AAAA,QACH;AAAA,SACD;AAAA,OACD;AAAA,EAEF;AACD;",
6
+ "names": ["Popup", "Popup"]
7
+ }
@@ -0,0 +1,52 @@
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/root.tsx
21
+ var root_exports = {};
22
+ __export(root_exports, {
23
+ Root: () => Root
24
+ });
25
+ module.exports = __toCommonJS(root_exports);
26
+ var import_alert_dialog = require("@base-ui/react/alert-dialog");
27
+ var import_element = require("@wordpress/element");
28
+ var import_context = require("./context.cjs");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ function Root({
31
+ intent = "default",
32
+ children,
33
+ open,
34
+ onOpenChange,
35
+ defaultOpen
36
+ }) {
37
+ const contextValue = (0, import_element.useMemo)(() => ({ intent }), [intent]);
38
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
39
+ import_alert_dialog.AlertDialog.Root,
40
+ {
41
+ open,
42
+ onOpenChange,
43
+ defaultOpen,
44
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_context.AlertDialogContext.Provider, { value: contextValue, children })
45
+ }
46
+ );
47
+ }
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ Root
51
+ });
52
+ //# sourceMappingURL=root.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/root.tsx"],
4
+ "sourcesContent": ["import { AlertDialog as _AlertDialog } from '@base-ui/react/alert-dialog';\nimport { useMemo } from '@wordpress/element';\nimport { AlertDialogContext } from './context';\nimport type { RootProps } from './types';\n\n/**\n * A dialog that requires a user response to proceed.\n *\n * Use `AlertDialog.Trigger` to render a button that opens the dialog.\n * Use `AlertDialog.Popup` to render the dialog content.\n * The `AlertDialog.Trigger` is optional \u2014 the dialog can also be controlled\n * via `open` / `onOpenChange` props.\n *\n * ## Use cases\n *\n * - **Default intent**: Standard confirmation dialog for reversible actions.\n * - **Irreversible intent**: Confirmation dialog for irreversible actions that\n * cannot be undone. The confirm button uses error/danger coloring.\n *\n * For use cases outside the standard confirm/cancel pattern, use the lower-level\n * `Dialog` component directly.\n *\n * See the [Destructive Actions guidelines](?path=/docs/design-system-patterns-destructive-actions--docs)\n * for more details on when to use each pattern.\n */\nfunction Root( {\n\tintent = 'default',\n\tchildren,\n\topen,\n\tonOpenChange,\n\tdefaultOpen,\n}: RootProps ) {\n\tconst contextValue = useMemo( () => ( { intent } ), [ intent ] );\n\n\treturn (\n\t\t<_AlertDialog.Root\n\t\t\topen={ open }\n\t\t\tonOpenChange={ onOpenChange }\n\t\t\tdefaultOpen={ defaultOpen }\n\t\t>\n\t\t\t<AlertDialogContext.Provider value={ contextValue }>\n\t\t\t\t{ children }\n\t\t\t</AlertDialogContext.Provider>\n\t\t</_AlertDialog.Root>\n\t);\n}\n\nexport { Root };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4C;AAC5C,qBAAwB;AACxB,qBAAmC;AAsChC;AAfH,SAAS,KAAM;AAAA,EACd,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAe;AACd,QAAM,mBAAe,wBAAS,OAAQ,EAAE,OAAO,IAAK,CAAE,MAAO,CAAE;AAE/D,SACC;AAAA,IAAC,oBAAAA,YAAa;AAAA,IAAb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,sDAAC,kCAAmB,UAAnB,EAA4B,OAAQ,cAClC,UACH;AAAA;AAAA,EACD;AAEF;",
6
+ "names": ["_AlertDialog"]
7
+ }
@@ -0,0 +1,48 @@
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/trigger.tsx
31
+ var trigger_exports = {};
32
+ __export(trigger_exports, {
33
+ Trigger: () => Trigger2
34
+ });
35
+ module.exports = __toCommonJS(trigger_exports);
36
+ var import_element = require("@wordpress/element");
37
+ var Dialog = __toESM(require("../dialog/index.cjs"));
38
+ var import_jsx_runtime = require("react/jsx-runtime");
39
+ var Trigger2 = (0, import_element.forwardRef)(
40
+ function AlertDialogTrigger(props, ref) {
41
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Dialog.Trigger, { ref, ...props });
42
+ }
43
+ );
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ Trigger
47
+ });
48
+ //# sourceMappingURL=trigger.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/trigger.tsx"],
4
+ "sourcesContent": ["import { forwardRef } from '@wordpress/element';\n\nimport * as Dialog from '../dialog';\nimport type { TriggerProps } from './types';\n\n/**\n * Renders a button that opens the alert dialog when clicked.\n */\nconst Trigger = forwardRef< HTMLButtonElement, TriggerProps >(\n\tfunction AlertDialogTrigger( props, ref ) {\n\t\treturn <Dialog.Trigger ref={ ref } { ...props } />;\n\t}\n);\n\nexport { Trigger };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;AAAA,qBAA2B;AAE3B,aAAwB;AAQf;AAFT,IAAMA,eAAU;AAAA,EACf,SAAS,mBAAoB,OAAO,KAAM;AACzC,WAAO,4CAAQ,gBAAP,EAAe,KAAc,GAAG,OAAQ;AAAA,EACjD;AACD;",
6
+ "names": ["Trigger"]
7
+ }
@@ -0,0 +1,19 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // packages/ui/src/alert-dialog/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/alert-dialog/types.ts"],
4
+ "sourcesContent": ["import type { AlertDialog as _AlertDialog } from '@base-ui/react/alert-dialog';\nimport type { ReactNode } from 'react';\n\nimport type { TriggerProps as DialogTriggerProps } from '../dialog/types';\n\nexport interface RootProps\n\textends Pick<\n\t\t_AlertDialog.Root.Props,\n\t\t'open' | 'onOpenChange' | 'defaultOpen'\n\t> {\n\t/**\n\t * The content to be rendered inside the component. Typically includes\n\t * `AlertDialog.Trigger` and `AlertDialog.Popup`.\n\t */\n\tchildren: ReactNode;\n\n\t/**\n\t * The semantic intent of the dialog, which determines its styling.\n\t *\n\t * All intents use `role=\"alertdialog\"`, are always modal, and block\n\t * backdrop click dismissal. Escape key and the cancel/confirm buttons\n\t * still dismiss the dialog.\n\t *\n\t * - `'default'`: Standard confirmation dialog for reversible actions.\n\t * - `'irreversible'`: Confirmation dialog for irreversible actions that\n\t * cannot be undone. The confirm button uses error/danger coloring.\n\t *\n\t * @default 'default'\n\t */\n\tintent?: 'default' | 'irreversible';\n}\n\nexport type TriggerProps = DialogTriggerProps;\n\nexport interface PopupProps {\n\t/**\n\t * The title displayed in the dialog header. This serves as both the\n\t * visible heading and the accessible label for the dialog.\n\t */\n\ttitle: string;\n\n\t/**\n\t * The message content displayed in the dialog body.\n\t */\n\tchildren: ReactNode;\n\n\t/**\n\t * Callback fired when the user confirms the action.\n\t */\n\tonConfirm: () => void;\n\n\t/**\n\t * Custom text for the confirm button.\n\t *\n\t * @default 'OK'\n\t */\n\tconfirmButtonText?: string;\n\n\t/**\n\t * Custom text for the cancel button.\n\t *\n\t * @default 'Cancel'\n\t */\n\tcancelButtonText?: string;\n\n\t/**\n\t * Whether the confirm action is in a loading state (e.g. an async\n\t * operation is in progress). When `true`, the confirm button shows a\n\t * spinner and the cancel button is disabled.\n\t *\n\t * **Important:** Passing this prop \u2014 even as `false` \u2014 opts into\n\t * manual-close mode: the confirm button will no longer auto-close the\n\t * dialog. The consumer is responsible for setting `open={false}` when\n\t * the operation completes. Omit the prop entirely for the default\n\t * auto-close-on-confirm behavior.\n\t *\n\t * To implement an async confirm flow, use controlled mode\n\t * (`open` / `onOpenChange`) and manage the loading state externally:\n\t * prevent closing in `onOpenChange` while loading, and set\n\t * `open={false}` once the operation completes.\n\t */\n\tloading?: boolean;\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -38,10 +38,10 @@ var import_clsx = __toESM(require("clsx"));
38
38
  var import_element = require("@wordpress/element");
39
39
 
40
40
  // packages/ui/src/badge/style.module.css
41
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='244b5c59c0']")) {
41
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='a407d6dd3d']")) {
42
42
  const style = document.createElement("style");
43
- style.setAttribute("data-wp-hash", "244b5c59c0");
44
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}'));
43
+ style.setAttribute("data-wp-hash", "a407d6dd3d");
44
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#d8d8d8);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}'));
45
45
  document.head.appendChild(style);
46
46
  }
47
47
  var style_default = { "badge": "_96e6251aad1a6136__badge", "is-high-intent": "_99f7158cb520f750__is-high-intent", "is-medium-intent": "c20ebef2365bc8b7__is-medium-intent", "is-low-intent": "_365e1626c6202e52__is-low-intent", "is-stable-intent": "_33f8198127ddf4ef__is-stable-intent", "is-informational-intent": "_04c1aca8fc449412__is-informational-intent", "is-draft-intent": "_90726e69d495ec19__is-draft-intent", "is-none-intent": "_898f4a544993bd39__is-none-intent" };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/badge/badge.tsx", "../../src/badge/style.module.css"],
4
- "sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { type BadgeProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * A badge component for displaying labels with semantic intent.\n */\nexport const Badge = forwardRef< HTMLSpanElement, BadgeProps >( function Badge(\n\t{ children, intent = 'none', render, className, ...props },\n\tref\n) {\n\tconst element = useRender( {\n\t\trender,\n\t\tdefaultTagName: 'span',\n\t\tref,\n\t\tprops: mergeProps< 'span' >( props, {\n\t\t\tclassName: clsx(\n\t\t\t\tstyles.badge,\n\t\t\t\tstyles[ `is-${ intent }-intent` ],\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tchildren,\n\t\t} ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='244b5c59c0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"244b5c59c0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral,#f8f8f8);color:var(--wpds-color-fg-content-neutral-weak,#6d6d6d)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"badge\":\"_96e6251aad1a6136__badge\",\"is-high-intent\":\"_99f7158cb520f750__is-high-intent\",\"is-medium-intent\":\"c20ebef2365bc8b7__is-medium-intent\",\"is-low-intent\":\"_365e1626c6202e52__is-low-intent\",\"is-stable-intent\":\"_33f8198127ddf4ef__is-stable-intent\",\"is-informational-intent\":\"_04c1aca8fc449412__is-informational-intent\",\"is-draft-intent\":\"_90726e69d495ec19__is-draft-intent\",\"is-none-intent\":\"_898f4a544993bd39__is-none-intent\"};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,kBAAiB;AACjB,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,8kDAA0lD,CAAC;AACroD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,kBAAiB,qCAAoC,oBAAmB,sCAAqC,iBAAgB,oCAAmC,oBAAmB,uCAAsC,2BAA0B,8CAA6C,mBAAkB,sCAAqC,kBAAiB,oCAAmC;;;ADGvb,IAAM,YAAQ,2BAA2C,SAASA,OACxE,EAAE,UAAU,SAAS,QAAQ,QAAQ,WAAW,GAAG,MAAM,GACzD,KACC;AACD,QAAM,cAAU,wBAAW;AAAA,IAC1B;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA,WAAO,yBAAsB,OAAO;AAAA,MACnC,eAAW,YAAAC;AAAA,QACV,cAAO;AAAA,QACP,cAAQ,MAAO,MAAO,SAAU;AAAA,QAChC;AAAA,MACD;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR,CAAE;",
4
+ "sourcesContent": ["import { useRender, mergeProps } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { type BadgeProps } from './types';\nimport styles from './style.module.css';\n\n/**\n * A badge component for displaying labels with semantic intent.\n */\nexport const Badge = forwardRef< HTMLSpanElement, BadgeProps >( function Badge(\n\t{ children, intent = 'none', render, className, ...props },\n\tref\n) {\n\tconst element = useRender( {\n\t\trender,\n\t\tdefaultTagName: 'span',\n\t\tref,\n\t\tprops: mergeProps< 'span' >( props, {\n\t\t\tclassName: clsx(\n\t\t\t\tstyles.badge,\n\t\t\t\tstyles[ `is-${ intent }-intent` ],\n\t\t\t\tclassName\n\t\t\t),\n\t\t\tchildren,\n\t\t} ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a407d6dd3d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a407d6dd3d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._96e6251aad1a6136__badge{border-radius:var(--wpds-border-radius-lg,8px);font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-sm,12px);font-weight:var(--wpds-font-weight-regular,400);line-height:var(--wpds-font-line-height-xs,16px);padding-block:var(--wpds-dimension-padding-xs,4px);padding-inline:var(--wpds-dimension-padding-sm,8px)}._99f7158cb520f750__is-high-intent{background-color:var(--wpds-color-bg-surface-error,#f6e6e3);color:var(--wpds-color-fg-content-error,#470000)}.c20ebef2365bc8b7__is-medium-intent{background-color:var(--wpds-color-bg-surface-warning,#fde6bd);color:var(--wpds-color-fg-content-warning,#2e1900)}._365e1626c6202e52__is-low-intent{background-color:var(--wpds-color-bg-surface-caution,#fee994);color:var(--wpds-color-fg-content-caution,#281d00)}._33f8198127ddf4ef__is-stable-intent{background-color:var(--wpds-color-bg-surface-success,#c5f7cc);color:var(--wpds-color-fg-content-success,#002900)}._04c1aca8fc449412__is-informational-intent{background-color:var(--wpds-color-bg-surface-info,#deebfa);color:var(--wpds-color-fg-content-info,#001b4f)}._90726e69d495ec19__is-draft-intent{background-color:var(--wpds-color-bg-surface-neutral-weak,#f0f0f0);color:var(--wpds-color-fg-content-neutral,#1e1e1e)}._898f4a544993bd39__is-none-intent{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral,#d8d8d8);color:var(--wpds-color-fg-content-neutral,#1e1e1e);padding-block:calc(var(--wpds-dimension-padding-xs, 4px) - var(--wpds-border-width-xs, 1px));padding-inline:calc(var(--wpds-dimension-padding-sm, 8px) - var(--wpds-border-width-xs, 1px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"badge\":\"_96e6251aad1a6136__badge\",\"is-high-intent\":\"_99f7158cb520f750__is-high-intent\",\"is-medium-intent\":\"c20ebef2365bc8b7__is-medium-intent\",\"is-low-intent\":\"_365e1626c6202e52__is-low-intent\",\"is-stable-intent\":\"_33f8198127ddf4ef__is-stable-intent\",\"is-informational-intent\":\"_04c1aca8fc449412__is-informational-intent\",\"is-draft-intent\":\"_90726e69d495ec19__is-draft-intent\",\"is-none-intent\":\"_898f4a544993bd39__is-none-intent\"};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsC;AACtC,kBAAiB;AACjB,qBAA2B;;;ACF3B,IAAI,OAAO,aAAa,eAAe,QAAQ,IAAI,aAAa,UAAU,CAAC,SAAS,KAAK,cAAc,kCAAkC,GAAG;AAC3I,QAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,QAAM,aAAa,gBAAgB,YAAY;AAC/C,QAAM,YAAY,SAAS,eAAe,s2DAAk3D,CAAC;AAC75D,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,SAAQ,4BAA2B,kBAAiB,qCAAoC,oBAAmB,sCAAqC,iBAAgB,oCAAmC,oBAAmB,uCAAsC,2BAA0B,8CAA6C,mBAAkB,sCAAqC,kBAAiB,oCAAmC;;;ADGvb,IAAM,YAAQ,2BAA2C,SAASA,OACxE,EAAE,UAAU,SAAS,QAAQ,QAAQ,WAAW,GAAG,MAAM,GACzD,KACC;AACD,QAAM,cAAU,wBAAW;AAAA,IAC1B;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,IACA,WAAO,yBAAsB,OAAO;AAAA,MACnC,eAAW,YAAAC;AAAA,QACV,cAAO;AAAA,QACP,cAAQ,MAAO,MAAO,SAAU;AAAA,QAChC;AAAA,MACD;AAAA,MACA;AAAA,IACD,CAAE;AAAA,EACH,CAAE;AAEF,SAAO;AACR,CAAE;",
6
6
  "names": ["Badge", "clsx"]
7
7
  }