@orangecheck/app-design 0.5.0 → 0.5.1
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/components.d.mts +16 -1
- package/dist/components.d.ts +16 -1
- package/dist/components.js +73 -0
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +71 -1
- 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 +73 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +71 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2259,6 +2259,76 @@ function FloatChip({
|
|
|
2259
2259
|
}
|
|
2260
2260
|
);
|
|
2261
2261
|
}
|
|
2262
|
+
var GROUNDS = [
|
|
2263
|
+
{
|
|
2264
|
+
className: "text-oca-ink",
|
|
2265
|
+
background: "linear-gradient(145deg, var(--oca-orange-light), var(--oca-orange-deep))",
|
|
2266
|
+
dot: "rgb(10 10 10 / 0.22)"
|
|
2267
|
+
},
|
|
2268
|
+
{
|
|
2269
|
+
className: "text-white ring-1 ring-inset ring-white/10",
|
|
2270
|
+
background: "linear-gradient(145deg, #2a2a2a, #0a0a0a)",
|
|
2271
|
+
dot: "rgb(255 255 255 / 0.16)"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
className: "text-oca-ink",
|
|
2275
|
+
background: "linear-gradient(145deg, #fff1df, var(--oca-peach))",
|
|
2276
|
+
dot: "rgb(234 88 11 / 0.22)"
|
|
2277
|
+
}
|
|
2278
|
+
];
|
|
2279
|
+
var SIZES = {
|
|
2280
|
+
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
2281
|
+
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
2282
|
+
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
2283
|
+
};
|
|
2284
|
+
function monogramLetter(name) {
|
|
2285
|
+
const match = name.match(/[\p{L}\p{N}]/u);
|
|
2286
|
+
return match ? match[0].toLocaleUpperCase() : "\xB7";
|
|
2287
|
+
}
|
|
2288
|
+
function monogramGround(seed) {
|
|
2289
|
+
let h = 2166136261;
|
|
2290
|
+
for (let i = 0; i < seed.length; i++) {
|
|
2291
|
+
h ^= seed.charCodeAt(i);
|
|
2292
|
+
h = Math.imul(h, 16777619);
|
|
2293
|
+
}
|
|
2294
|
+
return (h >>> 0) % GROUNDS.length;
|
|
2295
|
+
}
|
|
2296
|
+
function Monogram({
|
|
2297
|
+
name,
|
|
2298
|
+
seed,
|
|
2299
|
+
size = "md",
|
|
2300
|
+
className,
|
|
2301
|
+
style
|
|
2302
|
+
}) {
|
|
2303
|
+
const ground = GROUNDS[monogramGround(seed ?? name)] ?? GROUNDS[0];
|
|
2304
|
+
return /* @__PURE__ */ jsxs(
|
|
2305
|
+
"span",
|
|
2306
|
+
{
|
|
2307
|
+
"aria-hidden": true,
|
|
2308
|
+
className: cn(
|
|
2309
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-semibold leading-none tracking-[-0.02em]",
|
|
2310
|
+
SIZES[size],
|
|
2311
|
+
ground.className,
|
|
2312
|
+
className
|
|
2313
|
+
),
|
|
2314
|
+
style: { background: ground.background, ...style },
|
|
2315
|
+
children: [
|
|
2316
|
+
/* @__PURE__ */ jsx(
|
|
2317
|
+
"span",
|
|
2318
|
+
{
|
|
2319
|
+
className: "absolute inset-0",
|
|
2320
|
+
style: {
|
|
2321
|
+
backgroundImage: `radial-gradient(circle, ${ground.dot} 0.9px, transparent 1.2px)`,
|
|
2322
|
+
backgroundSize: "6px 6px",
|
|
2323
|
+
maskImage: "radial-gradient(90% 90% at 100% 100%, black, transparent 75%)"
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
),
|
|
2327
|
+
/* @__PURE__ */ jsx("span", { className: "relative", children: monogramLetter(name) })
|
|
2328
|
+
]
|
|
2329
|
+
}
|
|
2330
|
+
);
|
|
2331
|
+
}
|
|
2262
2332
|
function NavLink({ item, className, onNavigate }) {
|
|
2263
2333
|
const cls = cn(
|
|
2264
2334
|
"rounded-full px-3 py-2 text-[0.9375rem] transition-colors",
|
|
@@ -2544,6 +2614,6 @@ function ThemeToggle({ className }) {
|
|
|
2544
2614
|
);
|
|
2545
2615
|
}
|
|
2546
2616
|
|
|
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 };
|
|
2617
|
+
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
2618
|
//# sourceMappingURL=index.mjs.map
|
|
2549
2619
|
//# sourceMappingURL=index.mjs.map
|