refactor(ui): update shared components and add ControlGroup, SidebarContainer

This commit is contained in:
Ilia Mashkov
2026-03-02 22:19:35 +03:00
parent 13818d5844
commit 0dd08874bc
33 changed files with 927 additions and 203 deletions

View File

@@ -13,13 +13,42 @@ import {
} from './config';
interface Props {
/**
* Visual variant
* @default 'default'
*/
variant?: LabelVariant;
/**
* Label size
* @default 'sm'
*/
size?: LabelSize;
/**
* Uppercase text
* @default true
*/
uppercase?: boolean;
/**
* Bold text
* @default false
*/
bold?: boolean;
/**
* Icon snippet
*/
icon?: Snippet;
/**
* Icon placement
* @default 'left'
*/
iconPosition?: 'left' | 'right';
/**
* Content snippet
*/
children?: Snippet;
/**
* CSS classes
*/
class?: string;
}

View File

@@ -11,12 +11,13 @@ export type LabelVariant =
| 'warning'
| 'error';
export type LabelSize = 'xs' | 'sm' | 'md';
export type LabelSize = 'xs' | 'sm' | 'md' | 'lg';
export const labelSizeConfig: Record<LabelSize, string> = {
xs: 'text-[0.5rem]',
sm: 'text-[0.5625rem] md:text-[0.625rem]',
md: 'text-[0.625rem] md:text-[0.6875rem]',
lg: 'text-[0.8rem] md:text-[0.875rem]',
};
export const labelVariantConfig: Record<LabelVariant, string> = {