@grupalia/rn-ui-kit 0.108.0 → 0.109.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/lib/commonjs/components/SignatureApiWebView.js +53 -0
- package/lib/commonjs/components/SignatureApiWebView.js.map +1 -1
- package/lib/module/components/SignatureApiWebView.js +53 -0
- package/lib/module/components/SignatureApiWebView.js.map +1 -1
- package/lib/typescript/commonjs/components/SignatureApiWebView.d.ts.map +1 -1
- package/lib/typescript/module/components/SignatureApiWebView.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,11 +8,64 @@ var _expoConstants = _interopRequireDefault(require("expo-constants"));
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
var _headless = _interopRequireDefault(require("react-hot-toast/headless"));
|
|
10
10
|
var _reactNativeWebview = require("react-native-webview");
|
|
11
|
+
var _colors = _interopRequireDefault(require("../styles/colors"));
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const CHECKBOX_RIPPLE_CSS = `
|
|
16
|
+
@keyframes checkbox-ripple {
|
|
17
|
+
0% { transform: scale(0.6); opacity: 0.5; }
|
|
18
|
+
100% { transform: scale(1.2); opacity: 0; }
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.checkbox-ripple__wrapper {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.checkbox-ripple__wrapper:has(input:not(:checked))::before {
|
|
29
|
+
content: '';
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: -30%;
|
|
32
|
+
border-radius: 0.5rem;
|
|
33
|
+
border: 2px solid var(--color-accent-color, ${_colors.default.brand[500]});
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
animation: checkbox-ripple 1.25s ease-out infinite;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.checkbox-ripple__wrapper > input[type="checkbox"] {
|
|
39
|
+
margin: 0 !important;
|
|
40
|
+
}
|
|
41
|
+
`;
|
|
42
|
+
const INJECTED_CHECKBOX_RIPPLE_EFFECT = `
|
|
43
|
+
const style = document.createElement('style');
|
|
44
|
+
style.textContent = ${JSON.stringify(CHECKBOX_RIPPLE_CSS)};
|
|
45
|
+
document.head.appendChild(style);
|
|
46
|
+
|
|
47
|
+
function wrapCheckboxes() {
|
|
48
|
+
const checkboxes = document.querySelectorAll('.agreement input[type="checkbox"]');
|
|
49
|
+
|
|
50
|
+
checkboxes.forEach(function(input) {
|
|
51
|
+
if (!input.parentElement || input.parentElement.classList.contains('checkbox-ripple__wrapper')) return;
|
|
52
|
+
const wrapper = document.createElement('div');
|
|
53
|
+
|
|
54
|
+
wrapper.className = 'checkbox-ripple__wrapper';
|
|
55
|
+
input.parentElement.insertBefore(wrapper, input);
|
|
56
|
+
|
|
57
|
+
wrapper.appendChild(input);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const observer = new MutationObserver(wrapCheckboxes);
|
|
62
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
63
|
+
wrapCheckboxes();
|
|
64
|
+
`;
|
|
14
65
|
const INJECTED_JS = `
|
|
15
66
|
(function() {
|
|
67
|
+
${INJECTED_CHECKBOX_RIPPLE_EFFECT}
|
|
68
|
+
|
|
16
69
|
function isLandscape() {
|
|
17
70
|
if (screen.orientation && screen.orientation.type) {
|
|
18
71
|
return screen.orientation.type.includes('landscape');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_expoConstants","_interopRequireDefault","require","_react","_interopRequireWildcard","_headless","_reactNativeWebview","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","INJECTED_JS","SignatureApiWebView","ceremonyUrl","onCompleted","onCanceled","onFailed","embeddedCeremonyUrl","handleMessage","useCallback","event","data","
|
|
1
|
+
{"version":3,"names":["_expoConstants","_interopRequireDefault","require","_react","_interopRequireWildcard","_headless","_reactNativeWebview","_colors","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","CHECKBOX_RIPPLE_CSS","colors","brand","INJECTED_CHECKBOX_RIPPLE_EFFECT","JSON","stringify","INJECTED_JS","SignatureApiWebView","ceremonyUrl","onCompleted","onCanceled","onFailed","embeddedCeremonyUrl","handleMessage","useCallback","event","data","parse","nativeEvent","type","error","toast","jsx","WebView","source","uri","onMessage","originWhitelist","style","flex","marginTop","Constants","statusBarHeight","injectedJavaScript"],"sourceRoot":"../../../src","sources":["components/SignatureApiWebView.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AAAsC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAE,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAA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K,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,SAAS,EAAEC,sBAAS,CAACC;IAAgB,CAAE;IACzDC,kBAAkB,EAAE3B;EAAY,CACjC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -4,9 +4,62 @@ import Constants from 'expo-constants';
|
|
|
4
4
|
import React, { useCallback } from 'react';
|
|
5
5
|
import toast from 'react-hot-toast/headless';
|
|
6
6
|
import { WebView } from 'react-native-webview';
|
|
7
|
+
import colors from "../styles/colors.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const CHECKBOX_RIPPLE_CSS = `
|
|
10
|
+
@keyframes checkbox-ripple {
|
|
11
|
+
0% { transform: scale(0.6); opacity: 0.5; }
|
|
12
|
+
100% { transform: scale(1.2); opacity: 0; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.checkbox-ripple__wrapper {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.checkbox-ripple__wrapper:has(input:not(:checked))::before {
|
|
23
|
+
content: '';
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: -30%;
|
|
26
|
+
border-radius: 0.5rem;
|
|
27
|
+
border: 2px solid var(--color-accent-color, ${colors.brand[500]});
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
animation: checkbox-ripple 1.25s ease-out infinite;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.checkbox-ripple__wrapper > input[type="checkbox"] {
|
|
33
|
+
margin: 0 !important;
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
const INJECTED_CHECKBOX_RIPPLE_EFFECT = `
|
|
37
|
+
const style = document.createElement('style');
|
|
38
|
+
style.textContent = ${JSON.stringify(CHECKBOX_RIPPLE_CSS)};
|
|
39
|
+
document.head.appendChild(style);
|
|
40
|
+
|
|
41
|
+
function wrapCheckboxes() {
|
|
42
|
+
const checkboxes = document.querySelectorAll('.agreement input[type="checkbox"]');
|
|
43
|
+
|
|
44
|
+
checkboxes.forEach(function(input) {
|
|
45
|
+
if (!input.parentElement || input.parentElement.classList.contains('checkbox-ripple__wrapper')) return;
|
|
46
|
+
const wrapper = document.createElement('div');
|
|
47
|
+
|
|
48
|
+
wrapper.className = 'checkbox-ripple__wrapper';
|
|
49
|
+
input.parentElement.insertBefore(wrapper, input);
|
|
50
|
+
|
|
51
|
+
wrapper.appendChild(input);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const observer = new MutationObserver(wrapCheckboxes);
|
|
56
|
+
observer.observe(document.body, { childList: true, subtree: true });
|
|
57
|
+
wrapCheckboxes();
|
|
58
|
+
`;
|
|
8
59
|
const INJECTED_JS = `
|
|
9
60
|
(function() {
|
|
61
|
+
${INJECTED_CHECKBOX_RIPPLE_EFFECT}
|
|
62
|
+
|
|
10
63
|
function isLandscape() {
|
|
11
64
|
if (screen.orientation && screen.orientation.type) {
|
|
12
65
|
return screen.orientation.type.includes('landscape');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Constants","React","useCallback","toast","WebView","jsx","_jsx","INJECTED_JS","SignatureApiWebView","ceremonyUrl","onCompleted","onCanceled","onFailed","embeddedCeremonyUrl","handleMessage","event","data","
|
|
1
|
+
{"version":3,"names":["Constants","React","useCallback","toast","WebView","colors","jsx","_jsx","CHECKBOX_RIPPLE_CSS","brand","INJECTED_CHECKBOX_RIPPLE_EFFECT","JSON","stringify","INJECTED_JS","SignatureApiWebView","ceremonyUrl","onCompleted","onCanceled","onFailed","embeddedCeremonyUrl","handleMessage","event","data","parse","nativeEvent","type","error","source","uri","onMessage","originWhitelist","style","flex","marginTop","statusBarHeight","injectedJavaScript"],"sourceRoot":"../../../src","sources":["components/SignatureApiWebView.tsx"],"mappings":";;AAAA,OAAOA,SAAS,MAAM,gBAAgB;AACtC,OAAOC,KAAK,IAAIC,WAA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AAQ,CAAC,CAAC;UACV;QACF;UACE;MACJ;IACF,CAAC,CAAC,OAAOQ,KAAK,EAAE;MACdvB,KAAK,CAACuB,KAAK,CAAC,wDAAwD,CAAC;IACvE;EACF,CAAC,EAAE,CAACT,UAAU,EAAED,WAAW,EAAEE,QAAQ,CAAC,CAAC;EAEvC,oBACEX,IAAA,CAACH,OAAO;IACNuB,MAAM,EAAE;MAAEC,GAAG,EAAET;IAAoB,CAAE;IACrCU,SAAS,EAAET,aAAc;IACzBU,eAAe,EAAE,CAAC,GAAG,CAAE;IACvBC,KAAK,EAAE;MAAEC,IAAI,EAAE,CAAC;MAAEC,SAAS,EAAEjC,SAAS,CAACkC;IAAgB,CAAE;IACzDC,kBAAkB,EAAEtB;EAAY,CACjC,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureApiWebView.d.ts","sourceRoot":"","sources":["../../../../src/components/SignatureApiWebView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SignatureApiWebView.d.ts","sourceRoot":"","sources":["../../../../src/components/SignatureApiWebView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAM3C,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AA2FD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,GAC/C,EAAE,wBAAwB,qBAkC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureApiWebView.d.ts","sourceRoot":"","sources":["../../../../src/components/SignatureApiWebView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SignatureApiWebView.d.ts","sourceRoot":"","sources":["../../../../src/components/SignatureApiWebView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAM3C,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AA2FD,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,EAC1C,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,GAC/C,EAAE,wBAAwB,qBAkC1B"}
|