@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,354 @@
|
|
|
1
|
+
{
|
|
2
|
+
"body-0": {
|
|
3
|
+
"$type": "typography",
|
|
4
|
+
"$value": {
|
|
5
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
6
|
+
"fontSize": {
|
|
7
|
+
"unit": "px",
|
|
8
|
+
"value": 10
|
|
9
|
+
},
|
|
10
|
+
"fontWeight": 400,
|
|
11
|
+
"letterSpacing": {
|
|
12
|
+
"unit": "px",
|
|
13
|
+
"value": 0
|
|
14
|
+
},
|
|
15
|
+
"lineHeight": 1.5
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"body-1": {
|
|
19
|
+
"$type": "typography",
|
|
20
|
+
"$value": {
|
|
21
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
22
|
+
"fontSize": {
|
|
23
|
+
"unit": "px",
|
|
24
|
+
"value": 13
|
|
25
|
+
},
|
|
26
|
+
"fontWeight": 400,
|
|
27
|
+
"letterSpacing": {
|
|
28
|
+
"unit": "px",
|
|
29
|
+
"value": 0
|
|
30
|
+
},
|
|
31
|
+
"lineHeight": 1.5
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"body-2": {
|
|
35
|
+
"$type": "typography",
|
|
36
|
+
"$value": {
|
|
37
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
38
|
+
"fontSize": {
|
|
39
|
+
"unit": "px",
|
|
40
|
+
"value": 15
|
|
41
|
+
},
|
|
42
|
+
"fontWeight": 400,
|
|
43
|
+
"letterSpacing": {
|
|
44
|
+
"unit": "px",
|
|
45
|
+
"value": 0
|
|
46
|
+
},
|
|
47
|
+
"lineHeight": 1.5
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"body-3": {
|
|
51
|
+
"$type": "typography",
|
|
52
|
+
"$value": {
|
|
53
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
54
|
+
"fontSize": {
|
|
55
|
+
"unit": "px",
|
|
56
|
+
"value": 18
|
|
57
|
+
},
|
|
58
|
+
"fontWeight": 400,
|
|
59
|
+
"letterSpacing": {
|
|
60
|
+
"unit": "px",
|
|
61
|
+
"value": 0
|
|
62
|
+
},
|
|
63
|
+
"lineHeight": 1.5
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"body-4": {
|
|
67
|
+
"$type": "typography",
|
|
68
|
+
"$value": {
|
|
69
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
70
|
+
"fontSize": {
|
|
71
|
+
"unit": "px",
|
|
72
|
+
"value": 21
|
|
73
|
+
},
|
|
74
|
+
"fontWeight": 400,
|
|
75
|
+
"letterSpacing": {
|
|
76
|
+
"unit": "px",
|
|
77
|
+
"value": 0
|
|
78
|
+
},
|
|
79
|
+
"lineHeight": 1.5
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"code-0": {
|
|
83
|
+
"$type": "typography",
|
|
84
|
+
"$value": {
|
|
85
|
+
"fontFamily": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
|
|
86
|
+
"fontSize": {
|
|
87
|
+
"unit": "px",
|
|
88
|
+
"value": 10
|
|
89
|
+
},
|
|
90
|
+
"fontWeight": 400,
|
|
91
|
+
"letterSpacing": {
|
|
92
|
+
"unit": "px",
|
|
93
|
+
"value": 0
|
|
94
|
+
},
|
|
95
|
+
"lineHeight": 1.5
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"code-1": {
|
|
99
|
+
"$type": "typography",
|
|
100
|
+
"$value": {
|
|
101
|
+
"fontFamily": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
|
|
102
|
+
"fontSize": {
|
|
103
|
+
"unit": "px",
|
|
104
|
+
"value": 13
|
|
105
|
+
},
|
|
106
|
+
"fontWeight": 400,
|
|
107
|
+
"letterSpacing": {
|
|
108
|
+
"unit": "px",
|
|
109
|
+
"value": 0
|
|
110
|
+
},
|
|
111
|
+
"lineHeight": 1.5
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"code-2": {
|
|
115
|
+
"$type": "typography",
|
|
116
|
+
"$value": {
|
|
117
|
+
"fontFamily": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
|
|
118
|
+
"fontSize": {
|
|
119
|
+
"unit": "px",
|
|
120
|
+
"value": 16
|
|
121
|
+
},
|
|
122
|
+
"fontWeight": 400,
|
|
123
|
+
"letterSpacing": {
|
|
124
|
+
"unit": "px",
|
|
125
|
+
"value": 0
|
|
126
|
+
},
|
|
127
|
+
"lineHeight": 1.5
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"code-3": {
|
|
131
|
+
"$type": "typography",
|
|
132
|
+
"$value": {
|
|
133
|
+
"fontFamily": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
|
|
134
|
+
"fontSize": {
|
|
135
|
+
"unit": "px",
|
|
136
|
+
"value": 19
|
|
137
|
+
},
|
|
138
|
+
"fontWeight": 400,
|
|
139
|
+
"letterSpacing": {
|
|
140
|
+
"unit": "px",
|
|
141
|
+
"value": 0
|
|
142
|
+
},
|
|
143
|
+
"lineHeight": 1.5
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"code-4": {
|
|
147
|
+
"$type": "typography",
|
|
148
|
+
"$value": {
|
|
149
|
+
"fontFamily": "ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace",
|
|
150
|
+
"fontSize": {
|
|
151
|
+
"unit": "px",
|
|
152
|
+
"value": 22
|
|
153
|
+
},
|
|
154
|
+
"fontWeight": 400,
|
|
155
|
+
"letterSpacing": {
|
|
156
|
+
"unit": "px",
|
|
157
|
+
"value": 0
|
|
158
|
+
},
|
|
159
|
+
"lineHeight": 1.5
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"eyebrow-0": {
|
|
163
|
+
"$type": "typography",
|
|
164
|
+
"$value": {
|
|
165
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
166
|
+
"fontSize": {
|
|
167
|
+
"unit": "px",
|
|
168
|
+
"value": 8.1
|
|
169
|
+
},
|
|
170
|
+
"fontWeight": 400,
|
|
171
|
+
"letterSpacing": {
|
|
172
|
+
"unit": "px",
|
|
173
|
+
"value": 0.5
|
|
174
|
+
},
|
|
175
|
+
"lineHeight": 1.15
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
"eyebrow-1": {
|
|
179
|
+
"$type": "typography",
|
|
180
|
+
"$value": {
|
|
181
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
182
|
+
"fontSize": {
|
|
183
|
+
"unit": "px",
|
|
184
|
+
"value": 9.5
|
|
185
|
+
},
|
|
186
|
+
"fontWeight": 400,
|
|
187
|
+
"letterSpacing": {
|
|
188
|
+
"unit": "px",
|
|
189
|
+
"value": 0.5
|
|
190
|
+
},
|
|
191
|
+
"lineHeight": 1.15
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"eyebrow-2": {
|
|
195
|
+
"$type": "typography",
|
|
196
|
+
"$value": {
|
|
197
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
198
|
+
"fontSize": {
|
|
199
|
+
"unit": "px",
|
|
200
|
+
"value": 10.8
|
|
201
|
+
},
|
|
202
|
+
"fontWeight": 400,
|
|
203
|
+
"letterSpacing": {
|
|
204
|
+
"unit": "px",
|
|
205
|
+
"value": 0.5
|
|
206
|
+
},
|
|
207
|
+
"lineHeight": 1.15
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"eyebrow-3": {
|
|
211
|
+
"$type": "typography",
|
|
212
|
+
"$value": {
|
|
213
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
214
|
+
"fontSize": {
|
|
215
|
+
"unit": "px",
|
|
216
|
+
"value": 12.25
|
|
217
|
+
},
|
|
218
|
+
"fontWeight": 400,
|
|
219
|
+
"letterSpacing": {
|
|
220
|
+
"unit": "px",
|
|
221
|
+
"value": 0
|
|
222
|
+
},
|
|
223
|
+
"lineHeight": 1.15
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"eyebrow-4": {
|
|
227
|
+
"$type": "typography",
|
|
228
|
+
"$value": {
|
|
229
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
230
|
+
"fontSize": {
|
|
231
|
+
"unit": "px",
|
|
232
|
+
"value": 13.6
|
|
233
|
+
},
|
|
234
|
+
"fontWeight": 400,
|
|
235
|
+
"letterSpacing": {
|
|
236
|
+
"unit": "px",
|
|
237
|
+
"value": 0
|
|
238
|
+
},
|
|
239
|
+
"lineHeight": 1.15
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"eyebrow-5": {
|
|
243
|
+
"$type": "typography",
|
|
244
|
+
"$value": {
|
|
245
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
246
|
+
"fontSize": {
|
|
247
|
+
"unit": "px",
|
|
248
|
+
"value": 15
|
|
249
|
+
},
|
|
250
|
+
"fontWeight": 400,
|
|
251
|
+
"letterSpacing": {
|
|
252
|
+
"unit": "px",
|
|
253
|
+
"value": 0.5
|
|
254
|
+
},
|
|
255
|
+
"lineHeight": 1.15
|
|
256
|
+
}
|
|
257
|
+
},
|
|
258
|
+
"heading-0": {
|
|
259
|
+
"$type": "typography",
|
|
260
|
+
"$value": {
|
|
261
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
262
|
+
"fontSize": {
|
|
263
|
+
"unit": "px",
|
|
264
|
+
"value": 13
|
|
265
|
+
},
|
|
266
|
+
"fontWeight": 400,
|
|
267
|
+
"letterSpacing": {
|
|
268
|
+
"unit": "px",
|
|
269
|
+
"value": 0
|
|
270
|
+
},
|
|
271
|
+
"lineHeight": 1.25
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"heading-1": {
|
|
275
|
+
"$type": "typography",
|
|
276
|
+
"$value": {
|
|
277
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
278
|
+
"fontSize": {
|
|
279
|
+
"unit": "px",
|
|
280
|
+
"value": 16
|
|
281
|
+
},
|
|
282
|
+
"fontWeight": 400,
|
|
283
|
+
"letterSpacing": {
|
|
284
|
+
"unit": "px",
|
|
285
|
+
"value": 0
|
|
286
|
+
},
|
|
287
|
+
"lineHeight": 1.25
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"heading-2": {
|
|
291
|
+
"$type": "typography",
|
|
292
|
+
"$value": {
|
|
293
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
294
|
+
"fontSize": {
|
|
295
|
+
"unit": "px",
|
|
296
|
+
"value": 21
|
|
297
|
+
},
|
|
298
|
+
"fontWeight": 400,
|
|
299
|
+
"letterSpacing": {
|
|
300
|
+
"unit": "px",
|
|
301
|
+
"value": 0
|
|
302
|
+
},
|
|
303
|
+
"lineHeight": 1.25
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"heading-3": {
|
|
307
|
+
"$type": "typography",
|
|
308
|
+
"$value": {
|
|
309
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
310
|
+
"fontSize": {
|
|
311
|
+
"unit": "px",
|
|
312
|
+
"value": 27
|
|
313
|
+
},
|
|
314
|
+
"fontWeight": 400,
|
|
315
|
+
"letterSpacing": {
|
|
316
|
+
"unit": "px",
|
|
317
|
+
"value": 0
|
|
318
|
+
},
|
|
319
|
+
"lineHeight": 1.25
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
"heading-4": {
|
|
323
|
+
"$type": "typography",
|
|
324
|
+
"$value": {
|
|
325
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
326
|
+
"fontSize": {
|
|
327
|
+
"unit": "px",
|
|
328
|
+
"value": 33
|
|
329
|
+
},
|
|
330
|
+
"fontWeight": 400,
|
|
331
|
+
"letterSpacing": {
|
|
332
|
+
"unit": "px",
|
|
333
|
+
"value": -0.5
|
|
334
|
+
},
|
|
335
|
+
"lineHeight": 1.25
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
"heading-5": {
|
|
339
|
+
"$type": "typography",
|
|
340
|
+
"$value": {
|
|
341
|
+
"fontFamily": "Inter, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Liberation Sans, sans-serif",
|
|
342
|
+
"fontSize": {
|
|
343
|
+
"unit": "px",
|
|
344
|
+
"value": 38
|
|
345
|
+
},
|
|
346
|
+
"fontWeight": 400,
|
|
347
|
+
"letterSpacing": {
|
|
348
|
+
"unit": "px",
|
|
349
|
+
"value": -1
|
|
350
|
+
},
|
|
351
|
+
"lineHeight": 1.25
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
schemaVersion: '0.23.1'
|
|
2
|
+
name: Sanity UI
|
|
3
|
+
entries:
|
|
4
|
+
- kind: token
|
|
5
|
+
id: sans
|
|
6
|
+
name: sans
|
|
7
|
+
description: The sans-serif stack. All UI text and content.
|
|
8
|
+
metadata:
|
|
9
|
+
status:
|
|
10
|
+
status: stable
|
|
11
|
+
group: font-family
|
|
12
|
+
tokenType: fontFamily
|
|
13
|
+
source:
|
|
14
|
+
href: ./dtcg/json/fontFamily.tokens.json#sans
|
|
15
|
+
- kind: token
|
|
16
|
+
id: mono
|
|
17
|
+
name: mono
|
|
18
|
+
description: The monospace stack. Code, identifiers, and tabular data.
|
|
19
|
+
metadata:
|
|
20
|
+
status:
|
|
21
|
+
status: stable
|
|
22
|
+
group: font-family
|
|
23
|
+
tokenType: fontFamily
|
|
24
|
+
source:
|
|
25
|
+
href: ./dtcg/json/fontFamily.tokens.json#mono
|
|
26
|
+
- kind: entry
|
|
27
|
+
id: font-family
|
|
28
|
+
name: Font families
|
|
29
|
+
description: 'The two font stacks used across Sanity UI: a sans-serif for all UI text and a monospace for code.'
|
|
30
|
+
metadata:
|
|
31
|
+
tags: [typography, font-family, font, sans, mono, monospace]
|
|
32
|
+
status:
|
|
33
|
+
status: stable
|
|
34
|
+
group: font-family
|
|
35
|
+
sections:
|
|
36
|
+
- kind: guidelines
|
|
37
|
+
for: all
|
|
38
|
+
framing: how-to-use
|
|
39
|
+
items:
|
|
40
|
+
- level: must
|
|
41
|
+
statement: Use `mono` for code, identifiers, and tabular tokens. Use `sans` for everything else.
|
|
42
|
+
- level: should
|
|
43
|
+
statement: Let the component set the family. Reach for the raw token only when no component fits.
|
|
44
|
+
- level: should-not
|
|
45
|
+
statement: Don't introduce a third typeface. Two families keep the system coherent.
|
|
46
|
+
- kind: guidelines
|
|
47
|
+
for: agent
|
|
48
|
+
framing: how-to-use
|
|
49
|
+
items:
|
|
50
|
+
- level: must
|
|
51
|
+
statement: Render code with the Code component (mono) and UI text with Text or Heading (sans).
|
|
52
|
+
- kind: section
|
|
53
|
+
for: all
|
|
54
|
+
freeform:
|
|
55
|
+
- title: Overview
|
|
56
|
+
body: |-
|
|
57
|
+
Sanity UI ships two font stacks. `sans` carries all content and UI controls. `mono` carries code and identifiers. Each token is a full stack with fallbacks, so text renders before the primary face loads.
|
|
58
|
+
- title: The families
|
|
59
|
+
body: |-
|
|
60
|
+
| Token | Used by |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `sans` | Heading, Text, and all UI controls |
|
|
63
|
+
| `mono` | Code |
|
|
64
|
+
|
|
65
|
+
`mono` is a stack of system monospace faces, so code matches the user's environment.
|
|
66
|
+
- title: Related
|
|
67
|
+
body: |-
|
|
68
|
+
- **Typography guidelines** — type scale, hierarchy, and font features (`ss02`, `dlig`, `tnum`).
|
|
69
|
+
- **Typography styles** — composite styles that bind a family to a size, weight, and line height.
|
|
70
|
+
- **Code** — renders with `mono`; **Text** and **Heading** render with `sans`.
|
|
71
|
+
- kind: section
|
|
72
|
+
for: agent
|
|
73
|
+
freeform:
|
|
74
|
+
- title: Intent
|
|
75
|
+
body: Choose `sans` for UI text and `mono` for code. Prefer the matching component over setting a family directly.
|
|
76
|
+
refs:
|
|
77
|
+
- href: ./dtcg/json/fontFamily.tokens.json
|
|
78
|
+
rel: source
|
|
79
|
+
role: DTCG source
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
schemaVersion: '0.23.1'
|
|
2
|
+
name: Sanity UI
|
|
3
|
+
entries:
|
|
4
|
+
- kind: token
|
|
5
|
+
id: regular
|
|
6
|
+
name: regular
|
|
7
|
+
description: Body copy, captions, prose.
|
|
8
|
+
metadata:
|
|
9
|
+
status:
|
|
10
|
+
status: stable
|
|
11
|
+
group: font-weight
|
|
12
|
+
tokenType: fontWeight
|
|
13
|
+
source:
|
|
14
|
+
href: ./dtcg/json/fontWeight.tokens.json#regular
|
|
15
|
+
- kind: token
|
|
16
|
+
id: medium
|
|
17
|
+
name: medium
|
|
18
|
+
description: UI labels, form labels, inline emphasis.
|
|
19
|
+
metadata:
|
|
20
|
+
status:
|
|
21
|
+
status: stable
|
|
22
|
+
group: font-weight
|
|
23
|
+
tokenType: fontWeight
|
|
24
|
+
source:
|
|
25
|
+
href: ./dtcg/json/fontWeight.tokens.json#medium
|
|
26
|
+
- kind: token
|
|
27
|
+
id: semibold
|
|
28
|
+
name: semibold
|
|
29
|
+
description: Sub-section headings and dense UI chrome.
|
|
30
|
+
metadata:
|
|
31
|
+
status:
|
|
32
|
+
status: stable
|
|
33
|
+
group: font-weight
|
|
34
|
+
tokenType: fontWeight
|
|
35
|
+
source:
|
|
36
|
+
href: ./dtcg/json/fontWeight.tokens.json#semibold
|
|
37
|
+
- kind: token
|
|
38
|
+
id: bold
|
|
39
|
+
name: bold
|
|
40
|
+
description: Page titles and section headings.
|
|
41
|
+
metadata:
|
|
42
|
+
status:
|
|
43
|
+
status: stable
|
|
44
|
+
group: font-weight
|
|
45
|
+
tokenType: fontWeight
|
|
46
|
+
source:
|
|
47
|
+
href: ./dtcg/json/fontWeight.tokens.json#bold
|
|
48
|
+
- kind: entry
|
|
49
|
+
id: font-weight
|
|
50
|
+
name: Font weights
|
|
51
|
+
description: The four font weights used to build type hierarchy across Sanity UI.
|
|
52
|
+
metadata:
|
|
53
|
+
tags: [typography, font-weight, weight, regular, medium, semibold, bold]
|
|
54
|
+
status:
|
|
55
|
+
status: stable
|
|
56
|
+
group: font-weight
|
|
57
|
+
sections:
|
|
58
|
+
- kind: guidelines
|
|
59
|
+
for: all
|
|
60
|
+
framing: how-to-use
|
|
61
|
+
items:
|
|
62
|
+
- level: must
|
|
63
|
+
statement: 'Pass weight as a named string — `weight="medium"` — not a number. The names are regular, medium, semibold, and bold. Each name maps to a numeric weight in the token file.'
|
|
64
|
+
- level: should
|
|
65
|
+
statement: Build hierarchy with size and weight before adding color.
|
|
66
|
+
- level: should-not
|
|
67
|
+
statement: Don't mix many weights at one level. It cancels the emphasis.
|
|
68
|
+
- kind: guidelines
|
|
69
|
+
for: agent
|
|
70
|
+
framing: how-to-use
|
|
71
|
+
items:
|
|
72
|
+
- level: should-not
|
|
73
|
+
statement: Do not use more than one or two weights in a single view.
|
|
74
|
+
- kind: section
|
|
75
|
+
for: all
|
|
76
|
+
freeform:
|
|
77
|
+
- title: Overview
|
|
78
|
+
body: |-
|
|
79
|
+
Weight creates emphasis. Sanity UI holds four weights. Many weights at one level cancel the effect, so the set stays small.
|
|
80
|
+
- title: The weights
|
|
81
|
+
body: |-
|
|
82
|
+
| Token | Use for |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| `regular` | Body copy, captions, prose |
|
|
85
|
+
| `medium` | UI labels, form labels, inline emphasis |
|
|
86
|
+
| `semibold` | Sub-section headings, dense UI chrome (Heading `0`–`1`) |
|
|
87
|
+
| `bold` | Page titles, section headings (Heading `2`–`3`) |
|
|
88
|
+
|
|
89
|
+
Reach for weight and space before adding a new size.
|
|
90
|
+
- title: Related
|
|
91
|
+
body: |-
|
|
92
|
+
- **Typography guidelines** — when to use each weight, and the type hierarchy table.
|
|
93
|
+
- **Typography styles** — composite styles that pair a weight with a size and family.
|
|
94
|
+
- **Color guidelines** — build hierarchy in grayscale with size and weight before adding color.
|
|
95
|
+
- kind: section
|
|
96
|
+
for: agent
|
|
97
|
+
freeform:
|
|
98
|
+
- title: Intent
|
|
99
|
+
body: Choose a weight by role. Lean on weight and space for hierarchy before adding a size or color.
|
|
100
|
+
refs:
|
|
101
|
+
- href: ./dtcg/json/fontWeight.tokens.json
|
|
102
|
+
rel: source
|
|
103
|
+
role: DTCG source
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
schemaVersion: '0.23.1'
|
|
2
|
+
name: Sanity UI
|
|
3
|
+
entries:
|
|
4
|
+
- kind: token
|
|
5
|
+
id: radius-0
|
|
6
|
+
name: radius-0
|
|
7
|
+
description: Square corners — full-bleed surfaces, table cells.
|
|
8
|
+
metadata:
|
|
9
|
+
status:
|
|
10
|
+
status: stable
|
|
11
|
+
group: radius
|
|
12
|
+
tokenType: dimension
|
|
13
|
+
source:
|
|
14
|
+
href: ./dtcg/json/radius.tokens.json#radius-0
|
|
15
|
+
- kind: token
|
|
16
|
+
id: radius-1
|
|
17
|
+
name: radius-1
|
|
18
|
+
description: Hairline rounding.
|
|
19
|
+
metadata:
|
|
20
|
+
status:
|
|
21
|
+
status: stable
|
|
22
|
+
group: radius
|
|
23
|
+
tokenType: dimension
|
|
24
|
+
source:
|
|
25
|
+
href: ./dtcg/json/radius.tokens.json#radius-1
|
|
26
|
+
- kind: token
|
|
27
|
+
id: radius-2
|
|
28
|
+
name: radius-2
|
|
29
|
+
description: Small controls — badges, tags, inputs.
|
|
30
|
+
metadata:
|
|
31
|
+
status:
|
|
32
|
+
status: stable
|
|
33
|
+
group: radius
|
|
34
|
+
tokenType: dimension
|
|
35
|
+
source:
|
|
36
|
+
href: ./dtcg/json/radius.tokens.json#radius-2
|
|
37
|
+
- kind: token
|
|
38
|
+
id: radius-3
|
|
39
|
+
name: radius-3
|
|
40
|
+
description: Standard rounding — buttons, cards.
|
|
41
|
+
metadata:
|
|
42
|
+
status:
|
|
43
|
+
status: stable
|
|
44
|
+
group: radius
|
|
45
|
+
tokenType: dimension
|
|
46
|
+
source:
|
|
47
|
+
href: ./dtcg/json/radius.tokens.json#radius-3
|
|
48
|
+
- kind: token
|
|
49
|
+
id: radius-4
|
|
50
|
+
name: radius-4
|
|
51
|
+
description: Larger surfaces — panels, popovers.
|
|
52
|
+
metadata:
|
|
53
|
+
status:
|
|
54
|
+
status: stable
|
|
55
|
+
group: radius
|
|
56
|
+
tokenType: dimension
|
|
57
|
+
source:
|
|
58
|
+
href: ./dtcg/json/radius.tokens.json#radius-4
|
|
59
|
+
- kind: token
|
|
60
|
+
id: radius-5
|
|
61
|
+
name: radius-5
|
|
62
|
+
description: Large containers.
|
|
63
|
+
metadata:
|
|
64
|
+
status:
|
|
65
|
+
status: stable
|
|
66
|
+
group: radius
|
|
67
|
+
tokenType: dimension
|
|
68
|
+
source:
|
|
69
|
+
href: ./dtcg/json/radius.tokens.json#radius-5
|
|
70
|
+
- kind: token
|
|
71
|
+
id: radius-6
|
|
72
|
+
name: radius-6
|
|
73
|
+
description: Extra-large containers.
|
|
74
|
+
metadata:
|
|
75
|
+
status:
|
|
76
|
+
status: stable
|
|
77
|
+
group: radius
|
|
78
|
+
tokenType: dimension
|
|
79
|
+
source:
|
|
80
|
+
href: ./dtcg/json/radius.tokens.json#radius-6
|
|
81
|
+
- kind: token
|
|
82
|
+
id: radius-round
|
|
83
|
+
name: radius-round
|
|
84
|
+
description: Fully rounded — pills, avatars, circular buttons.
|
|
85
|
+
metadata:
|
|
86
|
+
status:
|
|
87
|
+
status: stable
|
|
88
|
+
group: radius
|
|
89
|
+
tokenType: dimension
|
|
90
|
+
source:
|
|
91
|
+
href: ./dtcg/json/radius.tokens.json#radius-round
|
|
92
|
+
- kind: entry
|
|
93
|
+
id: radius
|
|
94
|
+
name: Radius scale
|
|
95
|
+
description: The border-radius scale for corner rounding on Sanity UI surfaces and controls.
|
|
96
|
+
metadata:
|
|
97
|
+
tags: [radius, border-radius, corner, rounding, scale, dimension]
|
|
98
|
+
status:
|
|
99
|
+
status: stable
|
|
100
|
+
group: radius
|
|
101
|
+
sections:
|
|
102
|
+
- kind: guidelines
|
|
103
|
+
for: all
|
|
104
|
+
framing: how-to-use
|
|
105
|
+
items:
|
|
106
|
+
- level: must
|
|
107
|
+
statement: Take every corner value from the scale. Don't hardcode a raw `border-radius` that duplicates a step.
|
|
108
|
+
- level: should
|
|
109
|
+
statement: Match the rounding to the surface size — small controls use `2`–`3`; large panels use `4`–`6`.
|
|
110
|
+
- level: should
|
|
111
|
+
statement: Use `radius="full"` only for shapes meant to read as a pill or circle.
|
|
112
|
+
- level: should-not
|
|
113
|
+
statement: Don't mix several radius steps on parts of one component. One surface, one rounding decision.
|
|
114
|
+
- kind: guidelines
|
|
115
|
+
for: agent
|
|
116
|
+
framing: how-to-use
|
|
117
|
+
items:
|
|
118
|
+
- level: must
|
|
119
|
+
statement: The `radius` prop takes an integer step, not a string or a px value. `radius={2}` is correct; `radius="4px"` is wrong.
|
|
120
|
+
- kind: section
|
|
121
|
+
for: all
|
|
122
|
+
freeform:
|
|
123
|
+
- title: Overview
|
|
124
|
+
body: |-
|
|
125
|
+
The radius scale sets corner rounding. Surfaces and controls reference a step so rounding stays consistent. The scale has steps `0` through `6`, plus `full` for a full pill or circle. Pass it as `radius="full"`; it uses the `radius-round` token.
|
|
126
|
+
- title: The scale
|
|
127
|
+
body: |-
|
|
128
|
+
| Step | Token | Common use |
|
|
129
|
+
| --- | --- | --- |
|
|
130
|
+
| `0` | `radius-0` | Square corners — full-bleed surfaces, table cells |
|
|
131
|
+
| `1` | `radius-1` | Hairline rounding |
|
|
132
|
+
| `2` | `radius-2` | Small controls — badges, tags, inputs |
|
|
133
|
+
| `3` | `radius-3` | Standard rounding — buttons, cards |
|
|
134
|
+
| `4` | `radius-4` | Larger surfaces — panels, popovers |
|
|
135
|
+
| `5` | `radius-5` | Large containers |
|
|
136
|
+
| `6` | `radius-6` | Extra-large containers |
|
|
137
|
+
| `full` | `radius-round` | Fully rounded — pills, avatars, circular buttons |
|
|
138
|
+
|
|
139
|
+
The sizes live in `docs/tokens/dtcg/json/radius.tokens.json`. `radius-round` is a fixed large value, not a step in the numeric progression. Use it when a shape should read as a pill or circle at any size.
|
|
140
|
+
- title: Related
|
|
141
|
+
body: |-
|
|
142
|
+
- **Card** — couples its corner rounding to the `density` prop.
|
|
143
|
+
- **Box** — accepts the `radius` prop for surfaces that set their own rounding.
|
|
144
|
+
- **Elevation guidelines** — pairs rounding with depth on raised surfaces.
|
|
145
|
+
- kind: section
|
|
146
|
+
for: agent
|
|
147
|
+
freeform:
|
|
148
|
+
- title: Intent
|
|
149
|
+
body: Choose a corner-rounding step by surface size. Use `radius="full"` only for pills and circles.
|
|
150
|
+
refs:
|
|
151
|
+
- href: ./dtcg/json/radius.tokens.json
|
|
152
|
+
rel: source
|
|
153
|
+
role: DTCG source
|