@opensite/ui 1.3.2 → 1.3.4

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