@opensite/ui 3.9.0 → 3.10.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.
@@ -0,0 +1,614 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var clsx = require('clsx');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var img = require('@page-speed/img');
8
+ var video = require('@page-speed/video');
9
+ var pressable = require('@page-speed/pressable');
10
+ var icon = require('@page-speed/icon');
11
+ var jsxRuntime = require('react/jsx-runtime');
12
+
13
+ function _interopNamespace(e) {
14
+ if (e && e.__esModule) return e;
15
+ var n = Object.create(null);
16
+ if (e) {
17
+ Object.keys(e).forEach(function (k) {
18
+ if (k !== 'default') {
19
+ var d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: function () { return e[k]; }
23
+ });
24
+ }
25
+ });
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+
31
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
32
+
33
+ // components/blocks/gallery/instagram-post-grid.tsx
34
+ function cn(...inputs) {
35
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
36
+ }
37
+ var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
38
+ var DynamicIcon = React__namespace.memo(function DynamicIcon2({
39
+ apiKey,
40
+ name,
41
+ ...props
42
+ }) {
43
+ if (name == null) return null;
44
+ if (typeof name !== "string") {
45
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: name });
46
+ }
47
+ return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, name, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
48
+ });
49
+ DynamicIcon.displayName = "DynamicIcon";
50
+ var maxWidthStyles = {
51
+ sm: "max-w-screen-sm",
52
+ md: "max-w-screen-md",
53
+ lg: "max-w-screen-lg",
54
+ xl: "max-w-7xl",
55
+ "2xl": "max-w-screen-2xl",
56
+ "4xl": "max-w-[1536px]",
57
+ full: "max-w-full"
58
+ };
59
+ var Container = React__namespace.default.forwardRef(
60
+ ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
61
+ const Component = as;
62
+ return /* @__PURE__ */ jsxRuntime.jsx(
63
+ Component,
64
+ {
65
+ ref,
66
+ className: cn(
67
+ "mx-auto w-full px-2 sm:px-4 lg:px-8",
68
+ maxWidthStyles[maxWidth],
69
+ className
70
+ ),
71
+ ...props,
72
+ children
73
+ }
74
+ );
75
+ }
76
+ );
77
+ Container.displayName = "Container";
78
+
79
+ // lib/patternSvgs.ts
80
+ var patternSvgs = {
81
+ squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
82
+ grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
83
+ noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
84
+ dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
85
+ dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
86
+ dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
87
+ circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
88
+ waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
89
+ crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
90
+ architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
91
+ tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
92
+ p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
93
+ };
94
+ var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
95
+ var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
96
+ var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
97
+ var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
98
+ var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
99
+ var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
100
+ var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
101
+ var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
102
+ "svg",
103
+ {
104
+ className: "h-full w-full",
105
+ xmlns: "http://www.w3.org/2000/svg",
106
+ style: mask ? {
107
+ maskImage: mask,
108
+ WebkitMaskImage: mask
109
+ } : void 0,
110
+ children: [
111
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
112
+ "pattern",
113
+ {
114
+ id,
115
+ x: "0",
116
+ y: "0",
117
+ width: "100",
118
+ height: "100",
119
+ patternUnits: "userSpaceOnUse",
120
+ children: [
121
+ /* @__PURE__ */ jsxRuntime.jsx(
122
+ "path",
123
+ {
124
+ d: "M0 50h40M60 50h40M50 0v40M50 60v40",
125
+ stroke: "hsl(var(--muted))",
126
+ strokeWidth: "1",
127
+ fill: "none"
128
+ }
129
+ ),
130
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
131
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
132
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
133
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
134
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
135
+ ]
136
+ }
137
+ ) }),
138
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
139
+ ]
140
+ }
141
+ );
142
+ var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxRuntime.jsxs(
143
+ "svg",
144
+ {
145
+ className: "h-full w-full",
146
+ xmlns: "http://www.w3.org/2000/svg",
147
+ style: mask ? {
148
+ maskImage: mask,
149
+ WebkitMaskImage: mask
150
+ } : void 0,
151
+ children: [
152
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs(
153
+ "pattern",
154
+ {
155
+ id,
156
+ x: "0",
157
+ y: "0",
158
+ width: "40",
159
+ height: "40",
160
+ patternUnits: "userSpaceOnUse",
161
+ children: [
162
+ /* @__PURE__ */ jsxRuntime.jsx(
163
+ "path",
164
+ {
165
+ d: "M0 20h40M20 0v40",
166
+ stroke: "hsl(var(--muted))",
167
+ strokeWidth: "0.5",
168
+ fill: "none"
169
+ }
170
+ ),
171
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
172
+ ]
173
+ }
174
+ ) }),
175
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
176
+ ]
177
+ }
178
+ );
179
+ var gridPattern = (size, mask) => /* @__PURE__ */ jsxRuntime.jsx(
180
+ "div",
181
+ {
182
+ className: "h-full w-full bg-[linear-gradient(to_right,_hsl(var(--muted))_1px,_transparent_1px),linear-gradient(to_bottom,_hsl(var(--muted))_1px,_transparent_1px)]",
183
+ style: {
184
+ backgroundSize: `${size}px ${size}px`,
185
+ ...mask ? {
186
+ maskImage: mask,
187
+ WebkitMaskImage: mask
188
+ } : {}
189
+ }
190
+ }
191
+ );
192
+ var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsxRuntime.jsx(
193
+ "div",
194
+ {
195
+ className: "h-full w-full",
196
+ style: {
197
+ backgroundImage: "repeating-linear-gradient(45deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px), repeating-linear-gradient(135deg, transparent, transparent 32px, hsl(var(--muted)) 32px, hsl(var(--muted)) 33px)",
198
+ ...mask ? {
199
+ maskImage: mask,
200
+ WebkitMaskImage: mask
201
+ } : {}
202
+ }
203
+ }
204
+ );
205
+ var dashedGridMaskBase = "repeating-linear-gradient(to right, black 0px, black 3px, transparent 3px, transparent 8px), repeating-linear-gradient(to bottom, black 0px, black 3px, transparent 3px, transparent 8px)";
206
+ var dashedGridPattern = (fadeMask) => {
207
+ const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
208
+ return /* @__PURE__ */ jsxRuntime.jsx(
209
+ "div",
210
+ {
211
+ className: "h-full w-full",
212
+ style: {
213
+ backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
214
+ backgroundSize: "20px 20px",
215
+ backgroundPosition: "0 0, 0 0",
216
+ maskImage: mask,
217
+ WebkitMaskImage: mask,
218
+ maskComposite: "intersect",
219
+ WebkitMaskComposite: "source-in"
220
+ }
221
+ }
222
+ );
223
+ };
224
+ var gradientGlow = (position) => /* @__PURE__ */ jsxRuntime.jsx(
225
+ "div",
226
+ {
227
+ className: cn(
228
+ "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
229
+ position === "top" ? "-top-1/4" : "-bottom-1/4"
230
+ ),
231
+ style: {
232
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
233
+ }
234
+ }
235
+ );
236
+ var spotlight = (position) => /* @__PURE__ */ jsxRuntime.jsx(
237
+ "div",
238
+ {
239
+ className: cn(
240
+ "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
241
+ position === "left" ? "-left-1/4" : "-right-1/4"
242
+ ),
243
+ style: {
244
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
245
+ }
246
+ }
247
+ );
248
+ var patternOverlays = {
249
+ circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
250
+ circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
251
+ circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
252
+ circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
253
+ circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
254
+ circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
255
+ circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
256
+ circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
257
+ dashedGridBasic: () => dashedGridPattern(),
258
+ dashedGridFadeTop: () => dashedGridPattern(maskTop),
259
+ dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
260
+ dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
261
+ dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
262
+ dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
263
+ dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
264
+ dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
265
+ diagonalCrossBasic: () => diagonalCrossPattern(),
266
+ diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
267
+ diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
268
+ diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
269
+ diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
270
+ diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
271
+ diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
272
+ diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
273
+ gridBasic: () => gridPattern(40),
274
+ gridFadeTop: () => gridPattern(32, maskTop),
275
+ gridFadeBottom: () => gridPattern(32, maskBottom),
276
+ gridFadeCenter: () => gridPattern(40, maskCenter),
277
+ gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
278
+ gridFadeTopRight: () => gridPattern(32, maskTopRight),
279
+ gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
280
+ gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
281
+ gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
282
+ gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
283
+ gradientGlowTop: () => gradientGlow("top"),
284
+ gradientGlowBottom: () => gradientGlow("bottom"),
285
+ spotlightLeft: () => spotlight("left"),
286
+ spotlightRight: () => spotlight("right")
287
+ };
288
+ var inlinePatternStyles = {
289
+ radialGradientTop: {
290
+ background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
291
+ },
292
+ radialGradientBottom: {
293
+ background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
294
+ }
295
+ };
296
+ function PatternBackground({
297
+ pattern,
298
+ opacity = 0.08,
299
+ className,
300
+ style
301
+ }) {
302
+ if (!pattern) {
303
+ return null;
304
+ }
305
+ if (pattern in inlinePatternStyles) {
306
+ const inlineStyle = inlinePatternStyles[pattern];
307
+ return /* @__PURE__ */ jsxRuntime.jsx(
308
+ "div",
309
+ {
310
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
311
+ style: { ...inlineStyle, opacity, ...style },
312
+ "aria-hidden": "true"
313
+ }
314
+ );
315
+ }
316
+ if (pattern in patternOverlays) {
317
+ const Overlay = patternOverlays[pattern];
318
+ return /* @__PURE__ */ jsxRuntime.jsx(
319
+ "div",
320
+ {
321
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
322
+ style: { opacity, ...style },
323
+ "aria-hidden": "true",
324
+ children: Overlay()
325
+ }
326
+ );
327
+ }
328
+ const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
329
+ return /* @__PURE__ */ jsxRuntime.jsx(
330
+ "div",
331
+ {
332
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
333
+ style: {
334
+ backgroundImage: `url(${patternUrl})`,
335
+ backgroundRepeat: "repeat",
336
+ backgroundSize: "auto",
337
+ opacity,
338
+ ...style
339
+ },
340
+ "aria-hidden": "true"
341
+ }
342
+ );
343
+ }
344
+ var backgroundStyles = {
345
+ default: "bg-background text-foreground",
346
+ white: "bg-white text-dark",
347
+ gray: "bg-muted/30 text-foreground",
348
+ dark: "bg-foreground text-background",
349
+ transparent: "bg-transparent text-foreground",
350
+ gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
351
+ primary: "bg-primary text-primary-foreground",
352
+ secondary: "bg-secondary text-secondary-foreground",
353
+ muted: "bg-muted text-muted-foreground"
354
+ };
355
+ var spacingStyles = {
356
+ none: "py-0 md:py-0",
357
+ sm: "py-12 md:py-16",
358
+ md: "py-16 md:py-24",
359
+ lg: "py-20 md:py-32",
360
+ xl: "py-24 md:py-40",
361
+ hero: "pt-32 pb-12 md:pt-40 md:pb-40"
362
+ };
363
+ var predefinedSpacings = ["none", "sm", "md", "lg", "xl", "hero"];
364
+ var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
365
+ var Section = React__namespace.default.forwardRef(
366
+ ({
367
+ id,
368
+ title,
369
+ subtitle,
370
+ children,
371
+ className,
372
+ style,
373
+ background = "default",
374
+ spacing = "lg",
375
+ pattern,
376
+ patternOpacity,
377
+ patternClassName,
378
+ containerClassName,
379
+ containerMaxWidth = "xl",
380
+ ...props
381
+ }, ref) => {
382
+ const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
383
+ return /* @__PURE__ */ jsxRuntime.jsxs(
384
+ "section",
385
+ {
386
+ ref,
387
+ id,
388
+ className: cn(
389
+ "relative",
390
+ pattern ? "overflow-hidden" : null,
391
+ backgroundStyles[background],
392
+ isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
393
+ className
394
+ ),
395
+ style,
396
+ ...props,
397
+ children: [
398
+ /* @__PURE__ */ jsxRuntime.jsx(
399
+ PatternBackground,
400
+ {
401
+ pattern,
402
+ opacity: effectivePatternOpacity,
403
+ className: patternClassName
404
+ }
405
+ ),
406
+ /* @__PURE__ */ jsxRuntime.jsxs(
407
+ Container,
408
+ {
409
+ maxWidth: containerMaxWidth,
410
+ className: cn("relative z-10", containerClassName),
411
+ children: [
412
+ (title || subtitle) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
413
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider", children: subtitle }),
414
+ title && /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
415
+ ] }),
416
+ children
417
+ ]
418
+ }
419
+ )
420
+ ]
421
+ }
422
+ );
423
+ }
424
+ );
425
+ Section.displayName = "Section";
426
+ function EngagementBadge({
427
+ iconName,
428
+ count,
429
+ label
430
+ }) {
431
+ return /* @__PURE__ */ jsxRuntime.jsxs(
432
+ "span",
433
+ {
434
+ className: "inline-flex items-center gap-1",
435
+ "aria-label": `${count.toLocaleString()} ${label}`,
436
+ children: [
437
+ /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: iconName, size: 16, "aria-hidden": "true" }),
438
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: count.toLocaleString() })
439
+ ]
440
+ }
441
+ );
442
+ }
443
+ function InstagramPostGrid({
444
+ sectionId = "instagram-post-grid",
445
+ heading,
446
+ subheading,
447
+ items,
448
+ itemsSlot,
449
+ className,
450
+ containerClassName,
451
+ headerClassName,
452
+ headingClassName,
453
+ subheadingClassName,
454
+ gridClassName,
455
+ itemClassName,
456
+ imageClassName,
457
+ background,
458
+ spacing,
459
+ pattern,
460
+ patternOpacity,
461
+ patternClassName,
462
+ optixFlowConfig
463
+ }) {
464
+ const tiles = React.useMemo(() => {
465
+ if (itemsSlot) return itemsSlot;
466
+ if (!items || items.length === 0) return null;
467
+ const visibleItems = items.filter((item) => Boolean(item.image));
468
+ return visibleItems.map((item) => {
469
+ const altText = item.imageAlt || (typeof item.caption === "string" ? item.caption : "") || "Instagram post";
470
+ const showVideo = Boolean(item.isVideo && item.videoUrl);
471
+ return /* @__PURE__ */ jsxRuntime.jsxs(
472
+ pressable.Pressable,
473
+ {
474
+ href: item.href,
475
+ "aria-label": typeof item.caption === "string" && item.caption.length > 0 ? item.caption : "View Instagram post",
476
+ className: cn(
477
+ "group relative block aspect-square overflow-hidden rounded-md bg-muted",
478
+ item.className,
479
+ itemClassName
480
+ ),
481
+ children: [
482
+ /* @__PURE__ */ jsxRuntime.jsx(
483
+ img.Img,
484
+ {
485
+ src: item.image,
486
+ alt: altText,
487
+ loading: "lazy",
488
+ className: cn(
489
+ "h-full w-full object-cover object-center transition-transform duration-300 group-hover:scale-105 motion-reduce:transform-none motion-reduce:transition-none",
490
+ imageClassName
491
+ ),
492
+ optixFlowConfig
493
+ }
494
+ ),
495
+ showVideo && /* @__PURE__ */ jsxRuntime.jsx(
496
+ video.Video,
497
+ {
498
+ src: item.videoUrl,
499
+ poster: item.image,
500
+ controls: false,
501
+ muted: true,
502
+ loop: true,
503
+ playsInline: true,
504
+ preload: "metadata",
505
+ onMouseEnter: (e) => {
506
+ void e.currentTarget.play().catch(() => void 0);
507
+ },
508
+ onMouseLeave: (e) => {
509
+ e.currentTarget.pause();
510
+ e.currentTarget.currentTime = 0;
511
+ },
512
+ className: cn(
513
+ "absolute inset-0 h-full w-full object-cover object-center opacity-0 transition-opacity duration-300 group-hover:opacity-100 motion-reduce:transition-none",
514
+ imageClassName
515
+ )
516
+ }
517
+ ),
518
+ item.isVideo && /* @__PURE__ */ jsxRuntime.jsx(
519
+ "span",
520
+ {
521
+ className: "absolute right-2 top-2 text-white drop-shadow-md",
522
+ "aria-hidden": "true",
523
+ children: /* @__PURE__ */ jsxRuntime.jsx(DynamicIcon, { name: "lucide/play", size: 18 })
524
+ }
525
+ ),
526
+ (item.caption || item.date || typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number") && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 flex flex-col gap-1 bg-linear-to-t from-black/70 to-transparent p-3 text-left text-white opacity-0 transition-opacity duration-300 group-hover:opacity-100 motion-reduce:transition-none", children: [
527
+ item.caption && (typeof item.caption === "string" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-2 text-xs leading-snug wrap-break-word", children: item.caption }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "line-clamp-2 text-xs leading-snug", children: item.caption })),
528
+ (typeof item.likeCount === "number" || typeof item.commentCount === "number" || typeof item.viewCount === "number" || item.date) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-xs font-medium", children: [
529
+ typeof item.likeCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
530
+ EngagementBadge,
531
+ {
532
+ iconName: "lucide/heart",
533
+ count: item.likeCount,
534
+ label: "likes"
535
+ }
536
+ ),
537
+ typeof item.commentCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
538
+ EngagementBadge,
539
+ {
540
+ iconName: "lucide/message-circle",
541
+ count: item.commentCount,
542
+ label: "comments"
543
+ }
544
+ ),
545
+ typeof item.viewCount === "number" && /* @__PURE__ */ jsxRuntime.jsx(
546
+ EngagementBadge,
547
+ {
548
+ iconName: "lucide/eye",
549
+ count: item.viewCount,
550
+ label: "views"
551
+ }
552
+ ),
553
+ item.date && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto opacity-80", children: item.date })
554
+ ] })
555
+ ] })
556
+ ]
557
+ },
558
+ item.id
559
+ );
560
+ });
561
+ }, [itemsSlot, items, itemClassName, imageClassName, optixFlowConfig]);
562
+ if (!itemsSlot && (!items || items.length === 0)) {
563
+ return null;
564
+ }
565
+ return /* @__PURE__ */ jsxRuntime.jsxs(
566
+ Section,
567
+ {
568
+ id: sectionId,
569
+ background,
570
+ spacing,
571
+ pattern,
572
+ patternOpacity,
573
+ patternClassName,
574
+ className,
575
+ containerClassName,
576
+ children: [
577
+ (heading || subheading) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("mb-8 flex flex-col gap-2", headerClassName), children: [
578
+ heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
579
+ "h2",
580
+ {
581
+ className: cn(
582
+ "text-xl font-medium tracking-tight md:text-2xl lg:text-3xl text-balance",
583
+ headingClassName
584
+ ),
585
+ children: heading
586
+ }
587
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
588
+ subheading && (typeof subheading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
589
+ "p",
590
+ {
591
+ className: cn(
592
+ "max-w-2xl text-balance text-muted-foreground",
593
+ subheadingClassName
594
+ ),
595
+ children: subheading
596
+ }
597
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: subheadingClassName, children: subheading }))
598
+ ] }),
599
+ /* @__PURE__ */ jsxRuntime.jsx(
600
+ "div",
601
+ {
602
+ className: cn(
603
+ "grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-4",
604
+ gridClassName
605
+ ),
606
+ children: tiles
607
+ }
608
+ )
609
+ ]
610
+ }
611
+ );
612
+ }
613
+
614
+ exports.InstagramPostGrid = InstagramPostGrid;