@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/index.js
CHANGED
|
@@ -1826,10 +1826,19 @@ var BORDER_TONE = {
|
|
|
1826
1826
|
primary: "border-primary/40 text-primary",
|
|
1827
1827
|
info: "border-info/40 text-info"
|
|
1828
1828
|
};
|
|
1829
|
+
var FILL_TONE = {
|
|
1830
|
+
success: "bg-success/10",
|
|
1831
|
+
warning: "bg-warning/10",
|
|
1832
|
+
destructive: "bg-destructive/10",
|
|
1833
|
+
muted: "bg-muted/30",
|
|
1834
|
+
primary: "bg-primary/10",
|
|
1835
|
+
info: "bg-info/10"
|
|
1836
|
+
};
|
|
1829
1837
|
function StatusPill({
|
|
1830
1838
|
label,
|
|
1831
1839
|
tone = "muted",
|
|
1832
1840
|
variant = "plain",
|
|
1841
|
+
filled = false,
|
|
1833
1842
|
icon,
|
|
1834
1843
|
className
|
|
1835
1844
|
}) {
|
|
@@ -1840,6 +1849,7 @@ function StatusPill({
|
|
|
1840
1849
|
className: cn(
|
|
1841
1850
|
"inline-flex items-center gap-1.5 border px-1.5 py-0.5 font-mono text-[9px] tracking-widest uppercase",
|
|
1842
1851
|
BORDER_TONE[tone],
|
|
1852
|
+
filled && FILL_TONE[tone],
|
|
1843
1853
|
className
|
|
1844
1854
|
),
|
|
1845
1855
|
children: [
|
|
@@ -1866,6 +1876,7 @@ function StatusPill({
|
|
|
1866
1876
|
}
|
|
1867
1877
|
function makeStatusPill(map, options) {
|
|
1868
1878
|
const variant = options?.variant ?? "plain";
|
|
1879
|
+
const filled = options?.filled ?? false;
|
|
1869
1880
|
const fallbackTone = options?.fallbackTone ?? "muted";
|
|
1870
1881
|
function DomainStatusPill({ status, className }) {
|
|
1871
1882
|
const spec = map[status];
|
|
@@ -1875,6 +1886,7 @@ function makeStatusPill(map, options) {
|
|
|
1875
1886
|
tone: spec?.tone ?? fallbackTone,
|
|
1876
1887
|
label: spec?.label ?? status,
|
|
1877
1888
|
icon: spec?.icon,
|
|
1889
|
+
filled,
|
|
1878
1890
|
variant,
|
|
1879
1891
|
className
|
|
1880
1892
|
}
|