@instockng/storefront-ui 1.0.15 → 1.0.16
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/OrderConfirmation.d.ts.map +1 -1
- package/dist/index10.mjs +3 -3
- package/dist/index100.mjs +33 -5
- package/dist/index101.mjs +31 -33
- package/dist/index102.mjs +26 -29
- package/dist/index103.mjs +59 -26
- package/dist/index104.mjs +3 -61
- package/dist/index105.mjs +2 -3
- package/dist/index106.mjs +2 -2
- package/dist/index107.mjs +17 -2
- package/dist/index108.mjs +11 -15
- package/dist/index109.mjs +6 -13
- package/dist/index11.mjs +2 -2
- package/dist/index110.mjs +30 -6
- package/dist/index13.mjs +1 -1
- package/dist/index17.mjs +2 -2
- package/dist/index29.mjs +1 -1
- package/dist/index30.mjs +1 -1
- package/dist/index31.mjs +1 -1
- package/dist/index32.mjs +1 -1
- package/dist/index33.mjs +1433 -4
- package/dist/index34.mjs +2 -1433
- package/dist/index35.mjs +57 -2
- package/dist/index36.mjs +48 -54
- package/dist/index37.mjs +33 -51
- package/dist/index38.mjs +15 -33
- package/dist/index39.mjs +2260 -12
- package/dist/index4.mjs +37 -37
- package/dist/index40.mjs +19 -2259
- package/dist/index42.mjs +17 -17
- package/dist/index43.mjs +2 -2
- package/dist/index44.mjs +1 -1
- package/dist/index45.mjs +1 -1
- package/dist/index46.mjs +1 -1
- package/dist/index47.mjs +1 -1
- package/dist/index48.mjs +1 -1
- package/dist/index49.mjs +1 -1
- package/dist/index50.mjs +1 -1
- package/dist/index51.mjs +1 -1
- package/dist/index52.mjs +1 -1
- package/dist/index53.mjs +1 -1
- package/dist/index54.mjs +1 -1
- package/dist/index55.mjs +73 -21
- package/dist/index56.mjs +14 -74
- package/dist/index57.mjs +62 -14
- package/dist/index58.mjs +4 -62
- package/dist/index61.mjs +34 -5
- package/dist/index62.mjs +40 -31
- package/dist/index63.mjs +230 -38
- package/dist/index64.mjs +4 -233
- package/dist/index65.mjs +133 -5
- package/dist/index66.mjs +63 -129
- package/dist/index67.mjs +86 -67
- package/dist/index68.mjs +27 -85
- package/dist/index69.mjs +8 -28
- package/dist/index70.mjs +74 -8
- package/dist/index71.mjs +3 -74
- package/dist/index72.mjs +2 -4
- package/dist/index73.mjs +83 -2
- package/dist/index74.mjs +52 -81
- package/dist/index75.mjs +5 -53
- package/dist/index76.mjs +4 -5
- package/dist/index77.mjs +178 -4
- package/dist/index78.mjs +48 -174
- package/dist/index79.mjs +67 -51
- package/dist/index80.mjs +21 -69
- package/dist/index81.mjs +54 -19
- package/dist/index82.mjs +28 -55
- package/dist/index83.mjs +5 -27
- package/dist/index84.mjs +51 -6
- package/dist/index85.mjs +5 -51
- package/dist/index86.mjs +12 -6
- package/dist/index87.mjs +7 -12
- package/dist/index88.mjs +27 -6
- package/dist/index89.mjs +2 -28
- package/dist/index90.mjs +70 -2
- package/dist/index91.mjs +164 -67
- package/dist/index92.mjs +28 -164
- package/dist/index93.mjs +10 -30
- package/dist/index94.mjs +3 -10
- package/dist/index95.mjs +3 -3
- package/dist/index96.mjs +13 -4
- package/dist/index97.mjs +7 -13
- package/dist/index98.mjs +12 -7
- package/dist/index99.mjs +4 -11
- package/package.json +2 -3
- package/src/components/OrderConfirmation.tsx +6 -1
- package/dist/index111.mjs +0 -33
package/dist/index35.mjs
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
import { useState as c, useEffect as f, useCallback as k } from "react";
|
|
3
|
+
function P({
|
|
4
|
+
publicKey: d,
|
|
5
|
+
onSuccess: e,
|
|
6
|
+
onClose: a
|
|
7
|
+
}) {
|
|
8
|
+
const [i, o] = c(!1), [l, r] = c(!1), [p, n] = c(null);
|
|
9
|
+
f(() => {
|
|
10
|
+
if (window.PaystackPop) {
|
|
11
|
+
o(!0);
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
const s = document.querySelector('script[src="https://js.paystack.co/v1/inline.js"]');
|
|
15
|
+
if (s) {
|
|
16
|
+
s.addEventListener("load", () => o(!0));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const t = document.createElement("script");
|
|
20
|
+
return t.src = "https://js.paystack.co/v1/inline.js", t.async = !0, t.onload = () => {
|
|
21
|
+
o(!0);
|
|
22
|
+
}, t.onerror = () => {
|
|
23
|
+
n("Failed to load Paystack script");
|
|
24
|
+
}, document.body.appendChild(t), () => {
|
|
25
|
+
};
|
|
26
|
+
}, []);
|
|
27
|
+
const u = k(
|
|
28
|
+
(s) => {
|
|
29
|
+
if (!i || !window.PaystackPop) {
|
|
30
|
+
n("Paystack script not loaded");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
r(!0), n(null);
|
|
34
|
+
try {
|
|
35
|
+
window.PaystackPop.setup({
|
|
36
|
+
...s,
|
|
37
|
+
key: d,
|
|
38
|
+
callback: (y) => {
|
|
39
|
+
r(!1), e == null || e(y);
|
|
40
|
+
},
|
|
41
|
+
onClose: () => {
|
|
42
|
+
r(!1), a == null || a();
|
|
43
|
+
}
|
|
44
|
+
}).openIframe();
|
|
45
|
+
} catch (t) {
|
|
46
|
+
r(!1), n(t instanceof Error ? t.message : "Failed to initialize payment");
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
[i, d, e, a]
|
|
50
|
+
);
|
|
51
|
+
return {
|
|
52
|
+
isLoaded: i,
|
|
53
|
+
isLoading: l,
|
|
54
|
+
error: p,
|
|
55
|
+
initializePayment: u
|
|
56
|
+
};
|
|
57
|
+
}
|
|
3
58
|
export {
|
|
4
|
-
|
|
59
|
+
P as usePaystackPayment
|
|
5
60
|
};
|
package/dist/index36.mjs
CHANGED
|
@@ -1,60 +1,54 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return;
|
|
2
|
+
import * as l from "react";
|
|
3
|
+
import { composeRefs as m } from "./index40.mjs";
|
|
4
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
+
// @__NO_SIDE_EFFECTS__
|
|
6
|
+
function y(e) {
|
|
7
|
+
const t = /* @__PURE__ */ S(e), o = l.forwardRef((n, r) => {
|
|
8
|
+
const { children: i, ...c } = n, s = l.Children.toArray(i), a = s.find(E);
|
|
9
|
+
if (a) {
|
|
10
|
+
const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
11
|
+
return /* @__PURE__ */ u(t, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
return /* @__PURE__ */ u(t, { ...c, ref: r, children: i });
|
|
14
|
+
});
|
|
15
|
+
return o.displayName = `${e}.Slot`, o;
|
|
16
|
+
}
|
|
17
|
+
var V = /* @__PURE__ */ y("Slot");
|
|
18
|
+
// @__NO_SIDE_EFFECTS__
|
|
19
|
+
function S(e) {
|
|
20
|
+
const t = l.forwardRef((o, n) => {
|
|
21
|
+
const { children: r, ...i } = o;
|
|
22
|
+
if (l.isValidElement(r)) {
|
|
23
|
+
const c = R(r), s = C(i, r.props);
|
|
24
|
+
return r.type !== l.Fragment && (s.ref = n ? m(n, c) : c), l.cloneElement(r, s);
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
r(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
r(!1), a == null || a();
|
|
43
|
-
}
|
|
44
|
-
}).openIframe();
|
|
45
|
-
} catch (t) {
|
|
46
|
-
r(!1), n(t instanceof Error ? t.message : "Failed to initialize payment");
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
[i, d, e, a]
|
|
50
|
-
);
|
|
51
|
-
return {
|
|
52
|
-
isLoaded: i,
|
|
53
|
-
isLoading: l,
|
|
54
|
-
error: p,
|
|
55
|
-
initializePayment: u
|
|
56
|
-
};
|
|
26
|
+
return l.Children.count(r) > 1 ? l.Children.only(null) : null;
|
|
27
|
+
});
|
|
28
|
+
return t.displayName = `${e}.SlotClone`, t;
|
|
29
|
+
}
|
|
30
|
+
var g = Symbol("radix.slottable");
|
|
31
|
+
function E(e) {
|
|
32
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
33
|
+
}
|
|
34
|
+
function C(e, t) {
|
|
35
|
+
const o = { ...t };
|
|
36
|
+
for (const n in t) {
|
|
37
|
+
const r = e[n], i = t[n];
|
|
38
|
+
/^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
|
|
39
|
+
const a = i(...s);
|
|
40
|
+
return r(...s), a;
|
|
41
|
+
} : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
|
|
42
|
+
}
|
|
43
|
+
return { ...e, ...o };
|
|
44
|
+
}
|
|
45
|
+
function R(e) {
|
|
46
|
+
var n, r;
|
|
47
|
+
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
48
|
+
return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
57
49
|
}
|
|
58
50
|
export {
|
|
59
|
-
|
|
51
|
+
V as Root,
|
|
52
|
+
V as Slot,
|
|
53
|
+
y as createSlot
|
|
60
54
|
};
|
package/dist/index37.mjs
CHANGED
|
@@ -1,54 +1,36 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
function C(e, t) {
|
|
35
|
-
const o = { ...t };
|
|
36
|
-
for (const n in t) {
|
|
37
|
-
const r = e[n], i = t[n];
|
|
38
|
-
/^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
|
|
39
|
-
const a = i(...s);
|
|
40
|
-
return r(...s), a;
|
|
41
|
-
} : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
|
|
42
|
-
}
|
|
43
|
-
return { ...e, ...o };
|
|
44
|
-
}
|
|
45
|
-
function R(e) {
|
|
46
|
-
var n, r;
|
|
47
|
-
let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
|
|
48
|
-
return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
49
|
-
}
|
|
2
|
+
import { clsx as O } from "./index38.mjs";
|
|
3
|
+
const m = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = O, j = (e, l) => (n) => {
|
|
4
|
+
var s;
|
|
5
|
+
if ((l == null ? void 0 : l.variants) == null) return y(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
6
|
+
const { variants: r, defaultVariants: d } = l, V = Object.keys(r).map((t) => {
|
|
7
|
+
const a = n == null ? void 0 : n[t], u = d == null ? void 0 : d[t];
|
|
8
|
+
if (a === null) return null;
|
|
9
|
+
const i = m(a) || m(u);
|
|
10
|
+
return r[t][i];
|
|
11
|
+
}), v = n && Object.entries(n).reduce((t, a) => {
|
|
12
|
+
let [u, i] = a;
|
|
13
|
+
return i === void 0 || (t[u] = i), t;
|
|
14
|
+
}, {}), N = l == null || (s = l.compoundVariants) === null || s === void 0 ? void 0 : s.reduce((t, a) => {
|
|
15
|
+
let { class: u, className: i, ...f } = a;
|
|
16
|
+
return Object.entries(f).every((C) => {
|
|
17
|
+
let [c, o] = C;
|
|
18
|
+
return Array.isArray(o) ? o.includes({
|
|
19
|
+
...d,
|
|
20
|
+
...v
|
|
21
|
+
}[c]) : {
|
|
22
|
+
...d,
|
|
23
|
+
...v
|
|
24
|
+
}[c] === o;
|
|
25
|
+
}) ? [
|
|
26
|
+
...t,
|
|
27
|
+
u,
|
|
28
|
+
i
|
|
29
|
+
] : t;
|
|
30
|
+
}, []);
|
|
31
|
+
return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
32
|
+
};
|
|
50
33
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
y as createSlot
|
|
34
|
+
j as cva,
|
|
35
|
+
y as cx
|
|
54
36
|
};
|
package/dist/index38.mjs
CHANGED
|
@@ -1,36 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let { class: u, className: i, ...f } = a;
|
|
16
|
-
return Object.entries(f).every((C) => {
|
|
17
|
-
let [c, o] = C;
|
|
18
|
-
return Array.isArray(o) ? o.includes({
|
|
19
|
-
...d,
|
|
20
|
-
...v
|
|
21
|
-
}[c]) : {
|
|
22
|
-
...d,
|
|
23
|
-
...v
|
|
24
|
-
}[c] === o;
|
|
25
|
-
}) ? [
|
|
26
|
-
...t,
|
|
27
|
-
u,
|
|
28
|
-
i
|
|
29
|
-
] : t;
|
|
30
|
-
}, []);
|
|
31
|
-
return y(e, V, N, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
|
|
32
|
-
};
|
|
2
|
+
function a(r) {
|
|
3
|
+
var n, f, t = "";
|
|
4
|
+
if (typeof r == "string" || typeof r == "number") t += r;
|
|
5
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
6
|
+
var o = r.length;
|
|
7
|
+
for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
|
|
8
|
+
} else for (f in r) r[f] && (t && (t += " "), t += f);
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
function i() {
|
|
12
|
+
for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
|
|
13
|
+
return t;
|
|
14
|
+
}
|
|
33
15
|
export {
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
i as clsx,
|
|
17
|
+
i as default
|
|
36
18
|
};
|