Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
4c63656
fix(button): use semantic danger-foreground and unify disabled opacity
carllosnc Nov 14, 2026
d894a0f
feat(icon-button): add color variant and align hover states with Button
carllosnc Nov 14, 2026
9dec078
test(icon-button): cover danger color variant
carllosnc Nov 14, 2026
fe7e778
fix(sidebar): omit native color prop on SidebarTriggerProps
carllosnc Nov 14, 2026
add2245
fix(chip): add focus-visible ring styles for interactive chips
carllosnc Nov 14, 2026
7a9aa10
fix(divider): use semantic bg-border token for solid dividers
carllosnc Nov 14, 2026
8d7c810
fix(input): unify error focus ring token
carllosnc Nov 14, 2026
245f072
fix(textarea): align label, helper typography and error focus ring
carllosnc Nov 14, 2026
f8ce3ab
fix(select): use focus-visible ring and semantic error ring
carllosnc Nov 14, 2026
03c032e
fix(otp-input): align label typography with form primitives
carllosnc Nov 14, 2026
30c28cc
fix(copy-field): align label typography with form primitives
carllosnc Nov 14, 2026
9c11255
fix(checkbox): unify disabled opacity to 50%
carllosnc Nov 14, 2026
e1eeb02
fix(radio): unify disabled opacity to 50%
carllosnc Nov 14, 2026
55b8c8c
test(radio): update disabled opacity assertion to opacity-50
carllosnc Nov 14, 2026
84aaba8
fix(switch): use semantic track/thumb tokens and unify disabled opacity
carllosnc Nov 14, 2026
f581086
fix(slider): align description typography, focus-visible ring, and se…
carllosnc Nov 14, 2026
524a6f2
chore(registry): regenerate registry metadata
carllosnc Nov 14, 2026
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
18 changes: 9 additions & 9 deletions public/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
"useAreaChart"
],
"propsDefinitions": [
"export interface AreaChartProps extends React.ComponentPropsWithoutRef<'div'> {\n data: Record<string, string | number>[];\n series: AreaChartSeries[];\n /** @default '100%' */\n height?: number | string;\n /** @default true */\n showGrid?: boolean;\n /** @default true */\n showLabels?: boolean;\n /** @default true */\n showTooltip?: boolean;\n /** @default true */\n animate?: boolean;\n /** @default 'linear' */\n curve?: 'linear' | 'smooth';\n /** @default true */\n showDots?: boolean | 'hover';\n /** @default false */\n showYAxis?: boolean;\n /** @default false */\n showLegend?: boolean;\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\n labelKey?: string;\n /** Custom formatter for Y-axis ticks and tooltip values. */\n valueFormatter?: (value: number) => string;\n /** Accessible label for the chart SVG. @default 'Area chart' */\n ariaLabel?: string;\n}\n\n/**\n * Prop-driven (`data`, `series`) responsive SVG area chart with grid, labels, and interactive tooltips.\n *\n * @example\n * ```tsx\n * <AreaChart\n * data={[{ label: 'Jan', revenue: 4200 }, { label: 'Feb', revenue: 5100 }]}\n * series={[{ key: 'revenue', label: 'Revenue' }]}\n * />\n * ```\n */",
"export interface UseAreaChartProps {\n data: Record<string, string | number>[];\n series: AreaChartSeries[];\n width?: number;\n svgHeight?: number;\n defaultColors?: string[];\n}"
"export interface AreaChartProps extends React.ComponentPropsWithoutRef<'div'> {\r\n data: Record<string, string | number>[];\r\n series: AreaChartSeries[];\r\n /** @default '100%' */\r\n height?: number | string;\r\n /** @default true */\r\n showGrid?: boolean;\r\n /** @default true */\r\n showLabels?: boolean;\r\n /** @default true */\r\n showTooltip?: boolean;\r\n /** @default true */\r\n animate?: boolean;\r\n /** @default 'linear' */\r\n curve?: 'linear' | 'smooth';\r\n /** @default true */\r\n showDots?: boolean | 'hover';\r\n /** @default false */\r\n showYAxis?: boolean;\r\n /** @default false */\r\n showLegend?: boolean;\r\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\r\n labelKey?: string;\r\n /** Custom formatter for Y-axis ticks and tooltip values. */\r\n valueFormatter?: (value: number) => string;\r\n /** Accessible label for the chart SVG. @default 'Area chart' */\r\n ariaLabel?: string;\r\n}\r\n\r\n/**\r\n * Prop-driven (`data`, `series`) responsive SVG area chart with grid, labels, and interactive tooltips.\r\n *\r\n * @example\r\n * ```tsx\r\n * <AreaChart\r\n * data={[{ label: 'Jan', revenue: 4200 }, { label: 'Feb', revenue: 5100 }]}\r\n * series={[{ key: 'revenue', label: 'Revenue' }]}\r\n * />\r\n * ```\r\n */",
"export interface UseAreaChartProps {\r\n data: Record<string, string | number>[];\r\n series: AreaChartSeries[];\r\n width?: number;\r\n svgHeight?: number;\r\n defaultColors?: string[];\r\n}"
]
},
"avatar": {
Expand Down Expand Up @@ -189,7 +189,7 @@
"useBarChart"
],
"propsDefinitions": [
"export interface BarChartProps extends ComponentPropsWithoutRef<'div'> {\n data: Record<string, string | number>[];\n series: BarChartSeries[];\n /** @default '100%' */\n height?: number | string;\n /** @default true */\n showGrid?: boolean;\n /** @default true */\n showLabels?: boolean;\n /** @default true */\n showTooltip?: boolean;\n /** @default true */\n animate?: boolean;\n /** @default 4 */\n barGap?: number;\n /** @default 64 */\n maxBarWidth?: number;\n /** @default true */\n rounded?: boolean;\n /** @default 'none' */\n texture?: BarChartTexture;\n /** @default false */\n showTrack?: boolean;\n /** @default false */\n stacked?: boolean;\n /** @default false */\n showYAxis?: boolean;\n /** @default false */\n showLegend?: boolean;\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\n labelKey?: string;\n /** Custom formatter for Y-axis ticks and tooltip values. */\n valueFormatter?: (value: number) => string;\n /** Accessible label for the chart SVG. @default 'Bar chart' */\n ariaLabel?: string;\n}\n\n/**\n * Prop-driven (`data`, `series`) SVG bar chart supporting grouped/stacked bars and optional SVG textures.\n *\n * @example\n * ```tsx\n * <BarChart\n * data={[{ label: 'Q1', sales: 120 }, { label: 'Q2', sales: 180 }]}\n * series={[{ key: 'sales', label: 'Sales' }]}\n * />\n * ```\n */"
"export interface BarChartProps extends ComponentPropsWithoutRef<'div'> {\r\n data: Record<string, string | number>[];\r\n series: BarChartSeries[];\r\n /** @default '100%' */\r\n height?: number | string;\r\n /** @default true */\r\n showGrid?: boolean;\r\n /** @default true */\r\n showLabels?: boolean;\r\n /** @default true */\r\n showTooltip?: boolean;\r\n /** @default true */\r\n animate?: boolean;\r\n /** @default 4 */\r\n barGap?: number;\r\n /** @default 64 */\r\n maxBarWidth?: number;\r\n /** @default true */\r\n rounded?: boolean;\r\n /** @default 'none' */\r\n texture?: BarChartTexture;\r\n /** @default false */\r\n showTrack?: boolean;\r\n /** @default false */\r\n stacked?: boolean;\r\n /** @default false */\r\n showYAxis?: boolean;\r\n /** @default false */\r\n showLegend?: boolean;\r\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\r\n labelKey?: string;\r\n /** Custom formatter for Y-axis ticks and tooltip values. */\r\n valueFormatter?: (value: number) => string;\r\n /** Accessible label for the chart SVG. @default 'Bar chart' */\r\n ariaLabel?: string;\r\n}\r\n\r\n/**\r\n * Prop-driven (`data`, `series`) SVG bar chart supporting grouped/stacked bars and optional SVG textures.\r\n *\r\n * @example\r\n * ```tsx\r\n * <BarChart\r\n * data={[{ label: 'Q1', sales: 120 }, { label: 'Q2', sales: 180 }]}\r\n * series={[{ key: 'sales', label: 'Sales' }]}\r\n * />\r\n * ```\r\n */"
]
},
"bento-grid": {
Expand Down Expand Up @@ -790,7 +790,7 @@
"IconButton"
],
"propsDefinitions": [
"export type IconButtonProps = IconButtonBaseProps &\r\n (\r\n | (React.ButtonHTMLAttributes<HTMLButtonElement> & { href?: never })\r\n | (React.AnchorHTMLAttributes<HTMLAnchorElement> & { href: string })\r\n );\r\n\r\n/**\r\n * Prop-driven (`icon`) square or pill action button; renders `<a>` automatically when `href` is passed.\r\n *\r\n * @example\r\n * ```tsx\r\n * <IconButton icon={<PlusIcon />} aria-label=\"Add item\" variant=\"soft\" />\r\n * ```\r\n */"
"export type IconButtonProps = IconButtonBaseProps &\r\n (\r\n | (Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> & { href?: never })\r\n | (Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color'> & { href: string })\r\n );\r\n\r\n/**\r\n * Prop-driven (`icon`) square or pill action button; renders `<a>` automatically when `href` is passed.\r\n *\r\n * @example\r\n * ```tsx\r\n * <IconButton icon={<PlusIcon />} aria-label=\"Add item\" variant=\"soft\" />\r\n * ```\r\n */"
]
},
"imageexpander": {
Expand Down Expand Up @@ -865,8 +865,8 @@
"useLineChart"
],
"propsDefinitions": [
"export interface LineChartProps extends React.ComponentPropsWithoutRef<'div'> {\n data: Record<string, string | number>[];\n series: LineChartSeries[];\n /** Optional explicit height. When omitted, defaults to a 2.5:1 aspect ratio. */\n height?: number | string;\n /** @default true */\n showGrid?: boolean;\n /** @default true */\n showLabels?: boolean;\n /** @default true */\n showTooltip?: boolean;\n /** @default true */\n animate?: boolean;\n /** @default 'linear' */\n curve?: 'linear' | 'smooth';\n /** @default true */\n showDots?: boolean | 'hover';\n /** @default false */\n showYAxis?: boolean;\n /** @default false */\n showLegend?: boolean;\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\n labelKey?: string;\n /** Custom formatter for Y-axis ticks and tooltip values. */\n valueFormatter?: (value: number) => string;\n /** Accessible label for the chart SVG. @default 'Line chart' */\n ariaLabel?: string;\n}\n\n/**\n * Prop-driven (`data`, `series`) multi-series SVG line chart with interactive hover tooltips.\n *\n * @example\n * ```tsx\n * <LineChart\n * data={[{ label: 'Mon', visits: 320 }, { label: 'Tue', visits: 410 }]}\n * series={[{ key: 'visits', label: 'Visits' }]}\n * />\n * ```\n */",
"export interface UseLineChartProps {\n data: Record<string, string | number>[];\n series: LineChartSeries[];\n width?: number;\n svgHeight?: number;\n}"
"export interface LineChartProps extends React.ComponentPropsWithoutRef<'div'> {\r\n data: Record<string, string | number>[];\r\n series: LineChartSeries[];\r\n /** Optional explicit height. When omitted, defaults to a 2.5:1 aspect ratio. */\r\n height?: number | string;\r\n /** @default true */\r\n showGrid?: boolean;\r\n /** @default true */\r\n showLabels?: boolean;\r\n /** @default true */\r\n showTooltip?: boolean;\r\n /** @default true */\r\n animate?: boolean;\r\n /** @default 'linear' */\r\n curve?: 'linear' | 'smooth';\r\n /** @default true */\r\n showDots?: boolean | 'hover';\r\n /** @default false */\r\n showYAxis?: boolean;\r\n /** @default false */\r\n showLegend?: boolean;\r\n /** Key in `data` items used for x-axis and tooltip labels. @default 'label' */\r\n labelKey?: string;\r\n /** Custom formatter for Y-axis ticks and tooltip values. */\r\n valueFormatter?: (value: number) => string;\r\n /** Accessible label for the chart SVG. @default 'Line chart' */\r\n ariaLabel?: string;\r\n}\r\n\r\n/**\r\n * Prop-driven (`data`, `series`) multi-series SVG line chart with interactive hover tooltips.\r\n *\r\n * @example\r\n * ```tsx\r\n * <LineChart\r\n * data={[{ label: 'Mon', visits: 320 }, { label: 'Tue', visits: 410 }]}\r\n * series={[{ key: 'visits', label: 'Visits' }]}\r\n * />\r\n * ```\r\n */",
"export interface UseLineChartProps {\r\n data: Record<string, string | number>[];\r\n series: LineChartSeries[];\r\n width?: number;\r\n svgHeight?: number;\r\n}"
]
},
"listtile": {
Expand Down Expand Up @@ -1080,8 +1080,8 @@
"usePieChart"
],
"propsDefinitions": [
"export interface PieChartProps extends React.ComponentPropsWithoutRef<'div'> {\n data: PieChartDataItem[];\n /** @default 0 */\n innerRadius?: number;\n /** @default true */\n showLabels?: boolean;\n /** @default true */\n showTooltip?: boolean;\n /** @default true */\n animate?: boolean;\n /** @default 'none' */\n texture?: PieChartTexture;\n /** Custom formatter for tooltip values. */\n valueFormatter?: (value: number) => string;\n /** Accessible label for the chart SVG. @default 'Pie chart' */\n ariaLabel?: string;\n}\n\n/**\n * Prop-driven (`data`) SVG pie or donut chart with optional inner radius and tooltips.\n *\n * @example\n * ```tsx\n * <PieChart data={[{ label: 'Desktop', value: 65 }, { label: 'Mobile', value: 35 }]} />\n * ```\n */",
"export interface UsePieChartProps {\n data: PieChartDataItem[];\n innerRadius: number;\n showTooltip: boolean;\n}"
"export interface PieChartProps extends React.ComponentPropsWithoutRef<'div'> {\r\n data: PieChartDataItem[];\r\n /** @default 0 */\r\n innerRadius?: number;\r\n /** @default true */\r\n showLabels?: boolean;\r\n /** @default true */\r\n showTooltip?: boolean;\r\n /** @default true */\r\n animate?: boolean;\r\n /** @default 'none' */\r\n texture?: PieChartTexture;\r\n /** Custom formatter for tooltip values. */\r\n valueFormatter?: (value: number) => string;\r\n /** Accessible label for the chart SVG. @default 'Pie chart' */\r\n ariaLabel?: string;\r\n}\r\n\r\n/**\r\n * Prop-driven (`data`) SVG pie or donut chart with optional inner radius and tooltips.\r\n *\r\n * @example\r\n * ```tsx\r\n * <PieChart data={[{ label: 'Desktop', value: 65 }, { label: 'Mobile', value: 35 }]} />\r\n * ```\r\n */",
"export interface UsePieChartProps {\r\n data: PieChartDataItem[];\r\n innerRadius: number;\r\n showTooltip: boolean;\r\n}"
]
},
"popover": {
Expand Down Expand Up @@ -1291,7 +1291,7 @@
"propsDefinitions": [
"export interface SidebarProviderProps extends UseSidebarProps {\r\n children: React.ReactNode;\r\n}",
"export interface SidebarProps extends\r\n Omit<HTMLMotionProps<'aside'>, 'children' | 'defaultValue'> {\r\n children: React.ReactNode;\r\n /** @default true */\r\n collapsible?: boolean;\r\n /** @default true */\r\n defaultOpen?: boolean;\r\n open?: boolean;\r\n onOpenChange?: (open: boolean) => void;\r\n /** @default 272 */\r\n width?: number;\r\n /** @default 72 */\r\n collapsedWidth?: number;\r\n /** @default true */\r\n responsive?: boolean;\r\n /** @default false */\r\n defaultOpenMobile?: boolean;\r\n openMobile?: boolean;\r\n onOpenMobileChange?: (open: boolean) => void;\r\n /** @default 768 */\r\n mobileBreakpoint?: number;\r\n}\r\n\r\n/**\r\n * Compound collapsible application sidebar (`children` inside `SidebarProvider`, using `SidebarContent`, `SidebarSection`, `SidebarItem`).\r\n *\r\n * @example\r\n * ```tsx\r\n * <SidebarProvider>\r\n * <Sidebar>\r\n * <SidebarContent>\r\n * <SidebarSection title=\"Menu\">\r\n * <SidebarItem label=\"Dashboard\" active />\r\n * </SidebarSection>\r\n * </SidebarContent>\r\n * </Sidebar>\r\n * </SidebarProvider>\r\n * ```\r\n */",
"export interface SidebarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n icon?: React.ReactNode;\r\n /** @default 'sm' */\r\n size?: 'sm' | 'md' | 'lg';\r\n}",
"export interface SidebarTriggerProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {\r\n icon?: React.ReactNode;\r\n /** @default 'sm' */\r\n size?: 'sm' | 'md' | 'lg';\r\n}",
"export interface SidebarContentProps extends React.HTMLAttributes<HTMLDivElement> {\r\n children: React.ReactNode;\r\n}",
"export interface SidebarSectionProps {\r\n title?: string;\r\n badge?: React.ReactNode;\r\n children: React.ReactNode;\r\n className?: string;\r\n /** @default false */\r\n collapsible?: boolean;\r\n /** @default true */\r\n defaultOpen?: boolean;\r\n}",
"export interface SidebarSubItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\r\n children: React.ReactNode;\r\n active?: boolean;\r\n href?: string;\r\n target?: string;\r\n badgeSlot?: React.ReactNode;\r\n className?: string;\r\n}",
Expand Down
4 changes: 2 additions & 2 deletions src/dashkit/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions src/dashkit/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ export const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(
'border-border group-hover:border-ds-400 dark:group-hover:border-ds-500',
'peer-checked:border-primary peer-checked:bg-background',
'peer-focus-visible:ring-2 peer-focus-visible:ring-ring peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-transparent',
'peer-disabled:opacity-60 peer-disabled:cursor-not-allowed'
'peer-disabled:opacity-50 peer-disabled:cursor-not-allowed'
)}
/>
<div
className={cn(
'absolute w-[13px] h-[13px] rounded-[calc(var(--radius)*0.1667)] bg-primary transition-all duration-200 pointer-events-none opacity-0 scale-50',
'peer-checked:opacity-100 peer-checked:scale-100',
'peer-checked:peer-disabled:opacity-60'
'peer-checked:peer-disabled:opacity-50'
)}
/>
</label>
Expand Down
4 changes: 2 additions & 2 deletions src/dashkit/Chip/Chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -153,7 +153,7 @@ export const Chip = React.forwardRef<HTMLButtonElement | HTMLDivElement, ChipPro
onDelete(e);
}}
disabled={disabled}
className="size-6 -mr-1.5 -my-1 rounded-full flex items-center justify-center transition-colors hover:bg-black/10 dark:hover:bg-white/10 disabled:cursor-not-allowed"
className="size-6 -mr-1.5 -my-1 rounded-full flex items-center justify-center transition-colors hover:bg-black/10 dark:hover:bg-white/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed"
aria-label="Remove"
>
<FiX className="size-3" />
Expand Down
2 changes: 1 addition & 1 deletion src/dashkit/CopyField/CopyField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const CopyField = forwardRef<HTMLDivElement, CopyFieldProps>(
className={cn('flex flex-col gap-1.5 w-full font-sans', className)}
>
{label && (
<label data-slot="label" htmlFor={inputId} className="text-[13px] font-bold uppercase text-foreground ml-1 tracking-wider">
<label data-slot="label" htmlFor={inputId} className="text-xs font-semibold text-foreground ml-1 tracking-tight">
{label}
</label>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/dashkit/Divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down Expand Up @@ -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',
},
Expand Down
7 changes: 7 additions & 0 deletions src/dashkit/IconButton/IconButton.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ describe('IconButton', () => {
expect(button).toHaveClass('border-border');
});

it('applies color styles correctly', () => {
render(<IconButton icon={<FiPlus />} 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(<IconButton icon={<FiPlus />} size="sm" />);
let button = screen.getByRole('button');
Expand Down
Loading
Loading