@orangecheck/app-design 0.1.2 → 0.2.0
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.d.mts +13 -2
- package/dist/brand.d.ts +13 -2
- package/dist/brand.js +79 -23
- package/dist/brand.js.map +1 -1
- package/dist/brand.mjs +79 -24
- package/dist/brand.mjs.map +1 -1
- package/dist/components.d.mts +12 -1
- package/dist/components.d.ts +12 -1
- package/dist/components.js +42 -0
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +42 -1
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +147 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -24
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +4 -1
- package/dist/primitives.d.ts +4 -1
- package/dist/primitives.js +26 -0
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +26 -1
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -241,6 +241,31 @@ var badgeVariants = cva(
|
|
|
241
241
|
function Badge({ className, tone, ...props }) {
|
|
242
242
|
return /* @__PURE__ */ jsx("span", { "data-ui": "badge", className: cn(badgeVariants({ tone }), className), ...props });
|
|
243
243
|
}
|
|
244
|
+
function StatusPill({
|
|
245
|
+
className,
|
|
246
|
+
children,
|
|
247
|
+
pulse = true,
|
|
248
|
+
...props
|
|
249
|
+
}) {
|
|
250
|
+
return /* @__PURE__ */ jsxs(
|
|
251
|
+
"span",
|
|
252
|
+
{
|
|
253
|
+
"data-ui": "status-pill",
|
|
254
|
+
className: cn(
|
|
255
|
+
"inline-flex min-h-8 w-fit items-center gap-2.5 rounded-full border border-border bg-card py-1 pl-3 pr-3.5 text-[0.875rem] leading-snug text-foreground",
|
|
256
|
+
className
|
|
257
|
+
),
|
|
258
|
+
...props,
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ jsxs("span", { "aria-hidden": true, className: "relative flex size-2 shrink-0", children: [
|
|
261
|
+
pulse ? /* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-full bg-oca-orange opacity-50 motion-safe:animate-ping" }) : null,
|
|
262
|
+
/* @__PURE__ */ jsx("span", { className: "relative size-2 rounded-full bg-oca-orange" })
|
|
263
|
+
] }),
|
|
264
|
+
children
|
|
265
|
+
]
|
|
266
|
+
}
|
|
267
|
+
);
|
|
268
|
+
}
|
|
244
269
|
var cardVariants = cva("relative rounded-[1.25rem] border", {
|
|
245
270
|
variants: {
|
|
246
271
|
tone: {
|
|
@@ -712,30 +737,25 @@ function Lockup({ name = "orangecheck", size = 28, className }) {
|
|
|
712
737
|
}
|
|
713
738
|
);
|
|
714
739
|
}
|
|
715
|
-
var SPHERE_GRADIENT = "radial-gradient(
|
|
740
|
+
var SPHERE_GRADIENT = "radial-gradient(86% 86% at 36% 32%, #fff7f0 0%, #ffdec8 14%, #ffa069 34%, #ff7030 56%, #f65210 78%, #de4006 100%)";
|
|
741
|
+
var SPHERE_DEPTH = "inset -14px -22px 44px rgb(150 40 0 / 0.16), 0 36px 70px -34px rgb(234 88 11 / 0.45)";
|
|
742
|
+
function Ball({ src, alt, float }) {
|
|
743
|
+
return /* @__PURE__ */ jsx(
|
|
744
|
+
"div",
|
|
745
|
+
{
|
|
746
|
+
className: cn("relative size-full overflow-hidden rounded-full", float && "oca-animate-float"),
|
|
747
|
+
style: { background: SPHERE_GRADIENT, boxShadow: SPHERE_DEPTH },
|
|
748
|
+
children: /* @__PURE__ */ jsx("img", { src, alt, className: "absolute inset-0 size-full select-none", draggable: false })
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
}
|
|
716
752
|
function HalftoneSphere({ src, alt, stadium = false, float = false, className, style }) {
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
/* @__PURE__ */ jsx(
|
|
724
|
-
"div",
|
|
725
|
-
{
|
|
726
|
-
"aria-hidden": true,
|
|
727
|
-
className: "oca-stadium pointer-events-none absolute inset-[-6%] rounded-full md:[inset:-12%_14%_0%_-26%] md:rounded-[17%]"
|
|
728
|
-
}
|
|
729
|
-
)
|
|
730
|
-
) : null,
|
|
731
|
-
/* @__PURE__ */ jsx(
|
|
732
|
-
"div",
|
|
733
|
-
{
|
|
734
|
-
className: cn("relative size-full overflow-hidden rounded-full", float && "oca-animate-float"),
|
|
735
|
-
style: { background: SPHERE_GRADIENT },
|
|
736
|
-
children: /* @__PURE__ */ jsx("img", { src, alt, className: "absolute inset-0 size-full select-none", draggable: false })
|
|
737
|
-
}
|
|
738
|
-
)
|
|
753
|
+
if (!stadium) {
|
|
754
|
+
return /* @__PURE__ */ jsx("div", { className: cn("relative aspect-square w-full", className), style, children: /* @__PURE__ */ jsx(Ball, { src, alt, float }) });
|
|
755
|
+
}
|
|
756
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("relative aspect-[1.255/1.127] w-full", className), style, children: [
|
|
757
|
+
/* @__PURE__ */ jsx("div", { "aria-hidden": true, className: "oca-stadium pointer-events-none absolute left-0 top-0 h-full w-[88.4%] rounded-[32%]" }),
|
|
758
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 right-0 aspect-square w-[79.7%]", children: /* @__PURE__ */ jsx(Ball, { src, alt, float }) })
|
|
739
759
|
] });
|
|
740
760
|
}
|
|
741
761
|
function IsoCheck({ size = 360, settle = false, shadow = true, title, className }) {
|
|
@@ -751,6 +771,66 @@ function IsoCheck({ size = 360, settle = false, shadow = true, title, className
|
|
|
751
771
|
) : null
|
|
752
772
|
] });
|
|
753
773
|
}
|
|
774
|
+
var CELL_W = 22;
|
|
775
|
+
var CELL_H = 27;
|
|
776
|
+
function picks(count, total, seed) {
|
|
777
|
+
let s = seed >>> 0;
|
|
778
|
+
const out = /* @__PURE__ */ new Set();
|
|
779
|
+
while (out.size < Math.min(count, total)) {
|
|
780
|
+
s = Math.imul(s, 1664525) + 1013904223 >>> 0;
|
|
781
|
+
out.add(s % total);
|
|
782
|
+
}
|
|
783
|
+
return out;
|
|
784
|
+
}
|
|
785
|
+
function Crowd({
|
|
786
|
+
cols = 26,
|
|
787
|
+
rows = 9,
|
|
788
|
+
real = 7,
|
|
789
|
+
seed = 21,
|
|
790
|
+
tone = "ink",
|
|
791
|
+
label = "A crowd of identical accounts. Only a few are real.",
|
|
792
|
+
className
|
|
793
|
+
}) {
|
|
794
|
+
const width = cols * CELL_W;
|
|
795
|
+
const scales = Array.from({ length: rows }, (_, r) => 0.5 + 0.5 * (r / Math.max(1, rows - 1)));
|
|
796
|
+
const height = scales.reduce((h, s) => h + CELL_H * s, 0);
|
|
797
|
+
const nearFrom = Math.floor(rows / 2) * cols;
|
|
798
|
+
const realSet = new Set([...picks(real, rows * cols - nearFrom, seed)].map((i) => i + nearFrom));
|
|
799
|
+
const bot = tone === "ink" ? "#ffffff" : "#0a0a0a";
|
|
800
|
+
let y = 0;
|
|
801
|
+
return /* @__PURE__ */ jsx(
|
|
802
|
+
"svg",
|
|
803
|
+
{
|
|
804
|
+
role: "img",
|
|
805
|
+
"aria-label": label,
|
|
806
|
+
viewBox: `0 0 ${width} ${Math.ceil(height)}`,
|
|
807
|
+
className: cn("block h-auto w-full", className),
|
|
808
|
+
children: scales.map((s, r) => {
|
|
809
|
+
const rowY = y;
|
|
810
|
+
y += CELL_H * s;
|
|
811
|
+
const rowW = cols * CELL_W * s;
|
|
812
|
+
const x0 = (width - rowW) / 2;
|
|
813
|
+
return Array.from({ length: cols }, (_, c) => {
|
|
814
|
+
const i = r * cols + c;
|
|
815
|
+
const isReal = realSet.has(i);
|
|
816
|
+
return /* @__PURE__ */ jsxs(
|
|
817
|
+
"g",
|
|
818
|
+
{
|
|
819
|
+
transform: `translate(${x0 + c * CELL_W * s} ${rowY}) scale(${s})`,
|
|
820
|
+
fill: isReal ? "var(--oca-orange)" : bot,
|
|
821
|
+
fillOpacity: isReal ? 1 : 0.1 + 0.16 * s,
|
|
822
|
+
children: [
|
|
823
|
+
/* @__PURE__ */ jsx("circle", { cx: 11, cy: 8, r: 4.4 }),
|
|
824
|
+
/* @__PURE__ */ jsx("path", { d: "M3 25a8 8.5 0 0 1 16 0Z" })
|
|
825
|
+
]
|
|
826
|
+
},
|
|
827
|
+
i
|
|
828
|
+
);
|
|
829
|
+
});
|
|
830
|
+
})
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
}
|
|
754
834
|
function Eyebrow({ className, onInk, ...props }) {
|
|
755
835
|
return /* @__PURE__ */ jsx("p", { className: cn("oca-eyebrow", onInk && "text-oca-ink-eyebrow", className), ...props });
|
|
756
836
|
}
|
|
@@ -888,6 +968,47 @@ function CodeBlock({
|
|
|
888
968
|
/* @__PURE__ */ jsx("pre", { className: "overflow-x-auto p-5 font-mono text-[0.875rem] leading-relaxed text-oca-ink-muted", children: /* @__PURE__ */ jsx("code", { children: code }) })
|
|
889
969
|
] });
|
|
890
970
|
}
|
|
971
|
+
function SplitBar({
|
|
972
|
+
segments,
|
|
973
|
+
caption,
|
|
974
|
+
className
|
|
975
|
+
}) {
|
|
976
|
+
return /* @__PURE__ */ jsxs("figure", { className: cn("flex flex-col gap-5", className), children: [
|
|
977
|
+
caption ? /* @__PURE__ */ jsx("figcaption", { className: "text-[0.9375rem]", children: caption }) : null,
|
|
978
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-16 w-full gap-1.5 overflow-hidden rounded-[1.25rem] md:h-20", children: segments.map((s, i) => /* @__PURE__ */ jsx(
|
|
979
|
+
"div",
|
|
980
|
+
{
|
|
981
|
+
className: cn(
|
|
982
|
+
"flex min-w-0 items-end rounded-[1rem] px-4 pb-3",
|
|
983
|
+
s.tone === "card" ? "bg-white text-oca-ink" : "bg-oca-ink text-white"
|
|
984
|
+
),
|
|
985
|
+
style: { flexBasis: `${s.pct}%` },
|
|
986
|
+
children: /* @__PURE__ */ jsxs("span", { className: "oca-tabular text-[1.5rem] leading-none tracking-[-0.02em] md:text-[1.875rem]", children: [
|
|
987
|
+
s.pct,
|
|
988
|
+
"%"
|
|
989
|
+
] })
|
|
990
|
+
},
|
|
991
|
+
i
|
|
992
|
+
)) }),
|
|
993
|
+
/* @__PURE__ */ jsx("dl", { className: "grid gap-x-8 gap-y-2 sm:grid-cols-2", children: segments.map((s, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2.5", children: [
|
|
994
|
+
/* @__PURE__ */ jsxs("dt", { className: "sr-only", children: [
|
|
995
|
+
s.pct,
|
|
996
|
+
"%"
|
|
997
|
+
] }),
|
|
998
|
+
/* @__PURE__ */ jsx(
|
|
999
|
+
"span",
|
|
1000
|
+
{
|
|
1001
|
+
"aria-hidden": true,
|
|
1002
|
+
className: cn(
|
|
1003
|
+
"inline-block size-2.5 shrink-0 translate-y-[-1px] rounded-full",
|
|
1004
|
+
s.tone === "card" ? "bg-white" : "bg-oca-ink"
|
|
1005
|
+
)
|
|
1006
|
+
}
|
|
1007
|
+
),
|
|
1008
|
+
/* @__PURE__ */ jsx("dd", { className: "text-[0.9375rem] leading-snug", children: s.label })
|
|
1009
|
+
] }, i)) })
|
|
1010
|
+
] });
|
|
1011
|
+
}
|
|
891
1012
|
var LABEL = {
|
|
892
1013
|
yes: "Yes",
|
|
893
1014
|
testing: "In testing",
|
|
@@ -1443,6 +1564,6 @@ function ThemeToggle({ className }) {
|
|
|
1443
1564
|
);
|
|
1444
1565
|
}
|
|
1445
1566
|
|
|
1446
|
-
export { APP_ATTRIBUTE, APP_ID, Accent, AccountMenu, ActivityList, AppIcon, AppShell, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, CodeBlock, Container, CopyButton, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Display, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, Eyebrow, Field, Footnote, HalftoneSphere, HashChip, Input, IsoCheck, Kbd, KeyValueList, Label, Lead, Lockup, MARK_FACES, Mark, Notice, PackageCard, PageHeader, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, Prose, RadioGroup, RadioGroupItem, SPHERE_GRADIENT, Sats, SatsFigure, Section, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SiteFooter, SiteHeader, Skeleton, Spinner, StatCard, StatGrid, StatusDot, StepGrid, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, appColors, appFonts, badgeVariants, buttonVariants, cardVariants, cn, satsText, sectionVariants, useCopy };
|
|
1567
|
+
export { APP_ATTRIBUTE, APP_ID, Accent, AccountMenu, ActivityList, AppIcon, AppShell, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, CodeBlock, Container, CopyButton, Crowd, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Display, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, Eyebrow, Field, Footnote, HalftoneSphere, HashChip, Input, IsoCheck, Kbd, KeyValueList, Label, Lead, Lockup, MARK_FACES, Mark, Notice, PackageCard, PageHeader, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, Prose, RadioGroup, RadioGroupItem, SPHERE_GRADIENT, Sats, SatsFigure, Section, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, SiteFooter, SiteHeader, Skeleton, Spinner, SplitBar, StatCard, StatGrid, StatusDot, StatusPill, StepGrid, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, appColors, appFonts, badgeVariants, buttonVariants, cardVariants, cn, satsText, sectionVariants, useCopy };
|
|
1447
1568
|
//# sourceMappingURL=index.mjs.map
|
|
1448
1569
|
//# sourceMappingURL=index.mjs.map
|