@radix-ui/react-select 2.1.0-rc.2 → 2.1.0-rc.4

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.mts CHANGED
@@ -3,13 +3,12 @@ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
3
3
  import { FocusScope } from '@radix-ui/react-focus-scope';
4
4
  import * as PopperPrimitive from '@radix-ui/react-popper';
5
5
  import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
- import * as Radix from '@radix-ui/react-primitive';
7
6
  import { Primitive } from '@radix-ui/react-primitive';
8
7
 
9
- declare type Scope<C = any> = {
8
+ type Scope<C = any> = {
10
9
  [scopeName: string]: React.Context<C>[];
11
10
  } | undefined;
12
- declare type ScopeHook = (scope: Scope) => {
11
+ type ScopeHook = (scope: Scope) => {
13
12
  [__scopeProp: string]: Scope;
14
13
  };
15
14
  interface CreateScope {
@@ -17,7 +16,7 @@ interface CreateScope {
17
16
  (): ScopeHook;
18
17
  }
19
18
 
20
- declare type Direction = 'ltr' | 'rtl';
19
+ type Direction = 'ltr' | 'rtl';
21
20
  declare const createSelectScope: CreateScope;
22
21
  interface SelectProps {
23
22
  children?: React.ReactNode;
@@ -34,11 +33,11 @@ interface SelectProps {
34
33
  required?: boolean;
35
34
  }
36
35
  declare const Select: React.FC<SelectProps>;
37
- declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
36
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
38
37
  interface SelectTriggerProps extends PrimitiveButtonProps {
39
38
  }
40
39
  declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
41
- declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
40
+ type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
42
41
  interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
43
42
  placeholder?: React.ReactNode;
44
43
  }
@@ -46,7 +45,7 @@ declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & Re
46
45
  interface SelectIconProps extends PrimitiveSpanProps {
47
46
  }
48
47
  declare const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
49
- declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
48
+ type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
50
49
  interface SelectPortalProps {
51
50
  children?: React.ReactNode;
52
51
  /**
@@ -58,9 +57,9 @@ declare const SelectPortal: React.FC<SelectPortalProps>;
58
57
  interface SelectContentProps extends SelectContentImplProps {
59
58
  }
60
59
  declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
61
- declare type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
62
- declare type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
63
- declare type SelectPopperPrivateProps = {
60
+ type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
61
+ type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
62
+ type SelectPopperPrivateProps = {
64
63
  onPlaced?: PopperContentProps['onPlaced'];
65
64
  };
66
65
  interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
@@ -83,10 +82,10 @@ interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof S
83
82
  }
84
83
  interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
85
84
  }
86
- declare type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
85
+ type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
87
86
  interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {
88
87
  }
89
- declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
88
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
90
89
  interface SelectViewportProps extends PrimitiveDivProps {
91
90
  nonce?: string;
92
91
  }
@@ -121,7 +120,7 @@ interface SelectScrollButtonImplProps extends PrimitiveDivProps {
121
120
  interface SelectSeparatorProps extends PrimitiveDivProps {
122
121
  }
123
122
  declare const SelectSeparator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
124
- declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
123
+ type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
125
124
  interface SelectArrowProps extends PopperArrowProps {
126
125
  }
127
126
  declare const SelectArrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;
package/dist/index.d.ts CHANGED
@@ -3,13 +3,12 @@ import { DismissableLayer } from '@radix-ui/react-dismissable-layer';
3
3
  import { FocusScope } from '@radix-ui/react-focus-scope';
4
4
  import * as PopperPrimitive from '@radix-ui/react-popper';
5
5
  import { Portal as Portal$1 } from '@radix-ui/react-portal';
6
- import * as Radix from '@radix-ui/react-primitive';
7
6
  import { Primitive } from '@radix-ui/react-primitive';
8
7
 
9
- declare type Scope<C = any> = {
8
+ type Scope<C = any> = {
10
9
  [scopeName: string]: React.Context<C>[];
11
10
  } | undefined;
12
- declare type ScopeHook = (scope: Scope) => {
11
+ type ScopeHook = (scope: Scope) => {
13
12
  [__scopeProp: string]: Scope;
14
13
  };
15
14
  interface CreateScope {
@@ -17,7 +16,7 @@ interface CreateScope {
17
16
  (): ScopeHook;
18
17
  }
19
18
 
20
- declare type Direction = 'ltr' | 'rtl';
19
+ type Direction = 'ltr' | 'rtl';
21
20
  declare const createSelectScope: CreateScope;
22
21
  interface SelectProps {
23
22
  children?: React.ReactNode;
@@ -34,11 +33,11 @@ interface SelectProps {
34
33
  required?: boolean;
35
34
  }
36
35
  declare const Select: React.FC<SelectProps>;
37
- declare type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
36
+ type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
38
37
  interface SelectTriggerProps extends PrimitiveButtonProps {
39
38
  }
40
39
  declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
41
- declare type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
40
+ type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
42
41
  interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
43
42
  placeholder?: React.ReactNode;
44
43
  }
@@ -46,7 +45,7 @@ declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & Re
46
45
  interface SelectIconProps extends PrimitiveSpanProps {
47
46
  }
48
47
  declare const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
49
- declare type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
48
+ type PortalProps = React.ComponentPropsWithoutRef<typeof Portal$1>;
50
49
  interface SelectPortalProps {
51
50
  children?: React.ReactNode;
52
51
  /**
@@ -58,9 +57,9 @@ declare const SelectPortal: React.FC<SelectPortalProps>;
58
57
  interface SelectContentProps extends SelectContentImplProps {
59
58
  }
60
59
  declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
61
- declare type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
62
- declare type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
63
- declare type SelectPopperPrivateProps = {
60
+ type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
61
+ type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
62
+ type SelectPopperPrivateProps = {
64
63
  onPlaced?: PopperContentProps['onPlaced'];
65
64
  };
66
65
  interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
@@ -83,10 +82,10 @@ interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof S
83
82
  }
84
83
  interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
85
84
  }
86
- declare type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
85
+ type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
87
86
  interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {
88
87
  }
89
- declare type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
88
+ type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
90
89
  interface SelectViewportProps extends PrimitiveDivProps {
91
90
  nonce?: string;
92
91
  }
@@ -121,7 +120,7 @@ interface SelectScrollButtonImplProps extends PrimitiveDivProps {
121
120
  interface SelectSeparatorProps extends PrimitiveDivProps {
122
121
  }
123
122
  declare const SelectSeparator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
124
- declare type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
123
+ type PopperArrowProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
125
124
  interface SelectArrowProps extends PopperArrowProps {
126
125
  }
127
126
  declare const SelectArrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;