@ngrok/mantle 0.94.0 → 0.95.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 (615) hide show
  1. package/README.md +11 -2
  2. package/dist/CaretDown-MgTrjdYK.js +1 -0
  3. package/dist/CaretLeft-CZIqCyEF.js +1 -0
  4. package/dist/CaretRight-BKz4JHCI.js +1 -0
  5. package/dist/Check-C5a1hX4x.js +1 -0
  6. package/dist/CheckCircle-Bi4tSau6.js +1 -0
  7. package/dist/CircleNotch-BKE0NAIr.js +1 -0
  8. package/dist/Copy-BYWMO6PW.js +1 -0
  9. package/dist/Desktop-BaSlSeg2.js +1 -0
  10. package/dist/Eye-C38LQkZ_.js +1 -0
  11. package/dist/EyeClosed-BvOq-W8o.js +1 -0
  12. package/dist/FileText-CqAezJDn.js +1 -0
  13. package/dist/Info-weHV1B4q.js +1 -0
  14. package/dist/MagnifyingGlass-DCAoDH5_.js +1 -0
  15. package/dist/Megaphone-Cir2KHXa.js +1 -0
  16. package/dist/Minus-KBzmC4_K.js +1 -0
  17. package/dist/Moon-hn_oivM6.js +1 -0
  18. package/dist/Plus-D90-H9Ei.js +1 -0
  19. package/dist/Question-BhvEyO0K.js +1 -0
  20. package/dist/SidebarSimple-BXKgNz4l.js +1 -0
  21. package/dist/SortAscending-CEk4rgu_.js +1 -0
  22. package/dist/SortDescending-C0cE7hpU.js +1 -0
  23. package/dist/Sun-C3SaXdLl.js +1 -0
  24. package/dist/Terminal-aKZ6Y9Lk.js +1 -0
  25. package/dist/Warning-DTwF27_O.js +1 -0
  26. package/dist/WarningDiamond-BwpdVJ34.js +1 -0
  27. package/dist/X-BPGjP4b6.js +1 -0
  28. package/dist/accordion-BmDXs1-q.js +1 -0
  29. package/dist/accordion-NpJz3Uer.js +1 -0
  30. package/dist/accordion-parts.d.ts +268 -0
  31. package/dist/accordion-parts.js +1 -0
  32. package/dist/accordion.d.ts +8 -359
  33. package/dist/accordion.js +1 -1
  34. package/dist/agent.json +464 -92
  35. package/dist/alert-DCGSrVTa.js +1 -0
  36. package/dist/{alert-HffaioZM.d.ts → alert-Dz541Ve9.d.ts} +10 -196
  37. package/dist/alert-center-Bb39SBqJ.js +1 -0
  38. package/dist/alert-center-CGBbqO-y.d.ts +391 -0
  39. package/dist/alert-center-parts.d.ts +6 -0
  40. package/dist/alert-center-parts.js +1 -0
  41. package/dist/alert-center.d.ts +9 -590
  42. package/dist/alert-center.js +1 -1
  43. package/dist/alert-dialog-CtKnvX5N.js +1 -0
  44. package/dist/alert-dialog-parts.d.ts +569 -0
  45. package/dist/alert-dialog-parts.js +1 -0
  46. package/dist/alert-dialog.d.ts +3 -1054
  47. package/dist/alert-dialog.js +1 -1
  48. package/dist/alert-parts.d.ts +6 -0
  49. package/dist/alert-parts.js +1 -0
  50. package/dist/alert.d.ts +43 -1
  51. package/dist/alert.js +1 -1
  52. package/dist/anchor-DW5_Gb-1.js +1 -0
  53. package/dist/anchor.d.ts +6 -6
  54. package/dist/anchor.js +1 -1
  55. package/dist/app-layout-D7kwv9su.js +1 -0
  56. package/dist/app-layout-k6UjK30v.d.ts +1167 -0
  57. package/dist/app-layout-parts.d.ts +6 -0
  58. package/dist/app-layout-parts.js +1 -0
  59. package/dist/app-layout.d.ts +98 -1883
  60. package/dist/app-layout.js +1 -1
  61. package/dist/area-chart-C6lKu7Un.d.ts +390 -0
  62. package/dist/area-chart-SAaGaZFD.js +1 -0
  63. package/dist/area-chart-parts.d.ts +6 -0
  64. package/dist/area-chart-parts.js +1 -0
  65. package/dist/area-chart.d.ts +6 -581
  66. package/dist/area-chart.js +1 -1
  67. package/dist/avatar-BMZ81f_5.js +1 -0
  68. package/dist/avatar-Ti8GKSnS.d.ts +201 -0
  69. package/dist/avatar-parts.d.ts +6 -0
  70. package/dist/avatar-parts.js +1 -0
  71. package/dist/avatar.d.ts +5 -277
  72. package/dist/avatar.js +1 -1
  73. package/dist/badge.d.ts +10 -9
  74. package/dist/badge.js +1 -1
  75. package/dist/bar-chart-C0Ra1ZpG.js +1 -0
  76. package/dist/bar-chart-Cb5fA8V7.d.ts +386 -0
  77. package/dist/bar-chart-parts.d.ts +6 -0
  78. package/dist/bar-chart-parts.js +1 -0
  79. package/dist/bar-chart.d.ts +4 -583
  80. package/dist/bar-chart.js +1 -1
  81. package/dist/behaviors-BW8RjkkS.js +1 -0
  82. package/dist/behaviors-BbOq5SFv.js +1 -0
  83. package/dist/behaviors-C7R7ZIoN.js +1 -0
  84. package/dist/behaviors-CHF5PT3C.js +1 -0
  85. package/dist/behaviors-CSZQSSfL.js +1 -0
  86. package/dist/behaviors-CcjvGa0d.js +1 -0
  87. package/dist/behaviors-CnarRd47.js +1 -0
  88. package/dist/behaviors-CoNi6Rd-.js +1 -0
  89. package/dist/behaviors-D9VIyDk1.js +1 -0
  90. package/dist/behaviors-DHVC34f9.js +1 -0
  91. package/dist/behaviors-DkCIgQ8w.js +1 -0
  92. package/dist/behaviors-Mkc_HjTB.js +1 -0
  93. package/dist/breadcrumb-CAzq3SlR.js +1 -0
  94. package/dist/breadcrumb-parts.d.ts +287 -0
  95. package/dist/breadcrumb-parts.js +1 -0
  96. package/dist/breadcrumb.d.ts +65 -555
  97. package/dist/breadcrumb.js +1 -1
  98. package/dist/browser-only-CokCtIvB.js +1 -0
  99. package/dist/browser-only-ymFoM3Ya.js +1 -0
  100. package/dist/browser-only.js +1 -1
  101. package/dist/button-Bqm7U0OC.js +1 -0
  102. package/dist/{button-K0pKc3GN.d.ts → button-C6-6TecO.d.ts} +5 -5
  103. package/dist/{button-BGwOPjGV.d.ts → button-CL17Dxza.d.ts} +28 -25
  104. package/dist/button-CRCiBPEF.js +1 -0
  105. package/dist/{button-Cgf2IcEC.d.ts → button-CRMoQyum.d.ts} +27 -28
  106. package/dist/button-Cr2iY2cI.js +1 -0
  107. package/dist/button-DhoE-BbZ.js +1 -0
  108. package/dist/button.d.ts +3 -3
  109. package/dist/button.js +1 -1
  110. package/dist/calendar-DQtapcSC.js +1 -0
  111. package/dist/calendar.d.ts +1 -1
  112. package/dist/calendar.js +1 -1
  113. package/dist/card-DbtGVKyo.d.ts +129 -0
  114. package/dist/card-parts.d.ts +6 -0
  115. package/dist/card-parts.js +1 -0
  116. package/dist/card.d.ts +3 -228
  117. package/dist/card.js +1 -1
  118. package/dist/centered-layout-parts.d.ts +169 -0
  119. package/dist/centered-layout-parts.js +1 -0
  120. package/dist/centered-layout.d.ts +3 -300
  121. package/dist/centered-layout.js +1 -1
  122. package/dist/chart-B0n2xyYi.js +1 -0
  123. package/dist/chart-BPsMxs1f.js +1 -0
  124. package/dist/chart-BmZoTjRu.js +1 -0
  125. package/dist/chart-Bybyh2Dc.js +1 -0
  126. package/dist/chart-CACfdGlp.d.ts +86 -0
  127. package/dist/chart-CBQJUTIX.js +1 -0
  128. package/dist/chart-Cb0MBaZx.js +1 -0
  129. package/dist/chart-CmMcfDmv.js +1 -0
  130. package/dist/chart-Dlp9FidW.js +2 -0
  131. package/dist/{chart-jitNqimS.d.ts → chart-XvStK-oM.d.ts} +23 -99
  132. package/dist/chart-wTwYzUMJ.js +1 -0
  133. package/dist/checkbox-DH7WFfuR.js +1 -0
  134. package/dist/checkbox-DsVXD96X.js +1 -0
  135. package/dist/checkbox-TX74-Iep.js +1 -0
  136. package/dist/checkbox-group-parts.d.ts +197 -0
  137. package/dist/checkbox-group-parts.js +1 -0
  138. package/dist/checkbox.d.ts +60 -9
  139. package/dist/checkbox.js +1 -1
  140. package/dist/choice-BekuLm-b.d.ts +217 -0
  141. package/dist/choice-DGI8VNR9.d.ts +1 -0
  142. package/dist/choice-PDT386cc.js +1 -0
  143. package/dist/choice-parts.d.ts +7 -0
  144. package/dist/choice-parts.js +1 -0
  145. package/dist/choice.d.ts +63 -1
  146. package/dist/choice.js +1 -1
  147. package/dist/code-UKPv6LVP.js +1 -0
  148. package/dist/{code-block-W3kWPxCJ.js → code-block-B-xD4_RW.js} +1 -1
  149. package/dist/code-block-B7XPzZnp.js +1 -0
  150. package/dist/code-block-BXXceNVo.js +1 -0
  151. package/dist/code-block-C7uzLs8t.js +1 -0
  152. package/dist/{code-block-BGdV4Yty.d.ts → code-block-Cs1Lcmdr.d.ts} +82 -253
  153. package/dist/code-block-Erv7wuWW.d.ts +173 -0
  154. package/dist/code-block-parts.d.ts +380 -0
  155. package/dist/code-block-parts.js +1 -0
  156. package/dist/code-block.d.ts +66 -693
  157. package/dist/code-block.js +6 -6
  158. package/dist/code-block_highlight-utils.d.ts +2 -1
  159. package/dist/code-block_highlight-utils.js +1 -1
  160. package/dist/code.d.ts +4 -4
  161. package/dist/code.js +1 -1
  162. package/dist/combobox-6LXe1cLx.js +1 -0
  163. package/dist/combobox-parts.d.ts +303 -0
  164. package/dist/combobox-parts.js +1 -0
  165. package/dist/combobox.d.ts +5 -468
  166. package/dist/combobox.js +1 -1
  167. package/dist/command-B8L-zjGt.js +1 -0
  168. package/dist/command-CCMWCjAK.js +1 -0
  169. package/dist/command-VKj84zAX.d.ts +859 -0
  170. package/dist/command-cbgO9CiG.js +1 -0
  171. package/dist/command-parts.d.ts +6 -0
  172. package/dist/command-parts.js +1 -0
  173. package/dist/command.d.ts +91 -1135
  174. package/dist/command.js +1 -1
  175. package/dist/compose-refs-BdRUneoc.js +1 -0
  176. package/dist/compose-refs-Ce1vWUz0.js +1 -0
  177. package/dist/cx-CfAFHj5_.js +73 -0
  178. package/dist/cx-DhYnQ07J.js +1 -0
  179. package/dist/cx.d.ts +23 -17
  180. package/dist/cx.js +1 -1
  181. package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
  182. package/dist/data-table-C-FgaN3_.js +1 -0
  183. package/dist/data-table-Cw9dUo1w.js +1 -0
  184. package/dist/data-table-CwqrMtp0.js +1 -0
  185. package/dist/data-table-GUbt8mzo.d.ts +38 -0
  186. package/dist/data-table-parts.d.ts +763 -0
  187. package/dist/data-table-parts.js +1 -0
  188. package/dist/data-table.d.ts +21 -1217
  189. package/dist/data-table.js +1 -1
  190. package/dist/description-list-CjcKOOnr.d.ts +110 -0
  191. package/dist/description-list-parts.d.ts +6 -0
  192. package/dist/description-list-parts.js +1 -0
  193. package/dist/description-list.d.ts +3 -183
  194. package/dist/description-list.js +1 -1
  195. package/dist/dialog-4Ed3U7hz.js +1 -0
  196. package/dist/dialog-BDb_obii.d.ts +166 -0
  197. package/dist/dialog-BaR9D58J.js +1 -0
  198. package/dist/dialog-BkNxAcol.d.ts +467 -0
  199. package/dist/dialog-DSYuhFD5.js +1 -0
  200. package/dist/dialog-fXMCxM9W.js +1 -0
  201. package/dist/dialog-parts.d.ts +6 -0
  202. package/dist/dialog-parts.js +1 -0
  203. package/dist/dialog.d.ts +88 -2
  204. package/dist/dialog.js +1 -1
  205. package/dist/dropdown-menu-BuluRn0Z.js +1 -0
  206. package/dist/dropdown-menu-CDXlp0QT.d.ts +507 -0
  207. package/dist/dropdown-menu-parts.d.ts +6 -0
  208. package/dist/dropdown-menu-parts.js +1 -0
  209. package/dist/dropdown-menu.d.ts +57 -1
  210. package/dist/dropdown-menu.js +1 -1
  211. package/dist/empty-parts.d.ts +120 -0
  212. package/dist/empty-parts.js +1 -0
  213. package/dist/empty.d.ts +2 -216
  214. package/dist/empty.js +1 -1
  215. package/dist/field-BRYypbjO.js +1 -0
  216. package/dist/field-BVMx7HoG.js +1 -0
  217. package/dist/field-BwCq1b9R.js +1 -0
  218. package/dist/field-CYAaNexp.js +1 -0
  219. package/dist/field-DRHAcM1s.js +1 -0
  220. package/dist/field-parts.d.ts +767 -0
  221. package/dist/field-parts.js +1 -0
  222. package/dist/field.d.ts +21 -1201
  223. package/dist/field.js +1 -1
  224. package/dist/flag.d.ts +3 -3
  225. package/dist/flag.js +1 -1
  226. package/dist/float-C_vwTtzU.js +1 -0
  227. package/dist/float-JmSzKDHd.js +1 -0
  228. package/dist/float-OhVY3cf4.js +1 -0
  229. package/dist/hooks-B-Cd15iL.js +1 -0
  230. package/dist/hooks-BP_uqBsI.js +1 -0
  231. package/dist/hooks-BeLOGKwE.js +1 -0
  232. package/dist/hooks-BsOjpTgs.js +1 -0
  233. package/dist/hooks-BybaGF7O.js +1 -0
  234. package/dist/hooks-C9b-2wGy.js +1 -0
  235. package/dist/hooks-CMmpICCH.js +1 -0
  236. package/dist/hooks-CUYIUcp6.js +1 -0
  237. package/dist/hooks-DKbOd_pQ.js +1 -0
  238. package/dist/hooks-DejuqCNF.js +1 -0
  239. package/dist/hooks-GsDfo7Zl.js +1 -0
  240. package/dist/hooks-PsYFJkz2.js +1 -0
  241. package/dist/hooks-lDz_S9UG.js +1 -0
  242. package/dist/hooks.d.ts +126 -17
  243. package/dist/hooks.js +1 -1
  244. package/dist/hover-card-BEC5EQiH.js +1 -0
  245. package/dist/hover-card-parts.d.ts +160 -0
  246. package/dist/hover-card-parts.js +1 -0
  247. package/dist/hover-card.d.ts +9 -281
  248. package/dist/hover-card.js +1 -1
  249. package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
  250. package/dist/icon-0RoVrpGj.js +1 -0
  251. package/dist/icon-BSGMvJ0W.js +1 -0
  252. package/dist/icon-DIiKxRTh.js +1 -0
  253. package/dist/{icon-DXDyhy2N.d.ts → icon-Dqn_LLrR.d.ts} +2 -2
  254. package/dist/{icon-NYvyyRMG.d.ts → icon-KTcDR4--.d.ts} +2 -2
  255. package/dist/icon.d.ts +3 -3
  256. package/dist/icon.js +1 -1
  257. package/dist/icons-CVgj9Whd.js +1 -0
  258. package/dist/icons-D_4cZaL1.js +1 -0
  259. package/dist/icons-DucrvIOa.js +1 -0
  260. package/dist/icons.d.ts +2 -2
  261. package/dist/icons.js +1 -1
  262. package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
  263. package/dist/{index-KJ06KK6t.d.ts → index-CCkilmv8.d.ts} +1 -1
  264. package/dist/input-83xaPZWK.js +1 -0
  265. package/dist/input-B78ah4AB.js +1 -0
  266. package/dist/{input-q8o5uMhW.d.ts → input-Bvpu3ruQ.d.ts} +2 -2
  267. package/dist/input.d.ts +5 -5
  268. package/dist/input.js +1 -1
  269. package/dist/kbd-Bz_Rbpv8.js +1 -0
  270. package/dist/kbd.d.ts +5 -5
  271. package/dist/kbd.js +1 -1
  272. package/dist/{label-r2sJcSQ4.d.ts → label-DZpKu3Pu.d.ts} +8 -8
  273. package/dist/label-DmkAp9xI.js +1 -0
  274. package/dist/label.d.ts +1 -1
  275. package/dist/label.js +1 -1
  276. package/dist/layer-container-DDOZJ0fn.js +1 -0
  277. package/dist/layer-container.d.ts +11 -3
  278. package/dist/layer-container.js +1 -1
  279. package/dist/line-chart-CBL7eCqF.js +1 -0
  280. package/dist/line-chart-CIDFDkyb.d.ts +380 -0
  281. package/dist/line-chart-parts.d.ts +6 -0
  282. package/dist/line-chart-parts.js +1 -0
  283. package/dist/line-chart.d.ts +5 -569
  284. package/dist/line-chart.js +1 -1
  285. package/dist/list-CC3Pi__V.js +1 -0
  286. package/dist/list-Cx4KNfgC.d.ts +286 -0
  287. package/dist/list-FiFQJ0BU.js +1 -0
  288. package/dist/list-parts.d.ts +6 -0
  289. package/dist/list-parts.js +1 -0
  290. package/dist/list.d.ts +9 -406
  291. package/dist/list.js +1 -1
  292. package/dist/live-region-78gbKwlB.js +1 -0
  293. package/dist/live-region.d.ts +2 -2
  294. package/dist/live-region.js +1 -1
  295. package/dist/llms.txt +50 -26
  296. package/dist/main-9d96oUPG.js +1 -0
  297. package/dist/main.d.ts +1 -1
  298. package/dist/main.js +1 -1
  299. package/dist/mantle.css +1304 -910
  300. package/dist/media-object-parts.d.ts +65 -0
  301. package/dist/media-object-parts.js +1 -0
  302. package/dist/media-object.d.ts +5 -121
  303. package/dist/media-object.js +1 -1
  304. package/dist/migrations/0017-select-owned-behavior.yml +117 -0
  305. package/dist/migrations/0018-combobox-owned-behavior.yml +1661 -0
  306. package/dist/migrations/0019-multi-select-owned-behavior.yml +1414 -0
  307. package/dist/migrations/0020-native-floats.yml +823 -0
  308. package/dist/migrations/0021-native-radio-group.yml +397 -0
  309. package/dist/migrations/0024-command-owned-behavior.yml +66 -0
  310. package/dist/migrations/0026-native-dropdown-menu.yml +351 -0
  311. package/dist/migrations/0029-data-attribute-contract.yml +1707 -0
  312. package/dist/migrations/0030-between-variant.yml +1954 -0
  313. package/dist/multi-select-parts.d.ts +487 -0
  314. package/dist/multi-select-parts.js +1 -0
  315. package/dist/multi-select-qC0BuYKD.js +1 -0
  316. package/dist/multi-select.d.ts +6 -803
  317. package/dist/multi-select.js +1 -1
  318. package/dist/otp-input-LPdkb_Fg.js +1 -0
  319. package/dist/otp-input-parts.d.ts +211 -0
  320. package/dist/otp-input-parts.js +1 -0
  321. package/dist/otp-input-zl6MVio6.js +1 -0
  322. package/dist/otp-input.d.ts +11 -252
  323. package/dist/otp-input.js +1 -1
  324. package/dist/overlay-prompt-BIzMQvx7.js +1 -0
  325. package/dist/overlay-prompt-CDnhSoPJ.js +1 -0
  326. package/dist/overlay-prompt.d.ts +57 -0
  327. package/dist/overlay-prompt.js +1 -0
  328. package/dist/pagination-B2ESEbMI.d.ts +171 -0
  329. package/dist/pagination-CxaLKZcE.js +1 -0
  330. package/dist/pagination-Df1gTCN-.js +1 -0
  331. package/dist/pagination-cursor-pagination-parts.d.ts +6 -0
  332. package/dist/pagination-cursor-pagination-parts.js +1 -0
  333. package/dist/pagination.d.ts +39 -304
  334. package/dist/pagination.js +1 -1
  335. package/dist/popover-DOd6zLvE.d.ts +226 -0
  336. package/dist/popover-DWvHbepV.js +1 -0
  337. package/dist/popover-parts.d.ts +6 -0
  338. package/dist/popover-parts.js +1 -0
  339. package/dist/popover.d.ts +60 -2
  340. package/dist/popover.js +1 -1
  341. package/dist/position-Cv3XpSur.d.ts +5 -0
  342. package/dist/progress-BE0c8GW8.js +1 -0
  343. package/dist/progress-ZhFJhv9u.js +1 -0
  344. package/dist/progress-bar-parts.d.ts +86 -0
  345. package/dist/progress-bar-parts.js +1 -0
  346. package/dist/progress-donut-parts.d.ts +94 -0
  347. package/dist/progress-donut-parts.js +1 -0
  348. package/dist/progress-mJQMhxMX.js +1 -0
  349. package/dist/progress-zDpT3TY4.d.ts +2 -0
  350. package/dist/progress.d.ts +4 -268
  351. package/dist/progress.js +1 -1
  352. package/dist/qr-code-0zh10iIE.d.ts +148 -0
  353. package/dist/qr-code-BOOubA9x.js +1 -0
  354. package/dist/qr-code-D8tBKtjP.js +1 -0
  355. package/dist/qr-code-DzJjumoc.d.ts +46 -0
  356. package/dist/qr-code-encoder.browser.d.ts +15 -0
  357. package/dist/qr-code-encoder.browser.js +1 -0
  358. package/dist/qr-code-encoder.d.ts +15 -0
  359. package/dist/qr-code-encoder.js +1 -0
  360. package/dist/qr-code-parts.d.ts +6 -0
  361. package/dist/qr-code-parts.js +1 -0
  362. package/dist/qr-code.d.ts +4 -227
  363. package/dist/qr-code.js +1 -1
  364. package/dist/query-C0e5VYNp.d.ts +440 -0
  365. package/dist/query-V5NifJGs.js +1 -0
  366. package/dist/query-filter.d.ts +6 -6
  367. package/dist/query-filter.js +1 -1
  368. package/dist/query-parts.d.ts +6 -0
  369. package/dist/query-parts.js +1 -0
  370. package/dist/query.d.ts +5 -634
  371. package/dist/query.js +1 -1
  372. package/dist/radio-group-B9jtIbV1.d.ts +39 -0
  373. package/dist/radio-group-BliblUqe.js +1 -0
  374. package/dist/radio-group-f3ThXQCx.js +1 -0
  375. package/dist/radio-group-parts.d.ts +249 -0
  376. package/dist/radio-group-parts.js +1 -0
  377. package/dist/radio-group-zA5DjlLg.js +1 -0
  378. package/dist/radio-group.d.ts +7 -399
  379. package/dist/radio-group.js +1 -1
  380. package/dist/sandbar-Cm2yMjEZ.js +1 -0
  381. package/dist/sandbar-DU4wpKRc.d.ts +345 -0
  382. package/dist/sandbar-parts.d.ts +6 -0
  383. package/dist/sandbar-parts.js +1 -0
  384. package/dist/sandbar.d.ts +6 -441
  385. package/dist/sandbar.js +1 -1
  386. package/dist/sandboxed-on-click-Cg3lewoG.js +1 -0
  387. package/dist/sandboxed-on-click-DOw_Jkhk.js +1 -0
  388. package/dist/sandboxed-on-click.d.ts +1 -1
  389. package/dist/sandboxed-on-click.js +1 -1
  390. package/dist/scatter-plot-1vFxkpjT.js +1 -0
  391. package/dist/scatter-plot-D25jLIVw.d.ts +388 -0
  392. package/dist/scatter-plot-parts.d.ts +6 -0
  393. package/dist/scatter-plot-parts.js +1 -0
  394. package/dist/scatter-plot.d.ts +5 -575
  395. package/dist/scatter-plot.js +1 -1
  396. package/dist/segmented-control-DuiDPKDZ.js +1 -0
  397. package/dist/segmented-control-parts.d.ts +72 -0
  398. package/dist/segmented-control-parts.js +1 -0
  399. package/dist/segmented-control.d.ts +4 -100
  400. package/dist/segmented-control.js +1 -1
  401. package/dist/select-08IEtypH.js +1 -0
  402. package/dist/select-DM2wWfOO.d.ts +478 -0
  403. package/dist/select-parts.d.ts +6 -0
  404. package/dist/select-parts.js +1 -0
  405. package/dist/select.d.ts +63 -1
  406. package/dist/select.js +1 -1
  407. package/dist/selectable-list-Ax5F2Gz1.js +1 -0
  408. package/dist/selectable-list-CyLc3EEt.d.ts +407 -0
  409. package/dist/selectable-list-GcpbbRM1.js +1 -0
  410. package/dist/selectable-list-parts.d.ts +6 -0
  411. package/dist/selectable-list-parts.js +1 -0
  412. package/dist/selectable-list.d.ts +7 -647
  413. package/dist/selectable-list.js +1 -1
  414. package/dist/separator-BB1ohsjn.js +1 -0
  415. package/dist/{separator-QfH0ot5K.d.ts → separator-BzHNVyyv.d.ts} +2 -2
  416. package/dist/separator.d.ts +1 -1
  417. package/dist/separator.js +1 -1
  418. package/dist/sheet-5JgxVaWC.js +1 -0
  419. package/dist/sheet-parts.d.ts +732 -0
  420. package/dist/sheet-parts.js +1 -0
  421. package/dist/sheet-qYPi5MP8.js +1 -0
  422. package/dist/sheet.d.ts +11 -1208
  423. package/dist/sheet.js +1 -1
  424. package/dist/sidebar-CsC9fyPL.js +1 -0
  425. package/dist/sidebar-OBA7L42d.d.ts +1480 -0
  426. package/dist/sidebar-parts.d.ts +6 -0
  427. package/dist/sidebar-parts.js +1 -0
  428. package/dist/sidebar.d.ts +108 -2518
  429. package/dist/sidebar.js +1 -1
  430. package/dist/skeleton-DB0oQyAx.js +1 -0
  431. package/dist/skeleton.d.ts +5 -5
  432. package/dist/skeleton.js +1 -1
  433. package/dist/skip-to-main-link-BGhAWSqB.js +1 -0
  434. package/dist/skip-to-main-link.d.ts +1 -1
  435. package/dist/skip-to-main-link.js +1 -1
  436. package/dist/slider-YlBozcPQ.js +1 -0
  437. package/dist/slider.d.ts +150 -16
  438. package/dist/slider.js +1 -1
  439. package/dist/slot-5ZSmrISx.d.ts +19 -0
  440. package/dist/slot-BxngGBJ2.js +1 -0
  441. package/dist/slot-CBcGhRdV.js +1 -0
  442. package/dist/slot-tuk2J6bY.d.ts +50 -0
  443. package/dist/slot.d.ts +1 -1
  444. package/dist/slot.js +1 -1
  445. package/dist/source-all.css +5 -1
  446. package/dist/split-button-DvJHD7cZ.js +1 -0
  447. package/dist/split-button-parts.d.ts +178 -0
  448. package/dist/split-button-parts.js +1 -0
  449. package/dist/split-button.d.ts +2 -314
  450. package/dist/split-button.js +1 -1
  451. package/dist/strata-parts.d.ts +256 -0
  452. package/dist/strata-parts.js +1 -0
  453. package/dist/strata.d.ts +6 -495
  454. package/dist/strata.js +1 -1
  455. package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
  456. package/dist/switch-DajWYrq3.js +1 -0
  457. package/dist/switch.d.ts +37 -5
  458. package/dist/switch.js +1 -1
  459. package/dist/{table-rWiVWEgB.d.ts → table-C2KnE83u.d.ts} +6 -445
  460. package/dist/table-DJHK48-8.js +1 -0
  461. package/dist/table-parts.d.ts +6 -0
  462. package/dist/table-parts.js +1 -0
  463. package/dist/table.d.ts +81 -1
  464. package/dist/table.js +1 -1
  465. package/dist/tabs-36-4SlRo.js +1 -0
  466. package/dist/tabs-CC_HAqr4.d.ts +193 -0
  467. package/dist/tabs-DayeszXP.js +1 -0
  468. package/dist/tabs-headless-tabs-parts.d.ts +6 -0
  469. package/dist/tabs-headless-tabs-parts.js +1 -0
  470. package/dist/tabs-parts.d.ts +237 -0
  471. package/dist/tabs-parts.js +1 -0
  472. package/dist/tabs.d.ts +43 -420
  473. package/dist/tabs.js +1 -1
  474. package/dist/text-area-D29JTaZg.js +1 -0
  475. package/dist/text-area.d.ts +2 -2
  476. package/dist/text-area.js +1 -1
  477. package/dist/theme-D6rP5Fy8.js +1 -0
  478. package/dist/theme-switcher-PKMCyJxT.js +1 -0
  479. package/dist/theme-switcher.d.ts +26 -22
  480. package/dist/theme-switcher.js +1 -1
  481. package/dist/theme-xoFnLba6.js +1 -0
  482. package/dist/theme.d.ts +84 -77
  483. package/dist/theme.js +1 -1
  484. package/dist/time-zone-CpWYKHdp.js +1 -0
  485. package/dist/time-zone-DZ4hUJ8K.js +1 -0
  486. package/dist/time-zone.d.ts +190 -0
  487. package/dist/time-zone.js +1 -0
  488. package/dist/toast-BJZ__22c.js +1 -0
  489. package/dist/toast-Cb9IN-6e.d.ts +185 -0
  490. package/dist/toast-DM_oq-3E.js +1 -0
  491. package/dist/toast-parts.d.ts +6 -0
  492. package/dist/toast-parts.js +1 -0
  493. package/dist/toast.d.ts +7 -256
  494. package/dist/toast.js +1 -1
  495. package/dist/tokens.dark.json +3026 -0
  496. package/dist/tokens.json +4867 -0
  497. package/dist/tokens.resolver.json +37 -0
  498. package/dist/tooltip-D4HZn19B.js +1 -0
  499. package/dist/tooltip-DP6Lz6jv.d.ts +180 -0
  500. package/dist/tooltip-Uy-kz0rK.d.ts +1 -0
  501. package/dist/tooltip-parts.d.ts +7 -0
  502. package/dist/tooltip-parts.js +1 -0
  503. package/dist/tooltip.d.ts +57 -1
  504. package/dist/tooltip.js +1 -1
  505. package/dist/truncated-text-B5u2AlNg.js +1 -0
  506. package/dist/truncated-text-BoXHP-cD.js +1 -0
  507. package/dist/truncated-text.d.ts +4 -6
  508. package/dist/truncated-text.js +1 -1
  509. package/dist/types.d.ts +1 -1
  510. package/dist/types.js +1 -1
  511. package/dist/typography-C2BmSH12.d.ts +148 -0
  512. package/dist/typography-parts.d.ts +6 -0
  513. package/dist/typography-parts.js +1 -0
  514. package/dist/typography.d.ts +52 -0
  515. package/dist/typography.js +1 -0
  516. package/dist/use-combobox-OhIEVioc.d.ts +23 -0
  517. package/dist/use-float-WEqqhXBE.d.ts +18 -0
  518. package/dist/use-listbox-D4uIonSN.d.ts +1 -0
  519. package/dist/utils-BN3rwHzz.js +1 -0
  520. package/dist/utils-BlLYcYik.js +1 -0
  521. package/dist/utils-C4astHJG.js +1 -0
  522. package/dist/utils-CPSttKPD.js +1 -0
  523. package/dist/{copy-to-clipboard-DInu78k_.js → utils-Dd83caRw.js} +1 -1
  524. package/dist/utils.d.ts +1 -1
  525. package/dist/utils.js +1 -1
  526. package/dist/visually-hidden.d.ts +2 -2
  527. package/dist/visually-hidden.js +1 -1
  528. package/dist/well.d.ts +2 -2
  529. package/dist/well.js +1 -1
  530. package/dist/world-map-BDd3N_Ap.d.ts +424 -0
  531. package/dist/world-map-D3c8Pq-h.js +1 -0
  532. package/dist/world-map-parts.d.ts +6 -0
  533. package/dist/world-map-parts.js +1 -0
  534. package/dist/world-map-t9U-IMKS.js +1 -0
  535. package/dist/world-map.d.ts +80 -0
  536. package/dist/world-map.js +1 -0
  537. package/package.json +30 -19
  538. package/dist/alert-CH99Rw-R.js +0 -1
  539. package/dist/anchor-CgcbWEUs.js +0 -1
  540. package/dist/browser-only-BTSrYWLj.js +0 -1
  541. package/dist/button-69InNC_m.js +0 -1
  542. package/dist/button-BQZ6eoD3.js +0 -1
  543. package/dist/button-BWGUuWnu.js +0 -1
  544. package/dist/button-Cu9e3SM7.js +0 -1
  545. package/dist/chart-BO9EwQ60.js +0 -1
  546. package/dist/chart-CE5Uaqz9.js +0 -1
  547. package/dist/chart-DCTGGlWL.js +0 -1
  548. package/dist/chart-DudCw24t.js +0 -2
  549. package/dist/checkbox-CS504fKk.js +0 -1
  550. package/dist/choice-BwfmbepO.d.ts +0 -405
  551. package/dist/choice-uyYccm0A.js +0 -1
  552. package/dist/clsx-DUGZgXfJ.js +0 -1
  553. package/dist/clsx-Dj3RWZ2l.js +0 -1
  554. package/dist/code-DUJzSl4K.js +0 -1
  555. package/dist/compose-refs-sFdxsL7k.js +0 -1
  556. package/dist/cx-CK7o_rVv.js +0 -1
  557. package/dist/dialog-B9JAGy_x.d.ts +0 -28
  558. package/dist/dialog-CsugEt2A.js +0 -1
  559. package/dist/dialog-DD5H3EH1.d.ts +0 -942
  560. package/dist/dropdown-menu-DHdgaw4P.js +0 -1
  561. package/dist/dropdown-menu-DmDxYPde.d.ts +0 -775
  562. package/dist/field-Bihblt8U.js +0 -1
  563. package/dist/field-CPvjazWN.js +0 -1
  564. package/dist/icon-BudQMD2S.js +0 -1
  565. package/dist/icon-kK0c-POG.js +0 -1
  566. package/dist/icons-4JA-SGfv.js +0 -1
  567. package/dist/icons-CDLz5lpI.js +0 -1
  568. package/dist/icons-CSwTVV2m.js +0 -1
  569. package/dist/input-DHovzBjS.js +0 -1
  570. package/dist/input-DQyN6gN0.js +0 -1
  571. package/dist/interactive-target-BXScNeOr.js +0 -1
  572. package/dist/kbd-CLHsJ99p.js +0 -1
  573. package/dist/label-DmDwzPD8.js +0 -1
  574. package/dist/layer-container-kEQiE4zV.js +0 -1
  575. package/dist/list-CO_yLdln.js +0 -1
  576. package/dist/live-region-DQ1QLv3L.js +0 -1
  577. package/dist/main-CC1L9IsH.js +0 -1
  578. package/dist/popover-BhTFutCz.d.ts +0 -1
  579. package/dist/popover-DxOqLKxy.js +0 -1
  580. package/dist/popover-lwkwWcRW.d.ts +0 -291
  581. package/dist/primitive-Dz9Al-us.js +0 -1
  582. package/dist/radio-group-jj2abc0t.js +0 -1
  583. package/dist/radio-group-sLz5AA9I.d.ts +0 -27
  584. package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
  585. package/dist/select-BqmpVJJT.d.ts +0 -890
  586. package/dist/select-C6Su0dU0.js +0 -1
  587. package/dist/separator-DfzxVutO.js +0 -1
  588. package/dist/shake-DL6WhMXM.js +0 -1
  589. package/dist/sheet-Bd2LIhzF.js +0 -1
  590. package/dist/skeleton-DBpI-ko5.js +0 -1
  591. package/dist/slot-D12N_fZJ.d.ts +0 -67
  592. package/dist/slot-DdYN1L1C.js +0 -1
  593. package/dist/table-CFHiDBW8.js +0 -1
  594. package/dist/theme-DdZgLvKH.js +0 -1
  595. package/dist/tooltip-CpK3XTor.d.ts +0 -283
  596. package/dist/tooltip-b6oiTaWq.js +0 -1
  597. package/dist/use-breakpoint--mo7kr9d.js +0 -1
  598. package/dist/use-callback-ref-BvVyI5K1.js +0 -1
  599. package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
  600. package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
  601. package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
  602. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
  603. package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
  604. package/dist/use-matches-media-query-m860lols.js +0 -1
  605. package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
  606. package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
  607. /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
  608. /package/dist/{radio-group-HDVxTNPi.js → sidebar-HDVxTNPi.js} +0 -0
  609. /package/dist/{direction-CvDpql3O.js → sorting-CvDpql3O.js} +0 -0
  610. /package/dist/{booleanish-BfvnW6vy.js → types-BfvnW6vy.js} +0 -0
  611. /package/dist/{css-properties-D85fCNV3.js → types-D85fCNV3.js} +0 -0
  612. /package/dist/{alternate-announcement-BkH4bOKp.js → utils-BkH4bOKp.js} +0 -0
  613. /package/dist/{in-view-Dxv_GrUU.js → utils-Dxv_GrUU.js} +0 -0
  614. /package/dist/{data-slot-EM6s2WEU.js → utils-EM6s2WEU.js} +0 -0
  615. /package/dist/{cookie-ca4g5CKp.js → utils-ca4g5CKp.js} +0 -0
package/dist/field.d.ts CHANGED
@@ -3,734 +3,39 @@
3
3
  *
4
4
  * @see https://mantle.ngrok.com/components/forms/field
5
5
  */
6
- import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
7
- import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
8
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-BGwOPjGV.js";
9
- import { t as Label } from "./label-r2sJcSQ4.js";
10
- import "./popover-BhTFutCz.js";
11
- import { t as Slot } from "./slot-D12N_fZJ.js";
12
- import { t as Popover } from "./popover-lwkwWcRW.js";
6
+ import * as FieldParts from "./field-parts.js";
13
7
  import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./field-BshcNVe_.js";
14
- import { ComponentProps, ReactElement, ReactNode } from "react";
15
8
  /**
16
- * ARIA and identity props that `Field.Control` applies to the field's
17
- * focusable control. `id` and `name` come from the surrounding `Field.Item`
18
- * so a caller only needs to declare `name` once.
19
- */
20
- type FieldControlAriaProps = {
21
- /**
22
- * IDREFs for helper or error text that describe the focusable control.
23
- */
24
- "aria-describedby"?: string;
25
- /**
26
- * IDREFs for error text that represent the control's current error state.
27
- */
28
- "aria-errormessage"?: string;
29
- /**
30
- * The resolved ARIA invalid state for the focusable control.
31
- */
32
- "aria-invalid"?: ComponentProps<"input">["aria-invalid"];
33
- /**
34
- * Stable DOM id for the focusable control: `Field.Item`'s `id` when set,
35
- * else an id it generates. `Field.Label` uses it as the default `htmlFor`.
36
- */
37
- id?: string;
38
- /**
39
- * Form value identity from `Field.Item`'s required `name` prop.
40
- */
41
- name?: string;
42
- };
43
- /**
44
- * A validation message accepted by `Field.Errors`. Non-string absence values
45
- * are allowed so consumers can pass mapped validator output directly while
46
- * still rendering only real strings.
47
- */
48
- type FieldErrorMessage = string | null | undefined | false;
49
- /**
50
- * Renders a semantic `<fieldset>` for grouping related controls under a
51
- * single accessible name. Resets the default browser fieldset chrome
52
- * (border, padding, `min-width` quirk) so it composes cleanly with
53
- * `Field.Legend` and `Field.Group`. Always renders a real `<fieldset>` so
54
- * the grouping semantics cannot be accidentally removed.
55
- *
56
- * Reach for `Field.Set` when the grouping carries semantic weight — most
57
- * commonly a `RadioGroup` (where the legend names the question the radios
58
- * answer) or a set of related checkboxes. For laying out unrelated fields
59
- * with consistent spacing, prefer `Field.Group` on its own.
60
- *
61
- * @see https://mantle.ngrok.com/components/forms/field
62
- *
63
- * @example
64
- * ```tsx
65
- * <Field.Set>
66
- * <Field.Legend>Notification frequency</Field.Legend>
67
- * <RadioGroup.Root name="frequency" defaultValue="daily">
68
- * <RadioGroup.Item value="daily" id="freq-daily">…</RadioGroup.Item>
69
- * <RadioGroup.Item value="weekly" id="freq-weekly">…</RadioGroup.Item>
70
- * </RadioGroup.Root>
71
- * </Field.Set>
72
- * ```
73
- */
74
- declare const FieldSet: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<"fieldset"> & WithDataSlot) => import("react").JSX.Element;
75
- /**
76
- * The caption for a `Field.Set`. Always renders a semantic `<legend>` styled
77
- * to match the `Label` component so a fieldset reads like a section header,
78
- * and gives screen readers an accessible name for the surrounding group
79
- * (e.g. "Notification frequency, group, Daily").
80
- *
81
- * **Spacing.** Has a default `mb-1.5` so the legend sits 6px above the next
82
- * sibling — matching the figma. We use a margin (not the parent `Field.Set`'s
83
- * flex `gap`) because `<legend>` has special browser rendering inside a
84
- * `<fieldset>` that ignores the parent's flex `gap`. Override the default
85
- * with any `mb-*` utility on `Field.Legend`.
86
- *
87
- * @see https://mantle.ngrok.com/components/forms/field
88
- *
89
- * @example
90
- * ```tsx
91
- * <Field.Set>
92
- * <Field.Legend>Notification frequency</Field.Legend>
93
- * <RadioGroup.Root name="frequency" defaultValue="daily">
94
- * <RadioGroup.Item value="daily" id="freq-daily">…</RadioGroup.Item>
95
- * <RadioGroup.Item value="weekly" id="freq-weekly">…</RadioGroup.Item>
96
- * </RadioGroup.Root>
97
- * </Field.Set>
98
- * ```
99
- */
100
- declare const Legend: ({ className, ref, ...props }: ComponentProps<"legend">) => import("react").JSX.Element;
101
- /**
102
- * Props for `Field.Label`: the Mantle `Label` props without `htmlFor`.
103
- */
104
- type FieldLabelProps = Omit<ComponentProps<typeof Label>, "htmlFor">;
105
- /**
106
- * Caption for a `Field.Item`. Renders the Mantle `Label` with the same
107
- * click-to-focus, disabled, and typography behavior, and always points its
108
- * `htmlFor` at the surrounding `Field.Item`'s control id. `Field.Item` owns
109
- * that id (its `id` prop, else a generated one), `Field.Control` splats it
110
- * onto the focusable child, and `Field.Label` follows it. `htmlFor` is not a
111
- * prop here, so a label and its control cannot drift apart.
112
- *
113
- * Render the focusable element inside `Field.Control` so the id lands on it.
114
- * For a checkbox or switch row, wrap the `Field.Control` in the `Field.Label`;
115
- * the label then also names the control by nesting.
116
- *
117
- * @see https://mantle.ngrok.com/components/forms/field
118
- *
119
- * @example
120
- * ```tsx
121
- * // htmlFor is wired automatically from Field.Item.
122
- * <Field.Item name="apiKey">
123
- * <Field.Label>API key</Field.Label>
124
- * <Field.Control>
125
- * <Input />
126
- * </Field.Control>
127
- * </Field.Item>
128
- *
129
- * // Field.Item's id names the control; the label follows it.
130
- * <Field.Item name="password" id="password">
131
- * <Field.Label>Password</Field.Label>
132
- * <Field.Control>
133
- * <PasswordInput />
134
- * </Field.Control>
135
- * </Field.Item>
136
- *
137
- * // A checkbox row: the label wraps the control.
138
- * <Field.Item name="terms">
139
- * <Field.Label className="flex items-center gap-2">
140
- * <Field.Control>
141
- * <Checkbox />
142
- * </Field.Control>
143
- * Accept terms and conditions
144
- * </Field.Label>
145
- * </Field.Item>
146
- * ```
147
- */
148
- declare const FieldLabel: ({ ref, ...props }: FieldLabelProps) => import("react").JSX.Element;
149
- /**
150
- * Static, label-styled text for a `Field.Item` row that does **not** caption a
151
- * focusable form control. Renders a `<p>` (not a `<label>`) with the same
152
- * typography as `Field.Label`, so a read-only row inside a sheet or details
153
- * panel composes cleanly next to real form fields without misrepresenting
154
- * itself as a control caption.
155
- *
156
- * **When to use**
157
- * - A `Field.Item` row that displays a derived or system-managed value
158
- * (owner, created-at, computed status) where there is no `<input>`,
159
- * `<select>`, `<button>`, or other focusable target to label.
160
- * - Read-only summary rows inside a sheet or detail panel that should
161
- * visually align with sibling `Field.Item`s but have no editable control.
162
- * - Anywhere you would otherwise hand-roll a `<p>` styled to mimic
163
- * `Field.Label` typography — prefer this so intent is explicit at the call site.
164
- *
165
- * **When not to use**
166
- * - The row has a focusable control (input, select, checkbox, switch,
167
- * button trigger). Use `Field.Label` so the click-to-focus and
168
- * accessible-name association are wired correctly.
169
- * - For body copy, section headings, or any text whose typography happens
170
- * to look similar by accident — use the appropriate heading or `<p>`
171
- * directly. `Field.LabelText` exists specifically to slot into the
172
- * `Field.Label` position of a `Field.Item`.
173
- *
174
- * @see https://mantle.ngrok.com/components/forms/field
175
- *
176
- * @example
177
- * ```tsx
178
- * <Field.Item name="owner">
179
- * <Field.LabelText>Owner</Field.LabelText>
180
- * <CredentialOwnerCard owner={owner} />
181
- * <Field.Description>The user or service user that owns this API key.</Field.Description>
182
- * </Field.Item>
183
- * ```
184
- */
185
- declare const LabelText: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ComponentProps<"p"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
186
- /**
187
- * Horizontal layout container for the label area of a field. Aligns a
188
- * `<Field.Label>` (which may contain `Field.Optional`) with adjacent affordances
189
- * like a help-icon `Popover.Trigger` on a shared center line with a tight
190
- * `gap-1`. Center-alignment is used (not baseline) so SVG icon buttons —
191
- * which have no text baseline — sit visually centered next to the label
192
- * text rather than dropping to the box bottom.
193
- *
194
- * Use this when the label needs sibling decorations that can't live inside
195
- * the `<Field.Label>` itself (e.g. an interactive help button — clicking inside a
196
- * `<label>` would forward focus to the associated control). For a label
197
- * with only an `(Optional)` suffix, place `Field.Optional` directly inside
198
- * the `<Field.Label>` instead — no `LabelRow` needed.
199
- *
200
- * @see https://mantle.ngrok.com/components/forms/field
201
- *
202
- * @example
203
- * ```tsx
204
- * <Field.Group>
205
- * <Field.Item name="apiKey">
206
- * <Field.LabelRow>
207
- * <Field.Label>
208
- * API key <Field.Optional />
209
- * </Field.Label>
210
- * <Field.Help>
211
- * <Field.HelpTrigger label="What is an API key?" />
212
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
213
- * </Field.Help>
214
- * </Field.LabelRow>
215
- * <Field.Control>
216
- * <Input />
217
- * </Field.Control>
218
- * <Field.Errors messages={["API key is required."]} />
219
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
220
- * </Field.Item>
221
- * </Field.Group>
222
- * ```
223
- */
224
- declare const LabelRow: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
225
- /**
226
- * Props for the default help popover trigger. A contextual label is required
227
- * so repeated help affordances do not all share the same accessible name.
228
- */
229
- type FieldHelpTriggerProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent" | "label">> & Pick<IconButtonProps, "label"> & {
230
- /**
231
- * The visual style of the trigger button. Optional here —
232
- * `Field.HelpTrigger` defaults to `"ghost"` so the help affordance reads
233
- * as subtle metadata next to the label.
234
- *
235
- * @default "ghost"
236
- */
237
- appearance?: IconButtonAppearance;
238
- /**
239
- * The icon to render inside the trigger button. Defaults to a Phosphor
240
- * `QuestionIcon` so the most common case only needs a contextual label.
241
- */
242
- icon?: ReactNode;
243
- /**
244
- * The tone of the trigger button. Optional here — `Field.HelpTrigger`
245
- * defaults to `"neutral"` because opening contextual help is a routine
246
- * action, and it is the only tone `IconButton` draws.
247
- *
248
- * @default "neutral"
249
- */
250
- intent?: IconButtonIntent;
251
- };
252
- /**
253
- * The trigger for a `Field.Help` popover — a `Popover.Trigger` wired to a
254
- * ghost-appearance `IconButton` with a default Phosphor `QuestionIcon`.
255
- * Requires a contextual screen-reader label, and accepts `icon` or other
256
- * `IconButton` props for visual customization.
257
- *
258
- * Pre-styled with `text-body` (matching the figma) so the icon reads as
259
- * subtle metadata at rest; `IconButton`'s ghost `hover:text-strong` still
260
- * brightens it on interaction. Carries a default `-my-0.5` so the 24px
261
- * `xs` button keeps a full click target while contributing only 20px to
262
- * the `Field.LabelRow` flex line — matching the label's text line-height
263
- * so the label text is not pushed off-center.
264
- *
265
- * @see https://mantle.ngrok.com/components/forms/field
266
- *
267
- * @example
268
- * ```tsx
269
- * <Field.Group>
270
- * <Field.Item name="apiKey">
271
- * <Field.LabelRow>
272
- * <Field.Label>
273
- * API key <Field.Optional />
274
- * </Field.Label>
275
- * <Field.Help>
276
- * <Field.HelpTrigger label="What is an API key?" />
277
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
278
- * </Field.Help>
279
- * </Field.LabelRow>
280
- * <Field.Control>
281
- * <Input />
282
- * </Field.Control>
283
- * <Field.Errors messages={["API key is required."]} />
284
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
285
- * </Field.Item>
286
- * </Field.Group>
287
- * ```
288
- */
289
- declare const HelpTrigger: ({ appearance, className, icon, intent, label, ref, size, type, ...props }: FieldHelpTriggerProps) => import("react").JSX.Element;
290
- /**
291
- * The popover body for a `Field.Help`. Wraps `Popover.Content` so all
292
- * positioning / sizing options (`side`, `align`, `preferredWidth`, etc.)
293
- * work as expected, and overrides the inherited `data-slot` to
294
- * `field-help-content` so consumers can target it as part of a `Field`
295
- * subtree without colliding with other popovers.
296
- *
297
- * @see https://mantle.ngrok.com/components/forms/field
298
- *
299
- * @example
300
- * ```tsx
301
- * <Field.Group>
302
- * <Field.Item name="apiKey">
303
- * <Field.LabelRow>
304
- * <Field.Label>
305
- * API key <Field.Optional />
306
- * </Field.Label>
307
- * <Field.Help>
308
- * <Field.HelpTrigger label="What is an API key?" />
309
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
310
- * </Field.Help>
311
- * </Field.LabelRow>
312
- * <Field.Control>
313
- * <Input />
314
- * </Field.Control>
315
- * <Field.Errors messages={["API key is required."]} />
316
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
317
- * </Field.Item>
318
- * </Field.Group>
319
- * ```
320
- */
321
- declare const HelpContent: ({ "data-slot": dataSlot, ref, ...props }: ComponentProps<typeof Popover.Content> & WithDataSlot) => import("react").JSX.Element;
322
- /**
323
- * Inline "(Optional)" suffix to mark a field as optional. Defaults to the
324
- * literal string `(Optional)` so the common case is `<Field.Optional />` with
325
- * no children — pass children to translate or replace the text. Renders a
326
- * `<span>` in `text-muted` at `text-sm` / `font-normal` so it reads as
327
- * secondary metadata next to the bolder Label text.
328
- *
329
- * Place inside the `<Field.Label>` so screen readers announce it as part of the
330
- * accessible name (e.g. "Email, Optional, edit text"). Pair with a small
331
- * `gap` on the label's flex layout, or rely on the natural inline spacing.
332
- *
333
- * @see https://mantle.ngrok.com/components/forms/field
334
- *
335
- * @example
336
- * ```tsx
337
- * <Field.Group>
338
- * <Field.Item name="apiKey">
339
- * <Field.LabelRow>
340
- * <Field.Label>
341
- * API key <Field.Optional />
342
- * </Field.Label>
343
- * <Field.Help>
344
- * <Field.HelpTrigger label="What is an API key?" />
345
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
346
- * </Field.Help>
347
- * </Field.LabelRow>
348
- * <Field.Control>
349
- * <Input />
350
- * </Field.Control>
351
- * <Field.Errors messages={["API key is required."]} />
352
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
353
- * </Field.Item>
354
- * </Field.Group>
355
- * ```
356
- */
357
- declare const Optional: ({ "data-slot": dataSlot, asChild, children, className, ref, ...props }: ComponentProps<"span"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
358
- /**
359
- * Layout container that stacks multiple `Field.Item`s vertically with
360
- * `gap-4` between them. This is the default way to compose multiple fields
361
- * — most forms only need a `Field.Group` of `Field.Item`s. Reach for
362
- * `Field.Set` + `Field.Legend` only when the grouping carries semantic
363
- * weight (e.g. a `RadioGroup` or related checkboxes).
364
- *
365
- * @see https://mantle.ngrok.com/components/forms/field
366
- *
367
- * @example
368
- * ```tsx
369
- * <Field.Group>
370
- * <Field.Item name="apiKey">
371
- * <Field.LabelRow>
372
- * <Field.Label>
373
- * API key <Field.Optional />
374
- * </Field.Label>
375
- * <Field.Help>
376
- * <Field.HelpTrigger label="What is an API key?" />
377
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
378
- * </Field.Help>
379
- * </Field.LabelRow>
380
- * <Field.Control>
381
- * <Input />
382
- * </Field.Control>
383
- * <Field.Errors messages={["API key is required."]} />
384
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
385
- * </Field.Item>
386
- * </Field.Group>
387
- * ```
388
- */
389
- declare const Group: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
390
- /**
391
- * Props for `Field.Item`.
392
- */
393
- type FieldItemProps = Omit<ComponentProps<"div">, "id"> & WithAsChild & WithValidation & {
394
- /**
395
- * DOM id for the focusable control, not for the wrapping `<div>`.
396
- * `Field.Control` splats it onto the control and `Field.Label` uses it
397
- * as the default `htmlFor`. When omitted, `Field.Item` generates a
398
- * stable id. Set it when a test locator or an anchor link must find the
399
- * control by id.
400
- */
401
- id?: string;
402
- /**
403
- * Form-value name for the field. Required so `Field.Control` can splat
404
- * it onto the focusable child while `Field.Item` owns the stable
405
- * generated control id used by `Field.Label`'s `htmlFor`.
406
- */
407
- name: string;
408
- } & WithDataSlot;
409
- /**
410
- * A single form field — `Label`, a control (`Input`, `Select`, `Checkbox`,
411
- * etc.), and any `Field.Description`, `Field.Errors`, or `Field.ErrorList` siblings stacked
412
- * vertically with a consistent `gap-1.5` so help and error messaging sit
413
- * tightly under the input.
414
- *
415
- * Renders a plain `<div>` — the `<label htmlFor>` ↔ control association
416
- * already carries the right semantics for a single field, so it adds no
417
- * implicit `role`. `Field.Item` owns the contextual description/error IDs
418
- * that `Field.Control` applies to the focusable control. Rendered errors
419
- * infer an `"error"` validation state unless `validation` is supplied as an
420
- * explicit override.
421
- *
422
- * **Server rendering.** The inference runs on the client, so the inferred
423
- * `"error"` state applies after hydration. Before that, the server HTML
424
- * carries the error list but no `aria-invalid="true"`, `aria-errormessage`, or
425
- * `data-validation="error"`. When an error can render on the server, set
426
- * `validation={messages.length > 0 && "error"}` on `Field.Item`: an explicit
427
- * `validation` reaches the server HTML.
428
- *
429
- * **Control id.** `Field.Item` owns the control's DOM id, so its `id` prop
430
- * names the control, not the wrapping `<div>`. It generates one by default;
431
- * pass `id` to set it yourself, and both `Field.Control` and `Field.Label`
432
- * follow it. An `id` on the control element itself is overwritten.
433
- *
434
- * **Single-slot constraint.** A `Field.Item` owns one description ID and one
435
- * errors ID, so render at most one `Field.Description` and one
436
- * `Field.Errors` *or* `Field.ErrorList` (not both) per item. A second instance
437
- * would duplicate the slot `id` in the DOM. Pass multiple messages to
438
- * `Field.Errors`, or multiple `Field.ErrorItem` children to `Field.ErrorList`,
439
- * instead.
440
- *
441
- * @see https://mantle.ngrok.com/components/forms/field
442
- *
443
- * @example
444
- * ```tsx
445
- * <Field.Group>
446
- * <Field.Item name="apiKey">
447
- * <Field.LabelRow>
448
- * <Field.Label>
449
- * API key <Field.Optional />
450
- * </Field.Label>
451
- * <Field.Help>
452
- * <Field.HelpTrigger label="What is an API key?" />
453
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
454
- * </Field.Help>
455
- * </Field.LabelRow>
456
- * <Field.Control>
457
- * <Input />
458
- * </Field.Control>
459
- * <Field.Errors messages={["API key is required."]} />
460
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
461
- * </Field.Item>
462
- * </Field.Group>
463
- * ```
464
- */
465
- declare const Item: ({ "data-slot": dataSlot, asChild, children, className, id: idProp, name, ref, validation: validationProp, ...props }: FieldItemProps) => import("react").JSX.Element;
466
- type FieldControlSlotProps = Omit<ComponentProps<typeof Slot>, "aria-describedby" | "aria-errormessage" | "aria-invalid" | "children" | "id">;
467
- /**
468
- * Element-child form of `Field.Control`. Renders via `Slot`, so it accepts
469
- * any HTML/Slot props, including `ref` — those land on the single child
470
- * element along with the generated ARIA props. `id` is not a prop here;
471
- * `Field.Item` owns the control id.
472
- */
473
- type FieldControlElementProps = FieldControlSlotProps & {
474
- /**
475
- * A single control element to receive the field ARIA props.
476
- */
477
- children: ReactElement;
478
- };
479
- /**
480
- * Render-prop form of `Field.Control`. The caller owns the rendered element,
481
- * so `Field.Control` itself renders nothing — extra DOM props and `ref` have
482
- * no element to attach to and are intentionally not part of this variant.
483
- * Slot props are marked `never` so passing e.g. `className` alongside a
484
- * render-prop child is a type error rather than a silently ignored prop.
9
+ * Shapes commonly found in `field.state.meta.errors` from TanStack React Form
10
+ * across its built-in validators (Standard Schema / Zod issues, raw strings,
11
+ * thrown `Error` instances) plus the falsy slots Standard Schema can produce.
485
12
  */
486
- type FieldControlRenderProps = {
487
- /**
488
- * A render function that places the field ARIA props onto a control of
489
- * the caller's choosing. Used for compound controls or wrappers where
490
- * `Slot` cannot reach the focusable element.
491
- */
492
- children: (props: FieldControlAriaProps) => ReactNode;
493
- } & { [K in keyof FieldControlSlotProps]?: never; };
13
+ type FieldError = {
14
+ readonly message?: string | undefined;
15
+ } | string | null | undefined | false;
494
16
  /**
495
- * Props for `Field.Control`. A discriminated union over how the caller
496
- * supplies the focusable element:
17
+ * Reduce a TanStack React Form field's `meta.errors` array (or any array of
18
+ * mixed string / `{ message }` / nullish error entries) to a clean `string[]`
19
+ * for passing directly to `Field.Errors`' `messages` prop.
497
20
  *
498
- * - `FieldControlElementProps` — pass a single React element child and
499
- * `Field.Control` clones the generated ARIA props onto it via `Slot`.
500
- * Accepts the full Slot prop surface, including `ref`.
501
- * - `FieldControlRenderProps` — pass a render function that receives the
502
- * ARIA props and places them on a control of the caller's choosing. The
503
- * caller owns the rendered element, so DOM/Slot props and `ref` are
504
- * excluded from this variant at the type level.
21
+ * Handles the shapes TanStack form yields for Zod, Standard Schema, and
22
+ * thrown `Error` validators: items may be strings, objects with `.message`,
23
+ * `undefined`, `null`, or `false`. Empty / whitespace-only messages are
24
+ * dropped and duplicate messages are collapsed so callers don't have to filter
25
+ * again.
505
26
  *
506
27
  * @example
507
28
  * ```tsx
508
- * // Element form — Slot splats id, name, and ARIA props onto <Input/>
509
- * <Field.Item name="email">
510
- * <Field.Control>
511
- * <Input type="email" />
512
- * </Field.Control>
513
- * </Field.Item>
514
- *
515
- * // Render-prop form — caller spreads the props onto its own element
516
- * <Field.Item name="acceptTerms">
29
+ * <Field.Item name={field.name}>
30
+ * <Field.Label>Email</Field.Label>
517
31
  * <Field.Control>
518
- * {(controlProps) => (
519
- * <label>
520
- * Accept terms
521
- * <input type="checkbox" {...controlProps} />
522
- * </label>
523
- * )}
32
+ * <Input value={field.state.value} />
524
33
  * </Field.Control>
34
+ * <Field.Errors messages={toErrorMessages(field.state.meta.errors)} />
525
35
  * </Field.Item>
526
36
  * ```
527
37
  */
528
- type FieldControlProps = FieldControlElementProps | FieldControlRenderProps;
529
- /**
530
- * Applies `Field.Item` description, error, and validation state to a single
531
- * focusable control. It always behaves like an `asChild` slot: pass one child
532
- * element to receive the generated ARIA props, or use a function child to
533
- * place those props manually. Mantle compound controls that consume
534
- * `FieldControlContext` can be wrapped at the root when their docs show that
535
- * composition; otherwise use the render-prop form to place the generated props
536
- * on the actual focusable element.
537
- *
538
- * `Field.Item` owns the full control contract — `id`, `name`, `aria-*`, and
539
- * `validation` all flow down from the surrounding `Field.Item` and overwrite
540
- * anything passed on the child. To override these values, set them on
541
- * `Field.Item` itself (`<Field.Item id="password">`,
542
- * `<Field.Item validation="error">`); to opt out of the contract entirely,
543
- * render your control without `Field.Control`.
544
- *
545
- * @see https://mantle.ngrok.com/components/forms/field
546
- *
547
- * @example
548
- * ```tsx
549
- * <Field.Group>
550
- * <Field.Item name="apiKey">
551
- * <Field.LabelRow>
552
- * <Field.Label>
553
- * API key <Field.Optional />
554
- * </Field.Label>
555
- * <Field.Help>
556
- * <Field.HelpTrigger label="What is an API key?" />
557
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
558
- * </Field.Help>
559
- * </Field.LabelRow>
560
- * <Field.Control>
561
- * <Input />
562
- * </Field.Control>
563
- * <Field.Errors messages={["API key is required."]} />
564
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
565
- * </Field.Item>
566
- * </Field.Group>
567
- * ```
568
- */
569
- declare const Control: ({ children, ref, ...props }: FieldControlProps) => import("react").JSX.Element;
570
- /**
571
- * Helper / hint text. Renders a `<p>` in the muted body color so it reads
572
- * as secondary to the bolder content above it. Use inside `Field.Item`, below
573
- * the control, to clarify expected format or constraints for that single field.
574
- *
575
- * **At most one per `Field.Item`.** `Field.Item` owns a single description
576
- * slot ID and applies it via context, so a second `Field.Description` would
577
- * duplicate that `id` in the DOM.
578
- *
579
- * **Auto-tighten.** When this description sits directly after rendered
580
- * `Field.Errors` or `Field.ErrorList` output, the parent's `gap-1.5`
581
- * collapses via a matching negative top margin so error list + helper read as
582
- * one tight block. Pass any margin utility (`mt-1`, `mt-0`, etc.) to override
583
- * — the rule's specificity is flattened to `(0,1,0)` so a single user class wins.
584
- *
585
- * @see https://mantle.ngrok.com/components/forms/field
586
- *
587
- * @example
588
- * ```tsx
589
- * <Field.Group>
590
- * <Field.Item name="apiKey">
591
- * <Field.LabelRow>
592
- * <Field.Label>
593
- * API key <Field.Optional />
594
- * </Field.Label>
595
- * <Field.Help>
596
- * <Field.HelpTrigger label="What is an API key?" />
597
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
598
- * </Field.Help>
599
- * </Field.LabelRow>
600
- * <Field.Control>
601
- * <Input />
602
- * </Field.Control>
603
- * <Field.Errors messages={["API key is required."]} />
604
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
605
- * </Field.Item>
606
- * </Field.Group>
607
- * ```
608
- */
609
- declare const Description: ({ "data-slot": dataSlot, asChild, className, ref, ...props }: Omit<ComponentProps<"p">, "id"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
610
- /**
611
- * A single error message list item for a field. Renders an `<li>` in
612
- * `text-danger-600` so it stands out from a sibling `Field.Description`.
613
- * Must be rendered inside a `Field.ErrorList`. Empty or blank children render
614
- * nothing so message-less validator results do not produce empty list items.
615
- *
616
- * @see https://mantle.ngrok.com/components/forms/field
617
- *
618
- * @example
619
- * ```tsx
620
- * <Field.Group>
621
- * <Field.Item name="username">
622
- * <Field.Label>Username</Field.Label>
623
- * <Field.Control>
624
- * <Input />
625
- * </Field.Control>
626
- * <Field.ErrorList>
627
- * <Field.ErrorItem>Must be at least 3 characters.</Field.ErrorItem>
628
- * <Field.ErrorItem>Use letters, numbers, hyphens, or underscores.</Field.ErrorItem>
629
- * </Field.ErrorList>
630
- * <Field.Description>Pick something memorable.</Field.Description>
631
- * </Field.Item>
632
- * </Field.Group>
633
- * ```
634
- */
635
- declare const FieldErrorItem: ({ "data-slot": dataSlot, children, className, ref, ...props }: ComponentProps<"li"> & WithDataSlot) => import("react").JSX.Element | null;
636
- /**
637
- * Props for the `Field.Errors` convenience renderer. It owns its generated
638
- * children, so use `Field.ErrorList` / `Field.ErrorItem` directly when custom
639
- * list contents or polymorphic list markup are needed.
640
- */
641
- type FieldErrorsProps = Omit<ComponentProps<"ul">, "children" | "id"> & {
642
- /**
643
- * Validation messages to render. Strings are trimmed, and empty, nullish,
644
- * or false values are ignored before rendering the list.
645
- */
646
- messages?: readonly FieldErrorMessage[];
647
- };
648
- /**
649
- * Convenience renderer for string validation messages. Trims each message,
650
- * filters empty values, and renders a semantic `Field.ErrorList` containing
651
- * one `Field.ErrorItem` per remaining message.
652
- *
653
- * Accepts strings directly so product code can map any validation library's
654
- * error shape into messages without coupling Mantle to that library.
655
- * Deliberately does not support `asChild` because it owns the generated list
656
- * items; use `Field.ErrorList` with `asChild` for custom list markup.
657
- *
658
- * **At most one per `Field.Item`.** `Field.Errors` renders a `Field.ErrorList`
659
- * under the hood, and `Field.Item` owns a single errors slot ID. Use either
660
- * `Field.Errors` *or* `Field.ErrorList` per item, not both, and pass multiple
661
- * messages to one `Field.Errors` instead of rendering it twice.
662
- *
663
- * **Server rendering.** The `"error"` state this list infers applies after
664
- * hydration. The server HTML carries the list but not the invalid state. When
665
- * the messages can render on the server, set
666
- * `validation={messages.length > 0 && "error"}` on `Field.Item`.
667
- *
668
- * @see https://mantle.ngrok.com/components/forms/field
669
- *
670
- * @example
671
- * ```tsx
672
- * <Field.Group>
673
- * <Field.Item name="apiKey">
674
- * <Field.LabelRow>
675
- * <Field.Label>
676
- * API key <Field.Optional />
677
- * </Field.Label>
678
- * <Field.Help>
679
- * <Field.HelpTrigger label="What is an API key?" />
680
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
681
- * </Field.Help>
682
- * </Field.LabelRow>
683
- * <Field.Control>
684
- * <Input />
685
- * </Field.Control>
686
- * <Field.Errors messages={["API key is required."]} />
687
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
688
- * </Field.Item>
689
- * </Field.Group>
690
- * ```
691
- */
692
- declare const FieldErrors: ({ messages, ref, ...props }: FieldErrorsProps) => import("react").JSX.Element;
693
- /**
694
- * Wraps one or more `Field.ErrorItem` children in a semantic `<ul>` with
695
- * `role="list"` so a list of validation errors is announced as a list by
696
- * screen readers, including Safari/VoiceOver combinations that drop list
697
- * semantics when list styling is removed. Renders nothing when no children are
698
- * passed, or when all `Field.ErrorItem` children are empty.
699
- *
700
- * The list strips its default browser styling (`list-none`, `p-0`, `m-0`) and
701
- * stacks items as a flex column with no gap so consecutive errors read as a
702
- * single tight block.
703
- *
704
- * **At most one per `Field.Item`.** `Field.Item` owns a single errors slot ID
705
- * and applies it via context. Use either `Field.ErrorList` *or* `Field.Errors`
706
- * per item, not both, and put multiple `Field.ErrorItem` children inside the
707
- * single list instead of rendering two `Field.ErrorList`s.
708
- *
709
- * **Server rendering.** The `"error"` state this list infers applies after
710
- * hydration. The server HTML carries the list but not the invalid state. When
711
- * the items can render on the server, set
712
- * `validation={errors.length > 0 && "error"}` on `Field.Item`.
713
- *
714
- * @see https://mantle.ngrok.com/components/forms/field
715
- *
716
- * @example
717
- * ```tsx
718
- * <Field.Group>
719
- * <Field.Item name="username">
720
- * <Field.Label>Username</Field.Label>
721
- * <Field.Control>
722
- * <Input />
723
- * </Field.Control>
724
- * <Field.ErrorList>
725
- * <Field.ErrorItem>Must be at least 3 characters.</Field.ErrorItem>
726
- * <Field.ErrorItem>Use letters, numbers, hyphens, or underscores.</Field.ErrorItem>
727
- * </Field.ErrorList>
728
- * <Field.Description>Pick something memorable.</Field.Description>
729
- * </Field.Item>
730
- * </Field.Group>
731
- * ```
732
- */
733
- declare const FieldErrorList: ({ "data-slot": dataSlot, asChild, children, className, ref, ...props }: Omit<ComponentProps<"ul">, "id"> & WithAsChild & WithDataSlot) => import("react").JSX.Element | null;
38
+ declare const toErrorMessages: (errors: readonly FieldError[] | null | undefined) => string[];
734
39
  /**
735
40
  * Compound component for semantic, accessible form fields. Composes a
736
41
  * `Field.Label`, control (`Input`, `Select`, etc.), `Field.Description`, and
@@ -788,490 +93,5 @@ declare const FieldErrorList: ({ "data-slot": dataSlot, asChild, children, class
788
93
  * </Field.Group>
789
94
  * ```
790
95
  */
791
- declare const Field: {
792
- /**
793
- * A single form field. Passes message IDs and validation state to
794
- * `Field.Control`; rendered errors infer `"error"` validation.
795
- *
796
- * The inferred state applies after hydration. For a server-rendered error,
797
- * set `validation` on `Field.Item`.
798
- *
799
- * @see https://mantle.ngrok.com/components/forms/field
800
- *
801
- * @example
802
- * ```tsx
803
- * <Field.Group>
804
- * <Field.Item name="apiKey">
805
- * <Field.LabelRow>
806
- * <Field.Label>
807
- * API key <Field.Optional />
808
- * </Field.Label>
809
- * <Field.Help>
810
- * <Field.HelpTrigger label="What is an API key?" />
811
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
812
- * </Field.Help>
813
- * </Field.LabelRow>
814
- * <Field.Control>
815
- * <Input />
816
- * </Field.Control>
817
- * <Field.Errors messages={["API key is required."]} />
818
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
819
- * </Field.Item>
820
- * </Field.Group>
821
- * ```
822
- */
823
- readonly Item: typeof Item;
824
- /**
825
- * Applies generated field ARIA props and validation state to a single
826
- * focusable control. Accepts either a single React element child (cloned
827
- * via `Slot`) or a render-prop child that receives the ARIA props for
828
- * cases where `Slot` cannot reach the focusable element — for example a
829
- * `<label>`-wrapped native checkbox, or a third-party component that
830
- * needs the props placed manually on an inner input.
831
- *
832
- * @see https://mantle.ngrok.com/components/forms/field
833
- *
834
- * @example
835
- * ```tsx
836
- * // Element child — Slot splats id, name, and ARIA props onto <Input/>.
837
- * <Field.Item name="apiKey">
838
- * <Field.Label>API key</Field.Label>
839
- * <Field.Control>
840
- * <Input />
841
- * </Field.Control>
842
- * <Field.Errors messages={["API key is required."]} />
843
- * </Field.Item>
844
- * ```
845
- *
846
- * @example
847
- * ```tsx
848
- * // Render-prop child — caller spreads the props onto an inner element
849
- * // when the focusable target is nested (e.g. inside a <label>).
850
- * <Field.Item name="acceptTerms">
851
- * <Field.Control>
852
- * {(controlProps) => (
853
- * <label>
854
- * Accept terms
855
- * <input type="checkbox" {...controlProps} />
856
- * </label>
857
- * )}
858
- * </Field.Control>
859
- * <Field.Errors messages={["You must accept the terms."]} />
860
- * </Field.Item>
861
- * ```
862
- */
863
- readonly Control: typeof Control;
864
- /**
865
- * Layout container that stacks multiple `Field.Item`s vertically.
866
- *
867
- * @see https://mantle.ngrok.com/components/forms/field
868
- *
869
- * @example
870
- * ```tsx
871
- * <Field.Group>
872
- * <Field.Item name="apiKey">
873
- * <Field.LabelRow>
874
- * <Field.Label>
875
- * API key <Field.Optional />
876
- * </Field.Label>
877
- * <Field.Help>
878
- * <Field.HelpTrigger label="What is an API key?" />
879
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
880
- * </Field.Help>
881
- * </Field.LabelRow>
882
- * <Field.Control>
883
- * <Input />
884
- * </Field.Control>
885
- * <Field.Errors messages={["API key is required."]} />
886
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
887
- * </Field.Item>
888
- * </Field.Group>
889
- * ```
890
- */
891
- readonly Group: typeof Group;
892
- /**
893
- * Semantic `<fieldset>` for related controls that share one accessible
894
- * name from `Field.Legend`.
895
- *
896
- * @see https://mantle.ngrok.com/components/forms/field
897
- *
898
- * @example
899
- * ```tsx
900
- * <Field.Set>
901
- * <Field.Legend>Notification frequency</Field.Legend>
902
- * <RadioGroup.Root name="frequency" defaultValue="daily">
903
- * <RadioGroup.Item value="daily" id="freq-daily">…</RadioGroup.Item>
904
- * <RadioGroup.Item value="weekly" id="freq-weekly">…</RadioGroup.Item>
905
- * </RadioGroup.Root>
906
- * </Field.Set>
907
- * ```
908
- */
909
- readonly Set: typeof FieldSet;
910
- /**
911
- * Caption for `Field.Set`. Renders a semantic `<legend>`.
912
- *
913
- * @see https://mantle.ngrok.com/components/forms/field
914
- *
915
- * @example
916
- * ```tsx
917
- * <Field.Set>
918
- * <Field.Legend>Notification frequency</Field.Legend>
919
- * <RadioGroup.Root name="frequency" defaultValue="daily">
920
- * <RadioGroup.Item value="daily" id="freq-daily">…</RadioGroup.Item>
921
- * <RadioGroup.Item value="weekly" id="freq-weekly">…</RadioGroup.Item>
922
- * </RadioGroup.Root>
923
- * </Field.Set>
924
- * ```
925
- */
926
- readonly Legend: typeof Legend;
927
- /**
928
- * The Mantle `Label`, exposed on `Field` for field composition. Its
929
- * `htmlFor` always points at the surrounding `Field.Item`'s control id, the
930
- * same id `Field.Control` splats onto its focusable child, so the
931
- * label-to-control association needs no `htmlFor` / `id` pair by hand.
932
- * `htmlFor` is not a prop; set `id` on `Field.Item` to choose the id.
933
- *
934
- * @see https://mantle.ngrok.com/components/forms/field#fieldlabel
935
- *
936
- * @example
937
- * ```tsx
938
- * // htmlFor is wired automatically from Field.Item.
939
- * <Field.Group>
940
- * <Field.Item name="apiKey">
941
- * <Field.LabelRow>
942
- * <Field.Label>
943
- * API key <Field.Optional />
944
- * </Field.Label>
945
- * <Field.Help>
946
- * <Field.HelpTrigger label="What is an API key?" />
947
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
948
- * </Field.Help>
949
- * </Field.LabelRow>
950
- * <Field.Control>
951
- * <Input />
952
- * </Field.Control>
953
- * <Field.Errors messages={["API key is required."]} />
954
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
955
- * </Field.Item>
956
- * </Field.Group>
957
- * ```
958
- */
959
- readonly Label: typeof FieldLabel;
960
- /**
961
- * Static, label-styled text for a `Field.Item` row that has no focusable
962
- * control to caption. Renders a `<p>` with the same typography as
963
- * `Field.Label`, so a read-only row composes cleanly alongside real form
964
- * fields without misrepresenting itself as a control caption.
965
- *
966
- * Use for derived / system-managed values (owner, created-at, computed
967
- * status) inside sheets or detail panels. For rows with a real control,
968
- * use `Field.Label` instead so the label-to-control association is wired.
969
- *
970
- * @see https://mantle.ngrok.com/components/forms/field
971
- *
972
- * @example
973
- * ```tsx
974
- * <Field.Item name="owner">
975
- * <Field.LabelText>Owner</Field.LabelText>
976
- * <CredentialOwnerCard owner={owner} />
977
- * <Field.Description>The user or service user that owns this API key.</Field.Description>
978
- * </Field.Item>
979
- * ```
980
- */
981
- readonly LabelText: typeof LabelText;
982
- /**
983
- * Horizontal layout container for the label area of a field. Aligns a
984
- * `<Field.Label>` (which may contain `Field.Optional`) with adjacent affordances
985
- * like a help-icon `Popover.Trigger` on a shared center line with `gap-1`.
986
- *
987
- * @see https://mantle.ngrok.com/components/forms/field
988
- *
989
- * @example
990
- * ```tsx
991
- * <Field.Group>
992
- * <Field.Item name="apiKey">
993
- * <Field.LabelRow>
994
- * <Field.Label>
995
- * API key <Field.Optional />
996
- * </Field.Label>
997
- * <Field.Help>
998
- * <Field.HelpTrigger label="What is an API key?" />
999
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1000
- * </Field.Help>
1001
- * </Field.LabelRow>
1002
- * <Field.Control>
1003
- * <Input />
1004
- * </Field.Control>
1005
- * <Field.Errors messages={["API key is required."]} />
1006
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1007
- * </Field.Item>
1008
- * </Field.Group>
1009
- * ```
1010
- */
1011
- readonly LabelRow: typeof LabelRow;
1012
- /**
1013
- * `Popover.Root` re-export for the help-affordance pattern. Pair with
1014
- * `Field.HelpTrigger` and `Field.HelpContent` to drop a `?` button next to
1015
- * a label without manually composing Popover + IconButton + QuestionIcon.
1016
- *
1017
- * @see https://mantle.ngrok.com/components/forms/field
1018
- *
1019
- * @example
1020
- * ```tsx
1021
- * <Field.Group>
1022
- * <Field.Item name="apiKey">
1023
- * <Field.LabelRow>
1024
- * <Field.Label>
1025
- * API key <Field.Optional />
1026
- * </Field.Label>
1027
- * <Field.Help>
1028
- * <Field.HelpTrigger label="What is an API key?" />
1029
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1030
- * </Field.Help>
1031
- * </Field.LabelRow>
1032
- * <Field.Control>
1033
- * <Input />
1034
- * </Field.Control>
1035
- * <Field.Errors messages={["API key is required."]} />
1036
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1037
- * </Field.Item>
1038
- * </Field.Group>
1039
- * ```
1040
- */
1041
- readonly Help: import("react").FC<import("@radix-ui/react-popover").PopoverProps>;
1042
- /**
1043
- * Trigger for a `Field.Help` popover — a ghost `IconButton` with a default
1044
- * `QuestionIcon`. Requires a contextual `label`; pass `icon` to swap the
1045
- * glyph, or other `IconButton` props (`size`, `appearance`, etc.) to customize.
1046
- *
1047
- * @see https://mantle.ngrok.com/components/forms/field
1048
- *
1049
- * @example
1050
- * ```tsx
1051
- * <Field.Group>
1052
- * <Field.Item name="apiKey">
1053
- * <Field.LabelRow>
1054
- * <Field.Label>
1055
- * API key <Field.Optional />
1056
- * </Field.Label>
1057
- * <Field.Help>
1058
- * <Field.HelpTrigger label="What is an API key?" />
1059
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1060
- * </Field.Help>
1061
- * </Field.LabelRow>
1062
- * <Field.Control>
1063
- * <Input />
1064
- * </Field.Control>
1065
- * <Field.Errors messages={["API key is required."]} />
1066
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1067
- * </Field.Item>
1068
- * </Field.Group>
1069
- * ```
1070
- */
1071
- readonly HelpTrigger: typeof HelpTrigger;
1072
- /**
1073
- * Body of a `Field.Help` popover. Re-exports `Popover.Content` so all
1074
- * positioning / sizing options (`side`, `align`, `preferredWidth`, etc.)
1075
- * work as expected.
1076
- *
1077
- * @see https://mantle.ngrok.com/components/forms/field
1078
- *
1079
- * @example
1080
- * ```tsx
1081
- * <Field.Group>
1082
- * <Field.Item name="apiKey">
1083
- * <Field.LabelRow>
1084
- * <Field.Label>
1085
- * API key <Field.Optional />
1086
- * </Field.Label>
1087
- * <Field.Help>
1088
- * <Field.HelpTrigger label="What is an API key?" />
1089
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1090
- * </Field.Help>
1091
- * </Field.LabelRow>
1092
- * <Field.Control>
1093
- * <Input />
1094
- * </Field.Control>
1095
- * <Field.Errors messages={["API key is required."]} />
1096
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1097
- * </Field.Item>
1098
- * </Field.Group>
1099
- * ```
1100
- */
1101
- readonly HelpContent: typeof HelpContent;
1102
- /**
1103
- * Inline "(Optional)" suffix to mark a field as optional. Default content
1104
- * is `(Optional)`; pass children to translate or replace it. Place inside
1105
- * the `<Field.Label>` so screen readers announce it as part of the accessible
1106
- * name.
1107
- *
1108
- * @see https://mantle.ngrok.com/components/forms/field
1109
- *
1110
- * @example
1111
- * ```tsx
1112
- * <Field.Group>
1113
- * <Field.Item name="apiKey">
1114
- * <Field.LabelRow>
1115
- * <Field.Label>
1116
- * API key <Field.Optional />
1117
- * </Field.Label>
1118
- * <Field.Help>
1119
- * <Field.HelpTrigger label="What is an API key?" />
1120
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1121
- * </Field.Help>
1122
- * </Field.LabelRow>
1123
- * <Field.Control>
1124
- * <Input />
1125
- * </Field.Control>
1126
- * <Field.Errors messages={["API key is required."]} />
1127
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1128
- * </Field.Item>
1129
- * </Field.Group>
1130
- * ```
1131
- */
1132
- readonly Optional: typeof Optional;
1133
- /**
1134
- * Helper / hint text rendered below the control in the muted body color.
1135
- *
1136
- * @see https://mantle.ngrok.com/components/forms/field
1137
- *
1138
- * @example
1139
- * ```tsx
1140
- * <Field.Group>
1141
- * <Field.Item name="apiKey">
1142
- * <Field.LabelRow>
1143
- * <Field.Label>
1144
- * API key <Field.Optional />
1145
- * </Field.Label>
1146
- * <Field.Help>
1147
- * <Field.HelpTrigger label="What is an API key?" />
1148
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1149
- * </Field.Help>
1150
- * </Field.LabelRow>
1151
- * <Field.Control>
1152
- * <Input />
1153
- * </Field.Control>
1154
- * <Field.Errors messages={["API key is required."]} />
1155
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1156
- * </Field.Item>
1157
- * </Field.Group>
1158
- * ```
1159
- */
1160
- readonly Description: typeof Description;
1161
- /**
1162
- * Convenience renderer for validation messages. Trims string messages,
1163
- * filters empty values, and renders a `Field.ErrorList` with one
1164
- * `Field.ErrorItem` for each remaining message.
1165
- *
1166
- * The inferred `"error"` state applies after hydration. For a
1167
- * server-rendered error, set `validation` on `Field.Item`.
1168
- *
1169
- * @see https://mantle.ngrok.com/components/forms/field
1170
- *
1171
- * @example
1172
- * ```tsx
1173
- * <Field.Group>
1174
- * <Field.Item name="apiKey">
1175
- * <Field.LabelRow>
1176
- * <Field.Label>
1177
- * API key <Field.Optional />
1178
- * </Field.Label>
1179
- * <Field.Help>
1180
- * <Field.HelpTrigger label="What is an API key?" />
1181
- * <Field.HelpContent>Copy this from the dashboard.</Field.HelpContent>
1182
- * </Field.Help>
1183
- * </Field.LabelRow>
1184
- * <Field.Control>
1185
- * <Input />
1186
- * </Field.Control>
1187
- * <Field.Errors messages={["API key is required."]} />
1188
- * <Field.Description>You can find this in the ngrok dashboard.</Field.Description>
1189
- * </Field.Item>
1190
- * </Field.Group>
1191
- * ```
1192
- */
1193
- readonly Errors: typeof FieldErrors;
1194
- /**
1195
- * Wraps one or more `Field.ErrorItem` children in a semantic `<ul>`.
1196
- * Renders nothing when given no renderable children.
1197
- *
1198
- * The inferred `"error"` state applies after hydration. For a
1199
- * server-rendered error, set `validation` on `Field.Item`.
1200
- *
1201
- * @see https://mantle.ngrok.com/components/forms/field
1202
- *
1203
- * @example
1204
- * ```tsx
1205
- * <Field.Group>
1206
- * <Field.Item name="username">
1207
- * <Field.Label>Username</Field.Label>
1208
- * <Field.Control>
1209
- * <Input />
1210
- * </Field.Control>
1211
- * <Field.ErrorList>
1212
- * <Field.ErrorItem>Must be at least 3 characters.</Field.ErrorItem>
1213
- * <Field.ErrorItem>Use letters, numbers, hyphens, or underscores.</Field.ErrorItem>
1214
- * </Field.ErrorList>
1215
- * <Field.Description>Pick something memorable.</Field.Description>
1216
- * </Field.Item>
1217
- * </Field.Group>
1218
- * ```
1219
- */
1220
- readonly ErrorList: typeof FieldErrorList;
1221
- /**
1222
- * A single error message list item for a field. Renders an `<li>` in
1223
- * `text-danger-600` and must be nested inside a `Field.ErrorList`.
1224
- *
1225
- * @see https://mantle.ngrok.com/components/forms/field
1226
- *
1227
- * @example
1228
- * ```tsx
1229
- * <Field.Group>
1230
- * <Field.Item name="username">
1231
- * <Field.Label>Username</Field.Label>
1232
- * <Field.Control>
1233
- * <Input />
1234
- * </Field.Control>
1235
- * <Field.ErrorList>
1236
- * <Field.ErrorItem>Must be at least 3 characters.</Field.ErrorItem>
1237
- * <Field.ErrorItem>Use letters, numbers, hyphens, or underscores.</Field.ErrorItem>
1238
- * </Field.ErrorList>
1239
- * <Field.Description>Pick something memorable.</Field.Description>
1240
- * </Field.Item>
1241
- * </Field.Group>
1242
- * ```
1243
- */
1244
- readonly ErrorItem: typeof FieldErrorItem;
1245
- };
1246
- /**
1247
- * Shapes commonly found in `field.state.meta.errors` from TanStack React Form
1248
- * across its built-in validators (Standard Schema / Zod issues, raw strings,
1249
- * thrown `Error` instances) plus the falsy slots Standard Schema can produce.
1250
- */
1251
- type FieldError = {
1252
- readonly message?: string | undefined;
1253
- } | string | null | undefined | false;
1254
- /**
1255
- * Reduce a TanStack React Form field's `meta.errors` array (or any array of
1256
- * mixed string / `{ message }` / nullish error entries) to a clean `string[]`
1257
- * for passing directly to `Field.Errors`' `messages` prop.
1258
- *
1259
- * Handles the shapes TanStack form yields for Zod, Standard Schema, and
1260
- * thrown `Error` validators: items may be strings, objects with `.message`,
1261
- * `undefined`, `null`, or `false`. Empty / whitespace-only messages are
1262
- * dropped and duplicate messages are collapsed so callers don't have to filter
1263
- * again.
1264
- *
1265
- * @example
1266
- * ```tsx
1267
- * <Field.Item name={field.name}>
1268
- * <Field.Label>Email</Field.Label>
1269
- * <Field.Control>
1270
- * <Input value={field.state.value} />
1271
- * </Field.Control>
1272
- * <Field.Errors messages={toErrorMessages(field.state.meta.errors)} />
1273
- * </Field.Item>
1274
- * ```
1275
- */
1276
- declare const toErrorMessages: (errors: readonly FieldError[] | null | undefined) => string[];
96
+ declare const Field: typeof FieldParts;
1277
97
  export { type AriaInvalid, Field, type FieldError, type ParsedValidation, type Validation, type ValidationProp, type ValidationState, type WithValidation, isAriaInvalid, parseValidation, resolveValidation, toErrorMessages };