@sanity/ui 5.0.0-alpha.7 → 5.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/install.js +2 -1
- package/dist/index.d.ts +273 -79
- package/dist/index.js +51 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/src/cli/install.ts +2 -1
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/box.props.ts +7 -2
- package/src/components/button/button.props.ts +27 -9
- package/src/components/card/card.props.ts +6 -2
- package/src/components/checkbox/Checkbox.tsx +2 -1
- package/src/components/checkbox/checkbox.props.ts +11 -3
- package/src/components/code/code.props.ts +10 -3
- package/src/components/container/container.props.ts +6 -2
- package/src/components/dialog/Dialog.tsx +1 -1
- package/src/components/dialog/dialog.props.ts +13 -4
- package/src/components/eyebrow/eyebrow.props.ts +6 -2
- package/src/components/flex/flex.props.ts +6 -2
- package/src/components/grid/grid.props.ts +6 -2
- package/src/components/h-stack/hStack.props.ts +3 -1
- package/src/components/heading/heading.props.ts +8 -2
- package/src/components/icon/icon.props.ts +6 -2
- package/src/components/icon-button/iconButton.props.ts +7 -2
- package/src/components/index.css +1 -0
- package/src/components/indicator/indicator.props.ts +6 -2
- package/src/components/indicator-stack/indicatorStack.props.ts +3 -1
- package/src/components/inline/inline.props.ts +6 -2
- package/src/components/label/label.props.ts +7 -1
- package/src/components/link/link.props.ts +4 -4
- package/src/components/list/list.props.ts +27 -9
- package/src/components/popover/popover.props.ts +14 -4
- package/src/components/press-area/pressArea.props.ts +3 -1
- package/src/components/radio/radio.props.ts +7 -2
- package/src/components/skip-to-content/skipToContent.props.ts +9 -3
- package/src/components/spinner/Spinner.tsx +1 -1
- package/src/components/spinner/spinner.props.ts +3 -0
- package/src/components/switch/switch.props.ts +7 -2
- package/src/components/text/text.props.ts +6 -2
- package/src/components/tooltip/tooltip.props.ts +12 -4
- package/src/components/tooltip-group/tooltipGroup.props.ts +3 -1
- package/src/components/v-stack/vStack.props.ts +3 -1
- package/src/components/visually-hidden/visuallyHidden.props.ts +6 -2
- package/src/index.ts +1 -0
- package/src/version.ts +2 -2
|
@@ -3,12 +3,18 @@ import {type PropDef} from '../../types/PropDef'
|
|
|
3
3
|
/** @beta */
|
|
4
4
|
export interface SkipToContentProps extends React.ComponentProps<'a'> {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Same-page fragment to jump to.
|
|
7
|
+
* @remarks Note: The hash character # is required for proper linking.
|
|
7
8
|
*/
|
|
8
9
|
href: string
|
|
9
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Visible and announced text.
|
|
12
|
+
*/
|
|
10
13
|
label: string
|
|
11
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Not accepted.
|
|
16
|
+
* @remarks Pass text via `label`.
|
|
17
|
+
*/
|
|
12
18
|
children?: never
|
|
13
19
|
}
|
|
14
20
|
|
|
@@ -3,9 +3,14 @@ import {type PropDef} from '../../types/PropDef'
|
|
|
3
3
|
|
|
4
4
|
/** @beta */
|
|
5
5
|
export interface SwitchProps extends React.ComponentProps<'input'>, MarginProps {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Applies error styling to the switch track.
|
|
8
|
+
* @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
|
|
9
|
+
*/
|
|
7
10
|
error?: boolean
|
|
8
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Visible label next to the switch.
|
|
13
|
+
*/
|
|
9
14
|
label: React.ReactNode
|
|
10
15
|
}
|
|
11
16
|
|
|
@@ -5,9 +5,13 @@ import {TEXT_SIZE, type TextSize} from '../../types/Text'
|
|
|
5
5
|
|
|
6
6
|
/** @public */
|
|
7
7
|
export interface TextProps<T extends React.ElementType = 'span'> extends TypographyProps {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* HTML element to render.
|
|
10
|
+
*/
|
|
9
11
|
as?: T
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Sets font size.
|
|
14
|
+
*/
|
|
11
15
|
size?: Responsive<TextSize>
|
|
12
16
|
}
|
|
13
17
|
|
|
@@ -4,13 +4,21 @@ import {type PropDef} from '../../types/PropDef'
|
|
|
4
4
|
/** @beta */
|
|
5
5
|
export interface TooltipProps
|
|
6
6
|
extends Omit<React.ComponentProps<'div'>, 'children' | 'content'>, PlacementProps {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Shared anchor identifier.
|
|
9
|
+
*/
|
|
8
10
|
anchorName?: React.ReactNode
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The trigger element.
|
|
13
|
+
*/
|
|
10
14
|
children: React.ReactElement<Record<string, unknown>>
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The tooltip label.
|
|
17
|
+
*/
|
|
12
18
|
content?: React.ReactNode
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Renders the label into `document.body` through a React portal instead of inline.
|
|
21
|
+
*/
|
|
14
22
|
portal?: boolean
|
|
15
23
|
}
|
|
16
24
|
|
|
@@ -2,9 +2,13 @@ import {type PropDef} from '../../types/PropDef'
|
|
|
2
2
|
|
|
3
3
|
/** @public */
|
|
4
4
|
export interface VisuallyHiddenProps<T extends React.ElementType = 'span'> {
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* HTML element to render.
|
|
7
|
+
*/
|
|
6
8
|
as?: T
|
|
7
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* If true, the element becomes visible on `:focus-visible`.
|
|
11
|
+
*/
|
|
8
12
|
visibleOnFocus?: boolean
|
|
9
13
|
}
|
|
10
14
|
|
package/src/index.ts
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// This file is generated by scripts/write-version.js. Do not edit.
|
|
2
|
-
export const VERSION = '
|
|
3
|
-
export const HASH = '
|
|
2
|
+
export const VERSION = '500alpha9'
|
|
3
|
+
export const HASH = 'fd663f'
|