@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.
- package/README.md +10 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -59
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/avatar-counter.dsds.yaml +78 -0
- package/docs/components/avatar-stack.dsds.yaml +96 -0
- package/docs/components/avatar.dsds.yaml +115 -0
- package/docs/components/badge.dsds.yaml +126 -0
- package/docs/components/box.dsds.yaml +223 -0
- package/docs/components/button.dsds.yaml +296 -0
- package/docs/components/card.dsds.yaml +317 -0
- package/docs/components/checkbox.dsds.yaml +204 -0
- package/docs/components/code.dsds.yaml +169 -0
- package/docs/components/container.dsds.yaml +189 -0
- package/docs/components/dialog.dsds.yaml +343 -0
- package/docs/components/divider.dsds.yaml +93 -0
- package/docs/components/eyebrow.dsds.yaml +198 -0
- package/docs/components/flex.dsds.yaml +237 -0
- package/docs/components/grid.dsds.yaml +217 -0
- package/docs/components/h-stack.dsds.yaml +127 -0
- package/docs/components/heading.dsds.yaml +233 -0
- package/docs/components/hotkeys.dsds.yaml +60 -0
- package/docs/components/icon-button.dsds.yaml +227 -0
- package/docs/components/icon.dsds.yaml +275 -0
- package/docs/components/indicator-stack.dsds.yaml +98 -0
- package/docs/components/indicator.dsds.yaml +108 -0
- package/docs/components/inline.dsds.yaml +127 -0
- package/docs/components/kbd.dsds.yaml +59 -0
- package/docs/components/link.dsds.yaml +108 -0
- package/docs/components/list-button-item.dsds.yaml +103 -0
- package/docs/components/list-item-image.dsds.yaml +82 -0
- package/docs/components/list-item-text.dsds.yaml +80 -0
- package/docs/components/list-item.dsds.yaml +148 -0
- package/docs/components/list.dsds.yaml +162 -0
- package/docs/components/popover.dsds.yaml +214 -0
- package/docs/components/press-area.dsds.yaml +279 -0
- package/docs/components/radio.dsds.yaml +198 -0
- package/docs/components/select.dsds.yaml +214 -0
- package/docs/components/skip-to-content.dsds.yaml +110 -0
- package/docs/components/spinner.dsds.yaml +119 -0
- package/docs/components/switch.dsds.yaml +202 -0
- package/docs/components/tab.dsds.yaml +54 -0
- package/docs/components/tabs-list.dsds.yaml +56 -0
- package/docs/components/tabs-panel.dsds.yaml +54 -0
- package/docs/components/tabs.dsds.yaml +104 -0
- package/docs/components/text-area.dsds.yaml +170 -0
- package/docs/components/text-input.dsds.yaml +189 -0
- package/docs/components/text.dsds.yaml +268 -0
- package/docs/components/tooltip-group.dsds.yaml +90 -0
- package/docs/components/tooltip.dsds.yaml +216 -0
- package/docs/components/v-stack.dsds.yaml +155 -0
- package/docs/components/visually-hidden.dsds.yaml +112 -0
- package/docs/evals/cases.yaml +1319 -0
- package/docs/examples/checkbox-2.tsx +57 -0
- package/docs/examples/confirmation-dialogs-1.tsx +27 -0
- package/docs/examples/confirmation-dialogs-2.tsx +55 -0
- package/docs/examples/confirmation-dialogs-3.tsx +28 -0
- package/docs/examples/confirmation-dialogs-4.tsx +38 -0
- package/docs/examples/popover-1.tsx +48 -0
- package/docs/examples/popover-2.tsx +53 -0
- package/docs/foundations/accessibility-guidelines.dsds.yaml +301 -0
- package/docs/foundations/color-guidelines.dsds.yaml +308 -0
- package/docs/foundations/content-guidelines.dsds.yaml +285 -0
- package/docs/foundations/semantics.dsds.yaml +125 -0
- package/docs/foundations/spacing-guidelines.dsds.yaml +226 -0
- package/docs/foundations/typography-guidelines.dsds.yaml +322 -0
- package/docs/icons/icon-access-denied.dsds.yaml +40 -0
- package/docs/icons/icon-activity.dsds.yaml +40 -0
- package/docs/icons/icon-add-circle.dsds.yaml +14 -0
- package/docs/icons/icon-add-comment.dsds.yaml +34 -0
- package/docs/icons/icon-add-document.dsds.yaml +34 -0
- package/docs/icons/icon-add-user.dsds.yaml +30 -0
- package/docs/icons/icon-add.dsds.yaml +57 -0
- package/docs/icons/icon-api.dsds.yaml +17 -0
- package/docs/icons/icon-archive.dsds.yaml +44 -0
- package/docs/icons/icon-arrow-down.dsds.yaml +38 -0
- package/docs/icons/icon-arrow-left.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-right.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-top-right.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-up.dsds.yaml +44 -0
- package/docs/icons/icon-asterisk.dsds.yaml +18 -0
- package/docs/icons/icon-bar-chart.dsds.yaml +40 -0
- package/docs/icons/icon-basket.dsds.yaml +14 -0
- package/docs/icons/icon-bell.dsds.yaml +30 -0
- package/docs/icons/icon-bill.dsds.yaml +40 -0
- package/docs/icons/icon-binary-document.dsds.yaml +30 -0
- package/docs/icons/icon-block-content.dsds.yaml +30 -0
- package/docs/icons/icon-block-element.dsds.yaml +32 -0
- package/docs/icons/icon-blockquote.dsds.yaml +32 -0
- package/docs/icons/icon-bold.dsds.yaml +28 -0
- package/docs/icons/icon-bolt.dsds.yaml +18 -0
- package/docs/icons/icon-book.dsds.yaml +34 -0
- package/docs/icons/icon-bookmark-filled.dsds.yaml +14 -0
- package/docs/icons/icon-bookmark.dsds.yaml +14 -0
- package/docs/icons/icon-bottle.dsds.yaml +18 -0
- package/docs/icons/icon-bug.dsds.yaml +28 -0
- package/docs/icons/icon-bulb-filled.dsds.yaml +14 -0
- package/docs/icons/icon-bulb-outline.dsds.yaml +30 -0
- package/docs/icons/icon-calendar.dsds.yaml +36 -0
- package/docs/icons/icon-case.dsds.yaml +18 -0
- package/docs/icons/icon-chart-upward.dsds.yaml +40 -0
- package/docs/icons/icon-checkmark-circle.dsds.yaml +40 -0
- package/docs/icons/icon-checkmark.dsds.yaml +36 -0
- package/docs/icons/icon-chevron-down.dsds.yaml +46 -0
- package/docs/icons/icon-chevron-left.dsds.yaml +42 -0
- package/docs/icons/icon-chevron-right.dsds.yaml +42 -0
- package/docs/icons/icon-chevron-up.dsds.yaml +44 -0
- package/docs/icons/icon-circle.dsds.yaml +28 -0
- package/docs/icons/icon-clipboard-image.dsds.yaml +30 -0
- package/docs/icons/icon-clipboard.dsds.yaml +34 -0
- package/docs/icons/icon-clock.dsds.yaml +39 -0
- package/docs/icons/icon-close-circle.dsds.yaml +18 -0
- package/docs/icons/icon-close.dsds.yaml +51 -0
- package/docs/icons/icon-code-block.dsds.yaml +38 -0
- package/docs/icons/icon-code.dsds.yaml +40 -0
- package/docs/icons/icon-cog.dsds.yaml +38 -0
- package/docs/icons/icon-collapse.dsds.yaml +40 -0
- package/docs/icons/icon-color-wheel.dsds.yaml +30 -0
- package/docs/icons/icon-comment.dsds.yaml +38 -0
- package/docs/icons/icon-component.dsds.yaml +18 -0
- package/docs/icons/icon-compose-sparkles.dsds.yaml +36 -0
- package/docs/icons/icon-compose.dsds.yaml +38 -0
- package/docs/icons/icon-confetti.dsds.yaml +18 -0
- package/docs/icons/icon-controls.dsds.yaml +36 -0
- package/docs/icons/icon-copy.dsds.yaml +31 -0
- package/docs/icons/icon-credit-card.dsds.yaml +18 -0
- package/docs/icons/icon-crop.dsds.yaml +32 -0
- package/docs/icons/icon-cube.dsds.yaml +36 -0
- package/docs/icons/icon-dashboard.dsds.yaml +34 -0
- package/docs/icons/icon-database.dsds.yaml +40 -0
- package/docs/icons/icon-desktop.dsds.yaml +31 -0
- package/docs/icons/icon-diamond.dsds.yaml +18 -0
- package/docs/icons/icon-document-pdf.dsds.yaml +34 -0
- package/docs/icons/icon-document-remove.dsds.yaml +30 -0
- package/docs/icons/icon-document-sheet.dsds.yaml +34 -0
- package/docs/icons/icon-document-text.dsds.yaml +30 -0
- package/docs/icons/icon-document-video.dsds.yaml +30 -0
- package/docs/icons/icon-document-word.dsds.yaml +34 -0
- package/docs/icons/icon-document-zip.dsds.yaml +30 -0
- package/docs/icons/icon-document.dsds.yaml +52 -0
- package/docs/icons/icon-documents.dsds.yaml +30 -0
- package/docs/icons/icon-dot.dsds.yaml +32 -0
- package/docs/icons/icon-double-chevron-down.dsds.yaml +38 -0
- package/docs/icons/icon-double-chevron-left.dsds.yaml +34 -0
- package/docs/icons/icon-double-chevron-right.dsds.yaml +34 -0
- package/docs/icons/icon-double-chevron-up.dsds.yaml +36 -0
- package/docs/icons/icon-double-quote.dsds.yaml +14 -0
- package/docs/icons/icon-download.dsds.yaml +40 -0
- package/docs/icons/icon-drag-handle.dsds.yaml +28 -0
- package/docs/icons/icon-drop.dsds.yaml +30 -0
- package/docs/icons/icon-earth-americas.dsds.yaml +34 -0
- package/docs/icons/icon-earth-globe.dsds.yaml +34 -0
- package/docs/icons/icon-edit.dsds.yaml +34 -0
- package/docs/icons/icon-ellipsis-horizontal.dsds.yaml +32 -0
- package/docs/icons/icon-ellipsis-vertical.dsds.yaml +14 -0
- package/docs/icons/icon-empty.dsds.yaml +28 -0
- package/docs/icons/icon-enter-right.dsds.yaml +18 -0
- package/docs/icons/icon-enter.dsds.yaml +18 -0
- package/docs/icons/icon-envelope.dsds.yaml +34 -0
- package/docs/icons/icon-equal.dsds.yaml +14 -0
- package/docs/icons/icon-error-filled.dsds.yaml +14 -0
- package/docs/icons/icon-error-outline.dsds.yaml +38 -0
- package/docs/icons/icon-error-screen.dsds.yaml +14 -0
- package/docs/icons/icon-expand.dsds.yaml +36 -0
- package/docs/icons/icon-eye-closed.dsds.yaml +38 -0
- package/docs/icons/icon-eye-open.dsds.yaml +38 -0
- package/docs/icons/icon-face-happy.dsds.yaml +14 -0
- package/docs/icons/icon-face-indifferent.dsds.yaml +14 -0
- package/docs/icons/icon-face-sad.dsds.yaml +14 -0
- package/docs/icons/icon-feedback.dsds.yaml +30 -0
- package/docs/icons/icon-filter.dsds.yaml +38 -0
- package/docs/icons/icon-folder.dsds.yaml +36 -0
- package/docs/icons/icon-generate.dsds.yaml +18 -0
- package/docs/icons/icon-github.dsds.yaml +14 -0
- package/docs/icons/icon-groq.dsds.yaml +31 -0
- package/docs/icons/icon-hash.dsds.yaml +18 -0
- package/docs/icons/icon-heart-filled.dsds.yaml +18 -0
- package/docs/icons/icon-heart.dsds.yaml +18 -0
- package/docs/icons/icon-help-circle.dsds.yaml +38 -0
- package/docs/icons/icon-highlight.dsds.yaml +18 -0
- package/docs/icons/icon-home.dsds.yaml +28 -0
- package/docs/icons/icon-ice-cream.dsds.yaml +18 -0
- package/docs/icons/icon-image-remove.dsds.yaml +32 -0
- package/docs/icons/icon-image.dsds.yaml +36 -0
- package/docs/icons/icon-images.dsds.yaml +34 -0
- package/docs/icons/icon-inbox.dsds.yaml +14 -0
- package/docs/icons/icon-info-filled.dsds.yaml +14 -0
- package/docs/icons/icon-info-outline.dsds.yaml +38 -0
- package/docs/icons/icon-inline-element.dsds.yaml +32 -0
- package/docs/icons/icon-inline.dsds.yaml +18 -0
- package/docs/icons/icon-insert-above.dsds.yaml +32 -0
- package/docs/icons/icon-insert-below.dsds.yaml +32 -0
- package/docs/icons/icon-italic.dsds.yaml +28 -0
- package/docs/icons/icon-joystick.dsds.yaml +18 -0
- package/docs/icons/icon-json.dsds.yaml +36 -0
- package/docs/icons/icon-launch.dsds.yaml +34 -0
- package/docs/icons/icon-leave.dsds.yaml +35 -0
- package/docs/icons/icon-lemon.dsds.yaml +18 -0
- package/docs/icons/icon-link-removed.dsds.yaml +30 -0
- package/docs/icons/icon-link.dsds.yaml +36 -0
- package/docs/icons/icon-linkedin.dsds.yaml +14 -0
- package/docs/icons/icon-list.dsds.yaml +14 -0
- package/docs/icons/icon-lock.dsds.yaml +39 -0
- package/docs/icons/icon-logo-js.dsds.yaml +18 -0
- package/docs/icons/icon-logo-ts.dsds.yaml +18 -0
- package/docs/icons/icon-marker-removed.dsds.yaml +14 -0
- package/docs/icons/icon-marker.dsds.yaml +14 -0
- package/docs/icons/icon-master-detail.dsds.yaml +28 -0
- package/docs/icons/icon-menu.dsds.yaml +40 -0
- package/docs/icons/icon-microphone-slash.dsds.yaml +14 -0
- package/docs/icons/icon-microphone.dsds.yaml +14 -0
- package/docs/icons/icon-mobile-device.dsds.yaml +32 -0
- package/docs/icons/icon-moon.dsds.yaml +30 -0
- package/docs/icons/icon-number.dsds.yaml +30 -0
- package/docs/icons/icon-ok-hand.dsds.yaml +18 -0
- package/docs/icons/icon-olist.dsds.yaml +36 -0
- package/docs/icons/icon-overage.dsds.yaml +42 -0
- package/docs/icons/icon-package.dsds.yaml +34 -0
- package/docs/icons/icon-panel-left.dsds.yaml +38 -0
- package/docs/icons/icon-panel-right.dsds.yaml +40 -0
- package/docs/icons/icon-pause.dsds.yaml +32 -0
- package/docs/icons/icon-pin-filled.dsds.yaml +28 -0
- package/docs/icons/icon-pin-removed.dsds.yaml +14 -0
- package/docs/icons/icon-pin.dsds.yaml +32 -0
- package/docs/icons/icon-play.dsds.yaml +32 -0
- package/docs/icons/icon-plug.dsds.yaml +35 -0
- package/docs/icons/icon-presentation.dsds.yaml +18 -0
- package/docs/icons/icon-progress50.dsds.yaml +14 -0
- package/docs/icons/icon-progress75.dsds.yaml +14 -0
- package/docs/icons/icon-projects.dsds.yaml +14 -0
- package/docs/icons/icon-publish.dsds.yaml +38 -0
- package/docs/icons/icon-read-only.dsds.yaml +36 -0
- package/docs/icons/icon-redo.dsds.yaml +38 -0
- package/docs/icons/icon-refresh.dsds.yaml +38 -0
- package/docs/icons/icon-remove-circle.dsds.yaml +14 -0
- package/docs/icons/icon-remove.dsds.yaml +30 -0
- package/docs/icons/icon-reset.dsds.yaml +40 -0
- package/docs/icons/icon-restore.dsds.yaml +45 -0
- package/docs/icons/icon-retrieve.dsds.yaml +14 -0
- package/docs/icons/icon-retry.dsds.yaml +14 -0
- package/docs/icons/icon-revert.dsds.yaml +14 -0
- package/docs/icons/icon-robot.dsds.yaml +17 -0
- package/docs/icons/icon-rocket.dsds.yaml +34 -0
- package/docs/icons/icon-schema.dsds.yaml +36 -0
- package/docs/icons/icon-search.dsds.yaml +34 -0
- package/docs/icons/icon-select.dsds.yaml +38 -0
- package/docs/icons/icon-share.dsds.yaml +36 -0
- package/docs/icons/icon-sort.dsds.yaml +40 -0
- package/docs/icons/icon-sparkle.dsds.yaml +26 -0
- package/docs/icons/icon-sparkles.dsds.yaml +34 -0
- package/docs/icons/icon-spinner.dsds.yaml +38 -0
- package/docs/icons/icon-split-horizontal.dsds.yaml +32 -0
- package/docs/icons/icon-split-vertical.dsds.yaml +30 -0
- package/docs/icons/icon-square.dsds.yaml +18 -0
- package/docs/icons/icon-stack-compact.dsds.yaml +30 -0
- package/docs/icons/icon-stack.dsds.yaml +44 -0
- package/docs/icons/icon-star-filled.dsds.yaml +48 -0
- package/docs/icons/icon-star.dsds.yaml +51 -0
- package/docs/icons/icon-stop.dsds.yaml +32 -0
- package/docs/icons/icon-strikethrough.dsds.yaml +28 -0
- package/docs/icons/icon-string.dsds.yaml +38 -0
- package/docs/icons/icon-sun.dsds.yaml +30 -0
- package/docs/icons/icon-sync.dsds.yaml +36 -0
- package/docs/icons/icon-tablet-device.dsds.yaml +30 -0
- package/docs/icons/icon-tag.dsds.yaml +32 -0
- package/docs/icons/icon-tags.dsds.yaml +36 -0
- package/docs/icons/icon-target.dsds.yaml +14 -0
- package/docs/icons/icon-task.dsds.yaml +30 -0
- package/docs/icons/icon-terminal.dsds.yaml +30 -0
- package/docs/icons/icon-text.dsds.yaml +32 -0
- package/docs/icons/icon-th-large.dsds.yaml +34 -0
- package/docs/icons/icon-th-list.dsds.yaml +30 -0
- package/docs/icons/icon-thumbs-down.dsds.yaml +27 -0
- package/docs/icons/icon-thumbs-up.dsds.yaml +30 -0
- package/docs/icons/icon-tiers.dsds.yaml +18 -0
- package/docs/icons/icon-timeline.dsds.yaml +32 -0
- package/docs/icons/icon-toggle-arrow-right.dsds.yaml +39 -0
- package/docs/icons/icon-token.dsds.yaml +30 -0
- package/docs/icons/icon-transfer.dsds.yaml +32 -0
- package/docs/icons/icon-translate.dsds.yaml +32 -0
- package/docs/icons/icon-trash.dsds.yaml +34 -0
- package/docs/icons/icon-trend-upward.dsds.yaml +42 -0
- package/docs/icons/icon-triangle-outline.dsds.yaml +18 -0
- package/docs/icons/icon-trolley.dsds.yaml +18 -0
- package/docs/icons/icon-truncate.dsds.yaml +18 -0
- package/docs/icons/icon-twitter.dsds.yaml +18 -0
- package/docs/icons/icon-ulist.dsds.yaml +36 -0
- package/docs/icons/icon-unarchive.dsds.yaml +32 -0
- package/docs/icons/icon-underline.dsds.yaml +28 -0
- package/docs/icons/icon-undo.dsds.yaml +34 -0
- package/docs/icons/icon-unknown.dsds.yaml +36 -0
- package/docs/icons/icon-unlink.dsds.yaml +32 -0
- package/docs/icons/icon-unlock.dsds.yaml +41 -0
- package/docs/icons/icon-unpublish.dsds.yaml +38 -0
- package/docs/icons/icon-upload.dsds.yaml +40 -0
- package/docs/icons/icon-user.dsds.yaml +34 -0
- package/docs/icons/icon-users.dsds.yaml +34 -0
- package/docs/icons/icon-versions.dsds.yaml +14 -0
- package/docs/icons/icon-video.dsds.yaml +32 -0
- package/docs/icons/icon-warning-filled.dsds.yaml +14 -0
- package/docs/icons/icon-warning-outline.dsds.yaml +38 -0
- package/docs/icons/icon-wrench.dsds.yaml +18 -0
- package/docs/icons.dsds.yaml +768 -0
- package/docs/index.dsds.yaml +506 -0
- package/docs/overview/api-essentials.dsds.yaml +221 -0
- package/docs/overview/component-reference.dsds.yaml +213 -0
- package/docs/overview/installation.dsds.yaml +254 -0
- package/docs/overview/quick-start.dsds.yaml +317 -0
- package/docs/patterns/confirmation-dialogs.dsds.yaml +140 -0
- package/docs/patterns/error-messaging.dsds.yaml +58 -0
- package/docs/patterns/forms.dsds.yaml +362 -0
- package/docs/patterns/layouts.dsds.yaml +403 -0
- package/docs/patterns/loading-states.dsds.yaml +41 -0
- package/docs/patterns/messaging.dsds.yaml +72 -0
- package/docs/patterns/navigation.dsds.yaml +153 -0
- package/docs/patterns/responsive.dsds.yaml +590 -0
- package/docs/tokens/color.dsds.yaml +1158 -0
- package/docs/tokens/container-widths.dsds.yaml +131 -0
- package/docs/tokens/content.dsds.yaml +258 -0
- package/docs/tokens/content.tokens.json +180 -0
- package/docs/tokens/dtcg/README.md +41 -0
- package/docs/tokens/dtcg/css/color.css +107 -0
- package/docs/tokens/dtcg/css/container.css +12 -0
- package/docs/tokens/dtcg/css/fontFamily.css +10 -0
- package/docs/tokens/dtcg/css/fontWeight.css +10 -0
- package/docs/tokens/dtcg/css/index.css +12 -0
- package/docs/tokens/dtcg/css/radius.css +14 -0
- package/docs/tokens/dtcg/css/semantic.css +42 -0
- package/docs/tokens/dtcg/css/shadow.css +22 -0
- package/docs/tokens/dtcg/css/space.css +16 -0
- package/docs/tokens/dtcg/css/typography.css +67 -0
- package/docs/tokens/dtcg/json/color.tokens.json +911 -0
- package/docs/tokens/dtcg/json/container.tokens.json +44 -0
- package/docs/tokens/dtcg/json/fontFamily.tokens.json +10 -0
- package/docs/tokens/dtcg/json/fontWeight.tokens.json +18 -0
- package/docs/tokens/dtcg/json/radius.tokens.json +58 -0
- package/docs/tokens/dtcg/json/semantic.tokens.json +372 -0
- package/docs/tokens/dtcg/json/shadow.tokens.json +599 -0
- package/docs/tokens/dtcg/json/space.tokens.json +72 -0
- package/docs/tokens/dtcg/json/typography.tokens.json +354 -0
- package/docs/tokens/font-family.dsds.yaml +79 -0
- package/docs/tokens/font-weight.dsds.yaml +103 -0
- package/docs/tokens/radius.dsds.yaml +153 -0
- package/docs/tokens/semantic.dsds.yaml +397 -0
- package/docs/tokens/shadow.dsds.yaml +125 -0
- package/docs/tokens/space.dsds.yaml +185 -0
- package/docs/tokens/typography.dsds.yaml +316 -0
- package/llms.txt +108 -0
- package/package.json +6 -3
- package/skills/sanity-ui-5/SKILL.md +158 -0
- package/skills/sanity-ui-5/references/component-choice.md +37 -0
- package/skills/sanity-ui-5/references/components.md +145 -0
- package/skills/sanity-ui-5/references/forms-and-accessibility.md +189 -0
- package/skills/sanity-ui-5/references/migrating-from-v3.md +250 -0
- package/skills/sanity-ui-5/references/props-and-imports.md +169 -0
- package/skills/sanity-ui-5/references/setup.md +177 -0
- package/skills/sanity-ui-5/references/silent-failures.md +33 -0
- package/skills/sanity-ui-5/references/taste.md +53 -0
- package/skills/sanity-ui-5/references/tone-and-color.md +55 -0
- package/src/components/button/Button.tsx +14 -3
- package/src/components/button/button.css +23 -25
- package/src/components/button/button.props.ts +4 -0
- package/src/components/code/code.props.ts +3 -2
- package/src/components/eyebrow/Eyebrow.tsx +8 -3
- package/src/components/eyebrow/eyebrow.props.ts +10 -2
- package/src/components/heading/Heading.tsx +1 -1
- package/src/components/heading/heading.props.ts +4 -3
- package/src/components/popover/Popover.tsx +4 -3
- package/src/components/popover/popover.css +5 -3
- package/src/components/popover/popover.props.ts +9 -0
- package/src/components/text/text.props.ts +6 -1
- package/src/css/classes/system/typography.css +6 -6
- package/src/css/tokens/semantic.css +7 -7
- package/src/props/typography.ts +1 -5
- package/src/version.ts +2 -2
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
schemaVersion: '0.23.1'
|
|
2
|
+
name: Sanity UI
|
|
3
|
+
entries:
|
|
4
|
+
- kind: token
|
|
5
|
+
id: container-0
|
|
6
|
+
name: container-0
|
|
7
|
+
description: Small — narrow panels, mobile width.
|
|
8
|
+
metadata:
|
|
9
|
+
status:
|
|
10
|
+
status: stable
|
|
11
|
+
group: container-widths
|
|
12
|
+
tokenType: dimension
|
|
13
|
+
source:
|
|
14
|
+
href: ./dtcg/json/container.tokens.json#container-0
|
|
15
|
+
- kind: token
|
|
16
|
+
id: container-1
|
|
17
|
+
name: container-1
|
|
18
|
+
description: Reading width — forms, prose, dialogs.
|
|
19
|
+
metadata:
|
|
20
|
+
status:
|
|
21
|
+
status: stable
|
|
22
|
+
group: container-widths
|
|
23
|
+
tokenType: dimension
|
|
24
|
+
source:
|
|
25
|
+
href: ./dtcg/json/container.tokens.json#container-1
|
|
26
|
+
- kind: token
|
|
27
|
+
id: container-2
|
|
28
|
+
name: container-2
|
|
29
|
+
description: Medium — standard content area.
|
|
30
|
+
metadata:
|
|
31
|
+
status:
|
|
32
|
+
status: stable
|
|
33
|
+
group: container-widths
|
|
34
|
+
tokenType: dimension
|
|
35
|
+
source:
|
|
36
|
+
href: ./dtcg/json/container.tokens.json#container-2
|
|
37
|
+
- kind: token
|
|
38
|
+
id: container-3
|
|
39
|
+
name: container-3
|
|
40
|
+
description: Large — wide content, dashboards.
|
|
41
|
+
metadata:
|
|
42
|
+
status:
|
|
43
|
+
status: stable
|
|
44
|
+
group: container-widths
|
|
45
|
+
tokenType: dimension
|
|
46
|
+
source:
|
|
47
|
+
href: ./dtcg/json/container.tokens.json#container-3
|
|
48
|
+
- kind: token
|
|
49
|
+
id: container-4
|
|
50
|
+
name: container-4
|
|
51
|
+
description: Extra-large layouts.
|
|
52
|
+
metadata:
|
|
53
|
+
status:
|
|
54
|
+
status: stable
|
|
55
|
+
group: container-widths
|
|
56
|
+
tokenType: dimension
|
|
57
|
+
source:
|
|
58
|
+
href: ./dtcg/json/container.tokens.json#container-4
|
|
59
|
+
- kind: token
|
|
60
|
+
id: container-5
|
|
61
|
+
name: container-5
|
|
62
|
+
description: Full-width layouts.
|
|
63
|
+
metadata:
|
|
64
|
+
status:
|
|
65
|
+
status: stable
|
|
66
|
+
group: container-widths
|
|
67
|
+
tokenType: dimension
|
|
68
|
+
source:
|
|
69
|
+
href: ./dtcg/json/container.tokens.json#container-5
|
|
70
|
+
- kind: entry
|
|
71
|
+
id: container-widths
|
|
72
|
+
name: Container widths
|
|
73
|
+
description: The max-width scale that bounds content width across Sanity UI layouts.
|
|
74
|
+
metadata:
|
|
75
|
+
tags: [sizing, container, max-width, width, layout, dimension, breakpoint]
|
|
76
|
+
status:
|
|
77
|
+
status: stable
|
|
78
|
+
group: container-widths
|
|
79
|
+
sections:
|
|
80
|
+
- kind: guidelines
|
|
81
|
+
for: all
|
|
82
|
+
framing: how-to-use
|
|
83
|
+
items:
|
|
84
|
+
- level: must
|
|
85
|
+
statement: Take container widths from the scale; don't hardcode a raw `max-width` that duplicates a step.
|
|
86
|
+
- level: should
|
|
87
|
+
statement: Bound body text near `container-1` so the line measure stays readable.
|
|
88
|
+
- level: should-not
|
|
89
|
+
statement: Don't treat these as breakpoints. They cap content width; they do not trigger layout changes at the viewport edge.
|
|
90
|
+
- kind: guidelines
|
|
91
|
+
for: agent
|
|
92
|
+
framing: how-to-use
|
|
93
|
+
items:
|
|
94
|
+
- level: must
|
|
95
|
+
statement: The Container `size` prop takes an integer step (0–5), not a px value or a string.
|
|
96
|
+
- level: must-not
|
|
97
|
+
statement: Do not use container widths as viewport breakpoints; the responsive-array breakpoints are separate.
|
|
98
|
+
- kind: section
|
|
99
|
+
for: all
|
|
100
|
+
freeform:
|
|
101
|
+
- title: Overview
|
|
102
|
+
body: |-
|
|
103
|
+
Container widths bound how wide content grows before it stops. The Container component centers content and caps it at one of these widths. The scale has steps `0` through `5`.
|
|
104
|
+
- title: The scale
|
|
105
|
+
body: |-
|
|
106
|
+
| Step | Token | Common use |
|
|
107
|
+
| --- | --- | --- |
|
|
108
|
+
| `0` | `container-0` | Small — narrow panels, mobile width |
|
|
109
|
+
| `1` | `container-1` | Reading width — forms, prose, dialogs |
|
|
110
|
+
| `2` | `container-2` | Medium — standard content area |
|
|
111
|
+
| `3` | `container-3` | Large — wide content, dashboards |
|
|
112
|
+
| `4` | `container-4` | Extra-large layouts |
|
|
113
|
+
| `5` | `container-5` | Full-width layouts |
|
|
114
|
+
|
|
115
|
+
The widths live in `docs/tokens/dtcg/json/container.tokens.json`.
|
|
116
|
+
|
|
117
|
+
These cap the content's width. They are not viewport breakpoints. For viewport breakpoints and the responsive-array syntax, see the Responsive pattern.
|
|
118
|
+
- title: Related
|
|
119
|
+
body: |-
|
|
120
|
+
- **Container** — centers content and caps it at one of these widths.
|
|
121
|
+
- **Responsive pattern** — owns viewport breakpoints and responsive arrays.
|
|
122
|
+
- **Typography guidelines** — measure (45–75 characters) often lands near `container-1`.
|
|
123
|
+
- kind: section
|
|
124
|
+
for: agent
|
|
125
|
+
freeform:
|
|
126
|
+
- title: Intent
|
|
127
|
+
body: Cap content width with a Container step. Use `container-1` for readable text columns.
|
|
128
|
+
refs:
|
|
129
|
+
- href: ./dtcg/json/container.tokens.json
|
|
130
|
+
rel: source
|
|
131
|
+
role: DTCG source
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
schemaVersion: '0.23.1'
|
|
2
|
+
name: Sanity UI
|
|
3
|
+
entries:
|
|
4
|
+
- kind: token
|
|
5
|
+
id: content-action-delete
|
|
6
|
+
name: content-action-delete
|
|
7
|
+
description: Permanently destroy an object that will not come back.
|
|
8
|
+
metadata:
|
|
9
|
+
status:
|
|
10
|
+
status: proposal
|
|
11
|
+
group: content
|
|
12
|
+
tokenType: content
|
|
13
|
+
source:
|
|
14
|
+
href: ./content.tokens.json#content.action.delete
|
|
15
|
+
- kind: token
|
|
16
|
+
id: content-action-discard
|
|
17
|
+
name: content-action-discard
|
|
18
|
+
description: Abandon unsaved or unpublished edits; the object survives.
|
|
19
|
+
metadata:
|
|
20
|
+
status:
|
|
21
|
+
status: proposal
|
|
22
|
+
group: content
|
|
23
|
+
tokenType: content
|
|
24
|
+
source:
|
|
25
|
+
href: ./content.tokens.json#content.action.discard
|
|
26
|
+
- kind: token
|
|
27
|
+
id: content-action-remove
|
|
28
|
+
name: content-action-remove
|
|
29
|
+
description: Take an item out of a collection; the item itself still exists.
|
|
30
|
+
metadata:
|
|
31
|
+
status:
|
|
32
|
+
status: proposal
|
|
33
|
+
group: content
|
|
34
|
+
tokenType: content
|
|
35
|
+
source:
|
|
36
|
+
href: ./content.tokens.json#content.action.remove
|
|
37
|
+
- kind: token
|
|
38
|
+
id: content-action-clear
|
|
39
|
+
name: content-action-clear
|
|
40
|
+
description: Empty a field's value; the field stays.
|
|
41
|
+
metadata:
|
|
42
|
+
status:
|
|
43
|
+
status: proposal
|
|
44
|
+
group: content
|
|
45
|
+
tokenType: content
|
|
46
|
+
source:
|
|
47
|
+
href: ./content.tokens.json#content.action.clear
|
|
48
|
+
- kind: token
|
|
49
|
+
id: content-action-restore
|
|
50
|
+
name: content-action-restore
|
|
51
|
+
description: Bring back a deleted object or a prior version. Retires "Revert".
|
|
52
|
+
metadata:
|
|
53
|
+
status:
|
|
54
|
+
status: proposal
|
|
55
|
+
group: content
|
|
56
|
+
tokenType: content
|
|
57
|
+
source:
|
|
58
|
+
href: ./content.tokens.json#content.action.restore
|
|
59
|
+
- kind: token
|
|
60
|
+
id: content-action-create
|
|
61
|
+
name: content-action-create
|
|
62
|
+
description: Verb-first label for the trigger button or menu item.
|
|
63
|
+
metadata:
|
|
64
|
+
status:
|
|
65
|
+
status: proposal
|
|
66
|
+
group: content
|
|
67
|
+
tokenType: content
|
|
68
|
+
source:
|
|
69
|
+
href: ./content.tokens.json#content.action.create
|
|
70
|
+
- kind: token
|
|
71
|
+
id: content-action-new
|
|
72
|
+
name: content-action-new
|
|
73
|
+
description: Noun-phrase label for a dialog title or empty-state heading.
|
|
74
|
+
metadata:
|
|
75
|
+
status:
|
|
76
|
+
status: proposal
|
|
77
|
+
group: content
|
|
78
|
+
tokenType: content
|
|
79
|
+
source:
|
|
80
|
+
href: ./content.tokens.json#content.action.new
|
|
81
|
+
- kind: token
|
|
82
|
+
id: content-region-panel
|
|
83
|
+
name: content-region-panel
|
|
84
|
+
description: A collapsible, docked auxiliary region. Retires "Pane" and "Inspector".
|
|
85
|
+
metadata:
|
|
86
|
+
status:
|
|
87
|
+
status: proposal
|
|
88
|
+
group: content
|
|
89
|
+
tokenType: content
|
|
90
|
+
source:
|
|
91
|
+
href: ./content.tokens.json#content.region.panel
|
|
92
|
+
- kind: token
|
|
93
|
+
id: content-region-sidebar
|
|
94
|
+
name: content-region-sidebar
|
|
95
|
+
description: The primary, persistent navigation rail.
|
|
96
|
+
metadata:
|
|
97
|
+
status:
|
|
98
|
+
status: proposal
|
|
99
|
+
group: content
|
|
100
|
+
tokenType: content
|
|
101
|
+
source:
|
|
102
|
+
href: ./content.tokens.json#content.region.sidebar
|
|
103
|
+
- kind: token
|
|
104
|
+
id: content-surface-dialog
|
|
105
|
+
name: content-surface-dialog
|
|
106
|
+
description: A focus-trapping overlay that blocks interaction until dismissed. Matches the Sanity UI component name as of @sanity/ui@5.0.0-alpha.7.
|
|
107
|
+
metadata:
|
|
108
|
+
status:
|
|
109
|
+
status: proposal
|
|
110
|
+
group: content
|
|
111
|
+
tokenType: content
|
|
112
|
+
source:
|
|
113
|
+
href: ./content.tokens.json#content.surface.dialog
|
|
114
|
+
- kind: token
|
|
115
|
+
id: content-surface-popover
|
|
116
|
+
name: content-surface-popover
|
|
117
|
+
description: A non-modal, anchored floating surface that doesn't trap focus.
|
|
118
|
+
metadata:
|
|
119
|
+
status:
|
|
120
|
+
status: proposal
|
|
121
|
+
group: content
|
|
122
|
+
tokenType: content
|
|
123
|
+
source:
|
|
124
|
+
href: ./content.tokens.json#content.surface.popover
|
|
125
|
+
- kind: token
|
|
126
|
+
id: content-severity-error
|
|
127
|
+
name: content-severity-error
|
|
128
|
+
description: Something invalid or broken that blocks progress.
|
|
129
|
+
metadata:
|
|
130
|
+
status:
|
|
131
|
+
status: proposal
|
|
132
|
+
group: content
|
|
133
|
+
tokenType: content
|
|
134
|
+
source:
|
|
135
|
+
href: ./content.tokens.json#content.severity.error
|
|
136
|
+
- kind: token
|
|
137
|
+
id: content-severity-warning
|
|
138
|
+
name: content-severity-warning
|
|
139
|
+
description: Something that may be a problem but doesn't block progress.
|
|
140
|
+
metadata:
|
|
141
|
+
status:
|
|
142
|
+
status: proposal
|
|
143
|
+
group: content
|
|
144
|
+
tokenType: content
|
|
145
|
+
source:
|
|
146
|
+
href: ./content.tokens.json#content.severity.warning
|
|
147
|
+
- kind: token
|
|
148
|
+
id: content-severity-issue
|
|
149
|
+
name: content-severity-issue
|
|
150
|
+
description: An aggregate that may include both errors and warnings; summary counts only.
|
|
151
|
+
metadata:
|
|
152
|
+
status:
|
|
153
|
+
status: proposal
|
|
154
|
+
group: content
|
|
155
|
+
tokenType: content
|
|
156
|
+
source:
|
|
157
|
+
href: ./content.tokens.json#content.severity.issue
|
|
158
|
+
- kind: token
|
|
159
|
+
id: content-type-error-document-type
|
|
160
|
+
name: content-type-error-document-type
|
|
161
|
+
description: User-facing error about a specific document's type.
|
|
162
|
+
metadata:
|
|
163
|
+
status:
|
|
164
|
+
status: proposal
|
|
165
|
+
group: content
|
|
166
|
+
tokenType: content
|
|
167
|
+
source:
|
|
168
|
+
href: ./content.tokens.json#content.type-error.document-type
|
|
169
|
+
- kind: token
|
|
170
|
+
id: content-type-error-schema-type
|
|
171
|
+
name: content-type-error-schema-type
|
|
172
|
+
description: Developer- or config-level schema definition error.
|
|
173
|
+
metadata:
|
|
174
|
+
status:
|
|
175
|
+
status: proposal
|
|
176
|
+
group: content
|
|
177
|
+
tokenType: content
|
|
178
|
+
source:
|
|
179
|
+
href: ./content.tokens.json#content.type-error.schema-type
|
|
180
|
+
- kind: entry
|
|
181
|
+
id: content
|
|
182
|
+
name: Content tokens (demo)
|
|
183
|
+
description: A worked example of microcopy vocabulary encoded as DTCG tokens — one canonical term per recurring concept, the same pattern used for space, color, and motion values.
|
|
184
|
+
metadata:
|
|
185
|
+
tags: [content, microcopy, terminology, naming, vocabulary, copy, tokens, demo]
|
|
186
|
+
status:
|
|
187
|
+
status: proposal
|
|
188
|
+
group: content
|
|
189
|
+
sections:
|
|
190
|
+
- kind: guidelines
|
|
191
|
+
for: all
|
|
192
|
+
framing: how-to-use
|
|
193
|
+
items:
|
|
194
|
+
- level: should
|
|
195
|
+
statement: Treat a value under `$extensions.com.sanity.contentTokens.retired` as a synonym error in review, not a stylistic preference — the same weight as a hardcoded color instead of a token.
|
|
196
|
+
- level: should
|
|
197
|
+
statement: 'When a retired synonym carries an interim exception, keep the exception scoped to what it actually covers rather than treating it as a reason to keep using the retired term generally. `surface.dialog` used to carry one for runnable code examples; alpha.7 removed the need for it.'
|
|
198
|
+
- level: must-not
|
|
199
|
+
statement: Don't add a new concept family to this file to resolve a naming disagreement that hasn't been ruled on. A token records a decision; it doesn't make one.
|
|
200
|
+
- kind: guidelines
|
|
201
|
+
for: agent
|
|
202
|
+
framing: how-to-use
|
|
203
|
+
items:
|
|
204
|
+
- level: must
|
|
205
|
+
statement: Use the canonical value for a concept; treat any value listed under that token's retired synonyms as a defect to fix, not a stylistic variant.
|
|
206
|
+
- level: must
|
|
207
|
+
statement: For create vs. new, choose by grammatical role — Create for a verb-first trigger, New for a noun-phrase title — not by preference.
|
|
208
|
+
- level: should-not
|
|
209
|
+
statement: Do not invent a canonical term for a concept not yet in this file; flag the gap instead of guessing.
|
|
210
|
+
- kind: section
|
|
211
|
+
for: all
|
|
212
|
+
freeform:
|
|
213
|
+
- title: Overview
|
|
214
|
+
body: |-
|
|
215
|
+
`content` is not a token type defined by the W3C Design Tokens Community Group spec — it is a **proposed extension**, demonstrating what `foundations/content-guidelines.md`'s "Content tokens" section would look like as machine-readable tokens instead of prose tables. This follows the same path already sketched for motion (`type: duration`, `type: cubicBezier` in the motion guidelines' `name-motion-values-by-role` rule): name the value by role, let the token be the single source of truth, and stop restating raw strings in every doc that needs them.
|
|
216
|
+
|
|
217
|
+
This file does **not** ship from `@sanity-labs/design-tokens` today. Its source (`./content.tokens.json`) is a local demo, not the design-tokens package — status `proposal`, not `stable`, reflects that. Each canonical term is evidenced by `studio-microcopy-audit-2026-08-18.md`, the audit that found the underlying drift in shipped Sanity Studio copy.
|
|
218
|
+
- title: The tokens
|
|
219
|
+
body: |-
|
|
220
|
+
| Group | Token | Canonical value | Retires |
|
|
221
|
+
| --- | --- | --- | --- |
|
|
222
|
+
| action | delete | Delete | — |
|
|
223
|
+
| action | discard | Discard | — |
|
|
224
|
+
| action | remove | Remove | Take out, Exclude |
|
|
225
|
+
| action | clear | Clear | — |
|
|
226
|
+
| action | restore | Restore | Revert |
|
|
227
|
+
| action | create | Create | — (pairs with `new` by role) |
|
|
228
|
+
| action | new | New | — (pairs with `create` by role) |
|
|
229
|
+
| region | panel | Panel | Pane, Inspector |
|
|
230
|
+
| region | sidebar | Sidebar | — |
|
|
231
|
+
| surface | dialog | Dialog | Modal (as a noun; "modal" stays valid as an adjective) |
|
|
232
|
+
| surface | popover | Popover | — |
|
|
233
|
+
| severity | error | Error | Issue, when used as a bare synonym |
|
|
234
|
+
| severity | warning | Warning | — |
|
|
235
|
+
| severity | issue | Issue | — (aggregate-only; never a synonym for error) |
|
|
236
|
+
| type-error | document-type | document type | bare "type" |
|
|
237
|
+
| type-error | schema-type | schema type | bare "type" |
|
|
238
|
+
|
|
239
|
+
Each token's `$extensions.com.sanity.contentTokens` carries the retired synonyms, the audit evidence, and (for `create`/`new`) the grammatical role that decides which one to use.
|
|
240
|
+
- title: Why extend DTCG for this
|
|
241
|
+
body: |-
|
|
242
|
+
The same argument content-guidelines.md makes for a token family applies to any recurring string: two writers reaching for "Delete" and "Remove" for the same operation is the same failure mode as two designers choosing two different blues for the same surface. A token file makes the canonical answer queryable and diffable instead of buried in prose — a linter could flag `"Revert"` in a PR the same way a design-lint flags a raw hex value instead of `--blue-500`.
|
|
243
|
+
|
|
244
|
+
This demo intentionally stays inside the six concept families already documented in `foundations/content-guidelines.md`. It does not attempt to tokenize the "needs a product decision" item (release-scheduling vocabulary) — a token can encode a decision already made, not force one that hasn't been.
|
|
245
|
+
- title: Related
|
|
246
|
+
body: |-
|
|
247
|
+
- **Content guidelines, "Content tokens"** — the prose catalog this file makes machine-readable.
|
|
248
|
+
- **studio-microcopy-audit-2026-08-18.md** — the evidence for every retired synonym.
|
|
249
|
+
- **terminology-glossary-2026-08-18.md** — decision D1 (Modal vs. Dialog). D1 ruled "Modal" on the premise that the component was being renamed Dialog → Modal; @sanity/ui@5.0.0-alpha.7 renamed it the other way, so the `surface.dialog` token supersedes it.
|
|
250
|
+
- kind: section
|
|
251
|
+
for: agent
|
|
252
|
+
freeform:
|
|
253
|
+
- title: Intent
|
|
254
|
+
body: When writing or reviewing UI copy, resolve a recurring concept (delete/remove/discard, create/new, panel/sidebar, dialog/modal/popover, error/warning/issue) to the canonical term in this file rather than choosing a synonym ad hoc.
|
|
255
|
+
refs:
|
|
256
|
+
- href: ./content.tokens.json
|
|
257
|
+
rel: source
|
|
258
|
+
role: DTCG source
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$description": "DEMO — a worked example of microcopy as DTCG tokens, proposed by foundations/content-guidelines.md (\"Content tokens\"). `content` is not a type defined by the W3C Design Tokens Community Group spec; it is a proposed extension for this design system, following the same pattern already used for `duration` and `cubicBezier` in the motion foundation. This file does not ship from `@sanity-labs/design-tokens` today — see `content.dsds.json` for status.",
|
|
3
|
+
"content": {
|
|
4
|
+
"$type": "content",
|
|
5
|
+
"action": {
|
|
6
|
+
"$description": "Six words compete for four distinct operations in shipped Sanity Studio copy (see studio-microcopy-audit-2026-08-18.md). Pick by what happens to the data, not by habit.",
|
|
7
|
+
"delete": {
|
|
8
|
+
"$value": "Delete",
|
|
9
|
+
"$description": "Permanently destroy an object — a document, comment, task, or release — that will not come back.",
|
|
10
|
+
"$extensions": {
|
|
11
|
+
"com.sanity.contentTokens": {
|
|
12
|
+
"retired": [],
|
|
13
|
+
"example": "Delete this document? This can't be undone."
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"discard": {
|
|
18
|
+
"$value": "Discard",
|
|
19
|
+
"$description": "Abandon unsaved or unpublished edits, returning to the last saved or published state. The object itself survives.",
|
|
20
|
+
"$extensions": {
|
|
21
|
+
"com.sanity.contentTokens": {
|
|
22
|
+
"retired": [],
|
|
23
|
+
"example": "Discard changes"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"remove": {
|
|
28
|
+
"$value": "Remove",
|
|
29
|
+
"$description": "Take an item out of a collection. The item still exists; only its membership changes.",
|
|
30
|
+
"$extensions": {
|
|
31
|
+
"com.sanity.contentTokens": {
|
|
32
|
+
"retired": ["Take out", "Exclude"],
|
|
33
|
+
"example": "Remove from release"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"clear": {
|
|
38
|
+
"$value": "Clear",
|
|
39
|
+
"$description": "Empty a field's value. The field stays; its content doesn't.",
|
|
40
|
+
"$extensions": {
|
|
41
|
+
"com.sanity.contentTokens": {
|
|
42
|
+
"retired": [],
|
|
43
|
+
"example": "Clear field"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"restore": {
|
|
48
|
+
"$value": "Restore",
|
|
49
|
+
"$description": "Bring back a deleted object, or return to a prior version from history.",
|
|
50
|
+
"$extensions": {
|
|
51
|
+
"com.sanity.contentTokens": {
|
|
52
|
+
"retired": ["Revert"],
|
|
53
|
+
"evidence": "One audited Studio feature (document revision history) named its own button \"Revert to revision\" while its tooltip, confirm dialog, disabled state, and success toast all said \"Restore\" for the identical action — Restore already won 4-to-1 within that single feature.",
|
|
54
|
+
"example": "Restore to this revision"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"create": {
|
|
59
|
+
"$value": "Create",
|
|
60
|
+
"$description": "Verb-first label for the trigger that starts creating an object — a button or menu item. Pair with a noun: \"Create document,\" \"Create release.\"",
|
|
61
|
+
"$extensions": {
|
|
62
|
+
"com.sanity.contentTokens": {
|
|
63
|
+
"retired": [],
|
|
64
|
+
"role": "trigger-button-or-menu-item",
|
|
65
|
+
"pairsWith": "content.action.new"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"new": {
|
|
70
|
+
"$value": "New",
|
|
71
|
+
"$description": "Noun-phrase label for the resulting object — a dialog title or empty-state heading. Pair with a noun: \"New document,\" \"New release.\" Not a synonym for Create; the two are assigned by grammatical role, not interchangeable.",
|
|
72
|
+
"$extensions": {
|
|
73
|
+
"com.sanity.contentTokens": {
|
|
74
|
+
"retired": [],
|
|
75
|
+
"role": "dialog-title-or-empty-state-heading",
|
|
76
|
+
"pairsWith": "content.action.create"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"region": {
|
|
82
|
+
"$description": "Naming for docked, non-modal UI regions. \"Sidebar\" and \"Panel\" name genuinely different things — keep them distinct.",
|
|
83
|
+
"panel": {
|
|
84
|
+
"$value": "Panel",
|
|
85
|
+
"$description": "A collapsible, docked auxiliary region attached to the main content — comments, tasks, field help.",
|
|
86
|
+
"$extensions": {
|
|
87
|
+
"com.sanity.contentTokens": {
|
|
88
|
+
"retired": ["Pane", "Inspector"]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"sidebar": {
|
|
93
|
+
"$value": "Sidebar",
|
|
94
|
+
"$description": "The primary, persistent navigation rail.",
|
|
95
|
+
"$extensions": {
|
|
96
|
+
"com.sanity.contentTokens": {
|
|
97
|
+
"retired": []
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"surface": {
|
|
103
|
+
"$description": "Naming for overlay UI surfaces, distinguished by whether they trap focus.",
|
|
104
|
+
"dialog": {
|
|
105
|
+
"$value": "Dialog",
|
|
106
|
+
"$description": "A focus-trapping overlay that blocks interaction until dismissed. Matches the Sanity UI component name as of @sanity/ui@5.0.0-alpha.7.",
|
|
107
|
+
"$extensions": {
|
|
108
|
+
"com.sanity.contentTokens": {
|
|
109
|
+
"retired": [
|
|
110
|
+
"Modal (as a noun; \"modal\" remains valid as an adjective, as in \"a modal dialog\")"
|
|
111
|
+
],
|
|
112
|
+
"status": "settled",
|
|
113
|
+
"note": "Supersedes terminology-glossary-2026-08-18.md decision D1, which ruled 'Modal' on the premise that the component was being renamed Dialog -> Modal. alpha.7 renamed it the other way (Modal -> Dialog), so the canonical term and the component name now agree."
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"popover": {
|
|
118
|
+
"$value": "Popover",
|
|
119
|
+
"$description": "A non-modal, anchored floating surface that doesn't trap focus.",
|
|
120
|
+
"$extensions": {
|
|
121
|
+
"com.sanity.contentTokens": {
|
|
122
|
+
"retired": []
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"severity": {
|
|
128
|
+
"$description": "Problem-severity words, each given a distinct job so a string's key and its displayed value can't silently disagree.",
|
|
129
|
+
"error": {
|
|
130
|
+
"$value": "Error",
|
|
131
|
+
"$description": "Something invalid or broken that blocks progress — validation failures, failed operations.",
|
|
132
|
+
"$extensions": {
|
|
133
|
+
"com.sanity.contentTokens": {
|
|
134
|
+
"retired": ["Issue, when it only ever means \"error\""]
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
"warning": {
|
|
139
|
+
"$value": "Warning",
|
|
140
|
+
"$description": "Something that may be a problem but doesn't block progress — advisory, non-blocking notices.",
|
|
141
|
+
"$extensions": {
|
|
142
|
+
"com.sanity.contentTokens": {
|
|
143
|
+
"retired": []
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"issue": {
|
|
148
|
+
"$value": "Issue",
|
|
149
|
+
"$description": "An aggregate that may include both errors and warnings — reserved for a summary count only, ex: \"3 issues found\" covering 2 errors and 1 warning.",
|
|
150
|
+
"$extensions": {
|
|
151
|
+
"com.sanity.contentTokens": {
|
|
152
|
+
"retired": [],
|
|
153
|
+
"constraint": "Never use as a bare synonym for error. If a string's key says error but its value says issue — or the reverse — that's a bug, not a style choice."
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"type-error": {
|
|
159
|
+
"$description": "Naming for \"this type wasn't found/valid\" errors, split by audience.",
|
|
160
|
+
"document-type": {
|
|
161
|
+
"$value": "document type",
|
|
162
|
+
"$description": "Use for any user-facing error about a specific document's type.",
|
|
163
|
+
"$extensions": {
|
|
164
|
+
"com.sanity.contentTokens": {
|
|
165
|
+
"retired": ["bare \"type\" alone in a title"]
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"schema-type": {
|
|
170
|
+
"$value": "schema type",
|
|
171
|
+
"$description": "Reserve for developer- or config-level errors — a broken schema definition, not a document instance.",
|
|
172
|
+
"$extensions": {
|
|
173
|
+
"com.sanity.contentTokens": {
|
|
174
|
+
"retired": ["bare \"type\" alone in a title"]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# DTCG token files
|
|
2
|
+
|
|
3
|
+
These files hold the values of the Sanity UI 5 tokens. The token docs in `tokens/` do not repeat the values. Each token entry points here through its `source`, for example `./dtcg/json/space.tokens.json#space-1`.
|
|
4
|
+
|
|
5
|
+
## Where they come from
|
|
6
|
+
|
|
7
|
+
The files are a copy of `dist/json` and `dist/css` from [sanity-labs/design-tokens](https://github.com/sanity-labs/design-tokens/tree/main/dist/json).
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
| ------- | -------------------------------- |
|
|
11
|
+
| Package | `@sanity-labs/design-tokens` |
|
|
12
|
+
| Version | `0.0.2-alpha.11` |
|
|
13
|
+
| Commit | Not recorded in the npm package |
|
|
14
|
+
| Copied | 2026-11-13, from the npm package |
|
|
15
|
+
|
|
16
|
+
This is the highest version published on npm, and the version `packages/ui/package.json` pins. Keep the copy on the version Sanity UI pins.
|
|
17
|
+
|
|
18
|
+
`shadow.tokens.json` and `shadow.css` are not in `0.0.2-alpha.11`. They are still the copies from `0.0.2-alpha.6`, and they are kept because the shadow docs depend on them.
|
|
19
|
+
|
|
20
|
+
## The semantic file
|
|
21
|
+
|
|
22
|
+
Two files do not come from the design-tokens repo. `json/semantic.tokens.json` and `css/semantic.css` hold the semantic layer: `--background-low`, `--separator-low` and the rest. Sanity UI 5 defines that layer in its CSS. The `build-semantic.mjs` script makes both files from that CSS.
|
|
23
|
+
|
|
24
|
+
Each light value points at a palette token. The dark value and the tone value sit in `$extensions`. Rerun the script when Sanity UI changes version:
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
node tokens/dtcg/build-semantic.mjs <path to sanity-io/ui/packages/ui>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## How agents read them
|
|
31
|
+
|
|
32
|
+
Read these files directly. Each token's name and value is in the JSON. Its CSS custom property is in the matching file under `css/`, so use that name instead of guessing it.
|
|
33
|
+
|
|
34
|
+
## How to update
|
|
35
|
+
|
|
36
|
+
1. Check which version of `@sanity-labs/design-tokens` Sanity UI pins.
|
|
37
|
+
2. Copy that version's `dist/json` into `json/` and its `dist/css` into `css/`.
|
|
38
|
+
3. Update the table above.
|
|
39
|
+
4. Check the values against the JSON files, and check the CSS custom property names against the CSS files.
|
|
40
|
+
|
|
41
|
+
Do not edit these files by hand. The design-tokens repo generates them.
|