@veevarts/design-system 1.12.1 → 1.12.2
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/index.cjs +6 -6
- package/dist/index.js +19 -18
- package/dist/patterns/EventDetails/EventDetails.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9098,18 +9098,19 @@ const lr = ({
|
|
|
9098
9098
|
location: s,
|
|
9099
9099
|
description: o,
|
|
9100
9100
|
showImage: l = !1,
|
|
9101
|
-
|
|
9102
|
-
|
|
9101
|
+
imageLoading: a = "eager",
|
|
9102
|
+
showMoreButtonClassName: c,
|
|
9103
|
+
labels: d
|
|
9103
9104
|
}) => {
|
|
9104
|
-
const [
|
|
9105
|
+
const [f, m] = J(!1), [h, v] = J(!1), y = Dt(null);
|
|
9105
9106
|
return We(() => {
|
|
9106
|
-
const
|
|
9107
|
-
if (
|
|
9108
|
-
const
|
|
9109
|
-
|
|
9107
|
+
const b = () => {
|
|
9108
|
+
if (y.current) {
|
|
9109
|
+
const x = y.current.scrollHeight > y.current.clientHeight;
|
|
9110
|
+
v(x);
|
|
9110
9111
|
}
|
|
9111
9112
|
};
|
|
9112
|
-
return
|
|
9113
|
+
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
9113
9114
|
}, [o]), /* @__PURE__ */ C(Ee, { className: I("border-0 shadow-none", t), "data-testid": "event-details-root", children: [
|
|
9114
9115
|
/* @__PURE__ */ C($s, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
|
|
9115
9116
|
l && n && /* @__PURE__ */ u(
|
|
@@ -9121,7 +9122,7 @@ const lr = ({
|
|
|
9121
9122
|
wl,
|
|
9122
9123
|
{
|
|
9123
9124
|
removeWrapper: !0,
|
|
9124
|
-
loading:
|
|
9125
|
+
loading: a,
|
|
9125
9126
|
alt: `Event image for ${e}`,
|
|
9126
9127
|
className: "w-full h-full object-cover object-center",
|
|
9127
9128
|
src: n,
|
|
@@ -9133,7 +9134,7 @@ const lr = ({
|
|
|
9133
9134
|
/* @__PURE__ */ u("h2", { className: "font-semibold text-xl text-gray-800", "data-testid": "event-details-title", children: e })
|
|
9134
9135
|
] }),
|
|
9135
9136
|
/* @__PURE__ */ C(Fe, { className: "py-3 space-y-3", "data-testid": "event-details-body", children: [
|
|
9136
|
-
/* @__PURE__ */ u("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children:
|
|
9137
|
+
/* @__PURE__ */ u("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: d.eventInformation }),
|
|
9137
9138
|
/* @__PURE__ */ C("div", { className: "flex flex-wrap gap-4", "data-testid": "event-details-info", children: [
|
|
9138
9139
|
r && /* @__PURE__ */ u(lr, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
|
|
9139
9140
|
i && /* @__PURE__ */ u(lr, { icon: "solar:clock-circle-linear", testId: "event-details-time", children: i }),
|
|
@@ -9144,16 +9145,16 @@ const lr = ({
|
|
|
9144
9145
|
/* @__PURE__ */ u(
|
|
9145
9146
|
"div",
|
|
9146
9147
|
{
|
|
9147
|
-
ref:
|
|
9148
|
+
ref: y,
|
|
9148
9149
|
className: I(
|
|
9149
9150
|
"text-sm text-gray-700 leading-relaxed transition-all",
|
|
9150
|
-
!
|
|
9151
|
+
!f && "line-clamp-3"
|
|
9151
9152
|
),
|
|
9152
9153
|
"data-testid": "event-details-description",
|
|
9153
9154
|
dangerouslySetInnerHTML: { __html: o }
|
|
9154
9155
|
}
|
|
9155
9156
|
),
|
|
9156
|
-
!
|
|
9157
|
+
!f && h && /* @__PURE__ */ u(
|
|
9157
9158
|
"div",
|
|
9158
9159
|
{
|
|
9159
9160
|
className: "absolute inset-x-0 -bottom-1 h-8 bg-gradient-to-t from-white via-white/70 to-transparent pointer-events-none",
|
|
@@ -9161,21 +9162,21 @@ const lr = ({
|
|
|
9161
9162
|
}
|
|
9162
9163
|
)
|
|
9163
9164
|
] }),
|
|
9164
|
-
(
|
|
9165
|
+
(h || f) && /* @__PURE__ */ u("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ u(
|
|
9165
9166
|
se,
|
|
9166
9167
|
{
|
|
9167
|
-
onPress: () =>
|
|
9168
|
+
onPress: () => m(!f),
|
|
9168
9169
|
variant: "light",
|
|
9169
|
-
className: I("text-primary",
|
|
9170
|
+
className: I("text-primary", c),
|
|
9170
9171
|
startContent: /* @__PURE__ */ u(
|
|
9171
9172
|
De,
|
|
9172
9173
|
{
|
|
9173
|
-
icon:
|
|
9174
|
+
icon: f ? "solar:eye-closed-linear" : "solar:eye-linear",
|
|
9174
9175
|
width: 20
|
|
9175
9176
|
}
|
|
9176
9177
|
),
|
|
9177
9178
|
"data-testid": "event-details-toggle-description",
|
|
9178
|
-
children:
|
|
9179
|
+
children: f ? d.showLess || "Hide" : d.showMore || "Show"
|
|
9179
9180
|
}
|
|
9180
9181
|
) })
|
|
9181
9182
|
] })
|
|
@@ -20,6 +20,8 @@ export interface EventDetailsProps {
|
|
|
20
20
|
classes?: string;
|
|
21
21
|
/** @property {boolean} [showImage] - Optional flag to show or hide the event image. Defaults to true. */
|
|
22
22
|
showImage?: boolean;
|
|
23
|
+
/** @property {'lazy' | 'eager'} [imageLoading] - Optional loading strategy for the event image. Use `'lazy'` for off-screen placements (long lists, below-the-fold). Defaults to `'eager'` since the banner is typically above-the-fold. */
|
|
24
|
+
imageLoading?: 'lazy' | 'eager';
|
|
23
25
|
/** @property {string} [showMoreButtonClassName] - Optional Tailwind CSS utility classes for the 'Show more/less' button. */
|
|
24
26
|
showMoreButtonClassName?: string;
|
|
25
27
|
/** @property {Object} labels - Labels for the event details, used for localization. */
|
|
@@ -33,5 +35,5 @@ export interface EventDetailsProps {
|
|
|
33
35
|
* @function EventDetails
|
|
34
36
|
* @description Displays a card with event information such as name, image, date, time, location, and description.
|
|
35
37
|
*/
|
|
36
|
-
export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
|
|
38
|
+
export declare const EventDetails: ({ classes, name, imageUrl, eventDate, eventTime, location, description, showImage, imageLoading, showMoreButtonClassName, labels, }: EventDetailsProps) => JSX.Element;
|
|
37
39
|
export default EventDetails;
|