@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.
Files changed (54) hide show
  1. package/dist/css/index.css +1 -1
  2. package/dist/css/index.css.map +1 -1
  3. package/dist/css/index.d.ts +22 -6
  4. package/dist/css/index.js +29 -20
  5. package/dist/css/index.js.map +1 -1
  6. package/dist/index.d.ts +8 -13
  7. package/dist/index.js +519 -531
  8. package/dist/index.js.map +1 -1
  9. package/exports/css/index.css +1 -0
  10. package/package.json +12 -12
  11. package/src/core/components/dialog/__workshop__/Panes.tsx +4 -0
  12. package/src/core/components/menu/Menu.tsx +0 -4
  13. package/src/core/components/menu/MenuItem.tsx +1 -1
  14. package/src/core/components/toast/useToast.ts +2 -2
  15. package/src/core/primitives/avatar/Avatar.tsx +2 -2
  16. package/src/core/primitives/avatar/__workshop__/PropsStory.tsx +22 -0
  17. package/src/core/primitives/avatar/__workshop__/index.ts +5 -0
  18. package/src/core/primitives/button/Button.tsx +5 -5
  19. package/src/core/primitives/code/Code.tsx +25 -1
  20. package/src/core/primitives/heading/Heading.tsx +16 -0
  21. package/src/core/primitives/label/Label.tsx +16 -0
  22. package/src/core/primitives/radio/Radio.tsx +2 -2
  23. package/src/core/primitives/select/Select.tsx +5 -3
  24. package/src/core/primitives/switch/Switch.tsx +2 -10
  25. package/src/core/primitives/text/Text.tsx +14 -0
  26. package/src/core/primitives/textArea/TextArea.tsx +7 -1
  27. package/src/core/primitives/textInput/TextInput.tsx +18 -17
  28. package/src/core/types.ts +6 -5
  29. package/src/core/utils/portal/PortalProvider.tsx +2 -2
  30. package/src/css/primitives/_input/_input.css.ts +2 -3
  31. package/src/css/primitives/_input/input.ts +2 -0
  32. package/src/css/primitives/_input/types.ts +2 -1
  33. package/src/css/primitives/avatar/avatar.css.ts +8 -0
  34. package/src/css/primitives/box/box.css.ts +21 -1
  35. package/src/css/primitives/button/button.css.ts +1 -0
  36. package/src/css/primitives/card/card.css.ts +0 -60
  37. package/src/css/primitives/checkbox/checkbox.css.ts +1 -0
  38. package/src/css/primitives/code/code.ts +4 -0
  39. package/src/css/primitives/code/types.ts +7 -1
  40. package/src/css/primitives/heading/heading.ts +4 -0
  41. package/src/css/primitives/heading/types.ts +7 -1
  42. package/src/css/primitives/label/label.ts +4 -0
  43. package/src/css/primitives/label/types.ts +7 -1
  44. package/src/css/primitives/radio/radio.css.ts +1 -1
  45. package/src/css/primitives/root/root.css.ts +0 -1
  46. package/src/css/primitives/select/select.css.ts +7 -1
  47. package/src/css/primitives/selectable/selectable.css.ts +5 -31
  48. package/src/css/primitives/switch/switch.css.ts +10 -1
  49. package/src/css/primitives/text/text.ts +2 -0
  50. package/src/css/primitives/text/types.ts +6 -1
  51. package/src/css/primitives/textInput/textInput.css.ts +15 -3
  52. package/src/css/props/width/types.ts +1 -1
  53. package/src/css/props/width/width.css.ts +5 -2
  54. 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'?: ElementType_2 | ReactNode
475
- 'iconRight'?: ElementType_2 | ReactNode
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.