@orangecheck/app-design 0.5.11 → 0.5.13
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/brand.js +24 -37
- package/dist/brand.js.map +1 -1
- package/dist/brand.mjs +24 -37
- package/dist/brand.mjs.map +1 -1
- package/dist/chrome.d.mts +2 -1
- package/dist/chrome.d.ts +2 -1
- package/dist/chrome.js +64 -80
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +64 -80
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.js +4 -21
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +4 -21
- package/dist/components.mjs.map +1 -1
- package/dist/index.js +92 -138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +92 -138
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.js +3 -13
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +3 -13
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -673,13 +673,7 @@ var DropdownMenuLabel = forwardRef(function DropdownMenuLabel2({ className, ...p
|
|
|
673
673
|
var DropdownMenuSeparator = forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
|
|
674
674
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, { ref, className: cn("my-1.5 h-px bg-border", className), ...props });
|
|
675
675
|
});
|
|
676
|
-
function ScrollFade({
|
|
677
|
-
fade = "var(--card)",
|
|
678
|
-
className,
|
|
679
|
-
innerClassName,
|
|
680
|
-
children,
|
|
681
|
-
...props
|
|
682
|
-
}) {
|
|
676
|
+
function ScrollFade({ fade = "var(--card)", className, innerClassName, children, ...props }) {
|
|
683
677
|
const ref = useRef(null);
|
|
684
678
|
const [edges, setEdges] = useState({ left: false, right: false });
|
|
685
679
|
const measure = useCallback(() => {
|
|
@@ -687,9 +681,7 @@ function ScrollFade({
|
|
|
687
681
|
if (!el) return;
|
|
688
682
|
const left = el.scrollLeft > 1;
|
|
689
683
|
const right = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
690
|
-
setEdges(
|
|
691
|
-
(e) => e.left === left && e.right === right ? e : { left, right }
|
|
692
|
-
);
|
|
684
|
+
setEdges((e) => e.left === left && e.right === right ? e : { left, right });
|
|
693
685
|
}, []);
|
|
694
686
|
useEffect(() => {
|
|
695
687
|
const el = ref.current;
|
|
@@ -723,9 +715,7 @@ function ScrollFade({
|
|
|
723
715
|
"pointer-events-none absolute inset-y-0 left-0 w-8 transition-opacity duration-150",
|
|
724
716
|
edges.left ? "opacity-100" : "opacity-0"
|
|
725
717
|
),
|
|
726
|
-
style: {
|
|
727
|
-
background: `linear-gradient(to right, ${fade}, transparent)`
|
|
728
|
-
}
|
|
718
|
+
style: { background: `linear-gradient(to right, ${fade}, transparent)` }
|
|
729
719
|
}
|
|
730
720
|
),
|
|
731
721
|
/* @__PURE__ */ jsx(
|
|
@@ -980,8 +970,7 @@ function HalftoneCanvas({
|
|
|
980
970
|
raf = busy && visible && !document.hidden ? requestAnimationFrame(frame) : 0;
|
|
981
971
|
}
|
|
982
972
|
const kick = () => {
|
|
983
|
-
if (!raf && visible && !document.hidden)
|
|
984
|
-
raf = requestAnimationFrame(frame);
|
|
973
|
+
if (!raf && visible && !document.hidden) raf = requestAnimationFrame(frame);
|
|
985
974
|
};
|
|
986
975
|
layout();
|
|
987
976
|
setLive(true);
|
|
@@ -1023,41 +1012,29 @@ function HalftoneCanvas({
|
|
|
1023
1012
|
el.removeEventListener("pointerleave", leave);
|
|
1024
1013
|
};
|
|
1025
1014
|
}, [tone, density, lens, intro, breathe, ink]);
|
|
1026
|
-
return /* @__PURE__ */ jsxs(
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
) : null,
|
|
1050
|
-
/* @__PURE__ */ jsx(
|
|
1051
|
-
"canvas",
|
|
1052
|
-
{
|
|
1053
|
-
ref: canvas,
|
|
1054
|
-
...alt ? { role: "img", "aria-label": alt } : { "aria-hidden": true },
|
|
1055
|
-
className: "absolute inset-0 size-full"
|
|
1056
|
-
}
|
|
1057
|
-
)
|
|
1058
|
-
]
|
|
1059
|
-
}
|
|
1060
|
-
);
|
|
1015
|
+
return /* @__PURE__ */ jsxs("div", { ref: wrap, className: cn("relative aspect-square w-full", className), style, "data-live": live || void 0, children: [
|
|
1016
|
+
fallbackSrc ? (
|
|
1017
|
+
// eslint-disable-next-line @next/next/no-img-element -- the still screen, until the live one draws
|
|
1018
|
+
/* @__PURE__ */ jsx(
|
|
1019
|
+
"img",
|
|
1020
|
+
{
|
|
1021
|
+
src: fallbackSrc,
|
|
1022
|
+
alt: "",
|
|
1023
|
+
"aria-hidden": true,
|
|
1024
|
+
className: cn("absolute inset-0 size-full select-none transition-opacity duration-300", live && "opacity-0"),
|
|
1025
|
+
draggable: false
|
|
1026
|
+
}
|
|
1027
|
+
)
|
|
1028
|
+
) : null,
|
|
1029
|
+
/* @__PURE__ */ jsx(
|
|
1030
|
+
"canvas",
|
|
1031
|
+
{
|
|
1032
|
+
ref: canvas,
|
|
1033
|
+
...alt ? { role: "img", "aria-label": alt } : { "aria-hidden": true },
|
|
1034
|
+
className: "absolute inset-0 size-full"
|
|
1035
|
+
}
|
|
1036
|
+
)
|
|
1037
|
+
] });
|
|
1061
1038
|
}
|
|
1062
1039
|
var SPHERE_GRADIENT = "radial-gradient(86% 86% at 36% 32%, #fff7f0 0%, #ffdec8 14%, #ffa069 34%, #ff7030 56%, #f65210 78%, #de4006 100%)";
|
|
1063
1040
|
var SPHERE_DEPTH = "inset -14px -22px 44px rgb(150 40 0 / 0.16), 0 36px 70px -34px rgb(234 88 11 / 0.45)";
|
|
@@ -2429,25 +2406,14 @@ var ErrorBoundary = class extends Component {
|
|
|
2429
2406
|
title: "Something on this page broke.",
|
|
2430
2407
|
action: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2431
2408
|
/* @__PURE__ */ jsx(Button, { onClick: this.reset, children: "Try again" }),
|
|
2432
|
-
/* @__PURE__ */ jsx(
|
|
2433
|
-
Button,
|
|
2434
|
-
{
|
|
2435
|
-
variant: "secondary",
|
|
2436
|
-
onClick: () => window.location.reload(),
|
|
2437
|
-
children: "Reload the page"
|
|
2438
|
-
}
|
|
2439
|
-
)
|
|
2409
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: () => window.location.reload(), children: "Reload the page" })
|
|
2440
2410
|
] }),
|
|
2441
2411
|
children: "Nothing you saved is affected. If it keeps happening, tell us at hello@ochk.io."
|
|
2442
2412
|
}
|
|
2443
2413
|
) });
|
|
2444
2414
|
}
|
|
2445
2415
|
};
|
|
2446
|
-
function NavLink({
|
|
2447
|
-
item,
|
|
2448
|
-
className,
|
|
2449
|
-
onNavigate
|
|
2450
|
-
}) {
|
|
2416
|
+
function NavLink({ item, className, onNavigate }) {
|
|
2451
2417
|
const cls = cn(
|
|
2452
2418
|
"rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
|
|
2453
2419
|
item.active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
|
|
@@ -2456,16 +2422,7 @@ function NavLink({
|
|
|
2456
2422
|
if (item.external) {
|
|
2457
2423
|
return /* @__PURE__ */ jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: item.label });
|
|
2458
2424
|
}
|
|
2459
|
-
return /* @__PURE__ */ jsx(
|
|
2460
|
-
Link2,
|
|
2461
|
-
{
|
|
2462
|
-
href: item.href,
|
|
2463
|
-
className: cls,
|
|
2464
|
-
"aria-current": item.active ? "page" : void 0,
|
|
2465
|
-
onClick: onNavigate,
|
|
2466
|
-
children: item.label
|
|
2467
|
-
}
|
|
2468
|
-
);
|
|
2425
|
+
return /* @__PURE__ */ jsx(Link2, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
|
|
2469
2426
|
}
|
|
2470
2427
|
function SiteHeader({
|
|
2471
2428
|
home = "/",
|
|
@@ -2482,38 +2439,50 @@ function SiteHeader({
|
|
|
2482
2439
|
"sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70",
|
|
2483
2440
|
className
|
|
2484
2441
|
),
|
|
2485
|
-
children: /* @__PURE__ */ jsxs(
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
/* @__PURE__ */
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2442
|
+
children: /* @__PURE__ */ jsxs(
|
|
2443
|
+
"div",
|
|
2444
|
+
{
|
|
2445
|
+
className: cn(
|
|
2446
|
+
"oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]",
|
|
2447
|
+
// Three columns, the outer two each at least their content: the
|
|
2448
|
+
// navigation stays centred whatever the actions hold, so it does
|
|
2449
|
+
// not shift when they change (signed out to signed in).
|
|
2450
|
+
nav.length > 0 && "md:grid md:grid-cols-[minmax(max-content,1fr)_auto_minmax(max-content,1fr)]"
|
|
2451
|
+
),
|
|
2452
|
+
children: [
|
|
2453
|
+
/* @__PURE__ */ jsxs(Link2, { href: home, className: "-ml-1 justify-self-start rounded-lg p-1", children: [
|
|
2454
|
+
brand ?? /* @__PURE__ */ jsx(Lockup, { size: 28 }),
|
|
2455
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: " home" })
|
|
2456
|
+
] }),
|
|
2457
|
+
nav.length > 0 ? /* @__PURE__ */ jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map((n) => /* @__PURE__ */ jsx(NavLink, { item: n }, n.href)) }) : null,
|
|
2458
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 justify-self-end", children: [
|
|
2459
|
+
actions,
|
|
2460
|
+
nav.length > 0 ? /* @__PURE__ */ jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
2461
|
+
/* @__PURE__ */ jsx(
|
|
2462
|
+
SheetTrigger,
|
|
2463
|
+
{
|
|
2464
|
+
className: "inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden",
|
|
2465
|
+
"aria-label": "Open menu",
|
|
2466
|
+
children: /* @__PURE__ */ jsx(Menu, { className: "size-5" })
|
|
2467
|
+
}
|
|
2468
|
+
),
|
|
2469
|
+
/* @__PURE__ */ jsxs(SheetContent, { side: "right", className: "pt-16", children: [
|
|
2470
|
+
/* @__PURE__ */ jsx(SheetTitle, { className: "sr-only", children: "Menu" }),
|
|
2471
|
+
/* @__PURE__ */ jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: nav.map((n) => /* @__PURE__ */ jsx(
|
|
2472
|
+
NavLink,
|
|
2473
|
+
{
|
|
2474
|
+
item: n,
|
|
2475
|
+
className: "rounded-xl px-3 py-3 text-[1.0625rem]",
|
|
2476
|
+
onNavigate: () => setOpen(false)
|
|
2477
|
+
},
|
|
2478
|
+
n.href
|
|
2479
|
+
)) })
|
|
2480
|
+
] })
|
|
2481
|
+
] }) : null
|
|
2513
2482
|
] })
|
|
2514
|
-
]
|
|
2515
|
-
|
|
2516
|
-
|
|
2483
|
+
]
|
|
2484
|
+
}
|
|
2485
|
+
)
|
|
2517
2486
|
}
|
|
2518
2487
|
);
|
|
2519
2488
|
}
|
|
@@ -2535,46 +2504,27 @@ function SiteFooter({
|
|
|
2535
2504
|
return /* @__PURE__ */ jsxs(
|
|
2536
2505
|
"div",
|
|
2537
2506
|
{
|
|
2538
|
-
className: cn(
|
|
2539
|
-
"flex min-w-0 flex-col gap-1",
|
|
2540
|
-
spans && "col-span-2 md:col-span-1"
|
|
2541
|
-
),
|
|
2507
|
+
className: cn("flex min-w-0 flex-col gap-1", spans && "col-span-2 md:col-span-1"),
|
|
2542
2508
|
children: [
|
|
2543
2509
|
/* @__PURE__ */ jsx("p", { className: "mb-2 text-[0.875rem] font-medium", children: col.heading }),
|
|
2544
|
-
/* @__PURE__ */ jsx(
|
|
2545
|
-
|
|
2510
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1", spans && "grid grid-cols-2 gap-x-6 md:flex md:flex-col"), children: col.links.map((l) => /* @__PURE__ */ jsx(
|
|
2511
|
+
NavLink,
|
|
2546
2512
|
{
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
NavLink,
|
|
2553
|
-
{
|
|
2554
|
-
item: l,
|
|
2555
|
-
className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
|
|
2556
|
-
},
|
|
2557
|
-
l.href
|
|
2558
|
-
))
|
|
2559
|
-
}
|
|
2560
|
-
)
|
|
2513
|
+
item: l,
|
|
2514
|
+
className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
|
|
2515
|
+
},
|
|
2516
|
+
l.href
|
|
2517
|
+
)) })
|
|
2561
2518
|
]
|
|
2562
2519
|
},
|
|
2563
2520
|
col.heading
|
|
2564
2521
|
);
|
|
2565
2522
|
})
|
|
2566
2523
|
] }),
|
|
2567
|
-
signature ? /* @__PURE__ */ jsx(
|
|
2568
|
-
"
|
|
2569
|
-
{
|
|
2570
|
-
|
|
2571
|
-
className: "oca-container select-none overflow-hidden pb-8 md:pb-12",
|
|
2572
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-[0.18em] text-[clamp(3rem,11.5vw,10rem)] leading-[0.78] tracking-[-0.065em] [font-family:var(--oc-font-display)]", children: [
|
|
2573
|
-
/* @__PURE__ */ jsx("span", { className: "mb-[0.06em] inline-block w-[1.1em] shrink-0", children: /* @__PURE__ */ jsx(Mark, { className: "block h-auto w-full" }) }),
|
|
2574
|
-
/* @__PURE__ */ jsx("span", { children: "orangecheck" })
|
|
2575
|
-
] })
|
|
2576
|
-
}
|
|
2577
|
-
) : null,
|
|
2524
|
+
signature ? /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "oca-container select-none overflow-hidden pb-8 md:pb-12", children: /* @__PURE__ */ jsxs("div", { className: "flex items-end gap-[0.18em] text-[clamp(3rem,11.5vw,10rem)] leading-[0.78] tracking-[-0.065em] [font-family:var(--oc-font-display)]", children: [
|
|
2525
|
+
/* @__PURE__ */ jsx("span", { className: "mb-[0.06em] inline-block w-[1.1em] shrink-0", children: /* @__PURE__ */ jsx(Mark, { className: "block h-auto w-full" }) }),
|
|
2526
|
+
/* @__PURE__ */ jsx("span", { children: "orangecheck" })
|
|
2527
|
+
] }) }) : null,
|
|
2578
2528
|
meta ? /* @__PURE__ */ jsx("div", { className: "oca-container", children: /* @__PURE__ */ jsx("div", { className: "border-t border-border py-6 text-[0.875rem] text-muted-foreground", children: meta }) }) : null
|
|
2579
2529
|
] });
|
|
2580
2530
|
}
|
|
@@ -2721,18 +2671,22 @@ function AppShell({
|
|
|
2721
2671
|
function AccountMenu({
|
|
2722
2672
|
name,
|
|
2723
2673
|
detail,
|
|
2724
|
-
items
|
|
2674
|
+
items,
|
|
2675
|
+
nameFrom = "sm"
|
|
2725
2676
|
}) {
|
|
2726
2677
|
const initial = name.trim().charAt(0).toUpperCase() || "\xB7";
|
|
2727
2678
|
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
2728
2679
|
/* @__PURE__ */ jsxs(
|
|
2729
2680
|
DropdownMenuTrigger,
|
|
2730
2681
|
{
|
|
2731
|
-
className:
|
|
2682
|
+
className: cn(
|
|
2683
|
+
"inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-1 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring",
|
|
2684
|
+
nameFrom === "lg" ? "lg:pr-3.5" : "sm:pr-3.5"
|
|
2685
|
+
),
|
|
2732
2686
|
"aria-label": `Account: ${name}`,
|
|
2733
2687
|
children: [
|
|
2734
2688
|
/* @__PURE__ */ jsx("span", { className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background", children: initial }),
|
|
2735
|
-
/* @__PURE__ */ jsx("span", { className: "max-w-[10rem] truncate max-sm:hidden", children: name })
|
|
2689
|
+
/* @__PURE__ */ jsx("span", { className: cn("max-w-[10rem] truncate", nameFrom === "lg" ? "max-lg:hidden" : "max-sm:hidden"), children: name })
|
|
2736
2690
|
]
|
|
2737
2691
|
}
|
|
2738
2692
|
),
|