@novasamatech/host-papp-react-ui 0.6.18 → 0.7.0-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/dist/flow/Pairing.module.css.js +33 -33
- package/dist/flow/PairingModal.js +60 -63
- package/dist/flow/PairingPopover.d.ts +8 -1
- package/dist/flow/PairingPopover.js +107 -106
- package/dist/index.css +1 -1
- package/dist/ui/QrCode.js +17 -16
- package/package.json +9 -7
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
const o = "papp_Pairing-module_popoverContent_3xnU8", r = "papp_Pairing-module_container_gH7WU", e = "papp_Pairing-module_pairingContainer_R5atH", n = "papp_Pairing-module_pairingHeader_bpfNW", i = "papp_Pairing-module_scanCallToAction_lOQ-T", a = "papp_Pairing-
|
|
1
|
+
const o = "papp_Pairing-module_popoverContent_3xnU8", r = "papp_Pairing-module_container_gH7WU", e = "papp_Pairing-module_pairingContainer_R5atH", n = "papp_Pairing-module_pairingHeader_bpfNW", i = "papp_Pairing-module_scanCallToAction_lOQ-T", a = "papp_Pairing-module_pairingDescription_UJE0U", p = "papp_Pairing-module_loaderLogo_iHsP9", t = "papp_Pairing-module_loaderContainer_cR46U", _ = "papp_Pairing-module_loaderHeader_-q0jo", l = "papp_Pairing-module_loaderText_beteT", c = "papp_Pairing-module_errorContainer_KW5T-", d = "papp_Pairing-module_errorTitle_qokH0", P = "papp_Pairing-module_popoverContainer_fOWoF", g = "papp_Pairing-module_pairingPopoverHeader_PAQot", s = "papp_Pairing-module_scanCallToActionPopover_Irz-z", C = "papp_Pairing-module_pairingDescriptionPopover_z71yj", v = "papp_Pairing-module_errorContainerPopover_4mELg", u = "papp_Pairing-module_pairingPopoverContainer_RvVnH", m = "papp_Pairing-module_errorTitlePopover_-FPrd", T = "papp_Pairing-module_errorGenericText_ZPwQb", H = "papp_Pairing-module_loaderContainerPopover_n1-JJ", x = "papp_Pairing-module_retryButton_kWeRx", A = {
|
|
2
2
|
popoverContent: o,
|
|
3
3
|
container: r,
|
|
4
4
|
pairingContainer: e,
|
|
5
5
|
pairingHeader: n,
|
|
6
6
|
scanCallToAction: i,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
errorContainerPopover: m,
|
|
7
|
+
pairingDescription: a,
|
|
8
|
+
loaderLogo: p,
|
|
9
|
+
loaderContainer: t,
|
|
10
|
+
loaderHeader: _,
|
|
11
|
+
loaderText: l,
|
|
12
|
+
errorContainer: c,
|
|
13
|
+
errorTitle: d,
|
|
14
|
+
popoverContainer: P,
|
|
15
|
+
pairingPopoverHeader: g,
|
|
16
|
+
scanCallToActionPopover: s,
|
|
17
|
+
pairingDescriptionPopover: C,
|
|
18
|
+
errorContainerPopover: v,
|
|
20
19
|
pairingPopoverContainer: u,
|
|
21
|
-
errorTitlePopover:
|
|
22
|
-
errorGenericText:
|
|
23
|
-
loaderContainerPopover:
|
|
20
|
+
errorTitlePopover: m,
|
|
21
|
+
errorGenericText: T,
|
|
22
|
+
loaderContainerPopover: H,
|
|
23
|
+
retryButton: x
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
26
|
r as container,
|
|
27
27
|
A as default,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
c as errorContainer,
|
|
29
|
+
v as errorContainerPopover,
|
|
30
|
+
T as errorGenericText,
|
|
31
|
+
d as errorTitle,
|
|
32
|
+
m as errorTitlePopover,
|
|
33
|
+
t as loaderContainer,
|
|
34
|
+
H as loaderContainerPopover,
|
|
35
|
+
_ as loaderHeader,
|
|
36
|
+
p as loaderLogo,
|
|
37
|
+
l as loaderText,
|
|
38
38
|
e as pairingContainer,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
a as pairingDescription,
|
|
40
|
+
C as pairingDescriptionPopover,
|
|
41
41
|
n as pairingHeader,
|
|
42
42
|
u as pairingPopoverContainer,
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
g as pairingPopoverHeader,
|
|
44
|
+
P as popoverContainer,
|
|
45
45
|
o as popoverContent,
|
|
46
|
-
|
|
46
|
+
x as retryButton,
|
|
47
47
|
i as scanCallToAction,
|
|
48
|
-
|
|
48
|
+
s as scanCallToActionPopover
|
|
49
49
|
};
|
|
@@ -1,107 +1,104 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { memo as
|
|
5
|
-
import { useAuthStatus as
|
|
6
|
-
import { useAuthentication as
|
|
1
|
+
import { jsx as c, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { c as S } from "react/compiler-runtime";
|
|
3
|
+
import { Button as x } from "@novasamatech/tr-ui";
|
|
4
|
+
import { memo as H, useEffect as b } from "react";
|
|
5
|
+
import { useAuthStatus as z } from "../hooks/authStatus.js";
|
|
6
|
+
import { useAuthentication as T } from "../providers/AuthProvider.js";
|
|
7
7
|
import { useTranslations as A } from "../providers/TranslationProvider.js";
|
|
8
|
-
import { LogoSmall as
|
|
9
|
-
import { Modal as
|
|
10
|
-
import { QrCode as
|
|
11
|
-
import
|
|
12
|
-
const
|
|
13
|
-
const e =
|
|
8
|
+
import { LogoSmall as D } from "../ui/LogoSmall.js";
|
|
9
|
+
import { Modal as $ } from "../ui/Modal.js";
|
|
10
|
+
import { QrCode as P } from "../ui/QrCode.js";
|
|
11
|
+
import m from "./Pairing.module.css.js";
|
|
12
|
+
const J = H((i) => {
|
|
13
|
+
const e = S(31);
|
|
14
14
|
let n;
|
|
15
15
|
e[0] !== i ? (n = i === void 0 ? {} : i, e[0] = i, e[1] = n) : n = e[1];
|
|
16
16
|
const {
|
|
17
17
|
theme: l,
|
|
18
18
|
size: r
|
|
19
|
-
} = n, s = r === void 0 ? 280 : r, a =
|
|
19
|
+
} = n, s = r === void 0 ? 280 : r, a = T(), {
|
|
20
20
|
status: t
|
|
21
|
-
} =
|
|
22
|
-
let
|
|
23
|
-
e[2] !== a || e[3] !== t.step ? (
|
|
24
|
-
!
|
|
25
|
-
}, e[2] = a, e[3] = t.step, e[4] =
|
|
26
|
-
const
|
|
27
|
-
let
|
|
28
|
-
e[5] !== a || e[6] !== t.step ? (
|
|
21
|
+
} = z(), o = a.authUIMode === "modal" && t.step !== "none" && t.step !== "finished";
|
|
22
|
+
let p;
|
|
23
|
+
e[2] !== a || e[3] !== t.step ? (p = (E) => {
|
|
24
|
+
!E && t.step !== "attestation" && a.abortAuthentication();
|
|
25
|
+
}, e[2] = a, e[3] = t.step, e[4] = p) : p = e[4];
|
|
26
|
+
const d = p;
|
|
27
|
+
let N, C;
|
|
28
|
+
e[5] !== a || e[6] !== t.step ? (N = () => {
|
|
29
29
|
a.authUIMode === "modal" && t.step === "finished" && a.abortAuthentication();
|
|
30
|
-
}, C = [a, t.step], e[5] = a, e[6] = t.step, e[7] =
|
|
31
|
-
const S = l ?? "light";
|
|
30
|
+
}, C = [a, t.step], e[5] = a, e[6] = t.step, e[7] = N, e[8] = C) : (N = e[7], C = e[8]), b(N, C);
|
|
32
31
|
let g;
|
|
33
|
-
e[9] !== s || e[10] !== t.payload || e[11] !== t.step || e[12] !== l ? (g = t.step === "pairing" && /* @__PURE__ */
|
|
32
|
+
e[9] !== s || e[10] !== t.payload || e[11] !== t.step || e[12] !== l ? (g = t.step === "pairing" && /* @__PURE__ */ c(R, { theme: l, size: s, payload: t.payload }), e[9] = s, e[10] = t.payload, e[11] = t.step, e[12] = l, e[13] = g) : g = e[13];
|
|
34
33
|
let f;
|
|
35
|
-
e[14] !== t.message || e[15] !== t.step ? (f = t.step === "pairingError" && /* @__PURE__ */
|
|
34
|
+
e[14] !== t.message || e[15] !== t.step ? (f = t.step === "pairingError" && /* @__PURE__ */ c(M, { message: t.message }), e[14] = t.message, e[15] = t.step, e[16] = f) : f = e[16];
|
|
36
35
|
let h;
|
|
37
|
-
e[17] !== t.step ? (h = t.step === "attestation" && /* @__PURE__ */
|
|
36
|
+
e[17] !== t.step ? (h = t.step === "attestation" && /* @__PURE__ */ c(j, {}), e[17] = t.step, e[18] = h) : h = e[18];
|
|
38
37
|
let u;
|
|
39
|
-
e[19] !== t.message || e[20] !== t.step ? (u = t.step === "attestationError" && /* @__PURE__ */
|
|
40
|
-
let
|
|
41
|
-
e[22] !==
|
|
38
|
+
e[19] !== t.message || e[20] !== t.step ? (u = t.step === "attestationError" && /* @__PURE__ */ c(M, { message: t.message }), e[19] = t.message, e[20] = t.step, e[21] = u) : u = e[21];
|
|
39
|
+
let y;
|
|
40
|
+
e[22] !== g || e[23] !== f || e[24] !== h || e[25] !== u ? (y = /* @__PURE__ */ L("div", { className: m.container, children: [
|
|
42
41
|
g,
|
|
43
42
|
f,
|
|
44
43
|
h,
|
|
45
44
|
u
|
|
46
|
-
] }), e[22] =
|
|
47
|
-
let
|
|
48
|
-
e[27] !==
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}), _ = (i) => {
|
|
52
|
-
const e = M(15), {
|
|
45
|
+
] }), e[22] = g, e[23] = f, e[24] = h, e[25] = u, e[26] = y) : y = e[26];
|
|
46
|
+
let v;
|
|
47
|
+
return e[27] !== o || e[28] !== y || e[29] !== d ? (v = /* @__PURE__ */ c($, { open: o, onOpenChange: d, width: "fit-content", children: y }), e[27] = o, e[28] = y, e[29] = d, e[30] = v) : v = e[30], v;
|
|
48
|
+
}), R = (i) => {
|
|
49
|
+
const e = S(15), {
|
|
53
50
|
payload: n,
|
|
54
51
|
size: l,
|
|
55
52
|
theme: r
|
|
56
53
|
} = i, s = A();
|
|
57
54
|
let a;
|
|
58
|
-
e[0] !== s.pairingHeader ? (a = /* @__PURE__ */
|
|
55
|
+
e[0] !== s.pairingHeader ? (a = /* @__PURE__ */ c("span", { className: m.pairingHeader, children: s.pairingHeader }), e[0] = s.pairingHeader, e[1] = a) : a = e[1];
|
|
59
56
|
let t;
|
|
60
|
-
e[2] !== s.pairingScanCallToAction ? (t = /* @__PURE__ */
|
|
57
|
+
e[2] !== s.pairingScanCallToAction ? (t = /* @__PURE__ */ c("span", { className: m.scanCallToAction, children: s.pairingScanCallToAction }), e[2] = s.pairingScanCallToAction, e[3] = t) : t = e[3];
|
|
58
|
+
let o;
|
|
59
|
+
e[4] !== n || e[5] !== l || e[6] !== r ? (o = /* @__PURE__ */ c(P, { value: n, size: l, theme: r }), e[4] = n, e[5] = l, e[6] = r, e[7] = o) : o = e[7];
|
|
61
60
|
let p;
|
|
62
|
-
e[
|
|
63
|
-
let
|
|
64
|
-
e[
|
|
65
|
-
let m;
|
|
66
|
-
return e[10] !== a || e[11] !== t || e[12] !== p || e[13] !== c ? (m = /* @__PURE__ */ L("div", { className: d.pairingContainer, children: [
|
|
61
|
+
e[8] !== s.pairingDescription ? (p = /* @__PURE__ */ c("span", { className: m.pairingDescription, children: s.pairingDescription }), e[8] = s.pairingDescription, e[9] = p) : p = e[9];
|
|
62
|
+
let d;
|
|
63
|
+
return e[10] !== a || e[11] !== t || e[12] !== o || e[13] !== p ? (d = /* @__PURE__ */ L("div", { className: m.pairingContainer, children: [
|
|
67
64
|
a,
|
|
68
65
|
t,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
] }), e[10] = a, e[11] = t, e[12] =
|
|
72
|
-
},
|
|
73
|
-
const i =
|
|
66
|
+
o,
|
|
67
|
+
p
|
|
68
|
+
] }), e[10] = a, e[11] = t, e[12] = o, e[13] = p, e[14] = d) : d = e[14], d;
|
|
69
|
+
}, j = () => {
|
|
70
|
+
const i = S(8), e = A();
|
|
74
71
|
let n;
|
|
75
|
-
i[0] !== e.pairingLoginMessage ? (n = /* @__PURE__ */
|
|
72
|
+
i[0] !== e.pairingLoginMessage ? (n = /* @__PURE__ */ c("span", { className: m.loaderHeader, children: e.pairingLoginMessage }), i[0] = e.pairingLoginMessage, i[1] = n) : n = i[1];
|
|
76
73
|
let l;
|
|
77
|
-
i[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */
|
|
74
|
+
i[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ c("div", { className: m.loaderLogo, children: /* @__PURE__ */ c(D, { size: 100 }) }), i[2] = l) : l = i[2];
|
|
78
75
|
let r;
|
|
79
|
-
i[3] !== e.pairingLoader ? (r = /* @__PURE__ */
|
|
76
|
+
i[3] !== e.pairingLoader ? (r = /* @__PURE__ */ c("span", { className: m.loaderText, children: e.pairingLoader }), i[3] = e.pairingLoader, i[4] = r) : r = i[4];
|
|
80
77
|
let s;
|
|
81
|
-
return i[5] !== n || i[6] !== r ? (s = /* @__PURE__ */ L("div", { className:
|
|
78
|
+
return i[5] !== n || i[6] !== r ? (s = /* @__PURE__ */ L("div", { className: m.loaderContainer, children: [
|
|
82
79
|
n,
|
|
83
80
|
l,
|
|
84
81
|
r
|
|
85
82
|
] }), i[5] = n, i[6] = r, i[7] = s) : s = i[7], s;
|
|
86
|
-
},
|
|
87
|
-
const e =
|
|
83
|
+
}, M = (i) => {
|
|
84
|
+
const e = S(13), {
|
|
88
85
|
message: n
|
|
89
|
-
} = i, l =
|
|
86
|
+
} = i, l = T(), r = A();
|
|
90
87
|
let s;
|
|
91
|
-
e[0] !== r.pairingError ? (s = /* @__PURE__ */
|
|
88
|
+
e[0] !== r.pairingError ? (s = /* @__PURE__ */ c("span", { className: m.errorTitle, children: r.pairingError }), e[0] = r.pairingError, e[1] = s) : s = e[1];
|
|
92
89
|
let a;
|
|
93
|
-
e[2] !== n ? (a = /* @__PURE__ */
|
|
90
|
+
e[2] !== n ? (a = /* @__PURE__ */ c("span", { className: m.errorGenericText, children: n }), e[2] = n, e[3] = a) : a = e[3];
|
|
94
91
|
let t;
|
|
95
92
|
e[4] !== l ? (t = () => l.authenticate(), e[4] = l, e[5] = t) : t = e[5];
|
|
93
|
+
let o;
|
|
94
|
+
e[6] !== t || e[7] !== r.pairingRetry ? (o = /* @__PURE__ */ c(x, { variant: "secondary", type: "button", onClick: t, children: r.pairingRetry }), e[6] = t, e[7] = r.pairingRetry, e[8] = o) : o = e[8];
|
|
96
95
|
let p;
|
|
97
|
-
e[
|
|
98
|
-
let c;
|
|
99
|
-
return e[9] !== s || e[10] !== a || e[11] !== p ? (c = /* @__PURE__ */ L("div", { className: d.errorContainer, children: [
|
|
96
|
+
return e[9] !== s || e[10] !== a || e[11] !== o ? (p = /* @__PURE__ */ L("div", { className: m.errorContainer, children: [
|
|
100
97
|
s,
|
|
101
98
|
a,
|
|
102
|
-
|
|
103
|
-
] }), e[9] = s, e[10] = a, e[11] =
|
|
99
|
+
o
|
|
100
|
+
] }), e[9] = s, e[10] = a, e[11] = o, e[12] = p) : p = e[12], p;
|
|
104
101
|
};
|
|
105
102
|
export {
|
|
106
|
-
|
|
103
|
+
J as PairingModal
|
|
107
104
|
};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
import { ALIGN_OPTIONS, SIDE_OPTIONS } from '@radix-ui/react-popper';
|
|
1
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
+
type Side = (typeof SIDE_OPTIONS)[number];
|
|
4
|
+
type Align = (typeof ALIGN_OPTIONS)[number];
|
|
2
5
|
type Props = PropsWithChildren<{
|
|
3
6
|
theme?: 'light' | 'dark';
|
|
4
7
|
size?: number;
|
|
8
|
+
side?: Side;
|
|
9
|
+
sizeOffset?: number;
|
|
10
|
+
align?: Align;
|
|
11
|
+
alignOffset?: number;
|
|
5
12
|
}>;
|
|
6
|
-
export declare const PairingPopover: import('react').MemoExoticComponent<({ theme, size, children }: Props) => import("react").JSX.Element>;
|
|
13
|
+
export declare const PairingPopover: import('react').MemoExoticComponent<({ theme, size, align, side, alignOffset, sizeOffset, children }: Props) => import("react").JSX.Element>;
|
|
7
14
|
export {};
|
|
@@ -1,123 +1,124 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { memo as
|
|
5
|
-
import { useAuthStatus as
|
|
6
|
-
import { useAuthentication as
|
|
7
|
-
import { useTranslations as
|
|
8
|
-
import { LogoSmall as
|
|
9
|
-
import { QrCode as
|
|
10
|
-
import
|
|
11
|
-
const ie =
|
|
12
|
-
const e =
|
|
1
|
+
import { jsx as a, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import { c as A } from "react/compiler-runtime";
|
|
3
|
+
import * as x from "@radix-ui/react-popover";
|
|
4
|
+
import { memo as K, useEffect as w } from "react";
|
|
5
|
+
import { useAuthStatus as G } from "../hooks/authStatus.js";
|
|
6
|
+
import { useAuthentication as B } from "../providers/AuthProvider.js";
|
|
7
|
+
import { useTranslations as $ } from "../providers/TranslationProvider.js";
|
|
8
|
+
import { LogoSmall as M } from "../ui/LogoSmall.js";
|
|
9
|
+
import { QrCode as Q } from "../ui/QrCode.js";
|
|
10
|
+
import g from "./Pairing.module.css.js";
|
|
11
|
+
const ie = K((o) => {
|
|
12
|
+
const e = A(46), {
|
|
13
13
|
theme: n,
|
|
14
|
-
size:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
size: c,
|
|
15
|
+
align: i,
|
|
16
|
+
side: r,
|
|
17
|
+
alignOffset: s,
|
|
18
|
+
sizeOffset: p,
|
|
19
|
+
children: l
|
|
20
|
+
} = o, m = n === void 0 ? "dark" : n, f = c === void 0 ? 240 : c, v = p === void 0 ? 4 : p, d = B(), {
|
|
17
21
|
status: t
|
|
18
|
-
} =
|
|
19
|
-
let g;
|
|
20
|
-
e[0] !== i || e[1] !== t.step ? (g = () => {
|
|
21
|
-
t.step === "none" && i.authenticate("popover");
|
|
22
|
-
}, e[0] = i, e[1] = t.step, e[2] = g) : g = e[2];
|
|
23
|
-
const A = g;
|
|
24
|
-
let E;
|
|
25
|
-
e[3] !== i || e[4] !== t.step ? (E = (T) => {
|
|
26
|
-
!T && t.step !== "attestation" && i.abortAuthentication();
|
|
27
|
-
}, e[3] = i, e[4] = t.step, e[5] = E) : E = e[5];
|
|
28
|
-
const H = E;
|
|
29
|
-
let D;
|
|
30
|
-
e[6] !== i ? (D = () => () => {
|
|
31
|
-
i.abortAuthentication();
|
|
32
|
-
}, e[6] = i, e[7] = D) : D = e[7];
|
|
22
|
+
} = G(), I = typeof process < "u" && process.env?.STORYBOOK === "true", H = d.authUIMode === "popover" && (I || t.step !== "none");
|
|
33
23
|
let b;
|
|
34
|
-
e[
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
let
|
|
39
|
-
e[
|
|
40
|
-
t.step
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
|
|
24
|
+
e[0] !== d || e[1] !== t.step ? (b = () => {
|
|
25
|
+
t.step === "none" && d.authenticate("popover");
|
|
26
|
+
}, e[0] = d, e[1] = t.step, e[2] = b) : b = e[2];
|
|
27
|
+
const R = b;
|
|
28
|
+
let D;
|
|
29
|
+
e[3] !== d || e[4] !== t.step ? (D = (E) => {
|
|
30
|
+
!E && t.step !== "attestation" && d.abortAuthentication();
|
|
31
|
+
}, e[3] = d, e[4] = t.step, e[5] = D) : D = e[5];
|
|
32
|
+
const _ = D;
|
|
33
|
+
let z;
|
|
34
|
+
e[6] !== d ? (z = () => () => {
|
|
35
|
+
d.abortAuthentication();
|
|
36
|
+
}, e[6] = d, e[7] = z) : z = e[7];
|
|
37
|
+
let W;
|
|
38
|
+
e[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (W = [], e[8] = W) : W = e[8], w(z, W);
|
|
44
39
|
let h;
|
|
45
|
-
e[
|
|
46
|
-
let u;
|
|
47
|
-
e[
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
e[9] !== l || e[10] !== R ? (h = /* @__PURE__ */ a(x.Trigger, { asChild: !0, onClick: R, children: l }), e[9] = l, e[10] = R, e[11] = h) : h = e[11];
|
|
41
|
+
let u, P;
|
|
42
|
+
e[12] !== t.step ? (P = (E) => {
|
|
43
|
+
t.step === "attestation" && E.preventDefault();
|
|
44
|
+
}, u = (E) => {
|
|
45
|
+
t.step === "attestation" && E.preventDefault();
|
|
46
|
+
}, e[12] = t.step, e[13] = u, e[14] = P) : (u = e[13], P = e[14]);
|
|
50
47
|
let y;
|
|
51
|
-
e[
|
|
52
|
-
let C;
|
|
53
|
-
e[28] !== h || e[29] !== u || e[30] !== P || e[31] !== y ? (C = /* @__PURE__ */ L("div", { className: m.popoverContainer, children: [
|
|
54
|
-
h,
|
|
55
|
-
u,
|
|
56
|
-
P,
|
|
57
|
-
y
|
|
58
|
-
] }), e[28] = h, e[29] = u, e[30] = P, e[31] = y, e[32] = C) : C = e[32];
|
|
48
|
+
e[15] !== f || e[16] !== t.payload || e[17] !== t.step || e[18] !== m ? (y = t.step === "pairing" && /* @__PURE__ */ a(U, { theme: m, size: f, payload: t.payload }), e[15] = f, e[16] = t.payload, e[17] = t.step, e[18] = m, e[19] = y) : y = e[19];
|
|
59
49
|
let N;
|
|
60
|
-
e[
|
|
50
|
+
e[20] !== t.message || e[21] !== t.step ? (N = t.step === "pairingError" && /* @__PURE__ */ a(j, { message: t.message }), e[20] = t.message, e[21] = t.step, e[22] = N) : N = e[22];
|
|
51
|
+
let C;
|
|
52
|
+
e[23] !== t.step ? (C = t.step === "attestation" && /* @__PURE__ */ a(Y, {}), e[23] = t.step, e[24] = C) : C = e[24];
|
|
61
53
|
let S;
|
|
62
|
-
e[
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
54
|
+
e[25] !== t.message || e[26] !== t.step ? (S = t.step === "attestationError" && /* @__PURE__ */ a(j, { message: t.message }), e[25] = t.message, e[26] = t.step, e[27] = S) : S = e[27];
|
|
55
|
+
let L;
|
|
56
|
+
e[28] !== y || e[29] !== N || e[30] !== C || e[31] !== S ? (L = /* @__PURE__ */ T("div", { className: g.popoverContainer, children: [
|
|
57
|
+
y,
|
|
58
|
+
N,
|
|
59
|
+
C,
|
|
60
|
+
S
|
|
61
|
+
] }), e[28] = y, e[29] = N, e[30] = C, e[31] = S, e[32] = L) : L = e[32];
|
|
62
|
+
let O;
|
|
63
|
+
e[33] !== i || e[34] !== s || e[35] !== r || e[36] !== v || e[37] !== u || e[38] !== L || e[39] !== P ? (O = /* @__PURE__ */ a(x.Portal, { children: /* @__PURE__ */ a(x.Content, { side: r, align: i, sideOffset: v, alignOffset: s, className: g.popoverContent, onInteractOutside: P, onEscapeKeyDown: u, children: L }) }), e[33] = i, e[34] = s, e[35] = r, e[36] = v, e[37] = u, e[38] = L, e[39] = P, e[40] = O) : O = e[40];
|
|
64
|
+
let k;
|
|
65
|
+
return e[41] !== H || e[42] !== O || e[43] !== h || e[44] !== _ ? (k = /* @__PURE__ */ T(x.Root, { open: H, onOpenChange: _, children: [
|
|
66
|
+
h,
|
|
67
|
+
O
|
|
68
|
+
] }), e[41] = H, e[42] = O, e[43] = h, e[44] = _, e[45] = k) : k = e[45], k;
|
|
69
|
+
}), U = (o) => {
|
|
70
|
+
const e = A(15), {
|
|
70
71
|
payload: n,
|
|
71
|
-
size:
|
|
72
|
-
theme:
|
|
73
|
-
} = r,
|
|
74
|
-
let i;
|
|
75
|
-
e[0] !== o.pairingPopoverWelcome ? (i = /* @__PURE__ */ a("span", { className: m.pairingPopoverHeader, children: o.pairingPopoverWelcome }), e[0] = o.pairingPopoverWelcome, e[1] = i) : i = e[1];
|
|
76
|
-
let t;
|
|
77
|
-
e[2] !== n || e[3] !== l || e[4] !== s ? (t = /* @__PURE__ */ a("div", { className: m.qrContainer, children: /* @__PURE__ */ a(w, { value: n, size: l, theme: s }) }), e[2] = n, e[3] = l, e[4] = s, e[5] = t) : t = e[5];
|
|
72
|
+
size: c,
|
|
73
|
+
theme: i
|
|
74
|
+
} = o, r = i === void 0 ? "light" : i, s = $();
|
|
78
75
|
let p;
|
|
79
|
-
e[
|
|
80
|
-
let
|
|
81
|
-
e[
|
|
82
|
-
let
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
e[0] !== s.pairingPopoverWelcome ? (p = /* @__PURE__ */ a("span", { className: g.pairingPopoverHeader, children: s.pairingPopoverWelcome }), e[0] = s.pairingPopoverWelcome, e[1] = p) : p = e[1];
|
|
77
|
+
let l;
|
|
78
|
+
e[2] !== n || e[3] !== c || e[4] !== r ? (l = /* @__PURE__ */ a(Q, { value: n, size: c, theme: r }), e[2] = n, e[3] = c, e[4] = r, e[5] = l) : l = e[5];
|
|
79
|
+
let m;
|
|
80
|
+
e[6] !== s.pairingPopoverLoginHeading ? (m = /* @__PURE__ */ a("span", { className: g.scanCallToActionPopover, children: s.pairingPopoverLoginHeading }), e[6] = s.pairingPopoverLoginHeading, e[7] = m) : m = e[7];
|
|
81
|
+
let f;
|
|
82
|
+
e[8] !== s.pairingPopoverScanDescription ? (f = /* @__PURE__ */ a("span", { className: g.pairingDescriptionPopover, children: s.pairingPopoverScanDescription }), e[8] = s.pairingPopoverScanDescription, e[9] = f) : f = e[9];
|
|
83
|
+
let v;
|
|
84
|
+
return e[10] !== p || e[11] !== l || e[12] !== m || e[13] !== f ? (v = /* @__PURE__ */ T("div", { className: g.pairingPopoverContainer, children: [
|
|
86
85
|
p,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
l,
|
|
87
|
+
m,
|
|
88
|
+
f
|
|
89
|
+
] }), e[10] = p, e[11] = l, e[12] = m, e[13] = f, e[14] = v) : v = e[14], v;
|
|
90
|
+
}, Y = () => {
|
|
91
|
+
const o = A(8), e = $();
|
|
91
92
|
let n;
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
let
|
|
96
|
-
|
|
97
|
-
let
|
|
98
|
-
return
|
|
93
|
+
o[0] !== e.pairingPopoverWelcome ? (n = /* @__PURE__ */ a("span", { className: g.pairingPopoverHeader, children: e.pairingPopoverWelcome }), o[0] = e.pairingPopoverWelcome, o[1] = n) : n = o[1];
|
|
94
|
+
let c;
|
|
95
|
+
o[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ a("div", { className: g.loaderLogo, children: /* @__PURE__ */ a(M, { size: 100 }) }), o[2] = c) : c = o[2];
|
|
96
|
+
let i;
|
|
97
|
+
o[3] !== e.pairingLoader ? (i = /* @__PURE__ */ a("span", { className: g.loaderText, children: e.pairingLoader }), o[3] = e.pairingLoader, o[4] = i) : i = o[4];
|
|
98
|
+
let r;
|
|
99
|
+
return o[5] !== n || o[6] !== i ? (r = /* @__PURE__ */ T("div", { className: g.loaderContainerPopover, children: [
|
|
99
100
|
n,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
] }),
|
|
103
|
-
},
|
|
104
|
-
const e =
|
|
101
|
+
c,
|
|
102
|
+
i
|
|
103
|
+
] }), o[5] = n, o[6] = i, o[7] = r) : r = o[7], r;
|
|
104
|
+
}, j = (o) => {
|
|
105
|
+
const e = A(13), {
|
|
105
106
|
message: n
|
|
106
|
-
} =
|
|
107
|
-
let
|
|
108
|
-
e[0] !==
|
|
109
|
-
let
|
|
110
|
-
e[2] !== n ? (
|
|
111
|
-
let t;
|
|
112
|
-
e[4] !== l ? (t = () => l.authenticate(), e[4] = l, e[5] = t) : t = e[5];
|
|
107
|
+
} = o, c = B(), i = $();
|
|
108
|
+
let r;
|
|
109
|
+
e[0] !== i.pairingError ? (r = /* @__PURE__ */ a("span", { className: g.errorTitlePopover, children: i.pairingError }), e[0] = i.pairingError, e[1] = r) : r = e[1];
|
|
110
|
+
let s;
|
|
111
|
+
e[2] !== n ? (s = n && /* @__PURE__ */ a("span", { className: g.errorGenericText, children: n }), e[2] = n, e[3] = s) : s = e[3];
|
|
113
112
|
let p;
|
|
114
|
-
e[
|
|
115
|
-
let
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
113
|
+
e[4] !== c ? (p = () => c.authenticate(), e[4] = c, e[5] = p) : p = e[5];
|
|
114
|
+
let l;
|
|
115
|
+
e[6] !== p || e[7] !== i.pairingRetry ? (l = /* @__PURE__ */ a("button", { className: g.retryButton, type: "button", onClick: p, children: i.pairingRetry }), e[6] = p, e[7] = i.pairingRetry, e[8] = l) : l = e[8];
|
|
116
|
+
let m;
|
|
117
|
+
return e[9] !== r || e[10] !== s || e[11] !== l ? (m = /* @__PURE__ */ T("div", { className: g.errorContainerPopover, children: [
|
|
118
|
+
r,
|
|
119
|
+
s,
|
|
120
|
+
l
|
|
121
|
+
] }), e[9] = r, e[10] = s, e[11] = l, e[12] = m) : m = e[12], m;
|
|
121
122
|
};
|
|
122
123
|
export {
|
|
123
124
|
ie as PairingPopover
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes papp_Modal-module_fadeInOpacity_lXaQm{0%{opacity:0}to{opacity:1}}.papp_Modal-module_backdrop_5PnfC{z-index:1000;position:fixed;inset:0;background:hsl(var(--general-background) / .3);opacity:1;animation-name:papp_Modal-module_fadeInOpacity_lXaQm;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.3s}.papp_Modal-module_modal_L5tLT{z-index:1001;position:absolute;inset:0;margin:auto;width:300px;height:fit-content;border-radius:32px;opacity:1;animation-name:papp_Modal-module_fadeInOpacity_lXaQm;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.5s;text-rendering:geometricPrecision;background:var(--color-surface-tertiary-inverse);color:var(--color-text-foreground-inverse)}@keyframes papp_QrCode-module_fadeInOpacity_ZCaTW{0%{opacity:0}to{opacity:1}}.papp_QrCode-module_container_L11My{border-radius:34px;animation-name:papp_QrCode-module_fadeInOpacity_ZCaTW;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.3s;display:flex;justify-content:center;align-items:center;padding:16px}.papp_QrCode-module_gradientLayer_0Gbcy{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.9) 0%,rgba(255,240,200,.7) 5%,rgba(255,200,150,.4) 10%,transparent 18%),radial-gradient(ellipse at 50% 30%,rgba(255,100,200,.6) 0%,rgba(200,120,255,.5) 15%,rgba(150,100,255,.3) 30%,transparent 50%),radial-gradient(ellipse at 50% 70%,rgba(100,200,255,.5) 0%,rgba(80,150,255,.4) 20%,rgba(60,100,200,.3) 40%,transparent 55%),radial-gradient(circle at 20% 20%,rgba(150,100,255,.5) 0%,rgba(120,80,200,.3) 25%,transparent 45%),radial-gradient(circle at 80% 20%,rgba(100,200,255,.5) 0%,rgba(80,150,200,.3) 25%,transparent 45%),radial-gradient(circle at 20% 80%,rgba(255,150,100,.5) 0%,rgba(200,100,150,.3) 25%,transparent 45%),linear-gradient(135deg,#3c5096e6,#5064b4cc 12%,#6478c8b3 25%,#7864b4b3 37%,#8c50a0b3 50%,#78468cbf 62%,#645078cc 75%,#505a82d9 87%,#3c466ee6)}.papp_QrCode-module_gradient-layer_7agFl:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 40%,rgba(255,200,100,.3) 0%,rgba(255,150,150,.2) 15%,transparent 30%),radial-gradient(circle at 70% 60%,rgba(100,255,200,.3) 0%,rgba(100,200,255,.2) 15%,transparent 30%),radial-gradient(circle at 50% 80%,rgba(200,100,255,.3) 0%,rgba(150,100,200,.2) 20%,transparent 35%);filter:blur(25px)}.papp_QrCode-module_gradient-layer_7agFl:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 40% 30%,rgba(255,180,200,.2) 0%,rgba(200,150,255,.15) 20%,transparent 35%),radial-gradient(circle at 60% 70%,rgba(100,220,255,.2) 0%,rgba(150,180,255,.15) 20%,transparent 35%),radial-gradient(ellipse at 80% 50%,rgba(255,150,100,.2) 0%,rgba(255,100,150,.1) 25%,transparent 40%);filter:blur(35px);mix-blend-mode:screen}.papp_Pairing-module_popoverContent_3xnU8{padding:0;border-radius:32px;background:var(--color-surface-tertiary-inverse);color:var(--color-text-foreground-inverse)}.papp_Pairing-module_container_gH7WU{width:350px}.papp_Pairing-module_genericText_zDzqC{font-family:Inter,sans-serif;font-size:24px}.papp_Pairing-module_pairingContainer_R5atH{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px 50px 30px}.papp_Pairing-module_pairingHeader_bpfNW{font-family:Inter,sans-serif;text-align:center;font-size:20px;font-style:normal;font-weight:400;line-height:1.83;letter-spacing:-.573px;margin-bottom:9px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_scanCallToAction_lOQ-T{font-family:Inter,sans-serif;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));text-align:center;font-size:22px;font-style:normal;font-weight:400;line-height:1.5;margin-bottom:15px}.papp_Pairing-
|
|
1
|
+
@keyframes papp_Modal-module_fadeInOpacity_lXaQm{0%{opacity:0}to{opacity:1}}.papp_Modal-module_backdrop_5PnfC{z-index:1000;position:fixed;inset:0;background:hsl(var(--general-background) / .3);opacity:1;animation-name:papp_Modal-module_fadeInOpacity_lXaQm;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.3s}.papp_Modal-module_modal_L5tLT{z-index:1001;position:absolute;inset:0;margin:auto;width:300px;height:fit-content;border-radius:32px;opacity:1;animation-name:papp_Modal-module_fadeInOpacity_lXaQm;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.5s;text-rendering:geometricPrecision;background:var(--color-surface-tertiary-inverse);color:var(--color-text-foreground-inverse)}@keyframes papp_QrCode-module_fadeInOpacity_ZCaTW{0%{opacity:0}to{opacity:1}}.papp_QrCode-module_container_L11My{border-radius:34px;animation-name:papp_QrCode-module_fadeInOpacity_ZCaTW;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:.3s;display:flex;justify-content:center;align-items:center;padding:16px}.papp_QrCode-module_gradientLayer_0Gbcy{position:absolute;inset:0;background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.9) 0%,rgba(255,240,200,.7) 5%,rgba(255,200,150,.4) 10%,transparent 18%),radial-gradient(ellipse at 50% 30%,rgba(255,100,200,.6) 0%,rgba(200,120,255,.5) 15%,rgba(150,100,255,.3) 30%,transparent 50%),radial-gradient(ellipse at 50% 70%,rgba(100,200,255,.5) 0%,rgba(80,150,255,.4) 20%,rgba(60,100,200,.3) 40%,transparent 55%),radial-gradient(circle at 20% 20%,rgba(150,100,255,.5) 0%,rgba(120,80,200,.3) 25%,transparent 45%),radial-gradient(circle at 80% 20%,rgba(100,200,255,.5) 0%,rgba(80,150,200,.3) 25%,transparent 45%),radial-gradient(circle at 20% 80%,rgba(255,150,100,.5) 0%,rgba(200,100,150,.3) 25%,transparent 45%),linear-gradient(135deg,#3c5096e6,#5064b4cc 12%,#6478c8b3 25%,#7864b4b3 37%,#8c50a0b3 50%,#78468cbf 62%,#645078cc 75%,#505a82d9 87%,#3c466ee6)}.papp_QrCode-module_gradient-layer_7agFl:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 30% 40%,rgba(255,200,100,.3) 0%,rgba(255,150,150,.2) 15%,transparent 30%),radial-gradient(circle at 70% 60%,rgba(100,255,200,.3) 0%,rgba(100,200,255,.2) 15%,transparent 30%),radial-gradient(circle at 50% 80%,rgba(200,100,255,.3) 0%,rgba(150,100,200,.2) 20%,transparent 35%);filter:blur(25px)}.papp_QrCode-module_gradient-layer_7agFl:after{content:"";position:absolute;inset:0;background:radial-gradient(circle at 40% 30%,rgba(255,180,200,.2) 0%,rgba(200,150,255,.15) 20%,transparent 35%),radial-gradient(circle at 60% 70%,rgba(100,220,255,.2) 0%,rgba(150,180,255,.15) 20%,transparent 35%),radial-gradient(ellipse at 80% 50%,rgba(255,150,100,.2) 0%,rgba(255,100,150,.1) 25%,transparent 40%);filter:blur(35px);mix-blend-mode:screen}.papp_Pairing-module_popoverContent_3xnU8{padding:0;border-radius:32px;background:var(--color-surface-tertiary-inverse);color:var(--color-text-foreground-inverse)}.papp_Pairing-module_container_gH7WU{width:350px}.papp_Pairing-module_genericText_zDzqC{font-family:Inter,sans-serif;font-size:24px}.papp_Pairing-module_pairingContainer_R5atH{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px 50px 30px}.papp_Pairing-module_pairingHeader_bpfNW{font-family:Inter,sans-serif;text-align:center;font-size:20px;font-style:normal;font-weight:400;line-height:1.83;letter-spacing:-.573px;margin-bottom:9px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_scanCallToAction_lOQ-T{font-family:Inter,sans-serif;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));text-align:center;font-size:22px;font-style:normal;font-weight:400;line-height:1.5;margin-bottom:15px}.papp_Pairing-module_pairingDescription_UJE0U{font-family:Inter,sans-serif;width:300px;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:1.2;margin-top:20px}@keyframes papp_Pairing-module_loader_S62aK{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.papp_Pairing-module_loaderLogo_iHsP9{width:fit-content;height:fit-content;animation:papp_Pairing-module_loader_S62aK 3s linear infinite}.papp_Pairing-module_loaderContainer_cR46U{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:40px;padding:30px;box-sizing:border-box}.papp_Pairing-module_loaderHeader_-q0jo{color:var(--color-text-foreground-inverse);text-align:center;font-family:Inter,sans-serif;font-size:22px;line-height:1.5;letter-spacing:-.526px}.papp_Pairing-module_loaderText_beteT{color:var(--color-text-foreground-inverse);text-align:center;font-family:Inter,sans-serif;font-size:29.203px;font-style:normal;font-weight:400;line-height:53.452px;letter-spacing:-.526px}.papp_Pairing-module_finishedContainer_FtMTm{display:flex;flex-direction:column;align-items:center;height:100%;box-sizing:border-box;padding:40px 70px}.papp_Pairing-module_finishedLogo_jkEDX{display:flex;flex-direction:row;align-items:center;gap:12px}.papp_Pairing-module_finishedLogoSeparator_iRufd{width:1px;height:24px;background:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)))}.papp_Pairing-module_finishedLogoTitle_qKs3e{color:var(--color-text-foreground-inverse);text-align:center;font-family:Inter,sans-serif;font-size:16px;white-space:nowrap;font-style:normal;font-weight:600;line-height:140%;letter-spacing:-.329px}.papp_Pairing-module_finishedWelcome_Zvm-X{margin-top:54px;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));font-family:Inter,sans-serif;font-size:18.39px;font-style:normal;font-weight:400;line-height:27.585px;letter-spacing:1.947px;text-transform:uppercase}.papp_Pairing-module_finishedUsername_RIpsa{color:var(--color-text-foreground-inverse);text-align:center;font-family:Inter,sans-serif;font-size:32.882px;font-style:normal;font-weight:400;line-height:60.185px;letter-spacing:-.593px}.papp_Pairing-module_finishedVoucher_rR0jH{flex-grow:1}.papp_Pairing-module_finishedButton_iuvIR{display:flex;flex-direction:column;width:262px}.papp_Pairing-module_errorContainer_KW5T-{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:12px;height:100%;box-sizing:border-box;padding:40px 30px}.papp_Pairing-module_errorTitle_qokH0{font-family:Inter,sans-serif;text-align:center;font-size:22px;font-style:normal;font-weight:400;line-height:1.83;letter-spacing:-.573px;margin-bottom:9px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_genericText_zDzqC{font-family:Inter,sans-serif;font-size:24px;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)))}.papp_Pairing-module_popoverContainer_fOWoF{width:280px}.papp_Pairing-module_pairingPopoverHeader_PAQot{font-family:Inter,sans-serif;text-align:center;font-size:16px;line-height:1.5;letter-spacing:-.573px;margin-bottom:15px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_scanCallToActionPopover_Irz-z{font-family:Inter,sans-serif;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));text-align:center;font-size:20px;font-weight:600;line-height:1.2;margin:15px 0 10px}.papp_Pairing-module_pairingDescriptionPopover_z71yj{font-family:Inter,sans-serif;color:var(--color-text-foreground-inverse, hsl(var(--muted-foreground)));text-align:center;font-size:14px;line-height:1.2}.papp_Pairing-module_errorContainerPopover_4mELg{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:15px;padding:50px 20px;min-height:250px}.papp_Pairing-module_pairingPopoverContainer_RvVnH{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px 25px}.papp_Pairing-module_errorTitlePopover_-FPrd{font-family:Inter,sans-serif;text-align:center;font-size:18px;font-style:normal;line-height:1.5;letter-spacing:-.573px;margin-bottom:10px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_errorGenericText_ZPwQb{font-family:Inter,sans-serif;text-align:center;font-size:16px;font-style:normal;line-height:1.5;letter-spacing:-.573px;margin-bottom:20px;color:var(--color-text-foreground-inverse)}.papp_Pairing-module_loaderContainerPopover_n1-JJ{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:40px;padding:20px}.papp_Pairing-module_loaderText_beteT{color:var(--color-text-foreground-inverse);text-align:center;font-family:Inter,sans-serif;font-size:20px;line-height:1.5;letter-spacing:-.526px}.papp_Pairing-module_retryButton_kWeRx{font-family:Inter,sans-serif;font-size:16px;font-weight:500;padding:10px 24px;border-radius:12px;border:1px solid var(--color-text-foreground-inverse);background:transparent;color:var(--color-text-foreground-inverse);cursor:pointer}
|
package/dist/ui/QrCode.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
1
|
+
import { jsx as Q } from "react/jsx-runtime";
|
|
2
|
+
import x from "qr-code-styling";
|
|
3
|
+
import { memo as C, useState as c, useMemo as E, useEffect as T } from "react";
|
|
4
|
+
import k from "./QrCode.module.css.js";
|
|
5
|
+
const A = x, y = "#000000", O = "#ffffff", U = "PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0MyA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNDIxMzggMTAuMTkyM0MtMC43MzQyNTUgMTMuODcxNyAtMC44MTc0NjcgMT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bD0id2hpdGUiLz48cGF0aCBkPSJNNDkuNTU0NCA0My40NDkxQzQ3LjEzODUgNDguNjg5MiA0Ni4zMDE1IDUzLjQ2MzEgNDcuNjkwNyA1NC4xMDE5QzQ5LjA3OTggNTQuNzQwNyA1Mi4xNjg4IDUxLjAxMTQgNTQuNTg0NyA0NS43NzEzQzU3LjAwOTIgNDAuNTMxMyA1Ny44Mzc2IDM1Ljc1NzQgNTYuNDU3IDM1LjExODVDNTYuMzUzNSAzNS4wNjY3IDU2LjI0MTMgMzUuMDQ5NSA1Ni4xMTE5IDM1LjA0OTVDNTQuNjAyIDM1LjA0OTUgNTEuNzg5MSAzOC42MDYyIDQ5LjU1NDQgNDMuNDQ5MVoiIGZpbGw9IndoaXRlIi8+PC9zdmc+", s = C(({
|
|
6
6
|
value: j,
|
|
7
7
|
size: M,
|
|
8
|
-
theme:
|
|
8
|
+
theme: L = "light"
|
|
9
9
|
}) => {
|
|
10
|
-
const [N,
|
|
10
|
+
const [N, u] = c(null), z = L === "dark", D = z ? O : y, i = z ? y : O, g = z ? Y : U, I = E(() => new A({
|
|
11
11
|
data: j,
|
|
12
12
|
type: "svg",
|
|
13
13
|
shape: "square",
|
|
14
14
|
width: M,
|
|
15
15
|
height: M,
|
|
16
16
|
margin: 0,
|
|
17
|
-
image: `data:image/svg+xml;base64,${
|
|
17
|
+
image: `data:image/svg+xml;base64,${g}`,
|
|
18
18
|
imageOptions: {
|
|
19
19
|
hideBackgroundDots: !0,
|
|
20
20
|
imageSize: 0.4,
|
|
@@ -38,18 +38,19 @@ const y = u, E = "#000000", c = "#ffffff", U = "PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0i
|
|
|
38
38
|
qrOptions: {
|
|
39
39
|
errorCorrectionLevel: "M"
|
|
40
40
|
}
|
|
41
|
-
}), [M,
|
|
42
|
-
return
|
|
43
|
-
N &&
|
|
44
|
-
}), [I, N]),
|
|
41
|
+
}), [M, D, g]);
|
|
42
|
+
return T(() => (N && I.append(N), () => {
|
|
43
|
+
N && A._clearContainer(N);
|
|
44
|
+
}), [I, N]), T(() => {
|
|
45
45
|
I?.update({
|
|
46
46
|
data: j
|
|
47
47
|
});
|
|
48
|
-
}, [j, I]), /* @__PURE__ */
|
|
48
|
+
}, [j, I]), /* @__PURE__ */ Q("div", { className: k.container, style: {
|
|
49
49
|
height: M,
|
|
50
|
-
width: M
|
|
51
|
-
|
|
50
|
+
width: M,
|
|
51
|
+
backgroundColor: i
|
|
52
|
+
}, ref: u });
|
|
52
53
|
});
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
+
s as QrCode
|
|
55
56
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@novasamatech/host-papp-react-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.7.0-1",
|
|
5
5
|
"description": "Polkadot app UI Flow",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -30,18 +30,20 @@
|
|
|
30
30
|
"react-dom": ">=18"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@novasamatech/
|
|
34
|
-
"@
|
|
33
|
+
"@novasamatech/host-papp": "0.7.0-1",
|
|
34
|
+
"@novasamatech/statement-store": "0.7.0-1",
|
|
35
|
+
"@polkadot-api/utils": "^0.4.0",
|
|
35
36
|
"@radix-ui/react-dialog": "1.1.15",
|
|
37
|
+
"@radix-ui/react-popover": "1.1.15",
|
|
36
38
|
"qr-code-styling": "1.9.2",
|
|
37
|
-
"@novasamatech/tr-ui": "0.
|
|
39
|
+
"@novasamatech/tr-ui": "0.2.3"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
42
|
"@types/react": "19.2.14",
|
|
41
43
|
"@types/react-dom": "19.2.3",
|
|
42
|
-
"@polkadot-api/substrate-bindings": "^0.
|
|
43
|
-
"react": "19.2.
|
|
44
|
-
"react-dom": "19.2.
|
|
44
|
+
"@polkadot-api/substrate-bindings": "^0.20.0",
|
|
45
|
+
"react": "19.2.5",
|
|
46
|
+
"react-dom": "19.2.5",
|
|
45
47
|
"typescript-plugin-css-modules": "5.2.0",
|
|
46
48
|
"vite-plugin-wasm": "3.6.0"
|
|
47
49
|
},
|