@sanity/ui 4.0.0-static.24 → 4.0.0-static.26
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/css/index.css +1 -1
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.d.ts +22 -6
- package/dist/css/index.js +29 -20
- package/dist/css/index.js.map +1 -1
- package/dist/index.d.ts +8 -13
- package/dist/index.js +519 -531
- package/dist/index.js.map +1 -1
- package/exports/css/index.css +1 -0
- package/package.json +12 -12
- package/src/core/components/dialog/__workshop__/Panes.tsx +4 -0
- package/src/core/components/menu/Menu.tsx +0 -4
- package/src/core/components/menu/MenuItem.tsx +1 -1
- package/src/core/components/toast/useToast.ts +2 -2
- package/src/core/primitives/avatar/Avatar.tsx +2 -2
- package/src/core/primitives/avatar/__workshop__/PropsStory.tsx +22 -0
- package/src/core/primitives/avatar/__workshop__/index.ts +5 -0
- package/src/core/primitives/button/Button.tsx +5 -5
- package/src/core/primitives/code/Code.tsx +25 -1
- package/src/core/primitives/heading/Heading.tsx +16 -0
- package/src/core/primitives/label/Label.tsx +16 -0
- package/src/core/primitives/radio/Radio.tsx +2 -2
- package/src/core/primitives/select/Select.tsx +5 -3
- package/src/core/primitives/switch/Switch.tsx +2 -10
- package/src/core/primitives/text/Text.tsx +14 -0
- package/src/core/primitives/textArea/TextArea.tsx +7 -1
- package/src/core/primitives/textInput/TextInput.tsx +18 -17
- package/src/core/types.ts +6 -5
- package/src/core/utils/portal/PortalProvider.tsx +2 -2
- package/src/css/primitives/_input/_input.css.ts +2 -3
- package/src/css/primitives/_input/input.ts +2 -0
- package/src/css/primitives/_input/types.ts +2 -1
- package/src/css/primitives/avatar/avatar.css.ts +8 -0
- package/src/css/primitives/box/box.css.ts +21 -1
- package/src/css/primitives/button/button.css.ts +1 -0
- package/src/css/primitives/card/card.css.ts +0 -60
- package/src/css/primitives/checkbox/checkbox.css.ts +1 -0
- package/src/css/primitives/code/code.ts +4 -0
- package/src/css/primitives/code/types.ts +7 -1
- package/src/css/primitives/heading/heading.ts +4 -0
- package/src/css/primitives/heading/types.ts +7 -1
- package/src/css/primitives/label/label.ts +4 -0
- package/src/css/primitives/label/types.ts +7 -1
- package/src/css/primitives/radio/radio.css.ts +1 -1
- package/src/css/primitives/root/root.css.ts +0 -1
- package/src/css/primitives/select/select.css.ts +7 -1
- package/src/css/primitives/selectable/selectable.css.ts +5 -31
- package/src/css/primitives/switch/switch.css.ts +10 -1
- package/src/css/primitives/text/text.ts +2 -0
- package/src/css/primitives/text/types.ts +6 -1
- package/src/css/primitives/textInput/textInput.css.ts +15 -3
- package/src/css/props/width/types.ts +1 -1
- package/src/css/props/width/width.css.ts +5 -2
- package/src/core/primitives/popover/helpers.ts +0 -32
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,6 @@ import type {CardTone} from '@sanity/ui/theme'
|
|
|
10
10
|
import {CodeStyleProps} from '@sanity/ui/css'
|
|
11
11
|
import type {ColorScheme} from '@sanity/ui/theme'
|
|
12
12
|
import {Component} from 'react'
|
|
13
|
-
import type {ComponentClass} from 'react'
|
|
14
|
-
import type {ComponentProps} from 'react'
|
|
15
13
|
import type {ComponentType as ComponentType_2} from 'react'
|
|
16
14
|
import {ContainerStyleProps} from '@sanity/ui/css'
|
|
17
15
|
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
@@ -20,7 +18,6 @@ import type {DisplayStyleProps} from '@sanity/ui/css'
|
|
|
20
18
|
import type {ElementTone} from '@sanity/ui/theme'
|
|
21
19
|
import {ElementType as ElementType_2} from 'react'
|
|
22
20
|
import {ErrorInfo} from 'react'
|
|
23
|
-
import type {ExoticComponent} from 'react'
|
|
24
21
|
import type {FlexDirection} from '@sanity/ui/css'
|
|
25
22
|
import {FlexStyleProps} from '@sanity/ui/css'
|
|
26
23
|
import type {FlexWrap} from '@sanity/ui/css'
|
|
@@ -30,12 +27,10 @@ import type {FontLabelSize} from '@sanity/ui/theme'
|
|
|
30
27
|
import type {FontTextSize} from '@sanity/ui/theme'
|
|
31
28
|
import type {FontWeight} from '@sanity/ui/theme'
|
|
32
29
|
import {ForwardedRef} from 'react'
|
|
33
|
-
import type {FunctionComponent} from 'react'
|
|
34
30
|
import {GapStyleProps} from '@sanity/ui/css'
|
|
35
31
|
import {HeadingStyleProps} from '@sanity/ui/css'
|
|
36
32
|
import {HTMLAttributes} from 'react'
|
|
37
33
|
import {InputStyleProps} from '@sanity/ui/css'
|
|
38
|
-
import type {JSX} from 'react'
|
|
39
34
|
import type {JustifyContent} from '@sanity/ui/css'
|
|
40
35
|
import {LabelStyleProps} from '@sanity/ui/css'
|
|
41
36
|
import {MaxWidth} from '@sanity/ui/css'
|
|
@@ -471,8 +466,8 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
471
466
|
'data-ui'?: string
|
|
472
467
|
'disabled'?: boolean
|
|
473
468
|
'fontSize'?: ResponsiveProp<FontTextSize>
|
|
474
|
-
'icon'?:
|
|
475
|
-
'iconRight'?:
|
|
469
|
+
'icon'?: React.ElementType | React.ReactNode
|
|
470
|
+
'iconRight'?: React.ElementType | React.ReactNode
|
|
476
471
|
'justify'?: BoxStyleProps['justifyContent']
|
|
477
472
|
/** @beta Do not use in production, as this might change.*/
|
|
478
473
|
'loading'?: boolean
|
|
@@ -480,7 +475,7 @@ export declare type ButtonOwnProps = ButtonStyleProps &
|
|
|
480
475
|
'textAlign'?: ButtonTextAlign
|
|
481
476
|
'muted'?: boolean
|
|
482
477
|
'target'?: string
|
|
483
|
-
'text'?: ReactNode
|
|
478
|
+
'text'?: React.ReactNode
|
|
484
479
|
'textOverflow'?: TextOwnProps['textOverflow']
|
|
485
480
|
'textWeight'?: TextOwnProps['weight']
|
|
486
481
|
'width'?: ResponsiveProp<Width>
|
|
@@ -626,9 +621,9 @@ export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSk
|
|
|
626
621
|
|
|
627
622
|
/** @public */
|
|
628
623
|
export declare type ComponentType<P = any> =
|
|
629
|
-
| FunctionComponent<P>
|
|
630
|
-
| ComponentClass<P>
|
|
631
|
-
| ExoticComponent<P>
|
|
624
|
+
| React.FunctionComponent<P>
|
|
625
|
+
| React.ComponentClass<P>
|
|
626
|
+
| React.ExoticComponent<P>
|
|
632
627
|
|
|
633
628
|
/**
|
|
634
629
|
* The `Container` component wraps content layout in a defined set of widths.
|
|
@@ -1657,7 +1652,7 @@ export declare interface PortalProviderProps {
|
|
|
1657
1652
|
|
|
1658
1653
|
/** @public */
|
|
1659
1654
|
export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
|
|
1660
|
-
E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
|
|
1655
|
+
E extends TagType ? React.JSX.IntrinsicElements[E] : React.ComponentProps<E>,
|
|
1661
1656
|
P & {
|
|
1662
1657
|
as?: E
|
|
1663
1658
|
}
|
|
@@ -1990,7 +1985,7 @@ export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElemen
|
|
|
1990
1985
|
export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
|
|
1991
1986
|
|
|
1992
1987
|
/** @public */
|
|
1993
|
-
export declare type TagType = keyof JSX.IntrinsicElements
|
|
1988
|
+
export declare type TagType = keyof React.JSX.IntrinsicElements
|
|
1994
1989
|
|
|
1995
1990
|
/**
|
|
1996
1991
|
* The `Text` component is an agile, themed typographic element.
|