@ed.yakovich/component-library 0.0.18 → 0.0.20
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,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { c as s } from "../../link-DO_Jvm9n.js";
|
|
3
|
-
import { P as
|
|
4
|
-
const o = s(
|
|
5
|
-
const { backUrl: r, nextUrl: t } =
|
|
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__ */
|
|
3
|
+
import { P as n } from "../../index-C9Rf5U9q.js";
|
|
4
|
+
const o = typeof window < "u" ? s(n) : n, b = (d) => {
|
|
5
|
+
const { backUrl: r, nextUrl: t } = d;
|
|
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__ */ i("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
|
o,
|
|
9
9
|
{
|
|
@@ -1,16 +1,16 @@
|
|
|
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 n } from "../../index-C9Rf5U9q.js";
|
|
4
|
+
const d = typeof window < "u" ? a(n) : n, p = (o) => {
|
|
5
|
+
const { pages: r } = o;
|
|
6
|
+
return /* @__PURE__ */ e("nav", { "data-component-id": "Nav", className: "p-6", children: /* @__PURE__ */ e("div", { className: "flex justify-center gap-4", children: r.map(({ name: t, url: i }, s) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
7
|
+
d,
|
|
8
8
|
{
|
|
9
9
|
size: "xs",
|
|
10
10
|
display: "menu",
|
|
11
11
|
tone: "info",
|
|
12
12
|
type: "button",
|
|
13
|
-
to:
|
|
13
|
+
to: i,
|
|
14
14
|
activeProps: {
|
|
15
15
|
className: "font-bold text-blue-500 border-blue-500 border-b-2"
|
|
16
16
|
},
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { P as
|
|
3
|
-
import { c as
|
|
4
|
-
const
|
|
2
|
+
import { P as h, b as v, a as f } from "../../../index-C9Rf5U9q.js";
|
|
3
|
+
import { c as w } from "../../../link-DO_Jvm9n.js";
|
|
4
|
+
const y = typeof window < "u" ? w(h) : h, $ = (p) => {
|
|
5
5
|
const {
|
|
6
|
-
isLoading:
|
|
7
|
-
id:
|
|
8
|
-
icon:
|
|
9
|
-
heading:
|
|
6
|
+
isLoading: x = !1,
|
|
7
|
+
id: l = "",
|
|
8
|
+
icon: i = "",
|
|
9
|
+
heading: s = "",
|
|
10
10
|
description: a = "",
|
|
11
11
|
iconList: r = [],
|
|
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
|
+
} = p;
|
|
20
20
|
return /* @__PURE__ */ t(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
"data-component-id": `OfferCard--${
|
|
23
|
+
"data-component-id": `OfferCard--${l}`,
|
|
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
|
-
|
|
29
|
-
|
|
28
|
+
i && /* @__PURE__ */ e(f, { name: i, tone: "info", theme: "outline", size: "md" }),
|
|
29
|
+
s && /* @__PURE__ */ e("h3", { className: "text-lg", children: /* @__PURE__ */ e("strong", { children: s }) }),
|
|
30
30
|
a && /* @__PURE__ */ e("p", { className: "text-xs", children: a }),
|
|
31
31
|
o && /* @__PURE__ */ t("p", { className: "mt-2", children: [
|
|
32
32
|
/* @__PURE__ */ e("span", { className: "text-5xl", children: /* @__PURE__ */ t("strong", { children: [
|
|
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:
|
|
39
|
-
|
|
38
|
+
r.length > 0 && /* @__PURE__ */ e("ul", { className: "mt-4 list-disc text-left", children: r.map(({ icon: n, description: m }, N) => /* @__PURE__ */ t("li", { className: "flex gap-2", children: [
|
|
39
|
+
n && /* @__PURE__ */ e(f, { name: n, tone: "info", theme: "outline", size: "xs" }),
|
|
40
40
|
m && /* @__PURE__ */ e("p", { className: "text-xs", children: m })
|
|
41
|
-
] }, `${
|
|
41
|
+
] }, `${n}-${N}`)) })
|
|
42
42
|
] }),
|
|
43
43
|
d && /* @__PURE__ */ e("div", { className: "mt-8 bg-blue-500 p-2", children: /* @__PURE__ */ e(
|
|
44
|
-
|
|
44
|
+
y,
|
|
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(l) },
|
|
53
53
|
children: d
|
|
54
54
|
}
|
|
55
55
|
) })
|
|
@@ -58,5 +58,5 @@ const k = P(N), w = (f) => {
|
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
$ as default
|
|
62
62
|
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { jsx as l, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { P as
|
|
2
|
+
import { P as c } from "../../index-C9Rf5U9q.js";
|
|
3
3
|
import { c as S } from "../../link-DO_Jvm9n.js";
|
|
4
4
|
import { useSaleBannerContext as $ } from "./context/index.js";
|
|
5
|
-
const j = S(
|
|
6
|
-
const { isHidden:
|
|
7
|
-
isHiddenVal:
|
|
8
|
-
headingVal:
|
|
9
|
-
descriptionVal:
|
|
10
|
-
disclaimerVal:
|
|
11
|
-
normalPriceVal: C ||
|
|
12
|
-
salePriceVal:
|
|
13
|
-
linkTextVal: B ||
|
|
14
|
-
linkUrlVal: H ||
|
|
15
|
-
}), { isHiddenVal: U, headingVal:
|
|
5
|
+
const j = typeof window < "u" ? S(c) : c, q = (m) => {
|
|
6
|
+
const { isHidden: x, componentId: h = "", heading: p = "", description: b = "", disclaimer: u = "", normalPrice: g = 0, salePrice: V = 0, linkText: N = "", linkUrl: P = "" } = m, e = $(), k = e == null ? void 0 : e.isHidden, f = (e == null ? void 0 : e.heading) || "", v = (e == null ? void 0 : e.description) || "", w = (e == null ? void 0 : e.disclaimer) || "", C = (e == null ? void 0 : e.normalPrice) || "", y = (e == null ? void 0 : e.salePrice) || "", B = (e == null ? void 0 : e.linkText) || "", H = (e == null ? void 0 : e.linkUrl) || "", T = () => ({
|
|
7
|
+
isHiddenVal: k || x,
|
|
8
|
+
headingVal: f || p,
|
|
9
|
+
descriptionVal: v || b,
|
|
10
|
+
disclaimerVal: w || u,
|
|
11
|
+
normalPriceVal: C || g,
|
|
12
|
+
salePriceVal: y || V,
|
|
13
|
+
linkTextVal: B || N,
|
|
14
|
+
linkUrlVal: H || P
|
|
15
|
+
}), { isHiddenVal: U, headingVal: i, descriptionVal: a, disclaimerVal: r, normalPriceVal: s, salePriceVal: d, linkTextVal: t, linkUrlVal: o } = T();
|
|
16
16
|
return U ? 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: [
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
i && /* @__PURE__ */ l("h2", { className: "text-2xl @xl/salebanner:text-3xl @3xl/salebanner:text-5xl", children: /* @__PURE__ */ l("strong", { children: i }) }),
|
|
24
|
+
a && /* @__PURE__ */ l("p", { className: "text-md", children: a })
|
|
25
25
|
] }),
|
|
26
26
|
/* @__PURE__ */ l("div", { className: "text-center", children: /* @__PURE__ */ n("div", { className: "border-3 border-blue-500 border-solid rounded-full w-[200px] h-[200px] p-[40px] mx-auto @lg/salebanner:absolute @lg/salebanner:right-12 @lg/salebanner:top-12", children: [
|
|
27
27
|
s && /* @__PURE__ */ n("p", { className: "line-through text-md", children: [
|