@caseparts-org/caseblocks 0.0.276 → 0.0.278
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/assets/CardLink.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._card_jyqee_1{position:relative;background-color:var(--color-brand-primary-white);border:2px solid var(--color-neutrals-neutral-2);box-shadow:0 2px 4px #00000026;border-radius:var(--border-radius-sm);overflow:hidden;box-sizing:border-box;display:flex;flex-direction:column;transition:all .25s ease-out;width:208px;height:208px}@media (max-width:768px){._card_jyqee_1{width:160px;height:164px}}._cardWithCta_jyqee_53{height:256px}@media (max-width:768px){._cardWithCta_jyqee_53{height:208px}}._cardLink_jyqee_61:hover ._card_jyqee_1{border:2px solid var(--color-brand-primary-primary-teal-blue);border-radius:var(--border-radius-lg);box-shadow:0 4px 8px #00000040;cursor:pointer;transition:all .05s ease-in}._cardLink_jyqee_61{position:relative;display:block;width:fit-content;text-decoration:none;color:var(--color-brand-primary-primary-black)}._cardSurfaceLink_jyqee_77{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1}._callout_jyqee_24{position:absolute;top:0;right:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:var(--color-brand-primary-primary-tangerine);z-index:2;max-width:70%;display:flex;align-items:center;justify-content:center;text-align:center;padding:var(--spacing-spacing-2xs);border-radius:0 0 0 12px}@media (max-width:768px){._callout_jyqee_24{padding:var(--spacing-spacing-3xs);border-radius:0 0 0 10px}}._calloutText_jyqee_106{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--font-size-xs);line-height:var(--font-line-height-xs)}@media (max-width:768px){._calloutText_jyqee_106{font-size:var(--font-size-xxs);line-height:var(--font-line-height-xxs)}}._cardImage_jyqee_17{width:100%;background-size:cover;background-position:center;background-repeat:no-repeat;border-bottom:1px solid var(--color-neutrals-neutral-2);height:104px}@media (max-width:768px){._cardImage_jyqee_17{height:84px}}._cardBody_jyqee_10{flex:1;display:flex;flex-direction:column;justify-content:flex-start;text-align:left;padding:var(--spacing-spacing-1xs)}@media (max-width:768px){._cardBody_jyqee_10{padding:var(--spacing-spacing-2xs)}}._cardTitle_jyqee_144{margin-bottom:var(--spacing-0-25);line-height:var(--line-height-sm);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._cardDescription_jyqee_152{text-align:left;line-height:var(--line-height-xs);display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;word-break:break-word;text-overflow:ellipsis;overflow:hidden}._cardCta_jyqee_163{position:relative;z-index:2;margin-top:auto;align-self:flex-start;width:100%}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LinkButtonProps } from '../../atoms/LinkButton/LinkButton';
|
|
1
2
|
export interface CardLinkProps {
|
|
2
3
|
href: string;
|
|
3
4
|
src: string;
|
|
@@ -6,6 +7,8 @@ export interface CardLinkProps {
|
|
|
6
7
|
title: string;
|
|
7
8
|
description: string;
|
|
8
9
|
shortDescription: string;
|
|
10
|
+
hideCallout?: boolean;
|
|
11
|
+
linkButtonProps?: Omit<LinkButtonProps, 'href'>;
|
|
9
12
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
10
13
|
}
|
|
11
|
-
export declare function CardLink({ href, src, alt, callout, title, description, shortDescription, onClick, }: CardLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function CardLink({ href, src, alt, callout, title, description, shortDescription, hideCallout, linkButtonProps, onClick, }: CardLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,38 +1,66 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Text as
|
|
3
|
-
import { Link as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { jsxs as t, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { Text as d } from "../../atoms/Text/Text.js";
|
|
3
|
+
import { Link as g } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { LinkButton as j } from "../../atoms/LinkButton/LinkButton.js";
|
|
5
|
+
import { Image as f } from "../../atoms/Image/Image.js";
|
|
6
|
+
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
7
|
+
import '../../assets/CardLink.css';const x = "_card_jyqee_1", N = "_cardWithCta_jyqee_53", q = "_cardLink_jyqee_61", L = "_cardSurfaceLink_jyqee_77", T = "_callout_jyqee_24", k = "_calloutText_jyqee_106", C = "_cardImage_jyqee_17", p = "_cardBody_jyqee_10", v = "_cardTitle_jyqee_144", w = "_cardDescription_jyqee_152", z = "_cardCta_jyqee_163", a = {
|
|
8
|
+
card: x,
|
|
9
|
+
cardWithCta: N,
|
|
10
|
+
cardLink: q,
|
|
11
|
+
cardSurfaceLink: L,
|
|
8
12
|
callout: T,
|
|
9
|
-
calloutText:
|
|
10
|
-
cardImage:
|
|
13
|
+
calloutText: k,
|
|
14
|
+
cardImage: C,
|
|
11
15
|
cardBody: p,
|
|
12
|
-
cardTitle:
|
|
13
|
-
cardDescription:
|
|
16
|
+
cardTitle: v,
|
|
17
|
+
cardDescription: w,
|
|
18
|
+
cardCta: z
|
|
14
19
|
};
|
|
15
|
-
function
|
|
16
|
-
href:
|
|
17
|
-
src:
|
|
18
|
-
alt:
|
|
19
|
-
callout:
|
|
20
|
-
title:
|
|
21
|
-
description:
|
|
20
|
+
function b({
|
|
21
|
+
href: i,
|
|
22
|
+
src: o,
|
|
23
|
+
alt: n = "",
|
|
24
|
+
callout: m = "Customize",
|
|
25
|
+
title: s,
|
|
26
|
+
description: _,
|
|
22
27
|
shortDescription: e,
|
|
23
|
-
|
|
28
|
+
hideCallout: u = !1,
|
|
29
|
+
linkButtonProps: r,
|
|
30
|
+
onClick: h
|
|
24
31
|
}) {
|
|
25
|
-
const
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
const y = e && e.length > 70 ? e.slice(0, 70) + "..." : e;
|
|
33
|
+
return /* @__PURE__ */ t("div", { className: a.cardLink, children: [
|
|
34
|
+
/* @__PURE__ */ c(
|
|
35
|
+
g,
|
|
36
|
+
{
|
|
37
|
+
href: i,
|
|
38
|
+
unstyled: !0,
|
|
39
|
+
className: a.cardSurfaceLink,
|
|
40
|
+
"aria-label": s,
|
|
41
|
+
onClick: h,
|
|
42
|
+
children: /* @__PURE__ */ c("span", {})
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ t("div", { className: l(a.card, r && a.cardWithCta), children: [
|
|
46
|
+
/* @__PURE__ */ c(f, { src: o, alt: n, width: 208, height: 104, className: a.cardImage }),
|
|
47
|
+
!u && /* @__PURE__ */ c("div", { className: a.callout, children: /* @__PURE__ */ c(d, { size: "xs", weight: "regular", colorToken: "default-inverted", className: a.calloutText, children: m }) }),
|
|
48
|
+
/* @__PURE__ */ t("div", { className: a.cardBody, children: [
|
|
49
|
+
/* @__PURE__ */ c(d, { size: "sm", weight: "regular", colorToken: "secondary", className: a.cardTitle, children: s }),
|
|
50
|
+
/* @__PURE__ */ c(d, { size: "xs", weight: "regular", className: a.cardDescription, hideAt: ["sm"], children: _ }),
|
|
51
|
+
/* @__PURE__ */ c(d, { size: "xs", weight: "regular", className: a.cardDescription, hideAt: ["md", "lg"], children: y }),
|
|
52
|
+
r && /* @__PURE__ */ c(
|
|
53
|
+
j,
|
|
54
|
+
{
|
|
55
|
+
href: i,
|
|
56
|
+
...r,
|
|
57
|
+
className: l(a.cardCta, r.className)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] })
|
|
33
61
|
] })
|
|
34
|
-
] })
|
|
62
|
+
] });
|
|
35
63
|
}
|
|
36
64
|
export {
|
|
37
|
-
|
|
65
|
+
b as CardLink
|
|
38
66
|
};
|