@orangecheck/app-design 0.5.10 → 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 +8 -1
- package/dist/brand.js.map +1 -1
- package/dist/brand.mjs +8 -1
- package/dist/brand.mjs.map +1 -1
- package/dist/chrome.js +43 -28
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +43 -28
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.d.mts +21 -2
- package/dist/components.d.ts +21 -2
- package/dist/components.js +45 -1
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +46 -3
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +96 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -32
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.js +13 -1
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +13 -1
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { APP_ATTRIBUTE, APP_ID, appColors, appFonts } from './tokens.mjs';
|
|
2
2
|
export { Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldProps, Input, Kbd, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, useTimedOut } from './primitives.mjs';
|
|
3
3
|
export { AppIcon, AppIconProps, Crowd, CrowdProps, HalftoneCanvas, HalftoneCanvasProps, HalftoneSphere, HalftoneSphereProps, IsoCheck, IsoCheckProps, Lockup, LockupProps, MARK_FACES, Mark, MarkProps, SPHERE_GRADIENT, Tone, portraitTone } from './brand.mjs';
|
|
4
|
-
export { Accent, ActivityItem, ActivityList, BrowserFrame, CodeBlock, Column, Container, CopyButton, DataTable, Display, DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PageHero, PageHeroProps, PhoneFrame, ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, Section, SectionIntro, SectionProps, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, Ticker, TocItem, TruthRow, TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.mjs';
|
|
4
|
+
export { Accent, ActivityItem, ActivityList, BrowserFrame, CodeBlock, Column, Container, CopyButton, DataTable, Display, DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, ErrorBoundary, Eyebrow, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PageHero, PageHeroProps, PhoneFrame, ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, Section, SectionIntro, SectionProps, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, Ticker, TocItem, TruthRow, TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.mjs';
|
|
5
5
|
export { AccountMenu, AccountMenuItem, AppShell, FooterColumn, NavItem, ShellContext, ShellNavGroup, ShellNavItem, ShellPlace, ShellSection, SiteFooter, SiteHeader, ThemeToggle, useShellPlace } from './chrome.mjs';
|
|
6
6
|
export { toast } from 'sonner';
|
|
7
7
|
import 'react';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { APP_ATTRIBUTE, APP_ID, appColors, appFonts } from './tokens.js';
|
|
2
2
|
export { Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardProps, CardTitle, Checkbox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Field, FieldProps, Input, Kbd, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ScrollFade, ScrollFadeProps, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, Skeleton, Spinner, StatusDot, StatusPill, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, badgeVariants, buttonVariants, cardVariants, cn, useTimedOut } from './primitives.js';
|
|
3
3
|
export { AppIcon, AppIconProps, Crowd, CrowdProps, HalftoneCanvas, HalftoneCanvasProps, HalftoneSphere, HalftoneSphereProps, IsoCheck, IsoCheckProps, Lockup, LockupProps, MARK_FACES, Mark, MarkProps, SPHERE_GRADIENT, Tone, portraitTone } from './brand.js';
|
|
4
|
-
export { Accent, ActivityItem, ActivityList, BrowserFrame, CodeBlock, Column, Container, CopyButton, DataTable, Display, DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PageHero, PageHeroProps, PhoneFrame, ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, Section, SectionIntro, SectionProps, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, Ticker, TocItem, TruthRow, TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.js';
|
|
4
|
+
export { Accent, ActivityItem, ActivityList, BrowserFrame, CodeBlock, Column, Container, CopyButton, DataTable, Display, DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, ErrorBoundary, Eyebrow, FloatChip, Footnote, HashChip, KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, PackageItem, PageHeader, PageHero, PageHeroProps, PhoneFrame, ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, SatsProps, SatsTextOptions, ScrollStory, Section, SectionIntro, SectionProps, SplitBar, SplitSegment, StatCard, StatCardProps, StatGrid, StatGridProps, StepGrid, StepGridProps, StepItem, StepState, Ticker, TocItem, TruthRow, TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView } from './components.js';
|
|
5
5
|
export { AccountMenu, AccountMenuItem, AppShell, FooterColumn, NavItem, ShellContext, ShellNavGroup, ShellNavItem, ShellPlace, ShellSection, SiteFooter, SiteHeader, ThemeToggle, useShellPlace } from './chrome.js';
|
|
6
6
|
export { toast } from 'sonner';
|
|
7
7
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -728,7 +728,19 @@ function ScrollFade({ fade = "var(--card)", className, innerClassName, children,
|
|
|
728
728
|
return () => ro.disconnect();
|
|
729
729
|
}, [measure]);
|
|
730
730
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative min-w-0", className), ...props, children: [
|
|
731
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
731
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
732
|
+
"div",
|
|
733
|
+
{
|
|
734
|
+
ref,
|
|
735
|
+
onScroll: measure,
|
|
736
|
+
tabIndex: edges.left || edges.right ? 0 : void 0,
|
|
737
|
+
className: cn(
|
|
738
|
+
"overflow-x-auto overscroll-x-contain rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
739
|
+
innerClassName
|
|
740
|
+
),
|
|
741
|
+
children
|
|
742
|
+
}
|
|
743
|
+
),
|
|
732
744
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
733
745
|
"span",
|
|
734
746
|
{
|
|
@@ -1048,7 +1060,14 @@ function HalftoneCanvas({
|
|
|
1048
1060
|
}
|
|
1049
1061
|
)
|
|
1050
1062
|
) : null,
|
|
1051
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
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
|
+
)
|
|
1052
1071
|
] });
|
|
1053
1072
|
}
|
|
1054
1073
|
var SPHERE_GRADIENT = "radial-gradient(86% 86% at 36% 32%, #fff7f0 0%, #ffdec8 14%, #ffa069 34%, #ff7030 56%, #f65210 78%, #de4006 100%)";
|
|
@@ -2397,6 +2416,37 @@ function Monogram({
|
|
|
2397
2416
|
}
|
|
2398
2417
|
);
|
|
2399
2418
|
}
|
|
2419
|
+
var ErrorBoundary = class extends react.Component {
|
|
2420
|
+
constructor() {
|
|
2421
|
+
super(...arguments);
|
|
2422
|
+
this.state = { failed: false, key: this.props.resetKey };
|
|
2423
|
+
this.reset = () => this.setState({ failed: false });
|
|
2424
|
+
}
|
|
2425
|
+
static getDerivedStateFromError() {
|
|
2426
|
+
return { failed: true };
|
|
2427
|
+
}
|
|
2428
|
+
static getDerivedStateFromProps(props, state) {
|
|
2429
|
+
return props.resetKey === state.key ? null : { failed: false, key: props.resetKey };
|
|
2430
|
+
}
|
|
2431
|
+
componentDidCatch(error, info) {
|
|
2432
|
+
this.props.onError?.(error, info);
|
|
2433
|
+
}
|
|
2434
|
+
render() {
|
|
2435
|
+
if (!this.state.failed) return this.props.children;
|
|
2436
|
+
if (this.props.fallback) return this.props.fallback(this.reset);
|
|
2437
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container py-16", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2438
|
+
EmptyState,
|
|
2439
|
+
{
|
|
2440
|
+
title: "Something on this page broke.",
|
|
2441
|
+
action: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2442
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { onClick: this.reset, children: "Try again" }),
|
|
2443
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "secondary", onClick: () => window.location.reload(), children: "Reload the page" })
|
|
2444
|
+
] }),
|
|
2445
|
+
children: "Nothing you saved is affected. If it keeps happening, tell us at hello@ochk.io."
|
|
2446
|
+
}
|
|
2447
|
+
) });
|
|
2448
|
+
}
|
|
2449
|
+
};
|
|
2400
2450
|
function NavLink({ item, className, onNavigate }) {
|
|
2401
2451
|
const cls = cn(
|
|
2402
2452
|
"rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
|
|
@@ -2423,35 +2473,50 @@ function SiteHeader({
|
|
|
2423
2473
|
"sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70",
|
|
2424
2474
|
className
|
|
2425
2475
|
),
|
|
2426
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
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
|
|
2451
2516
|
] })
|
|
2452
|
-
]
|
|
2453
|
-
|
|
2454
|
-
|
|
2517
|
+
]
|
|
2518
|
+
}
|
|
2519
|
+
)
|
|
2455
2520
|
}
|
|
2456
2521
|
);
|
|
2457
2522
|
}
|
|
@@ -2743,6 +2808,7 @@ exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
|
2743
2808
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
2744
2809
|
exports.EmptyLine = EmptyLine;
|
|
2745
2810
|
exports.EmptyState = EmptyState;
|
|
2811
|
+
exports.ErrorBoundary = ErrorBoundary;
|
|
2746
2812
|
exports.Eyebrow = Eyebrow;
|
|
2747
2813
|
exports.Field = Field;
|
|
2748
2814
|
exports.FloatChip = FloatChip;
|