@veevarts/design-system 1.12.0 → 1.12.1-beta.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.
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
- showMoreButtonClassName: a,
9102
- labels: c
9101
+ imageLoading: a = "eager",
9102
+ showMoreButtonClassName: c,
9103
+ labels: d
9103
9104
  }) => {
9104
- const [d, f] = J(!1), [m, h] = J(!1), v = Dt(null);
9105
+ const [f, m] = J(!1), [h, v] = J(!1), y = Dt(null);
9105
9106
  return We(() => {
9106
- const y = () => {
9107
- if (v.current) {
9108
- const b = v.current.scrollHeight > v.current.clientHeight;
9109
- h(b);
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 y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
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(
@@ -9120,8 +9121,10 @@ const lr = ({
9120
9121
  children: /* @__PURE__ */ u(
9121
9122
  wl,
9122
9123
  {
9124
+ removeWrapper: !0,
9125
+ loading: a,
9123
9126
  alt: `Event image for ${e}`,
9124
- className: "w-full h-full object-cover",
9127
+ className: "w-full h-full object-cover object-center",
9125
9128
  src: n,
9126
9129
  "data-testid": "event-details-image"
9127
9130
  }
@@ -9131,7 +9134,7 @@ const lr = ({
9131
9134
  /* @__PURE__ */ u("h2", { className: "font-semibold text-xl text-gray-800", "data-testid": "event-details-title", children: e })
9132
9135
  ] }),
9133
9136
  /* @__PURE__ */ C(Fe, { className: "py-3 space-y-3", "data-testid": "event-details-body", children: [
9134
- /* @__PURE__ */ u("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: c.eventInformation }),
9137
+ /* @__PURE__ */ u("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: d.eventInformation }),
9135
9138
  /* @__PURE__ */ C("div", { className: "flex flex-wrap gap-4", "data-testid": "event-details-info", children: [
9136
9139
  r && /* @__PURE__ */ u(lr, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
9137
9140
  i && /* @__PURE__ */ u(lr, { icon: "solar:clock-circle-linear", testId: "event-details-time", children: i }),
@@ -9142,16 +9145,16 @@ const lr = ({
9142
9145
  /* @__PURE__ */ u(
9143
9146
  "div",
9144
9147
  {
9145
- ref: v,
9148
+ ref: y,
9146
9149
  className: I(
9147
9150
  "text-sm text-gray-700 leading-relaxed transition-all",
9148
- !d && "line-clamp-3"
9151
+ !f && "line-clamp-3"
9149
9152
  ),
9150
9153
  "data-testid": "event-details-description",
9151
9154
  dangerouslySetInnerHTML: { __html: o }
9152
9155
  }
9153
9156
  ),
9154
- !d && m && /* @__PURE__ */ u(
9157
+ !f && h && /* @__PURE__ */ u(
9155
9158
  "div",
9156
9159
  {
9157
9160
  className: "absolute inset-x-0 -bottom-1 h-8 bg-gradient-to-t from-white via-white/70 to-transparent pointer-events-none",
@@ -9159,21 +9162,21 @@ const lr = ({
9159
9162
  }
9160
9163
  )
9161
9164
  ] }),
9162
- (m || d) && /* @__PURE__ */ u("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ u(
9165
+ (h || f) && /* @__PURE__ */ u("div", { className: "flex justify-end mt-1", children: /* @__PURE__ */ u(
9163
9166
  se,
9164
9167
  {
9165
- onPress: () => f(!d),
9168
+ onPress: () => m(!f),
9166
9169
  variant: "light",
9167
- className: I("text-primary", a),
9170
+ className: I("text-primary", c),
9168
9171
  startContent: /* @__PURE__ */ u(
9169
9172
  De,
9170
9173
  {
9171
- icon: d ? "solar:eye-closed-linear" : "solar:eye-linear",
9174
+ icon: f ? "solar:eye-closed-linear" : "solar:eye-linear",
9172
9175
  width: 20
9173
9176
  }
9174
9177
  ),
9175
9178
  "data-testid": "event-details-toggle-description",
9176
- children: d ? c.showLess || "Hide" : c.showMore || "Show"
9179
+ children: f ? d.showLess || "Hide" : d.showMore || "Show"
9177
9180
  }
9178
9181
  ) })
9179
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.12.0",
4
+ "version": "1.12.1-beta.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",