@ed.yakovich/component-library 0.0.8 → 0.0.10

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 (91) hide show
  1. package/dist/components/Accordion/context/index.js +7 -0
  2. package/dist/components/Accordion/index.js +38 -0
  3. package/dist/components/Accordion/types/index.js +1 -0
  4. package/dist/components/Cart/index.js +35 -0
  5. package/dist/components/EquipmentSummary/context/index.js +10 -0
  6. package/dist/components/EquipmentSummary/index.js +65 -0
  7. package/dist/components/EquipmentSummary/types/index.js +1 -0
  8. package/dist/components/Grid/index.js +19 -0
  9. package/dist/components/HeroBanner/context/index.js +7 -0
  10. package/dist/components/HeroBanner/index.js +33 -0
  11. package/dist/components/HeroBanner/types/index.js +1 -0
  12. package/dist/components/InfoBanner/context/index.js +7 -0
  13. package/dist/components/InfoBanner/index.js +26 -0
  14. package/dist/components/InfoBanner/types/index.js +1 -0
  15. package/dist/components/Nav/index.js +23 -0
  16. package/dist/components/OfferCards/context/index.js +7 -0
  17. package/dist/components/OfferCards/index.js +30 -0
  18. package/dist/components/OfferCards/subComponents/OfferCard.js +62 -0
  19. package/dist/components/OfferCards/types/index.js +1 -0
  20. package/dist/components/SaleBanner/context/index.js +7 -0
  21. package/dist/components/SaleBanner/index.js +59 -0
  22. package/dist/components/SaleBanner/types/index.js +1 -0
  23. package/dist/index-0d8e0844-BJzWsYCM.js +7403 -0
  24. package/dist/index-C9Rf5U9q.js +29143 -0
  25. package/dist/index-b30029d4-E1YxEHFH.js +12 -0
  26. package/dist/index-e6818ded-r_t6ryaW.js +57 -0
  27. package/dist/index.esm-322571ff-D1REhsOg.js +41 -0
  28. package/dist/lib/components/Accordion/context/index.d.ts +10 -0
  29. package/dist/lib/components/Accordion/index.d.ts +2 -0
  30. package/dist/lib/components/Accordion/types/index.d.ts +13 -0
  31. package/dist/lib/components/Cart/index.d.ts +6 -0
  32. package/dist/lib/components/EquipmentSummary/context/index.d.ts +10 -0
  33. package/dist/lib/components/EquipmentSummary/index.d.ts +2 -0
  34. package/dist/lib/components/EquipmentSummary/types/index.d.ts +14 -0
  35. package/dist/lib/components/Grid/index.d.ts +13 -0
  36. package/dist/lib/components/HeroBanner/context/index.d.ts +10 -0
  37. package/dist/lib/components/HeroBanner/index.d.ts +2 -0
  38. package/dist/lib/components/HeroBanner/types/index.d.ts +11 -0
  39. package/dist/lib/components/InfoBanner/context/index.d.ts +10 -0
  40. package/dist/lib/components/InfoBanner/index.d.ts +2 -0
  41. package/dist/lib/components/InfoBanner/types/index.d.ts +7 -0
  42. package/dist/lib/components/Nav/index.d.ts +8 -0
  43. package/dist/lib/components/OfferCards/context/index.d.ts +9 -0
  44. package/dist/lib/components/OfferCards/index.d.ts +2 -0
  45. package/dist/lib/components/OfferCards/subComponents/OfferCard.d.ts +3 -0
  46. package/dist/lib/components/OfferCards/types/index.d.ts +26 -0
  47. package/dist/lib/components/SaleBanner/context/index.d.ts +10 -0
  48. package/dist/lib/components/SaleBanner/index.d.ts +2 -0
  49. package/dist/lib/components/SaleBanner/types/index.d.ts +11 -0
  50. package/dist/lib/main.d.ts +15 -0
  51. package/dist/link-DO_Jvm9n.js +685 -0
  52. package/dist/main.js +32 -2
  53. package/dist/prism-accordion.entry-DeyFGNx-.js +51 -0
  54. package/dist/prism-avatar_2.entry-MLbdVrJg.js +68 -0
  55. package/dist/prism-badge.entry-BG5y7O5U.js +58 -0
  56. package/dist/prism-banner.entry-DChrjpFH.js +82 -0
  57. package/dist/prism-breadcrumb.entry-1YzYlKen.js +33 -0
  58. package/dist/prism-button_2.entry-DO8IGIoS.js +110 -0
  59. package/dist/prism-card.entry-DQ6P4TZP.js +119 -0
  60. package/dist/prism-carousel.entry-BA8zsHRW.js +3111 -0
  61. package/dist/prism-checkbox-group.entry-CP4-gghb.js +62 -0
  62. package/dist/prism-checkbox.entry-CJCy8fvC.js +99 -0
  63. package/dist/prism-data-table.entry--0djw8ls.js +10475 -0
  64. package/dist/prism-datepicker.entry-DPm7tpKB.js +249 -0
  65. package/dist/prism-form.entry-CS1zRoMt.js +42 -0
  66. package/dist/prism-grid.entry-jcx2aMUm.js +28 -0
  67. package/dist/prism-header.entry-CBSIpa0M.js +202 -0
  68. package/dist/prism-hero.entry-B0CKL5y9.js +23 -0
  69. package/dist/prism-icon_2.entry-Aja4QGUK.js +118 -0
  70. package/dist/prism-image.entry-B--khr6E.js +38 -0
  71. package/dist/prism-input-file.entry-i5qJkwEK.js +119 -0
  72. package/dist/prism-input-otp.entry-DXoARuzH.js +63 -0
  73. package/dist/prism-input-text.entry-D4QQ-dYX.js +228 -0
  74. package/dist/prism-input-textarea.entry-eeQHnhqC.js +140 -0
  75. package/dist/prism-layout.entry-bfKqOEnU.js +20 -0
  76. package/dist/prism-lineitem.entry-YIRZPVe_.js +44 -0
  77. package/dist/prism-menu.entry-BIlRCiaA.js +231 -0
  78. package/dist/prism-modal.entry-Kc-SpAR-.js +94 -0
  79. package/dist/prism-pagination.entry-BCo9aMdq.js +60 -0
  80. package/dist/prism-popover.entry-LmDvzCiR.js +1013 -0
  81. package/dist/prism-popper.entry-BqrcyTkE.js +959 -0
  82. package/dist/prism-progress.entry-29_ezvop.js +79 -0
  83. package/dist/prism-radio-group.entry-cL6AqjTk.js +66 -0
  84. package/dist/prism-radio.entry-CM_vZFZA.js +101 -0
  85. package/dist/prism-select.entry-B6A3gk7B.js +230 -0
  86. package/dist/prism-switch.entry-CtEfKB58.js +95 -0
  87. package/dist/prism-tab.entry-DIDUhFlk.js +20 -0
  88. package/dist/prism-tabs.entry-Cj3dW5_E.js +70 -0
  89. package/dist/prism-tooltip.entry-DEdY5eRd.js +52 -0
  90. package/dist/prism-typeahead.entry-D2XrvXaG.js +1234 -0
  91. package/package.json +5 -2
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createContext as n, useContext as c } from "react";
3
+ const t = n({}), s = () => c(t), d = ({ model: o, children: e }) => /* @__PURE__ */ r(t.Provider, { value: { ...o }, children: e });
4
+ export {
5
+ d as AccordionContextProvider,
6
+ s as useAccordionContext
7
+ };
@@ -0,0 +1,38 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { c as B } from "../../index-C9Rf5U9q.js";
3
+ import { useAccordionContext as F } from "./context/index.js";
4
+ const $ = (n) => {
5
+ const { children: a, isHidden: d, componentId: i = "", label: c = "", description: r = "", labelSecondary: s = "", onClick: t, tone: p = "", collapsed: b } = n, l = F(), C = l == null ? void 0 : l.isHidden, V = (l == null ? void 0 : l.label) || "", m = (l == null ? void 0 : l.description) || "", S = (l == null ? void 0 : l.labelSecondary) || "", k = (l == null ? void 0 : l.onClick) || "", u = (l == null ? void 0 : l.tone) || "", y = l == null ? void 0 : l.collapsed, H = () => ({
6
+ isHiddenVal: C || d,
7
+ labelVal: V || c,
8
+ descriptionVal: m || r,
9
+ labelSecondaryVal: S || s,
10
+ onClickVal: k || t,
11
+ toneVal: u || p,
12
+ collapsedVal: y || b
13
+ }), { isHiddenVal: A, labelVal: f, descriptionVal: g, labelSecondaryVal: h, onClickVal: j, toneVal: v, collapsedVal: o } = H();
14
+ return A ? null : /* @__PURE__ */ e(
15
+ "div",
16
+ {
17
+ "data-component-id": `Accordion--${i}`,
18
+ className: "border-3 border-blue-500 border-solid rounded-lg @container/accordion",
19
+ children: /* @__PURE__ */ e(
20
+ B,
21
+ {
22
+ label: f,
23
+ labelSecondary: h,
24
+ description: g,
25
+ onClick: j,
26
+ tone: v,
27
+ ...o && {
28
+ collapsed: !!o
29
+ },
30
+ children: a
31
+ }
32
+ )
33
+ }
34
+ );
35
+ };
36
+ export {
37
+ $ as Accordion
38
+ };
@@ -0,0 +1,35 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { c as s } from "../../link-DO_Jvm9n.js";
3
+ import { P as d } from "../../index-C9Rf5U9q.js";
4
+ const o = s(d), b = (i) => {
5
+ const { backUrl: r, nextUrl: t } = i;
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
+ /* @__PURE__ */ e("div", { className: "px-12 py-3 @lg/cart:border-l-3 border-blue-500 border-solid", children: /* @__PURE__ */ e(
8
+ o,
9
+ {
10
+ size: "xs",
11
+ display: "menu",
12
+ tone: "info",
13
+ type: "button",
14
+ disabled: !r,
15
+ to: r,
16
+ children: /* @__PURE__ */ e("strong", { children: "Back" })
17
+ }
18
+ ) }),
19
+ /* @__PURE__ */ e("div", { className: "px-12 py-3 border-l-3 border-blue-500 border-solid", children: /* @__PURE__ */ e(
20
+ o,
21
+ {
22
+ size: "xs",
23
+ display: "menu",
24
+ tone: "info",
25
+ type: "button",
26
+ disabled: !t,
27
+ to: t,
28
+ children: /* @__PURE__ */ e("strong", { children: "Next" })
29
+ }
30
+ ) })
31
+ ] }) }) });
32
+ };
33
+ export {
34
+ b as Cart
35
+ };
@@ -0,0 +1,10 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createContext as n, useContext as m } from "react";
3
+ const e = n({}), c = () => m(e), i = ({
4
+ model: t,
5
+ children: o
6
+ }) => /* @__PURE__ */ r(e.Provider, { value: { ...t }, children: o });
7
+ export {
8
+ i as EquipmentSummaryContextProvider,
9
+ c as useEquipmentSummaryContext
10
+ };
@@ -0,0 +1,65 @@
1
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { c as P, b as S, a as j, d as E } from "../../index-C9Rf5U9q.js";
3
+ import { useEquipmentSummaryContext as $ } from "./context/index.js";
4
+ const I = (m) => {
5
+ const {
6
+ isHidden: o,
7
+ componentId: u = "",
8
+ heading: c = "",
9
+ description: p = "",
10
+ isLoading: h = !1,
11
+ equipmentList: g = []
12
+ } = m, e = $(), q = e == null ? void 0 : e.isHidden, L = (e == null ? void 0 : e.heading) || "", b = (e == null ? void 0 : e.description) || "", r = (e == null ? void 0 : e.equipmentList) || [], f = (e == null ? void 0 : e.isLoading) || "", V = () => ({
13
+ isHiddenVal: q || o,
14
+ headingVal: L || c,
15
+ descriptionVal: b || p,
16
+ isLoadingVal: f || h,
17
+ equipmentListVal: r.length > 0 ? r : g
18
+ }), { isHiddenVal: v, headingVal: y, descriptionVal: x, isLoadingVal: C, equipmentListVal: t } = V(), N = (n) => {
19
+ switch (n) {
20
+ case "return":
21
+ return "caution";
22
+ case "keep":
23
+ return "positive";
24
+ default:
25
+ return "neutral";
26
+ }
27
+ };
28
+ return v ? null : /* @__PURE__ */ i(
29
+ "div",
30
+ {
31
+ "data-component-id": `EquipmentSummary--${u}`,
32
+ className: "border-3 border-blue-500 border-solid rounded-lg p-8 @container/equipmentsummary",
33
+ children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
34
+ P,
35
+ {
36
+ label: y,
37
+ description: x,
38
+ tone: "neutral2-inverse",
39
+ collapsed: !1,
40
+ children: /* @__PURE__ */ i("div", { children: C ? /* @__PURE__ */ i(S, { display: "inline", type: "dots" }) : /* @__PURE__ */ i("div", { children: t.length > 0 && /* @__PURE__ */ i("ul", { className: "space-y-4", children: t.map(({ icon: n, title: d, description: l, actionType: s }, H) => /* @__PURE__ */ a("li", { children: [
41
+ /* @__PURE__ */ a("div", { className: "@xs/equipmentsummary:flex @xs/equipmentsummary:justify-between", children: [
42
+ /* @__PURE__ */ a("div", { className: "flex gap-2", children: [
43
+ n && /* @__PURE__ */ i(j, { name: n, tone: "info", theme: "outline", size: "sm" }),
44
+ d && /* @__PURE__ */ i("span", { children: d })
45
+ ] }),
46
+ s && /* @__PURE__ */ i("div", { className: "ml-8 mb-2 @xs/equipmentsummary:ml-0 @xs/equipmentsummary:mb-0", children: /* @__PURE__ */ i(
47
+ E,
48
+ {
49
+ label: s,
50
+ size: "md",
51
+ tone: N(s),
52
+ children: s
53
+ }
54
+ ) })
55
+ ] }),
56
+ l && /* @__PURE__ */ i("p", { className: "ml-8 text-xs", children: /* @__PURE__ */ i("em", { children: l }) })
57
+ ] }, `${d}-${H}`)) }) }) })
58
+ }
59
+ ) })
60
+ }
61
+ );
62
+ };
63
+ export {
64
+ I as EquipmentSummary
65
+ };
@@ -0,0 +1,19 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const p = (d) => {
3
+ const { flushX: i, flushY: c, maxWidth: e = "", maxColAmount: r = "1", colSpan: s = "", gapX: l = "gap-x-6", gapY: t = "gap-y-6", children: g } = d, a = () => {
4
+ switch (r) {
5
+ case "4":
6
+ return "@2xl/gridcomp:grid-cols-4";
7
+ case "3":
8
+ return "@2xl/gridcomp:grid-cols-3";
9
+ case "2":
10
+ return "@2xl/gridcomp:grid-cols-2";
11
+ default:
12
+ return "@2xl/gridcomp:grid-cols-1";
13
+ }
14
+ };
15
+ return /* @__PURE__ */ o("section", { "data-component-id": "Grid", className: "@container/gridcomp", children: /* @__PURE__ */ o("div", { className: `w-full mx-auto grid grid-cols-1 ${e} ${parseInt(r) > 2 ? "@md/gridcomp:grid-cols-2" : "@md/gridcomp:grid-cols-1"} ${a()} ${l} ${t} ${s} ${i ? "" : "px-4"} ${c ? "" : "py-4"}`, children: g }) });
16
+ };
17
+ export {
18
+ p as Grid
19
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { createContext as n, useContext as x } from "react";
3
+ const e = n({}), a = () => x(e), u = ({ model: t, children: o }) => /* @__PURE__ */ r(e.Provider, { value: { ...t }, children: o });
4
+ export {
5
+ u as HeroBannerContextProvider,
6
+ a as useHeroBannerContext
7
+ };
@@ -0,0 +1,33 @@
1
+ import { jsx as n, jsxs as a } from "react/jsx-runtime";
2
+ import { a as c } from "../../index-C9Rf5U9q.js";
3
+ import { useHeroBannerContext as j } from "./context/index.js";
4
+ const z = (h) => {
5
+ const { isHidden: m, componentId: g = "", icon: p = "", heading: x = "", description: b = "", listData: u = [] } = h, e = j(), V = e == null ? void 0 : e.isHidden, f = (e == null ? void 0 : e.icon) || "", H = (e == null ? void 0 : e.heading) || "", C = (e == null ? void 0 : e.description) || "", r = (e == null ? void 0 : e.listData) || [], N = () => ({
6
+ isHiddenVal: V || m,
7
+ iconVal: f || p,
8
+ headingVal: H || x,
9
+ descriptionVal: C || b,
10
+ listDataVal: r.length > 0 ? r : u
11
+ }), { isHiddenVal: D, iconVal: l, headingVal: o, descriptionVal: s, listDataVal: t } = N();
12
+ return D ? null : /* @__PURE__ */ n(
13
+ "div",
14
+ {
15
+ "data-component-id": `HeroBanner--${g}`,
16
+ className: "border-3 border-blue-500 border-solid rounded-lg p-8 @container/herobanner",
17
+ children: /* @__PURE__ */ a("div", { className: "@lg/herobanner:flex @lg/herobanner:justify-between gap-2", children: [
18
+ /* @__PURE__ */ a("div", { children: [
19
+ l && /* @__PURE__ */ n(c, { name: l, tone: "info", theme: "outline", size: "lg" }),
20
+ o && /* @__PURE__ */ n("h2", { className: "text-xl @xl/herobanner:text-2xl @3xl/herobanner:text-4xl", children: /* @__PURE__ */ n("strong", { children: o }) }),
21
+ s && /* @__PURE__ */ n("p", { className: "text-xs", children: s })
22
+ ] }),
23
+ t.length > 0 && /* @__PURE__ */ n("div", { className: "@lg/herobanner:w-[250px] @lg/herobanner:shrink-0", children: /* @__PURE__ */ n("ul", { children: t.map(({ icon: d, description: i }, v) => /* @__PURE__ */ a("li", { className: "flex gap-2", children: [
24
+ d && /* @__PURE__ */ n(c, { name: d, tone: "info", theme: "outline", size: "sm" }),
25
+ i && /* @__PURE__ */ n("span", { children: i })
26
+ ] }, `${i}-${v}`)) }) })
27
+ ] })
28
+ }
29
+ );
30
+ };
31
+ export {
32
+ z as HeroBanner
33
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { createContext as r, useContext as x } from "react";
3
+ const n = r({}), a = () => x(n), f = ({ model: t, children: o }) => /* @__PURE__ */ e(n.Provider, { value: { ...t }, children: o });
4
+ export {
5
+ f as InfoBannerContextProvider,
6
+ a as useInfoBannerContext
7
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as e, jsxs as V } from "react/jsx-runtime";
2
+ import { a as u } from "../../index-C9Rf5U9q.js";
3
+ import { useInfoBannerContext as N } from "./context/index.js";
4
+ const I = (t) => {
5
+ const { isHidden: a, componentId: d = "", heading: r = "", description: c = "", icon: l = "" } = t, n = N(), m = n == null ? void 0 : n.isHidden, h = (n == null ? void 0 : n.icon) || "", p = (n == null ? void 0 : n.heading) || "", g = (n == null ? void 0 : n.description) || "", f = () => ({
6
+ isHiddenVal: m || a,
7
+ iconVal: h || l,
8
+ headingVal: p || r,
9
+ descriptionVal: g || c
10
+ }), { isHiddenVal: x, iconVal: i, headingVal: s, descriptionVal: o } = f();
11
+ return x ? null : /* @__PURE__ */ e(
12
+ "div",
13
+ {
14
+ "data-component-id": `InfoBanner--${d}`,
15
+ className: "bg-blue-500 p-4 text-white @container/infobanner",
16
+ children: /* @__PURE__ */ e("div", { className: "text-center", children: /* @__PURE__ */ V("div", { className: "space-y-1", children: [
17
+ i && /* @__PURE__ */ e(u, { name: i, tone: "info", theme: "outline", size: "md" }),
18
+ s && /* @__PURE__ */ e("div", { className: "text-center @lg/infobanner:px-14", children: /* @__PURE__ */ e("h2", { className: "text-3xl", children: /* @__PURE__ */ e("strong", { children: s }) }) }),
19
+ o && /* @__PURE__ */ e("p", { className: "text-xs mb-2", children: /* @__PURE__ */ e("strong", { children: o }) })
20
+ ] }) })
21
+ }
22
+ );
23
+ };
24
+ export {
25
+ I as InfoBanner
26
+ };
@@ -0,0 +1,23 @@
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,
8
+ {
9
+ size: "xs",
10
+ display: "menu",
11
+ tone: "info",
12
+ type: "button",
13
+ to: n,
14
+ activeProps: {
15
+ className: "font-bold text-blue-500 border-blue-500 border-b-2"
16
+ },
17
+ children: /* @__PURE__ */ e("strong", { children: t })
18
+ }
19
+ ) }, `${t}-${s}`)) }) });
20
+ };
21
+ export {
22
+ p as Nav
23
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { createContext as n, useContext as s } from "react";
3
+ const e = n({}), C = () => s(e), c = ({ model: t, children: r }) => /* @__PURE__ */ o(e.Provider, { value: { ...t }, children: r });
4
+ export {
5
+ c as OfferCardsContextProvider,
6
+ C as useOfferCardsContext
7
+ };
@@ -0,0 +1,30 @@
1
+ import { jsxs as l, jsx as s } from "react/jsx-runtime";
2
+ import { a as N, b as $ } from "../../index-C9Rf5U9q.js";
3
+ import b from "./subComponents/OfferCard.js";
4
+ import { useOfferCardsContext as j } from "./context/index.js";
5
+ const z = (o) => {
6
+ const {
7
+ isHidden: t,
8
+ componentId: c = "",
9
+ icon: f = "",
10
+ heading: m = "",
11
+ isLoading: g = !1,
12
+ offerCardList: h = []
13
+ } = o, i = j(), p = i == null ? void 0 : i.isHidden, C = (i == null ? void 0 : i.icon) || "", L = (i == null ? void 0 : i.heading) || "", V = (i == null ? void 0 : i.isLoading) || "", a = (i == null ? void 0 : i.offerCardList) || [], x = i == null ? void 0 : i.handleOfferCardAction, u = () => ({
14
+ isHiddenVal: p || t,
15
+ iconVal: C || f,
16
+ headingVal: L || m,
17
+ isLoadingVal: V || g,
18
+ offerCardListVal: a.length > 0 ? a : h
19
+ }), { isHiddenVal: O, iconVal: n, headingVal: d, isLoadingVal: H, offerCardListVal: r } = u();
20
+ return O ? null : /* @__PURE__ */ l("div", { "data-component-id": `OfferCards--${c}`, className: "@container/offercards", children: [
21
+ (d || n) && /* @__PURE__ */ l("div", { className: "mb-4 flex items-center gap-2 mt-10", children: [
22
+ n && /* @__PURE__ */ s(N, { name: n, tone: "expressive", theme: "fill", size: "md" }),
23
+ d && /* @__PURE__ */ s("h2", { className: "text-xl @2xl/offercards:text-2xl", children: /* @__PURE__ */ s("strong", { children: d }) })
24
+ ] }),
25
+ H ? /* @__PURE__ */ s($, { display: "inline", type: "dots" }) : /* @__PURE__ */ s("div", { children: r.length > 0 && /* @__PURE__ */ s("ul", { className: "grid grid-cols-1 gap-4 @xl/offercards:grid-cols-2 @3xl/offercards:grid-cols-3", children: r.map((e, v) => /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(b, { ...e, handleOfferCardAction: x }) }, `${e == null ? void 0 : e.id}-${v}`)) }) })
26
+ ] });
27
+ };
28
+ export {
29
+ z as OfferCards
30
+ };
@@ -0,0 +1,62 @@
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,
7
+ id: s = "",
8
+ icon: n = "",
9
+ heading: i = "",
10
+ description: a = "",
11
+ iconList: r = [],
12
+ price: o = "",
13
+ buttonLabel: d = "",
14
+ buttonHref: c = "",
15
+ buttonDisabled: x,
16
+ perMonth: u = !1,
17
+ handleOfferCardAction: b = () => {
18
+ }
19
+ } = f;
20
+ return /* @__PURE__ */ t(
21
+ "div",
22
+ {
23
+ "data-component-id": `OfferCard--${s}`,
24
+ className: "border-3 border-blue-500 border-solid rounded-lg flex flex-col bg-white h-full text-center relative",
25
+ children: [
26
+ p && /* @__PURE__ */ e("div", { className: "absolute top-2 left-2", children: /* @__PURE__ */ e(v, { display: "inline", type: "spinner" }) }),
27
+ /* @__PURE__ */ t("div", { className: "grow p-4", children: [
28
+ n && /* @__PURE__ */ e(h, { name: n, tone: "info", theme: "outline", size: "md" }),
29
+ i && /* @__PURE__ */ e("h3", { className: "text-lg", children: /* @__PURE__ */ e("strong", { children: i }) }),
30
+ a && /* @__PURE__ */ e("p", { className: "text-xs", children: a }),
31
+ o && /* @__PURE__ */ t("p", { className: "mt-2", children: [
32
+ /* @__PURE__ */ e("span", { className: "text-5xl", children: /* @__PURE__ */ t("strong", { children: [
33
+ "$",
34
+ Math.floor(o)
35
+ ] }) }),
36
+ u && /* @__PURE__ */ e("span", { className: "text-lg", children: "/mo" })
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: [
39
+ l && /* @__PURE__ */ e(h, { name: l, tone: "info", theme: "outline", size: "xs" }),
40
+ m && /* @__PURE__ */ e("p", { className: "text-xs", children: m })
41
+ ] }, `${l}-${g}`)) })
42
+ ] }),
43
+ d && /* @__PURE__ */ e("div", { className: "mt-8 bg-blue-500 p-2", children: /* @__PURE__ */ e(
44
+ k,
45
+ {
46
+ size: "xs",
47
+ display: "link",
48
+ tone: "info",
49
+ type: "button",
50
+ className: "text-white",
51
+ disabled: x,
52
+ ...c ? { to: c } : { onClick: () => b(s) },
53
+ children: d
54
+ }
55
+ ) })
56
+ ]
57
+ }
58
+ );
59
+ };
60
+ export {
61
+ w as default
62
+ };
@@ -0,0 +1,7 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { createContext as r, useContext as x } from "react";
3
+ const e = r({}), s = () => x(e), u = ({ model: t, children: n }) => /* @__PURE__ */ o(e.Provider, { value: { ...t }, children: n });
4
+ export {
5
+ u as SaleBannerContextProvider,
6
+ s as useSaleBannerContext
7
+ };
@@ -0,0 +1,59 @@
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(
17
+ "div",
18
+ {
19
+ "data-component-id": `SaleBanner--${x}`,
20
+ className: "relative border-3 border-blue-500 border-solid rounded-lg p-8 @container/salebanner",
21
+ children: /* @__PURE__ */ n("div", { className: "space-y-6", children: [
22
+ /* @__PURE__ */ n("div", { className: "space-y-2 @lg/salebanner:w-[50%] @xl/salebanner:w-[60%] @2xl/salebanner:w-[70%]", children: [
23
+ a && /* @__PURE__ */ l("h2", { className: "text-2xl @xl/salebanner:text-3xl @3xl/salebanner:text-5xl", children: /* @__PURE__ */ l("strong", { children: a }) }),
24
+ i && /* @__PURE__ */ l("p", { className: "text-md", children: i })
25
+ ] }),
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
+ s && /* @__PURE__ */ n("p", { className: "line-through text-md", children: [
28
+ "$",
29
+ s,
30
+ "/mo"
31
+ ] }),
32
+ d && /* @__PURE__ */ n("div", { children: [
33
+ /* @__PURE__ */ l("h2", { className: "text-6xl", children: /* @__PURE__ */ n("strong", { children: [
34
+ "$",
35
+ d
36
+ ] }) }),
37
+ /* @__PURE__ */ l("span", { className: "text-xl", children: /* @__PURE__ */ l("strong", { children: "/mo" }) })
38
+ ] })
39
+ ] }) }),
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,
42
+ {
43
+ size: "xs",
44
+ display: "fill",
45
+ tone: "info",
46
+ type: "button",
47
+ className: "text-white font-bold",
48
+ to: o,
49
+ children: t
50
+ }
51
+ ) }),
52
+ /* @__PURE__ */ l("div", { className: "@lg/salebanner:w-[50%]", children: r && /* @__PURE__ */ l("p", { className: "text-xs", children: r }) })
53
+ ] })
54
+ }
55
+ );
56
+ };
57
+ export {
58
+ q as SaleBanner
59
+ };