@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/components.d.mts +17 -1
- package/dist/components.d.ts +17 -1
- package/dist/components.js +79 -3
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +77 -4
- 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 +79 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +77 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/components.d.mts
CHANGED
|
@@ -527,6 +527,7 @@ interface ActivityItem {
|
|
|
527
527
|
id: string;
|
|
528
528
|
title: ReactNode;
|
|
529
529
|
meta?: ReactNode;
|
|
530
|
+
leading?: ReactNode;
|
|
530
531
|
trailing?: ReactNode;
|
|
531
532
|
href?: string;
|
|
532
533
|
}
|
|
@@ -577,4 +578,19 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
577
578
|
style?: CSSProperties;
|
|
578
579
|
}): react.JSX.Element;
|
|
579
580
|
|
|
580
|
-
|
|
581
|
+
declare const SIZES: {
|
|
582
|
+
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
583
|
+
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
584
|
+
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
585
|
+
};
|
|
586
|
+
declare function monogramLetter(name: string): string;
|
|
587
|
+
declare function monogramGround(seed: string): number;
|
|
588
|
+
declare function Monogram({ name, seed, size, className, style, }: {
|
|
589
|
+
name: string;
|
|
590
|
+
seed?: string;
|
|
591
|
+
size?: keyof typeof SIZES;
|
|
592
|
+
className?: string;
|
|
593
|
+
style?: CSSProperties;
|
|
594
|
+
}): react.JSX.Element;
|
|
595
|
+
|
|
596
|
+
export { Accent, type ActivityItem, ActivityList, BrowserFrame, CodeBlock, type Column, Container, CopyButton, DataTable, Display, type DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, type KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, type PackageItem, PageHeader, PageHero, type PageHeroProps, PhoneFrame, type ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, Section, SectionIntro, type SectionProps, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, Ticker, type TocItem, type TruthRow, type TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
package/dist/components.d.ts
CHANGED
|
@@ -527,6 +527,7 @@ interface ActivityItem {
|
|
|
527
527
|
id: string;
|
|
528
528
|
title: ReactNode;
|
|
529
529
|
meta?: ReactNode;
|
|
530
|
+
leading?: ReactNode;
|
|
530
531
|
trailing?: ReactNode;
|
|
531
532
|
href?: string;
|
|
532
533
|
}
|
|
@@ -577,4 +578,19 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
577
578
|
style?: CSSProperties;
|
|
578
579
|
}): react.JSX.Element;
|
|
579
580
|
|
|
580
|
-
|
|
581
|
+
declare const SIZES: {
|
|
582
|
+
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
583
|
+
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
584
|
+
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
585
|
+
};
|
|
586
|
+
declare function monogramLetter(name: string): string;
|
|
587
|
+
declare function monogramGround(seed: string): number;
|
|
588
|
+
declare function Monogram({ name, seed, size, className, style, }: {
|
|
589
|
+
name: string;
|
|
590
|
+
seed?: string;
|
|
591
|
+
size?: keyof typeof SIZES;
|
|
592
|
+
className?: string;
|
|
593
|
+
style?: CSSProperties;
|
|
594
|
+
}): react.JSX.Element;
|
|
595
|
+
|
|
596
|
+
export { Accent, type ActivityItem, ActivityList, BrowserFrame, CodeBlock, type Column, Container, CopyButton, DataTable, Display, type DisplayProps, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, type KeyValueItem, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, type PackageItem, PageHeader, PageHero, type PageHeroProps, PhoneFrame, type ProgressStep, ProgressSteps, Prose, Reveal, Sats, SatsFigure, type SatsProps, type SatsTextOptions, ScrollStory, Section, SectionIntro, type SectionProps, SplitBar, type SplitSegment, StatCard, type StatCardProps, StatGrid, type StatGridProps, StepGrid, type StepGridProps, type StepItem, type StepState, Ticker, type TocItem, type TruthRow, type TruthStatus, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
package/dist/components.js
CHANGED
|
@@ -981,9 +981,12 @@ function ActivityList({ items, empty, className }) {
|
|
|
981
981
|
if (items.length === 0 && empty) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: empty });
|
|
982
982
|
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
|
|
983
983
|
const body = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
|
|
984
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0
|
|
985
|
-
/* @__PURE__ */ jsxRuntime.jsx("
|
|
986
|
-
|
|
984
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
985
|
+
it.leading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: it.leading }) : null,
|
|
986
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
987
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
|
|
988
|
+
it.meta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
|
|
989
|
+
] })
|
|
987
990
|
] }),
|
|
988
991
|
it.trailing ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
|
|
989
992
|
] });
|
|
@@ -1320,6 +1323,76 @@ function FloatChip({
|
|
|
1320
1323
|
}
|
|
1321
1324
|
);
|
|
1322
1325
|
}
|
|
1326
|
+
var GROUNDS = [
|
|
1327
|
+
{
|
|
1328
|
+
className: "text-oca-ink",
|
|
1329
|
+
background: "linear-gradient(145deg, var(--oca-orange-light), var(--oca-orange-deep))",
|
|
1330
|
+
dot: "rgb(10 10 10 / 0.22)"
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
className: "text-white ring-1 ring-inset ring-white/10",
|
|
1334
|
+
background: "linear-gradient(145deg, #2a2a2a, #0a0a0a)",
|
|
1335
|
+
dot: "rgb(255 255 255 / 0.16)"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
className: "text-oca-ink",
|
|
1339
|
+
background: "linear-gradient(145deg, #fff1df, var(--oca-peach))",
|
|
1340
|
+
dot: "rgb(234 88 11 / 0.22)"
|
|
1341
|
+
}
|
|
1342
|
+
];
|
|
1343
|
+
var SIZES = {
|
|
1344
|
+
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
1345
|
+
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
1346
|
+
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
1347
|
+
};
|
|
1348
|
+
function monogramLetter(name) {
|
|
1349
|
+
const match = name.match(/[\p{L}\p{N}]/u);
|
|
1350
|
+
return match ? match[0].toLocaleUpperCase() : "\xB7";
|
|
1351
|
+
}
|
|
1352
|
+
function monogramGround(seed) {
|
|
1353
|
+
let h = 2166136261;
|
|
1354
|
+
for (let i = 0; i < seed.length; i++) {
|
|
1355
|
+
h ^= seed.charCodeAt(i);
|
|
1356
|
+
h = Math.imul(h, 16777619);
|
|
1357
|
+
}
|
|
1358
|
+
return (h >>> 0) % GROUNDS.length;
|
|
1359
|
+
}
|
|
1360
|
+
function Monogram({
|
|
1361
|
+
name,
|
|
1362
|
+
seed,
|
|
1363
|
+
size = "md",
|
|
1364
|
+
className,
|
|
1365
|
+
style
|
|
1366
|
+
}) {
|
|
1367
|
+
const ground = GROUNDS[monogramGround(seed ?? name)] ?? GROUNDS[0];
|
|
1368
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1369
|
+
"span",
|
|
1370
|
+
{
|
|
1371
|
+
"aria-hidden": true,
|
|
1372
|
+
className: cn(
|
|
1373
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-semibold leading-none tracking-[-0.02em]",
|
|
1374
|
+
SIZES[size],
|
|
1375
|
+
ground.className,
|
|
1376
|
+
className
|
|
1377
|
+
),
|
|
1378
|
+
style: { background: ground.background, ...style },
|
|
1379
|
+
children: [
|
|
1380
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1381
|
+
"span",
|
|
1382
|
+
{
|
|
1383
|
+
className: "absolute inset-0",
|
|
1384
|
+
style: {
|
|
1385
|
+
backgroundImage: `radial-gradient(circle, ${ground.dot} 0.9px, transparent 1.2px)`,
|
|
1386
|
+
backgroundSize: "6px 6px",
|
|
1387
|
+
maskImage: "radial-gradient(90% 90% at 100% 100%, black, transparent 75%)"
|
|
1388
|
+
}
|
|
1389
|
+
}
|
|
1390
|
+
),
|
|
1391
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative", children: monogramLetter(name) })
|
|
1392
|
+
]
|
|
1393
|
+
}
|
|
1394
|
+
);
|
|
1395
|
+
}
|
|
1323
1396
|
|
|
1324
1397
|
exports.Accent = Accent;
|
|
1325
1398
|
exports.ActivityList = ActivityList;
|
|
@@ -1340,6 +1413,7 @@ exports.HashChip = HashChip;
|
|
|
1340
1413
|
exports.KeyValueList = KeyValueList;
|
|
1341
1414
|
exports.Lead = Lead;
|
|
1342
1415
|
exports.LoadingBlock = LoadingBlock;
|
|
1416
|
+
exports.Monogram = Monogram;
|
|
1343
1417
|
exports.Notice = Notice;
|
|
1344
1418
|
exports.PackageCard = PackageCard;
|
|
1345
1419
|
exports.PageHeader = PageHeader;
|
|
@@ -1360,6 +1434,8 @@ exports.StepGrid = StepGrid;
|
|
|
1360
1434
|
exports.Ticker = Ticker;
|
|
1361
1435
|
exports.TruthTable = TruthTable;
|
|
1362
1436
|
exports.UsdApprox = UsdApprox;
|
|
1437
|
+
exports.monogramGround = monogramGround;
|
|
1438
|
+
exports.monogramLetter = monogramLetter;
|
|
1363
1439
|
exports.satsText = satsText;
|
|
1364
1440
|
exports.sectionVariants = sectionVariants;
|
|
1365
1441
|
exports.useCopy = useCopy;
|