@novasamatech/host-papp-react-ui 0.7.9-5 → 0.7.9

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.
@@ -1,47 +1,51 @@
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", p = "papp_Pairing-module_pairingDescription_UJE0U", a = "papp_Pairing-module_loaderLogo_iHsP9", t = "papp_Pairing-module_loaderContainer_cR46U", _ = "papp_Pairing-module_loaderText_beteT", l = "papp_Pairing-module_loaderContainerPopover_n1-JJ", c = "papp_Pairing-module_errorContainer_KW5T-", P = "papp_Pairing-module_errorTitle_qokH0", g = "papp_Pairing-module_popoverContainer_fOWoF", d = "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_retryButton_kWeRx", x = {
2
- popoverContent: o,
3
- container: r,
1
+ const r = "papp_Pairing-module_popoverContent_3xnU8", o = "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_qrSurfaceLight_dIa-z papp_Pairing-module_qrSurface_wDMjT", t = "papp_Pairing-module_qrSurfaceDark_2icM9 papp_Pairing-module_qrSurface_wDMjT", _ = "papp_Pairing-module_loaderLogo_iHsP9", c = "papp_Pairing-module_loaderContainer_cR46U", l = "papp_Pairing-module_loaderText_beteT", g = "papp_Pairing-module_loaderContainerPopover_n1-JJ", P = "papp_Pairing-module_errorContainer_KW5T-", d = "papp_Pairing-module_errorTitle_qokH0", s = "papp_Pairing-module_popoverContainer_fOWoF", u = "papp_Pairing-module_pairingPopoverHeader_PAQot", C = "papp_Pairing-module_scanCallToActionPopover_Irz-z", v = "papp_Pairing-module_pairingDescriptionPopover_z71yj", m = "papp_Pairing-module_errorContainerPopover_4mELg", T = "papp_Pairing-module_pairingPopoverContainer_RvVnH", f = "papp_Pairing-module_errorTitlePopover_-FPrd", D = "papp_Pairing-module_errorGenericText_ZPwQb", H = "papp_Pairing-module_retryButton_kWeRx", q = {
2
+ popoverContent: r,
3
+ container: o,
4
4
  pairingContainer: e,
5
5
  pairingHeader: n,
6
6
  scanCallToAction: i,
7
- pairingDescription: p,
8
- loaderLogo: a,
9
- loaderContainer: t,
10
- loaderText: _,
11
- loaderContainerPopover: l,
12
- errorContainer: c,
13
- errorTitle: P,
14
- popoverContainer: g,
15
- pairingPopoverHeader: d,
16
- scanCallToActionPopover: s,
17
- pairingDescriptionPopover: C,
18
- errorContainerPopover: v,
19
- pairingPopoverContainer: u,
20
- errorTitlePopover: m,
21
- errorGenericText: T,
7
+ pairingDescription: a,
8
+ qrSurfaceLight: p,
9
+ qrSurfaceDark: t,
10
+ loaderLogo: _,
11
+ loaderContainer: c,
12
+ loaderText: l,
13
+ loaderContainerPopover: g,
14
+ errorContainer: P,
15
+ errorTitle: d,
16
+ popoverContainer: s,
17
+ pairingPopoverHeader: u,
18
+ scanCallToActionPopover: C,
19
+ pairingDescriptionPopover: v,
20
+ errorContainerPopover: m,
21
+ pairingPopoverContainer: T,
22
+ errorTitlePopover: f,
23
+ errorGenericText: D,
22
24
  retryButton: H
23
25
  };
24
26
  export {
25
- r as container,
26
- x as default,
27
- c as errorContainer,
28
- v as errorContainerPopover,
29
- T as errorGenericText,
30
- P as errorTitle,
31
- m as errorTitlePopover,
32
- t as loaderContainer,
33
- l as loaderContainerPopover,
34
- a as loaderLogo,
35
- _ as loaderText,
27
+ o as container,
28
+ q as default,
29
+ P as errorContainer,
30
+ m as errorContainerPopover,
31
+ D as errorGenericText,
32
+ d as errorTitle,
33
+ f as errorTitlePopover,
34
+ c as loaderContainer,
35
+ g as loaderContainerPopover,
36
+ _ as loaderLogo,
37
+ l as loaderText,
36
38
  e as pairingContainer,
37
- p as pairingDescription,
38
- C as pairingDescriptionPopover,
39
+ a as pairingDescription,
40
+ v as pairingDescriptionPopover,
39
41
  n as pairingHeader,
40
- u as pairingPopoverContainer,
41
- d as pairingPopoverHeader,
42
- g as popoverContainer,
43
- o as popoverContent,
42
+ T as pairingPopoverContainer,
43
+ u as pairingPopoverHeader,
44
+ s as popoverContainer,
45
+ r as popoverContent,
46
+ t as qrSurfaceDark,
47
+ p as qrSurfaceLight,
44
48
  H as retryButton,
45
49
  i as scanCallToAction,
46
- s as scanCallToActionPopover
50
+ C as scanCallToActionPopover
47
51
  };
@@ -1,97 +1,100 @@
1
- import { jsx as p, jsxs as v } 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 M, useEffect as b } from "react";
5
- import { useAuthStatus as z } from "../hooks/authStatus.js";
1
+ import { jsx as l, jsxs as v } from "react/jsx-runtime";
2
+ import { c as C } from "react/compiler-runtime";
3
+ import { Button as E } from "@novasamatech/tr-ui";
4
+ import { memo as x, useEffect as M } from "react";
5
+ import { useAuthStatus as b } from "../hooks/authStatus.js";
6
6
  import { useAuthentication as A } from "../providers/AuthProvider.js";
7
7
  import { useTranslations as T } from "../providers/TranslationProvider.js";
8
- import { LogoSmall as D } from "../ui/LogoSmall.js";
9
- import { Modal as H } from "../ui/Modal.js";
10
- import { QrCode as $ } from "../ui/QrCode.js";
11
- import c from "./Pairing.module.css.js";
12
- const F = M((m) => {
13
- const e = S(28);
14
- let r;
15
- e[0] !== m ? (r = m === void 0 ? {} : m, e[0] = m, e[1] = r) : r = e[1];
8
+ import { LogoSmall as k } from "../ui/LogoSmall.js";
9
+ import { Modal as z } from "../ui/Modal.js";
10
+ import { QrCode as H } from "../ui/QrCode.js";
11
+ import p from "./Pairing.module.css.js";
12
+ const F = x((g) => {
13
+ const e = C(28);
14
+ let n;
15
+ e[0] !== g ? (n = g === void 0 ? {} : g, e[0] = g, e[1] = n) : n = e[1];
16
16
  const {
17
17
  theme: o,
18
- size: a
19
- } = r, s = a === void 0 ? 280 : a, i = A(), {
18
+ size: s
19
+ } = n, i = s === void 0 ? 280 : s, a = A(), {
20
20
  status: t
21
- } = z(), n = i.authUIMode === "modal" && t.step !== "none" && t.step !== "finished";
22
- let l;
23
- e[2] !== i || e[3] !== t.step ? (l = (E) => {
24
- !E && t.step !== "pending" && i.abortAuthentication();
25
- }, e[2] = i, e[3] = t.step, e[4] = l) : l = e[4];
26
- const d = l;
27
- let y, N;
28
- e[5] !== i || e[6] !== t.step ? (y = () => {
29
- i.authUIMode === "modal" && t.step === "finished" && i.abortAuthentication();
30
- }, N = [i, t.step], e[5] = i, e[6] = t.step, e[7] = y, e[8] = N) : (y = e[7], N = e[8]), b(y, N);
31
- let g;
32
- e[9] !== s || e[10] !== t.payload || e[11] !== t.step || e[12] !== o ? (g = t.step === "pairing" && /* @__PURE__ */ p(L, { theme: o, size: s, payload: t.payload }), e[9] = s, e[10] = t.payload, e[11] = t.step, e[12] = o, e[13] = g) : g = e[13];
21
+ } = b(), r = a.authUIMode === "modal" && t.step !== "none" && t.step !== "finished";
22
+ let c;
23
+ e[2] !== a || e[3] !== t.step ? (c = (D) => {
24
+ !D && t.step !== "pending" && a.abortAuthentication();
25
+ }, e[2] = a, e[3] = t.step, e[4] = c) : c = e[4];
26
+ const h = c;
27
+ let d, m;
28
+ e[5] !== a || e[6] !== t.step ? (d = () => {
29
+ a.authUIMode === "modal" && t.step === "finished" && a.abortAuthentication();
30
+ }, m = [a, t.step], e[5] = a, e[6] = t.step, e[7] = d, e[8] = m) : (d = e[7], m = e[8]), M(d, m);
33
31
  let f;
34
- e[14] !== t.stage || e[15] !== t.step ? (f = t.step === "pending" && /* @__PURE__ */ p(P, { stage: t.stage }), e[14] = t.stage, e[15] = t.step, e[16] = f) : f = e[16];
35
- let h;
36
- e[17] !== t.message || e[18] !== t.step ? (h = t.step === "pairingError" && /* @__PURE__ */ p(R, { message: t.message }), e[17] = t.message, e[18] = t.step, e[19] = h) : h = e[19];
32
+ e[9] !== i || e[10] !== t.payload || e[11] !== t.step || e[12] !== o ? (f = t.step === "pairing" && /* @__PURE__ */ l(L, { theme: o, size: i, payload: t.payload }), e[9] = i, e[10] = t.payload, e[11] = t.step, e[12] = o, e[13] = f) : f = e[13];
37
33
  let u;
38
- e[20] !== g || e[21] !== f || e[22] !== h ? (u = /* @__PURE__ */ v("div", { className: c.container, children: [
39
- g,
34
+ e[14] !== t.stage || e[15] !== t.step ? (u = t.step === "pending" && /* @__PURE__ */ l($, { stage: t.stage }), e[14] = t.stage, e[15] = t.step, e[16] = u) : u = e[16];
35
+ let y;
36
+ e[17] !== t.message || e[18] !== t.step ? (y = t.step === "pairingError" && /* @__PURE__ */ l(P, { message: t.message }), e[17] = t.message, e[18] = t.step, e[19] = y) : y = e[19];
37
+ let N;
38
+ e[20] !== f || e[21] !== u || e[22] !== y ? (N = /* @__PURE__ */ v("div", { className: p.container, children: [
40
39
  f,
41
- h
42
- ] }), e[20] = g, e[21] = f, e[22] = h, e[23] = u) : u = e[23];
43
- let C;
44
- return e[24] !== n || e[25] !== u || e[26] !== d ? (C = /* @__PURE__ */ p(H, { open: n, onOpenChange: d, width: "fit-content", children: u }), e[24] = n, e[25] = u, e[26] = d, e[27] = C) : C = e[27], C;
45
- }), L = (m) => {
46
- const e = S(15), {
47
- payload: r,
40
+ u,
41
+ y
42
+ ] }), e[20] = f, e[21] = u, e[22] = y, e[23] = N) : N = e[23];
43
+ let S;
44
+ return e[24] !== r || e[25] !== N || e[26] !== h ? (S = /* @__PURE__ */ l(z, { open: r, onOpenChange: h, width: "fit-content", children: N }), e[24] = r, e[25] = N, e[26] = h, e[27] = S) : S = e[27], S;
45
+ }), L = (g) => {
46
+ const e = C(18), {
47
+ payload: n,
48
48
  size: o,
49
- theme: a
50
- } = m, s = T();
51
- let i;
52
- e[0] !== s.pairingHeader ? (i = /* @__PURE__ */ p("span", { className: c.pairingHeader, children: s.pairingHeader }), e[0] = s.pairingHeader, e[1] = i) : i = e[1];
49
+ theme: s
50
+ } = g, i = T(), a = s === "dark";
53
51
  let t;
54
- e[2] !== s.pairingScanCallToAction ? (t = /* @__PURE__ */ p("span", { className: c.scanCallToAction, children: s.pairingScanCallToAction }), e[2] = s.pairingScanCallToAction, e[3] = t) : t = e[3];
55
- let n;
56
- e[4] !== r || e[5] !== o || e[6] !== a ? (n = /* @__PURE__ */ p($, { value: r, size: o, theme: a }), e[4] = r, e[5] = o, e[6] = a, e[7] = n) : n = e[7];
57
- let l;
58
- e[8] !== s.pairingDescription ? (l = /* @__PURE__ */ p("span", { className: c.pairingDescription, children: s.pairingDescription }), e[8] = s.pairingDescription, e[9] = l) : l = e[9];
52
+ e[0] !== i.pairingHeader ? (t = /* @__PURE__ */ l("span", { className: p.pairingHeader, children: i.pairingHeader }), e[0] = i.pairingHeader, e[1] = t) : t = e[1];
53
+ let r;
54
+ e[2] !== i.pairingScanCallToAction ? (r = /* @__PURE__ */ l("span", { className: p.scanCallToAction, children: i.pairingScanCallToAction }), e[2] = i.pairingScanCallToAction, e[3] = r) : r = e[3];
55
+ const c = a ? p.qrSurfaceDark : p.qrSurfaceLight;
56
+ let h;
57
+ e[4] !== n || e[5] !== o || e[6] !== s ? (h = /* @__PURE__ */ l(H, { value: n, size: o, theme: s }), e[4] = n, e[5] = o, e[6] = s, e[7] = h) : h = e[7];
59
58
  let d;
60
- return e[10] !== i || e[11] !== t || e[12] !== n || e[13] !== l ? (d = /* @__PURE__ */ v("div", { className: c.pairingContainer, children: [
61
- i,
59
+ e[8] !== c || e[9] !== h ? (d = /* @__PURE__ */ l("div", { className: c, children: h }), e[8] = c, e[9] = h, e[10] = d) : d = e[10];
60
+ let m;
61
+ e[11] !== i.pairingDescription ? (m = /* @__PURE__ */ l("span", { className: p.pairingDescription, children: i.pairingDescription }), e[11] = i.pairingDescription, e[12] = m) : m = e[12];
62
+ let f;
63
+ return e[13] !== t || e[14] !== r || e[15] !== d || e[16] !== m ? (f = /* @__PURE__ */ v("div", { className: p.pairingContainer, children: [
62
64
  t,
63
- n,
64
- l
65
- ] }), e[10] = i, e[11] = t, e[12] = n, e[13] = l, e[14] = d) : d = e[14], d;
66
- }, P = (m) => {
67
- const e = S(3), {
68
- stage: r
69
- } = m;
65
+ r,
66
+ d,
67
+ m
68
+ ] }), e[13] = t, e[14] = r, e[15] = d, e[16] = m, e[17] = f) : f = e[17], f;
69
+ }, $ = (g) => {
70
+ const e = C(3), {
71
+ stage: n
72
+ } = g;
70
73
  let o;
71
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ p("div", { className: c.loaderLogo, children: /* @__PURE__ */ p(D, { size: 100 }) }), e[0] = o) : o = e[0];
72
- let a;
73
- return e[1] !== r ? (a = /* @__PURE__ */ v("div", { className: c.loaderContainer, children: [
74
- o,
75
- /* @__PURE__ */ p("span", { className: c.loaderText, children: r })
76
- ] }), e[1] = r, e[2] = a) : a = e[2], a;
77
- }, R = (m) => {
78
- const e = S(13), {
79
- message: r
80
- } = m, o = A(), a = T();
74
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ l("div", { className: p.loaderLogo, children: /* @__PURE__ */ l(k, { size: 100 }) }), e[0] = o) : o = e[0];
81
75
  let s;
82
- e[0] !== a.pairingError ? (s = /* @__PURE__ */ p("span", { className: c.errorTitle, children: a.pairingError }), e[0] = a.pairingError, e[1] = s) : s = e[1];
76
+ return e[1] !== n ? (s = /* @__PURE__ */ v("div", { className: p.loaderContainer, children: [
77
+ o,
78
+ /* @__PURE__ */ l("span", { className: p.loaderText, children: n })
79
+ ] }), e[1] = n, e[2] = s) : s = e[2], s;
80
+ }, P = (g) => {
81
+ const e = C(13), {
82
+ message: n
83
+ } = g, o = A(), s = T();
83
84
  let i;
84
- e[2] !== r ? (i = /* @__PURE__ */ p("span", { className: c.errorGenericText, children: r }), e[2] = r, e[3] = i) : i = e[3];
85
+ e[0] !== s.pairingError ? (i = /* @__PURE__ */ l("span", { className: p.errorTitle, children: s.pairingError }), e[0] = s.pairingError, e[1] = i) : i = e[1];
86
+ let a;
87
+ e[2] !== n ? (a = /* @__PURE__ */ l("span", { className: p.errorGenericText, children: n }), e[2] = n, e[3] = a) : a = e[3];
85
88
  let t;
86
89
  e[4] !== o ? (t = () => o.authenticate(), e[4] = o, e[5] = t) : t = e[5];
87
- let n;
88
- e[6] !== t || e[7] !== a.pairingRetry ? (n = /* @__PURE__ */ p(x, { variant: "secondary", type: "button", onClick: t, children: a.pairingRetry }), e[6] = t, e[7] = a.pairingRetry, e[8] = n) : n = e[8];
89
- let l;
90
- return e[9] !== s || e[10] !== i || e[11] !== n ? (l = /* @__PURE__ */ v("div", { className: c.errorContainer, children: [
91
- s,
90
+ let r;
91
+ e[6] !== t || e[7] !== s.pairingRetry ? (r = /* @__PURE__ */ l(E, { variant: "secondary", type: "button", onClick: t, children: s.pairingRetry }), e[6] = t, e[7] = s.pairingRetry, e[8] = r) : r = e[8];
92
+ let c;
93
+ return e[9] !== i || e[10] !== a || e[11] !== r ? (c = /* @__PURE__ */ v("div", { className: p.errorContainer, children: [
92
94
  i,
93
- n
94
- ] }), e[9] = s, e[10] = i, e[11] = n, e[12] = l) : l = e[12], l;
95
+ a,
96
+ r
97
+ ] }), e[9] = i, e[10] = a, e[11] = r, e[12] = c) : c = e[12], c;
95
98
  };
96
99
  export {
97
100
  F as PairingModal
@@ -1,116 +1,121 @@
1
- import { jsx as n, jsxs as D } from "react/jsx-runtime";
2
- import { c as A } from "react/compiler-runtime";
1
+ import { jsx as n, jsxs as k } from "react/jsx-runtime";
2
+ import { c as R } from "react/compiler-runtime";
3
3
  import * as x from "@radix-ui/react-popover";
4
- import { memo as I, useEffect as K } from "react";
5
- import { useAuthStatus as _ } from "../hooks/authStatus.js";
6
- import { useAuthentication as W } from "../providers/AuthProvider.js";
7
- import { useTranslations as j } from "../providers/TranslationProvider.js";
8
- import { LogoSmall as w } from "../ui/LogoSmall.js";
9
- import { QrCode as G } from "../ui/QrCode.js";
10
- import g from "./Pairing.module.css.js";
11
- const oe = I((v) => {
12
- const e = A(43), {
4
+ import { memo as B, useEffect as I } from "react";
5
+ import { useAuthStatus as K } from "../hooks/authStatus.js";
6
+ import { useAuthentication as j } from "../providers/AuthProvider.js";
7
+ import { useTranslations as q } from "../providers/TranslationProvider.js";
8
+ import { LogoSmall as _ } from "../ui/LogoSmall.js";
9
+ import { QrCode as w } from "../ui/QrCode.js";
10
+ import c from "./Pairing.module.css.js";
11
+ const oe = B((h) => {
12
+ const e = R(44), {
13
13
  theme: a,
14
14
  size: l,
15
- align: i,
16
- side: c,
15
+ align: r,
16
+ side: p,
17
17
  alignOffset: o,
18
- sizeOffset: r,
18
+ sizeOffset: f,
19
19
  children: s
20
- } = v, p = a === void 0 ? "dark" : a, f = l === void 0 ? 240 : l, m = r === void 0 ? 4 : r, d = W(), {
20
+ } = h, g = a === void 0 ? "dark" : a, d = l === void 0 ? 240 : l, m = f === void 0 ? 4 : f, i = j(), {
21
21
  status: t
22
- } = _(), B = typeof process < "u" && process.env?.STORYBOOK === "true", R = d.authUIMode === "popover" && (B || t.step !== "none");
22
+ } = K(), v = typeof process < "u" && process.env?.STORYBOOK === "true", H = i.authUIMode === "popover" && (v || t.step !== "none");
23
+ let A;
24
+ e[0] !== i || e[1] !== t.step ? (A = () => {
25
+ t.step === "none" && i.authenticate("popover");
26
+ }, e[0] = i, e[1] = t.step, e[2] = A) : A = e[2];
27
+ const $ = A;
28
+ let T;
29
+ e[3] !== i || e[4] !== t.step ? (T = (O) => {
30
+ !O && t.step !== "pending" && i.abortAuthentication();
31
+ }, e[3] = i, e[4] = t.step, e[5] = T) : T = e[5];
32
+ const W = T;
23
33
  let E;
24
- e[0] !== d || e[1] !== t.step ? (E = () => {
25
- t.step === "none" && d.authenticate("popover");
26
- }, e[0] = d, e[1] = t.step, e[2] = E) : E = e[2];
27
- const H = E;
28
- let b;
29
- e[3] !== d || e[4] !== t.step ? (b = (T) => {
30
- !T && t.step !== "pending" && d.abortAuthentication();
31
- }, e[3] = d, e[4] = t.step, e[5] = b) : b = e[5];
32
- const $ = b;
33
- let z, L;
34
- e[6] !== d ? (z = () => () => {
35
- d.abortAuthentication();
36
- }, L = [d], e[6] = d, e[7] = z, e[8] = L) : (z = e[7], L = e[8]), K(z, L);
37
- let h;
38
- e[9] !== s || e[10] !== H ? (h = /* @__PURE__ */ n(x.Trigger, { asChild: !0, onClick: H, children: s }), e[9] = s, e[10] = H, e[11] = h) : h = e[11];
39
- let u, P;
40
- e[12] !== t.step ? (P = (T) => {
41
- t.step === "pending" && T.preventDefault();
42
- }, u = (T) => {
43
- t.step === "pending" && T.preventDefault();
44
- }, e[12] = t.step, e[13] = u, e[14] = P) : (u = e[13], P = e[14]);
45
- let y;
46
- e[15] !== f || e[16] !== t.payload || e[17] !== t.step || e[18] !== p ? (y = t.step === "pairing" && /* @__PURE__ */ n(M, { theme: p, size: f, payload: t.payload }), e[15] = f, e[16] = t.payload, e[17] = t.step, e[18] = p, e[19] = y) : y = e[19];
47
- let C;
48
- e[20] !== t.stage || e[21] !== t.step ? (C = t.step === "pending" && /* @__PURE__ */ n(Q, { stage: t.stage }), e[20] = t.stage, e[21] = t.step, e[22] = C) : C = e[22];
34
+ e[6] !== i ? (E = () => () => {
35
+ i.abortAuthentication();
36
+ }, e[6] = i, e[7] = E) : E = e[7];
37
+ let L;
38
+ e[8] !== i.abortAuthentication ? (L = [i.abortAuthentication], e[8] = i.abortAuthentication, e[9] = L) : L = e[9], I(E, L);
39
+ let u;
40
+ e[10] !== s || e[11] !== $ ? (u = /* @__PURE__ */ n(x.Trigger, { asChild: !0, onClick: $, children: s }), e[10] = s, e[11] = $, e[12] = u) : u = e[12];
41
+ let P, y;
42
+ e[13] !== t.step ? (y = (O) => {
43
+ t.step === "pending" && O.preventDefault();
44
+ }, P = (O) => {
45
+ t.step === "pending" && O.preventDefault();
46
+ }, e[13] = t.step, e[14] = P, e[15] = y) : (P = e[14], y = e[15]);
49
47
  let N;
50
- e[23] !== t.message || e[24] !== t.step ? (N = t.step === "pairingError" && /* @__PURE__ */ n(U, { message: t.message }), e[23] = t.message, e[24] = t.step, e[25] = N) : N = e[25];
48
+ e[16] !== d || e[17] !== t.payload || e[18] !== t.step || e[19] !== g ? (N = t.step === "pairing" && /* @__PURE__ */ n(G, { theme: g, size: d, payload: t.payload }), e[16] = d, e[17] = t.payload, e[18] = t.step, e[19] = g, e[20] = N) : N = e[20];
49
+ let C;
50
+ e[21] !== t.stage || e[22] !== t.step ? (C = t.step === "pending" && /* @__PURE__ */ n(M, { stage: t.stage }), e[21] = t.stage, e[22] = t.step, e[23] = C) : C = e[23];
51
51
  let S;
52
- e[26] !== y || e[27] !== C || e[28] !== N ? (S = /* @__PURE__ */ D("div", { className: g.popoverContainer, children: [
53
- y,
52
+ e[24] !== t.message || e[25] !== t.step ? (S = t.step === "pairingError" && /* @__PURE__ */ n(Q, { message: t.message }), e[24] = t.message, e[25] = t.step, e[26] = S) : S = e[26];
53
+ let b;
54
+ e[27] !== N || e[28] !== C || e[29] !== S ? (b = /* @__PURE__ */ k("div", { className: c.popoverContainer, children: [
55
+ N,
54
56
  C,
55
- N
56
- ] }), e[26] = y, e[27] = C, e[28] = N, e[29] = S) : S = e[29];
57
- let O;
58
- e[30] !== i || e[31] !== o || e[32] !== c || e[33] !== m || e[34] !== u || e[35] !== S || e[36] !== P ? (O = /* @__PURE__ */ n(x.Portal, { children: /* @__PURE__ */ n(x.Content, { side: c, align: i, sideOffset: m, alignOffset: o, className: g.popoverContent, onInteractOutside: P, onEscapeKeyDown: u, children: S }) }), e[30] = i, e[31] = o, e[32] = c, e[33] = m, e[34] = u, e[35] = S, e[36] = P, e[37] = O) : O = e[37];
59
- let k;
60
- return e[38] !== R || e[39] !== O || e[40] !== h || e[41] !== $ ? (k = /* @__PURE__ */ D(x.Root, { open: R, onOpenChange: $, children: [
61
- h,
62
- O
63
- ] }), e[38] = R, e[39] = O, e[40] = h, e[41] = $, e[42] = k) : k = e[42], k;
64
- }), M = (v) => {
65
- const e = A(15), {
57
+ S
58
+ ] }), e[27] = N, e[28] = C, e[29] = S, e[30] = b) : b = e[30];
59
+ let D;
60
+ e[31] !== r || e[32] !== o || e[33] !== p || e[34] !== m || e[35] !== P || e[36] !== b || e[37] !== y ? (D = /* @__PURE__ */ n(x.Portal, { children: /* @__PURE__ */ n(x.Content, { side: p, align: r, sideOffset: m, alignOffset: o, className: c.popoverContent, onInteractOutside: y, onEscapeKeyDown: P, children: b }) }), e[31] = r, e[32] = o, e[33] = p, e[34] = m, e[35] = P, e[36] = b, e[37] = y, e[38] = D) : D = e[38];
61
+ let z;
62
+ return e[39] !== H || e[40] !== D || e[41] !== u || e[42] !== W ? (z = /* @__PURE__ */ k(x.Root, { open: H, onOpenChange: W, children: [
63
+ u,
64
+ D
65
+ ] }), e[39] = H, e[40] = D, e[41] = u, e[42] = W, e[43] = z) : z = e[43], z;
66
+ }), G = (h) => {
67
+ const e = R(18), {
66
68
  payload: a,
67
69
  size: l,
68
- theme: i
69
- } = v, c = i === void 0 ? "light" : i, o = j();
70
- let r;
71
- e[0] !== o.pairingPopoverWelcome ? (r = /* @__PURE__ */ n("span", { className: g.pairingPopoverHeader, children: o.pairingPopoverWelcome }), e[0] = o.pairingPopoverWelcome, e[1] = r) : r = e[1];
70
+ theme: r
71
+ } = h, p = r === void 0 ? "light" : r, o = q(), f = p === "dark";
72
72
  let s;
73
- e[2] !== a || e[3] !== l || e[4] !== c ? (s = /* @__PURE__ */ n(G, { value: a, size: l, theme: c }), e[2] = a, e[3] = l, e[4] = c, e[5] = s) : s = e[5];
74
- let p;
75
- e[6] !== o.pairingPopoverLoginHeading ? (p = /* @__PURE__ */ n("span", { className: g.scanCallToActionPopover, children: o.pairingPopoverLoginHeading }), e[6] = o.pairingPopoverLoginHeading, e[7] = p) : p = e[7];
76
- let f;
77
- e[8] !== o.pairingPopoverScanDescription ? (f = /* @__PURE__ */ n("span", { className: g.pairingDescriptionPopover, children: o.pairingPopoverScanDescription }), e[8] = o.pairingPopoverScanDescription, e[9] = f) : f = e[9];
73
+ e[0] !== o.pairingPopoverWelcome ? (s = /* @__PURE__ */ n("span", { className: c.pairingPopoverHeader, children: o.pairingPopoverWelcome }), e[0] = o.pairingPopoverWelcome, e[1] = s) : s = e[1];
74
+ const g = f ? c.qrSurfaceDark : c.qrSurfaceLight;
75
+ let d;
76
+ e[2] !== a || e[3] !== l || e[4] !== p ? (d = /* @__PURE__ */ n(w, { value: a, size: l, theme: p }), e[2] = a, e[3] = l, e[4] = p, e[5] = d) : d = e[5];
78
77
  let m;
79
- return e[10] !== r || e[11] !== s || e[12] !== p || e[13] !== f ? (m = /* @__PURE__ */ D("div", { className: g.pairingPopoverContainer, children: [
80
- r,
78
+ e[6] !== g || e[7] !== d ? (m = /* @__PURE__ */ n("div", { className: g, children: d }), e[6] = g, e[7] = d, e[8] = m) : m = e[8];
79
+ let i;
80
+ e[9] !== o.pairingPopoverLoginHeading ? (i = /* @__PURE__ */ n("span", { className: c.scanCallToActionPopover, children: o.pairingPopoverLoginHeading }), e[9] = o.pairingPopoverLoginHeading, e[10] = i) : i = e[10];
81
+ let t;
82
+ e[11] !== o.pairingPopoverScanDescription ? (t = /* @__PURE__ */ n("span", { className: c.pairingDescriptionPopover, children: o.pairingPopoverScanDescription }), e[11] = o.pairingPopoverScanDescription, e[12] = t) : t = e[12];
83
+ let v;
84
+ return e[13] !== s || e[14] !== m || e[15] !== i || e[16] !== t ? (v = /* @__PURE__ */ k("div", { className: c.pairingPopoverContainer, children: [
81
85
  s,
82
- p,
83
- f
84
- ] }), e[10] = r, e[11] = s, e[12] = p, e[13] = f, e[14] = m) : m = e[14], m;
85
- }, Q = (v) => {
86
- const e = A(3), {
86
+ m,
87
+ i,
88
+ t
89
+ ] }), e[13] = s, e[14] = m, e[15] = i, e[16] = t, e[17] = v) : v = e[17], v;
90
+ }, M = (h) => {
91
+ const e = R(3), {
87
92
  stage: a
88
- } = v;
93
+ } = h;
89
94
  let l;
90
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ n("div", { className: g.loaderLogo, children: /* @__PURE__ */ n(w, { size: 100 }) }), e[0] = l) : l = e[0];
91
- let i;
92
- return e[1] !== a ? (i = /* @__PURE__ */ D("div", { className: g.loaderContainerPopover, children: [
95
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ n("div", { className: c.loaderLogo, children: /* @__PURE__ */ n(_, { size: 100 }) }), e[0] = l) : l = e[0];
96
+ let r;
97
+ return e[1] !== a ? (r = /* @__PURE__ */ k("div", { className: c.loaderContainerPopover, children: [
93
98
  l,
94
- /* @__PURE__ */ n("span", { className: g.loaderText, children: a })
95
- ] }), e[1] = a, e[2] = i) : i = e[2], i;
96
- }, U = (v) => {
97
- const e = A(13), {
99
+ /* @__PURE__ */ n("span", { className: c.loaderText, children: a })
100
+ ] }), e[1] = a, e[2] = r) : r = e[2], r;
101
+ }, Q = (h) => {
102
+ const e = R(13), {
98
103
  message: a
99
- } = v, l = W(), i = j();
100
- let c;
101
- e[0] !== i.pairingError ? (c = /* @__PURE__ */ n("span", { className: g.errorTitlePopover, children: i.pairingError }), e[0] = i.pairingError, e[1] = c) : c = e[1];
104
+ } = h, l = j(), r = q();
105
+ let p;
106
+ e[0] !== r.pairingError ? (p = /* @__PURE__ */ n("span", { className: c.errorTitlePopover, children: r.pairingError }), e[0] = r.pairingError, e[1] = p) : p = e[1];
102
107
  let o;
103
- e[2] !== a ? (o = a && /* @__PURE__ */ n("span", { className: g.errorGenericText, children: a }), e[2] = a, e[3] = o) : o = e[3];
104
- let r;
105
- e[4] !== l ? (r = () => l.authenticate(), e[4] = l, e[5] = r) : r = e[5];
108
+ e[2] !== a ? (o = a && /* @__PURE__ */ n("span", { className: c.errorGenericText, children: a }), e[2] = a, e[3] = o) : o = e[3];
109
+ let f;
110
+ e[4] !== l ? (f = () => l.authenticate(), e[4] = l, e[5] = f) : f = e[5];
106
111
  let s;
107
- e[6] !== r || e[7] !== i.pairingRetry ? (s = /* @__PURE__ */ n("button", { className: g.retryButton, type: "button", onClick: r, children: i.pairingRetry }), e[6] = r, e[7] = i.pairingRetry, e[8] = s) : s = e[8];
108
- let p;
109
- return e[9] !== c || e[10] !== o || e[11] !== s ? (p = /* @__PURE__ */ D("div", { className: g.errorContainerPopover, children: [
110
- c,
112
+ e[6] !== f || e[7] !== r.pairingRetry ? (s = /* @__PURE__ */ n("button", { className: c.retryButton, type: "button", onClick: f, children: r.pairingRetry }), e[6] = f, e[7] = r.pairingRetry, e[8] = s) : s = e[8];
113
+ let g;
114
+ return e[9] !== p || e[10] !== o || e[11] !== s ? (g = /* @__PURE__ */ k("div", { className: c.errorContainerPopover, children: [
115
+ p,
111
116
  o,
112
117
  s
113
- ] }), e[9] = c, e[10] = o, e[11] = s, e[12] = p) : p = e[12], p;
118
+ ] }), e[9] = p, e[10] = o, e[11] = s, e[12] = g) : g = e[12], g;
114
119
  };
115
120
  export {
116
121
  oe 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-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_loaderText_beteT{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_loaderContainerPopover_n1-JJ{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:40px;padding:20px}.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_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}
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;box-sizing:border-box;padding:0}.papp_QrCode-module_qrFrame_vx3iV{position:relative;display:inline-block;line-height:0}.papp_QrCode-module_qrCanvas_62D1u{display:block;image-rendering:pixelated}.papp_QrCode-module_qrCanvasLight_LOWJW{color:var(--color-neutral-black)}.papp_QrCode-module_qrCanvasDark_d-wBK{color:var(--color-neutral-white)}.papp_QrCode-module_logoBackdrop_GYOcr{position:absolute;left:50%;top:50%;box-sizing:border-box;display:flex;width:13%;height:13%;align-items:center;justify-content:center;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none}.papp_QrCode-module_logoBackdropLight_elBXb{background:var(--color-neutral-white)}.papp_QrCode-module_logoBackdropDark_v8Acu{background:var(--color-neutral-black)}.papp_QrCode-module_logo_jk35x{display:block;width:82%;height:82%;object-fit:contain}.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{box-sizing:border-box;width:min(calc(100vw - 32px),420px);max-width:420px}.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;box-sizing:border-box;width:100%;padding:36px 44px 44px;gap:20px}.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;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}.papp_Pairing-module_pairingDescription_UJE0U{font-family:Inter,sans-serif;box-sizing:border-box;width:100%;max-width:360px;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}.papp_Pairing-module_qrSurface_wDMjT{display:flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:24px;padding:16px}.papp_Pairing-module_qrSurfaceLight_dIa-z{background:var(--color-neutral-white)}.papp_Pairing-module_qrSurfaceDark_2icM9{background:var(--color-neutral-black)}@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;width:100%;padding:40px 44px 44px;box-sizing:border-box}.papp_Pairing-module_loaderText_beteT{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_loaderContainerPopover_n1-JJ{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:40px;padding:20px}.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;width:100%;padding:40px 44px 44px}.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;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_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,56 +1,66 @@
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 = "PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0MyA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNDIxMzggMTAuMTkyM0MtMC43MzQyNTUgMTMuODcxNyAtMC44MTc0NjcgMTguOTkzNCAyLjI0MjE1IDIxLjYyMTVDNS4zMDE3NyAyNC4yNTYgMTAuMzM5MyAyMy40MDM1IDEzLjUwMTMgMTkuNzE3N0MxNi42NTY5IDE2LjAzODMgMTYuNzQwMSAxMC45MTY3IDEzLjY4MDUgOC4yODg1NEMxMi40ODM2IDcuMjU2NTIgMTAuOTczIDYuNzYyOTQgOS4zOTgzNCA2Ljc2Mjk0QzYuOTUzMiA2Ljc2Mjk0IDQuMzQxNjQgNy45NTUyMSAyLjQyMTM4IDEwLjE5MjNaIiBmaWxsPSJibGFjayI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1LjA0OTVDNTQuNjAyIDM1LjA0OTUgNTEuNzg5MSAzOC42MDYyIDQ5LjU1NDQgNDMuNDQ5MVoiIGZpbGw9IndoaXRlIi8+PC9zdmc+", s = C(({
6
- value: j,
7
- size: M,
8
- theme: L = "light"
9
- }) => {
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
- data: j,
12
- type: "svg",
13
- shape: "square",
14
- width: M,
15
- height: M,
16
- margin: 0,
17
- image: `data:image/svg+xml;base64,${g}`,
18
- imageOptions: {
19
- hideBackgroundDots: !0,
20
- imageSize: 0.4,
21
- margin: 6
22
- },
23
- dotsOptions: {
24
- type: "rounded",
25
- color: D
26
- },
27
- backgroundOptions: {
28
- color: "transparent"
29
- },
30
- cornersSquareOptions: {
31
- type: "dot",
32
- color: D
33
- },
34
- cornersDotOptions: {
35
- type: "dot",
36
- color: D
37
- },
38
- qrOptions: {
39
- errorCorrectionLevel: "M"
1
+ import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
+ import { memo as a, useRef as E, useEffect as U } from "react";
3
+ import i from "./QrCode.module.css.js";
4
+ const k = "PHN2ZyB3aWR0aD0iNDMiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0MyA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIuNDIxMzggMTAuMTkyM0MtMC43MzQyNTUgMTMuODcxNyAtMC44MTc0NjcgMTguOTkzNCAyLjI0MjE1IDIxLjYyMTVDNS4zMDE3NyAyNC4yNTYgMTAuMzM5MyAyMy40MDM1IDEzLjUwMTMgMTkuNzE3N0MxNi42NTY5IDE2LjAzODMgMTYuNzQwMSAxMC45MTY3IDEzLjY4MDUgOC4yODg1NEMxMi40ODM2IDcuMjU2NTIgMTAuOTczIDYuNzYyOTQgOS4zOTgzNCA2Ljc2Mjk0QzYuOTUzMiA2Ljc2Mjk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ODVDNTYuMzUzNSAzNS4wNjY3IDU2LjI0MTMgMzUuMDQ5NSA1Ni4xMTE5IDM1LjA0OTVDNTQuNjAyIDM1LjA0OTUgNTEuNzg5MSAzOC42MDYyIDQ5LjU1NDQgNDMuNDQ5MVoiIGZpbGw9IndoaXRlIi8+PC9zdmc+", x = 4, g = 7;
5
+ function Y(z, I, O, u) {
6
+ const M = z.getContext("2d");
7
+ if (!M)
8
+ return;
9
+ const o = window.devicePixelRatio || 1, Q = I.size + x * 2, N = Math.max(1, Math.floor(O * o / Q)), A = N * Q;
10
+ z.width = A, z.height = A, z.style.width = `${O}px`, z.style.height = `${O}px`, M.clearRect(0, 0, A, A);
11
+ const T = I.size, e = (D, j) => D < g && j < g || D < g && j >= T - g || D >= T - g && j < g;
12
+ M.fillStyle = u;
13
+ for (let D = 0; D < T; D++)
14
+ for (let j = 0; j < T; j++) {
15
+ if (!I.data[D * T + j] || e(D, j))
16
+ continue;
17
+ const L = (j + x) * N, c = (D + x) * N;
18
+ M.fillRect(L, c, N, N);
40
19
  }
41
- }), [M, D, g]);
42
- return T(() => (N && I.append(N), () => {
43
- N && A._clearContainer(N);
44
- }), [I, N]), T(() => {
45
- I?.update({
46
- data: j
47
- });
48
- }, [j, I]), /* @__PURE__ */ Q("div", { className: k.container, style: {
49
- height: M,
50
- width: M,
51
- backgroundColor: i
52
- }, ref: u });
20
+ const y = (D, j) => {
21
+ const L = (j + g / 2 + x) * N, c = (D + g / 2 + x) * N;
22
+ M.fillStyle = u, M.beginPath(), M.arc(L, c, 3.5 * N, 0, Math.PI * 2), M.fill(), M.globalCompositeOperation = "destination-out", M.beginPath(), M.arc(L, c, 2.5 * N, 0, Math.PI * 2), M.fill(), M.globalCompositeOperation = "source-over", M.fillStyle = u, M.beginPath(), M.arc(L, c, 1.5 * N, 0, Math.PI * 2), M.fill();
23
+ };
24
+ y(0, 0), y(0, T - g), y(T - g, 0);
25
+ }
26
+ const n = a(({
27
+ value: z,
28
+ size: I,
29
+ theme: O = "light"
30
+ }) => {
31
+ const u = E(null), M = O === "dark", Q = `data:image/svg+xml;base64,${M ? S : k}`;
32
+ return U(() => {
33
+ const N = u.current;
34
+ if (!N || !z)
35
+ return;
36
+ let A = !1;
37
+ const T = z, e = getComputedStyle(N).color;
38
+ return import("qrcode").then((y) => {
39
+ if (A)
40
+ return;
41
+ const D = y.default.create(T, {
42
+ errorCorrectionLevel: "H"
43
+ });
44
+ Y(N, D.modules, I, e);
45
+ }).catch((y) => {
46
+ A || console.error("[host-papp-react-ui] QR render failed:", y);
47
+ }), () => {
48
+ A = !0;
49
+ };
50
+ }, [z, I, M]), z ? /* @__PURE__ */ t("div", { className: i.container, style: {
51
+ height: I,
52
+ width: I
53
+ }, children: /* @__PURE__ */ C("div", { className: i.qrFrame, style: {
54
+ width: I,
55
+ height: I
56
+ }, children: [
57
+ /* @__PURE__ */ t("canvas", { ref: u, className: M ? i.qrCanvasDark : i.qrCanvasLight, "aria-hidden": !0 }),
58
+ /* @__PURE__ */ t("div", { className: M ? i.logoBackdropDark : i.logoBackdropLight, "aria-hidden": !0, children: /* @__PURE__ */ t("img", { className: i.logo, src: Q, alt: "", width: 1, height: 1 }) })
59
+ ] }) }) : /* @__PURE__ */ t("div", { className: i.container, style: {
60
+ height: I,
61
+ width: I
62
+ }, "aria-hidden": !0 });
53
63
  });
54
64
  export {
55
- s as QrCode
65
+ n as QrCode
56
66
  };
@@ -1,7 +1,19 @@
1
- const e = "papp_QrCode-module_container_L11My", n = {
2
- container: e
1
+ const o = "papp_QrCode-module_container_L11My", a = "papp_QrCode-module_qrFrame_vx3iV", r = "papp_QrCode-module_qrCanvasLight_LOWJW papp_QrCode-module_qrCanvas_62D1u", p = "papp_QrCode-module_qrCanvasDark_d-wBK papp_QrCode-module_qrCanvas_62D1u", _ = "papp_QrCode-module_logoBackdropLight_elBXb papp_QrCode-module_logoBackdrop_GYOcr", d = "papp_QrCode-module_logoBackdropDark_v8Acu papp_QrCode-module_logoBackdrop_GYOcr", e = "papp_QrCode-module_logo_jk35x", l = {
2
+ container: o,
3
+ qrFrame: a,
4
+ qrCanvasLight: r,
5
+ qrCanvasDark: p,
6
+ logoBackdropLight: _,
7
+ logoBackdropDark: d,
8
+ logo: e
3
9
  };
4
10
  export {
5
- e as container,
6
- n as default
11
+ o as container,
12
+ l as default,
13
+ e as logo,
14
+ d as logoBackdropDark,
15
+ _ as logoBackdropLight,
16
+ p as qrCanvasDark,
17
+ r as qrCanvasLight,
18
+ a as qrFrame
7
19
  };
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.7.9-5",
4
+ "version": "0.7.9",
5
5
  "description": "Polkadot app UI Flow",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -30,15 +30,16 @@
30
30
  "react-dom": ">=18"
31
31
  },
32
32
  "dependencies": {
33
- "@novasamatech/host-papp": "0.7.9-5",
34
- "@novasamatech/statement-store": "0.7.9-5",
33
+ "@novasamatech/host-papp": "0.7.9",
34
+ "@novasamatech/statement-store": "0.7.9",
35
35
  "@polkadot-api/utils": "^0.4.0",
36
36
  "@radix-ui/react-dialog": "1.1.15",
37
37
  "@radix-ui/react-popover": "1.1.15",
38
- "qr-code-styling": "1.9.2",
39
- "@novasamatech/tr-ui": "0.2.7"
38
+ "qrcode": "^1.5.4",
39
+ "@novasamatech/tr-ui": "0.2.9"
40
40
  },
41
41
  "devDependencies": {
42
+ "@types/qrcode": "^1.5.6",
42
43
  "@types/react": "19.2.14",
43
44
  "@types/react-dom": "19.2.3",
44
45
  "@polkadot-api/substrate-bindings": "^0.20.2",