@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
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentProps, ComponentPropsWithRef, ComponentType, ElementType, HTMLInputTypeAttribute, ReactElement, ReactEventHandler, ReactNode, SVGProps } from "react";
|
|
2
2
|
declare const AVATAR_SIZE: readonly [0, 1, 2];
|
|
3
3
|
type AvatarSize = (typeof AVATAR_SIZE)[number];
|
|
4
4
|
declare const AVATAR_COLOR: readonly ["gray", "purple", "magenta", "red", "orange", "yellow", "green", "cyan"];
|
|
@@ -18,7 +18,7 @@ type Responsive<T> = T | [] | ([T | undefined | null, ...(T | undefined | null)[
|
|
|
18
18
|
length: 6;
|
|
19
19
|
});
|
|
20
20
|
/** @public */
|
|
21
|
-
interface AvatarProps extends
|
|
21
|
+
interface AvatarProps extends ComponentProps<'figure'> {
|
|
22
22
|
/** Avatar color */
|
|
23
23
|
color?: AvatarColor;
|
|
24
24
|
/** Avatar name, only first letter will be displayed */
|
|
@@ -31,7 +31,7 @@ interface AvatarProps extends React.ComponentProps<'figure'> {
|
|
|
31
31
|
/** @public */
|
|
32
32
|
export declare function Avatar({ color, size, ...props }: AvatarProps): import("react").JSX.Element;
|
|
33
33
|
/** @public */
|
|
34
|
-
interface AvatarCounterProps extends
|
|
34
|
+
interface AvatarCounterProps extends ComponentProps<'figure'> {
|
|
35
35
|
/** Count */
|
|
36
36
|
count: number;
|
|
37
37
|
/** Composite prop for setting height and font size */
|
|
@@ -40,7 +40,7 @@ interface AvatarCounterProps extends React.ComponentProps<'figure'> {
|
|
|
40
40
|
/** @public */
|
|
41
41
|
export declare function AvatarCounter({ size, ...props }: AvatarCounterProps): import("react").JSX.Element;
|
|
42
42
|
/** @public */
|
|
43
|
-
interface AvatarStackProps extends
|
|
43
|
+
interface AvatarStackProps extends ComponentProps<'ul'> {
|
|
44
44
|
/** Max number of avatars to display */
|
|
45
45
|
maxLength?: number;
|
|
46
46
|
/** Avatar and AvatarCounter size */
|
|
@@ -59,23 +59,18 @@ type ToneProps = {
|
|
|
59
59
|
type ToneWithDefaultProps = {
|
|
60
60
|
tone?: ToneWithDefault;
|
|
61
61
|
};
|
|
62
|
+
type Polymorphic<T extends ElementType, Props extends object> = Props & Omit<T extends ((props: infer AsProps, ...args: never) => unknown) ? AsProps : ComponentPropsWithRef<T>, keyof Props>;
|
|
62
63
|
/** @public */
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* HTML element to render.
|
|
66
|
-
*/
|
|
64
|
+
type BadgeProps<T extends ElementType = 'span'> = Polymorphic<T, ToneProps & {
|
|
65
|
+
/** HTML element to render. */
|
|
67
66
|
as?: T;
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
iconStart?: React.ElementType | React.ReactNode;
|
|
72
|
-
/**
|
|
73
|
-
* Sets Badge's text label. Use instead of children unless you have a special use case.
|
|
74
|
-
*/
|
|
67
|
+
/** Shows an icon in the start position (left side in left-to-right languages). */
|
|
68
|
+
iconStart?: ElementType | ReactNode;
|
|
69
|
+
/** Sets Badge's text label. Use instead of children unless you have a special use case. */
|
|
75
70
|
text?: string;
|
|
76
|
-
}
|
|
71
|
+
}>;
|
|
77
72
|
/** @public */
|
|
78
|
-
export declare function Badge<T extends ElementType = 'span'>({ tone, ...props }: BadgeProps<T>
|
|
73
|
+
export declare function Badge<T extends ElementType = 'span'>({ tone, ...props }: BadgeProps<T>): import("react").JSX.Element;
|
|
79
74
|
declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
|
|
80
75
|
/** @public */
|
|
81
76
|
type Radius = (typeof RADIUS)[number];
|
|
@@ -228,7 +223,7 @@ declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
|
|
|
228
223
|
/** @public */
|
|
229
224
|
type DisplayGrid = (typeof DISPLAY_GRID)[number];
|
|
230
225
|
/** @public */
|
|
231
|
-
|
|
226
|
+
type BoxProps<T extends ElementType = 'div'> = Polymorphic<T, LayoutProps & {
|
|
232
227
|
/**
|
|
233
228
|
* HTML element or component to render.
|
|
234
229
|
*/
|
|
@@ -238,9 +233,9 @@ interface BoxProps<T extends React.ElementType = 'div'> extends LayoutProps {
|
|
|
238
233
|
* @remarks Does not include `'flex'` or `'grid'`. Use the Flex or Grid components for those.
|
|
239
234
|
*/
|
|
240
235
|
display?: Responsive<DisplayBlock>;
|
|
241
|
-
}
|
|
236
|
+
}>;
|
|
242
237
|
/** @public */
|
|
243
|
-
export declare function Box<T extends ElementType = 'div'>({ display, ...props }: BoxProps<T>
|
|
238
|
+
export declare function Box<T extends ElementType = 'div'>({ display, ...props }: BoxProps<T>): import("react").JSX.Element;
|
|
244
239
|
declare const BUTTON_DENSITY: readonly ["regular", "loose"];
|
|
245
240
|
type ButtonDensity = (typeof BUTTON_DENSITY)[number];
|
|
246
241
|
declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
|
|
@@ -249,9 +244,9 @@ declare const BUTTON_TONE: readonly ["neutral", "critical"];
|
|
|
249
244
|
type ButtonTone = (typeof BUTTON_TONE)[number];
|
|
250
245
|
declare const INTERACTIVE_TAG: readonly ["button", "a"];
|
|
251
246
|
type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
|
|
252
|
-
type InteractiveAs<T extends
|
|
247
|
+
type InteractiveAs<T extends ElementType> = T extends InteractiveTag ? T : T extends string ? never : T;
|
|
253
248
|
/** @public */
|
|
254
|
-
|
|
249
|
+
type ButtonProps<T extends ElementType = 'button'> = Polymorphic<T, {
|
|
255
250
|
/**
|
|
256
251
|
* HTML element to render.
|
|
257
252
|
*/
|
|
@@ -267,11 +262,11 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
|
|
|
267
262
|
/**
|
|
268
263
|
* Shows an icon in the start position (left side in left-to-right languages).
|
|
269
264
|
*/
|
|
270
|
-
iconStart?:
|
|
265
|
+
iconStart?: ElementType | ReactNode;
|
|
271
266
|
/**
|
|
272
267
|
* Shows an icon in the end position (right side in left-to-right languages).
|
|
273
268
|
*/
|
|
274
|
-
iconEnd?:
|
|
269
|
+
iconEnd?: ElementType | ReactNode;
|
|
275
270
|
/**
|
|
276
271
|
* Sets the importance of Button's action.
|
|
277
272
|
*/
|
|
@@ -280,6 +275,10 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
|
|
|
280
275
|
* Places Button into a loading state.
|
|
281
276
|
*/
|
|
282
277
|
loading?: boolean;
|
|
278
|
+
/**
|
|
279
|
+
* Visually styles the button in a pressed state, and sets aria-pressed to the provided value
|
|
280
|
+
*/
|
|
281
|
+
pressed?: boolean;
|
|
283
282
|
/**
|
|
284
283
|
* Sets Button's text label.
|
|
285
284
|
*/
|
|
@@ -288,14 +287,14 @@ interface ButtonProps<T extends React.ElementType = 'button'> {
|
|
|
288
287
|
* Sets Button's semantic meaning and related color.
|
|
289
288
|
*/
|
|
290
289
|
tone?: ButtonTone;
|
|
291
|
-
}
|
|
290
|
+
}>;
|
|
292
291
|
/** @public */
|
|
293
|
-
export declare function Button<T extends ElementType = 'button'>({ density, level, tone, ...props }: ButtonProps<T>
|
|
292
|
+
export declare function Button<T extends ElementType = 'button'>({ density, level, tone, ...props }: ButtonProps<T>): import("react").JSX.Element;
|
|
294
293
|
declare const DENSITY: readonly ["compact", "regular", "loose"];
|
|
295
294
|
/** @public */
|
|
296
295
|
type Density = (typeof DENSITY)[number];
|
|
297
296
|
/** @public */
|
|
298
|
-
|
|
297
|
+
type CardProps<T extends ElementType = 'div'> = Polymorphic<T, MarginProps & ToneWithDefaultProps & {
|
|
299
298
|
/**
|
|
300
299
|
* HTML element or component to render.
|
|
301
300
|
*/
|
|
@@ -304,11 +303,11 @@ interface CardProps<T extends React.ElementType = 'div'> extends MarginProps, To
|
|
|
304
303
|
* Sets padding, gap, and border-radius together to specify size. This prop is used in place of separate `padding`, `gap`, and `border-radius` props.
|
|
305
304
|
*/
|
|
306
305
|
density?: Responsive<Density>;
|
|
307
|
-
}
|
|
306
|
+
}>;
|
|
308
307
|
/** @public */
|
|
309
|
-
export declare function Card<T extends ElementType = 'div'>({ density, tone, ...props }: CardProps<T>
|
|
308
|
+
export declare function Card<T extends ElementType = 'div'>({ density, tone, ...props }: CardProps<T>): import("react").JSX.Element;
|
|
310
309
|
/** @beta */
|
|
311
|
-
interface CheckboxProps extends
|
|
310
|
+
interface CheckboxProps extends ComponentProps<'input'> {
|
|
312
311
|
/**
|
|
313
312
|
* Applies error styling to the checkbox mark for invalid states.
|
|
314
313
|
* @remarks Use when form validation fails. Pair with a visible error message.
|
|
@@ -329,7 +328,7 @@ declare const TEXT_ALIGN: readonly ["left", "center", "right"];
|
|
|
329
328
|
/** @public */
|
|
330
329
|
type TextAlign = (typeof TEXT_ALIGN)[number];
|
|
331
330
|
/** @public */
|
|
332
|
-
interface TypographyProps
|
|
331
|
+
interface TypographyProps {
|
|
333
332
|
/** CSS **text-align** property */
|
|
334
333
|
align?: Responsive<TextAlign>;
|
|
335
334
|
/** CSS **color** property */
|
|
@@ -344,7 +343,7 @@ interface TypographyProps extends MarginProps, ToneProps {
|
|
|
344
343
|
declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
|
|
345
344
|
/** @public */
|
|
346
345
|
type CodeSize = (typeof CODE_SIZE)[number];
|
|
347
|
-
interface CodeBaseProps extends Omit<TypographyProps, 'align' | 'truncate' | '
|
|
346
|
+
interface CodeBaseProps extends MarginProps, Omit<TypographyProps, 'align' | 'truncate' | 'weight'> {
|
|
348
347
|
/**
|
|
349
348
|
* Refractor language for syntax highlighting.
|
|
350
349
|
*/
|
|
@@ -361,16 +360,16 @@ type CodeProps = (CodeBaseProps & {
|
|
|
361
360
|
* @remarks Block code is wrapped in a `<pre>` tag.
|
|
362
361
|
*/
|
|
363
362
|
inline?: false;
|
|
364
|
-
} & Omit<
|
|
363
|
+
} & Omit<ComponentPropsWithRef<'pre'>, keyof CodeBaseProps>) | (CodeBaseProps & {
|
|
365
364
|
inline: true;
|
|
366
|
-
} & Omit<
|
|
365
|
+
} & Omit<ComponentPropsWithRef<'span'>, keyof CodeBaseProps>);
|
|
367
366
|
/** @public */
|
|
368
367
|
export declare function Code({ size, ...props }: CodeProps): import("react").JSX.Element;
|
|
369
368
|
declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
370
369
|
/** @public */
|
|
371
370
|
type ContainerSize = (typeof CONTAINER_SIZE)[number];
|
|
372
371
|
/** @public */
|
|
373
|
-
|
|
372
|
+
type ContainerProps<T extends ElementType = 'div'> = Polymorphic<T, LayoutProps & {
|
|
374
373
|
/**
|
|
375
374
|
* HTML element or component to render.
|
|
376
375
|
*/
|
|
@@ -379,11 +378,11 @@ interface ContainerProps<T extends React.ElementType = 'div'> extends LayoutProp
|
|
|
379
378
|
* Maximum width of the container.
|
|
380
379
|
*/
|
|
381
380
|
size?: Responsive<ContainerSize>;
|
|
382
|
-
}
|
|
381
|
+
}>;
|
|
383
382
|
/** @public */
|
|
384
|
-
export declare function Container<T extends ElementType = 'div'>({ marginX, size, ...props }: ContainerProps<T>
|
|
383
|
+
export declare function Container<T extends ElementType = 'div'>({ marginX, size, ...props }: ContainerProps<T>): import("react").JSX.Element;
|
|
385
384
|
/** @beta */
|
|
386
|
-
interface DialogProps extends Omit<
|
|
385
|
+
interface DialogProps extends Omit<ComponentProps<'dialog'>, 'open'> {
|
|
387
386
|
/**
|
|
388
387
|
* Text for the dialog heading.
|
|
389
388
|
* @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
|
|
@@ -393,7 +392,7 @@ interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
|
|
|
393
392
|
* A function to call alongside the native `close` event.
|
|
394
393
|
* @remarks Use it to set `open` back to `false`. It runs for every close cause: the Escape key, a backdrop click, the close button, or a programmatic close.
|
|
395
394
|
*/
|
|
396
|
-
onClose:
|
|
395
|
+
onClose: ReactEventHandler<HTMLDialogElement>;
|
|
397
396
|
/**
|
|
398
397
|
* Toggles the dialog's open state.
|
|
399
398
|
* @remarks `true` calls `showModal()` on the element. `false` calls `close()`.
|
|
@@ -404,14 +403,18 @@ interface DialogProps extends Omit<React.ComponentProps<'dialog'>, 'open'> {
|
|
|
404
403
|
/** CSS length value used to set the Dialog’s distance from the top of the viewport; Dialog is centered if not provided */
|
|
405
404
|
topAnchor?: string;
|
|
406
405
|
}
|
|
406
|
+
/** @beta */
|
|
407
|
+
interface DialogContentProps extends ComponentProps<'div'> {}
|
|
408
|
+
/** @beta */
|
|
409
|
+
interface DialogFooterProps extends ComponentProps<'div'> {}
|
|
407
410
|
declare function DialogRoot({ open, size, ...props }: DialogProps): import("react").JSX.Element;
|
|
408
411
|
declare namespace DialogRoot {
|
|
409
412
|
var displayName: string;
|
|
410
413
|
var Content: typeof DialogContent;
|
|
411
414
|
var Footer: typeof DialogFooter;
|
|
412
415
|
}
|
|
413
|
-
declare function DialogContent(props:
|
|
414
|
-
declare function DialogFooter(props:
|
|
416
|
+
declare function DialogContent(props: DialogContentProps): import("react").JSX.Element;
|
|
417
|
+
declare function DialogFooter(props: DialogFooterProps): import("react").JSX.Element;
|
|
415
418
|
/**
|
|
416
419
|
* @beta
|
|
417
420
|
*
|
|
@@ -426,14 +429,14 @@ declare function DialogFooter(props: ComponentProps<'div'>): import("react").JSX
|
|
|
426
429
|
*/
|
|
427
430
|
export declare const Dialog: typeof DialogRoot;
|
|
428
431
|
/** @public */
|
|
429
|
-
interface DividerProps extends
|
|
432
|
+
interface DividerProps extends ComponentProps<'hr'>, MarginProps {}
|
|
430
433
|
/** @public */
|
|
431
434
|
export declare function Divider(props: DividerProps): import("react").JSX.Element;
|
|
432
435
|
declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
433
436
|
/** @public */
|
|
434
437
|
type EyebrowSize = (typeof EYEBROW_SIZE)[number];
|
|
435
438
|
/** @public */
|
|
436
|
-
|
|
439
|
+
type EyebrowProps<T extends ElementType = 'span'> = Polymorphic<T, MarginProps & ToneProps & Omit<TypographyProps, 'weight'> & {
|
|
437
440
|
/**
|
|
438
441
|
* HTML element to render.
|
|
439
442
|
*/
|
|
@@ -442,9 +445,9 @@ interface EyebrowProps<T extends React.ElementType = 'span'> extends TypographyP
|
|
|
442
445
|
* Sets font size. Uses the same scale as Label.
|
|
443
446
|
*/
|
|
444
447
|
size?: Responsive<EyebrowSize>;
|
|
445
|
-
}
|
|
448
|
+
}>;
|
|
446
449
|
/** @public */
|
|
447
|
-
export declare function Eyebrow<T extends ElementType = 'span'>({ size,
|
|
450
|
+
export declare function Eyebrow<T extends ElementType = 'span'>({ size, ...props }: EyebrowProps<T>): import("react").JSX.Element;
|
|
448
451
|
declare const ALIGN_ITEMS: readonly ["baseline", "center", "flex-end", "flex-start", "stretch"];
|
|
449
452
|
/** @public */
|
|
450
453
|
type AlignItems = (typeof ALIGN_ITEMS)[number];
|
|
@@ -478,7 +481,7 @@ type GapProps = {
|
|
|
478
481
|
columnGap?: Responsive<SpaceInherit>;
|
|
479
482
|
};
|
|
480
483
|
/** @public */
|
|
481
|
-
|
|
484
|
+
type FlexProps<T extends ElementType = 'div'> = Polymorphic<T, FlexParentProps & GapProps & LayoutProps & {
|
|
482
485
|
/**
|
|
483
486
|
* HTML element or component to render.
|
|
484
487
|
*/
|
|
@@ -487,9 +490,9 @@ interface FlexProps<T extends React.ElementType = 'div'> extends FlexParentProps
|
|
|
487
490
|
* CSS `display` property.
|
|
488
491
|
*/
|
|
489
492
|
display?: Responsive<DisplayFlex>;
|
|
490
|
-
}
|
|
493
|
+
}>;
|
|
491
494
|
/** @public */
|
|
492
|
-
export declare function Flex<T extends ElementType = 'div'>({ display, ...props }: FlexProps<T>
|
|
495
|
+
export declare function Flex<T extends ElementType = 'div'>({ display, ...props }: FlexProps<T>): import("react").JSX.Element;
|
|
493
496
|
declare const GRID_AUTO_FLOW: readonly ["row", "column", "row dense", "column dense", "dense"];
|
|
494
497
|
/** @public */
|
|
495
498
|
type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
|
|
@@ -507,7 +510,7 @@ type GridParentProps = {
|
|
|
507
510
|
gridTemplateRows?: Responsive<string>;
|
|
508
511
|
};
|
|
509
512
|
/** @public */
|
|
510
|
-
|
|
513
|
+
type GridProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexParentProps, 'alignItems' | 'justifyContent'> & GridParentProps & GapProps & LayoutProps & {
|
|
511
514
|
/**
|
|
512
515
|
* HTML element or component to render.
|
|
513
516
|
*/
|
|
@@ -516,34 +519,34 @@ interface GridProps<T extends React.ElementType = 'div'> extends Pick<FlexParent
|
|
|
516
519
|
* CSS `display` property.
|
|
517
520
|
*/
|
|
518
521
|
display?: Responsive<DisplayGrid>;
|
|
519
|
-
}
|
|
522
|
+
}>;
|
|
520
523
|
/** @public */
|
|
521
|
-
export declare function Grid<T extends ElementType = 'div'>({ display, ...props }: GridProps<T>
|
|
524
|
+
export declare function Grid<T extends ElementType = 'div'>({ display, ...props }: GridProps<T>): import("react").JSX.Element;
|
|
522
525
|
/** @public */
|
|
523
|
-
|
|
526
|
+
type HStackProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexProps<T>, 'as' | 'gap'>>;
|
|
524
527
|
/** @public */
|
|
525
|
-
export declare function HStack<T extends ElementType = 'div'>({ className, ...props }: HStackProps<T>
|
|
528
|
+
export declare function HStack<T extends ElementType = 'div'>({ className, ...props }: HStackProps<T>): import("react").JSX.Element;
|
|
526
529
|
declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
527
530
|
type HeadingTag = (typeof HEADING_TAG)[number];
|
|
528
531
|
declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5];
|
|
529
532
|
/** @public */
|
|
530
533
|
type HeadingSize = (typeof HEADING_SIZE)[number];
|
|
531
534
|
/** @public */
|
|
532
|
-
|
|
535
|
+
type HeadingProps<T extends HeadingTag = HeadingTag> = Polymorphic<T, MarginProps & ToneProps & Omit<TypographyProps, 'muted' | 'weight'> & {
|
|
533
536
|
/**
|
|
534
537
|
* Semantic heading element to render.
|
|
535
538
|
*/
|
|
536
|
-
as:
|
|
539
|
+
as: T;
|
|
537
540
|
/**
|
|
538
541
|
* Sets font size.
|
|
539
542
|
* @remarks Independent of `as`.
|
|
540
543
|
*/
|
|
541
544
|
size?: Responsive<HeadingSize>;
|
|
542
|
-
}
|
|
545
|
+
}>;
|
|
543
546
|
/** @public */
|
|
544
|
-
export declare function Heading<T extends
|
|
547
|
+
export declare function Heading<T extends HeadingTag = 'h2'>({ size, ...props }: HeadingProps<T>): import("react").JSX.Element;
|
|
545
548
|
/** @public */
|
|
546
|
-
interface HotkeysProps extends
|
|
549
|
+
interface HotkeysProps extends ComponentProps<'kbd'> {
|
|
547
550
|
/**
|
|
548
551
|
* The keys in the shortcut, in order. Each one renders as a KBD.
|
|
549
552
|
*/
|
|
@@ -559,7 +562,7 @@ interface IconProps extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'
|
|
|
559
562
|
/**
|
|
560
563
|
* The icon component to render.
|
|
561
564
|
*/
|
|
562
|
-
icon:
|
|
565
|
+
icon: ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
|
|
563
566
|
/**
|
|
564
567
|
* Sets icon size.
|
|
565
568
|
*/
|
|
@@ -568,7 +571,7 @@ interface IconProps extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'
|
|
|
568
571
|
/** @public */
|
|
569
572
|
export declare function Icon({ icon, size, ...props }: IconProps): import("react").ReactElement<SVGProps<SVGSVGElement>, string | import("react").JSXElementConstructor<any>>;
|
|
570
573
|
/** @public */
|
|
571
|
-
|
|
574
|
+
type IconButtonProps<T extends ElementType = 'button'> = Polymorphic<T, Pick<ButtonProps<T>, 'as' | 'density' | 'level' | 'loading' | 'tone'> & {
|
|
572
575
|
/**
|
|
573
576
|
* Accessible name for the button.
|
|
574
577
|
* @remarks Because IconButtons have no visible text, this is required.
|
|
@@ -577,12 +580,12 @@ interface IconButtonProps<T extends React$1.ElementType = 'button'> extends Pick
|
|
|
577
580
|
/**
|
|
578
581
|
* Icon to render.
|
|
579
582
|
*/
|
|
580
|
-
'icon':
|
|
581
|
-
}
|
|
583
|
+
'icon': ComponentType<SVGProps<SVGSVGElement>>;
|
|
584
|
+
}>;
|
|
582
585
|
/** @public */
|
|
583
|
-
export declare function IconButton<T extends ElementType = 'button'>(props: IconButtonProps<T>
|
|
586
|
+
export declare function IconButton<T extends ElementType = 'button'>(props: IconButtonProps<T>): import("react").JSX.Element;
|
|
584
587
|
/** @beta */
|
|
585
|
-
|
|
588
|
+
type IndicatorProps<T extends ElementType = 'span'> = Polymorphic<T, ToneProps & {
|
|
586
589
|
/**
|
|
587
590
|
* HTML element to render.
|
|
588
591
|
*/
|
|
@@ -591,21 +594,21 @@ interface IndicatorProps<T extends React.ElementType = 'span'> extends ToneProps
|
|
|
591
594
|
* Accessible label.
|
|
592
595
|
*/
|
|
593
596
|
label?: string;
|
|
594
|
-
}
|
|
597
|
+
}>;
|
|
595
598
|
/** @beta */
|
|
596
|
-
export declare function Indicator<T extends ElementType = 'span'>({ tone, ...props }: IndicatorProps<T>
|
|
599
|
+
export declare function Indicator<T extends ElementType = 'span'>({ tone, ...props }: IndicatorProps<T>): import("react").JSX.Element;
|
|
597
600
|
/** @public */
|
|
598
|
-
|
|
601
|
+
type IndicatorStackProps<T extends ElementType = 'div'> = Polymorphic<T, {
|
|
599
602
|
/**
|
|
600
603
|
* HTML element to render.
|
|
601
604
|
*/
|
|
602
605
|
as?: T;
|
|
603
|
-
}
|
|
606
|
+
}>;
|
|
604
607
|
/** @public */
|
|
605
|
-
export declare function IndicatorStack<T extends ElementType = 'div'>(props: IndicatorStackProps<T>
|
|
608
|
+
export declare function IndicatorStack<T extends ElementType = 'div'>(props: IndicatorStackProps<T>): import("react").JSX.Element;
|
|
606
609
|
/** @deprecated Use HStack component instead */
|
|
607
610
|
/** @public */
|
|
608
|
-
|
|
611
|
+
type InlineProps<T extends ElementType = 'div'> = Polymorphic<T, PaddingProps & {
|
|
609
612
|
/**
|
|
610
613
|
* HTML element or component to render.
|
|
611
614
|
*/
|
|
@@ -614,12 +617,12 @@ interface InlineProps<T extends React.ElementType = 'div'> extends PaddingProps
|
|
|
614
617
|
* Space between children.
|
|
615
618
|
*/
|
|
616
619
|
gap?: Responsive<SpaceInherit>;
|
|
617
|
-
}
|
|
620
|
+
}>;
|
|
618
621
|
/** @deprecated Use HStack component instead */
|
|
619
622
|
/** @public */
|
|
620
|
-
export declare function Inline<T extends ElementType = 'div'>(props: InlineProps<T>
|
|
623
|
+
export declare function Inline<T extends ElementType = 'div'>(props: InlineProps<T>): import("react").JSX.Element;
|
|
621
624
|
/** @public */
|
|
622
|
-
interface KBDProps extends
|
|
625
|
+
interface KBDProps extends ComponentProps<'kbd'> {
|
|
623
626
|
/**
|
|
624
627
|
* Sets KBD's key label.
|
|
625
628
|
*/
|
|
@@ -633,7 +636,7 @@ interface KBDProps extends React.ComponentProps<'kbd'> {
|
|
|
633
636
|
/** @alpha */
|
|
634
637
|
export declare function KBD(props: KBDProps): import("react").JSX.Element;
|
|
635
638
|
/** @beta */
|
|
636
|
-
interface LinkProps extends
|
|
639
|
+
interface LinkProps extends ComponentProps<'a'> {
|
|
637
640
|
/**
|
|
638
641
|
* Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
|
|
639
642
|
*/
|
|
@@ -648,29 +651,16 @@ export declare function Link({ underlined, ...props }: LinkProps): import("react
|
|
|
648
651
|
declare const LIST_TAG: readonly ["ol", "ul"];
|
|
649
652
|
type ListTag = (typeof LIST_TAG)[number];
|
|
650
653
|
/** @beta */
|
|
651
|
-
|
|
654
|
+
type ListProps<T extends ListTag = 'ul'> = Polymorphic<T, Pick<GapProps, 'gap'> & {
|
|
652
655
|
/**
|
|
653
656
|
* HTML element to render.
|
|
654
657
|
*/
|
|
655
658
|
as?: T;
|
|
656
|
-
}
|
|
659
|
+
}>;
|
|
657
660
|
/** @beta */
|
|
658
|
-
interface ListItemProps extends
|
|
659
|
-
/**
|
|
660
|
-
* Sets horizontal padding, gap, and minimum row height together.
|
|
661
|
-
*/
|
|
662
|
-
density?: Responsive<Density>;
|
|
663
|
-
/**
|
|
664
|
-
* Slot at the left edge of the row.
|
|
665
|
-
*/
|
|
666
|
-
start?: React$1.ReactNode;
|
|
667
|
-
/**
|
|
668
|
-
* Slot at the right edge of the row.
|
|
669
|
-
*/
|
|
670
|
-
end?: React$1.ReactNode;
|
|
671
|
-
}
|
|
661
|
+
interface ListItemProps extends ComponentProps<'li'> {}
|
|
672
662
|
/** @beta */
|
|
673
|
-
|
|
663
|
+
type ListItemButtonProps<T extends ElementType = 'button'> = Polymorphic<T, {
|
|
674
664
|
/**
|
|
675
665
|
* Element or component to render for the press target.
|
|
676
666
|
*/
|
|
@@ -678,37 +668,43 @@ interface ListButtonItemProps<T extends React$1.ElementType = 'button'> extends
|
|
|
678
668
|
/**
|
|
679
669
|
* Marks the row as the current selection.
|
|
680
670
|
*/
|
|
681
|
-
|
|
682
|
-
}
|
|
683
|
-
/** @beta */
|
|
684
|
-
interface ListItemTextProps<T extends React$1.ElementType = 'div'> {
|
|
671
|
+
current?: boolean;
|
|
685
672
|
/**
|
|
686
|
-
*
|
|
673
|
+
* Sets horizontal padding, gap, and minimum row height together.
|
|
687
674
|
*/
|
|
688
|
-
|
|
675
|
+
density?: Responsive<Density>;
|
|
676
|
+
/**
|
|
677
|
+
* Slot at the left edge of the row.
|
|
678
|
+
*/
|
|
679
|
+
start?: ReactNode;
|
|
680
|
+
/**
|
|
681
|
+
* Slot at the right edge of the row.
|
|
682
|
+
*/
|
|
683
|
+
end?: ReactNode;
|
|
689
684
|
/**
|
|
690
685
|
* Main label.
|
|
691
686
|
*/
|
|
692
|
-
|
|
687
|
+
text?: ReactNode;
|
|
693
688
|
/**
|
|
694
689
|
* Text below the title.
|
|
695
690
|
*/
|
|
696
|
-
|
|
697
|
-
}
|
|
698
|
-
|
|
691
|
+
subtext?: ReactNode;
|
|
692
|
+
}>;
|
|
693
|
+
/** @beta */
|
|
694
|
+
interface ListImageProps extends ComponentProps<'img'> {}
|
|
695
|
+
declare function ListRoot<T extends ListTag = 'ul'>(props: ListProps<T>): import("react").JSX.Element;
|
|
699
696
|
declare namespace ListRoot {
|
|
700
697
|
var displayName: string;
|
|
701
|
-
var Item: typeof ListItem;
|
|
702
|
-
var ButtonItem: typeof ListButtonItem;
|
|
703
|
-
var ItemText: typeof ListItemText;
|
|
704
|
-
var ItemImage: typeof ListItemImage;
|
|
705
698
|
}
|
|
706
|
-
declare function ListItem({
|
|
707
|
-
declare function
|
|
708
|
-
declare function
|
|
709
|
-
declare function ListItemImage(props: ComponentProps<'img'>): import("react").JSX.Element;
|
|
699
|
+
declare function ListItem({ className, ...rest }: ListItemProps): import("react").JSX.Element;
|
|
700
|
+
declare function ListItemButton<T extends ElementType = 'button'>({ density, ...props }: ListItemButtonProps<T>): import("react").JSX.Element;
|
|
701
|
+
declare function ListItemImage({ className, ...rest }: ListImageProps): import("react").JSX.Element;
|
|
710
702
|
/** @beta */
|
|
711
|
-
export declare const List: typeof ListRoot
|
|
703
|
+
export declare const List: typeof ListRoot & {
|
|
704
|
+
Item: typeof ListItem;
|
|
705
|
+
ItemButton: typeof ListItemButton;
|
|
706
|
+
ItemImage: typeof ListItemImage;
|
|
707
|
+
};
|
|
712
708
|
declare const PLACEMENT: readonly ["top", "top-start", "top-end", "right", "right-start", "right-end", "bottom", "bottom-start", "bottom-end", "left", "left-start", "left-end"];
|
|
713
709
|
/** @public */
|
|
714
710
|
type Placement = (typeof PLACEMENT)[number];
|
|
@@ -718,27 +714,31 @@ type PlacementProps = {
|
|
|
718
714
|
placement?: Placement;
|
|
719
715
|
};
|
|
720
716
|
/** @beta */
|
|
721
|
-
interface PopoverProps extends Omit<
|
|
717
|
+
interface PopoverProps extends Omit<ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
|
|
722
718
|
/**
|
|
723
719
|
* Shared anchor identifier.
|
|
724
720
|
* @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
|
|
725
721
|
*/
|
|
726
|
-
anchorName?:
|
|
722
|
+
anchorName?: ReactNode;
|
|
727
723
|
/**
|
|
728
724
|
* The trigger element.
|
|
729
725
|
* @remarks Popover clones it and attaches the `popovertarget` attribute that opens the floating layer.
|
|
730
726
|
*/
|
|
731
|
-
children:
|
|
727
|
+
children: ReactElement<Record<string, unknown>>;
|
|
732
728
|
/**
|
|
733
729
|
* The floating content.
|
|
734
730
|
*/
|
|
735
|
-
content?:
|
|
731
|
+
content?: ReactNode;
|
|
732
|
+
/**
|
|
733
|
+
* Removes popover padding.
|
|
734
|
+
*/
|
|
735
|
+
fullBleed?: boolean;
|
|
736
736
|
/**
|
|
737
737
|
* Renders the content into `document.body` through a React portal instead of inline.
|
|
738
738
|
*/
|
|
739
739
|
portal?: boolean;
|
|
740
740
|
}
|
|
741
|
-
declare function PopoverRoot({ placement, ...props }: PopoverProps & {
|
|
741
|
+
declare function PopoverRoot({ placement, fullBleed, ...props }: PopoverProps & {
|
|
742
742
|
triggerProps?: Record<string, unknown>;
|
|
743
743
|
}): import("react").JSX.Element;
|
|
744
744
|
/** @beta */
|
|
@@ -746,16 +746,16 @@ export declare const Popover: typeof PopoverRoot & {
|
|
|
746
746
|
forwardsTriggerProps: boolean;
|
|
747
747
|
};
|
|
748
748
|
/** @public */
|
|
749
|
-
|
|
749
|
+
type PressAreaProps<T extends ElementType = 'button'> = Polymorphic<T, {
|
|
750
750
|
/**
|
|
751
751
|
* Element or component to render.
|
|
752
752
|
*/
|
|
753
753
|
as?: InteractiveAs<T>;
|
|
754
|
-
}
|
|
754
|
+
}>;
|
|
755
755
|
/** @public */
|
|
756
|
-
export declare function PressArea<T extends ElementType = 'button'>(props: PressAreaProps<T>
|
|
756
|
+
export declare function PressArea<T extends ElementType = 'button'>(props: PressAreaProps<T>): import("react").JSX.Element;
|
|
757
757
|
/** @beta */
|
|
758
|
-
interface RadioProps extends
|
|
758
|
+
interface RadioProps extends ComponentProps<'input'> {}
|
|
759
759
|
/** @beta */
|
|
760
760
|
export declare function Radio(props: RadioProps): import("react").JSX.Element;
|
|
761
761
|
declare const FORM_ELEMENT_DENSITY: readonly ["regular", "loose"];
|
|
@@ -768,7 +768,7 @@ type FormElementDensityProps = {
|
|
|
768
768
|
density?: FormElementDensity;
|
|
769
769
|
};
|
|
770
770
|
/** @public */
|
|
771
|
-
interface SelectProps extends
|
|
771
|
+
interface SelectProps extends ComponentProps<'select'>, FormElementDensityProps {
|
|
772
772
|
/**
|
|
773
773
|
* Used to trigger styling for invalid states.
|
|
774
774
|
* @remarks Use when form validation fails. Pair with a visible error message.
|
|
@@ -778,7 +778,7 @@ interface SelectProps extends React.ComponentProps<'select'>, FormElementDensity
|
|
|
778
778
|
/** @public */
|
|
779
779
|
export declare function Select({ density, hasError, ...props }: SelectProps): import("react").JSX.Element;
|
|
780
780
|
/** @beta */
|
|
781
|
-
interface SkipToContentProps extends
|
|
781
|
+
interface SkipToContentProps extends ComponentProps<'a'> {
|
|
782
782
|
/**
|
|
783
783
|
* Same-page fragment to jump to.
|
|
784
784
|
* @remarks Note: The hash character # is required for proper linking.
|
|
@@ -797,7 +797,7 @@ interface SkipToContentProps extends React.ComponentProps<'a'> {
|
|
|
797
797
|
/** @beta */
|
|
798
798
|
export declare function SkipToContent(props: SkipToContentProps): import("react").JSX.Element;
|
|
799
799
|
/** @public */
|
|
800
|
-
interface SpinnerProps extends
|
|
800
|
+
interface SpinnerProps extends ComponentProps<'svg'> {
|
|
801
801
|
/**
|
|
802
802
|
* Size of the spinner icon.
|
|
803
803
|
*/
|
|
@@ -806,7 +806,7 @@ interface SpinnerProps extends React.ComponentProps<'svg'> {
|
|
|
806
806
|
/** @public */
|
|
807
807
|
export declare function Spinner({ size, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
808
808
|
/** @beta */
|
|
809
|
-
interface SwitchProps extends
|
|
809
|
+
interface SwitchProps extends ComponentProps<'input'> {
|
|
810
810
|
/**
|
|
811
811
|
* Applies error styling to the switch track for invalid states.
|
|
812
812
|
* @remarks Use when form validation fails. Pair with a visible error message.
|
|
@@ -816,7 +816,7 @@ interface SwitchProps extends React.ComponentProps<'input'> {
|
|
|
816
816
|
/** @beta */
|
|
817
817
|
export declare function Switch(props: SwitchProps): import("react").JSX.Element;
|
|
818
818
|
/** @public */
|
|
819
|
-
interface TabsProps extends
|
|
819
|
+
interface TabsProps extends ComponentProps<'div'> {
|
|
820
820
|
/** The `value` of the active Tabs.Tab */
|
|
821
821
|
value: string;
|
|
822
822
|
/** An updater function to set `value` - will be invoked with the `value` of the selected Tabs.Tab */
|
|
@@ -830,18 +830,18 @@ type TabsListLabelProps = {
|
|
|
830
830
|
'aria-labelledby'?: never;
|
|
831
831
|
};
|
|
832
832
|
/** @public */
|
|
833
|
-
type TabsListProps = Omit<
|
|
833
|
+
type TabsListProps = Omit<ComponentProps<'div'>, 'id' | 'role'> & TabsListLabelProps;
|
|
834
834
|
/** @public */
|
|
835
|
-
interface TabProps extends Omit<
|
|
835
|
+
interface TabProps extends Omit<ComponentProps<'button'>, 'aria-disabled' | 'disabled' | 'id' | 'role'>, ToneProps {
|
|
836
836
|
/** Optional icon for the tab */
|
|
837
|
-
icon?:
|
|
837
|
+
icon?: ElementType | ReactNode;
|
|
838
838
|
/** Text label to display in the tab */
|
|
839
839
|
label: string;
|
|
840
840
|
/** Unique string used to identify this tab and its matching Tabs.Panel */
|
|
841
841
|
value: string;
|
|
842
842
|
}
|
|
843
843
|
/** @public */
|
|
844
|
-
interface TabsPanelProps extends Omit<
|
|
844
|
+
interface TabsPanelProps extends Omit<ComponentProps<'div'>, 'id' | 'role'>, LayoutProps {
|
|
845
845
|
/** Unique string used to identify this panel and its matching Tabs.Tab */
|
|
846
846
|
value: string;
|
|
847
847
|
}
|
|
@@ -860,7 +860,7 @@ declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
|
|
|
860
860
|
/** @public */
|
|
861
861
|
type TextSize = (typeof TEXT_SIZE)[number];
|
|
862
862
|
/** @public */
|
|
863
|
-
|
|
863
|
+
type TextProps<T extends ElementType = 'span'> = Polymorphic<T, MarginProps & ToneProps & TypographyProps & {
|
|
864
864
|
/**
|
|
865
865
|
* HTML element to render.
|
|
866
866
|
*/
|
|
@@ -869,11 +869,11 @@ interface TextProps<T extends React.ElementType = 'span'> extends TypographyProp
|
|
|
869
869
|
* Sets font size.
|
|
870
870
|
*/
|
|
871
871
|
size?: Responsive<TextSize>;
|
|
872
|
-
}
|
|
872
|
+
}>;
|
|
873
873
|
/** @public */
|
|
874
|
-
export declare function Text<T extends ElementType = 'span'>({ size, ...props }: TextProps<T>
|
|
874
|
+
export declare function Text<T extends ElementType = 'span'>({ size, ...props }: TextProps<T>): import("react").JSX.Element;
|
|
875
875
|
/** @public */
|
|
876
|
-
interface TextAreaProps extends
|
|
876
|
+
interface TextAreaProps extends ComponentProps<'textarea'>, FormElementDensityProps, Pick<HeightProps, 'maxHeight'> {
|
|
877
877
|
/**
|
|
878
878
|
* Sizes the textarea to its content via the CSS `field-sizing` property.
|
|
879
879
|
*/
|
|
@@ -893,9 +893,9 @@ declare const TEXT_INPUT_EXCLUDED_TYPES: readonly ["button", "checkbox", "color"
|
|
|
893
893
|
/** @public */
|
|
894
894
|
type TextInputExcludedTypes = (typeof TEXT_INPUT_EXCLUDED_TYPES)[number];
|
|
895
895
|
/** @public */
|
|
896
|
-
type TextInputType = Exclude<
|
|
896
|
+
type TextInputType = Exclude<HTMLInputTypeAttribute, TextInputExcludedTypes>;
|
|
897
897
|
/** @public */
|
|
898
|
-
interface TextInputProps extends Omit<
|
|
898
|
+
interface TextInputProps extends Omit<ComponentProps<'input'>, 'type'>, FormElementDensityProps {
|
|
899
899
|
/**
|
|
900
900
|
* Used to trigger styling for invalid states.
|
|
901
901
|
* @remarks Use when form validation fails. Pair with a visible error message.
|
|
@@ -909,19 +909,19 @@ interface TextInputProps extends Omit<React.ComponentProps<'input'>, 'type'>, Fo
|
|
|
909
909
|
/** @public */
|
|
910
910
|
export declare function TextInput({ density, hasError, type, ...props }: TextInputProps): import("react").JSX.Element;
|
|
911
911
|
/** @beta */
|
|
912
|
-
interface TooltipProps extends Omit<
|
|
912
|
+
interface TooltipProps extends Omit<ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
|
|
913
913
|
/**
|
|
914
914
|
* Shared anchor identifier.
|
|
915
915
|
*/
|
|
916
|
-
anchorName?:
|
|
916
|
+
anchorName?: ReactNode;
|
|
917
917
|
/**
|
|
918
918
|
* The trigger element.
|
|
919
919
|
*/
|
|
920
|
-
children:
|
|
920
|
+
children: ReactElement<Record<string, unknown>>;
|
|
921
921
|
/**
|
|
922
922
|
* The tooltip label.
|
|
923
923
|
*/
|
|
924
|
-
content?:
|
|
924
|
+
content?: ReactNode;
|
|
925
925
|
/**
|
|
926
926
|
* Renders the label into `document.body` through a React portal instead of inline.
|
|
927
927
|
*/
|
|
@@ -933,20 +933,20 @@ declare function TooltipRoot({ placement, ...props }: TooltipProps & {
|
|
|
933
933
|
/** @beta */
|
|
934
934
|
export declare const Tooltip: typeof TooltipRoot;
|
|
935
935
|
/** @public */
|
|
936
|
-
|
|
936
|
+
type TooltipGroupProps<T extends ElementType = 'div'> = Polymorphic<T, {
|
|
937
937
|
/**
|
|
938
938
|
* HTML element to render.
|
|
939
939
|
*/
|
|
940
940
|
as?: T;
|
|
941
|
-
}
|
|
941
|
+
}>;
|
|
942
942
|
/** @public */
|
|
943
|
-
export declare function TooltipGroup<T extends ElementType = 'div'>(props: TooltipGroupProps<T>
|
|
943
|
+
export declare function TooltipGroup<T extends ElementType = 'div'>(props: TooltipGroupProps<T>): import("react").JSX.Element;
|
|
944
944
|
/** @public */
|
|
945
|
-
|
|
945
|
+
type VStackProps<T extends ElementType = 'div'> = Polymorphic<T, Pick<FlexProps<T>, 'as' | 'gap'>>;
|
|
946
946
|
/** @public */
|
|
947
|
-
export declare function VStack<T extends ElementType = 'div'>({ className, ...props }: VStackProps<T>
|
|
947
|
+
export declare function VStack<T extends ElementType = 'div'>({ className, ...props }: VStackProps<T>): import("react").JSX.Element;
|
|
948
948
|
/** @public */
|
|
949
|
-
|
|
949
|
+
type VisuallyHiddenProps<T extends ElementType = 'span'> = Polymorphic<T, {
|
|
950
950
|
/**
|
|
951
951
|
* HTML element to render.
|
|
952
952
|
*/
|
|
@@ -955,10 +955,10 @@ interface VisuallyHiddenProps<T extends React.ElementType = 'span'> {
|
|
|
955
955
|
* If true, the element becomes visible on `:focus-visible`.
|
|
956
956
|
*/
|
|
957
957
|
visibleOnFocus?: boolean;
|
|
958
|
-
}
|
|
958
|
+
}>;
|
|
959
959
|
/** @public */
|
|
960
|
-
export declare function VisuallyHidden<T extends ElementType = 'span'>(props: VisuallyHiddenProps<T>
|
|
960
|
+
export declare function VisuallyHidden<T extends ElementType = 'span'>(props: VisuallyHiddenProps<T>): import("react").JSX.Element;
|
|
961
961
|
/** @public */
|
|
962
962
|
export declare function useIsClient(): boolean;
|
|
963
|
-
export type { AlignItems, AvatarCounterProps, AvatarProps, AvatarStackProps, BadgeProps, BoxProps, ButtonProps, CardProps, CheckboxProps, CodeProps, CodeSize, ContainerProps, ContainerSize, Density, DialogProps, DisplayBlock, DisplayFlex, DisplayGrid, DividerProps, EyebrowProps, EyebrowSize, FlexDirection, FlexParentProps, FlexProps, FlexWrap, FontWeight, GapProps, GridAutoFlow, GridParentProps, GridProps, HStackProps, HeadingProps, HeadingSize, HotkeysProps, IconButtonProps, IconProps, IconSize, IndicatorProps, IndicatorStackProps, InlineProps, JustifyContent, KBDProps, LayoutProps, LinkProps,
|
|
963
|
+
export type { AlignItems, AvatarCounterProps, AvatarProps, AvatarStackProps, BadgeProps, BoxProps, ButtonProps, CardProps, CheckboxProps, CodeProps, CodeSize, ContainerProps, ContainerSize, Density, DialogContentProps, DialogFooterProps, DialogProps, DisplayBlock, DisplayFlex, DisplayGrid, DividerProps, EyebrowProps, EyebrowSize, FlexDirection, FlexParentProps, FlexProps, FlexWrap, FontWeight, GapProps, GridAutoFlow, GridParentProps, GridProps, HStackProps, HeadingProps, HeadingSize, HotkeysProps, IconButtonProps, IconProps, IconSize, IndicatorProps, IndicatorStackProps, InlineProps, JustifyContent, KBDProps, LayoutProps, LinkProps, ListImageProps, ListItemButtonProps, ListItemProps, ListProps, MarginProps, Overflow, PaddingProps, Placement, PlacementProps, PopoverProps, Position, PressAreaProps, RadioProps, Radius, Responsive, SelectProps, Shadow, SkipToContentProps, Space, SpaceAuto, SpaceAutoNegative, SpaceInherit, SpinnerProps, SwitchProps, TabProps, TabsListProps, TabsPanelProps, TabsProps, TextAlign, TextAreaProps, TextInputProps, TextProps, TextSize, Tone, TooltipGroupProps, TooltipProps, TypographyProps, VStackProps, VisuallyHiddenProps };
|
|
964
964
|
//# sourceMappingURL=index.d.ts.map
|