From 4c63656e6e82b90ec58a31156e5bb39dd5b56322 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:52 -0300 Subject: [PATCH 01/17] fix(button): use semantic danger-foreground and unify disabled opacity --- src/dashkit/Button/Button.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashkit/Button/Button.tsx b/src/dashkit/Button/Button.tsx index dca99859..7e29d61c 100644 --- a/src/dashkit/Button/Button.tsx +++ b/src/dashkit/Button/Button.tsx @@ -13,7 +13,7 @@ import type { StrictVariantProps } from '../utils/types'; import { Spinner } from '../Spinner/Spinner'; const buttonVariants = cva( - 'inline-flex font-medium items-center justify-center cursor-pointer whitespace-nowrap transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-transparent active:scale-[0.97] disabled:opacity-60 disabled:cursor-not-allowed disabled:pointer-events-none', + 'inline-flex font-medium items-center justify-center cursor-pointer whitespace-nowrap transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-transparent active:scale-[0.97] disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none', { variants: { variant: { @@ -46,7 +46,7 @@ const buttonVariants = cva( { variant: 'filled', color: 'danger', - className: 'ds-danger-gradient text-red-50 hover:brightness-120', + className: 'ds-danger-gradient text-danger-foreground hover:brightness-120', }, // outlined { From d894a0fd5fd45d433f79c88b9d636101b04933fa Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:53 -0300 Subject: [PATCH 02/17] feat(icon-button): add color variant and align hover states with Button --- src/dashkit/IconButton/IconButton.tsx | 64 +++++++++++++++++++++++---- 1 file changed, 56 insertions(+), 8 deletions(-) diff --git a/src/dashkit/IconButton/IconButton.tsx b/src/dashkit/IconButton/IconButton.tsx index 8b088d79..88801821 100644 --- a/src/dashkit/IconButton/IconButton.tsx +++ b/src/dashkit/IconButton/IconButton.tsx @@ -9,10 +9,14 @@ const iconButtonVariants = cva( { variants: { variant: { - filled: 'ds-primary-gradient text-primary-foreground border border-transparent ds-button-surface hover:brightness-105', - outlined: 'bg-card text-foreground border border-border ds-button-outlined-surface hover:bg-muted/60 hover:brightness-95 dark:hover:bg-muted/60 dark:hover:brightness-110', - soft: 'bg-secondary text-secondary-foreground border border-transparent ds-button-soft-surface hover:brightness-85 dark:hover:brightness-150', - ghost: 'bg-transparent text-muted-foreground border border-transparent hover:bg-accent hover:text-accent-foreground hover:brightness-95 dark:hover:brightness-110', + filled: 'border border-transparent ds-button-surface', + outlined: 'bg-card text-foreground border border-border ds-button-outlined-surface', + soft: 'border border-transparent ds-button-soft-surface', + ghost: 'bg-transparent border border-transparent', + }, + color: { + primary: '', + danger: '', }, size: { sm: 'size-7 text-xs', @@ -24,8 +28,51 @@ const iconButtonVariants = cva( false: 'rounded-md', }, }, + compoundVariants: [ + { + variant: 'filled', + color: 'primary', + className: 'ds-primary-gradient text-primary-foreground hover:brightness-105', + }, + { + variant: 'filled', + color: 'danger', + className: 'ds-danger-gradient text-danger-foreground hover:brightness-120', + }, + { + variant: 'outlined', + color: 'primary', + className: 'hover:bg-muted/60 dark:hover:bg-muted/60 dark:hover:brightness-110', + }, + { + variant: 'outlined', + color: 'danger', + className: 'bg-transparent text-ds-danger-600 border-ds-danger-400 hover:bg-ds-danger-50 dark:border-ds-danger-500 dark:text-ds-danger-400 dark:hover:bg-ds-danger-500/10 dark:hover:brightness-110', + }, + { + variant: 'soft', + color: 'primary', + className: 'bg-secondary text-secondary-foreground hover:brightness-90 dark:hover:brightness-125', + }, + { + variant: 'soft', + color: 'danger', + className: 'bg-ds-danger-600/10 text-ds-danger-600 hover:bg-ds-danger-600/20 dark:bg-ds-danger-500/20 dark:text-ds-danger-400 dark:hover:brightness-125', + }, + { + variant: 'ghost', + color: 'primary', + className: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground', + }, + { + variant: 'ghost', + color: 'danger', + className: 'text-ds-danger-600 hover:bg-ds-danger-600/10 dark:text-ds-danger-400 dark:hover:bg-ds-danger-500/20', + }, + ], defaultVariants: { variant: 'soft', + color: 'primary', size: 'md', rounded: false, }, @@ -33,6 +80,7 @@ const iconButtonVariants = cva( ); export type IconButtonVariant = 'filled' | 'outlined' | 'soft' | 'ghost'; +export type IconButtonColor = 'primary' | 'danger'; export type IconButtonSize = 'sm' | 'md' | 'lg'; type IconButtonBaseProps = Omit, 'rounded'> & { @@ -42,8 +90,8 @@ type IconButtonBaseProps = Omit, ' export type IconButtonProps = IconButtonBaseProps & ( - | (React.ButtonHTMLAttributes & { href?: never }) - | (React.AnchorHTMLAttributes & { href: string }) + | (Omit, 'color'> & { href?: never }) + | (Omit, 'color'> & { href: string }) ); /** @@ -55,12 +103,12 @@ export type IconButtonProps = IconButtonBaseProps & * ``` */ export const IconButton = forwardRef(function IconButton( - { className, variant = 'soft', size = 'md', icon, rounded = false, ...props }, + { className, variant = 'soft', color = 'primary', size = 'md', icon, rounded = false, ...props }, ref ) { const isLink = 'href' in props && props.href !== undefined; const classes = cn( - iconButtonVariants({ variant, size, rounded }), + iconButtonVariants({ variant, color, size, rounded }), 'disabled' in props && props.disabled && 'opacity-50 cursor-not-allowed pointer-events-none', className ); From 9dec07868cfffb559f47d1f691e2519860f71dd9 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:54 -0300 Subject: [PATCH 03/17] test(icon-button): cover danger color variant --- src/dashkit/IconButton/IconButton.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dashkit/IconButton/IconButton.test.tsx b/src/dashkit/IconButton/IconButton.test.tsx index 663c63cd..9fcff758 100644 --- a/src/dashkit/IconButton/IconButton.test.tsx +++ b/src/dashkit/IconButton/IconButton.test.tsx @@ -43,6 +43,13 @@ describe('IconButton', () => { expect(button).toHaveClass('border-border'); }); + it('applies color styles correctly', () => { + render(} variant="filled" color="danger" />); + const button = screen.getByRole('button'); + expect(button).toHaveClass('ds-danger-gradient'); + expect(button).toHaveClass('text-danger-foreground'); + }); + it('applies size modifiers correctly', () => { const { rerender } = render(} size="sm" />); let button = screen.getByRole('button'); From fe7e778e7d7b5281bce9f41fc61e81a8fb6d404a Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:55 -0300 Subject: [PATCH 04/17] fix(sidebar): omit native color prop on SidebarTriggerProps --- src/dashkit/Sidebar/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashkit/Sidebar/Sidebar.tsx b/src/dashkit/Sidebar/Sidebar.tsx index 90c43055..f669802c 100644 --- a/src/dashkit/Sidebar/Sidebar.tsx +++ b/src/dashkit/Sidebar/Sidebar.tsx @@ -222,7 +222,7 @@ export const Sidebar = React.forwardRef( Sidebar.displayName = 'Sidebar'; -export interface SidebarTriggerProps extends React.ButtonHTMLAttributes { +export interface SidebarTriggerProps extends Omit, 'color'> { icon?: React.ReactNode; /** @default 'sm' */ size?: 'sm' | 'md' | 'lg'; From add22455045b6b08dc46e95f4a1a5028edcfcb60 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:56 -0300 Subject: [PATCH 05/17] fix(chip): add focus-visible ring styles for interactive chips --- src/dashkit/Chip/Chip.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashkit/Chip/Chip.tsx b/src/dashkit/Chip/Chip.tsx index 9bfeec80..80c6e7b9 100644 --- a/src/dashkit/Chip/Chip.tsx +++ b/src/dashkit/Chip/Chip.tsx @@ -24,7 +24,7 @@ const chipVariants = cva( info: '', }, interactive: { - true: 'cursor-pointer active:scale-[0.97]', + true: 'cursor-pointer active:scale-[0.97] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-transparent', false: 'cursor-default', }, disabled: { @@ -153,7 +153,7 @@ export const Chip = React.forwardRef From 7a9aa10ad1fc50370763b58c23042c1bc280de86 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:56 -0300 Subject: [PATCH 06/17] fix(divider): use semantic bg-border token for solid dividers --- src/dashkit/Divider/Divider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashkit/Divider/Divider.tsx b/src/dashkit/Divider/Divider.tsx index dadf85ef..8acf9369 100644 --- a/src/dashkit/Divider/Divider.tsx +++ b/src/dashkit/Divider/Divider.tsx @@ -10,7 +10,7 @@ const dividerVariants = cva('shrink-0 border-border', { vertical: 'h-auto self-stretch', }, variant: { - solid: 'bg-ds-200 dark:bg-ds-800', + solid: 'bg-border', dashed: 'bg-transparent border-dashed', dotted: 'bg-transparent border-dotted', }, @@ -46,7 +46,7 @@ const dividerVariants = cva('shrink-0 border-border', { const dividerLineVariants = cva('flex-1 border-border', { variants: { variant: { - solid: 'h-[1px] bg-ds-200 dark:bg-ds-800', + solid: 'h-[1px] bg-border', dashed: 'bg-transparent border-t border-dashed', dotted: 'bg-transparent border-t border-dotted', }, From 8d7c81075699073fd8d100190019c8d0b2186ecf Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:57 -0300 Subject: [PATCH 07/17] fix(input): unify error focus ring token --- src/dashkit/Input/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashkit/Input/Input.tsx b/src/dashkit/Input/Input.tsx index 121d2054..58bcc80b 100644 --- a/src/dashkit/Input/Input.tsx +++ b/src/dashkit/Input/Input.tsx @@ -12,7 +12,7 @@ const inputWrapperVariants = cva( lg: '', }, error: { - true: 'border-ds-danger-500/50 focus-within:border-ds-danger-500 focus-within:ring-ds-danger-50 dark:border-ds-danger-500/30 dark:focus-within:border-ds-danger-500/50 dark:focus-within:ring-ds-danger-500/10', + true: 'border-ds-danger-500/50 focus-within:border-ds-danger-500 focus-within:ring-danger/20 dark:border-ds-danger-500/30 dark:focus-within:border-ds-danger-500/50', false: '', }, disabled: { From 245f072caef30d8bd54e76d49c8c4cf3f795ff06 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:58 -0300 Subject: [PATCH 08/17] fix(textarea): align label, helper typography and error focus ring --- src/dashkit/Textarea/Textarea.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dashkit/Textarea/Textarea.tsx b/src/dashkit/Textarea/Textarea.tsx index d35200b4..79808298 100644 --- a/src/dashkit/Textarea/Textarea.tsx +++ b/src/dashkit/Textarea/Textarea.tsx @@ -36,7 +36,7 @@ export const Textarea = forwardRef( @@ -69,7 +69,7 @@ export const Textarea = forwardRef( 'resize-none min-h-[100px]', autoGrow && 'overflow-hidden', error - ? 'border-ds-danger-500/50 focus:border-ds-danger-500 focus:ring-ds-danger-50 dark:border-ds-danger-500/30 dark:focus:border-ds-danger-500/50 dark:focus:ring-ds-danger-500/10' + ? 'border-ds-danger-500/50 focus:border-ds-danger-500 focus:ring-danger/20 dark:border-ds-danger-500/30 dark:focus:border-ds-danger-500/50' : '', className )} @@ -79,7 +79,7 @@ export const Textarea = forwardRef( data-slot="helper" id={messageId} className={cn( - 'text-[12px] ml-1 tracking-tight', + 'text-xs ml-1 tracking-tight', error ? 'text-ds-danger-600 dark:text-ds-danger-400' : 'text-muted-foreground' From f8ce3abec039b3898bf925b9531a84bbc34c90c6 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:31:59 -0300 Subject: [PATCH 09/17] fix(select): use focus-visible ring and semantic error ring --- src/dashkit/Select/Select.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dashkit/Select/Select.tsx b/src/dashkit/Select/Select.tsx index a0dc7663..69151a9a 100644 --- a/src/dashkit/Select/Select.tsx +++ b/src/dashkit/Select/Select.tsx @@ -12,7 +12,7 @@ export interface SelectOption { } const selectTriggerVariants = cva( - 'w-full text-left flex items-center justify-between gap-2 bg-input-bg text-input-fg border border-input-border ds-input-surface ds-rounded outline-none transition-all duration-200 focus:border-input-focus focus:ring-2 focus:ring-input-focus/20 disabled:cursor-not-allowed disabled:opacity-50', + 'w-full text-left flex items-center justify-between gap-2 bg-input-bg text-input-fg border border-input-border ds-input-surface ds-rounded outline-none transition-all duration-200 focus-visible:border-input-focus focus-visible:ring-2 focus-visible:ring-input-focus/20 disabled:cursor-not-allowed disabled:opacity-50', { variants: { size: { @@ -21,7 +21,7 @@ const selectTriggerVariants = cva( lg: 'h-11 text-base px-4', }, error: { - true: 'border-ds-danger-500/50 focus:border-ds-danger-500 focus:ring-ds-danger-50 dark:border-ds-danger-500/30 dark:focus:border-ds-danger-500/50 dark:focus:ring-ds-danger-500/10', + true: 'border-ds-danger-500/50 focus-visible:border-ds-danger-500 focus-visible:ring-danger/20 dark:border-ds-danger-500/30 dark:focus-visible:border-ds-danger-500/50', false: '', }, isOpen: { From 03c032e35eb2337b477cb6b685a92633915c8a65 Mon Sep 17 00:00:00 2001 From: Carlos Costa Date: Sat, 14 Nov 2026 20:32:00 -0300 Subject: [PATCH 10/17] fix(otp-input): align label typography with form primitives --- src/dashkit/OtpInput/OtpInput.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dashkit/OtpInput/OtpInput.tsx b/src/dashkit/OtpInput/OtpInput.tsx index 0c963867..17c25a4d 100644 --- a/src/dashkit/OtpInput/OtpInput.tsx +++ b/src/dashkit/OtpInput/OtpInput.tsx @@ -48,7 +48,7 @@ export function OtpInput({ aria-label={label ? undefined : 'One-time code'} > {label && ( -