Files
unionflow-mobile-apps/lib/shared/design_system/unionflow_design_system.dart
dahoud 7cd7c6fc9e 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
2026-04-15 20:27:23 +00:00

95 lines
4.9 KiB
Dart

library unionflow_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 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';
// ═══════════════════════════════════════════════════════════════════════════
// SHADOW TOKENS
// ═══════════════════════════════════════════════════════════════════════════
class ShadowTokens {
static const List<BoxShadow> sm = [
BoxShadow(
color: AppColors.shadowMedium,
blurRadius: 4,
offset: Offset(0, 2),
),
];
static const List<BoxShadow> md = [
BoxShadow(
color: AppColors.shadowStrong,
blurRadius: 8,
offset: Offset(0, 4),
),
];
static const List<BoxShadow> primary = md;
}
// ═══════════════════════════════════════════════════════════════════════════
// RADIUS TOKENS
// ═══════════════════════════════════════════════════════════════════════════
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;
}
// ═══════════════════════════════════════════════════════════════════════════
// TYPOGRAPHY TOKENS (shim — renvoie vers AppTypography)
// ═══════════════════════════════════════════════════════════════════════════
class TypographyTokens {
static TextStyle get displayLarge => AppTypography.displayLarge;
static TextStyle get displayMedium => AppTypography.displayMedium;
static TextStyle get displaySmall => AppTypography.displaySmall;
static const TextStyle headlineLarge = AppTypography.headerLarge;
static const TextStyle headlineMedium = AppTypography.headerSmall;
static const TextStyle headlineSmall = AppTypography.titleMedium;
static const TextStyle titleLarge = AppTypography.headerSmall;
static const TextStyle titleMedium = AppTypography.titleMedium;
static const TextStyle titleSmall = AppTypography.titleSmall;
static const TextStyle bodyLarge = AppTypography.bodyLarge;
static const TextStyle bodyMedium = AppTypography.bodyMedium;
static const TextStyle bodySmall = AppTypography.bodyTextSmall;
static const TextStyle labelLarge = AppTypography.actionText;
static const TextStyle labelMedium = AppTypography.labelMedium;
static const TextStyle labelSmall = AppTypography.badgeText;
static const TextStyle buttonLarge = AppTypography.buttonLabel;
static const TextStyle buttonMedium = AppTypography.actionText;
static const TextStyle cardTitle = AppTypography.headerSmall;
static const TextStyle cardSubtitle = AppTypography.bodyTextSmall;
static const TextStyle cardValue = AppTypography.headerLarge;
static const TextStyle inputLabel = AppTypography.labelMedium;
static const TextStyle inputText = AppTypography.bodyLarge;
static const TextStyle inputHint = AppTypography.bodyTextSmall;
static const TextStyle navigationLabel = AppTypography.navLabel;
static const TextStyle navigationLabelSelected = AppTypography.navLabelSelected;
}