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