@instockng/storefront-ui 1.0.35 → 1.0.37
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/components/Checkout.d.ts.map +1 -1
- package/dist/components/ShoppingCart.d.ts.map +1 -1
- package/dist/components/ui/modal.d.ts.map +1 -1
- package/dist/hooks/useHideBodyOverflow.d.ts +2 -0
- package/dist/hooks/useHideBodyOverflow.d.ts.map +1 -0
- package/dist/index100.mjs +13 -210
- package/dist/index101.mjs +194 -159
- package/dist/index102.mjs +175 -17
- package/dist/index103.mjs +14 -15
- package/dist/index104.mjs +15 -25
- package/dist/index105.mjs +27 -150
- package/dist/index106.mjs +151 -15
- package/dist/index107.mjs +13 -24
- package/dist/index108.mjs +22 -75
- package/dist/index109.mjs +76 -30
- package/dist/index11.mjs +57 -58
- package/dist/index110.mjs +32 -139
- package/dist/index111.mjs +135 -45
- package/dist/index112.mjs +51 -19
- package/dist/index113.mjs +15 -19
- package/dist/index114.mjs +21 -17
- package/dist/index115.mjs +16 -18
- package/dist/index116.mjs +17 -13
- package/dist/index117.mjs +13 -14
- package/dist/index118.mjs +13 -12
- package/dist/index119.mjs +14 -58
- package/dist/index120.mjs +57 -10
- package/dist/index121.mjs +11 -32
- package/dist/index122.mjs +32 -17
- package/dist/index123.mjs +17 -27
- package/dist/index124.mjs +26 -19
- package/dist/index125.mjs +20 -12
- package/dist/index126.mjs +12 -14
- package/dist/index127.mjs +14 -40
- package/dist/index128.mjs +40 -16
- package/dist/index129.mjs +16 -261
- package/dist/index13.mjs +179 -175
- package/dist/index130.mjs +262 -64
- package/dist/index131.mjs +69 -7
- package/dist/index132.mjs +8 -2
- package/dist/index133.mjs +2 -2
- package/dist/index134.mjs +2 -33
- package/dist/index135.mjs +33 -2
- package/dist/index136.mjs +2 -2
- package/dist/index137.mjs +21 -2
- package/dist/index138.mjs +56 -2
- package/dist/index139.mjs +28 -17
- package/dist/index14.mjs +2 -2
- package/dist/index140.mjs +6 -31
- package/dist/index141.mjs +50 -36
- package/dist/index142.mjs +6 -18
- package/dist/index143.mjs +11 -17
- package/dist/index144.mjs +7 -2
- package/dist/index145.mjs +28 -20
- package/dist/index146.mjs +2 -46
- package/dist/index147.mjs +70 -2
- package/dist/index148.mjs +164 -27
- package/dist/index149.mjs +2 -18
- package/dist/index150.mjs +2 -2
- package/dist/index151.mjs +2 -2
- package/dist/index152.mjs +18 -2
- package/dist/index153.mjs +32 -2
- package/dist/index154.mjs +28 -62
- package/dist/index155.mjs +18 -2
- package/dist/index156.mjs +13 -48
- package/dist/index157.mjs +2 -2
- package/dist/index158.mjs +14 -30
- package/dist/index159.mjs +39 -145
- package/dist/index16.mjs +1 -1
- package/dist/index160.mjs +2 -2
- package/dist/index161.mjs +30 -2
- package/dist/index162.mjs +11 -12
- package/dist/index163.mjs +2 -2
- package/dist/index164.mjs +2 -2
- package/dist/index165.mjs +2 -26
- package/dist/index167.mjs +72 -2
- package/dist/index168.mjs +2 -24
- package/dist/index169.mjs +48 -18
- package/dist/index17.mjs +41 -47
- package/dist/index170.mjs +2 -2
- package/dist/index171.mjs +36 -2
- package/dist/index172.mjs +152 -2
- package/dist/index173.mjs +2 -23
- package/dist/index174.mjs +2 -2
- package/dist/index175.mjs +11 -15
- package/dist/index176.mjs +2 -2
- package/dist/index177.mjs +2 -2
- package/dist/index178.mjs +26 -2
- package/dist/index179.mjs +2 -23
- package/dist/index180.mjs +2 -2
- package/dist/index181.mjs +18 -17
- package/dist/index182.mjs +23 -2
- package/dist/index183.mjs +2 -2
- package/dist/index184.mjs +2 -2
- package/dist/index185.mjs +2 -2
- package/dist/index186.mjs +23 -2
- package/dist/index187.mjs +2 -2
- package/dist/index188.mjs +23 -2
- package/dist/index189.mjs +2 -2
- package/dist/index190.mjs +2 -127
- package/dist/index191.mjs +2 -2
- package/dist/index192.mjs +20 -71
- package/dist/index193.mjs +2 -74
- package/dist/index194.mjs +22 -20
- package/dist/index195.mjs +2 -56
- package/dist/index196.mjs +2 -29
- package/dist/index197.mjs +2 -7
- package/dist/index198.mjs +2 -52
- package/dist/index199.mjs +2 -6
- package/dist/index20.mjs +2 -2
- package/dist/index200.mjs +2 -12
- package/dist/index201.mjs +2 -7
- package/dist/index202.mjs +2 -28
- package/dist/index203.mjs +127 -2
- package/dist/index204.mjs +2 -70
- package/dist/index205.mjs +72 -165
- package/dist/index206.mjs +74 -2
- package/dist/index207.mjs +2 -2
- package/dist/index208.mjs +31 -2
- package/dist/index209.mjs +11 -2
- package/dist/index210.mjs +4 -2
- package/dist/index211.mjs +4 -2
- package/dist/index212.mjs +13 -2
- package/dist/index213.mjs +7 -2
- package/dist/index214.mjs +12 -2
- package/dist/index215.mjs +4 -107
- package/dist/index216.mjs +33 -2
- package/dist/index217.mjs +31 -2
- package/dist/index218.mjs +27 -36
- package/dist/index219.mjs +61 -2
- package/dist/index220.mjs +2 -244
- package/dist/index221.mjs +2 -2
- package/dist/index222.mjs +2 -33
- package/dist/index223.mjs +2 -65
- package/dist/index224.mjs +2 -25
- package/dist/index225.mjs +2 -2
- package/dist/index226.mjs +2 -2
- package/dist/index227.mjs +2 -2
- package/dist/index228.mjs +108 -2
- package/dist/index23.mjs +2 -2
- package/dist/index230.mjs +2 -2
- package/dist/index231.mjs +37 -2
- package/dist/index232.mjs +2 -2
- package/dist/index233.mjs +244 -2
- package/dist/index234.mjs +2 -2
- package/dist/index235.mjs +33 -4
- package/dist/index236.mjs +65 -2
- package/dist/index237.mjs +25 -2
- package/dist/index238.mjs +2 -31
- package/dist/index239.mjs +2 -11
- package/dist/index24.mjs +1 -1
- package/dist/index240.mjs +2 -4
- package/dist/index241.mjs +2 -4
- package/dist/index242.mjs +2 -13
- package/dist/index243.mjs +2 -7
- package/dist/index244.mjs +2 -12
- package/dist/index245.mjs +2 -5
- package/dist/index246.mjs +2 -33
- package/dist/index247.mjs +2 -31
- package/dist/index248.mjs +4 -28
- package/dist/index249.mjs +2 -61
- package/dist/index251.mjs +2 -2
- package/dist/index255.mjs +2 -2
- package/dist/index256.mjs +2 -2
- package/dist/index257.mjs +2 -2
- package/dist/index258.mjs +2 -91
- package/dist/index259.mjs +91 -2
- package/dist/index260.mjs +1 -2
- package/dist/index261.mjs +3 -2
- package/dist/index262.mjs +2 -2
- package/dist/index263.mjs +2 -17
- package/dist/index264.mjs +15 -11
- package/dist/index265.mjs +13 -6
- package/dist/index266.mjs +6 -30
- package/dist/index267.mjs +30 -2
- package/dist/index270.mjs +5 -0
- package/dist/index32.mjs +11 -11
- package/dist/index33.mjs +1 -1
- package/dist/index34.mjs +1 -1
- package/dist/index35.mjs +1 -1
- package/dist/index36.mjs +1 -1
- package/dist/index37.mjs +1 -1
- package/dist/index38.mjs +2 -2
- package/dist/index40.mjs +1 -1
- package/dist/index41.mjs +6 -1432
- package/dist/index42.mjs +1433 -2
- package/dist/index43.mjs +2 -60
- package/dist/index44.mjs +57 -48
- package/dist/index45.mjs +51 -33
- package/dist/index46.mjs +33 -15
- package/dist/index47.mjs +12 -2260
- package/dist/index48.mjs +2263 -36
- package/dist/index49.mjs +36 -44
- package/dist/index50.mjs +44 -99
- package/dist/index51.mjs +99 -113
- package/dist/index52.mjs +82 -50
- package/dist/index53.mjs +55 -51
- package/dist/index54.mjs +46 -64
- package/dist/index55.mjs +71 -57
- package/dist/index56.mjs +57 -55
- package/dist/index57.mjs +75 -15
- package/dist/index58.mjs +13 -12
- package/dist/index59.mjs +12 -57
- package/dist/index60.mjs +43 -105
- package/dist/index61.mjs +89 -93
- package/dist/index62.mjs +128 -23
- package/dist/index63.mjs +24 -2
- package/dist/index64.mjs +2 -23
- package/dist/index65.mjs +7 -7
- package/dist/index66.mjs +21 -73
- package/dist/index67.mjs +74 -14
- package/dist/index68.mjs +14 -62
- package/dist/index69.mjs +62 -4
- package/dist/index70.mjs +5 -2
- package/dist/index71.mjs +2 -6
- package/dist/index72.mjs +5 -1133
- package/dist/index73.mjs +1130 -16
- package/dist/index74.mjs +16 -51
- package/dist/index75.mjs +49 -27
- package/dist/index76.mjs +33 -2
- package/dist/index77.mjs +2 -2
- package/dist/index80.mjs +5 -5
- package/dist/index82.mjs +3 -3
- package/dist/index92.mjs +1 -1
- package/dist/index93.mjs +3 -3
- package/dist/index97.mjs +2 -2
- package/dist/index98.mjs +2 -28
- package/dist/index99.mjs +26 -16
- package/package.json +1 -1
- package/src/components/Checkout.tsx +11 -1
- package/src/components/ShoppingCart.tsx +2 -10
- package/src/components/ui/modal.tsx +2 -9
- package/src/hooks/useHideBodyOverflow.ts +14 -0
package/dist/index74.mjs
CHANGED
|
@@ -1,58 +1,23 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { __exports as e } from "./index133.mjs";
|
|
3
|
+
import "./index72.mjs";
|
|
4
|
+
import u from "react";
|
|
5
|
+
import { __exports as n } from "./index77.mjs";
|
|
6
|
+
var o;
|
|
7
|
+
function d() {
|
|
8
|
+
return o ? e : (o = 1, function(t) {
|
|
9
|
+
Object.defineProperty(t, "__esModule", {
|
|
8
10
|
value: !0
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
get: r[t]
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
f(i, {
|
|
17
|
-
/**
|
|
18
|
-
* Checks whether the given value is a NextError.
|
|
19
|
-
* This can be used to print a more detailed error message with properties like `code` & `digest`.
|
|
20
|
-
*/
|
|
21
|
-
default: function() {
|
|
22
|
-
return s;
|
|
23
|
-
},
|
|
24
|
-
getProperError: function() {
|
|
25
|
-
return a;
|
|
11
|
+
}), Object.defineProperty(t, "RouterContext", {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: function() {
|
|
14
|
+
return r;
|
|
26
15
|
}
|
|
27
16
|
});
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
function d(e) {
|
|
33
|
-
const r = /* @__PURE__ */ new WeakSet();
|
|
34
|
-
return JSON.stringify(e, (t, n) => {
|
|
35
|
-
if (typeof n == "object" && n !== null) {
|
|
36
|
-
if (r.has(n))
|
|
37
|
-
return "[Circular]";
|
|
38
|
-
r.add(n);
|
|
39
|
-
}
|
|
40
|
-
return n;
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function a(e) {
|
|
44
|
-
if (s(e))
|
|
45
|
-
return e;
|
|
46
|
-
if (process.env.NODE_ENV === "development") {
|
|
47
|
-
if (typeof e > "u")
|
|
48
|
-
return new Error("An undefined error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
|
|
49
|
-
if (e === null)
|
|
50
|
-
return new Error("A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
|
|
51
|
-
}
|
|
52
|
-
return new Error((0, c.isPlainObject)(e) ? d(e) : e + "");
|
|
53
|
-
}
|
|
54
|
-
}(o), o);
|
|
17
|
+
const r = (/* @__PURE__ */ n._(u)).default.createContext(null);
|
|
18
|
+
process.env.NODE_ENV !== "production" && (r.displayName = "RouterContext");
|
|
19
|
+
}(e), e);
|
|
55
20
|
}
|
|
56
21
|
export {
|
|
57
|
-
|
|
22
|
+
d as __require
|
|
58
23
|
};
|
package/dist/index75.mjs
CHANGED
|
@@ -1,36 +1,58 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return n ? u.exports : (n = 1, function(a, e) {
|
|
9
|
-
Object.defineProperty(e, "__esModule", {
|
|
2
|
+
import { __exports as o } from "./index134.mjs";
|
|
3
|
+
import { __require as p } from "./index135.mjs";
|
|
4
|
+
var u;
|
|
5
|
+
function m() {
|
|
6
|
+
return u ? o : (u = 1, function(i) {
|
|
7
|
+
Object.defineProperty(i, "__esModule", {
|
|
10
8
|
value: !0
|
|
11
|
-
}), Object.defineProperty(e, "default", {
|
|
12
|
-
enumerable: !0,
|
|
13
|
-
get: function() {
|
|
14
|
-
return l;
|
|
15
|
-
}
|
|
16
9
|
});
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
function f(e, r) {
|
|
11
|
+
for (var t in r) Object.defineProperty(e, t, {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: r[t]
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
f(i, {
|
|
17
|
+
/**
|
|
18
|
+
* Checks whether the given value is a NextError.
|
|
19
|
+
* This can be used to print a more detailed error message with properties like `code` & `digest`.
|
|
20
|
+
*/
|
|
21
|
+
default: function() {
|
|
22
|
+
return s;
|
|
23
|
+
},
|
|
24
|
+
getProperError: function() {
|
|
25
|
+
return a;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
});
|
|
28
|
+
const c = p();
|
|
29
|
+
function s(e) {
|
|
30
|
+
return typeof e == "object" && e !== null && "name" in e && "message" in e;
|
|
31
|
+
}
|
|
32
|
+
function d(e) {
|
|
33
|
+
const r = /* @__PURE__ */ new WeakSet();
|
|
34
|
+
return JSON.stringify(e, (t, n) => {
|
|
35
|
+
if (typeof n == "object" && n !== null) {
|
|
36
|
+
if (r.has(n))
|
|
37
|
+
return "[Circular]";
|
|
38
|
+
r.add(n);
|
|
39
|
+
}
|
|
40
|
+
return n;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function a(e) {
|
|
44
|
+
if (s(e))
|
|
45
|
+
return e;
|
|
46
|
+
if (process.env.NODE_ENV === "development") {
|
|
47
|
+
if (typeof e > "u")
|
|
48
|
+
return new Error("An undefined error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
|
|
49
|
+
if (e === null)
|
|
50
|
+
return new Error("A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");
|
|
28
51
|
}
|
|
29
|
-
return
|
|
52
|
+
return new Error((0, c.isPlainObject)(e) ? d(e) : e + "");
|
|
30
53
|
}
|
|
31
|
-
|
|
32
|
-
}(u, u.exports), u.exports);
|
|
54
|
+
}(o), o);
|
|
33
55
|
}
|
|
34
56
|
export {
|
|
35
|
-
|
|
57
|
+
m as __require
|
|
36
58
|
};
|
package/dist/index76.mjs
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import { __module as u } from "./index136.mjs";
|
|
3
|
+
import d from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { __require as c } from "./index65.mjs";
|
|
6
|
+
var n;
|
|
7
|
+
function y() {
|
|
8
|
+
return n ? u.exports : (n = 1, function(a, e) {
|
|
9
|
+
Object.defineProperty(e, "__esModule", {
|
|
10
|
+
value: !0
|
|
11
|
+
}), Object.defineProperty(e, "default", {
|
|
12
|
+
enumerable: !0,
|
|
13
|
+
get: function() {
|
|
14
|
+
return l;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const f = d, o = c();
|
|
18
|
+
function l(t) {
|
|
19
|
+
function r(i) {
|
|
20
|
+
return /* @__PURE__ */ (0, f.jsx)(t, {
|
|
21
|
+
router: (0, o.useRouter)(),
|
|
22
|
+
...i
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
if (r.getInitialProps = t.getInitialProps, r.origGetInitialProps = t.origGetInitialProps, process.env.NODE_ENV !== "production") {
|
|
26
|
+
const i = t.displayName || t.name || "Unknown";
|
|
27
|
+
r.displayName = "withRouter(" + i + ")";
|
|
28
|
+
}
|
|
29
|
+
return r;
|
|
30
|
+
}
|
|
31
|
+
(typeof e.default == "function" || typeof e.default == "object" && e.default !== null) && typeof e.default.__esModule > "u" && (Object.defineProperty(e.default, "__esModule", { value: !0 }), Object.assign(e.default, e), a.exports = e.default);
|
|
32
|
+
}(u, u.exports), u.exports);
|
|
33
|
+
}
|
|
3
34
|
export {
|
|
4
|
-
|
|
35
|
+
y as __require
|
|
5
36
|
};
|
package/dist/index77.mjs
CHANGED
package/dist/index80.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import d from "./index78.mjs";
|
|
3
|
-
import U from "./
|
|
4
|
-
import q from "./
|
|
5
|
-
import R from "./
|
|
3
|
+
import U from "./index137.mjs";
|
|
4
|
+
import q from "./index138.mjs";
|
|
5
|
+
import R from "./index139.mjs";
|
|
6
6
|
import w from "./index81.mjs";
|
|
7
|
-
import A from "./
|
|
8
|
-
import m from "./
|
|
7
|
+
import A from "./index140.mjs";
|
|
8
|
+
import m from "./index141.mjs";
|
|
9
9
|
import T from "./index92.mjs";
|
|
10
10
|
const i = m.validators;
|
|
11
11
|
class k {
|
package/dist/index82.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import t from "./index78.mjs";
|
|
3
3
|
import c from "./index89.mjs";
|
|
4
|
-
import u from "./
|
|
4
|
+
import u from "./index142.mjs";
|
|
5
5
|
import S from "./index88.mjs";
|
|
6
|
-
import h from "./
|
|
7
|
-
import a from "./
|
|
6
|
+
import h from "./index143.mjs";
|
|
7
|
+
import a from "./index144.mjs";
|
|
8
8
|
import O from "./index83.mjs";
|
|
9
9
|
function y(i, r, e) {
|
|
10
10
|
if (t.isString(i))
|
package/dist/index92.mjs
CHANGED
package/dist/index93.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import s from "./index78.mjs";
|
|
3
|
-
import m from "./
|
|
4
|
-
import u from "./
|
|
5
|
-
import { getFetch as b } from "./
|
|
3
|
+
import m from "./index146.mjs";
|
|
4
|
+
import u from "./index147.mjs";
|
|
5
|
+
import { getFetch as b } from "./index148.mjs";
|
|
6
6
|
import d from "./index89.mjs";
|
|
7
7
|
const p = {
|
|
8
8
|
http: m,
|
package/dist/index97.mjs
CHANGED
package/dist/index98.mjs
CHANGED
|
@@ -1,31 +1,5 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
var c;
|
|
4
|
-
function o() {
|
|
5
|
-
if (c) return u;
|
|
6
|
-
c = 1;
|
|
7
|
-
function p(r) {
|
|
8
|
-
if (typeof WeakMap != "function") return null;
|
|
9
|
-
var n = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap();
|
|
10
|
-
return (p = function(t) {
|
|
11
|
-
return t ? e : n;
|
|
12
|
-
})(r);
|
|
13
|
-
}
|
|
14
|
-
function f(r, n) {
|
|
15
|
-
if (!n && r && r.__esModule) return r;
|
|
16
|
-
if (r === null || typeof r != "object" && typeof r != "function") return { default: r };
|
|
17
|
-
var e = p(n);
|
|
18
|
-
if (e && e.has(r)) return e.get(r);
|
|
19
|
-
var t = { __proto__: null }, _ = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
20
|
-
for (var i in r)
|
|
21
|
-
if (i !== "default" && Object.prototype.hasOwnProperty.call(r, i)) {
|
|
22
|
-
var a = _ ? Object.getOwnPropertyDescriptor(r, i) : null;
|
|
23
|
-
a && (a.get || a.set) ? Object.defineProperty(t, i, a) : t[i] = r[i];
|
|
24
|
-
}
|
|
25
|
-
return t.default = r, e && e.set(r, t), t;
|
|
26
|
-
}
|
|
27
|
-
return u._ = f, u;
|
|
28
|
-
}
|
|
2
|
+
var r = {};
|
|
29
3
|
export {
|
|
30
|
-
|
|
4
|
+
r as __exports
|
|
31
5
|
};
|
package/dist/index99.mjs
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { __exports as
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { __exports as u } from "./index149.mjs";
|
|
3
|
+
var c;
|
|
4
|
+
function o() {
|
|
5
|
+
if (c) return u;
|
|
6
|
+
c = 1;
|
|
7
|
+
function p(r) {
|
|
8
|
+
if (typeof WeakMap != "function") return null;
|
|
9
|
+
var n = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap();
|
|
10
|
+
return (p = function(t) {
|
|
11
|
+
return t ? e : n;
|
|
12
|
+
})(r);
|
|
13
|
+
}
|
|
14
|
+
function f(r, n) {
|
|
15
|
+
if (!n && r && r.__esModule) return r;
|
|
16
|
+
if (r === null || typeof r != "object" && typeof r != "function") return { default: r };
|
|
17
|
+
var e = p(n);
|
|
18
|
+
if (e && e.has(r)) return e.get(r);
|
|
19
|
+
var t = { __proto__: null }, _ = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
20
|
+
for (var i in r)
|
|
21
|
+
if (i !== "default" && Object.prototype.hasOwnProperty.call(r, i)) {
|
|
22
|
+
var a = _ ? Object.getOwnPropertyDescriptor(r, i) : null;
|
|
23
|
+
a && (a.get || a.set) ? Object.defineProperty(t, i, a) : t[i] = r[i];
|
|
12
24
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
}(e), e);
|
|
25
|
+
return t.default = r, e && e.set(r, t), t;
|
|
26
|
+
}
|
|
27
|
+
return u._ = f, u;
|
|
18
28
|
}
|
|
19
29
|
export {
|
|
20
|
-
|
|
30
|
+
o as __require
|
|
21
31
|
};
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
Package,
|
|
30
30
|
Info,
|
|
31
31
|
} from 'lucide-react';
|
|
32
|
-
import { formatCurrency, cn, getFbCookies } from '../lib/utils';
|
|
32
|
+
import { formatCurrency, cn, getFbCookies, getTikTokCookies } from '../lib/utils';
|
|
33
33
|
import PaystackSVG from "../paystack.svg"
|
|
34
34
|
import { usePaystackPayment } from '../hooks/usePaystackPayment';
|
|
35
35
|
|
|
@@ -161,6 +161,9 @@ export function Checkout({
|
|
|
161
161
|
// Get Facebook attribution cookies for CAPI
|
|
162
162
|
const { fbc, fbp } = getFbCookies();
|
|
163
163
|
|
|
164
|
+
// Get TikTok attribution cookies for Events API
|
|
165
|
+
const { ttp, ttclid } = getTikTokCookies();
|
|
166
|
+
|
|
164
167
|
const order = await checkout.mutateAsync({
|
|
165
168
|
firstName: formData.firstName,
|
|
166
169
|
lastName: formData.lastName,
|
|
@@ -173,6 +176,8 @@ export function Checkout({
|
|
|
173
176
|
paystackReference: response.reference,
|
|
174
177
|
fbc,
|
|
175
178
|
fbp,
|
|
179
|
+
ttp,
|
|
180
|
+
ttclid,
|
|
176
181
|
});
|
|
177
182
|
|
|
178
183
|
// Check if response is an error
|
|
@@ -430,6 +435,9 @@ export function Checkout({
|
|
|
430
435
|
// Get Facebook attribution cookies for CAPI
|
|
431
436
|
const { fbc, fbp } = getFbCookies();
|
|
432
437
|
|
|
438
|
+
// Get TikTok attribution cookies for Events API
|
|
439
|
+
const { ttp, ttclid } = getTikTokCookies();
|
|
440
|
+
|
|
433
441
|
const order = await checkout.mutateAsync({
|
|
434
442
|
firstName: formData.firstName,
|
|
435
443
|
lastName: formData.lastName,
|
|
@@ -441,6 +449,8 @@ export function Checkout({
|
|
|
441
449
|
paymentMethod: formData.paymentMethod,
|
|
442
450
|
fbc,
|
|
443
451
|
fbp,
|
|
452
|
+
ttp,
|
|
453
|
+
ttclid,
|
|
444
454
|
});
|
|
445
455
|
|
|
446
456
|
// Check if response is an error
|
|
@@ -15,6 +15,7 @@ import { Checkout } from './Checkout';
|
|
|
15
15
|
import { Button } from './ui/button';
|
|
16
16
|
import { X, Package, Loader2 } from 'lucide-react';
|
|
17
17
|
import { formatCurrency, cn } from '../lib/utils';
|
|
18
|
+
import { useHideBodyOverflow } from '@/hooks/useHideBodyOverflow';
|
|
18
19
|
|
|
19
20
|
export interface ShoppingCartProps {
|
|
20
21
|
/** Whether the cart is open */
|
|
@@ -67,16 +68,7 @@ export function ShoppingCart({
|
|
|
67
68
|
const [isCheckoutOpen, setIsCheckoutOpen] = useState(false);
|
|
68
69
|
|
|
69
70
|
// Prevent body scroll when cart is open
|
|
70
|
-
|
|
71
|
-
if (isOpen) {
|
|
72
|
-
document.body.style.overflow = 'hidden';
|
|
73
|
-
} else {
|
|
74
|
-
document.body.style.overflow = '';
|
|
75
|
-
}
|
|
76
|
-
return () => {
|
|
77
|
-
document.body.style.overflow = '';
|
|
78
|
-
};
|
|
79
|
-
}, [isOpen]);
|
|
71
|
+
useHideBodyOverflow(isOpen);
|
|
80
72
|
|
|
81
73
|
// Close on escape key
|
|
82
74
|
useEffect(() => {
|
|
@@ -11,6 +11,7 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
11
11
|
import { createPortal } from 'react-dom';
|
|
12
12
|
import { X } from 'lucide-react';
|
|
13
13
|
import { cn } from '../../lib/utils';
|
|
14
|
+
import { useHideBodyOverflow } from '@/hooks/useHideBodyOverflow';
|
|
14
15
|
|
|
15
16
|
export interface ModalProps {
|
|
16
17
|
/** Controls modal visibility */
|
|
@@ -86,15 +87,7 @@ export function Modal({
|
|
|
86
87
|
}, [isOpen, onClose]);
|
|
87
88
|
|
|
88
89
|
// Lock body scroll when modal is open
|
|
89
|
-
|
|
90
|
-
if (isOpen) {
|
|
91
|
-
const originalOverflow = document.body.style.overflow;
|
|
92
|
-
document.body.style.overflow = 'hidden';
|
|
93
|
-
return () => {
|
|
94
|
-
document.body.style.overflow = originalOverflow;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
}, [isOpen]);
|
|
90
|
+
useHideBodyOverflow(isOpen);
|
|
98
91
|
|
|
99
92
|
if (!shouldRender) return null;
|
|
100
93
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
|
|
3
|
+
export function useHideBodyOverflow(isHidden: boolean) {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (isHidden) {
|
|
6
|
+
document.body.style.overflow = 'hidden';
|
|
7
|
+
} else {
|
|
8
|
+
document.body.style.overflow = '';
|
|
9
|
+
}
|
|
10
|
+
return () => {
|
|
11
|
+
document.body.style.overflow = '';
|
|
12
|
+
};
|
|
13
|
+
}, [isHidden]);
|
|
14
|
+
}
|