@planetaexo/design-system 0.74.0 → 0.75.0

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 CHANGED
@@ -12189,9 +12189,9 @@ function FeedLightbox({
12189
12189
  var _a2;
12190
12190
  frame = 0;
12191
12191
  if (!userMoved) {
12192
- (_a2 = itemRefs.current[initialIndex]) == null ? void 0 : _a2.scrollIntoView({ block: "start" });
12192
+ (_a2 = itemRefs.current[initialIndex]) == null ? void 0 : _a2.scrollIntoView({ block: "center" });
12193
12193
  }
12194
- const anchorY = root.getBoundingClientRect().top + 64;
12194
+ const anchorY = root.getBoundingClientRect().top + root.clientHeight / 2;
12195
12195
  let current = 0;
12196
12196
  itemRefs.current.forEach((el, i) => {
12197
12197
  if (el && el.getBoundingClientRect().top <= anchorY) current = i;
@@ -12257,15 +12257,16 @@ function FeedLightbox({
12257
12257
  {
12258
12258
  ref: scrollRef,
12259
12259
  className: "flex-1 overflow-y-auto overscroll-contain",
12260
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-3 py-4", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
12260
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
12261
12261
  var _a2;
12262
+ const isFocused = index === active;
12262
12263
  return /* @__PURE__ */ jsxRuntime.jsxs(React20__namespace.Fragment, { children: [
12263
12264
  sectionLabel && isSectionStart && /* @__PURE__ */ jsxRuntime.jsx(
12264
12265
  "h2",
12265
12266
  {
12266
12267
  className: cn(
12267
- "px-3 font-heading text-lg font-bold uppercase tracking-wide text-white sm:px-4",
12268
- index > 0 && "mt-3"
12268
+ "px-3 pb-3 font-heading text-lg font-bold uppercase tracking-wide text-white sm:px-4",
12269
+ index > 0 ? "pt-8" : "pt-2"
12269
12270
  ),
12270
12271
  children: sectionLabel
12271
12272
  }
@@ -12277,6 +12278,12 @@ function FeedLightbox({
12277
12278
  ref: (el) => {
12278
12279
  itemRefs.current[index] = el;
12279
12280
  },
12281
+ className: cn(
12282
+ "group relative transition-opacity duration-500",
12283
+ // The focused (centred / hovered) photo is at full opacity;
12284
+ // every other photo is dimmed a touch so the eye lands on it.
12285
+ isFocused ? "opacity-100" : "opacity-[0.65] hover:opacity-100"
12286
+ ),
12280
12287
  children: [
12281
12288
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden bg-white/5", children: /* @__PURE__ */ jsxRuntime.jsx(
12282
12289
  Picture,
@@ -12289,13 +12296,22 @@ function FeedLightbox({
12289
12296
  rootMargin: "800px"
12290
12297
  }
12291
12298
  ) }),
12292
- (photo.caption || photo.credit) && /* @__PURE__ */ jsxRuntime.jsxs("figcaption", { className: "px-3 pt-2 sm:px-4", children: [
12293
- photo.caption && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-ui text-sm leading-snug text-white/70", children: photo.caption }),
12294
- photo.credit && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-ui text-xs text-white/50", children: [
12295
- "\xA9 ",
12296
- photo.credit
12297
- ] })
12298
- ] })
12299
+ (photo.caption || photo.credit) && /* @__PURE__ */ jsxRuntime.jsxs(
12300
+ "figcaption",
12301
+ {
12302
+ className: cn(
12303
+ "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col items-end gap-0.5 bg-gradient-to-t from-black/60 via-black/20 to-transparent px-3 pb-3 pt-12 text-right transition-opacity duration-500 sm:px-4",
12304
+ isFocused ? "opacity-100" : "opacity-0 group-hover:opacity-100"
12305
+ ),
12306
+ children: [
12307
+ photo.caption && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-ui text-sm font-medium leading-snug text-white drop-shadow-md", children: photo.caption }),
12308
+ photo.credit && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-ui text-xs text-white/80 drop-shadow-md", children: [
12309
+ "\xA9 ",
12310
+ photo.credit
12311
+ ] })
12312
+ ]
12313
+ }
12314
+ )
12299
12315
  ]
12300
12316
  }
12301
12317
  )