aura-ui-library 1.0.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.
- package/dist/index.js +3706 -0
- package/dist/index.mjs +3674 -0
- package/package.json +28 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,3706 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/index.js
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
|
+
MagneticButton: () => MagneticButton,
|
|
33
|
+
Navbar: () => Navbar,
|
|
34
|
+
SpotlightCard: () => SpotlightCard
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
|
+
|
|
38
|
+
// src/components/Button/MagneticButton.jsx
|
|
39
|
+
var import_react = __toESM(require("react"));
|
|
40
|
+
var injectStyles = () => {
|
|
41
|
+
const id = "mb-global-v2";
|
|
42
|
+
if (document.getElementById(id)) return;
|
|
43
|
+
const s = document.createElement("style");
|
|
44
|
+
s.id = id;
|
|
45
|
+
s.innerHTML = `
|
|
46
|
+
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');
|
|
47
|
+
|
|
48
|
+
.mb-root *, .mb-root *::before, .mb-root *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
49
|
+
|
|
50
|
+
@keyframes mb-reveal { from { opacity:0; transform:translateY(18px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }
|
|
51
|
+
@keyframes mb-shimmer { from { transform:translateX(-120%) skewX(-15deg); } to { transform:translateX(220%) skewX(-15deg); } }
|
|
52
|
+
@keyframes mb-spin { to { transform:rotate(360deg); } }
|
|
53
|
+
@keyframes mb-tick { 0%{stroke-dashoffset:24} 100%{stroke-dashoffset:0} }
|
|
54
|
+
@keyframes mb-burst { 0%{transform:scale(0) translate(-50%,-50%);opacity:1} 100%{transform:scale(2.8) translate(-50%,-50%);opacity:0} }
|
|
55
|
+
@keyframes mb-particle { 0%{opacity:1;transform:translate(0,0) scale(1)} 100%{opacity:0;transform:var(--tx,0) var(--ty,0) scale(0)} }
|
|
56
|
+
@keyframes mb-pulse-ring{ 0%{transform:scale(1);opacity:.6} 100%{transform:scale(1.9);opacity:0} }
|
|
57
|
+
@keyframes mb-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-6px)} }
|
|
58
|
+
@keyframes mb-error-shake{ 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-5px)} 40%,80%{transform:translateX(5px)} }
|
|
59
|
+
|
|
60
|
+
@media (prefers-reduced-motion: reduce) {
|
|
61
|
+
.mb-root, .mb-root * { animation: none !important; transition: none !important; }
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
document.head.appendChild(s);
|
|
65
|
+
};
|
|
66
|
+
var PRESETS = {
|
|
67
|
+
obsidian: {
|
|
68
|
+
bg: "linear-gradient(135deg,#1a1a2e,#16213e)",
|
|
69
|
+
glow: "rgba(99,102,241,.55)",
|
|
70
|
+
border: "rgba(99,102,241,.25)",
|
|
71
|
+
text: "#fff",
|
|
72
|
+
shimmer: "rgba(255,255,255,.12)"
|
|
73
|
+
},
|
|
74
|
+
crimson: {
|
|
75
|
+
bg: "linear-gradient(135deg,#7f0000,#c0392b)",
|
|
76
|
+
glow: "rgba(231,76,60,.6)",
|
|
77
|
+
border: "rgba(231,76,60,.3)",
|
|
78
|
+
text: "#fff",
|
|
79
|
+
shimmer: "rgba(255,255,255,.15)"
|
|
80
|
+
},
|
|
81
|
+
aurora: {
|
|
82
|
+
bg: "linear-gradient(135deg,#0d7377,#14a085)",
|
|
83
|
+
glow: "rgba(20,160,133,.6)",
|
|
84
|
+
border: "rgba(20,160,133,.3)",
|
|
85
|
+
text: "#fff",
|
|
86
|
+
shimmer: "rgba(255,255,255,.15)"
|
|
87
|
+
},
|
|
88
|
+
solar: {
|
|
89
|
+
bg: "linear-gradient(135deg,#e67e22,#f39c12)",
|
|
90
|
+
glow: "rgba(243,156,18,.65)",
|
|
91
|
+
border: "rgba(243,156,18,.3)",
|
|
92
|
+
text: "#1a1a1a",
|
|
93
|
+
shimmer: "rgba(255,255,255,.2)"
|
|
94
|
+
},
|
|
95
|
+
void: {
|
|
96
|
+
bg: "linear-gradient(135deg,#0f0f0f,#1a1a1a)",
|
|
97
|
+
glow: "rgba(255,255,255,.15)",
|
|
98
|
+
border: "rgba(255,255,255,.1)",
|
|
99
|
+
text: "#fff",
|
|
100
|
+
shimmer: "rgba(255,255,255,.07)"
|
|
101
|
+
},
|
|
102
|
+
neon: {
|
|
103
|
+
bg: "transparent",
|
|
104
|
+
glow: "rgba(0,255,170,.5)",
|
|
105
|
+
border: "rgba(0,255,170,.6)",
|
|
106
|
+
text: "#00ffaa",
|
|
107
|
+
shimmer: "rgba(0,255,170,.15)"
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
var SIZES = {
|
|
111
|
+
sm: {
|
|
112
|
+
padding: "9px 22px",
|
|
113
|
+
fontSize: "12px",
|
|
114
|
+
gap: 6,
|
|
115
|
+
iconSize: 13,
|
|
116
|
+
loaderSize: 13
|
|
117
|
+
},
|
|
118
|
+
md: {
|
|
119
|
+
padding: "13px 30px",
|
|
120
|
+
fontSize: "14px",
|
|
121
|
+
gap: 8,
|
|
122
|
+
iconSize: 15,
|
|
123
|
+
loaderSize: 15
|
|
124
|
+
},
|
|
125
|
+
lg: {
|
|
126
|
+
padding: "16px 40px",
|
|
127
|
+
fontSize: "16px",
|
|
128
|
+
gap: 10,
|
|
129
|
+
iconSize: 17,
|
|
130
|
+
loaderSize: 17
|
|
131
|
+
},
|
|
132
|
+
xl: {
|
|
133
|
+
padding: "20px 52px",
|
|
134
|
+
fontSize: "18px",
|
|
135
|
+
gap: 12,
|
|
136
|
+
iconSize: 20,
|
|
137
|
+
loaderSize: 20
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
var lerp = (a, b, t) => a + (b - a) * t;
|
|
141
|
+
var clamp = (v, mn, mx) => Math.min(Math.max(v, mn), mx);
|
|
142
|
+
var Loader = ({ size = 15, color = "#fff" }) => /* @__PURE__ */ import_react.default.createElement(
|
|
143
|
+
"svg",
|
|
144
|
+
{
|
|
145
|
+
width: size,
|
|
146
|
+
height: size,
|
|
147
|
+
viewBox: "0 0 24 24",
|
|
148
|
+
fill: "none",
|
|
149
|
+
style: { animation: "mb-spin .7s linear infinite", flexShrink: 0 }
|
|
150
|
+
},
|
|
151
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
152
|
+
"circle",
|
|
153
|
+
{
|
|
154
|
+
cx: "12",
|
|
155
|
+
cy: "12",
|
|
156
|
+
r: "10",
|
|
157
|
+
stroke: color,
|
|
158
|
+
strokeOpacity: ".25",
|
|
159
|
+
strokeWidth: "3"
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
163
|
+
"path",
|
|
164
|
+
{
|
|
165
|
+
d: "M12 2a10 10 0 0 1 10 10",
|
|
166
|
+
stroke: color,
|
|
167
|
+
strokeWidth: "3",
|
|
168
|
+
strokeLinecap: "round"
|
|
169
|
+
}
|
|
170
|
+
)
|
|
171
|
+
);
|
|
172
|
+
var TickIcon = ({ size = 15, color = "#fff" }) => /* @__PURE__ */ import_react.default.createElement(
|
|
173
|
+
"svg",
|
|
174
|
+
{
|
|
175
|
+
width: size,
|
|
176
|
+
height: size,
|
|
177
|
+
viewBox: "0 0 24 24",
|
|
178
|
+
fill: "none",
|
|
179
|
+
style: { flexShrink: 0 }
|
|
180
|
+
},
|
|
181
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
182
|
+
"polyline",
|
|
183
|
+
{
|
|
184
|
+
points: "20 6 9 17 4 12",
|
|
185
|
+
stroke: color,
|
|
186
|
+
strokeWidth: "2.5",
|
|
187
|
+
strokeLinecap: "round",
|
|
188
|
+
strokeLinejoin: "round",
|
|
189
|
+
strokeDasharray: "24",
|
|
190
|
+
strokeDashoffset: "0",
|
|
191
|
+
style: { animation: "mb-tick .35s ease forwards" }
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
);
|
|
195
|
+
var XIcon = ({ size = 15, color = "#fff" }) => /* @__PURE__ */ import_react.default.createElement(
|
|
196
|
+
"svg",
|
|
197
|
+
{
|
|
198
|
+
width: size,
|
|
199
|
+
height: size,
|
|
200
|
+
viewBox: "0 0 24 24",
|
|
201
|
+
fill: "none",
|
|
202
|
+
style: { flexShrink: 0 }
|
|
203
|
+
},
|
|
204
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
205
|
+
"line",
|
|
206
|
+
{
|
|
207
|
+
x1: "18",
|
|
208
|
+
y1: "6",
|
|
209
|
+
x2: "6",
|
|
210
|
+
y2: "18",
|
|
211
|
+
stroke: color,
|
|
212
|
+
strokeWidth: "2.5",
|
|
213
|
+
strokeLinecap: "round"
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
217
|
+
"line",
|
|
218
|
+
{
|
|
219
|
+
x1: "6",
|
|
220
|
+
y1: "6",
|
|
221
|
+
x2: "18",
|
|
222
|
+
y2: "18",
|
|
223
|
+
stroke: color,
|
|
224
|
+
strokeWidth: "2.5",
|
|
225
|
+
strokeLinecap: "round"
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
);
|
|
229
|
+
var Particles = ({ active, color }) => {
|
|
230
|
+
if (!active) return null;
|
|
231
|
+
const count = 8;
|
|
232
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, Array.from({ length: count }).map((_, i) => {
|
|
233
|
+
const angle = 360 / count * i;
|
|
234
|
+
const dist = 40 + Math.random() * 20;
|
|
235
|
+
const tx = `translateX(${Math.cos(angle * Math.PI / 180) * dist}px)`;
|
|
236
|
+
const ty = `translateY(${Math.sin(angle * Math.PI / 180) * dist}px)`;
|
|
237
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
238
|
+
"span",
|
|
239
|
+
{
|
|
240
|
+
key: i,
|
|
241
|
+
"aria-hidden": true,
|
|
242
|
+
style: {
|
|
243
|
+
"--tx": tx,
|
|
244
|
+
"--ty": ty,
|
|
245
|
+
position: "absolute",
|
|
246
|
+
left: "50%",
|
|
247
|
+
top: "50%",
|
|
248
|
+
width: 5,
|
|
249
|
+
height: 5,
|
|
250
|
+
borderRadius: "50%",
|
|
251
|
+
background: color,
|
|
252
|
+
pointerEvents: "none",
|
|
253
|
+
zIndex: 20,
|
|
254
|
+
animation: `mb-particle .55s cubic-bezier(.22,1,.36,1) forwards`,
|
|
255
|
+
animationDelay: `${i * 18}ms`
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
);
|
|
259
|
+
}));
|
|
260
|
+
};
|
|
261
|
+
var MagneticButton = ({
|
|
262
|
+
label = "Click Me",
|
|
263
|
+
preset = "obsidian",
|
|
264
|
+
size = "md",
|
|
265
|
+
variant = "solid",
|
|
266
|
+
leftIcon,
|
|
267
|
+
rightIcon,
|
|
268
|
+
showArrow = true,
|
|
269
|
+
magnetStrength = 22,
|
|
270
|
+
loading = false,
|
|
271
|
+
success = false,
|
|
272
|
+
error = false,
|
|
273
|
+
disabled = false,
|
|
274
|
+
float = false,
|
|
275
|
+
pulseRing = false,
|
|
276
|
+
borderRadius = "999px",
|
|
277
|
+
onClick,
|
|
278
|
+
className = "",
|
|
279
|
+
style: styleProp = {}
|
|
280
|
+
}) => {
|
|
281
|
+
const btnRef = (0, import_react.useRef)(null);
|
|
282
|
+
const wrapRef = (0, import_react.useRef)(null);
|
|
283
|
+
const rafRef = (0, import_react.useRef)(null);
|
|
284
|
+
const magnetPos = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
285
|
+
const targetPos = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
286
|
+
const [hovered, setHovered] = (0, import_react.useState)(false);
|
|
287
|
+
const [pressed, setPressed] = (0, import_react.useState)(false);
|
|
288
|
+
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
289
|
+
const [shimmer, setShimmer] = (0, import_react.useState)(false);
|
|
290
|
+
const [burst, setBurst] = (0, import_react.useState)(false);
|
|
291
|
+
const [magXY, setMagXY] = (0, import_react.useState)({ x: 0, y: 0 });
|
|
292
|
+
const p = PRESETS[preset] ?? PRESETS.obsidian;
|
|
293
|
+
const sz = SIZES[size] ?? SIZES.md;
|
|
294
|
+
const isLocked = disabled || loading;
|
|
295
|
+
(0, import_react.useEffect)(() => {
|
|
296
|
+
injectStyles();
|
|
297
|
+
const t = setTimeout(() => setVisible(true), 120);
|
|
298
|
+
return () => clearTimeout(t);
|
|
299
|
+
}, []);
|
|
300
|
+
const animateMagnet = (0, import_react.useCallback)(() => {
|
|
301
|
+
magnetPos.current.x = lerp(magnetPos.current.x, targetPos.current.x, 0.12);
|
|
302
|
+
magnetPos.current.y = lerp(magnetPos.current.y, targetPos.current.y, 0.12);
|
|
303
|
+
setMagXY({ x: magnetPos.current.x, y: magnetPos.current.y });
|
|
304
|
+
rafRef.current = requestAnimationFrame(animateMagnet);
|
|
305
|
+
}, []);
|
|
306
|
+
const handleMouseEnter = (0, import_react.useCallback)(
|
|
307
|
+
(e) => {
|
|
308
|
+
if (isLocked) return;
|
|
309
|
+
setHovered(true);
|
|
310
|
+
rafRef.current = requestAnimationFrame(animateMagnet);
|
|
311
|
+
setShimmer(false);
|
|
312
|
+
requestAnimationFrame(() => setShimmer(true));
|
|
313
|
+
setTimeout(() => setShimmer(false), 700);
|
|
314
|
+
},
|
|
315
|
+
[isLocked, animateMagnet]
|
|
316
|
+
);
|
|
317
|
+
const handleMouseMove = (0, import_react.useCallback)(
|
|
318
|
+
(e) => {
|
|
319
|
+
if (isLocked || !btnRef.current) return;
|
|
320
|
+
const r = btnRef.current.getBoundingClientRect();
|
|
321
|
+
const cx = r.left + r.width / 2;
|
|
322
|
+
const cy = r.top + r.height / 2;
|
|
323
|
+
const dx = e.clientX - cx;
|
|
324
|
+
const dy = e.clientY - cy;
|
|
325
|
+
const dist = Math.sqrt(dx * dx + dy * dy);
|
|
326
|
+
const maxDist = Math.max(r.width, r.height);
|
|
327
|
+
const factor = clamp(1 - dist / maxDist, 0, 1);
|
|
328
|
+
targetPos.current = {
|
|
329
|
+
x: dx * factor * (magnetStrength / 20),
|
|
330
|
+
y: dy * factor * (magnetStrength / 20)
|
|
331
|
+
};
|
|
332
|
+
},
|
|
333
|
+
[isLocked, magnetStrength]
|
|
334
|
+
);
|
|
335
|
+
const handleMouseLeave = (0, import_react.useCallback)(() => {
|
|
336
|
+
setHovered(false);
|
|
337
|
+
setPressed(false);
|
|
338
|
+
targetPos.current = { x: 0, y: 0 };
|
|
339
|
+
const spring = () => {
|
|
340
|
+
magnetPos.current.x = lerp(magnetPos.current.x, 0, 0.18);
|
|
341
|
+
magnetPos.current.y = lerp(magnetPos.current.y, 0, 0.18);
|
|
342
|
+
setMagXY({ ...magnetPos.current });
|
|
343
|
+
if (Math.abs(magnetPos.current.x) > 0.1 || Math.abs(magnetPos.current.y) > 0.1) {
|
|
344
|
+
rafRef.current = requestAnimationFrame(spring);
|
|
345
|
+
} else {
|
|
346
|
+
magnetPos.current = { x: 0, y: 0 };
|
|
347
|
+
setMagXY({ x: 0, y: 0 });
|
|
348
|
+
cancelAnimationFrame(rafRef.current);
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
cancelAnimationFrame(rafRef.current);
|
|
352
|
+
rafRef.current = requestAnimationFrame(spring);
|
|
353
|
+
}, []);
|
|
354
|
+
(0, import_react.useEffect)(() => () => cancelAnimationFrame(rafRef.current), []);
|
|
355
|
+
const handleClick = (0, import_react.useCallback)(
|
|
356
|
+
(e) => {
|
|
357
|
+
if (isLocked) return;
|
|
358
|
+
setBurst(true);
|
|
359
|
+
setTimeout(() => setBurst(false), 600);
|
|
360
|
+
onClick == null ? void 0 : onClick(e);
|
|
361
|
+
},
|
|
362
|
+
[isLocked, onClick]
|
|
363
|
+
);
|
|
364
|
+
const getBackground = () => {
|
|
365
|
+
if (variant === "ghost") return "transparent";
|
|
366
|
+
if (variant === "outline") return "transparent";
|
|
367
|
+
return p.bg;
|
|
368
|
+
};
|
|
369
|
+
const getBorder = () => {
|
|
370
|
+
if (variant === "ghost") return "1px solid transparent";
|
|
371
|
+
if (variant === "outline")
|
|
372
|
+
return `1.5px solid ${p.border.replace(".3)", ".7)")}`;
|
|
373
|
+
return `1px solid ${p.border}`;
|
|
374
|
+
};
|
|
375
|
+
const errorAnim = error ? "mb-error-shake .4s ease" : "none";
|
|
376
|
+
const floatAnim = float && !hovered && !error ? "mb-float 4s ease-in-out infinite" : "none";
|
|
377
|
+
const wrapperStyle = {
|
|
378
|
+
position: "relative",
|
|
379
|
+
display: "inline-flex",
|
|
380
|
+
alignItems: "center",
|
|
381
|
+
justifyContent: "center",
|
|
382
|
+
opacity: visible ? 1 : 0,
|
|
383
|
+
animation: visible ? `mb-reveal .55s cubic-bezier(.22,1,.36,1) forwards` : "none"
|
|
384
|
+
};
|
|
385
|
+
const buttonStyle = {
|
|
386
|
+
position: "relative",
|
|
387
|
+
display: "inline-flex",
|
|
388
|
+
alignItems: "center",
|
|
389
|
+
justifyContent: "center",
|
|
390
|
+
gap: sz.gap,
|
|
391
|
+
padding: sz.padding,
|
|
392
|
+
fontSize: sz.fontSize,
|
|
393
|
+
fontFamily: "Syne, sans-serif",
|
|
394
|
+
fontWeight: 600,
|
|
395
|
+
letterSpacing: "0.04em",
|
|
396
|
+
color: success ? "#fff" : error ? "#fff" : p.text,
|
|
397
|
+
background: success ? "linear-gradient(135deg,#059669,#10b981)" : error ? "linear-gradient(135deg,#dc2626,#ef4444)" : getBackground(),
|
|
398
|
+
border: getBorder(),
|
|
399
|
+
borderRadius,
|
|
400
|
+
cursor: isLocked ? "not-allowed" : "pointer",
|
|
401
|
+
opacity: disabled ? 0.42 : 1,
|
|
402
|
+
outline: "none",
|
|
403
|
+
overflow: "hidden",
|
|
404
|
+
userSelect: "none",
|
|
405
|
+
WebkitTapHighlightColor: "transparent",
|
|
406
|
+
transform: `
|
|
407
|
+
translate(${magXY.x}px, ${magXY.y}px)
|
|
408
|
+
scale(${pressed ? 0.95 : hovered ? 1.04 : 1})
|
|
409
|
+
translateY(${hovered ? "-2px" : "0px"})
|
|
410
|
+
`,
|
|
411
|
+
transition: "background .35s ease, border-color .35s ease, box-shadow .35s ease, opacity .25s ease",
|
|
412
|
+
boxShadow: hovered && !isLocked ? `0 18px 45px -8px ${p.glow}, 0 0 0 1px ${p.border}` : pressed ? `0 4px 14px -4px ${p.glow}` : `0 6px 22px -6px rgba(0,0,0,.4)`,
|
|
413
|
+
animation: error ? errorAnim : floatAnim,
|
|
414
|
+
...styleProp
|
|
415
|
+
};
|
|
416
|
+
const shimmerStyle = {
|
|
417
|
+
position: "absolute",
|
|
418
|
+
top: 0,
|
|
419
|
+
left: 0,
|
|
420
|
+
width: "55%",
|
|
421
|
+
height: "100%",
|
|
422
|
+
background: `linear-gradient(105deg, transparent 20%, ${p.shimmer} 50%, transparent 80%)`,
|
|
423
|
+
pointerEvents: "none",
|
|
424
|
+
zIndex: 3,
|
|
425
|
+
animation: shimmer ? "mb-shimmer .6s ease forwards" : "none"
|
|
426
|
+
};
|
|
427
|
+
const glassOverlayStyle = {
|
|
428
|
+
position: "absolute",
|
|
429
|
+
inset: 0,
|
|
430
|
+
background: "linear-gradient(160deg, rgba(255,255,255,.06) 0%, transparent 55%)",
|
|
431
|
+
pointerEvents: "none",
|
|
432
|
+
zIndex: 1,
|
|
433
|
+
borderRadius
|
|
434
|
+
};
|
|
435
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { ref: wrapRef, className: `mb-root ${className}`, style: wrapperStyle }, pulseRing && !hovered && !isLocked && /* @__PURE__ */ import_react.default.createElement(
|
|
436
|
+
"span",
|
|
437
|
+
{
|
|
438
|
+
"aria-hidden": true,
|
|
439
|
+
style: {
|
|
440
|
+
position: "absolute",
|
|
441
|
+
inset: -6,
|
|
442
|
+
borderRadius,
|
|
443
|
+
border: `1.5px solid ${p.border}`,
|
|
444
|
+
animation: "mb-pulse-ring 2s ease-out infinite",
|
|
445
|
+
pointerEvents: "none"
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
449
|
+
"button",
|
|
450
|
+
{
|
|
451
|
+
ref: btnRef,
|
|
452
|
+
style: buttonStyle,
|
|
453
|
+
onMouseEnter: handleMouseEnter,
|
|
454
|
+
onMouseMove: handleMouseMove,
|
|
455
|
+
onMouseLeave: handleMouseLeave,
|
|
456
|
+
onMouseDown: () => !isLocked && setPressed(true),
|
|
457
|
+
onMouseUp: () => setPressed(false),
|
|
458
|
+
onClick: handleClick,
|
|
459
|
+
disabled,
|
|
460
|
+
"aria-busy": loading,
|
|
461
|
+
"aria-label": label
|
|
462
|
+
},
|
|
463
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: glassOverlayStyle }),
|
|
464
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: shimmerStyle }),
|
|
465
|
+
burst && /* @__PURE__ */ import_react.default.createElement(
|
|
466
|
+
"span",
|
|
467
|
+
{
|
|
468
|
+
"aria-hidden": true,
|
|
469
|
+
style: {
|
|
470
|
+
position: "absolute",
|
|
471
|
+
left: "50%",
|
|
472
|
+
top: "50%",
|
|
473
|
+
width: "100%",
|
|
474
|
+
height: "100%",
|
|
475
|
+
borderRadius,
|
|
476
|
+
border: `2px solid ${p.border}`,
|
|
477
|
+
pointerEvents: "none",
|
|
478
|
+
zIndex: 15,
|
|
479
|
+
animation: "mb-burst .5s ease-out forwards"
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
),
|
|
483
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
484
|
+
Particles,
|
|
485
|
+
{
|
|
486
|
+
active: burst,
|
|
487
|
+
color: p.text === "#fff" ? "rgba(255,255,255,.7)" : "rgba(0,0,0,.3)"
|
|
488
|
+
}
|
|
489
|
+
),
|
|
490
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
491
|
+
"span",
|
|
492
|
+
{
|
|
493
|
+
style: {
|
|
494
|
+
position: "relative",
|
|
495
|
+
zIndex: 5,
|
|
496
|
+
display: "inline-flex",
|
|
497
|
+
alignItems: "center",
|
|
498
|
+
gap: sz.gap,
|
|
499
|
+
transition: "transform .3s cubic-bezier(.22,1,.36,1), opacity .25s ease",
|
|
500
|
+
transform: `translateX(${hovered && showArrow && !loading && !success && !error ? "2px" : "0"})`,
|
|
501
|
+
opacity: loading ? 0.2 : 1
|
|
502
|
+
}
|
|
503
|
+
},
|
|
504
|
+
!loading && !success && !error && leftIcon && /* @__PURE__ */ import_react.default.createElement(
|
|
505
|
+
"span",
|
|
506
|
+
{
|
|
507
|
+
style: {
|
|
508
|
+
display: "inline-flex",
|
|
509
|
+
alignItems: "center",
|
|
510
|
+
transition: "transform .35s cubic-bezier(.22,1,.36,1)",
|
|
511
|
+
transform: hovered ? "translateX(-2px) scale(1.1)" : "translateX(0) scale(1)"
|
|
512
|
+
}
|
|
513
|
+
},
|
|
514
|
+
leftIcon
|
|
515
|
+
),
|
|
516
|
+
loading && /* @__PURE__ */ import_react.default.createElement(Loader, { size: sz.loaderSize, color: p.text }),
|
|
517
|
+
success && /* @__PURE__ */ import_react.default.createElement(TickIcon, { size: sz.iconSize, color: "#fff" }),
|
|
518
|
+
error && /* @__PURE__ */ import_react.default.createElement(XIcon, { size: sz.iconSize, color: "#fff" }),
|
|
519
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { whiteSpace: "nowrap" } }, label),
|
|
520
|
+
!loading && !success && !error && rightIcon && /* @__PURE__ */ import_react.default.createElement("span", { style: { display: "inline-flex", alignItems: "center" } }, rightIcon),
|
|
521
|
+
!loading && !success && !error && showArrow && /* @__PURE__ */ import_react.default.createElement(
|
|
522
|
+
"span",
|
|
523
|
+
{
|
|
524
|
+
"aria-hidden": true,
|
|
525
|
+
style: {
|
|
526
|
+
display: "inline-flex",
|
|
527
|
+
opacity: hovered ? 1 : 0,
|
|
528
|
+
transform: hovered ? "translateX(0)" : "translateX(-8px)",
|
|
529
|
+
transition: "all .3s cubic-bezier(.22,1,.36,1)",
|
|
530
|
+
fontSize: sz.fontSize
|
|
531
|
+
}
|
|
532
|
+
},
|
|
533
|
+
"\u2192"
|
|
534
|
+
)
|
|
535
|
+
),
|
|
536
|
+
loading && /* @__PURE__ */ import_react.default.createElement(
|
|
537
|
+
"span",
|
|
538
|
+
{
|
|
539
|
+
style: {
|
|
540
|
+
position: "absolute",
|
|
541
|
+
zIndex: 5,
|
|
542
|
+
fontSize: sz.fontSize,
|
|
543
|
+
fontFamily: "Syne, sans-serif",
|
|
544
|
+
fontWeight: 600,
|
|
545
|
+
color: p.text,
|
|
546
|
+
letterSpacing: "0.04em"
|
|
547
|
+
}
|
|
548
|
+
},
|
|
549
|
+
label
|
|
550
|
+
)
|
|
551
|
+
));
|
|
552
|
+
};
|
|
553
|
+
|
|
554
|
+
// src/components/Navbar/Navbar.jsx
|
|
555
|
+
var import_react2 = __toESM(require("react"));
|
|
556
|
+
Copy;
|
|
557
|
+
var KEYFRAMES = `
|
|
558
|
+
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');
|
|
559
|
+
|
|
560
|
+
@keyframes nb-entrance { from{opacity:0;transform:translateY(-110%)} to{opacity:1;transform:none} }
|
|
561
|
+
@keyframes nb-fade-up { from{opacity:0;transform:translateY(10px) scale(.98)} to{opacity:1;transform:none} }
|
|
562
|
+
@keyframes nb-item-in { from{opacity:0;transform:translateY(8px) scale(.96)} to{opacity:1;transform:none} }
|
|
563
|
+
@keyframes nb-slide-left { from{opacity:0;transform:translateX(-22px)} to{opacity:1;transform:none} }
|
|
564
|
+
@keyframes nb-overlay-in { from{opacity:0;clip-path:inset(0 0 100% 0)} to{opacity:1;clip-path:inset(0%)} }
|
|
565
|
+
@keyframes nb-banner-in { from{opacity:0;transform:translateY(-100%)} to{opacity:1;transform:none} }
|
|
566
|
+
@keyframes nb-badge-pop { 0%{transform:scale(0)} 70%{transform:scale(1.18)} 100%{transform:scale(1)} }
|
|
567
|
+
@keyframes nb-ping { 0%{transform:scale(1);opacity:.7} 100%{transform:scale(2.2);opacity:0} }
|
|
568
|
+
@keyframes nb-glow-pulse { 0%,100%{box-shadow:0 0 8px 0 var(--nb-accent-glow)} 50%{box-shadow:0 0 22px 4px var(--nb-accent-glow)} }
|
|
569
|
+
@keyframes nb-tag-pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.07)} }
|
|
570
|
+
@keyframes nb-shimmer { 0%{background-position:-600px 0} 100%{background-position:600px 0} }
|
|
571
|
+
@keyframes nb-notif-in { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
|
|
572
|
+
@keyframes nb-cmd-in { from{opacity:0;transform:scale(.96) translateY(-10px)} to{opacity:1;transform:none} }
|
|
573
|
+
@keyframes nb-mob-in { from{opacity:0;transform:translateX(100%)} to{opacity:1;transform:none} }
|
|
574
|
+
@keyframes nb-mob-out { from{opacity:1;transform:none} to{opacity:0;transform:translateX(100%)} }
|
|
575
|
+
|
|
576
|
+
@media(prefers-reduced-motion:reduce){
|
|
577
|
+
.nb-root,.nb-root *{ animation:none!important; transition:none!important; }
|
|
578
|
+
}
|
|
579
|
+
`;
|
|
580
|
+
function injectKeyframes() {
|
|
581
|
+
const id = "nb-kf-v4";
|
|
582
|
+
if (document.getElementById(id)) return;
|
|
583
|
+
const s = document.createElement("style");
|
|
584
|
+
s.id = id;
|
|
585
|
+
s.textContent = KEYFRAMES;
|
|
586
|
+
document.head.appendChild(s);
|
|
587
|
+
}
|
|
588
|
+
var DEFAULT_PRODUCTS = [
|
|
589
|
+
{
|
|
590
|
+
id: "analytics",
|
|
591
|
+
icon: "\u25C8",
|
|
592
|
+
label: "Analytics",
|
|
593
|
+
tag: "Core",
|
|
594
|
+
tagColor: "#63D2B1",
|
|
595
|
+
desc: "Real-time dashboards, event tracking, and funnels.",
|
|
596
|
+
href: "#",
|
|
597
|
+
hot: false
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
id: "pipeline",
|
|
601
|
+
icon: "\u2B21",
|
|
602
|
+
label: "Pipeline",
|
|
603
|
+
tag: "New",
|
|
604
|
+
tagColor: "#F0A050",
|
|
605
|
+
desc: "Visual data pipeline builder with drag-and-drop nodes.",
|
|
606
|
+
href: "#",
|
|
607
|
+
hot: true
|
|
608
|
+
},
|
|
609
|
+
{
|
|
610
|
+
id: "inference",
|
|
611
|
+
icon: "\u25C9",
|
|
612
|
+
label: "Inference",
|
|
613
|
+
tag: "Beta",
|
|
614
|
+
tagColor: "#A78BFA",
|
|
615
|
+
desc: "Deploy and scale ML models with one-click infra.",
|
|
616
|
+
href: "#",
|
|
617
|
+
hot: false
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
id: "streams",
|
|
621
|
+
icon: "\u25A3",
|
|
622
|
+
label: "Streams",
|
|
623
|
+
tag: "Popular",
|
|
624
|
+
tagColor: "#F472B6",
|
|
625
|
+
desc: "High-throughput event streaming at any scale.",
|
|
626
|
+
href: "#",
|
|
627
|
+
hot: false
|
|
628
|
+
}
|
|
629
|
+
];
|
|
630
|
+
var DEFAULT_LINKS = [
|
|
631
|
+
{
|
|
632
|
+
label: "Solutions",
|
|
633
|
+
href: "#",
|
|
634
|
+
children: [
|
|
635
|
+
{ label: "Enterprise", desc: "Scale with SLA guarantees", href: "#" },
|
|
636
|
+
{ label: "Startups", desc: "Launch fast, pay as you grow", href: "#" },
|
|
637
|
+
{ label: "Education", desc: "Free for academic teams", href: "#" }
|
|
638
|
+
]
|
|
639
|
+
},
|
|
640
|
+
{ label: "Pricing", href: "#" },
|
|
641
|
+
{ label: "Docs", href: "#" },
|
|
642
|
+
{ label: "Blog", href: "#" }
|
|
643
|
+
];
|
|
644
|
+
var DEFAULT_NOTIFICATIONS = [
|
|
645
|
+
{
|
|
646
|
+
id: 1,
|
|
647
|
+
type: "update",
|
|
648
|
+
read: false,
|
|
649
|
+
title: "Pipeline v2.4 released",
|
|
650
|
+
time: "2m ago",
|
|
651
|
+
body: "Drag-to-connect nodes, live preview, 3\xD7 faster build."
|
|
652
|
+
},
|
|
653
|
+
{
|
|
654
|
+
id: 2,
|
|
655
|
+
type: "alert",
|
|
656
|
+
read: false,
|
|
657
|
+
title: "Usage at 89% of quota",
|
|
658
|
+
time: "1h ago",
|
|
659
|
+
body: "Consider upgrading before your monthly reset on the 1st."
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
id: 3,
|
|
663
|
+
type: "success",
|
|
664
|
+
read: true,
|
|
665
|
+
title: "Deployment successful",
|
|
666
|
+
time: "3h ago",
|
|
667
|
+
body: "prod-api-v3 is live on 12 edge regions with zero errors."
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
id: 4,
|
|
671
|
+
type: "mention",
|
|
672
|
+
read: true,
|
|
673
|
+
title: "Jamie mentioned you",
|
|
674
|
+
time: "Yesterday",
|
|
675
|
+
body: `"Let's loop @you in on the inference budget conversation"`
|
|
676
|
+
}
|
|
677
|
+
];
|
|
678
|
+
var NOTIF_COLOR = {
|
|
679
|
+
update: "#63D2B1",
|
|
680
|
+
alert: "#F0A050",
|
|
681
|
+
success: "#4ADE80",
|
|
682
|
+
mention: "#A78BFA"
|
|
683
|
+
};
|
|
684
|
+
var NOTIF_ICON = { update: "\u2191", alert: "!", success: "\u2713", mention: "@" };
|
|
685
|
+
var useOutsideClick = (ref, fn) => {
|
|
686
|
+
(0, import_react2.useEffect)(() => {
|
|
687
|
+
const h = (e) => {
|
|
688
|
+
if (ref.current && !ref.current.contains(e.target)) fn();
|
|
689
|
+
};
|
|
690
|
+
document.addEventListener("mousedown", h);
|
|
691
|
+
return () => document.removeEventListener("mousedown", h);
|
|
692
|
+
}, [ref, fn]);
|
|
693
|
+
};
|
|
694
|
+
var useScrollProgress = () => {
|
|
695
|
+
const [pct, setPct] = (0, import_react2.useState)(0);
|
|
696
|
+
(0, import_react2.useEffect)(() => {
|
|
697
|
+
const h = () => {
|
|
698
|
+
const el = document.documentElement;
|
|
699
|
+
const total = el.scrollHeight - el.clientHeight;
|
|
700
|
+
setPct(total > 0 ? window.scrollY / total * 100 : 0);
|
|
701
|
+
};
|
|
702
|
+
window.addEventListener("scroll", h, { passive: true });
|
|
703
|
+
return () => window.removeEventListener("scroll", h);
|
|
704
|
+
}, []);
|
|
705
|
+
return pct;
|
|
706
|
+
};
|
|
707
|
+
var useIsMobile = (bp = 768) => {
|
|
708
|
+
const [mob, setMob] = (0, import_react2.useState)(false);
|
|
709
|
+
(0, import_react2.useEffect)(() => {
|
|
710
|
+
const mq = window.matchMedia(`(max-width:${bp}px)`);
|
|
711
|
+
const h = (e) => setMob(e.matches);
|
|
712
|
+
setMob(mq.matches);
|
|
713
|
+
mq.addEventListener("change", h);
|
|
714
|
+
return () => mq.removeEventListener("change", h);
|
|
715
|
+
}, [bp]);
|
|
716
|
+
return mob;
|
|
717
|
+
};
|
|
718
|
+
function HamburgerIcon({ open, accent, textColor, skip }) {
|
|
719
|
+
const L = (ex) => ({
|
|
720
|
+
display: "block",
|
|
721
|
+
height: "1.5px",
|
|
722
|
+
background: open ? accent : textColor,
|
|
723
|
+
borderRadius: "2px",
|
|
724
|
+
transformOrigin: "center",
|
|
725
|
+
transition: skip ? "none" : "all .4s cubic-bezier(.34,1.56,.64,1)",
|
|
726
|
+
...ex
|
|
727
|
+
});
|
|
728
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
729
|
+
"div",
|
|
730
|
+
{
|
|
731
|
+
style: {
|
|
732
|
+
width: 22,
|
|
733
|
+
display: "flex",
|
|
734
|
+
flexDirection: "column",
|
|
735
|
+
gap: "5px"
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
739
|
+
"span",
|
|
740
|
+
{
|
|
741
|
+
style: L({
|
|
742
|
+
width: open ? "22px" : "18px",
|
|
743
|
+
transform: open ? "translateY(6.5px) rotate(45deg)" : "none"
|
|
744
|
+
})
|
|
745
|
+
}
|
|
746
|
+
),
|
|
747
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
748
|
+
"span",
|
|
749
|
+
{
|
|
750
|
+
style: L({
|
|
751
|
+
width: "22px",
|
|
752
|
+
opacity: open ? 0 : 1,
|
|
753
|
+
transform: open ? "scaleX(0)" : "none"
|
|
754
|
+
})
|
|
755
|
+
}
|
|
756
|
+
),
|
|
757
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
758
|
+
"span",
|
|
759
|
+
{
|
|
760
|
+
style: L({
|
|
761
|
+
width: open ? "22px" : "14px",
|
|
762
|
+
transform: open ? "translateY(-6.5px) rotate(-45deg)" : "none"
|
|
763
|
+
})
|
|
764
|
+
}
|
|
765
|
+
)
|
|
766
|
+
);
|
|
767
|
+
}
|
|
768
|
+
function Tooltip({ label, children }) {
|
|
769
|
+
const [show, setShow] = (0, import_react2.useState)(false);
|
|
770
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
771
|
+
"div",
|
|
772
|
+
{
|
|
773
|
+
style: { position: "relative", display: "inline-flex" },
|
|
774
|
+
onMouseEnter: () => setShow(true),
|
|
775
|
+
onMouseLeave: () => setShow(false)
|
|
776
|
+
},
|
|
777
|
+
children,
|
|
778
|
+
show && /* @__PURE__ */ import_react2.default.createElement(
|
|
779
|
+
"span",
|
|
780
|
+
{
|
|
781
|
+
style: {
|
|
782
|
+
position: "absolute",
|
|
783
|
+
bottom: "calc(100% + 7px)",
|
|
784
|
+
left: "50%",
|
|
785
|
+
transform: "translateX(-50%)",
|
|
786
|
+
background: "rgba(30,30,36,.98)",
|
|
787
|
+
border: "0.5px solid rgba(255,255,255,.12)",
|
|
788
|
+
borderRadius: 6,
|
|
789
|
+
padding: "4px 9px",
|
|
790
|
+
fontFamily: "DM Sans",
|
|
791
|
+
fontSize: 11,
|
|
792
|
+
color: "rgba(255,255,255,.7)",
|
|
793
|
+
whiteSpace: "nowrap",
|
|
794
|
+
pointerEvents: "none",
|
|
795
|
+
zIndex: 999,
|
|
796
|
+
animation: "nb-fade-up .15s ease both"
|
|
797
|
+
}
|
|
798
|
+
},
|
|
799
|
+
label
|
|
800
|
+
)
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
function AnnouncementBanner({
|
|
804
|
+
message,
|
|
805
|
+
href,
|
|
806
|
+
cta,
|
|
807
|
+
accent,
|
|
808
|
+
onDismiss,
|
|
809
|
+
skip,
|
|
810
|
+
topOffset
|
|
811
|
+
}) {
|
|
812
|
+
const [hov, setHov] = (0, import_react2.useState)(false);
|
|
813
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
814
|
+
"div",
|
|
815
|
+
{
|
|
816
|
+
style: {
|
|
817
|
+
position: "fixed",
|
|
818
|
+
top: topOffset ?? 0,
|
|
819
|
+
left: 0,
|
|
820
|
+
right: 0,
|
|
821
|
+
zIndex: 90,
|
|
822
|
+
background: `linear-gradient(90deg,${accent}22,${accent}14,${accent}22)`,
|
|
823
|
+
borderBottom: `0.5px solid ${accent}30`,
|
|
824
|
+
backdropFilter: "blur(12px)",
|
|
825
|
+
display: "flex",
|
|
826
|
+
alignItems: "center",
|
|
827
|
+
justifyContent: "center",
|
|
828
|
+
gap: 12,
|
|
829
|
+
padding: "9px 48px 9px 20px",
|
|
830
|
+
animation: skip ? "none" : "nb-banner-in .45s cubic-bezier(.16,1,.3,1) both"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
834
|
+
"span",
|
|
835
|
+
{
|
|
836
|
+
style: {
|
|
837
|
+
width: 6,
|
|
838
|
+
height: 6,
|
|
839
|
+
borderRadius: "50%",
|
|
840
|
+
background: accent,
|
|
841
|
+
flexShrink: 0,
|
|
842
|
+
animation: "nb-ping 1.6s ease-out infinite",
|
|
843
|
+
opacity: 0.8
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
848
|
+
"span",
|
|
849
|
+
{
|
|
850
|
+
style: {
|
|
851
|
+
fontFamily: "DM Sans",
|
|
852
|
+
fontSize: 13,
|
|
853
|
+
color: "rgba(255,255,255,.65)"
|
|
854
|
+
}
|
|
855
|
+
},
|
|
856
|
+
message
|
|
857
|
+
),
|
|
858
|
+
cta && href && /* @__PURE__ */ import_react2.default.createElement(
|
|
859
|
+
"a",
|
|
860
|
+
{
|
|
861
|
+
href,
|
|
862
|
+
style: {
|
|
863
|
+
fontFamily: "Syne",
|
|
864
|
+
fontSize: 12,
|
|
865
|
+
fontWeight: 600,
|
|
866
|
+
letterSpacing: ".04em",
|
|
867
|
+
color: accent,
|
|
868
|
+
textDecoration: "none",
|
|
869
|
+
padding: "3px 10px",
|
|
870
|
+
borderRadius: 5,
|
|
871
|
+
background: hov ? `${accent}22` : `${accent}12`,
|
|
872
|
+
border: `0.5px solid ${accent}40`,
|
|
873
|
+
transition: "background .2s"
|
|
874
|
+
},
|
|
875
|
+
onMouseEnter: () => setHov(true),
|
|
876
|
+
onMouseLeave: () => setHov(false)
|
|
877
|
+
},
|
|
878
|
+
cta,
|
|
879
|
+
" \u2192"
|
|
880
|
+
),
|
|
881
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
882
|
+
"button",
|
|
883
|
+
{
|
|
884
|
+
onClick: onDismiss,
|
|
885
|
+
style: {
|
|
886
|
+
position: "absolute",
|
|
887
|
+
right: 16,
|
|
888
|
+
background: "none",
|
|
889
|
+
border: "none",
|
|
890
|
+
color: "rgba(255,255,255,.3)",
|
|
891
|
+
cursor: "pointer",
|
|
892
|
+
fontSize: 13,
|
|
893
|
+
padding: 4,
|
|
894
|
+
lineHeight: 1,
|
|
895
|
+
transition: "color .2s"
|
|
896
|
+
},
|
|
897
|
+
onMouseEnter: (e) => e.currentTarget.style.color = "rgba(255,255,255,.7)",
|
|
898
|
+
onMouseLeave: (e) => e.currentTarget.style.color = "rgba(255,255,255,.3)"
|
|
899
|
+
},
|
|
900
|
+
"\u2715"
|
|
901
|
+
)
|
|
902
|
+
);
|
|
903
|
+
}
|
|
904
|
+
function ProductCard({ p, idx, accent, text, muted, skip, compact, onClick }) {
|
|
905
|
+
const [hov, setHov] = (0, import_react2.useState)(false);
|
|
906
|
+
const [pr, setPr] = (0, import_react2.useState)(false);
|
|
907
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
908
|
+
"a",
|
|
909
|
+
{
|
|
910
|
+
href: p.href,
|
|
911
|
+
onClick: (e) => {
|
|
912
|
+
e.preventDefault();
|
|
913
|
+
onClick == null ? void 0 : onClick(p);
|
|
914
|
+
},
|
|
915
|
+
onMouseEnter: () => setHov(true),
|
|
916
|
+
onMouseLeave: () => {
|
|
917
|
+
setHov(false);
|
|
918
|
+
setPr(false);
|
|
919
|
+
},
|
|
920
|
+
onMouseDown: () => setPr(true),
|
|
921
|
+
onMouseUp: () => setPr(false),
|
|
922
|
+
style: {
|
|
923
|
+
display: "flex",
|
|
924
|
+
alignItems: "flex-start",
|
|
925
|
+
gap: 12,
|
|
926
|
+
padding: compact ? "10px 12px" : "13px 14px",
|
|
927
|
+
borderRadius: 10,
|
|
928
|
+
textDecoration: "none",
|
|
929
|
+
cursor: "pointer",
|
|
930
|
+
background: hov ? "rgba(255,255,255,.055)" : "transparent",
|
|
931
|
+
border: `0.5px solid ${hov ? "rgba(255,255,255,.1)" : "transparent"}`,
|
|
932
|
+
transform: skip ? "none" : pr ? "scale(.98)" : hov ? "translateX(4px)" : "none",
|
|
933
|
+
transition: skip ? "none" : "all .22s cubic-bezier(.34,1.56,.64,1)",
|
|
934
|
+
animation: skip ? "none" : `nb-fade-up .4s cubic-bezier(.16,1,.3,1) ${idx * 55 + 60}ms both`
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
938
|
+
"div",
|
|
939
|
+
{
|
|
940
|
+
style: {
|
|
941
|
+
width: 36,
|
|
942
|
+
height: 36,
|
|
943
|
+
borderRadius: 9,
|
|
944
|
+
flexShrink: 0,
|
|
945
|
+
background: `${p.tagColor}18`,
|
|
946
|
+
border: `0.5px solid ${p.tagColor}30`,
|
|
947
|
+
display: "flex",
|
|
948
|
+
alignItems: "center",
|
|
949
|
+
justifyContent: "center",
|
|
950
|
+
fontSize: 16,
|
|
951
|
+
color: p.tagColor,
|
|
952
|
+
position: "relative",
|
|
953
|
+
transform: hov && !skip ? "scale(1.1) rotate(-5deg)" : "none",
|
|
954
|
+
transition: skip ? "none" : "transform .3s cubic-bezier(.34,1.56,.64,1)"
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
p.icon,
|
|
958
|
+
p.hot && /* @__PURE__ */ import_react2.default.createElement(
|
|
959
|
+
"span",
|
|
960
|
+
{
|
|
961
|
+
style: {
|
|
962
|
+
position: "absolute",
|
|
963
|
+
top: -3,
|
|
964
|
+
right: -3,
|
|
965
|
+
width: 8,
|
|
966
|
+
height: 8,
|
|
967
|
+
borderRadius: "50%",
|
|
968
|
+
background: p.tagColor,
|
|
969
|
+
border: "1.5px solid #0a0a0d"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
)
|
|
973
|
+
),
|
|
974
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
975
|
+
"div",
|
|
976
|
+
{
|
|
977
|
+
style: {
|
|
978
|
+
display: "flex",
|
|
979
|
+
alignItems: "center",
|
|
980
|
+
gap: 7,
|
|
981
|
+
marginBottom: 3
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
985
|
+
"span",
|
|
986
|
+
{
|
|
987
|
+
style: {
|
|
988
|
+
fontFamily: "Syne",
|
|
989
|
+
fontSize: 13,
|
|
990
|
+
fontWeight: 600,
|
|
991
|
+
letterSpacing: "-0.01em",
|
|
992
|
+
color: hov ? p.tagColor : text,
|
|
993
|
+
transition: skip ? "none" : "color .2s"
|
|
994
|
+
}
|
|
995
|
+
},
|
|
996
|
+
p.label
|
|
997
|
+
),
|
|
998
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
999
|
+
"span",
|
|
1000
|
+
{
|
|
1001
|
+
style: {
|
|
1002
|
+
fontSize: 9,
|
|
1003
|
+
fontWeight: 700,
|
|
1004
|
+
letterSpacing: ".08em",
|
|
1005
|
+
textTransform: "uppercase",
|
|
1006
|
+
color: p.tagColor,
|
|
1007
|
+
background: `${p.tagColor}18`,
|
|
1008
|
+
border: `0.5px solid ${p.tagColor}35`,
|
|
1009
|
+
borderRadius: 4,
|
|
1010
|
+
padding: "2px 6px",
|
|
1011
|
+
animation: skip ? "none" : `nb-tag-pulse 2.5s ease-in-out ${idx * 300 + 800}ms infinite`
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
p.tag
|
|
1015
|
+
)
|
|
1016
|
+
), !compact && /* @__PURE__ */ import_react2.default.createElement(
|
|
1017
|
+
"p",
|
|
1018
|
+
{
|
|
1019
|
+
style: {
|
|
1020
|
+
fontFamily: "DM Sans",
|
|
1021
|
+
fontSize: 12,
|
|
1022
|
+
fontWeight: 300,
|
|
1023
|
+
color: muted,
|
|
1024
|
+
lineHeight: 1.5,
|
|
1025
|
+
margin: 0
|
|
1026
|
+
}
|
|
1027
|
+
},
|
|
1028
|
+
p.desc
|
|
1029
|
+
))
|
|
1030
|
+
);
|
|
1031
|
+
}
|
|
1032
|
+
function NotificationPanel({
|
|
1033
|
+
notifications,
|
|
1034
|
+
accent,
|
|
1035
|
+
text,
|
|
1036
|
+
muted,
|
|
1037
|
+
onRead,
|
|
1038
|
+
onClear,
|
|
1039
|
+
skip
|
|
1040
|
+
}) {
|
|
1041
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1042
|
+
"div",
|
|
1043
|
+
{
|
|
1044
|
+
style: {
|
|
1045
|
+
position: "absolute",
|
|
1046
|
+
top: "calc(100% + 12px)",
|
|
1047
|
+
right: 0,
|
|
1048
|
+
width: 340,
|
|
1049
|
+
background: "rgba(8,8,11,.98)",
|
|
1050
|
+
backdropFilter: "blur(24px)",
|
|
1051
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
1052
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1053
|
+
borderRadius: 14,
|
|
1054
|
+
boxShadow: "0 28px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.04)",
|
|
1055
|
+
zIndex: 300,
|
|
1056
|
+
overflow: "hidden",
|
|
1057
|
+
animation: skip ? "none" : "nb-fade-up .28s cubic-bezier(.16,1,.3,1) both"
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1061
|
+
"div",
|
|
1062
|
+
{
|
|
1063
|
+
style: {
|
|
1064
|
+
display: "flex",
|
|
1065
|
+
alignItems: "center",
|
|
1066
|
+
justifyContent: "space-between",
|
|
1067
|
+
padding: "14px 16px 10px",
|
|
1068
|
+
borderBottom: "0.5px solid rgba(255,255,255,.06)"
|
|
1069
|
+
}
|
|
1070
|
+
},
|
|
1071
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1072
|
+
"span",
|
|
1073
|
+
{
|
|
1074
|
+
style: {
|
|
1075
|
+
fontFamily: "Syne",
|
|
1076
|
+
fontSize: 13,
|
|
1077
|
+
fontWeight: 700,
|
|
1078
|
+
color: text
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
"Notifications"
|
|
1082
|
+
),
|
|
1083
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1084
|
+
"button",
|
|
1085
|
+
{
|
|
1086
|
+
onClick: onClear,
|
|
1087
|
+
style: {
|
|
1088
|
+
fontFamily: "DM Sans",
|
|
1089
|
+
fontSize: 11,
|
|
1090
|
+
color: muted,
|
|
1091
|
+
background: "none",
|
|
1092
|
+
border: "none",
|
|
1093
|
+
cursor: "pointer",
|
|
1094
|
+
transition: "color .2s"
|
|
1095
|
+
},
|
|
1096
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accent,
|
|
1097
|
+
onMouseLeave: (e) => e.currentTarget.style.color = muted
|
|
1098
|
+
},
|
|
1099
|
+
"Mark all read"
|
|
1100
|
+
)
|
|
1101
|
+
),
|
|
1102
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { maxHeight: 320, overflowY: "auto" } }, notifications.length === 0 ? /* @__PURE__ */ import_react2.default.createElement("div", { style: { padding: "32px 16px", textAlign: "center" } }, /* @__PURE__ */ import_react2.default.createElement("div", { style: { fontSize: 28, marginBottom: 8 } }, "\u2713"), /* @__PURE__ */ import_react2.default.createElement(
|
|
1103
|
+
"p",
|
|
1104
|
+
{
|
|
1105
|
+
style: {
|
|
1106
|
+
fontFamily: "DM Sans",
|
|
1107
|
+
fontSize: 13,
|
|
1108
|
+
color: muted,
|
|
1109
|
+
margin: 0
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
"You're all caught up"
|
|
1113
|
+
)) : notifications.map((n, i) => {
|
|
1114
|
+
const c = NOTIF_COLOR[n.type];
|
|
1115
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1116
|
+
"div",
|
|
1117
|
+
{
|
|
1118
|
+
key: n.id,
|
|
1119
|
+
onClick: () => onRead(n.id),
|
|
1120
|
+
style: {
|
|
1121
|
+
display: "flex",
|
|
1122
|
+
gap: 12,
|
|
1123
|
+
padding: "12px 16px",
|
|
1124
|
+
borderBottom: "0.5px solid rgba(255,255,255,.04)",
|
|
1125
|
+
background: n.read ? "transparent" : "rgba(255,255,255,.025)",
|
|
1126
|
+
cursor: "pointer",
|
|
1127
|
+
transition: "background .2s",
|
|
1128
|
+
animation: skip ? "none" : `nb-notif-in .35s cubic-bezier(.16,1,.3,1) ${i * 50}ms both`
|
|
1129
|
+
},
|
|
1130
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "rgba(255,255,255,.04)",
|
|
1131
|
+
onMouseLeave: (e) => e.currentTarget.style.background = n.read ? "transparent" : "rgba(255,255,255,.025)"
|
|
1132
|
+
},
|
|
1133
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1134
|
+
"div",
|
|
1135
|
+
{
|
|
1136
|
+
style: {
|
|
1137
|
+
width: 32,
|
|
1138
|
+
height: 32,
|
|
1139
|
+
borderRadius: "50%",
|
|
1140
|
+
flexShrink: 0,
|
|
1141
|
+
background: `${c}18`,
|
|
1142
|
+
border: `0.5px solid ${c}30`,
|
|
1143
|
+
display: "flex",
|
|
1144
|
+
alignItems: "center",
|
|
1145
|
+
justifyContent: "center",
|
|
1146
|
+
fontSize: 12,
|
|
1147
|
+
fontWeight: 700,
|
|
1148
|
+
color: c
|
|
1149
|
+
}
|
|
1150
|
+
},
|
|
1151
|
+
NOTIF_ICON[n.type]
|
|
1152
|
+
),
|
|
1153
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
1154
|
+
"div",
|
|
1155
|
+
{
|
|
1156
|
+
style: {
|
|
1157
|
+
display: "flex",
|
|
1158
|
+
justifyContent: "space-between",
|
|
1159
|
+
alignItems: "flex-start",
|
|
1160
|
+
gap: 8
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1164
|
+
"span",
|
|
1165
|
+
{
|
|
1166
|
+
style: {
|
|
1167
|
+
fontFamily: "Syne",
|
|
1168
|
+
fontSize: 12,
|
|
1169
|
+
fontWeight: 600,
|
|
1170
|
+
color: n.read ? muted : text,
|
|
1171
|
+
lineHeight: 1.3
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
n.title
|
|
1175
|
+
),
|
|
1176
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1177
|
+
"span",
|
|
1178
|
+
{
|
|
1179
|
+
style: {
|
|
1180
|
+
fontFamily: "DM Sans",
|
|
1181
|
+
fontSize: 10,
|
|
1182
|
+
color: "rgba(255,255,255,.25)",
|
|
1183
|
+
flexShrink: 0
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
n.time
|
|
1187
|
+
)
|
|
1188
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
1189
|
+
"p",
|
|
1190
|
+
{
|
|
1191
|
+
style: {
|
|
1192
|
+
fontFamily: "DM Sans",
|
|
1193
|
+
fontSize: 11,
|
|
1194
|
+
fontWeight: 300,
|
|
1195
|
+
color: "rgba(255,255,255,.35)",
|
|
1196
|
+
margin: "3px 0 0",
|
|
1197
|
+
lineHeight: 1.4,
|
|
1198
|
+
overflow: "hidden",
|
|
1199
|
+
textOverflow: "ellipsis",
|
|
1200
|
+
whiteSpace: "nowrap"
|
|
1201
|
+
}
|
|
1202
|
+
},
|
|
1203
|
+
n.body
|
|
1204
|
+
)),
|
|
1205
|
+
!n.read && /* @__PURE__ */ import_react2.default.createElement(
|
|
1206
|
+
"div",
|
|
1207
|
+
{
|
|
1208
|
+
style: {
|
|
1209
|
+
width: 6,
|
|
1210
|
+
height: 6,
|
|
1211
|
+
borderRadius: "50%",
|
|
1212
|
+
background: accent,
|
|
1213
|
+
flexShrink: 0,
|
|
1214
|
+
marginTop: 4
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
)
|
|
1218
|
+
);
|
|
1219
|
+
})),
|
|
1220
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1221
|
+
"div",
|
|
1222
|
+
{
|
|
1223
|
+
style: {
|
|
1224
|
+
padding: "10px 16px",
|
|
1225
|
+
borderTop: "0.5px solid rgba(255,255,255,.05)"
|
|
1226
|
+
}
|
|
1227
|
+
},
|
|
1228
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1229
|
+
"a",
|
|
1230
|
+
{
|
|
1231
|
+
href: "#",
|
|
1232
|
+
onClick: (e) => e.preventDefault(),
|
|
1233
|
+
style: {
|
|
1234
|
+
fontFamily: "DM Sans",
|
|
1235
|
+
fontSize: 12,
|
|
1236
|
+
color: muted,
|
|
1237
|
+
textDecoration: "none",
|
|
1238
|
+
display: "flex",
|
|
1239
|
+
alignItems: "center",
|
|
1240
|
+
justifyContent: "center",
|
|
1241
|
+
gap: 5,
|
|
1242
|
+
transition: "color .2s"
|
|
1243
|
+
},
|
|
1244
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accent,
|
|
1245
|
+
onMouseLeave: (e) => e.currentTarget.style.color = muted
|
|
1246
|
+
},
|
|
1247
|
+
"View all notifications \u2192"
|
|
1248
|
+
)
|
|
1249
|
+
)
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
function UserDropdown({ user, accent, text, muted, skip, onLogout }) {
|
|
1253
|
+
const items = [
|
|
1254
|
+
{ icon: "\u2299", label: "Profile", sub: "Edit your info" },
|
|
1255
|
+
{ icon: "\u229E", label: "Workspace", sub: "Manage team & billing" },
|
|
1256
|
+
{
|
|
1257
|
+
icon: "\u2328",
|
|
1258
|
+
label: "Keyboard shortcuts",
|
|
1259
|
+
sub: "\u2318K to open command palette"
|
|
1260
|
+
},
|
|
1261
|
+
{ icon: "\u25CE", label: "API Keys", sub: "Generate & manage tokens" }
|
|
1262
|
+
];
|
|
1263
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1264
|
+
"div",
|
|
1265
|
+
{
|
|
1266
|
+
style: {
|
|
1267
|
+
position: "absolute",
|
|
1268
|
+
top: "calc(100% + 12px)",
|
|
1269
|
+
right: 0,
|
|
1270
|
+
width: 260,
|
|
1271
|
+
background: "rgba(8,8,11,.98)",
|
|
1272
|
+
backdropFilter: "blur(24px)",
|
|
1273
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
1274
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1275
|
+
borderRadius: 14,
|
|
1276
|
+
boxShadow: "0 28px 60px rgba(0,0,0,.6)",
|
|
1277
|
+
zIndex: 300,
|
|
1278
|
+
overflow: "hidden",
|
|
1279
|
+
animation: skip ? "none" : "nb-fade-up .28s cubic-bezier(.16,1,.3,1) both"
|
|
1280
|
+
}
|
|
1281
|
+
},
|
|
1282
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1283
|
+
"div",
|
|
1284
|
+
{
|
|
1285
|
+
style: {
|
|
1286
|
+
padding: 16,
|
|
1287
|
+
borderBottom: "0.5px solid rgba(255,255,255,.06)",
|
|
1288
|
+
display: "flex",
|
|
1289
|
+
gap: 12,
|
|
1290
|
+
alignItems: "center"
|
|
1291
|
+
}
|
|
1292
|
+
},
|
|
1293
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1294
|
+
"div",
|
|
1295
|
+
{
|
|
1296
|
+
style: {
|
|
1297
|
+
width: 38,
|
|
1298
|
+
height: 38,
|
|
1299
|
+
borderRadius: "50%",
|
|
1300
|
+
background: `linear-gradient(135deg,${accent},${accent}88)`,
|
|
1301
|
+
display: "flex",
|
|
1302
|
+
alignItems: "center",
|
|
1303
|
+
justifyContent: "center",
|
|
1304
|
+
fontFamily: "Syne",
|
|
1305
|
+
fontSize: 15,
|
|
1306
|
+
fontWeight: 700,
|
|
1307
|
+
color: "#000",
|
|
1308
|
+
flexShrink: 0
|
|
1309
|
+
}
|
|
1310
|
+
},
|
|
1311
|
+
user.initials
|
|
1312
|
+
),
|
|
1313
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
1314
|
+
"p",
|
|
1315
|
+
{
|
|
1316
|
+
style: {
|
|
1317
|
+
fontFamily: "Syne",
|
|
1318
|
+
fontSize: 13,
|
|
1319
|
+
fontWeight: 700,
|
|
1320
|
+
color: text,
|
|
1321
|
+
margin: 0,
|
|
1322
|
+
overflow: "hidden",
|
|
1323
|
+
textOverflow: "ellipsis",
|
|
1324
|
+
whiteSpace: "nowrap"
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
user.name
|
|
1328
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
1329
|
+
"p",
|
|
1330
|
+
{
|
|
1331
|
+
style: {
|
|
1332
|
+
fontFamily: "DM Sans",
|
|
1333
|
+
fontSize: 11,
|
|
1334
|
+
color: muted,
|
|
1335
|
+
margin: "2px 0 0",
|
|
1336
|
+
overflow: "hidden",
|
|
1337
|
+
textOverflow: "ellipsis",
|
|
1338
|
+
whiteSpace: "nowrap"
|
|
1339
|
+
}
|
|
1340
|
+
},
|
|
1341
|
+
user.email
|
|
1342
|
+
))
|
|
1343
|
+
),
|
|
1344
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { padding: 6 } }, items.map((item, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
1345
|
+
"button",
|
|
1346
|
+
{
|
|
1347
|
+
key: item.label,
|
|
1348
|
+
style: {
|
|
1349
|
+
width: "100%",
|
|
1350
|
+
display: "flex",
|
|
1351
|
+
alignItems: "center",
|
|
1352
|
+
gap: 10,
|
|
1353
|
+
padding: "9px 10px",
|
|
1354
|
+
borderRadius: 8,
|
|
1355
|
+
background: "transparent",
|
|
1356
|
+
border: "none",
|
|
1357
|
+
cursor: "pointer",
|
|
1358
|
+
textAlign: "left",
|
|
1359
|
+
transition: "background .18s",
|
|
1360
|
+
animation: skip ? "none" : `nb-item-in .35s cubic-bezier(.16,1,.3,1) ${i * 45}ms both`
|
|
1361
|
+
},
|
|
1362
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "rgba(255,255,255,.05)",
|
|
1363
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "transparent"
|
|
1364
|
+
},
|
|
1365
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1366
|
+
"span",
|
|
1367
|
+
{
|
|
1368
|
+
style: {
|
|
1369
|
+
fontSize: 14,
|
|
1370
|
+
color: accent,
|
|
1371
|
+
width: 20,
|
|
1372
|
+
textAlign: "center"
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
item.icon
|
|
1376
|
+
),
|
|
1377
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
1378
|
+
"p",
|
|
1379
|
+
{
|
|
1380
|
+
style: {
|
|
1381
|
+
fontFamily: "DM Sans",
|
|
1382
|
+
fontSize: 13,
|
|
1383
|
+
color: text,
|
|
1384
|
+
margin: 0
|
|
1385
|
+
}
|
|
1386
|
+
},
|
|
1387
|
+
item.label
|
|
1388
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
1389
|
+
"p",
|
|
1390
|
+
{
|
|
1391
|
+
style: {
|
|
1392
|
+
fontFamily: "DM Sans",
|
|
1393
|
+
fontSize: 10,
|
|
1394
|
+
color: "rgba(255,255,255,.28)",
|
|
1395
|
+
margin: 0
|
|
1396
|
+
}
|
|
1397
|
+
},
|
|
1398
|
+
item.sub
|
|
1399
|
+
))
|
|
1400
|
+
))),
|
|
1401
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1402
|
+
"div",
|
|
1403
|
+
{
|
|
1404
|
+
style: { padding: 6, borderTop: "0.5px solid rgba(255,255,255,.06)" }
|
|
1405
|
+
},
|
|
1406
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1407
|
+
"button",
|
|
1408
|
+
{
|
|
1409
|
+
onClick: onLogout,
|
|
1410
|
+
style: {
|
|
1411
|
+
width: "100%",
|
|
1412
|
+
padding: "9px 10px",
|
|
1413
|
+
borderRadius: 8,
|
|
1414
|
+
background: "transparent",
|
|
1415
|
+
border: "none",
|
|
1416
|
+
cursor: "pointer",
|
|
1417
|
+
fontFamily: "DM Sans",
|
|
1418
|
+
fontSize: 13,
|
|
1419
|
+
color: "#EF4444",
|
|
1420
|
+
textAlign: "left",
|
|
1421
|
+
transition: "background .18s"
|
|
1422
|
+
},
|
|
1423
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "rgba(239,68,68,.08)",
|
|
1424
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "transparent"
|
|
1425
|
+
},
|
|
1426
|
+
"Sign out"
|
|
1427
|
+
)
|
|
1428
|
+
)
|
|
1429
|
+
);
|
|
1430
|
+
}
|
|
1431
|
+
function CommandPalette({
|
|
1432
|
+
open,
|
|
1433
|
+
onClose,
|
|
1434
|
+
products,
|
|
1435
|
+
links,
|
|
1436
|
+
accent,
|
|
1437
|
+
text,
|
|
1438
|
+
muted,
|
|
1439
|
+
skip
|
|
1440
|
+
}) {
|
|
1441
|
+
const [q, setQ] = (0, import_react2.useState)("");
|
|
1442
|
+
const [sel, setSel] = (0, import_react2.useState)(0);
|
|
1443
|
+
const inputRef = (0, import_react2.useRef)(null);
|
|
1444
|
+
const allItems = [
|
|
1445
|
+
...products.map((p) => ({
|
|
1446
|
+
type: "product",
|
|
1447
|
+
icon: p.icon,
|
|
1448
|
+
label: p.label,
|
|
1449
|
+
sub: p.desc,
|
|
1450
|
+
color: p.tagColor,
|
|
1451
|
+
href: p.href
|
|
1452
|
+
})),
|
|
1453
|
+
...links.flatMap((l) => [
|
|
1454
|
+
{
|
|
1455
|
+
type: "page",
|
|
1456
|
+
icon: "\u2197",
|
|
1457
|
+
label: l.label,
|
|
1458
|
+
sub: `Navigate to ${l.label}`,
|
|
1459
|
+
color: accent,
|
|
1460
|
+
href: l.href
|
|
1461
|
+
},
|
|
1462
|
+
...(l.children || []).map((c) => ({
|
|
1463
|
+
type: "page",
|
|
1464
|
+
icon: "\u21B3",
|
|
1465
|
+
label: `${l.label} / ${c.label}`,
|
|
1466
|
+
sub: c.desc,
|
|
1467
|
+
color: "rgba(255,255,255,.3)",
|
|
1468
|
+
href: c.href
|
|
1469
|
+
}))
|
|
1470
|
+
]),
|
|
1471
|
+
{
|
|
1472
|
+
type: "action",
|
|
1473
|
+
icon: "\u25D0",
|
|
1474
|
+
label: "Toggle theme",
|
|
1475
|
+
sub: "Switch between light and dark",
|
|
1476
|
+
color: "#A78BFA"
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
type: "action",
|
|
1480
|
+
icon: "\u2318",
|
|
1481
|
+
label: "Keyboard shortcuts",
|
|
1482
|
+
sub: "View all shortcuts",
|
|
1483
|
+
color: "#F0A050"
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
type: "action",
|
|
1487
|
+
icon: "\u25C8",
|
|
1488
|
+
label: "Open notification panel",
|
|
1489
|
+
sub: "See your latest updates",
|
|
1490
|
+
color: "#63D2B1"
|
|
1491
|
+
}
|
|
1492
|
+
];
|
|
1493
|
+
const filtered = q.trim() ? allItems.filter(
|
|
1494
|
+
(i) => `${i.label} ${i.sub}`.toLowerCase().includes(q.toLowerCase())
|
|
1495
|
+
) : allItems;
|
|
1496
|
+
(0, import_react2.useEffect)(() => {
|
|
1497
|
+
if (open) {
|
|
1498
|
+
setTimeout(() => {
|
|
1499
|
+
var _a;
|
|
1500
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
1501
|
+
}, 60);
|
|
1502
|
+
setQ("");
|
|
1503
|
+
setSel(0);
|
|
1504
|
+
}
|
|
1505
|
+
}, [open]);
|
|
1506
|
+
(0, import_react2.useEffect)(() => {
|
|
1507
|
+
const h = (e) => {
|
|
1508
|
+
if (!open) return;
|
|
1509
|
+
if (e.key === "ArrowDown") {
|
|
1510
|
+
e.preventDefault();
|
|
1511
|
+
setSel((s) => Math.min(s + 1, filtered.length - 1));
|
|
1512
|
+
}
|
|
1513
|
+
if (e.key === "ArrowUp") {
|
|
1514
|
+
e.preventDefault();
|
|
1515
|
+
setSel((s) => Math.max(s - 1, 0));
|
|
1516
|
+
}
|
|
1517
|
+
if (e.key === "Enter") {
|
|
1518
|
+
e.preventDefault();
|
|
1519
|
+
onClose();
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
window.addEventListener("keydown", h);
|
|
1523
|
+
return () => window.removeEventListener("keydown", h);
|
|
1524
|
+
}, [open, filtered.length, onClose]);
|
|
1525
|
+
if (!open) return null;
|
|
1526
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1527
|
+
"div",
|
|
1528
|
+
{
|
|
1529
|
+
onClick: onClose,
|
|
1530
|
+
style: {
|
|
1531
|
+
position: "fixed",
|
|
1532
|
+
inset: 0,
|
|
1533
|
+
zIndex: 1e3,
|
|
1534
|
+
background: "rgba(0,0,0,.65)",
|
|
1535
|
+
backdropFilter: "blur(6px)",
|
|
1536
|
+
display: "flex",
|
|
1537
|
+
alignItems: "flex-start",
|
|
1538
|
+
justifyContent: "center",
|
|
1539
|
+
paddingTop: "14vh"
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1543
|
+
"div",
|
|
1544
|
+
{
|
|
1545
|
+
onClick: (e) => e.stopPropagation(),
|
|
1546
|
+
style: {
|
|
1547
|
+
width: "min(620px, 92vw)",
|
|
1548
|
+
background: "rgba(10,10,13,.98)",
|
|
1549
|
+
border: "0.5px solid rgba(255,255,255,.14)",
|
|
1550
|
+
borderRadius: 16,
|
|
1551
|
+
boxShadow: "0 40px 80px rgba(0,0,0,.7), 0 0 0 .5px rgba(255,255,255,.04)",
|
|
1552
|
+
overflow: "hidden",
|
|
1553
|
+
animation: skip ? "none" : "nb-cmd-in .25s cubic-bezier(.16,1,.3,1) both"
|
|
1554
|
+
}
|
|
1555
|
+
},
|
|
1556
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1557
|
+
"div",
|
|
1558
|
+
{
|
|
1559
|
+
style: {
|
|
1560
|
+
display: "flex",
|
|
1561
|
+
alignItems: "center",
|
|
1562
|
+
gap: 12,
|
|
1563
|
+
padding: "14px 18px",
|
|
1564
|
+
borderBottom: "0.5px solid rgba(255,255,255,.07)"
|
|
1565
|
+
}
|
|
1566
|
+
},
|
|
1567
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 16, color: muted, flexShrink: 0 } }, "\u2315"),
|
|
1568
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1569
|
+
"input",
|
|
1570
|
+
{
|
|
1571
|
+
ref: inputRef,
|
|
1572
|
+
value: q,
|
|
1573
|
+
onChange: (e) => {
|
|
1574
|
+
setQ(e.target.value);
|
|
1575
|
+
setSel(0);
|
|
1576
|
+
},
|
|
1577
|
+
placeholder: "Search commands, pages, products\u2026",
|
|
1578
|
+
style: {
|
|
1579
|
+
flex: 1,
|
|
1580
|
+
background: "none",
|
|
1581
|
+
border: "none",
|
|
1582
|
+
outline: "none",
|
|
1583
|
+
fontFamily: "DM Sans",
|
|
1584
|
+
fontSize: 15,
|
|
1585
|
+
color: text,
|
|
1586
|
+
caretColor: accent
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
),
|
|
1590
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1591
|
+
"kbd",
|
|
1592
|
+
{
|
|
1593
|
+
style: {
|
|
1594
|
+
fontFamily: "DM Sans",
|
|
1595
|
+
fontSize: 10,
|
|
1596
|
+
color: "rgba(255,255,255,.25)",
|
|
1597
|
+
background: "rgba(255,255,255,.06)",
|
|
1598
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1599
|
+
borderRadius: 5,
|
|
1600
|
+
padding: "2px 7px"
|
|
1601
|
+
}
|
|
1602
|
+
},
|
|
1603
|
+
"ESC"
|
|
1604
|
+
)
|
|
1605
|
+
),
|
|
1606
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { maxHeight: 360, overflowY: "auto" } }, filtered.length === 0 ? /* @__PURE__ */ import_react2.default.createElement("div", { style: { padding: "28px 18px", textAlign: "center" } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
1607
|
+
"p",
|
|
1608
|
+
{
|
|
1609
|
+
style: {
|
|
1610
|
+
fontFamily: "DM Sans",
|
|
1611
|
+
fontSize: 13,
|
|
1612
|
+
color: muted,
|
|
1613
|
+
margin: 0
|
|
1614
|
+
}
|
|
1615
|
+
},
|
|
1616
|
+
'No results for "',
|
|
1617
|
+
q,
|
|
1618
|
+
'"'
|
|
1619
|
+
)) : /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, !q && /* @__PURE__ */ import_react2.default.createElement(
|
|
1620
|
+
"p",
|
|
1621
|
+
{
|
|
1622
|
+
style: {
|
|
1623
|
+
fontFamily: "Syne",
|
|
1624
|
+
fontSize: 10,
|
|
1625
|
+
fontWeight: 700,
|
|
1626
|
+
letterSpacing: ".09em",
|
|
1627
|
+
textTransform: "uppercase",
|
|
1628
|
+
color: "rgba(255,255,255,.2)",
|
|
1629
|
+
margin: 0,
|
|
1630
|
+
padding: "10px 18px 4px"
|
|
1631
|
+
}
|
|
1632
|
+
},
|
|
1633
|
+
"All commands"
|
|
1634
|
+
), filtered.map((item, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
1635
|
+
"div",
|
|
1636
|
+
{
|
|
1637
|
+
key: i,
|
|
1638
|
+
onClick: onClose,
|
|
1639
|
+
style: {
|
|
1640
|
+
display: "flex",
|
|
1641
|
+
alignItems: "center",
|
|
1642
|
+
gap: 12,
|
|
1643
|
+
padding: "10px 18px",
|
|
1644
|
+
cursor: "pointer",
|
|
1645
|
+
background: sel === i ? "rgba(255,255,255,.055)" : "transparent",
|
|
1646
|
+
borderLeft: sel === i ? `2px solid ${accent}` : "2px solid transparent",
|
|
1647
|
+
transition: "background .12s"
|
|
1648
|
+
},
|
|
1649
|
+
onMouseEnter: () => setSel(i)
|
|
1650
|
+
},
|
|
1651
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1652
|
+
"div",
|
|
1653
|
+
{
|
|
1654
|
+
style: {
|
|
1655
|
+
width: 32,
|
|
1656
|
+
height: 32,
|
|
1657
|
+
borderRadius: 8,
|
|
1658
|
+
flexShrink: 0,
|
|
1659
|
+
background: `${item.color}18`,
|
|
1660
|
+
border: `0.5px solid ${item.color}28`,
|
|
1661
|
+
display: "flex",
|
|
1662
|
+
alignItems: "center",
|
|
1663
|
+
justifyContent: "center",
|
|
1664
|
+
fontSize: 14,
|
|
1665
|
+
color: item.color
|
|
1666
|
+
}
|
|
1667
|
+
},
|
|
1668
|
+
item.icon
|
|
1669
|
+
),
|
|
1670
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
1671
|
+
"p",
|
|
1672
|
+
{
|
|
1673
|
+
style: {
|
|
1674
|
+
fontFamily: "DM Sans",
|
|
1675
|
+
fontSize: 13,
|
|
1676
|
+
fontWeight: 500,
|
|
1677
|
+
color: text,
|
|
1678
|
+
margin: 0
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
item.label
|
|
1682
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
1683
|
+
"p",
|
|
1684
|
+
{
|
|
1685
|
+
style: {
|
|
1686
|
+
fontFamily: "DM Sans",
|
|
1687
|
+
fontSize: 11,
|
|
1688
|
+
color: muted,
|
|
1689
|
+
margin: 0,
|
|
1690
|
+
overflow: "hidden",
|
|
1691
|
+
textOverflow: "ellipsis",
|
|
1692
|
+
whiteSpace: "nowrap"
|
|
1693
|
+
}
|
|
1694
|
+
},
|
|
1695
|
+
item.sub
|
|
1696
|
+
)),
|
|
1697
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1698
|
+
"span",
|
|
1699
|
+
{
|
|
1700
|
+
style: {
|
|
1701
|
+
fontFamily: "DM Sans",
|
|
1702
|
+
fontSize: 10,
|
|
1703
|
+
color: "rgba(255,255,255,.2)",
|
|
1704
|
+
flexShrink: 0
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
item.type === "product" ? "Product" : item.type === "page" ? "Page" : "Action"
|
|
1708
|
+
)
|
|
1709
|
+
)))),
|
|
1710
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1711
|
+
"div",
|
|
1712
|
+
{
|
|
1713
|
+
style: {
|
|
1714
|
+
padding: "9px 18px",
|
|
1715
|
+
borderTop: "0.5px solid rgba(255,255,255,.06)",
|
|
1716
|
+
display: "flex",
|
|
1717
|
+
gap: 14
|
|
1718
|
+
}
|
|
1719
|
+
},
|
|
1720
|
+
[
|
|
1721
|
+
["\u2191\u2193", "Navigate"],
|
|
1722
|
+
["\u21B5", "Select"],
|
|
1723
|
+
["esc", "Close"]
|
|
1724
|
+
].map(([k, v]) => /* @__PURE__ */ import_react2.default.createElement(
|
|
1725
|
+
"span",
|
|
1726
|
+
{
|
|
1727
|
+
key: k,
|
|
1728
|
+
style: {
|
|
1729
|
+
fontFamily: "DM Sans",
|
|
1730
|
+
fontSize: 11,
|
|
1731
|
+
color: "rgba(255,255,255,.25)",
|
|
1732
|
+
display: "flex",
|
|
1733
|
+
alignItems: "center",
|
|
1734
|
+
gap: 5
|
|
1735
|
+
}
|
|
1736
|
+
},
|
|
1737
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1738
|
+
"kbd",
|
|
1739
|
+
{
|
|
1740
|
+
style: {
|
|
1741
|
+
background: "rgba(255,255,255,.07)",
|
|
1742
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1743
|
+
borderRadius: 4,
|
|
1744
|
+
padding: "1px 5px",
|
|
1745
|
+
fontSize: 10
|
|
1746
|
+
}
|
|
1747
|
+
},
|
|
1748
|
+
k
|
|
1749
|
+
),
|
|
1750
|
+
v
|
|
1751
|
+
))
|
|
1752
|
+
)
|
|
1753
|
+
)
|
|
1754
|
+
);
|
|
1755
|
+
}
|
|
1756
|
+
function ProductsMegaMenu({
|
|
1757
|
+
products,
|
|
1758
|
+
accent,
|
|
1759
|
+
text,
|
|
1760
|
+
muted,
|
|
1761
|
+
open,
|
|
1762
|
+
skip,
|
|
1763
|
+
onProductClick
|
|
1764
|
+
}) {
|
|
1765
|
+
if (!open) return null;
|
|
1766
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1767
|
+
"div",
|
|
1768
|
+
{
|
|
1769
|
+
style: {
|
|
1770
|
+
position: "absolute",
|
|
1771
|
+
top: "calc(100% + 14px)",
|
|
1772
|
+
left: "50%",
|
|
1773
|
+
transform: "translateX(-50%)",
|
|
1774
|
+
width: 460,
|
|
1775
|
+
background: "rgba(8,8,11,.98)",
|
|
1776
|
+
backdropFilter: "blur(24px)",
|
|
1777
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
1778
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1779
|
+
borderRadius: 16,
|
|
1780
|
+
padding: 12,
|
|
1781
|
+
zIndex: 200,
|
|
1782
|
+
boxShadow: "0 32px 64px rgba(0,0,0,.55), 0 0 0 .5px rgba(255,255,255,.04)",
|
|
1783
|
+
animation: skip ? "none" : "nb-fade-up .28s cubic-bezier(.16,1,.3,1) both"
|
|
1784
|
+
}
|
|
1785
|
+
},
|
|
1786
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1787
|
+
"div",
|
|
1788
|
+
{
|
|
1789
|
+
style: {
|
|
1790
|
+
padding: "7px 14px 10px",
|
|
1791
|
+
borderBottom: "0.5px solid rgba(255,255,255,.06)",
|
|
1792
|
+
marginBottom: 6,
|
|
1793
|
+
display: "flex",
|
|
1794
|
+
justifyContent: "space-between",
|
|
1795
|
+
alignItems: "center"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1799
|
+
"p",
|
|
1800
|
+
{
|
|
1801
|
+
style: {
|
|
1802
|
+
fontFamily: "Syne",
|
|
1803
|
+
fontSize: 10,
|
|
1804
|
+
fontWeight: 700,
|
|
1805
|
+
letterSpacing: ".1em",
|
|
1806
|
+
textTransform: "uppercase",
|
|
1807
|
+
color: accent,
|
|
1808
|
+
margin: 0
|
|
1809
|
+
}
|
|
1810
|
+
},
|
|
1811
|
+
"All Products"
|
|
1812
|
+
),
|
|
1813
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1814
|
+
"span",
|
|
1815
|
+
{
|
|
1816
|
+
style: {
|
|
1817
|
+
fontFamily: "DM Sans",
|
|
1818
|
+
fontSize: 10,
|
|
1819
|
+
color: "rgba(255,255,255,.25)"
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
"4 tools"
|
|
1823
|
+
)
|
|
1824
|
+
),
|
|
1825
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 3 } }, products.map((p, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
1826
|
+
ProductCard,
|
|
1827
|
+
{
|
|
1828
|
+
key: p.id,
|
|
1829
|
+
p,
|
|
1830
|
+
idx: i,
|
|
1831
|
+
accent,
|
|
1832
|
+
text,
|
|
1833
|
+
muted,
|
|
1834
|
+
skip,
|
|
1835
|
+
onClick: (pr) => {
|
|
1836
|
+
onProductClick == null ? void 0 : onProductClick(pr);
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
))),
|
|
1840
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1841
|
+
"div",
|
|
1842
|
+
{
|
|
1843
|
+
style: {
|
|
1844
|
+
margin: "10px 0 4px",
|
|
1845
|
+
padding: "13px 14px",
|
|
1846
|
+
background: `linear-gradient(135deg,${accent}10,transparent)`,
|
|
1847
|
+
border: `0.5px solid ${accent}20`,
|
|
1848
|
+
borderRadius: 10,
|
|
1849
|
+
display: "flex",
|
|
1850
|
+
alignItems: "center",
|
|
1851
|
+
justifyContent: "space-between",
|
|
1852
|
+
cursor: "pointer"
|
|
1853
|
+
},
|
|
1854
|
+
onMouseEnter: (e) => e.currentTarget.style.background = `linear-gradient(135deg,${accent}1a,transparent)`,
|
|
1855
|
+
onMouseLeave: (e) => e.currentTarget.style.background = `linear-gradient(135deg,${accent}10,transparent)`
|
|
1856
|
+
},
|
|
1857
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
1858
|
+
"p",
|
|
1859
|
+
{
|
|
1860
|
+
style: {
|
|
1861
|
+
fontFamily: "Syne",
|
|
1862
|
+
fontSize: 12,
|
|
1863
|
+
fontWeight: 600,
|
|
1864
|
+
color: text,
|
|
1865
|
+
margin: "0 0 2px"
|
|
1866
|
+
}
|
|
1867
|
+
},
|
|
1868
|
+
"\u26A1 Pipeline launch event"
|
|
1869
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
1870
|
+
"p",
|
|
1871
|
+
{
|
|
1872
|
+
style: {
|
|
1873
|
+
fontFamily: "DM Sans",
|
|
1874
|
+
fontSize: 11,
|
|
1875
|
+
color: muted,
|
|
1876
|
+
margin: 0
|
|
1877
|
+
}
|
|
1878
|
+
},
|
|
1879
|
+
"Watch the 12-min demo \u2014 live Q&A on Thursday"
|
|
1880
|
+
)),
|
|
1881
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { color: accent, fontSize: 16, flexShrink: 0 } }, "\u2192")
|
|
1882
|
+
)
|
|
1883
|
+
);
|
|
1884
|
+
}
|
|
1885
|
+
function SubDropdown({ link, accent, text, muted, open, skip }) {
|
|
1886
|
+
var _a;
|
|
1887
|
+
if (!open || !((_a = link.children) == null ? void 0 : _a.length)) return null;
|
|
1888
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1889
|
+
"div",
|
|
1890
|
+
{
|
|
1891
|
+
style: {
|
|
1892
|
+
position: "absolute",
|
|
1893
|
+
top: "calc(100% + 12px)",
|
|
1894
|
+
left: "50%",
|
|
1895
|
+
transform: "translateX(-50%)",
|
|
1896
|
+
width: 240,
|
|
1897
|
+
background: "rgba(8,8,11,.98)",
|
|
1898
|
+
backdropFilter: "blur(24px)",
|
|
1899
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
1900
|
+
borderRadius: 12,
|
|
1901
|
+
padding: 8,
|
|
1902
|
+
zIndex: 200,
|
|
1903
|
+
boxShadow: "0 24px 50px rgba(0,0,0,.5)",
|
|
1904
|
+
animation: skip ? "none" : "nb-fade-up .25s cubic-bezier(.16,1,.3,1) both"
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
link.children.map((child, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
1908
|
+
"a",
|
|
1909
|
+
{
|
|
1910
|
+
key: child.label,
|
|
1911
|
+
href: child.href,
|
|
1912
|
+
onClick: (e) => e.preventDefault(),
|
|
1913
|
+
style: {
|
|
1914
|
+
display: "flex",
|
|
1915
|
+
flexDirection: "column",
|
|
1916
|
+
padding: "9px 12px",
|
|
1917
|
+
borderRadius: 8,
|
|
1918
|
+
textDecoration: "none",
|
|
1919
|
+
cursor: "pointer",
|
|
1920
|
+
transition: "background .18s",
|
|
1921
|
+
animation: skip ? "none" : `nb-item-in .3s cubic-bezier(.16,1,.3,1) ${i * 50}ms both`
|
|
1922
|
+
},
|
|
1923
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "rgba(255,255,255,.05)",
|
|
1924
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "transparent"
|
|
1925
|
+
},
|
|
1926
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1927
|
+
"span",
|
|
1928
|
+
{
|
|
1929
|
+
style: {
|
|
1930
|
+
fontFamily: "Syne",
|
|
1931
|
+
fontSize: 13,
|
|
1932
|
+
fontWeight: 600,
|
|
1933
|
+
color: text
|
|
1934
|
+
}
|
|
1935
|
+
},
|
|
1936
|
+
child.label
|
|
1937
|
+
),
|
|
1938
|
+
child.desc && /* @__PURE__ */ import_react2.default.createElement(
|
|
1939
|
+
"span",
|
|
1940
|
+
{
|
|
1941
|
+
style: {
|
|
1942
|
+
fontFamily: "DM Sans",
|
|
1943
|
+
fontSize: 11,
|
|
1944
|
+
color: muted,
|
|
1945
|
+
marginTop: 2
|
|
1946
|
+
}
|
|
1947
|
+
},
|
|
1948
|
+
child.desc
|
|
1949
|
+
)
|
|
1950
|
+
))
|
|
1951
|
+
);
|
|
1952
|
+
}
|
|
1953
|
+
function MobileDrawer({
|
|
1954
|
+
open,
|
|
1955
|
+
onClose,
|
|
1956
|
+
links,
|
|
1957
|
+
products,
|
|
1958
|
+
ctaLabel,
|
|
1959
|
+
accent,
|
|
1960
|
+
text,
|
|
1961
|
+
muted,
|
|
1962
|
+
skip,
|
|
1963
|
+
onProductClick,
|
|
1964
|
+
onCtaClick
|
|
1965
|
+
}) {
|
|
1966
|
+
(0, import_react2.useEffect)(() => {
|
|
1967
|
+
document.body.style.overflow = open ? "hidden" : "";
|
|
1968
|
+
return () => {
|
|
1969
|
+
document.body.style.overflow = "";
|
|
1970
|
+
};
|
|
1971
|
+
}, [open]);
|
|
1972
|
+
if (!open) return null;
|
|
1973
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
1974
|
+
"div",
|
|
1975
|
+
{
|
|
1976
|
+
style: {
|
|
1977
|
+
position: "fixed",
|
|
1978
|
+
inset: 0,
|
|
1979
|
+
zIndex: 500,
|
|
1980
|
+
background: "rgba(6,6,9,.98)",
|
|
1981
|
+
backdropFilter: "blur(24px)",
|
|
1982
|
+
WebkitBackdropFilter: "blur(24px)",
|
|
1983
|
+
overflowY: "auto",
|
|
1984
|
+
display: "flex",
|
|
1985
|
+
flexDirection: "column",
|
|
1986
|
+
animation: skip ? "none" : "nb-mob-in .35s cubic-bezier(.16,1,.3,1) both"
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
1990
|
+
"div",
|
|
1991
|
+
{
|
|
1992
|
+
style: {
|
|
1993
|
+
display: "flex",
|
|
1994
|
+
alignItems: "center",
|
|
1995
|
+
justifyContent: "flex-end",
|
|
1996
|
+
padding: "0 20px",
|
|
1997
|
+
height: 62,
|
|
1998
|
+
borderBottom: "0.5px solid rgba(255,255,255,.07)",
|
|
1999
|
+
flexShrink: 0
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2003
|
+
"button",
|
|
2004
|
+
{
|
|
2005
|
+
onClick: onClose,
|
|
2006
|
+
style: {
|
|
2007
|
+
display: "flex",
|
|
2008
|
+
alignItems: "center",
|
|
2009
|
+
gap: 7,
|
|
2010
|
+
fontFamily: "DM Sans",
|
|
2011
|
+
fontSize: 13,
|
|
2012
|
+
color: muted,
|
|
2013
|
+
background: "rgba(255,255,255,.05)",
|
|
2014
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
2015
|
+
borderRadius: 8,
|
|
2016
|
+
padding: "8px 14px",
|
|
2017
|
+
cursor: "pointer",
|
|
2018
|
+
transition: "all .2s"
|
|
2019
|
+
},
|
|
2020
|
+
onMouseEnter: (e) => {
|
|
2021
|
+
e.currentTarget.style.color = text;
|
|
2022
|
+
e.currentTarget.style.background = "rgba(255,255,255,.09)";
|
|
2023
|
+
},
|
|
2024
|
+
onMouseLeave: (e) => {
|
|
2025
|
+
e.currentTarget.style.color = muted;
|
|
2026
|
+
e.currentTarget.style.background = "rgba(255,255,255,.05)";
|
|
2027
|
+
}
|
|
2028
|
+
},
|
|
2029
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 10 } }, "\u2715"),
|
|
2030
|
+
" Close"
|
|
2031
|
+
)
|
|
2032
|
+
),
|
|
2033
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, padding: "24px 20px 40px" } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
2034
|
+
"p",
|
|
2035
|
+
{
|
|
2036
|
+
style: {
|
|
2037
|
+
fontFamily: "Syne",
|
|
2038
|
+
fontSize: 10,
|
|
2039
|
+
fontWeight: 700,
|
|
2040
|
+
letterSpacing: ".1em",
|
|
2041
|
+
textTransform: "uppercase",
|
|
2042
|
+
color: accent,
|
|
2043
|
+
margin: "0 0 12px"
|
|
2044
|
+
}
|
|
2045
|
+
},
|
|
2046
|
+
"Products"
|
|
2047
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2048
|
+
"div",
|
|
2049
|
+
{
|
|
2050
|
+
style: {
|
|
2051
|
+
display: "flex",
|
|
2052
|
+
flexDirection: "column",
|
|
2053
|
+
gap: 2,
|
|
2054
|
+
marginBottom: 28
|
|
2055
|
+
}
|
|
2056
|
+
},
|
|
2057
|
+
products.map((p, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2058
|
+
ProductCard,
|
|
2059
|
+
{
|
|
2060
|
+
key: p.id,
|
|
2061
|
+
p,
|
|
2062
|
+
idx: i,
|
|
2063
|
+
accent,
|
|
2064
|
+
text,
|
|
2065
|
+
muted,
|
|
2066
|
+
skip,
|
|
2067
|
+
onClick: (pr) => {
|
|
2068
|
+
onProductClick == null ? void 0 : onProductClick(pr);
|
|
2069
|
+
onClose();
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
))
|
|
2073
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2074
|
+
"p",
|
|
2075
|
+
{
|
|
2076
|
+
style: {
|
|
2077
|
+
fontFamily: "Syne",
|
|
2078
|
+
fontSize: 10,
|
|
2079
|
+
fontWeight: 700,
|
|
2080
|
+
letterSpacing: ".1em",
|
|
2081
|
+
textTransform: "uppercase",
|
|
2082
|
+
color: muted,
|
|
2083
|
+
margin: "0 0 8px"
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
"Navigate"
|
|
2087
|
+
), links.map((link, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2088
|
+
"a",
|
|
2089
|
+
{
|
|
2090
|
+
key: link.label,
|
|
2091
|
+
href: link.href,
|
|
2092
|
+
onClick: (e) => {
|
|
2093
|
+
e.preventDefault();
|
|
2094
|
+
onClose();
|
|
2095
|
+
},
|
|
2096
|
+
style: {
|
|
2097
|
+
display: "flex",
|
|
2098
|
+
alignItems: "center",
|
|
2099
|
+
justifyContent: "space-between",
|
|
2100
|
+
fontFamily: "Syne",
|
|
2101
|
+
fontSize: "clamp(22px,5vw,28px)",
|
|
2102
|
+
fontWeight: 700,
|
|
2103
|
+
letterSpacing: "-0.03em",
|
|
2104
|
+
color: text,
|
|
2105
|
+
textDecoration: "none",
|
|
2106
|
+
padding: "10px 0",
|
|
2107
|
+
borderBottom: "0.5px solid rgba(255,255,255,.05)",
|
|
2108
|
+
transition: skip ? "none" : "all .22s cubic-bezier(.34,1.56,.64,1)",
|
|
2109
|
+
animation: skip ? "none" : `nb-slide-left .5s cubic-bezier(.16,1,.3,1) ${0.1 + i * 0.07}s both`
|
|
2110
|
+
},
|
|
2111
|
+
onMouseEnter: (e) => {
|
|
2112
|
+
e.currentTarget.style.color = accent;
|
|
2113
|
+
e.currentTarget.style.paddingLeft = "8px";
|
|
2114
|
+
},
|
|
2115
|
+
onMouseLeave: (e) => {
|
|
2116
|
+
e.currentTarget.style.color = text;
|
|
2117
|
+
e.currentTarget.style.paddingLeft = "0";
|
|
2118
|
+
}
|
|
2119
|
+
},
|
|
2120
|
+
link.label,
|
|
2121
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 13, opacity: 0.3 } }, "\u2197")
|
|
2122
|
+
)), /* @__PURE__ */ import_react2.default.createElement(
|
|
2123
|
+
"div",
|
|
2124
|
+
{
|
|
2125
|
+
style: {
|
|
2126
|
+
marginTop: 32,
|
|
2127
|
+
background: `linear-gradient(135deg,${accent}14,${accent}07)`,
|
|
2128
|
+
border: `0.5px solid ${accent}2a`,
|
|
2129
|
+
borderRadius: 14,
|
|
2130
|
+
padding: 20
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2134
|
+
"p",
|
|
2135
|
+
{
|
|
2136
|
+
style: {
|
|
2137
|
+
fontFamily: "Syne",
|
|
2138
|
+
fontSize: 15,
|
|
2139
|
+
fontWeight: 600,
|
|
2140
|
+
color: text,
|
|
2141
|
+
margin: "0 0 6px"
|
|
2142
|
+
}
|
|
2143
|
+
},
|
|
2144
|
+
"Ready to ship?"
|
|
2145
|
+
),
|
|
2146
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2147
|
+
"p",
|
|
2148
|
+
{
|
|
2149
|
+
style: {
|
|
2150
|
+
fontFamily: "DM Sans",
|
|
2151
|
+
fontSize: 13,
|
|
2152
|
+
color: muted,
|
|
2153
|
+
margin: "0 0 16px"
|
|
2154
|
+
}
|
|
2155
|
+
},
|
|
2156
|
+
"Free forever. No credit card needed."
|
|
2157
|
+
),
|
|
2158
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2159
|
+
"button",
|
|
2160
|
+
{
|
|
2161
|
+
onClick: () => {
|
|
2162
|
+
onCtaClick == null ? void 0 : onCtaClick();
|
|
2163
|
+
onClose();
|
|
2164
|
+
},
|
|
2165
|
+
style: {
|
|
2166
|
+
fontFamily: "Syne",
|
|
2167
|
+
fontSize: 14,
|
|
2168
|
+
fontWeight: 600,
|
|
2169
|
+
letterSpacing: ".04em",
|
|
2170
|
+
color: "#000",
|
|
2171
|
+
background: `linear-gradient(135deg,${accent},${accent}cc)`,
|
|
2172
|
+
border: "none",
|
|
2173
|
+
borderRadius: 10,
|
|
2174
|
+
padding: "12px 20px",
|
|
2175
|
+
cursor: "pointer",
|
|
2176
|
+
width: "100%"
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
ctaLabel
|
|
2180
|
+
)
|
|
2181
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2182
|
+
"div",
|
|
2183
|
+
{
|
|
2184
|
+
style: { display: "flex", gap: 20, marginTop: 24, flexWrap: "wrap" }
|
|
2185
|
+
},
|
|
2186
|
+
["Twitter", "GitHub", "Discord", "LinkedIn"].map((s) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2187
|
+
"a",
|
|
2188
|
+
{
|
|
2189
|
+
key: s,
|
|
2190
|
+
href: "#",
|
|
2191
|
+
style: {
|
|
2192
|
+
fontFamily: "DM Sans",
|
|
2193
|
+
fontSize: 12,
|
|
2194
|
+
color: muted,
|
|
2195
|
+
textDecoration: "none",
|
|
2196
|
+
transition: "color .2s"
|
|
2197
|
+
},
|
|
2198
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accent,
|
|
2199
|
+
onMouseLeave: (e) => e.currentTarget.style.color = muted
|
|
2200
|
+
},
|
|
2201
|
+
s
|
|
2202
|
+
))
|
|
2203
|
+
))
|
|
2204
|
+
);
|
|
2205
|
+
}
|
|
2206
|
+
function FullScreenMenu({
|
|
2207
|
+
open,
|
|
2208
|
+
onClose,
|
|
2209
|
+
links,
|
|
2210
|
+
products,
|
|
2211
|
+
ctaLabel,
|
|
2212
|
+
accent,
|
|
2213
|
+
text,
|
|
2214
|
+
muted,
|
|
2215
|
+
skip,
|
|
2216
|
+
activeIdx,
|
|
2217
|
+
onLinkClick,
|
|
2218
|
+
onProductClick,
|
|
2219
|
+
onCtaClick
|
|
2220
|
+
}) {
|
|
2221
|
+
const [search, setSearch] = (0, import_react2.useState)("");
|
|
2222
|
+
const inputRef = (0, import_react2.useRef)(null);
|
|
2223
|
+
(0, import_react2.useEffect)(() => {
|
|
2224
|
+
if (open) setTimeout(() => {
|
|
2225
|
+
var _a;
|
|
2226
|
+
return (_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
2227
|
+
}, 120);
|
|
2228
|
+
}, [open]);
|
|
2229
|
+
if (!open) return null;
|
|
2230
|
+
const sideLinks = [
|
|
2231
|
+
"About",
|
|
2232
|
+
"Careers",
|
|
2233
|
+
"Contact",
|
|
2234
|
+
"Status",
|
|
2235
|
+
"Changelog",
|
|
2236
|
+
"Security"
|
|
2237
|
+
];
|
|
2238
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
2239
|
+
"div",
|
|
2240
|
+
{
|
|
2241
|
+
style: {
|
|
2242
|
+
position: "fixed",
|
|
2243
|
+
inset: 0,
|
|
2244
|
+
zIndex: 500,
|
|
2245
|
+
background: "rgba(4,4,6,.98)",
|
|
2246
|
+
backdropFilter: "blur(28px)",
|
|
2247
|
+
WebkitBackdropFilter: "blur(28px)",
|
|
2248
|
+
display: "flex",
|
|
2249
|
+
flexDirection: "column",
|
|
2250
|
+
animation: skip ? "none" : "nb-overlay-in .42s cubic-bezier(.16,1,.3,1) both"
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2253
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2254
|
+
"div",
|
|
2255
|
+
{
|
|
2256
|
+
style: {
|
|
2257
|
+
display: "flex",
|
|
2258
|
+
alignItems: "center",
|
|
2259
|
+
justifyContent: "space-between",
|
|
2260
|
+
padding: "0 36px",
|
|
2261
|
+
height: 68,
|
|
2262
|
+
flexShrink: 0,
|
|
2263
|
+
borderBottom: "0.5px solid rgba(255,255,255,.06)"
|
|
2264
|
+
}
|
|
2265
|
+
},
|
|
2266
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 9 } }, /* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 20, color: accent } }, "\u25C8"), /* @__PURE__ */ import_react2.default.createElement(
|
|
2267
|
+
"span",
|
|
2268
|
+
{
|
|
2269
|
+
style: {
|
|
2270
|
+
fontFamily: "Syne",
|
|
2271
|
+
fontSize: 17,
|
|
2272
|
+
fontWeight: 800,
|
|
2273
|
+
letterSpacing: "-0.02em",
|
|
2274
|
+
color: text
|
|
2275
|
+
}
|
|
2276
|
+
},
|
|
2277
|
+
"Axiom"
|
|
2278
|
+
)),
|
|
2279
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2280
|
+
"div",
|
|
2281
|
+
{
|
|
2282
|
+
style: {
|
|
2283
|
+
flex: 1,
|
|
2284
|
+
maxWidth: 400,
|
|
2285
|
+
margin: "0 36px",
|
|
2286
|
+
display: "flex",
|
|
2287
|
+
alignItems: "center",
|
|
2288
|
+
gap: 10,
|
|
2289
|
+
background: "rgba(255,255,255,.05)",
|
|
2290
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
2291
|
+
borderRadius: 10,
|
|
2292
|
+
padding: "9px 14px"
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 15, color: muted, flexShrink: 0 } }, "\u2315"),
|
|
2296
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2297
|
+
"input",
|
|
2298
|
+
{
|
|
2299
|
+
ref: inputRef,
|
|
2300
|
+
value: search,
|
|
2301
|
+
onChange: (e) => setSearch(e.target.value),
|
|
2302
|
+
placeholder: "Search products, docs, guides\u2026",
|
|
2303
|
+
style: {
|
|
2304
|
+
background: "none",
|
|
2305
|
+
border: "none",
|
|
2306
|
+
outline: "none",
|
|
2307
|
+
fontFamily: "DM Sans",
|
|
2308
|
+
fontSize: 14,
|
|
2309
|
+
color: text,
|
|
2310
|
+
flex: 1,
|
|
2311
|
+
caretColor: accent
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
),
|
|
2315
|
+
search ? /* @__PURE__ */ import_react2.default.createElement(
|
|
2316
|
+
"button",
|
|
2317
|
+
{
|
|
2318
|
+
onClick: () => setSearch(""),
|
|
2319
|
+
style: {
|
|
2320
|
+
background: "none",
|
|
2321
|
+
border: "none",
|
|
2322
|
+
color: muted,
|
|
2323
|
+
cursor: "pointer",
|
|
2324
|
+
fontSize: 11,
|
|
2325
|
+
padding: 0
|
|
2326
|
+
}
|
|
2327
|
+
},
|
|
2328
|
+
"\u2715"
|
|
2329
|
+
) : /* @__PURE__ */ import_react2.default.createElement(
|
|
2330
|
+
"kbd",
|
|
2331
|
+
{
|
|
2332
|
+
style: {
|
|
2333
|
+
fontFamily: "DM Sans",
|
|
2334
|
+
fontSize: 10,
|
|
2335
|
+
color: "rgba(255,255,255,.2)",
|
|
2336
|
+
background: "rgba(255,255,255,.06)",
|
|
2337
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
2338
|
+
borderRadius: 4,
|
|
2339
|
+
padding: "2px 7px",
|
|
2340
|
+
flexShrink: 0
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
"\u2318K"
|
|
2344
|
+
)
|
|
2345
|
+
),
|
|
2346
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2347
|
+
"button",
|
|
2348
|
+
{
|
|
2349
|
+
onClick: onClose,
|
|
2350
|
+
style: {
|
|
2351
|
+
display: "flex",
|
|
2352
|
+
alignItems: "center",
|
|
2353
|
+
gap: 7,
|
|
2354
|
+
fontFamily: "DM Sans",
|
|
2355
|
+
fontSize: 13,
|
|
2356
|
+
color: muted,
|
|
2357
|
+
background: "rgba(255,255,255,.05)",
|
|
2358
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
2359
|
+
borderRadius: 8,
|
|
2360
|
+
padding: "8px 14px",
|
|
2361
|
+
cursor: "pointer",
|
|
2362
|
+
transition: "all .2s"
|
|
2363
|
+
},
|
|
2364
|
+
onMouseEnter: (e) => {
|
|
2365
|
+
e.currentTarget.style.color = text;
|
|
2366
|
+
e.currentTarget.style.background = "rgba(255,255,255,.09)";
|
|
2367
|
+
},
|
|
2368
|
+
onMouseLeave: (e) => {
|
|
2369
|
+
e.currentTarget.style.color = muted;
|
|
2370
|
+
e.currentTarget.style.background = "rgba(255,255,255,.05)";
|
|
2371
|
+
}
|
|
2372
|
+
},
|
|
2373
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 10 } }, "\u2715"),
|
|
2374
|
+
" Close"
|
|
2375
|
+
)
|
|
2376
|
+
),
|
|
2377
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { flex: 1, display: "flex", overflow: "hidden" } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
2378
|
+
"div",
|
|
2379
|
+
{
|
|
2380
|
+
style: {
|
|
2381
|
+
flex: "0 0 46%",
|
|
2382
|
+
padding: "32px 36px",
|
|
2383
|
+
borderRight: "0.5px solid rgba(255,255,255,.06)",
|
|
2384
|
+
overflowY: "auto"
|
|
2385
|
+
}
|
|
2386
|
+
},
|
|
2387
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2388
|
+
"p",
|
|
2389
|
+
{
|
|
2390
|
+
style: {
|
|
2391
|
+
fontFamily: "Syne",
|
|
2392
|
+
fontSize: 10,
|
|
2393
|
+
fontWeight: 700,
|
|
2394
|
+
letterSpacing: ".1em",
|
|
2395
|
+
textTransform: "uppercase",
|
|
2396
|
+
color: accent,
|
|
2397
|
+
margin: "0 0 16px"
|
|
2398
|
+
}
|
|
2399
|
+
},
|
|
2400
|
+
"Products"
|
|
2401
|
+
),
|
|
2402
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2403
|
+
"div",
|
|
2404
|
+
{
|
|
2405
|
+
style: { display: "grid", gridTemplateColumns: "1fr 1fr", gap: 4 }
|
|
2406
|
+
},
|
|
2407
|
+
products.map((p, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2408
|
+
ProductCard,
|
|
2409
|
+
{
|
|
2410
|
+
key: p.id,
|
|
2411
|
+
p,
|
|
2412
|
+
idx: i,
|
|
2413
|
+
accent,
|
|
2414
|
+
text,
|
|
2415
|
+
muted,
|
|
2416
|
+
skip,
|
|
2417
|
+
onClick: (pr) => {
|
|
2418
|
+
onProductClick == null ? void 0 : onProductClick(pr);
|
|
2419
|
+
onClose();
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
))
|
|
2423
|
+
),
|
|
2424
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2425
|
+
"div",
|
|
2426
|
+
{
|
|
2427
|
+
style: {
|
|
2428
|
+
marginTop: 18,
|
|
2429
|
+
padding: "14px 16px",
|
|
2430
|
+
background: "rgba(255,255,255,.03)",
|
|
2431
|
+
borderRadius: 10,
|
|
2432
|
+
border: "0.5px solid rgba(255,255,255,.07)",
|
|
2433
|
+
display: "flex",
|
|
2434
|
+
alignItems: "center",
|
|
2435
|
+
justifyContent: "space-between",
|
|
2436
|
+
cursor: "pointer"
|
|
2437
|
+
},
|
|
2438
|
+
onMouseEnter: (e) => e.currentTarget.style.background = "rgba(255,255,255,.055)",
|
|
2439
|
+
onMouseLeave: (e) => e.currentTarget.style.background = "rgba(255,255,255,.03)"
|
|
2440
|
+
},
|
|
2441
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
2442
|
+
"p",
|
|
2443
|
+
{
|
|
2444
|
+
style: {
|
|
2445
|
+
fontFamily: "Syne",
|
|
2446
|
+
fontSize: 13,
|
|
2447
|
+
fontWeight: 600,
|
|
2448
|
+
color: text,
|
|
2449
|
+
margin: "0 0 2px"
|
|
2450
|
+
}
|
|
2451
|
+
},
|
|
2452
|
+
"Compare plans"
|
|
2453
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2454
|
+
"p",
|
|
2455
|
+
{
|
|
2456
|
+
style: {
|
|
2457
|
+
fontFamily: "DM Sans",
|
|
2458
|
+
fontSize: 11,
|
|
2459
|
+
color: muted,
|
|
2460
|
+
margin: 0
|
|
2461
|
+
}
|
|
2462
|
+
},
|
|
2463
|
+
"Find the right tier for your team"
|
|
2464
|
+
)),
|
|
2465
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { color: accent, fontSize: 18 } }, "\u2192")
|
|
2466
|
+
)
|
|
2467
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2468
|
+
"div",
|
|
2469
|
+
{
|
|
2470
|
+
style: {
|
|
2471
|
+
flex: 1,
|
|
2472
|
+
padding: "32px 40px",
|
|
2473
|
+
display: "flex",
|
|
2474
|
+
flexDirection: "column",
|
|
2475
|
+
justifyContent: "space-between",
|
|
2476
|
+
borderRight: "0.5px solid rgba(255,255,255,.06)"
|
|
2477
|
+
}
|
|
2478
|
+
},
|
|
2479
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
2480
|
+
"p",
|
|
2481
|
+
{
|
|
2482
|
+
style: {
|
|
2483
|
+
fontFamily: "Syne",
|
|
2484
|
+
fontSize: 10,
|
|
2485
|
+
fontWeight: 700,
|
|
2486
|
+
letterSpacing: ".1em",
|
|
2487
|
+
textTransform: "uppercase",
|
|
2488
|
+
color: muted,
|
|
2489
|
+
margin: "0 0 16px"
|
|
2490
|
+
}
|
|
2491
|
+
},
|
|
2492
|
+
"Navigate"
|
|
2493
|
+
), links.map((link, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2494
|
+
"a",
|
|
2495
|
+
{
|
|
2496
|
+
key: link.label,
|
|
2497
|
+
href: link.href,
|
|
2498
|
+
onClick: (e) => {
|
|
2499
|
+
e.preventDefault();
|
|
2500
|
+
onLinkClick(link.label, i);
|
|
2501
|
+
onClose();
|
|
2502
|
+
},
|
|
2503
|
+
style: {
|
|
2504
|
+
fontFamily: "Syne",
|
|
2505
|
+
fontSize: "clamp(22px,2.8vw,30px)",
|
|
2506
|
+
fontWeight: 700,
|
|
2507
|
+
letterSpacing: "-0.03em",
|
|
2508
|
+
color: activeIdx === i ? accent : text,
|
|
2509
|
+
textDecoration: "none",
|
|
2510
|
+
padding: "10px 0",
|
|
2511
|
+
borderBottom: "0.5px solid rgba(255,255,255,.05)",
|
|
2512
|
+
display: "flex",
|
|
2513
|
+
alignItems: "center",
|
|
2514
|
+
justifyContent: "space-between",
|
|
2515
|
+
cursor: "pointer",
|
|
2516
|
+
transition: skip ? "none" : "all .22s cubic-bezier(.34,1.56,.64,1)",
|
|
2517
|
+
animation: skip ? "none" : `nb-slide-left .5s cubic-bezier(.16,1,.3,1) ${0.18 + i * 0.07}s both`
|
|
2518
|
+
},
|
|
2519
|
+
onMouseEnter: (e) => {
|
|
2520
|
+
e.currentTarget.style.color = accent;
|
|
2521
|
+
e.currentTarget.style.paddingLeft = "8px";
|
|
2522
|
+
},
|
|
2523
|
+
onMouseLeave: (e) => {
|
|
2524
|
+
e.currentTarget.style.color = activeIdx === i ? accent : text;
|
|
2525
|
+
e.currentTarget.style.paddingLeft = "0";
|
|
2526
|
+
}
|
|
2527
|
+
},
|
|
2528
|
+
link.label,
|
|
2529
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 13, opacity: 0.3 } }, "\u2197")
|
|
2530
|
+
))),
|
|
2531
|
+
/* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", gap: 20 } }, ["Twitter", "GitHub", "Discord", "LinkedIn"].map((s) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2532
|
+
"a",
|
|
2533
|
+
{
|
|
2534
|
+
key: s,
|
|
2535
|
+
href: "#",
|
|
2536
|
+
style: {
|
|
2537
|
+
fontFamily: "DM Sans",
|
|
2538
|
+
fontSize: 12,
|
|
2539
|
+
color: muted,
|
|
2540
|
+
textDecoration: "none",
|
|
2541
|
+
transition: "color .2s"
|
|
2542
|
+
},
|
|
2543
|
+
onMouseEnter: (e) => e.currentTarget.style.color = accent,
|
|
2544
|
+
onMouseLeave: (e) => e.currentTarget.style.color = muted
|
|
2545
|
+
},
|
|
2546
|
+
s
|
|
2547
|
+
)))
|
|
2548
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2549
|
+
"div",
|
|
2550
|
+
{
|
|
2551
|
+
style: {
|
|
2552
|
+
flex: "0 0 230px",
|
|
2553
|
+
padding: "32px 28px",
|
|
2554
|
+
display: "flex",
|
|
2555
|
+
flexDirection: "column",
|
|
2556
|
+
justifyContent: "space-between"
|
|
2557
|
+
}
|
|
2558
|
+
},
|
|
2559
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
2560
|
+
"p",
|
|
2561
|
+
{
|
|
2562
|
+
style: {
|
|
2563
|
+
fontFamily: "Syne",
|
|
2564
|
+
fontSize: 10,
|
|
2565
|
+
fontWeight: 700,
|
|
2566
|
+
letterSpacing: ".1em",
|
|
2567
|
+
textTransform: "uppercase",
|
|
2568
|
+
color: muted,
|
|
2569
|
+
margin: "0 0 16px"
|
|
2570
|
+
}
|
|
2571
|
+
},
|
|
2572
|
+
"Company"
|
|
2573
|
+
), sideLinks.map((l, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2574
|
+
"a",
|
|
2575
|
+
{
|
|
2576
|
+
key: l,
|
|
2577
|
+
href: "#",
|
|
2578
|
+
style: {
|
|
2579
|
+
display: "block",
|
|
2580
|
+
fontFamily: "DM Sans",
|
|
2581
|
+
fontSize: 14,
|
|
2582
|
+
color: muted,
|
|
2583
|
+
textDecoration: "none",
|
|
2584
|
+
padding: "8px 0",
|
|
2585
|
+
borderBottom: "0.5px solid rgba(255,255,255,.04)",
|
|
2586
|
+
transition: "color .2s ease, padding-left .2s cubic-bezier(.34,1.56,.64,1)",
|
|
2587
|
+
animation: skip ? "none" : `nb-item-in .45s cubic-bezier(.16,1,.3,1) ${0.2 + i * 0.06}s both`
|
|
2588
|
+
},
|
|
2589
|
+
onMouseEnter: (e) => {
|
|
2590
|
+
e.currentTarget.style.color = text;
|
|
2591
|
+
e.currentTarget.style.paddingLeft = "6px";
|
|
2592
|
+
},
|
|
2593
|
+
onMouseLeave: (e) => {
|
|
2594
|
+
e.currentTarget.style.color = muted;
|
|
2595
|
+
e.currentTarget.style.paddingLeft = "0";
|
|
2596
|
+
}
|
|
2597
|
+
},
|
|
2598
|
+
l
|
|
2599
|
+
))),
|
|
2600
|
+
/* @__PURE__ */ import_react2.default.createElement("div", null, /* @__PURE__ */ import_react2.default.createElement(
|
|
2601
|
+
"div",
|
|
2602
|
+
{
|
|
2603
|
+
style: {
|
|
2604
|
+
background: `linear-gradient(135deg,${accent}14,${accent}07)`,
|
|
2605
|
+
border: `0.5px solid ${accent}2a`,
|
|
2606
|
+
borderRadius: 12,
|
|
2607
|
+
padding: 18,
|
|
2608
|
+
marginBottom: 12
|
|
2609
|
+
}
|
|
2610
|
+
},
|
|
2611
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2612
|
+
"p",
|
|
2613
|
+
{
|
|
2614
|
+
style: {
|
|
2615
|
+
fontFamily: "Syne",
|
|
2616
|
+
fontSize: 13,
|
|
2617
|
+
fontWeight: 600,
|
|
2618
|
+
color: text,
|
|
2619
|
+
margin: "0 0 4px"
|
|
2620
|
+
}
|
|
2621
|
+
},
|
|
2622
|
+
"Ready to ship?"
|
|
2623
|
+
),
|
|
2624
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2625
|
+
"p",
|
|
2626
|
+
{
|
|
2627
|
+
style: {
|
|
2628
|
+
fontFamily: "DM Sans",
|
|
2629
|
+
fontSize: 12,
|
|
2630
|
+
color: muted,
|
|
2631
|
+
margin: "0 0 14px"
|
|
2632
|
+
}
|
|
2633
|
+
},
|
|
2634
|
+
"Free forever. No card needed."
|
|
2635
|
+
),
|
|
2636
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2637
|
+
"button",
|
|
2638
|
+
{
|
|
2639
|
+
onClick: () => {
|
|
2640
|
+
onCtaClick == null ? void 0 : onCtaClick();
|
|
2641
|
+
onClose();
|
|
2642
|
+
},
|
|
2643
|
+
style: {
|
|
2644
|
+
fontFamily: "Syne",
|
|
2645
|
+
fontSize: 13,
|
|
2646
|
+
fontWeight: 600,
|
|
2647
|
+
letterSpacing: ".04em",
|
|
2648
|
+
color: "#000",
|
|
2649
|
+
background: `linear-gradient(135deg,${accent},${accent}cc)`,
|
|
2650
|
+
border: "none",
|
|
2651
|
+
borderRadius: 8,
|
|
2652
|
+
padding: "10px 16px",
|
|
2653
|
+
cursor: "pointer",
|
|
2654
|
+
width: "100%",
|
|
2655
|
+
transition: "transform .2s ease"
|
|
2656
|
+
},
|
|
2657
|
+
onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.02)",
|
|
2658
|
+
onMouseLeave: (e) => e.currentTarget.style.transform = "none"
|
|
2659
|
+
},
|
|
2660
|
+
ctaLabel
|
|
2661
|
+
)
|
|
2662
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2663
|
+
"p",
|
|
2664
|
+
{
|
|
2665
|
+
style: {
|
|
2666
|
+
fontFamily: "DM Sans",
|
|
2667
|
+
fontSize: 11,
|
|
2668
|
+
color: "rgba(255,255,255,.2)",
|
|
2669
|
+
textAlign: "center",
|
|
2670
|
+
margin: 0
|
|
2671
|
+
}
|
|
2672
|
+
},
|
|
2673
|
+
"Trusted by 10,000+ teams"
|
|
2674
|
+
))
|
|
2675
|
+
))
|
|
2676
|
+
);
|
|
2677
|
+
}
|
|
2678
|
+
function Navbar({
|
|
2679
|
+
logo = "Axiom",
|
|
2680
|
+
logoIcon = "\u25C8",
|
|
2681
|
+
products = DEFAULT_PRODUCTS,
|
|
2682
|
+
links = DEFAULT_LINKS,
|
|
2683
|
+
notifications = DEFAULT_NOTIFICATIONS,
|
|
2684
|
+
ctaLabel = "Get started \u2192",
|
|
2685
|
+
badge,
|
|
2686
|
+
user = { name: "Jamie Rivera", email: "jamie@axiom.co", initials: "JR" },
|
|
2687
|
+
showUser = true,
|
|
2688
|
+
showNotifs = true,
|
|
2689
|
+
showSearch = true,
|
|
2690
|
+
showProgress = true,
|
|
2691
|
+
announcement,
|
|
2692
|
+
loading = false,
|
|
2693
|
+
defaultActive = null,
|
|
2694
|
+
disableAnimation = false,
|
|
2695
|
+
mobileBreakpoint = 768,
|
|
2696
|
+
accent = "#63D2B1",
|
|
2697
|
+
text = "#F2F0EB",
|
|
2698
|
+
muted = "#888580",
|
|
2699
|
+
surface = "rgba(8,8,10,.72)",
|
|
2700
|
+
onClick,
|
|
2701
|
+
onHover,
|
|
2702
|
+
onCtaClick,
|
|
2703
|
+
onProductClick,
|
|
2704
|
+
onAnimationEnd,
|
|
2705
|
+
onChange
|
|
2706
|
+
}) {
|
|
2707
|
+
const navRef = (0, import_react2.useRef)(null);
|
|
2708
|
+
const prodsRef = (0, import_react2.useRef)(null);
|
|
2709
|
+
const notifRef = (0, import_react2.useRef)(null);
|
|
2710
|
+
const userRef = (0, import_react2.useRef)(null);
|
|
2711
|
+
const subRefs = (0, import_react2.useRef)({});
|
|
2712
|
+
const [scrolled, setScrolled] = (0, import_react2.useState)(false);
|
|
2713
|
+
const [menuOpen, setMenuOpen] = (0, import_react2.useState)(false);
|
|
2714
|
+
const [mobOpen, setMobOpen] = (0, import_react2.useState)(false);
|
|
2715
|
+
const [prodsOpen, setProdsOpen] = (0, import_react2.useState)(false);
|
|
2716
|
+
const [notifOpen, setNotifOpen] = (0, import_react2.useState)(false);
|
|
2717
|
+
const [userOpen, setUserOpen] = (0, import_react2.useState)(false);
|
|
2718
|
+
const [cmdOpen, setCmdOpen] = (0, import_react2.useState)(false);
|
|
2719
|
+
const [subOpen, setSubOpen] = (0, import_react2.useState)(null);
|
|
2720
|
+
const [activeIdx, setActiveIdx] = (0, import_react2.useState)(defaultActive);
|
|
2721
|
+
const [logoHov, setLogoHov] = (0, import_react2.useState)(false);
|
|
2722
|
+
const [notifs, setNotifs] = (0, import_react2.useState)(notifications);
|
|
2723
|
+
const [bannerVisible, setBannerVisible] = (0, import_react2.useState)(!!announcement);
|
|
2724
|
+
const [isLoggedIn, setIsLoggedIn] = (0, import_react2.useState)(true);
|
|
2725
|
+
const isMobile = useIsMobile(mobileBreakpoint);
|
|
2726
|
+
const scrollPct = useScrollProgress();
|
|
2727
|
+
const unreadCount = notifs.filter((n) => !n.read).length;
|
|
2728
|
+
const reduced = typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion:reduce)").matches;
|
|
2729
|
+
const skip = disableAnimation || reduced;
|
|
2730
|
+
(0, import_react2.useEffect)(() => {
|
|
2731
|
+
injectKeyframes();
|
|
2732
|
+
}, []);
|
|
2733
|
+
(0, import_react2.useEffect)(() => {
|
|
2734
|
+
const h = () => setScrolled(window.scrollY > 24);
|
|
2735
|
+
window.addEventListener("scroll", h, { passive: true });
|
|
2736
|
+
return () => window.removeEventListener("scroll", h);
|
|
2737
|
+
}, []);
|
|
2738
|
+
(0, import_react2.useEffect)(() => {
|
|
2739
|
+
if (!isMobile) setMobOpen(false);
|
|
2740
|
+
}, [isMobile]);
|
|
2741
|
+
(0, import_react2.useEffect)(() => {
|
|
2742
|
+
document.body.style.overflow = menuOpen || mobOpen ? "hidden" : "";
|
|
2743
|
+
return () => {
|
|
2744
|
+
document.body.style.overflow = "";
|
|
2745
|
+
};
|
|
2746
|
+
}, [menuOpen, mobOpen]);
|
|
2747
|
+
(0, import_react2.useEffect)(() => {
|
|
2748
|
+
const h = (e) => {
|
|
2749
|
+
if (e.key === "Escape") {
|
|
2750
|
+
setMenuOpen(false);
|
|
2751
|
+
setMobOpen(false);
|
|
2752
|
+
setProdsOpen(false);
|
|
2753
|
+
setNotifOpen(false);
|
|
2754
|
+
setUserOpen(false);
|
|
2755
|
+
setCmdOpen(false);
|
|
2756
|
+
setSubOpen(null);
|
|
2757
|
+
}
|
|
2758
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
2759
|
+
e.preventDefault();
|
|
2760
|
+
setCmdOpen((v) => !v);
|
|
2761
|
+
}
|
|
2762
|
+
};
|
|
2763
|
+
window.addEventListener("keydown", h);
|
|
2764
|
+
return () => window.removeEventListener("keydown", h);
|
|
2765
|
+
}, []);
|
|
2766
|
+
useOutsideClick(prodsRef, () => setProdsOpen(false));
|
|
2767
|
+
useOutsideClick(notifRef, () => setNotifOpen(false));
|
|
2768
|
+
useOutsideClick(userRef, () => setUserOpen(false));
|
|
2769
|
+
const handleLink = (0, import_react2.useCallback)(
|
|
2770
|
+
(label, idx) => {
|
|
2771
|
+
setActiveIdx(idx);
|
|
2772
|
+
onChange == null ? void 0 : onChange(label);
|
|
2773
|
+
onClick == null ? void 0 : onClick(label);
|
|
2774
|
+
},
|
|
2775
|
+
[onChange, onClick]
|
|
2776
|
+
);
|
|
2777
|
+
const BANNER_H = bannerVisible ? 42 : 0;
|
|
2778
|
+
const NAV_H = scrolled ? 58 : 68;
|
|
2779
|
+
const TOTAL_H = BANNER_H + NAV_H;
|
|
2780
|
+
const navStyle = {
|
|
2781
|
+
position: "fixed",
|
|
2782
|
+
top: BANNER_H,
|
|
2783
|
+
left: 0,
|
|
2784
|
+
right: 0,
|
|
2785
|
+
zIndex: menuOpen || mobOpen ? 600 : 100,
|
|
2786
|
+
display: "flex",
|
|
2787
|
+
alignItems: "center",
|
|
2788
|
+
justifyContent: "space-between",
|
|
2789
|
+
padding: `0 clamp(14px, 3vw, 28px)`,
|
|
2790
|
+
height: NAV_H,
|
|
2791
|
+
background: menuOpen ? "rgba(4,4,6,.98)" : scrolled ? "rgba(8,8,10,.92)" : surface,
|
|
2792
|
+
backdropFilter: menuOpen ? "none" : "blur(20px) saturate(180%)",
|
|
2793
|
+
WebkitBackdropFilter: menuOpen ? "none" : "blur(20px) saturate(180%)",
|
|
2794
|
+
borderBottom: `0.5px solid ${menuOpen ? "rgba(255,255,255,.06)" : scrolled ? "rgba(255,255,255,.1)" : "rgba(255,255,255,.04)"}`,
|
|
2795
|
+
transition: skip ? "none" : "height .35s cubic-bezier(.34,1.56,.64,1), background .35s ease, top .35s ease",
|
|
2796
|
+
animation: skip ? "none" : "nb-entrance .5s cubic-bezier(.16,1,.3,1) both",
|
|
2797
|
+
fontFamily: "Syne, sans-serif",
|
|
2798
|
+
boxSizing: "border-box"
|
|
2799
|
+
};
|
|
2800
|
+
if (loading)
|
|
2801
|
+
return /* @__PURE__ */ import_react2.default.createElement("nav", { style: { ...navStyle, animation: "none" } }, [1, 2, 3].map((k) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2802
|
+
"div",
|
|
2803
|
+
{
|
|
2804
|
+
key: k,
|
|
2805
|
+
style: { display: "flex", gap: 12, alignItems: "center" }
|
|
2806
|
+
},
|
|
2807
|
+
[26, 68, 56, 48].map((w, i) => /* @__PURE__ */ import_react2.default.createElement(
|
|
2808
|
+
"div",
|
|
2809
|
+
{
|
|
2810
|
+
key: i,
|
|
2811
|
+
style: {
|
|
2812
|
+
width: w,
|
|
2813
|
+
height: 13,
|
|
2814
|
+
borderRadius: 5,
|
|
2815
|
+
background: "linear-gradient(90deg,rgba(255,255,255,.04) 0%,rgba(255,255,255,.1) 50%,rgba(255,255,255,.04) 100%)",
|
|
2816
|
+
backgroundSize: "600px 100%",
|
|
2817
|
+
animation: "nb-shimmer 1.5s ease-in-out infinite"
|
|
2818
|
+
}
|
|
2819
|
+
}
|
|
2820
|
+
))
|
|
2821
|
+
)));
|
|
2822
|
+
return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, announcement && bannerVisible && /* @__PURE__ */ import_react2.default.createElement(
|
|
2823
|
+
AnnouncementBanner,
|
|
2824
|
+
{
|
|
2825
|
+
...announcement,
|
|
2826
|
+
accent,
|
|
2827
|
+
skip,
|
|
2828
|
+
onDismiss: () => setBannerVisible(false)
|
|
2829
|
+
}
|
|
2830
|
+
), showProgress && /* @__PURE__ */ import_react2.default.createElement(
|
|
2831
|
+
"div",
|
|
2832
|
+
{
|
|
2833
|
+
style: {
|
|
2834
|
+
position: "fixed",
|
|
2835
|
+
top: BANNER_H + NAV_H - 1,
|
|
2836
|
+
left: 0,
|
|
2837
|
+
right: 0,
|
|
2838
|
+
zIndex: 101,
|
|
2839
|
+
height: 2,
|
|
2840
|
+
background: "rgba(255,255,255,.05)"
|
|
2841
|
+
}
|
|
2842
|
+
},
|
|
2843
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2844
|
+
"div",
|
|
2845
|
+
{
|
|
2846
|
+
style: {
|
|
2847
|
+
height: "100%",
|
|
2848
|
+
width: `${scrollPct}%`,
|
|
2849
|
+
background: `linear-gradient(90deg,${accent},${accent}88)`,
|
|
2850
|
+
transition: "width .1s linear",
|
|
2851
|
+
boxShadow: `0 0 8px ${accent}66`
|
|
2852
|
+
}
|
|
2853
|
+
}
|
|
2854
|
+
)
|
|
2855
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2856
|
+
"nav",
|
|
2857
|
+
{
|
|
2858
|
+
ref: navRef,
|
|
2859
|
+
className: "nb-root",
|
|
2860
|
+
style: navStyle,
|
|
2861
|
+
onAnimationEnd
|
|
2862
|
+
},
|
|
2863
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2864
|
+
"a",
|
|
2865
|
+
{
|
|
2866
|
+
href: "#",
|
|
2867
|
+
onClick: (e) => e.preventDefault(),
|
|
2868
|
+
style: {
|
|
2869
|
+
display: "flex",
|
|
2870
|
+
alignItems: "center",
|
|
2871
|
+
gap: 9,
|
|
2872
|
+
textDecoration: "none",
|
|
2873
|
+
cursor: "pointer",
|
|
2874
|
+
flexShrink: 0,
|
|
2875
|
+
transform: logoHov && !skip ? "scale(1.04)" : "none",
|
|
2876
|
+
transition: skip ? "none" : "transform .25s cubic-bezier(.34,1.56,.64,1)",
|
|
2877
|
+
animation: skip ? "none" : "nb-item-in .5s cubic-bezier(.16,1,.3,1) 60ms both"
|
|
2878
|
+
},
|
|
2879
|
+
onMouseEnter: () => {
|
|
2880
|
+
setLogoHov(true);
|
|
2881
|
+
onHover == null ? void 0 : onHover(true);
|
|
2882
|
+
},
|
|
2883
|
+
onMouseLeave: () => {
|
|
2884
|
+
setLogoHov(false);
|
|
2885
|
+
onHover == null ? void 0 : onHover(false);
|
|
2886
|
+
}
|
|
2887
|
+
},
|
|
2888
|
+
/* @__PURE__ */ import_react2.default.createElement("span", { style: { fontSize: 20, color: accent } }, logoIcon),
|
|
2889
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2890
|
+
"span",
|
|
2891
|
+
{
|
|
2892
|
+
style: {
|
|
2893
|
+
fontFamily: "Syne",
|
|
2894
|
+
fontSize: 17,
|
|
2895
|
+
fontWeight: 800,
|
|
2896
|
+
letterSpacing: "-0.025em",
|
|
2897
|
+
color: text
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
logo
|
|
2901
|
+
),
|
|
2902
|
+
badge && /* @__PURE__ */ import_react2.default.createElement(
|
|
2903
|
+
"span",
|
|
2904
|
+
{
|
|
2905
|
+
style: {
|
|
2906
|
+
fontSize: 9,
|
|
2907
|
+
fontWeight: 700,
|
|
2908
|
+
letterSpacing: ".08em",
|
|
2909
|
+
textTransform: "uppercase",
|
|
2910
|
+
color: accent,
|
|
2911
|
+
background: `${accent}1a`,
|
|
2912
|
+
border: `0.5px solid ${accent}44`,
|
|
2913
|
+
borderRadius: 4,
|
|
2914
|
+
padding: "2px 6px"
|
|
2915
|
+
}
|
|
2916
|
+
},
|
|
2917
|
+
badge
|
|
2918
|
+
)
|
|
2919
|
+
),
|
|
2920
|
+
!isMobile && /* @__PURE__ */ import_react2.default.createElement("div", { style: { display: "flex", alignItems: "center", gap: 22 } }, /* @__PURE__ */ import_react2.default.createElement("div", { ref: prodsRef, style: { position: "relative" } }, /* @__PURE__ */ import_react2.default.createElement(
|
|
2921
|
+
"button",
|
|
2922
|
+
{
|
|
2923
|
+
onClick: () => setProdsOpen((v) => !v),
|
|
2924
|
+
onMouseEnter: () => setProdsOpen(true),
|
|
2925
|
+
style: {
|
|
2926
|
+
background: "none",
|
|
2927
|
+
border: "none",
|
|
2928
|
+
cursor: "pointer",
|
|
2929
|
+
padding: "6px 0",
|
|
2930
|
+
display: "flex",
|
|
2931
|
+
alignItems: "center",
|
|
2932
|
+
gap: 5,
|
|
2933
|
+
fontFamily: "DM Sans",
|
|
2934
|
+
fontSize: 14,
|
|
2935
|
+
color: prodsOpen ? text : muted,
|
|
2936
|
+
transition: skip ? "none" : "color .2s",
|
|
2937
|
+
animation: skip ? "none" : "nb-item-in .5s cubic-bezier(.16,1,.3,1) 160ms both"
|
|
2938
|
+
}
|
|
2939
|
+
},
|
|
2940
|
+
"Products",
|
|
2941
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2942
|
+
"span",
|
|
2943
|
+
{
|
|
2944
|
+
style: {
|
|
2945
|
+
fontSize: 8,
|
|
2946
|
+
opacity: 0.6,
|
|
2947
|
+
display: "inline-block",
|
|
2948
|
+
transform: prodsOpen ? "rotate(180deg)" : "none",
|
|
2949
|
+
transition: skip ? "none" : "transform .3s cubic-bezier(.34,1.56,.64,1)"
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
"\u25BC"
|
|
2953
|
+
)
|
|
2954
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
2955
|
+
ProductsMegaMenu,
|
|
2956
|
+
{
|
|
2957
|
+
products,
|
|
2958
|
+
open: prodsOpen,
|
|
2959
|
+
skip,
|
|
2960
|
+
accent,
|
|
2961
|
+
text,
|
|
2962
|
+
muted,
|
|
2963
|
+
onProductClick: (p) => {
|
|
2964
|
+
onProductClick == null ? void 0 : onProductClick(p);
|
|
2965
|
+
setProdsOpen(false);
|
|
2966
|
+
}
|
|
2967
|
+
}
|
|
2968
|
+
)), links.map((link, i) => {
|
|
2969
|
+
var _a;
|
|
2970
|
+
if (!subRefs.current[link.label])
|
|
2971
|
+
subRefs.current[link.label] = import_react2.default.createRef();
|
|
2972
|
+
const hasSub = ((_a = link.children) == null ? void 0 : _a.length) > 0;
|
|
2973
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
2974
|
+
"div",
|
|
2975
|
+
{
|
|
2976
|
+
key: link.label,
|
|
2977
|
+
ref: subRefs.current[link.label],
|
|
2978
|
+
style: { position: "relative" }
|
|
2979
|
+
},
|
|
2980
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
2981
|
+
"a",
|
|
2982
|
+
{
|
|
2983
|
+
href: link.href,
|
|
2984
|
+
onClick: (e) => {
|
|
2985
|
+
e.preventDefault();
|
|
2986
|
+
handleLink(link.label, i);
|
|
2987
|
+
if (hasSub)
|
|
2988
|
+
setSubOpen(
|
|
2989
|
+
(v) => v === link.label ? null : link.label
|
|
2990
|
+
);
|
|
2991
|
+
},
|
|
2992
|
+
style: {
|
|
2993
|
+
position: "relative",
|
|
2994
|
+
padding: "6px 0",
|
|
2995
|
+
display: "flex",
|
|
2996
|
+
alignItems: "center",
|
|
2997
|
+
gap: 4,
|
|
2998
|
+
textDecoration: "none",
|
|
2999
|
+
fontFamily: "DM Sans",
|
|
3000
|
+
fontSize: 14,
|
|
3001
|
+
fontWeight: activeIdx === i ? "500" : "400",
|
|
3002
|
+
color: activeIdx === i ? accent : muted,
|
|
3003
|
+
cursor: "pointer",
|
|
3004
|
+
transition: skip ? "none" : "color .25s ease",
|
|
3005
|
+
animation: skip ? "none" : `nb-item-in .5s cubic-bezier(.16,1,.3,1) ${240 + 80 * i}ms both`
|
|
3006
|
+
},
|
|
3007
|
+
onMouseEnter: (e) => {
|
|
3008
|
+
e.currentTarget.style.color = text;
|
|
3009
|
+
if (hasSub) setSubOpen(link.label);
|
|
3010
|
+
},
|
|
3011
|
+
onMouseLeave: (e) => {
|
|
3012
|
+
e.currentTarget.style.color = activeIdx === i ? accent : muted;
|
|
3013
|
+
if (hasSub) setSubOpen(null);
|
|
3014
|
+
}
|
|
3015
|
+
},
|
|
3016
|
+
link.label,
|
|
3017
|
+
hasSub && /* @__PURE__ */ import_react2.default.createElement(
|
|
3018
|
+
"span",
|
|
3019
|
+
{
|
|
3020
|
+
style: {
|
|
3021
|
+
fontSize: 7,
|
|
3022
|
+
opacity: 0.5,
|
|
3023
|
+
transform: subOpen === link.label ? "rotate(180deg)" : "none",
|
|
3024
|
+
transition: "transform .2s"
|
|
3025
|
+
}
|
|
3026
|
+
},
|
|
3027
|
+
"\u25BC"
|
|
3028
|
+
),
|
|
3029
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
3030
|
+
"span",
|
|
3031
|
+
{
|
|
3032
|
+
style: {
|
|
3033
|
+
position: "absolute",
|
|
3034
|
+
bottom: 0,
|
|
3035
|
+
left: 0,
|
|
3036
|
+
width: "100%",
|
|
3037
|
+
height: "1.5px",
|
|
3038
|
+
background: accent,
|
|
3039
|
+
borderRadius: 2,
|
|
3040
|
+
transformOrigin: "left",
|
|
3041
|
+
transform: activeIdx === i ? "scaleX(1)" : "scaleX(0)",
|
|
3042
|
+
transition: skip ? "none" : "transform .3s cubic-bezier(.34,1.56,.64,1)"
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
)
|
|
3046
|
+
),
|
|
3047
|
+
hasSub && /* @__PURE__ */ import_react2.default.createElement(
|
|
3048
|
+
"div",
|
|
3049
|
+
{
|
|
3050
|
+
onMouseEnter: () => setSubOpen(link.label),
|
|
3051
|
+
onMouseLeave: () => setSubOpen(null)
|
|
3052
|
+
},
|
|
3053
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
3054
|
+
SubDropdown,
|
|
3055
|
+
{
|
|
3056
|
+
link,
|
|
3057
|
+
open: subOpen === link.label,
|
|
3058
|
+
skip,
|
|
3059
|
+
accent,
|
|
3060
|
+
text,
|
|
3061
|
+
muted
|
|
3062
|
+
}
|
|
3063
|
+
)
|
|
3064
|
+
)
|
|
3065
|
+
);
|
|
3066
|
+
})),
|
|
3067
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
3068
|
+
"div",
|
|
3069
|
+
{
|
|
3070
|
+
style: {
|
|
3071
|
+
display: "flex",
|
|
3072
|
+
alignItems: "center",
|
|
3073
|
+
gap: 8,
|
|
3074
|
+
flexShrink: 0
|
|
3075
|
+
}
|
|
3076
|
+
},
|
|
3077
|
+
showSearch && !isMobile && /* @__PURE__ */ import_react2.default.createElement(
|
|
3078
|
+
"div",
|
|
3079
|
+
{
|
|
3080
|
+
style: {
|
|
3081
|
+
animation: skip ? "none" : `nb-item-in .5s cubic-bezier(.16,1,.3,1) 460ms both`
|
|
3082
|
+
}
|
|
3083
|
+
},
|
|
3084
|
+
/* @__PURE__ */ import_react2.default.createElement(Tooltip, { label: "Search (\u2318K)" }, /* @__PURE__ */ import_react2.default.createElement(
|
|
3085
|
+
"button",
|
|
3086
|
+
{
|
|
3087
|
+
onClick: () => setCmdOpen(true),
|
|
3088
|
+
style: {
|
|
3089
|
+
background: "rgba(255,255,255,.05)",
|
|
3090
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
3091
|
+
borderRadius: 8,
|
|
3092
|
+
padding: "7px 10px",
|
|
3093
|
+
cursor: "pointer",
|
|
3094
|
+
color: muted,
|
|
3095
|
+
fontSize: 15,
|
|
3096
|
+
display: "flex",
|
|
3097
|
+
alignItems: "center",
|
|
3098
|
+
transition: "all .2s"
|
|
3099
|
+
},
|
|
3100
|
+
onMouseEnter: (e) => {
|
|
3101
|
+
e.currentTarget.style.background = "rgba(255,255,255,.09)";
|
|
3102
|
+
e.currentTarget.style.color = text;
|
|
3103
|
+
},
|
|
3104
|
+
onMouseLeave: (e) => {
|
|
3105
|
+
e.currentTarget.style.background = "rgba(255,255,255,.05)";
|
|
3106
|
+
e.currentTarget.style.color = muted;
|
|
3107
|
+
}
|
|
3108
|
+
},
|
|
3109
|
+
"\u2315"
|
|
3110
|
+
))
|
|
3111
|
+
),
|
|
3112
|
+
showNotifs && /* @__PURE__ */ import_react2.default.createElement(
|
|
3113
|
+
"div",
|
|
3114
|
+
{
|
|
3115
|
+
ref: notifRef,
|
|
3116
|
+
style: {
|
|
3117
|
+
position: "relative",
|
|
3118
|
+
animation: skip ? "none" : "nb-item-in .5s cubic-bezier(.16,1,.3,1) 500ms both"
|
|
3119
|
+
}
|
|
3120
|
+
},
|
|
3121
|
+
/* @__PURE__ */ import_react2.default.createElement(Tooltip, { label: "Notifications" }, /* @__PURE__ */ import_react2.default.createElement(
|
|
3122
|
+
"button",
|
|
3123
|
+
{
|
|
3124
|
+
onClick: () => {
|
|
3125
|
+
setNotifOpen((v) => !v);
|
|
3126
|
+
setUserOpen(false);
|
|
3127
|
+
},
|
|
3128
|
+
style: {
|
|
3129
|
+
position: "relative",
|
|
3130
|
+
background: notifOpen ? "rgba(255,255,255,.09)" : "rgba(255,255,255,.05)",
|
|
3131
|
+
border: `0.5px solid ${notifOpen ? "rgba(255,255,255,.15)" : "rgba(255,255,255,.1)"}`,
|
|
3132
|
+
borderRadius: 8,
|
|
3133
|
+
padding: "7px 10px",
|
|
3134
|
+
cursor: "pointer",
|
|
3135
|
+
color: notifOpen ? text : muted,
|
|
3136
|
+
fontSize: 15,
|
|
3137
|
+
display: "flex",
|
|
3138
|
+
alignItems: "center",
|
|
3139
|
+
transition: "all .2s"
|
|
3140
|
+
},
|
|
3141
|
+
onMouseEnter: (e) => {
|
|
3142
|
+
e.currentTarget.style.background = "rgba(255,255,255,.09)";
|
|
3143
|
+
e.currentTarget.style.color = text;
|
|
3144
|
+
},
|
|
3145
|
+
onMouseLeave: (e) => {
|
|
3146
|
+
if (!notifOpen) {
|
|
3147
|
+
e.currentTarget.style.background = "rgba(255,255,255,.05)";
|
|
3148
|
+
e.currentTarget.style.color = muted;
|
|
3149
|
+
}
|
|
3150
|
+
}
|
|
3151
|
+
},
|
|
3152
|
+
"\u{1F514}",
|
|
3153
|
+
unreadCount > 0 && /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(
|
|
3154
|
+
"span",
|
|
3155
|
+
{
|
|
3156
|
+
style: {
|
|
3157
|
+
position: "absolute",
|
|
3158
|
+
top: -4,
|
|
3159
|
+
right: -4,
|
|
3160
|
+
width: 16,
|
|
3161
|
+
height: 16,
|
|
3162
|
+
borderRadius: "50%",
|
|
3163
|
+
background: accent,
|
|
3164
|
+
border: "1.5px solid #07070a",
|
|
3165
|
+
display: "flex",
|
|
3166
|
+
alignItems: "center",
|
|
3167
|
+
justifyContent: "center",
|
|
3168
|
+
fontFamily: "Syne",
|
|
3169
|
+
fontSize: 9,
|
|
3170
|
+
fontWeight: 700,
|
|
3171
|
+
color: "#000",
|
|
3172
|
+
animation: skip ? "none" : "nb-badge-pop .4s cubic-bezier(.34,1.56,.64,1) both"
|
|
3173
|
+
}
|
|
3174
|
+
},
|
|
3175
|
+
unreadCount
|
|
3176
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
3177
|
+
"span",
|
|
3178
|
+
{
|
|
3179
|
+
style: {
|
|
3180
|
+
position: "absolute",
|
|
3181
|
+
top: -4,
|
|
3182
|
+
right: -4,
|
|
3183
|
+
width: 16,
|
|
3184
|
+
height: 16,
|
|
3185
|
+
borderRadius: "50%",
|
|
3186
|
+
background: accent,
|
|
3187
|
+
opacity: 0.5,
|
|
3188
|
+
pointerEvents: "none",
|
|
3189
|
+
animation: "nb-ping 1.8s ease-out infinite"
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
))
|
|
3193
|
+
)),
|
|
3194
|
+
notifOpen && /* @__PURE__ */ import_react2.default.createElement(
|
|
3195
|
+
NotificationPanel,
|
|
3196
|
+
{
|
|
3197
|
+
notifications: notifs,
|
|
3198
|
+
accent,
|
|
3199
|
+
text,
|
|
3200
|
+
muted,
|
|
3201
|
+
skip,
|
|
3202
|
+
onRead: (id) => setNotifs(
|
|
3203
|
+
(ns) => ns.map((n) => n.id === id ? { ...n, read: true } : n)
|
|
3204
|
+
),
|
|
3205
|
+
onClear: () => setNotifs((ns) => ns.map((n) => ({ ...n, read: true })))
|
|
3206
|
+
}
|
|
3207
|
+
)
|
|
3208
|
+
),
|
|
3209
|
+
showUser && /* @__PURE__ */ import_react2.default.createElement(
|
|
3210
|
+
"div",
|
|
3211
|
+
{
|
|
3212
|
+
ref: userRef,
|
|
3213
|
+
style: {
|
|
3214
|
+
position: "relative",
|
|
3215
|
+
animation: skip ? "none" : "nb-item-in .5s cubic-bezier(.16,1,.3,1) 540ms both"
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
isLoggedIn ? /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(Tooltip, { label: user.name }, /* @__PURE__ */ import_react2.default.createElement(
|
|
3219
|
+
"button",
|
|
3220
|
+
{
|
|
3221
|
+
onClick: () => {
|
|
3222
|
+
setUserOpen((v) => !v);
|
|
3223
|
+
setNotifOpen(false);
|
|
3224
|
+
},
|
|
3225
|
+
style: {
|
|
3226
|
+
width: 34,
|
|
3227
|
+
height: 34,
|
|
3228
|
+
borderRadius: "50%",
|
|
3229
|
+
background: `linear-gradient(135deg,${accent},${accent}88)`,
|
|
3230
|
+
border: `1.5px solid ${userOpen ? accent : "rgba(255,255,255,.1)"}`,
|
|
3231
|
+
cursor: "pointer",
|
|
3232
|
+
display: "flex",
|
|
3233
|
+
alignItems: "center",
|
|
3234
|
+
justifyContent: "center",
|
|
3235
|
+
fontFamily: "Syne",
|
|
3236
|
+
fontSize: 12,
|
|
3237
|
+
fontWeight: 700,
|
|
3238
|
+
color: "#000",
|
|
3239
|
+
transition: "border-color .2s, transform .2s cubic-bezier(.34,1.56,.64,1)",
|
|
3240
|
+
transform: userOpen ? "scale(1.08)" : "scale(1)"
|
|
3241
|
+
},
|
|
3242
|
+
onMouseEnter: (e) => e.currentTarget.style.transform = "scale(1.08)",
|
|
3243
|
+
onMouseLeave: (e) => {
|
|
3244
|
+
if (!userOpen)
|
|
3245
|
+
e.currentTarget.style.transform = "scale(1)";
|
|
3246
|
+
}
|
|
3247
|
+
},
|
|
3248
|
+
user.initials
|
|
3249
|
+
)), userOpen && /* @__PURE__ */ import_react2.default.createElement(
|
|
3250
|
+
UserDropdown,
|
|
3251
|
+
{
|
|
3252
|
+
user,
|
|
3253
|
+
accent,
|
|
3254
|
+
text,
|
|
3255
|
+
muted,
|
|
3256
|
+
skip,
|
|
3257
|
+
onLogout: () => {
|
|
3258
|
+
setIsLoggedIn(false);
|
|
3259
|
+
setUserOpen(false);
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
)) : /* @__PURE__ */ import_react2.default.createElement(
|
|
3263
|
+
"button",
|
|
3264
|
+
{
|
|
3265
|
+
onClick: () => setIsLoggedIn(true),
|
|
3266
|
+
style: {
|
|
3267
|
+
fontFamily: "DM Sans",
|
|
3268
|
+
fontSize: 13,
|
|
3269
|
+
color: muted,
|
|
3270
|
+
background: "rgba(255,255,255,.05)",
|
|
3271
|
+
border: "0.5px solid rgba(255,255,255,.1)",
|
|
3272
|
+
borderRadius: 8,
|
|
3273
|
+
padding: "7px 14px",
|
|
3274
|
+
cursor: "pointer",
|
|
3275
|
+
transition: "all .2s"
|
|
3276
|
+
},
|
|
3277
|
+
onMouseEnter: (e) => {
|
|
3278
|
+
e.currentTarget.style.color = text;
|
|
3279
|
+
e.currentTarget.style.background = "rgba(255,255,255,.09)";
|
|
3280
|
+
},
|
|
3281
|
+
onMouseLeave: (e) => {
|
|
3282
|
+
e.currentTarget.style.color = muted;
|
|
3283
|
+
e.currentTarget.style.background = "rgba(255,255,255,.05)";
|
|
3284
|
+
}
|
|
3285
|
+
},
|
|
3286
|
+
"Sign in"
|
|
3287
|
+
)
|
|
3288
|
+
),
|
|
3289
|
+
!isMobile && /* @__PURE__ */ import_react2.default.createElement(
|
|
3290
|
+
"button",
|
|
3291
|
+
{
|
|
3292
|
+
onClick: onCtaClick,
|
|
3293
|
+
style: {
|
|
3294
|
+
fontFamily: "Syne",
|
|
3295
|
+
fontSize: 13,
|
|
3296
|
+
fontWeight: 600,
|
|
3297
|
+
letterSpacing: ".04em",
|
|
3298
|
+
color: "#000",
|
|
3299
|
+
background: `linear-gradient(135deg,${accent}ee,${accent}bb)`,
|
|
3300
|
+
border: "none",
|
|
3301
|
+
borderRadius: 8,
|
|
3302
|
+
padding: "8px 18px",
|
|
3303
|
+
cursor: "pointer",
|
|
3304
|
+
whiteSpace: "nowrap",
|
|
3305
|
+
transition: skip ? "none" : "all .25s cubic-bezier(.34,1.56,.64,1)",
|
|
3306
|
+
animation: skip ? "none" : `nb-item-in .5s cubic-bezier(.16,1,.3,1) 580ms both, nb-glow-pulse 3s ease-in-out 1.1s infinite`,
|
|
3307
|
+
"--nb-accent-glow": `${accent}55`
|
|
3308
|
+
},
|
|
3309
|
+
onMouseEnter: (e) => {
|
|
3310
|
+
e.currentTarget.style.transform = "translateY(-2px) scale(1.04)";
|
|
3311
|
+
e.currentTarget.style.boxShadow = `0 8px 28px ${accent}42`;
|
|
3312
|
+
},
|
|
3313
|
+
onMouseLeave: (e) => {
|
|
3314
|
+
e.currentTarget.style.transform = "none";
|
|
3315
|
+
e.currentTarget.style.boxShadow = "none";
|
|
3316
|
+
},
|
|
3317
|
+
onMouseDown: (e) => e.currentTarget.style.transform = "scale(.96)",
|
|
3318
|
+
onMouseUp: (e) => e.currentTarget.style.transform = "translateY(-2px) scale(1.04)"
|
|
3319
|
+
},
|
|
3320
|
+
ctaLabel
|
|
3321
|
+
),
|
|
3322
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
3323
|
+
"button",
|
|
3324
|
+
{
|
|
3325
|
+
onClick: () => isMobile ? setMobOpen((v) => !v) : setMenuOpen((v) => !v),
|
|
3326
|
+
"aria-label": "Menu",
|
|
3327
|
+
style: {
|
|
3328
|
+
background: menuOpen || mobOpen ? "rgba(255,255,255,.08)" : "rgba(255,255,255,.04)",
|
|
3329
|
+
border: `0.5px solid ${menuOpen || mobOpen ? "rgba(255,255,255,.15)" : "rgba(255,255,255,.08)"}`,
|
|
3330
|
+
borderRadius: 9,
|
|
3331
|
+
padding: "9px 11px",
|
|
3332
|
+
cursor: "pointer",
|
|
3333
|
+
display: "flex",
|
|
3334
|
+
alignItems: "center",
|
|
3335
|
+
justifyContent: "center",
|
|
3336
|
+
transition: skip ? "none" : "all .22s ease",
|
|
3337
|
+
animation: skip ? "none" : "nb-item-in .5s cubic-bezier(.16,1,.3,1) 630ms both"
|
|
3338
|
+
}
|
|
3339
|
+
},
|
|
3340
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
3341
|
+
HamburgerIcon,
|
|
3342
|
+
{
|
|
3343
|
+
open: isMobile ? mobOpen : menuOpen,
|
|
3344
|
+
accent,
|
|
3345
|
+
textColor: text,
|
|
3346
|
+
skip
|
|
3347
|
+
}
|
|
3348
|
+
)
|
|
3349
|
+
)
|
|
3350
|
+
)
|
|
3351
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
3352
|
+
CommandPalette,
|
|
3353
|
+
{
|
|
3354
|
+
open: cmdOpen,
|
|
3355
|
+
onClose: () => setCmdOpen(false),
|
|
3356
|
+
products,
|
|
3357
|
+
links,
|
|
3358
|
+
accent,
|
|
3359
|
+
text,
|
|
3360
|
+
muted,
|
|
3361
|
+
skip
|
|
3362
|
+
}
|
|
3363
|
+
), /* @__PURE__ */ import_react2.default.createElement(
|
|
3364
|
+
MobileDrawer,
|
|
3365
|
+
{
|
|
3366
|
+
open: mobOpen,
|
|
3367
|
+
onClose: () => setMobOpen(false),
|
|
3368
|
+
links,
|
|
3369
|
+
products,
|
|
3370
|
+
ctaLabel,
|
|
3371
|
+
accent,
|
|
3372
|
+
text,
|
|
3373
|
+
muted,
|
|
3374
|
+
skip,
|
|
3375
|
+
onProductClick,
|
|
3376
|
+
onCtaClick
|
|
3377
|
+
}
|
|
3378
|
+
), !isMobile && /* @__PURE__ */ import_react2.default.createElement(
|
|
3379
|
+
FullScreenMenu,
|
|
3380
|
+
{
|
|
3381
|
+
open: menuOpen,
|
|
3382
|
+
onClose: () => setMenuOpen(false),
|
|
3383
|
+
links,
|
|
3384
|
+
products,
|
|
3385
|
+
ctaLabel,
|
|
3386
|
+
accent,
|
|
3387
|
+
text,
|
|
3388
|
+
muted,
|
|
3389
|
+
skip,
|
|
3390
|
+
activeIdx,
|
|
3391
|
+
onLinkClick: handleLink,
|
|
3392
|
+
onProductClick,
|
|
3393
|
+
onCtaClick
|
|
3394
|
+
}
|
|
3395
|
+
), /* @__PURE__ */ import_react2.default.createElement("div", { style: { height: TOTAL_H } }));
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
// src/components/Spotlight/Spotlight.jsx
|
|
3399
|
+
var import_react3 = __toESM(require("react"));
|
|
3400
|
+
var THEMES = {
|
|
3401
|
+
indigo: {
|
|
3402
|
+
spotlight: "rgba(99,102,241,0.18)",
|
|
3403
|
+
border: "99,102,241",
|
|
3404
|
+
glow: "#6366f1",
|
|
3405
|
+
bg: "#0a0a12",
|
|
3406
|
+
inner: "rgba(10,10,18,0.96)"
|
|
3407
|
+
},
|
|
3408
|
+
rose: {
|
|
3409
|
+
spotlight: "rgba(244,63,94,0.18)",
|
|
3410
|
+
border: "244,63,94",
|
|
3411
|
+
glow: "#f43f5e",
|
|
3412
|
+
bg: "#12080a",
|
|
3413
|
+
inner: "rgba(18,8,10,0.96)"
|
|
3414
|
+
},
|
|
3415
|
+
emerald: {
|
|
3416
|
+
spotlight: "rgba(16,185,129,0.18)",
|
|
3417
|
+
border: "16,185,129",
|
|
3418
|
+
glow: "#10b981",
|
|
3419
|
+
bg: "#08120f",
|
|
3420
|
+
inner: "rgba(8,18,15,0.96)"
|
|
3421
|
+
},
|
|
3422
|
+
amber: {
|
|
3423
|
+
spotlight: "rgba(245,158,11,0.18)",
|
|
3424
|
+
border: "245,158,11",
|
|
3425
|
+
glow: "#f59e0b",
|
|
3426
|
+
bg: "#120f08",
|
|
3427
|
+
inner: "rgba(18,15,8,0.96)"
|
|
3428
|
+
},
|
|
3429
|
+
sky: {
|
|
3430
|
+
spotlight: "rgba(14,165,233,0.18)",
|
|
3431
|
+
border: "14,165,233",
|
|
3432
|
+
glow: "#0ea5e9",
|
|
3433
|
+
bg: "#080f12",
|
|
3434
|
+
inner: "rgba(8,15,18,0.96)"
|
|
3435
|
+
},
|
|
3436
|
+
aurora: {
|
|
3437
|
+
spotlight: "rgba(168,85,247,0.18)",
|
|
3438
|
+
border: "168,85,247",
|
|
3439
|
+
glow: "#a855f7",
|
|
3440
|
+
bg: "#0e0a12",
|
|
3441
|
+
inner: "rgba(14,10,18,0.96)"
|
|
3442
|
+
}
|
|
3443
|
+
};
|
|
3444
|
+
var clamp2 = (v, mn, mx) => Math.min(Math.max(v, mn), mx);
|
|
3445
|
+
var injectGlobalStyles = () => {
|
|
3446
|
+
const id = "spotlight-card-global";
|
|
3447
|
+
if (document.getElementById(id)) return;
|
|
3448
|
+
const s = document.createElement("style");
|
|
3449
|
+
s.id = id;
|
|
3450
|
+
s.innerHTML = `
|
|
3451
|
+
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&display=swap');
|
|
3452
|
+
.sc-root *, .sc-root *::before, .sc-root *::after { box-sizing: border-box; }
|
|
3453
|
+
@keyframes sc-ripple { 0%{transform:scale(0) translate(-50%,-50%);opacity:.6} 100%{transform:scale(4) translate(-50%,-50%);opacity:0} }
|
|
3454
|
+
@keyframes sc-badge-pulse{ 0%,100%{box-shadow:0 0 0 0 var(--bpulse,rgba(99,102,241,.5))} 50%{box-shadow:0 0 0 5px rgba(0,0,0,0)} }
|
|
3455
|
+
@keyframes sc-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }
|
|
3456
|
+
@keyframes sc-shimmer { 0%{background-position:-200% 0} 100%{background-position:200% 0} }
|
|
3457
|
+
@media(prefers-reduced-motion:reduce){ .sc-root,.sc-root *{ animation:none!important; transition:none!important; } }
|
|
3458
|
+
`;
|
|
3459
|
+
document.head.appendChild(s);
|
|
3460
|
+
};
|
|
3461
|
+
var Badge = ({ label, color = "#6366f1" }) => {
|
|
3462
|
+
const rgb = (() => {
|
|
3463
|
+
const r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
|
|
3464
|
+
return r ? `${parseInt(r[1], 16)},${parseInt(r[2], 16)},${parseInt(r[3], 16)}` : "99,102,241";
|
|
3465
|
+
})();
|
|
3466
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
3467
|
+
"span",
|
|
3468
|
+
{
|
|
3469
|
+
style: {
|
|
3470
|
+
"--bpulse": `rgba(${rgb},.5)`,
|
|
3471
|
+
display: "inline-flex",
|
|
3472
|
+
alignItems: "center",
|
|
3473
|
+
gap: 5,
|
|
3474
|
+
padding: "3px 10px",
|
|
3475
|
+
borderRadius: 999,
|
|
3476
|
+
fontSize: 10,
|
|
3477
|
+
fontWeight: 700,
|
|
3478
|
+
letterSpacing: "0.07em",
|
|
3479
|
+
textTransform: "uppercase",
|
|
3480
|
+
color,
|
|
3481
|
+
background: `rgba(${rgb},.12)`,
|
|
3482
|
+
border: `1px solid rgba(${rgb},.3)`,
|
|
3483
|
+
animation: "sc-badge-pulse 2s infinite",
|
|
3484
|
+
fontFamily: "DM Sans, sans-serif"
|
|
3485
|
+
}
|
|
3486
|
+
},
|
|
3487
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
3488
|
+
"span",
|
|
3489
|
+
{
|
|
3490
|
+
style: { width: 6, height: 6, borderRadius: "50%", background: color }
|
|
3491
|
+
}
|
|
3492
|
+
),
|
|
3493
|
+
label
|
|
3494
|
+
);
|
|
3495
|
+
};
|
|
3496
|
+
var SpotlightCard = ({
|
|
3497
|
+
children,
|
|
3498
|
+
theme = "indigo",
|
|
3499
|
+
customTheme = {},
|
|
3500
|
+
tilt = true,
|
|
3501
|
+
tiltStrength = 12,
|
|
3502
|
+
ripple = true,
|
|
3503
|
+
float = false,
|
|
3504
|
+
glass = false,
|
|
3505
|
+
loading = false,
|
|
3506
|
+
disabled = false,
|
|
3507
|
+
badge,
|
|
3508
|
+
badgeColor,
|
|
3509
|
+
borderRadius = "20px",
|
|
3510
|
+
padding = "28px",
|
|
3511
|
+
spotlightSize = "600px",
|
|
3512
|
+
transitionDuration = 0.3,
|
|
3513
|
+
onClick,
|
|
3514
|
+
className = "",
|
|
3515
|
+
style = {}
|
|
3516
|
+
}) => {
|
|
3517
|
+
const ref = (0, import_react3.useRef)(null);
|
|
3518
|
+
const rippleCount = (0, import_react3.useRef)(0);
|
|
3519
|
+
const [pos, setPos] = (0, import_react3.useState)({ x: 0, y: 0 });
|
|
3520
|
+
const [hovered, setHovered] = (0, import_react3.useState)(false);
|
|
3521
|
+
const [tiltXY, setTiltXY] = (0, import_react3.useState)({ x: 0, y: 0 });
|
|
3522
|
+
const [ripples, setRipples] = (0, import_react3.useState)([]);
|
|
3523
|
+
(0, import_react3.useEffect)(() => {
|
|
3524
|
+
injectGlobalStyles();
|
|
3525
|
+
}, []);
|
|
3526
|
+
const t = { ...THEMES[theme] ?? THEMES.indigo, ...customTheme };
|
|
3527
|
+
const td = `${transitionDuration}s`;
|
|
3528
|
+
const onMove = (0, import_react3.useCallback)(
|
|
3529
|
+
(e) => {
|
|
3530
|
+
if (disabled || !ref.current) return;
|
|
3531
|
+
const r = ref.current.getBoundingClientRect();
|
|
3532
|
+
const x = e.clientX - r.left, y = e.clientY - r.top;
|
|
3533
|
+
setPos({ x, y });
|
|
3534
|
+
if (tilt) {
|
|
3535
|
+
const cx = r.width / 2, cy = r.height / 2;
|
|
3536
|
+
setTiltXY({
|
|
3537
|
+
x: clamp2((y - cy) / cy * tiltStrength, -tiltStrength, tiltStrength),
|
|
3538
|
+
y: -clamp2(
|
|
3539
|
+
(x - cx) / cx * tiltStrength,
|
|
3540
|
+
-tiltStrength,
|
|
3541
|
+
tiltStrength
|
|
3542
|
+
)
|
|
3543
|
+
});
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3546
|
+
[disabled, tilt, tiltStrength]
|
|
3547
|
+
);
|
|
3548
|
+
const onEnter = (0, import_react3.useCallback)(() => {
|
|
3549
|
+
if (!disabled) setHovered(true);
|
|
3550
|
+
}, [disabled]);
|
|
3551
|
+
const onLeave = (0, import_react3.useCallback)(() => {
|
|
3552
|
+
setHovered(false);
|
|
3553
|
+
setTiltXY({ x: 0, y: 0 });
|
|
3554
|
+
}, []);
|
|
3555
|
+
const onClickHandler = (0, import_react3.useCallback)(
|
|
3556
|
+
(e) => {
|
|
3557
|
+
if (disabled) return;
|
|
3558
|
+
onClick == null ? void 0 : onClick(e);
|
|
3559
|
+
if (!ripple || !ref.current) return;
|
|
3560
|
+
const r = ref.current.getBoundingClientRect();
|
|
3561
|
+
const id = ++rippleCount.current;
|
|
3562
|
+
setRipples((prev) => [
|
|
3563
|
+
...prev,
|
|
3564
|
+
{ x: e.clientX - r.left, y: e.clientY - r.top, id }
|
|
3565
|
+
]);
|
|
3566
|
+
setTimeout(
|
|
3567
|
+
() => setRipples((prev) => prev.filter((rp) => rp.id !== id)),
|
|
3568
|
+
650
|
|
3569
|
+
);
|
|
3570
|
+
},
|
|
3571
|
+
[disabled, onClick, ripple]
|
|
3572
|
+
);
|
|
3573
|
+
const transform = tilt && hovered ? `perspective(900px) rotateX(${tiltXY.x}deg) rotateY(${tiltXY.y}deg) scale(1.025)` : "perspective(900px) rotateX(0deg) rotateY(0deg) scale(1)";
|
|
3574
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
3575
|
+
"div",
|
|
3576
|
+
{
|
|
3577
|
+
ref,
|
|
3578
|
+
className: `sc-root ${className}`,
|
|
3579
|
+
onClick: onClickHandler,
|
|
3580
|
+
onMouseMove: onMove,
|
|
3581
|
+
onMouseEnter: onEnter,
|
|
3582
|
+
onMouseLeave: onLeave,
|
|
3583
|
+
onKeyDown: (e) => e.key === "Enter" && onClickHandler(e),
|
|
3584
|
+
role: onClick ? "button" : void 0,
|
|
3585
|
+
tabIndex: onClick && !disabled ? 0 : void 0,
|
|
3586
|
+
"aria-disabled": disabled,
|
|
3587
|
+
style: {
|
|
3588
|
+
position: "relative",
|
|
3589
|
+
borderRadius,
|
|
3590
|
+
padding: "1.5px",
|
|
3591
|
+
overflow: "hidden",
|
|
3592
|
+
cursor: disabled ? "not-allowed" : onClick ? "pointer" : "default",
|
|
3593
|
+
opacity: disabled ? 0.42 : 1,
|
|
3594
|
+
transition: `transform ${td} cubic-bezier(.22,1,.36,1), box-shadow ${td} ease`,
|
|
3595
|
+
transform,
|
|
3596
|
+
boxShadow: hovered ? `0 22px 60px rgba(${t.border},.22), 0 0 0 1px rgba(${t.border},.22)` : "0 4px 28px rgba(0,0,0,.45)",
|
|
3597
|
+
animation: float ? "sc-float 4s ease-in-out infinite" : "none",
|
|
3598
|
+
background: t.bg,
|
|
3599
|
+
...style
|
|
3600
|
+
}
|
|
3601
|
+
},
|
|
3602
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
3603
|
+
"div",
|
|
3604
|
+
{
|
|
3605
|
+
"aria-hidden": true,
|
|
3606
|
+
style: {
|
|
3607
|
+
position: "absolute",
|
|
3608
|
+
inset: 0,
|
|
3609
|
+
zIndex: 0,
|
|
3610
|
+
borderRadius,
|
|
3611
|
+
transition: `opacity ${td} ease`,
|
|
3612
|
+
opacity: hovered ? 1 : 0,
|
|
3613
|
+
background: `radial-gradient(260px circle at ${pos.x}px ${pos.y}px, ${t.glow}, transparent 70%)`
|
|
3614
|
+
}
|
|
3615
|
+
}
|
|
3616
|
+
),
|
|
3617
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
3618
|
+
"div",
|
|
3619
|
+
{
|
|
3620
|
+
style: {
|
|
3621
|
+
position: "relative",
|
|
3622
|
+
zIndex: 1,
|
|
3623
|
+
borderRadius: `calc(${borderRadius} - 1.5px)`,
|
|
3624
|
+
padding,
|
|
3625
|
+
height: "100%",
|
|
3626
|
+
color: "#fff",
|
|
3627
|
+
display: "flex",
|
|
3628
|
+
flexDirection: "column",
|
|
3629
|
+
gap: 12,
|
|
3630
|
+
fontFamily: "DM Sans, sans-serif",
|
|
3631
|
+
overflow: "hidden",
|
|
3632
|
+
...glass ? {
|
|
3633
|
+
backdropFilter: "blur(18px) saturate(1.7)",
|
|
3634
|
+
background: "rgba(255,255,255,0.055)"
|
|
3635
|
+
} : { background: t.inner },
|
|
3636
|
+
...loading ? {
|
|
3637
|
+
background: "linear-gradient(90deg,rgba(255,255,255,.04) 25%,rgba(255,255,255,.09) 50%,rgba(255,255,255,.04) 75%)",
|
|
3638
|
+
backgroundSize: "200% 100%",
|
|
3639
|
+
animation: "sc-shimmer 1.6s infinite linear",
|
|
3640
|
+
minHeight: 160
|
|
3641
|
+
} : {}
|
|
3642
|
+
}
|
|
3643
|
+
},
|
|
3644
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
3645
|
+
"div",
|
|
3646
|
+
{
|
|
3647
|
+
"aria-hidden": true,
|
|
3648
|
+
style: {
|
|
3649
|
+
position: "absolute",
|
|
3650
|
+
inset: 0,
|
|
3651
|
+
pointerEvents: "none",
|
|
3652
|
+
zIndex: 2,
|
|
3653
|
+
borderRadius: `calc(${borderRadius} - 1.5px)`,
|
|
3654
|
+
transition: `opacity ${td} ease`,
|
|
3655
|
+
opacity: hovered ? 1 : 0,
|
|
3656
|
+
background: `radial-gradient(${spotlightSize} circle at ${pos.x}px ${pos.y}px, ${t.spotlight}, transparent 40%)`
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
),
|
|
3660
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
3661
|
+
"div",
|
|
3662
|
+
{
|
|
3663
|
+
"aria-hidden": true,
|
|
3664
|
+
style: {
|
|
3665
|
+
position: "absolute",
|
|
3666
|
+
inset: 0,
|
|
3667
|
+
zIndex: 3,
|
|
3668
|
+
pointerEvents: "none",
|
|
3669
|
+
borderRadius: `calc(${borderRadius} - 1.5px)`,
|
|
3670
|
+
opacity: 0.028,
|
|
3671
|
+
backgroundImage: `url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")`,
|
|
3672
|
+
backgroundSize: "128px 128px"
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
),
|
|
3676
|
+
badge && !loading && /* @__PURE__ */ import_react3.default.createElement("div", { style: { position: "absolute", top: 14, right: 14, zIndex: 10 } }, /* @__PURE__ */ import_react3.default.createElement(Badge, { label: badge, color: badgeColor ?? t.glow })),
|
|
3677
|
+
!loading && /* @__PURE__ */ import_react3.default.createElement("div", { style: { position: "relative", zIndex: 5 } }, children),
|
|
3678
|
+
ripples.map((rp) => /* @__PURE__ */ import_react3.default.createElement(
|
|
3679
|
+
"span",
|
|
3680
|
+
{
|
|
3681
|
+
key: rp.id,
|
|
3682
|
+
"aria-hidden": true,
|
|
3683
|
+
style: {
|
|
3684
|
+
position: "absolute",
|
|
3685
|
+
left: rp.x,
|
|
3686
|
+
top: rp.y,
|
|
3687
|
+
width: 40,
|
|
3688
|
+
height: 40,
|
|
3689
|
+
borderRadius: "50%",
|
|
3690
|
+
background: `rgba(${t.border},.38)`,
|
|
3691
|
+
transform: "scale(0) translate(-50%,-50%)",
|
|
3692
|
+
pointerEvents: "none",
|
|
3693
|
+
animation: "sc-ripple 620ms ease-out forwards",
|
|
3694
|
+
zIndex: 10
|
|
3695
|
+
}
|
|
3696
|
+
}
|
|
3697
|
+
))
|
|
3698
|
+
)
|
|
3699
|
+
);
|
|
3700
|
+
};
|
|
3701
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3702
|
+
0 && (module.exports = {
|
|
3703
|
+
MagneticButton,
|
|
3704
|
+
Navbar,
|
|
3705
|
+
SpotlightCard
|
|
3706
|
+
});
|