@salesmind-ai/design-system 0.2.1 → 0.3.1

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 (142) hide show
  1. package/README.md +32 -2
  2. package/dist/AppearancePanel-UT57J69V.d.cts +51 -0
  3. package/dist/AppearancePanel-UT57J69V.d.ts +51 -0
  4. package/dist/AppearanceProvider-C36a8-eb.d.cts +45 -0
  5. package/dist/AppearanceProvider-C36a8-eb.d.ts +45 -0
  6. package/dist/Breadcrumb-RX-B_gDV.d.cts +44 -0
  7. package/dist/Breadcrumb-RX-B_gDV.d.ts +44 -0
  8. package/dist/ExportMenu-A2TLFiVv.d.cts +311 -0
  9. package/dist/ExportMenu-C8qck5AT.d.ts +311 -0
  10. package/dist/SectionShell-BfBw5q0Y.d.cts +18 -0
  11. package/dist/SectionShell-BfBw5q0Y.d.ts +18 -0
  12. package/dist/Select-BdZmK0Lt.d.cts +66 -0
  13. package/dist/Select-BdZmK0Lt.d.ts +66 -0
  14. package/dist/admin/index.cjs +2941 -0
  15. package/dist/admin/index.cjs.map +1 -0
  16. package/dist/admin/index.css +4145 -0
  17. package/dist/admin/index.css.map +1 -0
  18. package/dist/admin/index.d.cts +491 -0
  19. package/dist/admin/index.d.ts +491 -0
  20. package/dist/admin/index.js +2918 -0
  21. package/dist/admin/index.js.map +1 -0
  22. package/dist/{audit-CiyPkxk1.d.cts → audit-BS2fn7M4.d.ts} +2 -51
  23. package/dist/{audit-CiyPkxk1.d.ts → audit-DwCmg32J.d.cts} +2 -51
  24. package/dist/blog/index.cjs +1074 -0
  25. package/dist/blog/index.cjs.map +1 -0
  26. package/dist/blog/index.css +1422 -0
  27. package/dist/blog/index.css.map +1 -0
  28. package/dist/blog/index.d.cts +233 -0
  29. package/dist/blog/index.d.ts +233 -0
  30. package/dist/blog/index.js +1056 -0
  31. package/dist/blog/index.js.map +1 -0
  32. package/dist/chart-types-BGVVO-zl.d.cts +208 -0
  33. package/dist/chart-types-BGVVO-zl.d.ts +208 -0
  34. package/dist/charts/index.cjs +2698 -0
  35. package/dist/charts/index.cjs.map +1 -0
  36. package/dist/charts/index.css +1167 -0
  37. package/dist/charts/index.css.map +1 -0
  38. package/dist/charts/index.d.cts +453 -0
  39. package/dist/charts/index.d.ts +453 -0
  40. package/dist/charts/index.js +2682 -0
  41. package/dist/charts/index.js.map +1 -0
  42. package/dist/core/index.cjs +526 -395
  43. package/dist/core/index.cjs.map +1 -1
  44. package/dist/core/index.css +294 -0
  45. package/dist/core/index.css.map +1 -1
  46. package/dist/core/index.d.cts +7 -982
  47. package/dist/core/index.d.ts +7 -982
  48. package/dist/core/index.js +476 -351
  49. package/dist/core/index.js.map +1 -1
  50. package/dist/i18n/index.cjs +585 -0
  51. package/dist/i18n/index.cjs.map +1 -0
  52. package/dist/i18n/index.d.cts +855 -0
  53. package/dist/i18n/index.d.ts +855 -0
  54. package/dist/i18n/index.js +547 -0
  55. package/dist/i18n/index.js.map +1 -0
  56. package/dist/index.cjs +3 -2
  57. package/dist/index.cjs.map +1 -1
  58. package/dist/index.css +11 -7
  59. package/dist/index.css.map +1 -1
  60. package/dist/index.d.cts +22 -1290
  61. package/dist/index.d.ts +22 -1290
  62. package/dist/index.js +3 -2
  63. package/dist/index.js.map +1 -1
  64. package/dist/marketing/index.cjs +2144 -3023
  65. package/dist/marketing/index.cjs.map +1 -1
  66. package/dist/marketing/index.css +3729 -4824
  67. package/dist/marketing/index.css.map +1 -1
  68. package/dist/marketing/index.d.cts +1351 -4
  69. package/dist/marketing/index.d.ts +1351 -4
  70. package/dist/marketing/index.js +2190 -3054
  71. package/dist/marketing/index.js.map +1 -1
  72. package/dist/motion/index.cjs +1230 -0
  73. package/dist/motion/index.cjs.map +1 -0
  74. package/dist/motion/index.css +699 -0
  75. package/dist/motion/index.css.map +1 -0
  76. package/dist/motion/index.d.cts +68 -0
  77. package/dist/motion/index.d.ts +68 -0
  78. package/dist/motion/index.js +1218 -0
  79. package/dist/motion/index.js.map +1 -0
  80. package/dist/nav/index.cjs +1533 -0
  81. package/dist/nav/index.cjs.map +1 -0
  82. package/dist/nav/index.css +1984 -0
  83. package/dist/nav/index.css.map +1 -0
  84. package/dist/nav/index.d.cts +279 -0
  85. package/dist/nav/index.d.ts +279 -0
  86. package/dist/nav/index.js +1501 -0
  87. package/dist/nav/index.js.map +1 -0
  88. package/dist/report/index.cjs +26 -1649
  89. package/dist/report/index.cjs.map +1 -1
  90. package/dist/report/index.css +0 -963
  91. package/dist/report/index.css.map +1 -1
  92. package/dist/report/index.d.cts +4 -2
  93. package/dist/report/index.d.ts +4 -2
  94. package/dist/report/index.js +27 -1640
  95. package/dist/report/index.js.map +1 -1
  96. package/dist/sections/index.cjs +385 -0
  97. package/dist/sections/index.cjs.map +1 -0
  98. package/dist/sections/index.css +815 -0
  99. package/dist/sections/index.css.map +1 -0
  100. package/dist/sections/index.d.cts +69 -0
  101. package/dist/sections/index.d.ts +69 -0
  102. package/dist/sections/index.js +374 -0
  103. package/dist/sections/index.js.map +1 -0
  104. package/dist/social-proof/index.cjs +1255 -0
  105. package/dist/social-proof/index.cjs.map +1 -0
  106. package/dist/social-proof/index.css +1423 -0
  107. package/dist/social-proof/index.css.map +1 -0
  108. package/dist/social-proof/index.d.cts +258 -0
  109. package/dist/social-proof/index.d.ts +258 -0
  110. package/dist/social-proof/index.js +1238 -0
  111. package/dist/social-proof/index.js.map +1 -0
  112. package/dist/theme/index.cjs +573 -0
  113. package/dist/theme/index.cjs.map +1 -0
  114. package/dist/theme/index.css +464 -0
  115. package/dist/theme/index.css.map +1 -0
  116. package/dist/theme/index.d.cts +48 -0
  117. package/dist/theme/index.d.ts +48 -0
  118. package/dist/theme/index.js +558 -0
  119. package/dist/theme/index.js.map +1 -0
  120. package/dist/types-DAlgDGzw.d.cts +52 -0
  121. package/dist/types-DAlgDGzw.d.ts +52 -0
  122. package/dist/web/client/index.cjs +501 -0
  123. package/dist/web/client/index.cjs.map +1 -0
  124. package/dist/web/client/index.css +456 -0
  125. package/dist/web/client/index.css.map +1 -0
  126. package/dist/web/client/index.d.cts +172 -0
  127. package/dist/web/client/index.d.ts +172 -0
  128. package/dist/web/client/index.js +486 -0
  129. package/dist/web/client/index.js.map +1 -0
  130. package/dist/web/index.d.cts +6 -893
  131. package/dist/web/index.d.ts +6 -893
  132. package/dist/web/server/index.cjs +569 -0
  133. package/dist/web/server/index.cjs.map +1 -0
  134. package/dist/web/server/index.d.cts +725 -0
  135. package/dist/web/server/index.d.ts +725 -0
  136. package/dist/web/server/index.js +562 -0
  137. package/dist/web/server/index.js.map +1 -0
  138. package/package.json +81 -9
  139. package/dist/ExportMenu-hEe5MhLq.d.cts +0 -1027
  140. package/dist/ExportMenu-hEe5MhLq.d.ts +0 -1027
  141. package/dist/index-B64suAAc.d.cts +0 -1498
  142. package/dist/index-B64suAAc.d.ts +0 -1498
@@ -0,0 +1,1533 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React4 = require('react');
5
+ var clsx = require('clsx');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var reactSlot = require('@radix-ui/react-slot');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var React4__default = /*#__PURE__*/_interopDefault(React4);
12
+ var clsx__default = /*#__PURE__*/_interopDefault(clsx);
13
+
14
+ // src/components/NavbarV2/NavbarV2.tsx
15
+ var ChevronDown = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "8", height: "8", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
16
+ "path",
17
+ {
18
+ d: "M4 6L8 10L12 6",
19
+ stroke: "currentColor",
20
+ strokeWidth: "1.5",
21
+ strokeLinecap: "round",
22
+ strokeLinejoin: "round"
23
+ }
24
+ ) });
25
+ var ScrollContext = React4.createContext({ scrolled: false });
26
+ var TabsContext = React4.createContext({
27
+ activeMenuId: null,
28
+ openMenu: () => {
29
+ },
30
+ closeMenu: () => {
31
+ }
32
+ });
33
+ function useFocusTrap(containerRef, active) {
34
+ React4.useEffect(() => {
35
+ if (!active || !containerRef.current) return;
36
+ const container = containerRef.current;
37
+ const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';
38
+ const handleKeyDown = (e) => {
39
+ if (e.key !== "Tab") return;
40
+ const focusable2 = Array.from(container.querySelectorAll(FOCUSABLE));
41
+ if (focusable2.length === 0) {
42
+ e.preventDefault();
43
+ return;
44
+ }
45
+ const first = focusable2[0];
46
+ const last = focusable2[focusable2.length - 1];
47
+ if (e.shiftKey) {
48
+ if (document.activeElement === first) {
49
+ e.preventDefault();
50
+ last.focus();
51
+ }
52
+ } else {
53
+ if (document.activeElement === last) {
54
+ e.preventDefault();
55
+ first.focus();
56
+ }
57
+ }
58
+ };
59
+ const focusable = container.querySelectorAll(FOCUSABLE);
60
+ if (focusable.length > 0) {
61
+ focusable[0].focus();
62
+ }
63
+ container.addEventListener("keydown", handleKeyDown);
64
+ return () => container.removeEventListener("keydown", handleKeyDown);
65
+ }, [active, containerRef]);
66
+ }
67
+ var HYSTERESIS_RATIO = 0.25;
68
+ var NavbarV2 = React4.forwardRef(
69
+ ({
70
+ className,
71
+ mobileContent,
72
+ mobileToggleLabels,
73
+ isMenuOpen,
74
+ onMenuOpenChange,
75
+ scrollBorder = true,
76
+ scrollThreshold = 32,
77
+ children,
78
+ ...props
79
+ }, ref) => {
80
+ const [internalMenuOpen, setInternalMenuOpen] = React4.useState(false);
81
+ const isMobileMenuOpen = isMenuOpen !== void 0 ? isMenuOpen : internalMenuOpen;
82
+ const navRef = React4.useRef(null);
83
+ const overlayRef = React4.useRef(null);
84
+ const [navHeight, setNavHeight] = React4.useState(64);
85
+ const openLabel = mobileToggleLabels?.open ?? "Open menu";
86
+ const closeLabel = mobileToggleLabels?.close ?? "Close menu";
87
+ const [scrolled, setScrolled] = React4.useState(() => {
88
+ if (typeof window !== "undefined") {
89
+ return window.scrollY > scrollThreshold;
90
+ }
91
+ return false;
92
+ });
93
+ React4.useEffect(() => {
94
+ if (!scrollBorder) return;
95
+ const lowerBound = scrollThreshold * HYSTERESIS_RATIO;
96
+ const handleScroll = () => {
97
+ const y = window.scrollY;
98
+ setScrolled((prev) => {
99
+ if (!prev && y > scrollThreshold) return true;
100
+ if (prev && y < lowerBound) return false;
101
+ return prev;
102
+ });
103
+ };
104
+ handleScroll();
105
+ window.addEventListener("scroll", handleScroll, { passive: true });
106
+ return () => window.removeEventListener("scroll", handleScroll);
107
+ }, [scrollBorder, scrollThreshold]);
108
+ const isScrolled = scrollBorder && scrolled;
109
+ const scrollCtx = React4.useMemo(
110
+ () => ({ scrolled: isScrolled }),
111
+ [isScrolled]
112
+ );
113
+ const handleToggle = () => {
114
+ const newState = !isMobileMenuOpen;
115
+ setInternalMenuOpen(newState);
116
+ onMenuOpenChange?.(newState);
117
+ };
118
+ React4.useEffect(() => {
119
+ const el = navRef.current;
120
+ if (!el) return;
121
+ const observer = new ResizeObserver((entries) => {
122
+ for (const entry of entries) {
123
+ const h = entry.contentRect.height;
124
+ setNavHeight(h);
125
+ el.style.setProperty("--navbar-overlap", `${h}px`);
126
+ }
127
+ });
128
+ observer.observe(el);
129
+ return () => observer.disconnect();
130
+ }, []);
131
+ React4.useEffect(() => {
132
+ if (isMobileMenuOpen) {
133
+ document.body.style.overflow = "hidden";
134
+ return () => {
135
+ document.body.style.overflow = "";
136
+ };
137
+ }
138
+ }, [isMobileMenuOpen]);
139
+ React4.useEffect(() => {
140
+ if (!isMobileMenuOpen) return;
141
+ const handleEscape = (e) => {
142
+ if (e.key === "Escape") {
143
+ setInternalMenuOpen(false);
144
+ onMenuOpenChange?.(false);
145
+ }
146
+ };
147
+ document.addEventListener("keydown", handleEscape);
148
+ return () => document.removeEventListener("keydown", handleEscape);
149
+ }, [isMobileMenuOpen, onMenuOpenChange]);
150
+ useFocusTrap(overlayRef, isMobileMenuOpen);
151
+ const mergedRef = useMergedRef(ref, navRef);
152
+ return /* @__PURE__ */ jsxRuntime.jsx(ScrollContext.Provider, { value: scrollCtx, children: /* @__PURE__ */ jsxRuntime.jsxs(
153
+ "nav",
154
+ {
155
+ ref: mergedRef,
156
+ className: clsx__default.default(
157
+ "ds-navbar-v2",
158
+ isScrolled && "ds-navbar-v2--scrolled",
159
+ className
160
+ ),
161
+ ...props,
162
+ children: [
163
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-navbar-v2__container", children: [
164
+ children,
165
+ /* @__PURE__ */ jsxRuntime.jsx(
166
+ "button",
167
+ {
168
+ className: "ds-navbar-v2__toggle",
169
+ onClick: handleToggle,
170
+ "aria-label": isMobileMenuOpen ? closeLabel : openLabel,
171
+ "aria-expanded": isMobileMenuOpen,
172
+ children: isMobileMenuOpen ? /* @__PURE__ */ jsxRuntime.jsxs(
173
+ "svg",
174
+ {
175
+ width: "24",
176
+ height: "24",
177
+ viewBox: "0 0 24 24",
178
+ fill: "none",
179
+ stroke: "currentColor",
180
+ strokeWidth: "2",
181
+ strokeLinecap: "round",
182
+ strokeLinejoin: "round",
183
+ children: [
184
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
185
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
186
+ ]
187
+ }
188
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
189
+ "svg",
190
+ {
191
+ width: "24",
192
+ height: "24",
193
+ viewBox: "0 0 24 24",
194
+ fill: "none",
195
+ stroke: "currentColor",
196
+ strokeWidth: "2",
197
+ strokeLinecap: "round",
198
+ strokeLinejoin: "round",
199
+ children: [
200
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
201
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
202
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
203
+ ]
204
+ }
205
+ )
206
+ }
207
+ )
208
+ ] }),
209
+ /* @__PURE__ */ jsxRuntime.jsx(
210
+ "div",
211
+ {
212
+ ref: overlayRef,
213
+ className: "ds-navbar-v2__mobile-overlay",
214
+ style: { top: navHeight },
215
+ "data-state": isMobileMenuOpen ? "open" : "closed",
216
+ role: "dialog",
217
+ "aria-modal": "true",
218
+ "aria-label": closeLabel,
219
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-navbar-v2__mobile-content", children: mobileContent })
220
+ }
221
+ )
222
+ ]
223
+ }
224
+ ) });
225
+ }
226
+ );
227
+ NavbarV2.displayName = "NavbarV2";
228
+ var NavbarV2Brand = React4.forwardRef(
229
+ ({ as: Component = "a", className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: clsx__default.default("ds-navbar-v2__brand", className), ...props, children })
230
+ );
231
+ NavbarV2Brand.displayName = "NavbarV2Brand";
232
+ var NavbarV2Tabs = React4.forwardRef(
233
+ ({ className, children, ...props }, ref) => {
234
+ const [activeMenuId, setActiveMenuId] = React4.useState(null);
235
+ const { scrolled } = React4.useContext(ScrollContext);
236
+ const ctxValue = React4.useMemo(
237
+ () => ({
238
+ activeMenuId,
239
+ openMenu: (id) => setActiveMenuId(id),
240
+ closeMenu: (id) => setActiveMenuId((prev) => prev === id ? null : prev)
241
+ }),
242
+ [activeMenuId]
243
+ );
244
+ return /* @__PURE__ */ jsxRuntime.jsx(TabsContext.Provider, { value: ctxValue, children: /* @__PURE__ */ jsxRuntime.jsx(
245
+ "div",
246
+ {
247
+ ref,
248
+ className: clsx__default.default(
249
+ "ds-navbar-v2__tabs",
250
+ scrolled && "ds-navbar-v2__tabs--demoted",
251
+ className
252
+ ),
253
+ ...props,
254
+ children
255
+ }
256
+ ) });
257
+ }
258
+ );
259
+ NavbarV2Tabs.displayName = "NavbarV2Tabs";
260
+ var NavbarV2Tab = React4.forwardRef(
261
+ ({ as: Component = "button", active, icon, label, className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
262
+ Component,
263
+ {
264
+ ref,
265
+ className: clsx__default.default("ds-navbar-v2__tab", active && "ds-navbar-v2__tab--active", className),
266
+ "aria-current": active ? "page" : void 0,
267
+ ...Component === "button" ? { type: "button" } : {},
268
+ ...props,
269
+ children: [
270
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-v2__tab-icon", children: icon }),
271
+ label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-v2__tab-label", children: label }),
272
+ children
273
+ ]
274
+ }
275
+ )
276
+ );
277
+ NavbarV2Tab.displayName = "NavbarV2Tab";
278
+ var NavbarV2TabMenu = React4.forwardRef(
279
+ ({
280
+ icon,
281
+ label,
282
+ active,
283
+ children,
284
+ className,
285
+ isOpen: controlledOpen,
286
+ onOpenChange
287
+ }, ref) => {
288
+ const instanceId = React4.useId();
289
+ const panelId = `navbar-v2-panel-${instanceId}`;
290
+ const { activeMenuId, openMenu, closeMenu } = React4.useContext(TabsContext);
291
+ const isControlled = controlledOpen !== void 0;
292
+ const isOpen = isControlled ? controlledOpen : activeMenuId === instanceId;
293
+ const containerRef = React4.useRef(null);
294
+ const triggerRef = React4.useRef(null);
295
+ const panelRef = React4.useRef(null);
296
+ const timeoutRef = React4.useRef(null);
297
+ const handleOpen = React4.useCallback(() => {
298
+ if (!isOpen) {
299
+ if (!isControlled) openMenu(instanceId);
300
+ onOpenChange?.(true);
301
+ }
302
+ }, [isOpen, isControlled, openMenu, instanceId, onOpenChange]);
303
+ const handleClose = React4.useCallback(() => {
304
+ if (isOpen) {
305
+ if (!isControlled) closeMenu(instanceId);
306
+ onOpenChange?.(false);
307
+ }
308
+ }, [isOpen, isControlled, closeMenu, instanceId, onOpenChange]);
309
+ const handleToggle = React4.useCallback(() => {
310
+ if (isOpen) handleClose();
311
+ else handleOpen();
312
+ }, [isOpen, handleClose, handleOpen]);
313
+ const handleMouseEnter = React4.useCallback(() => {
314
+ if (timeoutRef.current) {
315
+ window.clearTimeout(timeoutRef.current);
316
+ timeoutRef.current = null;
317
+ }
318
+ handleOpen();
319
+ }, [handleOpen]);
320
+ const handleMouseLeave = React4.useCallback(() => {
321
+ if (timeoutRef.current) window.clearTimeout(timeoutRef.current);
322
+ timeoutRef.current = window.setTimeout(handleClose, 150);
323
+ }, [handleClose]);
324
+ React4.useEffect(() => {
325
+ return () => {
326
+ if (timeoutRef.current) window.clearTimeout(timeoutRef.current);
327
+ };
328
+ }, []);
329
+ React4.useEffect(() => {
330
+ if (!isOpen) return;
331
+ const handleClickOutside = (event) => {
332
+ if (containerRef.current && !containerRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
333
+ handleClose();
334
+ }
335
+ };
336
+ document.addEventListener("mousedown", handleClickOutside);
337
+ return () => document.removeEventListener("mousedown", handleClickOutside);
338
+ }, [isOpen, handleClose]);
339
+ React4.useEffect(() => {
340
+ if (!isOpen) return;
341
+ const handleEscape = (e) => {
342
+ if (e.key === "Escape") {
343
+ handleClose();
344
+ triggerRef.current?.focus();
345
+ }
346
+ };
347
+ document.addEventListener("keydown", handleEscape);
348
+ return () => document.removeEventListener("keydown", handleEscape);
349
+ }, [isOpen, handleClose]);
350
+ React4.useEffect(() => {
351
+ if (!isOpen || !panelRef.current) return;
352
+ const clampToViewport = () => {
353
+ const panel = panelRef.current;
354
+ if (!panel) return;
355
+ panel.style.setProperty("--panel-nudge", "0px");
356
+ const rect = panel.getBoundingClientRect();
357
+ const viewportWidth = window.innerWidth;
358
+ const EDGE_PADDING = 16;
359
+ if (rect.right > viewportWidth - EDGE_PADDING) {
360
+ const overflow = rect.right - (viewportWidth - EDGE_PADDING);
361
+ panel.style.setProperty("--panel-nudge", `${-overflow}px`);
362
+ } else if (rect.left < EDGE_PADDING) {
363
+ const overflow = EDGE_PADDING - rect.left;
364
+ panel.style.setProperty("--panel-nudge", `${overflow}px`);
365
+ }
366
+ };
367
+ requestAnimationFrame(clampToViewport);
368
+ window.addEventListener("resize", clampToViewport);
369
+ return () => window.removeEventListener("resize", clampToViewport);
370
+ }, [isOpen]);
371
+ const panelRefCallback = React4.useCallback((node) => {
372
+ containerRef.current = node;
373
+ panelRef.current = node;
374
+ }, []);
375
+ return /* @__PURE__ */ jsxRuntime.jsxs(
376
+ "div",
377
+ {
378
+ ref,
379
+ className: clsx__default.default("ds-navbar-v2__tab-menu", className),
380
+ onMouseEnter: handleMouseEnter,
381
+ onMouseLeave: handleMouseLeave,
382
+ children: [
383
+ /* @__PURE__ */ jsxRuntime.jsxs(
384
+ "button",
385
+ {
386
+ ref: triggerRef,
387
+ className: clsx__default.default(
388
+ "ds-navbar-v2__tab",
389
+ (active || isOpen) && "ds-navbar-v2__tab--active"
390
+ ),
391
+ onClick: handleToggle,
392
+ "aria-expanded": isOpen,
393
+ "aria-haspopup": "true",
394
+ "aria-controls": isOpen ? panelId : void 0,
395
+ type: "button",
396
+ children: [
397
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-v2__tab-icon", children: icon }),
398
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-navbar-v2__tab-label-row", children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-v2__tab-label", children: label }),
400
+ /* @__PURE__ */ jsxRuntime.jsx(
401
+ "span",
402
+ {
403
+ className: "ds-navbar-v2__tab-chevron",
404
+ "data-state": isOpen ? "open" : "closed",
405
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {})
406
+ }
407
+ )
408
+ ] })
409
+ ]
410
+ }
411
+ ),
412
+ /* @__PURE__ */ jsxRuntime.jsx(
413
+ "div",
414
+ {
415
+ ref: panelRefCallback,
416
+ id: panelId,
417
+ className: "ds-navbar-v2__mega-panel",
418
+ "data-state": isOpen ? "open" : "closed",
419
+ role: "region",
420
+ "aria-label": `${label} menu`,
421
+ children
422
+ }
423
+ )
424
+ ]
425
+ }
426
+ );
427
+ }
428
+ );
429
+ NavbarV2TabMenu.displayName = "NavbarV2TabMenu";
430
+ var NavbarV2Actions = React4.forwardRef(
431
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx__default.default("ds-navbar-v2__actions", className), ...props, children })
432
+ );
433
+ NavbarV2Actions.displayName = "NavbarV2Actions";
434
+ function useMergedRef(...refs) {
435
+ return React4.useCallback(
436
+ (value) => {
437
+ for (const ref of refs) {
438
+ if (typeof ref === "function") {
439
+ ref(value);
440
+ } else if (ref && typeof ref === "object") {
441
+ ref.current = value;
442
+ }
443
+ }
444
+ },
445
+ // eslint-disable-next-line react-hooks/exhaustive-deps
446
+ refs
447
+ );
448
+ }
449
+ var NavbarMobileNavItem = React4.forwardRef(
450
+ ({ as: Component = "a", className, active, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
451
+ Component,
452
+ {
453
+ ref,
454
+ className: clsx__default.default(
455
+ "ds-navbar__mobile-nav-item",
456
+ active && "ds-navbar__mobile-nav-item--active",
457
+ className
458
+ ),
459
+ "aria-current": active ? "page" : void 0,
460
+ ...props,
461
+ children
462
+ }
463
+ )
464
+ );
465
+ NavbarMobileNavItem.displayName = "NavbarMobileNavItem";
466
+ function NavbarMobileSeparator({ className }) {
467
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx__default.default("ds-navbar__mobile-separator", className), role: "separator" });
468
+ }
469
+ NavbarMobileSeparator.displayName = "NavbarMobileSeparator";
470
+ var NavbarMobileActions = React4.forwardRef(
471
+ ({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: clsx__default.default("ds-navbar__mobile-actions", className), ...props, children })
472
+ );
473
+ NavbarMobileActions.displayName = "NavbarMobileActions";
474
+
475
+ // src/tokens/spacing.ts
476
+ var SPACING = {
477
+ 1: "var(--space-1)",
478
+ 2: "var(--space-2)",
479
+ 3: "var(--space-3)",
480
+ 4: "var(--space-4)",
481
+ 5: "var(--space-5)",
482
+ 6: "var(--space-6)",
483
+ 8: "var(--space-8)",
484
+ 10: "var(--space-10)",
485
+ 12: "var(--space-12)",
486
+ 16: "var(--space-16)",
487
+ 20: "var(--space-20)"
488
+ };
489
+
490
+ // src/components/LayoutPrimitives/utils.ts
491
+ var SPACING_ALIASES = {
492
+ xs: "var(--space-2)",
493
+ sm: "var(--space-3)",
494
+ md: "var(--space-4)",
495
+ lg: "var(--space-6)",
496
+ xl: "var(--space-8)",
497
+ "2xl": "var(--space-12)"
498
+ };
499
+ function resolveSpacing(value) {
500
+ if (value === void 0) return void 0;
501
+ if (typeof value === "number" && SPACING[value]) {
502
+ return SPACING[value];
503
+ }
504
+ if (typeof value === "string" && value in SPACING_ALIASES) {
505
+ return SPACING_ALIASES[value];
506
+ }
507
+ return String(value);
508
+ }
509
+ function extractSpacingStyles(props) {
510
+ const styles = {};
511
+ if (props.m !== void 0) styles.margin = resolveSpacing(props.m);
512
+ if (props.mt !== void 0) styles.marginTop = resolveSpacing(props.mt);
513
+ if (props.mb !== void 0) styles.marginBottom = resolveSpacing(props.mb);
514
+ if (props.ml !== void 0) styles.marginLeft = resolveSpacing(props.ml);
515
+ if (props.mr !== void 0) styles.marginRight = resolveSpacing(props.mr);
516
+ if (props.mx !== void 0) {
517
+ styles.marginLeft = resolveSpacing(props.mx);
518
+ styles.marginRight = resolveSpacing(props.mx);
519
+ }
520
+ if (props.my !== void 0) {
521
+ styles.marginTop = resolveSpacing(props.my);
522
+ styles.marginBottom = resolveSpacing(props.my);
523
+ }
524
+ if (props.p !== void 0) styles.padding = resolveSpacing(props.p);
525
+ if (props.pt !== void 0) styles.paddingTop = resolveSpacing(props.pt);
526
+ if (props.pb !== void 0) styles.paddingBottom = resolveSpacing(props.pb);
527
+ if (props.pl !== void 0) styles.paddingLeft = resolveSpacing(props.pl);
528
+ if (props.pr !== void 0) styles.paddingRight = resolveSpacing(props.pr);
529
+ if (props.px !== void 0) {
530
+ styles.paddingLeft = resolveSpacing(props.px);
531
+ styles.paddingRight = resolveSpacing(props.px);
532
+ }
533
+ if (props.py !== void 0) {
534
+ styles.paddingTop = resolveSpacing(props.py);
535
+ styles.paddingBottom = resolveSpacing(props.py);
536
+ }
537
+ if (props.gap !== void 0) styles.gap = resolveSpacing(props.gap);
538
+ return styles;
539
+ }
540
+ var Box = React4.forwardRef(
541
+ ({ as: Component = "div", className, style, children, ...props }, ref) => {
542
+ const spacingStyles = extractSpacingStyles(props);
543
+ const { m, mt, mb, ml, mr, mx, my, p, pt, pb, pl, pr, px, py, gap, ...domProps } = props;
544
+ return /* @__PURE__ */ jsxRuntime.jsx(
545
+ Component,
546
+ {
547
+ ref,
548
+ className: clsx__default.default("ds-box", className),
549
+ style: { ...spacingStyles, ...style },
550
+ ...domProps,
551
+ children
552
+ }
553
+ );
554
+ }
555
+ );
556
+ Box.displayName = "Box";
557
+ var CONTAINER_SIZE_MAP = {
558
+ sm: "768px",
559
+ // 48rem — max-w-3xl
560
+ md: "1024px",
561
+ // 64rem — max-w-5xl
562
+ lg: "1152px",
563
+ // 72rem — max-w-6xl
564
+ xl: "1280px",
565
+ // 80rem — max-w-7xl
566
+ full: "100%"
567
+ };
568
+ var Container = React4.forwardRef(
569
+ ({ size, fluid, maxWidth, className, style, ...props }, ref) => {
570
+ let resolvedMaxWidth;
571
+ if (fluid) {
572
+ resolvedMaxWidth = "100%";
573
+ } else if (size) {
574
+ resolvedMaxWidth = CONTAINER_SIZE_MAP[size];
575
+ } else {
576
+ resolvedMaxWidth = maxWidth || "var(--container-default-max, 1200px)";
577
+ }
578
+ return /* @__PURE__ */ jsxRuntime.jsx(
579
+ Box,
580
+ {
581
+ ref,
582
+ className: clsx__default.default("ds-container", className),
583
+ style: {
584
+ maxWidth: resolvedMaxWidth,
585
+ ...style
586
+ },
587
+ ...props
588
+ }
589
+ );
590
+ }
591
+ );
592
+ Container.displayName = "Container";
593
+ var ChevronDown2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
594
+ "path",
595
+ {
596
+ d: "M4 6L8 10L12 6",
597
+ stroke: "currentColor",
598
+ strokeWidth: "1.5",
599
+ strokeLinecap: "round",
600
+ strokeLinejoin: "round"
601
+ }
602
+ ) });
603
+ var NavbarMegaMenu = React4.forwardRef(
604
+ ({ trigger, children, className, isOpen: controlledOpen, onOpenChange, variant = "fullWidth" }, ref) => {
605
+ const [internalOpen, setInternalOpen] = React4.useState(false);
606
+ const isControlled = controlledOpen !== void 0;
607
+ const isOpen = isControlled ? controlledOpen : internalOpen;
608
+ const containerRef = React4.useRef(null);
609
+ const triggerRef = React4.useRef(null);
610
+ const timeoutRef = React4.useRef(null);
611
+ const handleOpen = React4.useCallback(() => {
612
+ const newState = true;
613
+ if (isOpen !== newState) {
614
+ if (!isControlled) setInternalOpen(newState);
615
+ onOpenChange?.(newState);
616
+ }
617
+ }, [isOpen, isControlled, onOpenChange]);
618
+ const handleClose = React4.useCallback(() => {
619
+ const newState = false;
620
+ if (isOpen !== newState) {
621
+ if (!isControlled) setInternalOpen(newState);
622
+ onOpenChange?.(newState);
623
+ }
624
+ }, [isOpen, isControlled, onOpenChange]);
625
+ const handleToggle = React4.useCallback(() => {
626
+ if (isOpen) {
627
+ handleClose();
628
+ } else {
629
+ handleOpen();
630
+ }
631
+ }, [isOpen, handleClose, handleOpen]);
632
+ const handleMouseEnter = React4.useCallback(() => {
633
+ if (timeoutRef.current) {
634
+ window.clearTimeout(timeoutRef.current);
635
+ timeoutRef.current = null;
636
+ }
637
+ handleOpen();
638
+ }, [handleOpen]);
639
+ const handleMouseLeave = React4.useCallback(() => {
640
+ if (timeoutRef.current) {
641
+ window.clearTimeout(timeoutRef.current);
642
+ }
643
+ timeoutRef.current = window.setTimeout(() => {
644
+ handleClose();
645
+ }, 150);
646
+ }, [handleClose]);
647
+ React4.useEffect(() => {
648
+ return () => {
649
+ if (timeoutRef.current) window.clearTimeout(timeoutRef.current);
650
+ };
651
+ }, []);
652
+ React4.useEffect(() => {
653
+ if (!isOpen) return;
654
+ const handleClickOutside = (event) => {
655
+ if (containerRef.current && !containerRef.current.contains(event.target) && triggerRef.current && !triggerRef.current.contains(event.target)) {
656
+ handleClose();
657
+ }
658
+ };
659
+ document.addEventListener("mousedown", handleClickOutside);
660
+ return () => document.removeEventListener("mousedown", handleClickOutside);
661
+ }, [isOpen, handleClose]);
662
+ React4.useEffect(() => {
663
+ if (!isOpen) return;
664
+ const handleEscape = (e) => {
665
+ if (e.key === "Escape") handleClose();
666
+ };
667
+ document.addEventListener("keydown", handleEscape);
668
+ return () => document.removeEventListener("keydown", handleEscape);
669
+ }, [isOpen, handleClose]);
670
+ return /* @__PURE__ */ jsxRuntime.jsxs(
671
+ "div",
672
+ {
673
+ className: clsx__default.default("ds-navbar-mega-menu", `ds-navbar-mega-menu--${variant}`, className),
674
+ ref,
675
+ onMouseEnter: handleMouseEnter,
676
+ onMouseLeave: handleMouseLeave,
677
+ children: [
678
+ /* @__PURE__ */ jsxRuntime.jsxs(
679
+ "button",
680
+ {
681
+ ref: triggerRef,
682
+ className: "ds-navbar-mega-menu__trigger",
683
+ onClick: handleToggle,
684
+ "aria-expanded": isOpen,
685
+ "aria-haspopup": "true",
686
+ children: [
687
+ trigger,
688
+ /* @__PURE__ */ jsxRuntime.jsx(
689
+ "span",
690
+ {
691
+ className: "ds-navbar-mega-menu__chevron",
692
+ "data-state": isOpen ? "open" : "closed",
693
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDown2, {})
694
+ }
695
+ )
696
+ ]
697
+ }
698
+ ),
699
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx(
700
+ "div",
701
+ {
702
+ className: clsx__default.default(
703
+ "ds-navbar-mega-menu__content",
704
+ `ds-navbar-mega-menu__content--${variant}`
705
+ ),
706
+ "data-state": isOpen ? "open" : "closed",
707
+ children: variant === "fullWidth" ? /* @__PURE__ */ jsxRuntime.jsx(Container, { children }) : children
708
+ }
709
+ ) })
710
+ ]
711
+ }
712
+ );
713
+ }
714
+ );
715
+ NavbarMegaMenu.displayName = "NavbarMegaMenu";
716
+ function NavbarMegaMenuSection({ heading, children, className }) {
717
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx__default.default("ds-navbar-mega-menu__section", className), children: [
718
+ heading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-navbar-mega-menu__section-heading", children: heading }),
719
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-navbar-mega-menu__section-items", children })
720
+ ] });
721
+ }
722
+ NavbarMegaMenuSection.displayName = "NavbarMegaMenuSection";
723
+ var NavbarMegaMenuItem = React4.forwardRef(
724
+ ({ icon, label, description, className, as: Comp = "a", ...rest }, ref) => {
725
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-navbar-mega-menu__item-wrapper", children: /* @__PURE__ */ jsxRuntime.jsxs(
726
+ Comp,
727
+ {
728
+ ref,
729
+ className: clsx__default.default("ds-navbar-mega-menu__item", className),
730
+ ...rest,
731
+ children: [
732
+ icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-mega-menu__item-icon", children: icon }),
733
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-navbar-mega-menu__item-text", children: [
734
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-mega-menu__item-label", children: label }),
735
+ description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-navbar-mega-menu__item-description", children: description })
736
+ ] })
737
+ ]
738
+ }
739
+ ) });
740
+ }
741
+ );
742
+ NavbarMegaMenuItem.displayName = "NavbarMegaMenuItem";
743
+ var Breadcrumb = React4__default.default.forwardRef(
744
+ ({ className, "aria-label": ariaLabel = "Breadcrumb", ...props }, ref) => {
745
+ return /* @__PURE__ */ jsxRuntime.jsx(
746
+ "nav",
747
+ {
748
+ ref,
749
+ "aria-label": ariaLabel,
750
+ className: clsx__default.default("ds-breadcrumb", className),
751
+ ...props
752
+ }
753
+ );
754
+ }
755
+ );
756
+ Breadcrumb.displayName = "Breadcrumb";
757
+ var BreadcrumbList = React4__default.default.forwardRef(({ className, ...props }, ref) => {
758
+ return /* @__PURE__ */ jsxRuntime.jsx(
759
+ "ol",
760
+ {
761
+ ref,
762
+ className: clsx__default.default("ds-breadcrumb__list", className),
763
+ ...props
764
+ }
765
+ );
766
+ });
767
+ BreadcrumbList.displayName = "BreadcrumbList";
768
+ var BreadcrumbItem = React4__default.default.forwardRef(({ className, ...props }, ref) => {
769
+ return /* @__PURE__ */ jsxRuntime.jsx(
770
+ "li",
771
+ {
772
+ ref,
773
+ className: clsx__default.default("ds-breadcrumb__item", className),
774
+ ...props
775
+ }
776
+ );
777
+ });
778
+ BreadcrumbItem.displayName = "BreadcrumbItem";
779
+ var BreadcrumbLink = React4__default.default.forwardRef(({ className, asChild = false, ...props }, ref) => {
780
+ const Comp = asChild ? reactSlot.Slot : "a";
781
+ return /* @__PURE__ */ jsxRuntime.jsx(
782
+ Comp,
783
+ {
784
+ ref,
785
+ className: clsx__default.default("ds-breadcrumb__link", className),
786
+ ...props
787
+ }
788
+ );
789
+ });
790
+ BreadcrumbLink.displayName = "BreadcrumbLink";
791
+ var BreadcrumbPage = React4__default.default.forwardRef(({ className, ...props }, ref) => {
792
+ return /* @__PURE__ */ jsxRuntime.jsx(
793
+ "span",
794
+ {
795
+ ref,
796
+ role: "link",
797
+ "aria-current": "page",
798
+ "aria-disabled": "true",
799
+ className: clsx__default.default("ds-breadcrumb__page", className),
800
+ ...props
801
+ }
802
+ );
803
+ });
804
+ BreadcrumbPage.displayName = "BreadcrumbPage";
805
+ var BreadcrumbSeparator = React4__default.default.forwardRef(({ className, children, ...props }, ref) => {
806
+ return /* @__PURE__ */ jsxRuntime.jsx(
807
+ "li",
808
+ {
809
+ ref,
810
+ role: "presentation",
811
+ "aria-hidden": "true",
812
+ className: clsx__default.default("ds-breadcrumb__separator", className),
813
+ ...props,
814
+ children: children ?? "/"
815
+ }
816
+ );
817
+ });
818
+ BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
819
+ var BreadcrumbEllipsis = React4__default.default.forwardRef(({ className, ...props }, ref) => {
820
+ return /* @__PURE__ */ jsxRuntime.jsx(
821
+ "span",
822
+ {
823
+ ref,
824
+ className: clsx__default.default("ds-breadcrumb__ellipsis", className),
825
+ ...props,
826
+ children: "\u2026"
827
+ }
828
+ );
829
+ });
830
+ BreadcrumbEllipsis.displayName = "BreadcrumbEllipsis";
831
+ function FooterAccordionItem({ section, LinkComponent }) {
832
+ const [isOpen, setIsOpen] = React4.useState(false);
833
+ return /* @__PURE__ */ jsxRuntime.jsxs(
834
+ "div",
835
+ {
836
+ className: clsx__default.default(
837
+ "ds-footer__accordion-item",
838
+ isOpen && "ds-footer__accordion-item--open"
839
+ ),
840
+ children: [
841
+ /* @__PURE__ */ jsxRuntime.jsxs(
842
+ "button",
843
+ {
844
+ type: "button",
845
+ className: "ds-footer__accordion-trigger",
846
+ "aria-expanded": isOpen,
847
+ onClick: () => setIsOpen((prev) => !prev),
848
+ children: [
849
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: section.title }),
850
+ /* @__PURE__ */ jsxRuntime.jsx(
851
+ "svg",
852
+ {
853
+ className: "ds-footer__accordion-chevron",
854
+ width: "16",
855
+ height: "16",
856
+ viewBox: "0 0 24 24",
857
+ fill: "none",
858
+ stroke: "currentColor",
859
+ strokeWidth: "2",
860
+ strokeLinecap: "round",
861
+ strokeLinejoin: "round",
862
+ "aria-hidden": "true",
863
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "6 9 12 15 18 9" })
864
+ }
865
+ )
866
+ ]
867
+ }
868
+ ),
869
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__accordion-panel", hidden: !isOpen, children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ds-footer__links", children: section.links.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(LinkComponent, { href: link.href, className: "ds-footer__link", children: [
870
+ link.label,
871
+ link.isNew && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-footer__badge", children: "NEW" })
872
+ ] }) }, idx)) }) })
873
+ ]
874
+ }
875
+ );
876
+ }
877
+ var SiteFooter = React4.forwardRef(
878
+ ({
879
+ cta,
880
+ sections = [],
881
+ orientationLine,
882
+ linkAs,
883
+ brand,
884
+ tagline,
885
+ socials,
886
+ trustBadges,
887
+ controls,
888
+ legalLinks = [],
889
+ copyright,
890
+ companyInfo,
891
+ bottomExtra,
892
+ bottomActions,
893
+ className,
894
+ ...props
895
+ }, ref) => {
896
+ const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
897
+ const defaultCopyright = copyright || `\xA9 ${currentYear}. All rights reserved.`;
898
+ const resolvedControls = controls || bottomActions;
899
+ const LinkComponent = linkAs || "a";
900
+ return /* @__PURE__ */ jsxRuntime.jsxs("footer", { ref, className: clsx__default.default("ds-footer", className), ...props, children: [
901
+ cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__cta", "data-footer-zone": "cta", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-footer__cta-content", children: [
902
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "ds-footer__cta-headline", children: cta.headline }),
903
+ cta.subtext && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-footer__cta-subtext", children: cta.subtext }),
904
+ (cta.primaryCta || cta.secondaryCta) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-footer__cta-actions", children: [
905
+ cta.primaryCta,
906
+ cta.secondaryCta
907
+ ] }),
908
+ cta.trustLine && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-footer__cta-trust", children: cta.trustLine })
909
+ ] }) }) }),
910
+ sections.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__nav", "data-footer-zone": "navigation", children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
911
+ orientationLine && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__orientation", children: orientationLine }),
912
+ /* @__PURE__ */ jsxRuntime.jsx(
913
+ "nav",
914
+ {
915
+ className: "ds-footer__grid",
916
+ "aria-label": "Footer navigation",
917
+ children: sections.map((section, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
918
+ "div",
919
+ {
920
+ className: "ds-footer__column",
921
+ "data-footer-section": section.title.toLowerCase().replace(/\s+/g, "-"),
922
+ children: [
923
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-footer__heading", children: section.title }),
924
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "ds-footer__links", children: section.links.map((link, linkIdx) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
925
+ LinkComponent,
926
+ {
927
+ href: link.href,
928
+ className: "ds-footer__link",
929
+ children: [
930
+ link.label,
931
+ link.isNew && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-footer__badge", children: "NEW" })
932
+ ]
933
+ }
934
+ ) }, linkIdx)) })
935
+ ]
936
+ },
937
+ idx
938
+ ))
939
+ }
940
+ ),
941
+ /* @__PURE__ */ jsxRuntime.jsx(
942
+ "nav",
943
+ {
944
+ className: "ds-footer__mobile-nav",
945
+ "aria-label": "Footer navigation",
946
+ children: sections.map((section, idx) => /* @__PURE__ */ jsxRuntime.jsx(
947
+ FooterAccordionItem,
948
+ {
949
+ section,
950
+ LinkComponent
951
+ },
952
+ idx
953
+ ))
954
+ }
955
+ )
956
+ ] }) }),
957
+ (brand || socials || trustBadges) && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__authority", "data-footer-zone": "authority", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-footer__authority-content", children: [
958
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-footer__brand", children: [
959
+ brand && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__logo", children: brand }),
960
+ tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-footer__tagline", children: tagline }),
961
+ socials && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__socials", children: socials })
962
+ ] }),
963
+ trustBadges && trustBadges.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__trust-badges", children: trustBadges.map((badge, idx) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-footer__trust-badge", children: badge.label }, idx)) })
964
+ ] }) }) }),
965
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__bottom", "data-footer-zone": "legal", children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
966
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ds-footer__bottom-content", children: [
967
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__copyright", children: copyright || defaultCopyright }),
968
+ resolvedControls && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__controls", children: resolvedControls }),
969
+ legalLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__legal", children: legalLinks.map((link, idx) => /* @__PURE__ */ jsxRuntime.jsx(
970
+ LinkComponent,
971
+ {
972
+ href: link.href,
973
+ className: "ds-footer__legal-link",
974
+ children: link.label
975
+ },
976
+ idx
977
+ )) })
978
+ ] }),
979
+ bottomExtra && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ds-footer__bottom-extra", children: bottomExtra }),
980
+ companyInfo && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "ds-footer__company-info", children: companyInfo })
981
+ ] }) })
982
+ ] });
983
+ }
984
+ );
985
+ SiteFooter.displayName = "SiteFooter";
986
+ var GlobeIcon = () => /* @__PURE__ */ jsxRuntime.jsxs(
987
+ "svg",
988
+ {
989
+ width: "16",
990
+ height: "16",
991
+ viewBox: "0 0 24 24",
992
+ fill: "none",
993
+ stroke: "currentColor",
994
+ strokeWidth: "2",
995
+ strokeLinecap: "round",
996
+ strokeLinejoin: "round",
997
+ "aria-hidden": "true",
998
+ children: [
999
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "10" }),
1000
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 12h20" }),
1001
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
1002
+ ]
1003
+ }
1004
+ );
1005
+ var ChevronDownIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
1006
+ "svg",
1007
+ {
1008
+ width: "12",
1009
+ height: "12",
1010
+ viewBox: "0 0 16 16",
1011
+ fill: "none",
1012
+ stroke: "currentColor",
1013
+ strokeWidth: "1.5",
1014
+ strokeLinecap: "round",
1015
+ strokeLinejoin: "round",
1016
+ "aria-hidden": "true",
1017
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 6L8 10L12 6" })
1018
+ }
1019
+ );
1020
+ var CheckIcon = () => /* @__PURE__ */ jsxRuntime.jsx(
1021
+ "svg",
1022
+ {
1023
+ width: "14",
1024
+ height: "14",
1025
+ viewBox: "0 0 24 24",
1026
+ fill: "none",
1027
+ stroke: "currentColor",
1028
+ strokeWidth: "2.5",
1029
+ strokeLinecap: "round",
1030
+ strokeLinejoin: "round",
1031
+ "aria-hidden": "true",
1032
+ children: /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "20 6 9 17 4 12" })
1033
+ }
1034
+ );
1035
+ var LocaleDropdown = React4.forwardRef(
1036
+ ({
1037
+ locales,
1038
+ activeLocale,
1039
+ onLocaleChange,
1040
+ optionAs: OptionComponent = "button",
1041
+ getHref,
1042
+ className,
1043
+ direction = "down",
1044
+ align = "right"
1045
+ }, ref) => {
1046
+ const [isOpen, setIsOpen] = React4.useState(false);
1047
+ const [focusIndex, setFocusIndex] = React4.useState(-1);
1048
+ const containerRef = React4.useRef(null);
1049
+ const triggerRef = React4.useRef(null);
1050
+ const listRef = React4.useRef(null);
1051
+ const instanceId = React4.useId();
1052
+ const listboxId = `locale-dropdown-${instanceId}`;
1053
+ const currentLocale = locales.find((l) => l.code === activeLocale) ?? locales[0];
1054
+ const handleToggle = React4.useCallback(() => {
1055
+ setIsOpen((prev) => {
1056
+ if (!prev) setFocusIndex(-1);
1057
+ return !prev;
1058
+ });
1059
+ }, []);
1060
+ const handleClose = React4.useCallback(() => {
1061
+ setIsOpen(false);
1062
+ setFocusIndex(-1);
1063
+ triggerRef.current?.focus();
1064
+ }, []);
1065
+ const handleSelect = React4.useCallback(
1066
+ (code) => {
1067
+ onLocaleChange?.(code);
1068
+ handleClose();
1069
+ },
1070
+ [onLocaleChange, handleClose]
1071
+ );
1072
+ React4.useEffect(() => {
1073
+ if (!isOpen) return;
1074
+ const handleClickOutside = (e) => {
1075
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
1076
+ handleClose();
1077
+ }
1078
+ };
1079
+ document.addEventListener("mousedown", handleClickOutside);
1080
+ return () => document.removeEventListener("mousedown", handleClickOutside);
1081
+ }, [isOpen, handleClose]);
1082
+ const handleKeyDown = React4.useCallback(
1083
+ (e) => {
1084
+ if (!isOpen) {
1085
+ if (e.key === "ArrowDown" || e.key === "Enter" || e.key === " ") {
1086
+ e.preventDefault();
1087
+ setIsOpen(true);
1088
+ setFocusIndex(0);
1089
+ }
1090
+ return;
1091
+ }
1092
+ switch (e.key) {
1093
+ case "Escape":
1094
+ e.preventDefault();
1095
+ handleClose();
1096
+ break;
1097
+ case "ArrowDown":
1098
+ e.preventDefault();
1099
+ setFocusIndex((prev) => (prev + 1) % locales.length);
1100
+ break;
1101
+ case "ArrowUp":
1102
+ e.preventDefault();
1103
+ setFocusIndex((prev) => (prev - 1 + locales.length) % locales.length);
1104
+ break;
1105
+ case "Enter":
1106
+ case " ":
1107
+ e.preventDefault();
1108
+ if (focusIndex >= 0 && focusIndex < locales.length) {
1109
+ handleSelect(locales[focusIndex].code);
1110
+ }
1111
+ break;
1112
+ case "Home":
1113
+ e.preventDefault();
1114
+ setFocusIndex(0);
1115
+ break;
1116
+ case "End":
1117
+ e.preventDefault();
1118
+ setFocusIndex(locales.length - 1);
1119
+ break;
1120
+ case "Tab":
1121
+ handleClose();
1122
+ break;
1123
+ }
1124
+ },
1125
+ [isOpen, focusIndex, locales, handleClose, handleSelect]
1126
+ );
1127
+ React4.useEffect(() => {
1128
+ if (!isOpen || focusIndex < 0 || !listRef.current) return;
1129
+ const items = listRef.current.querySelectorAll('[role="option"]');
1130
+ items[focusIndex]?.scrollIntoView({ block: "nearest" });
1131
+ }, [isOpen, focusIndex]);
1132
+ const activeDescendantId = isOpen && focusIndex >= 0 ? `${listboxId}-option-${focusIndex}` : void 0;
1133
+ return /* @__PURE__ */ jsxRuntime.jsx(
1134
+ "div",
1135
+ {
1136
+ ref,
1137
+ className: clsx__default.default(
1138
+ "ds-locale-dropdown",
1139
+ direction === "up" && "ds-locale-dropdown--up",
1140
+ align === "left" && "ds-locale-dropdown--align-left",
1141
+ align === "center" && "ds-locale-dropdown--align-center",
1142
+ className
1143
+ ),
1144
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "ds-locale-dropdown__wrapper", children: [
1145
+ /* @__PURE__ */ jsxRuntime.jsxs(
1146
+ "button",
1147
+ {
1148
+ ref: triggerRef,
1149
+ type: "button",
1150
+ className: "ds-locale-dropdown__trigger",
1151
+ onClick: handleToggle,
1152
+ onKeyDown: handleKeyDown,
1153
+ "aria-haspopup": "listbox",
1154
+ "aria-expanded": isOpen,
1155
+ "aria-controls": isOpen ? listboxId : void 0,
1156
+ "aria-activedescendant": activeDescendantId,
1157
+ "aria-label": `Language: ${currentLocale.label}. Change language.`,
1158
+ children: [
1159
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-locale-dropdown__trigger-icon", children: /* @__PURE__ */ jsxRuntime.jsx(GlobeIcon, {}) }),
1160
+ currentLocale.flag && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-locale-dropdown__trigger-flag", "aria-hidden": "true", children: currentLocale.flag }),
1161
+ /* @__PURE__ */ jsxRuntime.jsx(
1162
+ "span",
1163
+ {
1164
+ className: "ds-locale-dropdown__trigger-chevron",
1165
+ "data-state": isOpen ? "open" : "closed",
1166
+ children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon, {})
1167
+ }
1168
+ )
1169
+ ]
1170
+ }
1171
+ ),
1172
+ /* @__PURE__ */ jsxRuntime.jsx(
1173
+ "div",
1174
+ {
1175
+ ref: listRef,
1176
+ id: listboxId,
1177
+ className: "ds-locale-dropdown__panel",
1178
+ role: "listbox",
1179
+ "aria-label": "Select language",
1180
+ "data-state": isOpen ? "open" : "closed",
1181
+ onKeyDown: handleKeyDown,
1182
+ children: locales.map((locale, index) => {
1183
+ const isActive = locale.code === activeLocale;
1184
+ const isFocused = index === focusIndex;
1185
+ const optionId = `${listboxId}-option-${index}`;
1186
+ const optionProps = {
1187
+ id: optionId,
1188
+ role: "option",
1189
+ "aria-selected": isActive,
1190
+ className: clsx__default.default(
1191
+ "ds-locale-dropdown__option",
1192
+ isActive && "ds-locale-dropdown__option--active",
1193
+ isFocused && "ds-locale-dropdown__option--focused"
1194
+ ),
1195
+ onClick: () => handleSelect(locale.code),
1196
+ ...OptionComponent !== "button" && getHref ? { href: getHref(locale.code) } : { type: "button" }
1197
+ };
1198
+ return /* @__PURE__ */ jsxRuntime.jsxs(OptionComponent, { ...optionProps, children: [
1199
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "ds-locale-dropdown__option-content", children: [
1200
+ locale.flag && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-locale-dropdown__option-flag", "aria-hidden": "true", children: locale.flag }),
1201
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-locale-dropdown__option-label", children: locale.label })
1202
+ ] }),
1203
+ isActive && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ds-locale-dropdown__option-check", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
1204
+ ] }, locale.code);
1205
+ })
1206
+ }
1207
+ )
1208
+ ] })
1209
+ }
1210
+ );
1211
+ }
1212
+ );
1213
+ LocaleDropdown.displayName = "LocaleDropdown";
1214
+ var UtmContext = React4.createContext(null);
1215
+
1216
+ // src/web/utm/useUtmDefaults.ts
1217
+ function useUtmDefaults() {
1218
+ return React4.useContext(UtmContext);
1219
+ }
1220
+
1221
+ // src/web/utm/builders.ts
1222
+ var PLACEHOLDER_ORIGIN = "https://__placeholder__.internal";
1223
+ function buildUtmUrl(baseUrl, params) {
1224
+ const isRelative = baseUrl.startsWith("/");
1225
+ let url;
1226
+ try {
1227
+ url = isRelative ? new URL(baseUrl, PLACEHOLDER_ORIGIN) : new URL(baseUrl);
1228
+ } catch {
1229
+ return baseUrl;
1230
+ }
1231
+ const existingParams = [];
1232
+ url.searchParams.forEach((value, key) => {
1233
+ existingParams.push([key, value]);
1234
+ });
1235
+ for (const [key] of existingParams) {
1236
+ url.searchParams.delete(key);
1237
+ }
1238
+ for (const [key, value] of existingParams) {
1239
+ if (!key.startsWith("utm_")) {
1240
+ url.searchParams.set(key, value);
1241
+ }
1242
+ }
1243
+ url.searchParams.set("utm_source", params.source);
1244
+ url.searchParams.set("utm_medium", params.medium);
1245
+ url.searchParams.set("utm_campaign", params.campaign);
1246
+ if (params.term !== void 0) {
1247
+ url.searchParams.set("utm_term", params.term);
1248
+ }
1249
+ if (params.content !== void 0) {
1250
+ url.searchParams.set("utm_content", params.content);
1251
+ }
1252
+ if (isRelative) {
1253
+ return url.href.replace(PLACEHOLDER_ORIGIN, "");
1254
+ }
1255
+ return url.href;
1256
+ }
1257
+
1258
+ // src/web/utm/classifiers.ts
1259
+ var INTERNAL_PATTERNS = [
1260
+ /^\/(?!\/)/,
1261
+ // Relative paths
1262
+ /^https?:\/\/(www\.)?sales-mind\.ai/i,
1263
+ // Marketing site
1264
+ /^https?:\/\/app\.sales-mind\.ai/i,
1265
+ // Web app
1266
+ /^https?:\/\/apps\.sales-mind\.ai/i,
1267
+ // Web app (legacy)
1268
+ /^https?:\/\/meet\.sales-mind\.ai/i,
1269
+ // Booking
1270
+ /^https?:\/\/docs\.sales-mind\.ai/i
1271
+ // Docs
1272
+ ];
1273
+ var SYSTEM_PATTERNS = [
1274
+ /^https?:\/\/.*\/api\//i,
1275
+ // API endpoints
1276
+ /^https?:\/\/.*\/webhook/i,
1277
+ // Webhooks
1278
+ /^https?:\/\/.*\/oauth/i,
1279
+ // OAuth callbacks
1280
+ /^https?:\/\/.*\/callback/i,
1281
+ // Callbacks
1282
+ /^https?:\/\/.*\.supabase\.(co|com)/i,
1283
+ // Supabase
1284
+ /^https?:\/\/.*\.firebaseapp\.com/i,
1285
+ // Firebase
1286
+ /^https?:\/\/.*\.cloudfunctions\.net/i
1287
+ // Cloud Functions
1288
+ ];
1289
+ var ASSET_PATTERNS = [
1290
+ /\.(css|js|mjs|map|woff2?|ttf|eot|svg|png|jpe?g|gif|webp|avif|ico|pdf)(\?.*)?$/i
1291
+ ];
1292
+ var CONVERSION_PATTERNS = [
1293
+ /^https?:\/\/(www\.)?calendly\.com/i,
1294
+ /^https?:\/\/(checkout\.)?stripe\.com/i,
1295
+ /^https?:\/\/buy\.stripe\.com/i,
1296
+ /^https?:\/\/chromewebstore\.google\.com/i,
1297
+ /^https?:\/\/meet\.sales-mind\.ai/i
1298
+ ];
1299
+ var PROTOCOL_EXEMPT = [
1300
+ /^mailto:/i,
1301
+ /^tel:/i,
1302
+ /^#/,
1303
+ /^javascript:/i
1304
+ ];
1305
+ function classifyUrl(url) {
1306
+ if (PROTOCOL_EXEMPT.some((p) => p.test(url))) return "protocol";
1307
+ if (ASSET_PATTERNS.some((p) => p.test(url))) return "asset";
1308
+ if (SYSTEM_PATTERNS.some((p) => p.test(url))) return "system";
1309
+ if (CONVERSION_PATTERNS.some((p) => p.test(url))) return "conversion";
1310
+ if (INTERNAL_PATTERNS.some((p) => p.test(url))) return "internal";
1311
+ return "external";
1312
+ }
1313
+
1314
+ // src/components/OutboundLink/outbound-link-utils.ts
1315
+ var LEGACY_UTM_SOURCE = "salesmind";
1316
+ var EXEMPT_PATTERNS = [
1317
+ /^https?:\/\/(www\.)?(stripe\.com|checkout\.stripe\.com|paypal\.com)/i,
1318
+ /^https?:\/\/(www\.)?github\.com\/login\/oauth/i
1319
+ ];
1320
+ var isExemptUrl = (urlStr) => {
1321
+ if (urlStr.startsWith("mailto:") || urlStr.startsWith("tel:")) return true;
1322
+ const classification = classifyUrl(urlStr);
1323
+ if (classification === "system" || classification === "protocol" || classification === "asset") {
1324
+ return true;
1325
+ }
1326
+ return EXEMPT_PATTERNS.some((pattern) => pattern.test(urlStr));
1327
+ };
1328
+ var appendGovernedUTMs = (href, params, preserveExisting = true) => {
1329
+ try {
1330
+ const url = new URL(href);
1331
+ if (preserveExisting) {
1332
+ const hasAll = url.searchParams.has("utm_source") && url.searchParams.has("utm_medium") && url.searchParams.has("utm_campaign");
1333
+ if (hasAll) return href;
1334
+ }
1335
+ return buildUtmUrl(href, params);
1336
+ } catch {
1337
+ return href;
1338
+ }
1339
+ };
1340
+ var appendUTMs = (href, context, pageSlug, options) => {
1341
+ try {
1342
+ const url = new URL(href);
1343
+ const { mediumOverride = "outbound_link", campaignOverride, preserveExisting = true } = options;
1344
+ const utms = {
1345
+ utm_source: LEGACY_UTM_SOURCE,
1346
+ utm_medium: mediumOverride,
1347
+ utm_campaign: campaignOverride || pageSlug,
1348
+ utm_content: context
1349
+ };
1350
+ Object.entries(utms).forEach(([key, value]) => {
1351
+ if (value) {
1352
+ if (preserveExisting && url.searchParams.has(key)) {
1353
+ return;
1354
+ }
1355
+ url.searchParams.set(key, value);
1356
+ }
1357
+ });
1358
+ return url.toString();
1359
+ } catch {
1360
+ return href;
1361
+ }
1362
+ };
1363
+ var OutboundLink = React4.forwardRef(
1364
+ ({
1365
+ href,
1366
+ context,
1367
+ campaignOverride,
1368
+ mediumOverride = "outbound_link",
1369
+ preserveExistingUTM = true,
1370
+ openInNewTab = true,
1371
+ disableTracking = false,
1372
+ utmParams,
1373
+ onClick,
1374
+ children,
1375
+ ...props
1376
+ }, ref) => {
1377
+ const contextParams = useUtmDefaults();
1378
+ const resolvedUtmParams = utmParams ?? contextParams;
1379
+ let hostname = "";
1380
+ try {
1381
+ const url = new URL(href);
1382
+ hostname = url.hostname;
1383
+ } catch {
1384
+ }
1385
+ const [finalHref, setFinalHref] = React4.useState(href);
1386
+ React4.useEffect(() => {
1387
+ let isExternal = false;
1388
+ let currentMedium = mediumOverride;
1389
+ try {
1390
+ const url = new URL(href);
1391
+ const currentHost = window.location.hostname;
1392
+ isExternal = url.hostname !== currentHost;
1393
+ if (isExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
1394
+ if (currentMedium === "outbound_link") {
1395
+ currentMedium = "cross_subdomain";
1396
+ }
1397
+ }
1398
+ } catch {
1399
+ isExternal = false;
1400
+ }
1401
+ const isExempt = isExemptUrl(href) || disableTracking;
1402
+ if (isExternal && !isExempt) {
1403
+ if (resolvedUtmParams) {
1404
+ setFinalHref(appendGovernedUTMs(href, resolvedUtmParams, preserveExistingUTM));
1405
+ } else {
1406
+ const pageSlug = window.location.pathname.replace(/^\/|\/$/g, "") || "home";
1407
+ setFinalHref(appendUTMs(href, context, pageSlug, {
1408
+ mediumOverride: currentMedium,
1409
+ campaignOverride,
1410
+ preserveExisting: preserveExistingUTM
1411
+ }));
1412
+ }
1413
+ } else {
1414
+ setFinalHref(href);
1415
+ }
1416
+ }, [href, context, mediumOverride, campaignOverride, preserveExistingUTM, disableTracking, resolvedUtmParams]);
1417
+ const handleClick = (e) => {
1418
+ if (typeof window === "undefined" || disableTracking) {
1419
+ onClick?.(e);
1420
+ return;
1421
+ }
1422
+ let clickExternal = false;
1423
+ let clickCrossSubdomain = false;
1424
+ let clickMedium = mediumOverride;
1425
+ try {
1426
+ const url = new URL(href);
1427
+ const currentHost = window.location.hostname;
1428
+ clickExternal = url.hostname !== currentHost;
1429
+ if (clickExternal && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
1430
+ clickCrossSubdomain = true;
1431
+ if (clickMedium === "outbound_link") {
1432
+ clickMedium = "cross_subdomain";
1433
+ }
1434
+ }
1435
+ } catch {
1436
+ }
1437
+ if (clickExternal) {
1438
+ const detail = {
1439
+ destination_domain: hostname,
1440
+ destination_url: finalHref,
1441
+ utm_medium_type: clickMedium,
1442
+ page_slug: window.location.pathname,
1443
+ component_location: context,
1444
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
1445
+ is_cross_subdomain: clickCrossSubdomain
1446
+ };
1447
+ const event = new CustomEvent("outbound_click", { detail });
1448
+ window.dispatchEvent(event);
1449
+ }
1450
+ onClick?.(e);
1451
+ };
1452
+ const relParts = [];
1453
+ let shouldOpenNewTab = openInNewTab;
1454
+ try {
1455
+ const url = new URL(href);
1456
+ if (typeof window !== "undefined") {
1457
+ const currentHost = window.location.hostname;
1458
+ if (url.hostname !== currentHost && currentHost.includes("sales-mind.ai") && url.hostname.includes("sales-mind.ai")) {
1459
+ shouldOpenNewTab = false;
1460
+ }
1461
+ }
1462
+ } catch {
1463
+ }
1464
+ if (shouldOpenNewTab) relParts.push("noopener", "noreferrer");
1465
+ if (mediumOverride === "citation") relParts.push("nofollow");
1466
+ const rel = relParts.length > 0 ? relParts.join(" ") : void 0;
1467
+ return (
1468
+ // eslint-disable-next-line no-restricted-syntax
1469
+ /* @__PURE__ */ jsxRuntime.jsx(
1470
+ "a",
1471
+ {
1472
+ ref,
1473
+ href: finalHref,
1474
+ target: shouldOpenNewTab ? "_blank" : void 0,
1475
+ rel,
1476
+ onClick: handleClick,
1477
+ ...props,
1478
+ children
1479
+ }
1480
+ )
1481
+ );
1482
+ }
1483
+ );
1484
+ OutboundLink.displayName = "OutboundLink";
1485
+ var MDXOutboundLink = ({
1486
+ href,
1487
+ children,
1488
+ ...props
1489
+ }) => {
1490
+ if (!href) {
1491
+ return /* @__PURE__ */ jsxRuntime.jsx("a", { ...props, children });
1492
+ }
1493
+ return /* @__PURE__ */ jsxRuntime.jsx(
1494
+ OutboundLink,
1495
+ {
1496
+ href,
1497
+ context: "cms_markdown",
1498
+ preserveExistingUTM: true,
1499
+ openInNewTab: true,
1500
+ ...props,
1501
+ children
1502
+ }
1503
+ );
1504
+ };
1505
+
1506
+ exports.Breadcrumb = Breadcrumb;
1507
+ exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
1508
+ exports.BreadcrumbItem = BreadcrumbItem;
1509
+ exports.BreadcrumbLink = BreadcrumbLink;
1510
+ exports.BreadcrumbList = BreadcrumbList;
1511
+ exports.BreadcrumbPage = BreadcrumbPage;
1512
+ exports.BreadcrumbSeparator = BreadcrumbSeparator;
1513
+ exports.LocaleDropdown = LocaleDropdown;
1514
+ exports.MDXOutboundLink = MDXOutboundLink;
1515
+ exports.NavbarMegaMenu = NavbarMegaMenu;
1516
+ exports.NavbarMegaMenuItem = NavbarMegaMenuItem;
1517
+ exports.NavbarMegaMenuSection = NavbarMegaMenuSection;
1518
+ exports.NavbarMobileActions = NavbarMobileActions;
1519
+ exports.NavbarMobileNavItem = NavbarMobileNavItem;
1520
+ exports.NavbarMobileSeparator = NavbarMobileSeparator;
1521
+ exports.NavbarV2 = NavbarV2;
1522
+ exports.NavbarV2Actions = NavbarV2Actions;
1523
+ exports.NavbarV2Brand = NavbarV2Brand;
1524
+ exports.NavbarV2Tab = NavbarV2Tab;
1525
+ exports.NavbarV2TabMenu = NavbarV2TabMenu;
1526
+ exports.NavbarV2Tabs = NavbarV2Tabs;
1527
+ exports.OutboundLink = OutboundLink;
1528
+ exports.SiteFooter = SiteFooter;
1529
+ exports.appendGovernedUTMs = appendGovernedUTMs;
1530
+ exports.appendUTMs = appendUTMs;
1531
+ exports.isExemptUrl = isExemptUrl;
1532
+ //# sourceMappingURL=out.js.map
1533
+ //# sourceMappingURL=index.cjs.map