@orangecheck/app-design 0.5.0 → 0.5.2

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/index.mjs CHANGED
@@ -1920,9 +1920,12 @@ function ActivityList({ items, empty, className }) {
1920
1920
  if (items.length === 0 && empty) return /* @__PURE__ */ jsx(Fragment, { children: empty });
1921
1921
  return /* @__PURE__ */ jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
1922
1922
  const body = /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
1923
- /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
1924
- /* @__PURE__ */ jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
1925
- it.meta ? /* @__PURE__ */ jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
1923
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
1924
+ it.leading ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: it.leading }) : null,
1925
+ /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
1926
+ /* @__PURE__ */ jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
1927
+ it.meta ? /* @__PURE__ */ jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
1928
+ ] })
1926
1929
  ] }),
1927
1930
  it.trailing ? /* @__PURE__ */ jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
1928
1931
  ] });
@@ -2259,6 +2262,76 @@ function FloatChip({
2259
2262
  }
2260
2263
  );
2261
2264
  }
2265
+ var GROUNDS = [
2266
+ {
2267
+ className: "text-oca-ink",
2268
+ background: "linear-gradient(145deg, var(--oca-orange-light), var(--oca-orange-deep))",
2269
+ dot: "rgb(10 10 10 / 0.22)"
2270
+ },
2271
+ {
2272
+ className: "text-white ring-1 ring-inset ring-white/10",
2273
+ background: "linear-gradient(145deg, #2a2a2a, #0a0a0a)",
2274
+ dot: "rgb(255 255 255 / 0.16)"
2275
+ },
2276
+ {
2277
+ className: "text-oca-ink",
2278
+ background: "linear-gradient(145deg, #fff1df, var(--oca-peach))",
2279
+ dot: "rgb(234 88 11 / 0.22)"
2280
+ }
2281
+ ];
2282
+ var SIZES = {
2283
+ sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
2284
+ md: "size-11 rounded-[0.85rem] text-[1.125rem]",
2285
+ lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
2286
+ };
2287
+ function monogramLetter(name) {
2288
+ const match = name.match(/[\p{L}\p{N}]/u);
2289
+ return match ? match[0].toLocaleUpperCase() : "\xB7";
2290
+ }
2291
+ function monogramGround(seed) {
2292
+ let h = 2166136261;
2293
+ for (let i = 0; i < seed.length; i++) {
2294
+ h ^= seed.charCodeAt(i);
2295
+ h = Math.imul(h, 16777619);
2296
+ }
2297
+ return (h >>> 0) % GROUNDS.length;
2298
+ }
2299
+ function Monogram({
2300
+ name,
2301
+ seed,
2302
+ size = "md",
2303
+ className,
2304
+ style
2305
+ }) {
2306
+ const ground = GROUNDS[monogramGround(seed ?? name)] ?? GROUNDS[0];
2307
+ return /* @__PURE__ */ jsxs(
2308
+ "span",
2309
+ {
2310
+ "aria-hidden": true,
2311
+ className: cn(
2312
+ "relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-semibold leading-none tracking-[-0.02em]",
2313
+ SIZES[size],
2314
+ ground.className,
2315
+ className
2316
+ ),
2317
+ style: { background: ground.background, ...style },
2318
+ children: [
2319
+ /* @__PURE__ */ jsx(
2320
+ "span",
2321
+ {
2322
+ className: "absolute inset-0",
2323
+ style: {
2324
+ backgroundImage: `radial-gradient(circle, ${ground.dot} 0.9px, transparent 1.2px)`,
2325
+ backgroundSize: "6px 6px",
2326
+ maskImage: "radial-gradient(90% 90% at 100% 100%, black, transparent 75%)"
2327
+ }
2328
+ }
2329
+ ),
2330
+ /* @__PURE__ */ jsx("span", { className: "relative", children: monogramLetter(name) })
2331
+ ]
2332
+ }
2333
+ );
2334
+ }
2262
2335
  function NavLink({ item, className, onNavigate }) {
2263
2336
  const cls = cn(
2264
2337
  "rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
@@ -2544,6 +2617,6 @@ function ThemeToggle({ className }) {
2544
2617
  );
2545
2618
  }
2546
2619
 
2547
- export { APP_ATTRIBUTE, APP_ID, Accent, AccountMenu, ActivityList, AppIcon, AppShell, Badge, BrowserFrame, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, CodeBlock, Container, CopyButton, Crowd, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Display, DocHeader, DocLayout, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyLine, EmptyState, Eyebrow, Field, FloatChip, Footnote, HalftoneCanvas, HalftoneSphere, HashChip, Input, IsoCheck, Kbd, KeyValueList, Label, Lead, LoadingBlock, Lockup, MARK_FACES, Mark, Notice, PackageCard, PageHeader, PageHero, PhoneFrame, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, Prose, RadioGroup, RadioGroupItem, Reveal, SPHERE_GRADIENT, Sats, SatsFigure, ScrollFade, ScrollStory, Section, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, ShellContext, SiteFooter, SiteHeader, Skeleton, Spinner, SplitBar, StatCard, StatGrid, StatusDot, StatusPill, StepGrid, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Ticker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, appColors, appFonts, badgeVariants, buttonVariants, cardVariants, cn, portraitTone, satsText, sectionVariants, useCopy, useInView, useShellPlace, useTimedOut };
2620
+ export { APP_ATTRIBUTE, APP_ID, Accent, AccountMenu, ActivityList, AppIcon, AppShell, Badge, BrowserFrame, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardNumeral, CardTitle, Checkbox, CodeBlock, Container, CopyButton, Crowd, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Display, DocHeader, DocLayout, DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EmptyLine, EmptyState, Eyebrow, Field, FloatChip, Footnote, HalftoneCanvas, HalftoneSphere, HashChip, Input, IsoCheck, Kbd, KeyValueList, Label, Lead, LoadingBlock, Lockup, MARK_FACES, Mark, Monogram, Notice, PackageCard, PageHeader, PageHero, PhoneFrame, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressSteps, Prose, RadioGroup, RadioGroupItem, Reveal, SPHERE_GRADIENT, Sats, SatsFigure, ScrollFade, ScrollStory, Section, SectionIntro, Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, SheetTrigger, ShellContext, SiteFooter, SiteHeader, Skeleton, Spinner, SplitBar, StatCard, StatGrid, StatusDot, StatusPill, StepGrid, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeToggle, Ticker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruthTable, UsdApprox, appColors, appFonts, badgeVariants, buttonVariants, cardVariants, cn, monogramGround, monogramLetter, portraitTone, satsText, sectionVariants, useCopy, useInView, useShellPlace, useTimedOut };
2548
2621
  //# sourceMappingURL=index.mjs.map
2549
2622
  //# sourceMappingURL=index.mjs.map