@wordpress/ui 0.9.1-next.v.202603161435.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 (478) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/CONTRIBUTING.md +31 -0
  3. package/build/alert-dialog/context.cjs +34 -0
  4. package/build/alert-dialog/context.cjs.map +7 -0
  5. package/build/alert-dialog/index.cjs +37 -0
  6. package/build/alert-dialog/index.cjs.map +7 -0
  7. package/build/alert-dialog/popup.cjs +93 -0
  8. package/build/alert-dialog/popup.cjs.map +7 -0
  9. package/build/alert-dialog/root.cjs +52 -0
  10. package/build/alert-dialog/root.cjs.map +7 -0
  11. package/build/alert-dialog/trigger.cjs +48 -0
  12. package/build/alert-dialog/trigger.cjs.map +7 -0
  13. package/build/alert-dialog/types.cjs +19 -0
  14. package/build/alert-dialog/types.cjs.map +7 -0
  15. package/build/badge/badge.cjs +2 -2
  16. package/build/badge/badge.cjs.map +1 -1
  17. package/build/button/button.cjs +7 -7
  18. package/build/button/button.cjs.map +2 -2
  19. package/build/card/content.cjs +3 -3
  20. package/build/card/content.cjs.map +2 -2
  21. package/build/card/full-bleed.cjs +3 -3
  22. package/build/card/full-bleed.cjs.map +2 -2
  23. package/build/card/header.cjs +3 -3
  24. package/build/card/header.cjs.map +2 -2
  25. package/build/card/root.cjs +5 -5
  26. package/build/card/root.cjs.map +2 -2
  27. package/build/card/title.cjs +26 -13
  28. package/build/card/title.cjs.map +3 -3
  29. package/build/collapsible-card/content.cjs +24 -3
  30. package/build/collapsible-card/content.cjs.map +4 -4
  31. package/build/collapsible-card/context.cjs +35 -0
  32. package/build/collapsible-card/context.cjs.map +7 -0
  33. package/build/collapsible-card/header-description.cjs +52 -0
  34. package/build/collapsible-card/header-description.cjs.map +7 -0
  35. package/build/collapsible-card/header.cjs +38 -17
  36. package/build/collapsible-card/header.cjs.map +2 -2
  37. package/build/collapsible-card/index.cjs +3 -0
  38. package/build/collapsible-card/index.cjs.map +2 -2
  39. package/build/collapsible-card/types.cjs.map +1 -1
  40. package/build/dialog/action.cjs +4 -2
  41. package/build/dialog/action.cjs.map +2 -2
  42. package/build/dialog/close-icon.cjs +2 -1
  43. package/build/dialog/close-icon.cjs.map +2 -2
  44. package/build/dialog/footer.cjs +3 -3
  45. package/build/dialog/footer.cjs.map +2 -2
  46. package/build/dialog/header.cjs +3 -3
  47. package/build/dialog/header.cjs.map +2 -2
  48. package/build/dialog/popup.cjs +22 -5
  49. package/build/dialog/popup.cjs.map +2 -2
  50. package/build/dialog/title.cjs +3 -3
  51. package/build/dialog/title.cjs.map +2 -2
  52. package/build/dialog/types.cjs.map +1 -1
  53. package/build/empty-state/actions.cjs +66 -0
  54. package/build/empty-state/actions.cjs.map +7 -0
  55. package/build/empty-state/description.cjs +66 -0
  56. package/build/empty-state/description.cjs.map +7 -0
  57. package/build/empty-state/icon.cjs +69 -0
  58. package/build/empty-state/icon.cjs.map +7 -0
  59. package/build/empty-state/index.cjs +46 -0
  60. package/build/empty-state/index.cjs.map +7 -0
  61. package/build/empty-state/root.cjs +66 -0
  62. package/build/empty-state/root.cjs.map +7 -0
  63. package/build/empty-state/title.cjs +68 -0
  64. package/build/empty-state/title.cjs.map +7 -0
  65. package/build/empty-state/types.cjs +19 -0
  66. package/build/empty-state/types.cjs.map +7 -0
  67. package/build/empty-state/visual.cjs +66 -0
  68. package/build/empty-state/visual.cjs.map +7 -0
  69. package/build/form/index.cjs +27 -0
  70. package/build/form/index.cjs.map +7 -0
  71. package/build/form/input-control/index.cjs +31 -0
  72. package/build/form/input-control/index.cjs.map +7 -0
  73. package/build/form/input-control/input-control.cjs +50 -0
  74. package/build/form/input-control/input-control.cjs.map +7 -0
  75. package/build/form/input-control/types.cjs +19 -0
  76. package/build/form/input-control/types.cjs.map +7 -0
  77. package/build/form/primitives/field/description.cjs +2 -2
  78. package/build/form/primitives/field/description.cjs.map +1 -1
  79. package/build/form/primitives/field/details.cjs +2 -2
  80. package/build/form/primitives/field/details.cjs.map +1 -1
  81. package/build/form/primitives/field/label.cjs +2 -2
  82. package/build/form/primitives/field/label.cjs.map +1 -1
  83. package/build/form/primitives/field/root.cjs +4 -4
  84. package/build/form/primitives/field/root.cjs.map +2 -2
  85. package/build/form/primitives/fieldset/description.cjs +2 -2
  86. package/build/form/primitives/fieldset/description.cjs.map +1 -1
  87. package/build/form/primitives/fieldset/details.cjs +2 -2
  88. package/build/form/primitives/fieldset/details.cjs.map +1 -1
  89. package/build/form/primitives/fieldset/legend.cjs +2 -2
  90. package/build/form/primitives/fieldset/legend.cjs.map +1 -1
  91. package/build/form/primitives/fieldset/root.cjs +2 -2
  92. package/build/form/primitives/fieldset/root.cjs.map +1 -1
  93. package/build/form/primitives/input/input.cjs +4 -4
  94. package/build/form/primitives/input/input.cjs.map +1 -1
  95. package/build/form/primitives/input-layout/input-layout.cjs +4 -4
  96. package/build/form/primitives/input-layout/input-layout.cjs.map +1 -1
  97. package/build/form/primitives/input-layout/slot.cjs +5 -4
  98. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  99. package/build/form/primitives/select/item.cjs +5 -5
  100. package/build/form/primitives/select/item.cjs.map +2 -2
  101. package/build/form/primitives/select/popup.cjs +7 -7
  102. package/build/form/primitives/select/popup.cjs.map +2 -2
  103. package/build/form/primitives/select/trigger.cjs +5 -5
  104. package/build/form/primitives/select/trigger.cjs.map +2 -2
  105. package/build/form/primitives/textarea/textarea.cjs +3 -3
  106. package/build/form/primitives/textarea/textarea.cjs.map +2 -2
  107. package/build/form/types.cjs +19 -0
  108. package/build/form/types.cjs.map +7 -0
  109. package/build/icon-button/icon-button.cjs +2 -2
  110. package/build/icon-button/icon-button.cjs.map +1 -1
  111. package/build/index.cjs +8 -2
  112. package/build/index.cjs.map +2 -2
  113. package/build/link/link.cjs +6 -6
  114. package/build/link/link.cjs.map +1 -1
  115. package/build/notice/action-button.cjs +2 -2
  116. package/build/notice/action-button.cjs.map +1 -1
  117. package/build/notice/action-link.cjs +2 -2
  118. package/build/notice/action-link.cjs.map +1 -1
  119. package/build/notice/actions.cjs +2 -2
  120. package/build/notice/actions.cjs.map +1 -1
  121. package/build/notice/close-icon.cjs +2 -2
  122. package/build/notice/close-icon.cjs.map +1 -1
  123. package/build/notice/description.cjs +2 -2
  124. package/build/notice/description.cjs.map +1 -1
  125. package/build/notice/index.cjs.map +1 -1
  126. package/build/notice/root.cjs +4 -4
  127. package/build/notice/root.cjs.map +1 -1
  128. package/build/notice/title.cjs +2 -2
  129. package/build/notice/title.cjs.map +1 -1
  130. package/build/stack/stack.cjs +2 -2
  131. package/build/stack/stack.cjs.map +1 -1
  132. package/build/tabs/context.cjs +121 -0
  133. package/build/tabs/context.cjs.map +7 -0
  134. package/build/tabs/list.cjs +3 -3
  135. package/build/tabs/list.cjs.map +2 -2
  136. package/build/tabs/panel.cjs +5 -3
  137. package/build/tabs/panel.cjs.map +2 -2
  138. package/build/tabs/root.cjs +2 -1
  139. package/build/tabs/root.cjs.map +2 -2
  140. package/build/tabs/tab.cjs +5 -3
  141. package/build/tabs/tab.cjs.map +2 -2
  142. package/build/text/text.cjs +2 -2
  143. package/build/text/text.cjs.map +1 -1
  144. package/build/tooltip/popup.cjs +4 -4
  145. package/build/tooltip/popup.cjs.map +1 -1
  146. package/build/tooltip/root.cjs.map +2 -2
  147. package/build/utils/use-deprioritized-initial-focus.cjs +64 -0
  148. package/build/utils/use-deprioritized-initial-focus.cjs.map +7 -0
  149. package/build/visually-hidden/visually-hidden.cjs +2 -2
  150. package/build/visually-hidden/visually-hidden.cjs.map +1 -1
  151. package/build-module/alert-dialog/context.mjs +9 -0
  152. package/build-module/alert-dialog/context.mjs.map +7 -0
  153. package/build-module/alert-dialog/index.mjs +10 -0
  154. package/build-module/alert-dialog/index.mjs.map +7 -0
  155. package/build-module/alert-dialog/popup.mjs +58 -0
  156. package/build-module/alert-dialog/popup.mjs.map +7 -0
  157. package/build-module/alert-dialog/root.mjs +27 -0
  158. package/build-module/alert-dialog/root.mjs.map +7 -0
  159. package/build-module/alert-dialog/trigger.mjs +13 -0
  160. package/build-module/alert-dialog/trigger.mjs.map +7 -0
  161. package/build-module/alert-dialog/types.mjs +1 -0
  162. package/build-module/alert-dialog/types.mjs.map +7 -0
  163. package/build-module/badge/badge.mjs +2 -2
  164. package/build-module/badge/badge.mjs.map +1 -1
  165. package/build-module/button/button.mjs +7 -7
  166. package/build-module/button/button.mjs.map +2 -2
  167. package/build-module/card/content.mjs +3 -3
  168. package/build-module/card/content.mjs.map +2 -2
  169. package/build-module/card/full-bleed.mjs +3 -3
  170. package/build-module/card/full-bleed.mjs.map +2 -2
  171. package/build-module/card/header.mjs +3 -3
  172. package/build-module/card/header.mjs.map +2 -2
  173. package/build-module/card/root.mjs +5 -5
  174. package/build-module/card/root.mjs.map +2 -2
  175. package/build-module/card/title.mjs +16 -13
  176. package/build-module/card/title.mjs.map +2 -2
  177. package/build-module/collapsible-card/content.mjs +24 -3
  178. package/build-module/collapsible-card/content.mjs.map +3 -3
  179. package/build-module/collapsible-card/context.mjs +10 -0
  180. package/build-module/collapsible-card/context.mjs.map +7 -0
  181. package/build-module/collapsible-card/header-description.mjs +27 -0
  182. package/build-module/collapsible-card/header-description.mjs.map +7 -0
  183. package/build-module/collapsible-card/header.mjs +39 -18
  184. package/build-module/collapsible-card/header.mjs.map +2 -2
  185. package/build-module/collapsible-card/index.mjs +2 -0
  186. package/build-module/collapsible-card/index.mjs.map +2 -2
  187. package/build-module/dialog/action.mjs +4 -2
  188. package/build-module/dialog/action.mjs.map +2 -2
  189. package/build-module/dialog/close-icon.mjs +2 -1
  190. package/build-module/dialog/close-icon.mjs.map +2 -2
  191. package/build-module/dialog/footer.mjs +3 -3
  192. package/build-module/dialog/footer.mjs.map +2 -2
  193. package/build-module/dialog/header.mjs +3 -3
  194. package/build-module/dialog/header.mjs.map +2 -2
  195. package/build-module/dialog/popup.mjs +22 -5
  196. package/build-module/dialog/popup.mjs.map +2 -2
  197. package/build-module/dialog/title.mjs +3 -3
  198. package/build-module/dialog/title.mjs.map +2 -2
  199. package/build-module/empty-state/actions.mjs +31 -0
  200. package/build-module/empty-state/actions.mjs.map +7 -0
  201. package/build-module/empty-state/description.mjs +31 -0
  202. package/build-module/empty-state/description.mjs.map +7 -0
  203. package/build-module/empty-state/icon.mjs +34 -0
  204. package/build-module/empty-state/icon.mjs.map +7 -0
  205. package/build-module/empty-state/index.mjs +16 -0
  206. package/build-module/empty-state/index.mjs.map +7 -0
  207. package/build-module/empty-state/root.mjs +31 -0
  208. package/build-module/empty-state/root.mjs.map +7 -0
  209. package/build-module/empty-state/title.mjs +33 -0
  210. package/build-module/empty-state/title.mjs.map +7 -0
  211. package/build-module/empty-state/types.mjs +1 -0
  212. package/build-module/empty-state/types.mjs.map +7 -0
  213. package/build-module/empty-state/visual.mjs +31 -0
  214. package/build-module/empty-state/visual.mjs.map +7 -0
  215. package/build-module/form/index.mjs +4 -0
  216. package/build-module/form/index.mjs.map +7 -0
  217. package/build-module/form/input-control/index.mjs +6 -0
  218. package/build-module/form/input-control/index.mjs.map +7 -0
  219. package/build-module/form/input-control/input-control.mjs +25 -0
  220. package/build-module/form/input-control/input-control.mjs.map +7 -0
  221. package/build-module/form/input-control/types.mjs +1 -0
  222. package/build-module/form/input-control/types.mjs.map +7 -0
  223. package/build-module/form/primitives/field/description.mjs +2 -2
  224. package/build-module/form/primitives/field/description.mjs.map +1 -1
  225. package/build-module/form/primitives/field/details.mjs +2 -2
  226. package/build-module/form/primitives/field/details.mjs.map +1 -1
  227. package/build-module/form/primitives/field/label.mjs +2 -2
  228. package/build-module/form/primitives/field/label.mjs.map +1 -1
  229. package/build-module/form/primitives/field/root.mjs +4 -4
  230. package/build-module/form/primitives/field/root.mjs.map +2 -2
  231. package/build-module/form/primitives/fieldset/description.mjs +2 -2
  232. package/build-module/form/primitives/fieldset/description.mjs.map +1 -1
  233. package/build-module/form/primitives/fieldset/details.mjs +2 -2
  234. package/build-module/form/primitives/fieldset/details.mjs.map +1 -1
  235. package/build-module/form/primitives/fieldset/legend.mjs +2 -2
  236. package/build-module/form/primitives/fieldset/legend.mjs.map +1 -1
  237. package/build-module/form/primitives/fieldset/root.mjs +2 -2
  238. package/build-module/form/primitives/fieldset/root.mjs.map +1 -1
  239. package/build-module/form/primitives/input/input.mjs +4 -4
  240. package/build-module/form/primitives/input/input.mjs.map +1 -1
  241. package/build-module/form/primitives/input-layout/input-layout.mjs +4 -4
  242. package/build-module/form/primitives/input-layout/input-layout.mjs.map +1 -1
  243. package/build-module/form/primitives/input-layout/slot.mjs +5 -4
  244. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  245. package/build-module/form/primitives/select/item.mjs +5 -5
  246. package/build-module/form/primitives/select/item.mjs.map +2 -2
  247. package/build-module/form/primitives/select/popup.mjs +7 -7
  248. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  249. package/build-module/form/primitives/select/trigger.mjs +5 -5
  250. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  251. package/build-module/form/primitives/textarea/textarea.mjs +3 -3
  252. package/build-module/form/primitives/textarea/textarea.mjs.map +2 -2
  253. package/build-module/form/types.mjs +1 -0
  254. package/build-module/form/types.mjs.map +7 -0
  255. package/build-module/icon-button/icon-button.mjs +2 -2
  256. package/build-module/icon-button/icon-button.mjs.map +1 -1
  257. package/build-module/index.mjs +5 -1
  258. package/build-module/index.mjs.map +2 -2
  259. package/build-module/link/link.mjs +6 -6
  260. package/build-module/link/link.mjs.map +1 -1
  261. package/build-module/notice/action-button.mjs +2 -2
  262. package/build-module/notice/action-button.mjs.map +1 -1
  263. package/build-module/notice/action-link.mjs +2 -2
  264. package/build-module/notice/action-link.mjs.map +1 -1
  265. package/build-module/notice/actions.mjs +2 -2
  266. package/build-module/notice/actions.mjs.map +1 -1
  267. package/build-module/notice/close-icon.mjs +2 -2
  268. package/build-module/notice/close-icon.mjs.map +1 -1
  269. package/build-module/notice/description.mjs +2 -2
  270. package/build-module/notice/description.mjs.map +1 -1
  271. package/build-module/notice/index.mjs.map +1 -1
  272. package/build-module/notice/root.mjs +4 -4
  273. package/build-module/notice/root.mjs.map +1 -1
  274. package/build-module/notice/title.mjs +2 -2
  275. package/build-module/notice/title.mjs.map +1 -1
  276. package/build-module/stack/stack.mjs +2 -2
  277. package/build-module/stack/stack.mjs.map +1 -1
  278. package/build-module/tabs/context.mjs +101 -0
  279. package/build-module/tabs/context.mjs.map +7 -0
  280. package/build-module/tabs/list.mjs +3 -3
  281. package/build-module/tabs/list.mjs.map +2 -2
  282. package/build-module/tabs/panel.mjs +5 -3
  283. package/build-module/tabs/panel.mjs.map +2 -2
  284. package/build-module/tabs/root.mjs +2 -1
  285. package/build-module/tabs/root.mjs.map +2 -2
  286. package/build-module/tabs/tab.mjs +5 -3
  287. package/build-module/tabs/tab.mjs.map +2 -2
  288. package/build-module/text/text.mjs +2 -2
  289. package/build-module/text/text.mjs.map +1 -1
  290. package/build-module/tooltip/popup.mjs +4 -4
  291. package/build-module/tooltip/popup.mjs.map +1 -1
  292. package/build-module/tooltip/root.mjs.map +2 -2
  293. package/build-module/utils/use-deprioritized-initial-focus.mjs +39 -0
  294. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +7 -0
  295. package/build-module/visually-hidden/visually-hidden.mjs +2 -2
  296. package/build-module/visually-hidden/visually-hidden.mjs.map +1 -1
  297. package/build-types/alert-dialog/context.d.ts +8 -0
  298. package/build-types/alert-dialog/context.d.ts.map +1 -0
  299. package/build-types/alert-dialog/index.d.ts +4 -0
  300. package/build-types/alert-dialog/index.d.ts.map +1 -0
  301. package/build-types/alert-dialog/popup.d.ts +4 -0
  302. package/build-types/alert-dialog/popup.d.ts.map +1 -0
  303. package/build-types/alert-dialog/root.d.ts +24 -0
  304. package/build-types/alert-dialog/root.d.ts.map +1 -0
  305. package/build-types/alert-dialog/stories/index.story.d.ts +44 -0
  306. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -0
  307. package/build-types/alert-dialog/test/index.test.d.ts +2 -0
  308. package/build-types/alert-dialog/test/index.test.d.ts.map +1 -0
  309. package/build-types/alert-dialog/trigger.d.ts +6 -0
  310. package/build-types/alert-dialog/trigger.d.ts.map +1 -0
  311. package/build-types/alert-dialog/types.d.ts +70 -0
  312. package/build-types/alert-dialog/types.d.ts.map +1 -0
  313. package/build-types/card/title.d.ts.map +1 -1
  314. package/build-types/collapsible-card/content.d.ts.map +1 -1
  315. package/build-types/collapsible-card/context.d.ts +4 -0
  316. package/build-types/collapsible-card/context.d.ts.map +1 -0
  317. package/build-types/collapsible-card/header-description.d.ts +15 -0
  318. package/build-types/collapsible-card/header-description.d.ts.map +1 -0
  319. package/build-types/collapsible-card/header.d.ts.map +1 -1
  320. package/build-types/collapsible-card/index.d.ts +2 -1
  321. package/build-types/collapsible-card/index.d.ts.map +1 -1
  322. package/build-types/collapsible-card/stories/index.story.d.ts +10 -0
  323. package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
  324. package/build-types/collapsible-card/types.d.ts +21 -0
  325. package/build-types/collapsible-card/types.d.ts.map +1 -1
  326. package/build-types/dialog/action.d.ts.map +1 -1
  327. package/build-types/dialog/close-icon.d.ts.map +1 -1
  328. package/build-types/dialog/popup.d.ts.map +1 -1
  329. package/build-types/dialog/stories/index.story.d.ts +0 -6
  330. package/build-types/dialog/stories/index.story.d.ts.map +1 -1
  331. package/build-types/dialog/types.d.ts +5 -5
  332. package/build-types/dialog/types.d.ts.map +1 -1
  333. package/build-types/empty-state/actions.d.ts +7 -0
  334. package/build-types/empty-state/actions.d.ts.map +1 -0
  335. package/build-types/empty-state/description.d.ts +7 -0
  336. package/build-types/empty-state/description.d.ts.map +1 -0
  337. package/build-types/empty-state/icon.d.ts +7 -0
  338. package/build-types/empty-state/icon.d.ts.map +1 -0
  339. package/build-types/empty-state/index.d.ts +8 -0
  340. package/build-types/empty-state/index.d.ts.map +1 -0
  341. package/build-types/empty-state/root.d.ts +6 -0
  342. package/build-types/empty-state/root.d.ts.map +1 -0
  343. package/build-types/empty-state/stories/index.story.d.ts +8 -0
  344. package/build-types/empty-state/stories/index.story.d.ts.map +1 -0
  345. package/build-types/empty-state/test/actions.test.d.ts +2 -0
  346. package/build-types/empty-state/test/actions.test.d.ts.map +1 -0
  347. package/build-types/empty-state/test/description.test.d.ts +2 -0
  348. package/build-types/empty-state/test/description.test.d.ts.map +1 -0
  349. package/build-types/empty-state/test/icon.test.d.ts +2 -0
  350. package/build-types/empty-state/test/icon.test.d.ts.map +1 -0
  351. package/build-types/empty-state/test/root.test.d.ts +2 -0
  352. package/build-types/empty-state/test/root.test.d.ts.map +1 -0
  353. package/build-types/empty-state/test/title.test.d.ts +2 -0
  354. package/build-types/empty-state/test/title.test.d.ts.map +1 -0
  355. package/build-types/empty-state/test/visual.test.d.ts +2 -0
  356. package/build-types/empty-state/test/visual.test.d.ts.map +1 -0
  357. package/build-types/empty-state/title.d.ts +6 -0
  358. package/build-types/empty-state/title.d.ts.map +1 -0
  359. package/build-types/empty-state/types.d.ts +40 -0
  360. package/build-types/empty-state/types.d.ts.map +1 -0
  361. package/build-types/empty-state/visual.d.ts +7 -0
  362. package/build-types/empty-state/visual.d.ts.map +1 -0
  363. package/build-types/form/index.d.ts +3 -0
  364. package/build-types/form/index.d.ts.map +1 -0
  365. package/build-types/form/input-control/index.d.ts +2 -0
  366. package/build-types/form/input-control/index.d.ts.map +1 -0
  367. package/build-types/form/input-control/input-control.d.ts +6 -0
  368. package/build-types/form/input-control/input-control.d.ts.map +1 -0
  369. package/build-types/form/input-control/stories/index.story.d.ts +16 -0
  370. package/build-types/form/input-control/stories/index.story.d.ts.map +1 -0
  371. package/build-types/form/input-control/test/index.test.d.ts +2 -0
  372. package/build-types/form/input-control/test/index.test.d.ts.map +1 -0
  373. package/build-types/form/input-control/types.d.ts +4 -0
  374. package/build-types/form/input-control/types.d.ts.map +1 -0
  375. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  376. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
  377. package/build-types/form/primitives/input/stories/index.story.d.ts +2 -0
  378. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
  379. package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
  380. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +5 -0
  381. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
  382. package/build-types/form/stories/shared.d.ts +3 -0
  383. package/build-types/form/stories/shared.d.ts.map +1 -0
  384. package/build-types/form/types.d.ts +30 -0
  385. package/build-types/form/types.d.ts.map +1 -0
  386. package/build-types/index.d.ts +3 -1
  387. package/build-types/index.d.ts.map +1 -1
  388. package/build-types/notice/index.d.ts +0 -1
  389. package/build-types/notice/index.d.ts.map +1 -1
  390. package/build-types/tabs/context.d.ts +26 -0
  391. package/build-types/tabs/context.d.ts.map +1 -0
  392. package/build-types/tabs/panel.d.ts.map +1 -1
  393. package/build-types/tabs/root.d.ts.map +1 -1
  394. package/build-types/tabs/tab.d.ts.map +1 -1
  395. package/build-types/tooltip/root.d.ts +12 -0
  396. package/build-types/tooltip/root.d.ts.map +1 -1
  397. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  398. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts +2 -0
  399. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts.map +1 -0
  400. package/build-types/utils/use-deprioritized-initial-focus.d.ts +35 -0
  401. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -0
  402. package/package.json +17 -16
  403. package/src/alert-dialog/context.tsx +14 -0
  404. package/src/alert-dialog/index.ts +3 -0
  405. package/src/alert-dialog/popup.tsx +58 -0
  406. package/src/alert-dialog/root.tsx +48 -0
  407. package/src/alert-dialog/stories/index.story.tsx +254 -0
  408. package/src/alert-dialog/style.module.css +10 -0
  409. package/src/alert-dialog/test/index.test.tsx +537 -0
  410. package/src/alert-dialog/trigger.tsx +15 -0
  411. package/src/alert-dialog/types.ts +83 -0
  412. package/src/button/style.module.css +2 -0
  413. package/src/card/stories/index.story.tsx +1 -1
  414. package/src/card/style.module.css +3 -5
  415. package/src/card/title.tsx +12 -11
  416. package/src/collapsible-card/content.tsx +16 -3
  417. package/src/collapsible-card/context.ts +7 -0
  418. package/src/collapsible-card/header-description.tsx +43 -0
  419. package/src/collapsible-card/header.tsx +47 -24
  420. package/src/collapsible-card/index.ts +2 -1
  421. package/src/collapsible-card/stories/index.story.tsx +99 -1
  422. package/src/collapsible-card/style.module.css +34 -2
  423. package/src/collapsible-card/test/index.test.tsx +96 -9
  424. package/src/collapsible-card/types.ts +22 -0
  425. package/src/dialog/action.tsx +8 -2
  426. package/src/dialog/close-icon.tsx +1 -0
  427. package/src/dialog/popup.tsx +21 -2
  428. package/src/dialog/stories/index.story.tsx +0 -28
  429. package/src/dialog/style.module.css +5 -5
  430. package/src/dialog/test/index.test.tsx +117 -0
  431. package/src/dialog/types.ts +11 -5
  432. package/src/empty-state/actions.tsx +24 -0
  433. package/src/empty-state/description.tsx +27 -0
  434. package/src/empty-state/icon.tsx +24 -0
  435. package/src/empty-state/index.ts +8 -0
  436. package/src/empty-state/root.tsx +23 -0
  437. package/src/empty-state/stories/index.story.tsx +64 -0
  438. package/src/empty-state/style.module.css +53 -0
  439. package/src/empty-state/test/actions.test.tsx +18 -0
  440. package/src/empty-state/test/description.test.tsx +13 -0
  441. package/src/empty-state/test/icon.test.tsx +13 -0
  442. package/src/empty-state/test/root.test.tsx +13 -0
  443. package/src/empty-state/test/title.test.tsx +13 -0
  444. package/src/empty-state/test/visual.test.tsx +17 -0
  445. package/src/empty-state/title.tsx +23 -0
  446. package/src/empty-state/types.ts +45 -0
  447. package/src/empty-state/visual.tsx +24 -0
  448. package/src/form/index.ts +3 -0
  449. package/src/form/input-control/index.ts +1 -0
  450. package/src/form/input-control/input-control.tsx +33 -0
  451. package/src/form/input-control/stories/index.story.tsx +163 -0
  452. package/src/form/input-control/test/index.test.tsx +53 -0
  453. package/src/form/input-control/types.ts +5 -0
  454. package/src/form/primitives/field/root.tsx +2 -2
  455. package/src/form/primitives/field/stories/index.story.tsx +2 -7
  456. package/src/form/primitives/fieldset/stories/index.story.tsx +2 -7
  457. package/src/form/primitives/input/stories/index.story.tsx +7 -0
  458. package/src/form/primitives/input-layout/slot.tsx +6 -2
  459. package/src/form/primitives/input-layout/stories/index.story.tsx +22 -1
  460. package/src/form/primitives/stories/overview.mdx +15 -0
  461. package/src/form/primitives/textarea/textarea.tsx +1 -1
  462. package/src/form/stories/shared.tsx +19 -0
  463. package/src/form/types.ts +34 -0
  464. package/src/index.ts +3 -1
  465. package/src/notice/index.ts +0 -2
  466. package/src/notice/style.module.css +1 -1
  467. package/src/tabs/context.tsx +170 -0
  468. package/src/tabs/panel.tsx +3 -0
  469. package/src/tabs/root.tsx +6 -1
  470. package/src/tabs/style.module.css +1 -1
  471. package/src/tabs/tab.tsx +3 -0
  472. package/src/tabs/test/index.test.tsx +162 -0
  473. package/src/tooltip/root.tsx +12 -0
  474. package/src/tooltip/stories/index.story.tsx +20 -15
  475. package/src/utils/css/item-popup.module.css +1 -0
  476. package/src/utils/css/select-trigger.module.css +1 -0
  477. package/src/utils/test/use-deprioritized-initial-focus.test.tsx +230 -0
  478. package/src/utils/use-deprioritized-initial-focus.ts +83 -0
@@ -3,10 +3,10 @@ import { mergeProps, useRender } from "@base-ui/react";
3
3
  import { forwardRef } from "@wordpress/element";
4
4
 
5
5
  // packages/ui/src/card/style.module.css
6
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='a9633332d0']")) {
6
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='d641b7e3ed']")) {
7
7
  const style = document.createElement("style");
8
- style.setAttribute("data-wp-hash", "a9633332d0");
9
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}'));
8
+ style.setAttribute("data-wp-hash", "d641b7e3ed");
9
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}"));
10
10
  document.head.appendChild(style);
11
11
  }
12
12
  var style_default = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed", "title": "_3c83b3f0225d6364__title" };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/card/full-bleed.tsx", "../../src/card/style.module.css"],
4
- "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { FullBleedProps } from './types';\n\n/**\n * A container that breaks out of the card's padding to span edge-to-edge.\n * Useful for full-width images, dividers, or embedded content.\n *\n * Must be used as a direct child of `Card.Content` or `Card.Header`.\n */\nexport const FullBleed = forwardRef< HTMLDivElement, FullBleedProps >(\n\tfunction CardFullBleed( { render, ...props }, ref ) {\n\t\tconst element = useRender( {\n\t\t\tdefaultTagName: 'div',\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >(\n\t\t\t\t{ className: styles.fullbleed },\n\t\t\t\tprops\n\t\t\t),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a9633332d0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a9633332d0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
- "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,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,qwCAAixC,CAAC;AAC5zC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADKjM,IAAM,YAAY;AAAA,EACxB,SAAS,cAAe,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AACnD,UAAM,UAAU,UAAW;AAAA,MAC1B,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACN,EAAE,WAAW,cAAO,UAAU;AAAA,QAC9B;AAAA,MACD;AAAA,IACD,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
4
+ "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { FullBleedProps } from './types';\n\n/**\n * A container that breaks out of the card's padding to span edge-to-edge.\n * Useful for full-width images, dividers, or embedded content.\n *\n * Must be used as a direct child of `Card.Content` or `Card.Header`.\n */\nexport const FullBleed = forwardRef< HTMLDivElement, FullBleedProps >(\n\tfunction CardFullBleed( { render, ...props }, ref ) {\n\t\tconst element = useRender( {\n\t\t\tdefaultTagName: 'div',\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >(\n\t\t\t\t{ className: styles.fullbleed },\n\t\t\t\tprops\n\t\t\t),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='d641b7e3ed']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"d641b7e3ed\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,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,+jCAA+jC,CAAC;AAC1mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADKjM,IAAM,YAAY;AAAA,EACxB,SAAS,cAAe,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AACnD,UAAM,UAAU,UAAW;AAAA,MAC1B,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACN,EAAE,WAAW,cAAO,UAAU;AAAA,QAC9B;AAAA,MACD;AAAA,IACD,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
6
6
  "names": []
7
7
  }
@@ -3,10 +3,10 @@ import { mergeProps, useRender } from "@base-ui/react";
3
3
  import { forwardRef } from "@wordpress/element";
4
4
 
5
5
  // packages/ui/src/card/style.module.css
6
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='a9633332d0']")) {
6
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='d641b7e3ed']")) {
7
7
  const style = document.createElement("style");
8
- style.setAttribute("data-wp-hash", "a9633332d0");
9
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}'));
8
+ style.setAttribute("data-wp-hash", "d641b7e3ed");
9
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}"));
10
10
  document.head.appendChild(style);
11
11
  }
12
12
  var style_default = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed", "title": "_3c83b3f0225d6364__title" };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/card/header.tsx", "../../src/card/style.module.css"],
4
- "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { HeaderProps } from './types';\n\n/**\n * A structural container for the card's heading area, typically containing\n * `Card.Title`.\n */\nexport const Header = forwardRef< HTMLDivElement, HeaderProps >(\n\tfunction CardHeader( { render, ...props }, ref ) {\n\t\tconst element = useRender( {\n\t\t\tdefaultTagName: 'div',\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >( { className: styles.header }, props ),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a9633332d0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a9633332d0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
- "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,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,qwCAAixC,CAAC;AAC5zC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADGjM,IAAM,SAAS;AAAA,EACrB,SAAS,WAAY,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AAChD,UAAM,UAAU,UAAW;AAAA,MAC1B,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA,OAAO,WAAqB,EAAE,WAAW,cAAO,OAAO,GAAG,KAAM;AAAA,IACjE,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
4
+ "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { HeaderProps } from './types';\n\n/**\n * A structural container for the card's heading area, typically containing\n * `Card.Title`.\n */\nexport const Header = forwardRef< HTMLDivElement, HeaderProps >(\n\tfunction CardHeader( { render, ...props }, ref ) {\n\t\tconst element = useRender( {\n\t\t\tdefaultTagName: 'div',\n\t\t\trender,\n\t\t\tref,\n\t\t\tprops: mergeProps< 'div' >( { className: styles.header }, props ),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='d641b7e3ed']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"d641b7e3ed\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,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,+jCAA+jC,CAAC;AAC1mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADGjM,IAAM,SAAS;AAAA,EACrB,SAAS,WAAY,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AAChD,UAAM,UAAU,UAAW;AAAA,MAC1B,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA,MACA,OAAO,WAAqB,EAAE,WAAW,cAAO,OAAO,GAAG,KAAM;AAAA,IACjE,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
6
6
  "names": []
7
7
  }
@@ -4,19 +4,19 @@ import clsx from "clsx";
4
4
  import { forwardRef } from "@wordpress/element";
5
5
 
6
6
  // packages/ui/src/utils/css/resets.module.css
7
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='671ebfc62d']")) {
7
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='e3ae230cea']")) {
8
8
  const style = document.createElement("style");
9
- style.setAttribute("data-wp-hash", "671ebfc62d");
9
+ style.setAttribute("data-wp-hash", "e3ae230cea");
10
10
  style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}"));
11
11
  document.head.appendChild(style);
12
12
  }
13
13
  var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
14
14
 
15
15
  // packages/ui/src/card/style.module.css
16
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='a9633332d0']")) {
16
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='d641b7e3ed']")) {
17
17
  const style = document.createElement("style");
18
- style.setAttribute("data-wp-hash", "a9633332d0");
19
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}'));
18
+ style.setAttribute("data-wp-hash", "d641b7e3ed");
19
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}"));
20
20
  document.head.appendChild(style);
21
21
  }
22
22
  var style_default = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed", "title": "_3c83b3f0225d6364__title" };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/card/root.tsx", "../../src/utils/css/resets.module.css", "../../src/card/style.module.css"],
4
- "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport resetStyles from '../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { RootProps } from './types';\n\n/**\n * A visually contained surface that groups related content and actions.\n *\n * ```jsx\n * import { Card } from '@wordpress/ui';\n *\n * function MyComponent() {\n * \treturn (\n * \t\t<Card.Root>\n * \t\t\t<Card.Header>\n * \t\t\t\t<Card.Title>Heading</Card.Title>\n * \t\t\t</Card.Header>\n * \t\t\t<Card.Content>\n * \t\t\t\t<p>Main content here.</p>\n * \t\t\t</Card.Content>\n * \t\t</Card.Root>\n * \t);\n * }\n * ```\n */\nexport const Root = forwardRef< HTMLDivElement, RootProps >( function Card(\n\t{ render, ...restProps },\n\tref\n) {\n\tconst mergedClassName = clsx( styles.root, resetStyles[ 'box-sizing' ] );\n\n\tconst element = useRender( {\n\t\tdefaultTagName: 'div',\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( { className: mergedClassName }, restProps ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='671ebfc62d']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"671ebfc62d\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a9633332d0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a9633332d0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
- "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,OAAO,UAAU;AACjB,SAAS,kBAAkB;;;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,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,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,qwCAAixC,CAAC;AAC5zC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;AFqBjM,IAAM,OAAO,WAAyC,SAAS,KACrE,EAAE,QAAQ,GAAG,UAAU,GACvB,KACC;AACD,QAAM,kBAAkB,KAAM,cAAO,MAAM,eAAa,YAAa,CAAE;AAEvE,QAAM,UAAU,UAAW;AAAA,IAC1B,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,OAAO,WAAqB,EAAE,WAAW,gBAAgB,GAAG,SAAU;AAAA,EACvE,CAAE;AAEF,SAAO;AACR,CAAE;",
4
+ "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport resetStyles from '../utils/css/resets.module.css';\nimport styles from './style.module.css';\nimport type { RootProps } from './types';\n\n/**\n * A visually contained surface that groups related content and actions.\n *\n * ```jsx\n * import { Card } from '@wordpress/ui';\n *\n * function MyComponent() {\n * \treturn (\n * \t\t<Card.Root>\n * \t\t\t<Card.Header>\n * \t\t\t\t<Card.Title>Heading</Card.Title>\n * \t\t\t</Card.Header>\n * \t\t\t<Card.Content>\n * \t\t\t\t<p>Main content here.</p>\n * \t\t\t</Card.Content>\n * \t\t</Card.Root>\n * \t);\n * }\n * ```\n */\nexport const Root = forwardRef< HTMLDivElement, RootProps >( function Card(\n\t{ render, ...restProps },\n\tref\n) {\n\tconst mergedClassName = clsx( styles.root, resetStyles[ 'box-sizing' ] );\n\n\tconst element = useRender( {\n\t\tdefaultTagName: 'div',\n\t\trender,\n\t\tref,\n\t\tprops: mergeProps< 'div' >( { className: mergedClassName }, restProps ),\n\t} );\n\n\treturn element;\n} );\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='e3ae230cea']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"e3ae230cea\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._336cd3e4e743482f__box-sizing{box-sizing:border-box;*,:after,:before{box-sizing:inherit}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"box-sizing\":\"_336cd3e4e743482f__box-sizing\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='d641b7e3ed']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"d641b7e3ed\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,OAAO,UAAU;AACjB,SAAS,kBAAkB;;;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,kMAAkM,CAAC;AAC7O,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,iBAAQ,EAAC,cAAa,gCAA+B;;;ACN5D,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,+jCAA+jC,CAAC;AAC1mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;AFqBjM,IAAM,OAAO,WAAyC,SAAS,KACrE,EAAE,QAAQ,GAAG,UAAU,GACvB,KACC;AACD,QAAM,kBAAkB,KAAM,cAAO,MAAM,eAAa,YAAa,CAAE;AAEvE,QAAM,UAAU,UAAW;AAAA,IAC1B,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,OAAO,WAAqB,EAAE,WAAW,gBAAgB,GAAG,SAAU;AAAA,EACvE,CAAE;AAEF,SAAO;AACR,CAAE;",
6
6
  "names": []
7
7
  }
@@ -1,27 +1,30 @@
1
1
  // packages/ui/src/card/title.tsx
2
- import { mergeProps, useRender } from "@base-ui/react";
3
2
  import { forwardRef } from "@wordpress/element";
3
+ import clsx from "clsx";
4
+ import { Text } from "../text/index.mjs";
4
5
 
5
6
  // packages/ui/src/card/style.module.css
6
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='a9633332d0']")) {
7
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='d641b7e3ed']")) {
7
8
  const style = document.createElement("style");
8
- style.setAttribute("data-wp-hash", "a9633332d0");
9
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}'));
9
+ style.setAttribute("data-wp-hash", "d641b7e3ed");
10
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}"));
10
11
  document.head.appendChild(style);
11
12
  }
12
13
  var style_default = { "root": "_02872bf298eadc43__root", "header": "bbccc92e6ba5662d__header", "content": "_5dffdaf2a6e669ac__content", "fullbleed": "c1fa192587e1b4a6__fullbleed", "title": "_3c83b3f0225d6364__title" };
13
14
 
14
15
  // packages/ui/src/card/title.tsx
16
+ import { jsx } from "react/jsx-runtime";
15
17
  var Title = forwardRef(
16
- function CardTitle({ render, ...props }, ref) {
17
- const element = useRender({
18
- defaultTagName: "div",
19
- render,
20
- ref,
21
- // TODO: use `Text` component instead, when ready
22
- props: mergeProps({ className: style_default.title }, props)
23
- });
24
- return element;
18
+ function CardTitle({ className, render, children, ...props }, ref) {
19
+ return /* @__PURE__ */ jsx(
20
+ Text,
21
+ {
22
+ variant: "heading-lg",
23
+ render: render ?? /* @__PURE__ */ jsx("div", { ref, ...props }),
24
+ className: clsx(style_default.title, className),
25
+ children
26
+ }
27
+ );
25
28
  }
26
29
  );
27
30
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/card/title.tsx", "../../src/card/style.module.css"],
4
- "sourcesContent": ["import { mergeProps, useRender } from '@base-ui/react';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { TitleProps } from './types';\n\n/**\n * The title for a card. Renders as a `<div>` by default \u2014 use the `render`\n * prop to swap in a semantic heading element when appropriate.\n */\nexport const Title = forwardRef< HTMLDivElement, TitleProps >(\n\tfunction CardTitle( { render, ...props }, ref ) {\n\t\tconst element = useRender( {\n\t\t\tdefaultTagName: 'div',\n\t\t\trender,\n\t\t\tref,\n\t\t\t// TODO: use `Text` component instead, when ready\n\t\t\tprops: mergeProps< 'div' >( { className: styles.title }, props ),\n\t\t} );\n\n\t\treturn element;\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='a9633332d0']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"a9633332d0\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-font-family-heading,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-lg,15px);font-weight:var(--wpds-font-weight-medium,499);line-height:var(--wpds-font-line-height-sm,20px);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
- "mappings": ";AAAA,SAAS,YAAY,iBAAiB;AACtC,SAAS,kBAAkB;;;ACD3B,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,qwCAAixC,CAAC;AAC5zC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADGjM,IAAM,QAAQ;AAAA,EACpB,SAAS,UAAW,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AAC/C,UAAM,UAAU,UAAW;AAAA,MAC1B,gBAAgB;AAAA,MAChB;AAAA,MACA;AAAA;AAAA,MAEA,OAAO,WAAqB,EAAE,WAAW,cAAO,MAAM,GAAG,KAAM;AAAA,IAChE,CAAE;AAEF,WAAO;AAAA,EACR;AACD;",
4
+ "sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport clsx from 'clsx';\nimport { Text } from '../text';\nimport styles from './style.module.css';\nimport type { TitleProps } from './types';\n\n/**\n * The title for a card. Renders as a `<div>` by default \u2014 use the `render`\n * prop to swap in a semantic heading element when appropriate.\n */\nexport const Title = forwardRef< HTMLDivElement, TitleProps >(\n\tfunction CardTitle( { className, render, children, ...props }, ref ) {\n\t\treturn (\n\t\t\t<Text\n\t\t\t\tvariant=\"heading-lg\"\n\t\t\t\trender={ render ?? <div ref={ ref } { ...props } /> }\n\t\t\t\tclassName={ clsx( styles.title, className ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Text>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='d641b7e3ed']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"d641b7e3ed\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._02872bf298eadc43__root{--wp-ui-card-padding:var(--wpds-dimension-padding-2xl,24px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-xl,24px);--wp-ui-card-header-content-margin:calc(var(--wp-ui-card-header-content-gap) - var(--wp-ui-card-padding));background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:1px solid var(--wpds-color-stroke-surface-neutral-weak,#e0e0e0);border-radius:var(--wpds-border-radius-lg,8px);display:flex;flex-direction:column;overflow:clip}._5dffdaf2a6e669ac__content,.bbccc92e6ba5662d__header{padding:var(--wp-ui-card-padding);&:not(:first-child):not(:last-child){padding-block-end:0}}.bbccc92e6ba5662d__header+._5dffdaf2a6e669ac__content{margin-block-start:var(--wp-ui-card-header-content-margin);padding-block-start:0}.c1fa192587e1b4a6__fullbleed{margin-inline:calc(var(--wp-ui-card-padding)*-1);width:calc(100% + var(--wp-ui-card-padding)*2)}._3c83b3f0225d6364__title{color:var(--wpds-color-fg-content-neutral,#1e1e1e);margin:0}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"root\":\"_02872bf298eadc43__root\",\"header\":\"bbccc92e6ba5662d__header\",\"content\":\"_5dffdaf2a6e669ac__content\",\"fullbleed\":\"c1fa192587e1b4a6__fullbleed\",\"title\":\"_3c83b3f0225d6364__title\"};\n"],
5
+ "mappings": ";AAAA,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,SAAS,YAAY;;;ACFrB,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,+jCAA+jC,CAAC;AAC1mC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,QAAO,2BAA0B,UAAS,4BAA2B,WAAU,8BAA6B,aAAY,+BAA8B,SAAQ,2BAA0B;;;ADSjL;AALhB,IAAM,QAAQ;AAAA,EACpB,SAAS,UAAW,EAAE,WAAW,QAAQ,UAAU,GAAG,MAAM,GAAG,KAAM;AACpE,WACC;AAAA,MAAC;AAAA;AAAA,QACA,SAAQ;AAAA,QACR,QAAS,UAAU,oBAAC,SAAI,KAAc,GAAG,OAAQ;AAAA,QACjD,WAAY,KAAM,cAAO,OAAO,SAAU;AAAA,QAExC;AAAA;AAAA,IACH;AAAA,EAEF;AACD;",
6
6
  "names": []
7
7
  }
@@ -1,16 +1,37 @@
1
1
  // packages/ui/src/collapsible-card/content.tsx
2
2
  import { forwardRef } from "@wordpress/element";
3
+ import clsx from "clsx";
3
4
  import * as Card from "../card/index.mjs";
4
5
  import * as Collapsible from "../collapsible/index.mjs";
6
+
7
+ // packages/ui/src/collapsible-card/style.module.css
8
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='23250ec980']")) {
9
+ const style = document.createElement("style");
10
+ style.setAttribute("data-wp-hash", "23250ec980");
11
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}"));
12
+ document.head.appendChild(style);
13
+ }
14
+ var style_default = { "header-content": "cab17c7a373cb60d__header-content", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
15
+
16
+ // packages/ui/src/collapsible-card/content.tsx
5
17
  import { jsx } from "react/jsx-runtime";
6
18
  var Content2 = forwardRef(
7
- function CollapsibleCardContent({ render, ...restProps }, ref) {
19
+ function CollapsibleCardContent({ className, render, children, hiddenUntilFound = true, ...restProps }, ref) {
8
20
  return /* @__PURE__ */ jsx(
9
21
  Collapsible.Panel,
10
22
  {
11
23
  ref,
12
- render: /* @__PURE__ */ jsx(Card.Content, { render }),
13
- ...restProps
24
+ className: clsx(style_default.content, className),
25
+ hiddenUntilFound,
26
+ ...restProps,
27
+ children: /* @__PURE__ */ jsx(
28
+ Card.Content,
29
+ {
30
+ className: style_default["content-inner"],
31
+ render,
32
+ children
33
+ }
34
+ )
14
35
  }
15
36
  );
16
37
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/collapsible-card/content.tsx"],
4
- "sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport * as Card from '../card';\nimport * as Collapsible from '../collapsible';\nimport type { ContentProps } from './types';\n\n/**\n * The collapsible content area of the card. Hidden when collapsed,\n * visible when expanded.\n */\nexport const Content = forwardRef< HTMLDivElement, ContentProps >(\n\tfunction CollapsibleCardContent( { render, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<Collapsible.Panel\n\t\t\t\tref={ ref }\n\t\t\t\trender={ <Card.Content render={ render } /> }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n"],
5
- "mappings": ";AAAA,SAAS,kBAAkB;AAC3B,YAAY,UAAU;AACtB,YAAY,iBAAiB;AAYhB;AALN,IAAMA,WAAU;AAAA,EACtB,SAAS,uBAAwB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AAChE,WACC;AAAA,MAAa;AAAA,MAAZ;AAAA,QACA;AAAA,QACA,QAAS,oBAAM,cAAL,EAAa,QAAkB;AAAA,QACvC,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
3
+ "sources": ["../../src/collapsible-card/content.tsx", "../../src/collapsible-card/style.module.css"],
4
+ "sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport clsx from 'clsx';\nimport * as Card from '../card';\nimport * as Collapsible from '../collapsible';\nimport styles from './style.module.css';\nimport type { ContentProps } from './types';\n\n/**\n * The collapsible content area of the card. Hidden when collapsed,\n * visible when expanded.\n */\nexport const Content = forwardRef< HTMLDivElement, ContentProps >(\n\tfunction CollapsibleCardContent(\n\t\t{ className, render, children, hiddenUntilFound = true, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<Collapsible.Panel\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( styles.content, className ) }\n\t\t\t\thiddenUntilFound={ hiddenUntilFound }\n\t\t\t\t{ ...restProps }\n\t\t\t>\n\t\t\t\t<Card.Content\n\t\t\t\t\tclassName={ styles[ 'content-inner' ] }\n\t\t\t\t\trender={ render }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Card.Content>\n\t\t\t</Collapsible.Panel>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='23250ec980']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"23250ec980\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"header-content\":\"cab17c7a373cb60d__header-content\",\"header-trigger-positioner\":\"dd89d27c4f15912d__header-trigger-positioner\",\"header-trigger-wrapper\":\"bcfab5f2448bafef__header-trigger-wrapper\",\"header-trigger\":\"_3106f8d2b0330faa__header-trigger\",\"header\":\"_5d2dfcb4085c6d0f__header\",\"content\":\"e34cf37ccd0d81e0__content\",\"content-inner\":\"_41bfdbf7b6c087c2__content-inner\"};\n"],
5
+ "mappings": ";AAAA,SAAS,kBAAkB;AAC3B,OAAO,UAAU;AACjB,YAAY,UAAU;AACtB,YAAY,iBAAiB;;;ACH7B,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,6xCAA6xC,CAAC;AACx0C,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,kBAAiB,oCAAmC,6BAA4B,+CAA8C,0BAAyB,4CAA2C,kBAAiB,qCAAoC,UAAS,6BAA4B,WAAU,6BAA4B,iBAAgB,mCAAkC;;;ADiBhY;AAZG,IAAMA,WAAU;AAAA,EACtB,SAAS,uBACR,EAAE,WAAW,QAAQ,UAAU,mBAAmB,MAAM,GAAG,UAAU,GACrE,KACC;AACD,WACC;AAAA,MAAa;AAAA,MAAZ;AAAA,QACA;AAAA,QACA,WAAY,KAAM,cAAO,SAAS,SAAU;AAAA,QAC5C;AAAA,QACE,GAAG;AAAA,QAEL;AAAA,UAAM;AAAA,UAAL;AAAA,YACA,WAAY,cAAQ,eAAgB;AAAA,YACpC;AAAA,YAEE;AAAA;AAAA,QACH;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
6
6
  "names": ["Content"]
7
7
  }
@@ -0,0 +1,10 @@
1
+ // packages/ui/src/collapsible-card/context.ts
2
+ import { createContext } from "@wordpress/element";
3
+ var HeaderDescriptionIdContext = createContext({
4
+ setDescriptionId: () => {
5
+ }
6
+ });
7
+ export {
8
+ HeaderDescriptionIdContext
9
+ };
10
+ //# sourceMappingURL=context.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible-card/context.ts"],
4
+ "sourcesContent": ["import { createContext } from '@wordpress/element';\n\nexport const HeaderDescriptionIdContext = createContext< {\n\tsetDescriptionId: ( id: string | undefined ) => void;\n} >( {\n\tsetDescriptionId: () => {},\n} );\n"],
5
+ "mappings": ";AAAA,SAAS,qBAAqB;AAEvB,IAAM,6BAA6B,cAErC;AAAA,EACJ,kBAAkB,MAAM;AAAA,EAAC;AAC1B,CAAE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,27 @@
1
+ // packages/ui/src/collapsible-card/header-description.tsx
2
+ import { forwardRef, useContext, useEffect, useId } from "@wordpress/element";
3
+ import { HeaderDescriptionIdContext } from "./context.mjs";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var HeaderDescription = forwardRef(function CollapsibleCardHeaderDescription({ children, className, ...restProps }, ref) {
6
+ const descriptionId = useId();
7
+ const { setDescriptionId } = useContext(HeaderDescriptionIdContext);
8
+ useEffect(() => {
9
+ setDescriptionId(descriptionId);
10
+ return () => setDescriptionId(void 0);
11
+ }, [descriptionId, setDescriptionId]);
12
+ return /* @__PURE__ */ jsx(
13
+ "div",
14
+ {
15
+ ref,
16
+ id: descriptionId,
17
+ "aria-hidden": "true",
18
+ className,
19
+ ...restProps,
20
+ children
21
+ }
22
+ );
23
+ });
24
+ export {
25
+ HeaderDescription
26
+ };
27
+ //# sourceMappingURL=header-description.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible-card/header-description.tsx"],
4
+ "sourcesContent": ["import { forwardRef, useContext, useEffect, useId } from '@wordpress/element';\nimport { HeaderDescriptionIdContext } from './context';\nimport type { HeaderDescriptionProps } from './types';\n\n/**\n * Secondary content placed in the collapsible card header that describes\n * the trigger button via `aria-describedby`. Use it for supplementary\n * information such as status badges or summary values.\n *\n * The content is visually rendered but marked `aria-hidden` so that\n * assistive technologies consume it only through the `aria-describedby`\n * relationship on the trigger, avoiding double announcements.\n *\n * Avoid interactive elements (buttons, links, inputs) inside this\n * component \u2014 the entire header is the toggle trigger.\n */\nexport const HeaderDescription = forwardRef<\n\tHTMLDivElement,\n\tHeaderDescriptionProps\n>( function CollapsibleCardHeaderDescription(\n\t{ children, className, ...restProps },\n\tref\n) {\n\tconst descriptionId = useId();\n\tconst { setDescriptionId } = useContext( HeaderDescriptionIdContext );\n\n\tuseEffect( () => {\n\t\tsetDescriptionId( descriptionId );\n\t\treturn () => setDescriptionId( undefined );\n\t}, [ descriptionId, setDescriptionId ] );\n\n\treturn (\n\t\t<div\n\t\t\tref={ ref }\n\t\t\tid={ descriptionId }\n\t\t\taria-hidden=\"true\"\n\t\t\tclassName={ className }\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ children }\n\t\t</div>\n\t);\n} );\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,YAAY,WAAW,aAAa;AACzD,SAAS,kCAAkC;AA+BzC;AAhBK,IAAM,oBAAoB,WAG9B,SAAS,iCACX,EAAE,UAAU,WAAW,GAAG,UAAU,GACpC,KACC;AACD,QAAM,gBAAgB,MAAM;AAC5B,QAAM,EAAE,iBAAiB,IAAI,WAAY,0BAA2B;AAEpE,YAAW,MAAM;AAChB,qBAAkB,aAAc;AAChC,WAAO,MAAM,iBAAkB,MAAU;AAAA,EAC1C,GAAG,CAAE,eAAe,gBAAiB,CAAE;AAEvC,SACC;AAAA,IAAC;AAAA;AAAA,MACA;AAAA,MACA,IAAK;AAAA,MACL,eAAY;AAAA,MACZ;AAAA,MACE,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEF,CAAE;",
6
+ "names": []
7
+ }
@@ -1,34 +1,40 @@
1
1
  // packages/ui/src/collapsible-card/header.tsx
2
2
  import clsx from "clsx";
3
- import { forwardRef } from "@wordpress/element";
3
+ import { forwardRef, useMemo, useState } from "@wordpress/element";
4
4
  import { chevronDown } from "@wordpress/icons";
5
5
  import * as Card from "../card/index.mjs";
6
6
  import * as Collapsible from "../collapsible/index.mjs";
7
7
  import { Icon } from "../icon/index.mjs";
8
8
 
9
9
  // packages/ui/src/collapsible-card/style.module.css
10
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='f5a976d50e']")) {
10
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='23250ec980']")) {
11
11
  const style = document.createElement("style");
12
- style.setAttribute("data-wp-hash", "f5a976d50e");
13
- style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.bcfab5f2448bafef__header-trigger-wrapper{align-self:center;flex-shrink:0;max-height:0;overflow:visible}._3106f8d2b0330faa__header-trigger{border-radius:var(--wpds-border-radius-sm,2px);translate:0 -50%}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}@layer wp-ui-compositions{._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,default)}}}"));
12
+ style.setAttribute("data-wp-hash", "23250ec980");
13
+ style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}"));
14
14
  document.head.appendChild(style);
15
15
  }
16
- var style_default = { "header-content": "cab17c7a373cb60d__header-content", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header" };
16
+ var style_default = { "header-content": "cab17c7a373cb60d__header-content", "header-trigger-positioner": "dd89d27c4f15912d__header-trigger-positioner", "header-trigger-wrapper": "bcfab5f2448bafef__header-trigger-wrapper", "header-trigger": "_3106f8d2b0330faa__header-trigger", "header": "_5d2dfcb4085c6d0f__header", "content": "e34cf37ccd0d81e0__content", "content-inner": "_41bfdbf7b6c087c2__content-inner" };
17
17
 
18
18
  // packages/ui/src/utils/css/focus.module.css
19
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='6db1282653']")) {
19
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='4acd2b57a1']")) {
20
20
  const style = document.createElement("style");
21
- style.setAttribute("data-wp-hash", "6db1282653");
21
+ style.setAttribute("data-wp-hash", "4acd2b57a1");
22
22
  style.appendChild(document.createTextNode("@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}"));
23
23
  document.head.appendChild(style);
24
24
  }
25
25
  var focus_default = { "outset-ring--focus": "_08e8a2e44959f892__outset-ring--focus", "outset-ring--focus-except-active": "e25b2bdd7aa21721__outset-ring--focus-except-active", "outset-ring--focus-visible": "d0541bc9dd9dc7b6__outset-ring--focus-visible", "outset-ring--focus-within": "cd83dfc2126a0846__outset-ring--focus-within", "outset-ring--focus-within-except-active": "_970d04df7376df67__outset-ring--focus-within-except-active", "outset-ring--focus-within-visible": "c5cb3ee4bddaa8e4__outset-ring--focus-within-visible", "outset-ring--focus-parent-visible": "ecadb9e080e2dfa5__outset-ring--focus-parent-visible" };
26
26
 
27
27
  // packages/ui/src/collapsible-card/header.tsx
28
+ import { HeaderDescriptionIdContext } from "./context.mjs";
28
29
  import { jsx, jsxs } from "react/jsx-runtime";
29
30
  var Header2 = forwardRef(
30
31
  function CollapsibleCardHeader({ children, className, render, ...restProps }, ref) {
31
- return /* @__PURE__ */ jsxs(
32
+ const [descriptionId, setDescriptionId] = useState();
33
+ const contextValue = useMemo(
34
+ () => ({ setDescriptionId }),
35
+ [setDescriptionId]
36
+ );
37
+ return /* @__PURE__ */ jsx(HeaderDescriptionIdContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(
32
38
  Collapsible.Trigger,
33
39
  {
34
40
  className: clsx(style_default.header, className),
@@ -41,24 +47,39 @@ var Header2 = forwardRef(
41
47
  }
42
48
  ),
43
49
  nativeButton: false,
50
+ "aria-describedby": descriptionId,
44
51
  children: [
45
52
  /* @__PURE__ */ jsx("div", { className: style_default["header-content"], children }),
46
- /* @__PURE__ */ jsx("div", { className: style_default["header-trigger-wrapper"], children: /* @__PURE__ */ jsx(
47
- Icon,
53
+ /* @__PURE__ */ jsx(
54
+ "div",
48
55
  {
49
- icon: chevronDown,
50
56
  className: clsx(
51
- style_default["header-trigger"],
52
- // While the interactive trigger element is the whole header,
53
- // the focus ring will be displayed only on the icon to visually
54
- // emulate it being the button.
55
- focus_default["outset-ring--focus-parent-visible"]
57
+ style_default["header-trigger-positioner"]
58
+ ),
59
+ children: /* @__PURE__ */ jsx(
60
+ "div",
61
+ {
62
+ className: clsx(
63
+ style_default["header-trigger-wrapper"],
64
+ // While the interactive trigger element is the whole header,
65
+ // the focus ring will be displayed only on the icon to visually
66
+ // emulate it being the button.
67
+ focus_default["outset-ring--focus-parent-visible"]
68
+ ),
69
+ children: /* @__PURE__ */ jsx(
70
+ Icon,
71
+ {
72
+ icon: chevronDown,
73
+ className: style_default["header-trigger"]
74
+ }
75
+ )
76
+ }
56
77
  )
57
78
  }
58
- ) })
79
+ )
59
80
  ]
60
81
  }
61
- );
82
+ ) });
62
83
  }
63
84
  );
64
85
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/collapsible-card/header.tsx", "../../src/collapsible-card/style.module.css", "../../src/utils/css/focus.module.css"],
4
- "sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport * as Card from '../card';\nimport * as Collapsible from '../collapsible';\nimport { Icon } from '../icon';\nimport styles from './style.module.css';\nimport focusStyles from '../utils/css/focus.module.css';\nimport type { HeaderProps } from './types';\n\n/**\n * The header of a collapsible card. Always visible, and acts as the\n * toggle trigger \u2014 clicking anywhere on it expands or collapses the\n * card's content.\n *\n * Avoid placing interactive elements (buttons, links, inputs) inside the\n * header, since the entire area is clickable and their events will bubble\n * to trigger the collapse toggle.\n */\nexport const Header = forwardRef< HTMLDivElement, HeaderProps >(\n\tfunction CollapsibleCardHeader(\n\t\t{ children, className, render, ...restProps },\n\t\tref\n\t) {\n\t\treturn (\n\t\t\t<Collapsible.Trigger\n\t\t\t\tclassName={ clsx( styles.header, className ) }\n\t\t\t\trender={\n\t\t\t\t\t<Card.Header\n\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\trender={ render }\n\t\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tnativeButton={ false }\n\t\t\t>\n\t\t\t\t<div className={ styles[ 'header-content' ] }>{ children }</div>\n\t\t\t\t<div className={ styles[ 'header-trigger-wrapper' ] }>\n\t\t\t\t\t<Icon\n\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles[ 'header-trigger' ],\n\t\t\t\t\t\t\t// While the interactive trigger element is the whole header,\n\t\t\t\t\t\t\t// the focus ring will be displayed only on the icon to visually\n\t\t\t\t\t\t\t// emulate it being the button.\n\t\t\t\t\t\t\tfocusStyles[ 'outset-ring--focus-parent-visible' ]\n\t\t\t\t\t\t) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Collapsible.Trigger>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='f5a976d50e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"f5a976d50e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.bcfab5f2448bafef__header-trigger-wrapper{align-self:center;flex-shrink:0;max-height:0;overflow:visible}._3106f8d2b0330faa__header-trigger{border-radius:var(--wpds-border-radius-sm,2px);translate:0 -50%}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}}@layer wp-ui-compositions{._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,default)}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"header-content\":\"cab17c7a373cb60d__header-content\",\"header-trigger-wrapper\":\"bcfab5f2448bafef__header-trigger-wrapper\",\"header-trigger\":\"_3106f8d2b0330faa__header-trigger\",\"header\":\"_5d2dfcb4085c6d0f__header\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='6db1282653']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"6db1282653\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n"],
5
- "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AAC5B,YAAY,UAAU;AACtB,YAAY,iBAAiB;AAC7B,SAAS,YAAY;;;ACLrB,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,izBAAizB,CAAC;AAC51B,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,kBAAiB,oCAAmC,0BAAyB,4CAA2C,kBAAiB,qCAAoC,UAAS,4BAA2B;;;ACNjO,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,8tCAA8tC,CAAC;AACzwC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;AFmBllB,SAGE,KAHF;AANI,IAAMA,UAAS;AAAA,EACrB,SAAS,sBACR,EAAE,UAAU,WAAW,QAAQ,GAAG,UAAU,GAC5C,KACC;AACD,WACC;AAAA,MAAa;AAAA,MAAZ;AAAA,QACA,WAAY,KAAM,cAAO,QAAQ,SAAU;AAAA,QAC3C,QACC;AAAA,UAAM;AAAA,UAAL;AAAA,YACA;AAAA,YACA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,QAED,cAAe;AAAA,QAEf;AAAA,8BAAC,SAAI,WAAY,cAAQ,gBAAiB,GAAM,UAAU;AAAA,UAC1D,oBAAC,SAAI,WAAY,cAAQ,wBAAyB,GACjD;AAAA,YAAC;AAAA;AAAA,cACA,MAAO;AAAA,cACP,WAAY;AAAA,gBACX,cAAQ,gBAAiB;AAAA;AAAA;AAAA;AAAA,gBAIzB,cAAa,mCAAoC;AAAA,cAClD;AAAA;AAAA,UACD,GACD;AAAA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import clsx from 'clsx';\nimport { forwardRef, useMemo, useState } from '@wordpress/element';\nimport { chevronDown } from '@wordpress/icons';\nimport * as Card from '../card';\nimport * as Collapsible from '../collapsible';\nimport { Icon } from '../icon';\nimport styles from './style.module.css';\nimport focusStyles from '../utils/css/focus.module.css';\nimport { HeaderDescriptionIdContext } from './context';\nimport type { HeaderProps } from './types';\n\n/**\n * The header of a collapsible card. Always visible, and acts as the\n * toggle trigger \u2014 clicking anywhere on it expands or collapses the\n * card's content.\n *\n * Avoid placing interactive elements (buttons, links, inputs) inside the\n * header, since the entire area is clickable and their events will bubble\n * to trigger the collapse toggle.\n */\nexport const Header = forwardRef< HTMLDivElement, HeaderProps >(\n\tfunction CollapsibleCardHeader(\n\t\t{ children, className, render, ...restProps },\n\t\tref\n\t) {\n\t\tconst [ descriptionId, setDescriptionId ] = useState< string >();\n\n\t\tconst contextValue = useMemo(\n\t\t\t() => ( { setDescriptionId } ),\n\t\t\t[ setDescriptionId ]\n\t\t);\n\n\t\treturn (\n\t\t\t<HeaderDescriptionIdContext.Provider value={ contextValue }>\n\t\t\t\t<Collapsible.Trigger\n\t\t\t\t\tclassName={ clsx( styles.header, className ) }\n\t\t\t\t\trender={\n\t\t\t\t\t\t<Card.Header\n\t\t\t\t\t\t\tref={ ref }\n\t\t\t\t\t\t\trender={ render }\n\t\t\t\t\t\t\t{ ...restProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t}\n\t\t\t\t\tnativeButton={ false }\n\t\t\t\t\taria-describedby={ descriptionId }\n\t\t\t\t>\n\t\t\t\t\t<div className={ styles[ 'header-content' ] }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</div>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\tstyles[ 'header-trigger-positioner' ]\n\t\t\t\t\t\t) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\tstyles[ 'header-trigger-wrapper' ],\n\t\t\t\t\t\t\t\t// While the interactive trigger element is the whole header,\n\t\t\t\t\t\t\t\t// the focus ring will be displayed only on the icon to visually\n\t\t\t\t\t\t\t\t// emulate it being the button.\n\t\t\t\t\t\t\t\tfocusStyles[\n\t\t\t\t\t\t\t\t\t'outset-ring--focus-parent-visible'\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\ticon={ chevronDown }\n\t\t\t\t\t\t\t\tclassName={ styles[ 'header-trigger' ] }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</Collapsible.Trigger>\n\t\t\t</HeaderDescriptionIdContext.Provider>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='23250ec980']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"23250ec980\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{.cab17c7a373cb60d__header-content{flex:1;min-width:0}.dd89d27c4f15912d__header-trigger-positioner{align-self:center;flex-shrink:0;max-height:0;overflow:visible}.bcfab5f2448bafef__header-trigger-wrapper{border-radius:var(--wpds-border-radius-sm,2px);display:flex;translate:0 -50%}._3106f8d2b0330faa__header-trigger{@media not (prefers-reduced-motion){transition:rotate .15s ease-out}}._5d2dfcb4085c6d0f__header[data-panel-open] ._3106f8d2b0330faa__header-trigger{rotate:180deg}._5d2dfcb4085c6d0f__header[data-disabled] ._3106f8d2b0330faa__header-trigger{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a)}.e34cf37ccd0d81e0__content{height:var(--collapsible-panel-height);margin-block-start:var(--wp-ui-card-header-content-margin);overflow:hidden;&[hidden]:not([hidden=until-found]){display:none}&[data-ending-style],&[data-starting-style]{height:0}@media not (prefers-reduced-motion){transition:all .15s ease-out}}}@layer wp-ui-compositions{._41bfdbf7b6c087c2__content-inner{padding-block-start:0}._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);outline:none;&:not([data-disabled]){cursor:var(--wpds-cursor-control,pointer)}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"header-content\":\"cab17c7a373cb60d__header-content\",\"header-trigger-positioner\":\"dd89d27c4f15912d__header-trigger-positioner\",\"header-trigger-wrapper\":\"bcfab5f2448bafef__header-trigger-wrapper\",\"header-trigger\":\"_3106f8d2b0330faa__header-trigger\",\"header\":\"_5d2dfcb4085c6d0f__header\",\"content\":\"e34cf37ccd0d81e0__content\",\"content-inner\":\"_41bfdbf7b6c087c2__content-inner\"};\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='4acd2b57a1']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"4acd2b57a1\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-utilities{._08e8a2e44959f892__outset-ring--focus,._970d04df7376df67__outset-ring--focus-within-except-active,.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible,.cd83dfc2126a0846__outset-ring--focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active,.ecadb9e080e2dfa5__outset-ring--focus-parent-visible{@media not (prefers-reduced-motion){transition:outline .1s ease-out}outline-color:#0000;outline-offset:1px;outline-style:solid;outline-width:0}._08e8a2e44959f892__outset-ring--focus:focus,._970d04df7376df67__outset-ring--focus-within-except-active:focus-within:not(:has(:active)),.c5cb3ee4bddaa8e4__outset-ring--focus-within-visible:focus-within:has(:focus-visible),.cd83dfc2126a0846__outset-ring--focus-within:focus-within,.d0541bc9dd9dc7b6__outset-ring--focus-visible:focus-visible,.e25b2bdd7aa21721__outset-ring--focus-except-active:focus:not(:active),:focus-visible .ecadb9e080e2dfa5__outset-ring--focus-parent-visible{outline-color:var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline-width:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"outset-ring--focus\":\"_08e8a2e44959f892__outset-ring--focus\",\"outset-ring--focus-except-active\":\"e25b2bdd7aa21721__outset-ring--focus-except-active\",\"outset-ring--focus-visible\":\"d0541bc9dd9dc7b6__outset-ring--focus-visible\",\"outset-ring--focus-within\":\"cd83dfc2126a0846__outset-ring--focus-within\",\"outset-ring--focus-within-except-active\":\"_970d04df7376df67__outset-ring--focus-within-except-active\",\"outset-ring--focus-within-visible\":\"c5cb3ee4bddaa8e4__outset-ring--focus-within-visible\",\"outset-ring--focus-parent-visible\":\"ecadb9e080e2dfa5__outset-ring--focus-parent-visible\"};\n"],
5
+ "mappings": ";AAAA,OAAO,UAAU;AACjB,SAAS,YAAY,SAAS,gBAAgB;AAC9C,SAAS,mBAAmB;AAC5B,YAAY,UAAU;AACtB,YAAY,iBAAiB;AAC7B,SAAS,YAAY;;;ACLrB,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,6xCAA6xC,CAAC;AACx0C,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,kBAAiB,oCAAmC,6BAA4B,+CAA8C,0BAAyB,4CAA2C,kBAAiB,qCAAoC,UAAS,6BAA4B,WAAU,6BAA4B,iBAAgB,mCAAkC;;;ACNpY,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,8tCAA8tC,CAAC;AACzwC,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,sBAAqB,yCAAwC,oCAAmC,sDAAqD,8BAA6B,gDAA+C,6BAA4B,+CAA8C,2CAA0C,8DAA6D,qCAAoC,uDAAsD,qCAAoC,sDAAqD;;;AFErlB,SAAS,kCAAkC;AA0BvC,SAGE,KAHF;AAdG,IAAMA,UAAS;AAAA,EACrB,SAAS,sBACR,EAAE,UAAU,WAAW,QAAQ,GAAG,UAAU,GAC5C,KACC;AACD,UAAM,CAAE,eAAe,gBAAiB,IAAI,SAAmB;AAE/D,UAAM,eAAe;AAAA,MACpB,OAAQ,EAAE,iBAAiB;AAAA,MAC3B,CAAE,gBAAiB;AAAA,IACpB;AAEA,WACC,oBAAC,2BAA2B,UAA3B,EAAoC,OAAQ,cAC5C;AAAA,MAAa;AAAA,MAAZ;AAAA,QACA,WAAY,KAAM,cAAO,QAAQ,SAAU;AAAA,QAC3C,QACC;AAAA,UAAM;AAAA,UAAL;AAAA,YACA;AAAA,YACA;AAAA,YACE,GAAG;AAAA;AAAA,QACN;AAAA,QAED,cAAe;AAAA,QACf,oBAAmB;AAAA,QAEnB;AAAA,8BAAC,SAAI,WAAY,cAAQ,gBAAiB,GACvC,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACA,WAAY;AAAA,gBACX,cAAQ,2BAA4B;AAAA,cACrC;AAAA,cAEA;AAAA,gBAAC;AAAA;AAAA,kBACA,WAAY;AAAA,oBACX,cAAQ,wBAAyB;AAAA;AAAA;AAAA;AAAA,oBAIjC,cACC,mCACD;AAAA,kBACD;AAAA,kBAEA;AAAA,oBAAC;AAAA;AAAA,sBACA,MAAO;AAAA,sBACP,WAAY,cAAQ,gBAAiB;AAAA;AAAA,kBACtC;AAAA;AAAA,cACD;AAAA;AAAA,UACD;AAAA;AAAA;AAAA,IACD,GACD;AAAA,EAEF;AACD;",
6
6
  "names": ["Header"]
7
7
  }
@@ -1,10 +1,12 @@
1
1
  // packages/ui/src/collapsible-card/index.ts
2
2
  import { Root } from "./root.mjs";
3
3
  import { Header } from "./header.mjs";
4
+ import { HeaderDescription } from "./header-description.mjs";
4
5
  import { Content } from "./content.mjs";
5
6
  export {
6
7
  Content,
7
8
  Header,
9
+ HeaderDescription,
8
10
  Root
9
11
  };
10
12
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/collapsible-card/index.ts"],
4
- "sourcesContent": ["import { Root } from './root';\nimport { Header } from './header';\nimport { Content } from './content';\n\nexport { Root, Header, Content };\n"],
5
- "mappings": ";AAAA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,eAAe;",
4
+ "sourcesContent": ["import { Root } from './root';\nimport { Header } from './header';\nimport { HeaderDescription } from './header-description';\nimport { Content } from './content';\n\nexport { Root, Header, HeaderDescription, Content };\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,eAAe;",
6
6
  "names": []
7
7
  }
@@ -4,12 +4,14 @@ import { forwardRef } from "@wordpress/element";
4
4
  import { Button } from "../button/index.mjs";
5
5
  import { jsx } from "react/jsx-runtime";
6
6
  var Action = forwardRef(
7
- function DialogAction({ render, ...props }, ref) {
7
+ function DialogAction({ render, disabled, loading, ...props }, ref) {
8
+ const resolvedDisabled = disabled ?? loading;
8
9
  return /* @__PURE__ */ jsx(
9
10
  _Dialog.Close,
10
11
  {
11
12
  ref,
12
- render: /* @__PURE__ */ jsx(Button, { render }),
13
+ render: /* @__PURE__ */ jsx(Button, { render, loading }),
14
+ disabled: resolvedDisabled,
13
15
  ...props
14
16
  }
15
17
  );
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/dialog/action.tsx"],
4
- "sourcesContent": ["import { Dialog as _Dialog } from '@base-ui/react/dialog';\nimport { forwardRef } from '@wordpress/element';\nimport { Button } from '../button';\nimport type { ActionProps } from './types';\n\n/**\n * Renders a button that closes the dialog when clicked.\n * Accepts all Button component props for styling.\n */\nconst Action = forwardRef< HTMLButtonElement, ActionProps >(\n\tfunction DialogAction( { render, ...props }, ref ) {\n\t\treturn (\n\t\t\t<_Dialog.Close\n\t\t\t\tref={ ref }\n\t\t\t\trender={ <Button render={ render } /> }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport { Action };\n"],
5
- "mappings": ";AAAA,SAAS,UAAU,eAAe;AAClC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAYV;AALb,IAAM,SAAS;AAAA,EACd,SAAS,aAAc,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAM;AAClD,WACC;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACA;AAAA,QACA,QAAS,oBAAC,UAAO,QAAkB;AAAA,QACjC,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { Dialog as _Dialog } from '@base-ui/react/dialog';\nimport { forwardRef } from '@wordpress/element';\nimport { Button } from '../button';\nimport type { ActionProps } from './types';\n\n/**\n * Renders a button that closes the dialog when clicked.\n * Accepts all Button component props for styling.\n */\nconst Action = forwardRef< HTMLButtonElement, ActionProps >(\n\tfunction DialogAction( { render, disabled, loading, ...props }, ref ) {\n\t\t// Resolve `disabled` the same way Button does so that\n\t\t// _Dialog.Close's internal useButton (which controls\n\t\t// aria-disabled) stays in sync with the rendered Button.\n\t\tconst resolvedDisabled = disabled ?? loading;\n\n\t\treturn (\n\t\t\t<_Dialog.Close\n\t\t\t\tref={ ref }\n\t\t\t\trender={ <Button render={ render } loading={ loading } /> }\n\t\t\t\tdisabled={ resolvedDisabled }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport { Action };\n"],
5
+ "mappings": ";AAAA,SAAS,UAAU,eAAe;AAClC,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAiBV;AAVb,IAAM,SAAS;AAAA,EACd,SAAS,aAAc,EAAE,QAAQ,UAAU,SAAS,GAAG,MAAM,GAAG,KAAM;AAIrE,UAAM,mBAAmB,YAAY;AAErC,WACC;AAAA,MAAC,QAAQ;AAAA,MAAR;AAAA,QACA;AAAA,QACA,QAAS,oBAAC,UAAO,QAAkB,SAAoB;AAAA,QACvD,UAAW;AAAA,QACT,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
6
6
  "names": []
7
7
  }
@@ -19,7 +19,8 @@ var CloseIcon = forwardRef(
19
19
  tone: "neutral",
20
20
  ...props,
21
21
  icon: icon ?? close,
22
- label: label ?? __("Close")
22
+ label: label ?? __("Close"),
23
+ "data-wp-ui-dialog-close-icon": ""
23
24
  }
24
25
  )
25
26
  }