@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/components.d.mts
CHANGED
|
@@ -577,4 +577,19 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
577
577
|
style?: CSSProperties;
|
|
578
578
|
}): react.JSX.Element;
|
|
579
579
|
|
|
580
|
-
|
|
580
|
+
declare const SIZES: {
|
|
581
|
+
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
582
|
+
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
583
|
+
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
584
|
+
};
|
|
585
|
+
declare function monogramLetter(name: string): string;
|
|
586
|
+
declare function monogramGround(seed: string): number;
|
|
587
|
+
declare function Monogram({ name, seed, size, className, style, }: {
|
|
588
|
+
name: string;
|
|
589
|
+
seed?: string;
|
|
590
|
+
size?: keyof typeof SIZES;
|
|
591
|
+
className?: string;
|
|
592
|
+
style?: CSSProperties;
|
|
593
|
+
}): react.JSX.Element;
|
|
594
|
+
|
|
595
|
+
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
|
@@ -577,4 +577,19 @@ declare function FloatChip({ icon, title, detail, delay, className, style, }: {
|
|
|
577
577
|
style?: CSSProperties;
|
|
578
578
|
}): react.JSX.Element;
|
|
579
579
|
|
|
580
|
-
|
|
580
|
+
declare const SIZES: {
|
|
581
|
+
readonly sm: "size-9 rounded-[0.7rem] text-[0.9375rem]";
|
|
582
|
+
readonly md: "size-11 rounded-[0.85rem] text-[1.125rem]";
|
|
583
|
+
readonly lg: "size-14 rounded-[1.05rem] text-[1.5rem]";
|
|
584
|
+
};
|
|
585
|
+
declare function monogramLetter(name: string): string;
|
|
586
|
+
declare function monogramGround(seed: string): number;
|
|
587
|
+
declare function Monogram({ name, seed, size, className, style, }: {
|
|
588
|
+
name: string;
|
|
589
|
+
seed?: string;
|
|
590
|
+
size?: keyof typeof SIZES;
|
|
591
|
+
className?: string;
|
|
592
|
+
style?: CSSProperties;
|
|
593
|
+
}): react.JSX.Element;
|
|
594
|
+
|
|
595
|
+
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
|
@@ -1320,6 +1320,76 @@ function FloatChip({
|
|
|
1320
1320
|
}
|
|
1321
1321
|
);
|
|
1322
1322
|
}
|
|
1323
|
+
var GROUNDS = [
|
|
1324
|
+
{
|
|
1325
|
+
className: "text-oca-ink",
|
|
1326
|
+
background: "linear-gradient(145deg, var(--oca-orange-light), var(--oca-orange-deep))",
|
|
1327
|
+
dot: "rgb(10 10 10 / 0.22)"
|
|
1328
|
+
},
|
|
1329
|
+
{
|
|
1330
|
+
className: "text-white ring-1 ring-inset ring-white/10",
|
|
1331
|
+
background: "linear-gradient(145deg, #2a2a2a, #0a0a0a)",
|
|
1332
|
+
dot: "rgb(255 255 255 / 0.16)"
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
className: "text-oca-ink",
|
|
1336
|
+
background: "linear-gradient(145deg, #fff1df, var(--oca-peach))",
|
|
1337
|
+
dot: "rgb(234 88 11 / 0.22)"
|
|
1338
|
+
}
|
|
1339
|
+
];
|
|
1340
|
+
var SIZES = {
|
|
1341
|
+
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
1342
|
+
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
1343
|
+
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
1344
|
+
};
|
|
1345
|
+
function monogramLetter(name) {
|
|
1346
|
+
const match = name.match(/[\p{L}\p{N}]/u);
|
|
1347
|
+
return match ? match[0].toLocaleUpperCase() : "\xB7";
|
|
1348
|
+
}
|
|
1349
|
+
function monogramGround(seed) {
|
|
1350
|
+
let h = 2166136261;
|
|
1351
|
+
for (let i = 0; i < seed.length; i++) {
|
|
1352
|
+
h ^= seed.charCodeAt(i);
|
|
1353
|
+
h = Math.imul(h, 16777619);
|
|
1354
|
+
}
|
|
1355
|
+
return (h >>> 0) % GROUNDS.length;
|
|
1356
|
+
}
|
|
1357
|
+
function Monogram({
|
|
1358
|
+
name,
|
|
1359
|
+
seed,
|
|
1360
|
+
size = "md",
|
|
1361
|
+
className,
|
|
1362
|
+
style
|
|
1363
|
+
}) {
|
|
1364
|
+
const ground = GROUNDS[monogramGround(seed ?? name)] ?? GROUNDS[0];
|
|
1365
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1366
|
+
"span",
|
|
1367
|
+
{
|
|
1368
|
+
"aria-hidden": true,
|
|
1369
|
+
className: cn(
|
|
1370
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-semibold leading-none tracking-[-0.02em]",
|
|
1371
|
+
SIZES[size],
|
|
1372
|
+
ground.className,
|
|
1373
|
+
className
|
|
1374
|
+
),
|
|
1375
|
+
style: { background: ground.background, ...style },
|
|
1376
|
+
children: [
|
|
1377
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1378
|
+
"span",
|
|
1379
|
+
{
|
|
1380
|
+
className: "absolute inset-0",
|
|
1381
|
+
style: {
|
|
1382
|
+
backgroundImage: `radial-gradient(circle, ${ground.dot} 0.9px, transparent 1.2px)`,
|
|
1383
|
+
backgroundSize: "6px 6px",
|
|
1384
|
+
maskImage: "radial-gradient(90% 90% at 100% 100%, black, transparent 75%)"
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative", children: monogramLetter(name) })
|
|
1389
|
+
]
|
|
1390
|
+
}
|
|
1391
|
+
);
|
|
1392
|
+
}
|
|
1323
1393
|
|
|
1324
1394
|
exports.Accent = Accent;
|
|
1325
1395
|
exports.ActivityList = ActivityList;
|
|
@@ -1340,6 +1410,7 @@ exports.HashChip = HashChip;
|
|
|
1340
1410
|
exports.KeyValueList = KeyValueList;
|
|
1341
1411
|
exports.Lead = Lead;
|
|
1342
1412
|
exports.LoadingBlock = LoadingBlock;
|
|
1413
|
+
exports.Monogram = Monogram;
|
|
1343
1414
|
exports.Notice = Notice;
|
|
1344
1415
|
exports.PackageCard = PackageCard;
|
|
1345
1416
|
exports.PageHeader = PageHeader;
|
|
@@ -1360,6 +1431,8 @@ exports.StepGrid = StepGrid;
|
|
|
1360
1431
|
exports.Ticker = Ticker;
|
|
1361
1432
|
exports.TruthTable = TruthTable;
|
|
1362
1433
|
exports.UsdApprox = UsdApprox;
|
|
1434
|
+
exports.monogramGround = monogramGround;
|
|
1435
|
+
exports.monogramLetter = monogramLetter;
|
|
1363
1436
|
exports.satsText = satsText;
|
|
1364
1437
|
exports.sectionVariants = sectionVariants;
|
|
1365
1438
|
exports.useCopy = useCopy;
|