@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.mjs
CHANGED
|
@@ -959,9 +959,12 @@ function ActivityList({ items, empty, className }) {
|
|
|
959
959
|
if (items.length === 0 && empty) return /* @__PURE__ */ jsx(Fragment, { children: empty });
|
|
960
960
|
return /* @__PURE__ */ jsx("ul", { className: cn("divide-y divide-border rounded-[1.25rem] border border-border bg-card", className), children: items.map((it) => {
|
|
961
961
|
const body = /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-5 py-4", children: [
|
|
962
|
-
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0
|
|
963
|
-
/* @__PURE__ */ jsx("
|
|
964
|
-
|
|
962
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
963
|
+
it.leading ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: it.leading }) : null,
|
|
964
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
965
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-[0.9375rem]", children: it.title }),
|
|
966
|
+
it.meta ? /* @__PURE__ */ jsx("span", { className: "truncate text-[0.8125rem] text-muted-foreground", children: it.meta }) : null
|
|
967
|
+
] })
|
|
965
968
|
] }),
|
|
966
969
|
it.trailing ? /* @__PURE__ */ jsx("div", { className: "shrink-0 text-right", children: it.trailing }) : null
|
|
967
970
|
] });
|
|
@@ -1298,7 +1301,77 @@ function FloatChip({
|
|
|
1298
1301
|
}
|
|
1299
1302
|
);
|
|
1300
1303
|
}
|
|
1304
|
+
var GROUNDS = [
|
|
1305
|
+
{
|
|
1306
|
+
className: "text-oca-ink",
|
|
1307
|
+
background: "linear-gradient(145deg, var(--oca-orange-light), var(--oca-orange-deep))",
|
|
1308
|
+
dot: "rgb(10 10 10 / 0.22)"
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
className: "text-white ring-1 ring-inset ring-white/10",
|
|
1312
|
+
background: "linear-gradient(145deg, #2a2a2a, #0a0a0a)",
|
|
1313
|
+
dot: "rgb(255 255 255 / 0.16)"
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
className: "text-oca-ink",
|
|
1317
|
+
background: "linear-gradient(145deg, #fff1df, var(--oca-peach))",
|
|
1318
|
+
dot: "rgb(234 88 11 / 0.22)"
|
|
1319
|
+
}
|
|
1320
|
+
];
|
|
1321
|
+
var SIZES = {
|
|
1322
|
+
sm: "size-9 rounded-[0.7rem] text-[0.9375rem]",
|
|
1323
|
+
md: "size-11 rounded-[0.85rem] text-[1.125rem]",
|
|
1324
|
+
lg: "size-14 rounded-[1.05rem] text-[1.5rem]"
|
|
1325
|
+
};
|
|
1326
|
+
function monogramLetter(name) {
|
|
1327
|
+
const match = name.match(/[\p{L}\p{N}]/u);
|
|
1328
|
+
return match ? match[0].toLocaleUpperCase() : "\xB7";
|
|
1329
|
+
}
|
|
1330
|
+
function monogramGround(seed) {
|
|
1331
|
+
let h = 2166136261;
|
|
1332
|
+
for (let i = 0; i < seed.length; i++) {
|
|
1333
|
+
h ^= seed.charCodeAt(i);
|
|
1334
|
+
h = Math.imul(h, 16777619);
|
|
1335
|
+
}
|
|
1336
|
+
return (h >>> 0) % GROUNDS.length;
|
|
1337
|
+
}
|
|
1338
|
+
function Monogram({
|
|
1339
|
+
name,
|
|
1340
|
+
seed,
|
|
1341
|
+
size = "md",
|
|
1342
|
+
className,
|
|
1343
|
+
style
|
|
1344
|
+
}) {
|
|
1345
|
+
const ground = GROUNDS[monogramGround(seed ?? name)] ?? GROUNDS[0];
|
|
1346
|
+
return /* @__PURE__ */ jsxs(
|
|
1347
|
+
"span",
|
|
1348
|
+
{
|
|
1349
|
+
"aria-hidden": true,
|
|
1350
|
+
className: cn(
|
|
1351
|
+
"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-semibold leading-none tracking-[-0.02em]",
|
|
1352
|
+
SIZES[size],
|
|
1353
|
+
ground.className,
|
|
1354
|
+
className
|
|
1355
|
+
),
|
|
1356
|
+
style: { background: ground.background, ...style },
|
|
1357
|
+
children: [
|
|
1358
|
+
/* @__PURE__ */ jsx(
|
|
1359
|
+
"span",
|
|
1360
|
+
{
|
|
1361
|
+
className: "absolute inset-0",
|
|
1362
|
+
style: {
|
|
1363
|
+
backgroundImage: `radial-gradient(circle, ${ground.dot} 0.9px, transparent 1.2px)`,
|
|
1364
|
+
backgroundSize: "6px 6px",
|
|
1365
|
+
maskImage: "radial-gradient(90% 90% at 100% 100%, black, transparent 75%)"
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
),
|
|
1369
|
+
/* @__PURE__ */ jsx("span", { className: "relative", children: monogramLetter(name) })
|
|
1370
|
+
]
|
|
1371
|
+
}
|
|
1372
|
+
);
|
|
1373
|
+
}
|
|
1301
1374
|
|
|
1302
|
-
export { Accent, ActivityList, BrowserFrame, CodeBlock, Container, CopyButton, DataTable, Display, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, KeyValueList, Lead, LoadingBlock, Notice, PackageCard, PageHeader, PageHero, PhoneFrame, ProgressSteps, Prose, Reveal, Sats, SatsFigure, ScrollStory, Section, SectionIntro, SplitBar, StatCard, StatGrid, StepGrid, Ticker, TruthTable, UsdApprox, satsText, sectionVariants, useCopy, useInView };
|
|
1375
|
+
export { Accent, ActivityList, BrowserFrame, CodeBlock, Container, CopyButton, DataTable, Display, DocHeader, DocLayout, EmptyLine, EmptyState, Eyebrow, FloatChip, Footnote, HashChip, KeyValueList, Lead, LoadingBlock, Monogram, Notice, PackageCard, PageHeader, PageHero, PhoneFrame, ProgressSteps, Prose, Reveal, Sats, SatsFigure, ScrollStory, Section, SectionIntro, SplitBar, StatCard, StatGrid, StepGrid, Ticker, TruthTable, UsdApprox, monogramGround, monogramLetter, satsText, sectionVariants, useCopy, useInView };
|
|
1303
1376
|
//# sourceMappingURL=components.mjs.map
|
|
1304
1377
|
//# sourceMappingURL=components.mjs.map
|