@orangecheck/app-design 0.5.11 → 0.5.12
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.js +57 -77
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +57 -77
- 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 +85 -135
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -135
- 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.js
CHANGED
|
@@ -707,13 +707,7 @@ var DropdownMenuLabel = react.forwardRef(function DropdownMenuLabel2({ className
|
|
|
707
707
|
var DropdownMenuSeparator = react.forwardRef(function DropdownMenuSeparator2({ className, ...props }, ref) {
|
|
708
708
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Separator, { ref, className: cn("my-1.5 h-px bg-border", className), ...props });
|
|
709
709
|
});
|
|
710
|
-
function ScrollFade({
|
|
711
|
-
fade = "var(--card)",
|
|
712
|
-
className,
|
|
713
|
-
innerClassName,
|
|
714
|
-
children,
|
|
715
|
-
...props
|
|
716
|
-
}) {
|
|
710
|
+
function ScrollFade({ fade = "var(--card)", className, innerClassName, children, ...props }) {
|
|
717
711
|
const ref = react.useRef(null);
|
|
718
712
|
const [edges, setEdges] = react.useState({ left: false, right: false });
|
|
719
713
|
const measure = react.useCallback(() => {
|
|
@@ -721,9 +715,7 @@ function ScrollFade({
|
|
|
721
715
|
if (!el) return;
|
|
722
716
|
const left = el.scrollLeft > 1;
|
|
723
717
|
const right = el.scrollLeft + el.clientWidth < el.scrollWidth - 1;
|
|
724
|
-
setEdges(
|
|
725
|
-
(e) => e.left === left && e.right === right ? e : { left, right }
|
|
726
|
-
);
|
|
718
|
+
setEdges((e) => e.left === left && e.right === right ? e : { left, right });
|
|
727
719
|
}, []);
|
|
728
720
|
react.useEffect(() => {
|
|
729
721
|
const el = ref.current;
|
|
@@ -757,9 +749,7 @@ function ScrollFade({
|
|
|
757
749
|
"pointer-events-none absolute inset-y-0 left-0 w-8 transition-opacity duration-150",
|
|
758
750
|
edges.left ? "opacity-100" : "opacity-0"
|
|
759
751
|
),
|
|
760
|
-
style: {
|
|
761
|
-
background: `linear-gradient(to right, ${fade}, transparent)`
|
|
762
|
-
}
|
|
752
|
+
style: { background: `linear-gradient(to right, ${fade}, transparent)` }
|
|
763
753
|
}
|
|
764
754
|
),
|
|
765
755
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1014,8 +1004,7 @@ function HalftoneCanvas({
|
|
|
1014
1004
|
raf = busy && visible && !document.hidden ? requestAnimationFrame(frame) : 0;
|
|
1015
1005
|
}
|
|
1016
1006
|
const kick = () => {
|
|
1017
|
-
if (!raf && visible && !document.hidden)
|
|
1018
|
-
raf = requestAnimationFrame(frame);
|
|
1007
|
+
if (!raf && visible && !document.hidden) raf = requestAnimationFrame(frame);
|
|
1019
1008
|
};
|
|
1020
1009
|
layout();
|
|
1021
1010
|
setLive(true);
|
|
@@ -1057,41 +1046,29 @@ function HalftoneCanvas({
|
|
|
1057
1046
|
el.removeEventListener("pointerleave", leave);
|
|
1058
1047
|
};
|
|
1059
1048
|
}, [tone, density, lens, intro, breathe, ink]);
|
|
1060
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
) : null,
|
|
1084
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1085
|
-
"canvas",
|
|
1086
|
-
{
|
|
1087
|
-
ref: canvas,
|
|
1088
|
-
...alt ? { role: "img", "aria-label": alt } : { "aria-hidden": true },
|
|
1089
|
-
className: "absolute inset-0 size-full"
|
|
1090
|
-
}
|
|
1091
|
-
)
|
|
1092
|
-
]
|
|
1093
|
-
}
|
|
1094
|
-
);
|
|
1049
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: wrap, className: cn("relative aspect-square w-full", className), style, "data-live": live || void 0, children: [
|
|
1050
|
+
fallbackSrc ? (
|
|
1051
|
+
// eslint-disable-next-line @next/next/no-img-element -- the still screen, until the live one draws
|
|
1052
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1053
|
+
"img",
|
|
1054
|
+
{
|
|
1055
|
+
src: fallbackSrc,
|
|
1056
|
+
alt: "",
|
|
1057
|
+
"aria-hidden": true,
|
|
1058
|
+
className: cn("absolute inset-0 size-full select-none transition-opacity duration-300", live && "opacity-0"),
|
|
1059
|
+
draggable: false
|
|
1060
|
+
}
|
|
1061
|
+
)
|
|
1062
|
+
) : null,
|
|
1063
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1064
|
+
"canvas",
|
|
1065
|
+
{
|
|
1066
|
+
ref: canvas,
|
|
1067
|
+
...alt ? { role: "img", "aria-label": alt } : { "aria-hidden": true },
|
|
1068
|
+
className: "absolute inset-0 size-full"
|
|
1069
|
+
}
|
|
1070
|
+
)
|
|
1071
|
+
] });
|
|
1095
1072
|
}
|
|
1096
1073
|
var SPHERE_GRADIENT = "radial-gradient(86% 86% at 36% 32%, #fff7f0 0%, #ffdec8 14%, #ffa069 34%, #ff7030 56%, #f65210 78%, #de4006 100%)";
|
|
1097
1074
|
var SPHERE_DEPTH = "inset -14px -22px 44px rgb(150 40 0 / 0.16), 0 36px 70px -34px rgb(234 88 11 / 0.45)";
|
|
@@ -2463,25 +2440,14 @@ var ErrorBoundary = class extends react.Component {
|
|
|
2463
2440
|
title: "Something on this page broke.",
|
|
2464
2441
|
action: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2465
2442
|
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: this.reset, children: "Try again" }),
|
|
2466
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2467
|
-
Button,
|
|
2468
|
-
{
|
|
2469
|
-
variant: "secondary",
|
|
2470
|
-
onClick: () => window.location.reload(),
|
|
2471
|
-
children: "Reload the page"
|
|
2472
|
-
}
|
|
2473
|
-
)
|
|
2443
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", onClick: () => window.location.reload(), children: "Reload the page" })
|
|
2474
2444
|
] }),
|
|
2475
2445
|
children: "Nothing you saved is affected. If it keeps happening, tell us at hello@ochk.io."
|
|
2476
2446
|
}
|
|
2477
2447
|
) });
|
|
2478
2448
|
}
|
|
2479
2449
|
};
|
|
2480
|
-
function NavLink({
|
|
2481
|
-
item,
|
|
2482
|
-
className,
|
|
2483
|
-
onNavigate
|
|
2484
|
-
}) {
|
|
2450
|
+
function NavLink({ item, className, onNavigate }) {
|
|
2485
2451
|
const cls = cn(
|
|
2486
2452
|
"rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
|
|
2487
2453
|
item.active ? "text-foreground" : "text-muted-foreground hover:text-foreground",
|
|
@@ -2490,16 +2456,7 @@ function NavLink({
|
|
|
2490
2456
|
if (item.external) {
|
|
2491
2457
|
return /* @__PURE__ */ jsxRuntime.jsx("a", { href: item.href, className: cls, rel: "noreferrer", onClick: onNavigate, children: item.label });
|
|
2492
2458
|
}
|
|
2493
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2494
|
-
Link2__default.default,
|
|
2495
|
-
{
|
|
2496
|
-
href: item.href,
|
|
2497
|
-
className: cls,
|
|
2498
|
-
"aria-current": item.active ? "page" : void 0,
|
|
2499
|
-
onClick: onNavigate,
|
|
2500
|
-
children: item.label
|
|
2501
|
-
}
|
|
2502
|
-
);
|
|
2459
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: item.href, className: cls, "aria-current": item.active ? "page" : void 0, onClick: onNavigate, children: item.label });
|
|
2503
2460
|
}
|
|
2504
2461
|
function SiteHeader({
|
|
2505
2462
|
home = "/",
|
|
@@ -2516,38 +2473,50 @@ function SiteHeader({
|
|
|
2516
2473
|
"sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70",
|
|
2517
2474
|
className
|
|
2518
2475
|
),
|
|
2519
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2476
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2477
|
+
"div",
|
|
2478
|
+
{
|
|
2479
|
+
className: cn(
|
|
2480
|
+
"oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]",
|
|
2481
|
+
// Three columns, the outer two each at least their content: the
|
|
2482
|
+
// navigation stays centred whatever the actions hold, so it does
|
|
2483
|
+
// not shift when they change (signed out to signed in).
|
|
2484
|
+
nav.length > 0 && "md:grid md:grid-cols-[minmax(max-content,1fr)_auto_minmax(max-content,1fr)]"
|
|
2485
|
+
),
|
|
2486
|
+
children: [
|
|
2487
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Link2__default.default, { href: home, className: "-ml-1 justify-self-start rounded-lg p-1", children: [
|
|
2488
|
+
brand ?? /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 28 }),
|
|
2489
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: " home" })
|
|
2490
|
+
] }),
|
|
2491
|
+
nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "hidden items-center gap-1 md:flex", children: nav.map((n) => /* @__PURE__ */ jsxRuntime.jsx(NavLink, { item: n }, n.href)) }) : null,
|
|
2492
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 justify-self-end", children: [
|
|
2493
|
+
actions,
|
|
2494
|
+
nav.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
2495
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2496
|
+
SheetTrigger,
|
|
2497
|
+
{
|
|
2498
|
+
className: "inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden",
|
|
2499
|
+
"aria-label": "Open menu",
|
|
2500
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "size-5" })
|
|
2501
|
+
}
|
|
2502
|
+
),
|
|
2503
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "pt-16", children: [
|
|
2504
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Menu" }),
|
|
2505
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Main", className: "flex flex-col", children: nav.map((n) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2506
|
+
NavLink,
|
|
2507
|
+
{
|
|
2508
|
+
item: n,
|
|
2509
|
+
className: "rounded-xl px-3 py-3 text-[1.0625rem]",
|
|
2510
|
+
onNavigate: () => setOpen(false)
|
|
2511
|
+
},
|
|
2512
|
+
n.href
|
|
2513
|
+
)) })
|
|
2514
|
+
] })
|
|
2515
|
+
] }) : null
|
|
2547
2516
|
] })
|
|
2548
|
-
]
|
|
2549
|
-
|
|
2550
|
-
|
|
2517
|
+
]
|
|
2518
|
+
}
|
|
2519
|
+
)
|
|
2551
2520
|
}
|
|
2552
2521
|
);
|
|
2553
2522
|
}
|
|
@@ -2569,46 +2538,27 @@ function SiteFooter({
|
|
|
2569
2538
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2570
2539
|
"div",
|
|
2571
2540
|
{
|
|
2572
|
-
className: cn(
|
|
2573
|
-
"flex min-w-0 flex-col gap-1",
|
|
2574
|
-
spans && "col-span-2 md:col-span-1"
|
|
2575
|
-
),
|
|
2541
|
+
className: cn("flex min-w-0 flex-col gap-1", spans && "col-span-2 md:col-span-1"),
|
|
2576
2542
|
children: [
|
|
2577
2543
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[0.875rem] font-medium", children: col.heading }),
|
|
2578
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2579
|
-
|
|
2544
|
+
/* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
|
|
2545
|
+
NavLink,
|
|
2580
2546
|
{
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
NavLink,
|
|
2587
|
-
{
|
|
2588
|
-
item: l,
|
|
2589
|
-
className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
|
|
2590
|
-
},
|
|
2591
|
-
l.href
|
|
2592
|
-
))
|
|
2593
|
-
}
|
|
2594
|
-
)
|
|
2547
|
+
item: l,
|
|
2548
|
+
className: "-mx-3 py-2.5 text-[0.9375rem] md:py-1.5"
|
|
2549
|
+
},
|
|
2550
|
+
l.href
|
|
2551
|
+
)) })
|
|
2595
2552
|
]
|
|
2596
2553
|
},
|
|
2597
2554
|
col.heading
|
|
2598
2555
|
);
|
|
2599
2556
|
})
|
|
2600
2557
|
] }),
|
|
2601
|
-
signature ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2602
|
-
"
|
|
2603
|
-
{
|
|
2604
|
-
|
|
2605
|
-
className: "oca-container select-none overflow-hidden pb-8 md:pb-12",
|
|
2606
|
-
children: /* @__PURE__ */ jsxRuntime.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: [
|
|
2607
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-[0.06em] inline-block w-[1.1em] shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Mark, { className: "block h-auto w-full" }) }),
|
|
2608
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "orangecheck" })
|
|
2609
|
-
] })
|
|
2610
|
-
}
|
|
2611
|
-
) : null,
|
|
2558
|
+
signature ? /* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": true, className: "oca-container select-none overflow-hidden pb-8 md:pb-12", children: /* @__PURE__ */ jsxRuntime.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: [
|
|
2559
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "mb-[0.06em] inline-block w-[1.1em] shrink-0", children: /* @__PURE__ */ jsxRuntime.jsx(Mark, { className: "block h-auto w-full" }) }),
|
|
2560
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "orangecheck" })
|
|
2561
|
+
] }) }) : null,
|
|
2612
2562
|
meta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border py-6 text-[0.875rem] text-muted-foreground", children: meta }) }) : null
|
|
2613
2563
|
] });
|
|
2614
2564
|
}
|