@acrool/react-picker 0.0.2-alpha.7 → 0.0.3-alpha.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 +21 -0
- package/README.md +97 -157
- package/dist/MotionDrawer/MotionDrawer.d.ts +2 -3
- package/dist/acrool-react-picker.es.js +1440 -1329
- package/dist/types.d.ts +0 -4
- package/dist/utils.d.ts +13 -2
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -11,10 +11,6 @@ export interface IValueChange<T = string> {
|
|
|
11
11
|
value?: T;
|
|
12
12
|
onChange?: (value: T) => void;
|
|
13
13
|
}
|
|
14
|
-
export interface IPosition {
|
|
15
|
-
vertical: 'top' | 'bottom';
|
|
16
|
-
horizontal: 'left' | 'right';
|
|
17
|
-
}
|
|
18
14
|
export declare enum EKeyboardKey {
|
|
19
15
|
Escape = "Escape",
|
|
20
16
|
Enter = "Enter",
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CSS from 'csstype';
|
|
2
|
+
import { Ref } from 'react';
|
|
2
3
|
/**
|
|
3
4
|
* 取得適合的顯示位置
|
|
4
5
|
*/
|
|
5
|
-
export declare const getVisiblePosition: (
|
|
6
|
+
export declare const getVisiblePosition: (mainEl: HTMLDivElement | null, pickerHeight: number) => CSS.Properties;
|
|
7
|
+
/**
|
|
8
|
+
* React.forwardRef(props, ref) => {
|
|
9
|
+
* const mainRef = useRef(null);
|
|
10
|
+
*
|
|
11
|
+
* return <textarea ref={setForwardedRef(ref, mainRef) />
|
|
12
|
+
*
|
|
13
|
+
* @param forwardedRef
|
|
14
|
+
* @param localRef
|
|
15
|
+
*/
|
|
16
|
+
export declare const setForwardedRef: <T>(forwardedRef: Ref<T> | undefined, localRef: import("react").MutableRefObject<T | null>) => (node: T | null) => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acrool/react-picker",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3-alpha.0",
|
|
4
|
+
"description": "This is a react method to quickly combine buttons with Picker",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"acrool",
|
|
7
7
|
"react",
|