@braintwopoint0/playback-commons 0.2.6 → 0.2.7
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/ui/index.d.ts +40 -1
- package/dist/ui/index.js +354 -217
- package/dist/ui/index.js.map +1 -1
- package/package.json +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -2203,8 +2203,144 @@ function SearchBar({ value, onChange, onClear, className, placeholder = "Search.
|
|
|
2203
2203
|
] });
|
|
2204
2204
|
}
|
|
2205
2205
|
|
|
2206
|
-
// src/ui/
|
|
2206
|
+
// src/ui/multi-select.tsx
|
|
2207
|
+
import * as React25 from "react";
|
|
2208
|
+
import { ChevronDown } from "lucide-react";
|
|
2207
2209
|
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2210
|
+
function MultiSelect({
|
|
2211
|
+
options,
|
|
2212
|
+
selected,
|
|
2213
|
+
onChange,
|
|
2214
|
+
placeholder = "Select...",
|
|
2215
|
+
searchPlaceholder = "Search...",
|
|
2216
|
+
emptyLabel = "No matches",
|
|
2217
|
+
searchThreshold = 5,
|
|
2218
|
+
clearable = true,
|
|
2219
|
+
className,
|
|
2220
|
+
contentClassName,
|
|
2221
|
+
"aria-label": ariaLabel
|
|
2222
|
+
}) {
|
|
2223
|
+
const [query, setQuery] = React25.useState("");
|
|
2224
|
+
const selectedSet = React25.useMemo(() => new Set(selected), [selected]);
|
|
2225
|
+
const filtered = React25.useMemo(() => {
|
|
2226
|
+
if (!query) return options;
|
|
2227
|
+
const q = query.toLowerCase();
|
|
2228
|
+
return options.filter((o) => o.label.toLowerCase().includes(q));
|
|
2229
|
+
}, [options, query]);
|
|
2230
|
+
function toggle(value) {
|
|
2231
|
+
if (selectedSet.has(value)) {
|
|
2232
|
+
onChange(selected.filter((v) => v !== value));
|
|
2233
|
+
} else {
|
|
2234
|
+
onChange([...selected, value]);
|
|
2235
|
+
}
|
|
2236
|
+
}
|
|
2237
|
+
const triggerLabel = (() => {
|
|
2238
|
+
if (selected.length === 0) return placeholder;
|
|
2239
|
+
if (selected.length === 1) {
|
|
2240
|
+
const match = options.find((o) => o.value === selected[0]);
|
|
2241
|
+
return match?.label ?? placeholder;
|
|
2242
|
+
}
|
|
2243
|
+
return `${selected.length} selected`;
|
|
2244
|
+
})();
|
|
2245
|
+
return /* @__PURE__ */ jsxs17(Popover, { children: [
|
|
2246
|
+
/* @__PURE__ */ jsx32(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17(
|
|
2247
|
+
"button",
|
|
2248
|
+
{
|
|
2249
|
+
type: "button",
|
|
2250
|
+
"aria-label": ariaLabel,
|
|
2251
|
+
className: cn(
|
|
2252
|
+
"flex items-center justify-between gap-2 min-w-[180px] h-9 px-3 rounded-md",
|
|
2253
|
+
"bg-zinc-800 text-sm text-white border border-zinc-700",
|
|
2254
|
+
"hover:bg-zinc-700/80 transition-colors",
|
|
2255
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-white/20",
|
|
2256
|
+
className
|
|
2257
|
+
),
|
|
2258
|
+
children: [
|
|
2259
|
+
/* @__PURE__ */ jsx32(
|
|
2260
|
+
"span",
|
|
2261
|
+
{
|
|
2262
|
+
className: cn(
|
|
2263
|
+
"truncate text-left",
|
|
2264
|
+
selected.length === 0 && "text-zinc-400"
|
|
2265
|
+
),
|
|
2266
|
+
children: triggerLabel
|
|
2267
|
+
}
|
|
2268
|
+
),
|
|
2269
|
+
/* @__PURE__ */ jsx32(ChevronDown, { className: "h-4 w-4 opacity-50 flex-shrink-0" })
|
|
2270
|
+
]
|
|
2271
|
+
}
|
|
2272
|
+
) }),
|
|
2273
|
+
/* @__PURE__ */ jsxs17(
|
|
2274
|
+
PopoverContent,
|
|
2275
|
+
{
|
|
2276
|
+
className: cn("w-72 p-0", contentClassName),
|
|
2277
|
+
align: "start",
|
|
2278
|
+
onOpenAutoFocus: (e) => {
|
|
2279
|
+
if (options.length < searchThreshold) e.preventDefault();
|
|
2280
|
+
},
|
|
2281
|
+
children: [
|
|
2282
|
+
options.length >= searchThreshold && /* @__PURE__ */ jsx32("div", { className: "p-2 border-b border-zinc-800", children: /* @__PURE__ */ jsx32(
|
|
2283
|
+
Input,
|
|
2284
|
+
{
|
|
2285
|
+
type: "text",
|
|
2286
|
+
value: query,
|
|
2287
|
+
onChange: (e) => setQuery(e.target.value),
|
|
2288
|
+
placeholder: searchPlaceholder,
|
|
2289
|
+
className: "h-8 text-sm"
|
|
2290
|
+
}
|
|
2291
|
+
) }),
|
|
2292
|
+
/* @__PURE__ */ jsx32("div", { className: "max-h-64 overflow-auto py-1", children: filtered.length === 0 ? /* @__PURE__ */ jsx32("div", { className: "px-3 py-3 text-xs text-zinc-500 text-center", children: emptyLabel }) : filtered.map((opt) => {
|
|
2293
|
+
const isSelected = selectedSet.has(opt.value);
|
|
2294
|
+
return /* @__PURE__ */ jsxs17(
|
|
2295
|
+
"label",
|
|
2296
|
+
{
|
|
2297
|
+
className: cn(
|
|
2298
|
+
"w-full flex items-center gap-2.5 px-3 py-2 text-sm cursor-pointer transition-colors",
|
|
2299
|
+
"hover:bg-zinc-800/60",
|
|
2300
|
+
isSelected && "bg-zinc-800/40"
|
|
2301
|
+
),
|
|
2302
|
+
children: [
|
|
2303
|
+
/* @__PURE__ */ jsx32(
|
|
2304
|
+
Checkbox,
|
|
2305
|
+
{
|
|
2306
|
+
checked: isSelected,
|
|
2307
|
+
onCheckedChange: () => toggle(opt.value),
|
|
2308
|
+
"aria-label": opt.label
|
|
2309
|
+
}
|
|
2310
|
+
),
|
|
2311
|
+
/* @__PURE__ */ jsx32("span", { className: "flex-1 truncate text-zinc-100", children: opt.label }),
|
|
2312
|
+
opt.count !== void 0 && /* @__PURE__ */ jsx32("span", { className: "text-xs text-zinc-500 tabular-nums", children: opt.count })
|
|
2313
|
+
]
|
|
2314
|
+
},
|
|
2315
|
+
opt.value
|
|
2316
|
+
);
|
|
2317
|
+
}) }),
|
|
2318
|
+
clearable && selected.length > 0 && /* @__PURE__ */ jsxs17("div", { className: "px-3 py-2 border-t border-zinc-800 flex items-center justify-between", children: [
|
|
2319
|
+
/* @__PURE__ */ jsxs17("span", { className: "text-xs text-zinc-500 tabular-nums", children: [
|
|
2320
|
+
selected.length,
|
|
2321
|
+
" selected"
|
|
2322
|
+
] }),
|
|
2323
|
+
/* @__PURE__ */ jsx32(
|
|
2324
|
+
"button",
|
|
2325
|
+
{
|
|
2326
|
+
type: "button",
|
|
2327
|
+
onClick: () => {
|
|
2328
|
+
onChange([]);
|
|
2329
|
+
setQuery("");
|
|
2330
|
+
},
|
|
2331
|
+
className: "text-xs text-zinc-400 hover:text-white transition-colors",
|
|
2332
|
+
children: "Clear all"
|
|
2333
|
+
}
|
|
2334
|
+
)
|
|
2335
|
+
] })
|
|
2336
|
+
]
|
|
2337
|
+
}
|
|
2338
|
+
)
|
|
2339
|
+
] });
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
// src/ui/data-row.tsx
|
|
2343
|
+
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2208
2344
|
var statusColors = {
|
|
2209
2345
|
green: "bg-emerald-400",
|
|
2210
2346
|
yellow: "bg-amber-400",
|
|
@@ -2212,7 +2348,7 @@ var statusColors = {
|
|
|
2212
2348
|
gray: "bg-zinc-500"
|
|
2213
2349
|
};
|
|
2214
2350
|
function DataRow({ status, primary, secondary, trailing, className, ...props }) {
|
|
2215
|
-
return /* @__PURE__ */
|
|
2351
|
+
return /* @__PURE__ */ jsxs18(
|
|
2216
2352
|
"div",
|
|
2217
2353
|
{
|
|
2218
2354
|
className: cn(
|
|
@@ -2221,12 +2357,12 @@ function DataRow({ status, primary, secondary, trailing, className, ...props })
|
|
|
2221
2357
|
),
|
|
2222
2358
|
...props,
|
|
2223
2359
|
children: [
|
|
2224
|
-
status && /* @__PURE__ */
|
|
2225
|
-
/* @__PURE__ */
|
|
2226
|
-
/* @__PURE__ */
|
|
2227
|
-
secondary && /* @__PURE__ */
|
|
2360
|
+
status && /* @__PURE__ */ jsx33("span", { className: cn("h-2 w-2 shrink-0 rounded-full", statusColors[status]) }),
|
|
2361
|
+
/* @__PURE__ */ jsxs18("div", { className: "min-w-0 flex-1", children: [
|
|
2362
|
+
/* @__PURE__ */ jsx33("p", { className: "truncate text-sm text-[var(--timberwolf)]", children: primary }),
|
|
2363
|
+
secondary && /* @__PURE__ */ jsx33("p", { className: "truncate text-xs text-muted-foreground", children: secondary })
|
|
2228
2364
|
] }),
|
|
2229
|
-
trailing && /* @__PURE__ */
|
|
2365
|
+
trailing && /* @__PURE__ */ jsx33("div", { className: "shrink-0", children: trailing })
|
|
2230
2366
|
]
|
|
2231
2367
|
}
|
|
2232
2368
|
);
|
|
@@ -2274,12 +2410,12 @@ var springBounce = {
|
|
|
2274
2410
|
var easeSmooth = [0.25, 0.46, 0.45, 0.94];
|
|
2275
2411
|
|
|
2276
2412
|
// src/ui/fade-in.tsx
|
|
2277
|
-
import * as
|
|
2278
|
-
import { jsx as
|
|
2413
|
+
import * as React26 from "react";
|
|
2414
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2279
2415
|
function FadeIn({ children, className, delay = 0, direction = "up", ...props }) {
|
|
2280
|
-
const ref =
|
|
2281
|
-
const [visible, setVisible] =
|
|
2282
|
-
|
|
2416
|
+
const ref = React26.useRef(null);
|
|
2417
|
+
const [visible, setVisible] = React26.useState(false);
|
|
2418
|
+
React26.useEffect(() => {
|
|
2283
2419
|
const el = ref.current;
|
|
2284
2420
|
if (!el) return;
|
|
2285
2421
|
const observer = new IntersectionObserver(
|
|
@@ -2294,7 +2430,7 @@ function FadeIn({ children, className, delay = 0, direction = "up", ...props })
|
|
|
2294
2430
|
observer.observe(el);
|
|
2295
2431
|
return () => observer.disconnect();
|
|
2296
2432
|
}, []);
|
|
2297
|
-
return /* @__PURE__ */
|
|
2433
|
+
return /* @__PURE__ */ jsx34(
|
|
2298
2434
|
"div",
|
|
2299
2435
|
{
|
|
2300
2436
|
ref,
|
|
@@ -2311,10 +2447,10 @@ function FadeIn({ children, className, delay = 0, direction = "up", ...props })
|
|
|
2311
2447
|
}
|
|
2312
2448
|
|
|
2313
2449
|
// src/ui/luma-spin.tsx
|
|
2314
|
-
import { Fragment as Fragment4, jsx as
|
|
2450
|
+
import { Fragment as Fragment4, jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2315
2451
|
function LumaSpin() {
|
|
2316
|
-
return /* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */
|
|
2452
|
+
return /* @__PURE__ */ jsxs19(Fragment4, { children: [
|
|
2453
|
+
/* @__PURE__ */ jsx35(
|
|
2318
2454
|
"style",
|
|
2319
2455
|
{
|
|
2320
2456
|
dangerouslySetInnerHTML: {
|
|
@@ -2334,8 +2470,8 @@ function LumaSpin() {
|
|
|
2334
2470
|
}
|
|
2335
2471
|
}
|
|
2336
2472
|
),
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
/* @__PURE__ */
|
|
2473
|
+
/* @__PURE__ */ jsxs19("div", { style: { position: "relative", width: 65, aspectRatio: "1" }, children: [
|
|
2474
|
+
/* @__PURE__ */ jsx35(
|
|
2339
2475
|
"span",
|
|
2340
2476
|
{
|
|
2341
2477
|
style: {
|
|
@@ -2347,7 +2483,7 @@ function LumaSpin() {
|
|
|
2347
2483
|
}
|
|
2348
2484
|
}
|
|
2349
2485
|
),
|
|
2350
|
-
/* @__PURE__ */
|
|
2486
|
+
/* @__PURE__ */ jsx35(
|
|
2351
2487
|
"span",
|
|
2352
2488
|
{
|
|
2353
2489
|
style: {
|
|
@@ -2364,10 +2500,10 @@ function LumaSpin() {
|
|
|
2364
2500
|
}
|
|
2365
2501
|
|
|
2366
2502
|
// src/ui/footer.tsx
|
|
2367
|
-
import * as
|
|
2503
|
+
import * as React27 from "react";
|
|
2368
2504
|
import Image2 from "next/image";
|
|
2369
2505
|
import Link2 from "next/link";
|
|
2370
|
-
import { jsx as
|
|
2506
|
+
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2371
2507
|
var DEFAULT_SOCIALS = [
|
|
2372
2508
|
{
|
|
2373
2509
|
label: "Instagram",
|
|
@@ -2393,8 +2529,8 @@ var DEFAULT_SOCIALS = [
|
|
|
2393
2529
|
function NewsletterForm({
|
|
2394
2530
|
onSubmit
|
|
2395
2531
|
}) {
|
|
2396
|
-
const [email, setEmail] =
|
|
2397
|
-
const [state, setState] =
|
|
2532
|
+
const [email, setEmail] = React27.useState("");
|
|
2533
|
+
const [state, setState] = React27.useState("idle");
|
|
2398
2534
|
const handle = async (e) => {
|
|
2399
2535
|
e.preventDefault();
|
|
2400
2536
|
const ok = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email.trim());
|
|
@@ -2410,7 +2546,7 @@ function NewsletterForm({
|
|
|
2410
2546
|
setState("error");
|
|
2411
2547
|
}
|
|
2412
2548
|
};
|
|
2413
|
-
return /* @__PURE__ */
|
|
2549
|
+
return /* @__PURE__ */ jsxs20(
|
|
2414
2550
|
"form",
|
|
2415
2551
|
{
|
|
2416
2552
|
onSubmit: handle,
|
|
@@ -2418,7 +2554,7 @@ function NewsletterForm({
|
|
|
2418
2554
|
"aria-label": "Subscribe to updates",
|
|
2419
2555
|
className: "w-full max-w-md",
|
|
2420
2556
|
children: [
|
|
2421
|
-
/* @__PURE__ */
|
|
2557
|
+
/* @__PURE__ */ jsx36(
|
|
2422
2558
|
"label",
|
|
2423
2559
|
{
|
|
2424
2560
|
htmlFor: "footer-newsletter",
|
|
@@ -2426,8 +2562,8 @@ function NewsletterForm({
|
|
|
2426
2562
|
children: "Stay in the loop"
|
|
2427
2563
|
}
|
|
2428
2564
|
),
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
/* @__PURE__ */
|
|
2565
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col sm:flex-row gap-2", children: [
|
|
2566
|
+
/* @__PURE__ */ jsx36(
|
|
2431
2567
|
"input",
|
|
2432
2568
|
{
|
|
2433
2569
|
id: "footer-newsletter",
|
|
@@ -2450,7 +2586,7 @@ function NewsletterForm({
|
|
|
2450
2586
|
)
|
|
2451
2587
|
}
|
|
2452
2588
|
),
|
|
2453
|
-
/* @__PURE__ */
|
|
2589
|
+
/* @__PURE__ */ jsx36(
|
|
2454
2590
|
"button",
|
|
2455
2591
|
{
|
|
2456
2592
|
type: "submit",
|
|
@@ -2459,7 +2595,7 @@ function NewsletterForm({
|
|
|
2459
2595
|
}
|
|
2460
2596
|
)
|
|
2461
2597
|
] }),
|
|
2462
|
-
/* @__PURE__ */
|
|
2598
|
+
/* @__PURE__ */ jsxs20(
|
|
2463
2599
|
"p",
|
|
2464
2600
|
{
|
|
2465
2601
|
id: "footer-newsletter-feedback",
|
|
@@ -2484,7 +2620,7 @@ function NewsletterForm({
|
|
|
2484
2620
|
function FooterLinkItem({ link }) {
|
|
2485
2621
|
const classes = "text-[14px] text-[rgba(214,213,201,0.64)] hover:text-[var(--timberwolf)] transition-colors rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--surface-0,#0a100d)]";
|
|
2486
2622
|
if (link.external) {
|
|
2487
|
-
return /* @__PURE__ */
|
|
2623
|
+
return /* @__PURE__ */ jsx36(
|
|
2488
2624
|
"a",
|
|
2489
2625
|
{
|
|
2490
2626
|
href: link.href,
|
|
@@ -2495,7 +2631,7 @@ function FooterLinkItem({ link }) {
|
|
|
2495
2631
|
}
|
|
2496
2632
|
);
|
|
2497
2633
|
}
|
|
2498
|
-
return /* @__PURE__ */
|
|
2634
|
+
return /* @__PURE__ */ jsx36(Link2, { href: link.href, className: classes, children: link.label });
|
|
2499
2635
|
}
|
|
2500
2636
|
function Footer({
|
|
2501
2637
|
columns,
|
|
@@ -2512,7 +2648,7 @@ function Footer({
|
|
|
2512
2648
|
className
|
|
2513
2649
|
} = {}) {
|
|
2514
2650
|
const hasColumns = columns && columns.length > 0;
|
|
2515
|
-
return /* @__PURE__ */
|
|
2651
|
+
return /* @__PURE__ */ jsxs20(
|
|
2516
2652
|
"footer",
|
|
2517
2653
|
{
|
|
2518
2654
|
id: "footer",
|
|
@@ -2522,12 +2658,12 @@ function Footer({
|
|
|
2522
2658
|
),
|
|
2523
2659
|
"aria-labelledby": "footer-heading",
|
|
2524
2660
|
children: [
|
|
2525
|
-
/* @__PURE__ */
|
|
2661
|
+
/* @__PURE__ */ jsxs20("h2", { id: "footer-heading", className: "sr-only", children: [
|
|
2526
2662
|
siteName,
|
|
2527
2663
|
" site footer"
|
|
2528
2664
|
] }),
|
|
2529
|
-
/* @__PURE__ */
|
|
2530
|
-
/* @__PURE__ */
|
|
2665
|
+
/* @__PURE__ */ jsxs20("div", { className: "mx-auto max-w-[1400px] px-6 sm:px-10", children: [
|
|
2666
|
+
/* @__PURE__ */ jsxs20(
|
|
2531
2667
|
"div",
|
|
2532
2668
|
{
|
|
2533
2669
|
className: cn(
|
|
@@ -2535,14 +2671,14 @@ function Footer({
|
|
|
2535
2671
|
newsletter ? "lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] lg:items-end" : ""
|
|
2536
2672
|
),
|
|
2537
2673
|
children: [
|
|
2538
|
-
/* @__PURE__ */
|
|
2539
|
-
/* @__PURE__ */
|
|
2674
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex flex-col gap-8", children: [
|
|
2675
|
+
/* @__PURE__ */ jsx36(
|
|
2540
2676
|
Link2,
|
|
2541
2677
|
{
|
|
2542
2678
|
href: "/",
|
|
2543
2679
|
className: "inline-flex items-center gap-3 rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--night)]",
|
|
2544
2680
|
"aria-label": `${siteName} home`,
|
|
2545
|
-
children: /* @__PURE__ */
|
|
2681
|
+
children: /* @__PURE__ */ jsx36(
|
|
2546
2682
|
Image2,
|
|
2547
2683
|
{
|
|
2548
2684
|
src: logoSrc,
|
|
@@ -2554,18 +2690,18 @@ function Footer({
|
|
|
2554
2690
|
)
|
|
2555
2691
|
}
|
|
2556
2692
|
),
|
|
2557
|
-
showTagline && tagline ? /* @__PURE__ */
|
|
2693
|
+
showTagline && tagline ? /* @__PURE__ */ jsx36("p", { className: "font-semibold text-[clamp(28px,3.6vw,44px)] leading-[1.05] tracking-[-0.035em] text-[var(--timberwolf)] max-w-[18ch]", children: tagline }) : null
|
|
2558
2694
|
] }),
|
|
2559
|
-
newsletter ? /* @__PURE__ */
|
|
2695
|
+
newsletter ? /* @__PURE__ */ jsx36("div", { className: "lg:justify-self-end w-full lg:max-w-md", children: /* @__PURE__ */ jsx36(NewsletterForm, { onSubmit: newsletterAction }) }) : null
|
|
2560
2696
|
]
|
|
2561
2697
|
}
|
|
2562
2698
|
),
|
|
2563
|
-
hasColumns ? /* @__PURE__ */
|
|
2564
|
-
/* @__PURE__ */
|
|
2565
|
-
/* @__PURE__ */
|
|
2699
|
+
hasColumns ? /* @__PURE__ */ jsx36("div", { className: "border-t border-[rgba(214,213,201,0.08)] py-14", children: /* @__PURE__ */ jsx36("div", { className: "grid grid-cols-2 gap-x-6 gap-y-10 md:grid-cols-4", children: columns.map((col) => /* @__PURE__ */ jsxs20("nav", { "aria-label": col.title, children: [
|
|
2700
|
+
/* @__PURE__ */ jsx36("p", { className: "text-[12px] uppercase tracking-[0.14em] text-[rgba(214,213,201,0.44)] mb-4", children: col.title }),
|
|
2701
|
+
/* @__PURE__ */ jsx36("ul", { className: "flex flex-col gap-3", children: col.links.map((link) => /* @__PURE__ */ jsx36("li", { children: /* @__PURE__ */ jsx36(FooterLinkItem, { link }) }, `${col.title}-${link.label}`)) })
|
|
2566
2702
|
] }, col.title)) }) }) : null,
|
|
2567
|
-
/* @__PURE__ */
|
|
2568
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ jsxs20("div", { className: "border-t border-[rgba(214,213,201,0.08)] py-6 flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
|
|
2704
|
+
/* @__PURE__ */ jsx36("ul", { className: "flex items-center gap-2", children: socials.map(({ label, href, src }) => /* @__PURE__ */ jsx36("li", { children: /* @__PURE__ */ jsx36(
|
|
2569
2705
|
"a",
|
|
2570
2706
|
{
|
|
2571
2707
|
href,
|
|
@@ -2573,7 +2709,7 @@ function Footer({
|
|
|
2573
2709
|
rel: "noopener noreferrer",
|
|
2574
2710
|
"aria-label": `${siteName} on ${label}`,
|
|
2575
2711
|
className: "inline-flex items-center justify-center h-9 w-9 rounded-full hover:bg-[var(--surface-1,#0f1512)] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--night)]",
|
|
2576
|
-
children: /* @__PURE__ */
|
|
2712
|
+
children: /* @__PURE__ */ jsx36(
|
|
2577
2713
|
Image2,
|
|
2578
2714
|
{
|
|
2579
2715
|
src,
|
|
@@ -2585,14 +2721,14 @@ function Footer({
|
|
|
2585
2721
|
)
|
|
2586
2722
|
}
|
|
2587
2723
|
) }, label)) }),
|
|
2588
|
-
/* @__PURE__ */
|
|
2724
|
+
/* @__PURE__ */ jsxs20("p", { className: "text-[13px] text-[rgba(214,213,201,0.44)] order-last sm:order-none", children: [
|
|
2589
2725
|
"\xA9 ",
|
|
2590
2726
|
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
2591
2727
|
" ",
|
|
2592
2728
|
siteName,
|
|
2593
2729
|
". All rights reserved."
|
|
2594
2730
|
] }),
|
|
2595
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ jsx36(
|
|
2596
2732
|
"a",
|
|
2597
2733
|
{
|
|
2598
2734
|
href: creditHref,
|
|
@@ -2611,7 +2747,7 @@ function Footer({
|
|
|
2611
2747
|
|
|
2612
2748
|
// src/ui/footer-credits-bar.tsx
|
|
2613
2749
|
import Image3 from "next/image";
|
|
2614
|
-
import { Fragment as Fragment5, jsx as
|
|
2750
|
+
import { Fragment as Fragment5, jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2615
2751
|
var DEFAULT_SOCIALS2 = [
|
|
2616
2752
|
{
|
|
2617
2753
|
label: "Instagram",
|
|
@@ -2643,7 +2779,7 @@ function FooterCreditsBar({
|
|
|
2643
2779
|
className
|
|
2644
2780
|
} = {}) {
|
|
2645
2781
|
const year = copyrightYear ?? (/* @__PURE__ */ new Date()).getFullYear();
|
|
2646
|
-
return /* @__PURE__ */
|
|
2782
|
+
return /* @__PURE__ */ jsxs21(
|
|
2647
2783
|
"div",
|
|
2648
2784
|
{
|
|
2649
2785
|
className: cn(
|
|
@@ -2652,8 +2788,8 @@ function FooterCreditsBar({
|
|
|
2652
2788
|
className
|
|
2653
2789
|
),
|
|
2654
2790
|
children: [
|
|
2655
|
-
/* @__PURE__ */
|
|
2656
|
-
/* @__PURE__ */
|
|
2791
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-4 sm:justify-self-start", children: [
|
|
2792
|
+
/* @__PURE__ */ jsx37("ul", { className: "flex items-center gap-2", children: socials.map(({ label, href, src }) => /* @__PURE__ */ jsx37("li", { children: /* @__PURE__ */ jsx37(
|
|
2657
2793
|
"a",
|
|
2658
2794
|
{
|
|
2659
2795
|
href,
|
|
@@ -2665,7 +2801,7 @@ function FooterCreditsBar({
|
|
|
2665
2801
|
"hover:bg-[var(--surface-1,#0f1512)] transition-colors",
|
|
2666
2802
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--night)]"
|
|
2667
2803
|
),
|
|
2668
|
-
children: /* @__PURE__ */
|
|
2804
|
+
children: /* @__PURE__ */ jsx37(
|
|
2669
2805
|
Image3,
|
|
2670
2806
|
{
|
|
2671
2807
|
src,
|
|
@@ -2677,15 +2813,15 @@ function FooterCreditsBar({
|
|
|
2677
2813
|
)
|
|
2678
2814
|
}
|
|
2679
2815
|
) }, label)) }),
|
|
2680
|
-
showCredit ? /* @__PURE__ */
|
|
2681
|
-
/* @__PURE__ */
|
|
2816
|
+
showCredit ? /* @__PURE__ */ jsxs21(Fragment5, { children: [
|
|
2817
|
+
/* @__PURE__ */ jsx37(
|
|
2682
2818
|
"span",
|
|
2683
2819
|
{
|
|
2684
2820
|
"aria-hidden": true,
|
|
2685
2821
|
className: "h-5 w-px bg-[rgba(214,213,201,0.16)] flex-shrink-0"
|
|
2686
2822
|
}
|
|
2687
2823
|
),
|
|
2688
|
-
/* @__PURE__ */
|
|
2824
|
+
/* @__PURE__ */ jsx37(
|
|
2689
2825
|
"a",
|
|
2690
2826
|
{
|
|
2691
2827
|
href: creditHref,
|
|
@@ -2697,19 +2833,19 @@ function FooterCreditsBar({
|
|
|
2697
2833
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--night)]",
|
|
2698
2834
|
"whitespace-nowrap"
|
|
2699
2835
|
),
|
|
2700
|
-
children: /* @__PURE__ */
|
|
2836
|
+
children: /* @__PURE__ */ jsxs21("span", { "aria-hidden": true, children: [
|
|
2701
2837
|
"Built by",
|
|
2702
2838
|
" ",
|
|
2703
|
-
/* @__PURE__ */
|
|
2839
|
+
/* @__PURE__ */ jsxs21("span", { style: { fontFamily: "AvertaStd-Semibold" }, children: [
|
|
2704
2840
|
"BRAIN",
|
|
2705
|
-
/* @__PURE__ */
|
|
2841
|
+
/* @__PURE__ */ jsx37("span", { style: { fontFamily: "AvertaStd-Thin" }, children: "2.0" })
|
|
2706
2842
|
] })
|
|
2707
2843
|
] })
|
|
2708
2844
|
}
|
|
2709
2845
|
)
|
|
2710
2846
|
] }) : null
|
|
2711
2847
|
] }),
|
|
2712
|
-
/* @__PURE__ */
|
|
2848
|
+
/* @__PURE__ */ jsxs21("p", { className: "text-[13px] text-[rgba(214,213,201,0.44)] text-center sm:text-right sm:justify-self-end", children: [
|
|
2713
2849
|
"\xA9 ",
|
|
2714
2850
|
year,
|
|
2715
2851
|
" ",
|
|
@@ -2722,8 +2858,8 @@ function FooterCreditsBar({
|
|
|
2722
2858
|
}
|
|
2723
2859
|
|
|
2724
2860
|
// src/ui/newsletter-form.tsx
|
|
2725
|
-
import * as
|
|
2726
|
-
import { jsx as
|
|
2861
|
+
import * as React28 from "react";
|
|
2862
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2727
2863
|
function NewsletterForm2({
|
|
2728
2864
|
endpoint = "/api/newsletter/subscribe",
|
|
2729
2865
|
source = "footer",
|
|
@@ -2734,10 +2870,10 @@ function NewsletterForm2({
|
|
|
2734
2870
|
sendingLabel = "Subscribing\u2026",
|
|
2735
2871
|
className
|
|
2736
2872
|
}) {
|
|
2737
|
-
const [email, setEmail] =
|
|
2738
|
-
const [website, setWebsite] =
|
|
2739
|
-
const [state, setState] =
|
|
2740
|
-
const inFlight =
|
|
2873
|
+
const [email, setEmail] = React28.useState("");
|
|
2874
|
+
const [website, setWebsite] = React28.useState("");
|
|
2875
|
+
const [state, setState] = React28.useState("idle");
|
|
2876
|
+
const inFlight = React28.useRef(false);
|
|
2741
2877
|
const onSubmit = async (e) => {
|
|
2742
2878
|
e.preventDefault();
|
|
2743
2879
|
if (inFlight.current) return;
|
|
@@ -2776,9 +2912,9 @@ function NewsletterForm2({
|
|
|
2776
2912
|
inFlight.current = false;
|
|
2777
2913
|
}
|
|
2778
2914
|
};
|
|
2779
|
-
const feedbackId =
|
|
2780
|
-
const inputId =
|
|
2781
|
-
return /* @__PURE__ */
|
|
2915
|
+
const feedbackId = React28.useId();
|
|
2916
|
+
const inputId = React28.useId();
|
|
2917
|
+
return /* @__PURE__ */ jsxs22(
|
|
2782
2918
|
"form",
|
|
2783
2919
|
{
|
|
2784
2920
|
onSubmit,
|
|
@@ -2786,15 +2922,15 @@ function NewsletterForm2({
|
|
|
2786
2922
|
"aria-label": ariaLabel,
|
|
2787
2923
|
className: cn("w-full max-w-md", className),
|
|
2788
2924
|
children: [
|
|
2789
|
-
/* @__PURE__ */
|
|
2790
|
-
/* @__PURE__ */
|
|
2925
|
+
/* @__PURE__ */ jsx38("label", { htmlFor: inputId, className: "sr-only", children: "Email address" }),
|
|
2926
|
+
/* @__PURE__ */ jsxs22(
|
|
2791
2927
|
"div",
|
|
2792
2928
|
{
|
|
2793
2929
|
"aria-hidden": true,
|
|
2794
2930
|
className: "absolute left-[-10000px] top-auto h-px w-px overflow-hidden",
|
|
2795
2931
|
children: [
|
|
2796
|
-
/* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ jsx38("label", { htmlFor: `${inputId}-website`, children: "Website" }),
|
|
2933
|
+
/* @__PURE__ */ jsx38(
|
|
2798
2934
|
"input",
|
|
2799
2935
|
{
|
|
2800
2936
|
type: "text",
|
|
@@ -2809,8 +2945,8 @@ function NewsletterForm2({
|
|
|
2809
2945
|
]
|
|
2810
2946
|
}
|
|
2811
2947
|
),
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2948
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex flex-col sm:flex-row gap-2", children: [
|
|
2949
|
+
/* @__PURE__ */ jsx38(
|
|
2814
2950
|
"input",
|
|
2815
2951
|
{
|
|
2816
2952
|
id: inputId,
|
|
@@ -2836,7 +2972,7 @@ function NewsletterForm2({
|
|
|
2836
2972
|
)
|
|
2837
2973
|
}
|
|
2838
2974
|
),
|
|
2839
|
-
/* @__PURE__ */
|
|
2975
|
+
/* @__PURE__ */ jsx38(
|
|
2840
2976
|
"button",
|
|
2841
2977
|
{
|
|
2842
2978
|
type: "submit",
|
|
@@ -2846,7 +2982,7 @@ function NewsletterForm2({
|
|
|
2846
2982
|
}
|
|
2847
2983
|
)
|
|
2848
2984
|
] }),
|
|
2849
|
-
/* @__PURE__ */
|
|
2985
|
+
/* @__PURE__ */ jsxs22(
|
|
2850
2986
|
"p",
|
|
2851
2987
|
{
|
|
2852
2988
|
id: feedbackId,
|
|
@@ -2873,14 +3009,14 @@ function NewsletterForm2({
|
|
|
2873
3009
|
|
|
2874
3010
|
// src/ui/site-footer.tsx
|
|
2875
3011
|
import Link3 from "next/link";
|
|
2876
|
-
import { jsx as
|
|
3012
|
+
import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2877
3013
|
var INK_MUTED = "rgba(214,213,201,0.64)";
|
|
2878
3014
|
var INK_SUBTLE = "rgba(214,213,201,0.44)";
|
|
2879
3015
|
var LINE = "rgba(214,213,201,0.08)";
|
|
2880
3016
|
function FooterLinkItem2({ link }) {
|
|
2881
3017
|
const classes = "text-[14px] text-[rgba(214,213,201,0.64)] hover:text-[var(--timberwolf)] transition-colors rounded-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--timberwolf)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--night)]";
|
|
2882
3018
|
if (link.external) {
|
|
2883
|
-
return /* @__PURE__ */
|
|
3019
|
+
return /* @__PURE__ */ jsx39(
|
|
2884
3020
|
"a",
|
|
2885
3021
|
{
|
|
2886
3022
|
href: link.href,
|
|
@@ -2891,7 +3027,7 @@ function FooterLinkItem2({ link }) {
|
|
|
2891
3027
|
}
|
|
2892
3028
|
);
|
|
2893
3029
|
}
|
|
2894
|
-
return /* @__PURE__ */
|
|
3030
|
+
return /* @__PURE__ */ jsx39(Link3, { href: link.href, className: classes, children: link.label });
|
|
2895
3031
|
}
|
|
2896
3032
|
function SiteFooter({
|
|
2897
3033
|
columns,
|
|
@@ -2902,7 +3038,7 @@ function SiteFooter({
|
|
|
2902
3038
|
newsletterTitle = "Updates from the Network.",
|
|
2903
3039
|
newsletterSubtitle = "Only when relevant. No spam."
|
|
2904
3040
|
}) {
|
|
2905
|
-
return /* @__PURE__ */
|
|
3041
|
+
return /* @__PURE__ */ jsxs23(
|
|
2906
3042
|
"footer",
|
|
2907
3043
|
{
|
|
2908
3044
|
id: "footer",
|
|
@@ -2910,14 +3046,14 @@ function SiteFooter({
|
|
|
2910
3046
|
style: { borderTopColor: LINE },
|
|
2911
3047
|
"aria-labelledby": "site-footer-heading",
|
|
2912
3048
|
children: [
|
|
2913
|
-
/* @__PURE__ */
|
|
3049
|
+
/* @__PURE__ */ jsxs23("h2", { id: "site-footer-heading", className: "sr-only", children: [
|
|
2914
3050
|
siteName,
|
|
2915
3051
|
" site footer"
|
|
2916
3052
|
] }),
|
|
2917
|
-
/* @__PURE__ */
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
2920
|
-
/* @__PURE__ */
|
|
3053
|
+
/* @__PURE__ */ jsxs23("div", { className: "mx-auto max-w-[1400px] px-6 sm:px-10", children: [
|
|
3054
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-6 pt-16 pb-10 md:flex-row md:items-start md:justify-between md:gap-10 md:pt-20", children: [
|
|
3055
|
+
/* @__PURE__ */ jsxs23("div", { className: "max-w-[36ch]", children: [
|
|
3056
|
+
/* @__PURE__ */ jsx39(
|
|
2921
3057
|
"p",
|
|
2922
3058
|
{
|
|
2923
3059
|
className: "text-[11px] uppercase tracking-[0.22em] font-semibold",
|
|
@@ -2925,8 +3061,8 @@ function SiteFooter({
|
|
|
2925
3061
|
children: newsletterLabel
|
|
2926
3062
|
}
|
|
2927
3063
|
),
|
|
2928
|
-
/* @__PURE__ */
|
|
2929
|
-
/* @__PURE__ */
|
|
3064
|
+
/* @__PURE__ */ jsx39("p", { className: "mt-3 text-[17px] md:text-[19px] leading-[1.35] tracking-[-0.01em] text-[var(--timberwolf)]", children: newsletterTitle }),
|
|
3065
|
+
/* @__PURE__ */ jsx39(
|
|
2930
3066
|
"p",
|
|
2931
3067
|
{
|
|
2932
3068
|
className: "mt-2 text-[13px] leading-[1.5]",
|
|
@@ -2935,7 +3071,7 @@ function SiteFooter({
|
|
|
2935
3071
|
}
|
|
2936
3072
|
)
|
|
2937
3073
|
] }),
|
|
2938
|
-
/* @__PURE__ */
|
|
3074
|
+
/* @__PURE__ */ jsx39("div", { className: "w-full md:max-w-md md:pt-1", children: /* @__PURE__ */ jsx39(
|
|
2939
3075
|
NewsletterForm2,
|
|
2940
3076
|
{
|
|
2941
3077
|
endpoint: newsletterEndpoint,
|
|
@@ -2943,8 +3079,8 @@ function SiteFooter({
|
|
|
2943
3079
|
}
|
|
2944
3080
|
) })
|
|
2945
3081
|
] }),
|
|
2946
|
-
/* @__PURE__ */
|
|
2947
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsx39("div", { className: "border-t py-14", style: { borderTopColor: LINE }, children: /* @__PURE__ */ jsx39("div", { className: "grid grid-cols-2 gap-x-6 gap-y-10 md:grid-cols-4", children: columns.map((col) => /* @__PURE__ */ jsxs23("nav", { "aria-label": col.title, children: [
|
|
3083
|
+
/* @__PURE__ */ jsx39(
|
|
2948
3084
|
"p",
|
|
2949
3085
|
{
|
|
2950
3086
|
className: "text-[12px] uppercase tracking-[0.14em] mb-4",
|
|
@@ -2952,9 +3088,9 @@ function SiteFooter({
|
|
|
2952
3088
|
children: col.title
|
|
2953
3089
|
}
|
|
2954
3090
|
),
|
|
2955
|
-
/* @__PURE__ */
|
|
3091
|
+
/* @__PURE__ */ jsx39("ul", { className: "flex flex-col gap-3", children: col.links.map((link) => /* @__PURE__ */ jsx39("li", { children: /* @__PURE__ */ jsx39(FooterLinkItem2, { link }) }, `${col.title}-${link.label}`)) })
|
|
2956
3092
|
] }, col.title)) }) }),
|
|
2957
|
-
/* @__PURE__ */
|
|
3093
|
+
/* @__PURE__ */ jsx39(FooterCreditsBar, {})
|
|
2958
3094
|
] })
|
|
2959
3095
|
]
|
|
2960
3096
|
}
|
|
@@ -2962,7 +3098,7 @@ function SiteFooter({
|
|
|
2962
3098
|
}
|
|
2963
3099
|
|
|
2964
3100
|
// src/ui/sign-in-form.tsx
|
|
2965
|
-
import * as
|
|
3101
|
+
import * as React29 from "react";
|
|
2966
3102
|
import Link4 from "next/link";
|
|
2967
3103
|
import {
|
|
2968
3104
|
AlertCircle,
|
|
@@ -3029,7 +3165,7 @@ function createClient() {
|
|
|
3029
3165
|
}
|
|
3030
3166
|
|
|
3031
3167
|
// src/ui/sign-in-form.tsx
|
|
3032
|
-
import { Fragment as Fragment6, jsx as
|
|
3168
|
+
import { Fragment as Fragment6, jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3033
3169
|
var COOLDOWN_THRESHOLD = 3;
|
|
3034
3170
|
var COOLDOWN_DURATION_MS = 3e4;
|
|
3035
3171
|
function SignInForm({
|
|
@@ -3041,15 +3177,15 @@ function SignInForm({
|
|
|
3041
3177
|
title = "Welcome back",
|
|
3042
3178
|
subtitle = "Sign in to access your account"
|
|
3043
3179
|
}) {
|
|
3044
|
-
const [email, setEmail] =
|
|
3045
|
-
const [password, setPassword] =
|
|
3046
|
-
const [showPassword, setShowPassword] =
|
|
3047
|
-
const [error, setError] =
|
|
3048
|
-
const [loading, setLoading] =
|
|
3049
|
-
const [consecutiveErrors, setConsecutiveErrors] =
|
|
3050
|
-
const [cooldownUntil, setCooldownUntil] =
|
|
3051
|
-
const [supabase] =
|
|
3052
|
-
|
|
3180
|
+
const [email, setEmail] = React29.useState("");
|
|
3181
|
+
const [password, setPassword] = React29.useState("");
|
|
3182
|
+
const [showPassword, setShowPassword] = React29.useState(false);
|
|
3183
|
+
const [error, setError] = React29.useState(initialError ?? "");
|
|
3184
|
+
const [loading, setLoading] = React29.useState(false);
|
|
3185
|
+
const [consecutiveErrors, setConsecutiveErrors] = React29.useState(0);
|
|
3186
|
+
const [cooldownUntil, setCooldownUntil] = React29.useState(null);
|
|
3187
|
+
const [supabase] = React29.useState(() => createClient());
|
|
3188
|
+
React29.useEffect(() => {
|
|
3053
3189
|
if (initialError) setError(initialError);
|
|
3054
3190
|
}, [initialError]);
|
|
3055
3191
|
const handleSubmit = async (e) => {
|
|
@@ -3093,29 +3229,29 @@ function SignInForm({
|
|
|
3093
3229
|
setLoading(false);
|
|
3094
3230
|
}
|
|
3095
3231
|
};
|
|
3096
|
-
return /* @__PURE__ */
|
|
3097
|
-
/* @__PURE__ */
|
|
3098
|
-
/* @__PURE__ */
|
|
3099
|
-
/* @__PURE__ */
|
|
3232
|
+
return /* @__PURE__ */ jsxs24("div", { className: "bg-card border border-border rounded-xl p-8 space-y-6", children: [
|
|
3233
|
+
/* @__PURE__ */ jsxs24("div", { className: "text-center", children: [
|
|
3234
|
+
/* @__PURE__ */ jsx40("h1", { className: "text-2xl font-bold text-[var(--timberwolf)] mb-2", children: title }),
|
|
3235
|
+
/* @__PURE__ */ jsx40("p", { className: "text-sm text-muted-foreground", children: subtitle })
|
|
3100
3236
|
] }),
|
|
3101
|
-
/* @__PURE__ */
|
|
3102
|
-
error && /* @__PURE__ */
|
|
3237
|
+
/* @__PURE__ */ jsxs24("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
3238
|
+
error && /* @__PURE__ */ jsx40(
|
|
3103
3239
|
"div",
|
|
3104
3240
|
{
|
|
3105
3241
|
id: "signin-error",
|
|
3106
3242
|
role: "alert",
|
|
3107
3243
|
"aria-live": "polite",
|
|
3108
3244
|
className: "bg-red-900/20 border border-red-700/30 rounded-lg p-3",
|
|
3109
|
-
children: /* @__PURE__ */
|
|
3110
|
-
/* @__PURE__ */
|
|
3111
|
-
/* @__PURE__ */
|
|
3245
|
+
children: /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 text-red-400 text-sm", children: [
|
|
3246
|
+
/* @__PURE__ */ jsx40(AlertCircle, { className: "h-4 w-4 flex-shrink-0" }),
|
|
3247
|
+
/* @__PURE__ */ jsx40("span", { children: error })
|
|
3112
3248
|
] })
|
|
3113
3249
|
}
|
|
3114
3250
|
),
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
/* @__PURE__ */
|
|
3117
|
-
/* @__PURE__ */
|
|
3118
|
-
/* @__PURE__ */
|
|
3251
|
+
/* @__PURE__ */ jsxs24("div", { className: "space-y-2", children: [
|
|
3252
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "email", className: "text-[var(--timberwolf)]", children: "Email" }),
|
|
3253
|
+
/* @__PURE__ */ jsxs24("div", { className: "relative", children: [
|
|
3254
|
+
/* @__PURE__ */ jsx40(
|
|
3119
3255
|
Input,
|
|
3120
3256
|
{
|
|
3121
3257
|
id: "email",
|
|
@@ -3130,13 +3266,13 @@ function SignInForm({
|
|
|
3130
3266
|
"aria-describedby": error ? "signin-error" : void 0
|
|
3131
3267
|
}
|
|
3132
3268
|
),
|
|
3133
|
-
/* @__PURE__ */
|
|
3269
|
+
/* @__PURE__ */ jsx40(Mail, { className: "h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" })
|
|
3134
3270
|
] })
|
|
3135
3271
|
] }),
|
|
3136
|
-
/* @__PURE__ */
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3139
|
-
/* @__PURE__ */
|
|
3272
|
+
/* @__PURE__ */ jsxs24("div", { className: "space-y-2", children: [
|
|
3273
|
+
/* @__PURE__ */ jsx40(Label, { htmlFor: "password", className: "text-[var(--timberwolf)]", children: "Password" }),
|
|
3274
|
+
/* @__PURE__ */ jsxs24("div", { className: "relative", children: [
|
|
3275
|
+
/* @__PURE__ */ jsx40(
|
|
3140
3276
|
Input,
|
|
3141
3277
|
{
|
|
3142
3278
|
id: "password",
|
|
@@ -3151,8 +3287,8 @@ function SignInForm({
|
|
|
3151
3287
|
"aria-describedby": error ? "signin-error" : void 0
|
|
3152
3288
|
}
|
|
3153
3289
|
),
|
|
3154
|
-
/* @__PURE__ */
|
|
3155
|
-
/* @__PURE__ */
|
|
3290
|
+
/* @__PURE__ */ jsx40(Lock, { className: "h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" }),
|
|
3291
|
+
/* @__PURE__ */ jsx40(
|
|
3156
3292
|
"button",
|
|
3157
3293
|
{
|
|
3158
3294
|
type: "button",
|
|
@@ -3161,12 +3297,12 @@ function SignInForm({
|
|
|
3161
3297
|
disabled: loading,
|
|
3162
3298
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
3163
3299
|
"aria-pressed": showPassword,
|
|
3164
|
-
children: showPassword ? /* @__PURE__ */
|
|
3300
|
+
children: showPassword ? /* @__PURE__ */ jsx40(EyeOff, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx40(Eye, { className: "h-4 w-4" })
|
|
3165
3301
|
}
|
|
3166
3302
|
)
|
|
3167
3303
|
] })
|
|
3168
3304
|
] }),
|
|
3169
|
-
forgotPasswordHref ? /* @__PURE__ */
|
|
3305
|
+
forgotPasswordHref ? /* @__PURE__ */ jsx40("div", { className: "flex justify-end -mt-1", children: /* @__PURE__ */ jsx40(
|
|
3170
3306
|
Link4,
|
|
3171
3307
|
{
|
|
3172
3308
|
href: forgotPasswordHref,
|
|
@@ -3174,23 +3310,23 @@ function SignInForm({
|
|
|
3174
3310
|
children: "Forgot your password?"
|
|
3175
3311
|
}
|
|
3176
3312
|
) }) : null,
|
|
3177
|
-
/* @__PURE__ */
|
|
3313
|
+
/* @__PURE__ */ jsx40(
|
|
3178
3314
|
Button,
|
|
3179
3315
|
{
|
|
3180
3316
|
type: "submit",
|
|
3181
3317
|
className: "w-full h-11 bg-[var(--timberwolf)] text-[var(--night)] hover:bg-[var(--ash-grey)]",
|
|
3182
3318
|
disabled: loading,
|
|
3183
|
-
children: loading ? /* @__PURE__ */
|
|
3184
|
-
/* @__PURE__ */
|
|
3319
|
+
children: loading ? /* @__PURE__ */ jsxs24(Fragment6, { children: [
|
|
3320
|
+
/* @__PURE__ */ jsx40(Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
3185
3321
|
"Signing in..."
|
|
3186
3322
|
] }) : "Sign in"
|
|
3187
3323
|
}
|
|
3188
3324
|
)
|
|
3189
3325
|
] }),
|
|
3190
|
-
signUpHref ? /* @__PURE__ */
|
|
3326
|
+
signUpHref ? /* @__PURE__ */ jsx40("div", { className: "text-center text-sm", children: /* @__PURE__ */ jsxs24("p", { className: "text-muted-foreground", children: [
|
|
3191
3327
|
"Don't have an account?",
|
|
3192
3328
|
" ",
|
|
3193
|
-
/* @__PURE__ */
|
|
3329
|
+
/* @__PURE__ */ jsx40(
|
|
3194
3330
|
Link4,
|
|
3195
3331
|
{
|
|
3196
3332
|
href: signUpHref,
|
|
@@ -3203,7 +3339,7 @@ function SignInForm({
|
|
|
3203
3339
|
}
|
|
3204
3340
|
|
|
3205
3341
|
// src/ui/forgot-password-form.tsx
|
|
3206
|
-
import * as
|
|
3342
|
+
import * as React30 from "react";
|
|
3207
3343
|
import Link5 from "next/link";
|
|
3208
3344
|
import {
|
|
3209
3345
|
AlertCircle as AlertCircle2,
|
|
@@ -3212,7 +3348,7 @@ import {
|
|
|
3212
3348
|
Loader2 as Loader22,
|
|
3213
3349
|
Mail as Mail2
|
|
3214
3350
|
} from "lucide-react";
|
|
3215
|
-
import { Fragment as Fragment7, jsx as
|
|
3351
|
+
import { Fragment as Fragment7, jsx as jsx41, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3216
3352
|
var RESEND_COOLDOWN_MS = 3e4;
|
|
3217
3353
|
var COOLDOWN_STORAGE_KEY = "playback:pwreset-cooldown-until";
|
|
3218
3354
|
function ForgotPasswordForm({
|
|
@@ -3221,15 +3357,15 @@ function ForgotPasswordForm({
|
|
|
3221
3357
|
title = "Forgot password?",
|
|
3222
3358
|
subtitle = "Enter your email and we'll send you a reset link."
|
|
3223
3359
|
}) {
|
|
3224
|
-
const [email, setEmail] =
|
|
3225
|
-
const [error, setError] =
|
|
3226
|
-
const [loading, setLoading] =
|
|
3227
|
-
const [emailSent, setEmailSent] =
|
|
3228
|
-
const [cooldownUntil, setCooldownUntilState] =
|
|
3360
|
+
const [email, setEmail] = React30.useState("");
|
|
3361
|
+
const [error, setError] = React30.useState("");
|
|
3362
|
+
const [loading, setLoading] = React30.useState(false);
|
|
3363
|
+
const [emailSent, setEmailSent] = React30.useState(false);
|
|
3364
|
+
const [cooldownUntil, setCooldownUntilState] = React30.useState(
|
|
3229
3365
|
null
|
|
3230
3366
|
);
|
|
3231
|
-
const [now, setNow] =
|
|
3232
|
-
const [supabase] =
|
|
3367
|
+
const [now, setNow] = React30.useState(() => Date.now());
|
|
3368
|
+
const [supabase] = React30.useState(() => createClient());
|
|
3233
3369
|
const setCooldownUntil = (value) => {
|
|
3234
3370
|
setCooldownUntilState(value);
|
|
3235
3371
|
if (typeof window === "undefined") return;
|
|
@@ -3239,7 +3375,7 @@ function ForgotPasswordForm({
|
|
|
3239
3375
|
window.sessionStorage.setItem(COOLDOWN_STORAGE_KEY, String(value));
|
|
3240
3376
|
}
|
|
3241
3377
|
};
|
|
3242
|
-
|
|
3378
|
+
React30.useEffect(() => {
|
|
3243
3379
|
if (typeof window === "undefined") return;
|
|
3244
3380
|
const stored = window.sessionStorage.getItem(COOLDOWN_STORAGE_KEY);
|
|
3245
3381
|
if (!stored) return;
|
|
@@ -3250,7 +3386,7 @@ function ForgotPasswordForm({
|
|
|
3250
3386
|
}
|
|
3251
3387
|
setCooldownUntilState(parsed);
|
|
3252
3388
|
}, []);
|
|
3253
|
-
|
|
3389
|
+
React30.useEffect(() => {
|
|
3254
3390
|
if (!cooldownUntil) return;
|
|
3255
3391
|
const id = setInterval(() => setNow(Date.now()), 1e3);
|
|
3256
3392
|
return () => clearInterval(id);
|
|
@@ -3290,19 +3426,19 @@ function ForgotPasswordForm({
|
|
|
3290
3426
|
}
|
|
3291
3427
|
};
|
|
3292
3428
|
if (emailSent) {
|
|
3293
|
-
return /* @__PURE__ */
|
|
3294
|
-
/* @__PURE__ */
|
|
3295
|
-
/* @__PURE__ */
|
|
3296
|
-
/* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */
|
|
3429
|
+
return /* @__PURE__ */ jsxs25("div", { className: "bg-card border border-border rounded-xl p-8 space-y-6 text-center", children: [
|
|
3430
|
+
/* @__PURE__ */ jsx41("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx41("div", { className: "h-12 w-12 rounded-full bg-[var(--timberwolf)]/10 border border-[var(--timberwolf)]/20 flex items-center justify-center", children: /* @__PURE__ */ jsx41(CheckCircle, { className: "h-6 w-6 text-[var(--timberwolf)]" }) }) }),
|
|
3431
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
3432
|
+
/* @__PURE__ */ jsx41("h1", { className: "text-2xl font-bold text-[var(--timberwolf)]", children: "Check your email" }),
|
|
3433
|
+
/* @__PURE__ */ jsxs25("p", { className: "text-sm text-muted-foreground", children: [
|
|
3298
3434
|
"We sent a reset link to",
|
|
3299
3435
|
" ",
|
|
3300
|
-
/* @__PURE__ */
|
|
3436
|
+
/* @__PURE__ */ jsx41("span", { className: "text-[var(--timberwolf)] font-medium", children: email }),
|
|
3301
3437
|
". If it's not in your inbox, check spam."
|
|
3302
3438
|
] })
|
|
3303
3439
|
] }),
|
|
3304
|
-
/* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-3 pt-2", children: [
|
|
3441
|
+
/* @__PURE__ */ jsx41(
|
|
3306
3442
|
Button,
|
|
3307
3443
|
{
|
|
3308
3444
|
onClick: () => {
|
|
@@ -3316,36 +3452,36 @@ function ForgotPasswordForm({
|
|
|
3316
3452
|
children: cooldownSecondsLeft > 0 ? `Send another email in ${cooldownSecondsLeft}s` : "Send another email"
|
|
3317
3453
|
}
|
|
3318
3454
|
),
|
|
3319
|
-
/* @__PURE__ */
|
|
3320
|
-
/* @__PURE__ */
|
|
3455
|
+
/* @__PURE__ */ jsx41(Link5, { href: loginHref, className: "block", children: /* @__PURE__ */ jsxs25(Button, { className: "w-full h-11 bg-[var(--timberwolf)] text-[var(--night)] hover:bg-[var(--ash-grey)]", children: [
|
|
3456
|
+
/* @__PURE__ */ jsx41(ArrowLeft, { className: "h-4 w-4 mr-2" }),
|
|
3321
3457
|
"Back to sign in"
|
|
3322
3458
|
] }) })
|
|
3323
3459
|
] })
|
|
3324
3460
|
] });
|
|
3325
3461
|
}
|
|
3326
|
-
return /* @__PURE__ */
|
|
3327
|
-
/* @__PURE__ */
|
|
3328
|
-
/* @__PURE__ */
|
|
3329
|
-
/* @__PURE__ */
|
|
3462
|
+
return /* @__PURE__ */ jsxs25("div", { className: "bg-card border border-border rounded-xl p-8 space-y-6", children: [
|
|
3463
|
+
/* @__PURE__ */ jsxs25("div", { className: "text-center", children: [
|
|
3464
|
+
/* @__PURE__ */ jsx41("h1", { className: "text-2xl font-bold text-[var(--timberwolf)] mb-2", children: title }),
|
|
3465
|
+
/* @__PURE__ */ jsx41("p", { className: "text-sm text-muted-foreground", children: subtitle })
|
|
3330
3466
|
] }),
|
|
3331
|
-
/* @__PURE__ */
|
|
3332
|
-
error && /* @__PURE__ */
|
|
3467
|
+
/* @__PURE__ */ jsxs25("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
3468
|
+
error && /* @__PURE__ */ jsx41(
|
|
3333
3469
|
"div",
|
|
3334
3470
|
{
|
|
3335
3471
|
id: "forgot-error",
|
|
3336
3472
|
role: "alert",
|
|
3337
3473
|
"aria-live": "polite",
|
|
3338
3474
|
className: "bg-red-900/20 border border-red-700/30 rounded-lg p-3",
|
|
3339
|
-
children: /* @__PURE__ */
|
|
3340
|
-
/* @__PURE__ */
|
|
3341
|
-
/* @__PURE__ */
|
|
3475
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 text-red-400 text-sm", children: [
|
|
3476
|
+
/* @__PURE__ */ jsx41(AlertCircle2, { className: "h-4 w-4 flex-shrink-0" }),
|
|
3477
|
+
/* @__PURE__ */ jsx41("span", { children: error })
|
|
3342
3478
|
] })
|
|
3343
3479
|
}
|
|
3344
3480
|
),
|
|
3345
|
-
/* @__PURE__ */
|
|
3346
|
-
/* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3348
|
-
/* @__PURE__ */
|
|
3481
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
3482
|
+
/* @__PURE__ */ jsx41(Label, { htmlFor: "email", className: "text-[var(--timberwolf)]", children: "Email" }),
|
|
3483
|
+
/* @__PURE__ */ jsxs25("div", { className: "relative", children: [
|
|
3484
|
+
/* @__PURE__ */ jsx41(
|
|
3349
3485
|
Input,
|
|
3350
3486
|
{
|
|
3351
3487
|
id: "email",
|
|
@@ -3361,29 +3497,29 @@ function ForgotPasswordForm({
|
|
|
3361
3497
|
"aria-describedby": error ? "forgot-error" : void 0
|
|
3362
3498
|
}
|
|
3363
3499
|
),
|
|
3364
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ jsx41(Mail2, { className: "h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" })
|
|
3365
3501
|
] })
|
|
3366
3502
|
] }),
|
|
3367
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ jsx41(
|
|
3368
3504
|
Button,
|
|
3369
3505
|
{
|
|
3370
3506
|
type: "submit",
|
|
3371
3507
|
className: "w-full h-11 bg-[var(--timberwolf)] text-[var(--night)] hover:bg-[var(--ash-grey)]",
|
|
3372
3508
|
disabled: loading || cooldownSecondsLeft > 0,
|
|
3373
|
-
children: loading ? /* @__PURE__ */
|
|
3374
|
-
/* @__PURE__ */
|
|
3509
|
+
children: loading ? /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
3510
|
+
/* @__PURE__ */ jsx41(Loader22, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
3375
3511
|
"Sending email..."
|
|
3376
3512
|
] }) : cooldownSecondsLeft > 0 ? `Try again in ${cooldownSecondsLeft}s` : "Send reset link"
|
|
3377
3513
|
}
|
|
3378
3514
|
)
|
|
3379
3515
|
] }),
|
|
3380
|
-
/* @__PURE__ */
|
|
3516
|
+
/* @__PURE__ */ jsx41("div", { className: "text-center text-sm", children: /* @__PURE__ */ jsxs25(
|
|
3381
3517
|
Link5,
|
|
3382
3518
|
{
|
|
3383
3519
|
href: loginHref,
|
|
3384
3520
|
className: "inline-flex items-center gap-1.5 text-muted-foreground hover:text-[var(--timberwolf)] transition-colors",
|
|
3385
3521
|
children: [
|
|
3386
|
-
/* @__PURE__ */
|
|
3522
|
+
/* @__PURE__ */ jsx41(ArrowLeft, { className: "h-3.5 w-3.5" }),
|
|
3387
3523
|
"Back to sign in"
|
|
3388
3524
|
]
|
|
3389
3525
|
}
|
|
@@ -3392,7 +3528,7 @@ function ForgotPasswordForm({
|
|
|
3392
3528
|
}
|
|
3393
3529
|
|
|
3394
3530
|
// src/ui/reset-password-form.tsx
|
|
3395
|
-
import * as
|
|
3531
|
+
import * as React31 from "react";
|
|
3396
3532
|
import Link6 from "next/link";
|
|
3397
3533
|
import { useRouter } from "next/navigation";
|
|
3398
3534
|
import {
|
|
@@ -3403,7 +3539,7 @@ import {
|
|
|
3403
3539
|
Loader2 as Loader23,
|
|
3404
3540
|
Lock as Lock2
|
|
3405
3541
|
} from "lucide-react";
|
|
3406
|
-
import { Fragment as Fragment8, jsx as
|
|
3542
|
+
import { Fragment as Fragment8, jsx as jsx42, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3407
3543
|
function ResetPasswordForm({
|
|
3408
3544
|
loginHref = "/auth/login",
|
|
3409
3545
|
initialError,
|
|
@@ -3411,19 +3547,19 @@ function ResetPasswordForm({
|
|
|
3411
3547
|
title = "Reset password",
|
|
3412
3548
|
subtitle = "Enter a new password for your account."
|
|
3413
3549
|
}) {
|
|
3414
|
-
const [password, setPassword] =
|
|
3415
|
-
const [confirmPassword, setConfirmPassword] =
|
|
3416
|
-
const [showPassword, setShowPassword] =
|
|
3417
|
-
const [showConfirmPassword, setShowConfirmPassword] =
|
|
3418
|
-
const [error, setError] =
|
|
3419
|
-
const [loading, setLoading] =
|
|
3420
|
-
const [passwordReset, setPasswordReset] =
|
|
3550
|
+
const [password, setPassword] = React31.useState("");
|
|
3551
|
+
const [confirmPassword, setConfirmPassword] = React31.useState("");
|
|
3552
|
+
const [showPassword, setShowPassword] = React31.useState(false);
|
|
3553
|
+
const [showConfirmPassword, setShowConfirmPassword] = React31.useState(false);
|
|
3554
|
+
const [error, setError] = React31.useState(initialError ?? "");
|
|
3555
|
+
const [loading, setLoading] = React31.useState(false);
|
|
3556
|
+
const [passwordReset, setPasswordReset] = React31.useState(false);
|
|
3421
3557
|
const router = useRouter();
|
|
3422
|
-
const [supabase] =
|
|
3423
|
-
|
|
3558
|
+
const [supabase] = React31.useState(() => createClient());
|
|
3559
|
+
React31.useEffect(() => {
|
|
3424
3560
|
if (initialError) setError(initialError);
|
|
3425
3561
|
}, [initialError]);
|
|
3426
|
-
|
|
3562
|
+
React31.useEffect(() => {
|
|
3427
3563
|
if (!passwordReset) return;
|
|
3428
3564
|
const id = setTimeout(() => {
|
|
3429
3565
|
router.push(loginHref);
|
|
@@ -3471,38 +3607,38 @@ function ResetPasswordForm({
|
|
|
3471
3607
|
}
|
|
3472
3608
|
};
|
|
3473
3609
|
if (passwordReset) {
|
|
3474
|
-
return /* @__PURE__ */
|
|
3475
|
-
/* @__PURE__ */
|
|
3476
|
-
/* @__PURE__ */
|
|
3477
|
-
/* @__PURE__ */
|
|
3478
|
-
/* @__PURE__ */
|
|
3610
|
+
return /* @__PURE__ */ jsxs26("div", { className: "bg-card border border-border rounded-xl p-8 space-y-6 text-center", children: [
|
|
3611
|
+
/* @__PURE__ */ jsx42("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx42("div", { className: "h-12 w-12 rounded-full bg-[var(--timberwolf)]/10 border border-[var(--timberwolf)]/20 flex items-center justify-center", children: /* @__PURE__ */ jsx42(CheckCircle2, { className: "h-6 w-6 text-[var(--timberwolf)]" }) }) }),
|
|
3612
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
|
|
3613
|
+
/* @__PURE__ */ jsx42("h1", { className: "text-2xl font-bold text-[var(--timberwolf)]", children: "Password updated" }),
|
|
3614
|
+
/* @__PURE__ */ jsx42("p", { className: "text-sm text-muted-foreground", children: "Redirecting you to sign in\u2026" })
|
|
3479
3615
|
] }),
|
|
3480
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ jsx42(Link6, { href: loginHref, className: "block pt-2", children: /* @__PURE__ */ jsx42(Button, { className: "w-full h-11 bg-[var(--timberwolf)] text-[var(--night)] hover:bg-[var(--ash-grey)]", children: "Continue to sign in" }) })
|
|
3481
3617
|
] });
|
|
3482
3618
|
}
|
|
3483
|
-
return /* @__PURE__ */
|
|
3484
|
-
/* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3486
|
-
/* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ jsxs26("div", { className: "bg-card border border-border rounded-xl p-8 space-y-6", children: [
|
|
3620
|
+
/* @__PURE__ */ jsxs26("div", { className: "text-center", children: [
|
|
3621
|
+
/* @__PURE__ */ jsx42("h1", { className: "text-2xl font-bold text-[var(--timberwolf)] mb-2", children: title }),
|
|
3622
|
+
/* @__PURE__ */ jsx42("p", { className: "text-sm text-muted-foreground", children: subtitle })
|
|
3487
3623
|
] }),
|
|
3488
|
-
/* @__PURE__ */
|
|
3489
|
-
error && /* @__PURE__ */
|
|
3624
|
+
/* @__PURE__ */ jsxs26("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
3625
|
+
error && /* @__PURE__ */ jsx42(
|
|
3490
3626
|
"div",
|
|
3491
3627
|
{
|
|
3492
3628
|
id: "reset-error",
|
|
3493
3629
|
role: "alert",
|
|
3494
3630
|
"aria-live": "polite",
|
|
3495
3631
|
className: "bg-red-900/20 border border-red-700/30 rounded-lg p-3",
|
|
3496
|
-
children: /* @__PURE__ */
|
|
3497
|
-
/* @__PURE__ */
|
|
3498
|
-
/* @__PURE__ */
|
|
3632
|
+
children: /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-red-400 text-sm", children: [
|
|
3633
|
+
/* @__PURE__ */ jsx42(AlertCircle3, { className: "h-4 w-4 flex-shrink-0" }),
|
|
3634
|
+
/* @__PURE__ */ jsx42("span", { children: error })
|
|
3499
3635
|
] })
|
|
3500
3636
|
}
|
|
3501
3637
|
),
|
|
3502
|
-
/* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
3504
|
-
/* @__PURE__ */
|
|
3505
|
-
/* @__PURE__ */
|
|
3638
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
|
|
3639
|
+
/* @__PURE__ */ jsx42(Label, { htmlFor: "password", className: "text-[var(--timberwolf)]", children: "New password" }),
|
|
3640
|
+
/* @__PURE__ */ jsxs26("div", { className: "relative", children: [
|
|
3641
|
+
/* @__PURE__ */ jsx42(
|
|
3506
3642
|
Input,
|
|
3507
3643
|
{
|
|
3508
3644
|
id: "password",
|
|
@@ -3518,8 +3654,8 @@ function ResetPasswordForm({
|
|
|
3518
3654
|
"aria-describedby": error ? "reset-error" : void 0
|
|
3519
3655
|
}
|
|
3520
3656
|
),
|
|
3521
|
-
/* @__PURE__ */
|
|
3522
|
-
/* @__PURE__ */
|
|
3657
|
+
/* @__PURE__ */ jsx42(Lock2, { className: "h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" }),
|
|
3658
|
+
/* @__PURE__ */ jsx42(
|
|
3523
3659
|
"button",
|
|
3524
3660
|
{
|
|
3525
3661
|
type: "button",
|
|
@@ -3528,13 +3664,13 @@ function ResetPasswordForm({
|
|
|
3528
3664
|
disabled: loading,
|
|
3529
3665
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
3530
3666
|
"aria-pressed": showPassword,
|
|
3531
|
-
children: showPassword ? /* @__PURE__ */
|
|
3667
|
+
children: showPassword ? /* @__PURE__ */ jsx42(EyeOff2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx42(Eye2, { className: "h-4 w-4" })
|
|
3532
3668
|
}
|
|
3533
3669
|
)
|
|
3534
3670
|
] })
|
|
3535
3671
|
] }),
|
|
3536
|
-
/* @__PURE__ */
|
|
3537
|
-
/* @__PURE__ */
|
|
3672
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-2", children: [
|
|
3673
|
+
/* @__PURE__ */ jsx42(
|
|
3538
3674
|
Label,
|
|
3539
3675
|
{
|
|
3540
3676
|
htmlFor: "confirmPassword",
|
|
@@ -3542,8 +3678,8 @@ function ResetPasswordForm({
|
|
|
3542
3678
|
children: "Confirm new password"
|
|
3543
3679
|
}
|
|
3544
3680
|
),
|
|
3545
|
-
/* @__PURE__ */
|
|
3546
|
-
/* @__PURE__ */
|
|
3681
|
+
/* @__PURE__ */ jsxs26("div", { className: "relative", children: [
|
|
3682
|
+
/* @__PURE__ */ jsx42(
|
|
3547
3683
|
Input,
|
|
3548
3684
|
{
|
|
3549
3685
|
id: "confirmPassword",
|
|
@@ -3558,8 +3694,8 @@ function ResetPasswordForm({
|
|
|
3558
3694
|
"aria-describedby": error ? "reset-error" : void 0
|
|
3559
3695
|
}
|
|
3560
3696
|
),
|
|
3561
|
-
/* @__PURE__ */
|
|
3562
|
-
/* @__PURE__ */
|
|
3697
|
+
/* @__PURE__ */ jsx42(Lock2, { className: "h-4 w-4 absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground" }),
|
|
3698
|
+
/* @__PURE__ */ jsx42(
|
|
3563
3699
|
"button",
|
|
3564
3700
|
{
|
|
3565
3701
|
type: "button",
|
|
@@ -3568,26 +3704,26 @@ function ResetPasswordForm({
|
|
|
3568
3704
|
disabled: loading,
|
|
3569
3705
|
"aria-label": showConfirmPassword ? "Hide password" : "Show password",
|
|
3570
3706
|
"aria-pressed": showConfirmPassword,
|
|
3571
|
-
children: showConfirmPassword ? /* @__PURE__ */
|
|
3707
|
+
children: showConfirmPassword ? /* @__PURE__ */ jsx42(EyeOff2, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx42(Eye2, { className: "h-4 w-4" })
|
|
3572
3708
|
}
|
|
3573
3709
|
)
|
|
3574
3710
|
] })
|
|
3575
3711
|
] }),
|
|
3576
|
-
/* @__PURE__ */
|
|
3577
|
-
/* @__PURE__ */
|
|
3712
|
+
/* @__PURE__ */ jsx42("p", { className: "text-xs text-muted-foreground", children: "At least 8 characters with an uppercase letter, a lowercase letter, and a number." }),
|
|
3713
|
+
/* @__PURE__ */ jsx42(
|
|
3578
3714
|
Button,
|
|
3579
3715
|
{
|
|
3580
3716
|
type: "submit",
|
|
3581
3717
|
className: "w-full h-11 bg-[var(--timberwolf)] text-[var(--night)] hover:bg-[var(--ash-grey)]",
|
|
3582
3718
|
disabled: loading,
|
|
3583
|
-
children: loading ? /* @__PURE__ */
|
|
3584
|
-
/* @__PURE__ */
|
|
3719
|
+
children: loading ? /* @__PURE__ */ jsxs26(Fragment8, { children: [
|
|
3720
|
+
/* @__PURE__ */ jsx42(Loader23, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
3585
3721
|
"Updating password..."
|
|
3586
3722
|
] }) : "Update password"
|
|
3587
3723
|
}
|
|
3588
3724
|
)
|
|
3589
3725
|
] }),
|
|
3590
|
-
/* @__PURE__ */
|
|
3726
|
+
/* @__PURE__ */ jsx42("div", { className: "text-center text-sm", children: /* @__PURE__ */ jsx42(
|
|
3591
3727
|
Link6,
|
|
3592
3728
|
{
|
|
3593
3729
|
href: loginHref,
|
|
@@ -3650,6 +3786,7 @@ export {
|
|
|
3650
3786
|
Input,
|
|
3651
3787
|
Label,
|
|
3652
3788
|
LumaSpin,
|
|
3789
|
+
MultiSelect,
|
|
3653
3790
|
NewsletterForm2 as NewsletterForm,
|
|
3654
3791
|
PageShell,
|
|
3655
3792
|
Popover,
|