@huin-core/react-select 1.0.4 → 1.0.7
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 +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +298 -323
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +298 -323
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { Primitive } from '@huin-core/react-primitive';
|
|
4
4
|
import { Portal } from '@huin-core/react-portal';
|
|
@@ -7,7 +7,7 @@ import { FocusScope } from '@huin-core/react-focus-scope';
|
|
|
7
7
|
import * as PopperPrimitive from '@huin-core/react-popper';
|
|
8
8
|
|
|
9
9
|
type Scope<C = any> = {
|
|
10
|
-
[scopeName: string]: React
|
|
10
|
+
[scopeName: string]: React.Context<C>[];
|
|
11
11
|
} | undefined;
|
|
12
12
|
type ScopeHook = (scope: Scope) => {
|
|
13
13
|
[__scopeProp: string]: Scope;
|
|
@@ -31,7 +31,7 @@ declare const SelectValue: React__default.ForwardRefExoticComponent<SelectValueP
|
|
|
31
31
|
type Direction = "ltr" | "rtl";
|
|
32
32
|
declare const createSelectScope: CreateScope;
|
|
33
33
|
interface SelectProps {
|
|
34
|
-
children?: React
|
|
34
|
+
children?: React.ReactNode;
|
|
35
35
|
value?: string;
|
|
36
36
|
defaultValue?: string;
|
|
37
37
|
onValueChange?(value: string): void;
|
|
@@ -44,22 +44,22 @@ interface SelectProps {
|
|
|
44
44
|
disabled?: boolean;
|
|
45
45
|
required?: boolean;
|
|
46
46
|
}
|
|
47
|
-
declare const Select: React
|
|
48
|
-
declare const Root: React
|
|
47
|
+
declare const Select: React.FC<SelectProps>;
|
|
48
|
+
declare const Root: React.FC<SelectProps>;
|
|
49
49
|
|
|
50
50
|
interface SelectIconProps extends PrimitiveSpanProps {
|
|
51
51
|
}
|
|
52
52
|
declare const SelectIcon: React__default.ForwardRefExoticComponent<SelectIconProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
53
53
|
|
|
54
|
-
type PortalProps =
|
|
54
|
+
type PortalProps = React__default.ComponentPropsWithoutRef<typeof Portal>;
|
|
55
55
|
interface SelectPortalProps {
|
|
56
|
-
children?:
|
|
56
|
+
children?: React__default.ReactNode;
|
|
57
57
|
/**
|
|
58
58
|
* Specify a container element to portal the content into.
|
|
59
59
|
*/
|
|
60
60
|
container?: PortalProps["container"];
|
|
61
61
|
}
|
|
62
|
-
declare const SelectPortal:
|
|
62
|
+
declare const SelectPortal: React__default.FC<SelectPortalProps>;
|
|
63
63
|
|
|
64
64
|
interface SelectScrollDownButtonProps extends Omit<SelectScrollButtonImplProps, "onAutoScroll"> {
|
|
65
65
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { Primitive } from '@huin-core/react-primitive';
|
|
4
4
|
import { Portal } from '@huin-core/react-portal';
|
|
@@ -7,7 +7,7 @@ import { FocusScope } from '@huin-core/react-focus-scope';
|
|
|
7
7
|
import * as PopperPrimitive from '@huin-core/react-popper';
|
|
8
8
|
|
|
9
9
|
type Scope<C = any> = {
|
|
10
|
-
[scopeName: string]: React
|
|
10
|
+
[scopeName: string]: React.Context<C>[];
|
|
11
11
|
} | undefined;
|
|
12
12
|
type ScopeHook = (scope: Scope) => {
|
|
13
13
|
[__scopeProp: string]: Scope;
|
|
@@ -31,7 +31,7 @@ declare const SelectValue: React__default.ForwardRefExoticComponent<SelectValueP
|
|
|
31
31
|
type Direction = "ltr" | "rtl";
|
|
32
32
|
declare const createSelectScope: CreateScope;
|
|
33
33
|
interface SelectProps {
|
|
34
|
-
children?: React
|
|
34
|
+
children?: React.ReactNode;
|
|
35
35
|
value?: string;
|
|
36
36
|
defaultValue?: string;
|
|
37
37
|
onValueChange?(value: string): void;
|
|
@@ -44,22 +44,22 @@ interface SelectProps {
|
|
|
44
44
|
disabled?: boolean;
|
|
45
45
|
required?: boolean;
|
|
46
46
|
}
|
|
47
|
-
declare const Select: React
|
|
48
|
-
declare const Root: React
|
|
47
|
+
declare const Select: React.FC<SelectProps>;
|
|
48
|
+
declare const Root: React.FC<SelectProps>;
|
|
49
49
|
|
|
50
50
|
interface SelectIconProps extends PrimitiveSpanProps {
|
|
51
51
|
}
|
|
52
52
|
declare const SelectIcon: React__default.ForwardRefExoticComponent<SelectIconProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
53
53
|
|
|
54
|
-
type PortalProps =
|
|
54
|
+
type PortalProps = React__default.ComponentPropsWithoutRef<typeof Portal>;
|
|
55
55
|
interface SelectPortalProps {
|
|
56
|
-
children?:
|
|
56
|
+
children?: React__default.ReactNode;
|
|
57
57
|
/**
|
|
58
58
|
* Specify a container element to portal the content into.
|
|
59
59
|
*/
|
|
60
60
|
container?: PortalProps["container"];
|
|
61
61
|
}
|
|
62
|
-
declare const SelectPortal:
|
|
62
|
+
declare const SelectPortal: React__default.FC<SelectPortalProps>;
|
|
63
63
|
|
|
64
64
|
interface SelectScrollDownButtonProps extends Omit<SelectScrollButtonImplProps, "onAutoScroll"> {
|
|
65
65
|
}
|