@wordpress/ui 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/CONTRIBUTING.md +149 -0
  3. package/README.md +34 -6
  4. package/build/alert-dialog/context.cjs +6 -1
  5. package/build/alert-dialog/context.cjs.map +2 -2
  6. package/build/alert-dialog/popup.cjs +105 -33
  7. package/build/alert-dialog/popup.cjs.map +4 -4
  8. package/build/alert-dialog/root.cjs +106 -6
  9. package/build/alert-dialog/root.cjs.map +2 -2
  10. package/build/alert-dialog/trigger.cjs +4 -14
  11. package/build/alert-dialog/trigger.cjs.map +3 -3
  12. package/build/alert-dialog/types.cjs.map +1 -1
  13. package/build/badge/badge.cjs +14 -14
  14. package/build/badge/badge.cjs.map +2 -2
  15. package/build/button/button.cjs +16 -6
  16. package/build/button/button.cjs.map +3 -3
  17. package/build/card/content.cjs +4 -4
  18. package/build/card/content.cjs.map +2 -2
  19. package/build/card/full-bleed.cjs +4 -4
  20. package/build/card/full-bleed.cjs.map +2 -2
  21. package/build/card/header.cjs +4 -4
  22. package/build/card/header.cjs.map +2 -2
  23. package/build/card/root.cjs +4 -4
  24. package/build/card/root.cjs.map +2 -2
  25. package/build/card/title.cjs +5 -25
  26. package/build/card/title.cjs.map +4 -4
  27. package/build/collapsible-card/content.cjs +3 -3
  28. package/build/collapsible-card/content.cjs.map +1 -1
  29. package/build/collapsible-card/header.cjs +6 -6
  30. package/build/collapsible-card/header.cjs.map +2 -2
  31. package/build/dialog/footer.cjs +3 -3
  32. package/build/dialog/footer.cjs.map +2 -2
  33. package/build/dialog/header.cjs +3 -3
  34. package/build/dialog/header.cjs.map +2 -2
  35. package/build/dialog/popup.cjs +5 -4
  36. package/build/dialog/popup.cjs.map +2 -2
  37. package/build/dialog/title.cjs +10 -19
  38. package/build/dialog/title.cjs.map +3 -3
  39. package/build/dialog/types.cjs.map +1 -1
  40. package/build/empty-state/actions.cjs +3 -3
  41. package/build/empty-state/actions.cjs.map +2 -2
  42. package/build/empty-state/description.cjs +8 -5
  43. package/build/empty-state/description.cjs.map +2 -2
  44. package/build/empty-state/icon.cjs +3 -3
  45. package/build/empty-state/icon.cjs.map +2 -2
  46. package/build/empty-state/root.cjs +3 -3
  47. package/build/empty-state/root.cjs.map +2 -2
  48. package/build/empty-state/title.cjs +8 -5
  49. package/build/empty-state/title.cjs.map +2 -2
  50. package/build/empty-state/visual.cjs +3 -3
  51. package/build/empty-state/visual.cjs.map +2 -2
  52. package/build/form/primitives/field/description.cjs +17 -4
  53. package/build/form/primitives/field/description.cjs.map +3 -3
  54. package/build/form/primitives/field/details.cjs +4 -4
  55. package/build/form/primitives/field/details.cjs.map +2 -2
  56. package/build/form/primitives/field/label.cjs +8 -8
  57. package/build/form/primitives/field/label.cjs.map +2 -2
  58. package/build/form/primitives/field/root.cjs +2 -2
  59. package/build/form/primitives/field/root.cjs.map +2 -2
  60. package/build/form/primitives/fieldset/description.cjs +20 -4
  61. package/build/form/primitives/fieldset/description.cjs.map +3 -3
  62. package/build/form/primitives/fieldset/details.cjs +3 -3
  63. package/build/form/primitives/fieldset/details.cjs.map +2 -2
  64. package/build/form/primitives/fieldset/legend.cjs +8 -7
  65. package/build/form/primitives/fieldset/legend.cjs.map +2 -2
  66. package/build/form/primitives/input/input.cjs +23 -7
  67. package/build/form/primitives/input/input.cjs.map +3 -3
  68. package/build/form/primitives/input-layout/input-layout.cjs +13 -3
  69. package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
  70. package/build/form/primitives/input-layout/slot.cjs +3 -3
  71. package/build/form/primitives/input-layout/slot.cjs.map +2 -2
  72. package/build/form/primitives/select/item.cjs +3 -3
  73. package/build/form/primitives/select/item.cjs.map +2 -2
  74. package/build/form/primitives/select/popup.cjs +5 -5
  75. package/build/form/primitives/select/popup.cjs.map +2 -2
  76. package/build/form/primitives/select/trigger.cjs +6 -6
  77. package/build/form/primitives/select/trigger.cjs.map +2 -2
  78. package/build/form/primitives/select/types.cjs.map +1 -1
  79. package/build/form/primitives/textarea/textarea.cjs +20 -1
  80. package/build/form/primitives/textarea/textarea.cjs.map +3 -3
  81. package/build/index.cjs +3 -0
  82. package/build/index.cjs.map +2 -2
  83. package/build/link/link.cjs +16 -6
  84. package/build/link/link.cjs.map +3 -3
  85. package/build/notice/action-button.cjs +3 -3
  86. package/build/notice/action-button.cjs.map +2 -2
  87. package/build/notice/action-link.cjs +3 -3
  88. package/build/notice/action-link.cjs.map +2 -2
  89. package/build/notice/actions.cjs +3 -3
  90. package/build/notice/actions.cjs.map +2 -2
  91. package/build/notice/close-icon.cjs +3 -3
  92. package/build/notice/close-icon.cjs.map +2 -2
  93. package/build/notice/description.cjs +3 -3
  94. package/build/notice/description.cjs.map +2 -2
  95. package/build/notice/root.cjs +3 -3
  96. package/build/notice/root.cjs.map +2 -2
  97. package/build/notice/title.cjs +3 -3
  98. package/build/notice/title.cjs.map +2 -2
  99. package/build/popover/arrow.cjs +94 -0
  100. package/build/popover/arrow.cjs.map +7 -0
  101. package/build/popover/close.cjs +45 -0
  102. package/build/popover/close.cjs.map +7 -0
  103. package/build/popover/context.cjs +76 -0
  104. package/build/popover/context.cjs.map +7 -0
  105. package/build/popover/description.cjs +70 -0
  106. package/build/popover/description.cjs.map +7 -0
  107. package/build/popover/index.cjs +49 -0
  108. package/build/popover/index.cjs.map +7 -0
  109. package/build/popover/popup.cjs +138 -0
  110. package/build/popover/popup.cjs.map +7 -0
  111. package/build/popover/root.cjs +35 -0
  112. package/build/popover/root.cjs.map +7 -0
  113. package/build/popover/title.cjs +56 -0
  114. package/build/popover/title.cjs.map +7 -0
  115. package/build/popover/trigger.cjs +38 -0
  116. package/build/popover/trigger.cjs.map +7 -0
  117. package/build/popover/types.cjs +19 -0
  118. package/build/popover/types.cjs.map +7 -0
  119. package/build/tabs/list.cjs +3 -4
  120. package/build/tabs/list.cjs.map +2 -2
  121. package/build/tabs/panel.cjs +3 -3
  122. package/build/tabs/panel.cjs.map +2 -2
  123. package/build/tabs/tab.cjs +3 -3
  124. package/build/tabs/tab.cjs.map +2 -2
  125. package/build/text/text.cjs +20 -5
  126. package/build/text/text.cjs.map +3 -3
  127. package/build/tooltip/popup.cjs +5 -4
  128. package/build/tooltip/popup.cjs.map +2 -2
  129. package/build/tooltip/root.cjs.map +2 -2
  130. package/build/tooltip/types.cjs.map +1 -1
  131. package/build/utils/types.cjs.map +1 -1
  132. package/build/utils/use-deprioritized-initial-focus.cjs.map +2 -2
  133. package/build/visually-hidden/visually-hidden.cjs.map +2 -2
  134. package/build-module/alert-dialog/context.mjs +6 -1
  135. package/build-module/alert-dialog/context.mjs.map +2 -2
  136. package/build-module/alert-dialog/popup.mjs +107 -33
  137. package/build-module/alert-dialog/popup.mjs.map +4 -4
  138. package/build-module/alert-dialog/root.mjs +113 -7
  139. package/build-module/alert-dialog/root.mjs.map +2 -2
  140. package/build-module/alert-dialog/trigger.mjs +4 -4
  141. package/build-module/alert-dialog/trigger.mjs.map +3 -3
  142. package/build-module/badge/badge.mjs +14 -14
  143. package/build-module/badge/badge.mjs.map +2 -2
  144. package/build-module/button/button.mjs +16 -6
  145. package/build-module/button/button.mjs.map +3 -3
  146. package/build-module/card/content.mjs +4 -4
  147. package/build-module/card/content.mjs.map +2 -2
  148. package/build-module/card/full-bleed.mjs +4 -4
  149. package/build-module/card/full-bleed.mjs.map +2 -2
  150. package/build-module/card/header.mjs +4 -4
  151. package/build-module/card/header.mjs.map +2 -2
  152. package/build-module/card/root.mjs +4 -4
  153. package/build-module/card/root.mjs.map +2 -2
  154. package/build-module/card/title.mjs +5 -15
  155. package/build-module/card/title.mjs.map +3 -3
  156. package/build-module/collapsible-card/content.mjs +3 -3
  157. package/build-module/collapsible-card/content.mjs.map +1 -1
  158. package/build-module/collapsible-card/header.mjs +6 -6
  159. package/build-module/collapsible-card/header.mjs.map +2 -2
  160. package/build-module/dialog/footer.mjs +3 -3
  161. package/build-module/dialog/footer.mjs.map +2 -2
  162. package/build-module/dialog/header.mjs +3 -3
  163. package/build-module/dialog/header.mjs.map +2 -2
  164. package/build-module/dialog/popup.mjs +5 -4
  165. package/build-module/dialog/popup.mjs.map +2 -2
  166. package/build-module/dialog/title.mjs +10 -9
  167. package/build-module/dialog/title.mjs.map +2 -2
  168. package/build-module/empty-state/actions.mjs +3 -3
  169. package/build-module/empty-state/actions.mjs.map +2 -2
  170. package/build-module/empty-state/description.mjs +8 -5
  171. package/build-module/empty-state/description.mjs.map +2 -2
  172. package/build-module/empty-state/icon.mjs +3 -3
  173. package/build-module/empty-state/icon.mjs.map +2 -2
  174. package/build-module/empty-state/root.mjs +3 -3
  175. package/build-module/empty-state/root.mjs.map +2 -2
  176. package/build-module/empty-state/title.mjs +8 -5
  177. package/build-module/empty-state/title.mjs.map +2 -2
  178. package/build-module/empty-state/visual.mjs +3 -3
  179. package/build-module/empty-state/visual.mjs.map +2 -2
  180. package/build-module/form/primitives/field/description.mjs +17 -4
  181. package/build-module/form/primitives/field/description.mjs.map +3 -3
  182. package/build-module/form/primitives/field/details.mjs +4 -4
  183. package/build-module/form/primitives/field/details.mjs.map +2 -2
  184. package/build-module/form/primitives/field/label.mjs +8 -8
  185. package/build-module/form/primitives/field/label.mjs.map +2 -2
  186. package/build-module/form/primitives/field/root.mjs +2 -2
  187. package/build-module/form/primitives/field/root.mjs.map +2 -2
  188. package/build-module/form/primitives/fieldset/description.mjs +20 -4
  189. package/build-module/form/primitives/fieldset/description.mjs.map +3 -3
  190. package/build-module/form/primitives/fieldset/details.mjs +3 -3
  191. package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
  192. package/build-module/form/primitives/fieldset/legend.mjs +8 -7
  193. package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
  194. package/build-module/form/primitives/input/input.mjs +23 -7
  195. package/build-module/form/primitives/input/input.mjs.map +3 -3
  196. package/build-module/form/primitives/input-layout/input-layout.mjs +13 -3
  197. package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
  198. package/build-module/form/primitives/input-layout/slot.mjs +3 -3
  199. package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
  200. package/build-module/form/primitives/select/item.mjs +3 -3
  201. package/build-module/form/primitives/select/item.mjs.map +2 -2
  202. package/build-module/form/primitives/select/popup.mjs +5 -5
  203. package/build-module/form/primitives/select/popup.mjs.map +2 -2
  204. package/build-module/form/primitives/select/trigger.mjs +6 -6
  205. package/build-module/form/primitives/select/trigger.mjs.map +2 -2
  206. package/build-module/form/primitives/textarea/textarea.mjs +20 -1
  207. package/build-module/form/primitives/textarea/textarea.mjs.map +3 -3
  208. package/build-module/index.mjs +2 -0
  209. package/build-module/index.mjs.map +2 -2
  210. package/build-module/link/link.mjs +16 -6
  211. package/build-module/link/link.mjs.map +3 -3
  212. package/build-module/notice/action-button.mjs +3 -3
  213. package/build-module/notice/action-button.mjs.map +2 -2
  214. package/build-module/notice/action-link.mjs +3 -3
  215. package/build-module/notice/action-link.mjs.map +2 -2
  216. package/build-module/notice/actions.mjs +3 -3
  217. package/build-module/notice/actions.mjs.map +2 -2
  218. package/build-module/notice/close-icon.mjs +3 -3
  219. package/build-module/notice/close-icon.mjs.map +2 -2
  220. package/build-module/notice/description.mjs +3 -3
  221. package/build-module/notice/description.mjs.map +2 -2
  222. package/build-module/notice/root.mjs +3 -3
  223. package/build-module/notice/root.mjs.map +2 -2
  224. package/build-module/notice/title.mjs +3 -3
  225. package/build-module/notice/title.mjs.map +2 -2
  226. package/build-module/popover/arrow.mjs +59 -0
  227. package/build-module/popover/arrow.mjs.map +7 -0
  228. package/build-module/popover/close.mjs +20 -0
  229. package/build-module/popover/close.mjs.map +7 -0
  230. package/build-module/popover/context.mjs +57 -0
  231. package/build-module/popover/context.mjs.map +7 -0
  232. package/build-module/popover/description.mjs +35 -0
  233. package/build-module/popover/description.mjs.map +7 -0
  234. package/build-module/popover/index.mjs +18 -0
  235. package/build-module/popover/index.mjs.map +7 -0
  236. package/build-module/popover/popup.mjs +105 -0
  237. package/build-module/popover/popup.mjs.map +7 -0
  238. package/build-module/popover/root.mjs +10 -0
  239. package/build-module/popover/root.mjs.map +7 -0
  240. package/build-module/popover/title.mjs +31 -0
  241. package/build-module/popover/title.mjs.map +7 -0
  242. package/build-module/popover/trigger.mjs +13 -0
  243. package/build-module/popover/trigger.mjs.map +7 -0
  244. package/build-module/popover/types.mjs +1 -0
  245. package/build-module/popover/types.mjs.map +7 -0
  246. package/build-module/tabs/list.mjs +3 -4
  247. package/build-module/tabs/list.mjs.map +2 -2
  248. package/build-module/tabs/panel.mjs +3 -3
  249. package/build-module/tabs/panel.mjs.map +2 -2
  250. package/build-module/tabs/tab.mjs +3 -3
  251. package/build-module/tabs/tab.mjs.map +2 -2
  252. package/build-module/text/text.mjs +20 -5
  253. package/build-module/text/text.mjs.map +3 -3
  254. package/build-module/tooltip/popup.mjs +5 -4
  255. package/build-module/tooltip/popup.mjs.map +2 -2
  256. package/build-module/tooltip/root.mjs.map +2 -2
  257. package/build-module/utils/use-deprioritized-initial-focus.mjs.map +2 -2
  258. package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
  259. package/build-types/alert-dialog/context.d.ts +6 -3
  260. package/build-types/alert-dialog/context.d.ts.map +1 -1
  261. package/build-types/alert-dialog/popup.d.ts.map +1 -1
  262. package/build-types/alert-dialog/root.d.ts +2 -8
  263. package/build-types/alert-dialog/root.d.ts.map +1 -1
  264. package/build-types/alert-dialog/stories/index.story.d.ts +18 -6
  265. package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -1
  266. package/build-types/alert-dialog/trigger.d.ts +2 -1
  267. package/build-types/alert-dialog/trigger.d.ts.map +1 -1
  268. package/build-types/alert-dialog/types.d.ts +61 -26
  269. package/build-types/alert-dialog/types.d.ts.map +1 -1
  270. package/build-types/badge/badge.d.ts.map +1 -1
  271. package/build-types/button/button.d.ts.map +1 -1
  272. package/build-types/card/stories/index.story.d.ts.map +1 -1
  273. package/build-types/card/title.d.ts.map +1 -1
  274. package/build-types/collapsible/panel.d.ts +2 -1
  275. package/build-types/collapsible/panel.d.ts.map +1 -1
  276. package/build-types/collapsible/root.d.ts +2 -1
  277. package/build-types/collapsible/root.d.ts.map +1 -1
  278. package/build-types/collapsible/trigger.d.ts +2 -1
  279. package/build-types/collapsible/trigger.d.ts.map +1 -1
  280. package/build-types/dialog/popup.d.ts.map +1 -1
  281. package/build-types/dialog/stories/index.story.d.ts +8 -0
  282. package/build-types/dialog/stories/index.story.d.ts.map +1 -1
  283. package/build-types/dialog/title.d.ts +12 -2
  284. package/build-types/dialog/title.d.ts.map +1 -1
  285. package/build-types/dialog/types.d.ts +8 -1
  286. package/build-types/dialog/types.d.ts.map +1 -1
  287. package/build-types/empty-state/description.d.ts.map +1 -1
  288. package/build-types/empty-state/title.d.ts.map +1 -1
  289. package/build-types/form/primitives/field/description.d.ts +2 -1
  290. package/build-types/form/primitives/field/description.d.ts.map +1 -1
  291. package/build-types/form/primitives/field/details.d.ts +2 -1
  292. package/build-types/form/primitives/field/details.d.ts.map +1 -1
  293. package/build-types/form/primitives/field/label.d.ts +2 -1
  294. package/build-types/form/primitives/field/label.d.ts.map +1 -1
  295. package/build-types/form/primitives/fieldset/description.d.ts +2 -1
  296. package/build-types/form/primitives/fieldset/description.d.ts.map +1 -1
  297. package/build-types/form/primitives/fieldset/details.d.ts +2 -1
  298. package/build-types/form/primitives/fieldset/details.d.ts.map +1 -1
  299. package/build-types/form/primitives/fieldset/legend.d.ts +2 -1
  300. package/build-types/form/primitives/fieldset/legend.d.ts.map +1 -1
  301. package/build-types/form/primitives/fieldset/root.d.ts +2 -1
  302. package/build-types/form/primitives/fieldset/root.d.ts.map +1 -1
  303. package/build-types/form/primitives/input/input.d.ts.map +1 -1
  304. package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -1
  305. package/build-types/form/primitives/select/item.d.ts +6 -2
  306. package/build-types/form/primitives/select/item.d.ts.map +1 -1
  307. package/build-types/form/primitives/select/popup.d.ts +11 -1
  308. package/build-types/form/primitives/select/popup.d.ts.map +1 -1
  309. package/build-types/form/primitives/select/trigger.d.ts +12 -2
  310. package/build-types/form/primitives/select/trigger.d.ts.map +1 -1
  311. package/build-types/form/primitives/select/types.d.ts +13 -3
  312. package/build-types/form/primitives/select/types.d.ts.map +1 -1
  313. package/build-types/form/primitives/textarea/textarea.d.ts.map +1 -1
  314. package/build-types/form/stories/shared.d.ts.map +1 -1
  315. package/build-types/index.d.ts +1 -0
  316. package/build-types/index.d.ts.map +1 -1
  317. package/build-types/link/link.d.ts.map +1 -1
  318. package/build-types/popover/arrow.d.ts +10 -0
  319. package/build-types/popover/arrow.d.ts.map +1 -0
  320. package/build-types/popover/close.d.ts +11 -0
  321. package/build-types/popover/close.d.ts.map +1 -0
  322. package/build-types/popover/context.d.ts +22 -0
  323. package/build-types/popover/context.d.ts.map +1 -0
  324. package/build-types/popover/description.d.ts +10 -0
  325. package/build-types/popover/description.d.ts.map +1 -0
  326. package/build-types/popover/index.d.ts +9 -0
  327. package/build-types/popover/index.d.ts.map +1 -0
  328. package/build-types/popover/popup.d.ts +11 -0
  329. package/build-types/popover/popup.d.ts.map +1 -0
  330. package/build-types/popover/root.d.ts +37 -0
  331. package/build-types/popover/root.d.ts.map +1 -0
  332. package/build-types/popover/stories/index.story.d.ts +211 -0
  333. package/build-types/popover/stories/index.story.d.ts.map +1 -0
  334. package/build-types/popover/stories/utils.d.ts +25 -0
  335. package/build-types/popover/stories/utils.d.ts.map +1 -0
  336. package/build-types/popover/test/index.test.d.ts +2 -0
  337. package/build-types/popover/test/index.test.d.ts.map +1 -0
  338. package/build-types/popover/title.d.ts +20 -0
  339. package/build-types/popover/title.d.ts.map +1 -0
  340. package/build-types/popover/trigger.d.ts +10 -0
  341. package/build-types/popover/trigger.d.ts.map +1 -0
  342. package/build-types/popover/types.d.ts +83 -0
  343. package/build-types/popover/types.d.ts.map +1 -0
  344. package/build-types/tabs/list.d.ts +2 -1
  345. package/build-types/tabs/list.d.ts.map +1 -1
  346. package/build-types/tabs/panel.d.ts +2 -1
  347. package/build-types/tabs/panel.d.ts.map +1 -1
  348. package/build-types/tabs/root.d.ts +2 -1
  349. package/build-types/tabs/root.d.ts.map +1 -1
  350. package/build-types/tabs/tab.d.ts +2 -1
  351. package/build-types/tabs/tab.d.ts.map +1 -1
  352. package/build-types/text/stories/index.story.d.ts +4 -0
  353. package/build-types/text/stories/index.story.d.ts.map +1 -1
  354. package/build-types/text/text.d.ts.map +1 -1
  355. package/build-types/tooltip/popup.d.ts.map +1 -1
  356. package/build-types/tooltip/root.d.ts +9 -8
  357. package/build-types/tooltip/root.d.ts.map +1 -1
  358. package/build-types/tooltip/stories/usage-guidelines.story.d.ts +21 -0
  359. package/build-types/tooltip/stories/usage-guidelines.story.d.ts.map +1 -0
  360. package/build-types/tooltip/types.d.ts +4 -0
  361. package/build-types/tooltip/types.d.ts.map +1 -1
  362. package/build-types/utils/types.d.ts +6 -2
  363. package/build-types/utils/types.d.ts.map +1 -1
  364. package/build-types/utils/use-deprioritized-initial-focus.d.ts +6 -5
  365. package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -1
  366. package/build-types/visually-hidden/stories/index.story.d.ts +7 -0
  367. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  368. package/build-types/visually-hidden/visually-hidden.d.ts +34 -0
  369. package/build-types/visually-hidden/visually-hidden.d.ts.map +1 -1
  370. package/package.json +12 -12
  371. package/src/alert-dialog/context.tsx +12 -4
  372. package/src/alert-dialog/popup.tsx +91 -33
  373. package/src/alert-dialog/root.tsx +191 -13
  374. package/src/alert-dialog/stories/index.story.tsx +116 -65
  375. package/src/alert-dialog/style.module.css +11 -0
  376. package/src/alert-dialog/test/index.test.tsx +1319 -347
  377. package/src/alert-dialog/trigger.tsx +2 -2
  378. package/src/alert-dialog/types.ts +64 -28
  379. package/src/badge/badge.tsx +11 -14
  380. package/src/badge/style.module.css +0 -4
  381. package/src/button/button.tsx +2 -0
  382. package/src/button/style.module.css +7 -3
  383. package/src/card/stories/index.story.tsx +4 -5
  384. package/src/card/style.module.css +1 -5
  385. package/src/card/test/index.test.tsx +17 -1
  386. package/src/card/title.tsx +6 -5
  387. package/src/collapsible-card/stories/index.story.tsx +5 -5
  388. package/src/dialog/popup.tsx +2 -1
  389. package/src/dialog/stories/index.story.tsx +33 -0
  390. package/src/dialog/style.module.css +13 -9
  391. package/src/dialog/test/index.test.tsx +63 -4
  392. package/src/dialog/title.tsx +21 -9
  393. package/src/dialog/types.ts +9 -1
  394. package/src/empty-state/description.tsx +6 -2
  395. package/src/empty-state/style.module.css +1 -1
  396. package/src/empty-state/test/description.test.tsx +13 -0
  397. package/src/empty-state/test/title.test.tsx +13 -0
  398. package/src/empty-state/title.tsx +9 -3
  399. package/src/form/primitives/field/description.tsx +6 -1
  400. package/src/form/primitives/field/details.tsx +4 -2
  401. package/src/form/primitives/field/label.tsx +9 -5
  402. package/src/form/primitives/field/root.tsx +2 -2
  403. package/src/form/primitives/field/test/index.test.tsx +11 -0
  404. package/src/form/primitives/fieldset/description.tsx +9 -1
  405. package/src/form/primitives/fieldset/legend.tsx +9 -4
  406. package/src/form/primitives/fieldset/test/index.test.tsx +22 -0
  407. package/src/form/primitives/input/input.tsx +6 -1
  408. package/src/form/primitives/input/style.module.css +4 -0
  409. package/src/form/primitives/input-layout/input-layout.tsx +2 -0
  410. package/src/form/primitives/input-layout/style.module.css +3 -3
  411. package/src/form/primitives/select/popup.tsx +5 -2
  412. package/src/form/primitives/select/test/index.test.tsx +60 -1
  413. package/src/form/primitives/select/types.ts +14 -4
  414. package/src/form/primitives/textarea/textarea.tsx +10 -1
  415. package/src/form/stories/shared.tsx +4 -2
  416. package/src/index.ts +1 -0
  417. package/src/link/link.tsx +2 -0
  418. package/src/link/style.module.css +11 -1
  419. package/src/notice/style.module.css +5 -5
  420. package/src/popover/arrow.tsx +49 -0
  421. package/src/popover/close.tsx +24 -0
  422. package/src/popover/context.tsx +100 -0
  423. package/src/popover/description.tsx +29 -0
  424. package/src/popover/index.ts +9 -0
  425. package/src/popover/popup.tsx +106 -0
  426. package/src/popover/root.tsx +41 -0
  427. package/src/popover/stories/index.story.tsx +1315 -0
  428. package/src/popover/stories/utils.tsx +91 -0
  429. package/src/popover/style.module.css +64 -0
  430. package/src/popover/test/index.test.tsx +727 -0
  431. package/src/popover/title.tsx +47 -0
  432. package/src/popover/trigger.tsx +17 -0
  433. package/src/popover/types.ts +113 -0
  434. package/src/tabs/list.tsx +0 -1
  435. package/src/tabs/style.module.css +2 -2
  436. package/src/text/stories/index.story.tsx +4 -2
  437. package/src/text/style.module.css +62 -36
  438. package/src/text/test/index.test.tsx +1 -4
  439. package/src/text/text.tsx +8 -1
  440. package/src/tooltip/popup.tsx +2 -1
  441. package/src/tooltip/root.tsx +9 -8
  442. package/src/tooltip/stories/usage-guidelines.mdx +91 -0
  443. package/src/tooltip/stories/usage-guidelines.story.tsx +119 -0
  444. package/src/tooltip/style.module.css +2 -2
  445. package/src/tooltip/test/index.test.tsx +61 -0
  446. package/src/tooltip/types.ts +5 -0
  447. package/src/utils/css/field.module.css +12 -9
  448. package/src/utils/css/focus.module.css +7 -5
  449. package/src/utils/css/global-css-defense.module.css +117 -0
  450. package/src/utils/css/item-popup.module.css +2 -2
  451. package/src/utils/types.ts +7 -2
  452. package/src/utils/use-deprioritized-initial-focus.ts +5 -4
  453. package/src/visually-hidden/stories/index.story.tsx +25 -0
  454. package/src/visually-hidden/visually-hidden.tsx +34 -0
@@ -0,0 +1,59 @@
1
+ // packages/ui/src/popover/arrow.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import clsx from "clsx";
4
+ import { forwardRef } from "@wordpress/element";
5
+
6
+ // packages/ui/src/popover/style.module.css
7
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='65854cdb1e']")) {
8
+ const style = document.createElement("style");
9
+ style.setAttribute("data-wp-hash", "65854cdb1e");
10
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}'));
11
+ document.head.appendChild(style);
12
+ }
13
+ var style_default = { "positioner": "_10450722b9676f78__positioner", "popup": "_84e8f597bcf683b8__popup", "arrow": "ca05d3eb89321fcd__arrow", "arrow-fill": "_12d8edd9eb946b5f__arrow-fill", "arrow-stroke": "_6ddab482bd929dad__arrow-stroke", "description": "_42cb9ed02a2f0782__description", "backdrop": "e4d544aa033f05c6__backdrop" };
14
+
15
+ // packages/ui/src/popover/arrow.tsx
16
+ import { jsx, jsxs } from "react/jsx-runtime";
17
+ function DefaultArrowSvg(props) {
18
+ return /* @__PURE__ */ jsxs(
19
+ "svg",
20
+ {
21
+ width: "20",
22
+ height: "10",
23
+ viewBox: "0 0 20 10",
24
+ fill: "none",
25
+ ...props,
26
+ children: [
27
+ /* @__PURE__ */ jsx(
28
+ "path",
29
+ {
30
+ d: "M20 10H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20z",
31
+ className: style_default["arrow-fill"]
32
+ }
33
+ ),
34
+ /* @__PURE__ */ jsx(
35
+ "path",
36
+ {
37
+ d: "M10 3.097 4.81 7.486A5 5 0 0 1 1.465 8.77H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20v.77h-1.465a5 5 0 0 1-3.345-1.284z",
38
+ className: style_default["arrow-stroke"]
39
+ }
40
+ )
41
+ ]
42
+ }
43
+ );
44
+ }
45
+ var Arrow = forwardRef(function PopoverArrow({ children, className, ...props }, ref) {
46
+ return /* @__PURE__ */ jsx(
47
+ _Popover.Arrow,
48
+ {
49
+ ref,
50
+ className: clsx(style_default.arrow, className),
51
+ ...props,
52
+ children: children ?? /* @__PURE__ */ jsx(DefaultArrowSvg, {})
53
+ }
54
+ );
55
+ });
56
+ export {
57
+ Arrow
58
+ };
59
+ //# sourceMappingURL=arrow.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/arrow.tsx", "../../src/popover/style.module.css"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport styles from './style.module.css';\nimport type { ArrowProps } from './types';\n\nfunction DefaultArrowSvg( props: React.ComponentProps< 'svg' > ) {\n\treturn (\n\t\t<svg\n\t\t\twidth=\"20\"\n\t\t\theight=\"10\"\n\t\t\tviewBox=\"0 0 20 10\"\n\t\t\tfill=\"none\"\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<path\n\t\t\t\td=\"M20 10H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20z\"\n\t\t\t\tclassName={ styles[ 'arrow-fill' ] }\n\t\t\t/>\n\t\t\t<path\n\t\t\t\td=\"M10 3.097 4.81 7.486A5 5 0 0 1 1.465 8.77H0V8h1.465a4 4 0 0 0 2.676-1.027l5.19-4.388c.378-.341.96-.341 1.338 0l5.19 4.388A4 4 0 0 0 18.535 8H20v.77h-1.465a5 5 0 0 1-3.345-1.284z\"\n\t\t\t\tclassName={ styles[ 'arrow-stroke' ] }\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n\n/**\n * Renders an optional arrow element that points toward the anchor.\n *\n * Must be placed inside `Popover.Popup`. The arrow automatically rotates\n * to match the current placement side.\n */\nconst Arrow = forwardRef< HTMLDivElement, ArrowProps >( function PopoverArrow(\n\t{ children, className, ...props },\n\tref\n) {\n\treturn (\n\t\t<_Popover.Arrow\n\t\t\tref={ ref }\n\t\t\tclassName={ clsx( styles.arrow, className ) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children ?? <DefaultArrowSvg /> }\n\t\t</_Popover.Arrow>\n\t);\n} );\n\nexport { Arrow };\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='65854cdb1e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"65854cdb1e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_10450722b9676f78__positioner\",\"popup\":\"_84e8f597bcf683b8__popup\",\"arrow\":\"ca05d3eb89321fcd__arrow\",\"arrow-fill\":\"_12d8edd9eb946b5f__arrow-fill\",\"arrow-stroke\":\"_6ddab482bd929dad__arrow-stroke\",\"description\":\"_42cb9ed02a2f0782__description\",\"backdrop\":\"e4d544aa033f05c6__backdrop\"};\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,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,sgDAAkhD,CAAC;AAC7jD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,iCAAgC,SAAQ,4BAA2B,SAAQ,2BAA0B,cAAa,iCAAgC,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,6BAA4B;;;ADEpT,SAOC,KAPD;AAFF,SAAS,gBAAiB,OAAuC;AAChE,SACC;AAAA,IAAC;AAAA;AAAA,MACA,OAAM;AAAA,MACN,QAAO;AAAA,MACP,SAAQ;AAAA,MACR,MAAK;AAAA,MACH,GAAG;AAAA,MAEL;AAAA;AAAA,UAAC;AAAA;AAAA,YACA,GAAE;AAAA,YACF,WAAY,cAAQ,YAAa;AAAA;AAAA,QAClC;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACA,GAAE;AAAA,YACF,WAAY,cAAQ,cAAe;AAAA;AAAA,QACpC;AAAA;AAAA;AAAA,EACD;AAEF;AAQA,IAAM,QAAQ,WAA0C,SAAS,aAChE,EAAE,UAAU,WAAW,GAAG,MAAM,GAChC,KACC;AACD,SACC;AAAA,IAAC,SAAS;AAAA,IAAT;AAAA,MACA;AAAA,MACA,WAAY,KAAM,cAAO,OAAO,SAAU;AAAA,MACxC,GAAG;AAAA,MAEH,sBAAY,oBAAC,mBAAgB;AAAA;AAAA,EAChC;AAEF,CAAE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,20 @@
1
+ // packages/ui/src/popover/close.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import { forwardRef } from "@wordpress/element";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Close = forwardRef(
6
+ function PopoverClose(props, ref) {
7
+ return /* @__PURE__ */ jsx(
8
+ _Popover.Close,
9
+ {
10
+ ref,
11
+ "data-wp-ui-popover-close": "",
12
+ ...props
13
+ }
14
+ );
15
+ }
16
+ );
17
+ export {
18
+ Close
19
+ };
20
+ //# sourceMappingURL=close.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/close.tsx"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport { forwardRef } from '@wordpress/element';\nimport type { CloseProps } from './types';\n\n/**\n * Renders a button that closes the popover when clicked.\n *\n * When the popover opens, initial focus skips this button in favor of\n * the first interactive element inside the popup (unless `initialFocus`\n * on `Popover.Popup` overrides this behavior).\n */\nconst Close = forwardRef< HTMLButtonElement, CloseProps >(\n\tfunction PopoverClose( props, ref ) {\n\t\treturn (\n\t\t\t<_Popover.Close\n\t\t\t\tref={ ref }\n\t\t\t\tdata-wp-ui-popover-close=\"\"\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nexport { Close };\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,kBAAkB;AAaxB;AAHH,IAAM,QAAQ;AAAA,EACb,SAAS,aAAc,OAAO,KAAM;AACnC,WACC;AAAA,MAAC,SAAS;AAAA,MAAT;AAAA,QACA;AAAA,QACA,4BAAyB;AAAA,QACvB,GAAG;AAAA;AAAA,IACN;AAAA,EAEF;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,57 @@
1
+ // packages/ui/src/popover/context.tsx
2
+ import {
3
+ createContext,
4
+ useCallback,
5
+ useContext,
6
+ useEffect,
7
+ useMemo,
8
+ useRef
9
+ } from "@wordpress/element";
10
+ import { Fragment, jsx } from "react/jsx-runtime";
11
+ var VALIDATION_ENABLED = process.env.NODE_ENV !== "production";
12
+ var PopoverValidationContext = VALIDATION_ENABLED ? createContext(null) : null;
13
+ function usePopoverValidationContextDev() {
14
+ return useContext(PopoverValidationContext);
15
+ }
16
+ function usePopoverValidationContextProd() {
17
+ return null;
18
+ }
19
+ var usePopoverValidationContext = VALIDATION_ENABLED ? usePopoverValidationContextDev : usePopoverValidationContextProd;
20
+ function PopoverValidationProviderDev({
21
+ children
22
+ }) {
23
+ const titleElementRef = useRef(null);
24
+ const registerTitle = useCallback((element) => {
25
+ titleElementRef.current = element;
26
+ }, []);
27
+ const contextValue = useMemo(
28
+ () => ({ registerTitle }),
29
+ [registerTitle]
30
+ );
31
+ useEffect(() => {
32
+ const titleElement = titleElementRef.current;
33
+ if (!titleElement) {
34
+ throw new Error(
35
+ "Popover: Missing <Popover.Title>. For accessibility, every popover requires a title. If needed, the title can be visually hidden but must not be omitted."
36
+ );
37
+ }
38
+ const textContent = titleElement.textContent?.trim();
39
+ if (!textContent) {
40
+ throw new Error(
41
+ "Popover: <Popover.Title> cannot be empty. Provide meaningful text content for the popover title."
42
+ );
43
+ }
44
+ }, []);
45
+ return /* @__PURE__ */ jsx(PopoverValidationContext.Provider, { value: contextValue, children });
46
+ }
47
+ function PopoverValidationProviderProd({
48
+ children
49
+ }) {
50
+ return /* @__PURE__ */ jsx(Fragment, { children });
51
+ }
52
+ var PopoverValidationProvider = VALIDATION_ENABLED ? PopoverValidationProviderDev : PopoverValidationProviderProd;
53
+ export {
54
+ PopoverValidationProvider,
55
+ usePopoverValidationContext
56
+ };
57
+ //# sourceMappingURL=context.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/context.tsx"],
4
+ "sourcesContent": ["import {\n\tcreateContext,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Whether validation is enabled. This is a build-time constant that allows\n * bundlers to tree-shake all validation code in production builds.\n */\nconst VALIDATION_ENABLED = process.env.NODE_ENV !== 'production';\n\ntype PopoverValidationContextType = {\n\tregisterTitle: ( element: HTMLElement | null ) => void;\n};\n\nconst PopoverValidationContext = VALIDATION_ENABLED\n\t? createContext< PopoverValidationContextType | null >( null )\n\t: ( null as unknown as React.Context< PopoverValidationContextType | null > );\n\nfunction usePopoverValidationContextDev() {\n\treturn useContext( PopoverValidationContext );\n}\n\nfunction usePopoverValidationContextProd() {\n\treturn null;\n}\n\n/**\n * Hook to access the popover validation context.\n * Returns null in production or if not within a Popover.Popup.\n */\nexport const usePopoverValidationContext = VALIDATION_ENABLED\n\t? usePopoverValidationContextDev\n\t: usePopoverValidationContextProd;\n\n/**\n * Development-only provider that tracks whether Popover.Title is rendered.\n */\nfunction PopoverValidationProviderDev( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\tconst titleElementRef = useRef< HTMLElement | null >( null );\n\n\tconst registerTitle = useCallback( ( element: HTMLElement | null ) => {\n\t\ttitleElementRef.current = element;\n\t}, [] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( { registerTitle } ),\n\t\t[ registerTitle ]\n\t);\n\n\tuseEffect( () => {\n\t\tconst titleElement = titleElementRef.current;\n\n\t\tif ( ! titleElement ) {\n\t\t\tthrow new Error(\n\t\t\t\t'Popover: Missing <Popover.Title>. ' +\n\t\t\t\t\t'For accessibility, every popover requires a title. ' +\n\t\t\t\t\t'If needed, the title can be visually hidden but must not be omitted.'\n\t\t\t);\n\t\t}\n\n\t\tconst textContent = titleElement.textContent?.trim();\n\t\tif ( ! textContent ) {\n\t\t\tthrow new Error(\n\t\t\t\t'Popover: <Popover.Title> cannot be empty. ' +\n\t\t\t\t\t'Provide meaningful text content for the popover title.'\n\t\t\t);\n\t\t}\n\t}, [] );\n\n\treturn (\n\t\t<PopoverValidationContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</PopoverValidationContext.Provider>\n\t);\n}\n\nfunction PopoverValidationProviderProd( {\n\tchildren,\n}: {\n\tchildren: React.ReactNode;\n} ) {\n\treturn <>{ children }</>;\n}\n\n/**\n * Provider component that validates Popover.Title presence in development mode.\n * In production, this component is a no-op and just renders children.\n */\nexport const PopoverValidationProvider = VALIDATION_ENABLED\n\t? PopoverValidationProviderDev\n\t: PopoverValidationProviderProd;\n"],
5
+ "mappings": ";AAAA;AAAA,EACC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACM;AAwEL,SAWM,UAXN;AAlEF,IAAM,qBAAqB,QAAQ,IAAI,aAAa;AAMpD,IAAM,2BAA2B,qBAC9B,cAAsD,IAAK,IACzD;AAEL,SAAS,iCAAiC;AACzC,SAAO,WAAY,wBAAyB;AAC7C;AAEA,SAAS,kCAAkC;AAC1C,SAAO;AACR;AAMO,IAAM,8BAA8B,qBACxC,iCACA;AAKH,SAAS,6BAA8B;AAAA,EACtC;AACD,GAEI;AACH,QAAM,kBAAkB,OAA8B,IAAK;AAE3D,QAAM,gBAAgB,YAAa,CAAE,YAAiC;AACrE,oBAAgB,UAAU;AAAA,EAC3B,GAAG,CAAC,CAAE;AAEN,QAAM,eAAe;AAAA,IACpB,OAAQ,EAAE,cAAc;AAAA,IACxB,CAAE,aAAc;AAAA,EACjB;AAEA,YAAW,MAAM;AAChB,UAAM,eAAe,gBAAgB;AAErC,QAAK,CAAE,cAAe;AACrB,YAAM,IAAI;AAAA,QACT;AAAA,MAGD;AAAA,IACD;AAEA,UAAM,cAAc,aAAa,aAAa,KAAK;AACnD,QAAK,CAAE,aAAc;AACpB,YAAM,IAAI;AAAA,QACT;AAAA,MAED;AAAA,IACD;AAAA,EACD,GAAG,CAAC,CAAE;AAEN,SACC,oBAAC,yBAAyB,UAAzB,EAAkC,OAAQ,cACxC,UACH;AAEF;AAEA,SAAS,8BAA+B;AAAA,EACvC;AACD,GAEI;AACH,SAAO,gCAAI,UAAU;AACtB;AAMO,IAAM,4BAA4B,qBACtC,+BACA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,35 @@
1
+ // packages/ui/src/popover/description.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import clsx from "clsx";
4
+ import { forwardRef } from "@wordpress/element";
5
+ import { Text } from "../text/index.mjs";
6
+
7
+ // packages/ui/src/popover/style.module.css
8
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='65854cdb1e']")) {
9
+ const style = document.createElement("style");
10
+ style.setAttribute("data-wp-hash", "65854cdb1e");
11
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}'));
12
+ document.head.appendChild(style);
13
+ }
14
+ var style_default = { "positioner": "_10450722b9676f78__positioner", "popup": "_84e8f597bcf683b8__popup", "arrow": "ca05d3eb89321fcd__arrow", "arrow-fill": "_12d8edd9eb946b5f__arrow-fill", "arrow-stroke": "_6ddab482bd929dad__arrow-stroke", "description": "_42cb9ed02a2f0782__description", "backdrop": "e4d544aa033f05c6__backdrop" };
15
+
16
+ // packages/ui/src/popover/description.tsx
17
+ import { jsx } from "react/jsx-runtime";
18
+ var Description = forwardRef(
19
+ function PopoverDescription({ className, children, ...props }, ref) {
20
+ return /* @__PURE__ */ jsx(
21
+ Text,
22
+ {
23
+ ref,
24
+ variant: "body-md",
25
+ render: /* @__PURE__ */ jsx(_Popover.Description, { ...props }),
26
+ className: clsx(style_default.description, className),
27
+ children
28
+ }
29
+ );
30
+ }
31
+ );
32
+ export {
33
+ Description
34
+ };
35
+ //# sourceMappingURL=description.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/description.tsx", "../../src/popover/style.module.css"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { Text } from '../text';\nimport styles from './style.module.css';\nimport type { DescriptionProps } from './types';\n\n/**\n * Renders an optional paragraph that describes the popover content.\n *\n * The rendered element is linked to the popup via `aria-describedby`.\n * Uses the `body-md` text variant by default.\n */\nconst Description = forwardRef< HTMLParagraphElement, DescriptionProps >(\n\tfunction PopoverDescription( { className, children, ...props }, ref ) {\n\t\treturn (\n\t\t\t<Text\n\t\t\t\tref={ ref }\n\t\t\t\tvariant=\"body-md\"\n\t\t\t\trender={ <_Popover.Description { ...props } /> }\n\t\t\t\tclassName={ clsx( styles.description, className ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Text>\n\t\t);\n\t}\n);\n\nexport { Description };\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='65854cdb1e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"65854cdb1e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_10450722b9676f78__positioner\",\"popup\":\"_84e8f597bcf683b8__popup\",\"arrow\":\"ca05d3eb89321fcd__arrow\",\"arrow-fill\":\"_12d8edd9eb946b5f__arrow-fill\",\"arrow-stroke\":\"_6ddab482bd929dad__arrow-stroke\",\"description\":\"_42cb9ed02a2f0782__description\",\"backdrop\":\"e4d544aa033f05c6__backdrop\"};\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;;;ACHrB,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,sgDAAkhD,CAAC;AAC7jD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,iCAAgC,SAAQ,4BAA2B,SAAQ,2BAA0B,cAAa,iCAAgC,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,6BAA4B;;;ADazS;AANb,IAAM,cAAc;AAAA,EACnB,SAAS,mBAAoB,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,KAAM;AACrE,WACC;AAAA,MAAC;AAAA;AAAA,QACA;AAAA,QACA,SAAQ;AAAA,QACR,QAAS,oBAAC,SAAS,aAAT,EAAuB,GAAG,OAAQ;AAAA,QAC5C,WAAY,KAAM,cAAO,aAAa,SAAU;AAAA,QAE9C;AAAA;AAAA,IACH;AAAA,EAEF;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,18 @@
1
+ // packages/ui/src/popover/index.ts
2
+ import { Arrow } from "./arrow.mjs";
3
+ import { Close } from "./close.mjs";
4
+ import { Description } from "./description.mjs";
5
+ import { Popup } from "./popup.mjs";
6
+ import { Root } from "./root.mjs";
7
+ import { Title } from "./title.mjs";
8
+ import { Trigger } from "./trigger.mjs";
9
+ export {
10
+ Arrow,
11
+ Close,
12
+ Description,
13
+ Popup,
14
+ Root,
15
+ Title,
16
+ Trigger
17
+ };
18
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/index.ts"],
4
+ "sourcesContent": ["import { Arrow } from './arrow';\nimport { Close } from './close';\nimport { Description } from './description';\nimport { Popup } from './popup';\nimport { Root } from './root';\nimport { Title } from './title';\nimport { Trigger } from './trigger';\n\nexport { Arrow, Close, Description, Popup, Root, Title, Trigger };\n"],
5
+ "mappings": ";AAAA,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,aAAa;AACtB,SAAS,eAAe;",
6
+ "names": []
7
+ }
@@ -0,0 +1,105 @@
1
+ // packages/ui/src/popover/popup.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import clsx from "clsx";
4
+ import { forwardRef } from "@wordpress/element";
5
+ import { useMergeRefs } from "@wordpress/compose";
6
+ import {
7
+ privateApis as themePrivateApis
8
+ } from "@wordpress/theme";
9
+ import { unlock } from "../lock-unlock.mjs";
10
+
11
+ // packages/ui/src/utils/css/resets.module.css
12
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='e3ae230cea']")) {
13
+ const style = document.createElement("style");
14
+ style.setAttribute("data-wp-hash", "e3ae230cea");
15
+ 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}}}"));
16
+ document.head.appendChild(style);
17
+ }
18
+ var resets_default = { "box-sizing": "_336cd3e4e743482f__box-sizing" };
19
+
20
+ // packages/ui/src/popover/popup.tsx
21
+ import { useDeprioritizedInitialFocus } from "../utils/use-deprioritized-initial-focus.mjs";
22
+ import { PopoverValidationProvider } from "./context.mjs";
23
+
24
+ // packages/ui/src/popover/style.module.css
25
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='65854cdb1e']")) {
26
+ const style = document.createElement("style");
27
+ style.setAttribute("data-wp-hash", "65854cdb1e");
28
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}'));
29
+ document.head.appendChild(style);
30
+ }
31
+ var style_default = { "positioner": "_10450722b9676f78__positioner", "popup": "_84e8f597bcf683b8__popup", "arrow": "ca05d3eb89321fcd__arrow", "arrow-fill": "_12d8edd9eb946b5f__arrow-fill", "arrow-stroke": "_6ddab482bd929dad__arrow-stroke", "description": "_42cb9ed02a2f0782__description", "backdrop": "e4d544aa033f05c6__backdrop" };
32
+
33
+ // packages/ui/src/popover/popup.tsx
34
+ import { jsx, jsxs } from "react/jsx-runtime";
35
+ var ThemeProvider = unlock(themePrivateApis).ThemeProvider;
36
+ var CLOSE_ATTR = "data-wp-ui-popover-close";
37
+ var Popup = forwardRef(function PopoverPopup({
38
+ align = "center",
39
+ alignOffset,
40
+ anchor,
41
+ // Matches the popup's border-radius (--wpds-border-radius-md).
42
+ arrowPadding = 8,
43
+ backdrop = false,
44
+ children,
45
+ className,
46
+ collisionAvoidance,
47
+ collisionBoundary,
48
+ collisionPadding,
49
+ container,
50
+ finalFocus,
51
+ initialFocus,
52
+ side = "bottom",
53
+ sideOffset = 8,
54
+ sticky,
55
+ style,
56
+ variant = "default",
57
+ ...props
58
+ }, ref) {
59
+ const { resolvedInitialFocus, popupRef } = useDeprioritizedInitialFocus({
60
+ initialFocus,
61
+ deprioritizedAttribute: CLOSE_ATTR
62
+ });
63
+ const mergedPopupRef = useMergeRefs([ref, popupRef]);
64
+ const backdropElement = backdrop ? /* @__PURE__ */ jsx(_Popover.Backdrop, { className: style_default.backdrop }) : null;
65
+ const positioner = /* @__PURE__ */ jsx(
66
+ _Popover.Positioner,
67
+ {
68
+ align,
69
+ alignOffset,
70
+ anchor,
71
+ arrowPadding,
72
+ collisionAvoidance,
73
+ collisionBoundary,
74
+ collisionPadding,
75
+ side,
76
+ sideOffset,
77
+ sticky,
78
+ style,
79
+ className: clsx(
80
+ resets_default["box-sizing"],
81
+ style_default.positioner,
82
+ className
83
+ ),
84
+ children: /* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
85
+ _Popover.Popup,
86
+ {
87
+ ref: mergedPopupRef,
88
+ initialFocus: resolvedInitialFocus,
89
+ finalFocus,
90
+ className: clsx(variant !== "unstyled" && style_default.popup),
91
+ ...props,
92
+ children: /* @__PURE__ */ jsx(PopoverValidationProvider, { children })
93
+ }
94
+ ) })
95
+ }
96
+ );
97
+ return /* @__PURE__ */ jsxs(_Popover.Portal, { container, children: [
98
+ backdropElement,
99
+ positioner
100
+ ] });
101
+ });
102
+ export {
103
+ Popup
104
+ };
105
+ //# sourceMappingURL=popup.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/popup.tsx", "../../src/utils/css/resets.module.css", "../../src/popover/style.module.css"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport clsx from 'clsx';\nimport { forwardRef } from '@wordpress/element';\nimport { useMergeRefs } from '@wordpress/compose';\nimport {\n\ttype ThemeProvider as ThemeProviderType,\n\tprivateApis as themePrivateApis,\n} from '@wordpress/theme';\nimport { unlock } from '../lock-unlock';\nimport resetStyles from '../utils/css/resets.module.css';\nimport { useDeprioritizedInitialFocus } from '../utils/use-deprioritized-initial-focus';\nimport { PopoverValidationProvider } from './context';\nimport styles from './style.module.css';\nimport type { PopupProps } from './types';\n\nconst ThemeProvider: typeof ThemeProviderType =\n\tunlock( themePrivateApis ).ThemeProvider;\n\nconst CLOSE_ATTR = 'data-wp-ui-popover-close';\n\n/**\n * Renders the floating popup container for the popover content.\n *\n * Handles portal rendering, positioning relative to the anchor, collision\n * avoidance, focus management, and optional backdrop. Supply a `container`\n * element for cross-document scenarios such as iframes.\n */\nconst Popup = forwardRef< HTMLDivElement, PopupProps >( function PopoverPopup(\n\t{\n\t\talign = 'center',\n\t\talignOffset,\n\t\tanchor,\n\t\t// Matches the popup's border-radius (--wpds-border-radius-md).\n\t\tarrowPadding = 8,\n\t\tbackdrop = false,\n\t\tchildren,\n\t\tclassName,\n\t\tcollisionAvoidance,\n\t\tcollisionBoundary,\n\t\tcollisionPadding,\n\t\tcontainer,\n\t\tfinalFocus,\n\t\tinitialFocus,\n\t\tside = 'bottom',\n\t\tsideOffset = 8,\n\t\tsticky,\n\t\tstyle,\n\t\tvariant = 'default',\n\t\t...props\n\t},\n\tref\n) {\n\tconst { resolvedInitialFocus, popupRef } = useDeprioritizedInitialFocus( {\n\t\tinitialFocus,\n\t\tdeprioritizedAttribute: CLOSE_ATTR,\n\t} );\n\tconst mergedPopupRef = useMergeRefs( [ ref, popupRef ] );\n\n\tconst backdropElement = backdrop ? (\n\t\t<_Popover.Backdrop className={ styles.backdrop } />\n\t) : null;\n\n\tconst positioner = (\n\t\t<_Popover.Positioner\n\t\t\talign={ align }\n\t\t\talignOffset={ alignOffset }\n\t\t\tanchor={ anchor }\n\t\t\tarrowPadding={ arrowPadding }\n\t\t\tcollisionAvoidance={ collisionAvoidance }\n\t\t\tcollisionBoundary={ collisionBoundary }\n\t\t\tcollisionPadding={ collisionPadding }\n\t\t\tside={ side }\n\t\t\tsideOffset={ sideOffset }\n\t\t\tsticky={ sticky }\n\t\t\tstyle={ style }\n\t\t\tclassName={ clsx(\n\t\t\t\tresetStyles[ 'box-sizing' ],\n\t\t\t\tstyles.positioner,\n\t\t\t\tclassName\n\t\t\t) }\n\t\t>\n\t\t\t<ThemeProvider>\n\t\t\t\t<_Popover.Popup\n\t\t\t\t\tref={ mergedPopupRef }\n\t\t\t\t\tinitialFocus={ resolvedInitialFocus }\n\t\t\t\t\tfinalFocus={ finalFocus }\n\t\t\t\t\tclassName={ clsx( variant !== 'unstyled' && styles.popup ) }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t<PopoverValidationProvider>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t</PopoverValidationProvider>\n\t\t\t\t</_Popover.Popup>\n\t\t\t</ThemeProvider>\n\t\t</_Popover.Positioner>\n\t);\n\n\treturn (\n\t\t<_Popover.Portal container={ container }>\n\t\t\t{ backdropElement }\n\t\t\t{ positioner }\n\t\t</_Popover.Portal>\n\t);\n} );\n\nexport { Popup };\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='65854cdb1e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"65854cdb1e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._10450722b9676f78__positioner{z-index:var(--wp-ui-popover-z-index,initial)}._84e8f597bcf683b8__popup{background-color:var(--wpds-color-bg-surface-neutral-strong,#fff);border:var(--wpds-border-width-xs,1px) solid var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4);border-radius:var(--wpds-border-radius-md,4px);box-shadow:var(--wpds-elevation-md,0 2px 3px 0 #0000000d,0 4px 5px 0 #0000000a,0 12px 12px 0 #00000008,0 16px 16px 0 #00000005);color:var(--wpds-color-fg-content-neutral,#1e1e1e);font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);line-height:var(--wpds-typography-line-height-md,24px);outline:0;padding:var(--wpds-dimension-padding-lg,16px)}.ca05d3eb89321fcd__arrow{display:flex;&[data-side=top]{bottom:-8px;rotate:180deg}&[data-side=bottom]{rotate:0deg;top:-8px}&[data-side=left]{inset-inline-end:-13px;rotate:90deg}&[data-side=right]{inset-inline-start:-13px;rotate:-90deg}}._12d8edd9eb946b5f__arrow-fill{fill:var(--wpds-color-bg-surface-neutral-strong,#fff)}._6ddab482bd929dad__arrow-stroke{fill:var(--wpds-color-stroke-surface-neutral-weak,#e4e4e4)}._42cb9ed02a2f0782__description{color:var(--wpds-color-fg-content-neutral-weak,#707070)}.e4d544aa033f05c6__backdrop{background-color:#00000026;inset:0;position:fixed;z-index:var(--wp-ui-popover-z-index,initial)}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"positioner\":\"_10450722b9676f78__positioner\",\"popup\":\"_84e8f597bcf683b8__popup\",\"arrow\":\"ca05d3eb89321fcd__arrow\",\"arrow-fill\":\"_12d8edd9eb946b5f__arrow-fill\",\"arrow-stroke\":\"_6ddab482bd929dad__arrow-stroke\",\"description\":\"_42cb9ed02a2f0782__description\",\"backdrop\":\"e4d544aa033f05c6__backdrop\"};\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,oBAAoB;AAC7B;AAAA,EAEC,eAAe;AAAA,OACT;AACP,SAAS,cAAc;;;ACRvB,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;;;ADI5D,SAAS,oCAAoC;AAC7C,SAAS,iCAAiC;;;AEX1C,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,sgDAAkhD,CAAC;AAC7jD,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,cAAa,iCAAgC,SAAQ,4BAA2B,SAAQ,2BAA0B,cAAa,iCAAgC,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,6BAA4B;;;AFqDpT,cAuCA,YAvCA;AA5CF,IAAM,gBACL,OAAQ,gBAAiB,EAAE;AAE5B,IAAM,aAAa;AASnB,IAAM,QAAQ,WAA0C,SAAS,aAChE;AAAA,EACC,QAAQ;AAAA,EACR;AAAA,EACA;AAAA;AAAA,EAEA,eAAe;AAAA,EACf,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,aAAa;AAAA,EACb;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACJ,GACA,KACC;AACD,QAAM,EAAE,sBAAsB,SAAS,IAAI,6BAA8B;AAAA,IACxE;AAAA,IACA,wBAAwB;AAAA,EACzB,CAAE;AACF,QAAM,iBAAiB,aAAc,CAAE,KAAK,QAAS,CAAE;AAEvD,QAAM,kBAAkB,WACvB,oBAAC,SAAS,UAAT,EAAkB,WAAY,cAAO,UAAW,IAC9C;AAEJ,QAAM,aACL;AAAA,IAAC,SAAS;AAAA,IAAT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAY;AAAA,QACX,eAAa,YAAa;AAAA,QAC1B,cAAO;AAAA,QACP;AAAA,MACD;AAAA,MAEA,8BAAC,iBACA;AAAA,QAAC,SAAS;AAAA,QAAT;AAAA,UACA,KAAM;AAAA,UACN,cAAe;AAAA,UACf;AAAA,UACA,WAAY,KAAM,YAAY,cAAc,cAAO,KAAM;AAAA,UACvD,GAAG;AAAA,UAEL,8BAAC,6BACE,UACH;AAAA;AAAA,MACD,GACD;AAAA;AAAA,EACD;AAGD,SACC,qBAAC,SAAS,QAAT,EAAgB,WACd;AAAA;AAAA,IACA;AAAA,KACH;AAEF,CAAE;",
6
+ "names": []
7
+ }
@@ -0,0 +1,10 @@
1
+ // packages/ui/src/popover/root.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Root(props) {
5
+ return /* @__PURE__ */ jsx(_Popover.Root, { ...props });
6
+ }
7
+ export {
8
+ Root
9
+ };
10
+ //# sourceMappingURL=root.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/root.tsx"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport type { RootProps } from './types';\n\n/**\n * An accessible popup anchored to a trigger element.\n *\n * Popover renders ARIA-compliant floating content that appears next to its\n * trigger. It can contain interactive content such as form controls, menus,\n * and rich descriptions.\n *\n * Compose the compound components to build a popover:\n *\n * - `Popover.Root` \u2014 provides open state and context to all sub-components.\n * - `Popover.Trigger` \u2014 the button that toggles the popup.\n * - `Popover.Popup` \u2014 the floating container (portal, positioning, collision\n * avoidance).\n * - `Popover.Arrow` \u2014 an optional arrow pointing toward the anchor.\n * - `Popover.Title` \u2014 **required** heading that labels the popover for\n * accessibility (can be visually hidden).\n * - `Popover.Description` \u2014 optional paragraph linked via `aria-describedby`.\n * - `Popover.Close` \u2014 a button that closes the popover when clicked.\n * **Required** when `modal` is `true` or `'trap-focus'` so that focus\n * can cycle correctly and the user can dismiss the popover.\n *\n * ```jsx\n * <Popover.Root>\n * <Popover.Trigger>Open</Popover.Trigger>\n * <Popover.Popup>\n * <Popover.Arrow />\n * <Popover.Title>Popover title</Popover.Title>\n * <Popover.Description>Popover description</Popover.Description>\n * <Popover.Close>Close</Popover.Close>\n * </Popover.Popup>\n * </Popover.Root>\n * ```\n */\nfunction Root( props: RootProps ) {\n\treturn <_Popover.Root { ...props } />;\n}\n\nexport { Root };\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AAqC5B;AADR,SAAS,KAAM,OAAmB;AACjC,SAAO,oBAAC,SAAS,MAAT,EAAgB,GAAG,OAAQ;AACpC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,31 @@
1
+ // packages/ui/src/popover/title.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import { useMergeRefs } from "@wordpress/compose";
4
+ import { forwardRef, useLayoutEffect, useRef } from "@wordpress/element";
5
+ import { Text } from "../text/index.mjs";
6
+ import { usePopoverValidationContext } from "./context.mjs";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var Title = forwardRef(
9
+ function PopoverTitle({ className, children, ...props }, forwardedRef) {
10
+ const validationContext = usePopoverValidationContext();
11
+ const internalRef = useRef(null);
12
+ const mergedRef = useMergeRefs([internalRef, forwardedRef]);
13
+ useLayoutEffect(() => {
14
+ validationContext?.registerTitle(internalRef.current);
15
+ }, [validationContext]);
16
+ return /* @__PURE__ */ jsx(
17
+ Text,
18
+ {
19
+ ref: mergedRef,
20
+ variant: "heading-xl",
21
+ render: /* @__PURE__ */ jsx(_Popover.Title, { ...props }),
22
+ className,
23
+ children
24
+ }
25
+ );
26
+ }
27
+ );
28
+ export {
29
+ Title
30
+ };
31
+ //# sourceMappingURL=title.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/title.tsx"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport { useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useLayoutEffect, useRef } from '@wordpress/element';\nimport { Text } from '../text';\nimport { usePopoverValidationContext } from './context';\nimport type { TitleProps } from './types';\n\n/**\n * Renders a heading that labels the popover for accessibility.\n *\n * **Required** \u2014 every popover must include a `Popover.Title`, even if\n * visually hidden. The rendered element is linked to the popup via\n * `aria-labelledby`. Uses the `heading-xl` text variant, matching Dialog.\n *\n * To visually hide the title while keeping it accessible, wrap it with\n * `VisuallyHidden` using the `render` prop:\n *\n * ```jsx\n * <VisuallyHidden render={ <Popover.Title /> }>\n * Accessible title text\n * </VisuallyHidden>\n * ```\n */\nconst Title = forwardRef< HTMLHeadingElement, TitleProps >(\n\tfunction PopoverTitle( { className, children, ...props }, forwardedRef ) {\n\t\tconst validationContext = usePopoverValidationContext();\n\t\tconst internalRef = useRef< HTMLHeadingElement >( null );\n\t\tconst mergedRef = useMergeRefs( [ internalRef, forwardedRef ] );\n\n\t\tuseLayoutEffect( () => {\n\t\t\tvalidationContext?.registerTitle( internalRef.current );\n\t\t}, [ validationContext ] );\n\n\t\treturn (\n\t\t\t<Text\n\t\t\t\tref={ mergedRef }\n\t\t\t\tvariant=\"heading-xl\"\n\t\t\t\trender={ <_Popover.Title { ...props } /> }\n\t\t\t\tclassName={ className }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</Text>\n\t\t);\n\t}\n);\n\nexport { Title };\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,oBAAoB;AAC7B,SAAS,YAAY,iBAAiB,cAAc;AACpD,SAAS,YAAY;AACrB,SAAS,mCAAmC;AAiC/B;AAdb,IAAM,QAAQ;AAAA,EACb,SAAS,aAAc,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,cAAe;AACxE,UAAM,oBAAoB,4BAA4B;AACtD,UAAM,cAAc,OAA8B,IAAK;AACvD,UAAM,YAAY,aAAc,CAAE,aAAa,YAAa,CAAE;AAE9D,oBAAiB,MAAM;AACtB,yBAAmB,cAAe,YAAY,OAAQ;AAAA,IACvD,GAAG,CAAE,iBAAkB,CAAE;AAEzB,WACC;AAAA,MAAC;AAAA;AAAA,QACA,KAAM;AAAA,QACN,SAAQ;AAAA,QACR,QAAS,oBAAC,SAAS,OAAT,EAAiB,GAAG,OAAQ;AAAA,QACtC;AAAA,QAEE;AAAA;AAAA,IACH;AAAA,EAEF;AACD;",
6
+ "names": []
7
+ }
@@ -0,0 +1,13 @@
1
+ // packages/ui/src/popover/trigger.tsx
2
+ import { Popover as _Popover } from "@base-ui/react/popover";
3
+ import { forwardRef } from "@wordpress/element";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var Trigger = forwardRef(
6
+ function PopoverTrigger(props, ref) {
7
+ return /* @__PURE__ */ jsx(_Popover.Trigger, { ref, ...props });
8
+ }
9
+ );
10
+ export {
11
+ Trigger
12
+ };
13
+ //# sourceMappingURL=trigger.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/popover/trigger.tsx"],
4
+ "sourcesContent": ["import { Popover as _Popover } from '@base-ui/react/popover';\nimport { forwardRef } from '@wordpress/element';\nimport type { TriggerProps } from './types';\n\n/**\n * Renders a button that toggles the popover popup when clicked.\n *\n * Renders as a `<button>` by default. Also supports hover-triggered\n * popovers via the `openOnHover`, `delay`, and `closeDelay` props.\n */\nconst Trigger = forwardRef< HTMLButtonElement, TriggerProps >(\n\tfunction PopoverTrigger( props, ref ) {\n\t\treturn <_Popover.Trigger ref={ ref } { ...props } />;\n\t}\n);\n\nexport { Trigger };\n"],
5
+ "mappings": ";AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,kBAAkB;AAWlB;AAFT,IAAM,UAAU;AAAA,EACf,SAAS,eAAgB,OAAO,KAAM;AACrC,WAAO,oBAAC,SAAS,SAAT,EAAiB,KAAc,GAAG,OAAQ;AAAA,EACnD;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
+ }
@@ -5,10 +5,10 @@ import { Tabs as _Tabs } from "@base-ui/react/tabs";
5
5
  import { useMergeRefs } from "@wordpress/compose";
6
6
 
7
7
  // packages/ui/src/tabs/style.module.css
8
- if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='abbf48f53e']")) {
8
+ if (typeof document !== "undefined" && process.env.NODE_ENV !== "test" && !document.head.querySelector("style[data-wp-hash='8c9d1dfa2f']")) {
9
9
  const style = document.createElement("style");
10
- style.setAttribute("data-wp-hash", "abbf48f53e");
11
- style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6c6c6c);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active,#eaeaea);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:2px solid #0000;outline-offset:0}}}'));
10
+ style.setAttribute("data-wp-hash", "8c9d1dfa2f");
11
+ style.appendChild(document.createTextNode('@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\n &[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:"";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:"";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\n [role=tab]:is([aria-selected=true])\n &{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:2px solid #0000;outline-offset:0}}}'));
12
12
  document.head.appendChild(style);
13
13
  }
14
14
  var style_default = { "tablist": "_7313adbc8a112e90__tablist", "is-overflowing-first": "_9f2ac729c68a735a__is-overflowing-first", "is-overflowing-last": "_81c799c1f3cdd261__is-overflowing-last", "is-minimal-variant": "_59228b5227f38a99__is-minimal-variant", "indicator": "_1c37dcfaa1ad8cda__indicator", "tab": "a5fd8814f195aa5e__tab", "tab-children": "_5dfc77e6edd345d4__tab-children", "tab-chevron": "_4a20e969d15e5ac1__tab-chevron", "tabpanel": "_49f4bf715948892a__tabpanel" };
@@ -22,7 +22,6 @@ var List = forwardRef(
22
22
  variant = "default",
23
23
  className,
24
24
  activateOnFocus,
25
- render,
26
25
  ...otherProps
27
26
  }, forwardedRef) {
28
27
  const [listEl, setListEl] = useState(null);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/tabs/list.tsx", "../../src/tabs/style.module.css"],
4
- "sourcesContent": ["import { forwardRef, useEffect, useState } from '@wordpress/element';\nimport clsx from 'clsx';\nimport { Tabs as _Tabs } from '@base-ui/react/tabs';\nimport { useMergeRefs } from '@wordpress/compose';\nimport styles from './style.module.css';\nimport type { TabListProps } from './types';\n\n// Account for sub-pixel rounding errors.\nconst SCROLL_EPSILON = 1;\n\n/**\n * Groups the individual tab buttons.\n *\n * `Tabs` is a collection of React components that combine to render\n * an [ARIA-compliant tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).\n */\nexport const List = forwardRef< HTMLDivElement, TabListProps >(\n\tfunction TabList(\n\t\t{\n\t\t\tchildren,\n\t\t\tvariant = 'default',\n\t\t\tclassName,\n\t\t\tactivateOnFocus,\n\t\t\trender,\n\t\t\t...otherProps\n\t\t},\n\t\tforwardedRef\n\t) {\n\t\tconst [ listEl, setListEl ] = useState< HTMLDivElement | null >( null );\n\t\tconst [ overflow, setOverflow ] = useState< {\n\t\t\tfirst: boolean;\n\t\t\tlast: boolean;\n\t\t\tisScrolling: boolean;\n\t\t} >( {\n\t\t\tfirst: false,\n\t\t\tlast: false,\n\t\t\tisScrolling: false,\n\t\t} );\n\n\t\t// Check if list is overflowing when it scrolls or resizes.\n\t\tuseEffect( () => {\n\t\t\tif ( ! listEl ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst measureOverflow = () => {\n\t\t\t\tconst { scrollWidth, clientWidth, scrollLeft } = listEl;\n\t\t\t\tconst maxScroll = Math.max( scrollWidth - clientWidth, 0 );\n\t\t\t\tconst direction =\n\t\t\t\t\tlistEl.dir ||\n\t\t\t\t\t( typeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle( listEl ).direction\n\t\t\t\t\t\t: 'ltr' );\n\n\t\t\t\tconst scrollFromStart =\n\t\t\t\t\tdirection === 'rtl' && scrollLeft < 0\n\t\t\t\t\t\t? // In RTL layouts, scrollLeft is typically 0 at the visual \"start\"\n\t\t\t\t\t\t // (right edge) and becomes negative toward the \"end\" (left edge).\n\t\t\t\t\t\t // Normalize value for correct first/last detection logic.\n\t\t\t\t\t\t -scrollLeft\n\t\t\t\t\t\t: scrollLeft;\n\n\t\t\t\t// Use SCROLL_EPSILON to handle subpixel rendering differences.\n\t\t\t\tsetOverflow( {\n\t\t\t\t\tfirst: scrollFromStart > SCROLL_EPSILON,\n\t\t\t\t\tlast: scrollFromStart < maxScroll - SCROLL_EPSILON,\n\t\t\t\t\tisScrolling: scrollWidth > clientWidth,\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tconst resizeObserver = new ResizeObserver( measureOverflow );\n\t\t\tresizeObserver.observe( listEl );\n\n\t\t\tlet scrollTick = false;\n\t\t\tconst throttleMeasureOverflowOnScroll = () => {\n\t\t\t\tif ( ! scrollTick ) {\n\t\t\t\t\trequestAnimationFrame( () => {\n\t\t\t\t\t\tmeasureOverflow();\n\t\t\t\t\t\tscrollTick = false;\n\t\t\t\t\t} );\n\t\t\t\t\tscrollTick = true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tlistEl.addEventListener(\n\t\t\t\t'scroll',\n\t\t\t\tthrottleMeasureOverflowOnScroll,\n\t\t\t\t{ passive: true }\n\t\t\t);\n\n\t\t\t// Initial check.\n\t\t\tmeasureOverflow();\n\n\t\t\treturn () => {\n\t\t\t\tlistEl.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthrottleMeasureOverflowOnScroll\n\t\t\t\t);\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t};\n\t\t}, [ listEl ] );\n\n\t\tconst mergedListRef = useMergeRefs( [\n\t\t\tforwardedRef,\n\t\t\t( el: HTMLDivElement | null ) => setListEl( el ),\n\t\t] );\n\n\t\treturn (\n\t\t\t<_Tabs.List\n\t\t\t\tref={ mergedListRef }\n\t\t\t\tactivateOnFocus={ activateOnFocus }\n\t\t\t\tdata-select-on-move={ activateOnFocus ? 'true' : 'false' }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tstyles.tablist,\n\t\t\t\t\toverflow.first && styles[ 'is-overflowing-first' ],\n\t\t\t\t\toverflow.last && styles[ 'is-overflowing-last' ],\n\t\t\t\t\tstyles[ `is-${ variant }-variant` ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...otherProps }\n\t\t\t\ttabIndex={\n\t\t\t\t\totherProps.tabIndex ??\n\t\t\t\t\t( overflow.isScrolling ? -1 : undefined )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t<_Tabs.Indicator className={ styles.indicator } />\n\t\t\t</_Tabs.List>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='abbf48f53e']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"abbf48f53e\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6c6c6c);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active,#eaeaea);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\\n\\t\\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8a8a8a);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:\\\"\\\";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:\\\"\\\";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\\n\\t\\t\\t[role=tab]:is([aria-selected=true])\\n\\t\\t\\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:2px solid #0000;outline-offset:0}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"tablist\":\"_7313adbc8a112e90__tablist\",\"is-overflowing-first\":\"_9f2ac729c68a735a__is-overflowing-first\",\"is-overflowing-last\":\"_81c799c1f3cdd261__is-overflowing-last\",\"is-minimal-variant\":\"_59228b5227f38a99__is-minimal-variant\",\"indicator\":\"_1c37dcfaa1ad8cda__indicator\",\"tab\":\"a5fd8814f195aa5e__tab\",\"tab-children\":\"_5dfc77e6edd345d4__tab-children\",\"tab-chevron\":\"_4a20e969d15e5ac1__tab-chevron\",\"tabpanel\":\"_49f4bf715948892a__tabpanel\"};\n"],
5
- "mappings": ";AAAA,SAAS,YAAY,WAAW,gBAAgB;AAChD,OAAO,UAAU;AACjB,SAAS,QAAQ,aAAa;AAC9B,SAAS,oBAAoB;;;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,ixJAAyyJ,CAAC;AACp1J,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,WAAU,8BAA6B,wBAAuB,2CAA0C,uBAAsB,0CAAyC,sBAAqB,yCAAwC,aAAY,gCAA+B,OAAM,yBAAwB,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,8BAA6B;;;ADqGlc,SAkBC,KAlBD;AAnGH,IAAM,iBAAiB;AAQhB,IAAM,OAAO;AAAA,EACnB,SAAS,QACR;AAAA,IACC;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,cACC;AACD,UAAM,CAAE,QAAQ,SAAU,IAAI,SAAmC,IAAK;AACtE,UAAM,CAAE,UAAU,WAAY,IAAI,SAI7B;AAAA,MACJ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IACd,CAAE;AAGF,cAAW,MAAM;AAChB,UAAK,CAAE,QAAS;AACf;AAAA,MACD;AAEA,YAAM,kBAAkB,MAAM;AAC7B,cAAM,EAAE,aAAa,aAAa,WAAW,IAAI;AACjD,cAAM,YAAY,KAAK,IAAK,cAAc,aAAa,CAAE;AACzD,cAAM,YACL,OAAO,QACL,OAAO,WAAW,cACjB,OAAO,iBAAkB,MAAO,EAAE,YAClC;AAEJ,cAAM,kBACL,cAAc,SAAS,aAAa;AAAA;AAAA;AAAA;AAAA,UAIjC,CAAC;AAAA,YACD;AAGJ,oBAAa;AAAA,UACZ,OAAO,kBAAkB;AAAA,UACzB,MAAM,kBAAkB,YAAY;AAAA,UACpC,aAAa,cAAc;AAAA,QAC5B,CAAE;AAAA,MACH;AAEA,YAAM,iBAAiB,IAAI,eAAgB,eAAgB;AAC3D,qBAAe,QAAS,MAAO;AAE/B,UAAI,aAAa;AACjB,YAAM,kCAAkC,MAAM;AAC7C,YAAK,CAAE,YAAa;AACnB,gCAAuB,MAAM;AAC5B,4BAAgB;AAChB,yBAAa;AAAA,UACd,CAAE;AACF,uBAAa;AAAA,QACd;AAAA,MACD;AACA,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,EAAE,SAAS,KAAK;AAAA,MACjB;AAGA,sBAAgB;AAEhB,aAAO,MAAM;AACZ,eAAO;AAAA,UACN;AAAA,UACA;AAAA,QACD;AACA,uBAAe,WAAW;AAAA,MAC3B;AAAA,IACD,GAAG,CAAE,MAAO,CAAE;AAEd,UAAM,gBAAgB,aAAc;AAAA,MACnC;AAAA,MACA,CAAE,OAA+B,UAAW,EAAG;AAAA,IAChD,CAAE;AAEF,WACC;AAAA,MAAC,MAAM;AAAA,MAAN;AAAA,QACA,KAAM;AAAA,QACN;AAAA,QACA,uBAAsB,kBAAkB,SAAS;AAAA,QACjD,WAAY;AAAA,UACX,cAAO;AAAA,UACP,SAAS,SAAS,cAAQ,sBAAuB;AAAA,UACjD,SAAS,QAAQ,cAAQ,qBAAsB;AAAA,UAC/C,cAAQ,MAAO,OAAQ,UAAW;AAAA,UAClC;AAAA,QACD;AAAA,QACE,GAAG;AAAA,QACL,UACC,WAAW,aACT,SAAS,cAAc,KAAK;AAAA,QAG7B;AAAA;AAAA,UACF,oBAAC,MAAM,WAAN,EAAgB,WAAY,cAAO,WAAY;AAAA;AAAA;AAAA,IACjD;AAAA,EAEF;AACD;",
4
+ "sourcesContent": ["import { forwardRef, useEffect, useState } from '@wordpress/element';\nimport clsx from 'clsx';\nimport { Tabs as _Tabs } from '@base-ui/react/tabs';\nimport { useMergeRefs } from '@wordpress/compose';\nimport styles from './style.module.css';\nimport type { TabListProps } from './types';\n\n// Account for sub-pixel rounding errors.\nconst SCROLL_EPSILON = 1;\n\n/**\n * Groups the individual tab buttons.\n *\n * `Tabs` is a collection of React components that combine to render\n * an [ARIA-compliant tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).\n */\nexport const List = forwardRef< HTMLDivElement, TabListProps >(\n\tfunction TabList(\n\t\t{\n\t\t\tchildren,\n\t\t\tvariant = 'default',\n\t\t\tclassName,\n\t\t\tactivateOnFocus,\n\t\t\t...otherProps\n\t\t},\n\t\tforwardedRef\n\t) {\n\t\tconst [ listEl, setListEl ] = useState< HTMLDivElement | null >( null );\n\t\tconst [ overflow, setOverflow ] = useState< {\n\t\t\tfirst: boolean;\n\t\t\tlast: boolean;\n\t\t\tisScrolling: boolean;\n\t\t} >( {\n\t\t\tfirst: false,\n\t\t\tlast: false,\n\t\t\tisScrolling: false,\n\t\t} );\n\n\t\t// Check if list is overflowing when it scrolls or resizes.\n\t\tuseEffect( () => {\n\t\t\tif ( ! listEl ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst measureOverflow = () => {\n\t\t\t\tconst { scrollWidth, clientWidth, scrollLeft } = listEl;\n\t\t\t\tconst maxScroll = Math.max( scrollWidth - clientWidth, 0 );\n\t\t\t\tconst direction =\n\t\t\t\t\tlistEl.dir ||\n\t\t\t\t\t( typeof window !== 'undefined'\n\t\t\t\t\t\t? window.getComputedStyle( listEl ).direction\n\t\t\t\t\t\t: 'ltr' );\n\n\t\t\t\tconst scrollFromStart =\n\t\t\t\t\tdirection === 'rtl' && scrollLeft < 0\n\t\t\t\t\t\t? // In RTL layouts, scrollLeft is typically 0 at the visual \"start\"\n\t\t\t\t\t\t // (right edge) and becomes negative toward the \"end\" (left edge).\n\t\t\t\t\t\t // Normalize value for correct first/last detection logic.\n\t\t\t\t\t\t -scrollLeft\n\t\t\t\t\t\t: scrollLeft;\n\n\t\t\t\t// Use SCROLL_EPSILON to handle subpixel rendering differences.\n\t\t\t\tsetOverflow( {\n\t\t\t\t\tfirst: scrollFromStart > SCROLL_EPSILON,\n\t\t\t\t\tlast: scrollFromStart < maxScroll - SCROLL_EPSILON,\n\t\t\t\t\tisScrolling: scrollWidth > clientWidth,\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tconst resizeObserver = new ResizeObserver( measureOverflow );\n\t\t\tresizeObserver.observe( listEl );\n\n\t\t\tlet scrollTick = false;\n\t\t\tconst throttleMeasureOverflowOnScroll = () => {\n\t\t\t\tif ( ! scrollTick ) {\n\t\t\t\t\trequestAnimationFrame( () => {\n\t\t\t\t\t\tmeasureOverflow();\n\t\t\t\t\t\tscrollTick = false;\n\t\t\t\t\t} );\n\t\t\t\t\tscrollTick = true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tlistEl.addEventListener(\n\t\t\t\t'scroll',\n\t\t\t\tthrottleMeasureOverflowOnScroll,\n\t\t\t\t{ passive: true }\n\t\t\t);\n\n\t\t\t// Initial check.\n\t\t\tmeasureOverflow();\n\n\t\t\treturn () => {\n\t\t\t\tlistEl.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\tthrottleMeasureOverflowOnScroll\n\t\t\t\t);\n\t\t\t\tresizeObserver.disconnect();\n\t\t\t};\n\t\t}, [ listEl ] );\n\n\t\tconst mergedListRef = useMergeRefs( [\n\t\t\tforwardedRef,\n\t\t\t( el: HTMLDivElement | null ) => setListEl( el ),\n\t\t] );\n\n\t\treturn (\n\t\t\t<_Tabs.List\n\t\t\t\tref={ mergedListRef }\n\t\t\t\tactivateOnFocus={ activateOnFocus }\n\t\t\t\tdata-select-on-move={ activateOnFocus ? 'true' : 'false' }\n\t\t\t\tclassName={ clsx(\n\t\t\t\t\tstyles.tablist,\n\t\t\t\t\toverflow.first && styles[ 'is-overflowing-first' ],\n\t\t\t\t\toverflow.last && styles[ 'is-overflowing-last' ],\n\t\t\t\t\tstyles[ `is-${ variant }-variant` ],\n\t\t\t\t\tclassName\n\t\t\t\t) }\n\t\t\t\t{ ...otherProps }\n\t\t\t\ttabIndex={\n\t\t\t\t\totherProps.tabIndex ??\n\t\t\t\t\t( overflow.isScrolling ? -1 : undefined )\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t\t<_Tabs.Indicator className={ styles.indicator } />\n\t\t\t</_Tabs.List>\n\t\t);\n\t}\n);\n", "if (typeof document !== 'undefined' && process.env.NODE_ENV !== 'test' && !document.head.querySelector(\"style[data-wp-hash='8c9d1dfa2f']\")) {\n\tconst style = document.createElement(\"style\");\n\tstyle.setAttribute(\"data-wp-hash\", \"8c9d1dfa2f\");\n\tstyle.appendChild(document.createTextNode(\"@layer wp-ui-utilities, wp-ui-components, wp-ui-compositions, wp-ui-overrides;@layer wp-ui-components{._7313adbc8a112e90__tablist{--direction-factor:1;--direction-start:left;--direction-end:right;align-items:stretch;display:flex;overflow-inline:auto;overscroll-behavior-inline:none;position:relative;&:dir(rtl){--direction-factor:-1;--direction-start:right;--direction-end:left}&[data-orientation=horizontal]{--fade-width:4rem;--fade-gradient-base:#0000 0%,#000 var(--fade-width);--fade-gradient-composed:var(--fade-gradient-base),#000 60%,#0000 50%;width:fit-content;&._9f2ac729c68a735a__is-overflowing-first{mask-image:linear-gradient(to var(--direction-end),var(--fade-gradient-base))}&._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to var(--direction-start),var(--fade-gradient-base))}&._9f2ac729c68a735a__is-overflowing-first._81c799c1f3cdd261__is-overflowing-last{mask-image:linear-gradient(to right,var(--fade-gradient-composed)),linear-gradient(to left,var(--fade-gradient-composed))}&._59228b5227f38a99__is-minimal-variant{gap:1rem}}&[data-orientation=vertical]{flex-direction:column}}._1c37dcfaa1ad8cda__indicator{@media not (prefers-reduced-motion){transition-duration:.2s;transition-property:translate,width,height,border-radius,border-block;transition-timing-function:ease-out}outline:2px solid #0000;outline-offset:-1px;pointer-events:none;position:absolute;&[data-orientation=horizontal]{background-color:var(--wpds-color-stroke-interactive-neutral-strong,#6e6e6e);bottom:0;height:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px));left:0;translate:var(--active-tab-left) 0;width:var(--active-tab-width);z-index:1}&[data-orientation=vertical]{background-color:var(--wpds-color-bg-interactive-neutral-weak-active,#ededed);border-radius:var(--wpds-border-radius-sm,2px);height:var(--active-tab-height);left:50%;top:0;translate:-50% var(--active-tab-top);width:100%;z-index:0}._7313adbc8a112e90__tablist[data-select-on-move=true]:has(:focus-visible)\\n\\t\\t&[data-orientation=vertical]{border:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));box-sizing:border-box}}.a5fd8814f195aa5e__tab{align-items:center;background:#0000;border:none;border-radius:0;box-shadow:none;color:var(--wpds-color-fg-interactive-neutral,#1e1e1e);cursor:var(--wpds-cursor-control,pointer);display:flex;flex:1 0 auto;font-family:var(--wpds-typography-font-family-body,-apple-system,system-ui,\\\"Segoe UI\\\",\\\"Roboto\\\",\\\"Oxygen-Sans\\\",\\\"Ubuntu\\\",\\\"Cantarell\\\",\\\"Helvetica Neue\\\",sans-serif);font-size:var(--wpds-typography-font-size-md,13px);font-weight:400;line-height:1.2;outline:none;padding:0;position:relative;white-space:nowrap;z-index:1;&[data-disabled]{color:var(--wpds-color-fg-interactive-neutral-disabled,#8d8d8d);cursor:default;@media (forced-colors:active){color:GrayText}}&:not([data-disabled]):is(:hover,:focus-visible){color:var(--wpds-color-fg-interactive-neutral-active,#1e1e1e)}&:after{border-radius:var(--wpds-border-radius-sm,2px);opacity:0;outline:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) solid var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));pointer-events:none;position:absolute;z-index:-1;@media not (prefers-reduced-motion){transition:opacity .1s linear}}&:focus-visible:after{opacity:1}[data-orientation=horizontal] &{height:48px;padding-inline:var(--wpds-dimension-padding-lg,16px);scroll-margin:24px;&:after{content:\\\"\\\";inset:var(--wpds-dimension-padding-md,12px)}}._59228b5227f38a99__is-minimal-variant[data-orientation=horizontal] &{padding-inline:0;&:after{inset-inline:round(up,var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)),1px)}}[data-orientation=vertical] &{min-height:40px;padding:var(--wpds-dimension-padding-sm,8px) var(--wpds-dimension-padding-md,12px)}[data-orientation=vertical][data-select-on-move=false] &:after{content:\\\"\\\";inset:var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px))}}._5dfc77e6edd345d4__tab-children{align-items:center;display:flex;flex-grow:1;[data-orientation=horizontal] &{justify-content:center}[data-orientation=vertical] &{justify-content:start}}._4a20e969d15e5ac1__tab-chevron{flex-shrink:0;margin-inline-end:calc(var(--wpds-dimension-gap-xs, 4px)*-1);opacity:0;[data-orientation=horizontal] &{display:none}[role=tab]:is([aria-selected=true],:focus-visible,:hover) &{opacity:1}@media not (prefers-reduced-motion){[data-select-on-move=true]\\n\\t\\t\\t[role=tab]:is([aria-selected=true])\\n\\t\\t\\t&{transition:opacity .15s linear .15s}}&:dir(rtl){rotate:180deg}}._49f4bf715948892a__tabpanel{&:focus{box-shadow:none;outline:none}&:focus-visible{box-shadow:0 0 0 var(--wpds-border-width-focus,var(--wp-admin-border-width-focus,2px)) var(--wpds-color-stroke-focus-brand,var(--wp-admin-theme-color,#3858e9));outline:2px solid #0000;outline-offset:0}}}\"));\n\tdocument.head.appendChild(style);\n}\nexport default {\"tablist\":\"_7313adbc8a112e90__tablist\",\"is-overflowing-first\":\"_9f2ac729c68a735a__is-overflowing-first\",\"is-overflowing-last\":\"_81c799c1f3cdd261__is-overflowing-last\",\"is-minimal-variant\":\"_59228b5227f38a99__is-minimal-variant\",\"indicator\":\"_1c37dcfaa1ad8cda__indicator\",\"tab\":\"a5fd8814f195aa5e__tab\",\"tab-children\":\"_5dfc77e6edd345d4__tab-children\",\"tab-chevron\":\"_4a20e969d15e5ac1__tab-chevron\",\"tabpanel\":\"_49f4bf715948892a__tabpanel\"};\n"],
5
+ "mappings": ";AAAA,SAAS,YAAY,WAAW,gBAAgB;AAChD,OAAO,UAAU;AACjB,SAAS,QAAQ,aAAa;AAC9B,SAAS,oBAAoB;;;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,uyJAA+zJ,CAAC;AAC12J,WAAS,KAAK,YAAY,KAAK;AAChC;AACA,IAAO,gBAAQ,EAAC,WAAU,8BAA6B,wBAAuB,2CAA0C,uBAAsB,0CAAyC,sBAAqB,yCAAwC,aAAY,gCAA+B,OAAM,yBAAwB,gBAAe,mCAAkC,eAAc,kCAAiC,YAAW,8BAA6B;;;ADoGlc,SAkBC,KAlBD;AAlGH,IAAM,iBAAiB;AAQhB,IAAM,OAAO;AAAA,EACnB,SAAS,QACR;AAAA,IACC;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACJ,GACA,cACC;AACD,UAAM,CAAE,QAAQ,SAAU,IAAI,SAAmC,IAAK;AACtE,UAAM,CAAE,UAAU,WAAY,IAAI,SAI7B;AAAA,MACJ,OAAO;AAAA,MACP,MAAM;AAAA,MACN,aAAa;AAAA,IACd,CAAE;AAGF,cAAW,MAAM;AAChB,UAAK,CAAE,QAAS;AACf;AAAA,MACD;AAEA,YAAM,kBAAkB,MAAM;AAC7B,cAAM,EAAE,aAAa,aAAa,WAAW,IAAI;AACjD,cAAM,YAAY,KAAK,IAAK,cAAc,aAAa,CAAE;AACzD,cAAM,YACL,OAAO,QACL,OAAO,WAAW,cACjB,OAAO,iBAAkB,MAAO,EAAE,YAClC;AAEJ,cAAM,kBACL,cAAc,SAAS,aAAa;AAAA;AAAA;AAAA;AAAA,UAIjC,CAAC;AAAA,YACD;AAGJ,oBAAa;AAAA,UACZ,OAAO,kBAAkB;AAAA,UACzB,MAAM,kBAAkB,YAAY;AAAA,UACpC,aAAa,cAAc;AAAA,QAC5B,CAAE;AAAA,MACH;AAEA,YAAM,iBAAiB,IAAI,eAAgB,eAAgB;AAC3D,qBAAe,QAAS,MAAO;AAE/B,UAAI,aAAa;AACjB,YAAM,kCAAkC,MAAM;AAC7C,YAAK,CAAE,YAAa;AACnB,gCAAuB,MAAM;AAC5B,4BAAgB;AAChB,yBAAa;AAAA,UACd,CAAE;AACF,uBAAa;AAAA,QACd;AAAA,MACD;AACA,aAAO;AAAA,QACN;AAAA,QACA;AAAA,QACA,EAAE,SAAS,KAAK;AAAA,MACjB;AAGA,sBAAgB;AAEhB,aAAO,MAAM;AACZ,eAAO;AAAA,UACN;AAAA,UACA;AAAA,QACD;AACA,uBAAe,WAAW;AAAA,MAC3B;AAAA,IACD,GAAG,CAAE,MAAO,CAAE;AAEd,UAAM,gBAAgB,aAAc;AAAA,MACnC;AAAA,MACA,CAAE,OAA+B,UAAW,EAAG;AAAA,IAChD,CAAE;AAEF,WACC;AAAA,MAAC,MAAM;AAAA,MAAN;AAAA,QACA,KAAM;AAAA,QACN;AAAA,QACA,uBAAsB,kBAAkB,SAAS;AAAA,QACjD,WAAY;AAAA,UACX,cAAO;AAAA,UACP,SAAS,SAAS,cAAQ,sBAAuB;AAAA,UACjD,SAAS,QAAQ,cAAQ,qBAAsB;AAAA,UAC/C,cAAQ,MAAO,OAAQ,UAAW;AAAA,UAClC;AAAA,QACD;AAAA,QACE,GAAG;AAAA,QACL,UACC,WAAW,aACT,SAAS,cAAc,KAAK;AAAA,QAG7B;AAAA;AAAA,UACF,oBAAC,MAAM,WAAN,EAAgB,WAAY,cAAO,WAAY;AAAA;AAAA;AAAA,IACjD;AAAA,EAEF;AACD;",
6
6
  "names": []
7
7
  }