@wordpress/ui 0.9.1-next.v.202603102151.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (529) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/CONTRIBUTING.md +31 -0
  3. package/README.md +106 -0
  4. package/build/alert-dialog/context.cjs +34 -0
  5. package/build/alert-dialog/context.cjs.map +7 -0
  6. package/build/alert-dialog/index.cjs +37 -0
  7. package/build/alert-dialog/index.cjs.map +7 -0
  8. package/build/alert-dialog/popup.cjs +93 -0
  9. package/build/alert-dialog/popup.cjs.map +7 -0
  10. package/build/alert-dialog/root.cjs +52 -0
  11. package/build/alert-dialog/root.cjs.map +7 -0
  12. package/build/alert-dialog/trigger.cjs +48 -0
  13. package/build/alert-dialog/trigger.cjs.map +7 -0
  14. package/build/alert-dialog/types.cjs +19 -0
  15. package/build/alert-dialog/types.cjs.map +7 -0
  16. package/build/badge/badge.cjs +3 -3
  17. package/build/badge/badge.cjs.map +2 -2
  18. package/build/button/button.cjs +9 -9
  19. package/build/button/button.cjs.map +2 -2
  20. package/build/card/content.cjs +3 -3
  21. package/build/card/content.cjs.map +2 -2
  22. package/build/card/full-bleed.cjs +3 -3
  23. package/build/card/full-bleed.cjs.map +2 -2
  24. package/build/card/header.cjs +3 -3
  25. package/build/card/header.cjs.map +2 -2
  26. package/build/card/root.cjs +5 -5
  27. package/build/card/root.cjs.map +2 -2
  28. package/build/card/title.cjs +26 -13
  29. package/build/card/title.cjs.map +3 -3
  30. package/build/collapsible/index.cjs +37 -0
  31. package/build/collapsible/index.cjs.map +7 -0
  32. package/build/collapsible/panel.cjs +38 -0
  33. package/build/collapsible/panel.cjs.map +7 -0
  34. package/build/collapsible/root.cjs +38 -0
  35. package/build/collapsible/root.cjs.map +7 -0
  36. package/build/collapsible/trigger.cjs +38 -0
  37. package/build/collapsible/trigger.cjs.map +7 -0
  38. package/build/collapsible/types.cjs +19 -0
  39. package/build/collapsible/types.cjs.map +7 -0
  40. package/build/collapsible-card/content.cjs +26 -5
  41. package/build/collapsible-card/content.cjs.map +4 -4
  42. package/build/collapsible-card/context.cjs +35 -0
  43. package/build/collapsible-card/context.cjs.map +7 -0
  44. package/build/collapsible-card/header-description.cjs +52 -0
  45. package/build/collapsible-card/header-description.cjs.map +7 -0
  46. package/build/collapsible-card/header.cjs +57 -38
  47. package/build/collapsible-card/header.cjs.map +3 -3
  48. package/build/collapsible-card/index.cjs +3 -0
  49. package/build/collapsible-card/index.cjs.map +2 -2
  50. package/build/collapsible-card/root.cjs +4 -4
  51. package/build/collapsible-card/root.cjs.map +2 -2
  52. package/build/collapsible-card/types.cjs.map +1 -1
  53. package/build/dialog/action.cjs +4 -2
  54. package/build/dialog/action.cjs.map +2 -2
  55. package/build/dialog/close-icon.cjs +2 -1
  56. package/build/dialog/close-icon.cjs.map +2 -2
  57. package/build/dialog/footer.cjs +3 -3
  58. package/build/dialog/footer.cjs.map +2 -2
  59. package/build/dialog/header.cjs +3 -3
  60. package/build/dialog/header.cjs.map +2 -2
  61. package/build/dialog/popup.cjs +22 -5
  62. package/build/dialog/popup.cjs.map +2 -2
  63. package/build/dialog/title.cjs +3 -3
  64. package/build/dialog/title.cjs.map +2 -2
  65. package/build/dialog/types.cjs.map +1 -1
  66. package/build/empty-state/actions.cjs +66 -0
  67. package/build/empty-state/actions.cjs.map +7 -0
  68. package/build/empty-state/description.cjs +66 -0
  69. package/build/empty-state/description.cjs.map +7 -0
  70. package/build/empty-state/icon.cjs +69 -0
  71. package/build/empty-state/icon.cjs.map +7 -0
  72. package/build/empty-state/index.cjs +46 -0
  73. package/build/empty-state/index.cjs.map +7 -0
  74. package/build/empty-state/root.cjs +66 -0
  75. package/build/empty-state/root.cjs.map +7 -0
  76. package/build/empty-state/title.cjs +68 -0
  77. package/build/empty-state/title.cjs.map +7 -0
  78. package/build/empty-state/types.cjs +19 -0
  79. package/build/empty-state/types.cjs.map +7 -0
  80. package/build/empty-state/visual.cjs +66 -0
  81. package/build/empty-state/visual.cjs.map +7 -0
  82. package/build/form/index.cjs +27 -0
  83. package/build/form/index.cjs.map +7 -0
  84. package/build/form/input-control/index.cjs +31 -0
  85. package/build/form/input-control/index.cjs.map +7 -0
  86. package/build/form/input-control/input-control.cjs +50 -0
  87. package/build/form/input-control/input-control.cjs.map +7 -0
  88. package/build/form/input-control/types.cjs +19 -0
  89. package/build/form/input-control/types.cjs.map +7 -0
  90. package/build/form/primitives/field/description.cjs +2 -2
  91. package/build/form/primitives/field/description.cjs.map +1 -1
  92. package/build/form/primitives/field/details.cjs +2 -2
  93. package/build/form/primitives/field/details.cjs.map +1 -1
  94. package/build/form/primitives/field/label.cjs +2 -2
  95. package/build/form/primitives/field/label.cjs.map +1 -1
  96. package/build/form/primitives/field/root.cjs +4 -4
  97. package/build/form/primitives/field/root.cjs.map +2 -2
  98. package/build/form/primitives/fieldset/description.cjs +2 -2
  99. package/build/form/primitives/fieldset/description.cjs.map +1 -1
  100. package/build/form/primitives/fieldset/details.cjs +2 -2
  101. package/build/form/primitives/fieldset/details.cjs.map +1 -1
  102. package/build/form/primitives/fieldset/legend.cjs +2 -2
  103. package/build/form/primitives/fieldset/legend.cjs.map +1 -1
  104. package/build/form/primitives/fieldset/root.cjs +2 -2
  105. package/build/form/primitives/fieldset/root.cjs.map +1 -1
  106. package/build/form/primitives/input/input.cjs +6 -6
  107. package/build/form/primitives/input/input.cjs.map +2 -2
  108. package/build/form/primitives/input-layout/input-layout.cjs +4 -4
  109. package/build/form/primitives/input-layout/input-layout.cjs.map +1 -1
  110. package/build/form/primitives/input-layout/slot.cjs +5 -4
  111. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  112. package/build/form/primitives/select/item.cjs +5 -5
  113. package/build/form/primitives/select/item.cjs.map +2 -2
  114. package/build/form/primitives/select/popup.cjs +7 -7
  115. package/build/form/primitives/select/popup.cjs.map +2 -2
  116. package/build/form/primitives/select/trigger.cjs +7 -7
  117. package/build/form/primitives/select/trigger.cjs.map +2 -2
  118. package/build/form/primitives/textarea/textarea.cjs +3 -3
  119. package/build/form/primitives/textarea/textarea.cjs.map +2 -2
  120. package/build/form/types.cjs +19 -0
  121. package/build/form/types.cjs.map +7 -0
  122. package/build/icon-button/icon-button.cjs +2 -2
  123. package/build/icon-button/icon-button.cjs.map +1 -1
  124. package/build/index.cjs +11 -2
  125. package/build/index.cjs.map +2 -2
  126. package/build/link/link.cjs +8 -8
  127. package/build/link/link.cjs.map +2 -2
  128. package/build/notice/action-button.cjs +2 -2
  129. package/build/notice/action-button.cjs.map +1 -1
  130. package/build/notice/action-link.cjs +2 -2
  131. package/build/notice/action-link.cjs.map +1 -1
  132. package/build/notice/actions.cjs +2 -2
  133. package/build/notice/actions.cjs.map +1 -1
  134. package/build/notice/close-icon.cjs +2 -2
  135. package/build/notice/close-icon.cjs.map +1 -1
  136. package/build/notice/description.cjs +2 -2
  137. package/build/notice/description.cjs.map +1 -1
  138. package/build/notice/index.cjs.map +1 -1
  139. package/build/notice/root.cjs +4 -4
  140. package/build/notice/root.cjs.map +1 -1
  141. package/build/notice/title.cjs +2 -2
  142. package/build/notice/title.cjs.map +1 -1
  143. package/build/stack/stack.cjs +2 -2
  144. package/build/stack/stack.cjs.map +1 -1
  145. package/build/tabs/context.cjs +121 -0
  146. package/build/tabs/context.cjs.map +7 -0
  147. package/build/tabs/list.cjs +3 -3
  148. package/build/tabs/list.cjs.map +2 -2
  149. package/build/tabs/panel.cjs +5 -3
  150. package/build/tabs/panel.cjs.map +2 -2
  151. package/build/tabs/root.cjs +2 -1
  152. package/build/tabs/root.cjs.map +2 -2
  153. package/build/tabs/tab.cjs +5 -3
  154. package/build/tabs/tab.cjs.map +2 -2
  155. package/build/text/text.cjs +2 -2
  156. package/build/text/text.cjs.map +1 -1
  157. package/build/tooltip/popup.cjs +4 -4
  158. package/build/tooltip/popup.cjs.map +1 -1
  159. package/build/tooltip/root.cjs.map +2 -2
  160. package/build/utils/use-deprioritized-initial-focus.cjs +64 -0
  161. package/build/utils/use-deprioritized-initial-focus.cjs.map +7 -0
  162. package/build/visually-hidden/visually-hidden.cjs +2 -2
  163. package/build/visually-hidden/visually-hidden.cjs.map +1 -1
  164. package/build-module/alert-dialog/context.mjs +9 -0
  165. package/build-module/alert-dialog/context.mjs.map +7 -0
  166. package/build-module/alert-dialog/index.mjs +10 -0
  167. package/build-module/alert-dialog/index.mjs.map +7 -0
  168. package/build-module/alert-dialog/popup.mjs +58 -0
  169. package/build-module/alert-dialog/popup.mjs.map +7 -0
  170. package/build-module/alert-dialog/root.mjs +27 -0
  171. package/build-module/alert-dialog/root.mjs.map +7 -0
  172. package/build-module/alert-dialog/trigger.mjs +13 -0
  173. package/build-module/alert-dialog/trigger.mjs.map +7 -0
  174. package/build-module/alert-dialog/types.mjs +1 -0
  175. package/build-module/alert-dialog/types.mjs.map +7 -0
  176. package/build-module/badge/badge.mjs +3 -3
  177. package/build-module/badge/badge.mjs.map +2 -2
  178. package/build-module/button/button.mjs +9 -9
  179. package/build-module/button/button.mjs.map +2 -2
  180. package/build-module/card/content.mjs +3 -3
  181. package/build-module/card/content.mjs.map +2 -2
  182. package/build-module/card/full-bleed.mjs +3 -3
  183. package/build-module/card/full-bleed.mjs.map +2 -2
  184. package/build-module/card/header.mjs +3 -3
  185. package/build-module/card/header.mjs.map +2 -2
  186. package/build-module/card/root.mjs +5 -5
  187. package/build-module/card/root.mjs.map +2 -2
  188. package/build-module/card/title.mjs +16 -13
  189. package/build-module/card/title.mjs.map +2 -2
  190. package/build-module/collapsible/index.mjs +10 -0
  191. package/build-module/collapsible/index.mjs.map +7 -0
  192. package/build-module/collapsible/panel.mjs +13 -0
  193. package/build-module/collapsible/panel.mjs.map +7 -0
  194. package/build-module/collapsible/root.mjs +13 -0
  195. package/build-module/collapsible/root.mjs.map +7 -0
  196. package/build-module/collapsible/trigger.mjs +13 -0
  197. package/build-module/collapsible/trigger.mjs.map +7 -0
  198. package/build-module/collapsible/types.mjs +1 -0
  199. package/build-module/collapsible/types.mjs.map +7 -0
  200. package/build-module/collapsible-card/content.mjs +25 -4
  201. package/build-module/collapsible-card/content.mjs.map +3 -3
  202. package/build-module/collapsible-card/context.mjs +10 -0
  203. package/build-module/collapsible-card/context.mjs.map +7 -0
  204. package/build-module/collapsible-card/header-description.mjs +27 -0
  205. package/build-module/collapsible-card/header-description.mjs.map +7 -0
  206. package/build-module/collapsible-card/header.mjs +59 -40
  207. package/build-module/collapsible-card/header.mjs.map +3 -3
  208. package/build-module/collapsible-card/index.mjs +2 -0
  209. package/build-module/collapsible-card/index.mjs.map +2 -2
  210. package/build-module/collapsible-card/root.mjs +3 -3
  211. package/build-module/collapsible-card/root.mjs.map +2 -2
  212. package/build-module/dialog/action.mjs +4 -2
  213. package/build-module/dialog/action.mjs.map +2 -2
  214. package/build-module/dialog/close-icon.mjs +2 -1
  215. package/build-module/dialog/close-icon.mjs.map +2 -2
  216. package/build-module/dialog/footer.mjs +3 -3
  217. package/build-module/dialog/footer.mjs.map +2 -2
  218. package/build-module/dialog/header.mjs +3 -3
  219. package/build-module/dialog/header.mjs.map +2 -2
  220. package/build-module/dialog/popup.mjs +22 -5
  221. package/build-module/dialog/popup.mjs.map +2 -2
  222. package/build-module/dialog/title.mjs +3 -3
  223. package/build-module/dialog/title.mjs.map +2 -2
  224. package/build-module/empty-state/actions.mjs +31 -0
  225. package/build-module/empty-state/actions.mjs.map +7 -0
  226. package/build-module/empty-state/description.mjs +31 -0
  227. package/build-module/empty-state/description.mjs.map +7 -0
  228. package/build-module/empty-state/icon.mjs +34 -0
  229. package/build-module/empty-state/icon.mjs.map +7 -0
  230. package/build-module/empty-state/index.mjs +16 -0
  231. package/build-module/empty-state/index.mjs.map +7 -0
  232. package/build-module/empty-state/root.mjs +31 -0
  233. package/build-module/empty-state/root.mjs.map +7 -0
  234. package/build-module/empty-state/title.mjs +33 -0
  235. package/build-module/empty-state/title.mjs.map +7 -0
  236. package/build-module/empty-state/types.mjs +1 -0
  237. package/build-module/empty-state/types.mjs.map +7 -0
  238. package/build-module/empty-state/visual.mjs +31 -0
  239. package/build-module/empty-state/visual.mjs.map +7 -0
  240. package/build-module/form/index.mjs +4 -0
  241. package/build-module/form/index.mjs.map +7 -0
  242. package/build-module/form/input-control/index.mjs +6 -0
  243. package/build-module/form/input-control/index.mjs.map +7 -0
  244. package/build-module/form/input-control/input-control.mjs +25 -0
  245. package/build-module/form/input-control/input-control.mjs.map +7 -0
  246. package/build-module/form/input-control/types.mjs +1 -0
  247. package/build-module/form/input-control/types.mjs.map +7 -0
  248. package/build-module/form/primitives/field/description.mjs +2 -2
  249. package/build-module/form/primitives/field/description.mjs.map +1 -1
  250. package/build-module/form/primitives/field/details.mjs +2 -2
  251. package/build-module/form/primitives/field/details.mjs.map +1 -1
  252. package/build-module/form/primitives/field/label.mjs +2 -2
  253. package/build-module/form/primitives/field/label.mjs.map +1 -1
  254. package/build-module/form/primitives/field/root.mjs +4 -4
  255. package/build-module/form/primitives/field/root.mjs.map +2 -2
  256. package/build-module/form/primitives/fieldset/description.mjs +2 -2
  257. package/build-module/form/primitives/fieldset/description.mjs.map +1 -1
  258. package/build-module/form/primitives/fieldset/details.mjs +2 -2
  259. package/build-module/form/primitives/fieldset/details.mjs.map +1 -1
  260. package/build-module/form/primitives/fieldset/legend.mjs +2 -2
  261. package/build-module/form/primitives/fieldset/legend.mjs.map +1 -1
  262. package/build-module/form/primitives/fieldset/root.mjs +2 -2
  263. package/build-module/form/primitives/fieldset/root.mjs.map +1 -1
  264. package/build-module/form/primitives/input/input.mjs +6 -6
  265. package/build-module/form/primitives/input/input.mjs.map +2 -2
  266. package/build-module/form/primitives/input-layout/input-layout.mjs +4 -4
  267. package/build-module/form/primitives/input-layout/input-layout.mjs.map +1 -1
  268. package/build-module/form/primitives/input-layout/slot.mjs +5 -4
  269. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  270. package/build-module/form/primitives/select/item.mjs +5 -5
  271. package/build-module/form/primitives/select/item.mjs.map +2 -2
  272. package/build-module/form/primitives/select/popup.mjs +7 -7
  273. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  274. package/build-module/form/primitives/select/trigger.mjs +7 -7
  275. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  276. package/build-module/form/primitives/textarea/textarea.mjs +3 -3
  277. package/build-module/form/primitives/textarea/textarea.mjs.map +2 -2
  278. package/build-module/form/types.mjs +1 -0
  279. package/build-module/form/types.mjs.map +7 -0
  280. package/build-module/icon-button/icon-button.mjs +2 -2
  281. package/build-module/icon-button/icon-button.mjs.map +1 -1
  282. package/build-module/index.mjs +7 -1
  283. package/build-module/index.mjs.map +2 -2
  284. package/build-module/link/link.mjs +8 -8
  285. package/build-module/link/link.mjs.map +2 -2
  286. package/build-module/notice/action-button.mjs +2 -2
  287. package/build-module/notice/action-button.mjs.map +1 -1
  288. package/build-module/notice/action-link.mjs +2 -2
  289. package/build-module/notice/action-link.mjs.map +1 -1
  290. package/build-module/notice/actions.mjs +2 -2
  291. package/build-module/notice/actions.mjs.map +1 -1
  292. package/build-module/notice/close-icon.mjs +2 -2
  293. package/build-module/notice/close-icon.mjs.map +1 -1
  294. package/build-module/notice/description.mjs +2 -2
  295. package/build-module/notice/description.mjs.map +1 -1
  296. package/build-module/notice/index.mjs.map +1 -1
  297. package/build-module/notice/root.mjs +4 -4
  298. package/build-module/notice/root.mjs.map +1 -1
  299. package/build-module/notice/title.mjs +2 -2
  300. package/build-module/notice/title.mjs.map +1 -1
  301. package/build-module/stack/stack.mjs +2 -2
  302. package/build-module/stack/stack.mjs.map +1 -1
  303. package/build-module/tabs/context.mjs +101 -0
  304. package/build-module/tabs/context.mjs.map +7 -0
  305. package/build-module/tabs/list.mjs +3 -3
  306. package/build-module/tabs/list.mjs.map +2 -2
  307. package/build-module/tabs/panel.mjs +5 -3
  308. package/build-module/tabs/panel.mjs.map +2 -2
  309. package/build-module/tabs/root.mjs +2 -1
  310. package/build-module/tabs/root.mjs.map +2 -2
  311. package/build-module/tabs/tab.mjs +5 -3
  312. package/build-module/tabs/tab.mjs.map +2 -2
  313. package/build-module/text/text.mjs +2 -2
  314. package/build-module/text/text.mjs.map +1 -1
  315. package/build-module/tooltip/popup.mjs +4 -4
  316. package/build-module/tooltip/popup.mjs.map +1 -1
  317. package/build-module/tooltip/root.mjs.map +2 -2
  318. package/build-module/utils/use-deprioritized-initial-focus.mjs +39 -0
  319. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +7 -0
  320. package/build-module/visually-hidden/visually-hidden.mjs +2 -2
  321. package/build-module/visually-hidden/visually-hidden.mjs.map +1 -1
  322. package/build-types/alert-dialog/context.d.ts +8 -0
  323. package/build-types/alert-dialog/context.d.ts.map +1 -0
  324. package/build-types/alert-dialog/index.d.ts +4 -0
  325. package/build-types/alert-dialog/index.d.ts.map +1 -0
  326. package/build-types/alert-dialog/popup.d.ts +4 -0
  327. package/build-types/alert-dialog/popup.d.ts.map +1 -0
  328. package/build-types/alert-dialog/root.d.ts +24 -0
  329. package/build-types/alert-dialog/root.d.ts.map +1 -0
  330. package/build-types/alert-dialog/stories/index.story.d.ts +44 -0
  331. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -0
  332. package/build-types/alert-dialog/test/index.test.d.ts +2 -0
  333. package/build-types/alert-dialog/test/index.test.d.ts.map +1 -0
  334. package/build-types/alert-dialog/trigger.d.ts +6 -0
  335. package/build-types/alert-dialog/trigger.d.ts.map +1 -0
  336. package/build-types/alert-dialog/types.d.ts +70 -0
  337. package/build-types/alert-dialog/types.d.ts.map +1 -0
  338. package/build-types/card/title.d.ts.map +1 -1
  339. package/build-types/collapsible/index.d.ts +5 -0
  340. package/build-types/collapsible/index.d.ts.map +1 -0
  341. package/build-types/collapsible/panel.d.ts +16 -0
  342. package/build-types/collapsible/panel.d.ts.map +1 -0
  343. package/build-types/collapsible/root.d.ts +15 -0
  344. package/build-types/collapsible/root.d.ts.map +1 -0
  345. package/build-types/collapsible/stories/index.story.d.ts +18 -0
  346. package/build-types/collapsible/stories/index.story.d.ts.map +1 -0
  347. package/build-types/collapsible/test/index.test.d.ts +2 -0
  348. package/build-types/collapsible/test/index.test.d.ts.map +1 -0
  349. package/build-types/collapsible/trigger.d.ts +15 -0
  350. package/build-types/collapsible/trigger.d.ts.map +1 -0
  351. package/build-types/collapsible/types.d.ts +22 -0
  352. package/build-types/collapsible/types.d.ts.map +1 -0
  353. package/build-types/collapsible-card/content.d.ts.map +1 -1
  354. package/build-types/collapsible-card/context.d.ts +4 -0
  355. package/build-types/collapsible-card/context.d.ts.map +1 -0
  356. package/build-types/collapsible-card/header-description.d.ts +15 -0
  357. package/build-types/collapsible-card/header-description.d.ts.map +1 -0
  358. package/build-types/collapsible-card/header.d.ts.map +1 -1
  359. package/build-types/collapsible-card/index.d.ts +2 -1
  360. package/build-types/collapsible-card/index.d.ts.map +1 -1
  361. package/build-types/collapsible-card/stories/index.story.d.ts +10 -0
  362. package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
  363. package/build-types/collapsible-card/types.d.ts +21 -0
  364. package/build-types/collapsible-card/types.d.ts.map +1 -1
  365. package/build-types/dialog/action.d.ts.map +1 -1
  366. package/build-types/dialog/close-icon.d.ts.map +1 -1
  367. package/build-types/dialog/popup.d.ts.map +1 -1
  368. package/build-types/dialog/stories/index.story.d.ts +0 -6
  369. package/build-types/dialog/stories/index.story.d.ts.map +1 -1
  370. package/build-types/dialog/types.d.ts +5 -5
  371. package/build-types/dialog/types.d.ts.map +1 -1
  372. package/build-types/empty-state/actions.d.ts +7 -0
  373. package/build-types/empty-state/actions.d.ts.map +1 -0
  374. package/build-types/empty-state/description.d.ts +7 -0
  375. package/build-types/empty-state/description.d.ts.map +1 -0
  376. package/build-types/empty-state/icon.d.ts +7 -0
  377. package/build-types/empty-state/icon.d.ts.map +1 -0
  378. package/build-types/empty-state/index.d.ts +8 -0
  379. package/build-types/empty-state/index.d.ts.map +1 -0
  380. package/build-types/empty-state/root.d.ts +6 -0
  381. package/build-types/empty-state/root.d.ts.map +1 -0
  382. package/build-types/empty-state/stories/index.story.d.ts +8 -0
  383. package/build-types/empty-state/stories/index.story.d.ts.map +1 -0
  384. package/build-types/empty-state/test/actions.test.d.ts +2 -0
  385. package/build-types/empty-state/test/actions.test.d.ts.map +1 -0
  386. package/build-types/empty-state/test/description.test.d.ts +2 -0
  387. package/build-types/empty-state/test/description.test.d.ts.map +1 -0
  388. package/build-types/empty-state/test/icon.test.d.ts +2 -0
  389. package/build-types/empty-state/test/icon.test.d.ts.map +1 -0
  390. package/build-types/empty-state/test/root.test.d.ts +2 -0
  391. package/build-types/empty-state/test/root.test.d.ts.map +1 -0
  392. package/build-types/empty-state/test/title.test.d.ts +2 -0
  393. package/build-types/empty-state/test/title.test.d.ts.map +1 -0
  394. package/build-types/empty-state/test/visual.test.d.ts +2 -0
  395. package/build-types/empty-state/test/visual.test.d.ts.map +1 -0
  396. package/build-types/empty-state/title.d.ts +6 -0
  397. package/build-types/empty-state/title.d.ts.map +1 -0
  398. package/build-types/empty-state/types.d.ts +40 -0
  399. package/build-types/empty-state/types.d.ts.map +1 -0
  400. package/build-types/empty-state/visual.d.ts +7 -0
  401. package/build-types/empty-state/visual.d.ts.map +1 -0
  402. package/build-types/form/index.d.ts +3 -0
  403. package/build-types/form/index.d.ts.map +1 -0
  404. package/build-types/form/input-control/index.d.ts +2 -0
  405. package/build-types/form/input-control/index.d.ts.map +1 -0
  406. package/build-types/form/input-control/input-control.d.ts +6 -0
  407. package/build-types/form/input-control/input-control.d.ts.map +1 -0
  408. package/build-types/form/input-control/stories/index.story.d.ts +16 -0
  409. package/build-types/form/input-control/stories/index.story.d.ts.map +1 -0
  410. package/build-types/form/input-control/test/index.test.d.ts +2 -0
  411. package/build-types/form/input-control/test/index.test.d.ts.map +1 -0
  412. package/build-types/form/input-control/types.d.ts +4 -0
  413. package/build-types/form/input-control/types.d.ts.map +1 -0
  414. package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
  415. package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
  416. package/build-types/form/primitives/input/stories/index.story.d.ts +2 -0
  417. package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
  418. package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
  419. package/build-types/form/primitives/input-layout/stories/index.story.d.ts +5 -0
  420. package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
  421. package/build-types/form/stories/shared.d.ts +3 -0
  422. package/build-types/form/stories/shared.d.ts.map +1 -0
  423. package/build-types/form/types.d.ts +30 -0
  424. package/build-types/form/types.d.ts.map +1 -0
  425. package/build-types/index.d.ts +4 -1
  426. package/build-types/index.d.ts.map +1 -1
  427. package/build-types/notice/index.d.ts +0 -1
  428. package/build-types/notice/index.d.ts.map +1 -1
  429. package/build-types/tabs/context.d.ts +26 -0
  430. package/build-types/tabs/context.d.ts.map +1 -0
  431. package/build-types/tabs/panel.d.ts.map +1 -1
  432. package/build-types/tabs/root.d.ts.map +1 -1
  433. package/build-types/tabs/tab.d.ts.map +1 -1
  434. package/build-types/tooltip/root.d.ts +12 -0
  435. package/build-types/tooltip/root.d.ts.map +1 -1
  436. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  437. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts +2 -0
  438. package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts.map +1 -0
  439. package/build-types/utils/use-deprioritized-initial-focus.d.ts +35 -0
  440. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -0
  441. package/package.json +17 -16
  442. package/src/alert-dialog/context.tsx +14 -0
  443. package/src/alert-dialog/index.ts +3 -0
  444. package/src/alert-dialog/popup.tsx +58 -0
  445. package/src/alert-dialog/root.tsx +48 -0
  446. package/src/alert-dialog/stories/index.story.tsx +254 -0
  447. package/src/alert-dialog/style.module.css +10 -0
  448. package/src/alert-dialog/test/index.test.tsx +537 -0
  449. package/src/alert-dialog/trigger.tsx +15 -0
  450. package/src/alert-dialog/types.ts +83 -0
  451. package/src/badge/style.module.css +5 -2
  452. package/src/button/style.module.css +2 -0
  453. package/src/card/stories/index.story.tsx +1 -1
  454. package/src/card/style.module.css +5 -7
  455. package/src/card/title.tsx +12 -11
  456. package/src/collapsible/index.ts +5 -0
  457. package/src/collapsible/panel.tsx +16 -0
  458. package/src/collapsible/root.tsx +15 -0
  459. package/src/collapsible/stories/index.story.tsx +108 -0
  460. package/src/collapsible/test/index.test.tsx +228 -0
  461. package/src/collapsible/trigger.tsx +15 -0
  462. package/src/collapsible/types.ts +24 -0
  463. package/src/collapsible-card/content.tsx +17 -4
  464. package/src/collapsible-card/context.ts +7 -0
  465. package/src/collapsible-card/header-description.tsx +43 -0
  466. package/src/collapsible-card/header.tsx +50 -45
  467. package/src/collapsible-card/index.ts +2 -1
  468. package/src/collapsible-card/root.tsx +1 -1
  469. package/src/collapsible-card/stories/index.story.tsx +99 -1
  470. package/src/collapsible-card/style.module.css +49 -4
  471. package/src/collapsible-card/test/index.test.tsx +107 -40
  472. package/src/collapsible-card/types.ts +22 -0
  473. package/src/dialog/action.tsx +8 -2
  474. package/src/dialog/close-icon.tsx +1 -0
  475. package/src/dialog/popup.tsx +21 -2
  476. package/src/dialog/stories/index.story.tsx +0 -28
  477. package/src/dialog/style.module.css +5 -5
  478. package/src/dialog/test/index.test.tsx +117 -0
  479. package/src/dialog/types.ts +11 -5
  480. package/src/empty-state/actions.tsx +24 -0
  481. package/src/empty-state/description.tsx +27 -0
  482. package/src/empty-state/icon.tsx +24 -0
  483. package/src/empty-state/index.ts +8 -0
  484. package/src/empty-state/root.tsx +23 -0
  485. package/src/empty-state/stories/index.story.tsx +64 -0
  486. package/src/empty-state/style.module.css +53 -0
  487. package/src/empty-state/test/actions.test.tsx +18 -0
  488. package/src/empty-state/test/description.test.tsx +13 -0
  489. package/src/empty-state/test/icon.test.tsx +13 -0
  490. package/src/empty-state/test/root.test.tsx +13 -0
  491. package/src/empty-state/test/title.test.tsx +13 -0
  492. package/src/empty-state/test/visual.test.tsx +17 -0
  493. package/src/empty-state/title.tsx +23 -0
  494. package/src/empty-state/types.ts +45 -0
  495. package/src/empty-state/visual.tsx +24 -0
  496. package/src/form/index.ts +3 -0
  497. package/src/form/input-control/index.ts +1 -0
  498. package/src/form/input-control/input-control.tsx +33 -0
  499. package/src/form/input-control/stories/index.story.tsx +163 -0
  500. package/src/form/input-control/test/index.test.tsx +53 -0
  501. package/src/form/input-control/types.ts +5 -0
  502. package/src/form/primitives/field/root.tsx +2 -2
  503. package/src/form/primitives/field/stories/index.story.tsx +2 -7
  504. package/src/form/primitives/fieldset/stories/index.story.tsx +2 -7
  505. package/src/form/primitives/input/stories/index.story.tsx +7 -0
  506. package/src/form/primitives/input-layout/slot.tsx +6 -2
  507. package/src/form/primitives/input-layout/stories/index.story.tsx +22 -1
  508. package/src/form/primitives/stories/overview.mdx +15 -0
  509. package/src/form/primitives/textarea/textarea.tsx +1 -1
  510. package/src/form/stories/shared.tsx +19 -0
  511. package/src/form/types.ts +34 -0
  512. package/src/index.ts +4 -1
  513. package/src/notice/index.ts +0 -2
  514. package/src/notice/style.module.css +1 -1
  515. package/src/tabs/context.tsx +170 -0
  516. package/src/tabs/panel.tsx +3 -0
  517. package/src/tabs/root.tsx +6 -1
  518. package/src/tabs/style.module.css +1 -1
  519. package/src/tabs/tab.tsx +3 -0
  520. package/src/tabs/test/index.test.tsx +162 -0
  521. package/src/tooltip/root.tsx +12 -0
  522. package/src/tooltip/stories/index.story.tsx +20 -15
  523. package/src/utils/css/focus.module.css +4 -2
  524. package/src/utils/css/item-popup.module.css +1 -0
  525. package/src/utils/css/select-trigger.module.css +1 -0
  526. package/src/utils/test/use-deprioritized-initial-focus.test.tsx +230 -0
  527. package/src/utils/use-deprioritized-initial-focus.ts +83 -0
  528. package/AGENTS.md +0 -9
  529. package/CLAUDE.md +0 -1
@@ -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='f377a3cf09']")) {
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", "f377a3cf09");
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-xl,20px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-lg,16px);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='f377a3cf09']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"f377a3cf09\");\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-xl,20px);--wp-ui-card-header-content-gap:var(--wpds-dimension-gap-lg,16px);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,owCAAgxC,CAAC;AAC3zC,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
  }
@@ -0,0 +1,10 @@
1
+ // packages/ui/src/collapsible/index.ts
2
+ import { Panel } from "./panel.mjs";
3
+ import { Root } from "./root.mjs";
4
+ import { Trigger } from "./trigger.mjs";
5
+ export {
6
+ Panel,
7
+ Root,
8
+ Trigger
9
+ };
10
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible/index.ts"],
4
+ "sourcesContent": ["import { Panel } from './panel';\nimport { Root } from './root';\nimport { Trigger } from './trigger';\n\nexport { Root, Trigger, Panel };\n"],
5
+ "mappings": ";AAAA,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,13 @@
1
+ // packages/ui/src/collapsible/panel.tsx
2
+ import { Collapsible as _Collapsible } from "@base-ui/react/collapsible";
3
+ import { forwardRef } from "@wordpress/element";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Panel = forwardRef(
6
+ function CollapsiblePanel(props, forwardedRef) {
7
+ return /* @__PURE__ */ jsx(_Collapsible.Panel, { ref: forwardedRef, ...props });
8
+ }
9
+ );
10
+ export {
11
+ Panel
12
+ };
13
+ //# sourceMappingURL=panel.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible/panel.tsx"],
4
+ "sourcesContent": ["import { Collapsible as _Collapsible } from '@base-ui/react/collapsible';\nimport { forwardRef } from '@wordpress/element';\nimport type { PanelProps } from './types';\n\n/**\n * A panel with the collapsible contents. Hidden when collapsed, visible\n * when expanded.\n *\n * `Collapsible` is a collection of React components that combine to render\n * a collapsible panel controlled by a button.\n */\nexport const Panel = forwardRef< HTMLDivElement, PanelProps >(\n\tfunction CollapsiblePanel( props, forwardedRef ) {\n\t\treturn <_Collapsible.Panel ref={ forwardedRef } { ...props } />;\n\t}\n);\n"],
5
+ "mappings": ";AAAA,SAAS,eAAe,oBAAoB;AAC5C,SAAS,kBAAkB;AAYlB;AAFF,IAAM,QAAQ;AAAA,EACpB,SAAS,iBAAkB,OAAO,cAAe;AAChD,WAAO,oBAAC,aAAa,OAAb,EAAmB,KAAM,cAAiB,GAAG,OAAQ;AAAA,EAC9D;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,13 @@
1
+ // packages/ui/src/collapsible/root.tsx
2
+ import { Collapsible as _Collapsible } from "@base-ui/react/collapsible";
3
+ import { forwardRef } from "@wordpress/element";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Root = forwardRef(
6
+ function CollapsibleRoot(props, forwardedRef) {
7
+ return /* @__PURE__ */ jsx(_Collapsible.Root, { ref: forwardedRef, ...props });
8
+ }
9
+ );
10
+ export {
11
+ Root
12
+ };
13
+ //# sourceMappingURL=root.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible/root.tsx"],
4
+ "sourcesContent": ["import { Collapsible as _Collapsible } from '@base-ui/react/collapsible';\nimport { forwardRef } from '@wordpress/element';\nimport type { RootProps } from './types';\n\n/**\n * Groups all parts of the collapsible.\n *\n * `Collapsible` is a collection of React components that combine to render\n * a collapsible panel controlled by a button.\n */\nexport const Root = forwardRef< HTMLDivElement, RootProps >(\n\tfunction CollapsibleRoot( props, forwardedRef ) {\n\t\treturn <_Collapsible.Root ref={ forwardedRef } { ...props } />;\n\t}\n);\n"],
5
+ "mappings": ";AAAA,SAAS,eAAe,oBAAoB;AAC5C,SAAS,kBAAkB;AAWlB;AAFF,IAAM,OAAO;AAAA,EACnB,SAAS,gBAAiB,OAAO,cAAe;AAC/C,WAAO,oBAAC,aAAa,MAAb,EAAkB,KAAM,cAAiB,GAAG,OAAQ;AAAA,EAC7D;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,13 @@
1
+ // packages/ui/src/collapsible/trigger.tsx
2
+ import { Collapsible as _Collapsible } from "@base-ui/react/collapsible";
3
+ import { forwardRef } from "@wordpress/element";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Trigger = forwardRef(
6
+ function CollapsibleTrigger(props, forwardedRef) {
7
+ return /* @__PURE__ */ jsx(_Collapsible.Trigger, { ref: forwardedRef, ...props });
8
+ }
9
+ );
10
+ export {
11
+ Trigger
12
+ };
13
+ //# sourceMappingURL=trigger.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/collapsible/trigger.tsx"],
4
+ "sourcesContent": ["import { Collapsible as _Collapsible } from '@base-ui/react/collapsible';\nimport { forwardRef } from '@wordpress/element';\nimport type { TriggerProps } from './types';\n\n/**\n * A button that opens and closes the collapsible panel.\n *\n * `Collapsible` is a collection of React components that combine to render\n * a collapsible panel controlled by a button.\n */\nexport const Trigger = forwardRef< HTMLButtonElement, TriggerProps >(\n\tfunction CollapsibleTrigger( props, forwardedRef ) {\n\t\treturn <_Collapsible.Trigger ref={ forwardedRef } { ...props } />;\n\t}\n);\n"],
5
+ "mappings": ";AAAA,SAAS,eAAe,oBAAoB;AAC5C,SAAS,kBAAkB;AAWlB;AAFF,IAAM,UAAU;AAAA,EACtB,SAAS,mBAAoB,OAAO,cAAe;AAClD,WAAO,oBAAC,aAAa,SAAb,EAAqB,KAAM,cAAiB,GAAG,OAAQ;AAAA,EAChE;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=types.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -1,16 +1,37 @@
1
1
  // packages/ui/src/collapsible-card/content.tsx
2
- import { Collapsible } from "@base-ui/react/collapsible";
3
2
  import { forwardRef } from "@wordpress/element";
3
+ import clsx from "clsx";
4
4
  import * as Card from "../card/index.mjs";
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 { Collapsible } from '@base-ui/react/collapsible';\nimport { forwardRef } from '@wordpress/element';\nimport * as Card from '../card';\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,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,YAAY,UAAU;AAYT;AALN,IAAMA,WAAU;AAAA,EACtB,SAAS,uBAAwB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AAChE,WACC;AAAA,MAAC,YAAY;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,66 +1,85 @@
1
1
  // packages/ui/src/collapsible-card/header.tsx
2
- import { Collapsible } from "@base-ui/react/collapsible";
3
2
  import clsx from "clsx";
4
- import { forwardRef, useCallback, useRef } from "@wordpress/element";
5
- import { __ } from "@wordpress/i18n";
6
- import { chevronDown, chevronUp } from "@wordpress/icons";
3
+ import { forwardRef, useMemo, useState } from "@wordpress/element";
4
+ import { chevronDown } from "@wordpress/icons";
7
5
  import * as Card from "../card/index.mjs";
8
- import { IconButton } from "../icon-button/index.mjs";
6
+ import * as Collapsible from "../collapsible/index.mjs";
7
+ import { Icon } from "../icon/index.mjs";
9
8
 
10
9
  // packages/ui/src/collapsible-card/style.module.css
11
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='369efd7a16']")) {
10
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='23250ec980']")) {
12
11
  const style = document.createElement("style");
13
- style.setAttribute("data-wp-hash", "369efd7a16");
14
- 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{transform:translateY(-50%)}}@layer wp-ui-compositions{._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);&:has(._3106f8d2b0330faa__header-trigger: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)}}}"));
15
14
  document.head.appendChild(style);
16
15
  }
17
- 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
+
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='4acd2b57a1']")) {
20
+ const style = document.createElement("style");
21
+ style.setAttribute("data-wp-hash", "4acd2b57a1");
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
+ document.head.appendChild(style);
24
+ }
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" };
18
26
 
19
27
  // packages/ui/src/collapsible-card/header.tsx
28
+ import { HeaderDescriptionIdContext } from "./context.mjs";
20
29
  import { jsx, jsxs } from "react/jsx-runtime";
21
30
  var Header2 = forwardRef(
22
- function CollapsibleCardHeader({ children, className, onClick, ...restProps }, ref) {
23
- const triggerRef = useRef(null);
24
- const handleHeaderClick = useCallback(
25
- (event) => {
26
- const trigger = triggerRef.current;
27
- if (trigger && event.target instanceof Node && !trigger.contains(event.target)) {
28
- trigger.click();
29
- }
30
- onClick?.(event);
31
- },
32
- [onClick]
31
+ function CollapsibleCardHeader({ children, className, render, ...restProps }, ref) {
32
+ const [descriptionId, setDescriptionId] = useState();
33
+ const contextValue = useMemo(
34
+ () => ({ setDescriptionId }),
35
+ [setDescriptionId]
33
36
  );
34
- return /* @__PURE__ */ jsxs(
35
- Card.Header,
37
+ return /* @__PURE__ */ jsx(HeaderDescriptionIdContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs(
38
+ Collapsible.Trigger,
36
39
  {
37
- ref,
38
40
  className: clsx(style_default.header, className),
39
- onClick: handleHeaderClick,
40
- ...restProps,
41
+ render: /* @__PURE__ */ jsx(
42
+ Card.Header,
43
+ {
44
+ ref,
45
+ render,
46
+ ...restProps
47
+ }
48
+ ),
49
+ nativeButton: false,
50
+ "aria-describedby": descriptionId,
41
51
  children: [
42
52
  /* @__PURE__ */ jsx("div", { className: style_default["header-content"], children }),
43
- /* @__PURE__ */ jsx("div", { className: style_default["header-trigger-wrapper"], children: /* @__PURE__ */ jsx(
44
- Collapsible.Trigger,
53
+ /* @__PURE__ */ jsx(
54
+ "div",
45
55
  {
46
- ref: triggerRef,
47
- render: (props, state) => /* @__PURE__ */ jsx(
48
- IconButton,
56
+ className: clsx(
57
+ style_default["header-trigger-positioner"]
58
+ ),
59
+ children: /* @__PURE__ */ jsx(
60
+ "div",
49
61
  {
50
- ...props,
51
- label: __("Expand or collapse card"),
52
- icon: state.open ? chevronUp : chevronDown,
53
- variant: "minimal",
54
- tone: "neutral",
55
- size: "compact"
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
+ )
56
76
  }
57
- ),
58
- className: style_default["header-trigger"]
77
+ )
59
78
  }
60
- ) })
79
+ )
61
80
  ]
62
81
  }
63
- );
82
+ ) });
64
83
  }
65
84
  );
66
85
  export {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/collapsible-card/header.tsx", "../../src/collapsible-card/style.module.css"],
4
- "sourcesContent": ["import { Collapsible } from '@base-ui/react/collapsible';\nimport clsx from 'clsx';\nimport type { MouseEvent } from 'react';\nimport { forwardRef, useCallback, useRef } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { chevronDown, chevronUp } from '@wordpress/icons';\nimport * as Card from '../card';\nimport { IconButton } from '../icon-button';\nimport styles from './style.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, onClick, ...restProps },\n\t\tref\n\t) {\n\t\tconst triggerRef = useRef< HTMLButtonElement >( null );\n\n\t\tconst handleHeaderClick = useCallback(\n\t\t\t( event: MouseEvent< HTMLDivElement > ) => {\n\t\t\t\tconst trigger = triggerRef.current;\n\t\t\t\tif (\n\t\t\t\t\ttrigger &&\n\t\t\t\t\tevent.target instanceof Node &&\n\t\t\t\t\t! trigger.contains( event.target )\n\t\t\t\t) {\n\t\t\t\t\ttrigger.click();\n\t\t\t\t}\n\n\t\t\t\tonClick?.( event );\n\t\t\t},\n\t\t\t[ onClick ]\n\t\t);\n\n\t\treturn (\n\t\t\t<Card.Header\n\t\t\t\tref={ ref }\n\t\t\t\tclassName={ clsx( styles.header, className ) }\n\t\t\t\tonClick={ handleHeaderClick }\n\t\t\t\t{ ...restProps }\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<Collapsible.Trigger\n\t\t\t\t\t\tref={ triggerRef }\n\t\t\t\t\t\trender={ ( props, state ) => (\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t\t\t\tlabel={ __( 'Expand or collapse card' ) }\n\t\t\t\t\t\t\t\ticon={ state.open ? chevronUp : chevronDown }\n\t\t\t\t\t\t\t\tvariant=\"minimal\"\n\t\t\t\t\t\t\t\ttone=\"neutral\"\n\t\t\t\t\t\t\t\tsize=\"compact\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tclassName={ styles[ 'header-trigger' ] }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Card.Header>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='369efd7a16']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"369efd7a16\");\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{transform:translateY(-50%)}}@layer wp-ui-compositions{._5d2dfcb4085c6d0f__header{align-items:stretch;display:flex;flex-direction:row;gap:var(--wpds-dimension-gap-sm,8px);&:has(._3106f8d2b0330faa__header-trigger: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"],
5
- "mappings": ";AAAA,SAAS,mBAAmB;AAC5B,OAAO,UAAU;AAEjB,SAAS,YAAY,aAAa,cAAc;AAChD,SAAS,UAAU;AACnB,SAAS,aAAa,iBAAiB;AACvC,YAAY,UAAU;AACtB,SAAS,kBAAkB;;;ACP3B,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,6jBAA6jB,CAAC;AACxmB,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,kBAAiB,oCAAmC,0BAAyB,4CAA2C,kBAAiB,qCAAoC,UAAS,4BAA2B;;;ADsC9N,SAMC,KAND;AAxBI,IAAMA,UAAS;AAAA,EACrB,SAAS,sBACR,EAAE,UAAU,WAAW,SAAS,GAAG,UAAU,GAC7C,KACC;AACD,UAAM,aAAa,OAA6B,IAAK;AAErD,UAAM,oBAAoB;AAAA,MACzB,CAAE,UAAyC;AAC1C,cAAM,UAAU,WAAW;AAC3B,YACC,WACA,MAAM,kBAAkB,QACxB,CAAE,QAAQ,SAAU,MAAM,MAAO,GAChC;AACD,kBAAQ,MAAM;AAAA,QACf;AAEA,kBAAW,KAAM;AAAA,MAClB;AAAA,MACA,CAAE,OAAQ;AAAA,IACX;AAEA,WACC;AAAA,MAAM;AAAA,MAAL;AAAA,QACA;AAAA,QACA,WAAY,KAAM,cAAO,QAAQ,SAAU;AAAA,QAC3C,SAAU;AAAA,QACR,GAAG;AAAA,QAEL;AAAA,8BAAC,SAAI,WAAY,cAAQ,gBAAiB,GAAM,UAAU;AAAA,UAC1D,oBAAC,SAAI,WAAY,cAAQ,wBAAyB,GACjD;AAAA,YAAC,YAAY;AAAA,YAAZ;AAAA,cACA,KAAM;AAAA,cACN,QAAS,CAAE,OAAO,UACjB;AAAA,gBAAC;AAAA;AAAA,kBACE,GAAG;AAAA,kBACL,OAAQ,GAAI,yBAA0B;AAAA,kBACtC,MAAO,MAAM,OAAO,YAAY;AAAA,kBAChC,SAAQ;AAAA,kBACR,MAAK;AAAA,kBACL,MAAK;AAAA;AAAA,cACN;AAAA,cAED,WAAY,cAAQ,gBAAiB;AAAA;AAAA,UACtC,GACD;AAAA;AAAA;AAAA,IACD;AAAA,EAEF;AACD;",
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, 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
  }
@@ -1,9 +1,9 @@
1
1
  // packages/ui/src/collapsible-card/root.tsx
2
- import { Collapsible } from "@base-ui/react/collapsible";
3
2
  import { forwardRef } from "@wordpress/element";
4
3
  import * as Card from "../card/index.mjs";
4
+ import * as Collapsible from "../collapsible/index.mjs";
5
5
  import { jsx } from "react/jsx-runtime";
6
- var Root2 = forwardRef(
6
+ var Root3 = forwardRef(
7
7
  function CollapsibleCardRoot({ render, ...restProps }, ref) {
8
8
  return /* @__PURE__ */ jsx(
9
9
  Collapsible.Root,
@@ -16,6 +16,6 @@ var Root2 = forwardRef(
16
16
  }
17
17
  );
18
18
  export {
19
- Root2 as Root
19
+ Root3 as Root
20
20
  };
21
21
  //# sourceMappingURL=root.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/collapsible-card/root.tsx"],
4
- "sourcesContent": ["import { Collapsible } from '@base-ui/react/collapsible';\nimport { forwardRef } from '@wordpress/element';\nimport * as Card from '../card';\nimport type { RootProps } from './types';\n\n/**\n * A card that can be expanded and collapsed. When collapsed, only the\n * header is visible.\n *\n * ```jsx\n * import { CollapsibleCard, Card } from '@wordpress/ui';\n *\n * function MyComponent() {\n * \treturn (\n * \t\t<CollapsibleCard.Root defaultOpen>\n * \t\t\t<CollapsibleCard.Header>\n * \t\t\t\t<Card.Title>Heading</Card.Title>\n * \t\t\t</CollapsibleCard.Header>\n * \t\t\t<CollapsibleCard.Content>\n * \t\t\t\t<p>Collapsible content here.</p>\n * \t\t\t</CollapsibleCard.Content>\n * \t\t</CollapsibleCard.Root>\n * \t);\n * }\n * ```\n */\nexport const Root = forwardRef< HTMLDivElement, RootProps >(\n\tfunction CollapsibleCardRoot( { render, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<Collapsible.Root\n\t\t\t\tref={ ref }\n\t\t\t\trender={ <Card.Root render={ render } /> }\n\t\t\t\t{ ...restProps }\n\t\t\t/>\n\t\t);\n\t}\n);\n"],
5
- "mappings": ";AAAA,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,YAAY,UAAU;AA6BT;AALN,IAAMA,QAAO;AAAA,EACnB,SAAS,oBAAqB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AAC7D,WACC;AAAA,MAAC,YAAY;AAAA,MAAZ;AAAA,QACA;AAAA,QACA,QAAS,oBAAM,WAAL,EAAU,QAAkB;AAAA,QACpC,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { forwardRef } from '@wordpress/element';\nimport * as Card from '../card';\nimport * as Collapsible from '../collapsible';\nimport type { RootProps } from './types';\n\n/**\n * A card that can be expanded and collapsed. When collapsed, only the\n * header is visible.\n *\n * ```jsx\n * import { CollapsibleCard, Card } from '@wordpress/ui';\n *\n * function MyComponent() {\n * \treturn (\n * \t\t<CollapsibleCard.Root defaultOpen>\n * \t\t\t<CollapsibleCard.Header>\n * \t\t\t\t<Card.Title>Heading</Card.Title>\n * \t\t\t</CollapsibleCard.Header>\n * \t\t\t<CollapsibleCard.Content>\n * \t\t\t\t<p>Collapsible content here.</p>\n * \t\t\t</CollapsibleCard.Content>\n * \t\t</CollapsibleCard.Root>\n * \t);\n * }\n * ```\n */\nexport const Root = forwardRef< HTMLDivElement, RootProps >(\n\tfunction CollapsibleCardRoot( { render, ...restProps }, ref ) {\n\t\treturn (\n\t\t\t<Collapsible.Root\n\t\t\t\tref={ ref }\n\t\t\t\trender={ <Card.Root 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;AA6BhB;AALN,IAAMA,QAAO;AAAA,EACnB,SAAS,oBAAqB,EAAE,QAAQ,GAAG,UAAU,GAAG,KAAM;AAC7D,WACC;AAAA,MAAa;AAAA,MAAZ;AAAA,QACA;AAAA,QACA,QAAS,oBAAM,WAAL,EAAU,QAAkB;AAAA,QACpC,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
6
6
  "names": ["Root"]
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
  }