@radix-ui/react-select 2.3.9-rc.1791245332176 → 2.4.0-rc.1791406557805
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 +30 -30
- package/dist/index.d.ts +30 -30
- package/dist/index.js.map +2 -2
- package/dist/index.mjs.map +2 -2
- package/package.json +15 -15
package/dist/index.d.mts
CHANGED
|
@@ -18,30 +18,30 @@ declare const Direction: {
|
|
|
18
18
|
};
|
|
19
19
|
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
20
20
|
type ScopedProps<P> = P & {
|
|
21
|
-
__scopeSelect?: Scope;
|
|
21
|
+
__scopeSelect?: Scope | undefined;
|
|
22
22
|
};
|
|
23
23
|
declare const createSelectScope: _radix_ui_react_context.CreateScope;
|
|
24
24
|
interface SelectSharedProps {
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
open?: boolean;
|
|
27
|
-
defaultOpen?: boolean;
|
|
28
|
-
onOpenChange
|
|
29
|
-
dir?: Direction;
|
|
30
|
-
name?: string;
|
|
31
|
-
autoComplete?: string;
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
required?: boolean;
|
|
34
|
-
form?: string;
|
|
25
|
+
children?: React.ReactNode | undefined;
|
|
26
|
+
open?: boolean | undefined;
|
|
27
|
+
defaultOpen?: boolean | undefined;
|
|
28
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
29
|
+
dir?: Direction | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
autoComplete?: string | undefined;
|
|
32
|
+
disabled?: boolean | undefined;
|
|
33
|
+
required?: boolean | undefined;
|
|
34
|
+
form?: string | undefined;
|
|
35
35
|
}
|
|
36
36
|
type SelectProps = SelectSharedProps & {
|
|
37
|
-
value?: string;
|
|
38
|
-
defaultValue?: string;
|
|
39
|
-
onValueChange
|
|
37
|
+
value?: string | undefined;
|
|
38
|
+
defaultValue?: string | undefined;
|
|
39
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
40
40
|
};
|
|
41
41
|
interface SelectProviderProps extends SelectSharedProps {
|
|
42
|
-
value?: string;
|
|
43
|
-
defaultValue?: string;
|
|
44
|
-
onValueChange
|
|
42
|
+
value?: string | undefined;
|
|
43
|
+
defaultValue?: string | undefined;
|
|
44
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
45
45
|
}
|
|
46
46
|
declare function SelectProvider(props: ScopedProps<SelectProviderProps>): React.JSX.Element;
|
|
47
47
|
declare const Select: React.FC<SelectProps>;
|
|
@@ -51,7 +51,7 @@ interface SelectTriggerProps extends PrimitiveButtonProps {
|
|
|
51
51
|
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
52
|
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
53
53
|
interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
|
|
54
|
-
placeholder?: React.ReactNode;
|
|
54
|
+
placeholder?: React.ReactNode | undefined;
|
|
55
55
|
}
|
|
56
56
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
57
57
|
interface SelectIconProps extends PrimitiveSpanProps {
|
|
@@ -59,16 +59,16 @@ interface SelectIconProps extends PrimitiveSpanProps {
|
|
|
59
59
|
declare const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
60
60
|
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal>;
|
|
61
61
|
interface SelectPortalProps {
|
|
62
|
-
children?: React.ReactNode;
|
|
62
|
+
children?: React.ReactNode | undefined;
|
|
63
63
|
/**
|
|
64
64
|
* Specify a container element to portal the content into.
|
|
65
65
|
*/
|
|
66
|
-
container?: PortalProps['container'];
|
|
66
|
+
container?: PortalProps['container'] | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Used to force mounting when more control is needed. Useful when controlling
|
|
69
69
|
* animation with React animation libraries.
|
|
70
70
|
*/
|
|
71
|
-
forceMount?: true;
|
|
71
|
+
forceMount?: true | undefined;
|
|
72
72
|
}
|
|
73
73
|
declare const SelectPortal: React.FC<SelectPortalProps>;
|
|
74
74
|
interface SelectContentProps extends SelectContentImplProps {
|
|
@@ -76,31 +76,31 @@ interface SelectContentProps extends SelectContentImplProps {
|
|
|
76
76
|
* Used to force mounting when more control is needed. Useful when
|
|
77
77
|
* controlling animation with React animation libraries.
|
|
78
78
|
*/
|
|
79
|
-
forceMount?: true;
|
|
79
|
+
forceMount?: true | undefined;
|
|
80
80
|
}
|
|
81
81
|
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
82
|
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
83
83
|
type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
|
|
84
84
|
type SelectPopperPrivateProps = {
|
|
85
|
-
onPlaced?: PopperContentProps['onPlaced'];
|
|
85
|
+
onPlaced?: PopperContentProps['onPlaced'] | undefined;
|
|
86
86
|
};
|
|
87
87
|
interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
|
|
88
88
|
/**
|
|
89
89
|
* Event handler called when auto-focusing on close.
|
|
90
90
|
* Can be prevented.
|
|
91
91
|
*/
|
|
92
|
-
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
92
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'] | undefined;
|
|
93
93
|
/**
|
|
94
94
|
* Event handler called when the escape key is down.
|
|
95
95
|
* Can be prevented.
|
|
96
96
|
*/
|
|
97
|
-
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
|
97
|
+
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'] | undefined;
|
|
98
98
|
/**
|
|
99
99
|
* Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
|
|
100
100
|
* Can be prevented.
|
|
101
101
|
*/
|
|
102
|
-
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
103
|
-
position?: Position;
|
|
102
|
+
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'] | undefined;
|
|
103
|
+
position?: Position | undefined;
|
|
104
104
|
}
|
|
105
105
|
interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
|
|
106
106
|
}
|
|
@@ -109,7 +109,7 @@ interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPriv
|
|
|
109
109
|
}
|
|
110
110
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
111
111
|
interface SelectViewportProps extends PrimitiveDivProps {
|
|
112
|
-
nonce?: string;
|
|
112
|
+
nonce?: string | undefined;
|
|
113
113
|
}
|
|
114
114
|
declare const SelectViewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
115
115
|
interface SelectGroupProps extends PrimitiveDivProps {
|
|
@@ -120,8 +120,8 @@ interface SelectLabelProps extends PrimitiveDivProps {
|
|
|
120
120
|
declare const SelectLabel: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
121
|
interface SelectItemProps extends PrimitiveDivProps {
|
|
122
122
|
value: string;
|
|
123
|
-
disabled?: boolean;
|
|
124
|
-
textValue?: string;
|
|
123
|
+
disabled?: boolean | undefined;
|
|
124
|
+
textValue?: string | undefined;
|
|
125
125
|
}
|
|
126
126
|
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
127
127
|
interface SelectItemTextProps extends PrimitiveSpanProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -18,30 +18,30 @@ declare const Direction: {
|
|
|
18
18
|
};
|
|
19
19
|
type Direction = (typeof Direction)[keyof typeof Direction];
|
|
20
20
|
type ScopedProps<P> = P & {
|
|
21
|
-
__scopeSelect?: Scope;
|
|
21
|
+
__scopeSelect?: Scope | undefined;
|
|
22
22
|
};
|
|
23
23
|
declare const createSelectScope: _radix_ui_react_context.CreateScope;
|
|
24
24
|
interface SelectSharedProps {
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
open?: boolean;
|
|
27
|
-
defaultOpen?: boolean;
|
|
28
|
-
onOpenChange
|
|
29
|
-
dir?: Direction;
|
|
30
|
-
name?: string;
|
|
31
|
-
autoComplete?: string;
|
|
32
|
-
disabled?: boolean;
|
|
33
|
-
required?: boolean;
|
|
34
|
-
form?: string;
|
|
25
|
+
children?: React.ReactNode | undefined;
|
|
26
|
+
open?: boolean | undefined;
|
|
27
|
+
defaultOpen?: boolean | undefined;
|
|
28
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
29
|
+
dir?: Direction | undefined;
|
|
30
|
+
name?: string | undefined;
|
|
31
|
+
autoComplete?: string | undefined;
|
|
32
|
+
disabled?: boolean | undefined;
|
|
33
|
+
required?: boolean | undefined;
|
|
34
|
+
form?: string | undefined;
|
|
35
35
|
}
|
|
36
36
|
type SelectProps = SelectSharedProps & {
|
|
37
|
-
value?: string;
|
|
38
|
-
defaultValue?: string;
|
|
39
|
-
onValueChange
|
|
37
|
+
value?: string | undefined;
|
|
38
|
+
defaultValue?: string | undefined;
|
|
39
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
40
40
|
};
|
|
41
41
|
interface SelectProviderProps extends SelectSharedProps {
|
|
42
|
-
value?: string;
|
|
43
|
-
defaultValue?: string;
|
|
44
|
-
onValueChange
|
|
42
|
+
value?: string | undefined;
|
|
43
|
+
defaultValue?: string | undefined;
|
|
44
|
+
onValueChange?: ((value: string) => void) | undefined;
|
|
45
45
|
}
|
|
46
46
|
declare function SelectProvider(props: ScopedProps<SelectProviderProps>): React.JSX.Element;
|
|
47
47
|
declare const Select: React.FC<SelectProps>;
|
|
@@ -51,7 +51,7 @@ interface SelectTriggerProps extends PrimitiveButtonProps {
|
|
|
51
51
|
declare const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
52
52
|
type PrimitiveSpanProps = React.ComponentPropsWithoutRef<typeof Primitive.span>;
|
|
53
53
|
interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
|
|
54
|
-
placeholder?: React.ReactNode;
|
|
54
|
+
placeholder?: React.ReactNode | undefined;
|
|
55
55
|
}
|
|
56
56
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
57
57
|
interface SelectIconProps extends PrimitiveSpanProps {
|
|
@@ -59,16 +59,16 @@ interface SelectIconProps extends PrimitiveSpanProps {
|
|
|
59
59
|
declare const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
60
60
|
type PortalProps = React.ComponentPropsWithoutRef<typeof Portal>;
|
|
61
61
|
interface SelectPortalProps {
|
|
62
|
-
children?: React.ReactNode;
|
|
62
|
+
children?: React.ReactNode | undefined;
|
|
63
63
|
/**
|
|
64
64
|
* Specify a container element to portal the content into.
|
|
65
65
|
*/
|
|
66
|
-
container?: PortalProps['container'];
|
|
66
|
+
container?: PortalProps['container'] | undefined;
|
|
67
67
|
/**
|
|
68
68
|
* Used to force mounting when more control is needed. Useful when controlling
|
|
69
69
|
* animation with React animation libraries.
|
|
70
70
|
*/
|
|
71
|
-
forceMount?: true;
|
|
71
|
+
forceMount?: true | undefined;
|
|
72
72
|
}
|
|
73
73
|
declare const SelectPortal: React.FC<SelectPortalProps>;
|
|
74
74
|
interface SelectContentProps extends SelectContentImplProps {
|
|
@@ -76,31 +76,31 @@ interface SelectContentProps extends SelectContentImplProps {
|
|
|
76
76
|
* Used to force mounting when more control is needed. Useful when
|
|
77
77
|
* controlling animation with React animation libraries.
|
|
78
78
|
*/
|
|
79
|
-
forceMount?: true;
|
|
79
|
+
forceMount?: true | undefined;
|
|
80
80
|
}
|
|
81
81
|
declare const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
82
82
|
type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
|
|
83
83
|
type FocusScopeProps = React.ComponentPropsWithoutRef<typeof FocusScope>;
|
|
84
84
|
type SelectPopperPrivateProps = {
|
|
85
|
-
onPlaced?: PopperContentProps['onPlaced'];
|
|
85
|
+
onPlaced?: PopperContentProps['onPlaced'] | undefined;
|
|
86
86
|
};
|
|
87
87
|
interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
|
|
88
88
|
/**
|
|
89
89
|
* Event handler called when auto-focusing on close.
|
|
90
90
|
* Can be prevented.
|
|
91
91
|
*/
|
|
92
|
-
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
|
|
92
|
+
onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'] | undefined;
|
|
93
93
|
/**
|
|
94
94
|
* Event handler called when the escape key is down.
|
|
95
95
|
* Can be prevented.
|
|
96
96
|
*/
|
|
97
|
-
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
|
|
97
|
+
onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'] | undefined;
|
|
98
98
|
/**
|
|
99
99
|
* Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
|
|
100
100
|
* Can be prevented.
|
|
101
101
|
*/
|
|
102
|
-
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
|
|
103
|
-
position?: Position;
|
|
102
|
+
onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'] | undefined;
|
|
103
|
+
position?: Position | undefined;
|
|
104
104
|
}
|
|
105
105
|
interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
|
|
106
106
|
}
|
|
@@ -109,7 +109,7 @@ interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPriv
|
|
|
109
109
|
}
|
|
110
110
|
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
|
111
111
|
interface SelectViewportProps extends PrimitiveDivProps {
|
|
112
|
-
nonce?: string;
|
|
112
|
+
nonce?: string | undefined;
|
|
113
113
|
}
|
|
114
114
|
declare const SelectViewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
115
115
|
interface SelectGroupProps extends PrimitiveDivProps {
|
|
@@ -120,8 +120,8 @@ interface SelectLabelProps extends PrimitiveDivProps {
|
|
|
120
120
|
declare const SelectLabel: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
|
|
121
121
|
interface SelectItemProps extends PrimitiveDivProps {
|
|
122
122
|
value: string;
|
|
123
|
-
disabled?: boolean;
|
|
124
|
-
textValue?: string;
|
|
123
|
+
disabled?: boolean | undefined;
|
|
124
|
+
textValue?: string | undefined;
|
|
125
125
|
}
|
|
126
126
|
declare const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
127
127
|
interface SelectItemTextProps extends PrimitiveSpanProps {
|