@hybridcore/ui 1.4.28 → 1.4.30

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,122 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { AlternateCardRoot as w, AlternateCardMenuContainer as b } from "./styled.js";
3
+ import { Box as o, Skeleton as i, Typography as a } from "@mui/material";
4
+ const u = ({
5
+ title: s,
6
+ subTitle: l,
7
+ text: d,
8
+ avatar: h,
9
+ footer: p,
10
+ menu: m,
11
+ extra: x,
12
+ loading: t,
13
+ onClick: n
14
+ }) => {
15
+ const c = () => {
16
+ n && n();
17
+ };
18
+ return /* @__PURE__ */ r(w, { children: [
19
+ m && /* @__PURE__ */ e(b, { className: "menu-container", children: m }),
20
+ /* @__PURE__ */ r(o, { display: "flex", alignItems: "center", children: [
21
+ h && /* @__PURE__ */ e(o, { mr: 2, children: t ? /* @__PURE__ */ e(
22
+ i,
23
+ {
24
+ animation: "wave",
25
+ variant: "circular",
26
+ width: 42,
27
+ height: 42
28
+ }
29
+ ) : h }),
30
+ /* @__PURE__ */ r(o, { width: "100%", children: [
31
+ t ? /* @__PURE__ */ e(
32
+ i,
33
+ {
34
+ animation: "wave",
35
+ height: 10,
36
+ width: "50%",
37
+ sx: { mb: 0.25, mt: 0.35 }
38
+ }
39
+ ) : /* @__PURE__ */ e(
40
+ a,
41
+ {
42
+ gutterBottom: !0,
43
+ variant: "subtitle1",
44
+ component: "h3",
45
+ sx: {
46
+ mb: 0,
47
+ overflow: "hidden",
48
+ textOverflow: "ellipsis",
49
+ display: "-webkit-box",
50
+ WebkitLineClamp: 3,
51
+ WebkitBoxOrient: "vertical",
52
+ cursor: n ? "pointer" : "default",
53
+ lineHeight: "22px"
54
+ },
55
+ onClick: c,
56
+ children: s
57
+ }
58
+ ),
59
+ l && (t ? /* @__PURE__ */ e(
60
+ i,
61
+ {
62
+ animation: "wave",
63
+ height: 10,
64
+ width: "40%",
65
+ sx: { mb: 0.25, mt: 0.35 }
66
+ }
67
+ ) : /* @__PURE__ */ e(
68
+ a,
69
+ {
70
+ variant: "caption",
71
+ component: "p",
72
+ sx: {
73
+ color: "text.secondary",
74
+ overflow: "hidden",
75
+ textOverflow: "ellipsis",
76
+ display: "-webkit-box",
77
+ WebkitLineClamp: 4,
78
+ WebkitBoxOrient: "vertical",
79
+ lineHeight: "16px"
80
+ },
81
+ children: l
82
+ }
83
+ ))
84
+ ] })
85
+ ] }),
86
+ t ? /* @__PURE__ */ r(o, { children: [
87
+ /* @__PURE__ */ e(i, { animation: "wave", height: 10, sx: { mb: 0.5, mt: 0.5 } }),
88
+ /* @__PURE__ */ e(i, { animation: "wave", height: 10, width: "80%", sx: { mb: 0.5 } })
89
+ ] }) : /* @__PURE__ */ e(
90
+ a,
91
+ {
92
+ variant: "caption",
93
+ component: "p",
94
+ sx: {
95
+ color: "text.secondary",
96
+ overflow: "hidden",
97
+ textOverflow: "ellipsis",
98
+ display: "-webkit-box",
99
+ WebkitLineClamp: 4,
100
+ WebkitBoxOrient: "vertical",
101
+ lineHeight: "16px",
102
+ cursor: n ? "pointer" : "default"
103
+ },
104
+ onClick: c,
105
+ children: /* @__PURE__ */ e("small", { children: d })
106
+ }
107
+ ),
108
+ t ? /* @__PURE__ */ e(
109
+ i,
110
+ {
111
+ animation: "wave",
112
+ height: 10,
113
+ width: "100px",
114
+ sx: { mb: 1, mt: 1 }
115
+ }
116
+ ) : p,
117
+ t ? null : x
118
+ ] });
119
+ };
120
+ export {
121
+ u as CardAlternate
122
+ };
@@ -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
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.4.28",
4
+ "version": "1.4.30",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",