@motor-hero/ui-kit 0.42.0 → 0.43.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@motor-hero/ui-kit",
3
- "version": "0.42.0",
3
+ "version": "0.43.0",
4
4
  "description": "Componentes React reutilizáveis para o ecossistema MotorHero — shadcn/ui + Tailwind CSS v4",
5
5
  "author": "MotorHero",
6
6
  "license": "UNLICENSED",
@@ -0,0 +1,43 @@
1
+ import type { CSSProperties, ReactNode } from "react"
2
+ import { cn } from "../lib/utils"
3
+
4
+ export interface HighlightPillProps {
5
+ /** Pill background. Falls back to the neutral/muted status token when omitted. */
6
+ backgroundColor?: string
7
+ /** Pill text color. Falls back to the neutral/muted status token when omitted. */
8
+ textColor?: string
9
+ className?: string
10
+ children: ReactNode
11
+ }
12
+
13
+ /**
14
+ * Pílula de cor livre — `backgroundColor`/`textColor` vêm do consumidor, ao
15
+ * invés de um enum fechado de variantes como o `StatusBadge`. Sem eles, cai
16
+ * no mesmo tom neutro do `StatusBadge` (`--status-neutral-*`), servindo como
17
+ * o "default muted" de qualquer feature que atribua cor por entidade (ex.:
18
+ * cor de destaque por usuário admin, ADR 0081 do workspace IMMA).
19
+ */
20
+ export function HighlightPill({
21
+ backgroundColor,
22
+ textColor,
23
+ className,
24
+ children,
25
+ }: HighlightPillProps) {
26
+ const style: CSSProperties = {
27
+ backgroundColor:
28
+ backgroundColor ?? "var(--status-neutral-surface, #f3f4f6)",
29
+ color: textColor ?? "var(--status-neutral-text, #374151)",
30
+ }
31
+
32
+ return (
33
+ <span
34
+ style={style}
35
+ className={cn(
36
+ "inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium",
37
+ className,
38
+ )}
39
+ >
40
+ {children}
41
+ </span>
42
+ )
43
+ }
package/src/index.ts CHANGED
@@ -31,6 +31,8 @@ export {
31
31
  export type { FormDialogProps, FormDialogSize } from "./components/form-dialog";
32
32
  export { FormDialog, FormDialogLayout } from "./components/form-dialog";
33
33
  export { FormField } from "./components/form-field";
34
+ export type { HighlightPillProps } from "./components/highlight-pill";
35
+ export { HighlightPill } from "./components/highlight-pill";
34
36
  export { MobileCardList } from "./components/mobile-card-list";
35
37
  // Components
36
38
  export { ModeToggle } from "./components/mode-toggle";