@orangecheck/design 0.7.2 → 0.7.4
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.js +10 -1
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +10 -1
- package/dist/components.mjs.map +1 -1
- package/dist/composites.js +10 -1
- package/dist/composites.js.map +1 -1
- package/dist/composites.mjs +10 -1
- package/dist/composites.mjs.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +3 -1
- package/dist/primitives.d.ts +3 -1
- package/dist/primitives.js +22 -1
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +22 -1
- package/dist/primitives.mjs.map +1 -1
- package/package.json +1 -1
package/dist/primitives.d.mts
CHANGED
|
@@ -268,10 +268,11 @@ interface StatusPillProps {
|
|
|
268
268
|
label: string;
|
|
269
269
|
tone?: StatusTone;
|
|
270
270
|
variant?: StatusPillVariant;
|
|
271
|
+
filled?: boolean;
|
|
271
272
|
icon?: ReactNode;
|
|
272
273
|
className?: string;
|
|
273
274
|
}
|
|
274
|
-
declare function StatusPill({ label, tone, variant, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
275
|
+
declare function StatusPill({ label, tone, variant, filled, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
275
276
|
interface StatusPillSpec {
|
|
276
277
|
tone: StatusTone;
|
|
277
278
|
label?: string;
|
|
@@ -279,6 +280,7 @@ interface StatusPillSpec {
|
|
|
279
280
|
}
|
|
280
281
|
declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>, options?: {
|
|
281
282
|
variant?: StatusPillVariant;
|
|
283
|
+
filled?: boolean;
|
|
282
284
|
fallbackTone?: StatusTone;
|
|
283
285
|
}): (props: {
|
|
284
286
|
status: S;
|
package/dist/primitives.d.ts
CHANGED
|
@@ -268,10 +268,11 @@ interface StatusPillProps {
|
|
|
268
268
|
label: string;
|
|
269
269
|
tone?: StatusTone;
|
|
270
270
|
variant?: StatusPillVariant;
|
|
271
|
+
filled?: boolean;
|
|
271
272
|
icon?: ReactNode;
|
|
272
273
|
className?: string;
|
|
273
274
|
}
|
|
274
|
-
declare function StatusPill({ label, tone, variant, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
275
|
+
declare function StatusPill({ label, tone, variant, filled, icon, className, }: StatusPillProps): react_jsx_runtime.JSX.Element;
|
|
275
276
|
interface StatusPillSpec {
|
|
276
277
|
tone: StatusTone;
|
|
277
278
|
label?: string;
|
|
@@ -279,6 +280,7 @@ interface StatusPillSpec {
|
|
|
279
280
|
}
|
|
280
281
|
declare function makeStatusPill<S extends string>(map: Record<S, StatusPillSpec>, options?: {
|
|
281
282
|
variant?: StatusPillVariant;
|
|
283
|
+
filled?: boolean;
|
|
282
284
|
fallbackTone?: StatusTone;
|
|
283
285
|
}): (props: {
|
|
284
286
|
status: S;
|
package/dist/primitives.js
CHANGED
|
@@ -1400,7 +1400,16 @@ function StatBlock({ label, value, sub, delta, tone = "default", className }) {
|
|
|
1400
1400
|
const toneClass = tone === "success" ? "text-success" : tone === "warning" ? "text-warning" : tone === "destructive" ? "text-destructive" : "text-foreground";
|
|
1401
1401
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
1402
1402
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "label-mono text-[10px]", children: label }),
|
|
1403
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1403
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1404
|
+
"span",
|
|
1405
|
+
{
|
|
1406
|
+
className: cn(
|
|
1407
|
+
"font-display text-2xl font-bold tracking-tight tabular-nums",
|
|
1408
|
+
toneClass
|
|
1409
|
+
),
|
|
1410
|
+
children: value
|
|
1411
|
+
}
|
|
1412
|
+
),
|
|
1404
1413
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-2", children: [
|
|
1405
1414
|
sub && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-mono text-[11px] tracking-wide lowercase", children: sub }),
|
|
1406
1415
|
delta && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1453,10 +1462,19 @@ var BORDER_TONE = {
|
|
|
1453
1462
|
primary: "border-primary/40 text-primary",
|
|
1454
1463
|
info: "border-info/40 text-info"
|
|
1455
1464
|
};
|
|
1465
|
+
var FILL_TONE = {
|
|
1466
|
+
success: "bg-success/10",
|
|
1467
|
+
warning: "bg-warning/10",
|
|
1468
|
+
destructive: "bg-destructive/10",
|
|
1469
|
+
muted: "bg-muted/30",
|
|
1470
|
+
primary: "bg-primary/10",
|
|
1471
|
+
info: "bg-info/10"
|
|
1472
|
+
};
|
|
1456
1473
|
function StatusPill({
|
|
1457
1474
|
label,
|
|
1458
1475
|
tone = "muted",
|
|
1459
1476
|
variant = "plain",
|
|
1477
|
+
filled = false,
|
|
1460
1478
|
icon,
|
|
1461
1479
|
className
|
|
1462
1480
|
}) {
|
|
@@ -1467,6 +1485,7 @@ function StatusPill({
|
|
|
1467
1485
|
className: cn(
|
|
1468
1486
|
"inline-flex items-center gap-1.5 border px-1.5 py-0.5 font-mono text-[9px] tracking-widest uppercase",
|
|
1469
1487
|
BORDER_TONE[tone],
|
|
1488
|
+
filled && FILL_TONE[tone],
|
|
1470
1489
|
className
|
|
1471
1490
|
),
|
|
1472
1491
|
children: [
|
|
@@ -1493,6 +1512,7 @@ function StatusPill({
|
|
|
1493
1512
|
}
|
|
1494
1513
|
function makeStatusPill(map, options) {
|
|
1495
1514
|
const variant = options?.variant ?? "plain";
|
|
1515
|
+
const filled = options?.filled ?? false;
|
|
1496
1516
|
const fallbackTone = options?.fallbackTone ?? "muted";
|
|
1497
1517
|
function DomainStatusPill({ status, className }) {
|
|
1498
1518
|
const spec = map[status];
|
|
@@ -1502,6 +1522,7 @@ function makeStatusPill(map, options) {
|
|
|
1502
1522
|
tone: spec?.tone ?? fallbackTone,
|
|
1503
1523
|
label: spec?.label ?? status,
|
|
1504
1524
|
icon: spec?.icon,
|
|
1525
|
+
filled,
|
|
1505
1526
|
variant,
|
|
1506
1527
|
className
|
|
1507
1528
|
}
|