@planetaexo/design-system 0.75.0 → 0.76.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 +63 -73
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +63 -73
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -12224,24 +12224,81 @@ function FeedLightbox({
|
|
|
12224
12224
|
if (frame) cancelAnimationFrame(frame);
|
|
12225
12225
|
};
|
|
12226
12226
|
}, []);
|
|
12227
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50
|
|
12228
|
-
/* @__PURE__ */ jsxRuntime.
|
|
12227
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "fixed inset-0 z-50 bg-zinc-950 text-white", children: [
|
|
12228
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12229
|
+
"div",
|
|
12230
|
+
{
|
|
12231
|
+
ref: scrollRef,
|
|
12232
|
+
className: "absolute inset-0 overflow-y-auto overscroll-contain",
|
|
12233
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto flex w-full max-w-3xl flex-col", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
|
|
12234
|
+
var _a2;
|
|
12235
|
+
const isFocused = index === active;
|
|
12236
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12237
|
+
"figure",
|
|
12238
|
+
{
|
|
12239
|
+
"data-index": index,
|
|
12240
|
+
ref: (el) => {
|
|
12241
|
+
itemRefs.current[index] = el;
|
|
12242
|
+
},
|
|
12243
|
+
className: cn(
|
|
12244
|
+
"group relative transition-opacity duration-500",
|
|
12245
|
+
// The focused (centred / hovered) photo is at full opacity;
|
|
12246
|
+
// every other photo is dimmed a touch so the eye lands on it.
|
|
12247
|
+
isFocused ? "opacity-100" : "opacity-[0.65] hover:opacity-100"
|
|
12248
|
+
),
|
|
12249
|
+
children: [
|
|
12250
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden bg-white/5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12251
|
+
Picture,
|
|
12252
|
+
{
|
|
12253
|
+
src: photo.src,
|
|
12254
|
+
alt: (_a2 = photo.alt) != null ? _a2 : `Photo ${index + 1}`,
|
|
12255
|
+
title: photo.caption,
|
|
12256
|
+
className: "block h-auto w-full",
|
|
12257
|
+
eager: index < 2,
|
|
12258
|
+
rootMargin: "800px"
|
|
12259
|
+
}
|
|
12260
|
+
) }),
|
|
12261
|
+
sectionLabel && isSectionStart && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-x-0 top-0 bg-gradient-to-b from-black/60 via-black/20 to-transparent px-3 pb-12 pt-3 sm:px-4", children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-heading text-lg font-bold uppercase tracking-wide text-white drop-shadow-md", children: sectionLabel }) }),
|
|
12262
|
+
(photo.caption || photo.credit) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12263
|
+
"figcaption",
|
|
12264
|
+
{
|
|
12265
|
+
className: cn(
|
|
12266
|
+
"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",
|
|
12267
|
+
isFocused ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
12268
|
+
),
|
|
12269
|
+
children: [
|
|
12270
|
+
photo.caption && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-ui text-sm font-medium leading-snug text-white drop-shadow-md", children: photo.caption }),
|
|
12271
|
+
photo.credit && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "font-ui text-xs text-white/80 drop-shadow-md", children: [
|
|
12272
|
+
"\xA9 ",
|
|
12273
|
+
photo.credit
|
|
12274
|
+
] })
|
|
12275
|
+
]
|
|
12276
|
+
}
|
|
12277
|
+
)
|
|
12278
|
+
]
|
|
12279
|
+
},
|
|
12280
|
+
index
|
|
12281
|
+
);
|
|
12282
|
+
}) })
|
|
12283
|
+
}
|
|
12284
|
+
),
|
|
12285
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-10 flex items-center gap-3 bg-gradient-to-b from-black/70 via-black/30 to-transparent px-3 pb-10 pt-2.5", children: [
|
|
12229
12286
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12230
12287
|
"button",
|
|
12231
12288
|
{
|
|
12232
12289
|
type: "button",
|
|
12233
12290
|
onClick: onClose,
|
|
12234
|
-
className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-full text-white transition-colors hover:bg-white/
|
|
12291
|
+
className: "pointer-events-auto flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-black/25 text-white backdrop-blur-sm transition-colors hover:bg-white/15 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60",
|
|
12235
12292
|
"aria-label": (_a = labels == null ? void 0 : labels.close) != null ? _a : "Close lightbox",
|
|
12236
12293
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-5 w-5" })
|
|
12237
12294
|
}
|
|
12238
12295
|
),
|
|
12239
|
-
activeLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-center font-heading text-sm font-bold uppercase tracking-wide text-white", children: activeLabel }),
|
|
12296
|
+
activeLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "min-w-0 flex-1 truncate text-center font-heading text-sm font-bold uppercase tracking-wide text-white drop-shadow-md", children: activeLabel }),
|
|
12240
12297
|
total > 1 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12241
12298
|
"span",
|
|
12242
12299
|
{
|
|
12243
12300
|
className: cn(
|
|
12244
|
-
"shrink-0 font-ui text-sm font-medium tabular-nums text-white/
|
|
12301
|
+
"shrink-0 font-ui text-sm font-medium tabular-nums text-white/80 drop-shadow-md",
|
|
12245
12302
|
!activeLabel && "ml-auto"
|
|
12246
12303
|
),
|
|
12247
12304
|
children: [
|
|
@@ -12251,74 +12308,7 @@ function FeedLightbox({
|
|
|
12251
12308
|
]
|
|
12252
12309
|
}
|
|
12253
12310
|
)
|
|
12254
|
-
] })
|
|
12255
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12256
|
-
"div",
|
|
12257
|
-
{
|
|
12258
|
-
ref: scrollRef,
|
|
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", children: items.map(({ photo, index, sectionLabel, isSectionStart }) => {
|
|
12261
|
-
var _a2;
|
|
12262
|
-
const isFocused = index === active;
|
|
12263
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(React20__namespace.Fragment, { children: [
|
|
12264
|
-
sectionLabel && isSectionStart && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12265
|
-
"h2",
|
|
12266
|
-
{
|
|
12267
|
-
className: cn(
|
|
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"
|
|
12270
|
-
),
|
|
12271
|
-
children: sectionLabel
|
|
12272
|
-
}
|
|
12273
|
-
),
|
|
12274
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12275
|
-
"figure",
|
|
12276
|
-
{
|
|
12277
|
-
"data-index": index,
|
|
12278
|
-
ref: (el) => {
|
|
12279
|
-
itemRefs.current[index] = el;
|
|
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
|
-
),
|
|
12287
|
-
children: [
|
|
12288
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden bg-white/5", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12289
|
-
Picture,
|
|
12290
|
-
{
|
|
12291
|
-
src: photo.src,
|
|
12292
|
-
alt: (_a2 = photo.alt) != null ? _a2 : `Photo ${index + 1}`,
|
|
12293
|
-
title: photo.caption,
|
|
12294
|
-
className: "block h-auto w-full",
|
|
12295
|
-
eager: index < 2,
|
|
12296
|
-
rootMargin: "800px"
|
|
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
|
-
)
|
|
12315
|
-
]
|
|
12316
|
-
}
|
|
12317
|
-
)
|
|
12318
|
-
] }, index);
|
|
12319
|
-
}) })
|
|
12320
|
-
}
|
|
12321
|
-
)
|
|
12311
|
+
] })
|
|
12322
12312
|
] });
|
|
12323
12313
|
}
|
|
12324
12314
|
var PhotoTourContext = React20__namespace.createContext(null);
|