@damarkuncoro/agnostic-ui-contract-core
v1.0.1
Published
Core contracts and types for Agnostic UI components
Maintainers
Readme
@damarkuncoro/agnostic-ui-contract-core
Core contracts and types for Agnostic UI components. This package provides TypeScript interfaces and utility functions for building design system components that work across different UI frameworks.
Installation
npm install @damarkuncoro/agnostic-ui-contract-coreUsage
Import types and interfaces for your UI components:
import {
UiTheme,
UiTokenScale,
UiExtendedTokens,
resolveTheme
} from '@damarkuncoro/agnostic-ui-contract-core';
// Use in your component definitions
interface MyButtonProps {
theme: UiTheme;
tokens: UiExtendedTokens;
}API
Types
UiTheme: Complete theme configurationUiTokenScale<T>: Generic token scale typeUiExtendedTokens: Extended token collection
Utilities
resolveTheme(): Resolve theme with token referencesresolveMath(): Resolve mathematical expressions in tokensresolveRef(): Resolve token references
License
MIT
