99ab7e9e08
Badge and TechText reached into $shared/ui/Label/config, and SearchBar into $shared/ui/Input/types — bypassing the siblings public surface. - Label/config.ts was explicitly shared text-styling config, not Labels internals; relocate it to shared/ui/labelConfig.ts (a neutral peer module) and point Label/Badge/TechText at it relatively. - inputIconSize is a consumer-facing map; export it from Input/index.ts so SearchBar imports it through the barrel alongside Input.
35 lines
930 B
TypeScript
35 lines
930 B
TypeScript
/**
|
|
* Shared config.
|
|
* Import from here in each component to keep maps DRY.
|
|
*/
|
|
|
|
export type LabelFont = 'mono' | 'primary';
|
|
|
|
export type LabelVariant =
|
|
| 'default'
|
|
| 'accent'
|
|
| 'muted'
|
|
| 'success'
|
|
| 'warning'
|
|
| 'error';
|
|
|
|
export type LabelSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
|
|
export const labelSizeConfig: Record<LabelSize, string> = {
|
|
xs: 'text-4xs',
|
|
sm: 'text-3xs md:text-2xs',
|
|
md: 'text-2xs md:text-xs',
|
|
lg: 'text-sm',
|
|
};
|
|
|
|
export const labelVariantConfig: Record<LabelVariant, string> = {
|
|
default: 'text-neutral-900 dark:text-neutral-100',
|
|
accent: 'text-brand',
|
|
/* Light mode bumped from neutral-400 (~2.7:1 contrast, barely visible)
|
|
to neutral-600 (~7.5:1). Dark mode unchanged. */
|
|
muted: 'text-neutral-600 dark:text-neutral-500',
|
|
success: 'text-green-600 dark:text-green-400',
|
|
warning: 'text-yellow-600 dark:text-yellow-400',
|
|
error: 'text-brand',
|
|
};
|