diff --git a/.changeset/add-subtle-info-badge.md b/.changeset/add-subtle-info-badge.md new file mode 100644 index 00000000..32b055bd --- /dev/null +++ b/.changeset/add-subtle-info-badge.md @@ -0,0 +1,10 @@ +--- +"@tailor-platform/app-shell": patch +--- + +Add `info` and `subtle-info` badge variants for informational or in-progress status labels (blue palette, matching the existing `outline-info` dot color). Also extend the primitives demo to show all five outline variants (previously only `outline-success` was rendered). + +```tsx +New +In Progress +``` diff --git a/docs/components/badge.md b/docs/components/badge.md index 81163eb6..c0b5039f 100644 --- a/docs/components/badge.md +++ b/docs/components/badge.md @@ -20,9 +20,11 @@ import { Badge, type BadgeVariant, type BadgeOptions } from "@tailor-platform/ap Success Warning Error +Info Subtle Success Subtle Warning Subtle Error +Subtle Info ``` ## Variants @@ -37,9 +39,11 @@ Filled variants for high emphasis, plus subtle variants for lower-emphasis statu Pending Rejected Draft +New Matched Needs Attention Needs Review +In Progress ``` ### Outline Variants with Status Dots @@ -72,9 +76,11 @@ type BadgeVariant = | "warning" // Yellow | "error" // Red/destructive | "neutral" // Gray/secondary + | "info" // Blue | "subtle-success" // Low-emphasis green | "subtle-warning" // Low-emphasis yellow | "subtle-error" // Low-emphasis red/destructive + | "subtle-info" // Low-emphasis blue // Outline variants with status dots | "outline-success" | "outline-warning" @@ -196,9 +202,11 @@ function ProductBadge({ product }: { product: Product }) { | `warning` | ![Yellow badge] | Pending, in progress, attention needed | | `error` | ![Red badge] | Failed, rejected, critical | | `neutral` | ![Gray badge] | Draft, inactive, disabled | +| `info` | ![Blue badge] | Informational, new, in-progress | | `subtle-success` | ![Subtle green badge] | Low-emphasis completed or matched statuses | | `subtle-warning` | ![Subtle yellow badge] | Low-emphasis pending or attention states | | `subtle-error` | ![Subtle red badge] | Low-emphasis failures or exceptions | +| `subtle-info` | ![Subtle blue badge] | Low-emphasis informational or in-progress | ### Outline Variants diff --git a/examples/nextjs-app/src/modules/pages/primitives-demo.tsx b/examples/nextjs-app/src/modules/pages/primitives-demo.tsx index dff62ddf..7345af6a 100644 --- a/examples/nextjs-app/src/modules/pages/primitives-demo.tsx +++ b/examples/nextjs-app/src/modules/pages/primitives-demo.tsx @@ -95,16 +95,37 @@ export const primitiveComponentsDemoResource = defineResource({ -
- Default - Success - Warning - Error - Neutral - Subtle Success - Subtle Warning - Subtle Error - Outline +
+
+
Solid
+
+ Default + Success + Warning + Error + Neutral + Info +
+
+
+
Subtle
+
+ Subtle Success + Subtle Warning + Subtle Error + Subtle Info +
+
+
+
Outline
+
+ Outline Success + Outline Warning + Outline Error + Outline Info + Outline Neutral +
+
diff --git a/packages/core/src/components/badge.tsx b/packages/core/src/components/badge.tsx index 0a6f556a..03d84fe8 100644 --- a/packages/core/src/components/badge.tsx +++ b/packages/core/src/components/badge.tsx @@ -17,12 +17,15 @@ const badgeVariants = cva( "astw:border-transparent astw:bg-destructive astw:text-destructive-foreground astw:hover:bg-destructive/80", neutral: "astw:border-transparent astw:bg-secondary astw:text-secondary-foreground astw:hover:bg-secondary/80", + info: "astw:border-transparent astw:bg-blue-500 astw:text-white astw:hover:bg-blue-600", "subtle-success": "astw:border-transparent astw:bg-green-500/10 astw:text-green-700 astw:hover:bg-green-500/20 astw:dark:text-green-500", "subtle-warning": "astw:border-transparent astw:bg-yellow-500/10 astw:text-yellow-700 astw:hover:bg-yellow-500/20 astw:dark:text-yellow-500", "subtle-error": "astw:border-transparent astw:bg-destructive/10 astw:text-destructive astw:hover:bg-destructive/20", + "subtle-info": + "astw:border-transparent astw:bg-blue-500/10 astw:text-blue-700 astw:hover:bg-blue-500/20 astw:dark:text-blue-500", // Outline variants with status dots - matches Figma design "outline-success": "astw:gap-0.5 astw:pl-1.5 astw:pr-2 astw:border-border astw:bg-card astw:text-foreground",