@sanity/ui 5.0.0-alpha.23 → 5.0.0-alpha.25
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/dist/index.d.ts +147 -147
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +139 -157
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/button.dsds.yaml +24 -12
- package/docs/components/code.dsds.yaml +2 -0
- package/docs/components/eyebrow.dsds.yaml +3 -22
- package/docs/components/icon-button.dsds.yaml +9 -2
- package/docs/components/popover.dsds.yaml +8 -2
- package/docs/foundations/typography-guidelines.dsds.yaml +4 -4
- 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 +767 -2512
- package/docs/index.dsds.yaml +76 -85
- package/docs/overview/component-reference.dsds.yaml +0 -2
- package/docs/overview/installation.dsds.yaml +20 -4
- package/docs/patterns/forms.dsds.yaml +6 -0
- package/docs/patterns/layouts.dsds.yaml +1 -1
- package/docs/patterns/loading-states.dsds.yaml +1 -1
- package/docs/tokens/dtcg/README.md +5 -3
- package/docs/tokens/dtcg/css/color.css +1 -1
- package/docs/tokens/dtcg/css/index.css +0 -1
- package/docs/tokens/dtcg/css/typography.css +23 -25
- package/docs/tokens/dtcg/json/color.tokens.json +2 -2
- package/docs/tokens/dtcg/json/typography.tokens.json +45 -45
- package/docs/tokens/typography.dsds.yaml +25 -25
- package/package.json +2 -2
- package/src/components/avatar/avatar.props.ts +4 -2
- package/src/components/avatar-counter/avatarCounter.props.ts +4 -2
- package/src/components/avatar-stack/avatarStack.props.ts +4 -2
- package/src/components/badge/Badge.tsx +2 -5
- package/src/components/badge/badge.props.ts +15 -15
- package/src/components/box/Box.tsx +2 -5
- package/src/components/box/box.props.ts +18 -12
- package/src/components/button/Button.tsx +16 -5
- package/src/components/button/button.css +23 -25
- package/src/components/button/button.props.ts +49 -39
- package/src/components/card/Card.tsx +2 -2
- package/src/components/card/card.props.ts +19 -13
- package/src/components/checkbox/checkbox.props.ts +4 -2
- package/src/components/code/code.props.ts +8 -5
- package/src/components/container/Container.tsx +2 -2
- package/src/components/container/container.props.ts +17 -11
- package/src/components/dialog/Dialog.tsx +10 -5
- package/src/components/dialog/dialog.props.ts +11 -3
- package/src/components/divider/divider.props.ts +4 -2
- package/src/components/eyebrow/Eyebrow.tsx +10 -8
- package/src/components/eyebrow/eyebrow.props.ts +27 -12
- package/src/components/flex/Flex.tsx +2 -5
- package/src/components/flex/flex.props.ts +19 -12
- package/src/components/grid/Grid.tsx +2 -5
- package/src/components/grid/grid.props.ts +20 -16
- package/src/components/h-stack/HStack.tsx +2 -5
- package/src/components/h-stack/hStack.props.ts +7 -4
- package/src/components/heading/Heading.tsx +3 -6
- package/src/components/heading/heading.props.ts +20 -14
- package/src/components/hotkeys/hotkeys.props.ts +4 -2
- package/src/components/icon/icon.props.ts +3 -3
- package/src/components/icon-button/IconButton.tsx +2 -4
- package/src/components/icon-button/iconButton.props.ts +17 -17
- package/src/components/indicator/Indicator.tsx +2 -2
- package/src/components/indicator/indicator.props.ts +17 -11
- package/src/components/indicator-stack/IndicatorStack.tsx +2 -4
- package/src/components/indicator-stack/indicatorStack.props.ts +13 -7
- package/src/components/inline/Inline.tsx +2 -2
- package/src/components/inline/inline.props.ts +17 -11
- package/src/components/kbd/kbd.props.ts +4 -2
- package/src/components/link/link.props.ts +4 -2
- package/src/components/list/List.tsx +47 -97
- package/src/components/list/list.css +28 -9
- package/src/components/list/list.props.ts +59 -68
- package/src/components/popover/Popover.tsx +4 -3
- package/src/components/popover/popover.css +5 -3
- package/src/components/popover/popover.props.ts +16 -5
- package/src/components/press-area/PressArea.tsx +2 -4
- package/src/components/press-area/press-area.css +9 -3
- package/src/components/press-area/pressArea.props.ts +13 -7
- package/src/components/radio/radio.props.ts +2 -1
- package/src/components/select/select.props.ts +4 -2
- package/src/components/skip-to-content/skipToContent.props.ts +4 -2
- package/src/components/spinner/spinner.props.ts +4 -2
- package/src/components/switch/switch.props.ts +4 -2
- package/src/components/tabs/tabs.props.ts +8 -9
- package/src/components/text/Text.tsx +2 -5
- package/src/components/text/text.props.ts +23 -11
- package/src/components/text-area/textArea.props.ts +4 -5
- package/src/components/text-input/textInput.props.ts +5 -3
- package/src/components/tooltip/tooltip.props.ts +7 -5
- package/src/components/tooltip-group/TooltipGroup.tsx +2 -4
- package/src/components/tooltip-group/tooltipGroup.props.ts +13 -7
- package/src/components/v-stack/VStack.tsx +2 -5
- package/src/components/v-stack/vStack.props.ts +7 -4
- package/src/components/visually-hidden/VisuallyHidden.tsx +2 -4
- package/src/components/visually-hidden/visuallyHidden.props.ts +17 -11
- 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/types/Interactive.ts +3 -1
- package/src/types/Polymorphic.ts +9 -0
- package/src/version.ts +2 -2
- package/docs/overview/designer-contribution-model.dsds.yaml +0 -77
- package/docs/overview/developer-contribution-model.dsds.yaml +0 -362
- package/docs/overview/resources.dsds.yaml +0 -34
|
@@ -45,6 +45,9 @@ sections:
|
|
|
45
45
|
alternatives:
|
|
46
46
|
- to: switch
|
|
47
47
|
- to: checkbox
|
|
48
|
+
- refs:
|
|
49
|
+
- to: forms#no-pressed-for-form-values
|
|
50
|
+
rel: relates-to
|
|
48
51
|
- id: buttons-only-display-icon-text
|
|
49
52
|
level: must-not
|
|
50
53
|
statement: For buttons that only display an icon with no text label. Use IconButton instead.
|
|
@@ -99,12 +102,14 @@ sections:
|
|
|
99
102
|
- level: should
|
|
100
103
|
statement: Use iconStart in Button for visual emphasis. Only when it doesn't hurt scannability. Keep icon/text button pairing to one button per group.
|
|
101
104
|
- level: must-not
|
|
102
|
-
statement: '**Disabled strategy.** Never place a tooltip on a disabled button.
|
|
105
|
+
statement: '**Disabled strategy.** Never place a tooltip on a disabled button. The `disabled` prop uses HTML `disabled`, which removes it from the tab order, so keyboard users cannot reach the tooltip. When users need to find a disabled control, use `aria-disabled="true"` instead to keep it focusable while blocking action (WCAG 2.1.1 A). `loading={true}` also sets `aria-disabled`, so a loading button stays focusable.'
|
|
103
106
|
tags: [accessibility]
|
|
104
107
|
refines:
|
|
105
108
|
- to: accessibility-guidelines#disabled-control-no-tooltip
|
|
106
109
|
- level: must-not
|
|
107
110
|
statement: Don't use Button without a text label. Button relies on the text label to describe its purpose. Use IconButton in cases where the icon is the only visual indicator.
|
|
111
|
+
- level: must
|
|
112
|
+
statement: Button defaults to `type="button"`. To submit a form, set `type="submit"` explicitly.
|
|
108
113
|
- level: must-not
|
|
109
114
|
statement: Don't disable buttons as a blocking function for incomplete form fields. People may not know what caused the button to be disabled. Allow submission and show feedback instead.
|
|
110
115
|
- level: must-not
|
|
@@ -208,8 +213,8 @@ traits:
|
|
|
208
213
|
description: Visual cue that the cursor is resting over the button.
|
|
209
214
|
- traitType: state
|
|
210
215
|
kind: boolean
|
|
211
|
-
id:
|
|
212
|
-
description:
|
|
216
|
+
id: active
|
|
217
|
+
description: Momentary visual cue while the button is pressed down (:active). Not the same as the pressed prop.
|
|
213
218
|
- traitType: state
|
|
214
219
|
kind: boolean
|
|
215
220
|
id: focused
|
|
@@ -219,16 +224,23 @@ traits:
|
|
|
219
224
|
id: disabled
|
|
220
225
|
description: >-
|
|
221
226
|
Blocks the user from using the button. Removed from the tab order via HTML
|
|
222
|
-
disabled. Use only when performing the action could be harmful
|
|
223
|
-
|
|
224
|
-
|
|
227
|
+
disabled. Use only when performing the action could be harmful. Let people
|
|
228
|
+
know why it's disabled and how to fix it with visible text or a status
|
|
229
|
+
message next to the button.
|
|
225
230
|
- traitType: state
|
|
226
231
|
kind: boolean
|
|
227
232
|
id: loading
|
|
228
233
|
description: >-
|
|
229
|
-
Shows the action is in progress.
|
|
230
|
-
|
|
234
|
+
Shows the action is in progress. Sets aria-busy and aria-disabled, hides
|
|
235
|
+
the label and icons behind a spinner, and ignores clicks. The button stays
|
|
236
|
+
focusable. Use only for processes consistently longer than 200ms. For
|
|
231
237
|
processes over three seconds, show a confirmation message when the action completes.
|
|
238
|
+
- traitType: variant
|
|
239
|
+
kind: boolean
|
|
240
|
+
id: pressed
|
|
241
|
+
description: >-
|
|
242
|
+
Toggle state for a button that switches a view, filter, or option on and
|
|
243
|
+
off. Sets aria-pressed to the given value and shows the pressed style.
|
|
232
244
|
- traitType: variant
|
|
233
245
|
kind: enum
|
|
234
246
|
id: level
|
|
@@ -263,15 +275,15 @@ traits:
|
|
|
263
275
|
- traitType: variant
|
|
264
276
|
kind: enum
|
|
265
277
|
id: density
|
|
266
|
-
description: Composite prop setting padding and
|
|
278
|
+
description: Composite prop setting padding, gap, and minimum size together.
|
|
267
279
|
values:
|
|
268
280
|
- id: regular
|
|
269
|
-
description: Gap 2 and
|
|
281
|
+
description: Gap 2, padding 2, and a minimum size of 25px. Default spacing.
|
|
270
282
|
- id: loose
|
|
271
|
-
description: Gap 3 and
|
|
283
|
+
description: Gap 3, padding 3, and a minimum size of 33px. For spacious contexts.
|
|
272
284
|
- traitType: variant
|
|
273
285
|
kind: boolean
|
|
274
|
-
id:
|
|
286
|
+
id: fullWidth
|
|
275
287
|
description: Sets CSS width to 100% to fill the container.
|
|
276
288
|
$extensions:
|
|
277
289
|
com.sanity.ui:
|
|
@@ -122,6 +122,7 @@ $extensions:
|
|
|
122
122
|
- `as` is not a v5 prop. Use `inline` to render a span. Block code renders as a `pre` by default.
|
|
123
123
|
- `maxWidth` removed. Use a wrapping `Box` for width constraints.
|
|
124
124
|
- Flex props removed. Code is a block typography element, not a flex container.
|
|
125
|
+
- Margin props are accepted directly: `margin`, `marginX`, `marginY`, and per-side margin props.
|
|
125
126
|
- `muted` prop added to reduce visual contrast for secondary code content.
|
|
126
127
|
- `trim` prop added to remove leading and trailing whitespace from the text box.
|
|
127
128
|
- Refractor enables when `language` is set. When no `language` is set, v5 skips Refractor and renders right away.
|
|
@@ -137,6 +138,7 @@ $extensions:
|
|
|
137
138
|
| Flex props | — | Removed. Code no longer extends flex layout props. |
|
|
138
139
|
| — | `muted` | New. Reduces visual contrast. |
|
|
139
140
|
| — | `trim` | New. Applies `text-box-trim` for precise vertical alignment. |
|
|
141
|
+
| — | `margin*` | Code accepts margin props directly: `margin`, `marginX`, `marginY`, and per-side margin props. |
|
|
140
142
|
|
|
141
143
|
### Breaking changes
|
|
142
144
|
|
|
@@ -56,14 +56,6 @@ sections:
|
|
|
56
56
|
alternatives:
|
|
57
57
|
- to: text
|
|
58
58
|
note: Set as='label' and link it with htmlFor.
|
|
59
|
-
- kind: guidelines
|
|
60
|
-
for: agent
|
|
61
|
-
framing: how-to-use
|
|
62
|
-
items:
|
|
63
|
-
- level: must
|
|
64
|
-
statement: weight and tone take a single value. Only size, align, truncate, and the margin props accept responsive arrays.
|
|
65
|
-
- level: must-not
|
|
66
|
-
statement: Do not use Eyebrow without an adjacent Heading — its purpose is to introduce one.
|
|
67
59
|
- kind: guidelines
|
|
68
60
|
for: all
|
|
69
61
|
title: Content
|
|
@@ -122,19 +114,6 @@ traits:
|
|
|
122
114
|
description: Large. Above a prominent, large-size Heading.
|
|
123
115
|
- id: '4'
|
|
124
116
|
description: Extra large. Rare — hero sections with a large Heading below.
|
|
125
|
-
- traitType: variant
|
|
126
|
-
kind: enum
|
|
127
|
-
id: weight
|
|
128
|
-
description: Font weight.
|
|
129
|
-
values:
|
|
130
|
-
- id: regular
|
|
131
|
-
description: Rare. A deliberately quieter eyebrow next to a heavy heading.
|
|
132
|
-
- id: medium
|
|
133
|
-
description: A softer alternative to the default.
|
|
134
|
-
- id: semibold
|
|
135
|
-
description: Standard weight (default). Reads as a label at a glance.
|
|
136
|
-
- id: bold
|
|
137
|
-
description: Rare. Extra emphasis when the eyebrow must compete with its heading.
|
|
138
117
|
- traitType: variant
|
|
139
118
|
kind: enum
|
|
140
119
|
id: tone
|
|
@@ -196,12 +175,14 @@ $extensions:
|
|
|
196
175
|
| — (default `as="div"`) | `as="div"` | The codemod sets this explicitly, since `Eyebrow` defaults to `"span"`. |
|
|
197
176
|
| — | `trim` | The codemod sets `trim={true}` to match v3's vertical spacing. |
|
|
198
177
|
| — | `margin*` | New. `Eyebrow` accepts margin props directly. |
|
|
199
|
-
| `align`, `muted`, `size
|
|
178
|
+
| `align`, `muted`, `size` | Same | Carry over unchanged. |
|
|
179
|
+
| `weight` | — | Removed. `Eyebrow` always renders at semibold. Use `Text` for another weight. |
|
|
200
180
|
|
|
201
181
|
### Breaking changes
|
|
202
182
|
|
|
203
183
|
- `accent` prop removed. The v3 component's accent has no `Eyebrow` boolean equivalent — use `tone="suggest"`.
|
|
204
184
|
- `textOverflow` prop removed. The v3 `textOverflow="ellipsis"` does nothing on `Eyebrow`. Use `<Eyebrow truncate={1}>`.
|
|
185
|
+
- `weight` prop removed. `Eyebrow` always renders at semibold. Use `Text` for another weight.
|
|
205
186
|
- `flex`, `width`, and `maxWidth` props removed. `Eyebrow` accepts no layout props — move them to a wrapping `Box`.
|
|
206
187
|
- `styled-components` no longer used. Custom styled-components extensions of the v3 component will not work on `Eyebrow`.
|
|
207
188
|
- The default rendered element changes from `<div>` to `<span>` unless `as="div"` is set explicitly.
|
|
@@ -28,6 +28,9 @@ sections:
|
|
|
28
28
|
statement: In dialogs or confirmation prompts. Use Button with a visible label.
|
|
29
29
|
alternatives:
|
|
30
30
|
- to: button
|
|
31
|
+
- refs:
|
|
32
|
+
- to: forms#no-pressed-for-form-values
|
|
33
|
+
rel: relates-to
|
|
31
34
|
- kind: guidelines
|
|
32
35
|
for: all
|
|
33
36
|
framing: how-to-use
|
|
@@ -191,7 +194,7 @@ traits:
|
|
|
191
194
|
- traitType: state
|
|
192
195
|
kind: boolean
|
|
193
196
|
id: loading
|
|
194
|
-
description: Button action is in progress.
|
|
197
|
+
description: Button action is in progress. Sets aria-busy and aria-disabled, hides the icon behind a spinner, and ignores clicks. The button stays focusable. Use for tasks over 200ms. For tasks over three seconds, show a confirmation message when the task completes.
|
|
195
198
|
- traitType: state
|
|
196
199
|
kind: boolean
|
|
197
200
|
id: enabled
|
|
@@ -201,9 +204,13 @@ traits:
|
|
|
201
204
|
id: hovered
|
|
202
205
|
description: Cursor is resting over the button.
|
|
203
206
|
- traitType: state
|
|
207
|
+
kind: boolean
|
|
208
|
+
id: active
|
|
209
|
+
description: Button is being pressed down (:active). Not the same as the pressed prop.
|
|
210
|
+
- traitType: variant
|
|
204
211
|
kind: boolean
|
|
205
212
|
id: pressed
|
|
206
|
-
description:
|
|
213
|
+
description: Toggle state for a button that switches a view, filter, or option on and off. Sets aria-pressed to the given value and shows the pressed style.
|
|
207
214
|
- traitType: state
|
|
208
215
|
kind: boolean
|
|
209
216
|
id: focused
|
|
@@ -52,7 +52,7 @@ sections:
|
|
|
52
52
|
- level: must-not
|
|
53
53
|
statement: Don't open more than one Popover at a time.
|
|
54
54
|
- level: must-not
|
|
55
|
-
statement:
|
|
55
|
+
statement: Don't use Popover for gating content. Use Dialog instead.
|
|
56
56
|
- kind: guidelines
|
|
57
57
|
for: agent
|
|
58
58
|
framing: how-to-use
|
|
@@ -80,7 +80,7 @@ sections:
|
|
|
80
80
|
href: ../examples/popover-2.tsx
|
|
81
81
|
rel: source
|
|
82
82
|
- level: should
|
|
83
|
-
statement: The content box has its own padding
|
|
83
|
+
statement: The content box has its own padding. Put the content straight inside; a padded wrapper doubles the padding.
|
|
84
84
|
- level: should
|
|
85
85
|
statement: Set portal only when an ancestor clips or misplaces the content.
|
|
86
86
|
- level: may
|
|
@@ -166,6 +166,12 @@ traits:
|
|
|
166
166
|
ancestor with transform, filter, or contain creates a containing block
|
|
167
167
|
that breaks anchor positioning. Portalled content does not render during
|
|
168
168
|
server-side rendering.
|
|
169
|
+
- traitType: variant
|
|
170
|
+
kind: boolean
|
|
171
|
+
id: fullBleed
|
|
172
|
+
description: >-
|
|
173
|
+
Removes the content box padding, so the content reaches the edges of the
|
|
174
|
+
floating layer. Use for setting custom spacing within Popover or content that should take up the entire space, such as an image. Padding is on by default.
|
|
169
175
|
$extensions:
|
|
170
176
|
com.sanity.ui:
|
|
171
177
|
implementationStatus:
|
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
- readability
|
|
12
12
|
- heading
|
|
13
13
|
- text
|
|
14
|
-
-
|
|
14
|
+
- eyebrow
|
|
15
15
|
- code
|
|
16
16
|
- weight
|
|
17
17
|
- alignment
|
|
@@ -197,7 +197,7 @@ sections:
|
|
|
197
197
|
| `3` | {body-3} | Display body — intros and lead paragraphs |
|
|
198
198
|
| `4` | {body-4} | Display body — hero and empty-state text |
|
|
199
199
|
- title: Eyebrow and Code scale
|
|
200
|
-
body: '`Code` runs sizes `0` through `4`, defaulting to `2`: {code-0}, {code-1}, {code-2}, {code-3} and {code-4}. `Eyebrow` runs sizes `0` through `4`: {
|
|
200
|
+
body: '`Code` runs sizes `0` through `4`, defaulting to `2`: {code-0}, {code-1}, {code-2}, {code-3} and {code-4}. `Eyebrow` runs sizes `0` through `4`: {eyebrow-0}, {eyebrow-1}, {eyebrow-2}, {eyebrow-3} and {eyebrow-4}.'
|
|
201
201
|
- kind: section
|
|
202
202
|
for: all
|
|
203
203
|
freeform:
|
|
@@ -205,14 +205,14 @@ sections:
|
|
|
205
205
|
body: 'Constrain body text to roughly 45–75 characters per line. Start with `max-inline-size: 66ch`. The `ch` unit approximates character count from the `0` glyph width, so treat 66ch as a target. Check that the rendered line lands in the 45–75 range, above all for `Code` or when the font changes. Outside this range, the return sweep fails and reading slows. Measure delivers more readability gain than any other single factor.'
|
|
206
206
|
- title: Line height
|
|
207
207
|
body: |-
|
|
208
|
-
Body text needs ample line height: 1.5×. This also gives the layout headroom for the WCAG 1.4.12 text-spacing override, where users force 1.5× line height (see Accessibility). Headings and eyebrows use a tighter 1.
|
|
208
|
+
Body text needs ample line height: 1.5×. This also gives the layout headroom for the WCAG 1.4.12 text-spacing override, where users force 1.5× line height (see Accessibility). Headings and eyebrows use a tighter 1.15× at every size. Longer lines need more leading.
|
|
209
209
|
|
|
210
210
|
| Tokens | Components | Line height |
|
|
211
211
|
| --- | --- | --- |
|
|
212
212
|
| `body-0`–`body-4` | `Text` 0–4 | 1.5× |
|
|
213
213
|
| `code-0`–`code-4` | `Code` 0–4 | 1.5× |
|
|
214
214
|
| `heading-0`–`heading-5` | `Heading` 0–5 | 1.25× |
|
|
215
|
-
| `
|
|
215
|
+
| `eyebrow-0`–`eyebrow-4` | `Eyebrow` 0–4 | 1.15× |
|
|
216
216
|
|
|
217
217
|
The values come from `tokens/dtcg/json/typography.tokens.json`.
|
|
218
218
|
- title: Alignment
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-access-denied
|
|
3
|
+
name: AccessDeniedIcon
|
|
4
|
+
description: Indicates access restrictions or permissions denial.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Forbidden
|
|
10
|
+
- No Entry
|
|
11
|
+
- Restricted
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/access-denied.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: Use when a user lacks permission to access content or features
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: For errors that aren't related to user permissions. Use ErrorOutlineIcon or ErrorFilledIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-error-outline
|
|
31
|
+
- to: icon-error-filled
|
|
32
|
+
- level: should-not
|
|
33
|
+
statement: For warnings that aren't related to user permissions. Use WarningOutlineIcon or WarningFilledIcon instead.
|
|
34
|
+
alternatives:
|
|
35
|
+
- to: icon-warning-outline
|
|
36
|
+
- to: icon-warning-filled
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent an action to gain access. Use LockIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-lock
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-activity
|
|
3
|
+
name: ActivityIcon
|
|
4
|
+
description: Represents activity feeds, monitoring, or diagnostics.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Feed
|
|
10
|
+
- Timeline
|
|
11
|
+
- EKG
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/activity.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For activity logs or feeds.
|
|
27
|
+
- level: should
|
|
28
|
+
statement: For performance or health checks.
|
|
29
|
+
- level: should-not
|
|
30
|
+
statement: For general analytics or data visualization tools. Use BarChartIcon instead.
|
|
31
|
+
alternatives:
|
|
32
|
+
- to: icon-bar-chart
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: To represent usage or a general line chart. Use ChartUpwardIcon instead.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: icon-chart-upward
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent a trend in data. Use TrendUpwardIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-trend-upward
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-circle
|
|
3
|
+
name: AddCircleIcon
|
|
4
|
+
description: The add circle icon from the Sanity icon set.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
refs:
|
|
9
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-circle.svg
|
|
10
|
+
rel: source
|
|
11
|
+
$extensions:
|
|
12
|
+
com.sanity.ui:
|
|
13
|
+
iconOf: icons
|
|
14
|
+
described: false
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-comment
|
|
3
|
+
name: AddCommentIcon
|
|
4
|
+
description: To provide an affordance for adding a comment or reply.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Comment Add
|
|
10
|
+
- New Comment
|
|
11
|
+
- Reply
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-comment.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: To represent the ability to add a comment or reply to a thread. Especially when commenting is a secondary action.
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: To view comments. Use CommentIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-comment
|
|
31
|
+
- level: should-not
|
|
32
|
+
statement: When commenting is the primary action within a feature. Consider AddIcon instead.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: icon-add
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-document
|
|
3
|
+
name: AddDocumentIcon
|
|
4
|
+
description: Adding or creating a document.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- New document
|
|
10
|
+
refs:
|
|
11
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-document.svg
|
|
12
|
+
rel: source
|
|
13
|
+
$extensions:
|
|
14
|
+
com.sanity.ui:
|
|
15
|
+
iconOf: icons
|
|
16
|
+
described: true
|
|
17
|
+
sections:
|
|
18
|
+
- kind: guidelines
|
|
19
|
+
for: all
|
|
20
|
+
framing: when-to-use
|
|
21
|
+
title: When to use
|
|
22
|
+
items:
|
|
23
|
+
- level: should
|
|
24
|
+
statement: For adding a document to a group/collection/list
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For creating a new document as a secondary action
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: When adding/creating a document is the primary action. Use AddIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-add
|
|
31
|
+
- level: should-not
|
|
32
|
+
statement: For general adding or creation. Use AddIcon instead.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: icon-add
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-user
|
|
3
|
+
name: AddUserIcon
|
|
4
|
+
description: To add a role or add/invite users to a group.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
refs:
|
|
9
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-user.svg
|
|
10
|
+
rel: source
|
|
11
|
+
$extensions:
|
|
12
|
+
com.sanity.ui:
|
|
13
|
+
iconOf: icons
|
|
14
|
+
described: true
|
|
15
|
+
sections:
|
|
16
|
+
- kind: guidelines
|
|
17
|
+
for: all
|
|
18
|
+
framing: when-to-use
|
|
19
|
+
title: When to use
|
|
20
|
+
items:
|
|
21
|
+
- level: should
|
|
22
|
+
statement: For adding people to a user group or a team
|
|
23
|
+
- level: should
|
|
24
|
+
statement: To add people to a permissions group
|
|
25
|
+
- level: should
|
|
26
|
+
statement: To add a role
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: As a general action for sharing. Use ShareIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-share
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add
|
|
3
|
+
name: AddIcon
|
|
4
|
+
description: Adding a new or existing item to an element.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Plus
|
|
10
|
+
- Create
|
|
11
|
+
- New
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: 'Adding/creating a new item that doesn''t benefit from the specificity of an icon with an "add" modifier (example: add-document)'
|
|
27
|
+
- level: should
|
|
28
|
+
statement: As a button for the primary add/create action
|
|
29
|
+
- level: should
|
|
30
|
+
statement: As a button when only one type of content can be added
|
|
31
|
+
- level: should
|
|
32
|
+
statement: As a menu button to display the options of what type of item to add
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: When there are multiple add actions on a page. Use a more specific icon is available like AddCommentIcon for comments
|
|
35
|
+
- level: should-not
|
|
36
|
+
statement: To indicate showing UI columns/rows in the UI. Use split-horizontal or split-vertical instead.
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To indicate inviting people/members to an organization or group. Use AddUserIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-add-user
|
|
41
|
+
- level: should-not
|
|
42
|
+
statement: 'For adding content in a list where position does matters. Use InsertAboveIcon or InsertBelowIcon instead. Best practices:'
|
|
43
|
+
alternatives:
|
|
44
|
+
- to: icon-insert-above
|
|
45
|
+
- to: icon-insert-below
|
|
46
|
+
- level: should-not
|
|
47
|
+
statement: Add a label with the icon when space permits.
|
|
48
|
+
- level: should-not
|
|
49
|
+
statement: 'When creating a new item, use "New [ITEM TYPE]". Example: "New document"'
|
|
50
|
+
- level: should-not
|
|
51
|
+
statement: 'When adding an existing item, use "Add [ITEM TYPE ]". Example: "Add tag".'
|
|
52
|
+
- level: should-not
|
|
53
|
+
statement: In cases where a label is not used, add a tooltip.
|
|
54
|
+
- level: should-not
|
|
55
|
+
statement: 'When creating a new item, use "Create a new [ITEM TYPE]". Example: "Create a new document"'
|
|
56
|
+
- level: should-not
|
|
57
|
+
statement: 'When adding an existing item, use "Add a [ITEM TYPE ]". Example: "Add a tag".'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-api
|
|
3
|
+
name: ApiIcon
|
|
4
|
+
description: DECORATIVE. USE WITH DISCRETION. ONLY USE IF ANOTHER ICON DOES NOT FIT THE NEED.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Code Interface
|
|
10
|
+
- Integration
|
|
11
|
+
refs:
|
|
12
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/api.svg
|
|
13
|
+
rel: source
|
|
14
|
+
$extensions:
|
|
15
|
+
com.sanity.ui:
|
|
16
|
+
iconOf: icons
|
|
17
|
+
described: true
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-archive
|
|
3
|
+
name: ArchiveIcon
|
|
4
|
+
description: Archiving or storing items for later reference.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Box
|
|
10
|
+
- Storage
|
|
11
|
+
- Deprecated
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/archive.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For archival actions
|
|
27
|
+
- level: should
|
|
28
|
+
statement: For stashing changes
|
|
29
|
+
- level: should-not
|
|
30
|
+
statement: For removal actions. Use RemoveIcon instead.
|
|
31
|
+
alternatives:
|
|
32
|
+
- to: icon-remove
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: For delete actions. Use TrashIcon instead.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: icon-trash
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent adding to a collection. Use PackageIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-package
|
|
41
|
+
- level: should-not
|
|
42
|
+
statement: To represent download or export actions. Use DownloadIcon instead.
|
|
43
|
+
alternatives:
|
|
44
|
+
- to: icon-download
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-arrow-down
|
|
3
|
+
name: ArrowDownIcon
|
|
4
|
+
description: Downward screen-level movement/scrolling.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Down
|
|
10
|
+
- Descend
|
|
11
|
+
- Download Direction
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/arrow-down.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: Moving/scrolling down within a page
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: As an indicator for downloads. Use DownloadIcon for viewing instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-download
|
|
31
|
+
- level: should-not
|
|
32
|
+
statement: To represent unpublish actions. Use UnpublishIcon instead.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: icon-unpublish
|
|
35
|
+
- level: should-not
|
|
36
|
+
statement: To move, transition or resize elements within a page. Use ChevronDownIcon instead.
|
|
37
|
+
alternatives:
|
|
38
|
+
- to: icon-chevron-down
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-arrow-left
|
|
3
|
+
name: ArrowLeftIcon
|
|
4
|
+
description: Backward navigation across surfaces.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Left
|
|
10
|
+
- Back
|
|
11
|
+
- Previous
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/arrow-left.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: Navigating back to a previous page
|
|
27
|
+
- level: should
|
|
28
|
+
statement: Paginating backward/previous
|
|
29
|
+
- level: should-not
|
|
30
|
+
statement: To move, resize or reveal elements within a page. Use ChevronLeftIcon instead.
|
|
31
|
+
alternatives:
|
|
32
|
+
- to: icon-chevron-left
|