@hybridcore/ui 1.4.28 → 1.4.29
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.
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { AlternateCardRoot as h, AlternateCardMenuContainer as m } from "./styled.js";
|
|
3
|
+
import { Box as r, Typography as n } from "@mui/material";
|
|
4
|
+
const k = ({
|
|
5
|
+
title: p,
|
|
6
|
+
subTitle: o,
|
|
7
|
+
text: d,
|
|
8
|
+
avatar: l,
|
|
9
|
+
footer: s,
|
|
10
|
+
menu: a,
|
|
11
|
+
extra: x,
|
|
12
|
+
onClick: t
|
|
13
|
+
}) => {
|
|
14
|
+
const c = () => {
|
|
15
|
+
t && t();
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ i(h, { children: [
|
|
18
|
+
a && /* @__PURE__ */ e(m, { className: "menu-container", children: a }),
|
|
19
|
+
/* @__PURE__ */ i(r, { display: "flex", alignItems: "center", children: [
|
|
20
|
+
l && /* @__PURE__ */ e(r, { mr: 2, children: l }),
|
|
21
|
+
/* @__PURE__ */ i(r, { children: [
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
n,
|
|
24
|
+
{
|
|
25
|
+
gutterBottom: !0,
|
|
26
|
+
variant: "subtitle1",
|
|
27
|
+
component: "h3",
|
|
28
|
+
sx: {
|
|
29
|
+
mb: 0,
|
|
30
|
+
overflow: "hidden",
|
|
31
|
+
textOverflow: "ellipsis",
|
|
32
|
+
display: "-webkit-box",
|
|
33
|
+
WebkitLineClamp: 3,
|
|
34
|
+
WebkitBoxOrient: "vertical",
|
|
35
|
+
cursor: t ? "pointer" : "default",
|
|
36
|
+
lineHeight: "22px"
|
|
37
|
+
},
|
|
38
|
+
onClick: c,
|
|
39
|
+
children: p
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
o && /* @__PURE__ */ e(
|
|
43
|
+
n,
|
|
44
|
+
{
|
|
45
|
+
variant: "caption",
|
|
46
|
+
component: "p",
|
|
47
|
+
sx: {
|
|
48
|
+
color: "text.secondary",
|
|
49
|
+
overflow: "hidden",
|
|
50
|
+
textOverflow: "ellipsis",
|
|
51
|
+
display: "-webkit-box",
|
|
52
|
+
WebkitLineClamp: 4,
|
|
53
|
+
WebkitBoxOrient: "vertical",
|
|
54
|
+
lineHeight: "16px"
|
|
55
|
+
},
|
|
56
|
+
children: o
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
n,
|
|
63
|
+
{
|
|
64
|
+
variant: "caption",
|
|
65
|
+
component: "p",
|
|
66
|
+
sx: {
|
|
67
|
+
color: "text.secondary",
|
|
68
|
+
overflow: "hidden",
|
|
69
|
+
textOverflow: "ellipsis",
|
|
70
|
+
display: "-webkit-box",
|
|
71
|
+
WebkitLineClamp: 4,
|
|
72
|
+
WebkitBoxOrient: "vertical",
|
|
73
|
+
lineHeight: "16px",
|
|
74
|
+
cursor: t ? "pointer" : "default"
|
|
75
|
+
},
|
|
76
|
+
onClick: c,
|
|
77
|
+
children: /* @__PURE__ */ e("small", { children: d })
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
s,
|
|
81
|
+
x
|
|
82
|
+
] });
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
k as CardAlternate
|
|
86
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { styled as a, Card as t, Box as o } from "@mui/material";
|
|
2
|
+
const r = a(t, {
|
|
3
|
+
name: "SNAlternateCard",
|
|
4
|
+
// The component name
|
|
5
|
+
slot: "root"
|
|
6
|
+
// The slot name
|
|
7
|
+
})(({ theme: i }) => ({
|
|
8
|
+
position: "relative",
|
|
9
|
+
display: "flex",
|
|
10
|
+
flexDirection: "column",
|
|
11
|
+
padding: i.spacing(3),
|
|
12
|
+
gap: i.spacing(2),
|
|
13
|
+
"& .MuiCardMedia-root": {
|
|
14
|
+
borderRadius: i.shape.borderRadius
|
|
15
|
+
},
|
|
16
|
+
"& .MuiCardContent-root, & .MuiCardContent-root:last-child": {
|
|
17
|
+
display: "flex",
|
|
18
|
+
flex: 1,
|
|
19
|
+
gap: i.spacing(3),
|
|
20
|
+
padding: 0,
|
|
21
|
+
margin: 0
|
|
22
|
+
},
|
|
23
|
+
"&:hover .menu-container": {
|
|
24
|
+
visibility: "visible",
|
|
25
|
+
opacity: 1
|
|
26
|
+
}
|
|
27
|
+
})), e = a(o, {
|
|
28
|
+
name: "SNAlternateCard",
|
|
29
|
+
slot: "menuContainer"
|
|
30
|
+
})(() => ({
|
|
31
|
+
position: "absolute",
|
|
32
|
+
top: 8,
|
|
33
|
+
right: 8,
|
|
34
|
+
display: "flex",
|
|
35
|
+
visibility: "hidden",
|
|
36
|
+
opacity: 0,
|
|
37
|
+
transition: "0.3s all"
|
|
38
|
+
}));
|
|
39
|
+
export {
|
|
40
|
+
e as AlternateCardMenuContainer,
|
|
41
|
+
r as AlternateCardRoot
|
|
42
|
+
};
|