@bifold/core 2.11.0 → 2.11.1
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/views/KeyboardView.js +19 -4
- package/lib/commonjs/components/views/KeyboardView.js.map +1 -1
- package/lib/module/components/views/KeyboardView.js +19 -4
- package/lib/module/components/views/KeyboardView.js.map +1 -1
- package/lib/typescript/src/components/views/KeyboardView.d.ts +14 -0
- package/lib/typescript/src/components/views/KeyboardView.d.ts.map +1 -1
- package/package.json +3 -3
|
@@ -4,12 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
var _elements = require("@react-navigation/elements");
|
|
7
8
|
var _react = _interopRequireDefault(require("react"));
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
|
|
10
11
|
var _theme = require("../../contexts/theme");
|
|
11
|
-
var _elements = require("@react-navigation/elements");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
13
14
|
const useSafeHeaderHeight = () => {
|
|
14
15
|
try {
|
|
15
16
|
return (0, _elements.useHeaderHeight)();
|
|
@@ -17,9 +18,23 @@ const useSafeHeaderHeight = () => {
|
|
|
17
18
|
return 100;
|
|
18
19
|
}
|
|
19
20
|
};
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* A wrapper component that provides keyboard-aware scrolling and safe area handling.
|
|
24
|
+
*
|
|
25
|
+
* This component creates a full-screen container with safe area insets and optional
|
|
26
|
+
* keyboard avoidance behavior. It's designed to be used as a top-level wrapper for
|
|
27
|
+
* screen content that may contain input fields or other interactive elements.
|
|
28
|
+
*
|
|
29
|
+
* @param children - The content to render inside the keyboard view
|
|
30
|
+
* @param keyboardAvoiding - Whether to enable keyboard avoidance behavior. When true,
|
|
31
|
+
* the view will automatically adjust its content when the keyboard appears. Defaults to true.
|
|
32
|
+
* @param scrollViewProps - Additional props to pass to the internal ScrollView component
|
|
33
|
+
*/
|
|
20
34
|
const KeyboardView = ({
|
|
21
35
|
children,
|
|
22
|
-
keyboardAvoiding = true
|
|
36
|
+
keyboardAvoiding = true,
|
|
37
|
+
scrollViewProps
|
|
23
38
|
}) => {
|
|
24
39
|
const {
|
|
25
40
|
ColorPalette
|
|
@@ -37,12 +52,12 @@ const KeyboardView = ({
|
|
|
37
52
|
},
|
|
38
53
|
keyboardVerticalOffset: headerHeight,
|
|
39
54
|
behavior: "padding"
|
|
40
|
-
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, _extends({
|
|
41
56
|
contentContainerStyle: {
|
|
42
57
|
flexGrow: 1
|
|
43
58
|
},
|
|
44
59
|
keyboardShouldPersistTaps: 'handled'
|
|
45
|
-
}, children)) : /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
60
|
+
}, scrollViewProps), children)) : /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
46
61
|
contentContainerStyle: {
|
|
47
62
|
flexGrow: 1
|
|
48
63
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_elements","require","_react","_interopRequireDefault","_reactNative","_reactNativeSafeAreaContext","_theme","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","useSafeHeaderHeight","useHeaderHeight","KeyboardView","children","keyboardAvoiding","scrollViewProps","ColorPalette","useTheme","headerHeight","createElement","SafeAreaView","style","flex","backgroundColor","brand","primaryBackground","edges","KeyboardAvoidingView","keyboardVerticalOffset","behavior","ScrollView","contentContainerStyle","flexGrow","keyboardShouldPersistTaps","_default","exports"],"sourceRoot":"../../../../src","sources":["components/views/KeyboardView.tsx"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAA+C,SAAAE,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAE/C,MAAMO,mBAAmB,GAAGA,CAAA,KAAc;EACxC,IAAI;IACF,OAAO,IAAAC,yBAAe,EAAC,CAAC;EAC1B,CAAC,CAAC,MAAM;IACN,OAAO,GAAG;EACZ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAIJ,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,gBAAgB,GAAG,IAAI;EAAEC;AAAgB,CAAC,KAAK;EAC/D,MAAM;IAAEC;EAAa,CAAC,GAAG,IAAAC,eAAQ,EAAC,CAAC;EACnC,MAAMC,YAAY,GAAGR,mBAAmB,CAAC,CAAC;EAC1C,oBACEpB,MAAA,CAAAO,OAAA,CAAAsB,aAAA,CAAC1B,2BAAA,CAAA2B,YAAY;IACXC,KAAK,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEP,YAAY,CAACQ,KAAK,CAACC;IAAkB,CAAE;IAC1EC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO;EAAE,GAElCZ,gBAAgB,gBACfxB,MAAA,CAAAO,OAAA,CAAAsB,aAAA,CAAC3B,YAAA,CAAAmC,oBAAoB;IAACN,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE,CAAE;IAACM,sBAAsB,EAAEV,YAAa;IAACW,QAAQ,EAAC;EAAS,gBAChGvC,MAAA,CAAAO,OAAA,CAAAsB,aAAA,CAAC3B,YAAA,CAAAsC,UAAU,EAAAhC,QAAA;IACTiC,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IACvCC,yBAAyB,EAAE;EAAU,GACjClB,eAAe,GAElBF,QACS,CACQ,CAAC,gBAEvBvB,MAAA,CAAAO,OAAA,CAAAsB,aAAA,CAAC3B,YAAA,CAAAsC,UAAU;IAACC,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IAACC,yBAAyB,EAAE;EAAU,GACtFpB,QACS,CAEF,CAAC;AAEnB,CAAC;AAAA,IAAAqB,QAAA,GAAAC,OAAA,CAAAtC,OAAA,GAEce,YAAY","ignoreList":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2
|
+
import { useHeaderHeight } from '@react-navigation/elements';
|
|
1
3
|
import React from 'react';
|
|
2
4
|
import { KeyboardAvoidingView, ScrollView } from 'react-native';
|
|
3
5
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
4
6
|
import { useTheme } from '../../contexts/theme';
|
|
5
|
-
import { useHeaderHeight } from '@react-navigation/elements';
|
|
6
7
|
const useSafeHeaderHeight = () => {
|
|
7
8
|
try {
|
|
8
9
|
return useHeaderHeight();
|
|
@@ -10,9 +11,23 @@ const useSafeHeaderHeight = () => {
|
|
|
10
11
|
return 100;
|
|
11
12
|
}
|
|
12
13
|
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A wrapper component that provides keyboard-aware scrolling and safe area handling.
|
|
17
|
+
*
|
|
18
|
+
* This component creates a full-screen container with safe area insets and optional
|
|
19
|
+
* keyboard avoidance behavior. It's designed to be used as a top-level wrapper for
|
|
20
|
+
* screen content that may contain input fields or other interactive elements.
|
|
21
|
+
*
|
|
22
|
+
* @param children - The content to render inside the keyboard view
|
|
23
|
+
* @param keyboardAvoiding - Whether to enable keyboard avoidance behavior. When true,
|
|
24
|
+
* the view will automatically adjust its content when the keyboard appears. Defaults to true.
|
|
25
|
+
* @param scrollViewProps - Additional props to pass to the internal ScrollView component
|
|
26
|
+
*/
|
|
13
27
|
const KeyboardView = ({
|
|
14
28
|
children,
|
|
15
|
-
keyboardAvoiding = true
|
|
29
|
+
keyboardAvoiding = true,
|
|
30
|
+
scrollViewProps
|
|
16
31
|
}) => {
|
|
17
32
|
const {
|
|
18
33
|
ColorPalette
|
|
@@ -30,12 +45,12 @@ const KeyboardView = ({
|
|
|
30
45
|
},
|
|
31
46
|
keyboardVerticalOffset: headerHeight,
|
|
32
47
|
behavior: "padding"
|
|
33
|
-
}, /*#__PURE__*/React.createElement(ScrollView, {
|
|
48
|
+
}, /*#__PURE__*/React.createElement(ScrollView, _extends({
|
|
34
49
|
contentContainerStyle: {
|
|
35
50
|
flexGrow: 1
|
|
36
51
|
},
|
|
37
52
|
keyboardShouldPersistTaps: 'handled'
|
|
38
|
-
}, children)) : /*#__PURE__*/React.createElement(ScrollView, {
|
|
53
|
+
}, scrollViewProps), children)) : /*#__PURE__*/React.createElement(ScrollView, {
|
|
39
54
|
contentContainerStyle: {
|
|
40
55
|
flexGrow: 1
|
|
41
56
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","KeyboardAvoidingView","ScrollView","SafeAreaView","useTheme","
|
|
1
|
+
{"version":3,"names":["useHeaderHeight","React","KeyboardAvoidingView","ScrollView","SafeAreaView","useTheme","useSafeHeaderHeight","KeyboardView","children","keyboardAvoiding","scrollViewProps","ColorPalette","headerHeight","createElement","style","flex","backgroundColor","brand","primaryBackground","edges","keyboardVerticalOffset","behavior","_extends","contentContainerStyle","flexGrow","keyboardShouldPersistTaps"],"sourceRoot":"../../../../src","sources":["components/views/KeyboardView.tsx"],"mappings":";AAAA,SAASA,eAAe,QAAQ,4BAA4B;AAC5D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,oBAAoB,EAAEC,UAAU,QAAyB,cAAc;AAChF,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,QAAQ,QAAQ,sBAAsB;AAE/C,MAAMC,mBAAmB,GAAGA,CAAA,KAAc;EACxC,IAAI;IACF,OAAON,eAAe,CAAC,CAAC;EAC1B,CAAC,CAAC,MAAM;IACN,OAAO,GAAG;EACZ;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMO,YAIJ,GAAGA,CAAC;EAAEC,QAAQ;EAAEC,gBAAgB,GAAG,IAAI;EAAEC;AAAgB,CAAC,KAAK;EAC/D,MAAM;IAAEC;EAAa,CAAC,GAAGN,QAAQ,CAAC,CAAC;EACnC,MAAMO,YAAY,GAAGN,mBAAmB,CAAC,CAAC;EAC1C,oBACEL,KAAA,CAAAY,aAAA,CAACT,YAAY;IACXU,KAAK,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,eAAe,EAAEL,YAAY,CAACM,KAAK,CAACC;IAAkB,CAAE;IAC1EC,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO;EAAE,GAElCV,gBAAgB,gBACfR,KAAA,CAAAY,aAAA,CAACX,oBAAoB;IAACY,KAAK,EAAE;MAAEC,IAAI,EAAE;IAAE,CAAE;IAACK,sBAAsB,EAAER,YAAa;IAACS,QAAQ,EAAC;EAAS,gBAChGpB,KAAA,CAAAY,aAAA,CAACV,UAAU,EAAAmB,QAAA;IACTC,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IACvCC,yBAAyB,EAAE;EAAU,GACjCf,eAAe,GAElBF,QACS,CACQ,CAAC,gBAEvBP,KAAA,CAAAY,aAAA,CAACV,UAAU;IAACoB,qBAAqB,EAAE;MAAEC,QAAQ,EAAE;IAAE,CAAE;IAACC,yBAAyB,EAAE;EAAU,GACtFjB,QACS,CAEF,CAAC;AAEnB,CAAC;AAED,eAAeD,YAAY","ignoreList":[]}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ScrollViewProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* A wrapper component that provides keyboard-aware scrolling and safe area handling.
|
|
5
|
+
*
|
|
6
|
+
* This component creates a full-screen container with safe area insets and optional
|
|
7
|
+
* keyboard avoidance behavior. It's designed to be used as a top-level wrapper for
|
|
8
|
+
* screen content that may contain input fields or other interactive elements.
|
|
9
|
+
*
|
|
10
|
+
* @param children - The content to render inside the keyboard view
|
|
11
|
+
* @param keyboardAvoiding - Whether to enable keyboard avoidance behavior. When true,
|
|
12
|
+
* the view will automatically adjust its content when the keyboard appears. Defaults to true.
|
|
13
|
+
* @param scrollViewProps - Additional props to pass to the internal ScrollView component
|
|
14
|
+
*/
|
|
2
15
|
declare const KeyboardView: React.FC<{
|
|
3
16
|
children: React.ReactNode;
|
|
4
17
|
keyboardAvoiding?: boolean;
|
|
18
|
+
scrollViewProps?: ScrollViewProps;
|
|
5
19
|
}>;
|
|
6
20
|
export default KeyboardView;
|
|
7
21
|
//# sourceMappingURL=KeyboardView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyboardView.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/KeyboardView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyboardView.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/KeyboardView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAoC,eAAe,EAAE,MAAM,cAAc,CAAA;AAYhF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAA;CAClC,CAyBA,CAAA;AAED,eAAe,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bifold/core",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.1",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "~7.22.20",
|
|
42
42
|
"@babel/runtime": "~7.23.9",
|
|
43
|
-
"@bifold/oca": "2.11.
|
|
44
|
-
"@bifold/verifier": "2.11.
|
|
43
|
+
"@bifold/oca": "2.11.1",
|
|
44
|
+
"@bifold/verifier": "2.11.1",
|
|
45
45
|
"@commitlint/cli": "~11.0.0",
|
|
46
46
|
"@credo-ts/anoncreds": "0.5.17",
|
|
47
47
|
"@credo-ts/askar": "0.5.17",
|