@ed.yakovich/component-library 0.0.18 → 0.0.19
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,30 +1,30 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import { c as s } from "../../link-DO_Jvm9n.js";
|
|
3
3
|
import { P as d } from "../../index-C9Rf5U9q.js";
|
|
4
|
-
const
|
|
5
|
-
const { backUrl:
|
|
4
|
+
const b = (i) => {
|
|
5
|
+
const r = s(d), { backUrl: t, nextUrl: o } = i;
|
|
6
6
|
return /* @__PURE__ */ e("nav", { "data-component-id": "Cart", className: "mt-4 border-t-3 border-blue-500 border-solid @container/cart", children: /* @__PURE__ */ e("div", { className: "w-full flex justify-center @lg/cart:justify-end", children: /* @__PURE__ */ n("div", { className: "flex justify-center", children: [
|
|
7
7
|
/* @__PURE__ */ e("div", { className: "px-12 py-3 @lg/cart:border-l-3 border-blue-500 border-solid", children: /* @__PURE__ */ e(
|
|
8
|
-
|
|
8
|
+
r,
|
|
9
9
|
{
|
|
10
10
|
size: "xs",
|
|
11
11
|
display: "menu",
|
|
12
12
|
tone: "info",
|
|
13
13
|
type: "button",
|
|
14
|
-
disabled: !
|
|
15
|
-
to:
|
|
14
|
+
disabled: !t,
|
|
15
|
+
to: t,
|
|
16
16
|
children: /* @__PURE__ */ e("strong", { children: "Back" })
|
|
17
17
|
}
|
|
18
18
|
) }),
|
|
19
19
|
/* @__PURE__ */ e("div", { className: "px-12 py-3 border-l-3 border-blue-500 border-solid", children: /* @__PURE__ */ e(
|
|
20
|
-
|
|
20
|
+
r,
|
|
21
21
|
{
|
|
22
22
|
size: "xs",
|
|
23
23
|
display: "menu",
|
|
24
24
|
tone: "info",
|
|
25
25
|
type: "button",
|
|
26
|
-
disabled: !
|
|
27
|
-
to:
|
|
26
|
+
disabled: !o,
|
|
27
|
+
to: o,
|
|
28
28
|
children: /* @__PURE__ */ e("strong", { children: "Next" })
|
|
29
29
|
}
|
|
30
30
|
) })
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { P as
|
|
4
|
-
const
|
|
5
|
-
const { pages:
|
|
6
|
-
return /* @__PURE__ */ e("nav", { "data-component-id": "Nav", className: "p-6", children: /* @__PURE__ */ e("div", { className: "flex justify-center gap-4", children:
|
|
7
|
-
|
|
2
|
+
import { c as a } from "../../link-DO_Jvm9n.js";
|
|
3
|
+
import { P as c } from "../../index-C9Rf5U9q.js";
|
|
4
|
+
const p = (r) => {
|
|
5
|
+
const o = a(c), { pages: n } = r;
|
|
6
|
+
return /* @__PURE__ */ e("nav", { "data-component-id": "Nav", className: "p-6", children: /* @__PURE__ */ e("div", { className: "flex justify-center gap-4", children: n.map(({ name: t, url: s }, i) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
7
|
+
o,
|
|
8
8
|
{
|
|
9
9
|
size: "xs",
|
|
10
10
|
display: "menu",
|
|
11
11
|
tone: "info",
|
|
12
12
|
type: "button",
|
|
13
|
-
to:
|
|
13
|
+
to: s,
|
|
14
14
|
activeProps: {
|
|
15
15
|
className: "font-bold text-blue-500 border-blue-500 border-b-2"
|
|
16
16
|
},
|
|
17
17
|
children: /* @__PURE__ */ e("strong", { children: t })
|
|
18
18
|
}
|
|
19
|
-
) }, `${t}-${
|
|
19
|
+
) }, `${t}-${i}`)) }) });
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
22
|
p as Nav
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
5
|
-
const {
|
|
6
|
-
isLoading:
|
|
2
|
+
import { b as v, a as h, P } from "../../../index-C9Rf5U9q.js";
|
|
3
|
+
import { c as k } from "../../../link-DO_Jvm9n.js";
|
|
4
|
+
const w = (f) => {
|
|
5
|
+
const p = k(P), {
|
|
6
|
+
isLoading: x = !1,
|
|
7
7
|
id: s = "",
|
|
8
8
|
icon: n = "",
|
|
9
9
|
heading: i = "",
|
|
@@ -12,9 +12,9 @@ const k = P(N), w = (f) => {
|
|
|
12
12
|
price: o = "",
|
|
13
13
|
buttonLabel: d = "",
|
|
14
14
|
buttonHref: c = "",
|
|
15
|
-
buttonDisabled:
|
|
16
|
-
perMonth:
|
|
17
|
-
handleOfferCardAction:
|
|
15
|
+
buttonDisabled: u,
|
|
16
|
+
perMonth: b = !1,
|
|
17
|
+
handleOfferCardAction: g = () => {
|
|
18
18
|
}
|
|
19
19
|
} = f;
|
|
20
20
|
return /* @__PURE__ */ t(
|
|
@@ -23,7 +23,7 @@ const k = P(N), w = (f) => {
|
|
|
23
23
|
"data-component-id": `OfferCard--${s}`,
|
|
24
24
|
className: "border-3 border-blue-500 border-solid rounded-lg flex flex-col bg-white h-full text-center relative",
|
|
25
25
|
children: [
|
|
26
|
-
|
|
26
|
+
x && /* @__PURE__ */ e("div", { className: "absolute top-2 left-2", children: /* @__PURE__ */ e(v, { display: "inline", type: "spinner" }) }),
|
|
27
27
|
/* @__PURE__ */ t("div", { className: "grow p-4", children: [
|
|
28
28
|
n && /* @__PURE__ */ e(h, { name: n, tone: "info", theme: "outline", size: "md" }),
|
|
29
29
|
i && /* @__PURE__ */ e("h3", { className: "text-lg", children: /* @__PURE__ */ e("strong", { children: i }) }),
|
|
@@ -33,23 +33,23 @@ const k = P(N), w = (f) => {
|
|
|
33
33
|
"$",
|
|
34
34
|
Math.floor(o)
|
|
35
35
|
] }) }),
|
|
36
|
-
|
|
36
|
+
b && /* @__PURE__ */ e("span", { className: "text-lg", children: "/mo" })
|
|
37
37
|
] }),
|
|
38
|
-
r.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-4 list-disc text-left", children: r.map(({ icon: l, description: m },
|
|
38
|
+
r.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-4 list-disc text-left", children: r.map(({ icon: l, description: m }, N) => /* @__PURE__ */ t("li", { className: "flex gap-2", children: [
|
|
39
39
|
l && /* @__PURE__ */ e(h, { name: l, tone: "info", theme: "outline", size: "xs" }),
|
|
40
40
|
m && /* @__PURE__ */ e("p", { className: "text-xs", children: m })
|
|
41
|
-
] }, `${l}-${
|
|
41
|
+
] }, `${l}-${N}`)) })
|
|
42
42
|
] }),
|
|
43
43
|
d && /* @__PURE__ */ e("div", { className: "mt-8 bg-blue-500 p-2", children: /* @__PURE__ */ e(
|
|
44
|
-
|
|
44
|
+
p,
|
|
45
45
|
{
|
|
46
46
|
size: "xs",
|
|
47
47
|
display: "link",
|
|
48
48
|
tone: "info",
|
|
49
49
|
type: "button",
|
|
50
50
|
className: "text-white",
|
|
51
|
-
disabled:
|
|
52
|
-
...c ? { to: c } : { onClick: () =>
|
|
51
|
+
disabled: u,
|
|
52
|
+
...c ? { to: c } : { onClick: () => g(s) },
|
|
53
53
|
children: d
|
|
54
54
|
}
|
|
55
55
|
) })
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { P as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useSaleBannerContext as
|
|
5
|
-
const
|
|
6
|
-
const { isHidden:
|
|
7
|
-
isHiddenVal:
|
|
8
|
-
headingVal:
|
|
9
|
-
descriptionVal:
|
|
10
|
-
disclaimerVal:
|
|
11
|
-
normalPriceVal:
|
|
12
|
-
salePriceVal:
|
|
13
|
-
linkTextVal:
|
|
14
|
-
linkUrlVal:
|
|
15
|
-
}), { isHiddenVal:
|
|
16
|
-
return
|
|
2
|
+
import { P as S } from "../../index-C9Rf5U9q.js";
|
|
3
|
+
import { c as $ } from "../../link-DO_Jvm9n.js";
|
|
4
|
+
import { useSaleBannerContext as j } from "./context/index.js";
|
|
5
|
+
const q = (c) => {
|
|
6
|
+
const m = $(S), { isHidden: x, componentId: h = "", heading: p = "", description: b = "", disclaimer: u = "", normalPrice: g = 0, salePrice: V = 0, linkText: N = "", linkUrl: P = "" } = c, e = j(), k = e == null ? void 0 : e.isHidden, f = (e == null ? void 0 : e.heading) || "", v = (e == null ? void 0 : e.description) || "", C = (e == null ? void 0 : e.disclaimer) || "", w = (e == null ? void 0 : e.normalPrice) || "", B = (e == null ? void 0 : e.salePrice) || "", H = (e == null ? void 0 : e.linkText) || "", T = (e == null ? void 0 : e.linkUrl) || "", U = () => ({
|
|
7
|
+
isHiddenVal: k || x,
|
|
8
|
+
headingVal: f || p,
|
|
9
|
+
descriptionVal: v || b,
|
|
10
|
+
disclaimerVal: C || u,
|
|
11
|
+
normalPriceVal: w || g,
|
|
12
|
+
salePriceVal: B || V,
|
|
13
|
+
linkTextVal: H || N,
|
|
14
|
+
linkUrlVal: T || P
|
|
15
|
+
}), { isHiddenVal: y, headingVal: a, descriptionVal: i, disclaimerVal: r, normalPriceVal: s, salePriceVal: d, linkTextVal: t, linkUrlVal: o } = U();
|
|
16
|
+
return y ? null : /* @__PURE__ */ l(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
"data-component-id": `SaleBanner--${
|
|
19
|
+
"data-component-id": `SaleBanner--${h}`,
|
|
20
20
|
className: "relative border-3 border-blue-500 border-solid rounded-lg p-8 @container/salebanner",
|
|
21
21
|
children: /* @__PURE__ */ n("div", { className: "space-y-6", children: [
|
|
22
22
|
/* @__PURE__ */ n("div", { className: "space-y-2 @lg/salebanner:w-[50%] @xl/salebanner:w-[60%] @2xl/salebanner:w-[70%]", children: [
|
|
@@ -38,7 +38,7 @@ const j = S(y), q = (c) => {
|
|
|
38
38
|
] })
|
|
39
39
|
] }) }),
|
|
40
40
|
t && o && /* @__PURE__ */ l("div", { className: "text-center bg-blue-500 rounded-full w-[200px] mx-auto px-2", children: /* @__PURE__ */ l(
|
|
41
|
-
|
|
41
|
+
m,
|
|
42
42
|
{
|
|
43
43
|
size: "xs",
|
|
44
44
|
display: "fill",
|