@veevarts/design-system 1.12.1 → 1.12.3
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 +28 -19
- package/dist/patterns/EventDetails/EventDetails.d.ts +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -148,7 +148,15 @@ function vh({
|
|
|
148
148
|
d
|
|
149
149
|
),
|
|
150
150
|
children: [
|
|
151
|
-
/* @__PURE__ */ u("div", { className: "flex items-center min-w-10", children: t && /* @__PURE__ */ u("a", { href: "/", className: "block", children: /* @__PURE__ */ u(
|
|
151
|
+
/* @__PURE__ */ u("div", { className: "flex items-center min-w-10", children: t && /* @__PURE__ */ u("a", { href: "/", className: "block", children: /* @__PURE__ */ u(
|
|
152
|
+
"img",
|
|
153
|
+
{
|
|
154
|
+
"data-testid": "navbar-logo",
|
|
155
|
+
src: t,
|
|
156
|
+
alt: "Logo",
|
|
157
|
+
className: "h-8 w-auto max-w-28 md:max-w-40 object-contain"
|
|
158
|
+
}
|
|
159
|
+
) }) }),
|
|
152
160
|
/* @__PURE__ */ C("div", { className: "flex items-center gap-2 md:gap-4", children: [
|
|
153
161
|
(l || e.length > 0) && /* @__PURE__ */ u(
|
|
154
162
|
ma,
|
|
@@ -9098,18 +9106,19 @@ const lr = ({
|
|
|
9098
9106
|
location: s,
|
|
9099
9107
|
description: o,
|
|
9100
9108
|
showImage: l = !1,
|
|
9101
|
-
|
|
9102
|
-
|
|
9109
|
+
imageLoading: a = "eager",
|
|
9110
|
+
showMoreButtonClassName: c,
|
|
9111
|
+
labels: d
|
|
9103
9112
|
}) => {
|
|
9104
|
-
const [
|
|
9113
|
+
const [f, m] = J(!1), [h, v] = J(!1), y = Dt(null);
|
|
9105
9114
|
return We(() => {
|
|
9106
|
-
const
|
|
9107
|
-
if (
|
|
9108
|
-
const
|
|
9109
|
-
|
|
9115
|
+
const b = () => {
|
|
9116
|
+
if (y.current) {
|
|
9117
|
+
const x = y.current.scrollHeight > y.current.clientHeight;
|
|
9118
|
+
v(x);
|
|
9110
9119
|
}
|
|
9111
9120
|
};
|
|
9112
|
-
return
|
|
9121
|
+
return b(), window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
|
|
9113
9122
|
}, [o]), /* @__PURE__ */ C(Ee, { className: I("border-0 shadow-none", t), "data-testid": "event-details-root", children: [
|
|
9114
9123
|
/* @__PURE__ */ C($s, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
|
|
9115
9124
|
l && n && /* @__PURE__ */ u(
|
|
@@ -9121,7 +9130,7 @@ const lr = ({
|
|
|
9121
9130
|
wl,
|
|
9122
9131
|
{
|
|
9123
9132
|
removeWrapper: !0,
|
|
9124
|
-
loading:
|
|
9133
|
+
loading: a,
|
|
9125
9134
|
alt: `Event image for ${e}`,
|
|
9126
9135
|
className: "w-full h-full object-cover object-center",
|
|
9127
9136
|
src: n,
|
|
@@ -9133,7 +9142,7 @@ const lr = ({
|
|
|
9133
9142
|
/* @__PURE__ */ u("h2", { className: "font-semibold text-xl text-gray-800", "data-testid": "event-details-title", children: e })
|
|
9134
9143
|
] }),
|
|
9135
9144
|
/* @__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:
|
|
9145
|
+
/* @__PURE__ */ u("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: d.eventInformation }),
|
|
9137
9146
|
/* @__PURE__ */ C("div", { className: "flex flex-wrap gap-4", "data-testid": "event-details-info", children: [
|
|
9138
9147
|
r && /* @__PURE__ */ u(lr, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
|
|
9139
9148
|
i && /* @__PURE__ */ u(lr, { icon: "solar:clock-circle-linear", testId: "event-details-time", children: i }),
|
|
@@ -9144,16 +9153,16 @@ const lr = ({
|
|
|
9144
9153
|
/* @__PURE__ */ u(
|
|
9145
9154
|
"div",
|
|
9146
9155
|
{
|
|
9147
|
-
ref:
|
|
9156
|
+
ref: y,
|
|
9148
9157
|
className: I(
|
|
9149
9158
|
"text-sm text-gray-700 leading-relaxed transition-all",
|
|
9150
|
-
!
|
|
9159
|
+
!f && "line-clamp-3"
|
|
9151
9160
|
),
|
|
9152
9161
|
"data-testid": "event-details-description",
|
|
9153
9162
|
dangerouslySetInnerHTML: { __html: o }
|
|
9154
9163
|
}
|
|
9155
9164
|
),
|
|
9156
|
-
!
|
|
9165
|
+
!f && h && /* @__PURE__ */ u(
|
|
9157
9166
|
"div",
|
|
9158
9167
|
{
|
|
9159
9168
|
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 +9170,21 @@ const lr = ({
|
|
|
9161
9170
|
}
|
|
9162
9171
|
)
|
|
9163
9172
|
] }),
|
|
9164
|
-
(
|
|
9173
|
+
(h || f) && /* @__PURE__ */ u("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ u(
|
|
9165
9174
|
se,
|
|
9166
9175
|
{
|
|
9167
|
-
onPress: () =>
|
|
9176
|
+
onPress: () => m(!f),
|
|
9168
9177
|
variant: "light",
|
|
9169
|
-
className: I("text-primary",
|
|
9178
|
+
className: I("text-primary", c),
|
|
9170
9179
|
startContent: /* @__PURE__ */ u(
|
|
9171
9180
|
De,
|
|
9172
9181
|
{
|
|
9173
|
-
icon:
|
|
9182
|
+
icon: f ? "solar:eye-closed-linear" : "solar:eye-linear",
|
|
9174
9183
|
width: 20
|
|
9175
9184
|
}
|
|
9176
9185
|
),
|
|
9177
9186
|
"data-testid": "event-details-toggle-description",
|
|
9178
|
-
children:
|
|
9187
|
+
children: f ? d.showLess || "Hide" : d.showMore || "Show"
|
|
9179
9188
|
}
|
|
9180
9189
|
) })
|
|
9181
9190
|
] })
|
|
@@ -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;
|