feat(shared): legacy presentation/ + shared design system + widgets
- lib/presentation : pages legacy (explore/network, notifications) avec BLoC - lib/shared/design_system : UnionFlow Design System v2 (tokens, components) + MD3 tokens + module_colors par feature - lib/shared/widgets : widgets transversaux (core_card, core_shimmer, error_widget, loading_widget, powered_by_lions_dev, etc.) - lib/shared/constants + utils
This commit is contained in:
@@ -6,93 +6,33 @@ import 'tokens/app_typography.dart';
|
||||
import 'tokens/spacing_tokens.dart';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// EXPORTS - Point d'entrée unique (DRY)
|
||||
// EXPORTS — Point d'entrée unique du design system
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
export 'tokens/app_colors.dart';
|
||||
export 'tokens/app_typography.dart';
|
||||
export 'tokens/spacing_tokens.dart';
|
||||
export 'tokens/color_tokens.dart'; // ← Facade de compat → AppColors
|
||||
export 'tokens/unionflow_colors.dart'; // ← Facade de compat → AppColors
|
||||
export 'tokens/module_colors.dart'; // ← Identité chromatique par module
|
||||
export 'theme/app_theme.dart';
|
||||
export 'components/components.dart';
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// SHIMS DE COMPATIBILITÉ — Migration progressive vers design system unifié
|
||||
// SHADOW TOKENS
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
/// Shim ColorTokens — palette Vert Forêt/Ardoise
|
||||
class ColorTokens {
|
||||
// Primaires
|
||||
static const Color primary = AppColors.primaryGreen; // #2E7D32
|
||||
static const Color primaryLight = AppColors.brandGreenLight; // #4CAF50
|
||||
static const Color primaryDark = AppColors.brandGreen; // #1B5E20
|
||||
static const Color primaryContainer = Color(0xFFE8F5E9);
|
||||
static const Color onPrimary = Colors.white;
|
||||
static const Color onPrimaryContainer = AppColors.textPrimaryLight;
|
||||
|
||||
// Secondaires
|
||||
static const Color secondary = AppColors.brandGreenLight;
|
||||
static const Color secondaryContainer = Color(0xFFC8E6C9);
|
||||
static const Color onSecondary = Colors.white;
|
||||
static const Color onSecondaryContainer = AppColors.textPrimaryLight;
|
||||
|
||||
// Tertiaires
|
||||
static const Color tertiary = AppColors.brandMint;
|
||||
static const Color tertiaryContainer = Color(0xFFDCEDC8);
|
||||
static const Color onTertiary = Colors.white;
|
||||
|
||||
// Surfaces
|
||||
static const Color surface = AppColors.lightSurface;
|
||||
static const Color surfaceVariant = AppColors.lightBackground;
|
||||
static const Color surfaceContainer = 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 = Color(0xFFDCEDC8);
|
||||
|
||||
// Erreur / succès
|
||||
static const Color error = AppColors.error;
|
||||
static const Color onError = Colors.white;
|
||||
static const Color errorContainer = Color(0xFFFEF2F2);
|
||||
static const Color success = AppColors.success;
|
||||
static const Color onSuccess = Colors.white;
|
||||
static const Color warning = AppColors.warning;
|
||||
static const Color info = AppColors.info;
|
||||
|
||||
// Navigation
|
||||
static const Color navigationBackground = AppColors.lightSurface;
|
||||
static const Color navigationSelected = AppColors.primaryGreen;
|
||||
static const Color navigationUnselected = AppColors.textSecondaryLight;
|
||||
static const Color navigationIndicator = Color(0xFFE8F5E9);
|
||||
|
||||
// Ombres
|
||||
static const Color shadow = Color(0x1A1C2B1C);
|
||||
static const Color shadowMedium = Color(0x331C2B1C);
|
||||
|
||||
// Verre / glassmorphism
|
||||
static const Color glassBackground = Color(0x80FFFFFF);
|
||||
static const Color glassBorder = Color(0x33FFFFFF);
|
||||
|
||||
// Gradients
|
||||
static const List<Color> primaryGradient = [
|
||||
AppColors.brandGreen,
|
||||
AppColors.primaryGreen,
|
||||
Color(0xFF388E3C),
|
||||
];
|
||||
}
|
||||
|
||||
/// Shim ShadowTokens
|
||||
class ShadowTokens {
|
||||
static const List<BoxShadow> sm = [
|
||||
BoxShadow(
|
||||
color: Color(0x1A1C2B1C),
|
||||
color: AppColors.shadowMedium,
|
||||
blurRadius: 4,
|
||||
offset: Offset(0, 2),
|
||||
),
|
||||
];
|
||||
static const List<BoxShadow> md = [
|
||||
BoxShadow(
|
||||
color: Color(0x261C2B1C),
|
||||
color: AppColors.shadowStrong,
|
||||
blurRadius: 8,
|
||||
offset: Offset(0, 4),
|
||||
),
|
||||
@@ -100,7 +40,10 @@ class ShadowTokens {
|
||||
static const List<BoxShadow> primary = md;
|
||||
}
|
||||
|
||||
/// Shim RadiusTokens
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// RADIUS TOKENS
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
class RadiusTokens {
|
||||
static const double sm = SpacingTokens.radiusSm;
|
||||
static const double md = SpacingTokens.radiusMd;
|
||||
@@ -110,48 +53,42 @@ class RadiusTokens {
|
||||
static const double round = SpacingTokens.radiusCircular;
|
||||
}
|
||||
|
||||
/// Shim TypographyTokens
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// TYPOGRAPHY TOKENS (shim — renvoie vers AppTypography)
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
class TypographyTokens {
|
||||
// Display (Playfair Display via AppTypography getters — non-const)
|
||||
static TextStyle get displayLarge => AppTypography.displayLarge;
|
||||
static TextStyle get displayMedium => AppTypography.displayMedium;
|
||||
static TextStyle get displaySmall => AppTypography.displaySmall;
|
||||
|
||||
// Headlines
|
||||
static const TextStyle headlineLarge = AppTypography.headerLarge;
|
||||
static const TextStyle headlineMedium = AppTypography.headerSmall;
|
||||
static const TextStyle headlineSmall = AppTypography.titleMedium;
|
||||
|
||||
// Titles
|
||||
static const TextStyle titleLarge = AppTypography.headerSmall;
|
||||
static const TextStyle titleMedium = AppTypography.titleMedium;
|
||||
static const TextStyle titleSmall = AppTypography.titleSmall;
|
||||
|
||||
// Body
|
||||
static const TextStyle bodyLarge = AppTypography.bodyLarge;
|
||||
static const TextStyle bodyMedium = AppTypography.bodyMedium;
|
||||
static const TextStyle bodySmall = AppTypography.bodyTextSmall;
|
||||
|
||||
// Labels
|
||||
static const TextStyle labelLarge = AppTypography.actionText;
|
||||
static const TextStyle labelMedium = AppTypography.labelMedium;
|
||||
static const TextStyle labelSmall = AppTypography.badgeText;
|
||||
|
||||
// Buttons
|
||||
static const TextStyle buttonLarge = AppTypography.buttonLabel;
|
||||
static const TextStyle buttonMedium = AppTypography.actionText;
|
||||
|
||||
// Cards
|
||||
static const TextStyle cardTitle = AppTypography.headerSmall;
|
||||
static const TextStyle cardSubtitle = AppTypography.bodyTextSmall;
|
||||
static const TextStyle cardValue = AppTypography.headerLarge;
|
||||
|
||||
// Inputs
|
||||
static const TextStyle inputLabel = AppTypography.labelMedium;
|
||||
static const TextStyle inputText = AppTypography.bodyLarge;
|
||||
static const TextStyle inputHint = AppTypography.bodyTextSmall;
|
||||
|
||||
// Navigation
|
||||
static const TextStyle navigationLabel = AppTypography.navLabel;
|
||||
static const TextStyle navigationLabelSelected = AppTypography.navLabelSelected;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user