@opensite/ui 0.7.0 → 0.7.2

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.
Files changed (71) hide show
  1. package/dist/blog-cards-read-time.cjs +1 -1
  2. package/dist/blog-cards-read-time.js +1 -1
  3. package/dist/blog-cards-tagline-cta.cjs +1 -1
  4. package/dist/blog-cards-tagline-cta.js +1 -1
  5. package/dist/blog-category-overlay.cjs +1 -1
  6. package/dist/blog-category-overlay.js +1 -1
  7. package/dist/blog-featured-popular.cjs +1 -1
  8. package/dist/blog-featured-popular.js +1 -1
  9. package/dist/blog-grid-author-cards.cjs +1 -1
  10. package/dist/blog-grid-author-cards.js +1 -1
  11. package/dist/blog-grid-nine-posts.cjs +1 -1
  12. package/dist/blog-grid-nine-posts.js +1 -1
  13. package/dist/blog-horizontal-cards.cjs +1 -1
  14. package/dist/blog-horizontal-cards.js +1 -1
  15. package/dist/blog-tech-insights.cjs +54 -45
  16. package/dist/blog-tech-insights.js +54 -45
  17. package/dist/carousel-animated-sections.cjs +1224 -0
  18. package/dist/carousel-animated-sections.d.cts +154 -0
  19. package/dist/carousel-animated-sections.d.ts +154 -0
  20. package/dist/carousel-animated-sections.js +1203 -0
  21. package/dist/carousel-auto-progress-slides.cjs +1156 -0
  22. package/dist/carousel-auto-progress-slides.d.cts +122 -0
  23. package/dist/carousel-auto-progress-slides.d.ts +122 -0
  24. package/dist/carousel-auto-progress-slides.js +1135 -0
  25. package/dist/carousel-autoplay-progress.cjs +1141 -0
  26. package/dist/carousel-autoplay-progress.d.cts +119 -0
  27. package/dist/carousel-autoplay-progress.d.ts +119 -0
  28. package/dist/carousel-autoplay-progress.js +1116 -0
  29. package/dist/carousel-feature-badge.cjs +1216 -0
  30. package/dist/carousel-feature-badge.d.cts +99 -0
  31. package/dist/carousel-feature-badge.d.ts +99 -0
  32. package/dist/carousel-feature-badge.js +1192 -0
  33. package/dist/carousel-fullscreen-scroll-fx.cjs +526 -0
  34. package/dist/carousel-fullscreen-scroll-fx.d.cts +122 -0
  35. package/dist/carousel-fullscreen-scroll-fx.d.ts +122 -0
  36. package/dist/carousel-fullscreen-scroll-fx.js +505 -0
  37. package/dist/carousel-gallery-thumbnails.cjs +1059 -0
  38. package/dist/carousel-gallery-thumbnails.d.cts +122 -0
  39. package/dist/carousel-gallery-thumbnails.d.ts +122 -0
  40. package/dist/carousel-gallery-thumbnails.js +1038 -0
  41. package/dist/carousel-horizontal-cards.cjs +1083 -0
  42. package/dist/carousel-horizontal-cards.d.cts +126 -0
  43. package/dist/carousel-horizontal-cards.d.ts +126 -0
  44. package/dist/carousel-horizontal-cards.js +1062 -0
  45. package/dist/carousel-image-hero.cjs +1075 -0
  46. package/dist/carousel-image-hero.d.cts +116 -0
  47. package/dist/carousel-image-hero.d.ts +116 -0
  48. package/dist/carousel-image-hero.js +1054 -0
  49. package/dist/carousel-multi-step-showcase.cjs +1146 -0
  50. package/dist/carousel-multi-step-showcase.d.cts +142 -0
  51. package/dist/carousel-multi-step-showcase.d.ts +142 -0
  52. package/dist/carousel-multi-step-showcase.js +1125 -0
  53. package/dist/carousel-portfolio-hero.cjs +1063 -0
  54. package/dist/carousel-portfolio-hero.d.cts +134 -0
  55. package/dist/carousel-portfolio-hero.d.ts +134 -0
  56. package/dist/carousel-portfolio-hero.js +1042 -0
  57. package/dist/carousel-product-feature-showcase.cjs +1127 -0
  58. package/dist/carousel-product-feature-showcase.d.cts +161 -0
  59. package/dist/carousel-product-feature-showcase.d.ts +161 -0
  60. package/dist/carousel-product-feature-showcase.js +1106 -0
  61. package/dist/carousel-progress-slider.cjs +597 -0
  62. package/dist/carousel-progress-slider.d.cts +122 -0
  63. package/dist/carousel-progress-slider.d.ts +122 -0
  64. package/dist/carousel-progress-slider.js +576 -0
  65. package/dist/carousel-scrolling-feature-showcase.cjs +530 -0
  66. package/dist/carousel-scrolling-feature-showcase.d.cts +126 -0
  67. package/dist/carousel-scrolling-feature-showcase.d.ts +126 -0
  68. package/dist/carousel-scrolling-feature-showcase.js +509 -0
  69. package/dist/registry.cjs +349 -238
  70. package/dist/registry.js +349 -238
  71. package/package.json +3 -2
@@ -0,0 +1,1042 @@
1
+ "use client";
2
+ import * as React from 'react';
3
+ import React__default from 'react';
4
+ import { clsx } from 'clsx';
5
+ import { twMerge } from 'tailwind-merge';
6
+ import { cva } from 'class-variance-authority';
7
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import { Img } from '@page-speed/img';
9
+
10
+ // components/blocks/carousel/carousel-portfolio-hero.tsx
11
+ function cn(...inputs) {
12
+ return twMerge(clsx(inputs));
13
+ }
14
+ function normalizePhoneNumber(input) {
15
+ const trimmed = input.trim();
16
+ if (trimmed.toLowerCase().startsWith("tel:")) {
17
+ return trimmed;
18
+ }
19
+ const match = trimmed.match(/^[\s\+\-\(\)]*(\d[\d\s\-\(\)\.]*\d)[\s\-]*(x|ext\.?|extension)?[\s\-]*(\d+)?$/i);
20
+ if (match) {
21
+ const mainNumber = match[1].replace(/[\s\-\(\)\.]/g, "");
22
+ const extension = match[3];
23
+ const normalized = mainNumber.length >= 10 && !trimmed.startsWith("+") ? `+${mainNumber}` : mainNumber;
24
+ const withExtension = extension ? `${normalized};ext=${extension}` : normalized;
25
+ return `tel:${withExtension}`;
26
+ }
27
+ const cleaned = trimmed.replace(/[\s\-\(\)\.]/g, "");
28
+ return `tel:${cleaned}`;
29
+ }
30
+ function normalizeEmail(input) {
31
+ const trimmed = input.trim();
32
+ if (trimmed.toLowerCase().startsWith("mailto:")) {
33
+ return trimmed;
34
+ }
35
+ return `mailto:${trimmed}`;
36
+ }
37
+ function isEmail(input) {
38
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
39
+ return emailRegex.test(input.trim());
40
+ }
41
+ function isPhoneNumber(input) {
42
+ const trimmed = input.trim();
43
+ if (trimmed.toLowerCase().startsWith("tel:")) {
44
+ return true;
45
+ }
46
+ const phoneRegex = /^[\s\+\-\(\)]*\d[\d\s\-\(\)\.]*\d[\s\-]*(x|ext\.?|extension)?[\s\-]*\d*$/i;
47
+ return phoneRegex.test(trimmed);
48
+ }
49
+ function isInternalUrl(href) {
50
+ if (typeof window === "undefined") {
51
+ return href.startsWith("/") && !href.startsWith("//");
52
+ }
53
+ const trimmed = href.trim();
54
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
55
+ return true;
56
+ }
57
+ try {
58
+ const url = new URL(trimmed, window.location.href);
59
+ const currentOrigin = window.location.origin;
60
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
61
+ return normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin);
62
+ } catch {
63
+ return false;
64
+ }
65
+ }
66
+ function toRelativePath(href) {
67
+ if (typeof window === "undefined") {
68
+ return href;
69
+ }
70
+ const trimmed = href.trim();
71
+ if (trimmed.startsWith("/") && !trimmed.startsWith("//")) {
72
+ return trimmed;
73
+ }
74
+ try {
75
+ const url = new URL(trimmed, window.location.href);
76
+ const currentOrigin = window.location.origin;
77
+ const normalizeOrigin = (origin) => origin.replace(/^(https?:\/\/)(www\.)?/, "$1");
78
+ if (normalizeOrigin(url.origin) === normalizeOrigin(currentOrigin)) {
79
+ return url.pathname + url.search + url.hash;
80
+ }
81
+ } catch {
82
+ }
83
+ return trimmed;
84
+ }
85
+ function useNavigation({
86
+ href,
87
+ onClick
88
+ } = {}) {
89
+ const linkType = React.useMemo(() => {
90
+ if (!href || href.trim() === "") {
91
+ return onClick ? "none" : "none";
92
+ }
93
+ const trimmed = href.trim();
94
+ if (trimmed.toLowerCase().startsWith("mailto:") || isEmail(trimmed)) {
95
+ return "mailto";
96
+ }
97
+ if (trimmed.toLowerCase().startsWith("tel:") || isPhoneNumber(trimmed)) {
98
+ return "tel";
99
+ }
100
+ if (isInternalUrl(trimmed)) {
101
+ return "internal";
102
+ }
103
+ try {
104
+ new URL(trimmed, typeof window !== "undefined" ? window.location.href : "http://localhost");
105
+ return "external";
106
+ } catch {
107
+ return "internal";
108
+ }
109
+ }, [href, onClick]);
110
+ const normalizedHref = React.useMemo(() => {
111
+ if (!href || href.trim() === "") {
112
+ return void 0;
113
+ }
114
+ const trimmed = href.trim();
115
+ switch (linkType) {
116
+ case "tel":
117
+ return normalizePhoneNumber(trimmed);
118
+ case "mailto":
119
+ return normalizeEmail(trimmed);
120
+ case "internal":
121
+ return toRelativePath(trimmed);
122
+ case "external":
123
+ return trimmed;
124
+ default:
125
+ return trimmed;
126
+ }
127
+ }, [href, linkType]);
128
+ const target = React.useMemo(() => {
129
+ switch (linkType) {
130
+ case "external":
131
+ return "_blank";
132
+ case "internal":
133
+ return "_self";
134
+ case "mailto":
135
+ case "tel":
136
+ return void 0;
137
+ default:
138
+ return void 0;
139
+ }
140
+ }, [linkType]);
141
+ const rel = React.useMemo(() => {
142
+ if (linkType === "external") {
143
+ return "noopener noreferrer";
144
+ }
145
+ return void 0;
146
+ }, [linkType]);
147
+ const isExternal = linkType === "external";
148
+ const isInternal = linkType === "internal";
149
+ const shouldUseRouter = isInternal && typeof normalizedHref === "string" && normalizedHref.startsWith("/");
150
+ const handleClick = React.useCallback(
151
+ (event) => {
152
+ if (onClick) {
153
+ try {
154
+ onClick(event);
155
+ } catch (error) {
156
+ console.error("Error in user onClick handler:", error);
157
+ }
158
+ }
159
+ if (event.defaultPrevented) {
160
+ return;
161
+ }
162
+ if (shouldUseRouter && normalizedHref && event.button === 0 && // left-click only
163
+ !event.metaKey && !event.altKey && !event.ctrlKey && !event.shiftKey) {
164
+ if (typeof window !== "undefined") {
165
+ const handler = window.__opensiteNavigationHandler;
166
+ if (typeof handler === "function") {
167
+ try {
168
+ const handled = handler(normalizedHref, event.nativeEvent || event);
169
+ if (handled !== false) {
170
+ event.preventDefault();
171
+ }
172
+ } catch (error) {
173
+ console.error("Error in navigation handler:", error);
174
+ }
175
+ }
176
+ }
177
+ }
178
+ },
179
+ [onClick, shouldUseRouter, normalizedHref]
180
+ );
181
+ return {
182
+ linkType,
183
+ normalizedHref,
184
+ target,
185
+ rel,
186
+ isExternal,
187
+ isInternal,
188
+ shouldUseRouter,
189
+ handleClick
190
+ };
191
+ }
192
+ var baseStyles = [
193
+ // Layout
194
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap shrink-0",
195
+ // Typography - using CSS variables with sensible defaults
196
+ "font-[var(--button-font-family,inherit)]",
197
+ "font-[var(--button-font-weight,500)]",
198
+ "tracking-[var(--button-letter-spacing,0)]",
199
+ "leading-[var(--button-line-height,1.25)]",
200
+ "[text-transform:var(--button-text-transform,none)]",
201
+ "text-sm",
202
+ // Border radius
203
+ "rounded-[var(--button-radius,var(--radius,0.375rem))]",
204
+ // Smooth transition - using [transition:...] to set full shorthand property (not just transition-property)
205
+ "[transition:var(--button-transition,all_250ms_cubic-bezier(0.4,0,0.2,1))]",
206
+ // Box shadow (master level) - using [box-shadow:...] for complex multi-value shadows
207
+ "[box-shadow:var(--button-shadow,none)]",
208
+ "hover:[box-shadow:var(--button-shadow-hover,var(--button-shadow,none))]",
209
+ // Disabled state
210
+ "disabled:pointer-events-none disabled:opacity-50",
211
+ // SVG handling
212
+ "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0",
213
+ // Focus styles
214
+ "outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
215
+ // Invalid state
216
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
217
+ ].join(" ");
218
+ var buttonVariants = cva(baseStyles, {
219
+ variants: {
220
+ variant: {
221
+ // Default (Primary) variant - full customization
222
+ default: [
223
+ "bg-[var(--button-default-bg,hsl(var(--primary)))]",
224
+ "text-[var(--button-default-fg,hsl(var(--primary-foreground)))]",
225
+ "border-[length:var(--button-default-border-width,0px)]",
226
+ "border-[color:var(--button-default-border,transparent)]",
227
+ "[box-shadow:var(--button-default-shadow,var(--button-shadow,none))]",
228
+ "hover:bg-[var(--button-default-hover-bg,hsl(var(--primary)/0.9))]",
229
+ "hover:text-[var(--button-default-hover-fg,var(--button-default-fg,hsl(var(--primary-foreground))))]",
230
+ "hover:border-[color:var(--button-default-hover-border,var(--button-default-border,transparent))]",
231
+ "hover:[box-shadow:var(--button-default-shadow-hover,var(--button-shadow-hover,var(--button-default-shadow,var(--button-shadow,none))))]"
232
+ ].join(" "),
233
+ // Destructive variant - full customization
234
+ destructive: [
235
+ "bg-[var(--button-destructive-bg,hsl(var(--destructive)))]",
236
+ "text-[var(--button-destructive-fg,white)]",
237
+ "border-[length:var(--button-destructive-border-width,0px)]",
238
+ "border-[color:var(--button-destructive-border,transparent)]",
239
+ "[box-shadow:var(--button-destructive-shadow,var(--button-shadow,none))]",
240
+ "hover:bg-[var(--button-destructive-hover-bg,hsl(var(--destructive)/0.9))]",
241
+ "hover:text-[var(--button-destructive-hover-fg,var(--button-destructive-fg,white))]",
242
+ "hover:border-[color:var(--button-destructive-hover-border,var(--button-destructive-border,transparent))]",
243
+ "hover:[box-shadow:var(--button-destructive-shadow-hover,var(--button-shadow-hover,var(--button-destructive-shadow,var(--button-shadow,none))))]",
244
+ "focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
245
+ "dark:bg-destructive/60"
246
+ ].join(" "),
247
+ // Outline variant - full customization with proper border handling
248
+ outline: [
249
+ "bg-[var(--button-outline-bg,hsl(var(--background)))]",
250
+ "text-[var(--button-outline-fg,inherit)]",
251
+ "border-[length:var(--button-outline-border-width,1px)]",
252
+ "border-[color:var(--button-outline-border,hsl(var(--border)))]",
253
+ "[box-shadow:var(--button-outline-shadow,var(--button-shadow,0_1px_2px_0_rgb(0_0_0/0.05)))]",
254
+ "hover:bg-[var(--button-outline-hover-bg,hsl(var(--accent)))]",
255
+ "hover:text-[var(--button-outline-hover-fg,hsl(var(--accent-foreground)))]",
256
+ "hover:border-[color:var(--button-outline-hover-border,var(--button-outline-border,hsl(var(--border))))]",
257
+ "hover:[box-shadow:var(--button-outline-shadow-hover,var(--button-shadow-hover,var(--button-outline-shadow,var(--button-shadow,none))))]",
258
+ "dark:bg-input/30 dark:border-input dark:hover:bg-input/50"
259
+ ].join(" "),
260
+ // Secondary variant - full customization
261
+ secondary: [
262
+ "bg-[var(--button-secondary-bg,hsl(var(--secondary)))]",
263
+ "text-[var(--button-secondary-fg,hsl(var(--secondary-foreground)))]",
264
+ "border-[length:var(--button-secondary-border-width,0px)]",
265
+ "border-[color:var(--button-secondary-border,transparent)]",
266
+ "[box-shadow:var(--button-secondary-shadow,var(--button-shadow,none))]",
267
+ "hover:bg-[var(--button-secondary-hover-bg,hsl(var(--secondary)/0.8))]",
268
+ "hover:text-[var(--button-secondary-hover-fg,var(--button-secondary-fg,hsl(var(--secondary-foreground))))]",
269
+ "hover:border-[color:var(--button-secondary-hover-border,var(--button-secondary-border,transparent))]",
270
+ "hover:[box-shadow:var(--button-secondary-shadow-hover,var(--button-shadow-hover,var(--button-secondary-shadow,var(--button-shadow,none))))]"
271
+ ].join(" "),
272
+ // Ghost variant - full customization
273
+ ghost: [
274
+ "bg-[var(--button-ghost-bg,transparent)]",
275
+ "text-[var(--button-ghost-fg,inherit)]",
276
+ "border-[length:var(--button-ghost-border-width,0px)]",
277
+ "border-[color:var(--button-ghost-border,transparent)]",
278
+ "[box-shadow:var(--button-ghost-shadow,var(--button-shadow,none))]",
279
+ "hover:bg-[var(--button-ghost-hover-bg,hsl(var(--accent)))]",
280
+ "hover:text-[var(--button-ghost-hover-fg,hsl(var(--accent-foreground)))]",
281
+ "hover:border-[color:var(--button-ghost-hover-border,var(--button-ghost-border,transparent))]",
282
+ "hover:[box-shadow:var(--button-ghost-shadow-hover,var(--button-shadow-hover,var(--button-ghost-shadow,var(--button-shadow,none))))]",
283
+ "dark:hover:bg-accent/50"
284
+ ].join(" "),
285
+ // Link variant - full customization
286
+ link: [
287
+ "bg-[var(--button-link-bg,transparent)]",
288
+ "text-[var(--button-link-fg,hsl(var(--primary)))]",
289
+ "border-[length:var(--button-link-border-width,0px)]",
290
+ "border-[color:var(--button-link-border,transparent)]",
291
+ "[box-shadow:var(--button-link-shadow,none)]",
292
+ "hover:bg-[var(--button-link-hover-bg,transparent)]",
293
+ "hover:text-[var(--button-link-hover-fg,var(--button-link-fg,hsl(var(--primary))))]",
294
+ "hover:[box-shadow:var(--button-link-shadow-hover,none)]",
295
+ "underline-offset-4 hover:underline"
296
+ ].join(" ")
297
+ },
298
+ size: {
299
+ default: [
300
+ "h-[var(--button-height-md,2.25rem)]",
301
+ "px-[var(--button-padding-x-md,1rem)]",
302
+ "py-[var(--button-padding-y-md,0.5rem)]",
303
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
304
+ ].join(" "),
305
+ sm: [
306
+ "h-[var(--button-height-sm,2rem)]",
307
+ "px-[var(--button-padding-x-sm,0.75rem)]",
308
+ "py-[var(--button-padding-y-sm,0.25rem)]",
309
+ "gap-1.5",
310
+ "has-[>svg]:px-[calc(var(--button-padding-x-sm,0.75rem)*0.83)]"
311
+ ].join(" "),
312
+ md: [
313
+ "h-[var(--button-height-md,2.25rem)]",
314
+ "px-[var(--button-padding-x-md,1rem)]",
315
+ "py-[var(--button-padding-y-md,0.5rem)]",
316
+ "has-[>svg]:px-[calc(var(--button-padding-x-md,1rem)*0.75)]"
317
+ ].join(" "),
318
+ lg: [
319
+ "h-[var(--button-height-lg,2.5rem)]",
320
+ "px-[var(--button-padding-x-lg,1.5rem)]",
321
+ "py-[var(--button-padding-y-lg,0.5rem)]",
322
+ "has-[>svg]:px-[calc(var(--button-padding-x-lg,1.5rem)*0.67)]"
323
+ ].join(" "),
324
+ icon: "size-[var(--button-height-md,2.25rem)]",
325
+ "icon-sm": "size-[var(--button-height-sm,2rem)]",
326
+ "icon-lg": "size-[var(--button-height-lg,2.5rem)]"
327
+ }
328
+ },
329
+ defaultVariants: {
330
+ variant: "default",
331
+ size: "default"
332
+ }
333
+ });
334
+ var Pressable = React.forwardRef(
335
+ ({
336
+ children,
337
+ className,
338
+ href,
339
+ onClick,
340
+ variant,
341
+ size,
342
+ asButton = false,
343
+ fallbackComponentType = "span",
344
+ componentType,
345
+ "aria-label": ariaLabel,
346
+ "aria-describedby": ariaDescribedby,
347
+ id,
348
+ ...props
349
+ }, ref) => {
350
+ const navigation = useNavigation({ href, onClick });
351
+ const {
352
+ normalizedHref,
353
+ target,
354
+ rel,
355
+ linkType,
356
+ isInternal,
357
+ handleClick
358
+ } = navigation;
359
+ const shouldRenderLink = normalizedHref && linkType !== "none";
360
+ const shouldRenderButton = !shouldRenderLink && onClick;
361
+ const effectiveComponentType = componentType || (shouldRenderLink ? "a" : shouldRenderButton ? "button" : fallbackComponentType);
362
+ const finalComponentType = isInternal && shouldRenderLink ? "a" : effectiveComponentType;
363
+ const shouldApplyButtonStyles = asButton || variant || size;
364
+ const combinedClassName = cn(
365
+ shouldApplyButtonStyles && buttonVariants({ variant, size }),
366
+ className
367
+ );
368
+ const dataProps = Object.fromEntries(
369
+ Object.entries(props).filter(([key]) => key.startsWith("data-"))
370
+ );
371
+ const buttonDataAttributes = shouldApplyButtonStyles ? {
372
+ "data-slot": "button",
373
+ "data-variant": variant ?? "default",
374
+ "data-size": size ?? "default"
375
+ } : {};
376
+ const commonProps = {
377
+ className: combinedClassName,
378
+ onClick: handleClick,
379
+ "aria-label": ariaLabel,
380
+ "aria-describedby": ariaDescribedby,
381
+ id,
382
+ ...dataProps,
383
+ ...buttonDataAttributes
384
+ };
385
+ if (finalComponentType === "a" && shouldRenderLink) {
386
+ return /* @__PURE__ */ jsx(
387
+ "a",
388
+ {
389
+ ref,
390
+ href: normalizedHref,
391
+ target,
392
+ rel,
393
+ ...commonProps,
394
+ ...props,
395
+ children
396
+ }
397
+ );
398
+ }
399
+ if (finalComponentType === "button") {
400
+ return /* @__PURE__ */ jsx(
401
+ "button",
402
+ {
403
+ ref,
404
+ type: props.type || "button",
405
+ ...commonProps,
406
+ ...props,
407
+ children
408
+ }
409
+ );
410
+ }
411
+ if (finalComponentType === "div") {
412
+ return /* @__PURE__ */ jsx(
413
+ "div",
414
+ {
415
+ ref,
416
+ ...commonProps,
417
+ children
418
+ }
419
+ );
420
+ }
421
+ return /* @__PURE__ */ jsx(
422
+ "span",
423
+ {
424
+ ref,
425
+ ...commonProps,
426
+ children
427
+ }
428
+ );
429
+ }
430
+ );
431
+ Pressable.displayName = "Pressable";
432
+ var svgCache = /* @__PURE__ */ new Map();
433
+ function DynamicIcon({
434
+ name,
435
+ size = 28,
436
+ color,
437
+ className,
438
+ alt
439
+ }) {
440
+ const [svgContent, setSvgContent] = React.useState(null);
441
+ const [isLoading, setIsLoading] = React.useState(true);
442
+ const [error, setError] = React.useState(null);
443
+ const { url, iconName } = React.useMemo(() => {
444
+ const separator = name.includes("/") ? "/" : ":";
445
+ const [prefix, iconName2] = name.split(separator);
446
+ const baseUrl = `https://icons.opensite.ai/api/icon/${prefix}/${iconName2}?format=svg&width=${size}&height=${size}`;
447
+ return {
448
+ url: baseUrl,
449
+ iconName: iconName2
450
+ };
451
+ }, [name, size]);
452
+ React.useEffect(() => {
453
+ let isMounted = true;
454
+ const fetchSvg = async () => {
455
+ const cached = svgCache.get(url);
456
+ if (cached) {
457
+ if (isMounted) {
458
+ setSvgContent(cached);
459
+ setIsLoading(false);
460
+ }
461
+ return;
462
+ }
463
+ try {
464
+ setIsLoading(true);
465
+ setError(null);
466
+ const response = await fetch(url);
467
+ if (!response.ok) {
468
+ throw new Error(`Failed to fetch icon: ${response.status}`);
469
+ }
470
+ let svg = await response.text();
471
+ svg = processSvgForCurrentColor(svg);
472
+ svgCache.set(url, svg);
473
+ if (isMounted) {
474
+ setSvgContent(svg);
475
+ setIsLoading(false);
476
+ }
477
+ } catch (err) {
478
+ if (isMounted) {
479
+ setError(err instanceof Error ? err.message : "Failed to load icon");
480
+ setIsLoading(false);
481
+ }
482
+ }
483
+ };
484
+ fetchSvg();
485
+ return () => {
486
+ isMounted = false;
487
+ };
488
+ }, [url]);
489
+ if (isLoading) {
490
+ return /* @__PURE__ */ jsx(
491
+ "span",
492
+ {
493
+ className: cn("inline-block", className),
494
+ style: { width: size, height: size },
495
+ "aria-hidden": "true"
496
+ }
497
+ );
498
+ }
499
+ if (error || !svgContent) {
500
+ return /* @__PURE__ */ jsx(
501
+ "span",
502
+ {
503
+ className: cn("inline-block", className),
504
+ style: { width: size, height: size },
505
+ role: "img",
506
+ "aria-label": alt || iconName
507
+ }
508
+ );
509
+ }
510
+ return /* @__PURE__ */ jsx(
511
+ "span",
512
+ {
513
+ className: cn("inline-flex items-center justify-center", className),
514
+ style: {
515
+ width: size,
516
+ height: size,
517
+ color: color || "inherit"
518
+ },
519
+ role: "img",
520
+ "aria-label": alt || iconName,
521
+ dangerouslySetInnerHTML: { __html: svgContent }
522
+ }
523
+ );
524
+ }
525
+ function processSvgForCurrentColor(svg) {
526
+ let processed = svg;
527
+ processed = processed.replace(
528
+ /stroke=["'](#000000|#000|black)["']/gi,
529
+ 'stroke="currentColor"'
530
+ );
531
+ processed = processed.replace(
532
+ /fill=["'](#000000|#000|black)["']/gi,
533
+ 'fill="currentColor"'
534
+ );
535
+ return processed;
536
+ }
537
+ var maxWidthStyles = {
538
+ sm: "max-w-screen-sm",
539
+ md: "max-w-screen-md",
540
+ lg: "max-w-screen-lg",
541
+ xl: "max-w-7xl",
542
+ "2xl": "max-w-screen-2xl",
543
+ "4xl": "max-w-[1536px]",
544
+ full: "max-w-full"
545
+ };
546
+ var Container = React__default.forwardRef(
547
+ ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
548
+ const Component = as;
549
+ return /* @__PURE__ */ jsx(
550
+ Component,
551
+ {
552
+ ref,
553
+ className: cn(
554
+ "mx-auto w-full px-2 sm:px-4 lg:px-8",
555
+ maxWidthStyles[maxWidth],
556
+ className
557
+ ),
558
+ ...props,
559
+ children
560
+ }
561
+ );
562
+ }
563
+ );
564
+ Container.displayName = "Container";
565
+
566
+ // lib/patternSvgs.ts
567
+ var patternSvgs = {
568
+ squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
569
+ grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
570
+ noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
571
+ dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
572
+ dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
573
+ dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
574
+ circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
575
+ waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
576
+ crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
577
+ architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
578
+ tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
579
+ p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
580
+ };
581
+ var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
582
+ var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
583
+ var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
584
+ var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
585
+ var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
586
+ var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
587
+ var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
588
+ var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxs(
589
+ "svg",
590
+ {
591
+ className: "h-full w-full",
592
+ xmlns: "http://www.w3.org/2000/svg",
593
+ style: mask ? {
594
+ maskImage: mask,
595
+ WebkitMaskImage: mask
596
+ } : void 0,
597
+ children: [
598
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
599
+ "pattern",
600
+ {
601
+ id,
602
+ x: "0",
603
+ y: "0",
604
+ width: "100",
605
+ height: "100",
606
+ patternUnits: "userSpaceOnUse",
607
+ children: [
608
+ /* @__PURE__ */ jsx(
609
+ "path",
610
+ {
611
+ d: "M0 50h40M60 50h40M50 0v40M50 60v40",
612
+ stroke: "hsl(var(--muted))",
613
+ strokeWidth: "1",
614
+ fill: "none"
615
+ }
616
+ ),
617
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
618
+ /* @__PURE__ */ jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
619
+ /* @__PURE__ */ jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
620
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
621
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
622
+ ]
623
+ }
624
+ ) }),
625
+ /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
626
+ ]
627
+ }
628
+ );
629
+ var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxs(
630
+ "svg",
631
+ {
632
+ className: "h-full w-full",
633
+ xmlns: "http://www.w3.org/2000/svg",
634
+ style: mask ? {
635
+ maskImage: mask,
636
+ WebkitMaskImage: mask
637
+ } : void 0,
638
+ children: [
639
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
640
+ "pattern",
641
+ {
642
+ id,
643
+ x: "0",
644
+ y: "0",
645
+ width: "40",
646
+ height: "40",
647
+ patternUnits: "userSpaceOnUse",
648
+ children: [
649
+ /* @__PURE__ */ jsx(
650
+ "path",
651
+ {
652
+ d: "M0 20h40M20 0v40",
653
+ stroke: "hsl(var(--muted))",
654
+ strokeWidth: "0.5",
655
+ fill: "none"
656
+ }
657
+ ),
658
+ /* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
659
+ ]
660
+ }
661
+ ) }),
662
+ /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
663
+ ]
664
+ }
665
+ );
666
+ var gridPattern = (size, mask) => /* @__PURE__ */ jsx(
667
+ "div",
668
+ {
669
+ 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)]",
670
+ style: {
671
+ backgroundSize: `${size}px ${size}px`,
672
+ ...mask ? {
673
+ maskImage: mask,
674
+ WebkitMaskImage: mask
675
+ } : {}
676
+ }
677
+ }
678
+ );
679
+ var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsx(
680
+ "div",
681
+ {
682
+ className: "h-full w-full",
683
+ style: {
684
+ 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)",
685
+ ...mask ? {
686
+ maskImage: mask,
687
+ WebkitMaskImage: mask
688
+ } : {}
689
+ }
690
+ }
691
+ );
692
+ 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)";
693
+ var dashedGridPattern = (fadeMask) => {
694
+ const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
695
+ return /* @__PURE__ */ jsx(
696
+ "div",
697
+ {
698
+ className: "h-full w-full",
699
+ style: {
700
+ backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
701
+ backgroundSize: "20px 20px",
702
+ backgroundPosition: "0 0, 0 0",
703
+ maskImage: mask,
704
+ WebkitMaskImage: mask,
705
+ maskComposite: "intersect",
706
+ WebkitMaskComposite: "source-in"
707
+ }
708
+ }
709
+ );
710
+ };
711
+ var gradientGlow = (position) => /* @__PURE__ */ jsx(
712
+ "div",
713
+ {
714
+ className: cn(
715
+ "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
716
+ position === "top" ? "-top-1/4" : "-bottom-1/4"
717
+ ),
718
+ style: {
719
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
720
+ }
721
+ }
722
+ );
723
+ var spotlight = (position) => /* @__PURE__ */ jsx(
724
+ "div",
725
+ {
726
+ className: cn(
727
+ "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
728
+ position === "left" ? "-left-1/4" : "-right-1/4"
729
+ ),
730
+ style: {
731
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
732
+ }
733
+ }
734
+ );
735
+ var patternOverlays = {
736
+ circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
737
+ circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
738
+ circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
739
+ circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
740
+ circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
741
+ circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
742
+ circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
743
+ circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
744
+ dashedGridBasic: () => dashedGridPattern(),
745
+ dashedGridFadeTop: () => dashedGridPattern(maskTop),
746
+ dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
747
+ dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
748
+ dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
749
+ dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
750
+ dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
751
+ dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
752
+ diagonalCrossBasic: () => diagonalCrossPattern(),
753
+ diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
754
+ diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
755
+ diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
756
+ diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
757
+ diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
758
+ diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
759
+ diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
760
+ gridBasic: () => gridPattern(40),
761
+ gridFadeTop: () => gridPattern(32, maskTop),
762
+ gridFadeBottom: () => gridPattern(32, maskBottom),
763
+ gridFadeCenter: () => gridPattern(40, maskCenter),
764
+ gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
765
+ gridFadeTopRight: () => gridPattern(32, maskTopRight),
766
+ gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
767
+ gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
768
+ gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
769
+ gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
770
+ gradientGlowTop: () => gradientGlow("top"),
771
+ gradientGlowBottom: () => gradientGlow("bottom"),
772
+ spotlightLeft: () => spotlight("left"),
773
+ spotlightRight: () => spotlight("right")
774
+ };
775
+ var inlinePatternStyles = {
776
+ radialGradientTop: {
777
+ background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
778
+ },
779
+ radialGradientBottom: {
780
+ background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
781
+ }
782
+ };
783
+ function PatternBackground({
784
+ pattern,
785
+ opacity = 0.08,
786
+ className,
787
+ style
788
+ }) {
789
+ if (!pattern) {
790
+ return null;
791
+ }
792
+ if (pattern in inlinePatternStyles) {
793
+ const inlineStyle = inlinePatternStyles[pattern];
794
+ return /* @__PURE__ */ jsx(
795
+ "div",
796
+ {
797
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
798
+ style: { ...inlineStyle, opacity, ...style },
799
+ "aria-hidden": "true"
800
+ }
801
+ );
802
+ }
803
+ if (pattern in patternOverlays) {
804
+ const Overlay = patternOverlays[pattern];
805
+ return /* @__PURE__ */ jsx(
806
+ "div",
807
+ {
808
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
809
+ style: { opacity, ...style },
810
+ "aria-hidden": "true",
811
+ children: Overlay()
812
+ }
813
+ );
814
+ }
815
+ const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
816
+ return /* @__PURE__ */ jsx(
817
+ "div",
818
+ {
819
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
820
+ style: {
821
+ backgroundImage: `url(${patternUrl})`,
822
+ backgroundRepeat: "repeat",
823
+ backgroundSize: "auto",
824
+ opacity,
825
+ ...style
826
+ },
827
+ "aria-hidden": "true"
828
+ }
829
+ );
830
+ }
831
+ var backgroundStyles = {
832
+ default: "bg-background text-foreground",
833
+ white: "bg-white text-dark",
834
+ gray: "bg-muted/30 text-foreground",
835
+ dark: "bg-foreground text-background",
836
+ transparent: "bg-transparent text-foreground",
837
+ gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
838
+ primary: "bg-primary text-primary-foreground",
839
+ secondary: "bg-secondary text-secondary-foreground",
840
+ muted: "bg-muted text-muted-foreground"
841
+ };
842
+ var spacingStyles = {
843
+ none: "py-0 md:py-0",
844
+ sm: "py-12 md:py-16",
845
+ md: "py-16 md:py-24",
846
+ lg: "py-20 md:py-32",
847
+ xl: "py-24 md:py-40"
848
+ };
849
+ var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
850
+ var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
851
+ var Section = React__default.forwardRef(
852
+ ({
853
+ id,
854
+ title,
855
+ subtitle,
856
+ children,
857
+ className,
858
+ style,
859
+ background = "default",
860
+ spacing = "lg",
861
+ pattern,
862
+ patternOpacity,
863
+ patternClassName,
864
+ containerClassName,
865
+ containerMaxWidth = "xl",
866
+ ...props
867
+ }, ref) => {
868
+ const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
869
+ return /* @__PURE__ */ jsxs(
870
+ "section",
871
+ {
872
+ ref,
873
+ id,
874
+ className: cn(
875
+ "relative",
876
+ pattern ? "overflow-hidden" : null,
877
+ backgroundStyles[background],
878
+ isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
879
+ className
880
+ ),
881
+ style,
882
+ ...props,
883
+ children: [
884
+ /* @__PURE__ */ jsx(
885
+ PatternBackground,
886
+ {
887
+ pattern,
888
+ opacity: effectivePatternOpacity,
889
+ className: patternClassName
890
+ }
891
+ ),
892
+ /* @__PURE__ */ jsxs(
893
+ Container,
894
+ {
895
+ maxWidth: containerMaxWidth,
896
+ className: cn("relative z-10", containerClassName),
897
+ children: [
898
+ (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "mb-12 text-center md:mb-16", children: [
899
+ subtitle && /* @__PURE__ */ jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider text-primary", children: subtitle }),
900
+ title && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
901
+ ] }),
902
+ children
903
+ ]
904
+ }
905
+ )
906
+ ]
907
+ }
908
+ );
909
+ }
910
+ );
911
+ Section.displayName = "Section";
912
+ function CarouselPortfolioHero({
913
+ slides,
914
+ slidesSlot,
915
+ actions,
916
+ actionsSlot,
917
+ autoPlayInterval = 5e3,
918
+ className,
919
+ containerClassName,
920
+ contentClassName,
921
+ tagClassName,
922
+ titleClassName,
923
+ descriptionClassName,
924
+ actionsClassName,
925
+ navigationClassName,
926
+ counterClassName,
927
+ optixFlowConfig,
928
+ background = "white",
929
+ spacing = "xl",
930
+ pattern,
931
+ patternOpacity
932
+ }) {
933
+ const [currentIndex, setCurrentIndex] = React.useState(0);
934
+ const goToNext = React.useCallback(() => {
935
+ setCurrentIndex((prevIndex) => (prevIndex + 1) % (slides?.length ?? 1));
936
+ }, [slides?.length]);
937
+ const goToPrev = React.useCallback(() => {
938
+ setCurrentIndex(
939
+ (prevIndex) => (prevIndex - 1 + (slides?.length ?? 1)) % (slides?.length ?? 1)
940
+ );
941
+ }, [slides?.length]);
942
+ React.useEffect(() => {
943
+ const interval = setInterval(goToNext, autoPlayInterval);
944
+ return () => clearInterval(interval);
945
+ }, [goToNext, autoPlayInterval]);
946
+ const renderActions = () => {
947
+ if (actionsSlot) return actionsSlot;
948
+ if (!actions || actions.length === 0) return null;
949
+ return actions.map((action, index) => {
950
+ const { label, icon, iconAfter, children, className: actionClassName, ...pressableProps } = action;
951
+ return /* @__PURE__ */ jsx(
952
+ Pressable,
953
+ {
954
+ asButton: true,
955
+ className: actionClassName,
956
+ ...pressableProps,
957
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
958
+ icon,
959
+ label,
960
+ iconAfter
961
+ ] })
962
+ },
963
+ index
964
+ );
965
+ });
966
+ };
967
+ const currentSlide = slides?.[currentIndex];
968
+ return /* @__PURE__ */ jsxs(
969
+ Section,
970
+ {
971
+ background,
972
+ spacing,
973
+ className: cn("relative h-screen w-full overflow-hidden", className),
974
+ pattern,
975
+ patternOpacity,
976
+ children: [
977
+ slidesSlot ? slidesSlot : slides?.map((slide, index) => /* @__PURE__ */ jsxs(
978
+ "div",
979
+ {
980
+ className: cn(
981
+ "absolute inset-0 h-full w-full transition-opacity duration-1000",
982
+ index === currentIndex ? "opacity-100" : "opacity-0",
983
+ slide.className
984
+ ),
985
+ children: [
986
+ /* @__PURE__ */ jsx(
987
+ Img,
988
+ {
989
+ src: slide.image,
990
+ alt: typeof slide.title === "string" ? slide.title : `Slide ${index + 1}`,
991
+ className: cn("h-full w-full object-cover", slide.imageClassName),
992
+ optixFlowConfig
993
+ }
994
+ ),
995
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/80 via-black/40 to-transparent" })
996
+ ]
997
+ },
998
+ slide.id
999
+ )),
1000
+ /* @__PURE__ */ jsx("div", { className: cn("relative z-10 flex h-full w-full flex-col justify-end p-4 pb-16 text-white sm:p-8 md:p-12", containerClassName), children: /* @__PURE__ */ jsx("div", { className: "container mx-auto", children: /* @__PURE__ */ jsxs("div", { className: cn("max-w-3xl", contentClassName), children: [
1001
+ currentSlide?.tag && /* @__PURE__ */ jsx("div", { className: "mb-4", children: typeof currentSlide.tag === "string" ? /* @__PURE__ */ jsx("span", { className: cn("inline-block rounded-full bg-primary px-3 py-1 text-sm font-medium", tagClassName), children: currentSlide.tag }) : /* @__PURE__ */ jsx("div", { className: tagClassName, children: currentSlide.tag }) }),
1002
+ currentSlide?.title && (typeof currentSlide.title === "string" ? /* @__PURE__ */ jsx("h1", { className: cn("text-4xl font-bold sm:text-5xl md:text-6xl", titleClassName), children: currentSlide.title }) : /* @__PURE__ */ jsx("div", { className: titleClassName, children: currentSlide.title })),
1003
+ currentSlide?.description && (typeof currentSlide.description === "string" ? /* @__PURE__ */ jsx("p", { className: cn("mt-4 text-lg text-white/80 sm:text-xl md:max-w-2xl", descriptionClassName), children: currentSlide.description }) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: currentSlide.description })),
1004
+ /* @__PURE__ */ jsxs("div", { className: cn("mt-8 flex items-center gap-4", actionsClassName), children: [
1005
+ renderActions(),
1006
+ /* @__PURE__ */ jsxs("div", { className: cn("ml-auto flex items-center gap-2", navigationClassName), children: [
1007
+ /* @__PURE__ */ jsx(
1008
+ Pressable,
1009
+ {
1010
+ variant: "outline",
1011
+ size: "icon",
1012
+ className: "rounded-full border-white/40 bg-black/30 text-white hover:bg-black/50 hover:text-white",
1013
+ onClick: goToPrev,
1014
+ asButton: true,
1015
+ children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-left", size: 20 })
1016
+ }
1017
+ ),
1018
+ /* @__PURE__ */ jsx(
1019
+ Pressable,
1020
+ {
1021
+ variant: "outline",
1022
+ size: "icon",
1023
+ className: "rounded-full border-white/40 bg-black/30 text-white hover:bg-black/50 hover:text-white",
1024
+ onClick: goToNext,
1025
+ asButton: true,
1026
+ children: /* @__PURE__ */ jsx(DynamicIcon, { name: "lucide/chevron-right", size: 20 })
1027
+ }
1028
+ ),
1029
+ /* @__PURE__ */ jsxs("div", { className: cn("ml-3 text-sm text-white/80", counterClassName), children: [
1030
+ currentIndex + 1,
1031
+ " / ",
1032
+ slides?.length ?? 0
1033
+ ] })
1034
+ ] })
1035
+ ] })
1036
+ ] }) }) })
1037
+ ]
1038
+ }
1039
+ );
1040
+ }
1041
+
1042
+ export { CarouselPortfolioHero };