@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,1081 @@
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-simple-card.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
+ function Card({ className, ...props }) {
537
+ return /* @__PURE__ */ jsx(
538
+ "div",
539
+ {
540
+ "data-slot": "card",
541
+ className: cn(
542
+ "bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
543
+ className
544
+ ),
545
+ ...props
546
+ }
547
+ );
548
+ }
549
+ var maxWidthStyles = {
550
+ sm: "max-w-screen-sm",
551
+ md: "max-w-screen-md",
552
+ lg: "max-w-screen-lg",
553
+ xl: "max-w-7xl",
554
+ "2xl": "max-w-screen-2xl",
555
+ "4xl": "max-w-[1536px]",
556
+ full: "max-w-full"
557
+ };
558
+ var Container = React__default.forwardRef(
559
+ ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
560
+ const Component = as;
561
+ return /* @__PURE__ */ jsx(
562
+ Component,
563
+ {
564
+ ref,
565
+ className: cn(
566
+ "mx-auto w-full px-2 sm:px-4 lg:px-8",
567
+ maxWidthStyles[maxWidth],
568
+ className
569
+ ),
570
+ ...props,
571
+ children
572
+ }
573
+ );
574
+ }
575
+ );
576
+ Container.displayName = "Container";
577
+
578
+ // lib/patternSvgs.ts
579
+ var patternSvgs = {
580
+ squareAltGrid: "https://cdn.ing/assets/files/record/286187/4gpn0yq2ptra8iwlvmwwv860ggwv",
581
+ grid1: "https://cdn.ing/assets/files/record/286186/nbdflpgp4ostrno079hygibsflp3",
582
+ noise: "https://cdn.ing/assets/i/r/286188/zrqcp9hynh3j7p2laihwzfbujgrl/noise.png",
583
+ dots: "https://cdn.ing/assets/files/record/286198/yfsjx9thvtxzhl2qtshxyhkrm524",
584
+ dotPattern: "https://cdn.ing/assets/files/record/286192/7ig0cku8aqbboiza8nuk6hw0nnsr",
585
+ dotPattern2: "https://cdn.ing/assets/files/record/286189/arez6gd2s7isn9i1o6c7sexdq7bl",
586
+ circles: "https://cdn.ing/assets/files/record/286190/gtmia3sncjtzetdshc20zf1d3c17",
587
+ waves: "https://cdn.ing/assets/files/record/286191/mqlb33fzxz9cdth1bx7if0wmpkp1",
588
+ crossPattern: "https://cdn.ing/assets/files/record/286193/9yfqwdbnqaipbp7fsb3wbzzmq472",
589
+ architect: "https://cdn.ing/assets/files/record/286194/vgs88ugpvyhxu13wqgy0acvae6re",
590
+ tinyCheckers: "https://cdn.ing/assets/files/record/286195/65efaknsw8kcpf9o3c2gybytsl5b",
591
+ p6: "https://cdn.ing/assets/i/r/286196/6kl0rqnd6mjk8j7e525fo8fo0vkc/p6.webp"
592
+ };
593
+ var maskTop = "radial-gradient(ellipse 70% 60% at 50% 0%, #000 60%, transparent 100%)";
594
+ var maskBottom = "radial-gradient(ellipse 100% 80% at 50% 100%, #000 50%, transparent 90%)";
595
+ var maskCenter = "radial-gradient(ellipse 60% 60% at 50% 50%, #000 30%, transparent 70%)";
596
+ var maskTopLeft = "radial-gradient(ellipse 80% 80% at 0% 0%, #000 50%, transparent 90%)";
597
+ var maskTopRight = "radial-gradient(ellipse 80% 80% at 100% 0%, #000 50%, transparent 90%)";
598
+ var maskBottomLeft = "radial-gradient(ellipse 80% 80% at 0% 100%, #000 50%, transparent 90%)";
599
+ var maskBottomRight = "radial-gradient(ellipse 80% 80% at 100% 100%, #000 50%, transparent 90%)";
600
+ var circuitBoardPattern = (id, mask) => /* @__PURE__ */ jsxs(
601
+ "svg",
602
+ {
603
+ className: "h-full w-full",
604
+ xmlns: "http://www.w3.org/2000/svg",
605
+ style: mask ? {
606
+ maskImage: mask,
607
+ WebkitMaskImage: mask
608
+ } : void 0,
609
+ children: [
610
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
611
+ "pattern",
612
+ {
613
+ id,
614
+ x: "0",
615
+ y: "0",
616
+ width: "100",
617
+ height: "100",
618
+ patternUnits: "userSpaceOnUse",
619
+ children: [
620
+ /* @__PURE__ */ jsx(
621
+ "path",
622
+ {
623
+ d: "M0 50h40M60 50h40M50 0v40M50 60v40",
624
+ stroke: "hsl(var(--muted))",
625
+ strokeWidth: "1",
626
+ fill: "none"
627
+ }
628
+ ),
629
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "50", r: "3", fill: "hsl(var(--muted))" }),
630
+ /* @__PURE__ */ jsx("circle", { cx: "0", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
631
+ /* @__PURE__ */ jsx("circle", { cx: "100", cy: "50", r: "2", fill: "hsl(var(--muted))" }),
632
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "0", r: "2", fill: "hsl(var(--muted))" }),
633
+ /* @__PURE__ */ jsx("circle", { cx: "50", cy: "100", r: "2", fill: "hsl(var(--muted))" })
634
+ ]
635
+ }
636
+ ) }),
637
+ /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
638
+ ]
639
+ }
640
+ );
641
+ var gridDotsPattern = (id, mask) => /* @__PURE__ */ jsxs(
642
+ "svg",
643
+ {
644
+ className: "h-full w-full",
645
+ xmlns: "http://www.w3.org/2000/svg",
646
+ style: mask ? {
647
+ maskImage: mask,
648
+ WebkitMaskImage: mask
649
+ } : void 0,
650
+ children: [
651
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
652
+ "pattern",
653
+ {
654
+ id,
655
+ x: "0",
656
+ y: "0",
657
+ width: "40",
658
+ height: "40",
659
+ patternUnits: "userSpaceOnUse",
660
+ children: [
661
+ /* @__PURE__ */ jsx(
662
+ "path",
663
+ {
664
+ d: "M0 20h40M20 0v40",
665
+ stroke: "hsl(var(--muted))",
666
+ strokeWidth: "0.5",
667
+ fill: "none"
668
+ }
669
+ ),
670
+ /* @__PURE__ */ jsx("circle", { cx: "20", cy: "20", r: "2", fill: "hsl(var(--muted))" })
671
+ ]
672
+ }
673
+ ) }),
674
+ /* @__PURE__ */ jsx("rect", { width: "100%", height: "100%", fill: `url(#${id})` })
675
+ ]
676
+ }
677
+ );
678
+ var gridPattern = (size, mask) => /* @__PURE__ */ jsx(
679
+ "div",
680
+ {
681
+ 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)]",
682
+ style: {
683
+ backgroundSize: `${size}px ${size}px`,
684
+ ...mask ? {
685
+ maskImage: mask,
686
+ WebkitMaskImage: mask
687
+ } : {}
688
+ }
689
+ }
690
+ );
691
+ var diagonalCrossPattern = (mask) => /* @__PURE__ */ jsx(
692
+ "div",
693
+ {
694
+ className: "h-full w-full",
695
+ style: {
696
+ 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)",
697
+ ...mask ? {
698
+ maskImage: mask,
699
+ WebkitMaskImage: mask
700
+ } : {}
701
+ }
702
+ }
703
+ );
704
+ 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)";
705
+ var dashedGridPattern = (fadeMask) => {
706
+ const mask = fadeMask ? `${dashedGridMaskBase}, ${fadeMask}` : dashedGridMaskBase;
707
+ return /* @__PURE__ */ jsx(
708
+ "div",
709
+ {
710
+ className: "h-full w-full",
711
+ style: {
712
+ backgroundImage: "linear-gradient(to right, hsl(var(--muted)) 1px, transparent 1px), linear-gradient(to bottom, hsl(var(--muted)) 1px, transparent 1px)",
713
+ backgroundSize: "20px 20px",
714
+ backgroundPosition: "0 0, 0 0",
715
+ maskImage: mask,
716
+ WebkitMaskImage: mask,
717
+ maskComposite: "intersect",
718
+ WebkitMaskComposite: "source-in"
719
+ }
720
+ }
721
+ );
722
+ };
723
+ var gradientGlow = (position) => /* @__PURE__ */ jsx(
724
+ "div",
725
+ {
726
+ className: cn(
727
+ "pointer-events-none absolute left-1/2 z-0 aspect-square w-3/4 -translate-x-1/2 rounded-full opacity-50 blur-3xl",
728
+ position === "top" ? "-top-1/4" : "-bottom-1/4"
729
+ ),
730
+ style: {
731
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
732
+ }
733
+ }
734
+ );
735
+ var spotlight = (position) => /* @__PURE__ */ jsx(
736
+ "div",
737
+ {
738
+ className: cn(
739
+ "pointer-events-none absolute top-1/2 z-0 aspect-square w-3/4 -translate-y-1/2 rounded-full opacity-40 blur-3xl",
740
+ position === "left" ? "-left-1/4" : "-right-1/4"
741
+ ),
742
+ style: {
743
+ background: "radial-gradient(circle, hsl(var(--primary)) 0%, transparent 70%)"
744
+ }
745
+ }
746
+ );
747
+ var patternOverlays = {
748
+ circuitBoardBasic: () => circuitBoardPattern("circuit-board-basic"),
749
+ circuitBoardFadeTop: () => circuitBoardPattern("circuit-board-fade-top", maskTop),
750
+ circuitBoardFadeBottom: () => circuitBoardPattern("circuit-board-fade-bottom", maskBottom),
751
+ circuitBoardFadeCenter: () => circuitBoardPattern("circuit-board-fade-center", maskCenter),
752
+ circuitBoardFadeTopLeft: () => circuitBoardPattern("circuit-board-fade-top-left", maskTopLeft),
753
+ circuitBoardFadeTopRight: () => circuitBoardPattern("circuit-board-fade-top-right", maskTopRight),
754
+ circuitBoardFadeBottomLeft: () => circuitBoardPattern("circuit-board-fade-bottom-left", maskBottomLeft),
755
+ circuitBoardFadeBottomRight: () => circuitBoardPattern("circuit-board-fade-bottom-right", maskBottomRight),
756
+ dashedGridBasic: () => dashedGridPattern(),
757
+ dashedGridFadeTop: () => dashedGridPattern(maskTop),
758
+ dashedGridFadeBottom: () => dashedGridPattern(maskBottom),
759
+ dashedGridFadeCenter: () => dashedGridPattern(maskCenter),
760
+ dashedGridFadeTopLeft: () => dashedGridPattern(maskTopLeft),
761
+ dashedGridFadeTopRight: () => dashedGridPattern(maskTopRight),
762
+ dashedGridFadeBottomLeft: () => dashedGridPattern(maskBottomLeft),
763
+ dashedGridFadeBottomRight: () => dashedGridPattern(maskBottomRight),
764
+ diagonalCrossBasic: () => diagonalCrossPattern(),
765
+ diagonalCrossFadeTop: () => diagonalCrossPattern(maskTop),
766
+ diagonalCrossFadeBottom: () => diagonalCrossPattern(maskBottom),
767
+ diagonalCrossFadeCenter: () => diagonalCrossPattern(maskCenter),
768
+ diagonalCrossFadeTopLeft: () => diagonalCrossPattern(maskTopLeft),
769
+ diagonalCrossFadeTopRight: () => diagonalCrossPattern(maskTopRight),
770
+ diagonalCrossFadeBottomLeft: () => diagonalCrossPattern(maskBottomLeft),
771
+ diagonalCrossFadeBottomRight: () => diagonalCrossPattern(maskBottomRight),
772
+ gridBasic: () => gridPattern(40),
773
+ gridFadeTop: () => gridPattern(32, maskTop),
774
+ gridFadeBottom: () => gridPattern(32, maskBottom),
775
+ gridFadeCenter: () => gridPattern(40, maskCenter),
776
+ gridFadeTopLeft: () => gridPattern(32, maskTopLeft),
777
+ gridFadeTopRight: () => gridPattern(32, maskTopRight),
778
+ gridFadeBottomLeft: () => gridPattern(32, maskBottomLeft),
779
+ gridFadeBottomRight: () => gridPattern(32, maskBottomRight),
780
+ gridDotsBasic: () => gridDotsPattern("grid-dots-basic"),
781
+ gridDotsFadeCenter: () => gridDotsPattern("grid-dots-fade-center", maskCenter),
782
+ gradientGlowTop: () => gradientGlow("top"),
783
+ gradientGlowBottom: () => gradientGlow("bottom"),
784
+ spotlightLeft: () => spotlight("left"),
785
+ spotlightRight: () => spotlight("right")
786
+ };
787
+ var inlinePatternStyles = {
788
+ radialGradientTop: {
789
+ background: "radial-gradient(125% 125% at 50% 10%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
790
+ },
791
+ radialGradientBottom: {
792
+ background: "radial-gradient(125% 125% at 50% 90%, hsl(var(--background)) 40%, hsl(var(--primary)) 100%)"
793
+ }
794
+ };
795
+ function PatternBackground({
796
+ pattern,
797
+ opacity = 0.08,
798
+ className,
799
+ style
800
+ }) {
801
+ if (!pattern) {
802
+ return null;
803
+ }
804
+ if (pattern in inlinePatternStyles) {
805
+ const inlineStyle = inlinePatternStyles[pattern];
806
+ return /* @__PURE__ */ jsx(
807
+ "div",
808
+ {
809
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
810
+ style: { ...inlineStyle, opacity, ...style },
811
+ "aria-hidden": "true"
812
+ }
813
+ );
814
+ }
815
+ if (pattern in patternOverlays) {
816
+ const Overlay = patternOverlays[pattern];
817
+ return /* @__PURE__ */ jsx(
818
+ "div",
819
+ {
820
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
821
+ style: { opacity, ...style },
822
+ "aria-hidden": "true",
823
+ children: Overlay()
824
+ }
825
+ );
826
+ }
827
+ const patternUrl = pattern in patternSvgs ? patternSvgs[pattern] : pattern;
828
+ return /* @__PURE__ */ jsx(
829
+ "div",
830
+ {
831
+ className: cn("pointer-events-none absolute inset-0 z-0", className),
832
+ style: {
833
+ backgroundImage: `url(${patternUrl})`,
834
+ backgroundRepeat: "repeat",
835
+ backgroundSize: "auto",
836
+ opacity,
837
+ ...style
838
+ },
839
+ "aria-hidden": "true"
840
+ }
841
+ );
842
+ }
843
+ var backgroundStyles = {
844
+ default: "bg-background text-foreground",
845
+ white: "bg-white text-dark",
846
+ gray: "bg-muted/30 text-foreground",
847
+ dark: "bg-foreground text-background",
848
+ transparent: "bg-transparent text-foreground",
849
+ gradient: "bg-linear-to-br from-primary via-primary/90 to-foreground text-primary-foreground",
850
+ primary: "bg-primary text-primary-foreground",
851
+ secondary: "bg-secondary text-secondary-foreground",
852
+ muted: "bg-muted text-muted-foreground"
853
+ };
854
+ var spacingStyles = {
855
+ none: "py-0 md:py-0",
856
+ sm: "py-12 md:py-16",
857
+ md: "py-16 md:py-24",
858
+ lg: "py-20 md:py-32",
859
+ xl: "py-24 md:py-40"
860
+ };
861
+ var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
862
+ var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
863
+ var Section = React__default.forwardRef(
864
+ ({
865
+ id,
866
+ title,
867
+ subtitle,
868
+ children,
869
+ className,
870
+ style,
871
+ background = "default",
872
+ spacing = "lg",
873
+ pattern,
874
+ patternOpacity,
875
+ patternClassName,
876
+ containerClassName,
877
+ containerMaxWidth = "xl",
878
+ ...props
879
+ }, ref) => {
880
+ const effectivePatternOpacity = patternOpacity !== void 0 ? patternOpacity : pattern ? 1 : 0;
881
+ return /* @__PURE__ */ jsxs(
882
+ "section",
883
+ {
884
+ ref,
885
+ id,
886
+ className: cn(
887
+ "relative",
888
+ pattern ? "overflow-hidden" : null,
889
+ backgroundStyles[background],
890
+ isPredefinedSpacing(spacing) ? spacingStyles[spacing] : spacing,
891
+ className
892
+ ),
893
+ style,
894
+ ...props,
895
+ children: [
896
+ /* @__PURE__ */ jsx(
897
+ PatternBackground,
898
+ {
899
+ pattern,
900
+ opacity: effectivePatternOpacity,
901
+ className: patternClassName
902
+ }
903
+ ),
904
+ /* @__PURE__ */ jsxs(
905
+ Container,
906
+ {
907
+ maxWidth: containerMaxWidth,
908
+ className: cn("relative z-10", containerClassName),
909
+ children: [
910
+ (title || subtitle) && /* @__PURE__ */ jsxs("div", { className: "mb-6 text-center md:mb-16", children: [
911
+ subtitle && /* @__PURE__ */ jsx("p", { className: "mb-2 text-sm font-semibold uppercase tracking-wider", children: subtitle }),
912
+ title && /* @__PURE__ */ jsx("h2", { className: "text-3xl font-bold tracking-tight md:text-4xl lg:text-5xl", children: title })
913
+ ] }),
914
+ children
915
+ ]
916
+ }
917
+ )
918
+ ]
919
+ }
920
+ );
921
+ }
922
+ );
923
+ Section.displayName = "Section";
924
+ function PricingSimpleCard({
925
+ title,
926
+ description,
927
+ price,
928
+ priceInterval,
929
+ features,
930
+ featuresSlot,
931
+ featureIcon,
932
+ featureIconName,
933
+ action,
934
+ actionSlot,
935
+ background,
936
+ spacing,
937
+ pattern,
938
+ patternOpacity,
939
+ patternClassName,
940
+ className,
941
+ containerClassName,
942
+ cardClassName,
943
+ headerClassName,
944
+ titleClassName,
945
+ descriptionClassName,
946
+ priceClassName,
947
+ priceIntervalClassName,
948
+ priceWrapperClassName,
949
+ featuresClassName,
950
+ featureItemClassName,
951
+ featureIconClassName,
952
+ featureTextClassName,
953
+ actionClassName
954
+ }) {
955
+ const renderFeatures = useMemo(() => {
956
+ if (featuresSlot) return featuresSlot;
957
+ if (!features || features.length === 0) return null;
958
+ return /* @__PURE__ */ jsx("ul", { className: cn("mt-8 space-y-3", featuresClassName), children: features.map((feature, index) => {
959
+ const iconName = feature.iconName || featureIconName;
960
+ const resolvedIcon = feature.icon ?? featureIcon ?? (iconName ? /* @__PURE__ */ jsx(
961
+ DynamicIcon,
962
+ {
963
+ name: iconName,
964
+ size: 18,
965
+ className: cn(
966
+ "mt-0.5 shrink-0 text-primary",
967
+ featureIconClassName,
968
+ feature.iconClassName
969
+ )
970
+ }
971
+ ) : null);
972
+ return /* @__PURE__ */ jsxs(
973
+ "li",
974
+ {
975
+ className: cn(
976
+ "flex items-start gap-3",
977
+ featureItemClassName,
978
+ feature.className
979
+ ),
980
+ children: [
981
+ resolvedIcon,
982
+ feature.text && (typeof feature.text === "string" ? /* @__PURE__ */ jsx(
983
+ "span",
984
+ {
985
+ className: cn(
986
+ "text-sm text-muted-foreground",
987
+ featureTextClassName,
988
+ feature.textClassName
989
+ ),
990
+ children: feature.text
991
+ }
992
+ ) : /* @__PURE__ */ jsx(
993
+ "div",
994
+ {
995
+ className: cn(
996
+ "text-sm text-muted-foreground",
997
+ featureTextClassName,
998
+ feature.textClassName
999
+ ),
1000
+ children: feature.text
1001
+ }
1002
+ ))
1003
+ ]
1004
+ },
1005
+ index
1006
+ );
1007
+ }) });
1008
+ }, [featuresSlot, features, featuresClassName, featureIcon, featureIconName, featureIconClassName, featureItemClassName, featureTextClassName]);
1009
+ const renderAction = useMemo(() => {
1010
+ if (actionSlot) return actionSlot;
1011
+ if (!action) return null;
1012
+ const {
1013
+ label,
1014
+ icon,
1015
+ iconAfter,
1016
+ children,
1017
+ className: actionItemClassName,
1018
+ ...pressableProps
1019
+ } = action;
1020
+ return /* @__PURE__ */ jsx(
1021
+ Pressable,
1022
+ {
1023
+ asButton: true,
1024
+ className: cn(
1025
+ "mt-8 w-full justify-center",
1026
+ actionClassName,
1027
+ actionItemClassName
1028
+ ),
1029
+ ...pressableProps,
1030
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
1031
+ icon,
1032
+ label,
1033
+ iconAfter
1034
+ ] })
1035
+ }
1036
+ );
1037
+ }, [actionSlot, action, actionClassName]);
1038
+ return /* @__PURE__ */ jsx(
1039
+ Section,
1040
+ {
1041
+ background,
1042
+ spacing,
1043
+ pattern,
1044
+ patternOpacity,
1045
+ patternClassName,
1046
+ className,
1047
+ children: /* @__PURE__ */ jsx("div", { className: cn("mx-auto max-w-md", containerClassName), children: /* @__PURE__ */ jsxs(Card, { className: cn("p-8", cardClassName), children: [
1048
+ /* @__PURE__ */ jsxs("div", { className: cn("text-center", headerClassName), children: [
1049
+ title && (typeof title === "string" ? /* @__PURE__ */ jsx("h2", { className: cn("text-2xl font-bold", titleClassName), children: title }) : /* @__PURE__ */ jsx("div", { className: titleClassName, children: title })),
1050
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx(
1051
+ "p",
1052
+ {
1053
+ className: cn(
1054
+ "mt-2 text-muted-foreground",
1055
+ descriptionClassName
1056
+ ),
1057
+ children: description
1058
+ }
1059
+ ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description })),
1060
+ (price || priceInterval) && /* @__PURE__ */ jsxs("div", { className: cn("mt-6", priceWrapperClassName), children: [
1061
+ price && /* @__PURE__ */ jsx("span", { className: cn("text-5xl font-bold", priceClassName), children: price }),
1062
+ priceInterval && /* @__PURE__ */ jsx(
1063
+ "span",
1064
+ {
1065
+ className: cn(
1066
+ "text-muted-foreground",
1067
+ priceIntervalClassName
1068
+ ),
1069
+ children: priceInterval
1070
+ }
1071
+ )
1072
+ ] })
1073
+ ] }),
1074
+ renderFeatures,
1075
+ renderAction
1076
+ ] }) })
1077
+ }
1078
+ );
1079
+ }
1080
+
1081
+ export { PricingSimpleCard };