@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.js CHANGED
@@ -12168,9 +12168,9 @@ function FeedLightbox({
12168
12168
  var _a2;
12169
12169
  frame = 0;
12170
12170
  if (!userMoved) {
12171
- (_a2 = itemRefs.current[initialIndex]) == null ? void 0 : _a2.scrollIntoView({ block: "start" });
12171
+ (_a2 = itemRefs.current[initialIndex]) == null ? void 0 : _a2.scrollIntoView({ block: "center" });
12172
12172
  }
12173
- const anchorY = root.getBoundingClientRect().top + 64;
12173
+ const anchorY = root.getBoundingClientRect().top + root.clientHeight / 2;
12174
12174
  let current = 0;
12175
12175
  itemRefs.current.forEach((el, i) => {
12176
12176
  if (el && el.getBoundingClientRect().top <= anchorY) current = i;
@@ -12236,15 +12236,16 @@ function FeedLightbox({
12236
12236
  {
12237
12237
  ref: scrollRef,
12238
12238
  className: "flex-1 overflow-y-auto overscroll-contain",
12239
- children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-3 py-4", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
12239
+ children: /* @__PURE__ */ jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
12240
12240
  var _a2;
12241
+ const isFocused = index === active;
12241
12242
  return /* @__PURE__ */ jsxs(React20.Fragment, { children: [
12242
12243
  sectionLabel && isSectionStart && /* @__PURE__ */ jsx(
12243
12244
  "h2",
12244
12245
  {
12245
12246
  className: cn(
12246
- "px-3 font-heading text-lg font-bold uppercase tracking-wide text-white sm:px-4",
12247
- index > 0 && "mt-3"
12247
+ "px-3 pb-3 font-heading text-lg font-bold uppercase tracking-wide text-white sm:px-4",
12248
+ index > 0 ? "pt-8" : "pt-2"
12248
12249
  ),
12249
12250
  children: sectionLabel
12250
12251
  }
@@ -12256,6 +12257,12 @@ function FeedLightbox({
12256
12257
  ref: (el) => {
12257
12258
  itemRefs.current[index] = el;
12258
12259
  },
12260
+ className: cn(
12261
+ "group relative transition-opacity duration-500",
12262
+ // The focused (centred / hovered) photo is at full opacity;
12263
+ // every other photo is dimmed a touch so the eye lands on it.
12264
+ isFocused ? "opacity-100" : "opacity-[0.65] hover:opacity-100"
12265
+ ),
12259
12266
  children: [
12260
12267
  /* @__PURE__ */ jsx("div", { className: "overflow-hidden bg-white/5", children: /* @__PURE__ */ jsx(
12261
12268
  Picture,
@@ -12268,13 +12275,22 @@ function FeedLightbox({
12268
12275
  rootMargin: "800px"
12269
12276
  }
12270
12277
  ) }),
12271
- (photo.caption || photo.credit) && /* @__PURE__ */ jsxs("figcaption", { className: "px-3 pt-2 sm:px-4", children: [
12272
- photo.caption && /* @__PURE__ */ jsx("p", { className: "font-ui text-sm leading-snug text-white/70", children: photo.caption }),
12273
- photo.credit && /* @__PURE__ */ jsxs("p", { className: "font-ui text-xs text-white/50", children: [
12274
- "\xA9 ",
12275
- photo.credit
12276
- ] })
12277
- ] })
12278
+ (photo.caption || photo.credit) && /* @__PURE__ */ jsxs(
12279
+ "figcaption",
12280
+ {
12281
+ className: cn(
12282
+ "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",
12283
+ isFocused ? "opacity-100" : "opacity-0 group-hover:opacity-100"
12284
+ ),
12285
+ children: [
12286
+ photo.caption && /* @__PURE__ */ jsx("p", { className: "font-ui text-sm font-medium leading-snug text-white drop-shadow-md", children: photo.caption }),
12287
+ photo.credit && /* @__PURE__ */ jsxs("p", { className: "font-ui text-xs text-white/80 drop-shadow-md", children: [
12288
+ "\xA9 ",
12289
+ photo.credit
12290
+ ] })
12291
+ ]
12292
+ }
12293
+ )
12278
12294
  ]
12279
12295
  }
12280
12296
  )