@sanity/ui 2.10.15 → 2.10.17-canary.0

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025–2024 Sanity.io
3
+ Copyright (c) 2025 Sanity.io
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/index.d.mts CHANGED
@@ -13,7 +13,6 @@ import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
13
13
  import {HTMLAttributes} from 'react'
14
14
  import {HTMLProps} from 'react'
15
15
  import {IStyledComponentBase} from 'styled-components/dist/types'
16
- import {JSX} from 'react'
17
16
  import {multiply as multiply_2} from '@sanity/ui/theme'
18
17
  import {MutableRefObject} from 'react'
19
18
  import {NamedExoticComponent} from 'react'
@@ -121,6 +120,7 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
121
120
  | 'inputMode'
122
121
  | 'onChange'
123
122
  | 'onSelect'
123
+ | 'popover'
124
124
  | 'prefix'
125
125
  | 'ref'
126
126
  | 'role'
@@ -321,7 +321,7 @@ export declare interface AvatarProps {
321
321
  __unstable_hideInnerStroke?: boolean
322
322
  animateArrowFrom?: AvatarPosition
323
323
  arrowPosition?: AvatarPosition
324
- as?: React.ElementType | keyof JSX.IntrinsicElements
324
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
325
325
  color?: ThemeColorAvatarColorKey
326
326
  initials?: string
327
327
  onImageLoadError?: (event: Error) => void
@@ -389,7 +389,7 @@ export declare type BadgeMode = 'default' | 'outline'
389
389
  * @public
390
390
  */
391
391
  export declare interface BadgeProps extends BoxProps, ResponsiveRadiusProps {
392
- as?: React.ElementType | keyof JSX.IntrinsicElements
392
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
393
393
  fontSize?: number | number[]
394
394
  /** @deprecated No longer used. */
395
395
  mode?: BadgeMode
@@ -476,8 +476,8 @@ export declare interface BoxProps
476
476
  ResponsiveGridItemProps,
477
477
  ResponsiveMarginProps,
478
478
  ResponsivePaddingProps {
479
- as?: React.ElementType | keyof JSX.IntrinsicElements
480
- forwardedAs?: React.ElementType | keyof JSX.IntrinsicElements
479
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
480
+ forwardedAs?: React.ElementType | keyof React.JSX.IntrinsicElements
481
481
  }
482
482
 
483
483
  /**
@@ -526,7 +526,7 @@ export declare type ButtonMode = ThemeColorButtonModeKey_2
526
526
  * @public
527
527
  */
528
528
  export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
529
- as?: React.ElementType | keyof JSX.IntrinsicElements
529
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
530
530
  fontSize?: number | number[]
531
531
  mode?: ButtonMode
532
532
  icon?: React.ElementType | React.ReactNode
@@ -660,7 +660,7 @@ export declare const Code: ForwardRefExoticComponent<
660
660
  * @public
661
661
  */
662
662
  export declare interface CodeProps {
663
- as?: React.ElementType | keyof JSX.IntrinsicElements
663
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
664
664
  /** Define the language to use for syntax highlighting. */
665
665
  language?: string
666
666
  size?: number | number[]
@@ -1075,7 +1075,7 @@ export declare const Heading: ForwardRefExoticComponent<
1075
1075
  export declare interface HeadingProps {
1076
1076
  accent?: boolean
1077
1077
  align?: TextAlign | TextAlign[]
1078
- as?: React.ElementType | keyof JSX.IntrinsicElements
1078
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1079
1079
  muted?: boolean
1080
1080
  size?: number | number[]
1081
1081
  /**
@@ -1220,7 +1220,7 @@ export declare const KBD: ForwardRefExoticComponent<
1220
1220
  * @public
1221
1221
  */
1222
1222
  export declare interface KBDProps {
1223
- as?: React.ElementType | keyof JSX.IntrinsicElements
1223
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1224
1224
  fontSize?: number | number[]
1225
1225
  padding?: number | number[]
1226
1226
  radius?: Radius | Radius[]
@@ -1242,7 +1242,7 @@ export declare const Label: ForwardRefExoticComponent<
1242
1242
  export declare interface LabelProps {
1243
1243
  accent?: boolean
1244
1244
  align?: TextAlign | TextAlign[]
1245
- as?: React.ElementType | keyof JSX.IntrinsicElements
1245
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1246
1246
  muted?: boolean
1247
1247
  size?: number | number[]
1248
1248
  /**
@@ -1295,7 +1295,7 @@ export declare interface LayerContextValue {
1295
1295
  * @public
1296
1296
  */
1297
1297
  export declare interface LayerProps {
1298
- as?: React.ElementType | keyof JSX.IntrinsicElements
1298
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1299
1299
  /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1300
1300
  onActivate?: (props: {activeElement: HTMLElement | null}) => void
1301
1301
  zOffset?: number | number[]
@@ -1323,7 +1323,7 @@ export declare interface LayerProviderProps {
1323
1323
  * @beta
1324
1324
  */
1325
1325
  export declare interface MediaQueryProps {
1326
- as?: React.ElementType | keyof JSX.IntrinsicElements
1326
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1327
1327
  media?: number[]
1328
1328
  }
1329
1329
 
@@ -1420,7 +1420,7 @@ export declare namespace MenuGroup {
1420
1420
  * @public
1421
1421
  */
1422
1422
  export declare interface MenuGroupProps {
1423
- as?: React.ElementType | keyof JSX.IntrinsicElements
1423
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1424
1424
  fontSize?: number | number[]
1425
1425
  icon?: React.ElementType | React.ReactNode
1426
1426
  padding?: number | number[]
@@ -1444,7 +1444,7 @@ export declare const MenuItem: ForwardRefExoticComponent<
1444
1444
  * @public
1445
1445
  */
1446
1446
  export declare interface MenuItemProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
1447
- as?: React.ElementType | keyof JSX.IntrinsicElements
1447
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1448
1448
  fontSize?: number | number[]
1449
1449
  hotkeys?: string[]
1450
1450
  icon?: React.ElementType | React.ReactNode
@@ -2012,7 +2012,7 @@ export declare const SrOnly: ForwardRefExoticComponent<
2012
2012
  * @public
2013
2013
  */
2014
2014
  export declare interface SrOnlyProps {
2015
- as?: React.ElementType | keyof JSX.IntrinsicElements
2015
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2016
2016
  children?: React.ReactNode
2017
2017
  }
2018
2018
 
@@ -2029,7 +2029,7 @@ export declare const Stack: ForwardRefExoticComponent<
2029
2029
  * @public
2030
2030
  */
2031
2031
  export declare interface StackProps extends BoxProps {
2032
- as?: React.ElementType | keyof JSX.IntrinsicElements
2032
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2033
2033
  space?: number | number[]
2034
2034
  }
2035
2035
 
@@ -2246,7 +2246,7 @@ export declare type TextInputType =
2246
2246
  export declare interface TextProps {
2247
2247
  accent?: boolean
2248
2248
  align?: TextAlign | TextAlign[]
2249
- as?: React.ElementType | keyof JSX.IntrinsicElements
2249
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2250
2250
  /** When `true` the text color will be muted. */
2251
2251
  muted?: boolean
2252
2252
  size?: number | number[]
@@ -2902,7 +2902,7 @@ export declare interface VirtualListChangeOpts {
2902
2902
  * @beta
2903
2903
  */
2904
2904
  export declare interface VirtualListProps<Item = any> {
2905
- as?: React.ElementType | keyof JSX.IntrinsicElements
2905
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2906
2906
  gap?: number
2907
2907
  getItemKey?: (item: Item, itemIndex: number) => string
2908
2908
  items?: Item[]
package/dist/index.d.ts CHANGED
@@ -13,7 +13,6 @@ import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
13
13
  import {HTMLAttributes} from 'react'
14
14
  import {HTMLProps} from 'react'
15
15
  import {IStyledComponentBase} from 'styled-components/dist/types'
16
- import {JSX} from 'react'
17
16
  import {multiply as multiply_2} from '@sanity/ui/theme'
18
17
  import {MutableRefObject} from 'react'
19
18
  import {NamedExoticComponent} from 'react'
@@ -121,6 +120,7 @@ export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
121
120
  | 'inputMode'
122
121
  | 'onChange'
123
122
  | 'onSelect'
123
+ | 'popover'
124
124
  | 'prefix'
125
125
  | 'ref'
126
126
  | 'role'
@@ -321,7 +321,7 @@ export declare interface AvatarProps {
321
321
  __unstable_hideInnerStroke?: boolean
322
322
  animateArrowFrom?: AvatarPosition
323
323
  arrowPosition?: AvatarPosition
324
- as?: React.ElementType | keyof JSX.IntrinsicElements
324
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
325
325
  color?: ThemeColorAvatarColorKey
326
326
  initials?: string
327
327
  onImageLoadError?: (event: Error) => void
@@ -389,7 +389,7 @@ export declare type BadgeMode = 'default' | 'outline'
389
389
  * @public
390
390
  */
391
391
  export declare interface BadgeProps extends BoxProps, ResponsiveRadiusProps {
392
- as?: React.ElementType | keyof JSX.IntrinsicElements
392
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
393
393
  fontSize?: number | number[]
394
394
  /** @deprecated No longer used. */
395
395
  mode?: BadgeMode
@@ -476,8 +476,8 @@ export declare interface BoxProps
476
476
  ResponsiveGridItemProps,
477
477
  ResponsiveMarginProps,
478
478
  ResponsivePaddingProps {
479
- as?: React.ElementType | keyof JSX.IntrinsicElements
480
- forwardedAs?: React.ElementType | keyof JSX.IntrinsicElements
479
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
480
+ forwardedAs?: React.ElementType | keyof React.JSX.IntrinsicElements
481
481
  }
482
482
 
483
483
  /**
@@ -526,7 +526,7 @@ export declare type ButtonMode = ThemeColorButtonModeKey_2
526
526
  * @public
527
527
  */
528
528
  export declare interface ButtonProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
529
- as?: React.ElementType | keyof JSX.IntrinsicElements
529
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
530
530
  fontSize?: number | number[]
531
531
  mode?: ButtonMode
532
532
  icon?: React.ElementType | React.ReactNode
@@ -660,7 +660,7 @@ export declare const Code: ForwardRefExoticComponent<
660
660
  * @public
661
661
  */
662
662
  export declare interface CodeProps {
663
- as?: React.ElementType | keyof JSX.IntrinsicElements
663
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
664
664
  /** Define the language to use for syntax highlighting. */
665
665
  language?: string
666
666
  size?: number | number[]
@@ -1075,7 +1075,7 @@ export declare const Heading: ForwardRefExoticComponent<
1075
1075
  export declare interface HeadingProps {
1076
1076
  accent?: boolean
1077
1077
  align?: TextAlign | TextAlign[]
1078
- as?: React.ElementType | keyof JSX.IntrinsicElements
1078
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1079
1079
  muted?: boolean
1080
1080
  size?: number | number[]
1081
1081
  /**
@@ -1220,7 +1220,7 @@ export declare const KBD: ForwardRefExoticComponent<
1220
1220
  * @public
1221
1221
  */
1222
1222
  export declare interface KBDProps {
1223
- as?: React.ElementType | keyof JSX.IntrinsicElements
1223
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1224
1224
  fontSize?: number | number[]
1225
1225
  padding?: number | number[]
1226
1226
  radius?: Radius | Radius[]
@@ -1242,7 +1242,7 @@ export declare const Label: ForwardRefExoticComponent<
1242
1242
  export declare interface LabelProps {
1243
1243
  accent?: boolean
1244
1244
  align?: TextAlign | TextAlign[]
1245
- as?: React.ElementType | keyof JSX.IntrinsicElements
1245
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1246
1246
  muted?: boolean
1247
1247
  size?: number | number[]
1248
1248
  /**
@@ -1295,7 +1295,7 @@ export declare interface LayerContextValue {
1295
1295
  * @public
1296
1296
  */
1297
1297
  export declare interface LayerProps {
1298
- as?: React.ElementType | keyof JSX.IntrinsicElements
1298
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1299
1299
  /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1300
1300
  onActivate?: (props: {activeElement: HTMLElement | null}) => void
1301
1301
  zOffset?: number | number[]
@@ -1323,7 +1323,7 @@ export declare interface LayerProviderProps {
1323
1323
  * @beta
1324
1324
  */
1325
1325
  export declare interface MediaQueryProps {
1326
- as?: React.ElementType | keyof JSX.IntrinsicElements
1326
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1327
1327
  media?: number[]
1328
1328
  }
1329
1329
 
@@ -1420,7 +1420,7 @@ export declare namespace MenuGroup {
1420
1420
  * @public
1421
1421
  */
1422
1422
  export declare interface MenuGroupProps {
1423
- as?: React.ElementType | keyof JSX.IntrinsicElements
1423
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1424
1424
  fontSize?: number | number[]
1425
1425
  icon?: React.ElementType | React.ReactNode
1426
1426
  padding?: number | number[]
@@ -1444,7 +1444,7 @@ export declare const MenuItem: ForwardRefExoticComponent<
1444
1444
  * @public
1445
1445
  */
1446
1446
  export declare interface MenuItemProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
1447
- as?: React.ElementType | keyof JSX.IntrinsicElements
1447
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
1448
1448
  fontSize?: number | number[]
1449
1449
  hotkeys?: string[]
1450
1450
  icon?: React.ElementType | React.ReactNode
@@ -2012,7 +2012,7 @@ export declare const SrOnly: ForwardRefExoticComponent<
2012
2012
  * @public
2013
2013
  */
2014
2014
  export declare interface SrOnlyProps {
2015
- as?: React.ElementType | keyof JSX.IntrinsicElements
2015
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2016
2016
  children?: React.ReactNode
2017
2017
  }
2018
2018
 
@@ -2029,7 +2029,7 @@ export declare const Stack: ForwardRefExoticComponent<
2029
2029
  * @public
2030
2030
  */
2031
2031
  export declare interface StackProps extends BoxProps {
2032
- as?: React.ElementType | keyof JSX.IntrinsicElements
2032
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2033
2033
  space?: number | number[]
2034
2034
  }
2035
2035
 
@@ -2246,7 +2246,7 @@ export declare type TextInputType =
2246
2246
  export declare interface TextProps {
2247
2247
  accent?: boolean
2248
2248
  align?: TextAlign | TextAlign[]
2249
- as?: React.ElementType | keyof JSX.IntrinsicElements
2249
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2250
2250
  /** When `true` the text color will be muted. */
2251
2251
  muted?: boolean
2252
2252
  size?: number | number[]
@@ -2902,7 +2902,7 @@ export declare interface VirtualListChangeOpts {
2902
2902
  * @beta
2903
2903
  */
2904
2904
  export declare interface VirtualListProps<Item = any> {
2905
- as?: React.ElementType | keyof JSX.IntrinsicElements
2905
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements
2906
2906
  gap?: number
2907
2907
  getItemKey?: (item: Item, itemIndex: number) => string
2908
2908
  items?: Item[]