Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions packages/demo/src/content/components/resource-badge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@ import { ResourceBadge, PanelLabel } from "@eqtylab/equality";

## Overview

---

The `ResourceBadge` component is a specialized badge wrapper that provides predefined configurations for displaying different resource types as defined by [integrity-py](https://github.com/eqtylab/integrity-py). It automatically applies appropriate icons, colors, and labels.

## Usage

---

Import the component:

```tsx
Expand All @@ -30,8 +26,6 @@ Basic usage requires only a `type` prop:

## Variants

---

<div className="grid grid-cols-[auto_auto_auto] gap-6">
<div className="flex flex-col items-start space-y-3">
<PanelLabel label="With Icons (default)" />
Expand All @@ -53,6 +47,8 @@ Basic usage requires only a `type` prop:
<ResourceBadge type="system-prompt" />
<ResourceBadge type="reasoning" />
<ResourceBadge type="token" />
<ResourceBadge type="certificate" />
<ResourceBadge type="credential" />
<ResourceBadge type="tool" />
<ResourceBadge type="unknown" />
</div>
Expand All @@ -76,6 +72,8 @@ Basic usage requires only a `type` prop:
<ResourceBadge type="system-prompt" display="text-only" />
<ResourceBadge type="reasoning" display="text-only" />
<ResourceBadge type="token" display="text-only" />
<ResourceBadge type="certificate" display="text-only" />
<ResourceBadge type="credential" display="text-only" />
<ResourceBadge type="tool" display="text-only" />
<ResourceBadge type="unknown" display="text-only" />
</div>
Expand All @@ -99,15 +97,15 @@ Basic usage requires only a `type` prop:
<ResourceBadge type="system-prompt" display="icon-only" />
<ResourceBadge type="reasoning" display="icon-only" />
<ResourceBadge type="token" display="icon-only" />
<ResourceBadge type="certificate" display="icon-only" />
<ResourceBadge type="credential" display="icon-only" />
<ResourceBadge type="tool" display="icon-only" />
<ResourceBadge type="unknown" display="icon-only" />
</div>
</div>

## Display Options

---

### With Icon and Label (Default)

The default display shows both icon and label:
Expand All @@ -134,9 +132,7 @@ Show only the text by setting `display` to `"text-only"`:

## Props

---

| Name | Description | Type | Default | Required |
| --------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| `type` | The resource type that determines the badge variant, icon, and label. | `"agent"`, `"benchmark"`, `"benchmark-result"`, `"binary"`, `"code"`, `"compute"`, `"config"`, `"database"`, `"dataset"`, `"document"`, `"guardrail"`, `"media"`, `"model"`, `"prompt"`, `"reasoning"`, `"skill"`, `"system-prompt"`, `"token"`, `"tool"`, `"unknown"` | | ✅ |
| `display` | Controls what elements are displayed: icon, text, or both. | `"both"`, `"text-only"`, `"icon-only"` | `"both"` | ❌ |
| Name | Description | Type | Default | Required |
| --------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | -------- |
| `type` | The resource type that determines the badge variant, icon, and label. | `"agent"`, `"benchmark"`, `"benchmark-result"`, `"binary"`, `"certificate"`, `"code"`, `"compute"`, `"config"`, `"credential"`, `"database"`, `"dataset"`, `"document"`, `"guardrail"`, `"media"`, `"model"`, `"prompt"`, `"reasoning"`, `"skill"`, `"system-prompt"`, `"token"`, `"tool"`, `"unknown"` | | ✅ |
| `display` | Controls what elements are displayed: icon, text, or both. | `"both"`, `"text-only"`, `"icon-only"` | `"both"` | ❌ |
120 changes: 80 additions & 40 deletions packages/tokens/equality-tokens.json
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,14 @@
"hex": "#9C652D"
}
},
"certificate": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.2534, 0.2782, 0.09737],
"hex": "#414719"
}
},
"code": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -567,6 +575,14 @@
"hex": "#244560"
}
},
"credential": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.2534, 0.2782, 0.09737],
"hex": "#414719"
}
},
"database": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -599,14 +615,6 @@
"hex": "#5C2165"
}
},
"inference": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.1689, 0.3045, 0.136],
"hex": "#2B4E23"
}
},
"media": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -713,6 +721,14 @@
"hex": "#EFD2B7"
}
},
"certificate": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.8033, 0.8266, 0.7044],
"hex": "#CDD3B4"
}
},
"code": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -745,6 +761,14 @@
"hex": "#B4D3E7"
}
},
"credential": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.8033, 0.8266, 0.7044],
"hex": "#CDD3B4"
}
},
"database": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -777,14 +801,6 @@
"hex": "#CD94D6"
}
},
"inference": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.7403, 0.8486, 0.7417],
"hex": "#BDD8BD"
}
},
"media": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2319,6 +2335,14 @@
"hex": "#EFD2B7"
}
},
"certificate": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.8033, 0.8266, 0.7044],
"hex": "#CDD3B4"
}
},
"code": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2351,6 +2375,14 @@
"hex": "#B4D3E7"
}
},
"credential": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.8033, 0.8266, 0.7044],
"hex": "#CDD3B4"
}
},
"database": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2383,14 +2415,6 @@
"hex": "#E2BEE8"
}
},
"inference": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.7403, 0.8486, 0.7417],
"hex": "#BDD8BD"
}
},
"media": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2488,6 +2512,14 @@
"hex": "#CD8338"
}
},
"certificate": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.4451, 0.4851, 0.1956],
"hex": "#727C32"
}
},
"code": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2520,6 +2552,14 @@
"hex": "#357AA5"
}
},
"credential": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.4451, 0.4851, 0.1956],
"hex": "#727C32"
}
},
"database": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2552,14 +2592,6 @@
"hex": "#A035B1"
}
},
"inference": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.2946, 0.5328, 0.2433],
"hex": "#4B883E"
}
},
"media": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2641,6 +2673,14 @@
"hex": "#432D17"
}
},
"certificate": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.1652, 0.183, 0.0523],
"hex": "#2A2F0D"
}
},
"code": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2673,6 +2713,14 @@
"hex": "#192D40"
}
},
"credential": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.1652, 0.183, 0.0523],
"hex": "#2A2F0D"
}
},
"database": {
"$type": "color",
"$value": {
Expand Down Expand Up @@ -2705,14 +2753,6 @@
"hex": "#3C1742"
}
},
"inference": {
"$type": "color",
"$value": {
"colorSpace": "display-p3",
"components": [0.1097, 0.1998, 0.08667],
"hex": "#1C3316"
}
},
"media": {
"$type": "color",
"$value": {
Expand Down
45 changes: 37 additions & 8 deletions packages/tokens/equality-tokens.pinwheel
Original file line number Diff line number Diff line change
Expand Up @@ -1909,9 +1909,16 @@
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Inference</name>
<name>Certificate</name>
<type>3</type>
<referencedItemId>E1948874-0BDB-4E45-A49B-50B04FC79580</referencedItemId>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>4</subIndex>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Credential</name>
<type>3</type>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>4</subIndex>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
Expand Down Expand Up @@ -2132,13 +2139,24 @@
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Inference</name>
<name>Certificate</name>
<type>3</type>
<typeDark>3</typeDark>
<appearance>lightanddark</appearance>
<referencedItemId>E1948874-0BDB-4E45-A49B-50B04FC79580</referencedItemId>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>7</subIndex>
<referencedItemIdDark>E1948874-0BDB-4E45-A49B-50B04FC79580</referencedItemIdDark>
<referencedItemIdDark>736C6111-7CC7-4829-B456-29384906EF95</referencedItemIdDark>
<subIndexDark>1</subIndexDark>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Credential</name>
<type>3</type>
<typeDark>3</typeDark>
<appearance>lightanddark</appearance>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>7</subIndex>
<referencedItemIdDark>736C6111-7CC7-4829-B456-29384906EF95</referencedItemIdDark>
<subIndexDark>1</subIndexDark>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
Expand Down Expand Up @@ -2381,13 +2399,24 @@
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Inference</name>
<name>Certificate</name>
<type>3</type>
<typeDark>3</typeDark>
<appearance>lightanddark</appearance>
<referencedItemId>E1948874-0BDB-4E45-A49B-50B04FC79580</referencedItemId>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>1</subIndex>
<referencedItemIdDark>E1948874-0BDB-4E45-A49B-50B04FC79580</referencedItemIdDark>
<referencedItemIdDark>736C6111-7CC7-4829-B456-29384906EF95</referencedItemIdDark>
<subIndexDark>6</subIndexDark>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
<alias>
<name>Credential</name>
<type>3</type>
<typeDark>3</typeDark>
<appearance>lightanddark</appearance>
<referencedItemId>736C6111-7CC7-4829-B456-29384906EF95</referencedItemId>
<subIndex>1</subIndex>
<referencedItemIdDark>736C6111-7CC7-4829-B456-29384906EF95</referencedItemIdDark>
<subIndexDark>6</subIndexDark>
<buildGroupId>86B9D7D8-F74A-4CAE-B006-65451BBEDAB9</buildGroupId>
</alias>
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@eqtylab/equality",
"description": "EQTYLab's component and token-based design system",
"homepage": "https://equality.eqtylab.io/",
"version": "1.7.1",
"version": "1.7.2",
"license": "Apache-2.0",
"keywords": [
"component library",
Expand Down
Loading
Loading