@sanity/ui 5.0.0-alpha.22 → 5.0.0-alpha.24

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 (377) hide show
  1. package/README.md +10 -0
  2. package/dist/index.d.ts +15 -7
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +76 -59
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles.css +1 -1
  7. package/docs/components/avatar-counter.dsds.yaml +78 -0
  8. package/docs/components/avatar-stack.dsds.yaml +96 -0
  9. package/docs/components/avatar.dsds.yaml +115 -0
  10. package/docs/components/badge.dsds.yaml +126 -0
  11. package/docs/components/box.dsds.yaml +223 -0
  12. package/docs/components/button.dsds.yaml +296 -0
  13. package/docs/components/card.dsds.yaml +317 -0
  14. package/docs/components/checkbox.dsds.yaml +204 -0
  15. package/docs/components/code.dsds.yaml +169 -0
  16. package/docs/components/container.dsds.yaml +189 -0
  17. package/docs/components/dialog.dsds.yaml +343 -0
  18. package/docs/components/divider.dsds.yaml +93 -0
  19. package/docs/components/eyebrow.dsds.yaml +198 -0
  20. package/docs/components/flex.dsds.yaml +237 -0
  21. package/docs/components/grid.dsds.yaml +217 -0
  22. package/docs/components/h-stack.dsds.yaml +127 -0
  23. package/docs/components/heading.dsds.yaml +233 -0
  24. package/docs/components/hotkeys.dsds.yaml +60 -0
  25. package/docs/components/icon-button.dsds.yaml +227 -0
  26. package/docs/components/icon.dsds.yaml +275 -0
  27. package/docs/components/indicator-stack.dsds.yaml +98 -0
  28. package/docs/components/indicator.dsds.yaml +108 -0
  29. package/docs/components/inline.dsds.yaml +127 -0
  30. package/docs/components/kbd.dsds.yaml +59 -0
  31. package/docs/components/link.dsds.yaml +108 -0
  32. package/docs/components/list-button-item.dsds.yaml +103 -0
  33. package/docs/components/list-item-image.dsds.yaml +82 -0
  34. package/docs/components/list-item-text.dsds.yaml +80 -0
  35. package/docs/components/list-item.dsds.yaml +148 -0
  36. package/docs/components/list.dsds.yaml +162 -0
  37. package/docs/components/popover.dsds.yaml +214 -0
  38. package/docs/components/press-area.dsds.yaml +279 -0
  39. package/docs/components/radio.dsds.yaml +198 -0
  40. package/docs/components/select.dsds.yaml +214 -0
  41. package/docs/components/skip-to-content.dsds.yaml +110 -0
  42. package/docs/components/spinner.dsds.yaml +119 -0
  43. package/docs/components/switch.dsds.yaml +202 -0
  44. package/docs/components/tab.dsds.yaml +54 -0
  45. package/docs/components/tabs-list.dsds.yaml +56 -0
  46. package/docs/components/tabs-panel.dsds.yaml +54 -0
  47. package/docs/components/tabs.dsds.yaml +104 -0
  48. package/docs/components/text-area.dsds.yaml +170 -0
  49. package/docs/components/text-input.dsds.yaml +189 -0
  50. package/docs/components/text.dsds.yaml +268 -0
  51. package/docs/components/tooltip-group.dsds.yaml +90 -0
  52. package/docs/components/tooltip.dsds.yaml +216 -0
  53. package/docs/components/v-stack.dsds.yaml +155 -0
  54. package/docs/components/visually-hidden.dsds.yaml +112 -0
  55. package/docs/evals/cases.yaml +1319 -0
  56. package/docs/examples/checkbox-2.tsx +57 -0
  57. package/docs/examples/confirmation-dialogs-1.tsx +27 -0
  58. package/docs/examples/confirmation-dialogs-2.tsx +55 -0
  59. package/docs/examples/confirmation-dialogs-3.tsx +28 -0
  60. package/docs/examples/confirmation-dialogs-4.tsx +38 -0
  61. package/docs/examples/popover-1.tsx +48 -0
  62. package/docs/examples/popover-2.tsx +53 -0
  63. package/docs/foundations/accessibility-guidelines.dsds.yaml +301 -0
  64. package/docs/foundations/color-guidelines.dsds.yaml +308 -0
  65. package/docs/foundations/content-guidelines.dsds.yaml +285 -0
  66. package/docs/foundations/semantics.dsds.yaml +125 -0
  67. package/docs/foundations/spacing-guidelines.dsds.yaml +226 -0
  68. package/docs/foundations/typography-guidelines.dsds.yaml +322 -0
  69. package/docs/icons/icon-access-denied.dsds.yaml +40 -0
  70. package/docs/icons/icon-activity.dsds.yaml +40 -0
  71. package/docs/icons/icon-add-circle.dsds.yaml +14 -0
  72. package/docs/icons/icon-add-comment.dsds.yaml +34 -0
  73. package/docs/icons/icon-add-document.dsds.yaml +34 -0
  74. package/docs/icons/icon-add-user.dsds.yaml +30 -0
  75. package/docs/icons/icon-add.dsds.yaml +57 -0
  76. package/docs/icons/icon-api.dsds.yaml +17 -0
  77. package/docs/icons/icon-archive.dsds.yaml +44 -0
  78. package/docs/icons/icon-arrow-down.dsds.yaml +38 -0
  79. package/docs/icons/icon-arrow-left.dsds.yaml +32 -0
  80. package/docs/icons/icon-arrow-right.dsds.yaml +32 -0
  81. package/docs/icons/icon-arrow-top-right.dsds.yaml +32 -0
  82. package/docs/icons/icon-arrow-up.dsds.yaml +44 -0
  83. package/docs/icons/icon-asterisk.dsds.yaml +18 -0
  84. package/docs/icons/icon-bar-chart.dsds.yaml +40 -0
  85. package/docs/icons/icon-basket.dsds.yaml +14 -0
  86. package/docs/icons/icon-bell.dsds.yaml +30 -0
  87. package/docs/icons/icon-bill.dsds.yaml +40 -0
  88. package/docs/icons/icon-binary-document.dsds.yaml +30 -0
  89. package/docs/icons/icon-block-content.dsds.yaml +30 -0
  90. package/docs/icons/icon-block-element.dsds.yaml +32 -0
  91. package/docs/icons/icon-blockquote.dsds.yaml +32 -0
  92. package/docs/icons/icon-bold.dsds.yaml +28 -0
  93. package/docs/icons/icon-bolt.dsds.yaml +18 -0
  94. package/docs/icons/icon-book.dsds.yaml +34 -0
  95. package/docs/icons/icon-bookmark-filled.dsds.yaml +14 -0
  96. package/docs/icons/icon-bookmark.dsds.yaml +14 -0
  97. package/docs/icons/icon-bottle.dsds.yaml +18 -0
  98. package/docs/icons/icon-bug.dsds.yaml +28 -0
  99. package/docs/icons/icon-bulb-filled.dsds.yaml +14 -0
  100. package/docs/icons/icon-bulb-outline.dsds.yaml +30 -0
  101. package/docs/icons/icon-calendar.dsds.yaml +36 -0
  102. package/docs/icons/icon-case.dsds.yaml +18 -0
  103. package/docs/icons/icon-chart-upward.dsds.yaml +40 -0
  104. package/docs/icons/icon-checkmark-circle.dsds.yaml +40 -0
  105. package/docs/icons/icon-checkmark.dsds.yaml +36 -0
  106. package/docs/icons/icon-chevron-down.dsds.yaml +46 -0
  107. package/docs/icons/icon-chevron-left.dsds.yaml +42 -0
  108. package/docs/icons/icon-chevron-right.dsds.yaml +42 -0
  109. package/docs/icons/icon-chevron-up.dsds.yaml +44 -0
  110. package/docs/icons/icon-circle.dsds.yaml +28 -0
  111. package/docs/icons/icon-clipboard-image.dsds.yaml +30 -0
  112. package/docs/icons/icon-clipboard.dsds.yaml +34 -0
  113. package/docs/icons/icon-clock.dsds.yaml +39 -0
  114. package/docs/icons/icon-close-circle.dsds.yaml +18 -0
  115. package/docs/icons/icon-close.dsds.yaml +51 -0
  116. package/docs/icons/icon-code-block.dsds.yaml +38 -0
  117. package/docs/icons/icon-code.dsds.yaml +40 -0
  118. package/docs/icons/icon-cog.dsds.yaml +38 -0
  119. package/docs/icons/icon-collapse.dsds.yaml +40 -0
  120. package/docs/icons/icon-color-wheel.dsds.yaml +30 -0
  121. package/docs/icons/icon-comment.dsds.yaml +38 -0
  122. package/docs/icons/icon-component.dsds.yaml +18 -0
  123. package/docs/icons/icon-compose-sparkles.dsds.yaml +36 -0
  124. package/docs/icons/icon-compose.dsds.yaml +38 -0
  125. package/docs/icons/icon-confetti.dsds.yaml +18 -0
  126. package/docs/icons/icon-controls.dsds.yaml +36 -0
  127. package/docs/icons/icon-copy.dsds.yaml +31 -0
  128. package/docs/icons/icon-credit-card.dsds.yaml +18 -0
  129. package/docs/icons/icon-crop.dsds.yaml +32 -0
  130. package/docs/icons/icon-cube.dsds.yaml +36 -0
  131. package/docs/icons/icon-dashboard.dsds.yaml +34 -0
  132. package/docs/icons/icon-database.dsds.yaml +40 -0
  133. package/docs/icons/icon-desktop.dsds.yaml +31 -0
  134. package/docs/icons/icon-diamond.dsds.yaml +18 -0
  135. package/docs/icons/icon-document-pdf.dsds.yaml +34 -0
  136. package/docs/icons/icon-document-remove.dsds.yaml +30 -0
  137. package/docs/icons/icon-document-sheet.dsds.yaml +34 -0
  138. package/docs/icons/icon-document-text.dsds.yaml +30 -0
  139. package/docs/icons/icon-document-video.dsds.yaml +30 -0
  140. package/docs/icons/icon-document-word.dsds.yaml +34 -0
  141. package/docs/icons/icon-document-zip.dsds.yaml +30 -0
  142. package/docs/icons/icon-document.dsds.yaml +52 -0
  143. package/docs/icons/icon-documents.dsds.yaml +30 -0
  144. package/docs/icons/icon-dot.dsds.yaml +32 -0
  145. package/docs/icons/icon-double-chevron-down.dsds.yaml +38 -0
  146. package/docs/icons/icon-double-chevron-left.dsds.yaml +34 -0
  147. package/docs/icons/icon-double-chevron-right.dsds.yaml +34 -0
  148. package/docs/icons/icon-double-chevron-up.dsds.yaml +36 -0
  149. package/docs/icons/icon-double-quote.dsds.yaml +14 -0
  150. package/docs/icons/icon-download.dsds.yaml +40 -0
  151. package/docs/icons/icon-drag-handle.dsds.yaml +28 -0
  152. package/docs/icons/icon-drop.dsds.yaml +30 -0
  153. package/docs/icons/icon-earth-americas.dsds.yaml +34 -0
  154. package/docs/icons/icon-earth-globe.dsds.yaml +34 -0
  155. package/docs/icons/icon-edit.dsds.yaml +34 -0
  156. package/docs/icons/icon-ellipsis-horizontal.dsds.yaml +32 -0
  157. package/docs/icons/icon-ellipsis-vertical.dsds.yaml +14 -0
  158. package/docs/icons/icon-empty.dsds.yaml +28 -0
  159. package/docs/icons/icon-enter-right.dsds.yaml +18 -0
  160. package/docs/icons/icon-enter.dsds.yaml +18 -0
  161. package/docs/icons/icon-envelope.dsds.yaml +34 -0
  162. package/docs/icons/icon-equal.dsds.yaml +14 -0
  163. package/docs/icons/icon-error-filled.dsds.yaml +14 -0
  164. package/docs/icons/icon-error-outline.dsds.yaml +38 -0
  165. package/docs/icons/icon-error-screen.dsds.yaml +14 -0
  166. package/docs/icons/icon-expand.dsds.yaml +36 -0
  167. package/docs/icons/icon-eye-closed.dsds.yaml +38 -0
  168. package/docs/icons/icon-eye-open.dsds.yaml +38 -0
  169. package/docs/icons/icon-face-happy.dsds.yaml +14 -0
  170. package/docs/icons/icon-face-indifferent.dsds.yaml +14 -0
  171. package/docs/icons/icon-face-sad.dsds.yaml +14 -0
  172. package/docs/icons/icon-feedback.dsds.yaml +30 -0
  173. package/docs/icons/icon-filter.dsds.yaml +38 -0
  174. package/docs/icons/icon-folder.dsds.yaml +36 -0
  175. package/docs/icons/icon-generate.dsds.yaml +18 -0
  176. package/docs/icons/icon-github.dsds.yaml +14 -0
  177. package/docs/icons/icon-groq.dsds.yaml +31 -0
  178. package/docs/icons/icon-hash.dsds.yaml +18 -0
  179. package/docs/icons/icon-heart-filled.dsds.yaml +18 -0
  180. package/docs/icons/icon-heart.dsds.yaml +18 -0
  181. package/docs/icons/icon-help-circle.dsds.yaml +38 -0
  182. package/docs/icons/icon-highlight.dsds.yaml +18 -0
  183. package/docs/icons/icon-home.dsds.yaml +28 -0
  184. package/docs/icons/icon-ice-cream.dsds.yaml +18 -0
  185. package/docs/icons/icon-image-remove.dsds.yaml +32 -0
  186. package/docs/icons/icon-image.dsds.yaml +36 -0
  187. package/docs/icons/icon-images.dsds.yaml +34 -0
  188. package/docs/icons/icon-inbox.dsds.yaml +14 -0
  189. package/docs/icons/icon-info-filled.dsds.yaml +14 -0
  190. package/docs/icons/icon-info-outline.dsds.yaml +38 -0
  191. package/docs/icons/icon-inline-element.dsds.yaml +32 -0
  192. package/docs/icons/icon-inline.dsds.yaml +18 -0
  193. package/docs/icons/icon-insert-above.dsds.yaml +32 -0
  194. package/docs/icons/icon-insert-below.dsds.yaml +32 -0
  195. package/docs/icons/icon-italic.dsds.yaml +28 -0
  196. package/docs/icons/icon-joystick.dsds.yaml +18 -0
  197. package/docs/icons/icon-json.dsds.yaml +36 -0
  198. package/docs/icons/icon-launch.dsds.yaml +34 -0
  199. package/docs/icons/icon-leave.dsds.yaml +35 -0
  200. package/docs/icons/icon-lemon.dsds.yaml +18 -0
  201. package/docs/icons/icon-link-removed.dsds.yaml +30 -0
  202. package/docs/icons/icon-link.dsds.yaml +36 -0
  203. package/docs/icons/icon-linkedin.dsds.yaml +14 -0
  204. package/docs/icons/icon-list.dsds.yaml +14 -0
  205. package/docs/icons/icon-lock.dsds.yaml +39 -0
  206. package/docs/icons/icon-logo-js.dsds.yaml +18 -0
  207. package/docs/icons/icon-logo-ts.dsds.yaml +18 -0
  208. package/docs/icons/icon-marker-removed.dsds.yaml +14 -0
  209. package/docs/icons/icon-marker.dsds.yaml +14 -0
  210. package/docs/icons/icon-master-detail.dsds.yaml +28 -0
  211. package/docs/icons/icon-menu.dsds.yaml +40 -0
  212. package/docs/icons/icon-microphone-slash.dsds.yaml +14 -0
  213. package/docs/icons/icon-microphone.dsds.yaml +14 -0
  214. package/docs/icons/icon-mobile-device.dsds.yaml +32 -0
  215. package/docs/icons/icon-moon.dsds.yaml +30 -0
  216. package/docs/icons/icon-number.dsds.yaml +30 -0
  217. package/docs/icons/icon-ok-hand.dsds.yaml +18 -0
  218. package/docs/icons/icon-olist.dsds.yaml +36 -0
  219. package/docs/icons/icon-overage.dsds.yaml +42 -0
  220. package/docs/icons/icon-package.dsds.yaml +34 -0
  221. package/docs/icons/icon-panel-left.dsds.yaml +38 -0
  222. package/docs/icons/icon-panel-right.dsds.yaml +40 -0
  223. package/docs/icons/icon-pause.dsds.yaml +32 -0
  224. package/docs/icons/icon-pin-filled.dsds.yaml +28 -0
  225. package/docs/icons/icon-pin-removed.dsds.yaml +14 -0
  226. package/docs/icons/icon-pin.dsds.yaml +32 -0
  227. package/docs/icons/icon-play.dsds.yaml +32 -0
  228. package/docs/icons/icon-plug.dsds.yaml +35 -0
  229. package/docs/icons/icon-presentation.dsds.yaml +18 -0
  230. package/docs/icons/icon-progress50.dsds.yaml +14 -0
  231. package/docs/icons/icon-progress75.dsds.yaml +14 -0
  232. package/docs/icons/icon-projects.dsds.yaml +14 -0
  233. package/docs/icons/icon-publish.dsds.yaml +38 -0
  234. package/docs/icons/icon-read-only.dsds.yaml +36 -0
  235. package/docs/icons/icon-redo.dsds.yaml +38 -0
  236. package/docs/icons/icon-refresh.dsds.yaml +38 -0
  237. package/docs/icons/icon-remove-circle.dsds.yaml +14 -0
  238. package/docs/icons/icon-remove.dsds.yaml +30 -0
  239. package/docs/icons/icon-reset.dsds.yaml +40 -0
  240. package/docs/icons/icon-restore.dsds.yaml +45 -0
  241. package/docs/icons/icon-retrieve.dsds.yaml +14 -0
  242. package/docs/icons/icon-retry.dsds.yaml +14 -0
  243. package/docs/icons/icon-revert.dsds.yaml +14 -0
  244. package/docs/icons/icon-robot.dsds.yaml +17 -0
  245. package/docs/icons/icon-rocket.dsds.yaml +34 -0
  246. package/docs/icons/icon-schema.dsds.yaml +36 -0
  247. package/docs/icons/icon-search.dsds.yaml +34 -0
  248. package/docs/icons/icon-select.dsds.yaml +38 -0
  249. package/docs/icons/icon-share.dsds.yaml +36 -0
  250. package/docs/icons/icon-sort.dsds.yaml +40 -0
  251. package/docs/icons/icon-sparkle.dsds.yaml +26 -0
  252. package/docs/icons/icon-sparkles.dsds.yaml +34 -0
  253. package/docs/icons/icon-spinner.dsds.yaml +38 -0
  254. package/docs/icons/icon-split-horizontal.dsds.yaml +32 -0
  255. package/docs/icons/icon-split-vertical.dsds.yaml +30 -0
  256. package/docs/icons/icon-square.dsds.yaml +18 -0
  257. package/docs/icons/icon-stack-compact.dsds.yaml +30 -0
  258. package/docs/icons/icon-stack.dsds.yaml +44 -0
  259. package/docs/icons/icon-star-filled.dsds.yaml +48 -0
  260. package/docs/icons/icon-star.dsds.yaml +51 -0
  261. package/docs/icons/icon-stop.dsds.yaml +32 -0
  262. package/docs/icons/icon-strikethrough.dsds.yaml +28 -0
  263. package/docs/icons/icon-string.dsds.yaml +38 -0
  264. package/docs/icons/icon-sun.dsds.yaml +30 -0
  265. package/docs/icons/icon-sync.dsds.yaml +36 -0
  266. package/docs/icons/icon-tablet-device.dsds.yaml +30 -0
  267. package/docs/icons/icon-tag.dsds.yaml +32 -0
  268. package/docs/icons/icon-tags.dsds.yaml +36 -0
  269. package/docs/icons/icon-target.dsds.yaml +14 -0
  270. package/docs/icons/icon-task.dsds.yaml +30 -0
  271. package/docs/icons/icon-terminal.dsds.yaml +30 -0
  272. package/docs/icons/icon-text.dsds.yaml +32 -0
  273. package/docs/icons/icon-th-large.dsds.yaml +34 -0
  274. package/docs/icons/icon-th-list.dsds.yaml +30 -0
  275. package/docs/icons/icon-thumbs-down.dsds.yaml +27 -0
  276. package/docs/icons/icon-thumbs-up.dsds.yaml +30 -0
  277. package/docs/icons/icon-tiers.dsds.yaml +18 -0
  278. package/docs/icons/icon-timeline.dsds.yaml +32 -0
  279. package/docs/icons/icon-toggle-arrow-right.dsds.yaml +39 -0
  280. package/docs/icons/icon-token.dsds.yaml +30 -0
  281. package/docs/icons/icon-transfer.dsds.yaml +32 -0
  282. package/docs/icons/icon-translate.dsds.yaml +32 -0
  283. package/docs/icons/icon-trash.dsds.yaml +34 -0
  284. package/docs/icons/icon-trend-upward.dsds.yaml +42 -0
  285. package/docs/icons/icon-triangle-outline.dsds.yaml +18 -0
  286. package/docs/icons/icon-trolley.dsds.yaml +18 -0
  287. package/docs/icons/icon-truncate.dsds.yaml +18 -0
  288. package/docs/icons/icon-twitter.dsds.yaml +18 -0
  289. package/docs/icons/icon-ulist.dsds.yaml +36 -0
  290. package/docs/icons/icon-unarchive.dsds.yaml +32 -0
  291. package/docs/icons/icon-underline.dsds.yaml +28 -0
  292. package/docs/icons/icon-undo.dsds.yaml +34 -0
  293. package/docs/icons/icon-unknown.dsds.yaml +36 -0
  294. package/docs/icons/icon-unlink.dsds.yaml +32 -0
  295. package/docs/icons/icon-unlock.dsds.yaml +41 -0
  296. package/docs/icons/icon-unpublish.dsds.yaml +38 -0
  297. package/docs/icons/icon-upload.dsds.yaml +40 -0
  298. package/docs/icons/icon-user.dsds.yaml +34 -0
  299. package/docs/icons/icon-users.dsds.yaml +34 -0
  300. package/docs/icons/icon-versions.dsds.yaml +14 -0
  301. package/docs/icons/icon-video.dsds.yaml +32 -0
  302. package/docs/icons/icon-warning-filled.dsds.yaml +14 -0
  303. package/docs/icons/icon-warning-outline.dsds.yaml +38 -0
  304. package/docs/icons/icon-wrench.dsds.yaml +18 -0
  305. package/docs/icons.dsds.yaml +768 -0
  306. package/docs/index.dsds.yaml +506 -0
  307. package/docs/overview/api-essentials.dsds.yaml +221 -0
  308. package/docs/overview/component-reference.dsds.yaml +213 -0
  309. package/docs/overview/installation.dsds.yaml +254 -0
  310. package/docs/overview/quick-start.dsds.yaml +317 -0
  311. package/docs/patterns/confirmation-dialogs.dsds.yaml +140 -0
  312. package/docs/patterns/error-messaging.dsds.yaml +58 -0
  313. package/docs/patterns/forms.dsds.yaml +362 -0
  314. package/docs/patterns/layouts.dsds.yaml +403 -0
  315. package/docs/patterns/loading-states.dsds.yaml +41 -0
  316. package/docs/patterns/messaging.dsds.yaml +72 -0
  317. package/docs/patterns/navigation.dsds.yaml +153 -0
  318. package/docs/patterns/responsive.dsds.yaml +590 -0
  319. package/docs/tokens/color.dsds.yaml +1158 -0
  320. package/docs/tokens/container-widths.dsds.yaml +131 -0
  321. package/docs/tokens/content.dsds.yaml +258 -0
  322. package/docs/tokens/content.tokens.json +180 -0
  323. package/docs/tokens/dtcg/README.md +41 -0
  324. package/docs/tokens/dtcg/css/color.css +107 -0
  325. package/docs/tokens/dtcg/css/container.css +12 -0
  326. package/docs/tokens/dtcg/css/fontFamily.css +10 -0
  327. package/docs/tokens/dtcg/css/fontWeight.css +10 -0
  328. package/docs/tokens/dtcg/css/index.css +12 -0
  329. package/docs/tokens/dtcg/css/radius.css +14 -0
  330. package/docs/tokens/dtcg/css/semantic.css +42 -0
  331. package/docs/tokens/dtcg/css/shadow.css +22 -0
  332. package/docs/tokens/dtcg/css/space.css +16 -0
  333. package/docs/tokens/dtcg/css/typography.css +67 -0
  334. package/docs/tokens/dtcg/json/color.tokens.json +911 -0
  335. package/docs/tokens/dtcg/json/container.tokens.json +44 -0
  336. package/docs/tokens/dtcg/json/fontFamily.tokens.json +10 -0
  337. package/docs/tokens/dtcg/json/fontWeight.tokens.json +18 -0
  338. package/docs/tokens/dtcg/json/radius.tokens.json +58 -0
  339. package/docs/tokens/dtcg/json/semantic.tokens.json +372 -0
  340. package/docs/tokens/dtcg/json/shadow.tokens.json +599 -0
  341. package/docs/tokens/dtcg/json/space.tokens.json +72 -0
  342. package/docs/tokens/dtcg/json/typography.tokens.json +354 -0
  343. package/docs/tokens/font-family.dsds.yaml +79 -0
  344. package/docs/tokens/font-weight.dsds.yaml +103 -0
  345. package/docs/tokens/radius.dsds.yaml +153 -0
  346. package/docs/tokens/semantic.dsds.yaml +397 -0
  347. package/docs/tokens/shadow.dsds.yaml +125 -0
  348. package/docs/tokens/space.dsds.yaml +185 -0
  349. package/docs/tokens/typography.dsds.yaml +316 -0
  350. package/llms.txt +108 -0
  351. package/package.json +6 -3
  352. package/skills/sanity-ui-5/SKILL.md +158 -0
  353. package/skills/sanity-ui-5/references/component-choice.md +37 -0
  354. package/skills/sanity-ui-5/references/components.md +145 -0
  355. package/skills/sanity-ui-5/references/forms-and-accessibility.md +189 -0
  356. package/skills/sanity-ui-5/references/migrating-from-v3.md +250 -0
  357. package/skills/sanity-ui-5/references/props-and-imports.md +169 -0
  358. package/skills/sanity-ui-5/references/setup.md +177 -0
  359. package/skills/sanity-ui-5/references/silent-failures.md +33 -0
  360. package/skills/sanity-ui-5/references/taste.md +53 -0
  361. package/skills/sanity-ui-5/references/tone-and-color.md +55 -0
  362. package/src/components/button/Button.tsx +14 -3
  363. package/src/components/button/button.css +23 -25
  364. package/src/components/button/button.props.ts +4 -0
  365. package/src/components/code/code.props.ts +3 -2
  366. package/src/components/eyebrow/Eyebrow.tsx +8 -3
  367. package/src/components/eyebrow/eyebrow.props.ts +10 -2
  368. package/src/components/heading/Heading.tsx +1 -1
  369. package/src/components/heading/heading.props.ts +4 -3
  370. package/src/components/popover/Popover.tsx +4 -3
  371. package/src/components/popover/popover.css +5 -3
  372. package/src/components/popover/popover.props.ts +9 -0
  373. package/src/components/text/text.props.ts +6 -1
  374. package/src/css/classes/system/typography.css +6 -6
  375. package/src/css/tokens/semantic.css +7 -7
  376. package/src/props/typography.ts +1 -5
  377. package/src/version.ts +2 -2
@@ -0,0 +1,275 @@
1
+ kind: component
2
+ id: icon
3
+ name: Icon
4
+ description: Renders a sizable and tonable SVG icon from @sanity/icons.
5
+ metadata:
6
+ tags: [icon, svg, vector shape, size, tone, iconography, symbol, indicator]
7
+ status:
8
+ status: stable
9
+ sections:
10
+ - kind: guidelines
11
+ for: all
12
+ framing: when-to-use
13
+ title: When to use
14
+ items:
15
+ - level: should
16
+ statement: To communicate a basic concept or action when horizontal space is limited.
17
+ - level: should
18
+ statement: To represent common button actions in dense UI elements like toolbars.
19
+ - level: should
20
+ statement: To reinforce the meaning of text with semantic context or visual prominence.
21
+ - level: should-not
22
+ statement: As a purely decorative element. Use an image or illustration instead.
23
+ - level: should-not
24
+ statement: As a replacement for text for complex concepts. Use plain text instead.
25
+ - kind: guidelines
26
+ for: all
27
+ framing: how-to-use
28
+ items:
29
+ - id: standalone-icon-has-aria-label
30
+ level: must
31
+ statement: An Icon that conveys meaning on its own, with no adjacent text, needs an aria-label attribute that describes that meaning.
32
+ example:
33
+ title: How to satisfy this
34
+ description: Inspect the rendered DOM and confirm aria-label is present on the Icon's SVG element. Use a screen reader to navigate to the icon and verify the label is announced.
35
+ checkedBy: manual
36
+ - id: decorative-icon-is-aria-hidden
37
+ level: must
38
+ statement: "An Icon that decorates adjacent text needs no extra prop. Icon hides itself from screen readers — it renders aria-hidden='true' — whenever it has no aria-label. Don't give a decorative icon an aria-label; that removes the automatic aria-hidden and the meaning is announced twice. Give a meaningful icon with no adjacent text an aria-label. An icon-only control is an IconButton, with aria-label on the IconButton, not the Icon."
39
+ example:
40
+ title: How to satisfy this
41
+ description: Inspect the rendered DOM and confirm the Icon's SVG element carries aria-hidden='true' and no aria-label when adjacent text already conveys the meaning.
42
+ checkedBy: manual
43
+ - refs:
44
+ - to: shared-foundations#tone-signals-state
45
+ rel: same-as
46
+ - refs:
47
+ - to: shared-foundations#tone-paired-with-second-channel
48
+ rel: same-as
49
+ - id: icon-size-matches-text-size
50
+ level: should
51
+ statement: When Icon appears alongside Text, use the same numeric size value for both, so the icon height lines up with the text cap-height.
52
+ example:
53
+ title: How to satisfy this
54
+ description: Inspect the Icon and Text props in code and confirm the size values are equal. Review the rendered UI and confirm the icon height visually aligns with the text cap-height.
55
+ checkedBy: manual
56
+ - id: icon-muted-matches-text-muted
57
+ level: should
58
+ statement: When Icon appears alongside Text that has muted applied, apply muted to the Icon too, so both share the same reduced-contrast look.
59
+ example:
60
+ title: How to satisfy this
61
+ description: Inspect the Icon and Text props in code and confirm muted is set on both. Review the rendered UI and confirm the icon and text share the same reduced-contrast appearance.
62
+ checkedBy: manual
63
+ - id: pass-icon-component-itself-instance
64
+ level: should
65
+ statement: >-
66
+ Pass the icon component: `<Icon icon={SearchIcon} />`. From 5.0.0-alpha.12, an element works too: `<Icon icon={<SearchIcon />} />`. Icon clones the element, merges its `className` and `style` with its own, and keeps its `aria-label`. Use the element form only when the icon needs props of its own.
67
+ - id: choose-from-icons-entry
68
+ level: should
69
+ statement: >-
70
+ To choose an icon, look it up in the `icons` entry: every icon in
71
+ @sanity/icons, with its import path, purpose and other names it goes by.
72
+ Find an icon by purpose by searching `docs/icons.dsds.yaml` for the purpose word.
73
+ - level: must-not
74
+ statement: Don't set fontSize via inline styles — use the size prop.
75
+ - refs:
76
+ - to: shared-foundations#icon-not-sole-content-of-control
77
+ rel: same-as
78
+ - kind: guidelines
79
+ for: agent
80
+ framing: how-to-use
81
+ items:
82
+ - level: must-not
83
+ statement: "Do not pass the icon's vector shape as `symbol`. The prop is `icon`. Passing `symbol={SomeIcon}` directly is a TypeScript error (TS2322, verified against @sanity/ui@5.0.0-alpha.8) and renders no icon. It only fails silently when spread in from an object, which skips excess-property checking."
84
+ - level: must-not
85
+ statement: Don't use `as={SomeIcon}` to pass the icon component. Use `icon={SomeIcon}` instead — `as` changes the HTML element rendered, not the icon, and `<Icon as={SomeIcon} />` is a TypeScript error.
86
+ - level: must-not
87
+ statement: 'Wrapping an icon in a Box with inline fontSize for sizing. Instead: Use <Icon icon={SomeIcon} size={3} />.'
88
+ - kind: guidelines
89
+ for: all
90
+ title: Content guidelines
91
+ tags: [content]
92
+ items:
93
+ - level: should
94
+ statement: Choose the icon that most directly matches its meaning. Icons used in unfamiliar ways (for example, a gear for "edit") slow down comprehension.
95
+ - level: should
96
+ statement: For icon-plus-text pairs, place the icon before the text in left-to-right languages.
97
+ - level: should-not
98
+ statement: Don't combine icons that visually look like they form a sentence — icons aren't grammar.
99
+
100
+ - kind: guidelines
101
+ for: all
102
+ title: Accessibility
103
+ tags: [accessibility]
104
+ items:
105
+ - level: should
106
+ statement: '**Decorative by default.** Icon renders `aria-hidden="true"` on its own unless it has an `aria-label`, either on Icon or on an icon element passed to `icon`. A decorative icon that repeats adjacent text needs nothing extra — it is already hidden from screen readers. Passing `aria-label` removes the automatic `aria-hidden` and exposes the icon as informational (WCAG 1.1.1 A). Do this for icons that convey meaning on their own (for example, an icon-only status indicator). Set `aria-hidden="true"` explicitly only when you want to document the decorative intent in the markup.'
107
+ - level: should
108
+ statement: '**Not focusable.** Icon sets no `tabindex`, and an SVG is not focusable. Focus belongs on the control: use Button or IconButton.'
109
+ - kind: section
110
+ for: agent
111
+ freeform:
112
+ - title: 'Accessibility: decorative vs meaningful'
113
+ body: |-
114
+ Icon renders `aria-hidden="true"` on its own unless you pass `aria-label`. A decorative icon needs no extra prop; only a meaningful icon with no adjacent text needs `aria-label`.
115
+
116
+ ```tsx
117
+ // decorative icon — next to visible text label; hidden automatically
118
+ <Icon icon={SearchIcon} />
119
+
120
+ // meaningful icon — only icon, no adjacent text
121
+ <Icon icon={CloseIcon} aria-label="Close dialog" />
122
+
123
+ // from 5.0.0-alpha.12 an element works too; its aria-label counts
124
+ <Icon icon={<CloseIcon aria-label="Close dialog" />} />
125
+ ```
126
+
127
+ An icon-only control is IconButton's job, not Button's — Button always carries a
128
+ visible `text` label. The `aria-label` goes on the control, never on the Icon, and
129
+ the Icon stays hidden on its own.
130
+
131
+ ```tsx
132
+ // icon-only control — IconButton, label on the control
133
+ <IconButton
134
+ icon={TrashIcon}
135
+ aria-label="Delete item"
136
+ level="tertiary"
137
+ tone="critical"
138
+ />
139
+
140
+ // icon plus label — Button, icon decorates the text
141
+ <Button
142
+ iconStart={TrashIcon}
143
+ text="Delete item"
144
+ level="tertiary"
145
+ tone="critical"
146
+ />
147
+ ```
148
+
149
+ uses:
150
+ - to: icons
151
+ note: Icon accepts any component from @sanity/icons as its value prop.
152
+ alternatives:
153
+ - to: button
154
+ refs:
155
+ - href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=31907-17
156
+ rel: design
157
+ role: Figma component (v5)
158
+ - to: text
159
+ rel: relates-to
160
+ note: To match surrounding text size on its own, render the raw `@sanity/icons` component inside Text instead of using Icon
161
+ - to: icon-button
162
+ rel: relates-to
163
+ note: A button that displays an icon as its main label
164
+ sourceFiles:
165
+ - platform: react
166
+ file: packages/ui/src/components/icon/Icon.tsx
167
+ imports:
168
+ - platform: react
169
+ code: import { Icon } from '@sanity/ui'
170
+ package: '@sanity/ui'
171
+ traits:
172
+ - traitType: variant
173
+ kind: enum
174
+ id: size
175
+ description: CSS font-size property.
176
+ values:
177
+ - id: '0'
178
+ description: Smallest.
179
+ - id: '1'
180
+ description: Small.
181
+ - id: '2'
182
+ description: Medium (default).
183
+ - id: '3'
184
+ description: Large.
185
+ - id: '4'
186
+ description: Extra large.
187
+ - traitType: variant
188
+ kind: enum
189
+ id: tone
190
+ description: Semantic icon color.
191
+ values:
192
+ - id: neutral
193
+ description: Default. No semantic meaning.
194
+ - id: suggest
195
+ description: Suggestions or informational content.
196
+ - id: positive
197
+ description: Success, published, healthy.
198
+ - id: caution
199
+ description: Needs attention.
200
+ - id: critical
201
+ description: Error, failed, rejected.
202
+ - traitType: variant
203
+ kind: boolean
204
+ id: muted
205
+ description: Reduces visual prominence for secondary or decorative icons.
206
+ $extensions:
207
+ com.sanity.ui:
208
+ implementationStatus:
209
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
210
+ implemented: true
211
+ migrationGuide:
212
+ context: 'Migration guide for this component, covering the codemod and the changes it cannot make. Held as an extension because it is temporary: migration tooling and porting agents read it, and it should be dropped when Sanity UI 3 support ends.'
213
+ guidance: |-
214
+ ### v3 → v5 prop migration
215
+
216
+ The v3 `symbol` prop was renamed to `icon` in v5. Passing `symbol` directly is a TypeScript error (TS2322) and renders no icon. The linter catches it before tsc does, and the fix is simple.
217
+
218
+ ```tsx
219
+ // v3 (wrong in v5)
220
+ <Icon symbol={SearchIcon} />
221
+
222
+ // v5 (correct)
223
+ <Icon icon={SearchIcon} />
224
+ ```
225
+
226
+ ### Migrating from Sanity UI 3
227
+
228
+ `@sanity/icons` exports its own `Icon` component — it renders an SVG icon from the package. The component documented here is different. It is a Sanity UI component that adds `size`, `tone`, `muted`, and margin props on top.
229
+
230
+ ```
231
+ import {RocketIcon} from '@sanity/icons/Rocket'
232
+
233
+ {/* v3 — icon rendered by specific RocketIcon component */}
234
+ <RocketIcon />
235
+ ```
236
+
237
+ The new Icon component also allows for direct manipulation of sizing and toning:
238
+
239
+ ```
240
+ import {CropIcon} from '@sanity/icons/Crop'
241
+ import {Icon} from '@sanity/ui'
242
+
243
+ {/* v3 — wrap in Text just for sizing */}
244
+ <Text size={3}>
245
+ <CropIcon />
246
+ </Text>
247
+
248
+ {/* v3 — inline fontSize fallback */}
249
+ <Card tone="suggest">
250
+ <CropIcon />
251
+ </Card>
252
+
253
+ {/* v5 — Icon */}
254
+ <Icon icon={CropIcon} size={3} tone="suggest" />
255
+ ```
256
+
257
+ ### Key differences
258
+
259
+ - Icon’s `size` prop replaces the "wrap in Text" workaround for sizing standalone icons. The size scale (`0`–`4`) matches Text and Heading exactly.
260
+ - Icon’s `tone` prop replaces inline `style={{ color }}` for icon coloring with the semantic tone vocabulary used elsewhere in the system.
261
+ - Icon’s `muted` prop mirrors the `muted` boolean on Text.
262
+ - Icon does not currently inherit size/tone from parents.
263
+
264
+ ### Detailed list of differences
265
+
266
+ | v3 pattern | v5 prop | Notes |
267
+ | :---- | :---- | :---- |
268
+ | `<Box style={{ fontSize }}><SomeIcon /></Box>` | `<Icon icon={SomeIcon} size={N} />` | Replaces the inline-fontSize escape hatch. |
269
+ | `<SomeIcon style={{ color: '...' }} />` | `<Icon icon={SomeIcon} tone="..." />` | Use the `tone` prop with a semantic value. |
270
+ | `<Text muted size={N}><SomeIcon /></Text>` | `<Icon icon={SomeIcon} size={N} muted />` | `muted` is now a first-class prop on Icon. |
271
+ | `<Button><SomeIcon /></Button>` | `<IconButton icon={SomeIcon} />` | Don't wrap Icon in a button — use `IconButton` and pass the icon component to its `icon` prop. |
272
+
273
+ ### Breaking changes
274
+
275
+ Icon has no breaking changes from v3; it's new in v5. Migrate to Icon at your own pace.
@@ -0,0 +1,98 @@
1
+ kind: component
2
+ id: indicator-stack
3
+ name: IndicatorStack
4
+ description: A horizontal container for Indicator dots.
5
+ metadata:
6
+ tags: [indicator, stack, status, dots, horizontal, mask]
7
+ status:
8
+ status: stable
9
+ sections:
10
+ - kind: guidelines
11
+ for: all
12
+ framing: when-to-use
13
+ title: When to use
14
+ items:
15
+ - level: should
16
+ statement: 'When an item has two or more concurrent statuses (for example, published but has a draft).'
17
+ - level: should
18
+ statement: When status dots appear side by side and need clear visual separation.
19
+ - level: should-not
20
+ statement: For a single indicator. Use Indicator on its own.
21
+ alternatives:
22
+ - to: indicator
23
+ - level: should-not
24
+ statement: When dots are not adjacent. The cut-out mask only applies to side-by-side dots.
25
+ - kind: guidelines
26
+ for: all
27
+ framing: how-to-use
28
+ items:
29
+ - id: always-indicatorstack-placing-two-more
30
+ refs:
31
+ - to: shared-foundations#indicator-stack-for-adjacent-dots
32
+ rel: same-as
33
+ - level: should
34
+ statement: Use as='ul' and wrap each Indicator in as='li' when the stack represents a list of statuses.
35
+ - level: should-not
36
+ statement: Don't use more than 3 or 4 indicators in a single stack. More dots are hard to read at a glance.
37
+ - level: must-not
38
+ statement: Don't put non-Indicator elements inside IndicatorStack. Only Indicator children are supported.
39
+ - kind: guidelines
40
+ for: all
41
+ title: Accessibility
42
+ tags: [accessibility]
43
+ items:
44
+ - id: pass-child-without-dot-conveys
45
+ level: must
46
+ statement: Pass `label` on each child `Indicator`. Without it, the dot is `aria-hidden` and conveys no information to screen reader users.
47
+ - level: should
48
+ statement: '`IndicatorStack` renders as a `div` by default. It has no implicit role.'
49
+ - level: should
50
+ statement: Use `as="ul"` if the group is a meaningful list. Wrap each `Indicator` in `as="li"`.
51
+ - level: should
52
+ statement: The cut-out mask is a visual effect only. It has no effect on screen readers.
53
+ - level: must-not
54
+ statement: "Don't show an indicator without a `label` or adjacent text."
55
+
56
+ alternatives:
57
+ - to: indicator
58
+ note: The individual status dot — always use inside `IndicatorStack` when placing two or more side by side
59
+ refs:
60
+ - href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=32595-45
61
+ rel: design
62
+ role: Figma component (v5)
63
+ - to: badge
64
+ rel: relates-to
65
+ note: Shows a short text label or count — use when the status needs to be read as text
66
+ - to: avatar
67
+ rel: relates-to
68
+ note: Commonly paired with `IndicatorStack` to show online or notification state on a user
69
+ sourceFiles:
70
+ - platform: react
71
+ file: packages/ui/src/components/indicator-stack/IndicatorStack.tsx
72
+ imports:
73
+ - platform: react
74
+ code: import { IndicatorStack } from '@sanity/ui'
75
+ package: '@sanity/ui'
76
+ $extensions:
77
+ com.sanity.ui:
78
+ implementationStatus:
79
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
80
+ implemented: true
81
+ migrationGuide:
82
+ context: 'Migration guide for this component, covering the codemod and the changes it cannot make. Held as an extension because it is temporary: migration tooling and porting agents read it, and it should be dropped when Sanity UI 3 support ends.'
83
+ guidance: |-
84
+ `IndicatorStack` is new in v5, with no direct v3 equivalent. Side-by-side status dots in v3 were composed manually, usually with `Flex`.
85
+
86
+ ```
87
+ // v3 pattern (manual spacing, no cut-out mask)
88
+ <Flex gap={1}>
89
+ <Box style={{width: 5, height: 5, borderRadius: '50%', background: 'green'}} />
90
+ <Box style={{width: 5, height: 5, borderRadius: '50%', background: 'yellow'}} />
91
+ </Flex>
92
+
93
+ // v5 equivalent
94
+ <IndicatorStack>
95
+ <Indicator tone="positive" label="Published" />
96
+ <Indicator tone="caution" label="Unpublished changes" />
97
+ </IndicatorStack>
98
+ ```
@@ -0,0 +1,108 @@
1
+ kind: component
2
+ id: indicator
3
+ name: Indicator
4
+ description: A small colored dot that shows status at a glance.
5
+ metadata:
6
+ tags: [indicator, status, dot, tone, signal, notification]
7
+ status:
8
+ status: beta
9
+ sections:
10
+ - kind: guidelines
11
+ for: all
12
+ framing: when-to-use
13
+ title: When to use
14
+ items:
15
+ - level: should
16
+ statement: 'To show the status of a document, user, or process at a glance (for example, published, draft, offline).'
17
+ - level: should
18
+ statement: To display a small notification signal next to an avatar or label.
19
+ - level: should
20
+ statement: To represent multiple concurrent statuses in a compact space using IndicatorStack.
21
+ - level: should-not
22
+ statement: To show a count or number. Use Badge instead.
23
+ alternatives:
24
+ - to: badge
25
+ - level: should-not
26
+ statement: 'As a standalone status label where the meaning needs text or a count. Use Badge or Text instead.'
27
+ alternatives:
28
+ - to: badge
29
+ - to: text
30
+ - kind: guidelines
31
+ for: agent
32
+ framing: when-to-use
33
+ title: When to use
34
+ items:
35
+ - refs:
36
+ - to: shared-foundations#indicator-stack-for-adjacent-dots
37
+ rel: same-as
38
+ - kind: guidelines
39
+ for: all
40
+ framing: how-to-use
41
+ items:
42
+ - level: must
43
+ statement: 'Provide a label when the indicator is the only signal for a status. Without it, the dot is invisible to screen readers. Omit label only when adjacent visible text conveys the same status.'
44
+ - level: should
45
+ statement: 'Pair the indicator with a visible text label. To show the status in a Tooltip instead, wrap Indicator in PressArea. The Tooltip needs it as a target.'
46
+ - level: must-not
47
+ statement: Don't change the size of the dot with inline styles or custom CSS. The 5×5px size is fixed.
48
+ - kind: guidelines
49
+ for: agent
50
+ framing: how-to-use
51
+ items:
52
+ - level: must-not
53
+ statement: "Valid tone values: 'neutral', 'positive', 'suggest', 'caution', 'critical'. Do not use 'default', 'success', or 'warning' — they are not in the tone union and will cause a TypeScript error."
54
+ - kind: guidelines
55
+ for: all
56
+ title: Accessibility
57
+ tags: [accessibility]
58
+ items:
59
+ - level: should
60
+ statement: Always pass `label` when the indicator is the only signal for a status. This sets `role="img"` and `aria-label`, making the dot readable to screen readers.
61
+ - id: omit-only-adjacent-visible-text
62
+ level: should
63
+ statement: Omit `label` only when adjacent visible text already conveys the status. The dot becomes `aria-hidden` in that case.
64
+ refines:
65
+ - to: indicator#provide-a-label-when-the-indicator-is-the-only-signal-for-a-status-without-it-the-dot-is-invisible-to-screen-readers-omit-label-only-when-adjacent-visible-text-conveys-the-same-status
66
+ - level: should
67
+ statement: For document or item status (Published, Draft), pair the dot with a shape or icon difference in addition to tone. Put the status word in the row's accessible name or visible text — not only in the dot's color (WCAG 1.4.1).
68
+ refines:
69
+ - to: shared-foundations#tone-paired-with-second-channel
70
+ - level: should
71
+ statement: '`IndicatorStack` renders as a `div`. If the group represents a meaningful list of statuses, consider using `as="ul"` and wrapping each `Indicator` in `as="li"`.'
72
+ alternatives:
73
+ - to: badge
74
+ note: Shows a short text label or count for status — use when the status needs to be read as text
75
+ - to: indicator-stack
76
+ refs:
77
+ - href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=32595-44
78
+ rel: design
79
+ role: Figma component (v5)
80
+ - to: avatar
81
+ rel: relates-to
82
+ note: Commonly paired with `IndicatorStack` to show online or notification state on a user
83
+ sourceFiles:
84
+ - platform: react
85
+ file: packages/ui/src/components/indicator/Indicator.tsx
86
+ imports:
87
+ - platform: react
88
+ code: import { Indicator } from '@sanity/ui'
89
+ package: '@sanity/ui'
90
+ $extensions:
91
+ com.sanity.ui:
92
+ implementationStatus:
93
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
94
+ implemented: true
95
+ migrationGuide:
96
+ context: 'Migration guide for this component, covering the codemod and the changes it cannot make. Held as an extension because it is temporary: migration tooling and porting agents read it, and it should be dropped when Sanity UI 3 support ends.'
97
+ guidance: |-
98
+ `Indicator` and `IndicatorStack` are new in v5, with no direct v3 equivalent. Status dots in v3 were built with a styled `Box` using `radius="full"` and a fixed size.
99
+
100
+ ```
101
+ // v3 pattern
102
+ <Box
103
+ style={{width: 5, height: 5, borderRadius: '50%', background: 'green'}}
104
+ />
105
+
106
+ // v5 equivalent
107
+ <Indicator tone="positive" label="Online" />
108
+ ```
@@ -0,0 +1,127 @@
1
+ kind: component
2
+ id: inline
3
+ name: Inline
4
+ description: Deprecated. Use HStack instead. Previously laid out children in a wrapping inline row. Maintained for backward compatibility only.
5
+ metadata:
6
+ tags: [deprecated, horizontal, inline, layout, hstack, row]
7
+ status:
8
+ status: deprecated
9
+ deprecationNotice: Use HStack instead
10
+ sections:
11
+ - kind: guidelines
12
+ for: all
13
+ framing: how-to-use
14
+ items:
15
+ - id: inline-new-code-hstack-instead
16
+ level: must-not
17
+ statement: "Do not use Inline in new code. Use HStack instead. HStack wraps its children by default, as Inline did. Use Flex only when you need alignment or spacing that HStack's defaults don't give."
18
+ alternatives:
19
+ - to: h-stack
20
+ - to: flex
21
+ - kind: section
22
+ for: all
23
+ freeform:
24
+ - title: 'Deprecation guide: Inline to HStack'
25
+ body: |-
26
+ Inline itself is deprecated in favor of HStack (see the notice at the top of this doc). This is a separate, manual migration — there is no codemod for it.
27
+
28
+ ### From Inline to HStack
29
+
30
+ For most cases, replace `Inline` with `HStack`:
31
+
32
+ ```
33
+ {/* Before */}
34
+ <Inline gap={2}>
35
+ <Tag>One</Tag>
36
+ <Tag>Two</Tag>
37
+ </Inline>
38
+
39
+ {/* After */}
40
+ <HStack gap={2}>
41
+ <Tag>One</Tag>
42
+ <Tag>Two</Tag>
43
+ </HStack>
44
+ ```
45
+
46
+ If you used padding props on Inline, add a Box wrapper:
47
+
48
+ ```
49
+ {/* Before */}
50
+ <Inline gap={2} padding={3}>
51
+ <Tag>One</Tag>
52
+ <Tag>Two</Tag>
53
+ </Inline>
54
+
55
+ {/* After */}
56
+ <Box padding={3}>
57
+ <HStack gap={2}>
58
+ <Tag>One</Tag>
59
+ <Tag>Two</Tag>
60
+ </HStack>
61
+ </Box>
62
+ ```
63
+
64
+ ### Behavioral difference
65
+
66
+ Inline wraps each child in a `<div>` with `display: inline-block`. HStack is a flex box with no extra wrappers. Items still flow to a new row: HStack wraps by default, and centers its children on the cross axis.
67
+ alternatives:
68
+ - to: h-stack
69
+ note: Replaces Inline
70
+ refs:
71
+ - href: https://www.figma.com/design/NWmchNlsNdG66VBaCsTdSL/pjo-ui4-component-buildout?node-id=29358-194
72
+ rel: design
73
+ role: Figma component
74
+ - to: space
75
+ rel: relates-to
76
+ - to: flex
77
+ rel: relates-to
78
+ note: Full flex control, including `flexWrap` for rows that wrap
79
+ sourceFiles:
80
+ - platform: react
81
+ file: packages/ui/src/components/inline/Inline.tsx
82
+ imports:
83
+ - platform: react
84
+ code: import { HStack } from '@sanity/ui'
85
+ package: '@sanity/ui'
86
+ $extensions:
87
+ com.sanity.ui:
88
+ implementationStatus:
89
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
90
+ implemented: true
91
+ migrationGuide:
92
+ context: 'Migration guide for this component, covering the codemod and the changes it cannot make. Held as an extension because it is temporary: migration tooling and porting agents read it, and it should be dropped when Sanity UI 3 support ends.'
93
+ codemod: |-
94
+ Inline keeps its name but renames `space`→`gap` and removes `flex` as a direct prop (the codemod converts it to inline `style`). Margin props are unsupported on Inline in either version. This codemod migrates v3 usage to v5's Inline — it does NOT migrate to HStack. Inline itself is deprecated in favor of HStack, but that move has no codemod and must be done by hand.
95
+
96
+ Run the codemod: `pnpx @sanity/ui-codemod latest:inline --paths <paths> --toPackage @sanity/ui`.
97
+ guidance: |-
98
+ Inline in the new system keeps the same name and purpose as `@sanity/ui`'s Inline — a wrapping inline row. The API changes are small:
99
+
100
+ ### Key differences
101
+
102
+ - `space` renamed to `gap`, matching the prop name used across other v5 layout components.
103
+ - `flex` is removed as a direct prop. v5 has no shorthand `flex` prop on Inline — the codemod converts a literal `flex` value to an inline `style` object.
104
+ - Margin props (`margin`, `marginX`, `marginY`, and per-side variants) are not supported on Inline in either version — a v3 app relying on them was already reaching outside Inline's documented API.
105
+
106
+ ### Detailed list of differences
107
+
108
+ | v3 prop | v5 prop | Notes |
109
+ | :---- | :---- | :---- |
110
+ | `space` | `gap` | Renamed. Same scale (`0`–`9`, `'inherit'`). |
111
+ | `flex` | — | Removed as a prop. The codemod converts a literal value to `style={{ flex: '...' }}`. |
112
+ | `margin`, `marginX`, `marginY`, per-side margin | — | Not supported on Inline in either version. Wrap in `Box` for margin. |
113
+
114
+ ### Breaking changes
115
+
116
+ - **`space` prop renamed to `gap`.** `<Inline space={2}>` no longer sets spacing. Use `<Inline gap={2}>`.
117
+ - **`flex` prop removed.** `<Inline flex={1}>` no longer works as a prop. Move the value to `style={{ flex: '1' }}` or wrap in a flex-aware parent.
118
+
119
+ ### Codemod
120
+
121
+ A codemod is available to ease the changes above. Run the command below with the path to the file or folder you want to migrate. Use spaces to pass more than one path.
122
+
123
+ ```
124
+ pnpx @sanity/ui-codemod latest:inline --paths <paths> --toPackage @sanity/ui
125
+ ```
126
+
127
+ This codemod migrates a v3 `@sanity/ui` Inline to v5's Inline component — it does not migrate to HStack. If you're also moving off the deprecated Inline component itself, run this codemod first, then follow the deprecation guide below. If a component instance cannot be migrated or needs manual review, the codemod inserts a comment prefixed with "UI-POC-CODEMOD TODO".
@@ -0,0 +1,59 @@
1
+ kind: component
2
+ id: kbd
3
+ name: KBD
4
+ description: Presents a single keyboard shortcut.
5
+ metadata:
6
+ tags: [keyboard, key, shortcut, inline, kbD, kbd, hotkey, press]
7
+ status:
8
+ status: experimental
9
+ note: Exported from @sanity/ui 5.0.0-alpha.16, marked @alpha in the source. Its API can change without notice.
10
+ sections:
11
+ - kind: guidelines
12
+ for: all
13
+ framing: when-to-use
14
+ title: When to use
15
+ items:
16
+ - level: should
17
+ statement: "Inline key references in documentation or help text (for example, 'Press ⌘ to save')."
18
+ - level: should
19
+ statement: Building custom keyboard shortcut displays where Hotkeys is too opinionated.
20
+ - level: should
21
+ statement: Annotating UI elements with individual key labels.
22
+ - level: should-not
23
+ statement: For full keyboard shortcuts with multiple keys. Use Hotkeys instead.
24
+ alternatives:
25
+ - to: hotkeys
26
+ - level: should-not
27
+ statement: As a decorative badge or status indicator. Use Badge instead.
28
+ alternatives:
29
+ - to: badge
30
+ - kind: guidelines
31
+ for: all
32
+ framing: how-to-use
33
+ items:
34
+ - level: should
35
+ statement: 'Use standard key symbols where they exist: ⌘ not Cmd, ⌥ not Alt, ⇧ not Shift on Mac.'
36
+ - level: should
37
+ statement: Keep content to a single character or short label (Esc, Tab, F1).
38
+ - level: should
39
+ statement: Pair with surrounding Text to provide context for what the key does.
40
+ - level: must-not
41
+ statement: Don't place long strings inside KBD — it is designed for single keys only.
42
+ - kind: guidelines
43
+ for: agent
44
+ framing: how-to-use
45
+ items:
46
+ - level: must-not
47
+ statement: "Putting a full shortcut string like 'Ctrl+Shift+S' in a single KBD. Instead: Use Hotkeys to render multi-key shortcuts."
48
+ alternatives:
49
+ - to: hotkeys
50
+ - to: badge
51
+ refs:
52
+ - href: https://www.figma.com/design/5mhVqXlldJEEB2VWZeKQ4i/Sanity-UI?node-id=33099-3768
53
+ rel: design
54
+ role: Figma component (v5)
55
+ $extensions:
56
+ com.sanity.ui:
57
+ implementationStatus:
58
+ context: Implementation status. Lets a tool tell a component that is coming from one that does not exist, without parsing the status note.
59
+ implemented: true