@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
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {marginProps} from '../../props/margin'
|
|
1
|
+
import {marginProps, type MarginProps} from '../../props/margin'
|
|
2
2
|
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
3
3
|
import {CODE_SIZE, type CodeSize} from '../../types/Code'
|
|
4
4
|
import {type PropDef} from '../../types/PropDef'
|
|
5
5
|
import type {Responsive} from '../../types/Responsive'
|
|
6
6
|
|
|
7
|
-
interface CodeBaseProps
|
|
7
|
+
interface CodeBaseProps
|
|
8
|
+
extends MarginProps, Omit<TypographyProps, 'align' | 'truncate' | 'weight'> {
|
|
8
9
|
/**
|
|
9
10
|
* Refractor language for syntax highlighting.
|
|
10
11
|
*/
|
|
@@ -10,10 +10,9 @@ const eyebrowClassName = suffixClassName('sui-Eyebrow')
|
|
|
10
10
|
/** @public */
|
|
11
11
|
export function Eyebrow<T extends ElementType = 'span'>({
|
|
12
12
|
size = 2,
|
|
13
|
-
weight = 'semibold',
|
|
14
13
|
...props
|
|
15
14
|
}: EyebrowProps<T> & Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>) {
|
|
16
|
-
const {as, children, className, style, ...rest} = getProps({size,
|
|
15
|
+
const {as, children, className, style, ...rest} = getProps({size, ...props}, eyebrowProps)
|
|
17
16
|
const Component = as || 'span'
|
|
18
17
|
|
|
19
18
|
if (props.truncate && props.trim) {
|
|
@@ -22,6 +21,7 @@ export function Eyebrow<T extends ElementType = 'span'>({
|
|
|
22
21
|
className={clsx(
|
|
23
22
|
eyebrowClassName,
|
|
24
23
|
className?.replace('sui-line-clamp', '').replace('sui-text-overflow', ''),
|
|
24
|
+
'sui-weight-semibold',
|
|
25
25
|
)}
|
|
26
26
|
style={style}
|
|
27
27
|
data-ui="Eyebrow"
|
|
@@ -41,7 +41,12 @@ export function Eyebrow<T extends ElementType = 'span'>({
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<Component
|
|
44
|
-
className={clsx(
|
|
44
|
+
className={clsx(
|
|
45
|
+
eyebrowClassName,
|
|
46
|
+
props.truncate && 'sui-overflow-hidden',
|
|
47
|
+
'sui-weight-semibold',
|
|
48
|
+
className,
|
|
49
|
+
)}
|
|
45
50
|
style={style}
|
|
46
51
|
data-ui="Eyebrow"
|
|
47
52
|
{...rest}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import {marginProps, type MarginProps} from '../../props/margin'
|
|
2
|
+
import {toneProps, type ToneProps} from '../../props/tone'
|
|
1
3
|
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
2
4
|
import {EYEBROW_SIZE, type EyebrowSize} from '../../types/Eyebrow'
|
|
3
5
|
import {type PropDef} from '../../types/PropDef'
|
|
4
6
|
import type {Responsive} from '../../types/Responsive'
|
|
5
7
|
|
|
6
8
|
/** @public */
|
|
7
|
-
export interface EyebrowProps<T extends React.ElementType = 'span'>
|
|
9
|
+
export interface EyebrowProps<T extends React.ElementType = 'span'>
|
|
10
|
+
extends MarginProps, ToneProps, Omit<TypographyProps, 'weight'> {
|
|
8
11
|
/**
|
|
9
12
|
* HTML element to render.
|
|
10
13
|
*/
|
|
@@ -24,5 +27,10 @@ export const eyebrowProps: Record<string, PropDef> = {
|
|
|
24
27
|
className: 'text-eyebrow',
|
|
25
28
|
values: EYEBROW_SIZE,
|
|
26
29
|
},
|
|
27
|
-
|
|
30
|
+
muted: typographyProps['muted'] as PropDef,
|
|
31
|
+
align: typographyProps['align'] as PropDef,
|
|
32
|
+
trim: typographyProps['trim'] as PropDef,
|
|
33
|
+
truncate: typographyProps['truncate'] as PropDef,
|
|
34
|
+
...marginProps,
|
|
35
|
+
...toneProps,
|
|
28
36
|
}
|
|
@@ -21,6 +21,7 @@ export function Heading<T extends ElementType = 'h2'>({
|
|
|
21
21
|
className={clsx(
|
|
22
22
|
headingClassName,
|
|
23
23
|
className?.replace('sui-line-clamp', '').replace('sui-text-overflow', ''),
|
|
24
|
+
'sui-weight-bold',
|
|
24
25
|
)}
|
|
25
26
|
style={style}
|
|
26
27
|
data-ui="Heading"
|
|
@@ -29,7 +30,6 @@ export function Heading<T extends ElementType = 'h2'>({
|
|
|
29
30
|
<span
|
|
30
31
|
className={clsx(
|
|
31
32
|
'sui-overflow-hidden',
|
|
32
|
-
'sui-weight-bold',
|
|
33
33
|
props.truncate === 1 ? 'sui-text-overflow' : 'sui-line-clamp',
|
|
34
34
|
)}
|
|
35
35
|
>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {marginProps} from '../../props/margin'
|
|
2
|
-
import {toneProps} from '../../props/tone'
|
|
1
|
+
import {marginProps, type MarginProps} from '../../props/margin'
|
|
2
|
+
import {toneProps, type ToneProps} from '../../props/tone'
|
|
3
3
|
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
4
4
|
import {HEADING_SIZE, HEADING_TAG, type HeadingSize, type HeadingTag} from '../../types/Heading'
|
|
5
5
|
import {type PropDef} from '../../types/PropDef'
|
|
6
6
|
import type {Responsive} from '../../types/Responsive'
|
|
7
7
|
|
|
8
8
|
/** @public */
|
|
9
|
-
export interface HeadingProps
|
|
9
|
+
export interface HeadingProps
|
|
10
|
+
extends MarginProps, ToneProps, Omit<TypographyProps, 'muted' | 'weight'> {
|
|
10
11
|
/**
|
|
11
12
|
* Semantic heading element to render.
|
|
12
13
|
*/
|
|
@@ -8,10 +8,11 @@ import {renderPortal} from '../../utils/renderPortal'
|
|
|
8
8
|
import {suffixClassName} from '../../utils/suffixClassName'
|
|
9
9
|
import {type PopoverProps, popoverProps} from './popover.props'
|
|
10
10
|
|
|
11
|
-
const popoverClassName = suffixClassName('sui-
|
|
11
|
+
const popoverClassName = suffixClassName('sui-Popover')
|
|
12
12
|
|
|
13
13
|
function PopoverRoot({
|
|
14
14
|
placement = 'bottom',
|
|
15
|
+
fullBleed = false,
|
|
15
16
|
...props
|
|
16
17
|
}: PopoverProps & {
|
|
17
18
|
triggerProps?: Record<string, unknown>
|
|
@@ -26,7 +27,7 @@ function PopoverRoot({
|
|
|
26
27
|
portal,
|
|
27
28
|
triggerProps: forwardedTriggerProps,
|
|
28
29
|
...rest
|
|
29
|
-
} = getProps({placement, ...props}, popoverProps)
|
|
30
|
+
} = getProps({placement, fullBleed, ...props}, popoverProps)
|
|
30
31
|
const reactId = useId()
|
|
31
32
|
const id = idProp || reactId
|
|
32
33
|
const [open, setOpen] = useState(false)
|
|
@@ -54,7 +55,7 @@ function PopoverRoot({
|
|
|
54
55
|
<div
|
|
55
56
|
className={clsx(
|
|
56
57
|
popoverClassName,
|
|
57
|
-
'sui-
|
|
58
|
+
'sui-radius3 sui-position-fixed sui-shadow2 sui-text-body1 sui-text-trim-edge',
|
|
58
59
|
className,
|
|
59
60
|
)}
|
|
60
61
|
style={{
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
.sui-
|
|
1
|
+
.sui-Popover {
|
|
2
2
|
visibility: hidden;
|
|
3
3
|
opacity: 0;
|
|
4
4
|
scale: 0.9;
|
|
5
5
|
transition: none;
|
|
6
|
+
--popover-color: var(--foreground-high);
|
|
7
|
+
color: var(--popover-color);
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
.sui-
|
|
10
|
+
.sui-Popover:popover-open {
|
|
9
11
|
visibility: visible;
|
|
10
12
|
opacity: 1;
|
|
11
13
|
scale: 1;
|
|
@@ -13,7 +15,7 @@
|
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
@starting-style {
|
|
16
|
-
.sui-
|
|
18
|
+
.sui-Popover:popover-open {
|
|
17
19
|
visibility: hidden;
|
|
18
20
|
opacity: 0;
|
|
19
21
|
scale: 0.9;
|
|
@@ -18,6 +18,10 @@ export interface PopoverProps
|
|
|
18
18
|
* The floating content.
|
|
19
19
|
*/
|
|
20
20
|
content?: React.ReactNode
|
|
21
|
+
/**
|
|
22
|
+
* Removes popover padding.
|
|
23
|
+
*/
|
|
24
|
+
fullBleed?: boolean
|
|
21
25
|
/**
|
|
22
26
|
* Renders the content into `document.body` through a React portal instead of inline.
|
|
23
27
|
*/
|
|
@@ -31,6 +35,11 @@ export const popoverProps: Record<string, PropDef> = {
|
|
|
31
35
|
content: {
|
|
32
36
|
type: 'string',
|
|
33
37
|
},
|
|
38
|
+
fullBleed: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
className: 'p0',
|
|
41
|
+
inverseClassName: 'p2',
|
|
42
|
+
},
|
|
34
43
|
portal: {
|
|
35
44
|
type: 'boolean',
|
|
36
45
|
},
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import {marginProps, type MarginProps} from '../../props/margin'
|
|
2
|
+
import {toneProps, type ToneProps} from '../../props/tone'
|
|
1
3
|
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
2
4
|
import {type PropDef} from '../../types/PropDef'
|
|
3
5
|
import type {Responsive} from '../../types/Responsive'
|
|
4
6
|
import {TEXT_SIZE, type TextSize} from '../../types/Text'
|
|
5
7
|
|
|
6
8
|
/** @public */
|
|
7
|
-
export interface TextProps<T extends React.ElementType = 'span'>
|
|
9
|
+
export interface TextProps<T extends React.ElementType = 'span'>
|
|
10
|
+
extends MarginProps, ToneProps, TypographyProps {
|
|
8
11
|
/**
|
|
9
12
|
* HTML element to render.
|
|
10
13
|
*/
|
|
@@ -24,5 +27,7 @@ export const textProps: Record<string, PropDef> = {
|
|
|
24
27
|
className: 'text-body',
|
|
25
28
|
values: TEXT_SIZE,
|
|
26
29
|
},
|
|
30
|
+
...marginProps,
|
|
31
|
+
...toneProps,
|
|
27
32
|
...typographyProps,
|
|
28
33
|
}
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
.sui-text-heading4 { font: var(--heading-4); }
|
|
19
19
|
.sui-text-heading5 { font: var(--heading-5); }
|
|
20
20
|
|
|
21
|
-
.sui-text-eyebrow0 { font: var(--
|
|
22
|
-
.sui-text-eyebrow1 { font: var(--
|
|
23
|
-
.sui-text-eyebrow2 { font: var(--
|
|
24
|
-
.sui-text-eyebrow3 { font: var(--
|
|
25
|
-
.sui-text-eyebrow4 { font: var(--
|
|
26
|
-
.sui-text-eyebrow5 { font: var(--
|
|
21
|
+
.sui-text-eyebrow0 { font: var(--eyebrow-0); }
|
|
22
|
+
.sui-text-eyebrow1 { font: var(--eyebrow-1); }
|
|
23
|
+
.sui-text-eyebrow2 { font: var(--eyebrow-2); }
|
|
24
|
+
.sui-text-eyebrow3 { font: var(--eyebrow-3); }
|
|
25
|
+
.sui-text-eyebrow4 { font: var(--eyebrow-4); }
|
|
26
|
+
.sui-text-eyebrow5 { font: var(--eyebrow-5); }
|
|
27
27
|
}
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
--placeholder-opacity: 0.64;
|
|
3
3
|
--overlay-opacity: var(--opacity-mid);
|
|
4
4
|
/* State */
|
|
5
|
-
--active-background-normal: light-dark(var(--
|
|
6
|
-
--active-foreground-normal: light-dark(var(--
|
|
7
|
-
--active-background-emphasized: light-dark(var(--
|
|
8
|
-
--active-foreground-emphasized: light-dark(var(--white), var(--
|
|
5
|
+
--active-background-normal: light-dark(var(--gray-100), var(--gray-900));
|
|
6
|
+
--active-foreground-normal: light-dark(var(--gray-800), var(--gray-200));
|
|
7
|
+
--active-background-emphasized: light-dark(var(--gray-800), var(--gray-200));
|
|
8
|
+
--active-foreground-emphasized: light-dark(var(--white), var(--gray-950));
|
|
9
9
|
--error-background-emphasized: light-dark(var(--red-600), var(--red-400));
|
|
10
10
|
--error-foreground: light-dark(var(--red-800), var(--red-200));
|
|
11
11
|
--error-separator: light-dark(var(--red-600), var(--red-400));
|
|
12
|
-
--focus-outline: 2px solid var(--blue-
|
|
12
|
+
--focus-outline: 2px solid light-dark(var(--blue-600), var(--blue-400));
|
|
13
13
|
--focus-offset: 2px;
|
|
14
14
|
--hover-lightness-delta: 0.125;
|
|
15
15
|
--hover-transition: border-color 100ms linear, background-color 100ms linear, transform 100ms linear;
|
|
16
|
-
--inert-background:
|
|
17
|
-
--inert-foreground: light-dark(var(--gray-400), var(--gray-
|
|
16
|
+
--inert-background: hsl(from var(--gray-500) h s l / 0.125);
|
|
17
|
+
--inert-foreground: light-dark(var(--gray-400), var(--gray-500));
|
|
18
18
|
--fade-in-transition:
|
|
19
19
|
opacity 200ms cubic-bezier(0.34, 1.2, 0.64, 1),
|
|
20
20
|
scale 200ms cubic-bezier(0.34, 1.2, 0.64, 1), visibility 0s linear,
|
package/src/props/typography.ts
CHANGED
|
@@ -2,11 +2,9 @@ import {FONT_WEIGHT, type FontWeight} from '../types/FontWeight'
|
|
|
2
2
|
import {type PropDef} from '../types/PropDef'
|
|
3
3
|
import type {Responsive} from '../types/Responsive'
|
|
4
4
|
import {TEXT_ALIGN, type TextAlign} from '../types/TextAlign'
|
|
5
|
-
import {type MarginProps, marginProps} from './margin'
|
|
6
|
-
import {type ToneProps, toneProps} from './tone'
|
|
7
5
|
|
|
8
6
|
/** @public */
|
|
9
|
-
export interface TypographyProps
|
|
7
|
+
export interface TypographyProps {
|
|
10
8
|
/** CSS **text-align** property */
|
|
11
9
|
align?: Responsive<TextAlign>
|
|
12
10
|
/** CSS **color** property */
|
|
@@ -57,6 +55,4 @@ export const typographyProps: Record<string, PropDef> = {
|
|
|
57
55
|
className: 'weight',
|
|
58
56
|
values: FONT_WEIGHT,
|
|
59
57
|
},
|
|
60
|
-
...marginProps,
|
|
61
|
-
...toneProps,
|
|
62
58
|
}
|
package/src/version.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file is generated by scripts/write-version.js. Do not edit.
|
|
2
|
-
export const VERSION = '
|
|
3
|
-
export const HASH = '
|
|
2
|
+
export const VERSION = '500alpha24'
|
|
3
|
+
export const HASH = '6f91fe'
|