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