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