@umituz/web-design-system 4.30.0 → 4.30.1

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": "@umituz/web-design-system",
3
- "version": "4.30.0",
3
+ "version": "4.30.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Web Design System - Tailwind v4 authored, precompiled CSS shipped. Atomic Design components (Atoms, Molecules, Organisms, Templates) for React applications.",
@@ -11,7 +11,7 @@ export interface SparklineProps extends Omit<SVGAttributes<SVGSVGElement>, 'data
11
11
  data: readonly number[];
12
12
  width?: number;
13
13
  height?: number;
14
- tone?: 'primary' | 'secondary' | 'success' | 'warning' | 'destructive' | 'info' | 'muted' | 'violet';
14
+ tone?: 'primary' | 'secondary' | 'success' | 'warning' | 'destructive' | 'info' | 'muted' | 'violet' | 'danger' | 'neutral';
15
15
  }
16
16
 
17
17
  const toneClasses: Record<NonNullable<SparklineProps['tone']>, string> = {
@@ -23,6 +23,8 @@ const toneClasses: Record<NonNullable<SparklineProps['tone']>, string> = {
23
23
  info: 'text-info',
24
24
  muted: 'text-muted-foreground',
25
25
  violet: 'text-violet-600',
26
+ danger: 'text-destructive',
27
+ neutral: 'text-muted-foreground',
26
28
  };
27
29
 
28
30
  export const Sparkline = forwardRef<SVGSVGElement, SparklineProps>(
@@ -10,7 +10,16 @@ import type { BaseProps } from '../../domain/types';
10
10
  import { Card, CardContent } from './Card';
11
11
  import { Sparkline } from '../atoms/Sparkline';
12
12
 
13
- export type KpiIconTone = 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'muted' | 'violet';
13
+ export type KpiIconTone =
14
+ | 'primary'
15
+ | 'success'
16
+ | 'warning'
17
+ | 'destructive'
18
+ | 'info'
19
+ | 'muted'
20
+ | 'violet'
21
+ | 'danger'
22
+ | 'neutral';
14
23
 
15
24
  export interface KpiDelta {
16
25
  value: ReactNode;
@@ -42,6 +51,8 @@ const toneTextClasses: Record<KpiIconTone, string> = {
42
51
  info: 'text-info bg-info/10',
43
52
  muted: 'text-muted-foreground bg-muted',
44
53
  violet: 'text-violet-600 bg-violet-500/10',
54
+ danger: 'text-destructive bg-destructive/10',
55
+ neutral: 'text-muted-foreground bg-muted',
45
56
  };
46
57
 
47
58
  export const KpiCard = forwardRef<HTMLDivElement, KpiCardProps>(
@@ -69,7 +80,7 @@ export const KpiCard = forwardRef<HTMLDivElement, KpiCardProps>(
69
80
  <div className="flex items-start justify-between gap-3">
70
81
  <div className="min-w-0">
71
82
  <p className="truncate text-sm font-medium text-muted-foreground">{label}</p>
72
- <p className={cn('mt-1 text-2xl font-semibold leading-none tracking-tight', valueTone === 'success' && 'text-success', valueTone === 'warning' && 'text-warning', valueTone === 'destructive' && 'text-destructive', valueTone === 'info' && 'text-info', valueTone === 'violet' && 'text-violet-600', valueTone === 'muted' && 'text-muted-foreground')}>{value}</p>
83
+ <p className={cn('mt-1 text-2xl font-semibold leading-none tracking-tight', valueTone === 'success' && 'text-success', valueTone === 'warning' && 'text-warning', (valueTone === 'destructive' || valueTone === 'danger') && 'text-destructive', valueTone === 'info' && 'text-info', valueTone === 'violet' && 'text-violet-600', (valueTone === 'muted' || valueTone === 'neutral') && 'text-muted-foreground')}>{value}</p>
73
84
  </div>
74
85
  {icon !== undefined && (
75
86
  <span className={cn('flex h-9 w-9 shrink-0 items-center justify-center rounded-lg [&_svg]:size-4', toneTextClasses[iconTone])}>