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