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