@orangecheck/design 0.7.2 → 0.7.3
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/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -0
- 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 +12 -0
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +12 -0
- 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
|
@@ -1453,10 +1453,19 @@ var BORDER_TONE = {
|
|
|
1453
1453
|
primary: "border-primary/40 text-primary",
|
|
1454
1454
|
info: "border-info/40 text-info"
|
|
1455
1455
|
};
|
|
1456
|
+
var FILL_TONE = {
|
|
1457
|
+
success: "bg-success/10",
|
|
1458
|
+
warning: "bg-warning/10",
|
|
1459
|
+
destructive: "bg-destructive/10",
|
|
1460
|
+
muted: "bg-muted/30",
|
|
1461
|
+
primary: "bg-primary/10",
|
|
1462
|
+
info: "bg-info/10"
|
|
1463
|
+
};
|
|
1456
1464
|
function StatusPill({
|
|
1457
1465
|
label,
|
|
1458
1466
|
tone = "muted",
|
|
1459
1467
|
variant = "plain",
|
|
1468
|
+
filled = false,
|
|
1460
1469
|
icon,
|
|
1461
1470
|
className
|
|
1462
1471
|
}) {
|
|
@@ -1467,6 +1476,7 @@ function StatusPill({
|
|
|
1467
1476
|
className: cn(
|
|
1468
1477
|
"inline-flex items-center gap-1.5 border px-1.5 py-0.5 font-mono text-[9px] tracking-widest uppercase",
|
|
1469
1478
|
BORDER_TONE[tone],
|
|
1479
|
+
filled && FILL_TONE[tone],
|
|
1470
1480
|
className
|
|
1471
1481
|
),
|
|
1472
1482
|
children: [
|
|
@@ -1493,6 +1503,7 @@ function StatusPill({
|
|
|
1493
1503
|
}
|
|
1494
1504
|
function makeStatusPill(map, options) {
|
|
1495
1505
|
const variant = options?.variant ?? "plain";
|
|
1506
|
+
const filled = options?.filled ?? false;
|
|
1496
1507
|
const fallbackTone = options?.fallbackTone ?? "muted";
|
|
1497
1508
|
function DomainStatusPill({ status, className }) {
|
|
1498
1509
|
const spec = map[status];
|
|
@@ -1502,6 +1513,7 @@ function makeStatusPill(map, options) {
|
|
|
1502
1513
|
tone: spec?.tone ?? fallbackTone,
|
|
1503
1514
|
label: spec?.label ?? status,
|
|
1504
1515
|
icon: spec?.icon,
|
|
1516
|
+
filled,
|
|
1505
1517
|
variant,
|
|
1506
1518
|
className
|
|
1507
1519
|
}
|