@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 o = s(d), b = (i) => {
5
- const { backUrl: r, nextUrl: t } = i;
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
- o,
8
+ r,
9
9
  {
10
10
  size: "xs",
11
11
  display: "menu",
12
12
  tone: "info",
13
13
  type: "button",
14
- disabled: !r,
15
- to: r,
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
- o,
20
+ r,
21
21
  {
22
22
  size: "xs",
23
23
  display: "menu",
24
24
  tone: "info",
25
25
  type: "button",
26
- disabled: !t,
27
- to: t,
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 i } from "../../link-DO_Jvm9n.js";
3
- import { P as a } from "../../index-C9Rf5U9q.js";
4
- const c = i(a), p = (r) => {
5
- const { pages: o } = r;
6
- return /* @__PURE__ */ e("nav", { "data-component-id": "Nav", className: "p-6", children: /* @__PURE__ */ e("div", { className: "flex justify-center gap-4", children: o.map(({ name: t, url: n }, s) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
7
- c,
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: n,
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}-${s}`)) }) });
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 { P as N, b as v, a as h } from "../../../index-C9Rf5U9q.js";
3
- import { c as P } from "../../../link-DO_Jvm9n.js";
4
- const k = P(N), w = (f) => {
5
- const {
6
- isLoading: p = !1,
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: x,
16
- perMonth: u = !1,
17
- handleOfferCardAction: b = () => {
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
- p && /* @__PURE__ */ e("div", { className: "absolute top-2 left-2", children: /* @__PURE__ */ e(v, { display: "inline", type: "spinner" }) }),
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
- u && /* @__PURE__ */ e("span", { className: "text-lg", children: "/mo" })
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 }, g) => /* @__PURE__ */ t("li", { className: "flex gap-2", children: [
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}-${g}`)) })
41
+ ] }, `${l}-${N}`)) })
42
42
  ] }),
43
43
  d && /* @__PURE__ */ e("div", { className: "mt-8 bg-blue-500 p-2", children: /* @__PURE__ */ e(
44
- k,
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: x,
52
- ...c ? { to: c } : { onClick: () => b(s) },
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 y } from "../../index-C9Rf5U9q.js";
3
- import { c as S } from "../../link-DO_Jvm9n.js";
4
- import { useSaleBannerContext as $ } from "./context/index.js";
5
- const j = S(y), q = (c) => {
6
- const { isHidden: m, componentId: x = "", heading: h = "", description: p = "", disclaimer: b = "", normalPrice: u = 0, salePrice: g = 0, linkText: V = "", linkUrl: N = "" } = c, e = $(), P = e == null ? void 0 : e.isHidden, k = (e == null ? void 0 : e.heading) || "", f = (e == null ? void 0 : e.description) || "", v = (e == null ? void 0 : e.disclaimer) || "", C = (e == null ? void 0 : e.normalPrice) || "", w = (e == null ? void 0 : e.salePrice) || "", B = (e == null ? void 0 : e.linkText) || "", H = (e == null ? void 0 : e.linkUrl) || "", T = () => ({
7
- isHiddenVal: P || m,
8
- headingVal: k || h,
9
- descriptionVal: f || p,
10
- disclaimerVal: v || b,
11
- normalPriceVal: C || u,
12
- salePriceVal: w || g,
13
- linkTextVal: B || V,
14
- linkUrlVal: H || N
15
- }), { isHiddenVal: U, headingVal: a, descriptionVal: i, disclaimerVal: r, normalPriceVal: s, salePriceVal: d, linkTextVal: t, linkUrlVal: o } = T();
16
- return U ? null : /* @__PURE__ */ l(
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--${x}`,
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
- j,
41
+ m,
42
42
  {
43
43
  size: "xs",
44
44
  display: "fill",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "@ed.yakovich/component-library",
4
4
  "author": "Ed Yakovich",
5
5
  "private": false,
6
- "version": "0.0.18",
6
+ "version": "0.0.19",
7
7
  "type": "module",
8
8
  "exports": {
9
9
  ".": {