@lmsomeco/toyota-framework-core
v1.0.0
Published
Toyota Design System - Core Utilities and Types
Readme
@lmsomeco/toyota-framework-core
Toyota Design System Core Utilities and Types — Shared utilities and TypeScript types for the Toyota Framework.
Features
- ✅ TypeScript types — Comprehensive type definitions for components
- ✅ Design tokens — Toyota brand colors, spacing, and constants
- ✅ Pure utilities — Framework-agnostic helper functions
- ✅ Zero dependencies — Lightweight and standalone
Installation
npm install @lmsomeco/toyota-framework-coreOr with pnpm:
pnpm add @lmsomeco/toyota-framework-coreUsage
Types
import type { ButtonVariant, ButtonSize, InputType } from '@lmsomeco/toyota-framework-core'
// Use types in your components
const variant: ButtonVariant = 'primary'Constants
import { TOYOTA_COLORS } from '@lmsomeco/toyota-framework-core'
console.log(TOYOTA_COLORS.black) // '#282830'
console.log(TOYOTA_COLORS.red) // '#ff0022'Utilities
import { classNames } from '@lmsomeco/toyota-framework-core'
const buttonClasses = classNames('t-button', 't-button--primary', {
't-button--disabled': isDisabled,
})Exports
- Types: Component prop types, variant types, state types
- Constants:
TOYOTA_COLORS, spacing values, breakpoints - Utils:
classNames()for conditional class composition
TypeScript Support
This package is written in TypeScript and provides full type definitions. No additional @types package is needed.
License
MIT © LM Someco
