@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
@@ -1,12 +1,62 @@
1
1
  import type { AlertDialog as _AlertDialog } from '@base-ui/react/alert-dialog';
2
2
  import type { ReactNode } from 'react';
3
- import type { TriggerProps as DialogTriggerProps } from '../dialog/types';
3
+ import type { ComponentProps } from '../utils/types';
4
+ /**
5
+ * The return type of `onConfirm`. Return `void` (or nothing) to auto-close
6
+ * the dialog after the confirm handler completes. Return `{ close: false }`
7
+ * to keep the dialog open (e.g. for validation errors).
8
+ *
9
+ * Return `{ error: '...' }` to display a built-in error message below the
10
+ * action buttons. When `error` is provided, the dialog stays open
11
+ * regardless of the `close` value.
12
+ */
13
+ export type ConfirmResult = void | {
14
+ close?: boolean;
15
+ error?: string;
16
+ };
4
17
  export interface RootProps extends Pick<_AlertDialog.Root.Props, 'open' | 'onOpenChange' | 'defaultOpen'> {
5
18
  /**
6
19
  * The content to be rendered inside the component. Typically includes
7
20
  * `AlertDialog.Trigger` and `AlertDialog.Popup`.
8
21
  */
9
22
  children: ReactNode;
23
+ /**
24
+ * Callback fired when the user confirms the action.
25
+ *
26
+ * - Synchronous handlers: the dialog closes immediately after the
27
+ * handler returns.
28
+ * - Async handlers: the dialog enters a "pending" state (buttons
29
+ * disabled, spinner shown on the confirm button) until the promise
30
+ * settles.
31
+ *
32
+ * Return `{ close: false }` to keep the dialog open after the handler
33
+ * completes (e.g. for server-side validation). Return `void` or
34
+ * `{ close: true }` to close the dialog (the default).
35
+ *
36
+ * Return `{ error: '...' }` to show a built-in error message below
37
+ * the action buttons. The dialog stays open regardless of the `close`
38
+ * value. The error is announced to screen readers and is automatically
39
+ * cleared on the next confirm attempt or when the dialog reopens.
40
+ *
41
+ * If the promise rejects (or the handler throws) without returning an
42
+ * `error`, the dialog stays open and returns to idle without showing
43
+ * a visible error message. The error is logged to the console.
44
+ * To show a user-facing message on failure, catch the error and
45
+ * return `{ close: false, error: '...' }`.
46
+ */
47
+ onConfirm?: () => ConfirmResult | Promise<ConfirmResult>;
48
+ }
49
+ export interface TriggerProps extends ComponentProps<'button'> {
50
+ /**
51
+ * The content to be rendered inside the component.
52
+ */
53
+ children?: ReactNode;
54
+ }
55
+ export interface PopupProps extends ComponentProps<'div'>, Pick<_AlertDialog.Popup.Props, 'initialFocus' | 'finalFocus'> {
56
+ /**
57
+ * A parent element to render the portal into.
58
+ */
59
+ container?: _AlertDialog.Portal.Props['container'];
10
60
  /**
11
61
  * The semantic intent of the dialog, which determines its styling.
12
62
  *
@@ -21,22 +71,24 @@ export interface RootProps extends Pick<_AlertDialog.Root.Props, 'open' | 'onOpe
21
71
  * @default 'default'
22
72
  */
23
73
  intent?: 'default' | 'irreversible';
24
- }
25
- export type TriggerProps = DialogTriggerProps;
26
- export interface PopupProps {
27
74
  /**
28
75
  * The title displayed in the dialog header. This serves as both the
29
- * visible heading and the accessible label for the dialog.
76
+ * visible heading and the accessible label (`aria-labelledby`) for the
77
+ * dialog. Must be a plain string to ensure a predictable accessible name.
30
78
  */
31
79
  title: string;
32
80
  /**
33
- * The message content displayed in the dialog body.
81
+ * An optional description displayed below the title. Rendered using
82
+ * Base UI's `AlertDialog.Description` for proper `aria-describedby`
83
+ * association with the dialog. Must be a plain string to ensure a
84
+ * predictable accessible description.
34
85
  */
35
- children: ReactNode;
86
+ description?: string;
36
87
  /**
37
- * Callback fired when the user confirms the action.
88
+ * Optional body content displayed between the description and the
89
+ * action buttons. Use for supplementary details or form fields.
38
90
  */
39
- onConfirm: () => void;
91
+ children?: ReactNode;
40
92
  /**
41
93
  * Custom text for the confirm button.
42
94
  *
@@ -49,22 +101,5 @@ export interface PopupProps {
49
101
  * @default 'Cancel'
50
102
  */
51
103
  cancelButtonText?: string;
52
- /**
53
- * Whether the confirm action is in a loading state (e.g. an async
54
- * operation is in progress). When `true`, the confirm button shows a
55
- * spinner and the cancel button is disabled.
56
- *
57
- * **Important:** Passing this prop — even as `false` — opts into
58
- * manual-close mode: the confirm button will no longer auto-close the
59
- * dialog. The consumer is responsible for setting `open={false}` when
60
- * the operation completes. Omit the prop entirely for the default
61
- * auto-close-on-confirm behavior.
62
- *
63
- * To implement an async confirm flow, use controlled mode
64
- * (`open` / `onOpenChange`) and manage the loading state externally:
65
- * prevent closing in `onOpenChange` while loading, and set
66
- * `open={false}` once the operation completes.
67
- */
68
- loading?: boolean;
69
104
  }
70
105
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/alert-dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,I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ACX,YAAY,CAAC,IAAI,CAAC,KAAK,EACvB,MAAM,GAAG,cAAc,GAAG,aAAa,CACvC;IACD;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,SAAS,CAAC,EAAE,MAAM,aAAa,GAAG,OAAO,CAAE,aAAa,CAAE,CAAC;CAC3D;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAE,QAAQ,CAAE;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,UAChB,SAAQ,cAAc,CAAE,KAAK,CAAE,EAC9B,IAAI,CAAE,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CAAE;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAE,WAAW,CAAE,CAAC;IAErD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,SAAS,GAAG,cAAc,CAAC;IAEpC;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C;;GAEG;AACH,eAAO,MAAM,KAAK,wGAmBf,CAAC"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;GAEG;AACH,eAAO,MAAM,KAAK,wGAgBf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAK3C,eAAO,MAAM,MAAM,2GA8ClB,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/button/button.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAM3C,eAAO,MAAM,MAAM,2GA+ClB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/card/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AAwBjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAAC,IAAI,CASjC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAC,IAAI,CAAE,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAsB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAe7B,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/card/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,UAAU,CAAC;AAwBjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAAC,IAAI,CASjC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,IAAI,CAAC,IAAI,CAAE,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAyBrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,KAsB3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,KAc7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/card/title.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,KAAK,uGAYjB,CAAC"}
1
+ {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/card/title.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAI1C;;;GAGG;AACH,eAAO,MAAM,KAAK,uGAajB,CAAC"}
@@ -5,8 +5,9 @@
5
5
  * `Collapsible` is a collection of React components that combine to render
6
6
  * a collapsible panel controlled by a button.
7
7
  */
8
- export declare const Panel: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsiblePanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
8
+ export declare const Panel: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsiblePanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
9
9
  className?: string;
10
+ style?: React.CSSProperties;
10
11
  render?: ((props: import("react").HTMLAttributes<any> & {
11
12
  ref?: import("react").Ref<any> | undefined;
12
13
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/collapsible/panel.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;kDAIjB,CAAC"}
1
+ {"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../src/collapsible/panel.tsx"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;kDAIjB,CAAC"}
@@ -4,8 +4,9 @@
4
4
  * `Collapsible` is a collection of React components that combine to render
5
5
  * a collapsible panel controlled by a button.
6
6
  */
7
- export declare const Root: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsibleRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
7
+ export declare const Root: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsibleRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
8
8
  className?: string;
9
+ style?: React.CSSProperties;
9
10
  render?: ((props: import("react").HTMLAttributes<any> & {
10
11
  ref?: import("react").Ref<any> | undefined;
11
12
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/collapsible/root.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;kDAIhB,CAAC"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/collapsible/root.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;kDAIhB,CAAC"}
@@ -4,8 +4,9 @@
4
4
  * `Collapsible` is a collection of React components that combine to render
5
5
  * a collapsible panel controlled by a button.
6
6
  */
7
- export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsibleTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref">, "className" | "children" | "render"> & {
7
+ export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").CollapsibleTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref">, "style" | "className" | "children" | "render"> & {
8
8
  className?: string;
9
+ style?: React.CSSProperties;
9
10
  render?: ((props: import("react").HTMLAttributes<any> & {
10
11
  ref?: import("react").Ref<any> | undefined;
11
12
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/collapsible/trigger.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;qDAInB,CAAC"}
1
+ {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/collapsible/trigger.tsx"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,OAAO;;;;;;;;qDAInB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../src/dialog/popup.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAO1C;;;GAGG;AACH,QAAA,MAAM,KAAK,uGAuCR,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../src/dialog/popup.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAO1C;;;GAGG;AACH,QAAA,MAAM,KAAK,uGAwCR,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -19,4 +19,12 @@ export declare const AllSizes: Story;
19
19
  * because it requires a global CSS rule.)
20
20
  */
21
21
  export declare const WithCustomZIndex: Story;
22
+ /**
23
+ * A dialog with a visually hidden title. The title is still present in the
24
+ * DOM for `aria-labelledby`, but is not visible to sighted users.
25
+ *
26
+ * Use `<VisuallyHidden render={ <Dialog.Title /> }>` so that `Dialog.Title`
27
+ * keeps its `<h2>` element while being visually hidden.
28
+ */
29
+ export declare const WithVisuallyHiddenTitle: Story;
22
30
  //# sourceMappingURL=index.story.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/dialog/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAAC,IAAI,CAqCnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,MAAM,CAAC,IAAI,CAAE,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAuEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAG9B,CAAC"}
1
+ {"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/dialog/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,MAAM,CAAC,IAAI,CAqCnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,MAAM,CAAC,IAAI,CAAE,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAsBtB,CAAC;AAuEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAG9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAuBrC,CAAC"}
@@ -4,8 +4,18 @@ import type { TitleProps } from './types';
4
4
  * and serves as both the visible heading and the accessible label for
5
5
  * the dialog.
6
6
  *
7
- * Base UI's Dialog.Title renders an `<h2>` by default. Use the `render` prop
8
- * to customize the element if needed.
7
+ * **Required** every dialog must include a `Dialog.Title`, even if
8
+ * visually hidden. The rendered element is linked to the popup via
9
+ * `aria-labelledby`. Renders an `<h2>` by default.
10
+ *
11
+ * To visually hide the title while keeping it accessible, wrap it with
12
+ * `VisuallyHidden` using the `render` prop:
13
+ *
14
+ * ```jsx
15
+ * <VisuallyHidden render={ <Dialog.Title /> }>
16
+ * Accessible title text
17
+ * </VisuallyHidden>
18
+ * ```
9
19
  */
10
20
  declare const Title: import("react").ForwardRefExoticComponent<TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
11
21
  export { Title };
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/dialog/title.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;GAOG;AACH,QAAA,MAAM,KAAK,2GAoBV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/dialog/title.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,KAAK,2GAsBV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -20,6 +20,10 @@ export interface PopupProps extends ComponentProps<'div'>, Pick<_Dialog.Popup.Pr
20
20
  * The content to be rendered inside the component.
21
21
  */
22
22
  children?: ReactNode;
23
+ /**
24
+ * A parent element to render the portal into.
25
+ */
26
+ container?: _Dialog.Portal.Props['container'];
23
27
  /**
24
28
  * Renders the dialog at a preset width (excluding additional padding from
25
29
  * the viewport edges).
@@ -56,8 +60,11 @@ export interface TitleProps extends ComponentProps<'h2'> {
56
60
  /**
57
61
  * The title content to be rendered. This serves as both the visible
58
62
  * heading and the accessible label for the dialog.
63
+ *
64
+ * When `Dialog.Title` is passed as a render element (e.g. to
65
+ * `VisuallyHidden`), children can be provided by the wrapper instead.
59
66
  */
60
- children: ReactNode;
67
+ children?: ReactNode;
61
68
  }
62
69
  export interface CloseIconProps extends Omit<ComponentProps<typeof IconButton>, 'label' | 'icon' | 'loading' | 'loadingAnnouncement'> {
63
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,SAChB,SAAQ,IAAI,CACX,OAAO,CAAC,IAAI,CAAC,KAAK,EAChB,MAAM,GACN,cAAc,GACd,aAAa,GACb,OAAO,GACP,yBAAyB,CAC3B;IACD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAE,QAAQ,CAAE;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,UAChB,SAAQ,cAAc,CAAE,KAAK,CAAE,EAC9B,IAAI,CA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Q,CAAC,EAAE,SAAS,CAAC;CACrB;AAED,MAAM,WAAW,cAChB,SAAQ,IAAI,CACX,cAAc,CAAE,OAAO,UAAU,CAAE,EACnC,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,qBAAqB,CACpD;IACD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,cAAc,CAAE,OAAO,UAAU,CAAE,CAAE,OAAO,CAAE,CAAC;IACvD;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAE,OAAO,UAAU,CAAE,CAAE,MAAM,CAAE,CAAC;CACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../src/empty-state/description.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAG1D;;;GAGG;AACH,eAAO,MAAM,WAAW,6HAgBrB,CAAC"}
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../src/empty-state/description.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAK1D;;;GAGG;AACH,eAAO,MAAM,WAAW,6HAkBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/empty-state/title.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD;;GAEG;AACH,eAAO,MAAM,KAAK,qHAajB,CAAC"}
1
+ {"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/empty-state/title.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAKpD;;GAEG;AACH,eAAO,MAAM,KAAK,qHAiBjB,CAAC"}
@@ -1,5 +1,6 @@
1
- export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
1
+ export declare const Description: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref">, "style" | "className" | "children" | "render"> & {
2
2
  className?: string;
3
+ style?: React.CSSProperties;
3
4
  render?: ((props: import("react").HTMLAttributes<any> & {
4
5
  ref?: import("react").Ref<any> | undefined;
5
6
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/description.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,WAAW;;;;;;;wDAWrB,CAAC"}
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/description.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,WAAW;;;;;;;;wDAerB,CAAC"}
@@ -10,8 +10,9 @@
10
10
  * If the content only includes plain text, use `Field.Description` instead,
11
11
  * so the readout is not unnecessarily verbose for screen reader users.
12
12
  */
13
- export declare const Details: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
13
+ export declare const Details: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
14
14
  className?: string;
15
+ style?: React.CSSProperties;
15
16
  render?: ((props: import("react").HTMLAttributes<any> & {
16
17
  ref?: import("react").Ref<any> | undefined;
17
18
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;;;;;;;kDAenB,CAAC"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,OAAO;;;;;;;;kDAiBnB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Field as _Field } from '@base-ui/react/field';
2
- export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldLabelProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref">, "className" | "children" | "render"> & {
2
+ export declare const Label: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldLabelProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref">, "style" | "className" | "children" | "render"> & {
3
3
  className?: string;
4
+ style?: React.CSSProperties;
4
5
  render?: ((props: import("react").HTMLAttributes<any> & {
5
6
  ref?: import("react").Ref<any> | undefined;
6
7
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMvD,eAAO,MAAM,KAAK;;;;;;;;;oDAqBjB,CAAC"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/field/label.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAMvD,eAAO,MAAM,KAAK;;;;;;;;;;oDAyBjB,CAAC"}
@@ -1,5 +1,6 @@
1
- export declare const FieldsetDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "className" | "children" | "render"> & {
1
+ export declare const FieldsetDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "style" | "className" | "children" | "render"> & {
2
2
  className?: string;
3
+ style?: React.CSSProperties;
3
4
  render?: ((props: import("react").HTMLAttributes<any> & {
4
5
  ref?: import("react").Ref<any> | undefined;
5
6
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/description.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB;;;;;;;wDA4B7B,CAAC"}
1
+ {"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/description.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,mBAAmB;;;;;;;;wDAmC7B,CAAC"}
@@ -10,8 +10,9 @@
10
10
  * If the content only includes plain text, use `Fieldset.Description` instead,
11
11
  * so the readout is not unnecessarily verbose for screen reader users.
12
12
  */
13
- export declare const FieldsetDetails: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
13
+ export declare const FieldsetDetails: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
14
14
  className?: string;
15
+ style?: React.CSSProperties;
15
16
  render?: ((props: import("react").HTMLAttributes<any> & {
16
17
  ref?: import("react").Ref<any> | undefined;
17
18
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;kDAyBzB,CAAC"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/details.tsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;;;;;;;;kDAyBzB,CAAC"}
@@ -1,5 +1,6 @@
1
- export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldsetLegendProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "className" | "children" | "render"> & {
1
+ export declare const FieldsetLegend: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldsetLegendProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
2
2
  className?: string;
3
+ style?: React.CSSProperties;
3
4
  render?: ((props: import("react").HTMLAttributes<any> & {
4
5
  ref?: import("react").Ref<any> | undefined;
5
6
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/legend.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;;;;;;kDAgB1B,CAAC"}
1
+ {"version":3,"file":"legend.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/legend.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;;;;;;;kDAqB1B,CAAC"}
@@ -4,8 +4,9 @@
4
4
  *
5
5
  * To label a single form control element, use the `Field` component instead.
6
6
  */
7
- export declare const FieldsetRoot: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldsetRootProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref">, "className" | "children" | "render"> & {
7
+ export declare const FieldsetRoot: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").FieldsetRootProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref">, "style" | "className" | "children" | "render"> & {
8
8
  className?: string;
9
+ style?: React.CSSProperties;
9
10
  render?: ((props: import("react").HTMLAttributes<any> & {
10
11
  ref?: import("react").Ref<any> | undefined;
11
12
  }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/root.tsx"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;uDA4BtB,CAAC"}
1
+ {"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/fieldset/root.tsx"],"names":[],"mappings":"AAOA;;;;;GAKG;AACH,eAAO,MAAM,YAAY;;;;;;;;uDA4BtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAQvD,eAAO,MAAM,KAAK;;;;;;;+CAmBf,CAAC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AASvD,eAAO,MAAM,KAAK;;;;;;;+CAuBf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-layout.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input-layout/input-layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,WAAW,6GA+CvB,CAAC"}
1
+ {"version":3,"file":"input-layout.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/input-layout/input-layout.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,WAAW,6GAgDvB,CAAC"}
@@ -1,3 +1,7 @@
1
- import type { SelectItemProps } from './types';
2
- export declare const Item: import("react").ForwardRefExoticComponent<Omit<SelectItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
1
+ import { Select as _Select } from '@base-ui/react/select';
2
+ export declare const Item: import("react").ForwardRefExoticComponent<Omit<import("../../../utils/types").ComponentProps<import("react").NamedExoticComponent<Omit<import("@base-ui/react").SelectItemProps, "ref"> & import("react").RefAttributes<HTMLElement>>>, "value"> & {
3
+ value?: string;
4
+ size?: import("../input-layout/types").InputLayoutProps["size"];
5
+ children?: _Select.Item.Props["children"];
6
+ } & import("react").RefAttributes<HTMLDivElement>>;
3
7
  //# sourceMappingURL=item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,IAAI,yHA6BhB,CAAC"}
1
+ {"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAS1D,eAAO,MAAM,IAAI;;;;kDA6BhB,CAAC"}
@@ -1,2 +1,12 @@
1
- export declare const Popup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").SelectPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
1
+ import { Select as _Select } from '@base-ui/react/select';
2
+ export declare const Popup: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").SelectPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">, "style" | "className" | "children" | "render"> & {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ render?: ((props: import("react").HTMLAttributes<any> & {
6
+ ref?: import("react").Ref<any> | undefined;
7
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
8
+ } & {
9
+ children?: React.ReactNode;
10
+ container?: _Select.Portal.Props["container"];
11
+ } & import("react").RefAttributes<HTMLDivElement>>;
2
12
  //# sourceMappingURL=popup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/popup.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,KAAK,mJAqCjB,CAAC"}
1
+ {"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/popup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAiB1D,eAAO,MAAM,KAAK;;;;;;;;;kDAwCjB,CAAC"}
@@ -1,3 +1,13 @@
1
- import type { SelectTriggerProps } from './types';
2
- export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<SelectTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
1
+ import { Select as _Select } from '@base-ui/react/select';
2
+ export declare const Trigger: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@base-ui/react").SelectTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref">, "style" | "className" | "children" | "render"> & {
3
+ className?: string;
4
+ style?: React.CSSProperties;
5
+ render?: ((props: import("react").HTMLAttributes<any> & {
6
+ ref?: import("react").Ref<any> | undefined;
7
+ }) => React.ReactElement<unknown>) | React.ReactElement<Record<string, unknown>>;
8
+ } & {
9
+ size?: import("../input-layout/types").InputLayoutProps["size"];
10
+ variant?: "default" | "minimal";
11
+ children?: _Select.Value.Props["children"];
12
+ } & import("react").RefAttributes<HTMLButtonElement>>;
3
13
  //# sourceMappingURL=trigger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/trigger.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,eAAO,MAAM,OAAO,+HA+CnB,CAAC"}
1
+ {"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/trigger.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAU1D,eAAO,MAAM,OAAO;;;;;;;;;;qDA+CnB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  import type { Select as _Select } from '@base-ui/react/select';
2
+ import type { ComponentProps } from '../../../utils/types';
2
3
  import type { InputLayoutProps } from '../input-layout/types';
3
4
  export type SelectRootProps = Omit<_Select.Root.Props<string, false>, 'multiple'>;
4
- export type SelectTriggerProps = Omit<_Select.Trigger.Props, 'children'> & {
5
+ export type SelectTriggerProps = ComponentProps<typeof _Select.Trigger> & {
5
6
  /**
6
7
  * The size of the trigger.
7
8
  *
@@ -20,8 +21,17 @@ export type SelectTriggerProps = Omit<_Select.Trigger.Props, 'children'> & {
20
21
  */
21
22
  children?: _Select.Value.Props['children'];
22
23
  };
23
- export type SelectPopupProps = _Select.Popup.Props;
24
- export type SelectItemProps = Omit<_Select.Item.Props, 'children' | 'value'> & {
24
+ export type SelectPopupProps = ComponentProps<typeof _Select.Popup> & {
25
+ /**
26
+ * The content to be rendered inside the popup.
27
+ */
28
+ children?: React.ReactNode;
29
+ /**
30
+ * A parent element to render the portal into.
31
+ */
32
+ container?: _Select.Portal.Props['container'];
33
+ };
34
+ export type SelectItemProps = Omit<ComponentProps<typeof _Select.Item>, 'value'> & {
25
35
  /**
26
36
  * A unique value that identifies this select item.
27
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB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,KAAK,CAAE,EACnC,UAAU,CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAE,OAAO,OAAO,CAAC,OAAO,CAAE,GAAG;IAC3E;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAE,OAAO,OAAO,CAAC,KAAK,CAAE,GAAG;IACvE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAE,WAAW,CAAE,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,cAAc,CAAE,OAAO,OAAO,CAAC,IAAI,CAAE,EACrC,OAAO,CACP,GAAG;IACH;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/textarea/textarea.tsx"],"names":[],"mappings":"AAoBA,eAAO,MAAM,QAAQ;;uDA8BpB,CAAC"}
1
+ {"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/textarea/textarea.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ;;uDAsCpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/form/stories/shared.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,qdAQgC,CAAC;AAEtE,eAAO,MAAM,eAAe,6BAQ3B,CAAC"}
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/form/stories/shared.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,qdAQgC,CAAC;AAEtE,eAAO,MAAM,eAAe,6BAQ3B,CAAC"}
@@ -11,6 +11,7 @@ export * from './icon';
11
11
  export * from './icon-button';
12
12
  export * from './link';
13
13
  export * as Notice from './notice';
14
+ export * as Popover from './popover';
14
15
  export * from './stack';
15
16
  export * as Tabs from './tabs';
16
17
  export * from './text';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/link/link.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAKzC;;;GAGG;AACH,eAAO,MAAM,IAAI,yGA2Dd,CAAC"}
1
+ {"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/link/link.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,IAAI,yGA4Dd,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ArrowProps } from './types';
2
+ /**
3
+ * Renders an optional arrow element that points toward the anchor.
4
+ *
5
+ * Must be placed inside `Popover.Popup`. The arrow automatically rotates
6
+ * to match the current placement side.
7
+ */
8
+ declare const Arrow: import("react").ForwardRefExoticComponent<ArrowProps & import("react").RefAttributes<HTMLDivElement>>;
9
+ export { Arrow };
10
+ //# sourceMappingURL=arrow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../src/popover/arrow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuB1C;;;;;GAKG;AACH,QAAA,MAAM,KAAK,uGAaR,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { CloseProps } from './types';
2
+ /**
3
+ * Renders a button that closes the popover when clicked.
4
+ *
5
+ * When the popover opens, initial focus skips this button in favor of
6
+ * the first interactive element inside the popup (unless `initialFocus`
7
+ * on `Popover.Popup` overrides this behavior).
8
+ */
9
+ declare const Close: import("react").ForwardRefExoticComponent<CloseProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ export { Close };
11
+ //# sourceMappingURL=close.d.ts.map