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