react-native-external-keyboard 0.8.1 → 0.8.2-rc1
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/lib/commonjs/components/RenderPropComponent/RenderPropComponent.js.map +1 -1
- package/lib/commonjs/components/Touchable/Pressable.js.map +1 -1
- package/lib/commonjs/utils/withKeyboardFocus.js.map +1 -1
- package/lib/module/components/RenderPropComponent/RenderPropComponent.js.map +1 -1
- package/lib/module/components/Touchable/Pressable.js.map +1 -1
- package/lib/module/utils/withKeyboardFocus.js.map +1 -1
- package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts +1 -1
- package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/Touchable/Pressable.d.ts +8 -4
- package/lib/typescript/src/components/Touchable/Pressable.d.ts.map +1 -1
- package/lib/typescript/src/types/WithKeyboardFocus.d.ts +7 -7
- package/lib/typescript/src/types/WithKeyboardFocus.d.ts.map +1 -1
- package/lib/typescript/src/utils/withKeyboardFocus.d.ts +2 -2
- package/lib/typescript/src/utils/withKeyboardFocus.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/RenderPropComponent/RenderPropComponent.tsx +1 -0
- package/src/components/Touchable/Pressable.tsx +3 -1
- package/src/types/WithKeyboardFocus.ts +16 -12
- package/src/utils/withKeyboardFocus.tsx +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","RenderPropComponent","render","React","isValidElement","Component","jsx","exports"],"sourceRoot":"../../../../src","sources":["components/RenderPropComponent/RenderPropComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyE,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_jsxRuntime","e","__esModule","default","RenderPropComponent","render","React","isValidElement","Component","jsx","exports"],"sourceRoot":"../../../../src","sources":["components/RenderPropComponent/RenderPropComponent.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAyE,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQlE,MAAMG,mBAAmB,GAAGA,CAAC;EAAEC;AAA+B,CAAC,KAAK;EACzE,iBAAIC,cAAK,CAACC,cAAc,CAACF,MAAM,CAAC,EAAE;IAChC,OAAOA,MAAM;EACf,CAAC,MAAM,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;IACvC,MAAMG,SAAS,GAAGH,MAAM;IACxB,oBAAO,IAAAL,WAAA,CAAAS,GAAA,EAACD,SAAS,IAAE,CAAC;EACtB,CAAC,MAAM;IACL,OAAO,IAAI;EACb;AACF,CAAC;AAACE,OAAA,CAAAN,mBAAA,GAAAA,mBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_withKeyboardFocus","Pressable","exports","withKeyboardFocus","RNPressable"],"sourceRoot":"../../../../src","sources":["components/Touchable/Pressable.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_withKeyboardFocus","Pressable","exports","withKeyboardFocus","RNPressable"],"sourceRoot":"../../../../src","sources":["components/Touchable/Pressable.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAOA,IAAAC,kBAAA,GAAAD,OAAA;AAGO,MAAME,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAAE,oCAAiB,EAACC,sBAAW,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_components","_useFocusStyle","_RenderPropComponent","_useKeyboardPress","_IsViewFocusedContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","withKeyboardFocus","Component","WithKeyboardFocus","React","memo","forwardRef","allProps","ref","tintType","autoFocus","focusStyle","style","containerStyle","onFocusChange","onPress","onLongPress","onKeyUpPress","onKeyDownPress","onPressIn","onPressOut","group","haloEffect","canBeFocused","focusable","tintColor","onFocus","onBlur","containerFocusStyle","FocusHoverComponent","viewRef","componentRef","haloCornerRadius","haloExpendX","haloExpendY","groupIdentifier","withPressedStyle","triggerCodes","exposeMethods","enableA11yFocus","screenAutoA11yFocus","screenAutoA11yFocusDelay","orderIndex","orderGroup","orderId","orderLeft","orderRight","orderUp","orderDown","orderForward","orderBackward","orderFirst","orderLast","lockFocus","onComponentFocus","onComponentBlur","props","focused","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","hoverColor","useFocusStyle","withHaloEffect","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","useKeyboardPress","HoverComponent","useMemo","jsx","View","styles","absolute","opacity","undefined","onContextMenuHandler","useCallback","IsViewFocusedContext","Provider","value","children","jsxs","BaseKeyboardView","onContextMenuPress","RenderPropComponent","render","wrappedComponentName","displayName","name","exports","StyleSheet","create","position","top","left","right","bottom"],"sourceRoot":"../../../src","sources":["utils/withKeyboardFocus.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAMA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAAuE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGhE,MAAMkB,iBAAiB,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_components","_useFocusStyle","_RenderPropComponent","_useKeyboardPress","_IsViewFocusedContext","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","withKeyboardFocus","Component","WithKeyboardFocus","React","memo","forwardRef","allProps","ref","tintType","autoFocus","focusStyle","style","containerStyle","onFocusChange","onPress","onLongPress","onKeyUpPress","onKeyDownPress","onPressIn","onPressOut","group","haloEffect","canBeFocused","focusable","tintColor","onFocus","onBlur","containerFocusStyle","FocusHoverComponent","viewRef","componentRef","haloCornerRadius","haloExpendX","haloExpendY","groupIdentifier","withPressedStyle","triggerCodes","exposeMethods","enableA11yFocus","screenAutoA11yFocus","screenAutoA11yFocusDelay","orderIndex","orderGroup","orderId","orderLeft","orderRight","orderUp","orderDown","orderForward","orderBackward","orderFirst","orderLast","lockFocus","onComponentFocus","onComponentBlur","props","focused","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","hoverColor","useFocusStyle","withHaloEffect","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","useKeyboardPress","HoverComponent","useMemo","jsx","View","styles","absolute","opacity","undefined","onContextMenuHandler","useCallback","IsViewFocusedContext","Provider","value","children","jsxs","BaseKeyboardView","onContextMenuPress","RenderPropComponent","render","wrappedComponentName","displayName","name","exports","StyleSheet","create","position","top","left","right","bottom"],"sourceRoot":"../../../src","sources":["utils/withKeyboardFocus.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AAMA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAAuE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA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reList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","jsx","_jsx","RenderPropComponent","render","isValidElement","Component"],"sourceRoot":"../../../../src","sources":["components/RenderPropComponent/RenderPropComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAqD,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","jsx","_jsx","RenderPropComponent","render","isValidElement","Component"],"sourceRoot":"../../../../src","sources":["components/RenderPropComponent/RenderPropComponent.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAqD,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQzE,OAAO,MAAMC,mBAAmB,GAAGA,CAAC;EAAEC;AAA+B,CAAC,KAAK;EACzE,iBAAIJ,KAAK,CAACK,cAAc,CAACD,MAAM,CAAC,EAAE;IAChC,OAAOA,MAAM;EACf,CAAC,MAAM,IAAI,OAAOA,MAAM,KAAK,UAAU,EAAE;IACvC,MAAME,SAAS,GAAGF,MAAM;IACxB,oBAAOF,IAAA,CAACI,SAAS,IAAE,CAAC;EACtB,CAAC,MAAM;IACL,OAAO,IAAI;EACb;AACF,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Pressable","RNPressable","withKeyboardFocus"],"sourceRoot":"../../../../src","sources":["components/Touchable/Pressable.tsx"],"mappings":";;AAAA,SACEA,SAAS,IAAIC,WAAW,
|
|
1
|
+
{"version":3,"names":["Pressable","RNPressable","withKeyboardFocus"],"sourceRoot":"../../../../src","sources":["components/Touchable/Pressable.tsx"],"mappings":";;AAAA,SACEA,SAAS,IAAIC,WAAW,QAInB,cAAc;AAErB,SAASC,iBAAiB,QAAQ,+BAA+B;AAGjE,OAAO,MAAMF,SAAS,GAAGE,iBAAiB,CAACD,WAAW,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","View","StyleSheet","BaseKeyboardView","useFocusStyle","RenderPropComponent","useKeyboardPress","IsViewFocusedContext","jsx","_jsx","jsxs","_jsxs","withKeyboardFocus","Component","WithKeyboardFocus","memo","forwardRef","allProps","ref","tintType","autoFocus","focusStyle","style","containerStyle","onFocusChange","onPress","onLongPress","onKeyUpPress","onKeyDownPress","onPressIn","onPressOut","group","haloEffect","canBeFocused","focusable","tintColor","onFocus","onBlur","containerFocusStyle","FocusHoverComponent","viewRef","componentRef","haloCornerRadius","haloExpendX","haloExpendY","groupIdentifier","withPressedStyle","triggerCodes","exposeMethods","enableA11yFocus","screenAutoA11yFocus","screenAutoA11yFocusDelay","orderIndex","orderGroup","orderId","orderLeft","orderRight","orderUp","orderDown","orderForward","orderBackward","orderFirst","orderLast","lockFocus","onComponentFocus","onComponentBlur","props","focused","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","hoverColor","withHaloEffect","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","HoverComponent","styles","absolute","opacity","undefined","onContextMenuHandler","Provider","value","children","onContextMenuPress","render","wrappedComponentName","displayName","name","create","position","top","left","right","bottom"],"sourceRoot":"../../../src","sources":["utils/withKeyboardFocus.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAwB,OAAO;AACnE,SAASC,IAAI,EAAEC,UAAU,QAAwB,cAAc;AAC/D,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,aAAa,QAAQ,iBAAiB;AAM/C,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,SAASC,gBAAgB,QAAQ,qCAAqC;AACtE,SAASC,oBAAoB,QAAQ,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGvE,OAAO,MAAMC,iBAAiB,
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","View","StyleSheet","BaseKeyboardView","useFocusStyle","RenderPropComponent","useKeyboardPress","IsViewFocusedContext","jsx","_jsx","jsxs","_jsxs","withKeyboardFocus","Component","WithKeyboardFocus","memo","forwardRef","allProps","ref","tintType","autoFocus","focusStyle","style","containerStyle","onFocusChange","onPress","onLongPress","onKeyUpPress","onKeyDownPress","onPressIn","onPressOut","group","haloEffect","canBeFocused","focusable","tintColor","onFocus","onBlur","containerFocusStyle","FocusHoverComponent","viewRef","componentRef","haloCornerRadius","haloExpendX","haloExpendY","groupIdentifier","withPressedStyle","triggerCodes","exposeMethods","enableA11yFocus","screenAutoA11yFocus","screenAutoA11yFocusDelay","orderIndex","orderGroup","orderId","orderLeft","orderRight","orderUp","orderDown","orderForward","orderBackward","orderFirst","orderLast","lockFocus","onComponentFocus","onComponentBlur","props","focused","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","hoverColor","withHaloEffect","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","HoverComponent","styles","absolute","opacity","undefined","onContextMenuHandler","Provider","value","children","onContextMenuPress","render","wrappedComponentName","displayName","name","create","position","top","left","right","bottom"],"sourceRoot":"../../../src","sources":["utils/withKeyboardFocus.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAwB,OAAO;AACnE,SAASC,IAAI,EAAEC,UAAU,QAAwB,cAAc;AAC/D,SAASC,gBAAgB,QAAQ,eAAe;AAEhD,SAASC,aAAa,QAAQ,iBAAiB;AAM/C,SAASC,mBAAmB,QAAQ,uDAAuD;AAC3F,SAASC,gBAAgB,QAAQ,qCAAqC;AACtE,SAASC,oBAAoB,QAAQ,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGvE,OAAO,MAAMC,iBAAiB,GAK5BC,SAAqD,IAClD;EACH,MAAMC,iBAAiB,gBAAGhB,KAAK,CAACiB,IAAI,cAClCjB,KAAK,CAACkB,UAAU,CAGd,CAACC,QAAQ,EAAEC,GAAG,KAAK;IACnB,MAAM;MACJC,QAAQ,GAAG,SAAS;MACpBC,SAAS;M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AAE;IACPA,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FunctionComponent, type ReactElement } from 'react';
|
|
2
|
-
export type RenderProp = ReactElement | FunctionComponent | (() => ReactElement);
|
|
2
|
+
export type RenderProp = ReactElement | FunctionComponent | FunctionComponent<{}> | (() => ReactElement);
|
|
3
3
|
export declare const RenderPropComponent: ({ render }: {
|
|
4
4
|
render: RenderProp;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderPropComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/RenderPropComponent/RenderPropComponent.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzE,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,iBAAiB,GACjB,CAAC,MAAM,YAAY,CAAC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,GAAI,YAAY;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,mDASrE,CAAC"}
|
|
1
|
+
{"version":3,"file":"RenderPropComponent.d.ts","sourceRoot":"","sources":["../../../../../src/components/RenderPropComponent/RenderPropComponent.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzE,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,iBAAiB,GACjB,iBAAiB,CAAC,EAAE,CAAC,GACrB,CAAC,MAAM,YAAY,CAAC,CAAC;AAEzB,eAAO,MAAM,mBAAmB,GAAI,YAAY;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,mDASrE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PressableProps, type ViewProps } from 'react-native';
|
|
1
|
+
import { type PressableProps, type ViewProps, type View } from 'react-native';
|
|
2
2
|
import type { WithKeyboardPropsTypeDeclaration } from '../../types/WithKeyboardFocus';
|
|
3
3
|
export declare const Pressable: import("react").NamedExoticComponent<Omit<import("../..").WithKeyboardFocus<Omit<Readonly<Omit<Omit<Readonly<Omit<Readonly<{
|
|
4
4
|
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
|
|
@@ -148,11 +148,15 @@ export declare const Pressable: import("react").NamedExoticComponent<Omit<import
|
|
|
148
148
|
testOnly_pressed?: boolean | undefined;
|
|
149
149
|
unstable_pressDelay?: number | undefined;
|
|
150
150
|
}>, never>>, "ref"> & {
|
|
151
|
-
ref?: React.Ref<React.ComponentRef<typeof
|
|
152
|
-
}, unknown
|
|
151
|
+
ref?: React.Ref<React.ComponentRef<typeof View>>;
|
|
152
|
+
}, unknown, (props: Omit<ViewProps, keyof {
|
|
153
|
+
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
154
|
+
}> & {
|
|
155
|
+
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
156
|
+
}) => React.ReactNode>, "ref"> & import("react").RefAttributes<((props: Omit<ViewProps, keyof {
|
|
153
157
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
154
158
|
}> & {
|
|
155
159
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
156
160
|
}) => React.ReactNode) | import("../..").KeyboardFocus>>;
|
|
157
|
-
export type KeyboardPressableProps = WithKeyboardPropsTypeDeclaration<PressableProps, ViewProps['style']>;
|
|
161
|
+
export type KeyboardPressableProps = WithKeyboardPropsTypeDeclaration<PressableProps, ViewProps['style'], View>;
|
|
158
162
|
//# sourceMappingURL=Pressable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../../src/components/Touchable/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAEtF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAO0W,CAAC;;OAAyE,CAAC;;OAA3E,CAAC;;OAAyE,CAAC;wDAPpZ,CAAC;AAExD,MAAM,MAAM,sBAAsB,GAAG,gCAAgC,CACnE,cAAc,EACd,SAAS,CAAC,OAAO,CAAC,EAClB,IAAI,CACL,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PressableProps, ViewProps } from 'react-native';
|
|
1
|
+
import type { PressableProps, View, ViewProps } from 'react-native';
|
|
2
2
|
import type { FocusStyle } from './FocusStyle';
|
|
3
3
|
import type { KeyboardFocus, OnKeyPress } from './BaseKeyboardView';
|
|
4
4
|
import type { FocusViewProps } from './KeyboardFocusView.types';
|
|
@@ -16,12 +16,12 @@ export type KeyboardPressType<ComponentProps extends object> = {
|
|
|
16
16
|
onComponentFocus?: PickProp<ComponentProps, 'onFocus'>;
|
|
17
17
|
onComponentBlur?: PickProp<ComponentProps, 'onBlur'>;
|
|
18
18
|
};
|
|
19
|
-
export type WithKeyboardProps<
|
|
19
|
+
export type WithKeyboardProps<ViewType = View, ViewStyleType = unknown> = {
|
|
20
20
|
withPressedStyle?: boolean;
|
|
21
21
|
containerStyle?: ViewStyleType | ViewProps['style'];
|
|
22
22
|
containerFocusStyle?: FocusStyle;
|
|
23
23
|
tintType?: TintType;
|
|
24
|
-
componentRef?: React.RefObject<
|
|
24
|
+
componentRef?: React.RefObject<ViewType>;
|
|
25
25
|
FocusHoverComponent?: RenderProp;
|
|
26
26
|
style?: PressableProps['style'];
|
|
27
27
|
onBlur?: (() => void) | ((e: any) => void) | null;
|
|
@@ -29,10 +29,10 @@ export type WithKeyboardProps<R = unknown, ViewStyleType = unknown> = {
|
|
|
29
29
|
};
|
|
30
30
|
type KeyboardFocusBaseProps = Omit<FocusViewProps, 'onPress' | 'onLongPress' | 'onBlur' | 'onFocus'>;
|
|
31
31
|
type MergeProps<BaseProps extends object, OverrideProps extends object> = Omit<BaseProps, keyof OverrideProps> & OverrideProps;
|
|
32
|
-
type KeyboardFocusOverrideProps<ComponentProps extends object, ViewStyleType> = KeyboardPressType<ComponentProps> & KeyboardFocusBaseProps & WithKeyboardProps<
|
|
33
|
-
export type WithKeyboardFocus<ComponentProps extends object, ViewStyleType> = MergeProps<ComponentProps, KeyboardFocusOverrideProps<ComponentProps, ViewStyleType>>;
|
|
34
|
-
export type WithKeyboardPropsTypeDeclaration<ComponentProps extends object, ViewStyleType> = WithKeyboardFocus<ComponentProps, ViewStyleType> & RefAttributes<KeyboardFocus>;
|
|
35
|
-
export type WithKeyboardFocusDeclaration<ComponentProps extends object, ViewStyleType> = React.JSXElementConstructor<WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType>> | React.ForwardRefExoticComponent<WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType>>;
|
|
32
|
+
type KeyboardFocusOverrideProps<ComponentProps extends object, ViewStyleType, ViewType = View> = KeyboardPressType<ComponentProps> & KeyboardFocusBaseProps & WithKeyboardProps<ViewType, ViewStyleType>;
|
|
33
|
+
export type WithKeyboardFocus<ComponentProps extends object, ViewStyleType, ViewType = View> = MergeProps<ComponentProps, KeyboardFocusOverrideProps<ComponentProps, ViewStyleType, ViewType>>;
|
|
34
|
+
export type WithKeyboardPropsTypeDeclaration<ComponentProps extends object, ViewStyleType, ViewType = View> = WithKeyboardFocus<ComponentProps, ViewStyleType, ViewType> & RefAttributes<KeyboardFocus>;
|
|
35
|
+
export type WithKeyboardFocusDeclaration<ComponentProps extends object, ViewStyleType, ViewType = View> = React.JSXElementConstructor<WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType, ViewType>> | React.ForwardRefExoticComponent<WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType, ViewType>>;
|
|
36
36
|
export type TintType = 'default' | 'hover' | 'background' | 'none';
|
|
37
37
|
export {};
|
|
38
38
|
//# sourceMappingURL=WithKeyboardFocus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/types/WithKeyboardFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"WithKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/types/WithKeyboardFocus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,UAAU,GAClB,KAAK,CAAC,YAAY,GAClB,KAAK,CAAC,iBAAiB,GACvB,CAAC,MAAM,KAAK,CAAC,YAAY,CAAC,CAAC;AAE/B,KAAK,oBAAoB,GAAG,CAAC,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;AAErD,KAA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,SAAS,MAAM,EAC7B,aAAa,EACb,QAAQ,GAAG,IAAI,IAEb,KAAK,CAAC,qBAAqB,CACzB,gCAAgC,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,CAAC,CAC1E,GACD,KAAK,CAAC,yBAAyB,CAC7B,gCAAgC,CAAC,cAAc,EAAE,aAAa,EAAE,QAAQ,CAAC,CAC1E,CAAC;AAEN,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,MAAM,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type ViewProps } from 'react-native';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
3
|
import type { KeyboardFocus } from '../types/BaseKeyboardView';
|
|
4
4
|
import type { WithKeyboardFocus, WithKeyboardFocusComponent } from '../types/WithKeyboardFocus';
|
|
5
|
-
export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType>(Component: WithKeyboardFocusComponent<ComponentProps>) => React.NamedExoticComponent<React.PropsWithoutRef<WithKeyboardFocus<ComponentProps, ViewStyleType>> & React.RefAttributes<((props: Omit<ViewProps, keyof {
|
|
5
|
+
export declare const withKeyboardFocus: <ComponentProps extends object, ViewStyleType, ViewType = View>(Component: WithKeyboardFocusComponent<ComponentProps>) => React.NamedExoticComponent<React.PropsWithoutRef<WithKeyboardFocus<ComponentProps, ViewStyleType, ViewType>> & React.RefAttributes<((props: Omit<ViewProps, keyof {
|
|
6
6
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
7
7
|
}> & {
|
|
8
8
|
ref?: React.Ref<React.ComponentRef<typeof import("react-native").unstable_NativeView>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,
|
|
1
|
+
{"version":3,"file":"withKeyboardFocus.d.ts","sourceRoot":"","sources":["../../../../src/utils/withKeyboardFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,IAAI,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAc,MAAM,2BAA2B,CAAC;AAE3E,OAAO,KAAK,EAEV,iBAAiB,EACjB,0BAA0B,EAC3B,MAAM,4BAA4B,CAAC;AAMpC,eAAO,MAAM,iBAAiB,GAC5B,cAAc,SAAS,MAAM,EAC7B,aAAa,EACb,QAAQ,GAAG,IAAI,EAEf,WAAW,0BAA0B,CAAC,cAAc,CAAC;OAFjD,CAAC;;OAGJ,CAAC;wCA+KH,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import React, { type FunctionComponent, type ReactElement } from 'react';
|
|
|
3
3
|
export type RenderProp =
|
|
4
4
|
| ReactElement
|
|
5
5
|
| FunctionComponent
|
|
6
|
+
| FunctionComponent<{}>
|
|
6
7
|
| (() => ReactElement);
|
|
7
8
|
|
|
8
9
|
export const RenderPropComponent = ({ render }: { render: RenderProp }) => {
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
Pressable as RNPressable,
|
|
3
3
|
type PressableProps,
|
|
4
4
|
type ViewProps,
|
|
5
|
+
type View,
|
|
5
6
|
} from 'react-native';
|
|
6
7
|
|
|
7
8
|
import { withKeyboardFocus } from '../../utils/withKeyboardFocus';
|
|
@@ -11,5 +12,6 @@ export const Pressable = withKeyboardFocus(RNPressable);
|
|
|
11
12
|
|
|
12
13
|
export type KeyboardPressableProps = WithKeyboardPropsTypeDeclaration<
|
|
13
14
|
PressableProps,
|
|
14
|
-
ViewProps['style']
|
|
15
|
+
ViewProps['style'],
|
|
16
|
+
View
|
|
15
17
|
>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PressableProps, ViewProps } from 'react-native';
|
|
1
|
+
import type { PressableProps, View, ViewProps } from 'react-native';
|
|
2
2
|
import type { FocusStyle } from './FocusStyle';
|
|
3
3
|
import type { KeyboardFocus, OnKeyPress } from './BaseKeyboardView';
|
|
4
4
|
import type { FocusViewProps } from './KeyboardFocusView.types';
|
|
@@ -36,12 +36,12 @@ export type KeyboardPressType<ComponentProps extends object> = {
|
|
|
36
36
|
onComponentBlur?: PickProp<ComponentProps, 'onBlur'>;
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
export type WithKeyboardProps<
|
|
39
|
+
export type WithKeyboardProps<ViewType = View, ViewStyleType = unknown> = {
|
|
40
40
|
withPressedStyle?: boolean;
|
|
41
41
|
containerStyle?: ViewStyleType | ViewProps['style'];
|
|
42
42
|
containerFocusStyle?: FocusStyle;
|
|
43
43
|
tintType?: TintType;
|
|
44
|
-
componentRef?: React.RefObject<
|
|
44
|
+
componentRef?: React.RefObject<ViewType>;
|
|
45
45
|
FocusHoverComponent?: RenderProp;
|
|
46
46
|
style?: PressableProps['style'];
|
|
47
47
|
onBlur?: (() => void) | ((e: any) => void) | null;
|
|
@@ -61,34 +61,38 @@ type MergeProps<BaseProps extends object, OverrideProps extends object> = Omit<
|
|
|
61
61
|
|
|
62
62
|
type KeyboardFocusOverrideProps<
|
|
63
63
|
ComponentProps extends object,
|
|
64
|
-
ViewStyleType
|
|
64
|
+
ViewStyleType,
|
|
65
|
+
ViewType = View
|
|
65
66
|
> = KeyboardPressType<ComponentProps> &
|
|
66
67
|
KeyboardFocusBaseProps &
|
|
67
|
-
WithKeyboardProps<
|
|
68
|
+
WithKeyboardProps<ViewType, ViewStyleType>;
|
|
68
69
|
|
|
69
70
|
export type WithKeyboardFocus<
|
|
70
71
|
ComponentProps extends object,
|
|
71
|
-
ViewStyleType
|
|
72
|
+
ViewStyleType,
|
|
73
|
+
ViewType = View
|
|
72
74
|
> = MergeProps<
|
|
73
75
|
ComponentProps,
|
|
74
|
-
KeyboardFocusOverrideProps<ComponentProps, ViewStyleType>
|
|
76
|
+
KeyboardFocusOverrideProps<ComponentProps, ViewStyleType, ViewType>
|
|
75
77
|
>;
|
|
76
78
|
|
|
77
79
|
export type WithKeyboardPropsTypeDeclaration<
|
|
78
80
|
ComponentProps extends object,
|
|
79
|
-
ViewStyleType
|
|
80
|
-
|
|
81
|
+
ViewStyleType,
|
|
82
|
+
ViewType = View
|
|
83
|
+
> = WithKeyboardFocus<ComponentProps, ViewStyleType, ViewType> &
|
|
81
84
|
RefAttributes<KeyboardFocus>;
|
|
82
85
|
|
|
83
86
|
export type WithKeyboardFocusDeclaration<
|
|
84
87
|
ComponentProps extends object,
|
|
85
|
-
ViewStyleType
|
|
88
|
+
ViewStyleType,
|
|
89
|
+
ViewType = View
|
|
86
90
|
> =
|
|
87
91
|
| React.JSXElementConstructor<
|
|
88
|
-
WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType>
|
|
92
|
+
WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType, ViewType>
|
|
89
93
|
>
|
|
90
94
|
| React.ForwardRefExoticComponent<
|
|
91
|
-
WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType>
|
|
95
|
+
WithKeyboardPropsTypeDeclaration<ComponentProps, ViewStyleType, ViewType>
|
|
92
96
|
>;
|
|
93
97
|
|
|
94
98
|
export type TintType = 'default' | 'hover' | 'background' | 'none';
|
|
@@ -13,13 +13,17 @@ import { useKeyboardPress } from './useKeyboardPress/useKeyboardPress';
|
|
|
13
13
|
import { IsViewFocusedContext } from '../context/IsViewFocusedContext';
|
|
14
14
|
import type { FocusViewProps } from '../types/KeyboardFocusView.types';
|
|
15
15
|
|
|
16
|
-
export const withKeyboardFocus = <
|
|
16
|
+
export const withKeyboardFocus = <
|
|
17
|
+
ComponentProps extends object,
|
|
18
|
+
ViewStyleType,
|
|
19
|
+
ViewType = View
|
|
20
|
+
>(
|
|
17
21
|
Component: WithKeyboardFocusComponent<ComponentProps>
|
|
18
22
|
) => {
|
|
19
23
|
const WithKeyboardFocus = React.memo(
|
|
20
24
|
React.forwardRef<
|
|
21
25
|
View | KeyboardFocus,
|
|
22
|
-
WithKeyboardFocus<ComponentProps, ViewStyleType>
|
|
26
|
+
WithKeyboardFocus<ComponentProps, ViewStyleType, ViewType>
|
|
23
27
|
>((allProps, ref) => {
|
|
24
28
|
const {
|
|
25
29
|
tintType = 'default',
|