@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,403 @@
1
+ kind: sanity.pattern
2
+ id: layouts
3
+ name: Layout guidelines
4
+ description: 'The Sanity UI application layout system: a Navigation sidebar, a Content area (with its own toolbar and display), and an Inspection sidebar, composed into five shell layouts. Covers layout structure, navigation patterns, action placement, sidebar show/hide behavior, responsiveness, and the accessibility rules that hold the whole thing together.'
5
+ metadata:
6
+ tags:
7
+ - tutorial
8
+ - layout
9
+ - navigation sidebar
10
+ - inspection sidebar
11
+ - content toolbar
12
+ - shell
13
+ - app shell
14
+ - action hierarchy
15
+ - overflow menu
16
+ - responsive
17
+ - landmark
18
+ - sidebar toggle
19
+ - tree view
20
+ - drill-in navigation
21
+ status:
22
+ status: stable
23
+ sections:
24
+ - kind: guidelines
25
+ for: all
26
+ framing: how-to-use
27
+ items:
28
+ - level: must
29
+ statement: Use the default light color scheme for all structural layout regions (Navigation sidebar, Content area, Content toolbar, Inspection sidebar). Sanity UI does not support dark or inverted structural regions; Card has no `inverted` prop.
30
+ tags: [visual-design]
31
+ - level: must
32
+ statement: Keep the Navigation → Content → Inspection order fixed along the inline axis (Navigation always inline-start, Content always center, Inspection always inline-end). This order never changes across layout types.
33
+ tags: [visual-design]
34
+ - level: must
35
+ statement: Only use a Navigation sidebar when the application has multiple pages/views that require navigation.
36
+ tags: [development]
37
+ - level: must
38
+ statement: 'Use only Sanity UI''s `<List.ButtonItem />` for Navigation Content items and filters. A navigation item renders as a link: pass `as="a"` and `href`.'
39
+ tags: [development]
40
+ - level: must
41
+ statement: Show the application name as the Content Toolbar Title when there is no Navigation sidebar; otherwise show the current page or view name. The title anchors the collection of content being viewed and should be given priority in spacing to avoid truncation at all costs.
42
+ tags: [content]
43
+ - level: must
44
+ statement: Use Sanity UI's `<Button />` for all Content Toolbar actions; open a menu with a `<Popover />` around the trigger, never a plain `<Button />` alone.
45
+ tags: [development]
46
+ - level: must
47
+ statement: Accompany every action button with a tooltip describing the action in greater detail, accessible to screen readers; do not add tooltips to disabled buttons, since disabled buttons are removed from the tab order and tooltips on them are inaccessible to keyboard users.
48
+ tags: [accessibility]
49
+ refines:
50
+ - to: accessibility-guidelines#disabled-control-no-tooltip
51
+ - level: must
52
+ statement: Place the primary action (`level="primary"`) first (inline-start) in a Content Toolbar action row, with only one primary action per action area.
53
+ tags: [interaction]
54
+ - level: must
55
+ statement: 'Give destructive actions `tone="critical"` and an `ErrorOutlineIcon` through `iconStart` (`iconStart={ErrorOutlineIcon}`).'
56
+ tags: [visual-design]
57
+ refines:
58
+ - to: shared-foundations#destructive-actions-use-critical-tone
59
+ - level: must
60
+ statement: Show an empty state in Content display when no content exists, explaining why nothing is shown and offering an action to add content when one is available.
61
+ tags: [content]
62
+ - level: must
63
+ statement: 'Vary the Inspection sidebar''s displayed information by selection count: parent metadata or an empty state when nothing is selected; item actions/metadata for one selection; shared field values, fields marked "Mixed" where values differ, and hidden uncommon fields for multiple selections.'
64
+ tags: [interaction]
65
+ - level: must
66
+ statement: Order navigation menu items by one consistent logic per group — logical order, frequency of use, or alphabetically — and never mix ordering strategies within a single group.
67
+ tags: [content]
68
+ - level: must
69
+ statement: Separate navigation menu groups only with a horizontal divider and spacing — never background color, cards, or indentation.
70
+ tags: [visual-design]
71
+ - level: must
72
+ statement: Write navigation group labels as short (one or two words) category names, not actions ("Documents" not "Manage documents").
73
+ tags: [content]
74
+ - level: must
75
+ statement: Update the URL when a navigation item is selected, in addition to the selected state, the Content toolbar title, and the rendered content. Supports direct linking and browser history.
76
+ tags: [interaction]
77
+ - id: action-cap-three-visible
78
+ level: must
79
+ statement: Limit every action area — the Navigation header, the Navigation sidebar's Control slot, the Content toolbar, and the Content inspector header — to three visible actions. When more exist, keep the primary action (`level="primary"`) among the visible three and move the remainder into a `<Popover />` overflow with an ellipsis icon, never a plain `<Button />`.
80
+ tags: [interaction]
81
+ - level: must
82
+ statement: Use `level="primary"`/`level="secondary"`/`level="tertiary"` on the Button component to express action hierarchy, with only one primary action per action area.
83
+ tags: [development]
84
+ - level: must
85
+ statement: Use `loading={true}` only for processes that consistently take longer than 200ms. Show a confirmation message on completion for processes over three seconds.
86
+ tags: [interaction]
87
+ - level: must
88
+ statement: 'Require explicit confirmation before executing a destructive action — a confirmation dialog stating what will happen, with a cancel option, whose confirm button repeats the destructive action''s name (for example, "Delete 3 items") and uses `level="primary" tone="critical"` — confirming is the dialog''s most important action, so it is not demoted for being destructive.'
89
+ tags: [interaction]
90
+ - level: must
91
+ statement: Use a `<Popover />` with an ellipsis icon trigger, not a plain `<Button />`, for actions that exceed an area's visible-action limit.
92
+ tags: [development]
93
+ - level: must
94
+ statement: Place destructive items at the bottom of an overflow menu, separated by a divider, with `tone="critical"`.
95
+ tags: [visual-design]
96
+ refines:
97
+ - to: shared-foundations#destructive-actions-use-critical-tone
98
+ - level: must
99
+ statement: Keep primary actions (`level="primary"`) for critical workflows visible at all times — never hide them.
100
+ tags: [interaction]
101
+ - level: must
102
+ statement: When a disabled action state is used, explain why via an adjacent info icon or inline status message, not a tooltip. Disabled buttons are removed from the tab order, making tooltips on them inaccessible to keyboard users.
103
+ tags: [accessibility]
104
+ refines:
105
+ - to: accessibility-guidelines#disabled-control-no-tooltip
106
+ - level: must
107
+ statement: 'Give each toggleable sidebar a well-labeled `IconButton` at `level="tertiary"` with an `aria-label` describing the action (for example, `aria-label="Show navigation"`).'
108
+ tags: [accessibility]
109
+ - level: must
110
+ statement: Place the Navigation sidebar toggle in the Content toolbar, inline-start before the title; place the Inspection sidebar toggle in the Content toolbar actions area, using `aria-pressed={true}` to indicate the pressed state.
111
+ tags: [interaction]
112
+ - level: must
113
+ statement: Update a sidebar toggle's `aria-label` and tooltip to reflect the available action — "Hide [sidebar name]" when visible, "Show [sidebar name]" when hidden.
114
+ tags: [accessibility]
115
+ - level: must
116
+ statement: Resize the Content area smoothly when a sidebar is shown or hidden, without content jumping or layout shifts that cause the user to lose their place.
117
+ tags: [interaction]
118
+ - level: must
119
+ statement: Show and hide sidebars instantly, without animation, when the user's OS has "Reduce motion" enabled — do not override this preference.
120
+ tags: [accessibility]
121
+ - level: must
122
+ statement: Move focus to the first focusable element inside a sidebar when it opens via its toggle, and return focus to the toggle button when it closes. Keyboard users should not have to tab through the entire layout to reach newly visible content, or lose focus to a hidden or removed element.
123
+ tags: [accessibility]
124
+ - level: must
125
+ statement: Remove a hidden sidebar's contents from the tab order.
126
+ tags: [accessibility]
127
+ - level: must
128
+ statement: Size every touch-interactive control at least 24×24 pixels, and provide a mobile-friendly fallback for any interaction that relied on hover.
129
+ tags: [accessibility]
130
+ refines:
131
+ - to: accessibility-guidelines#touch-target-minimum
132
+ - level: must
133
+ statement: Access the Navigation header on tablet and mobile through a `<Popover />` with a menu icon trigger, inline-start aligned to the Content toolbar title — never a plain `<Button />`.
134
+ tags: [development]
135
+ - level: must
136
+ statement: Display the Inspection sidebar as a full-screen overlay on mobile when an item is selected, with an explicit close button block-start and inline-end aligned.
137
+ tags: [interaction]
138
+ - level: must
139
+ statement: Start action labels with a verb.
140
+ tags: [content]
141
+ refs:
142
+ - to: content-guidelines#label-length-by-element
143
+ rel: relates-to
144
+ - level: must
145
+ statement: State what is missing in an empty state and offer a path forward.
146
+ tags: [content]
147
+ - level: must
148
+ statement: Open a confirm dialog for destructive actions in layouts, with the confirm button repeating the action verb.
149
+ tags: [content]
150
+ - refs:
151
+ - to: content-guidelines#sentence-case-all-system-set
152
+ rel: same-as
153
+ tags: [content]
154
+ - refs:
155
+ - to: semantics#app-shell-landmark-regions
156
+ rel: same-as
157
+ tags: [accessibility]
158
+ - level: must
159
+ statement: Make layouts work at a 320px viewport width without horizontal scrolling — hide sidebars behind toggle buttons or stack the layout into a single column, using `Flex` with `flexWrap="wrap"` and avoiding fixed `px` widths on layout columns. A three-column layout that does not collapse will overflow at narrow widths.
160
+ evidence:
161
+ - href: https://www.w3.org/WAI/WCAG22/Understanding/reflow.html
162
+ role: WCAG 1.4.10 Reflow
163
+ tags: [accessibility]
164
+ - level: must
165
+ statement: 'Fit layout region headings into the page hierarchy: use `<h1>` for the Content area heading, `<h2>` or lower for sidebar headings, and never skip heading levels across regions.'
166
+ evidence:
167
+ - href: https://www.w3.org/WAI/WCAG22/Understanding/headings-and-labels.html
168
+ role: WCAG 2.4.6 Headings and Labels
169
+ tags: [accessibility]
170
+ - refs:
171
+ - to: shared-foundations#destructive-actions-use-critical-tone
172
+ rel: same-as
173
+ - level: should
174
+ statement: Keep the application's title fully displayed in the Navigation header; treat truncation as a last resort.
175
+ tags: [content]
176
+ - level: should
177
+ statement: 'Write Content Toolbar Action button labels as verb-led and two words or less (for example, "New document", "Export", "Delete"). This is stricter than the general button length in content-guidelines.'
178
+ tags: [content]
179
+ - level: should
180
+ statement: Center minimal Content display content in the viewport when no scrolling is necessary.
181
+ tags: [visual-design]
182
+ - level: should
183
+ statement: Reserve the Inspection sidebar for cases where the user must view/edit multiple pieces of content at once, and keep key item actions available in the main content pane in case it's hidden.
184
+ tags: [interaction]
185
+ - level: should
186
+ statement: 'Keep Inspection sidebar layouts simple: fields should ideally span the entire column, with no more than two columns.'
187
+ tags: [visual-design]
188
+ - level: should
189
+ statement: Order Content inspector properties vertically by importance, and group them with visible labels once 3 or more groups exist or the grouping isn't immediately intuitive; make only non-essential groups collapsible.
190
+ tags: [visual-design]
191
+ - level: should
192
+ statement: Size navigation menu groups between 2 and 7 items, merging single-item groups and splitting groups over 7 items; keep no more than 5 groups visible in the sidebar at once.
193
+ tags: [visual-design]
194
+ - level: should
195
+ statement: Give a visible label to navigation menu groups of 3 or more items, omitting it only when the grouping is self-evident. A self-evident grouping for a power user may not be so for a first-time user.
196
+ tags: [content]
197
+ - level: should
198
+ statement: Style navigation group labels as visually understated relative to the items they describe (smaller size, muted color, or lighter weight).
199
+ tags: [visual-design]
200
+ - level: should
201
+ statement: Hide actions from a multi-item selection that cannot be applied to the full selection, rather than disabling them without context. If hiding would cause confusion, a disabled state may be used, but must be paired with an adjacent status message or info icon — not a tooltip, since disabled buttons are removed from the tab order and their tooltips are inaccessible to keyboard users.
202
+ tags: [interaction]
203
+ refines:
204
+ - to: accessibility-guidelines#disabled-control-no-tooltip
205
+ - level: should
206
+ statement: Limit inline actions within Content display to 1–2 per item, using `IconButton` at `level="tertiary"` with an `aria-label` and a paired tooltip.
207
+ tags: [interaction]
208
+ - level: should
209
+ statement: Reveal inline actions on hover for desktop interfaces; keep them persistently visible or accessible via long-press/context menu on touch devices.
210
+ tags: [interaction]
211
+ - level: should
212
+ statement: Make inline actions a redundant shortcut, not the only path — the same action should remain available through the inspector or Content toolbar.
213
+ tags: [interaction]
214
+ - level: should
215
+ statement: Combine icons with text labels only to reinforce `tone="positive"`/`tone="caution"`/`tone="critical"` buttons with the matching icon, or to add emphasis on a single most-critical primary action; otherwise use text-only labels, and reserve icon-only buttons for high-density spaces with a universally understood icon, always paired with an `aria-label` and a tooltip.
216
+ tags: [development]
217
+ - level: should
218
+ statement: 'Place a single, prominent, centered call to action in the Content display area for an empty state, addressing the empty state directly (for example, "Create your first document" instead of "Get started").'
219
+ tags: [content]
220
+ - level: should
221
+ statement: Animate sidebars in and out with a fast (150–200ms) horizontal slide, ease-out for opening and ease-in for closing.
222
+ tags: [interaction]
223
+ - level: should
224
+ statement: Remember a user's explicit show/hide preference for the sidebar for the duration of the session, and persist it across sessions when technically feasible.
225
+ tags: [interaction]
226
+ - level: should
227
+ statement: "Allow a context-driven override to open a sidebar automatically (for example, selecting an item opens the Inspection sidebar) only when the user's action directly implies they need it, and let the user dismiss it manually afterward."
228
+ tags: [interaction]
229
+ - level: should
230
+ statement: "Provide a bracket-based keyboard shortcut to toggle each sidebar (for example, `[` for Navigation, `]` for Inspection), discoverable via the toggle button's tooltip."
231
+ tags: [accessibility]
232
+ - level: should
233
+ statement: Default sidebars to visible on desktop-sized screens, unless the application's primary use case demands maximum content area.
234
+ tags: [visual-design]
235
+ - level: should
236
+ statement: 'Give desktop-oriented components a mobile treatment on small viewports — a Dialog, for example, should fill the viewport rather than float in it.'
237
+ tags: [visual-design]
238
+ - level: should
239
+ statement: Lead status messages with the outcome, use past tense for completed actions, and include a next step when applicable.
240
+ tags: [content]
241
+ - level: should-not
242
+ statement: Avoid toggling Inspection sidebar visibility except when horizontal space is critical. Hiding it by default risks hiding critical functionality from new users.
243
+ tags: [visual-design]
244
+ - level: should-not
245
+ statement: Avoid a state where both the Navigation and Inspection sidebars are hidden simultaneously on desktop in layouts that support both. This creates an interface that looks like a Pane or Shell layout, disorienting users who expect navigation and inspection to be available. If both must be hideable, at least one should be visible by default.
246
+ tags: [interaction]
247
+ - level: must-not
248
+ statement: Do not use dark background inline styles or any other technique to force a dark appearance on structural layout elements. A design calling for a dark sidebar or header falls outside the supported Sanity UI interface pattern and needs a fully custom implementation outside the component system.
249
+ tags: [visual-design]
250
+ - level: must-not
251
+ statement: Do not add tooltips to menu items inside an overflow menu.
252
+ tags: [accessibility]
253
+ - level: must-not
254
+ statement: Do not make navigation group labels interactive — they must not expand, collapse, or navigate.
255
+ tags: [interaction]
256
+ - level: must-not
257
+ statement: Do not place filtering, sorting, application/view search, or in-view content tabs inside the Navigation sidebar. Navigation is the act of moving between distinct views. Filtering and sorting belong in the Content toolbar or display; application-wide search belongs in the Navigation header; view-specific search belongs in the Content toolbar; in-view tabs belong in the Content display area.
258
+ tags: [interaction]
259
+ - level: must-not
260
+ statement: Do not use `<Button />` for navigation (use `<List.ButtonItem as="a" href=…>` instead) or to switch between views within a surface (use tabs instead), and do not use `<Button />` alone as a menu activator (wrap it in a `<Popover />`). Assistive technology users expect buttons to perform actions and links to navigate; `<Popover />` handles menu placement and display consistently.
261
+ tags: [development]
262
+ - level: must-not
263
+ statement: Do not exceed 8 items in an overflow menu; group items into labeled sections when more exist.
264
+ tags: [interaction]
265
+ - level: must-not
266
+ statement: Do not place more than one toggle per sidebar.
267
+ tags: [interaction]
268
+ - level: must-not
269
+ statement: Do not auto-hide a sidebar when the user clicks or interacts with the Content area. Hiding a sidebar should be an explicit user action via the toggle button or a keyboard shortcut.
270
+ tags: [interaction]
271
+ - level: must-not
272
+ statement: Do not use sidebars as progressive disclosure for secondary content that only needs to appear temporarily — use a Popover or Dialog instead.
273
+ tags: [interaction]
274
+ - level: must-not
275
+ statement: 'Do not reorder layout columns with CSS `order`, `flex-direction: row-reverse`, or grid placement — the inline-start → center → inline-end visual order must match DOM order. Screen readers and keyboard navigation follow DOM order.'
276
+ evidence:
277
+ - href: https://www.w3.org/WAI/WCAG22/Understanding/meaningful-sequence.html
278
+ role: WCAG 1.3.2 Meaningful Sequence
279
+ - href: https://www.w3.org/WAI/WCAG22/Understanding/focus-order.html
280
+ role: WCAG 2.4.3 Focus Order
281
+ tags: [accessibility]
282
+ - level: must-not
283
+ statement: "Do not use inline styles for scroll behavior (`style={{ overflowY: 'auto' }}`) — use the `overflow`, `overflowX`, and `overflowY` props on `Box`/`Flex` instead."
284
+ tags: [development]
285
+ - kind: definitions
286
+ for: all
287
+ title: Anatomy
288
+ description: The Navigation sidebar, Content window, and Inspection sidebar each break down into further named sub-parts.
289
+ items:
290
+ - id: navigation-header
291
+ term: Navigation header
292
+ definition: Provides context for the application and displays critical global actions. Fixed at the top position, remaining in place when scrolling through menu items. Comprised of a Navigation Header Title (inline-start aligned, the app's title, fully displayed whenever possible — truncation is a last resort) and Navigation Header Actions (inline-end aligned, horizontally-stacked buttons for application-level actions such as settings, adding/editing/removing navigation items, or sorting/filtering navigation items).
293
+ usage: Optional.
294
+ - id: navigation-content
295
+ term: Navigation content
296
+ definition: Displays all navigation options or filters for content, using only Sanity UI's `<List.ButtonItem />` component. Scrolls independently to accommodate overflow.
297
+ usage: Optional.
298
+ - id: navigation-footer
299
+ term: Navigation footer
300
+ definition: Ancillary information and actions related to an application's status, such as help/support/feedback, an appearance (dark/light) toggle, or settings.
301
+ usage: Optional.
302
+ - id: content-toolbar
303
+ term: Content toolbar
304
+ definition: A block-start bar that orients the user and provides actions for editing/managing the presented content. Has a block-end border separating it from Content display; controls aim for a 50px height but grow when necessary. Comprised of a Content Toolbar Title (inline-start, the current page/view name, or the application name when no Navigation sidebar exists — given priority in spacing to avoid truncation at all costs) and Content Toolbar Actions (inline-end, all actions for editing/managing/manipulating the presented content; the de-facto location for application-level actions when a layout has no Navigation sidebar).
305
+ usage: Required.
306
+ - id: content-display
307
+ term: Content display
308
+ definition: 'The main section where content is presented and users interact with it, in one of two variants: Document width (forms, long-form text; optimizes for ~50-70 characters per line) or Full width (grids, tabular data, or anything needing maximum horizontal space). Scrolls independently to accommodate overflow. When minimal content is presented with no scrolling necessary, content should be centered in the viewport. Content display should present something — an empty state explaining why nothing is shown, with an add-content action if one exists.'
309
+ usage: Required.
310
+ - id: content-inspector-header
311
+ term: Content inspector header
312
+ definition: 'Orients the user on what content is selected and allows bulk actions on it. Follows the same patterns as the Navigation header: fixed, remaining in place while scrolling through properties, with the title start-aligned and actions end-aligned. Controls with three or more actions display only one action with a Popover overflow menu for the rest.'
313
+ usage: Optional.
314
+ - id: content-inspector-properties
315
+ term: Content inspector properties
316
+ definition: Provides the ability to view/edit an item's (or multiple items') metadata. Scrolls independently to accommodate overflow. Properties flow vertically, ordered by importance; group when logical categorization exists, and add group labels when 3 or more groups exist or the grouping is not immediately intuitive. Groups can be collapsible in cases of extreme scrolling — only make non-essential groups collapsible.
317
+ usage: Required.
318
+ - id: content-inspector-footer
319
+ term: Content inspector footer
320
+ definition: Optional information related to an item's (or multiple items') status/availability, such as time since last updated or time since published.
321
+ usage: Optional.
322
+ traits:
323
+ - traitType: variant
324
+ kind: enum
325
+ id: shell-composition
326
+ name: Layout composition
327
+ description: "A layout can be as simple as a single page or a full-blown multi-view interface. Sanity's layout components let you compose the level of complexity needed. Each composition implies a default sidebar visibility: 'not available' means the layout does not support that sidebar at all (no toggle, no way to summon it); 'visible'/'hidden' mean the sidebar exists and can be toggled."
328
+ values:
329
+ - id: shell
330
+ name: Shell
331
+ description: |-
332
+ A single-view application with no toolbar for title/actions and no Navigation or Inspection sidebar (both not available). Ideal for single-use applications such as an asset uploader.
333
+
334
+ Composition: `<AppShell><AppShell.Main>{content}</AppShell.Main></AppShell>`
335
+
336
+ Use when the application consists of one view/page and all content, logic, and actions are contained within the main content window — for example, a single form with a submit action.
337
+
338
+ Do not use when critical actions need to be persistent regardless of scroll position (use Shell with Toolbar instead), when the application has multiple pages/views to navigate across (use Shell with Navigation instead), or when one or more items need a dedicated area to view/edit metadata (use Shell with Inspector instead).
339
+ - id: shell-with-toolbar
340
+ name: Shell with Toolbar
341
+ description: |-
342
+ A single-view application with persistent actions (Navigation sidebar not available; Inspection sidebar not available). Ideal for simple management of content.
343
+
344
+ Use when the application consists of one view/page with important actions and filtering that need easy access — for example, a read-only content navigator.
345
+
346
+ Do not use when the application has multiple pages/views to navigate across (use Shell with Navigation instead), or when one or more items need a dedicated area to view/edit metadata (use Shell with Inspector instead).
347
+ - id: shell-with-inspector
348
+ name: Shell with Inspector
349
+ description: |-
350
+ A single-view application with persistent actions and viewing/editing of content metadata (Navigation sidebar not available; Inspection sidebar visible by default). Ideal for simple management of content and its metadata.
351
+
352
+ Use when one or more items in the application need a dedicated area to view/edit metadata.
353
+
354
+ Do not use when the application has multiple pages/views to navigate across (use Shell with Navigation and Inspector instead), or when all editing of content metadata can be handled in the main content window (use Shell or Shell with Toolbar instead).
355
+ - id: shell-with-navigation
356
+ name: Shell with Navigation
357
+ description: |-
358
+ A multi-view application with persistent navigation and actions (Navigation sidebar visible by default; Inspection sidebar not available). Ideal for more organized, fine-grained management of content.
359
+
360
+ Use when the application has more than one page/view to navigate across.
361
+
362
+ Do not use when the application has only one view and requires no navigation (use Shell, Shell with Toolbar, or Shell with Inspector instead), or when at least one page/view needs a dedicated area to view/edit metadata (use Shell with Navigation and Inspector instead).
363
+ - id: shell-with-navigation-and-inspector
364
+ name: Shell with Navigation and Inspector
365
+ description: |-
366
+ A multi-view application with persistent navigation, actions, and viewing/editing of content metadata (Navigation sidebar visible by default; Inspection sidebar visible by default). Ideal for more organized, fine-grained management of content and its metadata. It's recommended to hide the Inspection sidebar on pages/views where it's not used.
367
+
368
+ Use when the application has more than one page/view to navigate across and at least one page/view needs a dedicated area to view/edit metadata.
369
+
370
+ Do not use when the application has only one view and requires no navigation (use Shell with Inspector instead), or when all editing of content metadata can be handled in the main content window (use Shell with Navigation instead).
371
+ - traitType: variant
372
+ kind: enum
373
+ id: navigation-pattern
374
+ name: Navigation sidebar pattern
375
+ description: All application navigation lives in the Navigation sidebar. There are no secondary navigation bars, no in-content navigation panels, and no additional sidebars dedicated to navigation — this is the single, persistent location where users move between views, for predictability, simplicity, and scalability. Each pattern is designed for a specific purpose and should not be mixed. When content is hierarchical, that hierarchy is represented within the sidebar — it is not split across multiple panels or surfaces.
376
+ values:
377
+ - id: flat
378
+ name: Flat navigation
379
+ description: The default. Use when there is no meaningful parent-child relationship between views. When all views exist at the same level of hierarchy, the sidebar displays them as a single list of menu items. Each item navigates the user to a distinct view. The active view is visually indicated with a selected state.
380
+ - id: tree-view
381
+ name: Nested navigation via tree view
382
+ description: Allows users to expand and collapse sections to reveal child items without leaving the sidebar. Use when content has a parent-child hierarchy no more than three levels deep, when the number of descendants is relatively low (typically under 100), or when navigation items need to display more than a title (a caption or other metadata below the title).
383
+ - id: hierarchical-drill-in
384
+ name: Nested navigation via hierarchical drill-in
385
+ description: The sidebar displays one level of the hierarchy at a time. Selecting a parent replaces the current list with that parent's children, and a back affordance returns the user to the previous level. Use when content hierarchies exceed three levels, when the number of child items at any level would create excessive scrolling, or when navigation items need to show secondary information such as captions or metadata.
386
+ - traitType: state
387
+ kind: boolean
388
+ id: sidebar-visible
389
+ name: Sidebar visible
390
+ description: The sidebar (Navigation or Inspection) is shown. Its toggle IconButton reflects the pressed state via `aria-pressed={true}` (for the Inspection sidebar toggle) or shows a close icon (for the Navigation sidebar toggle). The aria-label and tooltip read "Hide [sidebar name]."
391
+ - traitType: state
392
+ kind: boolean
393
+ id: sidebar-hidden
394
+ name: Sidebar hidden
395
+ description: The sidebar (Navigation or Inspection) is hidden and its contents are removed from the tab order. Its toggle IconButton shows a menu/hamburger icon (Navigation) or an inspector/panel icon (Inspection). The aria-label and tooltip read "Show [sidebar name]."
396
+ uses:
397
+ - to: button
398
+ note: Required part.
399
+ - to: icon-button
400
+ note: Optional part.
401
+ - to: responsive
402
+ - to: navigation
403
+ - to: confirmation-dialogs
@@ -0,0 +1,41 @@
1
+ kind: sanity.pattern
2
+ id: loading-states
3
+ name: Loading states
4
+ description: 'Guidelines for handling the three distinct loading moments in Sanity UI: initial load, in-place refresh, and pending actions.'
5
+ metadata:
6
+ tags:
7
+ - tutorial
8
+ - loading
9
+ - skeleton
10
+ - spinner
11
+ - empty state
12
+ - pending
13
+ - progress
14
+ - pending action
15
+ - in-progress
16
+ - refresh
17
+ - saving
18
+ - publishing
19
+ - progress indicator
20
+ status:
21
+ status: stable
22
+ sections:
23
+ - kind: guidelines
24
+ for: all
25
+ framing: how-to-use
26
+ items:
27
+ - level: must
28
+ statement: Show a skeleton or "Loading…" on initial load once the wait passes about 200ms and no content is available yet. Below that, show nothing — an indicator that flashes and vanishes reads as noise. Hold empty-state copy until the load fails or returns nothing.
29
+ - level: must
30
+ statement: For a pending action on a Button, such as a form mid-submit, set `loading={true}`. The button keeps its size.
31
+ - level: should
32
+ statement: On in-place refresh when content is already shown, keep the content visible and show progress — not a full-screen message.
33
+ - level: should
34
+ statement: Use "-ing" wording for progress shown as status text, such as a "Saving…" message beside the form. Do not change a Button's label while it loads.
35
+ - level: must-not
36
+ statement: Never render an empty state and a loading state at the same time.
37
+ - kind: section
38
+ for: agent
39
+ freeform:
40
+ - title: Intent
41
+ body: Apply correct loading state patterns — skeleton on initial load, in-place progress on refresh, in-progress labels on pending actions — and avoid co-rendering empty and loading states.
@@ -0,0 +1,72 @@
1
+ kind: sanity.pattern
2
+ id: messaging
3
+ name: Messaging
4
+ description: Rules and guidance for writing tooltips, confirm dialogs, and status messages in Sanity UI.
5
+ metadata:
6
+ tags:
7
+ - tutorial
8
+ - tooltip
9
+ - dialog
10
+ - status
11
+ - messaging
12
+ - copy
13
+ - tone
14
+ - confirm dialog
15
+ - status message
16
+ - toast
17
+ - aria-live
18
+ - disabled
19
+ - WCAG
20
+ status:
21
+ status: stable
22
+ sections:
23
+ - kind: guidelines
24
+ for: all
25
+ framing: how-to-use
26
+ items:
27
+ - level: must
28
+ statement: Keep tooltip text under 75 characters. This keeps the tooltip on one line at common widths. Shorter is fine.
29
+ - refs:
30
+ - to: accessibility-guidelines#disabled-control-no-tooltip
31
+ rel: same-as
32
+ - level: should
33
+ statement: 'Start with a verb for action tooltips. For example: "Edit profile," not "Profile editor."'
34
+ - level: must-not
35
+ statement: Don't restate visible text. If the button says "Delete," the tooltip adds detail, not a repeat.
36
+ - kind: guidelines
37
+ for: all
38
+ framing: how-to-use
39
+ items:
40
+ - level: must
41
+ statement: 'The title names the action and the thing. For example: "Delete ''About us'' page?" Not "Are you sure?"'
42
+ - level: must
43
+ statement: 'The confirm button repeats the action verb. For example: "Delete 3 items," not "Confirm."'
44
+ - level: must
45
+ statement: The cancel button says "Cancel."
46
+ - level: should
47
+ statement: 'State side effects in the body. For example: "This will also remove 12 links to it."'
48
+ - kind: guidelines
49
+ for: all
50
+ framing: how-to-use
51
+ items:
52
+ - id: status-message-specificity
53
+ level: must
54
+ statement: 'Name the action and its result. For example: "Document published," not "Success."'
55
+ - refs:
56
+ - to: shared-foundations#tone-signals-state
57
+ rel: same-as
58
+ - refs:
59
+ - to: shared-foundations#tone-paired-with-second-channel
60
+ rel: same-as
61
+ - level: must
62
+ statement: Status copy must reach screen reader users via a live region (aria-live). Never show status visually only (WCAG 4.1.3). Don't auto-dismiss a result before a slow reader or magnifier user sees it — keep it visible until the user dismisses it, or use a duration long enough to read.
63
+ - id: status-message-past-tense
64
+ level: should
65
+ statement: 'Use past tense for done actions. For example: "Saved," "Published," "Deleted."'
66
+ - level: should
67
+ statement: Keep status messages to one sentence at most.
68
+ - kind: section
69
+ for: agent
70
+ freeform:
71
+ - title: Intent
72
+ body: Use this guide to write correct, accessible copy for tooltips, confirm dialogs, and status messages in Sanity UI.