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

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 (128) hide show
  1. package/README.md +10 -0
  2. package/dist/index.js +1 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/styles.css +1 -1
  5. package/docs/components/avatar-counter.dsds.yaml +78 -0
  6. package/docs/components/avatar-stack.dsds.yaml +96 -0
  7. package/docs/components/avatar.dsds.yaml +115 -0
  8. package/docs/components/badge.dsds.yaml +126 -0
  9. package/docs/components/box.dsds.yaml +223 -0
  10. package/docs/components/button.dsds.yaml +284 -0
  11. package/docs/components/card.dsds.yaml +317 -0
  12. package/docs/components/checkbox.dsds.yaml +204 -0
  13. package/docs/components/code.dsds.yaml +167 -0
  14. package/docs/components/container.dsds.yaml +189 -0
  15. package/docs/components/dialog.dsds.yaml +343 -0
  16. package/docs/components/divider.dsds.yaml +93 -0
  17. package/docs/components/eyebrow.dsds.yaml +217 -0
  18. package/docs/components/flex.dsds.yaml +237 -0
  19. package/docs/components/grid.dsds.yaml +217 -0
  20. package/docs/components/h-stack.dsds.yaml +127 -0
  21. package/docs/components/heading.dsds.yaml +233 -0
  22. package/docs/components/hotkeys.dsds.yaml +60 -0
  23. package/docs/components/icon-button.dsds.yaml +220 -0
  24. package/docs/components/icon.dsds.yaml +275 -0
  25. package/docs/components/indicator-stack.dsds.yaml +98 -0
  26. package/docs/components/indicator.dsds.yaml +108 -0
  27. package/docs/components/inline.dsds.yaml +127 -0
  28. package/docs/components/kbd.dsds.yaml +59 -0
  29. package/docs/components/link.dsds.yaml +108 -0
  30. package/docs/components/list-button-item.dsds.yaml +103 -0
  31. package/docs/components/list-item-image.dsds.yaml +82 -0
  32. package/docs/components/list-item-text.dsds.yaml +80 -0
  33. package/docs/components/list-item.dsds.yaml +148 -0
  34. package/docs/components/list.dsds.yaml +162 -0
  35. package/docs/components/popover.dsds.yaml +208 -0
  36. package/docs/components/press-area.dsds.yaml +279 -0
  37. package/docs/components/radio.dsds.yaml +198 -0
  38. package/docs/components/select.dsds.yaml +214 -0
  39. package/docs/components/skip-to-content.dsds.yaml +110 -0
  40. package/docs/components/spinner.dsds.yaml +119 -0
  41. package/docs/components/switch.dsds.yaml +202 -0
  42. package/docs/components/tab.dsds.yaml +54 -0
  43. package/docs/components/tabs-list.dsds.yaml +56 -0
  44. package/docs/components/tabs-panel.dsds.yaml +54 -0
  45. package/docs/components/tabs.dsds.yaml +104 -0
  46. package/docs/components/text-area.dsds.yaml +170 -0
  47. package/docs/components/text-input.dsds.yaml +189 -0
  48. package/docs/components/text.dsds.yaml +268 -0
  49. package/docs/components/tooltip-group.dsds.yaml +90 -0
  50. package/docs/components/tooltip.dsds.yaml +216 -0
  51. package/docs/components/v-stack.dsds.yaml +155 -0
  52. package/docs/components/visually-hidden.dsds.yaml +112 -0
  53. package/docs/evals/cases.yaml +1319 -0
  54. package/docs/examples/checkbox-2.tsx +57 -0
  55. package/docs/examples/confirmation-dialogs-1.tsx +27 -0
  56. package/docs/examples/confirmation-dialogs-2.tsx +55 -0
  57. package/docs/examples/confirmation-dialogs-3.tsx +28 -0
  58. package/docs/examples/confirmation-dialogs-4.tsx +38 -0
  59. package/docs/examples/popover-1.tsx +48 -0
  60. package/docs/examples/popover-2.tsx +53 -0
  61. package/docs/foundations/accessibility-guidelines.dsds.yaml +301 -0
  62. package/docs/foundations/color-guidelines.dsds.yaml +308 -0
  63. package/docs/foundations/content-guidelines.dsds.yaml +285 -0
  64. package/docs/foundations/semantics.dsds.yaml +125 -0
  65. package/docs/foundations/spacing-guidelines.dsds.yaml +226 -0
  66. package/docs/foundations/typography-guidelines.dsds.yaml +322 -0
  67. package/docs/icons.dsds.yaml +2513 -0
  68. package/docs/index.dsds.yaml +515 -0
  69. package/docs/overview/api-essentials.dsds.yaml +221 -0
  70. package/docs/overview/component-reference.dsds.yaml +215 -0
  71. package/docs/overview/designer-contribution-model.dsds.yaml +77 -0
  72. package/docs/overview/developer-contribution-model.dsds.yaml +362 -0
  73. package/docs/overview/installation.dsds.yaml +238 -0
  74. package/docs/overview/quick-start.dsds.yaml +317 -0
  75. package/docs/overview/resources.dsds.yaml +34 -0
  76. package/docs/patterns/confirmation-dialogs.dsds.yaml +140 -0
  77. package/docs/patterns/error-messaging.dsds.yaml +58 -0
  78. package/docs/patterns/forms.dsds.yaml +356 -0
  79. package/docs/patterns/layouts.dsds.yaml +403 -0
  80. package/docs/patterns/loading-states.dsds.yaml +41 -0
  81. package/docs/patterns/messaging.dsds.yaml +72 -0
  82. package/docs/patterns/navigation.dsds.yaml +153 -0
  83. package/docs/patterns/responsive.dsds.yaml +590 -0
  84. package/docs/tokens/color.dsds.yaml +1158 -0
  85. package/docs/tokens/container-widths.dsds.yaml +131 -0
  86. package/docs/tokens/content.dsds.yaml +258 -0
  87. package/docs/tokens/content.tokens.json +180 -0
  88. package/docs/tokens/dtcg/README.md +39 -0
  89. package/docs/tokens/dtcg/css/color.css +107 -0
  90. package/docs/tokens/dtcg/css/container.css +12 -0
  91. package/docs/tokens/dtcg/css/fontFamily.css +10 -0
  92. package/docs/tokens/dtcg/css/fontWeight.css +10 -0
  93. package/docs/tokens/dtcg/css/index.css +13 -0
  94. package/docs/tokens/dtcg/css/radius.css +14 -0
  95. package/docs/tokens/dtcg/css/semantic.css +42 -0
  96. package/docs/tokens/dtcg/css/shadow.css +22 -0
  97. package/docs/tokens/dtcg/css/space.css +16 -0
  98. package/docs/tokens/dtcg/css/typography.css +69 -0
  99. package/docs/tokens/dtcg/json/color.tokens.json +911 -0
  100. package/docs/tokens/dtcg/json/container.tokens.json +44 -0
  101. package/docs/tokens/dtcg/json/fontFamily.tokens.json +10 -0
  102. package/docs/tokens/dtcg/json/fontWeight.tokens.json +18 -0
  103. package/docs/tokens/dtcg/json/radius.tokens.json +58 -0
  104. package/docs/tokens/dtcg/json/semantic.tokens.json +372 -0
  105. package/docs/tokens/dtcg/json/shadow.tokens.json +599 -0
  106. package/docs/tokens/dtcg/json/space.tokens.json +72 -0
  107. package/docs/tokens/dtcg/json/typography.tokens.json +354 -0
  108. package/docs/tokens/font-family.dsds.yaml +79 -0
  109. package/docs/tokens/font-weight.dsds.yaml +103 -0
  110. package/docs/tokens/radius.dsds.yaml +153 -0
  111. package/docs/tokens/semantic.dsds.yaml +397 -0
  112. package/docs/tokens/shadow.dsds.yaml +125 -0
  113. package/docs/tokens/space.dsds.yaml +185 -0
  114. package/docs/tokens/typography.dsds.yaml +316 -0
  115. package/llms.txt +108 -0
  116. package/package.json +6 -3
  117. package/skills/sanity-ui-5/SKILL.md +158 -0
  118. package/skills/sanity-ui-5/references/component-choice.md +37 -0
  119. package/skills/sanity-ui-5/references/components.md +145 -0
  120. package/skills/sanity-ui-5/references/forms-and-accessibility.md +189 -0
  121. package/skills/sanity-ui-5/references/migrating-from-v3.md +250 -0
  122. package/skills/sanity-ui-5/references/props-and-imports.md +169 -0
  123. package/skills/sanity-ui-5/references/setup.md +177 -0
  124. package/skills/sanity-ui-5/references/silent-failures.md +33 -0
  125. package/skills/sanity-ui-5/references/taste.md +53 -0
  126. package/skills/sanity-ui-5/references/tone-and-color.md +55 -0
  127. package/src/css/classes/system/shadow.css +45 -0
  128. package/src/version.ts +2 -2
@@ -0,0 +1,515 @@
1
+ $schema: https://designsystemdocspec.org/v0.23.1/dsds.bundled.yaml
2
+ schemaVersion: 0.23.1
3
+ name: Sanity UI
4
+ entries:
5
+ - kind: system
6
+ id: sanity-ui
7
+ name: Sanity UI
8
+ description: Sanity’s React component library and design system.
9
+ metadata:
10
+ status:
11
+ status: beta
12
+ organization: Sanity
13
+ url: https://www.sanity.io/ui
14
+ version: 5.x-alpha
15
+ platforms:
16
+ - react
17
+ sourceRoot: ../../..
18
+ refs:
19
+ - href: https://www.sanity.io/ui
20
+ rel: relates-to
21
+ role: Sanity UI homepage
22
+ - href: https://github.com/sanity-io/ui
23
+ rel: source
24
+ role: Source on GitHub
25
+ shared:
26
+ - id: shared-foundations
27
+ name: Foundations
28
+ description: Cross-cutting principles that apply to every component and pattern in Sanity UI. When a guideline is unclear, trace it back here.
29
+ metadata:
30
+ tags:
31
+ - concept
32
+ - foundations
33
+ - principles
34
+ - accessibility
35
+ - semantics
36
+ - color
37
+ - spacing
38
+ - motion
39
+ - iconography
40
+ - behavior
41
+ - purpose
42
+ - design system
43
+ sections:
44
+ - kind: guidelines
45
+ for: all
46
+ framing: how-to-use
47
+ items:
48
+ - id: wcag-22-aa-baseline
49
+ level: must
50
+ statement: WCAG 2.2 AA is a hard requirement for all work. Keyboard nav, screen reader support, and touch targets are required from the start — not added after.
51
+ - id: semantics-mirror-visuals
52
+ level: must
53
+ statement: Semantics must mirror visuals. Spacing, color, and motion all rely on visual acuity to convey information; none of that reaches assistive technology unless the same information appears in markup. Use semantic HTML, and provide ARIA roles and ARIA properties additively where gaps in HTML semantics exist, to express what the visual layer shows.
54
+ - id: container-inside-scroll-box
55
+ level: must
56
+ statement: Place `Container` inside the scroll `Box`, not around it. `Container` only constrains max-width; the scroll `Box` owns `flexGrow` and `overflowY`. Wrapping the scroll box in a Container caps the scroll region instead of the content.
57
+ - id: indicator-stack-for-adjacent-dots
58
+ level: must
59
+ statement: Use `IndicatorStack` whenever two or more `Indicator` dots appear side by side. It applies the cut-out mask between adjacent dots; bare Indicators placed next to each other render without it and read as one blurred shape.
60
+ - id: icon-only-control-needs-name
61
+ level: must
62
+ statement: 'Every icon-only control has an `aria-label` on the control itself. That means an IconButton, or a Button with an icon and no `text`. The icon needs nothing: Icon hides itself when it has no `aria-label`, and IconButton hides its own icon. A tooltip does not supply an accessible name.'
63
+ checks:
64
+ - href: ./evals/cases.yaml
65
+ role: agent-test
66
+ checkedBy: assisted
67
+ refines:
68
+ - to: button#button-icon-only-accessible-name
69
+ - to: quick-start#add-aria-label-to-every-icon-only-button-a-tooltip-does-not-set-an-accessible-name
70
+ $extensions:
71
+ io.jev:
72
+ type: boolean
73
+ - id: aria-disabled-keeps-focus
74
+ level: must
75
+ statement: Use `aria-disabled` instead of the HTML `disabled` attribute when a button must stay in the tab order. It keeps the button focusable but blocks the action (WCAG 2.1.1 A).
76
+ tags:
77
+ - accessibility
78
+ - id: aria-pressed-toggle
79
+ level: must
80
+ statement: Set `aria-pressed` on a two-state toggle button (favorite, mute, follow). Keep the button's label — its `text` or `aria-label` — describing the action, not the state, and keep it the same in every state. Screen readers announce the pressed state on their own.
81
+ tags:
82
+ - accessibility
83
+ - id: inner-spacing-smaller-than-outer
84
+ level: must
85
+ statement: Inner spacing within a group must be smaller than the space around it, by at least one step on the scale. Equal inner and outer spacing hides that the container is one group.
86
+ - id: destructive-actions-use-critical-tone
87
+ level: must
88
+ statement: A destructive action should use `tone="critical"`. Destructive means the action removes data — delete, archive, revoke, terminate. All destructive actions should display an icon that reads as destructive and use a verb in the label naming what is lost.
89
+ checks:
90
+ - href: ./evals/cases.yaml
91
+ role: agent-test
92
+ checkedBy: assisted
93
+ refines:
94
+ - to: button#most-buttons-tertiary
95
+ - to: layouts#give-destructive-actions-tone-critical-and-an-erroroutlineicon-through-iconstart-iconstart-erroroutlineicon
96
+ $extensions:
97
+ io.jev:
98
+ type: boolean
99
+ - id: tone-signals-state
100
+ level: must
101
+ statement: 'Use `tone` only to signal a real state: `positive` for success, `caution` for a warning, `critical` for an error or a destructive action, and `suggest` for guidance or a soft nudge. Everything else stays `neutral`. Never apply a tone for decoration or emphasis.'
102
+ checks:
103
+ - href: ./evals/cases.yaml
104
+ role: agent-test
105
+ checkedBy: assisted
106
+ refs:
107
+ - to: shared-foundations#tone-paired-with-second-channel
108
+ rel: relates-to
109
+ - to: shared-foundations#destructive-actions-use-critical-tone
110
+ rel: relates-to
111
+ $extensions:
112
+ io.jev:
113
+ type: boolean
114
+ - id: tone-paired-with-second-channel
115
+ level: must
116
+ statement: Tone is only the colour channel, so it never carries a state alone. A toned message must either lead with the state in words or carry an icon that reinforces it. Leading with the state looks like "**Error:** Process timed out. Restart the process to try again." Text that only describes what happened, as in `<Text tone="critical">Timed out</Text>`, does neither and needs the icon. A status dot, a coloured word or a tinted card with nothing else beside it fails this rule.
117
+ checks:
118
+ - href: ./evals/cases.yaml
119
+ role: agent-test
120
+ checkedBy: assisted
121
+ refines:
122
+ - to: color-guidelines#second-channel-required
123
+ refs:
124
+ - to: shared-foundations#tone-signals-state
125
+ rel: relates-to
126
+ $extensions:
127
+ io.jev:
128
+ type: boolean
129
+ - id: form-control-visible-label-is-the-name
130
+ level: should
131
+ statement: Name a Checkbox, Radio or Switch through a linked label element (id and htmlFor), aria-label or aria-labelledby. These controls render no label of their own, so the name must come from one of these.
132
+ - id: form-control-repeated-rows-use-visuallyhidden
133
+ level: should
134
+ statement: When the visible label would repeat across rows, wrap a fully descriptive label in `VisuallyHidden` rather than showing the repeated text. The linked label element is the accessible name, so hiding a more descriptive version of its text keeps a single accessible name in the DOM instead of introducing a second, separately maintained one.
135
+ - id: form-control-aria-label-is-the-fallback
136
+ level: should
137
+ statement: Use `aria-label` or `aria-labelledby` only when the label content can't be restructured that way — for example, when the descriptive text already exists elsewhere in the DOM. Both attributes forward straight to the underlying `<input>`, but they create a second source of the accessible name that can drift out of sync with the visible label.
138
+ refines:
139
+ - to: forms#aria-label-overrides-name
140
+ - id: form-control-aria-label-includes-visible-text
141
+ level: should
142
+ statement: When setting `aria-label` on a Checkbox, Radio or Switch, include the visible `label` text inside it. This satisfies WCAG 2.5.3 (Label in Name). Voice-control users can then target the control by what they see on screen.
143
+ - id: least-that-does-the-job
144
+ level: should
145
+ statement: "Use the least that does the job. Each foundation provides a constrained set: a spacing scale, a tone family, motion tokens, and elevation levels. The set exists so you don't invent. One emphasized element draws attention; three cancel each other out."
146
+ refines:
147
+ - to: shared-foundations#use-the-constrained-token-set-spacing-scale-tone-family-motion-tokens-elevation-levels-do-not-invent-custom-values-outside-the-system
148
+ - id: define-state-model-first
149
+ level: should
150
+ statement: Define the complete state model before any visual design. Name every state, every transition, and every copy slot. A spec is not done until all keyboard behaviors are defined, all states are verifiable, and all ARIA properties are assigned.
151
+ - id: every-choice-has-a-job
152
+ level: should
153
+ statement: Every design choice should have a job. Color communicates status. Motion marks a state change. Icons support recognition. Elevation signals layering. If a choice has no named job, leave it out.
154
+ - id: prefer-component-over-native-element
155
+ level: should
156
+ statement: 'Reach for the design-system component before a native element that has a direct equivalent: `Box` (or `VStack`/`HStack`/`Flex`/`Grid`) instead of `div`, `Text` instead of `p` or `span`, `Heading` instead of `h1`–`h6`, `Button` instead of `button`, `Link` instead of `a`, `List` instead of `ul`/`ol`, `Divider` instead of `hr`. A native element used where a component exists opts out of the theme, the spacing scale, and the accessibility behaviour the component already carries. Elements with no component equivalent stay native — `table` and its parts, `form`, `section`, `main`, `label`.'
157
+ checks:
158
+ - href: ./evals/cases.yaml
159
+ role: agent-test
160
+ checkedBy: assisted
161
+ $extensions:
162
+ io.jev:
163
+ type: boolean
164
+ - id: no-emojis
165
+ level: must-not
166
+ statement: Never use emojis in any way outside of user reactions. Emojis must never be used for decorative purposes. If a visual symbol is necessary, use Icon instead.
167
+ checks:
168
+ - href: ./evals/cases.yaml
169
+ role: agent-test
170
+ checkedBy: assisted
171
+ $extensions:
172
+ io.jev:
173
+ type: boolean
174
+ - id: error-state-never-disabled
175
+ level: must-not
176
+ statement: Never disable an input that is in an error or critical state. A disabled control cannot receive focus. The user cannot reach the field to correct the problem. Assistive technology skips disabled inputs, which strands the error message without the element it describes. Keep the field enabled and carry the problem through tone, an accessible description, and visible text. When a field must stop accepting input, clear the error state first, or mark it read-only instead.
177
+ - id: card-not-for-structural-regions
178
+ level: must-not
179
+ statement: Do not use `Card` for structural UI regions — toolbars, sidebars, nav headers, scroll wrappers. Card carries a visual surface (background, border, shadow); a structural region needs layout only. Use `Box` or `Flex` instead.
180
+ - id: install-alpha-not-ui-poc
181
+ level: must-not
182
+ statement: Do not install `@sanity-labs/ui-poc`. It was the internal name of Sanity UI 5 before the merge into `@sanity/ui`. Install `@sanity/ui@alpha`.
183
+ - id: layout-primitive-as-not-behavioral
184
+ level: must-not
185
+ statement: Do not use `as` to render `<button>`, `<dialog>`, `<select>`, `<details>`, `<summary>`, or `<fieldset>` on a layout primitive. Box, Container, Flex and Grid do not fulfil the keyboard, focus, or ARIA contracts those elements require (WCAG 4.1.2 A). Use the matching Sanity UI component instead.
186
+ - id: layout-primitive-no-text-styles
187
+ level: should
188
+ statement: Box, Container, Flex and Grid set no text styles. They set no font size, line height, weight or color, and take no inline text styles. Use Text or Heading for text.
189
+ - id: icon-not-sole-content-of-control
190
+ level: must-not
191
+ statement: Don't use Icon inside an interactive element. Use Button, with `iconStart` if it needs an icon, or IconButton when the icon is the only content.
192
+ checks:
193
+ - href: ./evals/cases.yaml
194
+ role: agent-test
195
+ checkedBy: assisted
196
+ refines:
197
+ - to: button#don-t-use-button-without-a-text-label-button-relies-on-the-text-label-to-describe-its-purpose-use-iconbutton-in-cases-where-the-icon-is-the-only-visual-indicator
198
+ $extensions:
199
+ io.jev:
200
+ type: boolean
201
+ - kind: guidelines
202
+ for: agent
203
+ framing: how-to-use
204
+ items:
205
+ - level: must
206
+ statement: 'Use the constrained token set: spacing scale, tone family, motion tokens, elevation levels. Do not invent custom values outside the system.'
207
+ - level: should
208
+ statement: Design token values ship from `@sanity-labs/design-tokens` as DTCG tokens and CSS custom properties. Each token group has a file in the package's `docs/tokens/` folder, with its values in `docs/tokens/dtcg/json/`. The groups are `color`, `container-widths`, `font-family`, `font-weight`, `radius`, `semantic`, `shadow`, `space` and `typography`.
209
+ - kind: section
210
+ for: all
211
+ freeform:
212
+ - title: Overview
213
+ body: Foundations are the shared principles beneath every component and pattern in Sanity UI. Each foundation — color, spacing, motion — draws from a small set of cross-cutting rules. When a guideline is unclear, trace it back to the nearest principle here.
214
+ - title: How the foundations connect
215
+ body: |-
216
+ Each foundation is self-contained, but they share constants and rules.
217
+
218
+ **Interaction and all other foundations.** Each component state requires resolved color contrast, a motion transition, a content slot, correct spacing, and accessible names. A spec is not complete until all six resolve.
219
+
220
+ **Color and accessibility.** Contrast ratios and CVD simulation live in both. The accessibility foundation owns the required numbers; color owns the tones.
221
+
222
+ **Spacing and interaction.** The 24px hit-area floor is a shared constant. Visual gap and hit area are separate properties — one does not set the other.
223
+
224
+ **Motion and accessibility.** Reduced-motion support is a hard safety rule. The motion token layer resolves it in CSS. JavaScript-driven animation must check the preference at runtime.
225
+
226
+ **Iconography and content.** The accessible name on an icon-only control follows the content naming rules: one concept, one plain-language name, consistent across every surface.
227
+ - kind: guidelines
228
+ for: all
229
+ framing: how-to-use
230
+ title: Rules shared across components and patterns
231
+ items:
232
+ - id: table-uses-native-elements
233
+ level: must
234
+ statement: 'Build table structure from native HTML elements: `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<th>` and `<td>`. Do not use `Box as="table"` or `Box as="tr"`: Box applies `display: block`, which breaks the table layout model and stacks the cells.'
235
+ - id: table-has-caption
236
+ level: must
237
+ statement: 'Give every table a `<caption>`. It may be visually hidden, but it must be present: screen readers announce it before the table.'
238
+ - id: page-has-one-main
239
+ level: must
240
+ statement: A page has exactly one `<main>` landmark. Render the primary content region with `as="main"`, unless an outer shell already provides one; never nest a second. Without a `<main>`, screen reader users get no skip target and axe reports landmark-one-main.
241
+ - id: shell-regions-are-landmarks
242
+ level: must
243
+ statement: 'Render each shell region as its landmark: `as="nav"` for navigation, `as="main"` for the content, and `as="aside"` for an inspector. These give screen reader users the page''s structure.'
244
+ - id: shell-state-from-matches-desktop
245
+ level: must
246
+ statement: Initialize the shell's open state and `isDesktop` with `matchesDesktop()`, not `true`. The navigation then starts open on desktop and closed on mobile, with no flash of the wrong state on the first render.
247
+ - id: main-region-min-width-zero
248
+ level: must
249
+ statement: Set `minWidth="0"` on the flex child that holds the main content. Without it, wide content or a long heading pushes the layout past the viewport.
250
+ - id: shell-min-height-not-height
251
+ level: must
252
+ statement: Use `minHeight="100vh"` on the outer container, not `height="100vh"`. `height` stops the layout from growing taller than the viewport.
253
+ - id: selected-is-attribute-presence
254
+ level: must
255
+ statement: '`selected` works on attribute presence, not value: `selected={false}` looks the same as `selected={true}`. Pass `selected={isSelected || undefined}` so the prop is left out when the item is not selected.'
256
+ - id: navigating-row-is-a-link
257
+ level: must
258
+ statement: 'A row that navigates renders as a link: pass `as="a"` and `href`, not `onClick`. Middle-click and "Open in new tab" then work.'
259
+ - id: card-no-layout-props
260
+ level: must-not
261
+ statement: 'Do not pass layout or padding props to Card: `padding`, `flexGrow`, `minWidth`, `overflow` and the like are TypeScript errors. Card sets its padding with `density`. Put layout on a Box around the Card.'
262
+ checks:
263
+ - href: ./evals/cases.yaml
264
+ role: agent-test
265
+ checkedBy: assisted
266
+ $extensions:
267
+ io.jev:
268
+ type: boolean
269
+ - id: card-has-no-onclick
270
+ level: must-not
271
+ statement: Do not put `onClick` on Card; it has none. To make a card clickable, wrap its content in PressArea, which renders a real `<button>` or `<a>`, or use a List.ButtonItem row.
272
+ - id: table-not-simulated-with-flex
273
+ level: must-not
274
+ statement: Do not use Flex or Grid to simulate a table. It has no row or cell semantics, so screen readers cannot announce row counts or move by column.
275
+ refs:
276
+ - href: ./components/avatar.dsds.yaml
277
+ rel: file
278
+ role: Avatar (component)
279
+ - href: ./components/avatar-counter.dsds.yaml
280
+ rel: file
281
+ role: AvatarCounter (component)
282
+ - href: ./components/avatar-stack.dsds.yaml
283
+ rel: file
284
+ role: AvatarStack (component)
285
+ - href: ./components/badge.dsds.yaml
286
+ rel: file
287
+ role: Badge (component)
288
+ - href: ./components/box.dsds.yaml
289
+ rel: file
290
+ role: Box (component)
291
+ - href: ./components/button.dsds.yaml
292
+ rel: file
293
+ role: Button (component)
294
+ - href: ./components/card.dsds.yaml
295
+ rel: file
296
+ role: Card (component)
297
+ - href: ./components/checkbox.dsds.yaml
298
+ rel: file
299
+ role: Checkbox (component)
300
+ - href: ./components/code.dsds.yaml
301
+ rel: file
302
+ role: Code (component)
303
+ - href: ./components/container.dsds.yaml
304
+ rel: file
305
+ role: Container (component)
306
+ - href: ./components/dialog.dsds.yaml
307
+ rel: file
308
+ role: Dialog (component)
309
+ - href: ./components/divider.dsds.yaml
310
+ rel: file
311
+ role: Divider (component)
312
+ - href: ./components/eyebrow.dsds.yaml
313
+ rel: file
314
+ role: Eyebrow (component)
315
+ - href: ./components/flex.dsds.yaml
316
+ rel: file
317
+ role: Flex (component)
318
+ - href: ./components/grid.dsds.yaml
319
+ rel: file
320
+ role: Grid (component)
321
+ - href: ./components/h-stack.dsds.yaml
322
+ rel: file
323
+ role: HStack (component)
324
+ - href: ./components/heading.dsds.yaml
325
+ rel: file
326
+ role: Heading (component)
327
+ - href: ./components/hotkeys.dsds.yaml
328
+ rel: file
329
+ role: Hotkeys (component)
330
+ - href: ./components/icon-button.dsds.yaml
331
+ rel: file
332
+ role: IconButton (component)
333
+ - href: ./components/icon.dsds.yaml
334
+ rel: file
335
+ role: Icon (component)
336
+ - href: ./components/indicator-stack.dsds.yaml
337
+ rel: file
338
+ role: IndicatorStack (component)
339
+ - href: ./components/indicator.dsds.yaml
340
+ rel: file
341
+ role: Indicator (component)
342
+ - href: ./components/inline.dsds.yaml
343
+ rel: file
344
+ role: Inline (component)
345
+ - href: ./components/kbd.dsds.yaml
346
+ rel: file
347
+ role: KBD (component)
348
+ - href: ./components/link.dsds.yaml
349
+ rel: file
350
+ role: Link (component)
351
+ - href: ./components/list-button-item.dsds.yaml
352
+ rel: file
353
+ role: List.ButtonItem (component)
354
+ - href: ./components/list-item-image.dsds.yaml
355
+ rel: file
356
+ role: List.ItemImage (component)
357
+ - href: ./components/list-item-text.dsds.yaml
358
+ rel: file
359
+ role: List.ItemText (component)
360
+ - href: ./components/list-item.dsds.yaml
361
+ rel: file
362
+ role: List.Item (component)
363
+ - href: ./components/list.dsds.yaml
364
+ rel: file
365
+ role: List (component)
366
+ - href: ./components/popover.dsds.yaml
367
+ rel: file
368
+ role: Popover (component)
369
+ - href: ./components/press-area.dsds.yaml
370
+ rel: file
371
+ role: PressArea (component)
372
+ - href: ./components/radio.dsds.yaml
373
+ rel: file
374
+ role: Radio (component)
375
+ - href: ./components/select.dsds.yaml
376
+ rel: file
377
+ role: Select (component)
378
+ - href: ./components/skip-to-content.dsds.yaml
379
+ rel: file
380
+ role: SkipToContent (component)
381
+ - href: ./components/spinner.dsds.yaml
382
+ rel: file
383
+ role: Spinner (component)
384
+ - href: ./components/switch.dsds.yaml
385
+ rel: file
386
+ role: Switch (component)
387
+ - href: ./components/tabs.dsds.yaml
388
+ rel: file
389
+ role: Tabs (component family)
390
+ - href: ./components/tab.dsds.yaml
391
+ rel: file
392
+ role: Tabs.Tab (component)
393
+ - href: ./components/tabs-list.dsds.yaml
394
+ rel: file
395
+ role: Tabs.List (component)
396
+ - href: ./components/tabs-panel.dsds.yaml
397
+ rel: file
398
+ role: Tabs.Panel (component)
399
+ - href: ./components/text.dsds.yaml
400
+ rel: file
401
+ role: Text (component)
402
+ - href: ./components/text-area.dsds.yaml
403
+ rel: file
404
+ role: TextArea (component)
405
+ - href: ./components/text-input.dsds.yaml
406
+ rel: file
407
+ role: TextInput (component)
408
+ - href: ./components/tooltip-group.dsds.yaml
409
+ rel: file
410
+ role: TooltipGroup (component)
411
+ - href: ./components/tooltip.dsds.yaml
412
+ rel: file
413
+ role: Tooltip (component)
414
+ - href: ./components/v-stack.dsds.yaml
415
+ rel: file
416
+ role: VStack (component)
417
+ - href: ./components/visually-hidden.dsds.yaml
418
+ rel: file
419
+ role: VisuallyHidden (component)
420
+ - href: ./foundations/accessibility-guidelines.dsds.yaml
421
+ rel: file
422
+ role: Accessibility guidelines (sanity.foundation)
423
+ - href: ./foundations/color-guidelines.dsds.yaml
424
+ rel: file
425
+ role: Color guidelines (sanity.foundation)
426
+ - href: ./foundations/content-guidelines.dsds.yaml
427
+ rel: file
428
+ role: Content guidelines (sanity.foundation)
429
+ - href: ./foundations/semantics.dsds.yaml
430
+ rel: file
431
+ role: Semantics (sanity.foundation)
432
+ - href: ./foundations/spacing-guidelines.dsds.yaml
433
+ rel: file
434
+ role: Spacing guidelines (sanity.foundation)
435
+ - href: ./foundations/typography-guidelines.dsds.yaml
436
+ rel: file
437
+ role: Typography guidelines (sanity.foundation)
438
+ - href: ./overview/component-reference.dsds.yaml
439
+ rel: file
440
+ role: Component reference (sanity.guide)
441
+ - href: ./overview/designer-contribution-model.dsds.yaml
442
+ rel: file
443
+ role: Sanity Design System's design contribution model (sanity.guide)
444
+ - href: ./overview/developer-contribution-model.dsds.yaml
445
+ rel: file
446
+ role: Developer contribution model (sanity.guide)
447
+ - href: ./overview/api-essentials.dsds.yaml
448
+ rel: file
449
+ role: API essentials (sanity.guide)
450
+ - href: ./overview/installation.dsds.yaml
451
+ rel: file
452
+ role: Installation (sanity.guide)
453
+ - href: ./overview/quick-start.dsds.yaml
454
+ rel: file
455
+ role: Quick start (sanity.guide)
456
+ - href: ./patterns/confirmation-dialogs.dsds.yaml
457
+ rel: file
458
+ role: Confirmation & action dialogs (sanity.pattern)
459
+ - href: ./patterns/error-messaging.dsds.yaml
460
+ rel: file
461
+ role: Error messaging (sanity.pattern)
462
+ - href: ./patterns/forms.dsds.yaml
463
+ rel: file
464
+ role: Forms and form copy (sanity.pattern)
465
+ - href: ./patterns/layouts.dsds.yaml
466
+ rel: file
467
+ role: Layout guidelines (sanity.pattern)
468
+ - href: ./patterns/loading-states.dsds.yaml
469
+ rel: file
470
+ role: Loading states (sanity.pattern)
471
+ - href: ./patterns/messaging.dsds.yaml
472
+ rel: file
473
+ role: Messaging (sanity.pattern)
474
+ - href: ./patterns/navigation.dsds.yaml
475
+ rel: file
476
+ role: Sidebar navigation pattern (sanity.pattern)
477
+ - href: ./patterns/responsive.dsds.yaml
478
+ rel: file
479
+ role: Responsive (sanity.pattern)
480
+ - href: ./tokens/color.dsds.yaml
481
+ rel: file
482
+ role: Color palette (entry)
483
+ - href: ./tokens/container-widths.dsds.yaml
484
+ rel: file
485
+ role: Container widths (entry)
486
+ - href: ./tokens/content.dsds.yaml
487
+ rel: file
488
+ role: Content tokens (demo) (entry)
489
+ - href: ./tokens/font-family.dsds.yaml
490
+ rel: file
491
+ role: Font families (entry)
492
+ - href: ./tokens/font-weight.dsds.yaml
493
+ rel: file
494
+ role: Font weights (entry)
495
+ - href: ./tokens/radius.dsds.yaml
496
+ rel: file
497
+ role: Radius scale (entry)
498
+ - href: ./tokens/semantic.dsds.yaml
499
+ rel: file
500
+ role: Semantic tokens (entry)
501
+ - href: ./tokens/shadow.dsds.yaml
502
+ rel: file
503
+ role: Shadow scale (entry)
504
+ - href: ./tokens/space.dsds.yaml
505
+ rel: file
506
+ role: Space scale (entry)
507
+ - href: ./tokens/typography.dsds.yaml
508
+ rel: file
509
+ role: Typography styles (entry)
510
+ - href: ./overview/resources.dsds.yaml
511
+ rel: file
512
+ role: Resources (sanity.guide)
513
+ - href: ./icons.dsds.yaml
514
+ rel: file
515
+ role: Sanity icon library (@sanity/icons)