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