@lucasromero/matrix-ui 0.6.1 → 0.7.1
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/index.d.ts +1 -0
- package/dist/matrix-ui.es.js +234 -116
- package/dist/matrix-ui.umd.js +2 -2
- package/dist/types/cardRowType.d.ts +29 -1
- package/dist/types/cardType.d.ts +1 -1
- package/dist/types/selectDropdownType.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/matrix-ui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.primary{color:#111827;cursor:pointer;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.primary:hover:not(:disabled){background:#5fafd6}.primary:active:not(:disabled){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.secondary:hover:not(:disabled){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.ghost:hover:not(:disabled){background:#ffffff0d}.ghost:active:not(:disabled){background:#ffffff14}.error{color:#111827;cursor:pointer;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.error:hover:not(:disabled){filter:brightness(.95)}.error:active:not(:disabled){filter:brightness(.9)}.success{color:#111827;cursor:pointer;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.success:hover:not(:disabled){filter:brightness(.95)}.success:active:not(:disabled){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled){color:#f8fafc}.transparent:disabled{color:#64748b;cursor:not-allowed}._cardContainer_ivc2t_1{border-radius:8px;flex-direction:column;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:auto;transition:filter .15s,transform .15s;display:flex}._interactive_ivc2t_14:hover{filter:brightness(1.05)}._interactive_ivc2t_14:active{filter:brightness(.95)}._topContentContainer_ivc2t_22{flex-direction:column;margin-top:1rem;margin-bottom:1rem;display:flex}._cardTitle_ivc2t_29{margin:0 1rem .2rem}._miniCard_ivc2t_36 ._cardTitle_ivc2t_29{flex:1;margin:0}._ctaContainer_ivc2t_41{box-sizing:border-box;flex-direction:column;justify-content:space-between;gap:1rem;width:100%;padding:.75rem;display:flex}._miniCard_ivc2t_36 ._ctaContainer_ivc2t_41{flex-direction:row;justify-content:center;gap:.5rem;padding:.5rem}._imgContainer_ivc2t_58{box-sizing:border-box;border-radius:8px;justify-content:center;padding-bottom:1rem;padding-left:1.5rem;padding-right:1.5rem;display:flex}._badgesViewport_ivc2t_68{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:0 .75rem;overflow:hidden}._badgesContainer_ivc2t_77{scrollbar-width:none;width:100%;min-width:0;max-width:100%;overflow:auto hidden}._badgesContainer_ivc2t_77::-webkit-scrollbar{display:none}._badges_ivc2t_68{justify-content:center;gap:.2rem;width:max-content;min-width:100%;display:flex}._badge_ivc2t_68{flex-shrink:0}._img_ivc2t_58{max-width:100%}._miniCard_ivc2t_36 ._topContentContainer_ivc2t_22{flex-direction:row;justify-content:flex-start;align-items:center;gap:1rem;margin-top:1rem;margin-bottom:1rem}._cardRating_ivc2t_115{justify-content:center;margin-top:.1rem;display:flex}:where(._headingSm_5e5d4_1){color:#f8fafc;margin:0;font-size:1.25rem;font-weight:600}:where(._headingMd_5e5d4_8){color:#f8fafc;margin:0;font-size:1.5rem;font-weight:600}:where(._headingLg_5e5d4_15){color:#f8fafc;margin:0;font-size:1.875rem;font-weight:700}:where(._headingXl_5e5d4_22){color:#f8fafc;margin:0;font-size:2rem;font-weight:700}:where(._bodySm_5e5d4_29){color:#cbd5e1;margin:0;font-size:.875rem;font-weight:400}:where(._bodyMd_5e5d4_36){color:#cbd5e1;margin:0;font-size:1rem;font-weight:400}:where(._bodyLg_5e5d4_43){color:#cbd5e1;margin:0;font-size:1.125rem;font-weight:400}:where(._caption_5e5d4_50){color:#cbd5e1;margin:0;font-size:.75rem;font-weight:500}._img_14ux7_1{max-width:100%;display:block}._circle_14ux7_6{border-radius:50%}._ratingContainer_1xmf5_1{flex-direction:row;display:flex}._text_1xmf5_6{margin:0;padding-right:.2rem}._star_1xmf5_11{color:gold;fill:gold;width:1rem;height:1rem;margin-top:.17rem}.primary{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.primary:hover:not(:disabled),.primary:hover:not([aria-disabled=true]){background:#5fafd6}.primary:active:not(:disabled),.primary:active:not([aria-disabled=true]){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;text-align:center;vertical-align:middle;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.secondary:hover:not(:disabled),.secondary:hover:not([aria-disabled=true]){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled),.secondary:active:not([aria-disabled=true]){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.ghost:hover:not(:disabled),.ghost:hover:not([aria-disabled=true]){background:#ffffff0d}.ghost:active:not(:disabled),.ghost:active:not([aria-disabled=true]){background:#ffffff14}.error{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.error:hover:not(:disabled),.error:hover:not([aria-disabled=true]){filter:brightness(.95)}.error:active:not(:disabled),.error:active:not([aria-disabled=true]){filter:brightness(.9)}.success{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.success:hover:not(:disabled),.success:hover:not([aria-disabled=true]){filter:brightness(.95)}.success:active:not(:disabled),.success:active:not([aria-disabled=true]){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled),.transparent:hover:not([aria-disabled=true]){color:#f8fafc}.transparent.active{color:#f8fafc;background:#ffffff14}.transparent:focus-visible{outline:none;box-shadow:0 0 0 3px #87ceeb59}.transparent:disabled,.transparent[aria-disabled=true]{color:#64748b;cursor:not-allowed}.link{justify-content:center;align-items:center;display:flex}._badge_dy664_1{border-radius:8px;align-items:center;max-width:5rem;max-height:1.5rem;display:flex}._text_dy664_9{margin:0;padding:0;line-height:1}._icon_dy664_15{margin:0;padding:0 .2rem 0 0;line-height:1}._navElementsContainer_ndrvq_1{z-index:1000;background-color:#0b0f17;border-bottom:2px solid #1f2937;width:100%;height:3.5rem;position:sticky;top:0}._internalElementsContainer_ndrvq_11{flex-direction:row;align-items:center;width:100%;height:3.5rem;display:flex}._hamburgerIcon_ndrvq_19{margin-left:auto;padding-right:2rem}._leftElementsContainer_ndrvq_24{flex-direction:row;align-items:center;gap:2rem;width:50%;padding-left:1.5rem;line-height:.625rem;display:flex}._leftElement_ndrvq_24{padding-left:2rem}._rightElementsContainer_ndrvq_38{flex-direction:row;justify-content:end;gap:2rem;width:50%;padding-right:2rem;line-height:.625rem;display:flex}._wrapper_1cng4_1{min-width:10rem;display:inline-block;position:relative}._dropdownButton_1cng4_7{padding:0}._dropdownButtonContainer_1cng4_11{justify-content:right;align-items:end;display:flex}._listItemContainer_1cng4_17{z-index:1000;border-radius:5px;flex-direction:column;justify-content:left;align-items:start;min-width:10rem;margin-top:.5rem;padding:0;display:flex;position:absolute;top:100%;left:0}._listItem_1cng4_17{padding-top:.5rem;padding-bottom:.5rem;list-style:none}.
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.primary{color:#111827;cursor:pointer;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.primary:hover:not(:disabled){background:#5fafd6}.primary:active:not(:disabled){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.secondary:hover:not(:disabled){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.ghost:hover:not(:disabled){background:#ffffff0d}.ghost:active:not(:disabled){background:#ffffff14}.error{color:#111827;cursor:pointer;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.error:hover:not(:disabled){filter:brightness(.95)}.error:active:not(:disabled){filter:brightness(.9)}.success{color:#111827;cursor:pointer;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.success:hover:not(:disabled){filter:brightness(.95)}.success:active:not(:disabled){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled){color:#f8fafc}.transparent:disabled{color:#64748b;cursor:not-allowed}._cardContainer_ivc2t_1{border-radius:8px;flex-direction:column;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:auto;transition:filter .15s,transform .15s;display:flex}._interactive_ivc2t_14:hover{filter:brightness(1.05)}._interactive_ivc2t_14:active{filter:brightness(.95)}._topContentContainer_ivc2t_22{flex-direction:column;margin-top:1rem;margin-bottom:1rem;display:flex}._cardTitle_ivc2t_29{margin:0 1rem .2rem}._miniCard_ivc2t_36 ._cardTitle_ivc2t_29{flex:1;margin:0}._ctaContainer_ivc2t_41{box-sizing:border-box;flex-direction:column;justify-content:space-between;gap:1rem;width:100%;padding:.75rem;display:flex}._miniCard_ivc2t_36 ._ctaContainer_ivc2t_41{flex-direction:row;justify-content:center;gap:.5rem;padding:.5rem}._imgContainer_ivc2t_58{box-sizing:border-box;border-radius:8px;justify-content:center;padding-bottom:1rem;padding-left:1.5rem;padding-right:1.5rem;display:flex}._badgesViewport_ivc2t_68{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:0 .75rem;overflow:hidden}._badgesContainer_ivc2t_77{scrollbar-width:none;width:100%;min-width:0;max-width:100%;overflow:auto hidden}._badgesContainer_ivc2t_77::-webkit-scrollbar{display:none}._badges_ivc2t_68{justify-content:center;gap:.2rem;width:max-content;min-width:100%;display:flex}._badge_ivc2t_68{flex-shrink:0}._img_ivc2t_58{max-width:100%}._miniCard_ivc2t_36 ._topContentContainer_ivc2t_22{flex-direction:row;justify-content:flex-start;align-items:center;gap:1rem;margin-top:1rem;margin-bottom:1rem}._cardRating_ivc2t_115{justify-content:center;margin-top:.1rem;display:flex}:where(._headingSm_5e5d4_1){color:#f8fafc;margin:0;font-size:1.25rem;font-weight:600}:where(._headingMd_5e5d4_8){color:#f8fafc;margin:0;font-size:1.5rem;font-weight:600}:where(._headingLg_5e5d4_15){color:#f8fafc;margin:0;font-size:1.875rem;font-weight:700}:where(._headingXl_5e5d4_22){color:#f8fafc;margin:0;font-size:2rem;font-weight:700}:where(._bodySm_5e5d4_29){color:#cbd5e1;margin:0;font-size:.875rem;font-weight:400}:where(._bodyMd_5e5d4_36){color:#cbd5e1;margin:0;font-size:1rem;font-weight:400}:where(._bodyLg_5e5d4_43){color:#cbd5e1;margin:0;font-size:1.125rem;font-weight:400}:where(._caption_5e5d4_50){color:#cbd5e1;margin:0;font-size:.75rem;font-weight:500}._img_14ux7_1{max-width:100%;display:block}._circle_14ux7_6{border-radius:50%}._ratingContainer_1xmf5_1{flex-direction:row;display:flex}._text_1xmf5_6{margin:0;padding-right:.2rem}._star_1xmf5_11{color:gold;fill:gold;width:1rem;height:1rem;margin-top:.17rem}.primary{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.primary:hover:not(:disabled),.primary:hover:not([aria-disabled=true]){background:#5fafd6}.primary:active:not(:disabled),.primary:active:not([aria-disabled=true]){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;text-align:center;vertical-align:middle;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.secondary:hover:not(:disabled),.secondary:hover:not([aria-disabled=true]){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled),.secondary:active:not([aria-disabled=true]){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.ghost:hover:not(:disabled),.ghost:hover:not([aria-disabled=true]){background:#ffffff0d}.ghost:active:not(:disabled),.ghost:active:not([aria-disabled=true]){background:#ffffff14}.error{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.error:hover:not(:disabled),.error:hover:not([aria-disabled=true]){filter:brightness(.95)}.error:active:not(:disabled),.error:active:not([aria-disabled=true]){filter:brightness(.9)}.success{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.success:hover:not(:disabled),.success:hover:not([aria-disabled=true]){filter:brightness(.95)}.success:active:not(:disabled),.success:active:not([aria-disabled=true]){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled),.transparent:hover:not([aria-disabled=true]){color:#f8fafc}.transparent.active{color:#f8fafc;background:#ffffff14}.transparent:focus-visible{outline:none;box-shadow:0 0 0 3px #87ceeb59}.transparent:disabled,.transparent[aria-disabled=true]{color:#64748b;cursor:not-allowed}.link{justify-content:center;align-items:center;display:flex}._badge_dy664_1{border-radius:8px;align-items:center;max-width:5rem;max-height:1.5rem;display:flex}._text_dy664_9{margin:0;padding:0;line-height:1}._icon_dy664_15{margin:0;padding:0 .2rem 0 0;line-height:1}._navElementsContainer_ndrvq_1{z-index:1000;background-color:#0b0f17;border-bottom:2px solid #1f2937;width:100%;height:3.5rem;position:sticky;top:0}._internalElementsContainer_ndrvq_11{flex-direction:row;align-items:center;width:100%;height:3.5rem;display:flex}._hamburgerIcon_ndrvq_19{margin-left:auto;padding-right:2rem}._leftElementsContainer_ndrvq_24{flex-direction:row;align-items:center;gap:2rem;width:50%;padding-left:1.5rem;line-height:.625rem;display:flex}._leftElement_ndrvq_24{padding-left:2rem}._rightElementsContainer_ndrvq_38{flex-direction:row;justify-content:end;gap:2rem;width:50%;padding-right:2rem;line-height:.625rem;display:flex}._wrapper_1cng4_1{min-width:10rem;display:inline-block;position:relative}._dropdownButton_1cng4_7{padding:0}._dropdownButtonContainer_1cng4_11{justify-content:right;align-items:end;display:flex}._listItemContainer_1cng4_17{z-index:1000;border-radius:5px;flex-direction:column;justify-content:left;align-items:start;min-width:10rem;margin-top:.5rem;padding:0;display:flex;position:absolute;top:100%;left:0}._listItem_1cng4_17{padding-top:.5rem;padding-bottom:.5rem;list-style:none}._selectContainer_1o16c_1{width:100%;min-width:8rem;max-width:12rem;height:auto;display:inline-block;position:relative}._select_1o16c_1{appearance:none;cursor:pointer;background:#fff;width:100%;height:100%}._select_1o16c_1:focus{box-shadow:none;outline:none}._icon_1o16c_25{pointer-events:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}._cardRowContent_spma4_1{width:100%;max-width:calc(1200px + 3rem)}._aboveCardContentContainer_spma4_6{flex-direction:row;align-items:flex-end;width:100%;display:flex}._headingsContainer_spma4_13{flex:1;min-width:0;padding-bottom:.5rem}._desktopButtonsContainer_spma4_19{flex-shrink:0;gap:.5rem;padding-bottom:.5rem;display:flex}._cardsContainer_spma4_26{flex-direction:row;gap:1rem;width:100%;display:flex;overflow:hidden}._cardsContainer_spma4_26>div{flex:1 1 0;min-width:0}._cardRowTitle_spma4_39{margin:0;padding-bottom:0}._cardRowTitleWithSelect_spma4_44{margin:0;padding-bottom:1rem}._cardRowSubtitle_spma4_49{padding-bottom:0}._cardRowSubtitleWithSelect_spma4_53{margin-bottom:1rem}._selectDropdown_spma4_57{margin-bottom:0}._mobileCardsContainer_spma4_61{grid-template-columns:repeat(2,1fr);gap:1rem;display:grid}._mobileCard_spma4_61{width:100%;margin-bottom:1rem}._mobileButtonsContainer_spma4_72{align-items:right;width:100%;margin-left:0}._mobileStretch_spma4_78{width:100%}._cta_spma4_82{display:flex}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
2
|
import e, { createContext as t, createElement as n, forwardRef as r, useContext as i, useEffect as a, useState as o } from "react";
|
|
3
3
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
4
|
//#region node_modules/clsx/dist/clsx.mjs
|
|
@@ -173,7 +173,7 @@ var f = {
|
|
|
173
173
|
tablet: "(min-width: 768px) and (max-width: 1023px)",
|
|
174
174
|
desktop: "(min-width: 1024px)",
|
|
175
175
|
belowMobile: "(max-width: 460px)"
|
|
176
|
-
}, B = () => {
|
|
176
|
+
}, B = (e) => typeof window > "u" ? !1 : window.matchMedia(e).matches, V = () => {
|
|
177
177
|
let [e, t] = o({
|
|
178
178
|
isBelowMobileMinimum: !1,
|
|
179
179
|
isMobile: !1,
|
|
@@ -185,7 +185,7 @@ var f = {
|
|
|
185
185
|
let r = window.matchMedia(n), i = () => {
|
|
186
186
|
t((t) => ({
|
|
187
187
|
...t,
|
|
188
|
-
[e === "belowMobile" ? "isBelowMobileMinimum" : `is${
|
|
188
|
+
[e === "belowMobile" ? "isBelowMobileMinimum" : `is${H(e)}`]: r.matches
|
|
189
189
|
}));
|
|
190
190
|
};
|
|
191
191
|
return i(), r.addEventListener("change", i), () => r.removeEventListener("change", i);
|
|
@@ -194,12 +194,12 @@ var f = {
|
|
|
194
194
|
e.forEach((e) => e?.());
|
|
195
195
|
};
|
|
196
196
|
}, []), e;
|
|
197
|
-
},
|
|
197
|
+
}, H = (e) => e.charAt(0).toUpperCase() + e.slice(1), U = {
|
|
198
198
|
badge: "_badge_dy664_1",
|
|
199
199
|
text: "_text_dy664_9",
|
|
200
200
|
icon: "_icon_dy664_15"
|
|
201
|
-
},
|
|
202
|
-
className: d(a,
|
|
201
|
+
}, W = ({ text: e, textColor: t, borderColor: n, backgroundColor: r, icon: i, className: a }) => /* @__PURE__ */ l("div", {
|
|
202
|
+
className: d(a, U.badge),
|
|
203
203
|
style: {
|
|
204
204
|
padding: i ? "0.2rem" : "0.3rem",
|
|
205
205
|
border: n ? `1px solid ${n}` : "1px solid grey",
|
|
@@ -208,7 +208,7 @@ var f = {
|
|
|
208
208
|
flexDirection: "row"
|
|
209
209
|
},
|
|
210
210
|
children: [/* @__PURE__ */ c("p", {
|
|
211
|
-
className:
|
|
211
|
+
className: U.text,
|
|
212
212
|
style: {
|
|
213
213
|
color: t,
|
|
214
214
|
paddingRight: i ? "0.3rem" : "",
|
|
@@ -216,11 +216,11 @@ var f = {
|
|
|
216
216
|
},
|
|
217
217
|
children: e
|
|
218
218
|
}), i && /* @__PURE__ */ c("div", {
|
|
219
|
-
className:
|
|
219
|
+
className: U.icon,
|
|
220
220
|
children: i
|
|
221
221
|
})]
|
|
222
|
-
}),
|
|
223
|
-
let { isBelowMobileMinimum: T } =
|
|
222
|
+
}), G = ({ id: e, isSelectable: t = !1, isSelected: n = !1, cardOnclick: r, borderColor: i = "", backgroundColor: a, miniCard: o = !1, title: s, hasRating: u, ratingValue: f, img: p, imgAriaLabel: g, isImgCircle: _ = !0, imgHeight: y, imgWidth: b, primaryCta: S, secondaryCta: C, badges: w }) => {
|
|
223
|
+
let { isBelowMobileMinimum: T } = V(), E = T || o;
|
|
224
224
|
return /* @__PURE__ */ l("div", {
|
|
225
225
|
id: e,
|
|
226
226
|
role: t ? "button" : void 0,
|
|
@@ -274,7 +274,7 @@ var f = {
|
|
|
274
274
|
className: h.badgesContainer,
|
|
275
275
|
children: /* @__PURE__ */ c("div", {
|
|
276
276
|
className: h.badges,
|
|
277
|
-
children: w.map((e, t) => /* @__PURE__ */ c(
|
|
277
|
+
children: w.map((e, t) => /* @__PURE__ */ c(W, {
|
|
278
278
|
className: h.badge,
|
|
279
279
|
text: e.text,
|
|
280
280
|
textColor: e.textColor,
|
|
@@ -318,27 +318,27 @@ var f = {
|
|
|
318
318
|
})
|
|
319
319
|
]
|
|
320
320
|
});
|
|
321
|
-
},
|
|
321
|
+
}, K = {
|
|
322
322
|
navElementsContainer: "_navElementsContainer_ndrvq_1",
|
|
323
323
|
internalElementsContainer: "_internalElementsContainer_ndrvq_11",
|
|
324
324
|
hamburgerIcon: "_hamburgerIcon_ndrvq_19",
|
|
325
325
|
leftElementsContainer: "_leftElementsContainer_ndrvq_24",
|
|
326
326
|
leftElement: "_leftElement_ndrvq_24",
|
|
327
327
|
rightElementsContainer: "_rightElementsContainer_ndrvq_38"
|
|
328
|
-
},
|
|
328
|
+
}, q = {
|
|
329
329
|
wrapper: "_wrapper_1cng4_1",
|
|
330
330
|
dropdownButton: "_dropdownButton_1cng4_7",
|
|
331
331
|
dropdownButtonContainer: "_dropdownButtonContainer_1cng4_11",
|
|
332
332
|
listItemContainer: "_listItemContainer_1cng4_17",
|
|
333
333
|
listItem: "_listItem_1cng4_17"
|
|
334
|
-
},
|
|
334
|
+
}, J = ({ className: e, icon: t, options: n, listBorderColor: r, listBackgroundColor: i, isNavbarDropdown: a = !1 }) => {
|
|
335
335
|
let [s, u] = o(!1);
|
|
336
336
|
return /* @__PURE__ */ l("section", {
|
|
337
|
-
className: d(e,
|
|
337
|
+
className: d(e, q.wrapper),
|
|
338
338
|
children: [/* @__PURE__ */ c("div", {
|
|
339
|
-
className:
|
|
339
|
+
className: q.dropdownButtonContainer,
|
|
340
340
|
children: /* @__PURE__ */ c(m, {
|
|
341
|
-
className:
|
|
341
|
+
className: q.dropdownButton,
|
|
342
342
|
text: t,
|
|
343
343
|
variant: "transparent",
|
|
344
344
|
onClick: () => u(!s),
|
|
@@ -346,7 +346,7 @@ var f = {
|
|
|
346
346
|
})
|
|
347
347
|
}), s && /* @__PURE__ */ c("ul", {
|
|
348
348
|
"aria-label": "Unordered Dropdown List",
|
|
349
|
-
className:
|
|
349
|
+
className: q.listItemContainer,
|
|
350
350
|
style: {
|
|
351
351
|
marginTop: a ? "1.5rem" : "none",
|
|
352
352
|
border: `2px solid ${r}`,
|
|
@@ -354,7 +354,7 @@ var f = {
|
|
|
354
354
|
},
|
|
355
355
|
children: n.map((e) => e.isLink ? /* @__PURE__ */ c("li", {
|
|
356
356
|
"aria-label": "Dropdown List Item",
|
|
357
|
-
className:
|
|
357
|
+
className: q.listItem,
|
|
358
358
|
children: /* @__PURE__ */ c(R, {
|
|
359
359
|
id: e.id,
|
|
360
360
|
variant: e.variant,
|
|
@@ -363,7 +363,7 @@ var f = {
|
|
|
363
363
|
})
|
|
364
364
|
}, e.id) : /* @__PURE__ */ c("li", {
|
|
365
365
|
"aria-label": "Dropdown List Item",
|
|
366
|
-
className:
|
|
366
|
+
className: q.listItem,
|
|
367
367
|
children: /* @__PURE__ */ c(m, {
|
|
368
368
|
id: e.id,
|
|
369
369
|
variant: e.variant,
|
|
@@ -373,8 +373,8 @@ var f = {
|
|
|
373
373
|
}, e.id))
|
|
374
374
|
})]
|
|
375
375
|
});
|
|
376
|
-
},
|
|
377
|
-
let p = [...d, ...f], { isMobile: h
|
|
376
|
+
}, Y = ({ id: e, ariaLabel: t, backgroundColor: n, borderBottomColor: r, dropdownListBackgroundColor: i, dropdownListBorderColor: a, dropdownListIcon: o = /* @__PURE__ */ c(N, {}), leftElement: u, leftElementNeighbors: d, rightElements: f }) => {
|
|
377
|
+
let p = [...d, ...f], { isMobile: h } = V();
|
|
378
378
|
return /* @__PURE__ */ c("nav", {
|
|
379
379
|
id: e,
|
|
380
380
|
"aria-label": t ?? "Main Navbar",
|
|
@@ -382,17 +382,17 @@ var f = {
|
|
|
382
382
|
backgroundColor: n,
|
|
383
383
|
borderBottom: `2px solid ${r}`
|
|
384
384
|
},
|
|
385
|
-
className:
|
|
385
|
+
className: K.navElementsContainer,
|
|
386
386
|
children: /* @__PURE__ */ l("article", {
|
|
387
387
|
"aria-label": "Elements Container",
|
|
388
|
-
className:
|
|
389
|
-
children: [
|
|
390
|
-
className:
|
|
388
|
+
className: K.internalElementsContainer,
|
|
389
|
+
children: [/* @__PURE__ */ c("div", {
|
|
390
|
+
className: K.leftElement,
|
|
391
391
|
children: u
|
|
392
|
-
}), h ? /* @__PURE__ */ c(
|
|
392
|
+
}), h ? /* @__PURE__ */ c(J, {
|
|
393
393
|
listBackgroundColor: i,
|
|
394
394
|
listBorderColor: a,
|
|
395
|
-
className:
|
|
395
|
+
className: K.hamburgerIcon,
|
|
396
396
|
icon: o,
|
|
397
397
|
options: p.map(({ text: e, to: t, variant: n, id: r, isLink: i, onClick: a }) => ({
|
|
398
398
|
onClick: a,
|
|
@@ -405,10 +405,10 @@ var f = {
|
|
|
405
405
|
isNavbarDropdown: !0
|
|
406
406
|
}) : /* @__PURE__ */ l(s, { children: [/* @__PURE__ */ c("article", {
|
|
407
407
|
"aria-label": "Left Navbar Elements Container",
|
|
408
|
-
className:
|
|
408
|
+
className: K.leftElementsContainer,
|
|
409
409
|
children: d?.map((e) => e.isLink ? /* @__PURE__ */ c("div", {
|
|
410
410
|
"aria-label": "Dropdown List Item",
|
|
411
|
-
className:
|
|
411
|
+
className: K.listItem,
|
|
412
412
|
children: /* @__PURE__ */ c(R, {
|
|
413
413
|
id: e.id,
|
|
414
414
|
variant: e.variant,
|
|
@@ -417,7 +417,7 @@ var f = {
|
|
|
417
417
|
})
|
|
418
418
|
}, e.id) : /* @__PURE__ */ c("div", {
|
|
419
419
|
"aria-label": "Dropdown List Item",
|
|
420
|
-
className:
|
|
420
|
+
className: K.listItem,
|
|
421
421
|
children: /* @__PURE__ */ c(m, {
|
|
422
422
|
id: e.id,
|
|
423
423
|
variant: e.variant,
|
|
@@ -427,10 +427,10 @@ var f = {
|
|
|
427
427
|
}, e.id))
|
|
428
428
|
}), /* @__PURE__ */ c("article", {
|
|
429
429
|
"aria-label": "Right Navbar Elements Container",
|
|
430
|
-
className:
|
|
430
|
+
className: K.rightElementsContainer,
|
|
431
431
|
children: f.map((e) => e.isLink ? /* @__PURE__ */ c("div", {
|
|
432
432
|
"aria-label": "Dropdown List Item",
|
|
433
|
-
className:
|
|
433
|
+
className: K.listItem,
|
|
434
434
|
children: /* @__PURE__ */ c(R, {
|
|
435
435
|
id: e.id,
|
|
436
436
|
variant: e.variant,
|
|
@@ -439,7 +439,7 @@ var f = {
|
|
|
439
439
|
})
|
|
440
440
|
}, e.id) : /* @__PURE__ */ c("div", {
|
|
441
441
|
"aria-label": "Dropdown List Item",
|
|
442
|
-
className:
|
|
442
|
+
className: K.listItem,
|
|
443
443
|
children: /* @__PURE__ */ c(m, {
|
|
444
444
|
id: e.id,
|
|
445
445
|
variant: e.variant,
|
|
@@ -450,92 +450,21 @@ var f = {
|
|
|
450
450
|
})] })]
|
|
451
451
|
})
|
|
452
452
|
});
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
viewAllButton: "_viewAllButton_1qw4g_28"
|
|
459
|
-
}, X = ({ rowTitle: e, cards: t, viewAllOnClick: n }) => {
|
|
460
|
-
let { isMobile: r, isTablet: i } = B(), a = r ? t : i ? t.slice(0, 3) : t.slice(0, 4);
|
|
461
|
-
return /* @__PURE__ */ l("section", { children: [/* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(v, {
|
|
462
|
-
copy: e ?? "",
|
|
463
|
-
variant: "bodyLg",
|
|
464
|
-
className: Y.cardRowTitle
|
|
465
|
-
}) }), /* @__PURE__ */ l("div", {
|
|
466
|
-
style: {
|
|
467
|
-
display: "flex",
|
|
468
|
-
flexDirection: "row"
|
|
469
|
-
},
|
|
470
|
-
children: [/* @__PURE__ */ c("div", {
|
|
471
|
-
className: d(Y.cardsContainer, r && Y.mobileCardsContainer),
|
|
472
|
-
children: a.map((e) => /* @__PURE__ */ c("div", {
|
|
473
|
-
className: d(r ? Y.mobileCard : null),
|
|
474
|
-
children: /* @__PURE__ */ c(W, {
|
|
475
|
-
id: e.id,
|
|
476
|
-
borderColor: e.borderColor,
|
|
477
|
-
backgroundColor: e.backgroundColor,
|
|
478
|
-
miniCard: e.miniCard,
|
|
479
|
-
title: e.title,
|
|
480
|
-
hasRating: e.hasRating,
|
|
481
|
-
ratingValue: e.ratingValue,
|
|
482
|
-
img: e.img,
|
|
483
|
-
imgAriaLabel: e.imgAriaLabel,
|
|
484
|
-
isImgCircle: e.isImgCircle,
|
|
485
|
-
imgWidth: e.imgWidth,
|
|
486
|
-
imgHeight: e.imgHeight,
|
|
487
|
-
badges: e.badges,
|
|
488
|
-
isSelectable: e.isSelectable,
|
|
489
|
-
isSelected: e.isSelected,
|
|
490
|
-
cardOnclick: e.cardOnclick,
|
|
491
|
-
primaryCta: {
|
|
492
|
-
ariaButtonLabel: e.primaryCta?.ariaButtonLabel,
|
|
493
|
-
ariaLinkLabel: e.primaryCta?.ariaLinkLabel,
|
|
494
|
-
ariaPressed: e.primaryCta?.ariaPressed,
|
|
495
|
-
text: e.primaryCta?.text,
|
|
496
|
-
onClick: e.primaryCta?.onClick,
|
|
497
|
-
to: e.primaryCta?.to,
|
|
498
|
-
variant: e.primaryCta?.variant,
|
|
499
|
-
isLink: e.primaryCta?.isLink
|
|
500
|
-
},
|
|
501
|
-
secondaryCta: e.secondaryCta && {
|
|
502
|
-
ariaButtonLabel: e.secondaryCta.ariaButtonLabel,
|
|
503
|
-
ariaLinkLabel: e.secondaryCta.ariaLinkLabel,
|
|
504
|
-
ariaPressed: e.secondaryCta.ariaPressed,
|
|
505
|
-
text: e.secondaryCta.text,
|
|
506
|
-
onClick: e.secondaryCta.onClick,
|
|
507
|
-
to: e.secondaryCta.to,
|
|
508
|
-
variant: e.secondaryCta.variant,
|
|
509
|
-
isLink: e.secondaryCta.isLink
|
|
510
|
-
}
|
|
511
|
-
})
|
|
512
|
-
}, e.id))
|
|
513
|
-
}), a.length < t.length && /* @__PURE__ */ c("div", {
|
|
514
|
-
className: Y.viewAllButton,
|
|
515
|
-
children: /* @__PURE__ */ c(m, {
|
|
516
|
-
onClick: n,
|
|
517
|
-
text: "View All",
|
|
518
|
-
variant: "ghost"
|
|
519
|
-
})
|
|
520
|
-
})]
|
|
521
|
-
})] });
|
|
522
|
-
}, Z = {
|
|
523
|
-
labelText: "_labelText_1p6fo_1",
|
|
524
|
-
selectContainer: "_selectContainer_1p6fo_5",
|
|
525
|
-
select: "_select_1p6fo_5",
|
|
526
|
-
icon: "_icon_1p6fo_29"
|
|
527
|
-
}, Q = ({ id: e, label: t, selectOptions: n, value: r, defaultValue: i, onChange: a, multipleOptionSelect: o, className: u, selectBackgroundColor: f, borderColor: p, textColor: m }) => /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("label", {
|
|
453
|
+
}, X = {
|
|
454
|
+
selectContainer: "_selectContainer_1o16c_1",
|
|
455
|
+
select: "_select_1o16c_1",
|
|
456
|
+
icon: "_icon_1o16c_25"
|
|
457
|
+
}, Z = ({ id: e, label: t, selectOptions: n, value: r, defaultValue: i, onChange: a, multipleOptionSelect: o, className: u, selectBackgroundColor: f, borderColor: p, textColor: m }) => /* @__PURE__ */ c(s, { children: /* @__PURE__ */ l("label", {
|
|
528
458
|
htmlFor: e,
|
|
529
|
-
children: [/* @__PURE__ */ c(v, {
|
|
530
|
-
className: Z.labelText,
|
|
459
|
+
children: [t && /* @__PURE__ */ c(v, {
|
|
531
460
|
copy: t,
|
|
532
461
|
variant: "bodySm"
|
|
533
462
|
}), /* @__PURE__ */ l("div", {
|
|
534
|
-
className:
|
|
463
|
+
className: X.selectContainer,
|
|
535
464
|
children: [/* @__PURE__ */ c("select", {
|
|
536
465
|
id: e,
|
|
537
466
|
defaultValue: i,
|
|
538
|
-
className: d(
|
|
467
|
+
className: d(X.select, u),
|
|
539
468
|
style: {
|
|
540
469
|
color: m ?? "",
|
|
541
470
|
background: f ?? "transparent",
|
|
@@ -554,9 +483,198 @@ var f = {
|
|
|
554
483
|
color: m,
|
|
555
484
|
strokeWidth: 1,
|
|
556
485
|
size: 20,
|
|
557
|
-
className:
|
|
486
|
+
className: X.icon
|
|
558
487
|
})]
|
|
559
488
|
})]
|
|
560
|
-
}) })
|
|
489
|
+
}) }), Q = {
|
|
490
|
+
cardRowContent: "_cardRowContent_spma4_1",
|
|
491
|
+
aboveCardContentContainer: "_aboveCardContentContainer_spma4_6",
|
|
492
|
+
headingsContainer: "_headingsContainer_spma4_13",
|
|
493
|
+
desktopButtonsContainer: "_desktopButtonsContainer_spma4_19",
|
|
494
|
+
cardsContainer: "_cardsContainer_spma4_26",
|
|
495
|
+
cardRowTitle: "_cardRowTitle_spma4_39",
|
|
496
|
+
cardRowTitleWithSelect: "_cardRowTitleWithSelect_spma4_44",
|
|
497
|
+
cardRowSubtitle: "_cardRowSubtitle_spma4_49",
|
|
498
|
+
cardRowSubtitleWithSelect: "_cardRowSubtitleWithSelect_spma4_53",
|
|
499
|
+
selectDropdown: "_selectDropdown_spma4_57",
|
|
500
|
+
mobileCardsContainer: "_mobileCardsContainer_spma4_61",
|
|
501
|
+
mobileCard: "_mobileCard_spma4_61",
|
|
502
|
+
mobileButtonsContainer: "_mobileButtonsContainer_spma4_72",
|
|
503
|
+
mobileStretch: "_mobileStretch_spma4_78",
|
|
504
|
+
cta: "_cta_spma4_82"
|
|
505
|
+
}, $ = ({ rowTitle: e, rowSubtitle: t, cards: n, primaryCta: r, secondaryCta: i, selectedCardIds: a, onCardSelect: o, selectDropdown: u }) => {
|
|
506
|
+
let { isMobile: f, isTablet: p } = V(), h = f ? n.slice(0, 4) : p ? n.slice(0, 3) : n.slice(0, 4);
|
|
507
|
+
return /* @__PURE__ */ l("section", { children: [/* @__PURE__ */ l("div", {
|
|
508
|
+
className: Q.cardRowContent,
|
|
509
|
+
children: [/* @__PURE__ */ l("div", {
|
|
510
|
+
className: Q.aboveCardContentContainer,
|
|
511
|
+
children: [/* @__PURE__ */ l("div", {
|
|
512
|
+
className: Q.headingsContainer,
|
|
513
|
+
children: [
|
|
514
|
+
e && /* @__PURE__ */ c(v, {
|
|
515
|
+
copy: e,
|
|
516
|
+
variant: "headingLg",
|
|
517
|
+
className: t ? Q.cardRowTitle : Q.cardRowTitleWithSelect
|
|
518
|
+
}),
|
|
519
|
+
t && /* @__PURE__ */ c("div", {
|
|
520
|
+
className: d(Q.cardRowSubtitle, u && Q.cardRowSubtitleWithSelect),
|
|
521
|
+
children: /* @__PURE__ */ c(v, {
|
|
522
|
+
copy: t,
|
|
523
|
+
variant: "caption"
|
|
524
|
+
})
|
|
525
|
+
}),
|
|
526
|
+
u && /* @__PURE__ */ c("div", {
|
|
527
|
+
className: Q.selectDropdown,
|
|
528
|
+
children: /* @__PURE__ */ c(Z, { ...u })
|
|
529
|
+
})
|
|
530
|
+
]
|
|
531
|
+
}), !f && /* @__PURE__ */ l("div", {
|
|
532
|
+
className: Q.desktopButtonsContainer,
|
|
533
|
+
children: [
|
|
534
|
+
r && r.isLink && /* @__PURE__ */ c("div", {
|
|
535
|
+
className: Q.cta,
|
|
536
|
+
children: /* @__PURE__ */ c(R, {
|
|
537
|
+
id: r.id,
|
|
538
|
+
ariaLabel: r.ariaLinkLabel ?? "Primary Card Row Link",
|
|
539
|
+
to: r.to,
|
|
540
|
+
text: r.text,
|
|
541
|
+
variant: r.variant
|
|
542
|
+
})
|
|
543
|
+
}),
|
|
544
|
+
r && !r.isLink && /* @__PURE__ */ c("div", {
|
|
545
|
+
className: Q.cta,
|
|
546
|
+
children: /* @__PURE__ */ c(m, {
|
|
547
|
+
id: r.id,
|
|
548
|
+
ariaLabel: r.ariaButtonLabel ?? "Primary Card Row Button",
|
|
549
|
+
ariaPressed: r.ariaPressed,
|
|
550
|
+
variant: r.variant,
|
|
551
|
+
text: r.text,
|
|
552
|
+
onClick: r.onClick
|
|
553
|
+
})
|
|
554
|
+
}),
|
|
555
|
+
i && i.isLink && /* @__PURE__ */ c("div", {
|
|
556
|
+
className: Q.cta,
|
|
557
|
+
children: /* @__PURE__ */ c(R, {
|
|
558
|
+
id: i.id,
|
|
559
|
+
ariaLabel: i.ariaLinkLabel ?? "Secondary Card Row Link",
|
|
560
|
+
to: i.to,
|
|
561
|
+
text: i.text,
|
|
562
|
+
variant: i.variant
|
|
563
|
+
})
|
|
564
|
+
}),
|
|
565
|
+
i && !i.isLink && /* @__PURE__ */ c("div", {
|
|
566
|
+
className: Q.cta,
|
|
567
|
+
children: /* @__PURE__ */ c(m, {
|
|
568
|
+
id: i.id,
|
|
569
|
+
ariaLabel: i.ariaButtonLabel ?? "Secondary Card Row Button",
|
|
570
|
+
ariaPressed: i.ariaPressed,
|
|
571
|
+
variant: i.variant,
|
|
572
|
+
text: i.text,
|
|
573
|
+
onClick: i.onClick
|
|
574
|
+
})
|
|
575
|
+
})
|
|
576
|
+
]
|
|
577
|
+
})]
|
|
578
|
+
}), /* @__PURE__ */ c("div", {
|
|
579
|
+
style: {
|
|
580
|
+
display: "flex",
|
|
581
|
+
flexDirection: f ? "column" : "row"
|
|
582
|
+
},
|
|
583
|
+
children: /* @__PURE__ */ c("div", {
|
|
584
|
+
className: d(Q.cardsContainer, f && Q.mobileCardsContainer),
|
|
585
|
+
children: h.map((e) => e.id ? /* @__PURE__ */ c("div", {
|
|
586
|
+
className: d(f && Q.mobileCard),
|
|
587
|
+
children: /* @__PURE__ */ c(G, {
|
|
588
|
+
id: e.id,
|
|
589
|
+
borderColor: e.borderColor,
|
|
590
|
+
backgroundColor: e.backgroundColor,
|
|
591
|
+
miniCard: e.miniCard,
|
|
592
|
+
title: e.title,
|
|
593
|
+
hasRating: e.hasRating,
|
|
594
|
+
ratingValue: e.ratingValue,
|
|
595
|
+
img: e.img,
|
|
596
|
+
imgAriaLabel: e.imgAriaLabel,
|
|
597
|
+
isImgCircle: e.isImgCircle,
|
|
598
|
+
imgWidth: e.imgWidth,
|
|
599
|
+
imgHeight: e.imgHeight,
|
|
600
|
+
badges: e.badges,
|
|
601
|
+
isSelectable: e.isSelectable,
|
|
602
|
+
isSelected: a?.includes(e.id),
|
|
603
|
+
cardOnclick: () => o?.(e.id),
|
|
604
|
+
primaryCta: {
|
|
605
|
+
ariaButtonLabel: e.primaryCta?.ariaButtonLabel,
|
|
606
|
+
ariaLinkLabel: e.primaryCta?.ariaLinkLabel,
|
|
607
|
+
ariaPressed: e.primaryCta?.ariaPressed,
|
|
608
|
+
text: e.primaryCta?.text,
|
|
609
|
+
onClick: e.primaryCta?.onClick,
|
|
610
|
+
to: e.primaryCta?.to,
|
|
611
|
+
variant: e.primaryCta?.variant,
|
|
612
|
+
isLink: e.primaryCta?.isLink
|
|
613
|
+
},
|
|
614
|
+
secondaryCta: e.secondaryCta && {
|
|
615
|
+
ariaButtonLabel: e.secondaryCta.ariaButtonLabel,
|
|
616
|
+
ariaLinkLabel: e.secondaryCta.ariaLinkLabel,
|
|
617
|
+
ariaPressed: e.secondaryCta.ariaPressed,
|
|
618
|
+
text: e.secondaryCta.text,
|
|
619
|
+
onClick: e.secondaryCta.onClick,
|
|
620
|
+
to: e.secondaryCta.to,
|
|
621
|
+
variant: e.secondaryCta.variant,
|
|
622
|
+
isLink: e.secondaryCta.isLink
|
|
623
|
+
}
|
|
624
|
+
})
|
|
625
|
+
}, e.id) : null)
|
|
626
|
+
})
|
|
627
|
+
})]
|
|
628
|
+
}), f && /* @__PURE__ */ l(s, { children: [
|
|
629
|
+
r && r.isLink && /* @__PURE__ */ c("div", {
|
|
630
|
+
style: { marginBottom: i ? "0.5rem" : "" },
|
|
631
|
+
className: d(Q.cta, Q.mobileButtonsContainer),
|
|
632
|
+
children: /* @__PURE__ */ c(R, {
|
|
633
|
+
id: r.id,
|
|
634
|
+
ariaLabel: r.ariaLinkLabel ?? "Primary Card Row Link",
|
|
635
|
+
to: r.to,
|
|
636
|
+
text: r.text,
|
|
637
|
+
variant: r.variant,
|
|
638
|
+
className: Q.mobileStretch
|
|
639
|
+
})
|
|
640
|
+
}),
|
|
641
|
+
r && !r.isLink && /* @__PURE__ */ c("div", {
|
|
642
|
+
style: { marginBottom: i ? "0.5rem" : "" },
|
|
643
|
+
className: d(Q.cta, Q.mobileButtonsContainer),
|
|
644
|
+
children: /* @__PURE__ */ c(m, {
|
|
645
|
+
id: r.id,
|
|
646
|
+
ariaLabel: r.ariaButtonLabel ?? "Primary Card Row Button",
|
|
647
|
+
ariaPressed: r.ariaPressed,
|
|
648
|
+
variant: r.variant,
|
|
649
|
+
text: r.text,
|
|
650
|
+
onClick: r.onClick,
|
|
651
|
+
className: Q.mobileStretch
|
|
652
|
+
})
|
|
653
|
+
}),
|
|
654
|
+
i && i.isLink && /* @__PURE__ */ c("div", {
|
|
655
|
+
className: d(Q.cta, Q.mobileButtonsContainer),
|
|
656
|
+
children: /* @__PURE__ */ c(R, {
|
|
657
|
+
id: i.id,
|
|
658
|
+
ariaLabel: i.ariaLinkLabel ?? "Secondary Card Row Link",
|
|
659
|
+
to: i.to,
|
|
660
|
+
text: i.text,
|
|
661
|
+
variant: i.variant,
|
|
662
|
+
className: Q.mobileStretch
|
|
663
|
+
})
|
|
664
|
+
}),
|
|
665
|
+
i && !i.isLink && /* @__PURE__ */ c("div", {
|
|
666
|
+
className: d(Q.cta, Q.mobileButtonsContainer),
|
|
667
|
+
children: /* @__PURE__ */ c(m, {
|
|
668
|
+
id: i.id,
|
|
669
|
+
ariaLabel: i.ariaButtonLabel ?? "Secondary Card Row Button",
|
|
670
|
+
ariaPressed: i.ariaPressed,
|
|
671
|
+
variant: i.variant,
|
|
672
|
+
text: i.text,
|
|
673
|
+
onClick: i.onClick,
|
|
674
|
+
className: Q.mobileStretch
|
|
675
|
+
})
|
|
676
|
+
})
|
|
677
|
+
] })] });
|
|
678
|
+
};
|
|
561
679
|
//#endregion
|
|
562
|
-
export {
|
|
680
|
+
export { W as Badge, m as Button, G as Card, $ as CardRow, J as IconDropdown, x as Image, R as Link, Y as Navbar, L as Rating, Z as SelectDropdown, v as Text, B as getMatch, V as useBreakpoint, g as variantMap };
|
package/dist/matrix-ui.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.primary{color:#111827;cursor:pointer;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.primary:hover:not(:disabled){background:#5fafd6}.primary:active:not(:disabled){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.secondary:hover:not(:disabled){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.ghost:hover:not(:disabled){background:#ffffff0d}.ghost:active:not(:disabled){background:#ffffff14}.error{color:#111827;cursor:pointer;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.error:hover:not(:disabled){filter:brightness(.95)}.error:active:not(:disabled){filter:brightness(.9)}.success{color:#111827;cursor:pointer;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.success:hover:not(:disabled){filter:brightness(.95)}.success:active:not(:disabled){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled){color:#f8fafc}.transparent:disabled{color:#64748b;cursor:not-allowed}._cardContainer_ivc2t_1{border-radius:8px;flex-direction:column;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:auto;transition:filter .15s,transform .15s;display:flex}._interactive_ivc2t_14:hover{filter:brightness(1.05)}._interactive_ivc2t_14:active{filter:brightness(.95)}._topContentContainer_ivc2t_22{flex-direction:column;margin-top:1rem;margin-bottom:1rem;display:flex}._cardTitle_ivc2t_29{margin:0 1rem .2rem}._miniCard_ivc2t_36 ._cardTitle_ivc2t_29{flex:1;margin:0}._ctaContainer_ivc2t_41{box-sizing:border-box;flex-direction:column;justify-content:space-between;gap:1rem;width:100%;padding:.75rem;display:flex}._miniCard_ivc2t_36 ._ctaContainer_ivc2t_41{flex-direction:row;justify-content:center;gap:.5rem;padding:.5rem}._imgContainer_ivc2t_58{box-sizing:border-box;border-radius:8px;justify-content:center;padding-bottom:1rem;padding-left:1.5rem;padding-right:1.5rem;display:flex}._badgesViewport_ivc2t_68{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:0 .75rem;overflow:hidden}._badgesContainer_ivc2t_77{scrollbar-width:none;width:100%;min-width:0;max-width:100%;overflow:auto hidden}._badgesContainer_ivc2t_77::-webkit-scrollbar{display:none}._badges_ivc2t_68{justify-content:center;gap:.2rem;width:max-content;min-width:100%;display:flex}._badge_ivc2t_68{flex-shrink:0}._img_ivc2t_58{max-width:100%}._miniCard_ivc2t_36 ._topContentContainer_ivc2t_22{flex-direction:row;justify-content:flex-start;align-items:center;gap:1rem;margin-top:1rem;margin-bottom:1rem}._cardRating_ivc2t_115{justify-content:center;margin-top:.1rem;display:flex}:where(._headingSm_5e5d4_1){color:#f8fafc;margin:0;font-size:1.25rem;font-weight:600}:where(._headingMd_5e5d4_8){color:#f8fafc;margin:0;font-size:1.5rem;font-weight:600}:where(._headingLg_5e5d4_15){color:#f8fafc;margin:0;font-size:1.875rem;font-weight:700}:where(._headingXl_5e5d4_22){color:#f8fafc;margin:0;font-size:2rem;font-weight:700}:where(._bodySm_5e5d4_29){color:#cbd5e1;margin:0;font-size:.875rem;font-weight:400}:where(._bodyMd_5e5d4_36){color:#cbd5e1;margin:0;font-size:1rem;font-weight:400}:where(._bodyLg_5e5d4_43){color:#cbd5e1;margin:0;font-size:1.125rem;font-weight:400}:where(._caption_5e5d4_50){color:#cbd5e1;margin:0;font-size:.75rem;font-weight:500}._img_14ux7_1{max-width:100%;display:block}._circle_14ux7_6{border-radius:50%}._ratingContainer_1xmf5_1{flex-direction:row;display:flex}._text_1xmf5_6{margin:0;padding-right:.2rem}._star_1xmf5_11{color:gold;fill:gold;width:1rem;height:1rem;margin-top:.17rem}.primary{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.primary:hover:not(:disabled),.primary:hover:not([aria-disabled=true]){background:#5fafd6}.primary:active:not(:disabled),.primary:active:not([aria-disabled=true]){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;text-align:center;vertical-align:middle;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.secondary:hover:not(:disabled),.secondary:hover:not([aria-disabled=true]){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled),.secondary:active:not([aria-disabled=true]){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.ghost:hover:not(:disabled),.ghost:hover:not([aria-disabled=true]){background:#ffffff0d}.ghost:active:not(:disabled),.ghost:active:not([aria-disabled=true]){background:#ffffff14}.error{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.error:hover:not(:disabled),.error:hover:not([aria-disabled=true]){filter:brightness(.95)}.error:active:not(:disabled),.error:active:not([aria-disabled=true]){filter:brightness(.9)}.success{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.success:hover:not(:disabled),.success:hover:not([aria-disabled=true]){filter:brightness(.95)}.success:active:not(:disabled),.success:active:not([aria-disabled=true]){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled),.transparent:hover:not([aria-disabled=true]){color:#f8fafc}.transparent.active{color:#f8fafc;background:#ffffff14}.transparent:focus-visible{outline:none;box-shadow:0 0 0 3px #87ceeb59}.transparent:disabled,.transparent[aria-disabled=true]{color:#64748b;cursor:not-allowed}.link{justify-content:center;align-items:center;display:flex}._badge_dy664_1{border-radius:8px;align-items:center;max-width:5rem;max-height:1.5rem;display:flex}._text_dy664_9{margin:0;padding:0;line-height:1}._icon_dy664_15{margin:0;padding:0 .2rem 0 0;line-height:1}._navElementsContainer_ndrvq_1{z-index:1000;background-color:#0b0f17;border-bottom:2px solid #1f2937;width:100%;height:3.5rem;position:sticky;top:0}._internalElementsContainer_ndrvq_11{flex-direction:row;align-items:center;width:100%;height:3.5rem;display:flex}._hamburgerIcon_ndrvq_19{margin-left:auto;padding-right:2rem}._leftElementsContainer_ndrvq_24{flex-direction:row;align-items:center;gap:2rem;width:50%;padding-left:1.5rem;line-height:.625rem;display:flex}._leftElement_ndrvq_24{padding-left:2rem}._rightElementsContainer_ndrvq_38{flex-direction:row;justify-content:end;gap:2rem;width:50%;padding-right:2rem;line-height:.625rem;display:flex}._wrapper_1cng4_1{min-width:10rem;display:inline-block;position:relative}._dropdownButton_1cng4_7{padding:0}._dropdownButtonContainer_1cng4_11{justify-content:right;align-items:end;display:flex}._listItemContainer_1cng4_17{z-index:1000;border-radius:5px;flex-direction:column;justify-content:left;align-items:start;min-width:10rem;margin-top:.5rem;padding:0;display:flex;position:absolute;top:100%;left:0}._listItem_1cng4_17{padding-top:.5rem;padding-bottom:.5rem;list-style:none}.
|
|
2
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`matrix-ui`]={},e.React,e.react_jsx_runtime))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}var f={primary:`primary`,secondary:`secondary`,ghost:`ghost`,transparent:`transparent`,success:`success`,error:`error`},p={primary:`primary`,secondary:`secondary`,ghost:`ghost`,transparent:`transparent`,success:`success`,error:`error`},m=({id:e,variant:t=`primary`,text:r,onClick:i,className:a,ariaLabel:o=`Button`,ariaPressed:s=!1})=>(0,n.jsx)(`button`,{id:e,"aria-label":o,"aria-pressed":s,onClick:i,className:d(p[t],a),role:`button`,children:r}),h={cardContainer:`_cardContainer_ivc2t_1`,interactive:`_interactive_ivc2t_14`,topContentContainer:`_topContentContainer_ivc2t_22`,cardTitle:`_cardTitle_ivc2t_29`,miniCard:`_miniCard_ivc2t_36`,ctaContainer:`_ctaContainer_ivc2t_41`,imgContainer:`_imgContainer_ivc2t_58`,badgesViewport:`_badgesViewport_ivc2t_68`,badgesContainer:`_badgesContainer_ivc2t_77`,badges:`_badges_ivc2t_68`,badge:`_badge_ivc2t_68`,img:`_img_ivc2t_58`,cardRating:`_cardRating_ivc2t_115`},g={headingXl:`h1`,headingLg:`h2`,headingMd:`h3`,headingSm:`h4`,bodyLg:`p`,bodyMd:`p`,bodySm:`p`,caption:`span`},_={headingSm:`_headingSm_5e5d4_1`,headingMd:`_headingMd_5e5d4_8`,headingLg:`_headingLg_5e5d4_15`,headingXl:`_headingXl_5e5d4_22`,bodySm:`_bodySm_5e5d4_29`,bodyMd:`_bodyMd_5e5d4_36`,bodyLg:`_bodyLg_5e5d4_43`,caption:`_caption_5e5d4_50`},v=({copy:e,variant:t,className:r})=>{let i=g[t];return(0,n.jsx)(i,{className:d(_[t],r),children:e})},y={img:`_img_14ux7_1`,circle:`_circle_14ux7_6`},b=e=>`${e?.toLowerCase().replace(/\s+/g,`-`)}-id`,x=({width:e,height:t,src:r,alt:i,className:a,isCircle:o=!1,ariaLabel:s,style:c})=>{let l=d(y.img,o&&y.circle,a);return(0,n.jsx)(`img`,{id:b(s),"aria-label":s??`Image`,"data-circle":o,className:l,src:r,alt:i,width:e,height:t,style:c})},S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),w=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),T=e=>{let t=w(e);return t.charAt(0).toUpperCase()+t.slice(1)},E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},O=(0,t.createContext)({}),k=()=>(0,t.useContext)(O),A=(0,t.forwardRef)(({color:e,size:n,strokeWidth:r,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:s,...c},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=k()??{},h=i??f?Number(r??d)*24/Number(n??u):r??d;return(0,t.createElement)(`svg`,{ref:l,...E,width:n??u??E.width,height:n??u??E.height,stroke:e??p,strokeWidth:h,className:S(`lucide`,m,a),...!o&&!D(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(o)?o:[o]])}),j=(e,n)=>{let r=(0,t.forwardRef)(({className:r,...i},a)=>(0,t.createElement)(A,{ref:a,iconNode:n,className:S(`lucide-${C(T(e))}`,`lucide-${e}`,r),...i}));return r.displayName=T(e),r},M=j(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),N=j(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),P=j(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),F={ratingContainer:`_ratingContainer_1xmf5_1`,text:`_text_1xmf5_6`,star:`_star_1xmf5_11`},I=[{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})}],L=({rating:e})=>I.filter((t,n)=>e&&n<e).map((e,n)=>t.default.cloneElement(e.star,{key:n})),R=({variant:e,text:t,to:r,className:i,ariaLabel:a,id:o})=>(0,n.jsx)(`a`,{id:o,className:d(`link`,e&&f[e],i),href:r,target:`_blank`,rel:`noopener noreferrer`,"aria-label":a??`Link`,role:`link`,children:t}),z={mobile:`(max-width: 767px)`,tablet:`(min-width: 768px) and (max-width: 1023px)`,desktop:`(min-width: 1024px)`,belowMobile:`(max-width: 460px)`},B=()=>{let[e,n]=(0,t.useState)({isBelowMobileMinimum:!1,isMobile:!1,isTablet:!1,isDesktop:!1});return(0,t.useEffect)(()=>{let e=Object.entries(z).map(([e,t])=>{let r=window.matchMedia(t),i=()=>{n(t=>({...t,[e===`belowMobile`?`isBelowMobileMinimum`:`is${V(e)}`]:r.matches}))};return i(),r.addEventListener(`change`,i),()=>r.removeEventListener(`change`,i)});return()=>{e.forEach(e=>e?.())}},[]),e},V=e=>e.charAt(0).toUpperCase()+e.slice(1),H={badge:`_badge_dy664_1`,text:`_text_dy664_9`,icon:`_icon_dy664_15`},U=({text:e,textColor:t,borderColor:r,backgroundColor:i,icon:a,className:o})=>(0,n.jsxs)(`div`,{className:d(o,H.badge),style:{padding:a?`0.2rem`:`0.3rem`,border:r?`1px solid ${r}`:`1px solid grey`,background:i??`none`,fontSize:12,flexDirection:`row`},children:[(0,n.jsx)(`p`,{className:H.text,style:{color:t,paddingRight:a?`0.3rem`:``,paddingLeft:a?`0.3rem`:``},children:e}),a&&(0,n.jsx)(`div`,{className:H.icon,children:a})]}),W=({id:e,isSelectable:t=!1,isSelected:r=!1,cardOnclick:i,borderColor:a=``,backgroundColor:o,miniCard:s=!1,title:c,hasRating:l,ratingValue:u,img:f,imgAriaLabel:p,isImgCircle:g=!0,imgHeight:_,imgWidth:y,primaryCta:b,secondaryCta:S,badges:C})=>{let{isBelowMobileMinimum:w}=B(),T=w||s;return(0,n.jsxs)(`div`,{id:e,role:t?`button`:void 0,tabIndex:0,"aria-pressed":t?r:void 0,"aria-label":`${c} Card`,className:d(h.cardContainer,{[h.miniCard]:s,[h.interactive]:t,[h.selected]:t&&r}),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i?.())},style:{backgroundColor:o,border:a?`2px solid ${a}`:void 0,cursor:t?`pointer`:``},onClick:t?i:void 0,children:[(0,n.jsxs)(`div`,{"aria-label":`Card Top Content Container`,className:h.topContentContainer,children:[(0,n.jsx)(v,{className:h.cardTitle,variant:`bodyLg`,copy:c}),l&&u!=null&&(0,n.jsx)(`div`,{"aria-label":`Card Rating Container`,className:h.cardRating,children:(0,n.jsx)(L,{rating:u})})]}),!T&&(0,n.jsx)(`div`,{"aria-label":p?`${p} Container`:`Image Container`,className:h.imgContainer,children:(0,n.jsx)(x,{width:y,height:_,ariaLabel:p??`Card Image`,isCircle:g,src:f??``,alt:`${c} Card Image`,style:{border:a?`2px solid ${a}`:void 0}})}),C&&(0,n.jsx)(`div`,{className:h.badgesViewport,children:(0,n.jsx)(`div`,{className:h.badgesContainer,children:(0,n.jsx)(`div`,{className:h.badges,children:C.map((e,t)=>(0,n.jsx)(U,{className:h.badge,text:e.text,textColor:e.textColor,borderColor:e.borderColor,backgroundColor:e.backgroundColor,icon:e.icon},`${e.text}-${t}`))})})}),(0,n.jsxs)(`div`,{"aria-label":`Card CTA Container`,className:h.ctaContainer,children:[b&&(b?.isLink?(0,n.jsx)(R,{id:b.id,ariaLabel:b.ariaLinkLabel??`Primary Card Link`,to:b.to,text:b.text,variant:b.variant}):(0,n.jsx)(m,{id:b.id,ariaLabel:b?.ariaButtonLabel??`Primary Card Button`,ariaPressed:b?.ariaPressed,variant:b?.variant,text:b?.text,onClick:b?.onClick})),S&&(S.isLink?(0,n.jsx)(R,{id:S.id,ariaLabel:S.ariaLinkLabel??`Secondary Card Link`,to:S.to,text:S.text,variant:S.variant}):(0,n.jsx)(m,{id:S.id,ariaLabel:S.ariaButtonLabel??`Secondary Card Button`,ariaPressed:S.ariaPressed,variant:S.variant,text:S.text,onClick:S.onClick}))]})]})},G={navElementsContainer:`_navElementsContainer_ndrvq_1`,internalElementsContainer:`_internalElementsContainer_ndrvq_11`,hamburgerIcon:`_hamburgerIcon_ndrvq_19`,leftElementsContainer:`_leftElementsContainer_ndrvq_24`,leftElement:`_leftElement_ndrvq_24`,rightElementsContainer:`_rightElementsContainer_ndrvq_38`},K={wrapper:`_wrapper_1cng4_1`,dropdownButton:`_dropdownButton_1cng4_7`,dropdownButtonContainer:`_dropdownButtonContainer_1cng4_11`,listItemContainer:`_listItemContainer_1cng4_17`,listItem:`_listItem_1cng4_17`},q=({className:e,icon:r,options:i,listBorderColor:a,listBackgroundColor:o,isNavbarDropdown:s=!1})=>{let[c,l]=(0,t.useState)(!1);return(0,n.jsxs)(`section`,{className:d(e,K.wrapper),children:[(0,n.jsx)(`div`,{className:K.dropdownButtonContainer,children:(0,n.jsx)(m,{className:K.dropdownButton,text:r,variant:`transparent`,onClick:()=>l(!c),ariaLabel:`Dropdown Menu Button`})}),c&&(0,n.jsx)(`ul`,{"aria-label":`Unordered Dropdown List`,className:K.listItemContainer,style:{marginTop:s?`1.5rem`:`none`,border:`2px solid ${a}`,backgroundColor:o},children:i.map(e=>e.isLink?(0,n.jsx)(`li`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`li`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))})]})},J=({id:e,ariaLabel:t,backgroundColor:r,borderBottomColor:i,dropdownListBackgroundColor:a,dropdownListBorderColor:o,dropdownListIcon:s=(0,n.jsx)(N,{}),leftElement:c,leftElementNeighbors:l,rightElements:u})=>{let d=[...l,...u],{isMobile:f,isBelowMobileMinimum:p}=B();return(0,n.jsx)(`nav`,{id:e,"aria-label":t??`Main Navbar`,style:{backgroundColor:r,borderBottom:`2px solid ${i}`},className:G.navElementsContainer,children:(0,n.jsxs)(`article`,{"aria-label":`Elements Container`,className:G.internalElementsContainer,children:[!p&&(0,n.jsx)(`div`,{className:G.leftElement,children:c}),f?(0,n.jsx)(q,{listBackgroundColor:a,listBorderColor:o,className:G.hamburgerIcon,icon:s,options:d.map(({text:e,to:t,variant:n,id:r,isLink:i,onClick:a})=>({onClick:a,isLink:i,id:r,text:e,to:t,variant:n})),isNavbarDropdown:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`article`,{"aria-label":`Left Navbar Elements Container`,className:G.leftElementsContainer,children:l?.map(e=>e.isLink?(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:G.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:G.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))}),(0,n.jsx)(`article`,{"aria-label":`Right Navbar Elements Container`,className:G.rightElementsContainer,children:u.map(e=>e.isLink?(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:G.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:G.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))})]})]})})},Y={cardsContainer:`_cardsContainer_1qw4g_1`,cardRowTitle:`_cardRowTitle_1qw4g_13`,mobileCardsContainer:`_mobileCardsContainer_1qw4g_17`,mobileCard:`_mobileCard_1qw4g_17`,viewAllButton:`_viewAllButton_1qw4g_28`},X=({rowTitle:e,cards:t,viewAllOnClick:r})=>{let{isMobile:i,isTablet:a}=B(),o=i?t:a?t.slice(0,3):t.slice(0,4);return(0,n.jsxs)(`section`,{children:[(0,n.jsx)(`div`,{children:(0,n.jsx)(v,{copy:e??``,variant:`bodyLg`,className:Y.cardRowTitle})}),(0,n.jsxs)(`div`,{style:{display:`flex`,flexDirection:`row`},children:[(0,n.jsx)(`div`,{className:d(Y.cardsContainer,i&&Y.mobileCardsContainer),children:o.map(e=>(0,n.jsx)(`div`,{className:d(i?Y.mobileCard:null),children:(0,n.jsx)(W,{id:e.id,borderColor:e.borderColor,backgroundColor:e.backgroundColor,miniCard:e.miniCard,title:e.title,hasRating:e.hasRating,ratingValue:e.ratingValue,img:e.img,imgAriaLabel:e.imgAriaLabel,isImgCircle:e.isImgCircle,imgWidth:e.imgWidth,imgHeight:e.imgHeight,badges:e.badges,isSelectable:e.isSelectable,isSelected:e.isSelected,cardOnclick:e.cardOnclick,primaryCta:{ariaButtonLabel:e.primaryCta?.ariaButtonLabel,ariaLinkLabel:e.primaryCta?.ariaLinkLabel,ariaPressed:e.primaryCta?.ariaPressed,text:e.primaryCta?.text,onClick:e.primaryCta?.onClick,to:e.primaryCta?.to,variant:e.primaryCta?.variant,isLink:e.primaryCta?.isLink},secondaryCta:e.secondaryCta&&{ariaButtonLabel:e.secondaryCta.ariaButtonLabel,ariaLinkLabel:e.secondaryCta.ariaLinkLabel,ariaPressed:e.secondaryCta.ariaPressed,text:e.secondaryCta.text,onClick:e.secondaryCta.onClick,to:e.secondaryCta.to,variant:e.secondaryCta.variant,isLink:e.secondaryCta.isLink}})},e.id))}),o.length<t.length&&(0,n.jsx)(`div`,{className:Y.viewAllButton,children:(0,n.jsx)(m,{onClick:r,text:`View All`,variant:`ghost`})})]})]})},Z={labelText:`_labelText_1p6fo_1`,selectContainer:`_selectContainer_1p6fo_5`,select:`_select_1p6fo_5`,icon:`_icon_1p6fo_29`};e.Badge=U,e.Button=m,e.Card=W,e.CardRow=X,e.IconDropdown=q,e.Image=x,e.Link=R,e.Navbar=J,e.Rating=L,e.SelectDropdown=({id:e,label:t,selectOptions:r,value:i,defaultValue:a,onChange:o,multipleOptionSelect:s,className:c,selectBackgroundColor:l,borderColor:u,textColor:f})=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`label`,{htmlFor:e,children:[(0,n.jsx)(v,{className:Z.labelText,copy:t,variant:`bodySm`}),(0,n.jsxs)(`div`,{className:Z.selectContainer,children:[(0,n.jsx)(`select`,{id:e,defaultValue:a,className:d(Z.select,c),style:{color:f??``,background:l??`transparent`,border:u?`2px solid ${u}`:`none`,borderRadius:u?`8px`:``,padding:u?`0.5rem`:0},value:i,onChange:o,multiple:s,children:r.map(e=>(0,n.jsx)(`option`,{value:e.option,children:e.option},e.option))}),(0,n.jsx)(M,{color:f,strokeWidth:1,size:20,className:Z.icon})]})]})}),e.Text=v,e.variantMap=g});
|
|
1
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`.primary{color:#111827;cursor:pointer;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.primary:hover:not(:disabled){background:#5fafd6}.primary:active:not(:disabled){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.secondary:hover:not(:disabled){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.ghost:hover:not(:disabled){background:#ffffff0d}.ghost:active:not(:disabled){background:#ffffff14}.error{color:#111827;cursor:pointer;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.error:hover:not(:disabled){filter:brightness(.95)}.error:active:not(:disabled){filter:brightness(.9)}.success{color:#111827;cursor:pointer;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem}.success:hover:not(:disabled){filter:brightness(.95)}.success:active:not(:disabled){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled){color:#f8fafc}.transparent:disabled{color:#64748b;cursor:not-allowed}._cardContainer_ivc2t_1{border-radius:8px;flex-direction:column;justify-content:center;align-items:center;width:100%;min-width:0;max-width:100%;height:auto;transition:filter .15s,transform .15s;display:flex}._interactive_ivc2t_14:hover{filter:brightness(1.05)}._interactive_ivc2t_14:active{filter:brightness(.95)}._topContentContainer_ivc2t_22{flex-direction:column;margin-top:1rem;margin-bottom:1rem;display:flex}._cardTitle_ivc2t_29{margin:0 1rem .2rem}._miniCard_ivc2t_36 ._cardTitle_ivc2t_29{flex:1;margin:0}._ctaContainer_ivc2t_41{box-sizing:border-box;flex-direction:column;justify-content:space-between;gap:1rem;width:100%;padding:.75rem;display:flex}._miniCard_ivc2t_36 ._ctaContainer_ivc2t_41{flex-direction:row;justify-content:center;gap:.5rem;padding:.5rem}._imgContainer_ivc2t_58{box-sizing:border-box;border-radius:8px;justify-content:center;padding-bottom:1rem;padding-left:1.5rem;padding-right:1.5rem;display:flex}._badgesViewport_ivc2t_68{box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:0 .75rem;overflow:hidden}._badgesContainer_ivc2t_77{scrollbar-width:none;width:100%;min-width:0;max-width:100%;overflow:auto hidden}._badgesContainer_ivc2t_77::-webkit-scrollbar{display:none}._badges_ivc2t_68{justify-content:center;gap:.2rem;width:max-content;min-width:100%;display:flex}._badge_ivc2t_68{flex-shrink:0}._img_ivc2t_58{max-width:100%}._miniCard_ivc2t_36 ._topContentContainer_ivc2t_22{flex-direction:row;justify-content:flex-start;align-items:center;gap:1rem;margin-top:1rem;margin-bottom:1rem}._cardRating_ivc2t_115{justify-content:center;margin-top:.1rem;display:flex}:where(._headingSm_5e5d4_1){color:#f8fafc;margin:0;font-size:1.25rem;font-weight:600}:where(._headingMd_5e5d4_8){color:#f8fafc;margin:0;font-size:1.5rem;font-weight:600}:where(._headingLg_5e5d4_15){color:#f8fafc;margin:0;font-size:1.875rem;font-weight:700}:where(._headingXl_5e5d4_22){color:#f8fafc;margin:0;font-size:2rem;font-weight:700}:where(._bodySm_5e5d4_29){color:#cbd5e1;margin:0;font-size:.875rem;font-weight:400}:where(._bodyMd_5e5d4_36){color:#cbd5e1;margin:0;font-size:1rem;font-weight:400}:where(._bodyLg_5e5d4_43){color:#cbd5e1;margin:0;font-size:1.125rem;font-weight:400}:where(._caption_5e5d4_50){color:#cbd5e1;margin:0;font-size:.75rem;font-weight:500}._img_14ux7_1{max-width:100%;display:block}._circle_14ux7_6{border-radius:50%}._ratingContainer_1xmf5_1{flex-direction:row;display:flex}._text_1xmf5_6{margin:0;padding-right:.2rem}._star_1xmf5_11{color:gold;fill:gold;width:1rem;height:1rem;margin-top:.17rem}.primary{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#87ceeb;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.primary:hover:not(:disabled),.primary:hover:not([aria-disabled=true]){background:#5fafd6}.primary:active:not(:disabled),.primary:active:not([aria-disabled=true]){background:#4a9bc4}.secondary{color:#f8fafc;cursor:pointer;text-align:center;vertical-align:middle;background:#1a2230;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.secondary:hover:not(:disabled),.secondary:hover:not([aria-disabled=true]){background:#232e3d;border-color:#334155}.secondary:active:not(:disabled),.secondary:active:not([aria-disabled=true]){background:#0f172a}.ghost{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.ghost:hover:not(:disabled),.ghost:hover:not([aria-disabled=true]){background:#ffffff0d}.ghost:active:not(:disabled),.ghost:active:not([aria-disabled=true]){background:#ffffff14}.error{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#e58a8a;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.error:hover:not(:disabled),.error:hover:not([aria-disabled=true]){filter:brightness(.95)}.error:active:not(:disabled),.error:active:not([aria-disabled=true]){filter:brightness(.9)}.success{color:#111827;cursor:pointer;text-align:center;vertical-align:middle;background:#9fc9ae;border:1px solid #1f2937;border-radius:.5rem;padding:.5rem 1rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none}.success:hover:not(:disabled),.success:hover:not([aria-disabled=true]){filter:brightness(.95)}.success:active:not(:disabled),.success:active:not([aria-disabled=true]){filter:brightness(.9)}.transparent{color:#cbd5e1;cursor:pointer;text-align:center;vertical-align:middle;background:0 0;border:1px solid #0000;border-radius:.5rem;padding:.5rem .75rem;font-size:13.3px;font-weight:400;line-height:1;text-decoration:none;transition:background .15s,color .15s,border-color .15s}.transparent:hover:not(:disabled),.transparent:hover:not([aria-disabled=true]){color:#f8fafc}.transparent.active{color:#f8fafc;background:#ffffff14}.transparent:focus-visible{outline:none;box-shadow:0 0 0 3px #87ceeb59}.transparent:disabled,.transparent[aria-disabled=true]{color:#64748b;cursor:not-allowed}.link{justify-content:center;align-items:center;display:flex}._badge_dy664_1{border-radius:8px;align-items:center;max-width:5rem;max-height:1.5rem;display:flex}._text_dy664_9{margin:0;padding:0;line-height:1}._icon_dy664_15{margin:0;padding:0 .2rem 0 0;line-height:1}._navElementsContainer_ndrvq_1{z-index:1000;background-color:#0b0f17;border-bottom:2px solid #1f2937;width:100%;height:3.5rem;position:sticky;top:0}._internalElementsContainer_ndrvq_11{flex-direction:row;align-items:center;width:100%;height:3.5rem;display:flex}._hamburgerIcon_ndrvq_19{margin-left:auto;padding-right:2rem}._leftElementsContainer_ndrvq_24{flex-direction:row;align-items:center;gap:2rem;width:50%;padding-left:1.5rem;line-height:.625rem;display:flex}._leftElement_ndrvq_24{padding-left:2rem}._rightElementsContainer_ndrvq_38{flex-direction:row;justify-content:end;gap:2rem;width:50%;padding-right:2rem;line-height:.625rem;display:flex}._wrapper_1cng4_1{min-width:10rem;display:inline-block;position:relative}._dropdownButton_1cng4_7{padding:0}._dropdownButtonContainer_1cng4_11{justify-content:right;align-items:end;display:flex}._listItemContainer_1cng4_17{z-index:1000;border-radius:5px;flex-direction:column;justify-content:left;align-items:start;min-width:10rem;margin-top:.5rem;padding:0;display:flex;position:absolute;top:100%;left:0}._listItem_1cng4_17{padding-top:.5rem;padding-bottom:.5rem;list-style:none}._selectContainer_1o16c_1{width:100%;min-width:8rem;max-width:12rem;height:auto;display:inline-block;position:relative}._select_1o16c_1{appearance:none;cursor:pointer;background:#fff;width:100%;height:100%}._select_1o16c_1:focus{box-shadow:none;outline:none}._icon_1o16c_25{pointer-events:none;position:absolute;top:50%;right:.75rem;transform:translateY(-50%)}._cardRowContent_spma4_1{width:100%;max-width:calc(1200px + 3rem)}._aboveCardContentContainer_spma4_6{flex-direction:row;align-items:flex-end;width:100%;display:flex}._headingsContainer_spma4_13{flex:1;min-width:0;padding-bottom:.5rem}._desktopButtonsContainer_spma4_19{flex-shrink:0;gap:.5rem;padding-bottom:.5rem;display:flex}._cardsContainer_spma4_26{flex-direction:row;gap:1rem;width:100%;display:flex;overflow:hidden}._cardsContainer_spma4_26>div{flex:1 1 0;min-width:0}._cardRowTitle_spma4_39{margin:0;padding-bottom:0}._cardRowTitleWithSelect_spma4_44{margin:0;padding-bottom:1rem}._cardRowSubtitle_spma4_49{padding-bottom:0}._cardRowSubtitleWithSelect_spma4_53{margin-bottom:1rem}._selectDropdown_spma4_57{margin-bottom:0}._mobileCardsContainer_spma4_61{grid-template-columns:repeat(2,1fr);gap:1rem;display:grid}._mobileCard_spma4_61{width:100%;margin-bottom:1rem}._mobileButtonsContainer_spma4_72{align-items:right;width:100%;margin-left:0}._mobileStretch_spma4_78{width:100%}._cta_spma4_82{display:flex}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
2
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("react/jsx-runtime")):typeof define==`function`&&define.amd?define([`exports`,`react`,`react/jsx-runtime`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`matrix-ui`]={},e.React,e.react_jsx_runtime))})(this,function(e,t,n){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var r=Object.create,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,l=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var s=o(t),l=0,u=s.length,d;l<u;l++)d=s[l],!c.call(e,d)&&d!==n&&i(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(r=a(t,d))||r.enumerable});return e};t=((e,t,n)=>(n=e==null?{}:r(s(e)),l(t||!e||!e.__esModule?i(n,`default`,{value:e,enumerable:!0}):n,e)))(t,1);function u(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=u(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function d(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=u(e))&&(r&&(r+=` `),r+=t);return r}var f={primary:`primary`,secondary:`secondary`,ghost:`ghost`,transparent:`transparent`,success:`success`,error:`error`},p={primary:`primary`,secondary:`secondary`,ghost:`ghost`,transparent:`transparent`,success:`success`,error:`error`},m=({id:e,variant:t=`primary`,text:r,onClick:i,className:a,ariaLabel:o=`Button`,ariaPressed:s=!1})=>(0,n.jsx)(`button`,{id:e,"aria-label":o,"aria-pressed":s,onClick:i,className:d(p[t],a),role:`button`,children:r}),h={cardContainer:`_cardContainer_ivc2t_1`,interactive:`_interactive_ivc2t_14`,topContentContainer:`_topContentContainer_ivc2t_22`,cardTitle:`_cardTitle_ivc2t_29`,miniCard:`_miniCard_ivc2t_36`,ctaContainer:`_ctaContainer_ivc2t_41`,imgContainer:`_imgContainer_ivc2t_58`,badgesViewport:`_badgesViewport_ivc2t_68`,badgesContainer:`_badgesContainer_ivc2t_77`,badges:`_badges_ivc2t_68`,badge:`_badge_ivc2t_68`,img:`_img_ivc2t_58`,cardRating:`_cardRating_ivc2t_115`},g={headingXl:`h1`,headingLg:`h2`,headingMd:`h3`,headingSm:`h4`,bodyLg:`p`,bodyMd:`p`,bodySm:`p`,caption:`span`},_={headingSm:`_headingSm_5e5d4_1`,headingMd:`_headingMd_5e5d4_8`,headingLg:`_headingLg_5e5d4_15`,headingXl:`_headingXl_5e5d4_22`,bodySm:`_bodySm_5e5d4_29`,bodyMd:`_bodyMd_5e5d4_36`,bodyLg:`_bodyLg_5e5d4_43`,caption:`_caption_5e5d4_50`},v=({copy:e,variant:t,className:r})=>{let i=g[t];return(0,n.jsx)(i,{className:d(_[t],r),children:e})},y={img:`_img_14ux7_1`,circle:`_circle_14ux7_6`},b=e=>`${e?.toLowerCase().replace(/\s+/g,`-`)}-id`,x=({width:e,height:t,src:r,alt:i,className:a,isCircle:o=!1,ariaLabel:s,style:c})=>{let l=d(y.img,o&&y.circle,a);return(0,n.jsx)(`img`,{id:b(s),"aria-label":s??`Image`,"data-circle":o,className:l,src:r,alt:i,width:e,height:t,style:c})},S=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),C=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),w=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),T=e=>{let t=w(e);return t.charAt(0).toUpperCase()+t.slice(1)},E={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},D=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},O=(0,t.createContext)({}),k=()=>(0,t.useContext)(O),A=(0,t.forwardRef)(({color:e,size:n,strokeWidth:r,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:s,...c},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=k()??{},h=i??f?Number(r??d)*24/Number(n??u):r??d;return(0,t.createElement)(`svg`,{ref:l,...E,width:n??u??E.width,height:n??u??E.height,stroke:e??p,strokeWidth:h,className:S(`lucide`,m,a),...!o&&!D(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,n])=>(0,t.createElement)(e,n)),...Array.isArray(o)?o:[o]])}),j=(e,n)=>{let r=(0,t.forwardRef)(({className:r,...i},a)=>(0,t.createElement)(A,{ref:a,iconNode:n,className:S(`lucide-${C(T(e))}`,`lucide-${e}`,r),...i}));return r.displayName=T(e),r},M=j(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),N=j(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),P=j(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),F={ratingContainer:`_ratingContainer_1xmf5_1`,text:`_text_1xmf5_6`,star:`_star_1xmf5_11`},I=[{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})},{star:(0,n.jsx)(P,{className:F.star})}],L=({rating:e})=>I.filter((t,n)=>e&&n<e).map((e,n)=>t.default.cloneElement(e.star,{key:n})),R=({variant:e,text:t,to:r,className:i,ariaLabel:a,id:o})=>(0,n.jsx)(`a`,{id:o,className:d(`link`,e&&f[e],i),href:r,target:`_blank`,rel:`noopener noreferrer`,"aria-label":a??`Link`,role:`link`,children:t}),z={mobile:`(max-width: 767px)`,tablet:`(min-width: 768px) and (max-width: 1023px)`,desktop:`(min-width: 1024px)`,belowMobile:`(max-width: 460px)`},B=e=>typeof window>`u`?!1:window.matchMedia(e).matches,V=()=>{let[e,n]=(0,t.useState)({isBelowMobileMinimum:!1,isMobile:!1,isTablet:!1,isDesktop:!1});return(0,t.useEffect)(()=>{let e=Object.entries(z).map(([e,t])=>{let r=window.matchMedia(t),i=()=>{n(t=>({...t,[e===`belowMobile`?`isBelowMobileMinimum`:`is${H(e)}`]:r.matches}))};return i(),r.addEventListener(`change`,i),()=>r.removeEventListener(`change`,i)});return()=>{e.forEach(e=>e?.())}},[]),e},H=e=>e.charAt(0).toUpperCase()+e.slice(1),U={badge:`_badge_dy664_1`,text:`_text_dy664_9`,icon:`_icon_dy664_15`},W=({text:e,textColor:t,borderColor:r,backgroundColor:i,icon:a,className:o})=>(0,n.jsxs)(`div`,{className:d(o,U.badge),style:{padding:a?`0.2rem`:`0.3rem`,border:r?`1px solid ${r}`:`1px solid grey`,background:i??`none`,fontSize:12,flexDirection:`row`},children:[(0,n.jsx)(`p`,{className:U.text,style:{color:t,paddingRight:a?`0.3rem`:``,paddingLeft:a?`0.3rem`:``},children:e}),a&&(0,n.jsx)(`div`,{className:U.icon,children:a})]}),G=({id:e,isSelectable:t=!1,isSelected:r=!1,cardOnclick:i,borderColor:a=``,backgroundColor:o,miniCard:s=!1,title:c,hasRating:l,ratingValue:u,img:f,imgAriaLabel:p,isImgCircle:g=!0,imgHeight:_,imgWidth:y,primaryCta:b,secondaryCta:S,badges:C})=>{let{isBelowMobileMinimum:w}=V(),T=w||s;return(0,n.jsxs)(`div`,{id:e,role:t?`button`:void 0,tabIndex:0,"aria-pressed":t?r:void 0,"aria-label":`${c} Card`,className:d(h.cardContainer,{[h.miniCard]:s,[h.interactive]:t,[h.selected]:t&&r}),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),i?.())},style:{backgroundColor:o,border:a?`2px solid ${a}`:void 0,cursor:t?`pointer`:``},onClick:t?i:void 0,children:[(0,n.jsxs)(`div`,{"aria-label":`Card Top Content Container`,className:h.topContentContainer,children:[(0,n.jsx)(v,{className:h.cardTitle,variant:`bodyLg`,copy:c}),l&&u!=null&&(0,n.jsx)(`div`,{"aria-label":`Card Rating Container`,className:h.cardRating,children:(0,n.jsx)(L,{rating:u})})]}),!T&&(0,n.jsx)(`div`,{"aria-label":p?`${p} Container`:`Image Container`,className:h.imgContainer,children:(0,n.jsx)(x,{width:y,height:_,ariaLabel:p??`Card Image`,isCircle:g,src:f??``,alt:`${c} Card Image`,style:{border:a?`2px solid ${a}`:void 0}})}),C&&(0,n.jsx)(`div`,{className:h.badgesViewport,children:(0,n.jsx)(`div`,{className:h.badgesContainer,children:(0,n.jsx)(`div`,{className:h.badges,children:C.map((e,t)=>(0,n.jsx)(W,{className:h.badge,text:e.text,textColor:e.textColor,borderColor:e.borderColor,backgroundColor:e.backgroundColor,icon:e.icon},`${e.text}-${t}`))})})}),(0,n.jsxs)(`div`,{"aria-label":`Card CTA Container`,className:h.ctaContainer,children:[b&&(b?.isLink?(0,n.jsx)(R,{id:b.id,ariaLabel:b.ariaLinkLabel??`Primary Card Link`,to:b.to,text:b.text,variant:b.variant}):(0,n.jsx)(m,{id:b.id,ariaLabel:b?.ariaButtonLabel??`Primary Card Button`,ariaPressed:b?.ariaPressed,variant:b?.variant,text:b?.text,onClick:b?.onClick})),S&&(S.isLink?(0,n.jsx)(R,{id:S.id,ariaLabel:S.ariaLinkLabel??`Secondary Card Link`,to:S.to,text:S.text,variant:S.variant}):(0,n.jsx)(m,{id:S.id,ariaLabel:S.ariaButtonLabel??`Secondary Card Button`,ariaPressed:S.ariaPressed,variant:S.variant,text:S.text,onClick:S.onClick}))]})]})},K={navElementsContainer:`_navElementsContainer_ndrvq_1`,internalElementsContainer:`_internalElementsContainer_ndrvq_11`,hamburgerIcon:`_hamburgerIcon_ndrvq_19`,leftElementsContainer:`_leftElementsContainer_ndrvq_24`,leftElement:`_leftElement_ndrvq_24`,rightElementsContainer:`_rightElementsContainer_ndrvq_38`},q={wrapper:`_wrapper_1cng4_1`,dropdownButton:`_dropdownButton_1cng4_7`,dropdownButtonContainer:`_dropdownButtonContainer_1cng4_11`,listItemContainer:`_listItemContainer_1cng4_17`,listItem:`_listItem_1cng4_17`},J=({className:e,icon:r,options:i,listBorderColor:a,listBackgroundColor:o,isNavbarDropdown:s=!1})=>{let[c,l]=(0,t.useState)(!1);return(0,n.jsxs)(`section`,{className:d(e,q.wrapper),children:[(0,n.jsx)(`div`,{className:q.dropdownButtonContainer,children:(0,n.jsx)(m,{className:q.dropdownButton,text:r,variant:`transparent`,onClick:()=>l(!c),ariaLabel:`Dropdown Menu Button`})}),c&&(0,n.jsx)(`ul`,{"aria-label":`Unordered Dropdown List`,className:q.listItemContainer,style:{marginTop:s?`1.5rem`:`none`,border:`2px solid ${a}`,backgroundColor:o},children:i.map(e=>e.isLink?(0,n.jsx)(`li`,{"aria-label":`Dropdown List Item`,className:q.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`li`,{"aria-label":`Dropdown List Item`,className:q.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))})]})},Y=({id:e,ariaLabel:t,backgroundColor:r,borderBottomColor:i,dropdownListBackgroundColor:a,dropdownListBorderColor:o,dropdownListIcon:s=(0,n.jsx)(N,{}),leftElement:c,leftElementNeighbors:l,rightElements:u})=>{let d=[...l,...u],{isMobile:f}=V();return(0,n.jsx)(`nav`,{id:e,"aria-label":t??`Main Navbar`,style:{backgroundColor:r,borderBottom:`2px solid ${i}`},className:K.navElementsContainer,children:(0,n.jsxs)(`article`,{"aria-label":`Elements Container`,className:K.internalElementsContainer,children:[(0,n.jsx)(`div`,{className:K.leftElement,children:c}),f?(0,n.jsx)(J,{listBackgroundColor:a,listBorderColor:o,className:K.hamburgerIcon,icon:s,options:d.map(({text:e,to:t,variant:n,id:r,isLink:i,onClick:a})=>({onClick:a,isLink:i,id:r,text:e,to:t,variant:n})),isNavbarDropdown:!0}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(`article`,{"aria-label":`Left Navbar Elements Container`,className:K.leftElementsContainer,children:l?.map(e=>e.isLink?(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))}),(0,n.jsx)(`article`,{"aria-label":`Right Navbar Elements Container`,className:K.rightElementsContainer,children:u.map(e=>e.isLink?(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(R,{id:e.id,variant:e.variant,to:e.to,text:e.text})},e.id):(0,n.jsx)(`div`,{"aria-label":`Dropdown List Item`,className:K.listItem,children:(0,n.jsx)(m,{id:e.id,variant:e.variant,onClick:e.onClick,text:e.text})},e.id))})]})]})})},X={selectContainer:`_selectContainer_1o16c_1`,select:`_select_1o16c_1`,icon:`_icon_1o16c_25`},Z=({id:e,label:t,selectOptions:r,value:i,defaultValue:a,onChange:o,multipleOptionSelect:s,className:c,selectBackgroundColor:l,borderColor:u,textColor:f})=>(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)(`label`,{htmlFor:e,children:[t&&(0,n.jsx)(v,{copy:t,variant:`bodySm`}),(0,n.jsxs)(`div`,{className:X.selectContainer,children:[(0,n.jsx)(`select`,{id:e,defaultValue:a,className:d(X.select,c),style:{color:f??``,background:l??`transparent`,border:u?`2px solid ${u}`:`none`,borderRadius:u?`8px`:``,padding:u?`0.5rem`:0},value:i,onChange:o,multiple:s,children:r.map(e=>(0,n.jsx)(`option`,{value:e.option,children:e.option},e.option))}),(0,n.jsx)(M,{color:f,strokeWidth:1,size:20,className:X.icon})]})]})}),Q={cardRowContent:`_cardRowContent_spma4_1`,aboveCardContentContainer:`_aboveCardContentContainer_spma4_6`,headingsContainer:`_headingsContainer_spma4_13`,desktopButtonsContainer:`_desktopButtonsContainer_spma4_19`,cardsContainer:`_cardsContainer_spma4_26`,cardRowTitle:`_cardRowTitle_spma4_39`,cardRowTitleWithSelect:`_cardRowTitleWithSelect_spma4_44`,cardRowSubtitle:`_cardRowSubtitle_spma4_49`,cardRowSubtitleWithSelect:`_cardRowSubtitleWithSelect_spma4_53`,selectDropdown:`_selectDropdown_spma4_57`,mobileCardsContainer:`_mobileCardsContainer_spma4_61`,mobileCard:`_mobileCard_spma4_61`,mobileButtonsContainer:`_mobileButtonsContainer_spma4_72`,mobileStretch:`_mobileStretch_spma4_78`,cta:`_cta_spma4_82`};e.Badge=W,e.Button=m,e.Card=G,e.CardRow=({rowTitle:e,rowSubtitle:t,cards:r,primaryCta:i,secondaryCta:a,selectedCardIds:o,onCardSelect:s,selectDropdown:c})=>{let{isMobile:l,isTablet:u}=V(),f=l?r.slice(0,4):u?r.slice(0,3):r.slice(0,4);return(0,n.jsxs)(`section`,{children:[(0,n.jsxs)(`div`,{className:Q.cardRowContent,children:[(0,n.jsxs)(`div`,{className:Q.aboveCardContentContainer,children:[(0,n.jsxs)(`div`,{className:Q.headingsContainer,children:[e&&(0,n.jsx)(v,{copy:e,variant:`headingLg`,className:t?Q.cardRowTitle:Q.cardRowTitleWithSelect}),t&&(0,n.jsx)(`div`,{className:d(Q.cardRowSubtitle,c&&Q.cardRowSubtitleWithSelect),children:(0,n.jsx)(v,{copy:t,variant:`caption`})}),c&&(0,n.jsx)(`div`,{className:Q.selectDropdown,children:(0,n.jsx)(Z,{...c})})]}),!l&&(0,n.jsxs)(`div`,{className:Q.desktopButtonsContainer,children:[i&&i.isLink&&(0,n.jsx)(`div`,{className:Q.cta,children:(0,n.jsx)(R,{id:i.id,ariaLabel:i.ariaLinkLabel??`Primary Card Row Link`,to:i.to,text:i.text,variant:i.variant})}),i&&!i.isLink&&(0,n.jsx)(`div`,{className:Q.cta,children:(0,n.jsx)(m,{id:i.id,ariaLabel:i.ariaButtonLabel??`Primary Card Row Button`,ariaPressed:i.ariaPressed,variant:i.variant,text:i.text,onClick:i.onClick})}),a&&a.isLink&&(0,n.jsx)(`div`,{className:Q.cta,children:(0,n.jsx)(R,{id:a.id,ariaLabel:a.ariaLinkLabel??`Secondary Card Row Link`,to:a.to,text:a.text,variant:a.variant})}),a&&!a.isLink&&(0,n.jsx)(`div`,{className:Q.cta,children:(0,n.jsx)(m,{id:a.id,ariaLabel:a.ariaButtonLabel??`Secondary Card Row Button`,ariaPressed:a.ariaPressed,variant:a.variant,text:a.text,onClick:a.onClick})})]})]}),(0,n.jsx)(`div`,{style:{display:`flex`,flexDirection:l?`column`:`row`},children:(0,n.jsx)(`div`,{className:d(Q.cardsContainer,l&&Q.mobileCardsContainer),children:f.map(e=>e.id?(0,n.jsx)(`div`,{className:d(l&&Q.mobileCard),children:(0,n.jsx)(G,{id:e.id,borderColor:e.borderColor,backgroundColor:e.backgroundColor,miniCard:e.miniCard,title:e.title,hasRating:e.hasRating,ratingValue:e.ratingValue,img:e.img,imgAriaLabel:e.imgAriaLabel,isImgCircle:e.isImgCircle,imgWidth:e.imgWidth,imgHeight:e.imgHeight,badges:e.badges,isSelectable:e.isSelectable,isSelected:o?.includes(e.id),cardOnclick:()=>s?.(e.id),primaryCta:{ariaButtonLabel:e.primaryCta?.ariaButtonLabel,ariaLinkLabel:e.primaryCta?.ariaLinkLabel,ariaPressed:e.primaryCta?.ariaPressed,text:e.primaryCta?.text,onClick:e.primaryCta?.onClick,to:e.primaryCta?.to,variant:e.primaryCta?.variant,isLink:e.primaryCta?.isLink},secondaryCta:e.secondaryCta&&{ariaButtonLabel:e.secondaryCta.ariaButtonLabel,ariaLinkLabel:e.secondaryCta.ariaLinkLabel,ariaPressed:e.secondaryCta.ariaPressed,text:e.secondaryCta.text,onClick:e.secondaryCta.onClick,to:e.secondaryCta.to,variant:e.secondaryCta.variant,isLink:e.secondaryCta.isLink}})},e.id):null)})})]}),l&&(0,n.jsxs)(n.Fragment,{children:[i&&i.isLink&&(0,n.jsx)(`div`,{style:{marginBottom:a?`0.5rem`:``},className:d(Q.cta,Q.mobileButtonsContainer),children:(0,n.jsx)(R,{id:i.id,ariaLabel:i.ariaLinkLabel??`Primary Card Row Link`,to:i.to,text:i.text,variant:i.variant,className:Q.mobileStretch})}),i&&!i.isLink&&(0,n.jsx)(`div`,{style:{marginBottom:a?`0.5rem`:``},className:d(Q.cta,Q.mobileButtonsContainer),children:(0,n.jsx)(m,{id:i.id,ariaLabel:i.ariaButtonLabel??`Primary Card Row Button`,ariaPressed:i.ariaPressed,variant:i.variant,text:i.text,onClick:i.onClick,className:Q.mobileStretch})}),a&&a.isLink&&(0,n.jsx)(`div`,{className:d(Q.cta,Q.mobileButtonsContainer),children:(0,n.jsx)(R,{id:a.id,ariaLabel:a.ariaLinkLabel??`Secondary Card Row Link`,to:a.to,text:a.text,variant:a.variant,className:Q.mobileStretch})}),a&&!a.isLink&&(0,n.jsx)(`div`,{className:d(Q.cta,Q.mobileButtonsContainer),children:(0,n.jsx)(m,{id:a.id,ariaLabel:a.ariaButtonLabel??`Secondary Card Row Button`,ariaPressed:a.ariaPressed,variant:a.variant,text:a.text,onClick:a.onClick,className:Q.mobileStretch})})]})]})},e.IconDropdown=J,e.Image=x,e.Link=R,e.Navbar=Y,e.Rating=L,e.SelectDropdown=Z,e.Text=v,e.getMatch=B,e.useBreakpoint=V,e.variantMap=g});
|
|
@@ -1,6 +1,34 @@
|
|
|
1
|
+
import { ButtonVariant } from './buttonType';
|
|
1
2
|
import { CardProps } from './cardType';
|
|
3
|
+
import { LinkVariant } from './linkType';
|
|
4
|
+
import { SelectDropdownProps } from './selectDropdownType';
|
|
2
5
|
export interface CardRowType {
|
|
3
6
|
rowTitle?: string;
|
|
7
|
+
rowSubtitle?: string;
|
|
4
8
|
cards: CardProps[];
|
|
5
|
-
|
|
9
|
+
primaryCta?: {
|
|
10
|
+
id?: string;
|
|
11
|
+
ariaButtonLabel?: string;
|
|
12
|
+
ariaLinkLabel?: string;
|
|
13
|
+
ariaPressed?: boolean;
|
|
14
|
+
text?: string;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
to?: string;
|
|
17
|
+
variant?: ButtonVariant | LinkVariant;
|
|
18
|
+
isLink?: boolean;
|
|
19
|
+
};
|
|
20
|
+
secondaryCta?: {
|
|
21
|
+
id?: string;
|
|
22
|
+
ariaButtonLabel?: string;
|
|
23
|
+
ariaLinkLabel?: string;
|
|
24
|
+
ariaPressed?: boolean;
|
|
25
|
+
text?: string;
|
|
26
|
+
onClick?: () => void;
|
|
27
|
+
to?: string;
|
|
28
|
+
variant?: ButtonVariant | LinkVariant;
|
|
29
|
+
isLink?: boolean;
|
|
30
|
+
};
|
|
31
|
+
selectedCardIds?: string[];
|
|
32
|
+
onCardSelect?: (cardId: string) => void;
|
|
33
|
+
selectDropdown?: SelectDropdownProps;
|
|
6
34
|
}
|
package/dist/types/cardType.d.ts
CHANGED