@hybridcore/ui 1.5.57 → 1.5.58

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