@hybridcore/ui 1.6.0 → 1.6.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.
Files changed (128) hide show
  1. package/dist/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
  2. package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
  3. package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
  4. package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
  5. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
  6. package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
  7. package/dist/FormControlLabel-BkRfrhNy.js +601 -0
  8. package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
  9. package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
  10. package/dist/InputLabel-rEwwnD4_.js +354 -0
  11. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
  12. package/dist/Modal-DlB6GH-f.js +1659 -0
  13. package/dist/Paper-q9kKjAKx.js +527 -0
  14. package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
  15. package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
  16. package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.js} +1 -1
  17. package/dist/components/access/index.js +8 -15
  18. package/dist/components/access/logic.js +25 -0
  19. package/dist/components/card/index.js +158 -498
  20. package/dist/components/card/logic.js +24 -0
  21. package/dist/components/card/styled.js +226 -51
  22. package/dist/components/card-alternate/index.js +111 -139
  23. package/dist/components/card-alternate/logic.js +17 -0
  24. package/dist/components/card-alternate/styled.js +113 -19
  25. package/dist/components/collapsible-card/index.js +1 -1
  26. package/dist/components/collapsible-card/styled.js +1 -1
  27. package/dist/components/confirm/dialog.js +3 -3
  28. package/dist/components/confirm/index.js +1 -1
  29. package/dist/components/container/index.js +28 -269
  30. package/dist/components/container/logic.js +12 -0
  31. package/dist/components/container/styled.js +29 -0
  32. package/dist/components/context-menu/index.js +25 -457
  33. package/dist/components/context-menu/logic.js +14 -0
  34. package/dist/components/context-menu/styled.js +40 -0
  35. package/dist/components/data-security-selectors/security-level/index.js +36 -91
  36. package/dist/components/data-security-selectors/security-level/logic.js +73 -0
  37. package/dist/components/data-security-selectors/security-level/styled.js +47 -0
  38. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  39. package/dist/components/geometry-picker/index.js +13 -12
  40. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  41. package/dist/components/instance-form/components/variable/index.js +7 -9
  42. package/dist/components/instance-form/components/variables/index.js +1 -1
  43. package/dist/components/instance-form/index.js +1 -1
  44. package/dist/components/instance-hierarchy-table/index.js +32 -37
  45. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  46. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  47. package/dist/components/instance-table/index.js +30 -135
  48. package/dist/components/instance-table/logic.js +122 -0
  49. package/dist/components/instance-table/styled.js +53 -11
  50. package/dist/components/key-protection/index.js +45 -2
  51. package/dist/components/key-protection/logic.js +40 -0
  52. package/dist/components/key-protection/styled.js +45 -0
  53. package/dist/components/key-protection/utils.js +1 -1
  54. package/dist/components/loading/index.js +15 -9
  55. package/dist/components/loading/logic.js +15 -0
  56. package/dist/components/loading/styled.js +26 -19
  57. package/dist/components/phone-input/index.js +18 -22
  58. package/dist/components/phone-input/logic.js +14 -0
  59. package/dist/components/phone-input/styled.js +12 -4
  60. package/dist/components/property-mapping/index.js +1 -1
  61. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  62. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  63. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  64. package/dist/components/range-selector/components/number-range/index.js +48 -53
  65. package/dist/components/range-selector/components/string-range/index.js +15 -17
  66. package/dist/components/range-selector/index.js +63 -57
  67. package/dist/components/range-selector/logic.js +12 -0
  68. package/dist/components/range-selector/styled.js +4222 -0
  69. package/dist/components/template-filters/components/filter/index.js +13 -18
  70. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  71. package/dist/components/template-filters/index.js +21 -29
  72. package/dist/components/template-filters/logic.js +18 -0
  73. package/dist/components/template-filters/styled.js +44 -1
  74. package/dist/components/template-form/components/property-list/index.js +8 -8
  75. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  76. package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
  77. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  78. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  79. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +8 -9
  80. package/dist/components/template-form/index.js +32 -33
  81. package/dist/components/template-property-filters/index.js +45 -95
  82. package/dist/components/template-property-filters/logic.js +27 -0
  83. package/dist/components/template-property-filters/property.js +105 -165
  84. package/dist/components/template-property-filters/styled.js +121 -20
  85. package/dist/components/tree-select/index.js +52 -67
  86. package/dist/components/tree-select/logic.js +59 -0
  87. package/dist/components/tree-select/styled.js +45 -62
  88. package/dist/components/treeview-filter/index.js +43 -65
  89. package/dist/components/treeview-filter/item/index.js +43 -42
  90. package/dist/components/treeview-filter/item-label/index.js +17 -37
  91. package/dist/components/treeview-filter/logic.js +28 -0
  92. package/dist/components/treeview-filter/styled.js +86 -0
  93. package/dist/components/uploader/index.js +532 -567
  94. package/dist/components/uploader/logic.js +74 -0
  95. package/dist/components/uploader/styled.js +93 -46
  96. package/dist/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
  97. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
  98. package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
  99. package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
  100. package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
  101. package/dist/isMuiElement-BkJ72LB3.js +26 -0
  102. package/dist/main.d.ts +734 -298
  103. package/dist/main.js +15 -15
  104. package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
  105. package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
  106. package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
  107. package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
  108. package/package.json +1 -1
  109. package/dist/Box-p6OtTUEo.js +0 -30
  110. package/dist/Button-CvE2gnly.js +0 -370
  111. package/dist/CardContent-CSHh-ZlM.js +0 -74
  112. package/dist/Checkbox-CWRMFTBp.js +0 -421
  113. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  114. package/dist/List-tqElle9C.js +0 -121
  115. package/dist/ListItem-CfjsIg4B.js +0 -430
  116. package/dist/Modal-DhPpOoGB.js +0 -1299
  117. package/dist/Paper-2B03OBmZ.js +0 -169
  118. package/dist/TextField-1yCesIbH.js +0 -457
  119. package/dist/components/key-protection/menu.js +0 -85
  120. package/dist/components/treeview-filter/item/styled.js +0 -39
  121. package/dist/debounce-46wSf_lW.js +0 -15
  122. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  123. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  124. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  125. package/dist/styled-eZwjUruw.js +0 -12
  126. package/dist/useFormControl-CatNKXAi.js +0 -10
  127. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  128. package/dist/utils-BDNynJcd.js +0 -365
@@ -0,0 +1,24 @@
1
+ import { useThemeProps as c } from "@mui/material";
2
+ const p = (s) => {
3
+ const t = c({ props: s, name: "HCCard" }), { orientation: e = "portrait", loading: n = !1, onClick: o } = t, r = !!o, a = {
4
+ ...t,
5
+ orientation: e,
6
+ loading: n,
7
+ clickable: r
8
+ };
9
+ return {
10
+ refs: {},
11
+ state: {
12
+ ownerState: a,
13
+ orientation: e,
14
+ loading: n,
15
+ clickable: r
16
+ },
17
+ actions: { handleClick: () => {
18
+ o && o();
19
+ } }
20
+ };
21
+ };
22
+ export {
23
+ p as useCardLogic
24
+ };
@@ -1,77 +1,252 @@
1
- import { Card as t, Box as o } from "@mui/material";
2
- import { s as i } from "../../styled-eZwjUruw.js";
3
- const s = i(t, {
4
- name: "SNCard",
5
- // The component name
6
- slot: "root"
7
- // The slot name
8
- })(() => ({
1
+ import { styled as a, Card as r, Skeleton as n, CardContent as l, Box as o, Typography as i, Avatar as d, CardActions as c } from "@mui/material";
2
+ const e = (t) => t !== "ownerState", p = a(r, {
3
+ name: "HCCard",
4
+ slot: "root",
5
+ shouldForwardProp: e
6
+ })({
9
7
  position: "relative",
10
8
  "&:hover .extra-actions": {
11
9
  visibility: "visible",
12
10
  opacity: 1
13
11
  }
14
- })), d = i(o, {
15
- name: "SNCard",
16
- slot: "extraActions"
17
- })(({ theme: a }) => ({
18
- position: "absolute",
19
- top: 0,
20
- right: 0,
12
+ }), g = a(r, {
13
+ name: "HCCard",
14
+ slot: "landscapeRoot",
15
+ shouldForwardProp: e
16
+ })(({ theme: t }) => ({
21
17
  display: "flex",
22
- gap: a.spacing(1),
23
- padding: a.spacing(1.5),
24
- visibility: "hidden",
25
- opacity: 0,
26
- transition: "0.3s all"
27
- })), p = i(t, {
28
- name: "SNCard",
29
- // The component name
30
- slot: "root"
31
- // The slot name
32
- })(({ theme: a }) => ({
33
- display: "flex",
34
- padding: a.spacing(1.5),
35
- gap: a.spacing(3),
18
+ padding: t.spacing(1.5),
19
+ gap: t.spacing(3),
36
20
  "& .MuiCardMedia-root": {
37
- borderRadius: a.shape.borderRadius
21
+ borderRadius: t.shape.borderRadius
38
22
  },
39
23
  "& .MuiCardContent-root, & .MuiCardContent-root:last-child": {
40
24
  display: "flex",
41
25
  flex: 1,
42
- gap: a.spacing(3),
26
+ gap: t.spacing(3),
43
27
  padding: 0,
44
28
  margin: 0
45
29
  }
46
- })), l = i(o, {
47
- name: "SNCard",
48
- // The component name
30
+ })), m = a("img", {
31
+ name: "HCCard",
32
+ slot: "media",
33
+ shouldForwardProp: e
34
+ })(({ ownerState: t }) => ({
35
+ display: "block",
36
+ objectFit: "cover",
37
+ cursor: t.clickable ? "pointer" : "default",
38
+ ...t.orientation === "landscape" ? { width: 330, height: 200 } : { width: "100%", height: 172 }
39
+ })), x = a(n, {
40
+ name: "HCCard",
41
+ slot: "mediaSkeleton",
42
+ shouldForwardProp: e
43
+ })(
44
+ ({ ownerState: t }) => t.orientation === "landscape" ? { width: 330, height: 200 } : { height: 172 }
45
+ ), f = a(l, {
46
+ name: "HCCard",
47
+ slot: "content"
48
+ })({}), b = a(l, {
49
+ name: "HCCard",
50
+ slot: "landscapeContent"
51
+ })({
52
+ position: "relative"
53
+ }), H = a(o, {
54
+ name: "HCCard",
55
+ slot: "menuContainer"
56
+ })({
57
+ position: "absolute",
58
+ top: -8,
59
+ right: -8
60
+ }), u = a(o, {
61
+ name: "HCCard",
62
+ slot: "contentBody"
63
+ })({
64
+ flex: 1
65
+ }), h = a(o, {
66
+ name: "HCCard",
67
+ slot: "contentColumn"
68
+ })({
69
+ display: "flex",
70
+ flexDirection: "column",
71
+ justifyContent: "space-between",
72
+ height: "100%"
73
+ }), v = a(i, {
74
+ name: "HCCard",
75
+ slot: "title",
76
+ shouldForwardProp: e
77
+ })(({ ownerState: t }) => ({
78
+ cursor: t.clickable ? "pointer" : "default",
79
+ ...t.orientation === "landscape" && {
80
+ overflow: "hidden",
81
+ textOverflow: "ellipsis",
82
+ display: "-webkit-box",
83
+ WebkitLineClamp: 3,
84
+ WebkitBoxOrient: "vertical"
85
+ }
86
+ })), y = a(i, {
87
+ name: "HCCard",
88
+ slot: "text",
89
+ shouldForwardProp: e
90
+ })(({ theme: t, ownerState: s }) => ({
91
+ color: t.palette.text.secondary,
92
+ overflow: "hidden",
93
+ textOverflow: "ellipsis",
94
+ display: "-webkit-box",
95
+ WebkitBoxOrient: "vertical",
96
+ lineHeight: "16px",
97
+ cursor: s.clickable ? "pointer" : "default",
98
+ WebkitLineClamp: s.orientation === "landscape" ? 4 : 2
99
+ })), k = a(o, {
100
+ name: "HCCard",
101
+ slot: "stats"
102
+ })({}), A = a(o, {
103
+ name: "HCCard",
49
104
  slot: "infoBox"
50
- // The slot name
51
- })(({ theme: a }) => ({
105
+ })(({ theme: t }) => ({
52
106
  display: "flex",
53
107
  flexDirection: "column",
54
108
  width: 260,
55
- paddingLeft: a.spacing(2),
56
- paddingRight: a.spacing(2),
57
- gap: a.spacing(0.5),
109
+ paddingLeft: t.spacing(2),
110
+ paddingRight: t.spacing(2),
111
+ gap: t.spacing(0.5),
58
112
  alignItems: "center",
59
113
  borderLeft: "1px solid",
60
- borderColor: a.palette.divider,
114
+ borderColor: t.palette.divider,
61
115
  boxSizing: "border-box"
62
- })), c = i(o, {
63
- name: "SNCard",
116
+ })), L = a(d, {
117
+ name: "HCCard",
118
+ slot: "avatar"
119
+ })({
120
+ width: 29,
121
+ height: 29
122
+ }), w = a(d, {
123
+ name: "HCCard",
124
+ slot: "avatarLarge"
125
+ })({
126
+ width: 42,
127
+ height: 42
128
+ }), S = a(i, {
129
+ name: "HCCard",
130
+ slot: "avatarTitle"
131
+ })({
132
+ fontWeight: "normal",
133
+ lineHeight: "14px",
134
+ fontSize: "13px"
135
+ }), B = a(i, {
136
+ name: "HCCard",
137
+ slot: "avatarSubTitle"
138
+ })(({ theme: t }) => ({
139
+ color: t.palette.text.secondary,
140
+ lineHeight: "12px"
141
+ })), R = a(o, {
142
+ name: "HCCard",
64
143
  slot: "extraActions"
65
- })(({ theme: a }) => ({
144
+ })(({ theme: t }) => ({
145
+ position: "absolute",
146
+ top: 0,
147
+ right: 0,
148
+ display: "flex",
149
+ gap: t.spacing(1),
150
+ padding: t.spacing(1.5),
151
+ visibility: "hidden",
152
+ opacity: 0,
153
+ transition: "0.3s all"
154
+ })), T = a(o, {
155
+ name: "HCCard",
156
+ slot: "extraActions"
157
+ })(({ theme: t }) => ({
158
+ display: "flex",
159
+ gap: t.spacing(1),
160
+ marginTop: t.spacing(1),
161
+ marginBottom: t.spacing(1)
162
+ })), I = a(i, {
163
+ name: "HCCard",
164
+ slot: "extraInfo"
165
+ })(({ theme: t }) => ({
166
+ color: t.palette.text.secondary,
167
+ lineHeight: "12px"
168
+ })), M = a(c, {
169
+ name: "HCCard",
170
+ slot: "cardActions"
171
+ })(({ theme: t }) => ({
172
+ display: "flex",
173
+ justifyContent: "space-between",
174
+ padding: t.spacing(2)
175
+ })), E = a(o, {
176
+ name: "HCCard",
177
+ slot: "avatarRow"
178
+ })({
179
+ display: "flex",
180
+ justifyItems: "center",
181
+ flex: 1
182
+ }), W = a(o, {
183
+ name: "HCCard",
184
+ slot: "avatarLabel"
185
+ })(({ theme: t }) => ({
186
+ display: "flex",
187
+ flexDirection: "column",
188
+ marginLeft: t.spacing(1),
189
+ flex: 1
190
+ })), j = a(o, {
191
+ name: "HCCard",
192
+ slot: "actionsContainer"
193
+ })(({ theme: t }) => ({
66
194
  display: "flex",
67
- gap: a.spacing(1),
68
- marginTop: a.spacing(1),
69
- marginBottom: a.spacing(1)
195
+ marginTop: t.spacing(1),
196
+ width: "100%"
197
+ })), O = a(n, {
198
+ name: "HCCard",
199
+ slot: "skeletonLine"
200
+ })({
201
+ marginBottom: 16,
202
+ marginTop: 10
203
+ }), D = a(n, {
204
+ name: "HCCard",
205
+ slot: "skeletonLineSubtle"
206
+ })({
207
+ marginBottom: 6
208
+ }), P = a(n, {
209
+ name: "HCCard",
210
+ slot: "skeletonAvatarCircle"
211
+ })(({ theme: t }) => ({
212
+ marginBottom: t.spacing(0.6)
213
+ })), z = a(n, {
214
+ name: "HCCard",
215
+ slot: "skeletonExtraIcon"
216
+ })({}), F = a(n, {
217
+ name: "HCCard",
218
+ slot: "skeletonActions"
219
+ })(({ theme: t }) => ({
220
+ borderRadius: t.shape.borderRadius
70
221
  }));
71
222
  export {
72
- c as LandscapeCardExtraActions,
73
- p as LandscapeCardRoot,
74
- l as LandscapeInfoBox,
75
- d as PortraitCardExtraActions,
76
- s as PortraitCardRoot
223
+ j as ActionsContainer,
224
+ W as AvatarLabel,
225
+ E as AvatarRow,
226
+ B as AvatarSubTitle,
227
+ S as AvatarTitle,
228
+ M as CardActions,
229
+ L as CardAvatar,
230
+ w as CardAvatarLarge,
231
+ f as CardContent,
232
+ m as CardMedia,
233
+ u as ContentBody,
234
+ h as ContentColumn,
235
+ I as ExtraInfo,
236
+ T as LandscapeCardExtraActions,
237
+ g as LandscapeCardRoot,
238
+ b as LandscapeContent,
239
+ A as LandscapeInfoBox,
240
+ x as MediaSkeleton,
241
+ H as MenuContainer,
242
+ R as PortraitCardExtraActions,
243
+ p as PortraitCardRoot,
244
+ F as SkeletonActions,
245
+ P as SkeletonAvatarCircle,
246
+ z as SkeletonExtraIcon,
247
+ O as SkeletonLine,
248
+ D as SkeletonLineSubtle,
249
+ k as Stats,
250
+ y as Text,
251
+ v as Title
77
252
  };
@@ -1,149 +1,121 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { Box as r, Skeleton as t, Typography as l } from "@mui/material";
3
- import { AlternateCardRoot as b, AlternateCardMenuContainer as v } from "./styled.js";
4
- const y = ({
5
- title: p,
6
- subTitle: d,
7
- text: o,
8
- avatar: h,
9
- footer: c,
10
- menu: s,
11
- extra: w,
12
- loading: i,
13
- rightMenu: x,
14
- onClick: a
15
- }) => {
16
- const m = () => {
17
- a && a();
18
- };
19
- return /* @__PURE__ */ n(
20
- b,
21
- {
22
- sx: {
23
- display: "flex"
24
- },
25
- children: [
26
- /* @__PURE__ */ n(r, { flex: 1, children: [
27
- s && /* @__PURE__ */ e(v, { className: "menu-container", children: s }),
28
- /* @__PURE__ */ n(r, { display: "flex", alignItems: "center", children: [
29
- h && /* @__PURE__ */ e(r, { mr: 2, children: i ? /* @__PURE__ */ e(
30
- t,
31
- {
32
- animation: "wave",
33
- variant: "circular",
34
- width: 42,
35
- height: 42
36
- }
37
- ) : h }),
38
- /* @__PURE__ */ n(r, { width: "100%", sx: { minWidth: 0 }, children: [
39
- i ? /* @__PURE__ */ e(
40
- t,
41
- {
42
- animation: "wave",
43
- height: 10,
44
- width: "50%",
45
- sx: { mb: 0.25, mt: 0.35 }
46
- }
47
- ) : /* @__PURE__ */ e(
48
- l,
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: a ? "pointer" : "default",
61
- lineHeight: "22px",
62
- overflowWrap: "break-word",
63
- wordBreak: "break-word"
64
- },
65
- onClick: m,
66
- children: p
67
- }
68
- ),
69
- d && (i ? /* @__PURE__ */ e(
70
- t,
71
- {
72
- animation: "wave",
73
- height: 10,
74
- width: "40%",
75
- sx: { mb: 0.25, mt: 0.35 }
76
- }
77
- ) : /* @__PURE__ */ e(
78
- l,
79
- {
80
- variant: "caption",
81
- component: "p",
82
- sx: {
83
- color: "text.secondary",
84
- overflow: "hidden",
85
- textOverflow: "ellipsis",
86
- display: "-webkit-box",
87
- WebkitLineClamp: 4,
88
- WebkitBoxOrient: "vertical",
89
- lineHeight: "16px",
90
- overflowWrap: "break-word",
91
- wordBreak: "break-word"
92
- },
93
- children: d
94
- }
95
- ))
96
- ] })
97
- ] }),
98
- i ? /* @__PURE__ */ n(r, { children: [
99
- /* @__PURE__ */ e(t, { animation: "wave", height: 10, sx: { mb: 0.5, mt: 0.5 } }),
100
- /* @__PURE__ */ e(
101
- t,
102
- {
103
- animation: "wave",
104
- height: 10,
105
- width: "80%",
106
- sx: { mb: 0.5 }
107
- }
108
- )
109
- ] }) : /* @__PURE__ */ e(
110
- l,
1
+ import { jsxs as n, jsx as e, Fragment as x } from "react/jsx-runtime";
2
+ import { useCardAlternateLogic as T } from "./logic.js";
3
+ import { AlternateCardRoot as p, AlternateCardBody as k, AlternateCardMenuContainer as f, AlternateCardHeaderRow as b, AlternateCardAvatarContainer as M, AlternateCardAvatarSkeleton as R, AlternateCardTitleColumn as S, AlternateCardLineSkeleton as r, AlternateCardTitle as E, AlternateCardSubTitle as I, AlternateCardText as L, AlternateCardRightMenu as j } from "./styled.js";
4
+ const s = 350, F = (l) => {
5
+ const { state: C, actions: o } = T(l), { ownerState: t } = C, {
6
+ title: m,
7
+ subTitle: d,
8
+ text: i,
9
+ avatar: h,
10
+ footer: u,
11
+ menu: c,
12
+ extra: A,
13
+ loading: a,
14
+ rightMenu: g,
15
+ sx: v
16
+ } = l, w = typeof i == "string" ? i.length > s ? `${i.substring(0, s)}...` : i : null;
17
+ return /* @__PURE__ */ n(p, { ownerState: t, sx: v, children: [
18
+ /* @__PURE__ */ n(k, { ownerState: t, children: [
19
+ c && /* @__PURE__ */ e(
20
+ f,
21
+ {
22
+ ownerState: t,
23
+ className: "menu-container",
24
+ children: c
25
+ }
26
+ ),
27
+ /* @__PURE__ */ n(b, { ownerState: t, children: [
28
+ h && /* @__PURE__ */ e(M, { ownerState: t, children: a ? /* @__PURE__ */ e(
29
+ R,
30
+ {
31
+ ownerState: t,
32
+ animation: "wave",
33
+ variant: "circular",
34
+ width: 42,
35
+ height: 42
36
+ }
37
+ ) : h }),
38
+ /* @__PURE__ */ n(S, { ownerState: t, children: [
39
+ a ? /* @__PURE__ */ e(
40
+ r,
111
41
  {
112
- variant: "caption",
113
- component: "p",
114
- sx: {
115
- color: "text.secondary",
116
- overflow: "hidden",
117
- textOverflow: "ellipsis",
118
- display: "-webkit-box",
119
- WebkitLineClamp: 4,
120
- WebkitBoxOrient: "vertical",
121
- lineHeight: "16px",
122
- cursor: a ? "pointer" : "default",
123
- my: 2,
124
- overflowWrap: "break-word",
125
- wordBreak: "break-word"
126
- },
127
- onClick: m,
128
- children: /* @__PURE__ */ e("small", { children: typeof o == "string" ? o.length > 350 ? `${o.substring(0, 350)}...` : o : null })
42
+ ownerState: t,
43
+ animation: "wave",
44
+ height: 10,
45
+ width: "50%"
46
+ }
47
+ ) : /* @__PURE__ */ e(
48
+ E,
49
+ {
50
+ ownerState: t,
51
+ gutterBottom: !0,
52
+ variant: "subtitle1",
53
+ as: "h3",
54
+ onClick: o.handleClick,
55
+ children: m
129
56
  }
130
57
  ),
131
- i ? /* @__PURE__ */ e(
132
- t,
58
+ d && (a ? /* @__PURE__ */ e(
59
+ r,
133
60
  {
61
+ ownerState: t,
134
62
  animation: "wave",
135
63
  height: 10,
136
- width: "100px",
137
- sx: { mb: 1, mt: 1 }
64
+ width: "40%"
65
+ }
66
+ ) : /* @__PURE__ */ e(
67
+ I,
68
+ {
69
+ ownerState: t,
70
+ variant: "caption",
71
+ as: "p",
72
+ children: d
138
73
  }
139
- ) : c,
140
- i ? null : w
141
- ] }),
142
- /* @__PURE__ */ e(r, { children: x })
143
- ]
144
- }
145
- );
74
+ ))
75
+ ] })
76
+ ] }),
77
+ a ? /* @__PURE__ */ n(x, { children: [
78
+ /* @__PURE__ */ e(
79
+ r,
80
+ {
81
+ ownerState: t,
82
+ animation: "wave",
83
+ height: 10
84
+ }
85
+ ),
86
+ /* @__PURE__ */ e(
87
+ r,
88
+ {
89
+ ownerState: t,
90
+ animation: "wave",
91
+ height: 10,
92
+ width: "80%"
93
+ }
94
+ )
95
+ ] }) : /* @__PURE__ */ e(
96
+ L,
97
+ {
98
+ ownerState: t,
99
+ variant: "caption",
100
+ as: "p",
101
+ onClick: o.handleClick,
102
+ children: /* @__PURE__ */ e("small", { children: w })
103
+ }
104
+ ),
105
+ a ? /* @__PURE__ */ e(
106
+ r,
107
+ {
108
+ ownerState: t,
109
+ animation: "wave",
110
+ height: 10,
111
+ width: "100px"
112
+ }
113
+ ) : u,
114
+ a ? null : A
115
+ ] }),
116
+ /* @__PURE__ */ e(j, { ownerState: t, children: g })
117
+ ] });
146
118
  };
147
119
  export {
148
- y as CardAlternate
120
+ F as CardAlternate
149
121
  };
@@ -0,0 +1,17 @@
1
+ import { useThemeProps as s } from "@mui/material";
2
+ const a = (o) => {
3
+ const t = s({ props: o, name: "HCCardAlternate" }), { onClick: e } = t, r = () => {
4
+ e && e();
5
+ }, n = {
6
+ ...t,
7
+ clickable: !!e
8
+ };
9
+ return {
10
+ refs: {},
11
+ state: { ownerState: n },
12
+ actions: { handleClick: r }
13
+ };
14
+ };
15
+ export {
16
+ a as useCardAlternateLogic
17
+ };