@sanity/ui 5.0.0-alpha.23 → 5.0.0-alpha.25

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 (338) hide show
  1. package/dist/index.d.ts +147 -147
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +139 -157
  4. package/dist/index.js.map +1 -1
  5. package/dist/styles.css +1 -1
  6. package/docs/components/button.dsds.yaml +24 -12
  7. package/docs/components/code.dsds.yaml +2 -0
  8. package/docs/components/eyebrow.dsds.yaml +3 -22
  9. package/docs/components/icon-button.dsds.yaml +9 -2
  10. package/docs/components/popover.dsds.yaml +8 -2
  11. package/docs/foundations/typography-guidelines.dsds.yaml +4 -4
  12. package/docs/icons/icon-access-denied.dsds.yaml +40 -0
  13. package/docs/icons/icon-activity.dsds.yaml +40 -0
  14. package/docs/icons/icon-add-circle.dsds.yaml +14 -0
  15. package/docs/icons/icon-add-comment.dsds.yaml +34 -0
  16. package/docs/icons/icon-add-document.dsds.yaml +34 -0
  17. package/docs/icons/icon-add-user.dsds.yaml +30 -0
  18. package/docs/icons/icon-add.dsds.yaml +57 -0
  19. package/docs/icons/icon-api.dsds.yaml +17 -0
  20. package/docs/icons/icon-archive.dsds.yaml +44 -0
  21. package/docs/icons/icon-arrow-down.dsds.yaml +38 -0
  22. package/docs/icons/icon-arrow-left.dsds.yaml +32 -0
  23. package/docs/icons/icon-arrow-right.dsds.yaml +32 -0
  24. package/docs/icons/icon-arrow-top-right.dsds.yaml +32 -0
  25. package/docs/icons/icon-arrow-up.dsds.yaml +44 -0
  26. package/docs/icons/icon-asterisk.dsds.yaml +18 -0
  27. package/docs/icons/icon-bar-chart.dsds.yaml +40 -0
  28. package/docs/icons/icon-basket.dsds.yaml +14 -0
  29. package/docs/icons/icon-bell.dsds.yaml +30 -0
  30. package/docs/icons/icon-bill.dsds.yaml +40 -0
  31. package/docs/icons/icon-binary-document.dsds.yaml +30 -0
  32. package/docs/icons/icon-block-content.dsds.yaml +30 -0
  33. package/docs/icons/icon-block-element.dsds.yaml +32 -0
  34. package/docs/icons/icon-blockquote.dsds.yaml +32 -0
  35. package/docs/icons/icon-bold.dsds.yaml +28 -0
  36. package/docs/icons/icon-bolt.dsds.yaml +18 -0
  37. package/docs/icons/icon-book.dsds.yaml +34 -0
  38. package/docs/icons/icon-bookmark-filled.dsds.yaml +14 -0
  39. package/docs/icons/icon-bookmark.dsds.yaml +14 -0
  40. package/docs/icons/icon-bottle.dsds.yaml +18 -0
  41. package/docs/icons/icon-bug.dsds.yaml +28 -0
  42. package/docs/icons/icon-bulb-filled.dsds.yaml +14 -0
  43. package/docs/icons/icon-bulb-outline.dsds.yaml +30 -0
  44. package/docs/icons/icon-calendar.dsds.yaml +36 -0
  45. package/docs/icons/icon-case.dsds.yaml +18 -0
  46. package/docs/icons/icon-chart-upward.dsds.yaml +40 -0
  47. package/docs/icons/icon-checkmark-circle.dsds.yaml +40 -0
  48. package/docs/icons/icon-checkmark.dsds.yaml +36 -0
  49. package/docs/icons/icon-chevron-down.dsds.yaml +46 -0
  50. package/docs/icons/icon-chevron-left.dsds.yaml +42 -0
  51. package/docs/icons/icon-chevron-right.dsds.yaml +42 -0
  52. package/docs/icons/icon-chevron-up.dsds.yaml +44 -0
  53. package/docs/icons/icon-circle.dsds.yaml +28 -0
  54. package/docs/icons/icon-clipboard-image.dsds.yaml +30 -0
  55. package/docs/icons/icon-clipboard.dsds.yaml +34 -0
  56. package/docs/icons/icon-clock.dsds.yaml +39 -0
  57. package/docs/icons/icon-close-circle.dsds.yaml +18 -0
  58. package/docs/icons/icon-close.dsds.yaml +51 -0
  59. package/docs/icons/icon-code-block.dsds.yaml +38 -0
  60. package/docs/icons/icon-code.dsds.yaml +40 -0
  61. package/docs/icons/icon-cog.dsds.yaml +38 -0
  62. package/docs/icons/icon-collapse.dsds.yaml +40 -0
  63. package/docs/icons/icon-color-wheel.dsds.yaml +30 -0
  64. package/docs/icons/icon-comment.dsds.yaml +38 -0
  65. package/docs/icons/icon-component.dsds.yaml +18 -0
  66. package/docs/icons/icon-compose-sparkles.dsds.yaml +36 -0
  67. package/docs/icons/icon-compose.dsds.yaml +38 -0
  68. package/docs/icons/icon-confetti.dsds.yaml +18 -0
  69. package/docs/icons/icon-controls.dsds.yaml +36 -0
  70. package/docs/icons/icon-copy.dsds.yaml +31 -0
  71. package/docs/icons/icon-credit-card.dsds.yaml +18 -0
  72. package/docs/icons/icon-crop.dsds.yaml +32 -0
  73. package/docs/icons/icon-cube.dsds.yaml +36 -0
  74. package/docs/icons/icon-dashboard.dsds.yaml +34 -0
  75. package/docs/icons/icon-database.dsds.yaml +40 -0
  76. package/docs/icons/icon-desktop.dsds.yaml +31 -0
  77. package/docs/icons/icon-diamond.dsds.yaml +18 -0
  78. package/docs/icons/icon-document-pdf.dsds.yaml +34 -0
  79. package/docs/icons/icon-document-remove.dsds.yaml +30 -0
  80. package/docs/icons/icon-document-sheet.dsds.yaml +34 -0
  81. package/docs/icons/icon-document-text.dsds.yaml +30 -0
  82. package/docs/icons/icon-document-video.dsds.yaml +30 -0
  83. package/docs/icons/icon-document-word.dsds.yaml +34 -0
  84. package/docs/icons/icon-document-zip.dsds.yaml +30 -0
  85. package/docs/icons/icon-document.dsds.yaml +52 -0
  86. package/docs/icons/icon-documents.dsds.yaml +30 -0
  87. package/docs/icons/icon-dot.dsds.yaml +32 -0
  88. package/docs/icons/icon-double-chevron-down.dsds.yaml +38 -0
  89. package/docs/icons/icon-double-chevron-left.dsds.yaml +34 -0
  90. package/docs/icons/icon-double-chevron-right.dsds.yaml +34 -0
  91. package/docs/icons/icon-double-chevron-up.dsds.yaml +36 -0
  92. package/docs/icons/icon-double-quote.dsds.yaml +14 -0
  93. package/docs/icons/icon-download.dsds.yaml +40 -0
  94. package/docs/icons/icon-drag-handle.dsds.yaml +28 -0
  95. package/docs/icons/icon-drop.dsds.yaml +30 -0
  96. package/docs/icons/icon-earth-americas.dsds.yaml +34 -0
  97. package/docs/icons/icon-earth-globe.dsds.yaml +34 -0
  98. package/docs/icons/icon-edit.dsds.yaml +34 -0
  99. package/docs/icons/icon-ellipsis-horizontal.dsds.yaml +32 -0
  100. package/docs/icons/icon-ellipsis-vertical.dsds.yaml +14 -0
  101. package/docs/icons/icon-empty.dsds.yaml +28 -0
  102. package/docs/icons/icon-enter-right.dsds.yaml +18 -0
  103. package/docs/icons/icon-enter.dsds.yaml +18 -0
  104. package/docs/icons/icon-envelope.dsds.yaml +34 -0
  105. package/docs/icons/icon-equal.dsds.yaml +14 -0
  106. package/docs/icons/icon-error-filled.dsds.yaml +14 -0
  107. package/docs/icons/icon-error-outline.dsds.yaml +38 -0
  108. package/docs/icons/icon-error-screen.dsds.yaml +14 -0
  109. package/docs/icons/icon-expand.dsds.yaml +36 -0
  110. package/docs/icons/icon-eye-closed.dsds.yaml +38 -0
  111. package/docs/icons/icon-eye-open.dsds.yaml +38 -0
  112. package/docs/icons/icon-face-happy.dsds.yaml +14 -0
  113. package/docs/icons/icon-face-indifferent.dsds.yaml +14 -0
  114. package/docs/icons/icon-face-sad.dsds.yaml +14 -0
  115. package/docs/icons/icon-feedback.dsds.yaml +30 -0
  116. package/docs/icons/icon-filter.dsds.yaml +38 -0
  117. package/docs/icons/icon-folder.dsds.yaml +36 -0
  118. package/docs/icons/icon-generate.dsds.yaml +18 -0
  119. package/docs/icons/icon-github.dsds.yaml +14 -0
  120. package/docs/icons/icon-groq.dsds.yaml +31 -0
  121. package/docs/icons/icon-hash.dsds.yaml +18 -0
  122. package/docs/icons/icon-heart-filled.dsds.yaml +18 -0
  123. package/docs/icons/icon-heart.dsds.yaml +18 -0
  124. package/docs/icons/icon-help-circle.dsds.yaml +38 -0
  125. package/docs/icons/icon-highlight.dsds.yaml +18 -0
  126. package/docs/icons/icon-home.dsds.yaml +28 -0
  127. package/docs/icons/icon-ice-cream.dsds.yaml +18 -0
  128. package/docs/icons/icon-image-remove.dsds.yaml +32 -0
  129. package/docs/icons/icon-image.dsds.yaml +36 -0
  130. package/docs/icons/icon-images.dsds.yaml +34 -0
  131. package/docs/icons/icon-inbox.dsds.yaml +14 -0
  132. package/docs/icons/icon-info-filled.dsds.yaml +14 -0
  133. package/docs/icons/icon-info-outline.dsds.yaml +38 -0
  134. package/docs/icons/icon-inline-element.dsds.yaml +32 -0
  135. package/docs/icons/icon-inline.dsds.yaml +18 -0
  136. package/docs/icons/icon-insert-above.dsds.yaml +32 -0
  137. package/docs/icons/icon-insert-below.dsds.yaml +32 -0
  138. package/docs/icons/icon-italic.dsds.yaml +28 -0
  139. package/docs/icons/icon-joystick.dsds.yaml +18 -0
  140. package/docs/icons/icon-json.dsds.yaml +36 -0
  141. package/docs/icons/icon-launch.dsds.yaml +34 -0
  142. package/docs/icons/icon-leave.dsds.yaml +35 -0
  143. package/docs/icons/icon-lemon.dsds.yaml +18 -0
  144. package/docs/icons/icon-link-removed.dsds.yaml +30 -0
  145. package/docs/icons/icon-link.dsds.yaml +36 -0
  146. package/docs/icons/icon-linkedin.dsds.yaml +14 -0
  147. package/docs/icons/icon-list.dsds.yaml +14 -0
  148. package/docs/icons/icon-lock.dsds.yaml +39 -0
  149. package/docs/icons/icon-logo-js.dsds.yaml +18 -0
  150. package/docs/icons/icon-logo-ts.dsds.yaml +18 -0
  151. package/docs/icons/icon-marker-removed.dsds.yaml +14 -0
  152. package/docs/icons/icon-marker.dsds.yaml +14 -0
  153. package/docs/icons/icon-master-detail.dsds.yaml +28 -0
  154. package/docs/icons/icon-menu.dsds.yaml +40 -0
  155. package/docs/icons/icon-microphone-slash.dsds.yaml +14 -0
  156. package/docs/icons/icon-microphone.dsds.yaml +14 -0
  157. package/docs/icons/icon-mobile-device.dsds.yaml +32 -0
  158. package/docs/icons/icon-moon.dsds.yaml +30 -0
  159. package/docs/icons/icon-number.dsds.yaml +30 -0
  160. package/docs/icons/icon-ok-hand.dsds.yaml +18 -0
  161. package/docs/icons/icon-olist.dsds.yaml +36 -0
  162. package/docs/icons/icon-overage.dsds.yaml +42 -0
  163. package/docs/icons/icon-package.dsds.yaml +34 -0
  164. package/docs/icons/icon-panel-left.dsds.yaml +38 -0
  165. package/docs/icons/icon-panel-right.dsds.yaml +40 -0
  166. package/docs/icons/icon-pause.dsds.yaml +32 -0
  167. package/docs/icons/icon-pin-filled.dsds.yaml +28 -0
  168. package/docs/icons/icon-pin-removed.dsds.yaml +14 -0
  169. package/docs/icons/icon-pin.dsds.yaml +32 -0
  170. package/docs/icons/icon-play.dsds.yaml +32 -0
  171. package/docs/icons/icon-plug.dsds.yaml +35 -0
  172. package/docs/icons/icon-presentation.dsds.yaml +18 -0
  173. package/docs/icons/icon-progress50.dsds.yaml +14 -0
  174. package/docs/icons/icon-progress75.dsds.yaml +14 -0
  175. package/docs/icons/icon-projects.dsds.yaml +14 -0
  176. package/docs/icons/icon-publish.dsds.yaml +38 -0
  177. package/docs/icons/icon-read-only.dsds.yaml +36 -0
  178. package/docs/icons/icon-redo.dsds.yaml +38 -0
  179. package/docs/icons/icon-refresh.dsds.yaml +38 -0
  180. package/docs/icons/icon-remove-circle.dsds.yaml +14 -0
  181. package/docs/icons/icon-remove.dsds.yaml +30 -0
  182. package/docs/icons/icon-reset.dsds.yaml +40 -0
  183. package/docs/icons/icon-restore.dsds.yaml +45 -0
  184. package/docs/icons/icon-retrieve.dsds.yaml +14 -0
  185. package/docs/icons/icon-retry.dsds.yaml +14 -0
  186. package/docs/icons/icon-revert.dsds.yaml +14 -0
  187. package/docs/icons/icon-robot.dsds.yaml +17 -0
  188. package/docs/icons/icon-rocket.dsds.yaml +34 -0
  189. package/docs/icons/icon-schema.dsds.yaml +36 -0
  190. package/docs/icons/icon-search.dsds.yaml +34 -0
  191. package/docs/icons/icon-select.dsds.yaml +38 -0
  192. package/docs/icons/icon-share.dsds.yaml +36 -0
  193. package/docs/icons/icon-sort.dsds.yaml +40 -0
  194. package/docs/icons/icon-sparkle.dsds.yaml +26 -0
  195. package/docs/icons/icon-sparkles.dsds.yaml +34 -0
  196. package/docs/icons/icon-spinner.dsds.yaml +38 -0
  197. package/docs/icons/icon-split-horizontal.dsds.yaml +32 -0
  198. package/docs/icons/icon-split-vertical.dsds.yaml +30 -0
  199. package/docs/icons/icon-square.dsds.yaml +18 -0
  200. package/docs/icons/icon-stack-compact.dsds.yaml +30 -0
  201. package/docs/icons/icon-stack.dsds.yaml +44 -0
  202. package/docs/icons/icon-star-filled.dsds.yaml +48 -0
  203. package/docs/icons/icon-star.dsds.yaml +51 -0
  204. package/docs/icons/icon-stop.dsds.yaml +32 -0
  205. package/docs/icons/icon-strikethrough.dsds.yaml +28 -0
  206. package/docs/icons/icon-string.dsds.yaml +38 -0
  207. package/docs/icons/icon-sun.dsds.yaml +30 -0
  208. package/docs/icons/icon-sync.dsds.yaml +36 -0
  209. package/docs/icons/icon-tablet-device.dsds.yaml +30 -0
  210. package/docs/icons/icon-tag.dsds.yaml +32 -0
  211. package/docs/icons/icon-tags.dsds.yaml +36 -0
  212. package/docs/icons/icon-target.dsds.yaml +14 -0
  213. package/docs/icons/icon-task.dsds.yaml +30 -0
  214. package/docs/icons/icon-terminal.dsds.yaml +30 -0
  215. package/docs/icons/icon-text.dsds.yaml +32 -0
  216. package/docs/icons/icon-th-large.dsds.yaml +34 -0
  217. package/docs/icons/icon-th-list.dsds.yaml +30 -0
  218. package/docs/icons/icon-thumbs-down.dsds.yaml +27 -0
  219. package/docs/icons/icon-thumbs-up.dsds.yaml +30 -0
  220. package/docs/icons/icon-tiers.dsds.yaml +18 -0
  221. package/docs/icons/icon-timeline.dsds.yaml +32 -0
  222. package/docs/icons/icon-toggle-arrow-right.dsds.yaml +39 -0
  223. package/docs/icons/icon-token.dsds.yaml +30 -0
  224. package/docs/icons/icon-transfer.dsds.yaml +32 -0
  225. package/docs/icons/icon-translate.dsds.yaml +32 -0
  226. package/docs/icons/icon-trash.dsds.yaml +34 -0
  227. package/docs/icons/icon-trend-upward.dsds.yaml +42 -0
  228. package/docs/icons/icon-triangle-outline.dsds.yaml +18 -0
  229. package/docs/icons/icon-trolley.dsds.yaml +18 -0
  230. package/docs/icons/icon-truncate.dsds.yaml +18 -0
  231. package/docs/icons/icon-twitter.dsds.yaml +18 -0
  232. package/docs/icons/icon-ulist.dsds.yaml +36 -0
  233. package/docs/icons/icon-unarchive.dsds.yaml +32 -0
  234. package/docs/icons/icon-underline.dsds.yaml +28 -0
  235. package/docs/icons/icon-undo.dsds.yaml +34 -0
  236. package/docs/icons/icon-unknown.dsds.yaml +36 -0
  237. package/docs/icons/icon-unlink.dsds.yaml +32 -0
  238. package/docs/icons/icon-unlock.dsds.yaml +41 -0
  239. package/docs/icons/icon-unpublish.dsds.yaml +38 -0
  240. package/docs/icons/icon-upload.dsds.yaml +40 -0
  241. package/docs/icons/icon-user.dsds.yaml +34 -0
  242. package/docs/icons/icon-users.dsds.yaml +34 -0
  243. package/docs/icons/icon-versions.dsds.yaml +14 -0
  244. package/docs/icons/icon-video.dsds.yaml +32 -0
  245. package/docs/icons/icon-warning-filled.dsds.yaml +14 -0
  246. package/docs/icons/icon-warning-outline.dsds.yaml +38 -0
  247. package/docs/icons/icon-wrench.dsds.yaml +18 -0
  248. package/docs/icons.dsds.yaml +767 -2512
  249. package/docs/index.dsds.yaml +76 -85
  250. package/docs/overview/component-reference.dsds.yaml +0 -2
  251. package/docs/overview/installation.dsds.yaml +20 -4
  252. package/docs/patterns/forms.dsds.yaml +6 -0
  253. package/docs/patterns/layouts.dsds.yaml +1 -1
  254. package/docs/patterns/loading-states.dsds.yaml +1 -1
  255. package/docs/tokens/dtcg/README.md +5 -3
  256. package/docs/tokens/dtcg/css/color.css +1 -1
  257. package/docs/tokens/dtcg/css/index.css +0 -1
  258. package/docs/tokens/dtcg/css/typography.css +23 -25
  259. package/docs/tokens/dtcg/json/color.tokens.json +2 -2
  260. package/docs/tokens/dtcg/json/typography.tokens.json +45 -45
  261. package/docs/tokens/typography.dsds.yaml +25 -25
  262. package/package.json +2 -2
  263. package/src/components/avatar/avatar.props.ts +4 -2
  264. package/src/components/avatar-counter/avatarCounter.props.ts +4 -2
  265. package/src/components/avatar-stack/avatarStack.props.ts +4 -2
  266. package/src/components/badge/Badge.tsx +2 -5
  267. package/src/components/badge/badge.props.ts +15 -15
  268. package/src/components/box/Box.tsx +2 -5
  269. package/src/components/box/box.props.ts +18 -12
  270. package/src/components/button/Button.tsx +16 -5
  271. package/src/components/button/button.css +23 -25
  272. package/src/components/button/button.props.ts +49 -39
  273. package/src/components/card/Card.tsx +2 -2
  274. package/src/components/card/card.props.ts +19 -13
  275. package/src/components/checkbox/checkbox.props.ts +4 -2
  276. package/src/components/code/code.props.ts +8 -5
  277. package/src/components/container/Container.tsx +2 -2
  278. package/src/components/container/container.props.ts +17 -11
  279. package/src/components/dialog/Dialog.tsx +10 -5
  280. package/src/components/dialog/dialog.props.ts +11 -3
  281. package/src/components/divider/divider.props.ts +4 -2
  282. package/src/components/eyebrow/Eyebrow.tsx +10 -8
  283. package/src/components/eyebrow/eyebrow.props.ts +27 -12
  284. package/src/components/flex/Flex.tsx +2 -5
  285. package/src/components/flex/flex.props.ts +19 -12
  286. package/src/components/grid/Grid.tsx +2 -5
  287. package/src/components/grid/grid.props.ts +20 -16
  288. package/src/components/h-stack/HStack.tsx +2 -5
  289. package/src/components/h-stack/hStack.props.ts +7 -4
  290. package/src/components/heading/Heading.tsx +3 -6
  291. package/src/components/heading/heading.props.ts +20 -14
  292. package/src/components/hotkeys/hotkeys.props.ts +4 -2
  293. package/src/components/icon/icon.props.ts +3 -3
  294. package/src/components/icon-button/IconButton.tsx +2 -4
  295. package/src/components/icon-button/iconButton.props.ts +17 -17
  296. package/src/components/indicator/Indicator.tsx +2 -2
  297. package/src/components/indicator/indicator.props.ts +17 -11
  298. package/src/components/indicator-stack/IndicatorStack.tsx +2 -4
  299. package/src/components/indicator-stack/indicatorStack.props.ts +13 -7
  300. package/src/components/inline/Inline.tsx +2 -2
  301. package/src/components/inline/inline.props.ts +17 -11
  302. package/src/components/kbd/kbd.props.ts +4 -2
  303. package/src/components/link/link.props.ts +4 -2
  304. package/src/components/list/List.tsx +47 -97
  305. package/src/components/list/list.css +28 -9
  306. package/src/components/list/list.props.ts +59 -68
  307. package/src/components/popover/Popover.tsx +4 -3
  308. package/src/components/popover/popover.css +5 -3
  309. package/src/components/popover/popover.props.ts +16 -5
  310. package/src/components/press-area/PressArea.tsx +2 -4
  311. package/src/components/press-area/press-area.css +9 -3
  312. package/src/components/press-area/pressArea.props.ts +13 -7
  313. package/src/components/radio/radio.props.ts +2 -1
  314. package/src/components/select/select.props.ts +4 -2
  315. package/src/components/skip-to-content/skipToContent.props.ts +4 -2
  316. package/src/components/spinner/spinner.props.ts +4 -2
  317. package/src/components/switch/switch.props.ts +4 -2
  318. package/src/components/tabs/tabs.props.ts +8 -9
  319. package/src/components/text/Text.tsx +2 -5
  320. package/src/components/text/text.props.ts +23 -11
  321. package/src/components/text-area/textArea.props.ts +4 -5
  322. package/src/components/text-input/textInput.props.ts +5 -3
  323. package/src/components/tooltip/tooltip.props.ts +7 -5
  324. package/src/components/tooltip-group/TooltipGroup.tsx +2 -4
  325. package/src/components/tooltip-group/tooltipGroup.props.ts +13 -7
  326. package/src/components/v-stack/VStack.tsx +2 -5
  327. package/src/components/v-stack/vStack.props.ts +7 -4
  328. package/src/components/visually-hidden/VisuallyHidden.tsx +2 -4
  329. package/src/components/visually-hidden/visuallyHidden.props.ts +17 -11
  330. package/src/css/classes/system/typography.css +6 -6
  331. package/src/css/tokens/semantic.css +7 -7
  332. package/src/props/typography.ts +1 -5
  333. package/src/types/Interactive.ts +3 -1
  334. package/src/types/Polymorphic.ts +9 -0
  335. package/src/version.ts +2 -2
  336. package/docs/overview/designer-contribution-model.dsds.yaml +0 -77
  337. package/docs/overview/developer-contribution-model.dsds.yaml +0 -362
  338. package/docs/overview/resources.dsds.yaml +0 -34
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React$1, { ComponentProps, ComponentPropsWithRef, ElementType, SVGProps } from "react";
1
+ import { ComponentProps, ComponentPropsWithRef, ComponentType, ElementType, HTMLInputTypeAttribute, ReactElement, ReactEventHandler, ReactNode, SVGProps } from "react";
2
2
  declare const AVATAR_SIZE: readonly [0, 1, 2];
3
3
  type AvatarSize = (typeof AVATAR_SIZE)[number];
4
4
  declare const AVATAR_COLOR: readonly ["gray", "purple", "magenta", "red", "orange", "yellow", "green", "cyan"];
@@ -18,7 +18,7 @@ type Responsive<T> = T | [] | ([T | undefined | null, ...(T | undefined | null)[
18
18
  length: 6;
19
19
  });
20
20
  /** @public */
21
- interface AvatarProps extends React.ComponentProps<'figure'> {
21
+ interface AvatarProps extends ComponentProps<'figure'> {
22
22
  /** Avatar color */
23
23
  color?: AvatarColor;
24
24
  /** Avatar name, only first letter will be displayed */
@@ -31,7 +31,7 @@ interface AvatarProps extends React.ComponentProps<'figure'> {
31
31
  /** @public */
32
32
  export declare function Avatar({ color, size, ...props }: AvatarProps): import("react").JSX.Element;
33
33
  /** @public */
34
- interface AvatarCounterProps extends React.ComponentProps<'figure'> {
34
+ interface AvatarCounterProps extends ComponentProps<'figure'> {
35
35
  /** Count */
36
36
  count: number;
37
37
  /** Composite prop for setting height and font size */
@@ -40,7 +40,7 @@ interface AvatarCounterProps extends React.ComponentProps<'figure'> {
40
40
  /** @public */
41
41
  export declare function AvatarCounter({ size, ...props }: AvatarCounterProps): import("react").JSX.Element;
42
42
  /** @public */
43
- interface AvatarStackProps extends React.ComponentProps<'ul'> {
43
+ interface AvatarStackProps extends ComponentProps<'ul'> {
44
44
  /** Max number of avatars to display */
45
45
  maxLength?: number;
46
46
  /** Avatar and AvatarCounter size */
@@ -59,23 +59,18 @@ type ToneProps = {
59
59
  type ToneWithDefaultProps = {
60
60
  tone?: ToneWithDefault;
61
61
  };
62
+ type Polymorphic<T extends ElementType, Props extends object> = Props & Omit<T extends ((props: infer AsProps, ...args: never) => unknown) ? AsProps : ComponentPropsWithRef<T>, keyof Props>;
62
63
  /** @public */
63
- interface BadgeProps<T extends React.ElementType = 'span'> extends ToneProps {
64
- /**
65
- * HTML element to render.
66
- */
64
+ type BadgeProps<T extends ElementType = 'span'> = Polymorphic<T, ToneProps & {
65
+ /** HTML element to render. */
67
66
  as?: T;
68
- /**
69
- * Shows an icon in the start position (left side in left-to-right languages).
70
- */
71
- iconStart?: React.ElementType | React.ReactNode;
72
- /**
73
- * Sets Badge's text label. Use instead of children unless you have a special use case.
74
- */
67
+ /** Shows an icon in the start position (left side in left-to-right languages). */
68
+ iconStart?: ElementType | ReactNode;
69
+ /** Sets Badge's text label. Use instead of children unless you have a special use case. */
75
70
  text?: string;
76
- }
71
+ }>;
77
72
  /** @public */
78
- export declare function Badge<T extends ElementType = 'span'>({ tone, ...props }: BadgeProps<T> & Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): import("react").JSX.Element;
73
+ export declare function Badge<T extends ElementType = 'span'>({ tone, ...props }: BadgeProps<T>): import("react").JSX.Element;
79
74
  declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
80
75
  /** @public */
81
76
  type Radius = (typeof RADIUS)[number];
@@ -228,7 +223,7 @@ declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
228
223
  /** @public */
229
224
  type DisplayGrid = (typeof DISPLAY_GRID)[number];
230
225
  /** @public */
231
- interface BoxProps<T extends React.ElementType = 'div'> extends LayoutProps {
226
+ type BoxProps<T extends ElementType = 'div'> = Polymorphic<T, LayoutProps & {
232
227
  /**
233
228
  * HTML element or component to render.
234
229
  */
@@ -238,9 +233,9 @@ interface BoxProps<T extends React.ElementType = 'div'> extends LayoutProps {
238
233
  * @remarks Does not include `'flex'` or `'grid'`. Use the Flex or Grid components for those.
239
234
  */
240
235
  display?: Responsive<DisplayBlock>;
241
- }
236
+ }>;
242
237
  /** @public */
243
- export declare function Box<T extends ElementType = 'div'>({ display, ...props }: BoxProps<T> & Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): import("react").JSX.Element;
238
+ export declare function Box<T extends ElementType = 'div'>({ display, ...props }: BoxProps<T>): import("react").JSX.Element;
244
239
  declare const BUTTON_DENSITY: readonly ["regular", "loose"];
245
240
  type ButtonDensity = (typeof BUTTON_DENSITY)[number];
246
241
  declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
@@ -249,9 +244,9 @@ declare const BUTTON_TONE: readonly ["neutral", "critical"];
249
244
  type ButtonTone = (typeof BUTTON_TONE)[number];
250
245
  declare const INTERACTIVE_TAG: readonly ["button", "a"];
251
246
  type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
252
- type InteractiveAs<T extends React.ElementType> = T extends InteractiveTag ? T : T extends string ? never : T;
247
+ type InteractiveAs<T extends ElementType> = T extends InteractiveTag ? T : T extends string ? never : T;
253
248
  /** @public */
254
- interface ButtonProps<T extends React.ElementType = 'button'> {
249
+ type ButtonProps<T extends ElementType = 'button'> = Polymorphic<T, {
255
250
  /**
256
251
  * HTML element to render.
257
252
  */
@@ -267,11 +262,11 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
267
262
  /**
268
263
  * Shows an icon in the start position (left side in left-to-right languages).
269
264
  */
270
- iconStart?: React.ElementType | React.ReactNode;
265
+ iconStart?: ElementType | ReactNode;
271
266
  /**
272
267
  * Shows an icon in the end position (right side in left-to-right languages).
273
268
  */
274
- iconEnd?: React.ElementType | React.ReactNode;
269
+ iconEnd?: ElementType | ReactNode;
275
270
  /**
276
271
  * Sets the importance of Button's action.
277
272
  */
@@ -280,6 +275,10 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
280
275
  * Places Button into a loading state.
281
276
  */
282
277
  loading?: boolean;
278
+ /**
279
+ * Visually styles the button in a pressed state, and sets aria-pressed to the provided value
280
+ */
281
+ pressed?: boolean;
283
282
  /**
284
283
  * Sets Button's text label.
285
284
  */
@@ -288,14 +287,14 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
288
287
  * Sets Button's semantic meaning and related color.
289
288
  */
290
289
  tone?: ButtonTone;
291
- }
290
+ }>;
292
291
  /** @public */
293
- export declare function Button<T extends ElementType = 'button'>({ density, level, tone, ...props }: ButtonProps<T> & Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): import("react").JSX.Element;
292
+ export declare function Button<T extends ElementType = 'button'>({ density, level, tone, ...props }: ButtonProps<T>): import("react").JSX.Element;
294
293
  declare const DENSITY: readonly ["compact", "regular", "loose"];
295
294
  /** @public */
296
295
  type Density = (typeof DENSITY)[number];
297
296
  /** @public */
298
- interface CardProps<T extends React.ElementType = 'div'> extends MarginProps, ToneWithDefaultProps {
297
+ type CardProps<T extends ElementType = 'div'> = Polymorphic<T, MarginProps & ToneWithDefaultProps & {
299
298
  /**
300
299
  * HTML element or component to render.
301
300
  */
@@ -304,11 +303,11 @@ interface CardProps<T extends React.ElementType = 'div'> extends MarginProps, To
304
303
  * Sets padding, gap, and border-radius together to specify size. This prop is used in place of separate `padding`, `gap`, and `border-radius` props.
305
304
  */
306
305
  density?: Responsive<Density>;
307
- }
306
+ }>;
308
307
  /** @public */
309
- export declare function Card<T extends ElementType = 'div'>({ density, tone, ...props }: CardProps<T> & Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): import("react").JSX.Element;
308
+ export declare function Card<T extends ElementType = 'div'>({ density, tone, ...props }: CardProps<T>): import("react").JSX.Element;
310
309
  /** @beta */
311
- interface CheckboxProps extends React.ComponentProps<'input'> {
310
+ interface CheckboxProps extends ComponentProps<'input'> {
312
311
  /**
313
312
  * Applies error styling to the checkbox mark for invalid states.
314
313
  * @remarks Use when form validation fails. Pair with a visible error message.
@@ -329,7 +328,7 @@ declare const TEXT_ALIGN: readonly ["left", "center", "right"];
329
328
  /** @public */
330
329
  type TextAlign = (typeof TEXT_ALIGN)[number];
331
330
  /** @public */
332
- interface TypographyProps extends MarginProps, ToneProps {
331
+ interface TypographyProps {
333
332
  /** CSS **text-align** property */
334
333
  align?: Responsive<TextAlign>;
335
334
  /** CSS **color** property */
@@ -344,7 +343,7 @@ interface TypographyProps extends MarginProps, ToneProps {
344
343
  declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
345
344
  /** @public */
346
345
  type CodeSize = (typeof CODE_SIZE)[number];
347
- interface CodeBaseProps extends Omit<TypographyProps, 'align' | 'truncate' | 'tone' | 'weight'> {
346
+ interface CodeBaseProps extends MarginProps, Omit<TypographyProps, 'align' | 'truncate' | 'weight'> {
348
347
  /**
349
348
  * Refractor language for syntax highlighting.
350
349
  */
@@ -361,16 +360,16 @@ type CodeProps = (CodeBaseProps & {
361
360
  * @remarks Block code is wrapped in a `<pre>` tag.
362
361
  */
363
362
  inline?: false;
364
- } & Omit<React.ComponentPropsWithRef<'pre'>, keyof CodeBaseProps>) | (CodeBaseProps & {
363
+ } & Omit<ComponentPropsWithRef<'pre'>, keyof CodeBaseProps>) | (CodeBaseProps & {
365
364
  inline: true;
366
- } & Omit<React.ComponentPropsWithRef<'span'>, keyof CodeBaseProps>);
365
+ } & Omit<ComponentPropsWithRef<'span'>, keyof CodeBaseProps>);
367
366
  /** @public */
368
367
  export declare function Code({ size, ...props }: CodeProps): import("react").JSX.Element;
369
368
  declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
370
369
  /** @public */
371
370
  type ContainerSize = (typeof CONTAINER_SIZE)[number];
372
371
  /** @public */
373
- interface ContainerProps<T extends React.ElementType = 'div'> extends LayoutProps {
372
+ type ContainerProps<T extends ElementType = 'div'> = Polymorphic<T, LayoutProps & {
374
373
  /**
375
374
  * HTML element or component to render.
376
375
  */
@@ -379,11 +378,11 @@ interface ContainerProps<T extends React.ElementType = 'div'> extends LayoutProp
379
378
  * Maximum width of the container.
380
379
  */
381
380
  size?: Responsive<ContainerSize>;
382
- }
381
+ }>;
383
382
  /** @public */
384
- export declare function Container<T extends ElementType = 'div'>({ marginX, size, ...props }: ContainerProps<T> & Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): import("react").JSX.Element;
383
+ export declare function Container<T extends ElementType = 'div'>({ marginX, size, ...props }: ContainerProps<T>): import("react").JSX.Element;
385
384
  /** @beta */
386
- interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
385
+ interface DialogProps extends Omit<ComponentProps<'dialog'>, 'open'> {
387
386
  /**
388
387
  * Text for the dialog heading.
389
388
  * @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
@@ -393,7 +392,7 @@ interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
393
392
  * A function to call alongside the native `close` event.
394
393
  * @remarks Use it to set `open` back to `false`. It runs for every close cause: the Escape key, a backdrop click, the close button, or a programmatic close.
395
394
  */
396
- onClose: React.ReactEventHandler<HTMLDialogElement>;
395
+ onClose: ReactEventHandler<HTMLDialogElement>;
397
396
  /**
398
397
  * Toggles the dialog's open state.
399
398
  * @remarks `true` calls `showModal()` on the element. `false` calls `close()`.
@@ -404,14 +403,18 @@ interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
404
403
  /** CSS length value used to set the Dialog’s distance from the top of the viewport; Dialog is centered if not provided */
405
404
  topAnchor?: string;
406
405
  }
406
+ /** @beta */
407
+ interface DialogContentProps extends ComponentProps<'div'> {}
408
+ /** @beta */
409
+ interface DialogFooterProps extends ComponentProps<'div'> {}
407
410
  declare function DialogRoot({ open, size, ...props }: DialogProps): import("react").JSX.Element;
408
411
  declare namespace DialogRoot {
409
412
  var displayName: string;
410
413
  var Content: typeof DialogContent;
411
414
  var Footer: typeof DialogFooter;
412
415
  }
413
- declare function DialogContent(props: ComponentProps<'div'>): import("react").JSX.Element;
414
- declare function DialogFooter(props: ComponentProps<'div'>): import("react").JSX.Element;
416
+ declare function DialogContent(props: DialogContentProps): import("react").JSX.Element;
417
+ declare function DialogFooter(props: DialogFooterProps): import("react").JSX.Element;
415
418
  /**
416
419
  * @beta
417
420
  *
@@ -426,14 +429,14 @@ declare function DialogFooter(props: ComponentProps<'div'>): import("react").JSX
426
429
  */
427
430
  export declare const Dialog: typeof DialogRoot;
428
431
  /** @public */
429
- interface DividerProps extends React.ComponentProps<'hr'>, MarginProps {}
432
+ interface DividerProps extends ComponentProps<'hr'>, MarginProps {}
430
433
  /** @public */
431
434
  export declare function Divider(props: DividerProps): import("react").JSX.Element;
432
435
  declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4, 5];
433
436
  /** @public */
434
437
  type EyebrowSize = (typeof EYEBROW_SIZE)[number];
435
438
  /** @public */
436
- interface EyebrowProps<T extends React.ElementType = 'span'> extends TypographyProps {
439
+ type EyebrowProps<T extends ElementType = 'span'> = Polymorphic<T, MarginProps & ToneProps & Omit<TypographyProps, 'weight'> & {
437
440
  /**
438
441
  * HTML element to render.
439
442
  */
@@ -442,9 +445,9 @@ interface EyebrowProps<T extends React.ElementType = 'span'> extends TypographyP
442
445
  * Sets font size. Uses the same scale as Label.
443
446
  */
444
447
  size?: Responsive<EyebrowSize>;
445
- }
448
+ }>;
446
449
  /** @public */
447
- export declare function Eyebrow<T extends ElementType = 'span'>({ size, weight, ...props }: EyebrowProps<T> & Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): import("react").JSX.Element;
450
+ export declare function Eyebrow<T extends ElementType = 'span'>({ size, ...props }: EyebrowProps<T>): import("react").JSX.Element;
448
451
  declare const ALIGN_ITEMS: readonly ["baseline", "center", "flex-end", "flex-start", "stretch"];
449
452
  /** @public */
450
453
  type AlignItems = (typeof ALIGN_ITEMS)[number];
@@ -478,7 +481,7 @@ type GapProps = {
478
481
  columnGap?: Responsive<SpaceInherit>;
479
482
  };
480
483
  /** @public */
481
- interface FlexProps<T extends React.ElementType = 'div'> extends FlexParentProps, GapProps, LayoutProps {
484
+ type FlexProps<T extends ElementType = 'div'> = Polymorphic<T, FlexParentProps & GapProps & LayoutProps & {
482
485
  /**
483
486
  * HTML element or component to render.
484
487
  */
@@ -487,9 +490,9 @@ interface FlexProps<T extends React.ElementType = 'div'> extends FlexParentProps
487
490
  * CSS `display` property.
488
491
  */
489
492
  display?: Responsive<DisplayFlex>;
490
- }
493
+ }>;
491
494
  /** @public */
492
- export declare function Flex<T extends ElementType = 'div'>({ display, ...props }: FlexProps<T> & Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): import("react").JSX.Element;
495
+ export declare function Flex<T extends ElementType = 'div'>({ display, ...props }: FlexProps<T>): import("react").JSX.Element;
493
496
  declare const GRID_AUTO_FLOW: readonly ["row", "column", "row dense", "column dense", "dense"];
494
497
  /** @public */
495
498
  type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
@@ -507,7 +510,7 @@ type GridParentProps = {
507
510
  gridTemplateRows?: Responsive<string>;
508
511
  };
509
512
  /** @public */
510
- interface GridProps<T extends React.ElementType = 'div'> extends Pick<FlexParentProps, 'alignItems' | 'justifyContent'>, GridParentProps, GapProps, LayoutProps {
513
+ type GridProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexParentProps, 'alignItems' | 'justifyContent'> & GridParentProps & GapProps & LayoutProps & {
511
514
  /**
512
515
  * HTML element or component to render.
513
516
  */
@@ -516,34 +519,34 @@ interface GridProps<T extends React.ElementType = 'div'> extends Pick<FlexParent
516
519
  * CSS `display` property.
517
520
  */
518
521
  display?: Responsive<DisplayGrid>;
519
- }
522
+ }>;
520
523
  /** @public */
521
- export declare function Grid<T extends ElementType = 'div'>({ display, ...props }: GridProps<T> & Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): import("react").JSX.Element;
524
+ export declare function Grid<T extends ElementType = 'div'>({ display, ...props }: GridProps<T>): import("react").JSX.Element;
522
525
  /** @public */
523
- interface HStackProps<T extends React.ElementType = 'div'> extends Pick<FlexProps<T>, 'as' | 'gap'> {}
526
+ type HStackProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexProps<T>, 'as' | 'gap'>>;
524
527
  /** @public */
525
- export declare function HStack<T extends ElementType = 'div'>({ className, ...props }: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>): import("react").JSX.Element;
528
+ export declare function HStack<T extends ElementType = 'div'>({ className, ...props }: HStackProps<T>): import("react").JSX.Element;
526
529
  declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
527
530
  type HeadingTag = (typeof HEADING_TAG)[number];
528
531
  declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5];
529
532
  /** @public */
530
533
  type HeadingSize = (typeof HEADING_SIZE)[number];
531
534
  /** @public */
532
- interface HeadingProps extends Omit<TypographyProps, 'muted' | 'weight'> {
535
+ type HeadingProps<T extends HeadingTag = HeadingTag> = Polymorphic<T, MarginProps & ToneProps & Omit<TypographyProps, 'muted' | 'weight'> & {
533
536
  /**
534
537
  * Semantic heading element to render.
535
538
  */
536
- as: HeadingTag;
539
+ as: T;
537
540
  /**
538
541
  * Sets font size.
539
542
  * @remarks Independent of `as`.
540
543
  */
541
544
  size?: Responsive<HeadingSize>;
542
- }
545
+ }>;
543
546
  /** @public */
544
- export declare function Heading<T extends ElementType = 'h2'>({ size, ...props }: HeadingProps & Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): import("react").JSX.Element;
547
+ export declare function Heading<T extends HeadingTag = 'h2'>({ size, ...props }: HeadingProps<T>): import("react").JSX.Element;
545
548
  /** @public */
546
- interface HotkeysProps extends React.ComponentProps<'kbd'> {
549
+ interface HotkeysProps extends ComponentProps<'kbd'> {
547
550
  /**
548
551
  * The keys in the shortcut, in order. Each one renders as a KBD.
549
552
  */
@@ -559,7 +562,7 @@ interface IconProps extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'
559
562
  /**
560
563
  * The icon component to render.
561
564
  */
562
- icon: React.ComponentType<SVGProps<SVGSVGElement>> | React.ReactElement<SVGProps<SVGSVGElement>>;
565
+ icon: ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
563
566
  /**
564
567
  * Sets icon size.
565
568
  */
@@ -568,7 +571,7 @@ interface IconProps extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'
568
571
  /** @public */
569
572
  export declare function Icon({ icon, size, ...props }: IconProps): import("react").ReactElement<SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
570
573
  /** @public */
571
- interface IconButtonProps<T extends React$1.ElementType = 'button'> extends Pick<ButtonProps<T>, 'as' | 'density' | 'level' | 'loading' | 'tone'> {
574
+ type IconButtonProps<T extends ElementType = 'button'> = Polymorphic<T, Pick<ButtonProps<T>, 'as' | 'density' | 'level' | 'loading' | 'tone'> & {
572
575
  /**
573
576
  * Accessible name for the button.
574
577
  * @remarks Because IconButtons have no visible text, this is required.
@@ -577,12 +580,12 @@ interface IconButtonProps<T extends React$1.ElementType = 'button'> extends Pick
577
580
  /**
578
581
  * Icon to render.
579
582
  */
580
- 'icon': React$1.ComponentType<SVGProps<SVGSVGElement>>;
581
- }
583
+ 'icon': ComponentType<SVGProps<SVGSVGElement>>;
584
+ }>;
582
585
  /** @public */
583
- export declare function IconButton<T extends ElementType = 'button'>(props: IconButtonProps<T> & Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>): import("react").JSX.Element;
586
+ export declare function IconButton<T extends ElementType = 'button'>(props: IconButtonProps<T>): import("react").JSX.Element;
584
587
  /** @beta */
585
- interface IndicatorProps<T extends React.ElementType = 'span'> extends ToneProps {
588
+ type IndicatorProps<T extends ElementType = 'span'> = Polymorphic<T, ToneProps & {
586
589
  /**
587
590
  * HTML element to render.
588
591
  */
@@ -591,21 +594,21 @@ interface IndicatorProps<T extends React.ElementType = 'span'> extends ToneProps
591
594
  * Accessible label.
592
595
  */
593
596
  label?: string;
594
- }
597
+ }>;
595
598
  /** @beta */
596
- export declare function Indicator<T extends ElementType = 'span'>({ tone, ...props }: IndicatorProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): import("react").JSX.Element;
599
+ export declare function Indicator<T extends ElementType = 'span'>({ tone, ...props }: IndicatorProps<T>): import("react").JSX.Element;
597
600
  /** @public */
598
- interface IndicatorStackProps<T extends React.ElementType = 'div'> {
601
+ type IndicatorStackProps<T extends ElementType = 'div'> = Polymorphic<T, {
599
602
  /**
600
603
  * HTML element to render.
601
604
  */
602
605
  as?: T;
603
- }
606
+ }>;
604
607
  /** @public */
605
- export declare function IndicatorStack<T extends ElementType = 'div'>(props: IndicatorStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>): import("react").JSX.Element;
608
+ export declare function IndicatorStack<T extends ElementType = 'div'>(props: IndicatorStackProps<T>): import("react").JSX.Element;
606
609
  /** @deprecated Use HStack component instead */
607
610
  /** @public */
608
- interface InlineProps<T extends React.ElementType = 'div'> extends PaddingProps {
611
+ type InlineProps<T extends ElementType = 'div'> = Polymorphic<T, PaddingProps & {
609
612
  /**
610
613
  * HTML element or component to render.
611
614
  */
@@ -614,12 +617,12 @@ interface InlineProps<T extends React.ElementType = 'div'> extends PaddingProps
614
617
  * Space between children.
615
618
  */
616
619
  gap?: Responsive<SpaceInherit>;
617
- }
620
+ }>;
618
621
  /** @deprecated Use HStack component instead */
619
622
  /** @public */
620
- export declare function Inline<T extends ElementType = 'div'>(props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>): import("react").JSX.Element;
623
+ export declare function Inline<T extends ElementType = 'div'>(props: InlineProps<T>): import("react").JSX.Element;
621
624
  /** @public */
622
- interface KBDProps extends React.ComponentProps<'kbd'> {
625
+ interface KBDProps extends ComponentProps<'kbd'> {
623
626
  /**
624
627
  * Sets KBD's key label.
625
628
  */
@@ -633,7 +636,7 @@ interface KBDProps extends React.ComponentProps<'kbd'> {
633
636
  /** @alpha */
634
637
  export declare function KBD(props: KBDProps): import("react").JSX.Element;
635
638
  /** @beta */
636
- interface LinkProps extends React.ComponentProps<'a'> {
639
+ interface LinkProps extends ComponentProps<'a'> {
637
640
  /**
638
641
  * Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
639
642
  */
@@ -648,29 +651,16 @@ export declare function Link({ underlined, ...props }: LinkProps): import("react
648
651
  declare const LIST_TAG: readonly ["ol", "ul"];
649
652
  type ListTag = (typeof LIST_TAG)[number];
650
653
  /** @beta */
651
- interface ListProps<T extends ListTag = 'ul'> extends Pick<GapProps, 'gap'> {
654
+ type ListProps<T extends ListTag = 'ul'> = Polymorphic<T, Pick<GapProps, 'gap'> & {
652
655
  /**
653
656
  * HTML element to render.
654
657
  */
655
658
  as?: T;
656
- }
659
+ }>;
657
660
  /** @beta */
658
- interface ListItemProps extends React$1.ComponentProps<'li'> {
659
- /**
660
- * Sets horizontal padding, gap, and minimum row height together.
661
- */
662
- density?: Responsive<Density>;
663
- /**
664
- * Slot at the left edge of the row.
665
- */
666
- start?: React$1.ReactNode;
667
- /**
668
- * Slot at the right edge of the row.
669
- */
670
- end?: React$1.ReactNode;
671
- }
661
+ interface ListItemProps extends ComponentProps<'li'> {}
672
662
  /** @beta */
673
- interface ListButtonItemProps<T extends React$1.ElementType = 'button'> extends ListItemProps {
663
+ type ListItemButtonProps<T extends ElementType = 'button'> = Polymorphic<T, {
674
664
  /**
675
665
  * Element or component to render for the press target.
676
666
  */
@@ -678,37 +668,43 @@ interface ListButtonItemProps<T extends React$1.ElementType = 'button'> extends
678
668
  /**
679
669
  * Marks the row as the current selection.
680
670
  */
681
- selected?: boolean;
682
- }
683
- /** @beta */
684
- interface ListItemTextProps<T extends React$1.ElementType = 'div'> {
671
+ current?: boolean;
685
672
  /**
686
- * HTML element to render.
673
+ * Sets horizontal padding, gap, and minimum row height together.
687
674
  */
688
- as?: T;
675
+ density?: Responsive<Density>;
676
+ /**
677
+ * Slot at the left edge of the row.
678
+ */
679
+ start?: ReactNode;
680
+ /**
681
+ * Slot at the right edge of the row.
682
+ */
683
+ end?: ReactNode;
689
684
  /**
690
685
  * Main label.
691
686
  */
692
- title?: React$1.ReactNode;
687
+ text?: ReactNode;
693
688
  /**
694
689
  * Text below the title.
695
690
  */
696
- subtitle?: React$1.ReactNode;
697
- }
698
- declare function ListRoot<T extends ListTag = 'ul'>(props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>): import("react").JSX.Element;
691
+ subtext?: ReactNode;
692
+ }>;
693
+ /** @beta */
694
+ interface ListImageProps extends ComponentProps<'img'> {}
695
+ declare function ListRoot<T extends ListTag = 'ul'>(props: ListProps<T>): import("react").JSX.Element;
699
696
  declare namespace ListRoot {
700
697
  var displayName: string;
701
- var Item: typeof ListItem;
702
- var ButtonItem: typeof ListButtonItem;
703
- var ItemText: typeof ListItemText;
704
- var ItemImage: typeof ListItemImage;
705
698
  }
706
- declare function ListItem({ density, ...props }: ListItemProps): import("react").JSX.Element;
707
- declare function ListButtonItem<T extends ElementType = 'button'>({ density, ...props }: ListButtonItemProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): import("react").JSX.Element;
708
- declare function ListItemText<T extends ElementType = 'div'>(props: ListItemTextProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>): import("react").JSX.Element;
709
- declare function ListItemImage(props: ComponentProps<'img'>): import("react").JSX.Element;
699
+ declare function ListItem({ className, ...rest }: ListItemProps): import("react").JSX.Element;
700
+ declare function ListItemButton<T extends ElementType = 'button'>({ density, ...props }: ListItemButtonProps<T>): import("react").JSX.Element;
701
+ declare function ListItemImage({ className, ...rest }: ListImageProps): import("react").JSX.Element;
710
702
  /** @beta */
711
- export declare const List: typeof ListRoot;
703
+ export declare const List: typeof ListRoot & {
704
+ Item: typeof ListItem;
705
+ ItemButton: typeof ListItemButton;
706
+ ItemImage: typeof ListItemImage;
707
+ };
712
708
  declare const PLACEMENT: readonly ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"];
713
709
  /** @public */
714
710
  type Placement = (typeof PLACEMENT)[number];
@@ -718,27 +714,31 @@ type PlacementProps = {
718
714
  placement?: Placement;
719
715
  };
720
716
  /** @beta */
721
- interface PopoverProps extends Omit<React.ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
717
+ interface PopoverProps extends Omit<ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
722
718
  /**
723
719
  * Shared anchor identifier.
724
720
  * @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
725
721
  */
726
- anchorName?: React.ReactNode;
722
+ anchorName?: ReactNode;
727
723
  /**
728
724
  * The trigger element.
729
725
  * @remarks Popover clones it and attaches the `popovertarget` attribute that opens the floating layer.
730
726
  */
731
- children: React.ReactElement<Record<string, unknown>>;
727
+ children: ReactElement<Record<string, unknown>>;
732
728
  /**
733
729
  * The floating content.
734
730
  */
735
- content?: React.ReactNode;
731
+ content?: ReactNode;
732
+ /**
733
+ * Removes popover padding.
734
+ */
735
+ fullBleed?: boolean;
736
736
  /**
737
737
  * Renders the content into `document.body` through a React portal instead of inline.
738
738
  */
739
739
  portal?: boolean;
740
740
  }
741
- declare function PopoverRoot({ placement, ...props }: PopoverProps & {
741
+ declare function PopoverRoot({ placement, fullBleed, ...props }: PopoverProps & {
742
742
  triggerProps?: Record<string, unknown>;
743
743
  }): import("react").JSX.Element;
744
744
  /** @beta */
@@ -746,16 +746,16 @@ export declare const Popover: typeof PopoverRoot & {
746
746
  forwardsTriggerProps: boolean;
747
747
  };
748
748
  /** @public */
749
- interface PressAreaProps<T extends React.ElementType = 'button'> {
749
+ type PressAreaProps<T extends ElementType = 'button'> = Polymorphic<T, {
750
750
  /**
751
751
  * Element or component to render.
752
752
  */
753
753
  as?: InteractiveAs<T>;
754
- }
754
+ }>;
755
755
  /** @public */
756
- export declare function PressArea<T extends ElementType = 'button'>(props: PressAreaProps<T> & Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>): import("react").JSX.Element;
756
+ export declare function PressArea<T extends ElementType = 'button'>(props: PressAreaProps<T>): import("react").JSX.Element;
757
757
  /** @beta */
758
- interface RadioProps extends React.ComponentProps<'input'> {}
758
+ interface RadioProps extends ComponentProps<'input'> {}
759
759
  /** @beta */
760
760
  export declare function Radio(props: RadioProps): import("react").JSX.Element;
761
761
  declare const FORM_ELEMENT_DENSITY: readonly ["regular", "loose"];
@@ -768,7 +768,7 @@ type FormElementDensityProps = {
768
768
  density?: FormElementDensity;
769
769
  };
770
770
  /** @public */
771
- interface SelectProps extends React.ComponentProps<'select'>, FormElementDensityProps {
771
+ interface SelectProps extends ComponentProps<'select'>, FormElementDensityProps {
772
772
  /**
773
773
  * Used to trigger styling for invalid states.
774
774
  * @remarks Use when form validation fails. Pair with a visible error message.
@@ -778,7 +778,7 @@ interface SelectProps extends React.ComponentProps<'select'>, FormElementDensity
778
778
  /** @public */
779
779
  export declare function Select({ density, hasError, ...props }: SelectProps): import("react").JSX.Element;
780
780
  /** @beta */
781
- interface SkipToContentProps extends React.ComponentProps<'a'> {
781
+ interface SkipToContentProps extends ComponentProps<'a'> {
782
782
  /**
783
783
  * Same-page fragment to jump to.
784
784
  * @remarks Note: The hash character # is required for proper linking.
@@ -797,7 +797,7 @@ interface SkipToContentProps extends React.ComponentProps<'a'> {
797
797
  /** @beta */
798
798
  export declare function SkipToContent(props: SkipToContentProps): import("react").JSX.Element;
799
799
  /** @public */
800
- interface SpinnerProps extends React.ComponentProps<'svg'> {
800
+ interface SpinnerProps extends ComponentProps<'svg'> {
801
801
  /**
802
802
  * Size of the spinner icon.
803
803
  */
@@ -806,7 +806,7 @@ interface SpinnerProps extends React.ComponentProps<'svg'> {
806
806
  /** @public */
807
807
  export declare function Spinner({ size, ...props }: SpinnerProps): import("react").JSX.Element;
808
808
  /** @beta */
809
- interface SwitchProps extends React.ComponentProps<'input'> {
809
+ interface SwitchProps extends ComponentProps<'input'> {
810
810
  /**
811
811
  * Applies error styling to the switch track for invalid states.
812
812
  * @remarks Use when form validation fails. Pair with a visible error message.
@@ -816,7 +816,7 @@ interface SwitchProps extends React.ComponentProps<'input'> {
816
816
  /** @beta */
817
817
  export declare function Switch(props: SwitchProps): import("react").JSX.Element;
818
818
  /** @public */
819
- interface TabsProps extends React.ComponentProps<'div'> {
819
+ interface TabsProps extends ComponentProps<'div'> {
820
820
  /** The `value` of the active Tabs.Tab */
821
821
  value: string;
822
822
  /** An updater function to set `value` - will be invoked with the `value` of the selected Tabs.Tab */
@@ -830,18 +830,18 @@ type TabsListLabelProps = {
830
830
  'aria-labelledby'?: never;
831
831
  };
832
832
  /** @public */
833
- type TabsListProps = Omit<React.ComponentProps<'div'>, 'id' | 'role'> & TabsListLabelProps;
833
+ type TabsListProps = Omit<ComponentProps<'div'>, 'id' | 'role'> & TabsListLabelProps;
834
834
  /** @public */
835
- interface TabProps extends Omit<React.ComponentProps<'button'>, 'aria-disabled' | 'disabled' | 'id' | 'role'>, ToneProps {
835
+ interface TabProps extends Omit<ComponentProps<'button'>, 'aria-disabled' | 'disabled' | 'id' | 'role'>, ToneProps {
836
836
  /** Optional icon for the tab */
837
- icon?: React.ElementType | React.ReactNode;
837
+ icon?: ElementType | ReactNode;
838
838
  /** Text label to display in the tab */
839
839
  label: string;
840
840
  /** Unique string used to identify this tab and its matching Tabs.Panel */
841
841
  value: string;
842
842
  }
843
843
  /** @public */
844
- interface TabsPanelProps extends Omit<React.ComponentProps<'div'>, 'id' | 'role'>, LayoutProps {
844
+ interface TabsPanelProps extends Omit<ComponentProps<'div'>, 'id' | 'role'>, LayoutProps {
845
845
  /** Unique string used to identify this panel and its matching Tabs.Tab */
846
846
  value: string;
847
847
  }
@@ -860,7 +860,7 @@ declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
860
860
  /** @public */
861
861
  type TextSize = (typeof TEXT_SIZE)[number];
862
862
  /** @public */
863
- interface TextProps<T extends React.ElementType = 'span'> extends TypographyProps {
863
+ type TextProps<T extends ElementType = 'span'> = Polymorphic<T, MarginProps & ToneProps & TypographyProps & {
864
864
  /**
865
865
  * HTML element to render.
866
866
  */
@@ -869,11 +869,11 @@ interface TextProps<T extends React.ElementType = 'span'> extends TypographyProp
869
869
  * Sets font size.
870
870
  */
871
871
  size?: Responsive<TextSize>;
872
- }
872
+ }>;
873
873
  /** @public */
874
- export declare function Text<T extends ElementType = 'span'>({ size, ...props }: TextProps<T> & Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): import("react").JSX.Element;
874
+ export declare function Text<T extends ElementType = 'span'>({ size, ...props }: TextProps<T>): import("react").JSX.Element;
875
875
  /** @public */
876
- interface TextAreaProps extends React.ComponentProps<'textarea'>, FormElementDensityProps, Pick<HeightProps, 'maxHeight'> {
876
+ interface TextAreaProps extends ComponentProps<'textarea'>, FormElementDensityProps, Pick<HeightProps, 'maxHeight'> {
877
877
  /**
878
878
  * Sizes the textarea to its content via the CSS `field-sizing` property.
879
879
  */
@@ -893,9 +893,9 @@ declare const TEXT_INPUT_EXCLUDED_TYPES: readonly ["button", "checkbox", "color"
893
893
  /** @public */
894
894
  type TextInputExcludedTypes = (typeof TEXT_INPUT_EXCLUDED_TYPES)[number];
895
895
  /** @public */
896
- type TextInputType = Exclude<React.HTMLInputTypeAttribute, TextInputExcludedTypes>;
896
+ type TextInputType = Exclude<HTMLInputTypeAttribute, TextInputExcludedTypes>;
897
897
  /** @public */
898
- interface TextInputProps extends Omit<React.ComponentProps<'input'>, 'type'>, FormElementDensityProps {
898
+ interface TextInputProps extends Omit<ComponentProps<'input'>, 'type'>, FormElementDensityProps {
899
899
  /**
900
900
  * Used to trigger styling for invalid states.
901
901
  * @remarks Use when form validation fails. Pair with a visible error message.
@@ -909,19 +909,19 @@ interface TextInputProps extends Omit<React.ComponentProps<'input'>, 'type'>, Fo
909
909
  /** @public */
910
910
  export declare function TextInput({ density, hasError, type, ...props }: TextInputProps): import("react").JSX.Element;
911
911
  /** @beta */
912
- interface TooltipProps extends Omit<React.ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
912
+ interface TooltipProps extends Omit<ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
913
913
  /**
914
914
  * Shared anchor identifier.
915
915
  */
916
- anchorName?: React.ReactNode;
916
+ anchorName?: ReactNode;
917
917
  /**
918
918
  * The trigger element.
919
919
  */
920
- children: React.ReactElement<Record<string, unknown>>;
920
+ children: ReactElement<Record<string, unknown>>;
921
921
  /**
922
922
  * The tooltip label.
923
923
  */
924
- content?: React.ReactNode;
924
+ content?: ReactNode;
925
925
  /**
926
926
  * Renders the label into `document.body` through a React portal instead of inline.
927
927
  */
@@ -933,20 +933,20 @@ declare function TooltipRoot({ placement, ...props }: TooltipProps & {
933
933
  /** @beta */
934
934
  export declare const Tooltip: typeof TooltipRoot;
935
935
  /** @public */
936
- interface TooltipGroupProps<T extends React.ElementType = 'div'> {
936
+ type TooltipGroupProps<T extends ElementType = 'div'> = Polymorphic<T, {
937
937
  /**
938
938
  * HTML element to render.
939
939
  */
940
940
  as?: T;
941
- }
941
+ }>;
942
942
  /** @public */
943
- export declare function TooltipGroup<T extends ElementType = 'div'>(props: TooltipGroupProps<T> & Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>): import("react").JSX.Element;
943
+ export declare function TooltipGroup<T extends ElementType = 'div'>(props: TooltipGroupProps<T>): import("react").JSX.Element;
944
944
  /** @public */
945
- interface VStackProps<T extends React.ElementType = 'div'> extends Pick<FlexProps<T>, 'as' | 'gap'> {}
945
+ type VStackProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexProps<T>, 'as' | 'gap'>>;
946
946
  /** @public */
947
- export declare function VStack<T extends ElementType = 'div'>({ className, ...props }: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>): import("react").JSX.Element;
947
+ export declare function VStack<T extends ElementType = 'div'>({ className, ...props }: VStackProps<T>): import("react").JSX.Element;
948
948
  /** @public */
949
- interface VisuallyHiddenProps<T extends React.ElementType = 'span'> {
949
+ type VisuallyHiddenProps<T extends ElementType = 'span'> = Polymorphic<T, {
950
950
  /**
951
951
  * HTML element to render.
952
952
  */
@@ -955,10 +955,10 @@ interface VisuallyHiddenProps<T extends React.ElementType = 'span'> {
955
955
  * If true, the element becomes visible on `:focus-visible`.
956
956
  */
957
957
  visibleOnFocus?: boolean;
958
- }
958
+ }>;
959
959
  /** @public */
960
- export declare function VisuallyHidden<T extends ElementType = 'span'>(props: VisuallyHiddenProps<T> & Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>): import("react").JSX.Element;
960
+ export declare function VisuallyHidden<T extends ElementType = 'span'>(props: VisuallyHiddenProps<T>): import("react").JSX.Element;
961
961
  /** @public */
962
962
  export declare function useIsClient(): boolean;
963
- export type { AlignItems, AvatarCounterProps, AvatarProps, AvatarStackProps, BadgeProps, BoxProps, ButtonProps, CardProps, CheckboxProps, CodeProps, CodeSize, ContainerProps, ContainerSize, Density, DialogProps, DisplayBlock, DisplayFlex, DisplayGrid, DividerProps, EyebrowProps, EyebrowSize, FlexDirection, FlexParentProps, FlexProps, FlexWrap, FontWeight, GapProps, GridAutoFlow, GridParentProps, GridProps, HStackProps, HeadingProps, HeadingSize, HotkeysProps, IconButtonProps, IconProps, IconSize, IndicatorProps, IndicatorStackProps, InlineProps, JustifyContent, KBDProps, LayoutProps, LinkProps, ListButtonItemProps, ListItemProps, ListItemTextProps, ListProps, MarginProps, Overflow, PaddingProps, Placement, PlacementProps, PopoverProps, Position, PressAreaProps, RadioProps, Radius, Responsive, SelectProps, Shadow, SkipToContentProps, Space, SpaceAuto, SpaceAutoNegative, SpaceInherit, SpinnerProps, SwitchProps, TabProps, TabsListProps, TabsPanelProps, TabsProps, TextAlign, TextAreaProps, TextInputProps, TextProps, TextSize, Tone, TooltipGroupProps, TooltipProps, TypographyProps, VStackProps, VisuallyHiddenProps };
963
+ export type { AlignItems, AvatarCounterProps, AvatarProps, AvatarStackProps, BadgeProps, BoxProps, ButtonProps, CardProps, CheckboxProps, CodeProps, CodeSize, ContainerProps, ContainerSize, Density, DialogContentProps, DialogFooterProps, DialogProps, DisplayBlock, DisplayFlex, DisplayGrid, DividerProps, EyebrowProps, EyebrowSize, FlexDirection, FlexParentProps, FlexProps, FlexWrap, FontWeight, GapProps, GridAutoFlow, GridParentProps, GridProps, HStackProps, HeadingProps, HeadingSize, HotkeysProps, IconButtonProps, IconProps, IconSize, IndicatorProps, IndicatorStackProps, InlineProps, JustifyContent, KBDProps, LayoutProps, LinkProps, ListImageProps, ListItemButtonProps, ListItemProps, ListProps, MarginProps, Overflow, PaddingProps, Placement, PlacementProps, PopoverProps, Position, PressAreaProps, RadioProps, Radius, Responsive, SelectProps, Shadow, SkipToContentProps, Space, SpaceAuto, SpaceAutoNegative, SpaceInherit, SpinnerProps, SwitchProps, TabProps, TabsListProps, TabsPanelProps, TabsProps, TextAlign, TextAreaProps, TextInputProps, TextProps, TextSize, Tone, TooltipGroupProps, TooltipProps, TypographyProps, VStackProps, VisuallyHiddenProps };
964
964
  //# sourceMappingURL=index.d.ts.map