@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.
Files changed (233) hide show
  1. package/dist/components/Checkout.d.ts.map +1 -1
  2. package/dist/components/ShoppingCart.d.ts.map +1 -1
  3. package/dist/components/ui/modal.d.ts.map +1 -1
  4. package/dist/hooks/useHideBodyOverflow.d.ts +2 -0
  5. package/dist/hooks/useHideBodyOverflow.d.ts.map +1 -0
  6. package/dist/index100.mjs +13 -210
  7. package/dist/index101.mjs +194 -159
  8. package/dist/index102.mjs +175 -17
  9. package/dist/index103.mjs +14 -15
  10. package/dist/index104.mjs +15 -25
  11. package/dist/index105.mjs +27 -150
  12. package/dist/index106.mjs +151 -15
  13. package/dist/index107.mjs +13 -24
  14. package/dist/index108.mjs +22 -75
  15. package/dist/index109.mjs +76 -30
  16. package/dist/index11.mjs +57 -58
  17. package/dist/index110.mjs +32 -139
  18. package/dist/index111.mjs +135 -45
  19. package/dist/index112.mjs +51 -19
  20. package/dist/index113.mjs +15 -19
  21. package/dist/index114.mjs +21 -17
  22. package/dist/index115.mjs +16 -18
  23. package/dist/index116.mjs +17 -13
  24. package/dist/index117.mjs +13 -14
  25. package/dist/index118.mjs +13 -12
  26. package/dist/index119.mjs +14 -58
  27. package/dist/index120.mjs +57 -10
  28. package/dist/index121.mjs +11 -32
  29. package/dist/index122.mjs +32 -17
  30. package/dist/index123.mjs +17 -27
  31. package/dist/index124.mjs +26 -19
  32. package/dist/index125.mjs +20 -12
  33. package/dist/index126.mjs +12 -14
  34. package/dist/index127.mjs +14 -40
  35. package/dist/index128.mjs +40 -16
  36. package/dist/index129.mjs +16 -261
  37. package/dist/index13.mjs +179 -175
  38. package/dist/index130.mjs +262 -64
  39. package/dist/index131.mjs +69 -7
  40. package/dist/index132.mjs +8 -2
  41. package/dist/index133.mjs +2 -2
  42. package/dist/index134.mjs +2 -33
  43. package/dist/index135.mjs +33 -2
  44. package/dist/index136.mjs +2 -2
  45. package/dist/index137.mjs +21 -2
  46. package/dist/index138.mjs +56 -2
  47. package/dist/index139.mjs +28 -17
  48. package/dist/index14.mjs +2 -2
  49. package/dist/index140.mjs +6 -31
  50. package/dist/index141.mjs +50 -36
  51. package/dist/index142.mjs +6 -18
  52. package/dist/index143.mjs +11 -17
  53. package/dist/index144.mjs +7 -2
  54. package/dist/index145.mjs +28 -20
  55. package/dist/index146.mjs +2 -46
  56. package/dist/index147.mjs +70 -2
  57. package/dist/index148.mjs +164 -27
  58. package/dist/index149.mjs +2 -18
  59. package/dist/index150.mjs +2 -2
  60. package/dist/index151.mjs +2 -2
  61. package/dist/index152.mjs +18 -2
  62. package/dist/index153.mjs +32 -2
  63. package/dist/index154.mjs +28 -62
  64. package/dist/index155.mjs +18 -2
  65. package/dist/index156.mjs +13 -48
  66. package/dist/index157.mjs +2 -2
  67. package/dist/index158.mjs +14 -30
  68. package/dist/index159.mjs +39 -145
  69. package/dist/index16.mjs +1 -1
  70. package/dist/index160.mjs +2 -2
  71. package/dist/index161.mjs +30 -2
  72. package/dist/index162.mjs +11 -12
  73. package/dist/index163.mjs +2 -2
  74. package/dist/index164.mjs +2 -2
  75. package/dist/index165.mjs +2 -26
  76. package/dist/index167.mjs +72 -2
  77. package/dist/index168.mjs +2 -24
  78. package/dist/index169.mjs +48 -18
  79. package/dist/index17.mjs +41 -47
  80. package/dist/index170.mjs +2 -2
  81. package/dist/index171.mjs +36 -2
  82. package/dist/index172.mjs +152 -2
  83. package/dist/index173.mjs +2 -23
  84. package/dist/index174.mjs +2 -2
  85. package/dist/index175.mjs +11 -15
  86. package/dist/index176.mjs +2 -2
  87. package/dist/index177.mjs +2 -2
  88. package/dist/index178.mjs +26 -2
  89. package/dist/index179.mjs +2 -23
  90. package/dist/index180.mjs +2 -2
  91. package/dist/index181.mjs +18 -17
  92. package/dist/index182.mjs +23 -2
  93. package/dist/index183.mjs +2 -2
  94. package/dist/index184.mjs +2 -2
  95. package/dist/index185.mjs +2 -2
  96. package/dist/index186.mjs +23 -2
  97. package/dist/index187.mjs +2 -2
  98. package/dist/index188.mjs +23 -2
  99. package/dist/index189.mjs +2 -2
  100. package/dist/index190.mjs +2 -127
  101. package/dist/index191.mjs +2 -2
  102. package/dist/index192.mjs +20 -71
  103. package/dist/index193.mjs +2 -74
  104. package/dist/index194.mjs +22 -20
  105. package/dist/index195.mjs +2 -56
  106. package/dist/index196.mjs +2 -29
  107. package/dist/index197.mjs +2 -7
  108. package/dist/index198.mjs +2 -52
  109. package/dist/index199.mjs +2 -6
  110. package/dist/index20.mjs +2 -2
  111. package/dist/index200.mjs +2 -12
  112. package/dist/index201.mjs +2 -7
  113. package/dist/index202.mjs +2 -28
  114. package/dist/index203.mjs +127 -2
  115. package/dist/index204.mjs +2 -70
  116. package/dist/index205.mjs +72 -165
  117. package/dist/index206.mjs +74 -2
  118. package/dist/index207.mjs +2 -2
  119. package/dist/index208.mjs +31 -2
  120. package/dist/index209.mjs +11 -2
  121. package/dist/index210.mjs +4 -2
  122. package/dist/index211.mjs +4 -2
  123. package/dist/index212.mjs +13 -2
  124. package/dist/index213.mjs +7 -2
  125. package/dist/index214.mjs +12 -2
  126. package/dist/index215.mjs +4 -107
  127. package/dist/index216.mjs +33 -2
  128. package/dist/index217.mjs +31 -2
  129. package/dist/index218.mjs +27 -36
  130. package/dist/index219.mjs +61 -2
  131. package/dist/index220.mjs +2 -244
  132. package/dist/index221.mjs +2 -2
  133. package/dist/index222.mjs +2 -33
  134. package/dist/index223.mjs +2 -65
  135. package/dist/index224.mjs +2 -25
  136. package/dist/index225.mjs +2 -2
  137. package/dist/index226.mjs +2 -2
  138. package/dist/index227.mjs +2 -2
  139. package/dist/index228.mjs +108 -2
  140. package/dist/index23.mjs +2 -2
  141. package/dist/index230.mjs +2 -2
  142. package/dist/index231.mjs +37 -2
  143. package/dist/index232.mjs +2 -2
  144. package/dist/index233.mjs +244 -2
  145. package/dist/index234.mjs +2 -2
  146. package/dist/index235.mjs +33 -4
  147. package/dist/index236.mjs +65 -2
  148. package/dist/index237.mjs +25 -2
  149. package/dist/index238.mjs +2 -31
  150. package/dist/index239.mjs +2 -11
  151. package/dist/index24.mjs +1 -1
  152. package/dist/index240.mjs +2 -4
  153. package/dist/index241.mjs +2 -4
  154. package/dist/index242.mjs +2 -13
  155. package/dist/index243.mjs +2 -7
  156. package/dist/index244.mjs +2 -12
  157. package/dist/index245.mjs +2 -5
  158. package/dist/index246.mjs +2 -33
  159. package/dist/index247.mjs +2 -31
  160. package/dist/index248.mjs +4 -28
  161. package/dist/index249.mjs +2 -61
  162. package/dist/index251.mjs +2 -2
  163. package/dist/index255.mjs +2 -2
  164. package/dist/index256.mjs +2 -2
  165. package/dist/index257.mjs +2 -2
  166. package/dist/index258.mjs +2 -91
  167. package/dist/index259.mjs +91 -2
  168. package/dist/index260.mjs +1 -2
  169. package/dist/index261.mjs +3 -2
  170. package/dist/index262.mjs +2 -2
  171. package/dist/index263.mjs +2 -17
  172. package/dist/index264.mjs +15 -11
  173. package/dist/index265.mjs +13 -6
  174. package/dist/index266.mjs +6 -30
  175. package/dist/index267.mjs +30 -2
  176. package/dist/index270.mjs +5 -0
  177. package/dist/index32.mjs +11 -11
  178. package/dist/index33.mjs +1 -1
  179. package/dist/index34.mjs +1 -1
  180. package/dist/index35.mjs +1 -1
  181. package/dist/index36.mjs +1 -1
  182. package/dist/index37.mjs +1 -1
  183. package/dist/index38.mjs +2 -2
  184. package/dist/index40.mjs +1 -1
  185. package/dist/index41.mjs +6 -1432
  186. package/dist/index42.mjs +1433 -2
  187. package/dist/index43.mjs +2 -60
  188. package/dist/index44.mjs +57 -48
  189. package/dist/index45.mjs +51 -33
  190. package/dist/index46.mjs +33 -15
  191. package/dist/index47.mjs +12 -2260
  192. package/dist/index48.mjs +2263 -36
  193. package/dist/index49.mjs +36 -44
  194. package/dist/index50.mjs +44 -99
  195. package/dist/index51.mjs +99 -113
  196. package/dist/index52.mjs +82 -50
  197. package/dist/index53.mjs +55 -51
  198. package/dist/index54.mjs +46 -64
  199. package/dist/index55.mjs +71 -57
  200. package/dist/index56.mjs +57 -55
  201. package/dist/index57.mjs +75 -15
  202. package/dist/index58.mjs +13 -12
  203. package/dist/index59.mjs +12 -57
  204. package/dist/index60.mjs +43 -105
  205. package/dist/index61.mjs +89 -93
  206. package/dist/index62.mjs +128 -23
  207. package/dist/index63.mjs +24 -2
  208. package/dist/index64.mjs +2 -23
  209. package/dist/index65.mjs +7 -7
  210. package/dist/index66.mjs +21 -73
  211. package/dist/index67.mjs +74 -14
  212. package/dist/index68.mjs +14 -62
  213. package/dist/index69.mjs +62 -4
  214. package/dist/index70.mjs +5 -2
  215. package/dist/index71.mjs +2 -6
  216. package/dist/index72.mjs +5 -1133
  217. package/dist/index73.mjs +1130 -16
  218. package/dist/index74.mjs +16 -51
  219. package/dist/index75.mjs +49 -27
  220. package/dist/index76.mjs +33 -2
  221. package/dist/index77.mjs +2 -2
  222. package/dist/index80.mjs +5 -5
  223. package/dist/index82.mjs +3 -3
  224. package/dist/index92.mjs +1 -1
  225. package/dist/index93.mjs +3 -3
  226. package/dist/index97.mjs +2 -2
  227. package/dist/index98.mjs +2 -28
  228. package/dist/index99.mjs +26 -16
  229. package/package.json +1 -1
  230. package/src/components/Checkout.tsx +11 -1
  231. package/src/components/ShoppingCart.tsx +2 -10
  232. package/src/components/ui/modal.tsx +2 -9
  233. package/src/hooks/useHideBodyOverflow.ts +14 -0
package/dist/index74.mjs CHANGED
@@ -1,58 +1,23 @@
1
1
  'use client';
2
- import { __exports as o } from "./index133.mjs";
3
- import { __require as p } from "./index134.mjs";
4
- var u;
5
- function m() {
6
- return u ? o : (u = 1, function(i) {
7
- Object.defineProperty(i, "__esModule", {
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
- 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;
11
+ }), Object.defineProperty(t, "RouterContext", {
12
+ enumerable: !0,
13
+ get: function() {
14
+ return r;
26
15
  }
27
16
  });
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");
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
- m as __require
22
+ d as __require
58
23
  };
package/dist/index75.mjs CHANGED
@@ -1,36 +1,58 @@
1
1
  'use client';
2
- import { __module as u } from "./index135.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", {
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
- 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
- });
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
- 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 + ")";
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 r;
52
+ return new Error((0, c.isPlainObject)(e) ? d(e) : e + "");
30
53
  }
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);
54
+ }(o), o);
33
55
  }
34
56
  export {
35
- y as __require
57
+ m as __require
36
58
  };
package/dist/index76.mjs CHANGED
@@ -1,5 +1,36 @@
1
1
  'use client';
2
- var e = {};
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
- e as __exports
35
+ y as __require
5
36
  };
package/dist/index77.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var o = { exports: {} };
2
+ var e = {};
3
3
  export {
4
- o as __module
4
+ e as __exports
5
5
  };
package/dist/index80.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import d from "./index78.mjs";
3
- import U from "./index194.mjs";
4
- import q from "./index195.mjs";
5
- import R from "./index196.mjs";
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 "./index197.mjs";
8
- import m from "./index198.mjs";
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 "./index199.mjs";
4
+ import u from "./index142.mjs";
5
5
  import S from "./index88.mjs";
6
- import h from "./index200.mjs";
7
- import a from "./index201.mjs";
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
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import i from "./index78.mjs";
3
- import S from "./index202.mjs";
3
+ import S from "./index145.mjs";
4
4
  const h = Symbol("internals");
5
5
  function y(r) {
6
6
  return r && String(r).trim().toLowerCase();
package/dist/index93.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import s from "./index78.mjs";
3
- import m from "./index203.mjs";
4
- import u from "./index204.mjs";
5
- import { getFetch as b } from "./index205.mjs";
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
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- var r = {};
2
+ var o = { exports: {} };
3
3
  export {
4
- r as __exports
4
+ o as __module
5
5
  };
package/dist/index98.mjs CHANGED
@@ -1,31 +1,5 @@
1
1
  'use client';
2
- import { __exports as u } from "./index136.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];
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
- o as __require
4
+ r as __exports
31
5
  };
package/dist/index99.mjs CHANGED
@@ -1,21 +1,31 @@
1
1
  'use client';
2
- import { __exports as e } from "./index137.mjs";
3
- var i;
4
- function u() {
5
- return i ? e : (i = 1, function(r) {
6
- Object.defineProperty(r, "__esModule", {
7
- value: !0
8
- }), Object.defineProperty(r, "removeTrailingSlash", {
9
- enumerable: !0,
10
- get: function() {
11
- return n;
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
- function n(a) {
15
- return a.replace(/\/$/, "") || "/";
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
- u as __require
30
+ o as __require
21
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instockng/storefront-ui",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "Pre-built UI components for OMS e-commerce sites",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
- useEffect(() => {
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
- useEffect(() => {
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
+ }