108 lines
5.3 KiB
Dart
108 lines
5.3 KiB
Dart
library unionflow_design_system;
|
|
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
// IMPORTS de base pour le Design System
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
|
|
import 'package:flutter/material.dart';
|
|
import 'tokens/app_colors.dart';
|
|
import 'tokens/app_typography.dart';
|
|
import 'tokens/spacing_tokens.dart';
|
|
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
// EXPORTS - Point d'entrée unique (DRY)
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
|
|
export 'tokens/app_colors.dart';
|
|
export 'tokens/app_typography.dart';
|
|
export 'tokens/spacing_tokens.dart';
|
|
export 'theme/app_theme.dart';
|
|
export 'components/components.dart';
|
|
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
// COMPATIBILITÉ - Shims pour les anciens tokens (Migration progressive)
|
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
|
|
/// Shim de compatibilité pour ColorTokens
|
|
class ColorTokens {
|
|
static const Color primary = AppColors.primaryGreen;
|
|
static const Color primaryContainer = AppColors.lightSurface;
|
|
static const Color onPrimary = Colors.white;
|
|
static const Color onPrimaryContainer = AppColors.textPrimaryLight;
|
|
static const Color secondary = AppColors.brandGreen;
|
|
static const Color secondaryContainer = AppColors.lightSurface;
|
|
static const Color onSecondary = Colors.white;
|
|
static const Color tertiary = AppColors.brandGreenLight;
|
|
static const Color tertiaryContainer = AppColors.lightSurface;
|
|
static const Color onTertiary = Colors.white;
|
|
static const Color surface = AppColors.lightSurface;
|
|
static const Color surfaceVariant = AppColors.lightSurface;
|
|
static const Color background = AppColors.lightBackground;
|
|
static const Color onSurface = AppColors.textPrimaryLight;
|
|
static const Color onSurfaceVariant = AppColors.textSecondaryLight;
|
|
static const Color outline = AppColors.lightBorder;
|
|
static const Color outlineVariant = AppColors.lightBorder;
|
|
static const Color error = AppColors.error;
|
|
static const Color onError = Colors.white;
|
|
static const Color success = AppColors.success;
|
|
static const Color onSuccess = Colors.white;
|
|
static const Color info = Color(0xFF2196F3);
|
|
static const Color warning = Color(0xFFFFC107);
|
|
static const Color shadow = Color(0x1A000000);
|
|
|
|
static const List<Color> primaryGradient = [
|
|
AppColors.primaryGreen,
|
|
AppColors.brandGreenLight,
|
|
];
|
|
}
|
|
|
|
/// Shim de compatibilité pour ShadowTokens
|
|
class ShadowTokens {
|
|
static const List<BoxShadow> sm = [
|
|
BoxShadow(
|
|
color: Color(0x1A000000),
|
|
blurRadius: 4,
|
|
offset: Offset(0, 2),
|
|
),
|
|
];
|
|
static const List<BoxShadow> md = [
|
|
BoxShadow(
|
|
color: Color(0x26000000),
|
|
blurRadius: 8,
|
|
offset: Offset(0, 4),
|
|
),
|
|
];
|
|
static const List<BoxShadow> primary = md;
|
|
}
|
|
|
|
/// Shim de compatibilité pour RadiusTokens
|
|
class RadiusTokens {
|
|
static const double sm = SpacingTokens.radiusSm;
|
|
static const double md = SpacingTokens.radiusMd;
|
|
static const double lg = SpacingTokens.radiusLg;
|
|
static const double xl = SpacingTokens.radiusXl;
|
|
static const double circular = SpacingTokens.radiusCircular;
|
|
static const double round = SpacingTokens.radiusCircular; // Ajouté pour compatibilité
|
|
}
|
|
|
|
/// Shim de compatibilité pour TypographyTokens
|
|
class TypographyTokens {
|
|
static const TextStyle displayLarge = AppTypography.headerSmall;
|
|
static const TextStyle displayMedium = AppTypography.headerSmall;
|
|
static const TextStyle displaySmall = AppTypography.headerSmall;
|
|
static const TextStyle headlineLarge = AppTypography.headerSmall;
|
|
static const TextStyle headlineMedium = AppTypography.headerSmall;
|
|
static const TextStyle headlineSmall = AppTypography.headerSmall;
|
|
static const TextStyle titleLarge = AppTypography.headerSmall;
|
|
static const TextStyle titleMedium = AppTypography.headerSmall;
|
|
static const TextStyle titleSmall = AppTypography.headerSmall;
|
|
static const TextStyle bodyLarge = AppTypography.bodyTextSmall;
|
|
static const TextStyle bodyMedium = AppTypography.bodyTextSmall;
|
|
static const TextStyle bodySmall = AppTypography.subtitleSmall;
|
|
static const TextStyle labelLarge = AppTypography.actionText;
|
|
static const TextStyle labelMedium = AppTypography.badgeText;
|
|
static const TextStyle labelSmall = AppTypography.badgeText;
|
|
static const TextStyle buttonLarge = AppTypography.actionText;
|
|
static const TextStyle cardValue = AppTypography.headerSmall;
|
|
}
|