From 9028b78113a33fef3d6cb59dbef471a9947fe406 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:33:41 -0300 Subject: [PATCH 01/30] generate color token --- .../mix_annotations/lib/src/annotations.dart | 10 ++ packages/mix_generator/build.yaml | 18 ++- packages/mix_generator/lib/mix_generator.dart | 10 +- .../lib/src/mixable_tokens_generator.dart | 129 ++++++++++++++++++ packages/mix_generator/pubspec.yaml | 6 +- packages/remix/lib/src/theme.dart | 43 ++++++ packages/remix/lib/src/theme.g.dart | 38 ++++++ 7 files changed, 244 insertions(+), 10 deletions(-) create mode 100644 packages/mix_generator/lib/src/mixable_tokens_generator.dart create mode 100644 packages/remix/lib/src/theme.dart create mode 100644 packages/remix/lib/src/theme.g.dart diff --git a/packages/mix_annotations/lib/src/annotations.dart b/packages/mix_annotations/lib/src/annotations.dart index bfe3eee19..2a45e3bf4 100644 --- a/packages/mix_annotations/lib/src/annotations.dart +++ b/packages/mix_annotations/lib/src/annotations.dart @@ -248,3 +248,13 @@ class MixDeprecatedRenamed extends MixDeprecated { required this.updatedName, }); } + +class MixableToken { + const MixableToken(); +} + +class MixableTokenField { + final Object? type; + + const MixableTokenField(this.type); +} diff --git a/packages/mix_generator/build.yaml b/packages/mix_generator/build.yaml index 882512272..c28b5e401 100644 --- a/packages/mix_generator/build.yaml +++ b/packages/mix_generator/build.yaml @@ -2,7 +2,7 @@ targets: $default: builders: spec: - enabled: true + enabled: true generate_for: exclude: - test @@ -14,33 +14,39 @@ targets: - test - example - builders: spec: import: "package:mix_generator/mix_generator.dart" builder_factories: ["specDefinition"] - build_extensions: {".dart": ["spec.g.part"]} + build_extensions: { ".dart": ["spec.g.part"] } auto_apply: dependents build_to: cache applies_builders: ["source_gen|combining_builder"] dto: import: "package:mix_generator/mix_generator.dart" builder_factories: ["dtoDefinition"] - build_extensions: {".dart": ["dto.g.part"]} + build_extensions: { ".dart": ["dto.g.part"] } auto_apply: dependents build_to: cache applies_builders: ["source_gen|combining_builder"] enum_utility: import: "package:mix_generator/mix_generator.dart" builder_factories: ["enumUtilityDefinition"] - build_extensions: {".dart": ["enum_utility.g.part"]} + build_extensions: { ".dart": ["enum_utility.g.part"] } auto_apply: dependents build_to: cache applies_builders: ["source_gen|combining_builder"] class_utility: import: "package:mix_generator/mix_generator.dart" builder_factories: ["classUtilityDefinition"] - build_extensions: {".dart": ["class_utility.g.part"]} + build_extensions: { ".dart": ["class_utility.g.part"] } + auto_apply: dependents + build_to: cache + applies_builders: ["source_gen|combining_builder"] + tokens: + import: "package:mix_generator/mix_generator.dart" + builder_factories: ["tokensDefinition"] + build_extensions: { ".dart": ["tokens.g.part"] } auto_apply: dependents build_to: cache applies_builders: ["source_gen|combining_builder"] diff --git a/packages/mix_generator/lib/mix_generator.dart b/packages/mix_generator/lib/mix_generator.dart index fb4c196d9..ac9453004 100644 --- a/packages/mix_generator/lib/mix_generator.dart +++ b/packages/mix_generator/lib/mix_generator.dart @@ -1,11 +1,13 @@ // ignore_for_file: avoid-unused-parameters import 'package:build/build.dart'; +import 'package:source_gen/source_gen.dart'; + import 'src/mixable_class_utility_generator.dart'; import 'src/mixable_dto_generator.dart'; import 'src/mixable_enum_utility_generator.dart'; import 'src/mixable_spec_generator.dart'; -import 'package:source_gen/source_gen.dart'; +import 'src/mixable_tokens_generator.dart'; Builder specDefinition(BuilderOptions options) => SharedPartBuilder( [const MixableSpecGenerator()], @@ -30,3 +32,9 @@ Builder enumUtilityDefinition(BuilderOptions options) => SharedPartBuilder( 'enum_utility', allowSyntaxErrors: true, ); + +Builder tokensDefinition(BuilderOptions options) => SharedPartBuilder( + [const MixableTokensGenerator()], + 'tokens', + allowSyntaxErrors: true, + ); diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart new file mode 100644 index 000000000..a315bd413 --- /dev/null +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -0,0 +1,129 @@ +import 'package:analyzer/dart/element/element.dart'; +import 'package:build/build.dart'; +import 'package:code_builder/code_builder.dart'; +import 'package:dart_style/dart_style.dart'; +import 'package:mix_annotations/mix_annotations.dart'; +import 'package:source_gen/source_gen.dart'; + +import 'helpers/field_info.dart'; + +class MixableTokensGenerator extends GeneratorForAnnotation { + const MixableTokensGenerator(); + + ClassBuilderContext _loadContext(Element element) { + if (element is! ClassElement) { + throw InvalidGenerationSourceError( + 'The annotation can only be applied to a class.', + element: element, + ); + } + + return ClassBuilderContext( + classElement: element, + annotation: const MixableToken(), + ); + } + + @override + Future generateForAnnotatedElement( + Element element, + ConstantReader reader, + BuildStep buildStep, + ) async { + final context = _loadContext(element); + + final classDef = Class( + (b) => b + ..name = '_\$${element.name!}Struct' + ..constructors.add(Constructor((c) => c.constant = true)) + ..fields.addAll( + context.fields.map( + (e) => Field( + (f) => f + ..name = e.name + ..modifier = FieldModifier.final$ + ..type = refer('ColorToken') + ..assignment = Code('const ColorToken(\'${e.name}\')'), + ), + ), + ), + ); + + final tokenVariable = Field( + (f) => f + ..name = '_tokens' + ..modifier = FieldModifier.constant + ..assignment = Code('_\$${element.name!}Struct()'), + ); + + final tokensToDataMethod = Method( + (m) => m + ..name = '_\$TokensToData' + ..requiredParameters.add( + Parameter( + (p) => p + ..name = 'tokens' + ..required = false + ..type = refer('ColorTokens'), + ), + ) + ..returns = refer('Map') + ..body = Code( + 'return {${context.fields.map((e) => '${tokenVariable.name}.${e.name}: tokens.${e.name},').join('\n')}};', + ), + ); + + final colorUtilXDef = Extension( + (b) => b + ..name = '\$${element.name!}X' + ..on = refer('ColorUtility') + ..types.add(refer('T extends Attribute')) + ..methods.addAll( + context.fields.map( + (e) => Method((m) => m + ..name = e.name + ..returns = refer('T') + ..lambda = true + ..body = + Block.of([Code('ref(${tokenVariable.name}.${e.name})')])), + ), + ), + ); + + final buildContextXDef = Extension( + (b) => b + ..name = '\$BuildContext${element.name!}X' + ..on = refer('BuildContext') + ..methods.addAll( + context.fields.map( + (e) => Method( + (m) => m + ..name = e.name + ..returns = refer('Color') + ..lambda = true + ..body = Block.of( + [Code('${tokenVariable.name}.${e.name}.resolve(this)')], + ), + ), + ), + ), + ); + + final library = Library( + (b) => b + ..body.addAll([ + classDef, + tokenVariable, + tokensToDataMethod, + colorUtilXDef, + buildContextXDef, + ]), + ); + + final emitter = DartEmitter(); + + return DartFormatter( + languageVersion: DartFormatter.latestLanguageVersion, + ).format(library.accept(emitter).toString()); + } +} diff --git a/packages/mix_generator/pubspec.yaml b/packages/mix_generator/pubspec.yaml index 7db114247..d8c38f5d2 100644 --- a/packages/mix_generator/pubspec.yaml +++ b/packages/mix_generator/pubspec.yaml @@ -6,7 +6,7 @@ homepage: https://github.com/conceptadev/mix environment: sdk: ">=3.3.0 <4.0.0" flutter: ">=3.19.0" - + dependencies: mix_annotations: ^0.3.0 build: ^2.4.1 @@ -15,7 +15,7 @@ dependencies: dart_style: ^2.3.6 collection: ^1.17.1 build_config: ^1.1.1 - + code_builder: ^4.10.1 dev_dependencies: test: ^1.24.4 @@ -24,4 +24,4 @@ dev_dependencies: source_gen_test: ^1.0.6 # Lint dart_code_metrics_presets: ^2.14.0 - flutter_lints: ^4.0.0 \ No newline at end of file + flutter_lints: ^4.0.0 diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart new file mode 100644 index 000000000..ad9308fd2 --- /dev/null +++ b/packages/remix/lib/src/theme.dart @@ -0,0 +1,43 @@ +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +part 'theme.g.dart'; + +@MixableToken() +class ColorTokens { + final Color primary; + final Color secondary; + final Color tertiary; + + const ColorTokens({ + required this.primary, + required this.secondary, + required this.tertiary, + }); + + Map get data => _$TokensToData(this); +} + +@MixableToken() +class TextTokens { + final TextStyle h1; + final TextStyle h2; + final TextStyle h3; + final TextStyle body; + + const TextTokens({ + required this.h1, + required this.h2, + required this.h3, + required this.body, + }); +} + +class ColorStruct { + final Color p10; + final Color p20; + final Color p30; + + const ColorStruct(this.p10, this.p20, this.p30); +} diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart new file mode 100644 index 000000000..f79df21c1 --- /dev/null +++ b/packages/remix/lib/src/theme.g.dart @@ -0,0 +1,38 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'theme.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$ColorTokensStruct { + const _$ColorTokensStruct(); + + final ColorToken primary = const ColorToken('primary'); + + final ColorToken secondary = const ColorToken('secondary'); + + final ColorToken tertiary = const ColorToken('tertiary'); +} + +const _tokens = _$ColorTokensStruct(); +Map _$TokensToData(ColorTokens tokens) { + return { + _tokens.primary: tokens.primary, + _tokens.secondary: tokens.secondary, + _tokens.tertiary: tokens.tertiary, + }; +} + +extension $ColorTokensX on ColorUtility { + T primary() => ref(_tokens.primary); + T secondary() => ref(_tokens.secondary); + T tertiary() => ref(_tokens.tertiary); +} + +extension $BuildContextColorTokensX on BuildContext { + Color primary() => _tokens.primary.resolve(this); + Color secondary() => _tokens.secondary.resolve(this); + Color tertiary() => _tokens.tertiary.resolve(this); +} From 54e8381cc68ab915ec1dc89574f15eb4ba32bada Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:01:09 -0300 Subject: [PATCH 02/30] checkpoint1 --- .../mix_annotations/lib/src/annotations.dart | 10 +- .../lib/src/helpers/annotation_helpers.dart | 20 +- .../lib/src/helpers/builder_utils.dart | 13 ++ .../lib/src/mixable_tokens_generator.dart | 197 ++++++++++-------- packages/mix_generator/pubspec.yaml | 1 - packages/remix/lib/src/theme.dart | 40 +++- packages/remix/lib/src/theme.g.dart | 117 +++++++++-- 7 files changed, 280 insertions(+), 118 deletions(-) diff --git a/packages/mix_annotations/lib/src/annotations.dart b/packages/mix_annotations/lib/src/annotations.dart index 2a45e3bf4..fb8f911ae 100644 --- a/packages/mix_annotations/lib/src/annotations.dart +++ b/packages/mix_annotations/lib/src/annotations.dart @@ -250,11 +250,13 @@ class MixDeprecatedRenamed extends MixDeprecated { } class MixableToken { - const MixableToken(); + final Object type; + const MixableToken(this.type); } -class MixableTokenField { - final Object? type; +class MixableSwatchColorToken { + final int scale; + final int defaultValue; - const MixableTokenField(this.type); + const MixableSwatchColorToken({this.scale = 3, this.defaultValue = 1}); } diff --git a/packages/mix_generator/lib/src/helpers/annotation_helpers.dart b/packages/mix_generator/lib/src/helpers/annotation_helpers.dart index 2c202932f..54583990b 100644 --- a/packages/mix_generator/lib/src/helpers/annotation_helpers.dart +++ b/packages/mix_generator/lib/src/helpers/annotation_helpers.dart @@ -1,12 +1,13 @@ import 'package:analyzer/dart/constant/value.dart'; import 'package:analyzer/dart/element/element.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import 'dart_type_ext.dart'; import 'package:source_gen/source_gen.dart'; +import 'dart_type_ext.dart'; + const _specChecker = TypeChecker.fromRuntime(MixableSpec); const _utilityChecker = TypeChecker.fromRuntime(MixableUtility); - +const _tokenChecker = TypeChecker.fromRuntime(MixableToken); MixableSpec readMixableSpec(ClassElement classElement) { final annotation = _specChecker.firstAnnotationOfExact(classElement); @@ -109,3 +110,18 @@ MixableFieldDto? _getMixableDto(ConstantReader? reader) { return MixableFieldDto(type: reader.typeAsString); } + +MixableToken readMixableToken(ClassElement element) { + final annotation = _tokenChecker.firstAnnotationOfExact(element); + + if (annotation == null) { + throw InvalidGenerationSource( + 'No MixableToken annotation found on the class', + element: element, + ); + } + final reader = ConstantReader(annotation); + final type = reader.read('type').typeValue; + + return MixableToken(type); +} diff --git a/packages/mix_generator/lib/src/helpers/builder_utils.dart b/packages/mix_generator/lib/src/helpers/builder_utils.dart index 9e901c490..5e29589c2 100644 --- a/packages/mix_generator/lib/src/helpers/builder_utils.dart +++ b/packages/mix_generator/lib/src/helpers/builder_utils.dart @@ -131,6 +131,19 @@ extension EnumElementX on EnumElement { } } +class TokenAnnotationContext extends AnnotationContext { + final Object? type; + + TokenAnnotationContext({ + required super.element, + required this.type, + }); + + String get name => element.name; + + String get generatedName => element.generatedName; +} + extension ClassElementX on ClassElement { bool get isConst => unnamedConstructor?.isConst ?? false; diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart index a315bd413..5bd6fb160 100644 --- a/packages/mix_generator/lib/src/mixable_tokens_generator.dart +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -1,11 +1,11 @@ import 'package:analyzer/dart/element/element.dart'; import 'package:build/build.dart'; -import 'package:code_builder/code_builder.dart'; -import 'package:dart_style/dart_style.dart'; import 'package:mix_annotations/mix_annotations.dart'; import 'package:source_gen/source_gen.dart'; +import 'helpers/annotation_helpers.dart'; import 'helpers/field_info.dart'; +import 'helpers/helpers.dart'; class MixableTokensGenerator extends GeneratorForAnnotation { const MixableTokensGenerator(); @@ -20,110 +20,127 @@ class MixableTokensGenerator extends GeneratorForAnnotation { return ClassBuilderContext( classElement: element, - annotation: const MixableToken(), + annotation: readMixableToken(element), ); } @override Future generateForAnnotatedElement( Element element, - ConstantReader reader, + ConstantReader annotation, BuildStep buildStep, ) async { final context = _loadContext(element); - final classDef = Class( - (b) => b - ..name = '_\$${element.name!}Struct' - ..constructors.add(Constructor((c) => c.constant = true)) - ..fields.addAll( - context.fields.map( - (e) => Field( - (f) => f - ..name = e.name - ..modifier = FieldModifier.final$ - ..type = refer('ColorToken') - ..assignment = Code('const ColorToken(\'${e.name}\')'), - ), - ), - ), - ); + final output = StringBuffer(); - final tokenVariable = Field( - (f) => f - ..name = '_tokens' - ..modifier = FieldModifier.constant - ..assignment = Code('_\$${element.name!}Struct()'), - ); + output.writeln(_generateTokenStruct(context)); + output.writeln(_generateTokenToDataMethod(context)); + output.writeln(_generateTokenUtilityExtension(context)); + output.writeln(_generateBuildContextMethods(context)); + output.writeln(_generateBuildContextExtension(context)); - final tokensToDataMethod = Method( - (m) => m - ..name = '_\$TokensToData' - ..requiredParameters.add( - Parameter( - (p) => p - ..name = 'tokens' - ..required = false - ..type = refer('ColorTokens'), - ), - ) - ..returns = refer('Map') - ..body = Code( - 'return {${context.fields.map((e) => '${tokenVariable.name}.${e.name}: tokens.${e.name},').join('\n')}};', - ), - ); + return dartFormat(output.toString()); + } +} - final colorUtilXDef = Extension( - (b) => b - ..name = '\$${element.name!}X' - ..on = refer('ColorUtility') - ..types.add(refer('T extends Attribute')) - ..methods.addAll( - context.fields.map( - (e) => Method((m) => m - ..name = e.name - ..returns = refer('T') - ..lambda = true - ..body = - Block.of([Code('ref(${tokenVariable.name}.${e.name})')])), - ), - ), - ); +const _predefinedTokens = { + 'Color': (token: 'ColorToken', utilities: ['ColorUtility'], alias: 'color'), + 'TextStyle': ( + token: 'TextStyleToken', + utilities: ['TextStyleUtility'], + alias: 'textStyle', + ), + 'double': ( + token: 'SpaceToken', + utilities: ['SpacingSideUtility', 'GapUtility'], + alias: 'space', + ), + 'Radius': ( + token: 'RadiusToken', + utilities: ['RadiusUtility'], + alias: 'radius', + ), +}; - final buildContextXDef = Extension( - (b) => b - ..name = '\$BuildContext${element.name!}X' - ..on = refer('BuildContext') - ..methods.addAll( - context.fields.map( - (e) => Method( - (m) => m - ..name = e.name - ..returns = refer('Color') - ..lambda = true - ..body = Block.of( - [Code('${tokenVariable.name}.${e.name}.resolve(this)')], - ), - ), - ), - ), - ); +String _kTokenStructName(String name) => '_\$${name}Struct'; +String _kVariableStructName(String name) => '_struct$name'; +String _kFunctionToDataName(String name) => '_\$${name}ToData'; +String _kUtilityExtensionName(String name, String utility) => + '\$$name${utility}X'; +String _kBuildContextMethodsClassName(String name) => + 'BuildContext${name}Methods'; +String _kBuildContextExtensionName(String name) => '\$BuildContext${name}X'; - final library = Library( - (b) => b - ..body.addAll([ - classDef, - tokenVariable, - tokensToDataMethod, - colorUtilXDef, - buildContextXDef, - ]), - ); +String _generateTokenStruct(ClassBuilderContext context) { + final type = context.annotation.type.toString(); + final settings = _predefinedTokens[type]!; - final emitter = DartEmitter(); + return ''' +class ${_kTokenStructName(context.name)} { + const ${_kTokenStructName(context.name)}(); - return DartFormatter( - languageVersion: DartFormatter.latestLanguageVersion, - ).format(library.accept(emitter).toString()); + ${context.fields.map((e) => 'final ${settings.token} ${e.name} = const ${settings.token}(\'${e.name}\');').join('\n')} +} + +const ${_kVariableStructName(context.name)} = ${_kTokenStructName(context.name)}(); +'''; +} + +String _generateTokenToDataMethod(ClassBuilderContext context) { + final type = context.annotation.type.toString(); + final settings = _predefinedTokens[type]!; + + return ''' + +Map<${settings.token}, $type> ${_kFunctionToDataName(context.name)}(${context.name} tokens) { + return { + ${context.fields.map((e) => '${_kVariableStructName(context.name)}.${e.name}: tokens.${e.name},').join('\n')} + }; +} +'''; +} + +String _generateTokenUtilityExtension( + ClassBuilderContext context, +) { + final type = context.annotation.type.toString(); + final settings = _predefinedTokens[type]!; + String result = ''; + + for (final utility in settings.utilities) { + result += ''' +extension ${_kUtilityExtensionName(context.name, utility)} on $utility { + ${context.fields.map((e) => 'T ${e.name}() => ref(${_kVariableStructName(context.classElement.name)}.${e.name});').join('\n ')} +} +'''; } + + return result; +} + +String _generateBuildContextMethods(ClassBuilderContext context) { + return ''' +class ${_kBuildContextMethodsClassName(context.name)} { + const ${_kBuildContextMethodsClassName(context.name)}(this.context); + + final BuildContext context; + + ${context.fields.map((e) => '${e.name}() => ${_kVariableStructName(context.name)}.${e.name}.resolve(context);').join('\n')} +} +'''; +} + +String _generateBuildContextExtension( + ClassBuilderContext context, +) { + final type = context.annotation.type.toString(); + final settings = _predefinedTokens[type]!; + + return ''' +extension ${_kBuildContextExtensionName(context.name)} on BuildContext { + ${_kBuildContextMethodsClassName(context.name)} get \$${settings.alias} => + ${_kBuildContextMethodsClassName(context.name)}(this); +} +'''; } diff --git a/packages/mix_generator/pubspec.yaml b/packages/mix_generator/pubspec.yaml index d8c38f5d2..cce887db9 100644 --- a/packages/mix_generator/pubspec.yaml +++ b/packages/mix_generator/pubspec.yaml @@ -15,7 +15,6 @@ dependencies: dart_style: ^2.3.6 collection: ^1.17.1 build_config: ^1.1.1 - code_builder: ^4.10.1 dev_dependencies: test: ^1.24.4 diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart index ad9308fd2..20b2981d6 100644 --- a/packages/remix/lib/src/theme.dart +++ b/packages/remix/lib/src/theme.dart @@ -4,7 +4,7 @@ import 'package:mix_annotations/mix_annotations.dart'; part 'theme.g.dart'; -@MixableToken() +@MixableToken(Color) class ColorTokens { final Color primary; final Color secondary; @@ -16,10 +16,10 @@ class ColorTokens { required this.tertiary, }); - Map get data => _$TokensToData(this); + Map get data => _$ColorTokensToData(this); } -@MixableToken() +@MixableToken(TextStyle) class TextTokens { final TextStyle h1; final TextStyle h2; @@ -32,12 +32,36 @@ class TextTokens { required this.h3, required this.body, }); + + Map get data => _$TextTokensToData(this); +} + +@MixableToken(Radius) +class RadiusTokens { + final Radius small; + final Radius medium; + final Radius large; + + const RadiusTokens({ + required this.small, + required this.medium, + required this.large, + }); + + Map get data => _$RadiusTokensToData(this); } -class ColorStruct { - final Color p10; - final Color p20; - final Color p30; +@MixableToken(double) +class SpaceTokens { + final double p8; + final double p16; + final double p24; + + const SpaceTokens({ + required this.p8, + required this.p16, + required this.p24, + }); - const ColorStruct(this.p10, this.p20, this.p30); + Map get data => _$SpaceTokensToData(this); } diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart index f79df21c1..fe52683b4 100644 --- a/packages/remix/lib/src/theme.g.dart +++ b/packages/remix/lib/src/theme.g.dart @@ -10,29 +10,120 @@ class _$ColorTokensStruct { const _$ColorTokensStruct(); final ColorToken primary = const ColorToken('primary'); - final ColorToken secondary = const ColorToken('secondary'); - final ColorToken tertiary = const ColorToken('tertiary'); } -const _tokens = _$ColorTokensStruct(); -Map _$TokensToData(ColorTokens tokens) { +const _structColorTokens = _$ColorTokensStruct(); +Map _$ColorTokensToData(ColorTokens tokens) { return { - _tokens.primary: tokens.primary, - _tokens.secondary: tokens.secondary, - _tokens.tertiary: tokens.tertiary, + _structColorTokens.primary: tokens.primary, + _structColorTokens.secondary: tokens.secondary, + _structColorTokens.tertiary: tokens.tertiary, }; } extension $ColorTokensX on ColorUtility { - T primary() => ref(_tokens.primary); - T secondary() => ref(_tokens.secondary); - T tertiary() => ref(_tokens.tertiary); + T primary() => ref(_structColorTokens.primary); + T secondary() => ref(_structColorTokens.secondary); + T tertiary() => ref(_structColorTokens.tertiary); } extension $BuildContextColorTokensX on BuildContext { - Color primary() => _tokens.primary.resolve(this); - Color secondary() => _tokens.secondary.resolve(this); - Color tertiary() => _tokens.tertiary.resolve(this); + Color primary() => _structColorTokens.primary.resolve(this); + Color secondary() => _structColorTokens.secondary.resolve(this); + Color tertiary() => _structColorTokens.tertiary.resolve(this); +} + +class _$TextTokensStruct { + const _$TextTokensStruct(); + + final TextStyleToken h1 = const TextStyleToken('h1'); + final TextStyleToken h2 = const TextStyleToken('h2'); + final TextStyleToken h3 = const TextStyleToken('h3'); + final TextStyleToken body = const TextStyleToken('body'); +} + +const _structTextTokens = _$TextTokensStruct(); +Map _$TextTokensToData(TextTokens tokens) { + return { + _structTextTokens.h1: tokens.h1, + _structTextTokens.h2: tokens.h2, + _structTextTokens.h3: tokens.h3, + _structTextTokens.body: tokens.body, + }; +} + +extension $TextTokensX on TextStyleUtility { + T h1() => ref(_structTextTokens.h1); + T h2() => ref(_structTextTokens.h2); + T h3() => ref(_structTextTokens.h3); + T body() => ref(_structTextTokens.body); +} + +extension $BuildContextTextTokensX on BuildContext { + TextStyle h1() => _structTextTokens.h1.resolve(this); + TextStyle h2() => _structTextTokens.h2.resolve(this); + TextStyle h3() => _structTextTokens.h3.resolve(this); + TextStyle body() => _structTextTokens.body.resolve(this); +} + +class _$RadiusTokensStruct { + const _$RadiusTokensStruct(); + + final RadiusToken small = const RadiusToken('small'); + final RadiusToken medium = const RadiusToken('medium'); + final RadiusToken large = const RadiusToken('large'); +} + +const _structRadiusTokens = _$RadiusTokensStruct(); +Map _$RadiusTokensToData(RadiusTokens tokens) { + return { + _structRadiusTokens.small: tokens.small, + _structRadiusTokens.medium: tokens.medium, + _structRadiusTokens.large: tokens.large, + }; +} + +extension $RadiusTokensX on RadiusUtility { + T small() => ref(_structRadiusTokens.small); + T medium() => ref(_structRadiusTokens.medium); + T large() => ref(_structRadiusTokens.large); +} + +extension $BuildContextRadiusTokensX on BuildContext { + Radius small() => _structRadiusTokens.small.resolve(this); + Radius medium() => _structRadiusTokens.medium.resolve(this); + Radius large() => _structRadiusTokens.large.resolve(this); +} + +class _$SpaceTokensStruct { + const _$SpaceTokensStruct(); + + final SpaceToken p8 = const SpaceToken('p8'); + + final SpaceToken p16 = const SpaceToken('p16'); + + final SpaceToken p24 = const SpaceToken('p24'); +} + +const _structSpaceTokens = _$SpaceTokensStruct(); +Map _$SpaceTokensToData(SpaceTokens tokens) { + return { + _structSpaceTokens.p8: tokens.p8, + _structSpaceTokens.p16: tokens.p16, + _structSpaceTokens.p24: tokens.p24, + }; +} + +extension $SpaceTokensX on SpacingSideUtility { + T p8() => ref(_structSpaceTokens.p8); + T p16() => ref(_structSpaceTokens.p16); + T p24() => ref(_structSpaceTokens.p24); +} + +extension $BuildContextSpaceTokensX on BuildContext { + double p8() => _structSpaceTokens.p8.resolve(this); + double p16() => _structSpaceTokens.p16.resolve(this); + double p24() => _structSpaceTokens.p24.resolve(this); } From 774ddfe4960d64761ddc8298f9a355942c172527 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:13:18 -0300 Subject: [PATCH 03/30] annotation improvements --- examples/todo_list/lib/style/token.dart | 137 +++++++++++++++ examples/todo_list/lib/style/token.g.dart | 162 ++++++++++++++++++ examples/todo_list/pubspec.yaml | 11 +- .../mix_annotations/lib/src/annotations.dart | 16 +- .../lib/src/builders/dto/class_utility.dart | 9 +- .../lib/src/builders/dto/extension_value.dart | 2 +- .../builders/spec/class_attribute_spec.dart | 5 +- .../lib/src/helpers/annotation_helpers.dart | 9 +- .../lib/src/helpers/field_info.dart | 11 +- .../lib/src/mixable_spec_generator.dart | 7 +- .../lib/src/mixable_tokens_generator.dart | 110 +++++++++--- 11 files changed, 442 insertions(+), 37 deletions(-) create mode 100644 examples/todo_list/lib/style/token.dart create mode 100644 examples/todo_list/lib/style/token.g.dart diff --git a/examples/todo_list/lib/style/token.dart b/examples/todo_list/lib/style/token.dart new file mode 100644 index 000000000..f84c47520 --- /dev/null +++ b/examples/todo_list/lib/style/token.dart @@ -0,0 +1,137 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +part 'token.g.dart'; + +final theme = MixThemeData( + colors: const MyThemeColorToken( + primary: Colors.blue, + onPrimary: Colors.white, + surface: ColorSwatch(2, { + 1: Colors.blue, + 2: Colors.blue, + }), + onSurface: Colors.black, + onSurfaceVariant: Colors.grey, + ).toMap, +); + +@MixableToken( + Color, + namespace: 'c', +) +class MyThemeColorToken { + final Color primary; + final Color onPrimary; + final Color onSurface; + + @MixableSwatchColorToken(scale: 12) + final Color onSurfaceVariant; + + final ColorSwatch surface; + + const MyThemeColorToken({ + required this.primary, + required this.onPrimary, + required this.surface, + required this.onSurface, + required this.onSurfaceVariant, + }); + + Map get toMap => _$MyThemeColorTokenToMap(this); +} + +@MixableToken( + TextStyle, + utilityExtension: false, + contextExtension: false, +) +class MyThemeTextStyleToken { + final TextStyle headline1; + final TextStyle headline2; + final TextStyle headline3; + final TextStyle body; + final TextStyle callout; + + const MyThemeTextStyleToken({ + required this.headline1, + required this.headline2, + required this.headline3, + required this.body, + required this.callout, + }); + + Map get toMap => + _$MyThemeTextStyleTokenToMap(this); +} + +@MixableToken(Radius) +class MyThemeRadiusToken { + const MyThemeRadiusToken({ + required this.large, + required this.medium, + }); + + final Radius large; + final Radius medium; + + Map get toMap => _$MyThemeRadiusTokenToMap(this); +} + +@MixableToken(double) +class MyThemeSpaceToken { + const MyThemeSpaceToken({ + required this.medium, + required this.large, + }); + + final double medium; + final double large; + + Map get toMap => _$MyThemeSpaceTokenToMap(this); +} + +final lightBlueTheme = MixThemeData( + colors: const MyThemeColorToken( + primary: Color(0xFF0093B9), + onPrimary: Color(0xFFFAFAFA), + surface: ColorSwatch(0xFFFAFAFA, { + 1: Color(0xFFFAFAFA), + 2: Color(0xFFFAFAFA), + }), + onSurface: Color(0xFF141C24), + onSurfaceVariant: Color(0xFF405473), + ).toMap, + textStyles: MyThemeTextStyleToken( + headline1: GoogleFonts.plusJakartaSans( + fontSize: 22, + fontWeight: FontWeight.bold, + ), + headline2: GoogleFonts.plusJakartaSans( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + headline3: GoogleFonts.plusJakartaSans( + fontSize: 14, + fontWeight: FontWeight.bold, + ), + body: GoogleFonts.plusJakartaSans( + fontSize: 16, + fontWeight: FontWeight.normal, + ), + callout: GoogleFonts.plusJakartaSans( + fontSize: 14, + fontWeight: FontWeight.normal, + ), + ).toMap, + radii: const MyThemeRadiusToken( + large: Radius.circular(100), + medium: Radius.circular(12), + ).toMap, + spaces: const MyThemeSpaceToken( + medium: 16, + large: 24, + ).toMap, +); diff --git a/examples/todo_list/lib/style/token.g.dart b/examples/todo_list/lib/style/token.g.dart new file mode 100644 index 000000000..f0146f0f7 --- /dev/null +++ b/examples/todo_list/lib/style/token.g.dart @@ -0,0 +1,162 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'token.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$MyThemeColorTokenStruct { + _$MyThemeColorTokenStruct(); + + final ColorToken primary = const ColorToken('primary'); + final ColorToken onPrimary = const ColorToken('onPrimary'); + final ColorToken onSurface = const ColorToken('onSurface'); + final ColorSwatchToken onSurfaceVariant = + ColorSwatchToken.scale('onSurfaceVariant', 12); + final ColorToken surface = const ColorToken('surface'); +} + +final _structMyThemeColorToken = _$MyThemeColorTokenStruct(); + +Map _$MyThemeColorTokenToMap(MyThemeColorToken tokens) { + return { + _structMyThemeColorToken.primary: tokens.primary, + _structMyThemeColorToken.onPrimary: tokens.onPrimary, + _structMyThemeColorToken.surface: tokens.surface, + _structMyThemeColorToken.onSurface: tokens.onSurface, + _structMyThemeColorToken.onSurfaceVariant: tokens.onSurfaceVariant, + }; +} + +extension $MyThemeColorTokenColorUtilityX + on ColorUtility { + primary() => ref(_structMyThemeColorToken.primary); + onPrimary() => ref(_structMyThemeColorToken.onPrimary); + onSurface() => ref(_structMyThemeColorToken.onSurface); + onSurfaceVariant([int step = 1]) => + ref(_structMyThemeColorToken.onSurfaceVariant[step]); + surface() => ref(_structMyThemeColorToken.surface); + toMap() => ref(_structMyThemeColorToken.toMap); +} + +class BuildContextMyThemeColorTokenMethods { + const BuildContextMyThemeColorTokenMethods(this.context); + + final BuildContext context; + primary() => _structMyThemeColorToken.primary.resolve(context); + onPrimary() => _structMyThemeColorToken.onPrimary.resolve(context); + onSurface() => _structMyThemeColorToken.onSurface.resolve(context); + onSurfaceVariant([int step = 1]) => + _structMyThemeColorToken.onSurfaceVariant[step].resolve(context); + surface() => _structMyThemeColorToken.surface.resolve(context); + toMap() => _structMyThemeColorToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeColorTokenX on BuildContext { + BuildContextMyThemeColorTokenMethods get $c => + BuildContextMyThemeColorTokenMethods(this); +} + +class _$MyThemeTextStyleTokenStruct { + _$MyThemeTextStyleTokenStruct(); + + final TextStyleToken headline1 = const TextStyleToken('headline1'); + final TextStyleToken headline2 = const TextStyleToken('headline2'); + final TextStyleToken headline3 = const TextStyleToken('headline3'); + final TextStyleToken body = const TextStyleToken('body'); + final TextStyleToken callout = const TextStyleToken('callout'); +} + +final _structMyThemeTextStyleToken = _$MyThemeTextStyleTokenStruct(); + +Map _$MyThemeTextStyleTokenToMap( + MyThemeTextStyleToken tokens) { + return { + _structMyThemeTextStyleToken.headline1: tokens.headline1, + _structMyThemeTextStyleToken.headline2: tokens.headline2, + _structMyThemeTextStyleToken.headline3: tokens.headline3, + _structMyThemeTextStyleToken.body: tokens.body, + _structMyThemeTextStyleToken.callout: tokens.callout, + }; +} + +class _$MyThemeRadiusTokenStruct { + _$MyThemeRadiusTokenStruct(); + + final RadiusToken large = const RadiusToken('large'); + final RadiusToken medium = const RadiusToken('medium'); +} + +final _structMyThemeRadiusToken = _$MyThemeRadiusTokenStruct(); + +Map _$MyThemeRadiusTokenToMap(MyThemeRadiusToken tokens) { + return { + _structMyThemeRadiusToken.large: tokens.large, + _structMyThemeRadiusToken.medium: tokens.medium, + }; +} + +extension $MyThemeRadiusTokenRadiusUtilityX + on RadiusUtility { + large() => ref(_structMyThemeRadiusToken.large); + medium() => ref(_structMyThemeRadiusToken.medium); + toMap() => ref(_structMyThemeRadiusToken.toMap); +} + +class BuildContextMyThemeRadiusTokenMethods { + const BuildContextMyThemeRadiusTokenMethods(this.context); + + final BuildContext context; + large() => _structMyThemeRadiusToken.large.resolve(context); + medium() => _structMyThemeRadiusToken.medium.resolve(context); + toMap() => _structMyThemeRadiusToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeRadiusTokenX on BuildContext { + BuildContextMyThemeRadiusTokenMethods get $radius => + BuildContextMyThemeRadiusTokenMethods(this); +} + +class _$MyThemeSpaceTokenStruct { + _$MyThemeSpaceTokenStruct(); + + final SpaceToken medium = const SpaceToken('medium'); + final SpaceToken large = const SpaceToken('large'); +} + +final _structMyThemeSpaceToken = _$MyThemeSpaceTokenStruct(); + +Map _$MyThemeSpaceTokenToMap(MyThemeSpaceToken tokens) { + return { + _structMyThemeSpaceToken.medium: tokens.medium, + _structMyThemeSpaceToken.large: tokens.large, + }; +} + +extension $MyThemeSpaceTokenSpacingSideUtilityX + on SpacingSideUtility { + medium() => ref(_structMyThemeSpaceToken.medium); + large() => ref(_structMyThemeSpaceToken.large); + toMap() => ref(_structMyThemeSpaceToken.toMap); +} + +extension $MyThemeSpaceTokenGapUtilityX on GapUtility { + medium() => ref(_structMyThemeSpaceToken.medium); + large() => ref(_structMyThemeSpaceToken.large); + toMap() => ref(_structMyThemeSpaceToken.toMap); +} + +class BuildContextMyThemeSpaceTokenMethods { + const BuildContextMyThemeSpaceTokenMethods(this.context); + + final BuildContext context; + medium() => _structMyThemeSpaceToken.medium.resolve(context); + large() => _structMyThemeSpaceToken.large.resolve(context); + toMap() => _structMyThemeSpaceToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeSpaceTokenX on BuildContext { + BuildContextMyThemeSpaceTokenMethods get $space => + BuildContextMyThemeSpaceTokenMethods(this); +} diff --git a/examples/todo_list/pubspec.yaml b/examples/todo_list/pubspec.yaml index 6f3a2dbef..51851c055 100644 --- a/examples/todo_list/pubspec.yaml +++ b/examples/todo_list/pubspec.yaml @@ -12,17 +12,22 @@ environment: dependencies: flutter: sdk: flutter - mix: + mix: path: ../../packages/mix + mix_annotations: + path: ../../packages/mix_annotations custom_lint: ^0.6.4 - google_fonts: ^6.0.0 + google_fonts: ^6.0.0 cupertino_icons: ^1.0.6 dev_dependencies: + mix_generator: + path: ../../packages/mix_generator + build_runner: flutter_test: sdk: flutter - mix_lint: + mix_lint: path: ../../packages/mix_lint flutter_lints: ^4.0.0 diff --git a/packages/mix_annotations/lib/src/annotations.dart b/packages/mix_annotations/lib/src/annotations.dart index fb8f911ae..0de48fefc 100644 --- a/packages/mix_annotations/lib/src/annotations.dart +++ b/packages/mix_annotations/lib/src/annotations.dart @@ -251,7 +251,21 @@ class MixDeprecatedRenamed extends MixDeprecated { class MixableToken { final Object type; - const MixableToken(this.type); + final String? namespace; + final bool utilityExtension; + final bool contextExtension; + + const MixableToken( + this.type, { + this.namespace, + this.utilityExtension = true, + this.contextExtension = true, + }); + + @override + String toString() { + return 'MixableToken(type: $type, namespace: $namespace, utilityExtension: $utilityExtension, contextExtension: $contextExtension)'; + } } class MixableSwatchColorToken { diff --git a/packages/mix_generator/lib/src/builders/dto/class_utility.dart b/packages/mix_generator/lib/src/builders/dto/class_utility.dart index 2f0827488..4f6650b08 100644 --- a/packages/mix_generator/lib/src/builders/dto/class_utility.dart +++ b/packages/mix_generator/lib/src/builders/dto/class_utility.dart @@ -20,24 +20,25 @@ String utilityClass(ClassBuilderContext context) { final instance = ClassInfo( name: utilityName, - fields: context.fields, + fields: context.constructorParameters, extendsType: extendsType, genericTypes: {'T extends Attribute'}, ); final className = instance.name; - final fields = generateUtilityFields(attributeName, context.fields); + final fields = + generateUtilityFields(attributeName, context.constructorParameters); final onlyMethod = utilityMethodOnlyBuilder( utilityType: attributeName, - fields: context.fields, + fields: context.constructorParameters, ); final valueClassFields = generateUtilityFieldsFromClass(context.classElement); final callMethodDefinition = - isDto ? utilityMethodCallBuilder(context.fields) : ''; + isDto ? utilityMethodCallBuilder(context.constructorParameters) : ''; final chainGetterDefinition = isDto ? '' diff --git a/packages/mix_generator/lib/src/builders/dto/extension_value.dart b/packages/mix_generator/lib/src/builders/dto/extension_value.dart index 6f05bfb87..a7177ec40 100644 --- a/packages/mix_generator/lib/src/builders/dto/extension_value.dart +++ b/packages/mix_generator/lib/src/builders/dto/extension_value.dart @@ -13,7 +13,7 @@ String toRefTypeExtension(ClassBuilderContext context) { params[element.name] = ParameterInfo.ofElement(element); }); - final fieldStatements = context.fields.map((field) { + final fieldStatements = context.constructorParameters.map((field) { final fieldName = field.name; if (field.hasDto) { diff --git a/packages/mix_generator/lib/src/builders/spec/class_attribute_spec.dart b/packages/mix_generator/lib/src/builders/spec/class_attribute_spec.dart index c74582619..306552b7a 100644 --- a/packages/mix_generator/lib/src/builders/spec/class_attribute_spec.dart +++ b/packages/mix_generator/lib/src/builders/spec/class_attribute_spec.dart @@ -1,9 +1,10 @@ import 'package:mix_annotations/mix_annotations.dart'; + +import '../../helpers/field_info.dart'; import '../method_debug_fill_properties.dart'; import '../method_equality.dart'; import '../method_merge.dart'; import '../method_resolve.dart'; -import '../../helpers/field_info.dart'; String specAttributeClass(ClassBuilderContext context) { final specName = context.name; @@ -13,7 +14,7 @@ String specAttributeClass(ClassBuilderContext context) { final attributeInstance = ClassInfo( name: context.attributeName, - fields: context.fields, + fields: context.constructorParameters, isBase: specInstance.isBase, isFinal: specInstance.isFinal, mixinTypes: hasDiagnosticable ? {'Diagnosticable'} : {}, diff --git a/packages/mix_generator/lib/src/helpers/annotation_helpers.dart b/packages/mix_generator/lib/src/helpers/annotation_helpers.dart index 54583990b..0432d860a 100644 --- a/packages/mix_generator/lib/src/helpers/annotation_helpers.dart +++ b/packages/mix_generator/lib/src/helpers/annotation_helpers.dart @@ -123,5 +123,12 @@ MixableToken readMixableToken(ClassElement element) { final reader = ConstantReader(annotation); final type = reader.read('type').typeValue; - return MixableToken(type); + return MixableToken( + type, + namespace: reader.read('namespace').isNull + ? null + : reader.read('namespace').stringValue, + utilityExtension: reader.read('utilityExtension').boolValue, + contextExtension: reader.read('contextExtension').boolValue, + ); } diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index ede3e81f8..74ab19829 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -92,6 +92,7 @@ class ParameterInfo extends FieldInfo { final bool isPositional; final bool isRequiredNamed; final bool isRequiredPositional; + final ParameterElement element; const ParameterInfo({ required super.name, @@ -105,6 +106,7 @@ class ParameterInfo extends FieldInfo { required super.hasDeprecated, required this.isRequiredNamed, required this.isRequiredPositional, + required this.element, }); factory ParameterInfo.ofElement(ParameterElement element) { @@ -126,6 +128,7 @@ class ParameterInfo extends FieldInfo { (fieldInfo?.hasDeprecated ?? false) || element.hasDeprecated, isRequiredNamed: element.isRequiredNamed, isRequiredPositional: element.isRequiredPositional, + element: element, ); } String get asInternalRef => '$internalRefPrefix.$name'; @@ -301,13 +304,19 @@ class ClassBuilderContext { required this.annotation, }); - List get fields { + List get constructorParameters { if (_fieldsCache != null) return _fieldsCache!; return _fieldsCache = constructor.parameters.map(ParameterInfo.ofElement).toList(); } + // List get fields { + // // if (_fieldsCache != null) return _fieldsCache!; + + // return classElement.fields.map((e) => FieldInfo.ofElement(e)).toList(); + // } + bool get hasDiagnosticable => classElement.allSupertypes.any((e) => e.element.name == 'Diagnosticable'); diff --git a/packages/mix_generator/lib/src/mixable_spec_generator.dart b/packages/mix_generator/lib/src/mixable_spec_generator.dart index 8ee1856d0..404638272 100644 --- a/packages/mix_generator/lib/src/mixable_spec_generator.dart +++ b/packages/mix_generator/lib/src/mixable_spec_generator.dart @@ -38,9 +38,10 @@ class MixableSpecGenerator extends GeneratorForAnnotation { ) async { final context = _loadContext(element); - final deprecatedRule = context.fields.any((e) => e.hasDeprecated) - ? '// ignore_for_file: deprecated_member_use_from_same_package' - : ''; + final deprecatedRule = + context.constructorParameters.any((e) => e.hasDeprecated) + ? '// ignore_for_file: deprecated_member_use_from_same_package' + : ''; final skipUtility = context.annotation.skipUtility; diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart index 5bd6fb160..9aa8a1330 100644 --- a/packages/mix_generator/lib/src/mixable_tokens_generator.dart +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -36,36 +36,45 @@ class MixableTokensGenerator extends GeneratorForAnnotation { output.writeln(_generateTokenStruct(context)); output.writeln(_generateTokenToDataMethod(context)); - output.writeln(_generateTokenUtilityExtension(context)); - output.writeln(_generateBuildContextMethods(context)); - output.writeln(_generateBuildContextExtension(context)); + + if (context.annotation.utilityExtension) { + output.writeln(_generateTokenUtilityExtension(context)); + } + if (context.annotation.contextExtension) { + output.writeln(_generateBuildContextMethods(context)); + output.writeln(_generateBuildContextExtension(context)); + } return dartFormat(output.toString()); } } const _predefinedTokens = { - 'Color': (token: 'ColorToken', utilities: ['ColorUtility'], alias: 'color'), + 'Color': ( + token: 'ColorToken', + utilities: ['ColorUtility'], + defaultNamespace: 'color', + ), 'TextStyle': ( token: 'TextStyleToken', utilities: ['TextStyleUtility'], - alias: 'textStyle', + defaultNamespace: 'textStyle', ), 'double': ( token: 'SpaceToken', utilities: ['SpacingSideUtility', 'GapUtility'], - alias: 'space', + defaultNamespace: 'space', ), 'Radius': ( token: 'RadiusToken', utilities: ['RadiusUtility'], - alias: 'radius', + defaultNamespace: 'radius', ), }; String _kTokenStructName(String name) => '_\$${name}Struct'; String _kVariableStructName(String name) => '_struct$name'; -String _kFunctionToDataName(String name) => '_\$${name}ToData'; +String _kFunctionToMapName(String name) => '_\$${name}ToMap'; String _kUtilityExtensionName(String name, String utility) => '\$$name${utility}X'; String _kBuildContextMethodsClassName(String name) => @@ -76,15 +85,33 @@ String _generateTokenStruct(ClassBuilderContext context) { final type = context.annotation.type.toString(); final settings = _predefinedTokens[type]!; - return ''' -class ${_kTokenStructName(context.name)} { - const ${_kTokenStructName(context.name)}(); + final buffer = StringBuffer(); + buffer.writeln('class ${_kTokenStructName(context.name)} {'); + buffer.writeln(' ${_kTokenStructName(context.name)}();'); + buffer.writeln(); - ${context.fields.map((e) => 'final ${settings.token} ${e.name} = const ${settings.token}(\'${e.name}\');').join('\n')} -} + for (var i = 0; i < context.constructorParameters.length; i++) { + final field = context.classElement.fields[i]; -const ${_kVariableStructName(context.name)} = ${_kTokenStructName(context.name)}(); -'''; + final annotation = getMixableSwatchColorToken(field); + if (annotation != null) { + buffer.writeln( + ' final ColorSwatchToken ${field.name} = ColorSwatchToken.scale(\'${field.name}\', ${annotation.scale});', + ); + } else { + buffer.writeln( + ' final ${settings.token} ${field.name} = const ${settings.token}(\'${field.name}\');', + ); + } + } + + buffer.writeln('}'); + buffer.writeln(); + buffer.writeln( + 'final ${_kVariableStructName(context.name)} = ${_kTokenStructName(context.name)}();', + ); + + return buffer.toString(); } String _generateTokenToDataMethod(ClassBuilderContext context) { @@ -93,9 +120,9 @@ String _generateTokenToDataMethod(ClassBuilderContext context) { return ''' -Map<${settings.token}, $type> ${_kFunctionToDataName(context.name)}(${context.name} tokens) { +Map<${settings.token}, $type> ${_kFunctionToMapName(context.name)}(${context.name} tokens) { return { - ${context.fields.map((e) => '${_kVariableStructName(context.name)}.${e.name}: tokens.${e.name},').join('\n')} + ${context.constructorParameters.map((e) => '${_kVariableStructName(context.name)}.${e.name}: tokens.${e.name},').join('\n')} }; } '''; @@ -108,10 +135,25 @@ String _generateTokenUtilityExtension( final settings = _predefinedTokens[type]!; String result = ''; + String generateMethod(int index) { + final field = context.classElement.fields[index]; + print(field.type); + final annotation = getMixableSwatchColorToken(field); + + if (annotation != null) { + return '${field.name}([int step = ${annotation.defaultValue}]) => ref(${_kVariableStructName(context.name)}.${field.name}[step]);'; + } + + return '${field.name}() => ref(${_kVariableStructName(context.name)}.${field.name});'; + } + for (final utility in settings.utilities) { result += ''' extension ${_kUtilityExtensionName(context.name, utility)} on $utility { - ${context.fields.map((e) => 'T ${e.name}() => ref(${_kVariableStructName(context.classElement.name)}.${e.name});').join('\n ')} + ${[ + for (var i = 0; i < context.classElement.fields.length; i++) + generateMethod(i), + ].join('\n')} } '''; } @@ -120,13 +162,25 @@ extension ${_kUtilityExtensionName(context.name, utility)} } String _generateBuildContextMethods(ClassBuilderContext context) { + String generateMethod(int index) { + final field = context.classElement.fields[index]; + final annotation = getMixableSwatchColorToken(field); + if (annotation != null) { + return '${field.name}([int step = ${annotation.defaultValue}]) => ${_kVariableStructName(context.name)}.${field.name}[step].resolve(context);'; + } + + return '${field.name}() => ${_kVariableStructName(context.name)}.${field.name}.resolve(context);'; + } + return ''' class ${_kBuildContextMethodsClassName(context.name)} { const ${_kBuildContextMethodsClassName(context.name)}(this.context); final BuildContext context; - - ${context.fields.map((e) => '${e.name}() => ${_kVariableStructName(context.name)}.${e.name}.resolve(context);').join('\n')} + ${[ + for (var i = 0; i < context.classElement.fields.length; i++) + generateMethod(i), + ].join('\n')} } '''; } @@ -139,8 +193,22 @@ String _generateBuildContextExtension( return ''' extension ${_kBuildContextExtensionName(context.name)} on BuildContext { - ${_kBuildContextMethodsClassName(context.name)} get \$${settings.alias} => + ${_kBuildContextMethodsClassName(context.name)} get \$${context.annotation.namespace ?? settings.defaultNamespace} => ${_kBuildContextMethodsClassName(context.name)}(this); } '''; } + +const _tokenChecker = TypeChecker.fromRuntime(MixableSwatchColorToken); + +MixableSwatchColorToken? getMixableSwatchColorToken(FieldElement element) { + final annotation = _tokenChecker.firstAnnotationOfExact(element); + print('annotation: $annotation, ${element.name}'); + if (annotation == null) return null; + + final reader = ConstantReader(annotation); + final scale = reader.read('scale').intValue; + final defaultValue = reader.read('defaultValue').intValue; + + return MixableSwatchColorToken(scale: scale, defaultValue: defaultValue); +} From fc6555c7473599770a2d3cf8cf7948d6859291a9 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:34:03 -0300 Subject: [PATCH 04/30] improve the SwatchColorToken --- examples/todo_list/lib/style/token.g.dart | 13 +++------- .../lib/src/helpers/field_info.dart | 8 ++++++ .../lib/src/mixable_tokens_generator.dart | 26 ++++++++++++++----- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/examples/todo_list/lib/style/token.g.dart b/examples/todo_list/lib/style/token.g.dart index f0146f0f7..7d1d2e4b8 100644 --- a/examples/todo_list/lib/style/token.g.dart +++ b/examples/todo_list/lib/style/token.g.dart @@ -11,10 +11,10 @@ class _$MyThemeColorTokenStruct { final ColorToken primary = const ColorToken('primary'); final ColorToken onPrimary = const ColorToken('onPrimary'); + final ColorToken surface = const ColorToken('surface'); final ColorToken onSurface = const ColorToken('onSurface'); final ColorSwatchToken onSurfaceVariant = ColorSwatchToken.scale('onSurfaceVariant', 12); - final ColorToken surface = const ColorToken('surface'); } final _structMyThemeColorToken = _$MyThemeColorTokenStruct(); @@ -33,11 +33,10 @@ extension $MyThemeColorTokenColorUtilityX on ColorUtility { primary() => ref(_structMyThemeColorToken.primary); onPrimary() => ref(_structMyThemeColorToken.onPrimary); + surface() => ref(_structMyThemeColorToken.surface); onSurface() => ref(_structMyThemeColorToken.onSurface); onSurfaceVariant([int step = 1]) => ref(_structMyThemeColorToken.onSurfaceVariant[step]); - surface() => ref(_structMyThemeColorToken.surface); - toMap() => ref(_structMyThemeColorToken.toMap); } class BuildContextMyThemeColorTokenMethods { @@ -46,11 +45,10 @@ class BuildContextMyThemeColorTokenMethods { final BuildContext context; primary() => _structMyThemeColorToken.primary.resolve(context); onPrimary() => _structMyThemeColorToken.onPrimary.resolve(context); + surface() => _structMyThemeColorToken.surface.resolve(context); onSurface() => _structMyThemeColorToken.onSurface.resolve(context); onSurfaceVariant([int step = 1]) => _structMyThemeColorToken.onSurfaceVariant[step].resolve(context); - surface() => _structMyThemeColorToken.surface.resolve(context); - toMap() => _structMyThemeColorToken.toMap.resolve(context); } extension $BuildContextMyThemeColorTokenX on BuildContext { @@ -101,7 +99,6 @@ extension $MyThemeRadiusTokenRadiusUtilityX on RadiusUtility { large() => ref(_structMyThemeRadiusToken.large); medium() => ref(_structMyThemeRadiusToken.medium); - toMap() => ref(_structMyThemeRadiusToken.toMap); } class BuildContextMyThemeRadiusTokenMethods { @@ -110,7 +107,6 @@ class BuildContextMyThemeRadiusTokenMethods { final BuildContext context; large() => _structMyThemeRadiusToken.large.resolve(context); medium() => _structMyThemeRadiusToken.medium.resolve(context); - toMap() => _structMyThemeRadiusToken.toMap.resolve(context); } extension $BuildContextMyThemeRadiusTokenX on BuildContext { @@ -138,13 +134,11 @@ extension $MyThemeSpaceTokenSpacingSideUtilityX on SpacingSideUtility { medium() => ref(_structMyThemeSpaceToken.medium); large() => ref(_structMyThemeSpaceToken.large); - toMap() => ref(_structMyThemeSpaceToken.toMap); } extension $MyThemeSpaceTokenGapUtilityX on GapUtility { medium() => ref(_structMyThemeSpaceToken.medium); large() => ref(_structMyThemeSpaceToken.large); - toMap() => ref(_structMyThemeSpaceToken.toMap); } class BuildContextMyThemeSpaceTokenMethods { @@ -153,7 +147,6 @@ class BuildContextMyThemeSpaceTokenMethods { final BuildContext context; medium() => _structMyThemeSpaceToken.medium.resolve(context); large() => _structMyThemeSpaceToken.large.resolve(context); - toMap() => _structMyThemeSpaceToken.toMap.resolve(context); } extension $BuildContextMyThemeSpaceTokenX on BuildContext { diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index 74ab19829..a095a1b1a 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -17,6 +17,8 @@ class FieldInfo { /// Parameter / field type. final String name; + final FieldElement? fieldElement; + final DartType dartType; final bool hasDeprecated; @@ -31,6 +33,7 @@ class FieldInfo { final bool nullable; const FieldInfo({ + required this.fieldElement, required this.name, required this.type, required this.dartType, @@ -42,6 +45,7 @@ class FieldInfo { factory FieldInfo.ofElement(FieldElement element) { return FieldInfo( + fieldElement: element, name: element.name, type: element.type.getTypeAsString(), dartType: element.type, @@ -92,6 +96,7 @@ class ParameterInfo extends FieldInfo { final bool isPositional; final bool isRequiredNamed; final bool isRequiredPositional; + final ParameterElement element; const ParameterInfo({ @@ -107,6 +112,7 @@ class ParameterInfo extends FieldInfo { required this.isRequiredNamed, required this.isRequiredPositional, required this.element, + required super.fieldElement, }); factory ParameterInfo.ofElement(ParameterElement element) { @@ -129,6 +135,7 @@ class ParameterInfo extends FieldInfo { isRequiredNamed: element.isRequiredNamed, isRequiredPositional: element.isRequiredPositional, element: element, + fieldElement: fieldInfo?.fieldElement, ); } String get asInternalRef => '$internalRefPrefix.$name'; @@ -283,6 +290,7 @@ FieldInfo? getFieldInfoFromParameter(ParameterElement parameter) { final annotation = readMixableProperty(field); return FieldInfo( + fieldElement: field, name: field.name, type: field.type.getTypeAsString(), dartType: field.type, diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart index 9aa8a1330..03b9c3b8a 100644 --- a/packages/mix_generator/lib/src/mixable_tokens_generator.dart +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -91,7 +91,11 @@ String _generateTokenStruct(ClassBuilderContext context) { buffer.writeln(); for (var i = 0; i < context.constructorParameters.length; i++) { - final field = context.classElement.fields[i]; + final field = context.constructorParameters[i].fieldElement; + + if (field == null) { + throw Exception('Field element is null'); + } final annotation = getMixableSwatchColorToken(field); if (annotation != null) { @@ -136,8 +140,11 @@ String _generateTokenUtilityExtension( String result = ''; String generateMethod(int index) { - final field = context.classElement.fields[index]; - print(field.type); + final field = context.constructorParameters[index].fieldElement; + if (field == null) { + throw Exception('Field element is null'); + } + final annotation = getMixableSwatchColorToken(field); if (annotation != null) { @@ -151,7 +158,7 @@ String _generateTokenUtilityExtension( result += ''' extension ${_kUtilityExtensionName(context.name, utility)} on $utility { ${[ - for (var i = 0; i < context.classElement.fields.length; i++) + for (var i = 0; i < context.constructorParameters.length; i++) generateMethod(i), ].join('\n')} } @@ -163,8 +170,14 @@ extension ${_kUtilityExtensionName(context.name, utility)} String _generateBuildContextMethods(ClassBuilderContext context) { String generateMethod(int index) { - final field = context.classElement.fields[index]; + final field = context.constructorParameters[index].fieldElement; + + if (field == null) { + throw Exception('Field element is null'); + } + final annotation = getMixableSwatchColorToken(field); + if (annotation != null) { return '${field.name}([int step = ${annotation.defaultValue}]) => ${_kVariableStructName(context.name)}.${field.name}[step].resolve(context);'; } @@ -178,7 +191,7 @@ class ${_kBuildContextMethodsClassName(context.name)} { final BuildContext context; ${[ - for (var i = 0; i < context.classElement.fields.length; i++) + for (var i = 0; i < context.constructorParameters.length; i++) generateMethod(i), ].join('\n')} } @@ -203,7 +216,6 @@ const _tokenChecker = TypeChecker.fromRuntime(MixableSwatchColorToken); MixableSwatchColorToken? getMixableSwatchColorToken(FieldElement element) { final annotation = _tokenChecker.firstAnnotationOfExact(element); - print('annotation: $annotation, ${element.name}'); if (annotation == null) return null; final reader = ConstantReader(annotation); From 0dc47d4452ed7306caca9d3824b53f39b39f4c60 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:44:25 -0300 Subject: [PATCH 05/30] Update mixable_tokens_generator.dart --- .../lib/src/mixable_tokens_generator.dart | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart index 03b9c3b8a..756e23e3b 100644 --- a/packages/mix_generator/lib/src/mixable_tokens_generator.dart +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -31,7 +31,7 @@ class MixableTokensGenerator extends GeneratorForAnnotation { BuildStep buildStep, ) async { final context = _loadContext(element); - + verifyIfIsValidClass(context); final output = StringBuffer(); output.writeln(_generateTokenStruct(context)); @@ -49,6 +49,32 @@ class MixableTokensGenerator extends GeneratorForAnnotation { } } +void verifyIfIsValidClass(ClassBuilderContext context) { + if (context.classElement.fields.isEmpty) { + throw InvalidGenerationSourceError( + 'The class must have at least one field.', + element: context.classElement, + ); + } + if (context.classElement.constructors.isEmpty) { + throw InvalidGenerationSourceError( + 'The class must have at least one constructor.', + element: context.classElement, + ); + } + + for (final param in context.constructorParameters) { + final typeFromAnnotation = context.annotation.type.toString(); + + if (!param.type.toString().contains(typeFromAnnotation)) { + throw InvalidGenerationSourceError( + 'The constructor parameters must have the same type as the class annotation.', + element: param.fieldElement, + ); + } + } +} + const _predefinedTokens = { 'Color': ( token: 'ColorToken', From 3b02008b76fa34861e9ad029284f5126ffea885e Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:45:07 -0300 Subject: [PATCH 06/30] Update mixable_tokens_generator.dart --- .../mix_generator/lib/src/mixable_tokens_generator.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mix_generator/lib/src/mixable_tokens_generator.dart b/packages/mix_generator/lib/src/mixable_tokens_generator.dart index 756e23e3b..16d321c68 100644 --- a/packages/mix_generator/lib/src/mixable_tokens_generator.dart +++ b/packages/mix_generator/lib/src/mixable_tokens_generator.dart @@ -174,10 +174,10 @@ String _generateTokenUtilityExtension( final annotation = getMixableSwatchColorToken(field); if (annotation != null) { - return '${field.name}([int step = ${annotation.defaultValue}]) => ref(${_kVariableStructName(context.name)}.${field.name}[step]);'; + return 'T \$${field.name}([int step = ${annotation.defaultValue}]) => ref(${_kVariableStructName(context.name)}.${field.name}[step]);'; } - return '${field.name}() => ref(${_kVariableStructName(context.name)}.${field.name});'; + return 'T \$${field.name}() => ref(${_kVariableStructName(context.name)}.${field.name});'; } for (final utility in settings.utilities) { @@ -205,10 +205,10 @@ String _generateBuildContextMethods(ClassBuilderContext context) { final annotation = getMixableSwatchColorToken(field); if (annotation != null) { - return '${field.name}([int step = ${annotation.defaultValue}]) => ${_kVariableStructName(context.name)}.${field.name}[step].resolve(context);'; + return '${field.type} ${field.name}([int step = ${annotation.defaultValue}]) => ${_kVariableStructName(context.name)}.${field.name}[step].resolve(context);'; } - return '${field.name}() => ${_kVariableStructName(context.name)}.${field.name}.resolve(context);'; + return '${field.type} ${field.name}() => ${_kVariableStructName(context.name)}.${field.name}.resolve(context);'; } return ''' From 9548c513fd34e978df8ef4c7e9767268434de378 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:14:22 -0300 Subject: [PATCH 07/30] improve tests --- .../src/theme/tokens/text_style_token.dart | 1 - .../mix_annotations/lib/src/annotations.dart | 5 - packages/remix/lib/src/theme.dart | 8 +- packages/remix/lib/src/theme.g.dart | 130 ++++++++++++------ 4 files changed, 90 insertions(+), 54 deletions(-) diff --git a/packages/mix/lib/src/theme/tokens/text_style_token.dart b/packages/mix/lib/src/theme/tokens/text_style_token.dart index 61ab9aacd..743fa045e 100644 --- a/packages/mix/lib/src/theme/tokens/text_style_token.dart +++ b/packages/mix/lib/src/theme/tokens/text_style_token.dart @@ -1,4 +1,3 @@ -//ignore_for_file: avoid-suspicious-super-overrides import 'package:flutter/widgets.dart'; import '../../internal/mix_error.dart'; diff --git a/packages/mix_annotations/lib/src/annotations.dart b/packages/mix_annotations/lib/src/annotations.dart index 0de48fefc..34da2e860 100644 --- a/packages/mix_annotations/lib/src/annotations.dart +++ b/packages/mix_annotations/lib/src/annotations.dart @@ -261,11 +261,6 @@ class MixableToken { this.utilityExtension = true, this.contextExtension = true, }); - - @override - String toString() { - return 'MixableToken(type: $type, namespace: $namespace, utilityExtension: $utilityExtension, contextExtension: $contextExtension)'; - } } class MixableSwatchColorToken { diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart index 20b2981d6..66edc9872 100644 --- a/packages/remix/lib/src/theme.dart +++ b/packages/remix/lib/src/theme.dart @@ -16,7 +16,7 @@ class ColorTokens { required this.tertiary, }); - Map get data => _$ColorTokensToData(this); + Map get data => _$ColorTokensToMap(this); } @MixableToken(TextStyle) @@ -33,7 +33,7 @@ class TextTokens { required this.body, }); - Map get data => _$TextTokensToData(this); + Map get data => _$TextTokensToMap(this); } @MixableToken(Radius) @@ -48,7 +48,7 @@ class RadiusTokens { required this.large, }); - Map get data => _$RadiusTokensToData(this); + Map get data => _$RadiusTokensToMap(this); } @MixableToken(double) @@ -63,5 +63,5 @@ class SpaceTokens { required this.p24, }); - Map get data => _$SpaceTokensToData(this); + Map get data => _$SpaceTokensToMap(this); } diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart index fe52683b4..a39534928 100644 --- a/packages/remix/lib/src/theme.g.dart +++ b/packages/remix/lib/src/theme.g.dart @@ -7,15 +7,16 @@ part of 'theme.dart'; // ************************************************************************** class _$ColorTokensStruct { - const _$ColorTokensStruct(); + _$ColorTokensStruct(); final ColorToken primary = const ColorToken('primary'); final ColorToken secondary = const ColorToken('secondary'); final ColorToken tertiary = const ColorToken('tertiary'); } -const _structColorTokens = _$ColorTokensStruct(); -Map _$ColorTokensToData(ColorTokens tokens) { +final _structColorTokens = _$ColorTokensStruct(); + +Map _$ColorTokensToMap(ColorTokens tokens) { return { _structColorTokens.primary: tokens.primary, _structColorTokens.secondary: tokens.secondary, @@ -23,20 +24,28 @@ Map _$ColorTokensToData(ColorTokens tokens) { }; } -extension $ColorTokensX on ColorUtility { - T primary() => ref(_structColorTokens.primary); - T secondary() => ref(_structColorTokens.secondary); - T tertiary() => ref(_structColorTokens.tertiary); +extension $ColorTokensColorUtilityX on ColorUtility { + T $primary() => ref(_structColorTokens.primary); + T $secondary() => ref(_structColorTokens.secondary); + T $tertiary() => ref(_structColorTokens.tertiary); +} + +class BuildContextColorTokensMethods { + const BuildContextColorTokensMethods(this.context); + + final BuildContext context; + Color primary() => _structColorTokens.primary.resolve(context); + Color secondary() => _structColorTokens.secondary.resolve(context); + Color tertiary() => _structColorTokens.tertiary.resolve(context); } extension $BuildContextColorTokensX on BuildContext { - Color primary() => _structColorTokens.primary.resolve(this); - Color secondary() => _structColorTokens.secondary.resolve(this); - Color tertiary() => _structColorTokens.tertiary.resolve(this); + BuildContextColorTokensMethods get $color => + BuildContextColorTokensMethods(this); } class _$TextTokensStruct { - const _$TextTokensStruct(); + _$TextTokensStruct(); final TextStyleToken h1 = const TextStyleToken('h1'); final TextStyleToken h2 = const TextStyleToken('h2'); @@ -44,8 +53,9 @@ class _$TextTokensStruct { final TextStyleToken body = const TextStyleToken('body'); } -const _structTextTokens = _$TextTokensStruct(); -Map _$TextTokensToData(TextTokens tokens) { +final _structTextTokens = _$TextTokensStruct(); + +Map _$TextTokensToMap(TextTokens tokens) { return { _structTextTokens.h1: tokens.h1, _structTextTokens.h2: tokens.h2, @@ -54,30 +64,40 @@ Map _$TextTokensToData(TextTokens tokens) { }; } -extension $TextTokensX on TextStyleUtility { - T h1() => ref(_structTextTokens.h1); - T h2() => ref(_structTextTokens.h2); - T h3() => ref(_structTextTokens.h3); - T body() => ref(_structTextTokens.body); +extension $TextTokensTextStyleUtilityX + on TextStyleUtility { + T $h1() => ref(_structTextTokens.h1); + T $h2() => ref(_structTextTokens.h2); + T $h3() => ref(_structTextTokens.h3); + T $body() => ref(_structTextTokens.body); +} + +class BuildContextTextTokensMethods { + const BuildContextTextTokensMethods(this.context); + + final BuildContext context; + TextStyle h1() => _structTextTokens.h1.resolve(context); + TextStyle h2() => _structTextTokens.h2.resolve(context); + TextStyle h3() => _structTextTokens.h3.resolve(context); + TextStyle body() => _structTextTokens.body.resolve(context); } extension $BuildContextTextTokensX on BuildContext { - TextStyle h1() => _structTextTokens.h1.resolve(this); - TextStyle h2() => _structTextTokens.h2.resolve(this); - TextStyle h3() => _structTextTokens.h3.resolve(this); - TextStyle body() => _structTextTokens.body.resolve(this); + BuildContextTextTokensMethods get $textStyle => + BuildContextTextTokensMethods(this); } class _$RadiusTokensStruct { - const _$RadiusTokensStruct(); + _$RadiusTokensStruct(); final RadiusToken small = const RadiusToken('small'); final RadiusToken medium = const RadiusToken('medium'); final RadiusToken large = const RadiusToken('large'); } -const _structRadiusTokens = _$RadiusTokensStruct(); -Map _$RadiusTokensToData(RadiusTokens tokens) { +final _structRadiusTokens = _$RadiusTokensStruct(); + +Map _$RadiusTokensToMap(RadiusTokens tokens) { return { _structRadiusTokens.small: tokens.small, _structRadiusTokens.medium: tokens.medium, @@ -85,30 +105,37 @@ Map _$RadiusTokensToData(RadiusTokens tokens) { }; } -extension $RadiusTokensX on RadiusUtility { - T small() => ref(_structRadiusTokens.small); - T medium() => ref(_structRadiusTokens.medium); - T large() => ref(_structRadiusTokens.large); +extension $RadiusTokensRadiusUtilityX on RadiusUtility { + T $small() => ref(_structRadiusTokens.small); + T $medium() => ref(_structRadiusTokens.medium); + T $large() => ref(_structRadiusTokens.large); +} + +class BuildContextRadiusTokensMethods { + const BuildContextRadiusTokensMethods(this.context); + + final BuildContext context; + Radius small() => _structRadiusTokens.small.resolve(context); + Radius medium() => _structRadiusTokens.medium.resolve(context); + Radius large() => _structRadiusTokens.large.resolve(context); } extension $BuildContextRadiusTokensX on BuildContext { - Radius small() => _structRadiusTokens.small.resolve(this); - Radius medium() => _structRadiusTokens.medium.resolve(this); - Radius large() => _structRadiusTokens.large.resolve(this); + BuildContextRadiusTokensMethods get $radius => + BuildContextRadiusTokensMethods(this); } class _$SpaceTokensStruct { - const _$SpaceTokensStruct(); + _$SpaceTokensStruct(); final SpaceToken p8 = const SpaceToken('p8'); - final SpaceToken p16 = const SpaceToken('p16'); - final SpaceToken p24 = const SpaceToken('p24'); } -const _structSpaceTokens = _$SpaceTokensStruct(); -Map _$SpaceTokensToData(SpaceTokens tokens) { +final _structSpaceTokens = _$SpaceTokensStruct(); + +Map _$SpaceTokensToMap(SpaceTokens tokens) { return { _structSpaceTokens.p8: tokens.p8, _structSpaceTokens.p16: tokens.p16, @@ -116,14 +143,29 @@ Map _$SpaceTokensToData(SpaceTokens tokens) { }; } -extension $SpaceTokensX on SpacingSideUtility { - T p8() => ref(_structSpaceTokens.p8); - T p16() => ref(_structSpaceTokens.p16); - T p24() => ref(_structSpaceTokens.p24); +extension $SpaceTokensSpacingSideUtilityX + on SpacingSideUtility { + T $p8() => ref(_structSpaceTokens.p8); + T $p16() => ref(_structSpaceTokens.p16); + T $p24() => ref(_structSpaceTokens.p24); +} + +extension $SpaceTokensGapUtilityX on GapUtility { + T $p8() => ref(_structSpaceTokens.p8); + T $p16() => ref(_structSpaceTokens.p16); + T $p24() => ref(_structSpaceTokens.p24); +} + +class BuildContextSpaceTokensMethods { + const BuildContextSpaceTokensMethods(this.context); + + final BuildContext context; + double p8() => _structSpaceTokens.p8.resolve(context); + double p16() => _structSpaceTokens.p16.resolve(context); + double p24() => _structSpaceTokens.p24.resolve(context); } extension $BuildContextSpaceTokensX on BuildContext { - double p8() => _structSpaceTokens.p8.resolve(this); - double p16() => _structSpaceTokens.p16.resolve(this); - double p24() => _structSpaceTokens.p24.resolve(this); + BuildContextSpaceTokensMethods get $space => + BuildContextSpaceTokensMethods(this); } From a2652f44fe78e113995f185cfcdfad2c78bd8c4e Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:47:26 -0300 Subject: [PATCH 08/30] refactor the fortaleza theme --- packages/mix/lib/src/theme/mix/mix_theme.dart | 2 +- .../demo/lib/components/avatar_use_case.dart | 1 + .../demo/lib/components/badge_use_case.dart | 1 + .../demo/lib/components/button_use_case.dart | 1 + .../demo/lib/components/callout_use_case.dart | 2 +- .../demo/lib/components/card_use_case.dart | 6 +- .../lib/components/checkbox_use_case.dart | 1 + .../demo/lib/components/chip_use_case.dart | 1 + .../lib/components/icon_button_use_case.dart | 1 + .../lib/components/progress_use_case.dart | 1 + .../demo/lib/components/radio_use_case.dart | 1 + .../demo/lib/components/select_use_case.dart | 1 + .../demo/lib/components/spinner_use_case.dart | 1 + .../demo/lib/components/switch_use_case.dart | 1 + .../lib/components/textfield_use_case.dart | 1 + .../remix/demo/lib/helpers/theme_addon.dart | 5 +- packages/remix/demo/lib/main.dart | 11 +- .../ephemeral/Flutter-Generated.xcconfig | 6 +- .../ephemeral/FlutterOutputs.xcfilelist | 64 ++-- .../ephemeral/flutter_export_environment.sh | 6 +- packages/remix/lib/remix.dart | 14 +- .../src/components/accordion/accordion.dart | 4 +- .../lib/src/components/avatar/avatar.dart | 4 +- .../remix/lib/src/components/badge/badge.dart | 4 +- .../lib/src/components/button/button.dart | 4 +- .../lib/src/components/callout/callout.dart | 4 +- .../remix/lib/src/components/card/card.dart | 4 +- .../lib/src/components/checkbox/checkbox.dart | 4 +- .../remix/lib/src/components/chip/chip.dart | 4 +- .../lib/src/components/dialog/dialog.dart | 4 +- .../lib/src/components/divider/divider.dart | 4 +- .../components/icon_button/icon_button.dart | 6 +- .../src/components/menu_item/menu_item.dart | 4 +- .../lib/src/components/progress/progress.dart | 4 +- .../remix/lib/src/components/radio/radio.dart | 4 +- .../lib/src/components/scaffold/scaffold.dart | 4 +- .../segmented_control/segmented_control.dart | 4 +- .../lib/src/components/select/select.dart | 4 +- .../lib/src/components/slider/slider.dart | 4 +- .../lib/src/components/spinner/spinner.dart | 4 +- .../lib/src/components/switch/switch.dart | 4 +- .../src/components/textfield/textfield.dart | 4 +- .../remix/lib/src/components/toast/toast.dart | 4 +- .../lib/src/components/toast/toast_layer.dart | 2 +- .../lib/src/{app => core}/remix_app.dart | 4 +- .../remix/lib/src/core/theme/component.dart | 175 +++++++++ .../remix/lib/src/core/theme/remix_theme.dart | 118 +++++++ packages/remix/lib/src/theme.dart | 67 ---- packages/remix/lib/src/theme.g.dart | 171 --------- packages/remix/lib/src/theme/remix_theme.dart | 334 ------------------ .../remix/lib/src/theme/remix_tokens.dart | 66 ---- .../lib/src/theme/tokens/color_tokens.dart | 66 ---- .../lib/src/theme/tokens/radius_tokens.dart | 34 -- .../lib/src/theme/tokens/space_tokens.dart | 55 --- .../src/theme/tokens/text_style_tokens.dart | 85 ----- .../components}/accordion_theme.dart | 12 +- .../fortaleza/components}/avatar_theme.dart | 5 +- .../fortaleza/components}/badge_theme.dart | 11 +- .../fortaleza/components}/button_theme.dart | 13 +- .../fortaleza/components}/callout_theme.dart | 7 +- .../fortaleza/components}/card_theme.dart | 9 +- .../fortaleza/components}/checkbox_theme.dart | 6 +- .../fortaleza/components}/chip_theme.dart | 9 +- .../fortaleza/components/components.dart | 104 ++++++ .../fortaleza/components}/dialog_theme.dart | 13 +- .../fortaleza/components}/divider_theme.dart | 5 +- .../components}/icon_button_theme.dart | 7 +- .../components}/menu_item_theme.dart | 19 +- .../fortaleza/components}/progress_theme.dart | 5 +- .../fortaleza/components}/radio_theme.dart | 5 +- .../fortaleza/components}/scaffold_theme.dart | 7 +- .../components}/segmented_control_theme.dart | 11 +- .../fortaleza/components}/select_theme.dart | 11 +- .../fortaleza/components}/slider_theme.dart | 6 +- .../fortaleza/components}/spinner_theme.dart | 5 +- .../fortaleza/components}/switch_theme.dart | 5 +- .../components}/textfield_theme.dart | 31 +- .../fortaleza/components}/toast_theme.dart | 19 +- .../remix/lib/src/themes/fortaleza/theme.dart | 34 ++ .../lib/src/themes/fortaleza/tokens.dart | 201 +++++++++++ .../lib/src/themes/fortaleza/tokens.g.dart | 255 +++++++++++++ packages/remix/lib/themes/fortaleza.dart | 26 ++ 82 files changed, 1155 insertions(+), 1081 deletions(-) rename packages/remix/lib/src/{app => core}/remix_app.dart (98%) create mode 100644 packages/remix/lib/src/core/theme/component.dart create mode 100644 packages/remix/lib/src/core/theme/remix_theme.dart delete mode 100644 packages/remix/lib/src/theme.dart delete mode 100644 packages/remix/lib/src/theme.g.dart delete mode 100644 packages/remix/lib/src/theme/remix_theme.dart delete mode 100644 packages/remix/lib/src/theme/remix_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/color_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/radius_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/space_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/text_style_tokens.dart rename packages/remix/lib/src/{components/accordion => themes/fortaleza/components}/accordion_theme.dart (85%) rename packages/remix/lib/src/{components/avatar => themes/fortaleza/components}/avatar_theme.dart (90%) rename packages/remix/lib/src/{components/badge => themes/fortaleza/components}/badge_theme.dart (90%) rename packages/remix/lib/src/{components/button => themes/fortaleza/components}/button_theme.dart (92%) rename packages/remix/lib/src/{components/callout => themes/fortaleza/components}/callout_theme.dart (91%) rename packages/remix/lib/src/{components/card => themes/fortaleza/components}/card_theme.dart (83%) rename packages/remix/lib/src/{components/checkbox => themes/fortaleza/components}/checkbox_theme.dart (94%) rename packages/remix/lib/src/{components/chip => themes/fortaleza/components}/chip_theme.dart (92%) create mode 100644 packages/remix/lib/src/themes/fortaleza/components/components.dart rename packages/remix/lib/src/{components/dialog => themes/fortaleza/components}/dialog_theme.dart (73%) rename packages/remix/lib/src/{components/divider => themes/fortaleza/components}/divider_theme.dart (77%) rename packages/remix/lib/src/{components/icon_button => themes/fortaleza/components}/icon_button_theme.dart (94%) rename packages/remix/lib/src/{components/menu_item => themes/fortaleza/components}/menu_item_theme.dart (78%) rename packages/remix/lib/src/{components/progress => themes/fortaleza/components}/progress_theme.dart (89%) rename packages/remix/lib/src/{components/radio => themes/fortaleza/components}/radio_theme.dart (95%) rename packages/remix/lib/src/{components/scaffold => themes/fortaleza/components}/scaffold_theme.dart (70%) rename packages/remix/lib/src/{components/segmented_control => themes/fortaleza/components}/segmented_control_theme.dart (83%) rename packages/remix/lib/src/{components/select => themes/fortaleza/components}/select_theme.dart (93%) rename packages/remix/lib/src/{components/slider => themes/fortaleza/components}/slider_theme.dart (89%) rename packages/remix/lib/src/{components/spinner => themes/fortaleza/components}/spinner_theme.dart (82%) rename packages/remix/lib/src/{components/switch => themes/fortaleza/components}/switch_theme.dart (95%) rename packages/remix/lib/src/{components/textfield => themes/fortaleza/components}/textfield_theme.dart (60%) rename packages/remix/lib/src/{components/toast => themes/fortaleza/components}/toast_theme.dart (66%) create mode 100644 packages/remix/lib/src/themes/fortaleza/theme.dart create mode 100644 packages/remix/lib/src/themes/fortaleza/tokens.dart create mode 100644 packages/remix/lib/src/themes/fortaleza/tokens.g.dart create mode 100644 packages/remix/lib/themes/fortaleza.dart diff --git a/packages/mix/lib/src/theme/mix/mix_theme.dart b/packages/mix/lib/src/theme/mix/mix_theme.dart index d67b4a97c..134aa6f3f 100644 --- a/packages/mix/lib/src/theme/mix/mix_theme.dart +++ b/packages/mix/lib/src/theme/mix/mix_theme.dart @@ -11,7 +11,7 @@ import '../tokens/space_token.dart'; import '../tokens/text_style_token.dart'; class MixTheme extends InheritedWidget { - const MixTheme({required super.child, required this.data, super.key}); + const MixTheme({required this.data, super.key, required super.child}); static MixThemeData of(BuildContext context) { final themeData = diff --git a/packages/remix/demo/lib/components/avatar_use_case.dart b/packages/remix/demo/lib/components/avatar_use_case.dart index 381990856..14c1191de 100644 --- a/packages/remix/demo/lib/components/avatar_use_case.dart +++ b/packages/remix/demo/lib/components/avatar_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/badge_use_case.dart b/packages/remix/demo/lib/components/badge_use_case.dart index 37405a059..915edc472 100644 --- a/packages/remix/demo/lib/components/badge_use_case.dart +++ b/packages/remix/demo/lib/components/badge_use_case.dart @@ -1,5 +1,6 @@ import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/button_use_case.dart b/packages/remix/demo/lib/components/button_use_case.dart index 9b3a1d7dc..b67fc46a8 100644 --- a/packages/remix/demo/lib/components/button_use_case.dart +++ b/packages/remix/demo/lib/components/button_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/addons/icon_data_knob.dart'; import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/callout_use_case.dart b/packages/remix/demo/lib/components/callout_use_case.dart index 178b06626..bed9af224 100644 --- a/packages/remix/demo/lib/components/callout_use_case.dart +++ b/packages/remix/demo/lib/components/callout_use_case.dart @@ -1,8 +1,8 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; - import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/card_use_case.dart b/packages/remix/demo/lib/components/card_use_case.dart index 684017cf0..3d0a07422 100644 --- a/packages/remix/demo/lib/components/card_use_case.dart +++ b/packages/remix/demo/lib/components/card_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; @@ -10,6 +11,7 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; type: Card, ) Widget buildCard(BuildContext context) { + final color = context.$color.neutral(10); return Scaffold( body: Center( child: Card( @@ -32,12 +34,12 @@ Widget buildCard(BuildContext context) { children: [ StyledText( 'Leo Farias', - style: Style($text.style.ref($rx.text.text3)), + style: Style($text.style.$text3()), ), StyledText( 'Flutter Engineer', style: Style( - $text.style.ref($rx.text.text2), + $text.style.$text2(), $text.style.color.$neutral(10), ), ), diff --git a/packages/remix/demo/lib/components/checkbox_use_case.dart b/packages/remix/demo/lib/components/checkbox_use_case.dart index 002ff388d..f19e1134a 100644 --- a/packages/remix/demo/lib/components/checkbox_use_case.dart +++ b/packages/remix/demo/lib/components/checkbox_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/chip_use_case.dart b/packages/remix/demo/lib/components/chip_use_case.dart index 8ef06a8ec..b1afa0080 100644 --- a/packages/remix/demo/lib/components/chip_use_case.dart +++ b/packages/remix/demo/lib/components/chip_use_case.dart @@ -3,6 +3,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/icon_button_use_case.dart b/packages/remix/demo/lib/components/icon_button_use_case.dart index a47573669..f2315d18e 100644 --- a/packages/remix/demo/lib/components/icon_button_use_case.dart +++ b/packages/remix/demo/lib/components/icon_button_use_case.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/progress_use_case.dart b/packages/remix/demo/lib/components/progress_use_case.dart index 2c45300f2..d52617598 100644 --- a/packages/remix/demo/lib/components/progress_use_case.dart +++ b/packages/remix/demo/lib/components/progress_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/radio_use_case.dart b/packages/remix/demo/lib/components/radio_use_case.dart index cb8972112..93dd1da95 100644 --- a/packages/remix/demo/lib/components/radio_use_case.dart +++ b/packages/remix/demo/lib/components/radio_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/string.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/select_use_case.dart b/packages/remix/demo/lib/components/select_use_case.dart index 64c0ab0ef..bf9a6ae51 100644 --- a/packages/remix/demo/lib/components/select_use_case.dart +++ b/packages/remix/demo/lib/components/select_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/spinner_use_case.dart b/packages/remix/demo/lib/components/spinner_use_case.dart index c6f25a82d..159a1cfd6 100644 --- a/packages/remix/demo/lib/components/spinner_use_case.dart +++ b/packages/remix/demo/lib/components/spinner_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/switch_use_case.dart b/packages/remix/demo/lib/components/switch_use_case.dart index 973bdd853..5d3d1fc33 100644 --- a/packages/remix/demo/lib/components/switch_use_case.dart +++ b/packages/remix/demo/lib/components/switch_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/textfield_use_case.dart b/packages/remix/demo/lib/components/textfield_use_case.dart index c37ebb3bd..72011fb74 100644 --- a/packages/remix/demo/lib/components/textfield_use_case.dart +++ b/packages/remix/demo/lib/components/textfield_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/addons/icon_data_knob.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/helpers/theme_addon.dart b/packages/remix/demo/lib/helpers/theme_addon.dart index 0aea5b9dc..ceb5bae05 100644 --- a/packages/remix/demo/lib/helpers/theme_addon.dart +++ b/packages/remix/demo/lib/helpers/theme_addon.dart @@ -1,4 +1,5 @@ import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; typedef ThemeMultiBrightness = ({ @@ -18,12 +19,12 @@ class RemixComponentThemeAddon extends ThemeAddon { return RemixApp( debugShowCheckedModeBanner: false, darkTheme: RemixThemeData( - tokens: dark, + tokens: FortalezaTokens.dark().toThemeData(), components: themes.dark, ), theme: RemixThemeData( components: themes.light, - tokens: light, + tokens: FortalezaTokens.light().toThemeData(), ), home: child, ); diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 6ff2170b3..26916b7bb 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/theme_addon.dart'; import 'package:flutter/material.dart' hide Scaffold, ThemeMode; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; @@ -44,18 +45,18 @@ class HotReload extends StatelessWidget { ), RemixComponentThemeAddon( themes: [ - WidgetbookTheme( + const WidgetbookTheme( name: 'Fortaleza', data: ( - dark: RemixComponentTheme.fortalezaDark(), - light: RemixComponentTheme.fortalezaLight() + dark: FortalezaComponentTheme.dark, + light: FortalezaComponentTheme.light, ), ), WidgetbookTheme( name: 'Base', data: ( - dark: RemixComponentTheme.baseDark(), - light: RemixComponentTheme.baseLight(), + dark: RemixComponentTheme.dark(), + light: RemixComponentTheme.light(), ), ), ], diff --git a/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig index ccf1946a0..207ef1037 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ b/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -1,12 +1,12 @@ // This is a generated file; do not edit or check into version control. FLUTTER_ROOT=/Users/lucasoliveira/fvm/versions/stable -FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo +FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_TARGET=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart +FLUTTER_TARGET=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart FLUTTER_BUILD_DIR=build FLUTTER_BUILD_NAME=1.0.0 FLUTTER_BUILD_NUMBER=1 DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/.dart_tool/package_config.json +PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/.dart_tool/package_config.json diff --git a/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist b/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist index b4e57dd8a..70c14cc43 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist +++ b/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist @@ -1,32 +1,32 @@ -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/App -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.bin -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Black.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BlackItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Bold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLight.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Italic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Light.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-LightItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Medium.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-MediumItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Regular.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Thin.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ThinItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/logo.png -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/App +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.bin +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Black.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BlackItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Bold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLight.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Italic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Light.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-LightItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Medium.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-MediumItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Regular.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Thin.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ThinItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/logo.png +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS diff --git a/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh b/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh index 9a4c5bcf8..bf6658c86 100755 --- a/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh +++ b/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -1,13 +1,13 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=/Users/lucasoliveira/fvm/versions/stable" -export "FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo" +export "FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo" export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart" +export "FLUTTER_TARGET=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/.dart_tool/package_config.json" +export "PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/.dart_tool/package_config.json" diff --git a/packages/remix/lib/remix.dart b/packages/remix/lib/remix.dart index 9ea8d5356..e1a881a12 100644 --- a/packages/remix/lib/remix.dart +++ b/packages/remix/lib/remix.dart @@ -18,9 +18,6 @@ library remix; -/// APP -export 'src/app/remix_app.dart'; - /// COMPONENTS export 'src/components/accordion/accordion.dart'; export 'src/components/avatar/avatar.dart'; @@ -45,6 +42,13 @@ export 'src/components/switch/switch.dart'; export 'src/components/textfield/textfield.dart'; export 'src/components/toast/toast.dart'; +/// APP +export 'src/core/remix_app.dart'; +export 'src/core/theme/component.dart'; + +/// THEME +export 'src/core/theme/remix_theme.dart'; + /// HELPERS export 'src/helpers/color_palette.dart'; export 'src/helpers/color_utils.dart'; @@ -52,7 +56,3 @@ export 'src/helpers/component_builder.dart'; export 'src/helpers/context_ext.dart'; export 'src/helpers/spec/composited_transform_follower_spec.dart'; export 'src/helpers/utility_extension.dart'; - -/// THEME -export 'src/theme/remix_theme.dart'; -export 'src/theme/remix_tokens.dart'; diff --git a/packages/remix/lib/src/components/accordion/accordion.dart b/packages/remix/lib/src/components/accordion/accordion.dart index d2100db91..db272e367 100644 --- a/packages/remix/lib/src/components/accordion/accordion.dart +++ b/packages/remix/lib/src/components/accordion/accordion.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'accordion.g.dart'; part 'accordion_style.dart'; -part 'accordion_theme.dart'; part 'accordion_widget.dart'; part 'header/accordion_header.dart'; part 'header/accordion_header_spec_widget.dart'; diff --git a/packages/remix/lib/src/components/avatar/avatar.dart b/packages/remix/lib/src/components/avatar/avatar.dart index b245b9254..b188fdd65 100644 --- a/packages/remix/lib/src/components/avatar/avatar.dart +++ b/packages/remix/lib/src/components/avatar/avatar.dart @@ -2,14 +2,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; import '../../helpers/utility_extension.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'avatar.g.dart'; part 'avatar_style.dart'; -part 'avatar_theme.dart'; part 'avatar_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/badge/badge.dart b/packages/remix/lib/src/components/badge/badge.dart index 2b2e08b4b..9a45f2cef 100644 --- a/packages/remix/lib/src/components/badge/badge.dart +++ b/packages/remix/lib/src/components/badge/badge.dart @@ -2,12 +2,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'badge.g.dart'; part 'badge_style.dart'; -part 'badge_theme.dart'; part 'badge_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/button/button.dart b/packages/remix/lib/src/components/button/button.dart index 1475de9f0..8983fa489 100644 --- a/packages/remix/lib/src/components/button/button.dart +++ b/packages/remix/lib/src/components/button/button.dart @@ -4,14 +4,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import '../spinner/spinner.dart'; part 'button.g.dart'; part 'button_style.dart'; -part 'button_theme.dart'; part 'button_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/callout/callout.dart b/packages/remix/lib/src/components/callout/callout.dart index ee525c2b7..34ba6af4d 100644 --- a/packages/remix/lib/src/components/callout/callout.dart +++ b/packages/remix/lib/src/components/callout/callout.dart @@ -2,12 +2,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'callout.g.dart'; part 'callout_style.dart'; -part 'callout_theme.dart'; part 'callout_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/card/card.dart b/packages/remix/lib/src/components/card/card.dart index f8a65e575..f96397390 100644 --- a/packages/remix/lib/src/components/card/card.dart +++ b/packages/remix/lib/src/components/card/card.dart @@ -4,12 +4,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'card.g.dart'; part 'card_style.dart'; -part 'card_theme.dart'; part 'card_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/checkbox/checkbox.dart b/packages/remix/lib/src/components/checkbox/checkbox.dart index 668a62357..a39e2a73b 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox.dart @@ -3,12 +3,10 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'checkbox.g.dart'; part 'checkbox_style.dart'; -part 'checkbox_theme.dart'; part 'checkbox_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/chip/chip.dart b/packages/remix/lib/src/components/chip/chip.dart index 952545166..8c1ddd4e1 100644 --- a/packages/remix/lib/src/components/chip/chip.dart +++ b/packages/remix/lib/src/components/chip/chip.dart @@ -4,12 +4,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'chip.g.dart'; part 'chip_style.dart'; -part 'chip_theme.dart'; part 'chip_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/dialog/dialog.dart b/packages/remix/lib/src/components/dialog/dialog.dart index 7a1e75127..562875a24 100644 --- a/packages/remix/lib/src/components/dialog/dialog.dart +++ b/packages/remix/lib/src/components/dialog/dialog.dart @@ -4,13 +4,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'dialog.g.dart'; part 'dialog_style.dart'; -part 'dialog_theme.dart'; part 'dialog_widget.dart'; Future showDialog({ diff --git a/packages/remix/lib/src/components/divider/divider.dart b/packages/remix/lib/src/components/divider/divider.dart index 386d3fd4c..f8a4dec66 100644 --- a/packages/remix/lib/src/components/divider/divider.dart +++ b/packages/remix/lib/src/components/divider/divider.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'divider.g.dart'; part 'divider_style.dart'; -part 'divider_theme.dart'; part 'divider_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/icon_button/icon_button.dart b/packages/remix/lib/src/components/icon_button/icon_button.dart index 1d2d0b228..f6a147061 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button.dart +++ b/packages/remix/lib/src/components/icon_button/icon_button.dart @@ -3,14 +3,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import '../spinner/spinner.dart'; part 'icon_button.g.dart'; part 'icon_button_style.dart'; -part 'icon_button_theme.dart'; part 'icon_button_widget.dart'; @MixableSpec() @@ -37,8 +35,6 @@ class IconButtonSpec extends Spec icon = icon ?? const IconSpec(), spinner = spinner ?? const SpinnerSpec(); - // Widget - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/remix/lib/src/components/menu_item/menu_item.dart b/packages/remix/lib/src/components/menu_item/menu_item.dart index 8b631dff6..44bf61752 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item.dart +++ b/packages/remix/lib/src/components/menu_item/menu_item.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'menu_item.g.dart'; part 'menu_item_style.dart'; -part 'menu_item_theme.dart'; part 'menu_item_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/progress/progress.dart b/packages/remix/lib/src/components/progress/progress.dart index 4b6180356..55147f61a 100644 --- a/packages/remix/lib/src/components/progress/progress.dart +++ b/packages/remix/lib/src/components/progress/progress.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'progress.g.dart'; part 'progress_style.dart'; -part 'progress_theme.dart'; part 'progress_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/radio/radio.dart b/packages/remix/lib/src/components/radio/radio.dart index 12ad979d0..f4f0fb3fd 100644 --- a/packages/remix/lib/src/components/radio/radio.dart +++ b/packages/remix/lib/src/components/radio/radio.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/utility_extension.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'radio.g.dart'; part 'radio_style.dart'; -part 'radio_theme.dart'; part 'radio_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/scaffold/scaffold.dart b/packages/remix/lib/src/components/scaffold/scaffold.dart index 327384002..013ce8fc6 100644 --- a/packages/remix/lib/src/components/scaffold/scaffold.dart +++ b/packages/remix/lib/src/components/scaffold/scaffold.dart @@ -4,13 +4,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; import '../toast/toast.dart'; part 'scaffold.g.dart'; part 'scaffold_style.dart'; -part 'scaffold_theme.dart'; part 'scaffold_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control.dart b/packages/remix/lib/src/components/segmented_control/segmented_control.dart index a176f4ea0..cb88f88dc 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control.dart @@ -3,14 +3,12 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'button/segmented_control_button.dart'; part 'button/segmented_control_button_widget.dart'; part 'segmented_control.g.dart'; part 'segmented_control_style.dart'; -part 'segmented_control_theme.dart'; part 'segmented_control_widget.dart'; final $segmentedControl = SegmentedControlSpecUtility.self; diff --git a/packages/remix/lib/src/components/select/select.dart b/packages/remix/lib/src/components/select/select.dart index 3025337de..57405ec67 100644 --- a/packages/remix/lib/src/components/select/select.dart +++ b/packages/remix/lib/src/components/select/select.dart @@ -3,10 +3,9 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; import '../../helpers/spec/composited_transform_follower_spec.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'button/select_button.dart'; part 'button/select_button_widget.dart'; @@ -14,7 +13,6 @@ part 'item/select_menu.dart'; part 'item/select_menu_widget.dart'; part 'select.g.dart'; part 'select_style.dart'; -part 'select_theme.dart'; part 'select_widget.dart'; final $select = SelectSpecUtility.self; diff --git a/packages/remix/lib/src/components/slider/slider.dart b/packages/remix/lib/src/components/slider/slider.dart index c5ae35565..4c6862442 100644 --- a/packages/remix/lib/src/components/slider/slider.dart +++ b/packages/remix/lib/src/components/slider/slider.dart @@ -3,12 +3,10 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'slider.g.dart'; part 'slider_style.dart'; -part 'slider_theme.dart'; part 'slider_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/spinner/spinner.dart b/packages/remix/lib/src/components/spinner/spinner.dart index fb0159ef7..30f46dcee 100644 --- a/packages/remix/lib/src/components/spinner/spinner.dart +++ b/packages/remix/lib/src/components/spinner/spinner.dart @@ -5,13 +5,11 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'spinner.g.dart'; part 'spinner_painter.dart'; part 'spinner_style.dart'; -part 'spinner_theme.dart'; part 'spinner_widget.dart'; enum SpinnerTypeStyle { diff --git a/packages/remix/lib/src/components/switch/switch.dart b/packages/remix/lib/src/components/switch/switch.dart index 1989d27c0..393c256c8 100644 --- a/packages/remix/lib/src/components/switch/switch.dart +++ b/packages/remix/lib/src/components/switch/switch.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'switch.g.dart'; part 'switch_style.dart'; -part 'switch_theme.dart'; part 'switch_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/textfield/textfield.dart b/packages/remix/lib/src/components/textfield/textfield.dart index bf3072f7d..4e22bc77b 100644 --- a/packages/remix/lib/src/components/textfield/textfield.dart +++ b/packages/remix/lib/src/components/textfield/textfield.dart @@ -13,14 +13,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import 'attributes/attributes.dart'; part 'textfield.g.dart'; part 'textfield_style.dart'; -part 'textfield_theme.dart'; part 'textfield_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/toast/toast.dart b/packages/remix/lib/src/components/toast/toast.dart index 990379c00..c539836cc 100644 --- a/packages/remix/lib/src/components/toast/toast.dart +++ b/packages/remix/lib/src/components/toast/toast.dart @@ -5,13 +5,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'toast.g.dart'; part 'toast_layer.dart'; part 'toast_style.dart'; -part 'toast_theme.dart'; part 'toast_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/toast/toast_layer.dart b/packages/remix/lib/src/components/toast/toast_layer.dart index f2066592d..61dc8fa22 100644 --- a/packages/remix/lib/src/components/toast/toast_layer.dart +++ b/packages/remix/lib/src/components/toast/toast_layer.dart @@ -66,6 +66,7 @@ class ToastLayerState extends State implements ToastActions { return Stack( children: [ AnimatedSwitcher( + child: toastWidget, duration: toast?.animationDuration ?? const Duration(milliseconds: 500), reverseDuration: toast?.reverseAnimationDuration ?? @@ -96,7 +97,6 @@ class ToastLayerState extends State implements ToastActions { child: FadeTransition(opacity: animation, child: child), ); }, - child: toastWidget, ), widget.child, ], diff --git a/packages/remix/lib/src/app/remix_app.dart b/packages/remix/lib/src/core/remix_app.dart similarity index 98% rename from packages/remix/lib/src/app/remix_app.dart rename to packages/remix/lib/src/core/remix_app.dart index 0f52184da..e9163a19a 100644 --- a/packages/remix/lib/src/app/remix_app.dart +++ b/packages/remix/lib/src/core/remix_app.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; -import '../theme/remix_theme.dart'; +import 'theme/remix_theme.dart'; //ignore: avoid-unnecessary-stateful-widgets class RemixApp extends StatefulWidget { @@ -122,7 +122,7 @@ class _RemixAppState extends State { Widget _remixBuilder(BuildContext context, Widget? child) { return RemixTheme( theme: widget.theme, - darkTheme: widget.darkTheme, + darkTheme: widget.darkTheme ?? widget.theme, child: widget.builder != null ? Builder( builder: (BuildContext context) { diff --git a/packages/remix/lib/src/core/theme/component.dart b/packages/remix/lib/src/core/theme/component.dart new file mode 100644 index 000000000..d1cebe670 --- /dev/null +++ b/packages/remix/lib/src/core/theme/component.dart @@ -0,0 +1,175 @@ +import '../../components/accordion/accordion.dart'; +import '../../components/avatar/avatar.dart'; +import '../../components/badge/badge.dart'; +import '../../components/button/button.dart'; +import '../../components/callout/callout.dart'; +import '../../components/card/card.dart'; +import '../../components/checkbox/checkbox.dart'; +import '../../components/chip/chip.dart'; +import '../../components/dialog/dialog.dart'; +import '../../components/divider/divider.dart'; +import '../../components/icon_button/icon_button.dart'; +import '../../components/menu_item/menu_item.dart'; +import '../../components/progress/progress.dart'; +import '../../components/radio/radio.dart'; +import '../../components/scaffold/scaffold.dart'; +import '../../components/segmented_control/segmented_control.dart'; +import '../../components/select/select.dart'; +import '../../components/slider/slider.dart'; +import '../../components/spinner/spinner.dart'; +import '../../components/switch/switch.dart'; +import '../../components/textfield/textfield.dart'; +import '../../components/toast/toast.dart'; + +class RemixComponentTheme { + final AccordionStyle accordion; + final AvatarStyle avatar; + final BadgeStyle badge; + final ButtonStyle button; + final CalloutStyle callout; + final CardStyle card; + final CheckboxStyle checkbox; + final DialogStyle dialog; + final ChipStyle chip; + final DividerStyle divider; + final IconButtonStyle iconButton; + final MenuItemStyle menuItem; + final ProgressStyle progress; + final RadioStyle radio; + final ScaffoldStyle scaffold; + final SegmentedControlStyle segmentedControl; + final SelectStyle select; + final SpinnerStyle spinner; + final SwitchStyle switchComponent; + final TextFieldStyle textField; + final ToastStyle toast; + final SliderStyle slider; + + const RemixComponentTheme({ + required this.accordion, + required this.avatar, + required this.badge, + required this.button, + required this.callout, + required this.card, + required this.checkbox, + required this.dialog, + required this.chip, + required this.divider, + required this.iconButton, + required this.menuItem, + required this.progress, + required this.radio, + required this.scaffold, + required this.segmentedControl, + required this.select, + required this.spinner, + required this.switchComponent, + required this.textField, + required this.toast, + required this.slider, + }); + + factory RemixComponentTheme.light() { + return const RemixComponentTheme( + accordion: AccordionStyle(), + avatar: AvatarStyle(), + badge: BadgeStyle(), + button: ButtonStyle(), + callout: CalloutStyle(), + card: CardStyle(), + checkbox: CheckboxStyle(), + dialog: DialogStyle(), + chip: ChipStyle(), + divider: DividerStyle(), + iconButton: IconButtonStyle(), + menuItem: MenuItemStyle(), + progress: ProgressStyle(), + radio: RadioStyle(), + scaffold: ScaffoldStyle(), + segmentedControl: SegmentedControlStyle(), + select: SelectStyle(), + spinner: SpinnerStyle(), + switchComponent: SwitchStyle(), + textField: TextFieldStyle(), + toast: ToastStyle(), + slider: SliderStyle(), + ); + } + + factory RemixComponentTheme.dark() { + return RemixComponentTheme.light().copyWith( + accordion: const AccordionDarkStyle(), + avatar: const AvatarDarkStyle(), + badge: const BadgeDarkStyle(), + button: const ButtonDarkStyle(), + callout: const CalloutDarkStyle(), + card: const CardDarkStyle(), + checkbox: const CheckboxDarkStyle(), + dialog: const DialogDarkStyle(), + chip: const ChipDarkStyle(), + divider: const DividerDarkStyle(), + iconButton: const IconButtonDarkStyle(), + menuItem: const MenuItemDarkStyle(), + progress: const ProgressDarkStyle(), + radio: const RadioDarkStyle(), + scaffold: const ScaffoldDarkStyle(), + segmentedControl: const SegmentedControlDarkStyle(), + select: const SelectDarkStyle(), + spinner: const SpinnerDarkStyle(), + switchComponent: const SwitchDarkStyle(), + textField: const TextFieldDarkStyle(), + slider: const SliderDarkStyle(), + ); + } + + RemixComponentTheme copyWith({ + AccordionStyle? accordion, + AvatarStyle? avatar, + BadgeStyle? badge, + ButtonStyle? button, + CalloutStyle? callout, + CardStyle? card, + CheckboxStyle? checkbox, + DialogStyle? dialog, + ChipStyle? chip, + DividerStyle? divider, + IconButtonStyle? iconButton, + MenuItemStyle? menuItem, + ProgressStyle? progress, + RadioStyle? radio, + ScaffoldStyle? scaffold, + SegmentedControlStyle? segmentedControl, + SelectStyle? select, + SpinnerStyle? spinner, + SwitchStyle? switchComponent, + TextFieldStyle? textField, + ToastStyle? toast, + SliderStyle? slider, + }) { + return RemixComponentTheme( + accordion: accordion ?? this.accordion, + avatar: avatar ?? this.avatar, + badge: badge ?? this.badge, + button: button ?? this.button, + callout: callout ?? this.callout, + card: card ?? this.card, + checkbox: checkbox ?? this.checkbox, + dialog: dialog ?? this.dialog, + chip: chip ?? this.chip, + divider: divider ?? this.divider, + iconButton: iconButton ?? this.iconButton, + menuItem: menuItem ?? this.menuItem, + progress: progress ?? this.progress, + radio: radio ?? this.radio, + scaffold: scaffold ?? this.scaffold, + segmentedControl: segmentedControl ?? this.segmentedControl, + select: select ?? this.select, + spinner: spinner ?? this.spinner, + switchComponent: switchComponent ?? this.switchComponent, + textField: textField ?? this.textField, + toast: toast ?? this.toast, + slider: slider ?? this.slider, + ); + } +} diff --git a/packages/remix/lib/src/core/theme/remix_theme.dart b/packages/remix/lib/src/core/theme/remix_theme.dart new file mode 100644 index 000000000..5bd02234e --- /dev/null +++ b/packages/remix/lib/src/core/theme/remix_theme.dart @@ -0,0 +1,118 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import 'component.dart'; + +class RemixThemeData { + final RemixComponentTheme components; + final MixThemeData tokens; + + const RemixThemeData({required this.components, required this.tokens}); + + static RemixThemeData base() => RemixThemeData( + components: RemixComponentTheme.light(), + tokens: const MixThemeData.empty(), + ); + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + + return other is RemixThemeData && + other.components == components && + other.tokens == tokens; + } + + @override + int get hashCode => components.hashCode ^ tokens.hashCode; +} + +enum ThemeMode { + light, + dark, +} + +class RemixTheme extends StatelessWidget { + const RemixTheme({ + super.key, + required this.theme, + required this.child, + this.themeMode, + this.darkTheme, + }); + + static RemixThemeData of(BuildContext context) { + final _RemixThemeInherited? provider = + context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); + + if (provider == null) { + throw FlutterError( + 'RemixTheme.of() called with a context that does not contain a RemixTheme.\n' + 'No RemixTheme ancestor could be found starting from the context that was passed to RemixTheme.of(). ' + 'This can happen because the context you used comes from a widget above the RemixTheme.\n' + 'The context used was:\n' + ' $context', + ); + } + + return provider.data; + } + + static RemixThemeData? maybeOf(BuildContext context) { + return context + .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() + ?.data; + } + + final ThemeMode? themeMode; + + final RemixThemeData? theme; + + final RemixThemeData? darkTheme; + final Widget child; + + RemixThemeData get _defaultThemeDark => RemixThemeData.base(); + RemixThemeData get _defaultThemeLight => RemixThemeData.base(); + + RemixThemeData _defineRemixThemeData(BuildContext context) { + if (themeMode != null) { + return themeMode == ThemeMode.dark + ? (darkTheme ?? _defaultThemeDark) + : (theme ?? _defaultThemeLight); + } + + final brightness = MediaQuery.platformBrightnessOf(context); + final isDark = brightness == Brightness.dark; + + return isDark + ? (darkTheme ?? _defaultThemeDark) + : (theme ?? _defaultThemeLight); + } + + @override + Widget build(BuildContext context) { + final theme = _defineRemixThemeData(context); + final tokens = theme.tokens; + + return MixTheme( + data: tokens, + child: _RemixThemeInherited(data: theme, child: child), + ); + } +} + +class _RemixThemeInherited extends InheritedWidget { + const _RemixThemeInherited({required this.data, required super.child}); + + final RemixThemeData data; + + @override + bool updateShouldNotify(_RemixThemeInherited oldWidget) { + return data != oldWidget.data; + } +} + +extension BuildContextRemixThemeX on BuildContext { + RemixThemeData get remix => RemixTheme.of(this); +} diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart deleted file mode 100644 index 66edc9872..000000000 --- a/packages/remix/lib/src/theme.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; -import 'package:mix_annotations/mix_annotations.dart'; - -part 'theme.g.dart'; - -@MixableToken(Color) -class ColorTokens { - final Color primary; - final Color secondary; - final Color tertiary; - - const ColorTokens({ - required this.primary, - required this.secondary, - required this.tertiary, - }); - - Map get data => _$ColorTokensToMap(this); -} - -@MixableToken(TextStyle) -class TextTokens { - final TextStyle h1; - final TextStyle h2; - final TextStyle h3; - final TextStyle body; - - const TextTokens({ - required this.h1, - required this.h2, - required this.h3, - required this.body, - }); - - Map get data => _$TextTokensToMap(this); -} - -@MixableToken(Radius) -class RadiusTokens { - final Radius small; - final Radius medium; - final Radius large; - - const RadiusTokens({ - required this.small, - required this.medium, - required this.large, - }); - - Map get data => _$RadiusTokensToMap(this); -} - -@MixableToken(double) -class SpaceTokens { - final double p8; - final double p16; - final double p24; - - const SpaceTokens({ - required this.p8, - required this.p16, - required this.p24, - }); - - Map get data => _$SpaceTokensToMap(this); -} diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart deleted file mode 100644 index a39534928..000000000 --- a/packages/remix/lib/src/theme.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'theme.dart'; - -// ************************************************************************** -// MixableTokensGenerator -// ************************************************************************** - -class _$ColorTokensStruct { - _$ColorTokensStruct(); - - final ColorToken primary = const ColorToken('primary'); - final ColorToken secondary = const ColorToken('secondary'); - final ColorToken tertiary = const ColorToken('tertiary'); -} - -final _structColorTokens = _$ColorTokensStruct(); - -Map _$ColorTokensToMap(ColorTokens tokens) { - return { - _structColorTokens.primary: tokens.primary, - _structColorTokens.secondary: tokens.secondary, - _structColorTokens.tertiary: tokens.tertiary, - }; -} - -extension $ColorTokensColorUtilityX on ColorUtility { - T $primary() => ref(_structColorTokens.primary); - T $secondary() => ref(_structColorTokens.secondary); - T $tertiary() => ref(_structColorTokens.tertiary); -} - -class BuildContextColorTokensMethods { - const BuildContextColorTokensMethods(this.context); - - final BuildContext context; - Color primary() => _structColorTokens.primary.resolve(context); - Color secondary() => _structColorTokens.secondary.resolve(context); - Color tertiary() => _structColorTokens.tertiary.resolve(context); -} - -extension $BuildContextColorTokensX on BuildContext { - BuildContextColorTokensMethods get $color => - BuildContextColorTokensMethods(this); -} - -class _$TextTokensStruct { - _$TextTokensStruct(); - - final TextStyleToken h1 = const TextStyleToken('h1'); - final TextStyleToken h2 = const TextStyleToken('h2'); - final TextStyleToken h3 = const TextStyleToken('h3'); - final TextStyleToken body = const TextStyleToken('body'); -} - -final _structTextTokens = _$TextTokensStruct(); - -Map _$TextTokensToMap(TextTokens tokens) { - return { - _structTextTokens.h1: tokens.h1, - _structTextTokens.h2: tokens.h2, - _structTextTokens.h3: tokens.h3, - _structTextTokens.body: tokens.body, - }; -} - -extension $TextTokensTextStyleUtilityX - on TextStyleUtility { - T $h1() => ref(_structTextTokens.h1); - T $h2() => ref(_structTextTokens.h2); - T $h3() => ref(_structTextTokens.h3); - T $body() => ref(_structTextTokens.body); -} - -class BuildContextTextTokensMethods { - const BuildContextTextTokensMethods(this.context); - - final BuildContext context; - TextStyle h1() => _structTextTokens.h1.resolve(context); - TextStyle h2() => _structTextTokens.h2.resolve(context); - TextStyle h3() => _structTextTokens.h3.resolve(context); - TextStyle body() => _structTextTokens.body.resolve(context); -} - -extension $BuildContextTextTokensX on BuildContext { - BuildContextTextTokensMethods get $textStyle => - BuildContextTextTokensMethods(this); -} - -class _$RadiusTokensStruct { - _$RadiusTokensStruct(); - - final RadiusToken small = const RadiusToken('small'); - final RadiusToken medium = const RadiusToken('medium'); - final RadiusToken large = const RadiusToken('large'); -} - -final _structRadiusTokens = _$RadiusTokensStruct(); - -Map _$RadiusTokensToMap(RadiusTokens tokens) { - return { - _structRadiusTokens.small: tokens.small, - _structRadiusTokens.medium: tokens.medium, - _structRadiusTokens.large: tokens.large, - }; -} - -extension $RadiusTokensRadiusUtilityX on RadiusUtility { - T $small() => ref(_structRadiusTokens.small); - T $medium() => ref(_structRadiusTokens.medium); - T $large() => ref(_structRadiusTokens.large); -} - -class BuildContextRadiusTokensMethods { - const BuildContextRadiusTokensMethods(this.context); - - final BuildContext context; - Radius small() => _structRadiusTokens.small.resolve(context); - Radius medium() => _structRadiusTokens.medium.resolve(context); - Radius large() => _structRadiusTokens.large.resolve(context); -} - -extension $BuildContextRadiusTokensX on BuildContext { - BuildContextRadiusTokensMethods get $radius => - BuildContextRadiusTokensMethods(this); -} - -class _$SpaceTokensStruct { - _$SpaceTokensStruct(); - - final SpaceToken p8 = const SpaceToken('p8'); - final SpaceToken p16 = const SpaceToken('p16'); - final SpaceToken p24 = const SpaceToken('p24'); -} - -final _structSpaceTokens = _$SpaceTokensStruct(); - -Map _$SpaceTokensToMap(SpaceTokens tokens) { - return { - _structSpaceTokens.p8: tokens.p8, - _structSpaceTokens.p16: tokens.p16, - _structSpaceTokens.p24: tokens.p24, - }; -} - -extension $SpaceTokensSpacingSideUtilityX - on SpacingSideUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -extension $SpaceTokensGapUtilityX on GapUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -class BuildContextSpaceTokensMethods { - const BuildContextSpaceTokensMethods(this.context); - - final BuildContext context; - double p8() => _structSpaceTokens.p8.resolve(context); - double p16() => _structSpaceTokens.p16.resolve(context); - double p24() => _structSpaceTokens.p24.resolve(context); -} - -extension $BuildContextSpaceTokensX on BuildContext { - BuildContextSpaceTokensMethods get $space => - BuildContextSpaceTokensMethods(this); -} diff --git a/packages/remix/lib/src/theme/remix_theme.dart b/packages/remix/lib/src/theme/remix_theme.dart deleted file mode 100644 index 3384b8941..000000000 --- a/packages/remix/lib/src/theme/remix_theme.dart +++ /dev/null @@ -1,334 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; - -import '../components/accordion/accordion.dart'; -import '../components/avatar/avatar.dart'; -import '../components/badge/badge.dart'; -import '../components/button/button.dart'; -import '../components/callout/callout.dart'; -import '../components/card/card.dart'; -import '../components/checkbox/checkbox.dart'; -import '../components/chip/chip.dart'; -import '../components/dialog/dialog.dart'; -import '../components/divider/divider.dart'; -import '../components/icon_button/icon_button.dart'; -import '../components/menu_item/menu_item.dart'; -import '../components/progress/progress.dart'; -import '../components/radio/radio.dart'; -import '../components/scaffold/scaffold.dart'; -import '../components/segmented_control/segmented_control.dart'; -import '../components/select/select.dart'; -import '../components/slider/slider.dart'; -import '../components/spinner/spinner.dart'; -import '../components/switch/switch.dart'; -import '../components/textfield/textfield.dart'; -import '../components/toast/toast.dart'; -import 'remix_tokens.dart'; - -class RemixComponentTheme { - final AccordionStyle accordion; - final AvatarStyle avatar; - final BadgeStyle badge; - final ButtonStyle button; - final CalloutStyle callout; - final CardStyle card; - final CheckboxStyle checkbox; - final DialogStyle dialog; - final ChipStyle chip; - final DividerStyle divider; - final IconButtonStyle iconButton; - final MenuItemStyle menuItem; - final ProgressStyle progress; - final RadioStyle radio; - final ScaffoldStyle scaffold; - final SegmentedControlStyle segmentedControl; - final SelectStyle select; - final SpinnerStyle spinner; - final SwitchStyle switchComponent; - final TextFieldStyle textField; - final ToastStyle toast; - final SliderStyle slider; - - const RemixComponentTheme({ - required this.accordion, - required this.avatar, - required this.badge, - required this.button, - required this.callout, - required this.card, - required this.checkbox, - required this.dialog, - required this.chip, - required this.divider, - required this.iconButton, - required this.menuItem, - required this.progress, - required this.radio, - required this.scaffold, - required this.segmentedControl, - required this.select, - required this.spinner, - required this.switchComponent, - required this.textField, - required this.toast, - required this.slider, - }); - - factory RemixComponentTheme.baseLight() { - return const RemixComponentTheme( - accordion: AccordionStyle(), - avatar: AvatarStyle(), - badge: BadgeStyle(), - button: ButtonStyle(), - callout: CalloutStyle(), - card: CardStyle(), - checkbox: CheckboxStyle(), - dialog: DialogStyle(), - chip: ChipStyle(), - divider: DividerStyle(), - iconButton: IconButtonStyle(), - menuItem: MenuItemStyle(), - progress: ProgressStyle(), - radio: RadioStyle(), - scaffold: ScaffoldStyle(), - segmentedControl: SegmentedControlStyle(), - select: SelectStyle(), - spinner: SpinnerStyle(), - switchComponent: SwitchStyle(), - textField: TextFieldStyle(), - toast: ToastStyle(), - slider: SliderStyle(), - ); - } - - factory RemixComponentTheme.baseDark() { - return RemixComponentTheme.baseLight().copyWith( - accordion: const AccordionDarkStyle(), - avatar: const AvatarDarkStyle(), - badge: const BadgeDarkStyle(), - button: const ButtonDarkStyle(), - callout: const CalloutDarkStyle(), - card: const CardDarkStyle(), - checkbox: const CheckboxDarkStyle(), - dialog: const DialogDarkStyle(), - chip: const ChipDarkStyle(), - divider: const DividerDarkStyle(), - iconButton: const IconButtonDarkStyle(), - menuItem: const MenuItemDarkStyle(), - progress: const ProgressDarkStyle(), - radio: const RadioDarkStyle(), - scaffold: const ScaffoldDarkStyle(), - segmentedControl: const SegmentedControlDarkStyle(), - select: const SelectDarkStyle(), - spinner: const SpinnerDarkStyle(), - switchComponent: const SwitchDarkStyle(), - textField: const TextFieldDarkStyle(), - slider: const SliderDarkStyle(), - ); - } - - factory RemixComponentTheme.fortalezaLight() { - return const RemixComponentTheme( - accordion: FortalezaAccordionStyle(), - avatar: FortalezaAvatarStyle(), - badge: FortalezaBadgeStyle(), - button: FortalezaButtonStyle(), - callout: FortalezaCalloutStyle(), - card: FortalezaCardStyle(), - checkbox: FortalezaCheckboxStyle(), - dialog: FortalezaDialogStyle(), - chip: FortalezaChipStyle(), - divider: FortalezaDividerStyle(), - iconButton: FortalezaIconButtonStyle(), - menuItem: FortalezaMenuItemStyle(), - progress: FortalezaProgressStyle(), - radio: FortalezaRadioStyle(), - scaffold: FortalezaScaffoldStyle(), - segmentedControl: FortalezaSegmentedControlStyle(), - select: FortalezaSelectStyle(), - spinner: FortalezaSpinnerStyle(), - switchComponent: FortalezaSwitchStyle(), - textField: FortalezaTextFieldStyle(), - toast: FortalezaToastStyle(), - slider: FortalezaSliderStyle(), - ); - } - - factory RemixComponentTheme.fortalezaDark() { - return RemixComponentTheme.fortalezaLight().copyWith( - avatar: const FortalezaDarkAvatarStyle(), - badge: const FortalezaDarkBadgeStyle(), - segmentedControl: const FortalezaDarkSegmentedControlStyle(), - select: const FortalezaDarkSelectStyle(), - switchComponent: const FortalezaDarkSwitchStyle(), - ); - } - - RemixComponentTheme copyWith({ - AccordionStyle? accordion, - AvatarStyle? avatar, - BadgeStyle? badge, - ButtonStyle? button, - CalloutStyle? callout, - CardStyle? card, - CheckboxStyle? checkbox, - DialogStyle? dialog, - ChipStyle? chip, - DividerStyle? divider, - IconButtonStyle? iconButton, - MenuItemStyle? menuItem, - ProgressStyle? progress, - RadioStyle? radio, - ScaffoldStyle? scaffold, - SegmentedControlStyle? segmentedControl, - SelectStyle? select, - SpinnerStyle? spinner, - SwitchStyle? switchComponent, - TextFieldStyle? textField, - ToastStyle? toast, - SliderStyle? slider, - }) { - return RemixComponentTheme( - accordion: accordion ?? this.accordion, - avatar: avatar ?? this.avatar, - badge: badge ?? this.badge, - button: button ?? this.button, - callout: callout ?? this.callout, - card: card ?? this.card, - checkbox: checkbox ?? this.checkbox, - dialog: dialog ?? this.dialog, - chip: chip ?? this.chip, - divider: divider ?? this.divider, - iconButton: iconButton ?? this.iconButton, - menuItem: menuItem ?? this.menuItem, - progress: progress ?? this.progress, - radio: radio ?? this.radio, - scaffold: scaffold ?? this.scaffold, - segmentedControl: segmentedControl ?? this.segmentedControl, - select: select ?? this.select, - spinner: spinner ?? this.spinner, - switchComponent: switchComponent ?? this.switchComponent, - textField: textField ?? this.textField, - toast: toast ?? this.toast, - slider: slider ?? this.slider, - ); - } -} - -extension BuildContextRemixThemeX on BuildContext { - RemixThemeData get remix => RemixTheme.of(this); -} - -class RemixThemeData { - final RemixComponentTheme components; - final RemixTokens tokens; - const RemixThemeData({required this.components, required this.tokens}); - - static RemixThemeData base() => RemixThemeData( - components: RemixComponentTheme.baseLight(), - tokens: RemixTokens.base(), - ); - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - - return other is RemixThemeData && - other.components == components && - other.tokens == tokens; - } - - @override - int get hashCode => components.hashCode ^ tokens.hashCode; -} - -enum ThemeMode { - light, - dark, -} - -class RemixTheme extends StatelessWidget { - const RemixTheme({ - super.key, - required this.theme, - required this.child, - this.themeMode, - this.darkTheme, - }); - - static RemixThemeData of(BuildContext context) { - final _RemixThemeInherited? provider = - context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); - - if (provider == null) { - throw FlutterError( - 'RemixTheme.of() called with a context that does not contain a RemixTheme.\n' - 'No RemixTheme ancestor could be found starting from the context that was passed to RemixTheme.of(). ' - 'This can happen because the context you used comes from a widget above the RemixTheme.\n' - 'The context used was:\n' - ' $context', - ); - } - - return provider.data; - } - - static RemixThemeData? maybeOf(BuildContext context) { - return context - .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() - ?.data; - } - - final ThemeMode? themeMode; - - final RemixThemeData? theme; - - final RemixThemeData? darkTheme; - final Widget child; - - RemixThemeData get _defaultThemeDark => RemixThemeData.base(); - RemixThemeData get _defaultThemeLight => RemixThemeData.base(); - - RemixThemeData _defineRemixThemeData(BuildContext context) { - if (themeMode != null) { - return themeMode == ThemeMode.dark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - final brightness = MediaQuery.platformBrightnessOf(context); - final isDark = brightness == Brightness.dark; - - return isDark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - @override - Widget build(BuildContext context) { - final theme = _defineRemixThemeData(context); - final tokens = theme.tokens; - - return MixTheme( - data: MixThemeData( - colors: tokens.colors, - spaces: tokens.spaces, - textStyles: tokens.textStyles, - radii: tokens.radii, - ), - child: _RemixThemeInherited(data: theme, child: child), - ); - } -} - -class _RemixThemeInherited extends InheritedWidget { - const _RemixThemeInherited({required super.child, required this.data}); - - final RemixThemeData data; - - @override - bool updateShouldNotify(_RemixThemeInherited oldWidget) { - return data != oldWidget.data; - } -} diff --git a/packages/remix/lib/src/theme/remix_tokens.dart b/packages/remix/lib/src/theme/remix_tokens.dart deleted file mode 100644 index ba02d8af1..000000000 --- a/packages/remix/lib/src/theme/remix_tokens.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; - -import '../helpers/color_palette.dart'; - -part 'tokens/color_tokens.dart'; -part 'tokens/radius_tokens.dart'; -part 'tokens/space_tokens.dart'; -part 'tokens/text_style_tokens.dart'; - -final $rx = _RemixTokenRef(); - -class _RemixTokenRef { - final color = RemixColors(); - final space = RemixSpace(); - final radii = RemixRadius(); - final text = RemixTypography(); - - _RemixTokenRef(); -} - -final light = RemixTokens( - colors: remixColorTokens, - textStyles: remixTextTokens, - spaces: remixSpaceTokens, - radii: remixRadiusTokens, -); - -final dark = RemixTokens( - colors: remixDarkColorTokens, - textStyles: remixTextTokens, - spaces: remixSpaceTokens, - radii: remixRadiusTokens, -); - -class RemixTokens { - final Map colors; - final Map textStyles; - final Map spaces; - final Map radii; - - const RemixTokens({ - required this.colors, - required this.textStyles, - required this.spaces, - required this.radii, - }); - - static RemixTokens base() { - return const RemixTokens( - colors: {}, - textStyles: {}, - spaces: {}, - radii: {}, - ); - } - - MixThemeData toThemeData() { - return MixThemeData( - colors: colors, - spaces: spaces, - textStyles: textStyles, - radii: radii, - ); - } -} diff --git a/packages/remix/lib/src/theme/tokens/color_tokens.dart b/packages/remix/lib/src/theme/tokens/color_tokens.dart deleted file mode 100644 index b6348a7ef..000000000 --- a/packages/remix/lib/src/theme/tokens/color_tokens.dart +++ /dev/null @@ -1,66 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixColors { - final _blackColor = const ColorToken('--black'); - final _whiteColor = const ColorToken('--white'); - final _accentSwatch = ColorSwatchToken.scale('--accent', 12); - final _accentAlphaSwatch = ColorSwatchToken.scale('--accent-alpha', 12); - - final _neutralSwatch = ColorSwatchToken.scale('--neutral', 12); - final _neutralAlphaSwatch = ColorSwatchToken.scale('--neutral-alpha', 12); - - RemixColors(); - - ColorToken black() => _blackColor; - ColorToken white() => _whiteColor; - - ColorToken accent([int? step]) { - return step == null ? _accentSwatch : _accentSwatch[step]; - } - - ColorToken accentAlpha([int? step]) { - return step == null ? _accentAlphaSwatch : _accentAlphaSwatch[step]; - } - - ColorToken neutral([int? step]) { - return step == null ? _neutralSwatch : _neutralSwatch[step]; - } - - ColorToken neutralAlpha([int? step]) { - return step == null ? _neutralAlphaSwatch : _neutralAlphaSwatch[step]; - } -} - -Map _mapColorRadixTokens({ - required RadixColors accent, - required RadixColors neutral, -}) { - final remix = RemixColors(); - - return { - remix._whiteColor: const Color(0xFFFFFFFF), - remix._blackColor: const Color(0xFF1C2024), - remix._accentSwatch: accent.swatch, - remix._accentAlphaSwatch: accent.alphaSwatch, - remix._neutralSwatch: neutral.swatch, - remix._neutralAlphaSwatch: neutral.alphaSwatch, - }; -} - -final remixColorTokens = _mapColorRadixTokens( - accent: RadixColors.indigo, - neutral: RadixColors.slate, -); -final remixDarkColorTokens = _mapColorRadixTokens( - accent: RadixColors.indigoDark, - neutral: RadixColors.slateDark, -); - -extension ColorUtilityX on ColorUtility { - T $black() => ref($rx.color.black()); - T $white() => ref($rx.color.white()); - T $neutral([int? step]) => ref($rx.color.neutral(step)); - T $neutralAlpha([int? step]) => ref($rx.color.neutralAlpha(step)); - T $accent([int? step]) => ref($rx.color.accent(step)); - T $accentAlpha([int? step]) => ref($rx.color.accentAlpha(step)); -} \ No newline at end of file diff --git a/packages/remix/lib/src/theme/tokens/radius_tokens.dart b/packages/remix/lib/src/theme/tokens/radius_tokens.dart deleted file mode 100644 index 2b7a68304..000000000 --- a/packages/remix/lib/src/theme/tokens/radius_tokens.dart +++ /dev/null @@ -1,34 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixRadius { - final radius1 = const RadiusToken('--radius-1'); - final radius2 = const RadiusToken('--radius-2'); - final radius3 = const RadiusToken('--radius-3'); - final radius4 = const RadiusToken('--radius-4'); - final radius5 = const RadiusToken('--radius-5'); - final radius6 = const RadiusToken('--radius-6'); - - RemixRadius(); - - RadiusToken call([int step = 1]) { - if (step < 1 || step > 6) { - throw ArgumentError('Invalid space step: $step'); - } - - return RadiusToken('--radius-$step'); - } -} - -final _r = RemixRadius(); -final remixRadiusTokens = { - _r.radius1: const Radius.circular(4), - _r.radius2: const Radius.circular(8), - _r.radius3: const Radius.circular(12), - _r.radius4: const Radius.circular(16), - _r.radius5: const Radius.circular(24), - _r.radius6: const Radius.circular(32), -}; - -extension RadiusUtilityX on RadiusUtility { - T $radius(int step) => ref($rx.radii(step)); -} diff --git a/packages/remix/lib/src/theme/tokens/space_tokens.dart b/packages/remix/lib/src/theme/tokens/space_tokens.dart deleted file mode 100644 index 68f2282fb..000000000 --- a/packages/remix/lib/src/theme/tokens/space_tokens.dart +++ /dev/null @@ -1,55 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixSpace { - final space1 = const SpaceToken('--space-1'); - final space2 = const SpaceToken('--space-2'); - final space3 = const SpaceToken('--space-3'); - final space4 = const SpaceToken('--space-4'); - final space5 = const SpaceToken('--space-5'); - final space6 = const SpaceToken('--space-6'); - final space7 = const SpaceToken('--space-7'); - final space8 = const SpaceToken('--space-8'); - final space9 = const SpaceToken('--space-9'); - - RemixSpace(); - - operator [](int index) { - return call(index); - } - - SpaceToken call(int step) { - return switch (step) { - 1 => space1, - 2 => space2, - 3 => space3, - 4 => space4, - 5 => space5, - 6 => space6, - 7 => space7, - 8 => space8, - 9 => space9, - _ => throw ArgumentError('Invalid space step: $step'), - }; - } -} - -final _s = RemixSpace(); -final remixSpaceTokens = { - _s.space1: 4.0, - _s.space2: 8.0, - _s.space3: 12.0, - _s.space4: 16.0, - _s.space5: 24.0, - _s.space6: 32.0, - _s.space7: 40.0, - _s.space8: 48.0, - _s.space9: 64.0, -}; - -extension SpacingSideUtilityX on SpacingSideUtility { - T $space(int step) => ref($rx.space(step)); -} - -extension GapUtilityX on GapUtility { - T $space(int step) => ref($rx.space(step)); -} diff --git a/packages/remix/lib/src/theme/tokens/text_style_tokens.dart b/packages/remix/lib/src/theme/tokens/text_style_tokens.dart deleted file mode 100644 index 37f3099f7..000000000 --- a/packages/remix/lib/src/theme/tokens/text_style_tokens.dart +++ /dev/null @@ -1,85 +0,0 @@ -// ignore_for_file: unnecessary-trailing-comma - -part of '../remix_tokens.dart'; - -class RemixTypography { - final text1 = const TextStyleToken('--text-1'); - final text2 = const TextStyleToken('--text-2'); - final text3 = const TextStyleToken('--text-3'); - final text4 = const TextStyleToken('--text-4'); - final text5 = const TextStyleToken('--text-5'); - final text6 = const TextStyleToken('--text-6'); - final text7 = const TextStyleToken('--text-7'); - final text8 = const TextStyleToken('--text-8'); - final text9 = const TextStyleToken('--text-9'); - - RemixTypography(); - - TextStyleToken call(int level) { - return switch (level) { - 1 => text1, - 2 => text2, - 3 => text3, - 4 => text4, - 5 => text5, - 6 => text6, - 7 => text7, - 8 => text8, - 9 => text9, - _ => throw ArgumentError('Invalid text level: $level'), - }; - } -} - -final _t = RemixTypography(); -final remixTextTokens = { - _t.text1: const TextStyle( - fontSize: 12, - letterSpacing: 0.0025, - height: 1.33, - ), - _t.text2: const TextStyle( - fontSize: 14, - letterSpacing: 0, - height: 1.43, - ), - _t.text3: const TextStyle( - fontSize: 16, - letterSpacing: 0, - height: 1.50, - ), - _t.text4: const TextStyle( - fontSize: 18, - letterSpacing: -0.0025, - height: 1.44, - ), - _t.text5: const TextStyle( - fontSize: 20, - letterSpacing: -0.005, - height: 1.40, - ), - _t.text6: const TextStyle( - fontSize: 24, - letterSpacing: -0.00625, - height: 1.25, - ), - _t.text7: const TextStyle( - fontSize: 28, - letterSpacing: -0.0075, - height: 1.29, - ), - _t.text8: const TextStyle( - fontSize: 35, - letterSpacing: -0.01, - height: 1.14, - ), - _t.text9: const TextStyle( - fontSize: 60, - letterSpacing: -0.025, - height: 1.00, - ), -}; - -extension TextStyleUtilityX on TextStyleUtility { - T $text(int level) => ref($rx.text(level)); -} diff --git a/packages/remix/lib/src/components/accordion/accordion_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart similarity index 85% rename from packages/remix/lib/src/components/accordion/accordion_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart index 51d474c20..b0134df22 100644 --- a/packages/remix/lib/src/components/accordion/accordion_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart @@ -1,4 +1,8 @@ -part of 'accordion.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/accordion/accordion.dart'; +import '../tokens.dart'; class FortalezaAccordionStyle extends AccordionStyle { const FortalezaAccordionStyle(); @@ -19,12 +23,12 @@ class FortalezaAccordionStyle extends AccordionStyle { ..shape.roundedRectangle.side.color.blue() ..border.all.color.$neutral(7) ..border.all.color.withOpacity(1) - ..borderRadius.all.$radius(2) + ..borderRadius.all.$radius2() ..color.$neutral(2), // Header $.header.chain - ..container.padding.horizontal.$space(4) + ..container.padding.horizontal.$space4() ..text.style.fontWeight.w400() ..text.style.color.$neutral(12) ..trailingIcon.color.$neutral(10) @@ -33,7 +37,7 @@ class FortalezaAccordionStyle extends AccordionStyle { ..container.animated.duration(const Duration(milliseconds: 100)), $.contentContainer.chain - ..padding.all.$space(3) + ..padding.all.$space3() ..border.style.none() ..border.top.color.$neutral(6) ..animated.curve.spring(stiffness: 100) diff --git a/packages/remix/lib/src/components/avatar/avatar_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart similarity index 90% rename from packages/remix/lib/src/components/avatar/avatar_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart index b230f5fbd..07e07ce0f 100644 --- a/packages/remix/lib/src/components/avatar/avatar_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart @@ -1,4 +1,7 @@ -part of 'avatar.dart'; +import 'package:mix/mix.dart'; + +import '../../../../themes/fortaleza.dart'; +import '../../../components/avatar/avatar.dart'; class FortalezaAvatarStyle extends AvatarStyle { static const soft = Variant('avatar.soft'); diff --git a/packages/remix/lib/src/components/badge/badge_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart similarity index 90% rename from packages/remix/lib/src/components/badge/badge_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart index 0606bc602..18ca22569 100644 --- a/packages/remix/lib/src/components/badge/badge_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart @@ -1,4 +1,7 @@ -part of 'badge.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/badge/badge.dart'; +import '../tokens.dart'; class FortalezaBadgeStyle extends BadgeStyle { static const soft = Variant('for.badge.soft'); @@ -16,9 +19,9 @@ class FortalezaBadgeStyle extends BadgeStyle { final baseStyle = super.makeStyle(spec); final baseStyleOverride = Style( $.container.chain - ..borderRadius.all.$radius(1) - ..padding.horizontal.$space(2) - ..padding.vertical.$space(1) + ..borderRadius.all.$radius1() + ..padding.horizontal.$space2() + ..padding.vertical.$space1() ..color.$accent(), $.label.style.color.$neutral(1), ); diff --git a/packages/remix/lib/src/components/button/button_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart similarity index 92% rename from packages/remix/lib/src/components/button/button_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/button_theme.dart index 1dde4cf16..334d4656e 100644 --- a/packages/remix/lib/src/components/button/button_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart @@ -1,4 +1,7 @@ -part of 'button.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/button/button.dart'; +import '../tokens.dart'; class FortalezaButtonStyle extends ButtonStyle { static const soft = Variant('for.button.soft'); @@ -18,10 +21,10 @@ class FortalezaButtonStyle extends ButtonStyle { final baseOverrides = Style( baseStyle(), $.container.chain - ..padding.vertical.$space(2) - ..padding.horizontal.$space(3) - ..flex.gap.$space(2), - $.label.style.$text(2), + ..padding.vertical.$space2() + ..padding.horizontal.$space3() + ..flex.gap.$space2(), + $.label.style.$text2(), $.icon.size(14), $.spinner.size(14), ); diff --git a/packages/remix/lib/src/components/callout/callout_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart similarity index 91% rename from packages/remix/lib/src/components/callout/callout_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart index 4acf4b753..de17d3e92 100644 --- a/packages/remix/lib/src/components/callout/callout_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart @@ -1,4 +1,7 @@ -part of 'callout.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/callout/callout.dart'; +import '../tokens.dart'; class FortalezaCalloutStyle extends CalloutStyle { static const surface = Variant('for.callout.surface'); @@ -21,7 +24,7 @@ class FortalezaCalloutStyle extends CalloutStyle { ..border.all.width(0) ..border.all.style.none() ..padding(16) - ..flex.gap.$space(3) + ..flex.gap.$space3() ..flex.crossAxisAlignment.center() ..flex.mainAxisAlignment.start(), $.icon.chain diff --git a/packages/remix/lib/src/components/card/card_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart similarity index 83% rename from packages/remix/lib/src/components/card/card_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/card_theme.dart index 53fb0dfdb..62d1f8816 100644 --- a/packages/remix/lib/src/components/card/card_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart @@ -1,4 +1,7 @@ -part of 'card.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/card/card.dart'; +import '../tokens.dart'; class FortalezaCardStyle extends CardStyle { static const ghost = Variant('ghost'); @@ -15,8 +18,8 @@ class FortalezaCardStyle extends CardStyle { final surfaceVariant = Style( $.container.chain - ..padding.all.$space(3) - ..borderRadius.all.$radius(2) + ..padding.all.$space3() + ..borderRadius.all.$radius2() ..border.all.color.$neutral(6) ..color.$neutral(1), spec.on.hover($.container.border.color.$neutral(8)), diff --git a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart similarity index 94% rename from packages/remix/lib/src/components/checkbox/checkbox_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart index b03320642..7f2dab979 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart @@ -1,4 +1,8 @@ -part of 'checkbox.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/checkbox/checkbox.dart'; +import '../tokens.dart'; class FortalezaCheckboxStyle extends CheckboxStyle { static const soft = Variant('for.checkbox.soft'); diff --git a/packages/remix/lib/src/components/chip/chip_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart similarity index 92% rename from packages/remix/lib/src/components/chip/chip_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart index a460e8ac8..40799083a 100644 --- a/packages/remix/lib/src/components/chip/chip_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart @@ -1,4 +1,7 @@ -part of 'chip.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/chip/chip.dart'; +import '../tokens.dart'; class FortalezaChipStyle extends ChipStyle { static const ghost = Variant('for.chip.ghost'); @@ -15,13 +18,13 @@ class FortalezaChipStyle extends ChipStyle { final labelStyle = [ $.label.chain - ..style.$text(2) + ..style.$text2() ..style.color.$accent(), ]; final containerStyle = [ $.container.chain - ..flex.gap.$space(2) + ..flex.gap.$space2() ..borderRadius(20) ..color.$accent(2) ..border.color.$accent(6) diff --git a/packages/remix/lib/src/themes/fortaleza/components/components.dart b/packages/remix/lib/src/themes/fortaleza/components/components.dart new file mode 100644 index 000000000..60ef3d53b --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/components/components.dart @@ -0,0 +1,104 @@ +import '../../../components/accordion/accordion.dart'; +import '../../../components/avatar/avatar.dart'; +import '../../../components/badge/badge.dart'; +import '../../../components/button/button.dart'; +import '../../../components/callout/callout.dart'; +import '../../../components/card/card.dart'; +import '../../../components/checkbox/checkbox.dart'; +import '../../../components/chip/chip.dart'; +import '../../../components/dialog/dialog.dart'; +import '../../../components/divider/divider.dart'; +import '../../../components/icon_button/icon_button.dart'; +import '../../../components/menu_item/menu_item.dart'; +import '../../../components/progress/progress.dart'; +import '../../../components/radio/radio.dart'; +import '../../../components/scaffold/scaffold.dart'; +import '../../../components/segmented_control/segmented_control.dart'; +import '../../../components/select/select.dart'; +import '../../../components/slider/slider.dart'; +import '../../../components/spinner/spinner.dart'; +import '../../../components/switch/switch.dart'; +import '../../../components/textfield/textfield.dart'; +import '../../../components/toast/toast.dart'; +import '../../../core/theme/component.dart'; +import 'accordion_theme.dart'; +import 'avatar_theme.dart'; +import 'badge_theme.dart'; +import 'button_theme.dart'; +import 'callout_theme.dart'; +import 'card_theme.dart'; +import 'checkbox_theme.dart'; +import 'chip_theme.dart'; +import 'dialog_theme.dart'; +import 'divider_theme.dart'; +import 'icon_button_theme.dart'; +import 'menu_item_theme.dart'; +import 'progress_theme.dart'; +import 'radio_theme.dart'; +import 'scaffold_theme.dart'; +import 'segmented_control_theme.dart'; +import 'select_theme.dart'; +import 'slider_theme.dart'; +import 'spinner_theme.dart'; +import 'switch_theme.dart'; +import 'textfield_theme.dart'; +import 'toast_theme.dart'; + +class FortalezaComponentTheme extends RemixComponentTheme { + static const FortalezaComponentTheme light = FortalezaComponentTheme(); + static const FortalezaComponentTheme dark = FortalezaComponentTheme( + avatar: FortalezaDarkAvatarStyle(), + badge: FortalezaDarkBadgeStyle(), + segmentedControl: FortalezaDarkSegmentedControlStyle(), + select: FortalezaDarkSelectStyle(), + switchComponent: FortalezaDarkSwitchStyle(), + ); + + const FortalezaComponentTheme({ + AccordionStyle? accordion, + AvatarStyle? avatar, + BadgeStyle? badge, + ButtonStyle? button, + CalloutStyle? callout, + CardStyle? card, + CheckboxStyle? checkbox, + DialogStyle? dialog, + ChipStyle? chip, + DividerStyle? divider, + IconButtonStyle? iconButton, + MenuItemStyle? menuItem, + ProgressStyle? progress, + RadioStyle? radio, + ScaffoldStyle? scaffold, + SegmentedControlStyle? segmentedControl, + SelectStyle? select, + SpinnerStyle? spinner, + SwitchStyle? switchComponent, + TextFieldStyle? textField, + ToastStyle? toast, + SliderStyle? slider, + }) : super( + accordion: const FortalezaAccordionStyle(), + avatar: const FortalezaAvatarStyle(), + badge: const FortalezaBadgeStyle(), + button: const FortalezaButtonStyle(), + callout: const FortalezaCalloutStyle(), + card: const FortalezaCardStyle(), + checkbox: const FortalezaCheckboxStyle(), + dialog: const FortalezaDialogStyle(), + chip: const FortalezaChipStyle(), + divider: const FortalezaDividerStyle(), + iconButton: const FortalezaIconButtonStyle(), + menuItem: const FortalezaMenuItemStyle(), + progress: const FortalezaProgressStyle(), + radio: const FortalezaRadioStyle(), + scaffold: const FortalezaScaffoldStyle(), + segmentedControl: const FortalezaSegmentedControlStyle(), + select: const FortalezaSelectStyle(), + spinner: const FortalezaSpinnerStyle(), + switchComponent: const FortalezaSwitchStyle(), + textField: const FortalezaTextFieldStyle(), + toast: const FortalezaToastStyle(), + slider: const FortalezaSliderStyle(), + ); +} diff --git a/packages/remix/lib/src/components/dialog/dialog_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart similarity index 73% rename from packages/remix/lib/src/components/dialog/dialog_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart index 7426150b4..8716ed2c4 100644 --- a/packages/remix/lib/src/components/dialog/dialog_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart @@ -1,4 +1,7 @@ -part of 'dialog.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/dialog/dialog.dart'; +import '../tokens.dart'; class FortalezaDialogStyle extends DialogStyle { const FortalezaDialogStyle(); @@ -8,17 +11,17 @@ class FortalezaDialogStyle extends DialogStyle { final $ = spec.utilities; final containerStyle = $.container.chain - ..padding.all.$space(4) - ..borderRadius.all.$radius(2) + ..padding.all.$space4() + ..borderRadius.all.$radius2() ..border.all.color.$neutral(6) ..color.$neutral(1); final titleStyle = $.title.chain - ..style.$text(5) + ..style.$text5() ..style.color.$neutral(12); final descriptionStyle = $.description.chain - ..style.$text(2) + ..style.$text2() ..style.color.$neutral(9); return Style.create( diff --git a/packages/remix/lib/src/components/divider/divider_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart similarity index 77% rename from packages/remix/lib/src/components/divider/divider_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart index 917503a95..e8492d36e 100644 --- a/packages/remix/lib/src/components/divider/divider_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart @@ -1,4 +1,7 @@ -part of 'divider.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/divider/divider.dart'; +import '../tokens.dart'; class FortalezaDividerStyle extends DividerStyle { const FortalezaDividerStyle(); diff --git a/packages/remix/lib/src/components/icon_button/icon_button_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart similarity index 94% rename from packages/remix/lib/src/components/icon_button/icon_button_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart index 53cd89894..0dae77e6e 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart @@ -1,4 +1,7 @@ -part of 'icon_button.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/icon_button/icon_button.dart'; +import '../tokens.dart'; class FortalezaIconButtonStyle extends IconButtonStyle { static const soft = Variant('for.button.soft'); @@ -17,7 +20,7 @@ class FortalezaIconButtonStyle extends IconButtonStyle { final baseStyle = super.makeStyle(spec); final baseOverrides = Style( baseStyle(), - $.container.padding.all.$space(2), + $.container.padding.all.$space2(), $.icon.size(16), $.spinner.size(14), ); diff --git a/packages/remix/lib/src/components/menu_item/menu_item_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart similarity index 78% rename from packages/remix/lib/src/components/menu_item/menu_item_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart index bf9b0bc71..1bb2ab762 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart @@ -1,4 +1,7 @@ -part of 'menu_item.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/menu_item/menu_item.dart'; +import '../tokens.dart'; class FortalezaMenuItemStyle extends MenuItemStyle { const FortalezaMenuItemStyle(); @@ -8,23 +11,23 @@ class FortalezaMenuItemStyle extends MenuItemStyle { final $ = spec.utilities; final baseStyle = super.makeStyle(spec); - final titleSubtitleLayout = $.titleSubtitleContainer.flex.gap.$space(1); + final titleSubtitleLayout = $.titleSubtitleContainer.flex.gap.$space1(); final title = $.title.chain - ..style.$text(2) + ..style.$text2() ..style.color.resetDirectives() ..style.color.$neutral(12); final subtitle = $.subtitle.chain - ..style.$text(1) + ..style.$text1() ..style.color.resetDirectives() ..style.color.$neutral(9); final container = $.container.chain - ..padding.all.$space(3) - ..padding.right.$space(4) - ..borderRadius.all.$radius(2) - ..flex.gap.$space(3); + ..padding.all.$space3() + ..padding.right.$space4() + ..borderRadius.all.$radius2() + ..flex.gap.$space3(); final icon = $.icon.color.$neutral(11); diff --git a/packages/remix/lib/src/components/progress/progress_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart similarity index 89% rename from packages/remix/lib/src/components/progress/progress_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart index 2d7bd0719..845152138 100644 --- a/packages/remix/lib/src/components/progress/progress_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart @@ -1,4 +1,7 @@ -part of 'progress.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/progress/progress.dart'; +import '../tokens.dart'; class FortalezaProgressStyle extends ProgressStyle { static const soft = Variant('for.progress.soft'); diff --git a/packages/remix/lib/src/components/radio/radio_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart similarity index 95% rename from packages/remix/lib/src/components/radio/radio_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart index a89332c5e..d42ffc972 100644 --- a/packages/remix/lib/src/components/radio/radio_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart @@ -1,4 +1,7 @@ -part of 'radio.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/radio/radio.dart'; +import '../tokens.dart'; class FortalezaRadioStyle extends RadioStyle { static const soft = Variant('for.radio.soft'); diff --git a/packages/remix/lib/src/components/scaffold/scaffold_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart similarity index 70% rename from packages/remix/lib/src/components/scaffold/scaffold_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart index a32bd219d..7b8c3609e 100644 --- a/packages/remix/lib/src/components/scaffold/scaffold_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart @@ -1,4 +1,7 @@ -part of 'scaffold.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/scaffold/scaffold.dart'; +import '../tokens.dart'; class FortalezaScaffoldStyle extends ScaffoldStyle { const FortalezaScaffoldStyle(); @@ -6,7 +9,7 @@ class FortalezaScaffoldStyle extends ScaffoldStyle { @override Style makeStyle(SpecConfiguration spec) { final $ = spec.utilities; - + return Style.create([$.container.color.$neutral(1)]); } } diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart similarity index 83% rename from packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart index d2f39532f..2190b55c2 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart @@ -1,4 +1,7 @@ -part of 'segmented_control.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/segmented_control/segmented_control.dart'; +import '../tokens.dart'; class FortalezaSegmentedControlStyle extends SegmentedControlStyle { const FortalezaSegmentedControlStyle(); @@ -11,7 +14,7 @@ class FortalezaSegmentedControlStyle extends SegmentedControlStyle { final style = Style( $.container.padding(0), - $.item.container.padding.vertical.$space(2), + $.item.container.padding.vertical.$space2(), $.showDivider.on(), $.container.color.$neutral(3), $.item.label.style.color.$neutral(11), @@ -40,9 +43,9 @@ class FortalezaDarkSegmentedControlStyle final style = Style( $.container.color.$neutral(2), - $.container.borderRadius.all.$radius(1), + $.container.borderRadius.all.$radius1(), $on.selected( - $.item.container.borderRadius.all.$radius(1), + $.item.container.borderRadius.all.$radius1(), $.item.container.color.$neutral(4), $.item.chain ..label.style.color.$neutral(12) diff --git a/packages/remix/lib/src/components/select/select_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart similarity index 93% rename from packages/remix/lib/src/components/select/select_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/select_theme.dart index e8be48577..782093b62 100644 --- a/packages/remix/lib/src/components/select/select_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart @@ -1,4 +1,7 @@ -part of 'select.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/select/select.dart'; +import '../tokens.dart'; class FortalezaSelectStyle extends SelectStyle { static const soft = Variant('for.select.soft'); @@ -20,14 +23,14 @@ class FortalezaSelectStyle extends SelectStyle { ..color.$neutral(1) ..border.all.color.$neutral(6) ..wrap.intrinsicWidth() - ..padding.all.$space(2), + ..padding.all.$space2(), $.button.chain ..container.border.all.color.$neutral(6) ..container.color.$neutral(1) ..icon.color.$accentAlpha(12) - ..container.flex.gap.$space(1) + ..container.flex.gap.$space1() ..container.flex.mainAxisSize.min(), - $.item.container.padding.horizontal.$space(3), + $.item.container.padding.horizontal.$space3(), spec.on.disabled( $.button.chain ..container.color.$neutral(2) diff --git a/packages/remix/lib/src/components/slider/slider_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart similarity index 89% rename from packages/remix/lib/src/components/slider/slider_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart index 8ac2a55a1..bc19a9152 100644 --- a/packages/remix/lib/src/components/slider/slider_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart @@ -1,4 +1,8 @@ -part of 'slider.dart'; +import 'package:flutter/animation.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/slider/slider.dart'; +import '../tokens.dart'; class FortalezaSliderStyle extends SliderStyle { const FortalezaSliderStyle(); diff --git a/packages/remix/lib/src/components/spinner/spinner_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart similarity index 82% rename from packages/remix/lib/src/components/spinner/spinner_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart index 4524f4918..c0584f05d 100644 --- a/packages/remix/lib/src/components/spinner/spinner_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart @@ -1,4 +1,7 @@ -part of 'spinner.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/spinner/spinner.dart'; +import '../tokens.dart'; class FortalezaSpinnerStyle extends SpinnerStyle { static const soft = Variant('for.spinner.soft'); diff --git a/packages/remix/lib/src/components/switch/switch_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart similarity index 95% rename from packages/remix/lib/src/components/switch/switch_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart index 81001ea90..d2dcec2e0 100644 --- a/packages/remix/lib/src/components/switch/switch_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart @@ -1,4 +1,7 @@ -part of 'switch.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/switch/switch.dart'; +import '../tokens.dart'; class FortalezaSwitchStyle extends SwitchStyle { static const soft = Variant('for.switch.soft'); diff --git a/packages/remix/lib/src/components/textfield/textfield_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart similarity index 60% rename from packages/remix/lib/src/components/textfield/textfield_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart index 7193033f6..be12d24bf 100644 --- a/packages/remix/lib/src/components/textfield/textfield_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart @@ -1,4 +1,7 @@ -part of 'textfield.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/textfield/textfield.dart'; +import '../tokens.dart'; class FortalezaTextFieldStyle extends TextFieldStyle { const FortalezaTextFieldStyle(); @@ -9,31 +12,31 @@ class FortalezaTextFieldStyle extends TextFieldStyle { final textFieldContainerStyle = $.textFieldContainer.chain ..color.$neutral(1) - ..padding.horizontal.$space(3) - ..padding.vertical.$space(2) - ..borderRadius.all.$radius(2) - ..border.all.color.$neutral(6) + ..padding.horizontal.$space3() + ..padding.vertical.$space2() + ..borderRadius.all.$radius2() + ..border.all.color.$neutral() ..border.all.strokeAlign.outside() ..shadow.color.$neutral(4) - ..flex.gap.$space(2); + ..flex.gap.$space2(); - final textStyle = [$.style.$text(2), $.style.color.$neutral(12)]; + final textStyle = [$.style.$text2(), $.style.color.$neutral()]; - final containerStyle = $.container.flex.gap.$space(2); + final containerStyle = $.container.flex.gap.$space2(); final hintStyle = [ - $.hintTextStyle.color.$neutral(9), - $.hintTextStyle.$text(2), + $.hintTextStyle.color.$neutral(), + $.hintTextStyle.$text2(), ]; final floatingHintStyle = [ - $.floatingLabelStyle.color.$neutral(9), - $.floatingLabelStyle.$text(1), + $.floatingLabelStyle.color.$neutral(), + $.floatingLabelStyle.$text1(), ]; final helperStyle = [ - $.helperText.style.color.$neutral(9), - $.helperText.style.$text(1), + $.helperText.style.color.$neutral(), + $.helperText.style.$text1(), ]; final icon = $.icon.color.$accent(); diff --git a/packages/remix/lib/src/components/toast/toast_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart similarity index 66% rename from packages/remix/lib/src/components/toast/toast_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart index e19fe1dcd..f21828b22 100644 --- a/packages/remix/lib/src/components/toast/toast_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart @@ -1,4 +1,7 @@ -part of 'toast.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/toast/toast.dart'; +import '../tokens.dart'; class FortalezaToastStyle extends ToastStyle { const FortalezaToastStyle(); @@ -8,22 +11,22 @@ class FortalezaToastStyle extends ToastStyle { final $ = spec.utilities; final containerStyle = $.container.chain - ..borderRadius.all.$radius(2) + ..borderRadius.all.$radius2() ..color.$neutral(2) ..border.all.color.$neutral(6) - ..padding.all.$space(4) - ..margin.all.$space(4) - ..flex.gap.$space(5); + ..padding.all.$space4() + ..margin.all.$space4() + ..flex.gap.$space5(); final titleSubtitleContainerStyle = - $.titleSubtitleContainer.flex.gap.$space(1); + $.titleSubtitleContainer.flex.gap.$space1(); final titleStyle = $.title.chain - ..style.$text(2) + ..style.$text2() ..style.color.$neutral(12); final subtitleStyle = $.subtitle.chain - ..style.$text(1) + ..style.$text1() ..style.color.$neutral(9); return Style.create([ diff --git a/packages/remix/lib/src/themes/fortaleza/theme.dart b/packages/remix/lib/src/themes/fortaleza/theme.dart new file mode 100644 index 000000000..3317ddf97 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/theme.dart @@ -0,0 +1,34 @@ +import '../../core/theme/remix_theme.dart'; +import 'components/components.dart'; +import 'tokens.dart'; + +class FortalezaThemeData { + final FortalezaComponentTheme components; + final FortalezaTokens tokens; + + static final FortalezaThemeData light = FortalezaThemeData( + components: FortalezaComponentTheme.light, + tokens: FortalezaTokens.light(), + ); + + static final FortalezaThemeData dark = FortalezaThemeData( + components: FortalezaComponentTheme.dark, + tokens: FortalezaTokens.dark(), + ); + + const FortalezaThemeData({required this.components, required this.tokens}); + + FortalezaThemeData copyWith({ + FortalezaComponentTheme? components, + FortalezaTokens? tokens, + }) { + return FortalezaThemeData( + components: components ?? this.components, + tokens: tokens ?? this.tokens, + ); + } + + RemixThemeData toThemeData() { + return RemixThemeData(components: components, tokens: tokens.toThemeData()); + } +} diff --git a/packages/remix/lib/src/themes/fortaleza/tokens.dart b/packages/remix/lib/src/themes/fortaleza/tokens.dart new file mode 100644 index 000000000..64664ece3 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/tokens.dart @@ -0,0 +1,201 @@ +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +import '../../helpers/color_palette.dart'; + +part 'tokens.g.dart'; + +class FortalezaTokens { + final FortalezaColor colors; + final FortalezaRadius radii; + final FortalezaSpace spaces; + final FortalezaTextStyle textStyles; + + const FortalezaTokens({ + required this.colors, + required this.radii, + required this.spaces, + required this.textStyles, + }); + + factory FortalezaTokens.light() { + return FortalezaTokens( + colors: FortalezaColor( + black: const Color(0xFF1C2024), + white: const Color(0xFFFFFFFF), + accent: RadixColors.indigo.swatch, + accentAlpha: RadixColors.indigo.alphaSwatch, + neutral: RadixColors.slate.swatch, + neutralAlpha: RadixColors.slate.alphaSwatch, + ), + radii: const FortalezaRadius( + radius1: Radius.circular(4), + radius2: Radius.circular(8), + radius3: Radius.circular(12), + radius4: Radius.circular(16), + radius5: Radius.circular(24), + radius6: Radius.circular(32), + ), + spaces: const FortalezaSpace( + space1: 4, + space2: 8, + space3: 12, + space4: 16, + space5: 24, + space6: 32, + space7: 40, + space8: 48, + space9: 64, + ), + textStyles: const FortalezaTextStyle( + text1: TextStyle(fontSize: 12, letterSpacing: 0.0025, height: 1.33), + text2: TextStyle(fontSize: 14, letterSpacing: 0, height: 1.43), + text3: TextStyle(fontSize: 16, letterSpacing: 0, height: 1.50), + text4: TextStyle(fontSize: 18, letterSpacing: -0.0025, height: 1.44), + text5: TextStyle(fontSize: 20, letterSpacing: -0.005, height: 1.40), + text6: TextStyle(fontSize: 24, letterSpacing: -0.00625, height: 1.25), + text7: TextStyle(fontSize: 28, letterSpacing: -0.0075, height: 1.29), + text8: TextStyle(fontSize: 35, letterSpacing: -0.01, height: 1.14), + text9: TextStyle(fontSize: 60, letterSpacing: -0.025, height: 1.00), + ), + ); + } + + factory FortalezaTokens.dark() { + return FortalezaTokens.light().copyWith( + colors: FortalezaColor( + black: const Color(0xFF1C2024), + white: const Color(0xFFFFFFFF), + accent: RadixColors.indigoDark.swatch, + accentAlpha: RadixColors.indigoDark.alphaSwatch, + neutral: RadixColors.slateDark.swatch, + neutralAlpha: RadixColors.slateDark.alphaSwatch, + ), + ); + } + + MixThemeData toThemeData() { + return MixThemeData( + colors: colors.toMap, + spaces: spaces.toMap, + textStyles: textStyles.toMap, + radii: radii.toMap, + ); + } + + FortalezaTokens copyWith({ + FortalezaColor? colors, + FortalezaRadius? radii, + FortalezaSpace? spaces, + FortalezaTextStyle? textStyles, + }) { + return FortalezaTokens( + colors: colors ?? this.colors, + radii: radii ?? this.radii, + spaces: spaces ?? this.spaces, + textStyles: textStyles ?? this.textStyles, + ); + } +} + +@MixableToken(Color) +class FortalezaColor { + final Color black; + final Color white; + + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color accent; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color accentAlpha; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color neutral; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color neutralAlpha; + + const FortalezaColor({ + required this.black, + required this.white, + required this.accent, + required this.accentAlpha, + required this.neutral, + required this.neutralAlpha, + }); + + Map get toMap => _$FortalezaColorToMap(this); +} + +@MixableToken(Radius) +class FortalezaRadius { + final Radius radius1; + final Radius radius2; + final Radius radius3; + final Radius radius4; + final Radius radius5; + final Radius radius6; + + const FortalezaRadius({ + required this.radius1, + required this.radius2, + required this.radius3, + required this.radius4, + required this.radius5, + required this.radius6, + }); + + Map get toMap => _$FortalezaRadiusToMap(this); +} + +@MixableToken(double) +class FortalezaSpace { + final double space1; + final double space2; + final double space3; + final double space4; + final double space5; + final double space6; + final double space7; + final double space8; + final double space9; + + const FortalezaSpace({ + required this.space1, + required this.space2, + required this.space3, + required this.space4, + required this.space5, + required this.space6, + required this.space7, + required this.space8, + required this.space9, + }); + + Map get toMap => _$FortalezaSpaceToMap(this); +} + +@MixableToken(TextStyle) +class FortalezaTextStyle { + final TextStyle text1; + final TextStyle text2; + final TextStyle text3; + final TextStyle text4; + final TextStyle text5; + final TextStyle text6; + final TextStyle text7; + final TextStyle text8; + final TextStyle text9; + + const FortalezaTextStyle({ + required this.text1, + required this.text2, + required this.text3, + required this.text4, + required this.text5, + required this.text6, + required this.text7, + required this.text8, + required this.text9, + }); + + Map get toMap => _$FortalezaTextStyleToMap(this); +} diff --git a/packages/remix/lib/src/themes/fortaleza/tokens.g.dart b/packages/remix/lib/src/themes/fortaleza/tokens.g.dart new file mode 100644 index 000000000..769e95a31 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/tokens.g.dart @@ -0,0 +1,255 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tokens.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$FortalezaColorStruct { + _$FortalezaColorStruct(); + + final ColorToken black = const ColorToken('black'); + final ColorToken white = const ColorToken('white'); + final ColorSwatchToken accent = ColorSwatchToken.scale('accent', 12); + final ColorSwatchToken accentAlpha = + ColorSwatchToken.scale('accentAlpha', 12); + final ColorSwatchToken neutral = ColorSwatchToken.scale('neutral', 12); + final ColorSwatchToken neutralAlpha = + ColorSwatchToken.scale('neutralAlpha', 12); +} + +final _structFortalezaColor = _$FortalezaColorStruct(); + +Map _$FortalezaColorToMap(FortalezaColor tokens) { + return { + _structFortalezaColor.black: tokens.black, + _structFortalezaColor.white: tokens.white, + _structFortalezaColor.accent: tokens.accent, + _structFortalezaColor.accentAlpha: tokens.accentAlpha, + _structFortalezaColor.neutral: tokens.neutral, + _structFortalezaColor.neutralAlpha: tokens.neutralAlpha, + }; +} + +extension $FortalezaColorColorUtilityX on ColorUtility { + T $black() => ref(_structFortalezaColor.black); + T $white() => ref(_structFortalezaColor.white); + T $accent([int step = 9]) => ref(_structFortalezaColor.accent[step]); + T $accentAlpha([int step = 9]) => + ref(_structFortalezaColor.accentAlpha[step]); + T $neutral([int step = 9]) => ref(_structFortalezaColor.neutral[step]); + T $neutralAlpha([int step = 9]) => + ref(_structFortalezaColor.neutralAlpha[step]); +} + +class BuildContextFortalezaColorMethods { + const BuildContextFortalezaColorMethods(this.context); + + final BuildContext context; + Color black() => _structFortalezaColor.black.resolve(context); + Color white() => _structFortalezaColor.white.resolve(context); + Color accent([int step = 9]) => + _structFortalezaColor.accent[step].resolve(context); + Color accentAlpha([int step = 9]) => + _structFortalezaColor.accentAlpha[step].resolve(context); + Color neutral([int step = 9]) => + _structFortalezaColor.neutral[step].resolve(context); + Color neutralAlpha([int step = 9]) => + _structFortalezaColor.neutralAlpha[step].resolve(context); +} + +extension $BuildContextFortalezaColorX on BuildContext { + BuildContextFortalezaColorMethods get $color => + BuildContextFortalezaColorMethods(this); +} + +class _$FortalezaRadiusStruct { + _$FortalezaRadiusStruct(); + + final RadiusToken radius1 = const RadiusToken('radius1'); + final RadiusToken radius2 = const RadiusToken('radius2'); + final RadiusToken radius3 = const RadiusToken('radius3'); + final RadiusToken radius4 = const RadiusToken('radius4'); + final RadiusToken radius5 = const RadiusToken('radius5'); + final RadiusToken radius6 = const RadiusToken('radius6'); +} + +final _structFortalezaRadius = _$FortalezaRadiusStruct(); + +Map _$FortalezaRadiusToMap(FortalezaRadius tokens) { + return { + _structFortalezaRadius.radius1: tokens.radius1, + _structFortalezaRadius.radius2: tokens.radius2, + _structFortalezaRadius.radius3: tokens.radius3, + _structFortalezaRadius.radius4: tokens.radius4, + _structFortalezaRadius.radius5: tokens.radius5, + _structFortalezaRadius.radius6: tokens.radius6, + }; +} + +extension $FortalezaRadiusRadiusUtilityX + on RadiusUtility { + T $radius1() => ref(_structFortalezaRadius.radius1); + T $radius2() => ref(_structFortalezaRadius.radius2); + T $radius3() => ref(_structFortalezaRadius.radius3); + T $radius4() => ref(_structFortalezaRadius.radius4); + T $radius5() => ref(_structFortalezaRadius.radius5); + T $radius6() => ref(_structFortalezaRadius.radius6); +} + +class BuildContextFortalezaRadiusMethods { + const BuildContextFortalezaRadiusMethods(this.context); + + final BuildContext context; + Radius radius1() => _structFortalezaRadius.radius1.resolve(context); + Radius radius2() => _structFortalezaRadius.radius2.resolve(context); + Radius radius3() => _structFortalezaRadius.radius3.resolve(context); + Radius radius4() => _structFortalezaRadius.radius4.resolve(context); + Radius radius5() => _structFortalezaRadius.radius5.resolve(context); + Radius radius6() => _structFortalezaRadius.radius6.resolve(context); +} + +extension $BuildContextFortalezaRadiusX on BuildContext { + BuildContextFortalezaRadiusMethods get $radius => + BuildContextFortalezaRadiusMethods(this); +} + +class _$FortalezaSpaceStruct { + _$FortalezaSpaceStruct(); + + final SpaceToken space1 = const SpaceToken('space1'); + final SpaceToken space2 = const SpaceToken('space2'); + final SpaceToken space3 = const SpaceToken('space3'); + final SpaceToken space4 = const SpaceToken('space4'); + final SpaceToken space5 = const SpaceToken('space5'); + final SpaceToken space6 = const SpaceToken('space6'); + final SpaceToken space7 = const SpaceToken('space7'); + final SpaceToken space8 = const SpaceToken('space8'); + final SpaceToken space9 = const SpaceToken('space9'); +} + +final _structFortalezaSpace = _$FortalezaSpaceStruct(); + +Map _$FortalezaSpaceToMap(FortalezaSpace tokens) { + return { + _structFortalezaSpace.space1: tokens.space1, + _structFortalezaSpace.space2: tokens.space2, + _structFortalezaSpace.space3: tokens.space3, + _structFortalezaSpace.space4: tokens.space4, + _structFortalezaSpace.space5: tokens.space5, + _structFortalezaSpace.space6: tokens.space6, + _structFortalezaSpace.space7: tokens.space7, + _structFortalezaSpace.space8: tokens.space8, + _structFortalezaSpace.space9: tokens.space9, + }; +} + +extension $FortalezaSpaceSpacingSideUtilityX + on SpacingSideUtility { + T $space1() => ref(_structFortalezaSpace.space1); + T $space2() => ref(_structFortalezaSpace.space2); + T $space3() => ref(_structFortalezaSpace.space3); + T $space4() => ref(_structFortalezaSpace.space4); + T $space5() => ref(_structFortalezaSpace.space5); + T $space6() => ref(_structFortalezaSpace.space6); + T $space7() => ref(_structFortalezaSpace.space7); + T $space8() => ref(_structFortalezaSpace.space8); + T $space9() => ref(_structFortalezaSpace.space9); +} + +extension $FortalezaSpaceGapUtilityX on GapUtility { + T $space1() => ref(_structFortalezaSpace.space1); + T $space2() => ref(_structFortalezaSpace.space2); + T $space3() => ref(_structFortalezaSpace.space3); + T $space4() => ref(_structFortalezaSpace.space4); + T $space5() => ref(_structFortalezaSpace.space5); + T $space6() => ref(_structFortalezaSpace.space6); + T $space7() => ref(_structFortalezaSpace.space7); + T $space8() => ref(_structFortalezaSpace.space8); + T $space9() => ref(_structFortalezaSpace.space9); +} + +class BuildContextFortalezaSpaceMethods { + const BuildContextFortalezaSpaceMethods(this.context); + + final BuildContext context; + double space1() => _structFortalezaSpace.space1.resolve(context); + double space2() => _structFortalezaSpace.space2.resolve(context); + double space3() => _structFortalezaSpace.space3.resolve(context); + double space4() => _structFortalezaSpace.space4.resolve(context); + double space5() => _structFortalezaSpace.space5.resolve(context); + double space6() => _structFortalezaSpace.space6.resolve(context); + double space7() => _structFortalezaSpace.space7.resolve(context); + double space8() => _structFortalezaSpace.space8.resolve(context); + double space9() => _structFortalezaSpace.space9.resolve(context); +} + +extension $BuildContextFortalezaSpaceX on BuildContext { + BuildContextFortalezaSpaceMethods get $space => + BuildContextFortalezaSpaceMethods(this); +} + +class _$FortalezaTextStyleStruct { + _$FortalezaTextStyleStruct(); + + final TextStyleToken text1 = const TextStyleToken('text1'); + final TextStyleToken text2 = const TextStyleToken('text2'); + final TextStyleToken text3 = const TextStyleToken('text3'); + final TextStyleToken text4 = const TextStyleToken('text4'); + final TextStyleToken text5 = const TextStyleToken('text5'); + final TextStyleToken text6 = const TextStyleToken('text6'); + final TextStyleToken text7 = const TextStyleToken('text7'); + final TextStyleToken text8 = const TextStyleToken('text8'); + final TextStyleToken text9 = const TextStyleToken('text9'); +} + +final _structFortalezaTextStyle = _$FortalezaTextStyleStruct(); + +Map _$FortalezaTextStyleToMap( + FortalezaTextStyle tokens) { + return { + _structFortalezaTextStyle.text1: tokens.text1, + _structFortalezaTextStyle.text2: tokens.text2, + _structFortalezaTextStyle.text3: tokens.text3, + _structFortalezaTextStyle.text4: tokens.text4, + _structFortalezaTextStyle.text5: tokens.text5, + _structFortalezaTextStyle.text6: tokens.text6, + _structFortalezaTextStyle.text7: tokens.text7, + _structFortalezaTextStyle.text8: tokens.text8, + _structFortalezaTextStyle.text9: tokens.text9, + }; +} + +extension $FortalezaTextStyleTextStyleUtilityX + on TextStyleUtility { + T $text1() => ref(_structFortalezaTextStyle.text1); + T $text2() => ref(_structFortalezaTextStyle.text2); + T $text3() => ref(_structFortalezaTextStyle.text3); + T $text4() => ref(_structFortalezaTextStyle.text4); + T $text5() => ref(_structFortalezaTextStyle.text5); + T $text6() => ref(_structFortalezaTextStyle.text6); + T $text7() => ref(_structFortalezaTextStyle.text7); + T $text8() => ref(_structFortalezaTextStyle.text8); + T $text9() => ref(_structFortalezaTextStyle.text9); +} + +class BuildContextFortalezaTextStyleMethods { + const BuildContextFortalezaTextStyleMethods(this.context); + + final BuildContext context; + TextStyle text1() => _structFortalezaTextStyle.text1.resolve(context); + TextStyle text2() => _structFortalezaTextStyle.text2.resolve(context); + TextStyle text3() => _structFortalezaTextStyle.text3.resolve(context); + TextStyle text4() => _structFortalezaTextStyle.text4.resolve(context); + TextStyle text5() => _structFortalezaTextStyle.text5.resolve(context); + TextStyle text6() => _structFortalezaTextStyle.text6.resolve(context); + TextStyle text7() => _structFortalezaTextStyle.text7.resolve(context); + TextStyle text8() => _structFortalezaTextStyle.text8.resolve(context); + TextStyle text9() => _structFortalezaTextStyle.text9.resolve(context); +} + +extension $BuildContextFortalezaTextStyleX on BuildContext { + BuildContextFortalezaTextStyleMethods get $textStyle => + BuildContextFortalezaTextStyleMethods(this); +} diff --git a/packages/remix/lib/themes/fortaleza.dart b/packages/remix/lib/themes/fortaleza.dart new file mode 100644 index 000000000..b423a0ac0 --- /dev/null +++ b/packages/remix/lib/themes/fortaleza.dart @@ -0,0 +1,26 @@ +library remix.fortaleza; + +export '../src/themes/fortaleza/components/accordion_theme.dart'; +export '../src/themes/fortaleza/components/avatar_theme.dart'; +export '../src/themes/fortaleza/components/badge_theme.dart'; +export '../src/themes/fortaleza/components/button_theme.dart'; +export '../src/themes/fortaleza/components/callout_theme.dart'; +export '../src/themes/fortaleza/components/card_theme.dart'; +export '../src/themes/fortaleza/components/checkbox_theme.dart'; +export '../src/themes/fortaleza/components/chip_theme.dart'; +export '../src/themes/fortaleza/components/components.dart'; +export '../src/themes/fortaleza/components/dialog_theme.dart'; +export '../src/themes/fortaleza/components/divider_theme.dart'; +export '../src/themes/fortaleza/components/icon_button_theme.dart'; +export '../src/themes/fortaleza/components/menu_item_theme.dart'; +export '../src/themes/fortaleza/components/progress_theme.dart'; +export '../src/themes/fortaleza/components/radio_theme.dart'; +export '../src/themes/fortaleza/components/scaffold_theme.dart'; +export '../src/themes/fortaleza/components/segmented_control_theme.dart'; +export '../src/themes/fortaleza/components/select_theme.dart'; +export '../src/themes/fortaleza/components/slider_theme.dart'; +export '../src/themes/fortaleza/components/spinner_theme.dart'; +export '../src/themes/fortaleza/components/switch_theme.dart'; +export '../src/themes/fortaleza/components/textfield_theme.dart'; +export '../src/themes/fortaleza/components/toast_theme.dart'; +export '../src/themes/fortaleza/tokens.dart'; From 1d9a631cf9c36cc56115576c51155236ed295d55 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:59:16 -0300 Subject: [PATCH 09/30] remove unused classes --- .../lib/src/helpers/builder_utils.dart | 13 ------------- .../mix_generator/lib/src/helpers/field_info.dart | 6 ------ 2 files changed, 19 deletions(-) diff --git a/packages/mix_generator/lib/src/helpers/builder_utils.dart b/packages/mix_generator/lib/src/helpers/builder_utils.dart index 5e29589c2..9e901c490 100644 --- a/packages/mix_generator/lib/src/helpers/builder_utils.dart +++ b/packages/mix_generator/lib/src/helpers/builder_utils.dart @@ -131,19 +131,6 @@ extension EnumElementX on EnumElement { } } -class TokenAnnotationContext extends AnnotationContext { - final Object? type; - - TokenAnnotationContext({ - required super.element, - required this.type, - }); - - String get name => element.name; - - String get generatedName => element.generatedName; -} - extension ClassElementX on ClassElement { bool get isConst => unnamedConstructor?.isConst ?? false; diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index a095a1b1a..4b0827f88 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -319,12 +319,6 @@ class ClassBuilderContext { constructor.parameters.map(ParameterInfo.ofElement).toList(); } - // List get fields { - // // if (_fieldsCache != null) return _fieldsCache!; - - // return classElement.fields.map((e) => FieldInfo.ofElement(e)).toList(); - // } - bool get hasDiagnosticable => classElement.allSupertypes.any((e) => e.element.name == 'Diagnosticable'); From 2313745a2c1f71ec5ef85f9c11066643902a31dd Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:58:56 -0300 Subject: [PATCH 10/30] create a test for theme --- packages/remix/test/app/remix_app_test.dart | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 packages/remix/test/app/remix_app_test.dart diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart new file mode 100644 index 000000000..96f8b4687 --- /dev/null +++ b/packages/remix/test/app/remix_app_test.dart @@ -0,0 +1,73 @@ +import 'dart:ui'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mix/mix.dart'; +import 'package:remix/remix.dart'; + +final _mockedTheme = MixThemeData( + colors: {const ColorToken('color'): const Color(0xFF000000)}, + spaces: {const SpaceToken('space'): 10}, + textStyles: {const TextStyleToken('text-style'): const TextStyle()}, + radii: {const RadiusToken('radius'): const Radius.circular(10)}, +); + +final _mockedTheme2 = MixThemeData( + colors: {const ColorToken('color_2'): const Color.fromARGB(255, 215, 60, 60)}, + spaces: {const SpaceToken('space_2'): 20}, + textStyles: {const TextStyleToken('text-style_2'): const TextStyle()}, + radii: {const RadiusToken('radius_2'): const Radius.circular(20)}, +); + +void main() { + testWidgets( + 'RemixApp should use the provided theme tokens when no dark theme is provided', + (WidgetTester tester) async { + for (final brightness in Brightness.values) { + await tester.pumpWidget( + MediaQuery( + data: MediaQueryData(platformBrightness: brightness), + child: RemixApp( + theme: RemixThemeData( + components: RemixComponentTheme.light(), + tokens: _mockedTheme, + ), + ), + ), + ); + final mixTheme = tester.firstWidget(find.byType(MixTheme)); + + expect(mixTheme.data, _mockedTheme); + } + }, + ); + + testWidgets( + 'RemixApp should use the specified theme when both themes are provided', + (WidgetTester tester) async { + for (final brightness in Brightness.values) { + await tester.pumpWidget( + MediaQuery( + data: MediaQueryData(platformBrightness: brightness), + child: RemixApp( + theme: RemixThemeData( + components: RemixComponentTheme.light(), + tokens: _mockedTheme, + ), + darkTheme: RemixThemeData( + components: RemixComponentTheme.dark(), + tokens: _mockedTheme2, + ), + ), + ), + ); + final mixTheme = tester.firstWidget(find.byType(MixTheme)); + + final expectedTheme = + brightness == Brightness.light ? _mockedTheme : _mockedTheme2; + + expect(mixTheme.data, expectedTheme); + } + }, + ); +} From a97a2aadb14ec08066424b94acb7db2648d17e9a Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:24:59 -0300 Subject: [PATCH 11/30] fixing the theme --- .../demo/lib/components/badge_use_case.dart | 5 +- .../remix/demo/lib/helpers/theme_addon.dart | 16 +- packages/remix/demo/lib/main.dart | 12 +- .../ephemeral/FlutterInputs.xcfilelist | 1067 +++++++++-------- .../remix/lib/src/core/theme/remix_theme.dart | 29 +- .../lib/src/themes/fortaleza/components.dart | 138 +++ .../fortaleza/components/avatar_theme.dart | 2 +- .../fortaleza/components/components.dart | 104 -- .../fortaleza/components/radio_theme.dart | 1 + .../remix/lib/src/themes/fortaleza/theme.dart | 22 +- packages/remix/lib/themes/fortaleza.dart | 3 +- packages/remix/test/app/remix_app_test.dart | 51 +- 12 files changed, 740 insertions(+), 710 deletions(-) create mode 100644 packages/remix/lib/src/themes/fortaleza/components.dart delete mode 100644 packages/remix/lib/src/themes/fortaleza/components/components.dart diff --git a/packages/remix/demo/lib/components/badge_use_case.dart b/packages/remix/demo/lib/components/badge_use_case.dart index 915edc472..fe2d093b8 100644 --- a/packages/remix/demo/lib/components/badge_use_case.dart +++ b/packages/remix/demo/lib/components/badge_use_case.dart @@ -1,3 +1,4 @@ +import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; import 'package:remix/themes/fortaleza.dart'; @@ -16,8 +17,8 @@ Widget buildAvatarUseCase(BuildContext context) { label: 'Label', initialValue: 'New', ), - variants: const [ - // context.knobs.variant(FortalezaBadgeStyle.variants), + variants: [ + context.knobs.variant(FortalezaBadgeStyle.variants), ], ), ), diff --git a/packages/remix/demo/lib/helpers/theme_addon.dart b/packages/remix/demo/lib/helpers/theme_addon.dart index ceb5bae05..2d20309ff 100644 --- a/packages/remix/demo/lib/helpers/theme_addon.dart +++ b/packages/remix/demo/lib/helpers/theme_addon.dart @@ -1,11 +1,7 @@ import 'package:remix/remix.dart'; -import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; -typedef ThemeMultiBrightness = ({ - RemixComponentTheme light, - RemixComponentTheme dark -}); +typedef ThemeMultiBrightness = ({RemixThemeData light, RemixThemeData dark}); class RemixComponentThemeAddon extends ThemeAddon { @override @@ -18,14 +14,8 @@ class RemixComponentThemeAddon extends ThemeAddon { themeBuilder: (context, themes, child) { return RemixApp( debugShowCheckedModeBanner: false, - darkTheme: RemixThemeData( - tokens: FortalezaTokens.dark().toThemeData(), - components: themes.dark, - ), - theme: RemixThemeData( - components: themes.light, - tokens: FortalezaTokens.light().toThemeData(), - ), + darkTheme: themes.dark, + theme: themes.light, home: child, ); }, diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 26916b7bb..7ded3a44c 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -45,18 +45,20 @@ class HotReload extends StatelessWidget { ), RemixComponentThemeAddon( themes: [ - const WidgetbookTheme( + WidgetbookTheme( name: 'Fortaleza', data: ( - dark: FortalezaComponentTheme.dark, - light: FortalezaComponentTheme.light, + light: FortalezaThemeData.light().toThemeData(), + dark: FortalezaThemeData.dark().toThemeData(), ), ), WidgetbookTheme( name: 'Base', data: ( - dark: RemixComponentTheme.dark(), - light: RemixComponentTheme.light(), + light: RemixThemeData.base(), + dark: RemixThemeData.base().copyWith( + components: RemixComponentTheme.dark(), + ), ), ), ], diff --git a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist index d7deed5e4..463d06f4e 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist +++ b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist @@ -1,28 +1,28 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-72.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/accessibility_issue.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checker_manager.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/checker_base.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/flex_overflow_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/image_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/input_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/minimum_tap_area_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/mixin.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/semantic_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/enums/buttons_alignment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/floating_action_buttons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/color_mode_simulation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/info_button.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/multi_value_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/slider_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/switch_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/test_environment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/testing_tools_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/testing_tools_wrapper.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_issue.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checker_manager.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/checker_base.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/flex_overflow_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/image_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/input_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/minimum_tap_area_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/mixin.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/semantic_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/enums/buttons_alignment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/floating_action_buttons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/color_mode_simulation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/info_button.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/multi_value_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/slider_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/switch_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/test_environment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_wrapper.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/analyzer-6.7.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.6.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.5.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/async.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/src/async_cache.dart @@ -106,7 +106,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/default.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/stopwatch.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/utils.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/code_builder-4.10.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/code_builder-4.10.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/collection.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/algorithms.dart @@ -132,8 +132,8 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/unmodifiable_wrappers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/wrappers.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/convert-3.1.2/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.6/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/convert-3.1.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.5/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/assets/CupertinoIcons.ttf /Users/lucasoliveira/.pub-cache/hosted/pub.dev/dart_style-2.3.7/LICENSE @@ -221,8 +221,8 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/theme.freezed.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/fake_async.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/lib/freezed_annotation.dart @@ -306,7 +306,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/src/leak_testing.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/src/matchers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/lints-4.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/logging-1.3.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/logging-1.2.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/macros-0.1.2-main.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/expect.dart @@ -508,7 +508,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/src/scaffolding/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/src/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/timing-1.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/typed_data-1.4.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/typed_data-1.3.2/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/src/vector_math_64/aabb2.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/src/vector_math_64/aabb3.dart @@ -546,182 +546,182 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web-1.1.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket-0.1.6/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Black.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Bold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Italic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Light.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-LightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Medium.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Regular.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Thin.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/logo.png -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/next.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/addons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/common.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/multi_addon_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/widgetbook_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/none_device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/widgetbook_theme.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/boolean_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_space.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hex_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hsl_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/number_text_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/rgb_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/date_time_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/duration_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_codec.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_type.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields_composable.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/list_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/string_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/integrations.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/boolean_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/double_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/int_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_extension.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/color_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/date_time_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/duration_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs_registry.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/list_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/string_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/base_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/desktop_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/mobile_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/responsive_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/component_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/expander_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/icons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/resolve_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/use_case_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/navigation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/nodes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_category.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_folder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_package.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_root.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_use_case.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_tile.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/search_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/widgets.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/experimental_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/bool_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/builder_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/color_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/const_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/double_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/duration_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/enum_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/int_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/single_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/story_args.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/string_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/experimental_badge.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/meta.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/scenario.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/story.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_config.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_parser.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router_delegate.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/routing.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/mobile_settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/nullable_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/default_app_builders.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_scope.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/themes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/widgetbook.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/safe_boundaries.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/use_case_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/workbench.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Black.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Bold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Italic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Light.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-LightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Medium.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Regular.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Thin.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/logo.png +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/next.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/addons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/common.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/multi_addon_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/widgetbook_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/none_device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/widgetbook_theme.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/boolean_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_space.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hex_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hsl_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/number_text_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/rgb_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/date_time_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/duration_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_codec.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_type.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields_composable.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/list_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/string_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/integrations.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/boolean_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/double_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/int_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_extension.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/color_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/date_time_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/duration_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs_registry.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/list_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/string_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/base_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/desktop_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/mobile_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/responsive_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/component_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/expander_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/icons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/resolve_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/use_case_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/navigation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/nodes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_category.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_folder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_package.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_root.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_use_case.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_tile.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/search_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/widgets.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/experimental_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/bool_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/builder_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/color_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/const_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/double_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/duration_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/enum_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/int_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/single_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/story_args.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/string_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/experimental_badge.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/meta.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/scenario.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/story.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_config.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_parser.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router_delegate.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/routing.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/mobile_settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/nullable_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/default_app_builders.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_scope.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/themes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/safe_boundaries.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/use_case_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/workbench.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/widgetbook.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addon_config.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addons_configs.dart @@ -730,333 +730,334 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/widgetbook_annotation.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_generator-3.9.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/yaml-3.1.2/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/mix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_data_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/shape_border_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/shape_border_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_directives.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_directives_impl.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/material_colors_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/enum/enum_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/enum/enum_util.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gap/gap_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gap/spacing_side_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/nested_style/nested_style_attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/nested_style/nested_style_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/curves.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/scalar_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/scalar_util.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/spacing_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/attributes_map.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/deprecation_notices.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/directive.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/mix_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/mix_provider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/style_mix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/style_widgets_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/helpers.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/styled_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/utility.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/gesture_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/interactive_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/mix_widget_state_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/mouse_region_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/widget_state_controller.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/build_context_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/compare_mixin.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/constants.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/deep_collection_equality.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/diagnostic_properties_builder_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/helper_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/iterable_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/mix_error.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/string_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/align_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/align_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/render_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/widget_modifiers_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/spec_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_directives_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/material/material_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/material/material_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/mix/mix_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/breakpoints_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/color_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/mix_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/radius_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/space_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/text_style_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/token_resolver.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/token_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_breakpoint_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_brightness_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_directionality_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_not_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_orientation_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_platform_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/variant_attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/widget_state_variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/widgets/pressable_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/lib/mix_annotations.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/lib/src/annotations.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/addons/icon_data_knob.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/accordion_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/avatar_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/badge_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/button_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/callout_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/card_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/checkbox_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/chip_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/dialog_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/divider_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/icon_button_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/menu_item_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/progress_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/radio_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/segmented_control_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/select_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/slider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/spinner_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/switch_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/textfield_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/toast_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/knob_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/string.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/theme_addon.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/use_case_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.directories.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/pubspec.yaml -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/remix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/app/remix_app.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/header/accordion_header.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/button/select_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/button/select_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/item/select_menu.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/item/select_menu_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_painter.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/attributes/attributes.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/attributes/attributes.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_layer.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/color_palette.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/color_utils.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/component_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/context_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/utility_extension.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/remix_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/remix_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/color_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/radius_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/space_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/text_style_tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/mix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_data_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/shape_border_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/shape_border_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_directives.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_directives_impl.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/material_colors_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/enum/enum_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/enum/enum_util.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gap/gap_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gap/spacing_side_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/nested_style/nested_style_attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/nested_style/nested_style_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/curves.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/scalar_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/scalar_util.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/spacing_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/attributes_map.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/deprecation_notices.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/directive.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/mix_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/mix_provider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/style_mix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/style_widgets_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/helpers.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/styled_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/utility.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/gesture_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/interactive_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/mix_widget_state_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/mouse_region_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/widget_state_controller.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/build_context_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/compare_mixin.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/constants.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/deep_collection_equality.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/diagnostic_properties_builder_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/helper_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/iterable_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/mix_error.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/string_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/align_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/align_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/render_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/widget_modifiers_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/spec_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_directives_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/material/material_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/material/material_tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/mix/mix_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/breakpoints_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/color_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/mix_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/radius_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/space_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/text_style_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/token_resolver.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/token_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_breakpoint_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_brightness_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_directionality_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_not_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_orientation_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_platform_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/variant_attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/widget_state_variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/widgets/pressable_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/lib/mix_annotations.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/lib/src/annotations.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/addons/icon_data_knob.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/accordion_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/avatar_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/badge_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/button_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/callout_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/card_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/checkbox_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/chip_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/dialog_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/divider_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/icon_button_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/menu_item_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/progress_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/radio_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/segmented_control_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/select_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/slider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/spinner_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/switch_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/textfield_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/toast_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/knob_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/string.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/theme_addon.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/use_case_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.directories.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/pubspec.yaml +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/remix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/header/accordion_header.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/button/select_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/button/select_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/item/select_menu.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/item/select_menu_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_painter.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/attributes/attributes.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/attributes/attributes.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_layer.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/remix_app.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/theme/component.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/theme/remix_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/color_palette.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/color_utils.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/component_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/context_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/utility_extension.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/tokens.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/themes/fortaleza.dart /Users/lucasoliveira/fvm/versions/stable/bin/cache/artifacts/material_fonts/MaterialIcons-Regular.otf /Users/lucasoliveira/fvm/versions/stable/bin/cache/dart-sdk/pkg/_macros/LICENSE /Users/lucasoliveira/fvm/versions/stable/bin/cache/pkg/sky_engine/LICENSE diff --git a/packages/remix/lib/src/core/theme/remix_theme.dart b/packages/remix/lib/src/core/theme/remix_theme.dart index 5bd02234e..2dbe5deed 100644 --- a/packages/remix/lib/src/core/theme/remix_theme.dart +++ b/packages/remix/lib/src/core/theme/remix_theme.dart @@ -15,6 +15,16 @@ class RemixThemeData { tokens: const MixThemeData.empty(), ); + RemixThemeData copyWith({ + RemixComponentTheme? components, + MixThemeData? tokens, + }) { + return RemixThemeData( + components: components ?? this.components, + tokens: tokens ?? this.tokens, + ); + } + @override bool operator ==(Object other) { if (identical(this, other)) return true; @@ -43,8 +53,8 @@ class RemixTheme extends StatelessWidget { }); static RemixThemeData of(BuildContext context) { - final _RemixThemeInherited? provider = - context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); + final RemixThemeInherited? provider = + context.dependOnInheritedWidgetOfExactType(); if (provider == null) { throw FlutterError( @@ -61,7 +71,7 @@ class RemixTheme extends StatelessWidget { static RemixThemeData? maybeOf(BuildContext context) { return context - .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() + .dependOnInheritedWidgetOfExactType() ?.data; } @@ -97,18 +107,23 @@ class RemixTheme extends StatelessWidget { return MixTheme( data: tokens, - child: _RemixThemeInherited(data: theme, child: child), + child: RemixThemeInherited(data: theme, child: child), ); } } -class _RemixThemeInherited extends InheritedWidget { - const _RemixThemeInherited({required this.data, required super.child}); +@visibleForTesting +class RemixThemeInherited extends InheritedWidget { + const RemixThemeInherited({ + super.key, + required this.data, + required super.child, + }); final RemixThemeData data; @override - bool updateShouldNotify(_RemixThemeInherited oldWidget) { + bool updateShouldNotify(RemixThemeInherited oldWidget) { return data != oldWidget.data; } } diff --git a/packages/remix/lib/src/themes/fortaleza/components.dart b/packages/remix/lib/src/themes/fortaleza/components.dart new file mode 100644 index 000000000..d50a9cf05 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/components.dart @@ -0,0 +1,138 @@ +import '../../core/theme/component.dart'; +import 'components/accordion_theme.dart'; +import 'components/avatar_theme.dart'; +import 'components/badge_theme.dart'; +import 'components/button_theme.dart'; +import 'components/callout_theme.dart'; +import 'components/card_theme.dart'; +import 'components/checkbox_theme.dart'; +import 'components/chip_theme.dart'; +import 'components/dialog_theme.dart'; +import 'components/divider_theme.dart'; +import 'components/icon_button_theme.dart'; +import 'components/menu_item_theme.dart'; +import 'components/progress_theme.dart'; +import 'components/radio_theme.dart'; +import 'components/scaffold_theme.dart'; +import 'components/segmented_control_theme.dart'; +import 'components/select_theme.dart'; +import 'components/slider_theme.dart'; +import 'components/spinner_theme.dart'; +import 'components/switch_theme.dart'; +import 'components/textfield_theme.dart'; +import 'components/toast_theme.dart'; + +class FortalezaComponentTheme extends RemixComponentTheme { + const FortalezaComponentTheme({ + required super.accordion, + required super.avatar, + required super.badge, + required super.button, + required super.callout, + required super.card, + required super.checkbox, + required super.dialog, + required super.chip, + required super.divider, + required super.iconButton, + required super.menuItem, + required super.progress, + required super.radio, + required super.scaffold, + required super.segmentedControl, + required super.select, + required super.spinner, + required super.switchComponent, + required super.textField, + required super.toast, + required super.slider, + }); + + factory FortalezaComponentTheme.light() { + return const FortalezaComponentTheme( + accordion: FortalezaAccordionStyle(), + avatar: FortalezaAvatarStyle(), + badge: FortalezaBadgeStyle(), + button: FortalezaButtonStyle(), + callout: FortalezaCalloutStyle(), + card: FortalezaCardStyle(), + checkbox: FortalezaCheckboxStyle(), + dialog: FortalezaDialogStyle(), + chip: FortalezaChipStyle(), + divider: FortalezaDividerStyle(), + iconButton: FortalezaIconButtonStyle(), + menuItem: FortalezaMenuItemStyle(), + progress: FortalezaProgressStyle(), + radio: FortalezaRadioStyle(), + scaffold: FortalezaScaffoldStyle(), + segmentedControl: FortalezaSegmentedControlStyle(), + select: FortalezaSelectStyle(), + spinner: FortalezaSpinnerStyle(), + switchComponent: FortalezaSwitchStyle(), + textField: FortalezaTextFieldStyle(), + toast: FortalezaToastStyle(), + slider: FortalezaSliderStyle(), + ); + } + + factory FortalezaComponentTheme.dark() { + return FortalezaComponentTheme.light().copyWith( + avatar: const FortalezaDarkAvatarStyle(), + badge: const FortalezaDarkBadgeStyle(), + segmentedControl: const FortalezaDarkSegmentedControlStyle(), + select: const FortalezaDarkSelectStyle(), + switchComponent: const FortalezaDarkSwitchStyle(), + ); + } + + @override + FortalezaComponentTheme copyWith({ + covariant FortalezaAccordionStyle? accordion, + covariant FortalezaAvatarStyle? avatar, + covariant FortalezaBadgeStyle? badge, + covariant FortalezaButtonStyle? button, + covariant FortalezaCalloutStyle? callout, + covariant FortalezaCardStyle? card, + covariant FortalezaCheckboxStyle? checkbox, + covariant FortalezaDialogStyle? dialog, + covariant FortalezaChipStyle? chip, + covariant FortalezaDividerStyle? divider, + covariant FortalezaIconButtonStyle? iconButton, + covariant FortalezaMenuItemStyle? menuItem, + covariant FortalezaProgressStyle? progress, + covariant FortalezaRadioStyle? radio, + covariant FortalezaScaffoldStyle? scaffold, + covariant FortalezaSegmentedControlStyle? segmentedControl, + covariant FortalezaSelectStyle? select, + covariant FortalezaSpinnerStyle? spinner, + covariant FortalezaSwitchStyle? switchComponent, + covariant FortalezaTextFieldStyle? textField, + covariant FortalezaToastStyle? toast, + covariant FortalezaSliderStyle? slider, + }) { + return FortalezaComponentTheme( + accordion: accordion ?? this.accordion, + avatar: avatar ?? this.avatar, + badge: badge ?? this.badge, + button: button ?? this.button, + callout: callout ?? this.callout, + card: card ?? this.card, + checkbox: checkbox ?? this.checkbox, + dialog: dialog ?? this.dialog, + chip: chip ?? this.chip, + divider: divider ?? this.divider, + iconButton: iconButton ?? this.iconButton, + menuItem: menuItem ?? this.menuItem, + progress: progress ?? this.progress, + radio: radio ?? this.radio, + scaffold: scaffold ?? this.scaffold, + segmentedControl: segmentedControl ?? this.segmentedControl, + select: select ?? this.select, + spinner: spinner ?? this.spinner, + switchComponent: switchComponent ?? this.switchComponent, + textField: textField ?? this.textField, + toast: toast ?? this.toast, + slider: slider ?? this.slider, + ); + } +} diff --git a/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart index 07e07ce0f..a73d137d2 100644 --- a/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart @@ -1,7 +1,7 @@ import 'package:mix/mix.dart'; -import '../../../../themes/fortaleza.dart'; import '../../../components/avatar/avatar.dart'; +import '../tokens.dart'; class FortalezaAvatarStyle extends AvatarStyle { static const soft = Variant('avatar.soft'); diff --git a/packages/remix/lib/src/themes/fortaleza/components/components.dart b/packages/remix/lib/src/themes/fortaleza/components/components.dart deleted file mode 100644 index 60ef3d53b..000000000 --- a/packages/remix/lib/src/themes/fortaleza/components/components.dart +++ /dev/null @@ -1,104 +0,0 @@ -import '../../../components/accordion/accordion.dart'; -import '../../../components/avatar/avatar.dart'; -import '../../../components/badge/badge.dart'; -import '../../../components/button/button.dart'; -import '../../../components/callout/callout.dart'; -import '../../../components/card/card.dart'; -import '../../../components/checkbox/checkbox.dart'; -import '../../../components/chip/chip.dart'; -import '../../../components/dialog/dialog.dart'; -import '../../../components/divider/divider.dart'; -import '../../../components/icon_button/icon_button.dart'; -import '../../../components/menu_item/menu_item.dart'; -import '../../../components/progress/progress.dart'; -import '../../../components/radio/radio.dart'; -import '../../../components/scaffold/scaffold.dart'; -import '../../../components/segmented_control/segmented_control.dart'; -import '../../../components/select/select.dart'; -import '../../../components/slider/slider.dart'; -import '../../../components/spinner/spinner.dart'; -import '../../../components/switch/switch.dart'; -import '../../../components/textfield/textfield.dart'; -import '../../../components/toast/toast.dart'; -import '../../../core/theme/component.dart'; -import 'accordion_theme.dart'; -import 'avatar_theme.dart'; -import 'badge_theme.dart'; -import 'button_theme.dart'; -import 'callout_theme.dart'; -import 'card_theme.dart'; -import 'checkbox_theme.dart'; -import 'chip_theme.dart'; -import 'dialog_theme.dart'; -import 'divider_theme.dart'; -import 'icon_button_theme.dart'; -import 'menu_item_theme.dart'; -import 'progress_theme.dart'; -import 'radio_theme.dart'; -import 'scaffold_theme.dart'; -import 'segmented_control_theme.dart'; -import 'select_theme.dart'; -import 'slider_theme.dart'; -import 'spinner_theme.dart'; -import 'switch_theme.dart'; -import 'textfield_theme.dart'; -import 'toast_theme.dart'; - -class FortalezaComponentTheme extends RemixComponentTheme { - static const FortalezaComponentTheme light = FortalezaComponentTheme(); - static const FortalezaComponentTheme dark = FortalezaComponentTheme( - avatar: FortalezaDarkAvatarStyle(), - badge: FortalezaDarkBadgeStyle(), - segmentedControl: FortalezaDarkSegmentedControlStyle(), - select: FortalezaDarkSelectStyle(), - switchComponent: FortalezaDarkSwitchStyle(), - ); - - const FortalezaComponentTheme({ - AccordionStyle? accordion, - AvatarStyle? avatar, - BadgeStyle? badge, - ButtonStyle? button, - CalloutStyle? callout, - CardStyle? card, - CheckboxStyle? checkbox, - DialogStyle? dialog, - ChipStyle? chip, - DividerStyle? divider, - IconButtonStyle? iconButton, - MenuItemStyle? menuItem, - ProgressStyle? progress, - RadioStyle? radio, - ScaffoldStyle? scaffold, - SegmentedControlStyle? segmentedControl, - SelectStyle? select, - SpinnerStyle? spinner, - SwitchStyle? switchComponent, - TextFieldStyle? textField, - ToastStyle? toast, - SliderStyle? slider, - }) : super( - accordion: const FortalezaAccordionStyle(), - avatar: const FortalezaAvatarStyle(), - badge: const FortalezaBadgeStyle(), - button: const FortalezaButtonStyle(), - callout: const FortalezaCalloutStyle(), - card: const FortalezaCardStyle(), - checkbox: const FortalezaCheckboxStyle(), - dialog: const FortalezaDialogStyle(), - chip: const FortalezaChipStyle(), - divider: const FortalezaDividerStyle(), - iconButton: const FortalezaIconButtonStyle(), - menuItem: const FortalezaMenuItemStyle(), - progress: const FortalezaProgressStyle(), - radio: const FortalezaRadioStyle(), - scaffold: const FortalezaScaffoldStyle(), - segmentedControl: const FortalezaSegmentedControlStyle(), - select: const FortalezaSelectStyle(), - spinner: const FortalezaSpinnerStyle(), - switchComponent: const FortalezaSwitchStyle(), - textField: const FortalezaTextFieldStyle(), - toast: const FortalezaToastStyle(), - slider: const FortalezaSliderStyle(), - ); -} diff --git a/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart index d42ffc972..972cda5b5 100644 --- a/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart @@ -1,3 +1,4 @@ +import 'package:flutter/animation.dart'; import 'package:mix/mix.dart'; import '../../../components/radio/radio.dart'; diff --git a/packages/remix/lib/src/themes/fortaleza/theme.dart b/packages/remix/lib/src/themes/fortaleza/theme.dart index 3317ddf97..7a8e80ba0 100644 --- a/packages/remix/lib/src/themes/fortaleza/theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/theme.dart @@ -1,20 +1,24 @@ import '../../core/theme/remix_theme.dart'; -import 'components/components.dart'; +import 'components.dart'; import 'tokens.dart'; class FortalezaThemeData { final FortalezaComponentTheme components; final FortalezaTokens tokens; - static final FortalezaThemeData light = FortalezaThemeData( - components: FortalezaComponentTheme.light, - tokens: FortalezaTokens.light(), - ); + factory FortalezaThemeData.light() { + return FortalezaThemeData( + components: FortalezaComponentTheme.light(), + tokens: FortalezaTokens.light(), + ); + } - static final FortalezaThemeData dark = FortalezaThemeData( - components: FortalezaComponentTheme.dark, - tokens: FortalezaTokens.dark(), - ); + factory FortalezaThemeData.dark() { + return FortalezaThemeData( + components: FortalezaComponentTheme.dark(), + tokens: FortalezaTokens.dark(), + ); + } const FortalezaThemeData({required this.components, required this.tokens}); diff --git a/packages/remix/lib/themes/fortaleza.dart b/packages/remix/lib/themes/fortaleza.dart index b423a0ac0..d3bb3c663 100644 --- a/packages/remix/lib/themes/fortaleza.dart +++ b/packages/remix/lib/themes/fortaleza.dart @@ -1,5 +1,6 @@ library remix.fortaleza; +export '../src/themes/fortaleza/components.dart'; export '../src/themes/fortaleza/components/accordion_theme.dart'; export '../src/themes/fortaleza/components/avatar_theme.dart'; export '../src/themes/fortaleza/components/badge_theme.dart'; @@ -8,7 +9,6 @@ export '../src/themes/fortaleza/components/callout_theme.dart'; export '../src/themes/fortaleza/components/card_theme.dart'; export '../src/themes/fortaleza/components/checkbox_theme.dart'; export '../src/themes/fortaleza/components/chip_theme.dart'; -export '../src/themes/fortaleza/components/components.dart'; export '../src/themes/fortaleza/components/dialog_theme.dart'; export '../src/themes/fortaleza/components/divider_theme.dart'; export '../src/themes/fortaleza/components/icon_button_theme.dart'; @@ -23,4 +23,5 @@ export '../src/themes/fortaleza/components/spinner_theme.dart'; export '../src/themes/fortaleza/components/switch_theme.dart'; export '../src/themes/fortaleza/components/textfield_theme.dart'; export '../src/themes/fortaleza/components/toast_theme.dart'; +export '../src/themes/fortaleza/theme.dart'; export '../src/themes/fortaleza/tokens.dart'; diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart index 96f8b4687..86dc6b273 100644 --- a/packages/remix/test/app/remix_app_test.dart +++ b/packages/remix/test/app/remix_app_test.dart @@ -2,42 +2,26 @@ import 'dart:ui'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mix/mix.dart'; import 'package:remix/remix.dart'; - -final _mockedTheme = MixThemeData( - colors: {const ColorToken('color'): const Color(0xFF000000)}, - spaces: {const SpaceToken('space'): 10}, - textStyles: {const TextStyleToken('text-style'): const TextStyle()}, - radii: {const RadiusToken('radius'): const Radius.circular(10)}, -); - -final _mockedTheme2 = MixThemeData( - colors: {const ColorToken('color_2'): const Color.fromARGB(255, 215, 60, 60)}, - spaces: {const SpaceToken('space_2'): 20}, - textStyles: {const TextStyleToken('text-style_2'): const TextStyle()}, - radii: {const RadiusToken('radius_2'): const Radius.circular(20)}, -); +import 'package:remix/themes/fortaleza.dart'; void main() { testWidgets( 'RemixApp should use the provided theme tokens when no dark theme is provided', (WidgetTester tester) async { + final theme = FortalezaThemeData.light().toThemeData(); + for (final brightness in Brightness.values) { await tester.pumpWidget( MediaQuery( data: MediaQueryData(platformBrightness: brightness), - child: RemixApp( - theme: RemixThemeData( - components: RemixComponentTheme.light(), - tokens: _mockedTheme, - ), - ), + child: RemixApp(theme: theme), ), ); - final mixTheme = tester.firstWidget(find.byType(MixTheme)); + final remixTheme = tester + .firstWidget(find.byType(RemixThemeInherited)); - expect(mixTheme.data, _mockedTheme); + expect(remixTheme.data, theme); } }, ); @@ -50,23 +34,20 @@ void main() { MediaQuery( data: MediaQueryData(platformBrightness: brightness), child: RemixApp( - theme: RemixThemeData( - components: RemixComponentTheme.light(), - tokens: _mockedTheme, - ), - darkTheme: RemixThemeData( - components: RemixComponentTheme.dark(), - tokens: _mockedTheme2, - ), + theme: FortalezaThemeData.light().toThemeData(), + darkTheme: FortalezaThemeData.dark().toThemeData(), ), ), ); - final mixTheme = tester.firstWidget(find.byType(MixTheme)); + final remixTheme = tester + .firstWidget(find.byType(RemixThemeInherited)); - final expectedTheme = - brightness == Brightness.light ? _mockedTheme : _mockedTheme2; + final expectedTheme = (brightness == Brightness.light + ? FortalezaThemeData.light() + : FortalezaThemeData.dark()) + .toThemeData(); - expect(mixTheme.data, expectedTheme); + expect(remixTheme.data, expectedTheme); } }, ); From b9a5f9f6d324367e7e5b75c1c15b410a295499e8 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:33:41 -0300 Subject: [PATCH 12/30] generate color token --- packages/remix/lib/src/theme.dart | 43 +++++++++++++++++++++++++++++ packages/remix/lib/src/theme.g.dart | 38 +++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 packages/remix/lib/src/theme.dart create mode 100644 packages/remix/lib/src/theme.g.dart diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart new file mode 100644 index 000000000..ad9308fd2 --- /dev/null +++ b/packages/remix/lib/src/theme.dart @@ -0,0 +1,43 @@ +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +part 'theme.g.dart'; + +@MixableToken() +class ColorTokens { + final Color primary; + final Color secondary; + final Color tertiary; + + const ColorTokens({ + required this.primary, + required this.secondary, + required this.tertiary, + }); + + Map get data => _$TokensToData(this); +} + +@MixableToken() +class TextTokens { + final TextStyle h1; + final TextStyle h2; + final TextStyle h3; + final TextStyle body; + + const TextTokens({ + required this.h1, + required this.h2, + required this.h3, + required this.body, + }); +} + +class ColorStruct { + final Color p10; + final Color p20; + final Color p30; + + const ColorStruct(this.p10, this.p20, this.p30); +} diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart new file mode 100644 index 000000000..f79df21c1 --- /dev/null +++ b/packages/remix/lib/src/theme.g.dart @@ -0,0 +1,38 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'theme.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$ColorTokensStruct { + const _$ColorTokensStruct(); + + final ColorToken primary = const ColorToken('primary'); + + final ColorToken secondary = const ColorToken('secondary'); + + final ColorToken tertiary = const ColorToken('tertiary'); +} + +const _tokens = _$ColorTokensStruct(); +Map _$TokensToData(ColorTokens tokens) { + return { + _tokens.primary: tokens.primary, + _tokens.secondary: tokens.secondary, + _tokens.tertiary: tokens.tertiary, + }; +} + +extension $ColorTokensX on ColorUtility { + T primary() => ref(_tokens.primary); + T secondary() => ref(_tokens.secondary); + T tertiary() => ref(_tokens.tertiary); +} + +extension $BuildContextColorTokensX on BuildContext { + Color primary() => _tokens.primary.resolve(this); + Color secondary() => _tokens.secondary.resolve(this); + Color tertiary() => _tokens.tertiary.resolve(this); +} From 2557bf849c1aa8304ed607ac86e1ac6ee3ad3926 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Wed, 13 Nov 2024 20:01:09 -0300 Subject: [PATCH 13/30] checkpoint1 --- packages/remix/lib/src/theme.dart | 40 ++++++++-- packages/remix/lib/src/theme.g.dart | 117 ++++++++++++++++++++++++---- 2 files changed, 136 insertions(+), 21 deletions(-) diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart index ad9308fd2..20b2981d6 100644 --- a/packages/remix/lib/src/theme.dart +++ b/packages/remix/lib/src/theme.dart @@ -4,7 +4,7 @@ import 'package:mix_annotations/mix_annotations.dart'; part 'theme.g.dart'; -@MixableToken() +@MixableToken(Color) class ColorTokens { final Color primary; final Color secondary; @@ -16,10 +16,10 @@ class ColorTokens { required this.tertiary, }); - Map get data => _$TokensToData(this); + Map get data => _$ColorTokensToData(this); } -@MixableToken() +@MixableToken(TextStyle) class TextTokens { final TextStyle h1; final TextStyle h2; @@ -32,12 +32,36 @@ class TextTokens { required this.h3, required this.body, }); + + Map get data => _$TextTokensToData(this); +} + +@MixableToken(Radius) +class RadiusTokens { + final Radius small; + final Radius medium; + final Radius large; + + const RadiusTokens({ + required this.small, + required this.medium, + required this.large, + }); + + Map get data => _$RadiusTokensToData(this); } -class ColorStruct { - final Color p10; - final Color p20; - final Color p30; +@MixableToken(double) +class SpaceTokens { + final double p8; + final double p16; + final double p24; + + const SpaceTokens({ + required this.p8, + required this.p16, + required this.p24, + }); - const ColorStruct(this.p10, this.p20, this.p30); + Map get data => _$SpaceTokensToData(this); } diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart index f79df21c1..fe52683b4 100644 --- a/packages/remix/lib/src/theme.g.dart +++ b/packages/remix/lib/src/theme.g.dart @@ -10,29 +10,120 @@ class _$ColorTokensStruct { const _$ColorTokensStruct(); final ColorToken primary = const ColorToken('primary'); - final ColorToken secondary = const ColorToken('secondary'); - final ColorToken tertiary = const ColorToken('tertiary'); } -const _tokens = _$ColorTokensStruct(); -Map _$TokensToData(ColorTokens tokens) { +const _structColorTokens = _$ColorTokensStruct(); +Map _$ColorTokensToData(ColorTokens tokens) { return { - _tokens.primary: tokens.primary, - _tokens.secondary: tokens.secondary, - _tokens.tertiary: tokens.tertiary, + _structColorTokens.primary: tokens.primary, + _structColorTokens.secondary: tokens.secondary, + _structColorTokens.tertiary: tokens.tertiary, }; } extension $ColorTokensX on ColorUtility { - T primary() => ref(_tokens.primary); - T secondary() => ref(_tokens.secondary); - T tertiary() => ref(_tokens.tertiary); + T primary() => ref(_structColorTokens.primary); + T secondary() => ref(_structColorTokens.secondary); + T tertiary() => ref(_structColorTokens.tertiary); } extension $BuildContextColorTokensX on BuildContext { - Color primary() => _tokens.primary.resolve(this); - Color secondary() => _tokens.secondary.resolve(this); - Color tertiary() => _tokens.tertiary.resolve(this); + Color primary() => _structColorTokens.primary.resolve(this); + Color secondary() => _structColorTokens.secondary.resolve(this); + Color tertiary() => _structColorTokens.tertiary.resolve(this); +} + +class _$TextTokensStruct { + const _$TextTokensStruct(); + + final TextStyleToken h1 = const TextStyleToken('h1'); + final TextStyleToken h2 = const TextStyleToken('h2'); + final TextStyleToken h3 = const TextStyleToken('h3'); + final TextStyleToken body = const TextStyleToken('body'); +} + +const _structTextTokens = _$TextTokensStruct(); +Map _$TextTokensToData(TextTokens tokens) { + return { + _structTextTokens.h1: tokens.h1, + _structTextTokens.h2: tokens.h2, + _structTextTokens.h3: tokens.h3, + _structTextTokens.body: tokens.body, + }; +} + +extension $TextTokensX on TextStyleUtility { + T h1() => ref(_structTextTokens.h1); + T h2() => ref(_structTextTokens.h2); + T h3() => ref(_structTextTokens.h3); + T body() => ref(_structTextTokens.body); +} + +extension $BuildContextTextTokensX on BuildContext { + TextStyle h1() => _structTextTokens.h1.resolve(this); + TextStyle h2() => _structTextTokens.h2.resolve(this); + TextStyle h3() => _structTextTokens.h3.resolve(this); + TextStyle body() => _structTextTokens.body.resolve(this); +} + +class _$RadiusTokensStruct { + const _$RadiusTokensStruct(); + + final RadiusToken small = const RadiusToken('small'); + final RadiusToken medium = const RadiusToken('medium'); + final RadiusToken large = const RadiusToken('large'); +} + +const _structRadiusTokens = _$RadiusTokensStruct(); +Map _$RadiusTokensToData(RadiusTokens tokens) { + return { + _structRadiusTokens.small: tokens.small, + _structRadiusTokens.medium: tokens.medium, + _structRadiusTokens.large: tokens.large, + }; +} + +extension $RadiusTokensX on RadiusUtility { + T small() => ref(_structRadiusTokens.small); + T medium() => ref(_structRadiusTokens.medium); + T large() => ref(_structRadiusTokens.large); +} + +extension $BuildContextRadiusTokensX on BuildContext { + Radius small() => _structRadiusTokens.small.resolve(this); + Radius medium() => _structRadiusTokens.medium.resolve(this); + Radius large() => _structRadiusTokens.large.resolve(this); +} + +class _$SpaceTokensStruct { + const _$SpaceTokensStruct(); + + final SpaceToken p8 = const SpaceToken('p8'); + + final SpaceToken p16 = const SpaceToken('p16'); + + final SpaceToken p24 = const SpaceToken('p24'); +} + +const _structSpaceTokens = _$SpaceTokensStruct(); +Map _$SpaceTokensToData(SpaceTokens tokens) { + return { + _structSpaceTokens.p8: tokens.p8, + _structSpaceTokens.p16: tokens.p16, + _structSpaceTokens.p24: tokens.p24, + }; +} + +extension $SpaceTokensX on SpacingSideUtility { + T p8() => ref(_structSpaceTokens.p8); + T p16() => ref(_structSpaceTokens.p16); + T p24() => ref(_structSpaceTokens.p24); +} + +extension $BuildContextSpaceTokensX on BuildContext { + double p8() => _structSpaceTokens.p8.resolve(this); + double p16() => _structSpaceTokens.p16.resolve(this); + double p24() => _structSpaceTokens.p24.resolve(this); } From f61a08ef8197155943372d06c3a61679ea7a06ca Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:13:18 -0300 Subject: [PATCH 14/30] annotation improvements --- examples/todo_list/lib/style/token.dart | 137 +++++++++++++++ examples/todo_list/lib/style/token.g.dart | 162 ++++++++++++++++++ .../lib/src/helpers/field_info.dart | 7 + 3 files changed, 306 insertions(+) create mode 100644 examples/todo_list/lib/style/token.dart create mode 100644 examples/todo_list/lib/style/token.g.dart diff --git a/examples/todo_list/lib/style/token.dart b/examples/todo_list/lib/style/token.dart new file mode 100644 index 000000000..f84c47520 --- /dev/null +++ b/examples/todo_list/lib/style/token.dart @@ -0,0 +1,137 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +part 'token.g.dart'; + +final theme = MixThemeData( + colors: const MyThemeColorToken( + primary: Colors.blue, + onPrimary: Colors.white, + surface: ColorSwatch(2, { + 1: Colors.blue, + 2: Colors.blue, + }), + onSurface: Colors.black, + onSurfaceVariant: Colors.grey, + ).toMap, +); + +@MixableToken( + Color, + namespace: 'c', +) +class MyThemeColorToken { + final Color primary; + final Color onPrimary; + final Color onSurface; + + @MixableSwatchColorToken(scale: 12) + final Color onSurfaceVariant; + + final ColorSwatch surface; + + const MyThemeColorToken({ + required this.primary, + required this.onPrimary, + required this.surface, + required this.onSurface, + required this.onSurfaceVariant, + }); + + Map get toMap => _$MyThemeColorTokenToMap(this); +} + +@MixableToken( + TextStyle, + utilityExtension: false, + contextExtension: false, +) +class MyThemeTextStyleToken { + final TextStyle headline1; + final TextStyle headline2; + final TextStyle headline3; + final TextStyle body; + final TextStyle callout; + + const MyThemeTextStyleToken({ + required this.headline1, + required this.headline2, + required this.headline3, + required this.body, + required this.callout, + }); + + Map get toMap => + _$MyThemeTextStyleTokenToMap(this); +} + +@MixableToken(Radius) +class MyThemeRadiusToken { + const MyThemeRadiusToken({ + required this.large, + required this.medium, + }); + + final Radius large; + final Radius medium; + + Map get toMap => _$MyThemeRadiusTokenToMap(this); +} + +@MixableToken(double) +class MyThemeSpaceToken { + const MyThemeSpaceToken({ + required this.medium, + required this.large, + }); + + final double medium; + final double large; + + Map get toMap => _$MyThemeSpaceTokenToMap(this); +} + +final lightBlueTheme = MixThemeData( + colors: const MyThemeColorToken( + primary: Color(0xFF0093B9), + onPrimary: Color(0xFFFAFAFA), + surface: ColorSwatch(0xFFFAFAFA, { + 1: Color(0xFFFAFAFA), + 2: Color(0xFFFAFAFA), + }), + onSurface: Color(0xFF141C24), + onSurfaceVariant: Color(0xFF405473), + ).toMap, + textStyles: MyThemeTextStyleToken( + headline1: GoogleFonts.plusJakartaSans( + fontSize: 22, + fontWeight: FontWeight.bold, + ), + headline2: GoogleFonts.plusJakartaSans( + fontSize: 18, + fontWeight: FontWeight.bold, + ), + headline3: GoogleFonts.plusJakartaSans( + fontSize: 14, + fontWeight: FontWeight.bold, + ), + body: GoogleFonts.plusJakartaSans( + fontSize: 16, + fontWeight: FontWeight.normal, + ), + callout: GoogleFonts.plusJakartaSans( + fontSize: 14, + fontWeight: FontWeight.normal, + ), + ).toMap, + radii: const MyThemeRadiusToken( + large: Radius.circular(100), + medium: Radius.circular(12), + ).toMap, + spaces: const MyThemeSpaceToken( + medium: 16, + large: 24, + ).toMap, +); diff --git a/examples/todo_list/lib/style/token.g.dart b/examples/todo_list/lib/style/token.g.dart new file mode 100644 index 000000000..f0146f0f7 --- /dev/null +++ b/examples/todo_list/lib/style/token.g.dart @@ -0,0 +1,162 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'token.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$MyThemeColorTokenStruct { + _$MyThemeColorTokenStruct(); + + final ColorToken primary = const ColorToken('primary'); + final ColorToken onPrimary = const ColorToken('onPrimary'); + final ColorToken onSurface = const ColorToken('onSurface'); + final ColorSwatchToken onSurfaceVariant = + ColorSwatchToken.scale('onSurfaceVariant', 12); + final ColorToken surface = const ColorToken('surface'); +} + +final _structMyThemeColorToken = _$MyThemeColorTokenStruct(); + +Map _$MyThemeColorTokenToMap(MyThemeColorToken tokens) { + return { + _structMyThemeColorToken.primary: tokens.primary, + _structMyThemeColorToken.onPrimary: tokens.onPrimary, + _structMyThemeColorToken.surface: tokens.surface, + _structMyThemeColorToken.onSurface: tokens.onSurface, + _structMyThemeColorToken.onSurfaceVariant: tokens.onSurfaceVariant, + }; +} + +extension $MyThemeColorTokenColorUtilityX + on ColorUtility { + primary() => ref(_structMyThemeColorToken.primary); + onPrimary() => ref(_structMyThemeColorToken.onPrimary); + onSurface() => ref(_structMyThemeColorToken.onSurface); + onSurfaceVariant([int step = 1]) => + ref(_structMyThemeColorToken.onSurfaceVariant[step]); + surface() => ref(_structMyThemeColorToken.surface); + toMap() => ref(_structMyThemeColorToken.toMap); +} + +class BuildContextMyThemeColorTokenMethods { + const BuildContextMyThemeColorTokenMethods(this.context); + + final BuildContext context; + primary() => _structMyThemeColorToken.primary.resolve(context); + onPrimary() => _structMyThemeColorToken.onPrimary.resolve(context); + onSurface() => _structMyThemeColorToken.onSurface.resolve(context); + onSurfaceVariant([int step = 1]) => + _structMyThemeColorToken.onSurfaceVariant[step].resolve(context); + surface() => _structMyThemeColorToken.surface.resolve(context); + toMap() => _structMyThemeColorToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeColorTokenX on BuildContext { + BuildContextMyThemeColorTokenMethods get $c => + BuildContextMyThemeColorTokenMethods(this); +} + +class _$MyThemeTextStyleTokenStruct { + _$MyThemeTextStyleTokenStruct(); + + final TextStyleToken headline1 = const TextStyleToken('headline1'); + final TextStyleToken headline2 = const TextStyleToken('headline2'); + final TextStyleToken headline3 = const TextStyleToken('headline3'); + final TextStyleToken body = const TextStyleToken('body'); + final TextStyleToken callout = const TextStyleToken('callout'); +} + +final _structMyThemeTextStyleToken = _$MyThemeTextStyleTokenStruct(); + +Map _$MyThemeTextStyleTokenToMap( + MyThemeTextStyleToken tokens) { + return { + _structMyThemeTextStyleToken.headline1: tokens.headline1, + _structMyThemeTextStyleToken.headline2: tokens.headline2, + _structMyThemeTextStyleToken.headline3: tokens.headline3, + _structMyThemeTextStyleToken.body: tokens.body, + _structMyThemeTextStyleToken.callout: tokens.callout, + }; +} + +class _$MyThemeRadiusTokenStruct { + _$MyThemeRadiusTokenStruct(); + + final RadiusToken large = const RadiusToken('large'); + final RadiusToken medium = const RadiusToken('medium'); +} + +final _structMyThemeRadiusToken = _$MyThemeRadiusTokenStruct(); + +Map _$MyThemeRadiusTokenToMap(MyThemeRadiusToken tokens) { + return { + _structMyThemeRadiusToken.large: tokens.large, + _structMyThemeRadiusToken.medium: tokens.medium, + }; +} + +extension $MyThemeRadiusTokenRadiusUtilityX + on RadiusUtility { + large() => ref(_structMyThemeRadiusToken.large); + medium() => ref(_structMyThemeRadiusToken.medium); + toMap() => ref(_structMyThemeRadiusToken.toMap); +} + +class BuildContextMyThemeRadiusTokenMethods { + const BuildContextMyThemeRadiusTokenMethods(this.context); + + final BuildContext context; + large() => _structMyThemeRadiusToken.large.resolve(context); + medium() => _structMyThemeRadiusToken.medium.resolve(context); + toMap() => _structMyThemeRadiusToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeRadiusTokenX on BuildContext { + BuildContextMyThemeRadiusTokenMethods get $radius => + BuildContextMyThemeRadiusTokenMethods(this); +} + +class _$MyThemeSpaceTokenStruct { + _$MyThemeSpaceTokenStruct(); + + final SpaceToken medium = const SpaceToken('medium'); + final SpaceToken large = const SpaceToken('large'); +} + +final _structMyThemeSpaceToken = _$MyThemeSpaceTokenStruct(); + +Map _$MyThemeSpaceTokenToMap(MyThemeSpaceToken tokens) { + return { + _structMyThemeSpaceToken.medium: tokens.medium, + _structMyThemeSpaceToken.large: tokens.large, + }; +} + +extension $MyThemeSpaceTokenSpacingSideUtilityX + on SpacingSideUtility { + medium() => ref(_structMyThemeSpaceToken.medium); + large() => ref(_structMyThemeSpaceToken.large); + toMap() => ref(_structMyThemeSpaceToken.toMap); +} + +extension $MyThemeSpaceTokenGapUtilityX on GapUtility { + medium() => ref(_structMyThemeSpaceToken.medium); + large() => ref(_structMyThemeSpaceToken.large); + toMap() => ref(_structMyThemeSpaceToken.toMap); +} + +class BuildContextMyThemeSpaceTokenMethods { + const BuildContextMyThemeSpaceTokenMethods(this.context); + + final BuildContext context; + medium() => _structMyThemeSpaceToken.medium.resolve(context); + large() => _structMyThemeSpaceToken.large.resolve(context); + toMap() => _structMyThemeSpaceToken.toMap.resolve(context); +} + +extension $BuildContextMyThemeSpaceTokenX on BuildContext { + BuildContextMyThemeSpaceTokenMethods get $space => + BuildContextMyThemeSpaceTokenMethods(this); +} diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index 4b0827f88..f49d07315 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -96,6 +96,7 @@ class ParameterInfo extends FieldInfo { final bool isPositional; final bool isRequiredNamed; final bool isRequiredPositional; + final ParameterElement element; final ParameterElement element; @@ -319,6 +320,12 @@ class ClassBuilderContext { constructor.parameters.map(ParameterInfo.ofElement).toList(); } + // List get fields { + // // if (_fieldsCache != null) return _fieldsCache!; + + // return classElement.fields.map((e) => FieldInfo.ofElement(e)).toList(); + // } + bool get hasDiagnosticable => classElement.allSupertypes.any((e) => e.element.name == 'Diagnosticable'); From 44f157b5c7afdd061e4f3c0dbee8b58fb79e3690 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:34:03 -0300 Subject: [PATCH 15/30] improve the SwatchColorToken --- examples/todo_list/lib/style/token.g.dart | 13 +++---------- .../mix_generator/lib/src/helpers/field_info.dart | 1 + 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/examples/todo_list/lib/style/token.g.dart b/examples/todo_list/lib/style/token.g.dart index f0146f0f7..7d1d2e4b8 100644 --- a/examples/todo_list/lib/style/token.g.dart +++ b/examples/todo_list/lib/style/token.g.dart @@ -11,10 +11,10 @@ class _$MyThemeColorTokenStruct { final ColorToken primary = const ColorToken('primary'); final ColorToken onPrimary = const ColorToken('onPrimary'); + final ColorToken surface = const ColorToken('surface'); final ColorToken onSurface = const ColorToken('onSurface'); final ColorSwatchToken onSurfaceVariant = ColorSwatchToken.scale('onSurfaceVariant', 12); - final ColorToken surface = const ColorToken('surface'); } final _structMyThemeColorToken = _$MyThemeColorTokenStruct(); @@ -33,11 +33,10 @@ extension $MyThemeColorTokenColorUtilityX on ColorUtility { primary() => ref(_structMyThemeColorToken.primary); onPrimary() => ref(_structMyThemeColorToken.onPrimary); + surface() => ref(_structMyThemeColorToken.surface); onSurface() => ref(_structMyThemeColorToken.onSurface); onSurfaceVariant([int step = 1]) => ref(_structMyThemeColorToken.onSurfaceVariant[step]); - surface() => ref(_structMyThemeColorToken.surface); - toMap() => ref(_structMyThemeColorToken.toMap); } class BuildContextMyThemeColorTokenMethods { @@ -46,11 +45,10 @@ class BuildContextMyThemeColorTokenMethods { final BuildContext context; primary() => _structMyThemeColorToken.primary.resolve(context); onPrimary() => _structMyThemeColorToken.onPrimary.resolve(context); + surface() => _structMyThemeColorToken.surface.resolve(context); onSurface() => _structMyThemeColorToken.onSurface.resolve(context); onSurfaceVariant([int step = 1]) => _structMyThemeColorToken.onSurfaceVariant[step].resolve(context); - surface() => _structMyThemeColorToken.surface.resolve(context); - toMap() => _structMyThemeColorToken.toMap.resolve(context); } extension $BuildContextMyThemeColorTokenX on BuildContext { @@ -101,7 +99,6 @@ extension $MyThemeRadiusTokenRadiusUtilityX on RadiusUtility { large() => ref(_structMyThemeRadiusToken.large); medium() => ref(_structMyThemeRadiusToken.medium); - toMap() => ref(_structMyThemeRadiusToken.toMap); } class BuildContextMyThemeRadiusTokenMethods { @@ -110,7 +107,6 @@ class BuildContextMyThemeRadiusTokenMethods { final BuildContext context; large() => _structMyThemeRadiusToken.large.resolve(context); medium() => _structMyThemeRadiusToken.medium.resolve(context); - toMap() => _structMyThemeRadiusToken.toMap.resolve(context); } extension $BuildContextMyThemeRadiusTokenX on BuildContext { @@ -138,13 +134,11 @@ extension $MyThemeSpaceTokenSpacingSideUtilityX on SpacingSideUtility { medium() => ref(_structMyThemeSpaceToken.medium); large() => ref(_structMyThemeSpaceToken.large); - toMap() => ref(_structMyThemeSpaceToken.toMap); } extension $MyThemeSpaceTokenGapUtilityX on GapUtility { medium() => ref(_structMyThemeSpaceToken.medium); large() => ref(_structMyThemeSpaceToken.large); - toMap() => ref(_structMyThemeSpaceToken.toMap); } class BuildContextMyThemeSpaceTokenMethods { @@ -153,7 +147,6 @@ class BuildContextMyThemeSpaceTokenMethods { final BuildContext context; medium() => _structMyThemeSpaceToken.medium.resolve(context); large() => _structMyThemeSpaceToken.large.resolve(context); - toMap() => _structMyThemeSpaceToken.toMap.resolve(context); } extension $BuildContextMyThemeSpaceTokenX on BuildContext { diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index f49d07315..60794d995 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -96,6 +96,7 @@ class ParameterInfo extends FieldInfo { final bool isPositional; final bool isRequiredNamed; final bool isRequiredPositional; + final ParameterElement element; final ParameterElement element; From c4483511ec84a3c67166692cebbdb7b060b864db Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:14:22 -0300 Subject: [PATCH 16/30] improve tests --- packages/remix/lib/src/theme.dart | 8 +- packages/remix/lib/src/theme.g.dart | 130 ++++++++++++++++++---------- 2 files changed, 90 insertions(+), 48 deletions(-) diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart index 20b2981d6..66edc9872 100644 --- a/packages/remix/lib/src/theme.dart +++ b/packages/remix/lib/src/theme.dart @@ -16,7 +16,7 @@ class ColorTokens { required this.tertiary, }); - Map get data => _$ColorTokensToData(this); + Map get data => _$ColorTokensToMap(this); } @MixableToken(TextStyle) @@ -33,7 +33,7 @@ class TextTokens { required this.body, }); - Map get data => _$TextTokensToData(this); + Map get data => _$TextTokensToMap(this); } @MixableToken(Radius) @@ -48,7 +48,7 @@ class RadiusTokens { required this.large, }); - Map get data => _$RadiusTokensToData(this); + Map get data => _$RadiusTokensToMap(this); } @MixableToken(double) @@ -63,5 +63,5 @@ class SpaceTokens { required this.p24, }); - Map get data => _$SpaceTokensToData(this); + Map get data => _$SpaceTokensToMap(this); } diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart index fe52683b4..a39534928 100644 --- a/packages/remix/lib/src/theme.g.dart +++ b/packages/remix/lib/src/theme.g.dart @@ -7,15 +7,16 @@ part of 'theme.dart'; // ************************************************************************** class _$ColorTokensStruct { - const _$ColorTokensStruct(); + _$ColorTokensStruct(); final ColorToken primary = const ColorToken('primary'); final ColorToken secondary = const ColorToken('secondary'); final ColorToken tertiary = const ColorToken('tertiary'); } -const _structColorTokens = _$ColorTokensStruct(); -Map _$ColorTokensToData(ColorTokens tokens) { +final _structColorTokens = _$ColorTokensStruct(); + +Map _$ColorTokensToMap(ColorTokens tokens) { return { _structColorTokens.primary: tokens.primary, _structColorTokens.secondary: tokens.secondary, @@ -23,20 +24,28 @@ Map _$ColorTokensToData(ColorTokens tokens) { }; } -extension $ColorTokensX on ColorUtility { - T primary() => ref(_structColorTokens.primary); - T secondary() => ref(_structColorTokens.secondary); - T tertiary() => ref(_structColorTokens.tertiary); +extension $ColorTokensColorUtilityX on ColorUtility { + T $primary() => ref(_structColorTokens.primary); + T $secondary() => ref(_structColorTokens.secondary); + T $tertiary() => ref(_structColorTokens.tertiary); +} + +class BuildContextColorTokensMethods { + const BuildContextColorTokensMethods(this.context); + + final BuildContext context; + Color primary() => _structColorTokens.primary.resolve(context); + Color secondary() => _structColorTokens.secondary.resolve(context); + Color tertiary() => _structColorTokens.tertiary.resolve(context); } extension $BuildContextColorTokensX on BuildContext { - Color primary() => _structColorTokens.primary.resolve(this); - Color secondary() => _structColorTokens.secondary.resolve(this); - Color tertiary() => _structColorTokens.tertiary.resolve(this); + BuildContextColorTokensMethods get $color => + BuildContextColorTokensMethods(this); } class _$TextTokensStruct { - const _$TextTokensStruct(); + _$TextTokensStruct(); final TextStyleToken h1 = const TextStyleToken('h1'); final TextStyleToken h2 = const TextStyleToken('h2'); @@ -44,8 +53,9 @@ class _$TextTokensStruct { final TextStyleToken body = const TextStyleToken('body'); } -const _structTextTokens = _$TextTokensStruct(); -Map _$TextTokensToData(TextTokens tokens) { +final _structTextTokens = _$TextTokensStruct(); + +Map _$TextTokensToMap(TextTokens tokens) { return { _structTextTokens.h1: tokens.h1, _structTextTokens.h2: tokens.h2, @@ -54,30 +64,40 @@ Map _$TextTokensToData(TextTokens tokens) { }; } -extension $TextTokensX on TextStyleUtility { - T h1() => ref(_structTextTokens.h1); - T h2() => ref(_structTextTokens.h2); - T h3() => ref(_structTextTokens.h3); - T body() => ref(_structTextTokens.body); +extension $TextTokensTextStyleUtilityX + on TextStyleUtility { + T $h1() => ref(_structTextTokens.h1); + T $h2() => ref(_structTextTokens.h2); + T $h3() => ref(_structTextTokens.h3); + T $body() => ref(_structTextTokens.body); +} + +class BuildContextTextTokensMethods { + const BuildContextTextTokensMethods(this.context); + + final BuildContext context; + TextStyle h1() => _structTextTokens.h1.resolve(context); + TextStyle h2() => _structTextTokens.h2.resolve(context); + TextStyle h3() => _structTextTokens.h3.resolve(context); + TextStyle body() => _structTextTokens.body.resolve(context); } extension $BuildContextTextTokensX on BuildContext { - TextStyle h1() => _structTextTokens.h1.resolve(this); - TextStyle h2() => _structTextTokens.h2.resolve(this); - TextStyle h3() => _structTextTokens.h3.resolve(this); - TextStyle body() => _structTextTokens.body.resolve(this); + BuildContextTextTokensMethods get $textStyle => + BuildContextTextTokensMethods(this); } class _$RadiusTokensStruct { - const _$RadiusTokensStruct(); + _$RadiusTokensStruct(); final RadiusToken small = const RadiusToken('small'); final RadiusToken medium = const RadiusToken('medium'); final RadiusToken large = const RadiusToken('large'); } -const _structRadiusTokens = _$RadiusTokensStruct(); -Map _$RadiusTokensToData(RadiusTokens tokens) { +final _structRadiusTokens = _$RadiusTokensStruct(); + +Map _$RadiusTokensToMap(RadiusTokens tokens) { return { _structRadiusTokens.small: tokens.small, _structRadiusTokens.medium: tokens.medium, @@ -85,30 +105,37 @@ Map _$RadiusTokensToData(RadiusTokens tokens) { }; } -extension $RadiusTokensX on RadiusUtility { - T small() => ref(_structRadiusTokens.small); - T medium() => ref(_structRadiusTokens.medium); - T large() => ref(_structRadiusTokens.large); +extension $RadiusTokensRadiusUtilityX on RadiusUtility { + T $small() => ref(_structRadiusTokens.small); + T $medium() => ref(_structRadiusTokens.medium); + T $large() => ref(_structRadiusTokens.large); +} + +class BuildContextRadiusTokensMethods { + const BuildContextRadiusTokensMethods(this.context); + + final BuildContext context; + Radius small() => _structRadiusTokens.small.resolve(context); + Radius medium() => _structRadiusTokens.medium.resolve(context); + Radius large() => _structRadiusTokens.large.resolve(context); } extension $BuildContextRadiusTokensX on BuildContext { - Radius small() => _structRadiusTokens.small.resolve(this); - Radius medium() => _structRadiusTokens.medium.resolve(this); - Radius large() => _structRadiusTokens.large.resolve(this); + BuildContextRadiusTokensMethods get $radius => + BuildContextRadiusTokensMethods(this); } class _$SpaceTokensStruct { - const _$SpaceTokensStruct(); + _$SpaceTokensStruct(); final SpaceToken p8 = const SpaceToken('p8'); - final SpaceToken p16 = const SpaceToken('p16'); - final SpaceToken p24 = const SpaceToken('p24'); } -const _structSpaceTokens = _$SpaceTokensStruct(); -Map _$SpaceTokensToData(SpaceTokens tokens) { +final _structSpaceTokens = _$SpaceTokensStruct(); + +Map _$SpaceTokensToMap(SpaceTokens tokens) { return { _structSpaceTokens.p8: tokens.p8, _structSpaceTokens.p16: tokens.p16, @@ -116,14 +143,29 @@ Map _$SpaceTokensToData(SpaceTokens tokens) { }; } -extension $SpaceTokensX on SpacingSideUtility { - T p8() => ref(_structSpaceTokens.p8); - T p16() => ref(_structSpaceTokens.p16); - T p24() => ref(_structSpaceTokens.p24); +extension $SpaceTokensSpacingSideUtilityX + on SpacingSideUtility { + T $p8() => ref(_structSpaceTokens.p8); + T $p16() => ref(_structSpaceTokens.p16); + T $p24() => ref(_structSpaceTokens.p24); +} + +extension $SpaceTokensGapUtilityX on GapUtility { + T $p8() => ref(_structSpaceTokens.p8); + T $p16() => ref(_structSpaceTokens.p16); + T $p24() => ref(_structSpaceTokens.p24); +} + +class BuildContextSpaceTokensMethods { + const BuildContextSpaceTokensMethods(this.context); + + final BuildContext context; + double p8() => _structSpaceTokens.p8.resolve(context); + double p16() => _structSpaceTokens.p16.resolve(context); + double p24() => _structSpaceTokens.p24.resolve(context); } extension $BuildContextSpaceTokensX on BuildContext { - double p8() => _structSpaceTokens.p8.resolve(this); - double p16() => _structSpaceTokens.p16.resolve(this); - double p24() => _structSpaceTokens.p24.resolve(this); + BuildContextSpaceTokensMethods get $space => + BuildContextSpaceTokensMethods(this); } From 63e53204ab8c36d786410d1c1024d3b37d510af0 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:47:26 -0300 Subject: [PATCH 17/30] refactor the fortaleza theme --- packages/mix/lib/src/theme/mix/mix_theme.dart | 2 +- .../demo/lib/components/avatar_use_case.dart | 1 + .../demo/lib/components/badge_use_case.dart | 1 + .../demo/lib/components/button_use_case.dart | 1 + .../demo/lib/components/callout_use_case.dart | 2 +- .../demo/lib/components/card_use_case.dart | 6 +- .../lib/components/checkbox_use_case.dart | 1 + .../demo/lib/components/chip_use_case.dart | 1 + .../lib/components/icon_button_use_case.dart | 1 + .../lib/components/progress_use_case.dart | 1 + .../demo/lib/components/radio_use_case.dart | 1 + .../demo/lib/components/select_use_case.dart | 1 + .../demo/lib/components/spinner_use_case.dart | 1 + .../demo/lib/components/switch_use_case.dart | 1 + .../lib/components/textfield_use_case.dart | 1 + .../remix/demo/lib/helpers/theme_addon.dart | 5 +- packages/remix/demo/lib/main.dart | 11 +- .../ephemeral/Flutter-Generated.xcconfig | 6 +- .../ephemeral/FlutterOutputs.xcfilelist | 64 ++-- .../ephemeral/flutter_export_environment.sh | 6 +- packages/remix/lib/remix.dart | 14 +- .../src/components/accordion/accordion.dart | 4 +- .../lib/src/components/avatar/avatar.dart | 4 +- .../remix/lib/src/components/badge/badge.dart | 4 +- .../lib/src/components/button/button.dart | 4 +- .../lib/src/components/callout/callout.dart | 4 +- .../remix/lib/src/components/card/card.dart | 4 +- .../lib/src/components/checkbox/checkbox.dart | 4 +- .../remix/lib/src/components/chip/chip.dart | 4 +- .../lib/src/components/dialog/dialog.dart | 4 +- .../lib/src/components/divider/divider.dart | 4 +- .../components/icon_button/icon_button.dart | 6 +- .../src/components/menu_item/menu_item.dart | 4 +- .../lib/src/components/progress/progress.dart | 4 +- .../remix/lib/src/components/radio/radio.dart | 4 +- .../lib/src/components/scaffold/scaffold.dart | 4 +- .../segmented_control/segmented_control.dart | 4 +- .../lib/src/components/select/select.dart | 4 +- .../lib/src/components/slider/slider.dart | 4 +- .../lib/src/components/spinner/spinner.dart | 4 +- .../lib/src/components/switch/switch.dart | 4 +- .../src/components/textfield/textfield.dart | 4 +- .../remix/lib/src/components/toast/toast.dart | 4 +- .../lib/src/components/toast/toast_layer.dart | 2 +- .../lib/src/{app => core}/remix_app.dart | 4 +- .../remix/lib/src/core/theme/component.dart | 175 +++++++++ .../remix/lib/src/core/theme/remix_theme.dart | 118 +++++++ packages/remix/lib/src/theme.dart | 67 ---- packages/remix/lib/src/theme.g.dart | 171 --------- packages/remix/lib/src/theme/remix_theme.dart | 334 ------------------ .../remix/lib/src/theme/remix_tokens.dart | 66 ---- .../lib/src/theme/tokens/color_tokens.dart | 66 ---- .../lib/src/theme/tokens/radius_tokens.dart | 34 -- .../lib/src/theme/tokens/space_tokens.dart | 55 --- .../src/theme/tokens/text_style_tokens.dart | 85 ----- .../components}/accordion_theme.dart | 12 +- .../fortaleza/components}/avatar_theme.dart | 5 +- .../fortaleza/components}/badge_theme.dart | 11 +- .../fortaleza/components}/button_theme.dart | 13 +- .../fortaleza/components}/callout_theme.dart | 7 +- .../fortaleza/components}/card_theme.dart | 9 +- .../fortaleza/components}/checkbox_theme.dart | 6 +- .../fortaleza/components}/chip_theme.dart | 9 +- .../fortaleza/components/components.dart | 104 ++++++ .../fortaleza/components}/dialog_theme.dart | 13 +- .../fortaleza/components}/divider_theme.dart | 5 +- .../components}/icon_button_theme.dart | 7 +- .../components}/menu_item_theme.dart | 19 +- .../fortaleza/components}/progress_theme.dart | 5 +- .../fortaleza/components}/radio_theme.dart | 5 +- .../fortaleza/components}/scaffold_theme.dart | 7 +- .../components}/segmented_control_theme.dart | 11 +- .../fortaleza/components}/select_theme.dart | 11 +- .../fortaleza/components}/slider_theme.dart | 6 +- .../fortaleza/components}/spinner_theme.dart | 5 +- .../fortaleza/components}/switch_theme.dart | 5 +- .../components}/textfield_theme.dart | 31 +- .../fortaleza/components}/toast_theme.dart | 19 +- .../remix/lib/src/themes/fortaleza/theme.dart | 34 ++ .../lib/src/themes/fortaleza/tokens.dart | 201 +++++++++++ .../lib/src/themes/fortaleza/tokens.g.dart | 255 +++++++++++++ packages/remix/lib/themes/fortaleza.dart | 26 ++ 82 files changed, 1155 insertions(+), 1081 deletions(-) rename packages/remix/lib/src/{app => core}/remix_app.dart (98%) create mode 100644 packages/remix/lib/src/core/theme/component.dart create mode 100644 packages/remix/lib/src/core/theme/remix_theme.dart delete mode 100644 packages/remix/lib/src/theme.dart delete mode 100644 packages/remix/lib/src/theme.g.dart delete mode 100644 packages/remix/lib/src/theme/remix_theme.dart delete mode 100644 packages/remix/lib/src/theme/remix_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/color_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/radius_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/space_tokens.dart delete mode 100644 packages/remix/lib/src/theme/tokens/text_style_tokens.dart rename packages/remix/lib/src/{components/accordion => themes/fortaleza/components}/accordion_theme.dart (85%) rename packages/remix/lib/src/{components/avatar => themes/fortaleza/components}/avatar_theme.dart (90%) rename packages/remix/lib/src/{components/badge => themes/fortaleza/components}/badge_theme.dart (90%) rename packages/remix/lib/src/{components/button => themes/fortaleza/components}/button_theme.dart (92%) rename packages/remix/lib/src/{components/callout => themes/fortaleza/components}/callout_theme.dart (91%) rename packages/remix/lib/src/{components/card => themes/fortaleza/components}/card_theme.dart (83%) rename packages/remix/lib/src/{components/checkbox => themes/fortaleza/components}/checkbox_theme.dart (94%) rename packages/remix/lib/src/{components/chip => themes/fortaleza/components}/chip_theme.dart (92%) create mode 100644 packages/remix/lib/src/themes/fortaleza/components/components.dart rename packages/remix/lib/src/{components/dialog => themes/fortaleza/components}/dialog_theme.dart (73%) rename packages/remix/lib/src/{components/divider => themes/fortaleza/components}/divider_theme.dart (77%) rename packages/remix/lib/src/{components/icon_button => themes/fortaleza/components}/icon_button_theme.dart (94%) rename packages/remix/lib/src/{components/menu_item => themes/fortaleza/components}/menu_item_theme.dart (78%) rename packages/remix/lib/src/{components/progress => themes/fortaleza/components}/progress_theme.dart (89%) rename packages/remix/lib/src/{components/radio => themes/fortaleza/components}/radio_theme.dart (95%) rename packages/remix/lib/src/{components/scaffold => themes/fortaleza/components}/scaffold_theme.dart (70%) rename packages/remix/lib/src/{components/segmented_control => themes/fortaleza/components}/segmented_control_theme.dart (83%) rename packages/remix/lib/src/{components/select => themes/fortaleza/components}/select_theme.dart (93%) rename packages/remix/lib/src/{components/slider => themes/fortaleza/components}/slider_theme.dart (89%) rename packages/remix/lib/src/{components/spinner => themes/fortaleza/components}/spinner_theme.dart (82%) rename packages/remix/lib/src/{components/switch => themes/fortaleza/components}/switch_theme.dart (95%) rename packages/remix/lib/src/{components/textfield => themes/fortaleza/components}/textfield_theme.dart (60%) rename packages/remix/lib/src/{components/toast => themes/fortaleza/components}/toast_theme.dart (66%) create mode 100644 packages/remix/lib/src/themes/fortaleza/theme.dart create mode 100644 packages/remix/lib/src/themes/fortaleza/tokens.dart create mode 100644 packages/remix/lib/src/themes/fortaleza/tokens.g.dart create mode 100644 packages/remix/lib/themes/fortaleza.dart diff --git a/packages/mix/lib/src/theme/mix/mix_theme.dart b/packages/mix/lib/src/theme/mix/mix_theme.dart index d67b4a97c..134aa6f3f 100644 --- a/packages/mix/lib/src/theme/mix/mix_theme.dart +++ b/packages/mix/lib/src/theme/mix/mix_theme.dart @@ -11,7 +11,7 @@ import '../tokens/space_token.dart'; import '../tokens/text_style_token.dart'; class MixTheme extends InheritedWidget { - const MixTheme({required super.child, required this.data, super.key}); + const MixTheme({required this.data, super.key, required super.child}); static MixThemeData of(BuildContext context) { final themeData = diff --git a/packages/remix/demo/lib/components/avatar_use_case.dart b/packages/remix/demo/lib/components/avatar_use_case.dart index 381990856..14c1191de 100644 --- a/packages/remix/demo/lib/components/avatar_use_case.dart +++ b/packages/remix/demo/lib/components/avatar_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/badge_use_case.dart b/packages/remix/demo/lib/components/badge_use_case.dart index 37405a059..915edc472 100644 --- a/packages/remix/demo/lib/components/badge_use_case.dart +++ b/packages/remix/demo/lib/components/badge_use_case.dart @@ -1,5 +1,6 @@ import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/button_use_case.dart b/packages/remix/demo/lib/components/button_use_case.dart index 9b3a1d7dc..b67fc46a8 100644 --- a/packages/remix/demo/lib/components/button_use_case.dart +++ b/packages/remix/demo/lib/components/button_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/addons/icon_data_knob.dart'; import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/callout_use_case.dart b/packages/remix/demo/lib/components/callout_use_case.dart index 178b06626..bed9af224 100644 --- a/packages/remix/demo/lib/components/callout_use_case.dart +++ b/packages/remix/demo/lib/components/callout_use_case.dart @@ -1,8 +1,8 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; - import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/card_use_case.dart b/packages/remix/demo/lib/components/card_use_case.dart index 684017cf0..3d0a07422 100644 --- a/packages/remix/demo/lib/components/card_use_case.dart +++ b/packages/remix/demo/lib/components/card_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; @@ -10,6 +11,7 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; type: Card, ) Widget buildCard(BuildContext context) { + final color = context.$color.neutral(10); return Scaffold( body: Center( child: Card( @@ -32,12 +34,12 @@ Widget buildCard(BuildContext context) { children: [ StyledText( 'Leo Farias', - style: Style($text.style.ref($rx.text.text3)), + style: Style($text.style.$text3()), ), StyledText( 'Flutter Engineer', style: Style( - $text.style.ref($rx.text.text2), + $text.style.$text2(), $text.style.color.$neutral(10), ), ), diff --git a/packages/remix/demo/lib/components/checkbox_use_case.dart b/packages/remix/demo/lib/components/checkbox_use_case.dart index 002ff388d..f19e1134a 100644 --- a/packages/remix/demo/lib/components/checkbox_use_case.dart +++ b/packages/remix/demo/lib/components/checkbox_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/chip_use_case.dart b/packages/remix/demo/lib/components/chip_use_case.dart index 8ef06a8ec..b1afa0080 100644 --- a/packages/remix/demo/lib/components/chip_use_case.dart +++ b/packages/remix/demo/lib/components/chip_use_case.dart @@ -3,6 +3,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/icon_button_use_case.dart b/packages/remix/demo/lib/components/icon_button_use_case.dart index a47573669..f2315d18e 100644 --- a/packages/remix/demo/lib/components/icon_button_use_case.dart +++ b/packages/remix/demo/lib/components/icon_button_use_case.dart @@ -2,6 +2,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/progress_use_case.dart b/packages/remix/demo/lib/components/progress_use_case.dart index 2c45300f2..d52617598 100644 --- a/packages/remix/demo/lib/components/progress_use_case.dart +++ b/packages/remix/demo/lib/components/progress_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/radio_use_case.dart b/packages/remix/demo/lib/components/radio_use_case.dart index cb8972112..93dd1da95 100644 --- a/packages/remix/demo/lib/components/radio_use_case.dart +++ b/packages/remix/demo/lib/components/radio_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/string.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/select_use_case.dart b/packages/remix/demo/lib/components/select_use_case.dart index 64c0ab0ef..bf9a6ae51 100644 --- a/packages/remix/demo/lib/components/select_use_case.dart +++ b/packages/remix/demo/lib/components/select_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/spinner_use_case.dart b/packages/remix/demo/lib/components/spinner_use_case.dart index c6f25a82d..159a1cfd6 100644 --- a/packages/remix/demo/lib/components/spinner_use_case.dart +++ b/packages/remix/demo/lib/components/spinner_use_case.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/switch_use_case.dart b/packages/remix/demo/lib/components/switch_use_case.dart index 973bdd853..5d3d1fc33 100644 --- a/packages/remix/demo/lib/components/switch_use_case.dart +++ b/packages/remix/demo/lib/components/switch_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/helpers/knob_builder.dart'; import 'package:demo/helpers/use_case_state.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/components/textfield_use_case.dart b/packages/remix/demo/lib/components/textfield_use_case.dart index c37ebb3bd..72011fb74 100644 --- a/packages/remix/demo/lib/components/textfield_use_case.dart +++ b/packages/remix/demo/lib/components/textfield_use_case.dart @@ -2,6 +2,7 @@ import 'package:demo/addons/icon_data_knob.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; diff --git a/packages/remix/demo/lib/helpers/theme_addon.dart b/packages/remix/demo/lib/helpers/theme_addon.dart index 0aea5b9dc..ceb5bae05 100644 --- a/packages/remix/demo/lib/helpers/theme_addon.dart +++ b/packages/remix/demo/lib/helpers/theme_addon.dart @@ -1,4 +1,5 @@ import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; typedef ThemeMultiBrightness = ({ @@ -18,12 +19,12 @@ class RemixComponentThemeAddon extends ThemeAddon { return RemixApp( debugShowCheckedModeBanner: false, darkTheme: RemixThemeData( - tokens: dark, + tokens: FortalezaTokens.dark().toThemeData(), components: themes.dark, ), theme: RemixThemeData( components: themes.light, - tokens: light, + tokens: FortalezaTokens.light().toThemeData(), ), home: child, ); diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 6ff2170b3..26916b7bb 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -1,6 +1,7 @@ import 'package:demo/helpers/theme_addon.dart'; import 'package:flutter/material.dart' hide Scaffold, ThemeMode; import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; @@ -44,18 +45,18 @@ class HotReload extends StatelessWidget { ), RemixComponentThemeAddon( themes: [ - WidgetbookTheme( + const WidgetbookTheme( name: 'Fortaleza', data: ( - dark: RemixComponentTheme.fortalezaDark(), - light: RemixComponentTheme.fortalezaLight() + dark: FortalezaComponentTheme.dark, + light: FortalezaComponentTheme.light, ), ), WidgetbookTheme( name: 'Base', data: ( - dark: RemixComponentTheme.baseDark(), - light: RemixComponentTheme.baseLight(), + dark: RemixComponentTheme.dark(), + light: RemixComponentTheme.light(), ), ), ], diff --git a/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig index ccf1946a0..207ef1037 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ b/packages/remix/demo/macos/Flutter/ephemeral/Flutter-Generated.xcconfig @@ -1,12 +1,12 @@ // This is a generated file; do not edit or check into version control. FLUTTER_ROOT=/Users/lucasoliveira/fvm/versions/stable -FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo +FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_TARGET=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart +FLUTTER_TARGET=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart FLUTTER_BUILD_DIR=build FLUTTER_BUILD_NAME=1.0.0 FLUTTER_BUILD_NUMBER=1 DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/.dart_tool/package_config.json +PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/.dart_tool/package_config.json diff --git a/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist b/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist index b4e57dd8a..70c14cc43 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist +++ b/packages/remix/demo/macos/Flutter/ephemeral/FlutterOutputs.xcfilelist @@ -1,32 +1,32 @@ -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/App -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.bin -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Black.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BlackItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Bold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLight.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Italic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Light.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-LightItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Medium.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-MediumItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Regular.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBold.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Thin.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ThinItalic.ttf -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/logo.png -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/build/macos/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/App +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/Info.plist +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.bin +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/AssetManifest.json +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/FontManifest.json +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/NOTICES.Z +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/fonts/MaterialIcons-Regular.otf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/isolate_snapshot_data +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/kernel_blob.bin +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/cupertino_icons/assets/CupertinoIcons.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Black.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BlackItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Bold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-BoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLight.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Italic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Light.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-LightItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Medium.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-MediumItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Regular.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBold.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-Thin.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/fonts/Poppins/Poppins-ThinItalic.ttf +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/packages/widgetbook/assets/logo.png +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/shaders/ink_sparkle.frag +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/App.framework/Versions/A/Resources/flutter_assets/vm_snapshot_data +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/build/macos/Build/Products/Debug/FlutterMacOS.framework/Versions/A/FlutterMacOS diff --git a/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh b/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh index 9a4c5bcf8..bf6658c86 100755 --- a/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh +++ b/packages/remix/demo/macos/Flutter/ephemeral/flutter_export_environment.sh @@ -1,13 +1,13 @@ #!/bin/sh # This is a generated file; do not edit or check into version control. export "FLUTTER_ROOT=/Users/lucasoliveira/fvm/versions/stable" -export "FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo" +export "FLUTTER_APPLICATION_PATH=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo" export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_TARGET=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart" +export "FLUTTER_TARGET=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart" export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NUMBER=1" export "DART_OBFUSCATION=false" export "TRACK_WIDGET_CREATION=true" export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/.dart_tool/package_config.json" +export "PACKAGE_CONFIG=/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/.dart_tool/package_config.json" diff --git a/packages/remix/lib/remix.dart b/packages/remix/lib/remix.dart index 9ea8d5356..e1a881a12 100644 --- a/packages/remix/lib/remix.dart +++ b/packages/remix/lib/remix.dart @@ -18,9 +18,6 @@ library remix; -/// APP -export 'src/app/remix_app.dart'; - /// COMPONENTS export 'src/components/accordion/accordion.dart'; export 'src/components/avatar/avatar.dart'; @@ -45,6 +42,13 @@ export 'src/components/switch/switch.dart'; export 'src/components/textfield/textfield.dart'; export 'src/components/toast/toast.dart'; +/// APP +export 'src/core/remix_app.dart'; +export 'src/core/theme/component.dart'; + +/// THEME +export 'src/core/theme/remix_theme.dart'; + /// HELPERS export 'src/helpers/color_palette.dart'; export 'src/helpers/color_utils.dart'; @@ -52,7 +56,3 @@ export 'src/helpers/component_builder.dart'; export 'src/helpers/context_ext.dart'; export 'src/helpers/spec/composited_transform_follower_spec.dart'; export 'src/helpers/utility_extension.dart'; - -/// THEME -export 'src/theme/remix_theme.dart'; -export 'src/theme/remix_tokens.dart'; diff --git a/packages/remix/lib/src/components/accordion/accordion.dart b/packages/remix/lib/src/components/accordion/accordion.dart index d2100db91..db272e367 100644 --- a/packages/remix/lib/src/components/accordion/accordion.dart +++ b/packages/remix/lib/src/components/accordion/accordion.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'accordion.g.dart'; part 'accordion_style.dart'; -part 'accordion_theme.dart'; part 'accordion_widget.dart'; part 'header/accordion_header.dart'; part 'header/accordion_header_spec_widget.dart'; diff --git a/packages/remix/lib/src/components/avatar/avatar.dart b/packages/remix/lib/src/components/avatar/avatar.dart index b245b9254..b188fdd65 100644 --- a/packages/remix/lib/src/components/avatar/avatar.dart +++ b/packages/remix/lib/src/components/avatar/avatar.dart @@ -2,14 +2,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; import '../../helpers/utility_extension.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'avatar.g.dart'; part 'avatar_style.dart'; -part 'avatar_theme.dart'; part 'avatar_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/badge/badge.dart b/packages/remix/lib/src/components/badge/badge.dart index 2b2e08b4b..9a45f2cef 100644 --- a/packages/remix/lib/src/components/badge/badge.dart +++ b/packages/remix/lib/src/components/badge/badge.dart @@ -2,12 +2,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'badge.g.dart'; part 'badge_style.dart'; -part 'badge_theme.dart'; part 'badge_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/button/button.dart b/packages/remix/lib/src/components/button/button.dart index 1475de9f0..8983fa489 100644 --- a/packages/remix/lib/src/components/button/button.dart +++ b/packages/remix/lib/src/components/button/button.dart @@ -4,14 +4,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import '../spinner/spinner.dart'; part 'button.g.dart'; part 'button_style.dart'; -part 'button_theme.dart'; part 'button_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/callout/callout.dart b/packages/remix/lib/src/components/callout/callout.dart index ee525c2b7..34ba6af4d 100644 --- a/packages/remix/lib/src/components/callout/callout.dart +++ b/packages/remix/lib/src/components/callout/callout.dart @@ -2,12 +2,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'callout.g.dart'; part 'callout_style.dart'; -part 'callout_theme.dart'; part 'callout_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/card/card.dart b/packages/remix/lib/src/components/card/card.dart index f8a65e575..f96397390 100644 --- a/packages/remix/lib/src/components/card/card.dart +++ b/packages/remix/lib/src/components/card/card.dart @@ -4,12 +4,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'card.g.dart'; part 'card_style.dart'; -part 'card_theme.dart'; part 'card_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/checkbox/checkbox.dart b/packages/remix/lib/src/components/checkbox/checkbox.dart index 668a62357..a39e2a73b 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox.dart @@ -3,12 +3,10 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'checkbox.g.dart'; part 'checkbox_style.dart'; -part 'checkbox_theme.dart'; part 'checkbox_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/chip/chip.dart b/packages/remix/lib/src/components/chip/chip.dart index 952545166..8c1ddd4e1 100644 --- a/packages/remix/lib/src/components/chip/chip.dart +++ b/packages/remix/lib/src/components/chip/chip.dart @@ -4,12 +4,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'chip.g.dart'; part 'chip_style.dart'; -part 'chip_theme.dart'; part 'chip_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/dialog/dialog.dart b/packages/remix/lib/src/components/dialog/dialog.dart index 7a1e75127..562875a24 100644 --- a/packages/remix/lib/src/components/dialog/dialog.dart +++ b/packages/remix/lib/src/components/dialog/dialog.dart @@ -4,13 +4,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'dialog.g.dart'; part 'dialog_style.dart'; -part 'dialog_theme.dart'; part 'dialog_widget.dart'; Future showDialog({ diff --git a/packages/remix/lib/src/components/divider/divider.dart b/packages/remix/lib/src/components/divider/divider.dart index 386d3fd4c..f8a4dec66 100644 --- a/packages/remix/lib/src/components/divider/divider.dart +++ b/packages/remix/lib/src/components/divider/divider.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'divider.g.dart'; part 'divider_style.dart'; -part 'divider_theme.dart'; part 'divider_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/icon_button/icon_button.dart b/packages/remix/lib/src/components/icon_button/icon_button.dart index 1d2d0b228..f6a147061 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button.dart +++ b/packages/remix/lib/src/components/icon_button/icon_button.dart @@ -3,14 +3,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import '../spinner/spinner.dart'; part 'icon_button.g.dart'; part 'icon_button_style.dart'; -part 'icon_button_theme.dart'; part 'icon_button_widget.dart'; @MixableSpec() @@ -37,8 +35,6 @@ class IconButtonSpec extends Spec icon = icon ?? const IconSpec(), spinner = spinner ?? const SpinnerSpec(); - // Widget - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/remix/lib/src/components/menu_item/menu_item.dart b/packages/remix/lib/src/components/menu_item/menu_item.dart index 8b631dff6..44bf61752 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item.dart +++ b/packages/remix/lib/src/components/menu_item/menu_item.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'menu_item.g.dart'; part 'menu_item_style.dart'; -part 'menu_item_theme.dart'; part 'menu_item_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/progress/progress.dart b/packages/remix/lib/src/components/progress/progress.dart index 4b6180356..55147f61a 100644 --- a/packages/remix/lib/src/components/progress/progress.dart +++ b/packages/remix/lib/src/components/progress/progress.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'progress.g.dart'; part 'progress_style.dart'; -part 'progress_theme.dart'; part 'progress_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/radio/radio.dart b/packages/remix/lib/src/components/radio/radio.dart index 12ad979d0..f4f0fb3fd 100644 --- a/packages/remix/lib/src/components/radio/radio.dart +++ b/packages/remix/lib/src/components/radio/radio.dart @@ -3,13 +3,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/utility_extension.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'radio.g.dart'; part 'radio_style.dart'; -part 'radio_theme.dart'; part 'radio_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/scaffold/scaffold.dart b/packages/remix/lib/src/components/scaffold/scaffold.dart index 327384002..013ce8fc6 100644 --- a/packages/remix/lib/src/components/scaffold/scaffold.dart +++ b/packages/remix/lib/src/components/scaffold/scaffold.dart @@ -4,13 +4,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; import '../toast/toast.dart'; part 'scaffold.g.dart'; part 'scaffold_style.dart'; -part 'scaffold_theme.dart'; part 'scaffold_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control.dart b/packages/remix/lib/src/components/segmented_control/segmented_control.dart index a176f4ea0..cb88f88dc 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control.dart @@ -3,14 +3,12 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'button/segmented_control_button.dart'; part 'button/segmented_control_button_widget.dart'; part 'segmented_control.g.dart'; part 'segmented_control_style.dart'; -part 'segmented_control_theme.dart'; part 'segmented_control_widget.dart'; final $segmentedControl = SegmentedControlSpecUtility.self; diff --git a/packages/remix/lib/src/components/select/select.dart b/packages/remix/lib/src/components/select/select.dart index 3025337de..57405ec67 100644 --- a/packages/remix/lib/src/components/select/select.dart +++ b/packages/remix/lib/src/components/select/select.dart @@ -3,10 +3,9 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; import '../../helpers/spec/composited_transform_follower_spec.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; part 'button/select_button.dart'; part 'button/select_button_widget.dart'; @@ -14,7 +13,6 @@ part 'item/select_menu.dart'; part 'item/select_menu_widget.dart'; part 'select.g.dart'; part 'select_style.dart'; -part 'select_theme.dart'; part 'select_widget.dart'; final $select = SelectSpecUtility.self; diff --git a/packages/remix/lib/src/components/slider/slider.dart b/packages/remix/lib/src/components/slider/slider.dart index c5ae35565..4c6862442 100644 --- a/packages/remix/lib/src/components/slider/slider.dart +++ b/packages/remix/lib/src/components/slider/slider.dart @@ -3,12 +3,10 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'slider.g.dart'; part 'slider_style.dart'; -part 'slider_theme.dart'; part 'slider_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/spinner/spinner.dart b/packages/remix/lib/src/components/spinner/spinner.dart index fb0159ef7..30f46dcee 100644 --- a/packages/remix/lib/src/components/spinner/spinner.dart +++ b/packages/remix/lib/src/components/spinner/spinner.dart @@ -5,13 +5,11 @@ import 'package:flutter/material.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'spinner.g.dart'; part 'spinner_painter.dart'; part 'spinner_style.dart'; -part 'spinner_theme.dart'; part 'spinner_widget.dart'; enum SpinnerTypeStyle { diff --git a/packages/remix/lib/src/components/switch/switch.dart b/packages/remix/lib/src/components/switch/switch.dart index 1989d27c0..393c256c8 100644 --- a/packages/remix/lib/src/components/switch/switch.dart +++ b/packages/remix/lib/src/components/switch/switch.dart @@ -3,12 +3,10 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'switch.g.dart'; part 'switch_style.dart'; -part 'switch_theme.dart'; part 'switch_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/textfield/textfield.dart b/packages/remix/lib/src/components/textfield/textfield.dart index bf3072f7d..4e22bc77b 100644 --- a/packages/remix/lib/src/components/textfield/textfield.dart +++ b/packages/remix/lib/src/components/textfield/textfield.dart @@ -13,14 +13,12 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; +import '../../core/theme/remix_theme.dart'; import '../../helpers/component_builder.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; import 'attributes/attributes.dart'; part 'textfield.g.dart'; part 'textfield_style.dart'; -part 'textfield_theme.dart'; part 'textfield_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/toast/toast.dart b/packages/remix/lib/src/components/toast/toast.dart index 990379c00..c539836cc 100644 --- a/packages/remix/lib/src/components/toast/toast.dart +++ b/packages/remix/lib/src/components/toast/toast.dart @@ -5,13 +5,11 @@ import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; import 'package:mix_annotations/mix_annotations.dart'; -import '../../theme/remix_theme.dart'; -import '../../theme/remix_tokens.dart'; +import '../../core/theme/remix_theme.dart'; part 'toast.g.dart'; part 'toast_layer.dart'; part 'toast_style.dart'; -part 'toast_theme.dart'; part 'toast_widget.dart'; @MixableSpec() diff --git a/packages/remix/lib/src/components/toast/toast_layer.dart b/packages/remix/lib/src/components/toast/toast_layer.dart index f2066592d..61dc8fa22 100644 --- a/packages/remix/lib/src/components/toast/toast_layer.dart +++ b/packages/remix/lib/src/components/toast/toast_layer.dart @@ -66,6 +66,7 @@ class ToastLayerState extends State implements ToastActions { return Stack( children: [ AnimatedSwitcher( + child: toastWidget, duration: toast?.animationDuration ?? const Duration(milliseconds: 500), reverseDuration: toast?.reverseAnimationDuration ?? @@ -96,7 +97,6 @@ class ToastLayerState extends State implements ToastActions { child: FadeTransition(opacity: animation, child: child), ); }, - child: toastWidget, ), widget.child, ], diff --git a/packages/remix/lib/src/app/remix_app.dart b/packages/remix/lib/src/core/remix_app.dart similarity index 98% rename from packages/remix/lib/src/app/remix_app.dart rename to packages/remix/lib/src/core/remix_app.dart index 0f52184da..e9163a19a 100644 --- a/packages/remix/lib/src/app/remix_app.dart +++ b/packages/remix/lib/src/core/remix_app.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart' as m; import 'package:flutter/widgets.dart'; -import '../theme/remix_theme.dart'; +import 'theme/remix_theme.dart'; //ignore: avoid-unnecessary-stateful-widgets class RemixApp extends StatefulWidget { @@ -122,7 +122,7 @@ class _RemixAppState extends State { Widget _remixBuilder(BuildContext context, Widget? child) { return RemixTheme( theme: widget.theme, - darkTheme: widget.darkTheme, + darkTheme: widget.darkTheme ?? widget.theme, child: widget.builder != null ? Builder( builder: (BuildContext context) { diff --git a/packages/remix/lib/src/core/theme/component.dart b/packages/remix/lib/src/core/theme/component.dart new file mode 100644 index 000000000..d1cebe670 --- /dev/null +++ b/packages/remix/lib/src/core/theme/component.dart @@ -0,0 +1,175 @@ +import '../../components/accordion/accordion.dart'; +import '../../components/avatar/avatar.dart'; +import '../../components/badge/badge.dart'; +import '../../components/button/button.dart'; +import '../../components/callout/callout.dart'; +import '../../components/card/card.dart'; +import '../../components/checkbox/checkbox.dart'; +import '../../components/chip/chip.dart'; +import '../../components/dialog/dialog.dart'; +import '../../components/divider/divider.dart'; +import '../../components/icon_button/icon_button.dart'; +import '../../components/menu_item/menu_item.dart'; +import '../../components/progress/progress.dart'; +import '../../components/radio/radio.dart'; +import '../../components/scaffold/scaffold.dart'; +import '../../components/segmented_control/segmented_control.dart'; +import '../../components/select/select.dart'; +import '../../components/slider/slider.dart'; +import '../../components/spinner/spinner.dart'; +import '../../components/switch/switch.dart'; +import '../../components/textfield/textfield.dart'; +import '../../components/toast/toast.dart'; + +class RemixComponentTheme { + final AccordionStyle accordion; + final AvatarStyle avatar; + final BadgeStyle badge; + final ButtonStyle button; + final CalloutStyle callout; + final CardStyle card; + final CheckboxStyle checkbox; + final DialogStyle dialog; + final ChipStyle chip; + final DividerStyle divider; + final IconButtonStyle iconButton; + final MenuItemStyle menuItem; + final ProgressStyle progress; + final RadioStyle radio; + final ScaffoldStyle scaffold; + final SegmentedControlStyle segmentedControl; + final SelectStyle select; + final SpinnerStyle spinner; + final SwitchStyle switchComponent; + final TextFieldStyle textField; + final ToastStyle toast; + final SliderStyle slider; + + const RemixComponentTheme({ + required this.accordion, + required this.avatar, + required this.badge, + required this.button, + required this.callout, + required this.card, + required this.checkbox, + required this.dialog, + required this.chip, + required this.divider, + required this.iconButton, + required this.menuItem, + required this.progress, + required this.radio, + required this.scaffold, + required this.segmentedControl, + required this.select, + required this.spinner, + required this.switchComponent, + required this.textField, + required this.toast, + required this.slider, + }); + + factory RemixComponentTheme.light() { + return const RemixComponentTheme( + accordion: AccordionStyle(), + avatar: AvatarStyle(), + badge: BadgeStyle(), + button: ButtonStyle(), + callout: CalloutStyle(), + card: CardStyle(), + checkbox: CheckboxStyle(), + dialog: DialogStyle(), + chip: ChipStyle(), + divider: DividerStyle(), + iconButton: IconButtonStyle(), + menuItem: MenuItemStyle(), + progress: ProgressStyle(), + radio: RadioStyle(), + scaffold: ScaffoldStyle(), + segmentedControl: SegmentedControlStyle(), + select: SelectStyle(), + spinner: SpinnerStyle(), + switchComponent: SwitchStyle(), + textField: TextFieldStyle(), + toast: ToastStyle(), + slider: SliderStyle(), + ); + } + + factory RemixComponentTheme.dark() { + return RemixComponentTheme.light().copyWith( + accordion: const AccordionDarkStyle(), + avatar: const AvatarDarkStyle(), + badge: const BadgeDarkStyle(), + button: const ButtonDarkStyle(), + callout: const CalloutDarkStyle(), + card: const CardDarkStyle(), + checkbox: const CheckboxDarkStyle(), + dialog: const DialogDarkStyle(), + chip: const ChipDarkStyle(), + divider: const DividerDarkStyle(), + iconButton: const IconButtonDarkStyle(), + menuItem: const MenuItemDarkStyle(), + progress: const ProgressDarkStyle(), + radio: const RadioDarkStyle(), + scaffold: const ScaffoldDarkStyle(), + segmentedControl: const SegmentedControlDarkStyle(), + select: const SelectDarkStyle(), + spinner: const SpinnerDarkStyle(), + switchComponent: const SwitchDarkStyle(), + textField: const TextFieldDarkStyle(), + slider: const SliderDarkStyle(), + ); + } + + RemixComponentTheme copyWith({ + AccordionStyle? accordion, + AvatarStyle? avatar, + BadgeStyle? badge, + ButtonStyle? button, + CalloutStyle? callout, + CardStyle? card, + CheckboxStyle? checkbox, + DialogStyle? dialog, + ChipStyle? chip, + DividerStyle? divider, + IconButtonStyle? iconButton, + MenuItemStyle? menuItem, + ProgressStyle? progress, + RadioStyle? radio, + ScaffoldStyle? scaffold, + SegmentedControlStyle? segmentedControl, + SelectStyle? select, + SpinnerStyle? spinner, + SwitchStyle? switchComponent, + TextFieldStyle? textField, + ToastStyle? toast, + SliderStyle? slider, + }) { + return RemixComponentTheme( + accordion: accordion ?? this.accordion, + avatar: avatar ?? this.avatar, + badge: badge ?? this.badge, + button: button ?? this.button, + callout: callout ?? this.callout, + card: card ?? this.card, + checkbox: checkbox ?? this.checkbox, + dialog: dialog ?? this.dialog, + chip: chip ?? this.chip, + divider: divider ?? this.divider, + iconButton: iconButton ?? this.iconButton, + menuItem: menuItem ?? this.menuItem, + progress: progress ?? this.progress, + radio: radio ?? this.radio, + scaffold: scaffold ?? this.scaffold, + segmentedControl: segmentedControl ?? this.segmentedControl, + select: select ?? this.select, + spinner: spinner ?? this.spinner, + switchComponent: switchComponent ?? this.switchComponent, + textField: textField ?? this.textField, + toast: toast ?? this.toast, + slider: slider ?? this.slider, + ); + } +} diff --git a/packages/remix/lib/src/core/theme/remix_theme.dart b/packages/remix/lib/src/core/theme/remix_theme.dart new file mode 100644 index 000000000..5bd02234e --- /dev/null +++ b/packages/remix/lib/src/core/theme/remix_theme.dart @@ -0,0 +1,118 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import 'component.dart'; + +class RemixThemeData { + final RemixComponentTheme components; + final MixThemeData tokens; + + const RemixThemeData({required this.components, required this.tokens}); + + static RemixThemeData base() => RemixThemeData( + components: RemixComponentTheme.light(), + tokens: const MixThemeData.empty(), + ); + + @override + bool operator ==(Object other) { + if (identical(this, other)) return true; + + return other is RemixThemeData && + other.components == components && + other.tokens == tokens; + } + + @override + int get hashCode => components.hashCode ^ tokens.hashCode; +} + +enum ThemeMode { + light, + dark, +} + +class RemixTheme extends StatelessWidget { + const RemixTheme({ + super.key, + required this.theme, + required this.child, + this.themeMode, + this.darkTheme, + }); + + static RemixThemeData of(BuildContext context) { + final _RemixThemeInherited? provider = + context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); + + if (provider == null) { + throw FlutterError( + 'RemixTheme.of() called with a context that does not contain a RemixTheme.\n' + 'No RemixTheme ancestor could be found starting from the context that was passed to RemixTheme.of(). ' + 'This can happen because the context you used comes from a widget above the RemixTheme.\n' + 'The context used was:\n' + ' $context', + ); + } + + return provider.data; + } + + static RemixThemeData? maybeOf(BuildContext context) { + return context + .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() + ?.data; + } + + final ThemeMode? themeMode; + + final RemixThemeData? theme; + + final RemixThemeData? darkTheme; + final Widget child; + + RemixThemeData get _defaultThemeDark => RemixThemeData.base(); + RemixThemeData get _defaultThemeLight => RemixThemeData.base(); + + RemixThemeData _defineRemixThemeData(BuildContext context) { + if (themeMode != null) { + return themeMode == ThemeMode.dark + ? (darkTheme ?? _defaultThemeDark) + : (theme ?? _defaultThemeLight); + } + + final brightness = MediaQuery.platformBrightnessOf(context); + final isDark = brightness == Brightness.dark; + + return isDark + ? (darkTheme ?? _defaultThemeDark) + : (theme ?? _defaultThemeLight); + } + + @override + Widget build(BuildContext context) { + final theme = _defineRemixThemeData(context); + final tokens = theme.tokens; + + return MixTheme( + data: tokens, + child: _RemixThemeInherited(data: theme, child: child), + ); + } +} + +class _RemixThemeInherited extends InheritedWidget { + const _RemixThemeInherited({required this.data, required super.child}); + + final RemixThemeData data; + + @override + bool updateShouldNotify(_RemixThemeInherited oldWidget) { + return data != oldWidget.data; + } +} + +extension BuildContextRemixThemeX on BuildContext { + RemixThemeData get remix => RemixTheme.of(this); +} diff --git a/packages/remix/lib/src/theme.dart b/packages/remix/lib/src/theme.dart deleted file mode 100644 index 66edc9872..000000000 --- a/packages/remix/lib/src/theme.dart +++ /dev/null @@ -1,67 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; -import 'package:mix_annotations/mix_annotations.dart'; - -part 'theme.g.dart'; - -@MixableToken(Color) -class ColorTokens { - final Color primary; - final Color secondary; - final Color tertiary; - - const ColorTokens({ - required this.primary, - required this.secondary, - required this.tertiary, - }); - - Map get data => _$ColorTokensToMap(this); -} - -@MixableToken(TextStyle) -class TextTokens { - final TextStyle h1; - final TextStyle h2; - final TextStyle h3; - final TextStyle body; - - const TextTokens({ - required this.h1, - required this.h2, - required this.h3, - required this.body, - }); - - Map get data => _$TextTokensToMap(this); -} - -@MixableToken(Radius) -class RadiusTokens { - final Radius small; - final Radius medium; - final Radius large; - - const RadiusTokens({ - required this.small, - required this.medium, - required this.large, - }); - - Map get data => _$RadiusTokensToMap(this); -} - -@MixableToken(double) -class SpaceTokens { - final double p8; - final double p16; - final double p24; - - const SpaceTokens({ - required this.p8, - required this.p16, - required this.p24, - }); - - Map get data => _$SpaceTokensToMap(this); -} diff --git a/packages/remix/lib/src/theme.g.dart b/packages/remix/lib/src/theme.g.dart deleted file mode 100644 index a39534928..000000000 --- a/packages/remix/lib/src/theme.g.dart +++ /dev/null @@ -1,171 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'theme.dart'; - -// ************************************************************************** -// MixableTokensGenerator -// ************************************************************************** - -class _$ColorTokensStruct { - _$ColorTokensStruct(); - - final ColorToken primary = const ColorToken('primary'); - final ColorToken secondary = const ColorToken('secondary'); - final ColorToken tertiary = const ColorToken('tertiary'); -} - -final _structColorTokens = _$ColorTokensStruct(); - -Map _$ColorTokensToMap(ColorTokens tokens) { - return { - _structColorTokens.primary: tokens.primary, - _structColorTokens.secondary: tokens.secondary, - _structColorTokens.tertiary: tokens.tertiary, - }; -} - -extension $ColorTokensColorUtilityX on ColorUtility { - T $primary() => ref(_structColorTokens.primary); - T $secondary() => ref(_structColorTokens.secondary); - T $tertiary() => ref(_structColorTokens.tertiary); -} - -class BuildContextColorTokensMethods { - const BuildContextColorTokensMethods(this.context); - - final BuildContext context; - Color primary() => _structColorTokens.primary.resolve(context); - Color secondary() => _structColorTokens.secondary.resolve(context); - Color tertiary() => _structColorTokens.tertiary.resolve(context); -} - -extension $BuildContextColorTokensX on BuildContext { - BuildContextColorTokensMethods get $color => - BuildContextColorTokensMethods(this); -} - -class _$TextTokensStruct { - _$TextTokensStruct(); - - final TextStyleToken h1 = const TextStyleToken('h1'); - final TextStyleToken h2 = const TextStyleToken('h2'); - final TextStyleToken h3 = const TextStyleToken('h3'); - final TextStyleToken body = const TextStyleToken('body'); -} - -final _structTextTokens = _$TextTokensStruct(); - -Map _$TextTokensToMap(TextTokens tokens) { - return { - _structTextTokens.h1: tokens.h1, - _structTextTokens.h2: tokens.h2, - _structTextTokens.h3: tokens.h3, - _structTextTokens.body: tokens.body, - }; -} - -extension $TextTokensTextStyleUtilityX - on TextStyleUtility { - T $h1() => ref(_structTextTokens.h1); - T $h2() => ref(_structTextTokens.h2); - T $h3() => ref(_structTextTokens.h3); - T $body() => ref(_structTextTokens.body); -} - -class BuildContextTextTokensMethods { - const BuildContextTextTokensMethods(this.context); - - final BuildContext context; - TextStyle h1() => _structTextTokens.h1.resolve(context); - TextStyle h2() => _structTextTokens.h2.resolve(context); - TextStyle h3() => _structTextTokens.h3.resolve(context); - TextStyle body() => _structTextTokens.body.resolve(context); -} - -extension $BuildContextTextTokensX on BuildContext { - BuildContextTextTokensMethods get $textStyle => - BuildContextTextTokensMethods(this); -} - -class _$RadiusTokensStruct { - _$RadiusTokensStruct(); - - final RadiusToken small = const RadiusToken('small'); - final RadiusToken medium = const RadiusToken('medium'); - final RadiusToken large = const RadiusToken('large'); -} - -final _structRadiusTokens = _$RadiusTokensStruct(); - -Map _$RadiusTokensToMap(RadiusTokens tokens) { - return { - _structRadiusTokens.small: tokens.small, - _structRadiusTokens.medium: tokens.medium, - _structRadiusTokens.large: tokens.large, - }; -} - -extension $RadiusTokensRadiusUtilityX on RadiusUtility { - T $small() => ref(_structRadiusTokens.small); - T $medium() => ref(_structRadiusTokens.medium); - T $large() => ref(_structRadiusTokens.large); -} - -class BuildContextRadiusTokensMethods { - const BuildContextRadiusTokensMethods(this.context); - - final BuildContext context; - Radius small() => _structRadiusTokens.small.resolve(context); - Radius medium() => _structRadiusTokens.medium.resolve(context); - Radius large() => _structRadiusTokens.large.resolve(context); -} - -extension $BuildContextRadiusTokensX on BuildContext { - BuildContextRadiusTokensMethods get $radius => - BuildContextRadiusTokensMethods(this); -} - -class _$SpaceTokensStruct { - _$SpaceTokensStruct(); - - final SpaceToken p8 = const SpaceToken('p8'); - final SpaceToken p16 = const SpaceToken('p16'); - final SpaceToken p24 = const SpaceToken('p24'); -} - -final _structSpaceTokens = _$SpaceTokensStruct(); - -Map _$SpaceTokensToMap(SpaceTokens tokens) { - return { - _structSpaceTokens.p8: tokens.p8, - _structSpaceTokens.p16: tokens.p16, - _structSpaceTokens.p24: tokens.p24, - }; -} - -extension $SpaceTokensSpacingSideUtilityX - on SpacingSideUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -extension $SpaceTokensGapUtilityX on GapUtility { - T $p8() => ref(_structSpaceTokens.p8); - T $p16() => ref(_structSpaceTokens.p16); - T $p24() => ref(_structSpaceTokens.p24); -} - -class BuildContextSpaceTokensMethods { - const BuildContextSpaceTokensMethods(this.context); - - final BuildContext context; - double p8() => _structSpaceTokens.p8.resolve(context); - double p16() => _structSpaceTokens.p16.resolve(context); - double p24() => _structSpaceTokens.p24.resolve(context); -} - -extension $BuildContextSpaceTokensX on BuildContext { - BuildContextSpaceTokensMethods get $space => - BuildContextSpaceTokensMethods(this); -} diff --git a/packages/remix/lib/src/theme/remix_theme.dart b/packages/remix/lib/src/theme/remix_theme.dart deleted file mode 100644 index 3384b8941..000000000 --- a/packages/remix/lib/src/theme/remix_theme.dart +++ /dev/null @@ -1,334 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; - -import '../components/accordion/accordion.dart'; -import '../components/avatar/avatar.dart'; -import '../components/badge/badge.dart'; -import '../components/button/button.dart'; -import '../components/callout/callout.dart'; -import '../components/card/card.dart'; -import '../components/checkbox/checkbox.dart'; -import '../components/chip/chip.dart'; -import '../components/dialog/dialog.dart'; -import '../components/divider/divider.dart'; -import '../components/icon_button/icon_button.dart'; -import '../components/menu_item/menu_item.dart'; -import '../components/progress/progress.dart'; -import '../components/radio/radio.dart'; -import '../components/scaffold/scaffold.dart'; -import '../components/segmented_control/segmented_control.dart'; -import '../components/select/select.dart'; -import '../components/slider/slider.dart'; -import '../components/spinner/spinner.dart'; -import '../components/switch/switch.dart'; -import '../components/textfield/textfield.dart'; -import '../components/toast/toast.dart'; -import 'remix_tokens.dart'; - -class RemixComponentTheme { - final AccordionStyle accordion; - final AvatarStyle avatar; - final BadgeStyle badge; - final ButtonStyle button; - final CalloutStyle callout; - final CardStyle card; - final CheckboxStyle checkbox; - final DialogStyle dialog; - final ChipStyle chip; - final DividerStyle divider; - final IconButtonStyle iconButton; - final MenuItemStyle menuItem; - final ProgressStyle progress; - final RadioStyle radio; - final ScaffoldStyle scaffold; - final SegmentedControlStyle segmentedControl; - final SelectStyle select; - final SpinnerStyle spinner; - final SwitchStyle switchComponent; - final TextFieldStyle textField; - final ToastStyle toast; - final SliderStyle slider; - - const RemixComponentTheme({ - required this.accordion, - required this.avatar, - required this.badge, - required this.button, - required this.callout, - required this.card, - required this.checkbox, - required this.dialog, - required this.chip, - required this.divider, - required this.iconButton, - required this.menuItem, - required this.progress, - required this.radio, - required this.scaffold, - required this.segmentedControl, - required this.select, - required this.spinner, - required this.switchComponent, - required this.textField, - required this.toast, - required this.slider, - }); - - factory RemixComponentTheme.baseLight() { - return const RemixComponentTheme( - accordion: AccordionStyle(), - avatar: AvatarStyle(), - badge: BadgeStyle(), - button: ButtonStyle(), - callout: CalloutStyle(), - card: CardStyle(), - checkbox: CheckboxStyle(), - dialog: DialogStyle(), - chip: ChipStyle(), - divider: DividerStyle(), - iconButton: IconButtonStyle(), - menuItem: MenuItemStyle(), - progress: ProgressStyle(), - radio: RadioStyle(), - scaffold: ScaffoldStyle(), - segmentedControl: SegmentedControlStyle(), - select: SelectStyle(), - spinner: SpinnerStyle(), - switchComponent: SwitchStyle(), - textField: TextFieldStyle(), - toast: ToastStyle(), - slider: SliderStyle(), - ); - } - - factory RemixComponentTheme.baseDark() { - return RemixComponentTheme.baseLight().copyWith( - accordion: const AccordionDarkStyle(), - avatar: const AvatarDarkStyle(), - badge: const BadgeDarkStyle(), - button: const ButtonDarkStyle(), - callout: const CalloutDarkStyle(), - card: const CardDarkStyle(), - checkbox: const CheckboxDarkStyle(), - dialog: const DialogDarkStyle(), - chip: const ChipDarkStyle(), - divider: const DividerDarkStyle(), - iconButton: const IconButtonDarkStyle(), - menuItem: const MenuItemDarkStyle(), - progress: const ProgressDarkStyle(), - radio: const RadioDarkStyle(), - scaffold: const ScaffoldDarkStyle(), - segmentedControl: const SegmentedControlDarkStyle(), - select: const SelectDarkStyle(), - spinner: const SpinnerDarkStyle(), - switchComponent: const SwitchDarkStyle(), - textField: const TextFieldDarkStyle(), - slider: const SliderDarkStyle(), - ); - } - - factory RemixComponentTheme.fortalezaLight() { - return const RemixComponentTheme( - accordion: FortalezaAccordionStyle(), - avatar: FortalezaAvatarStyle(), - badge: FortalezaBadgeStyle(), - button: FortalezaButtonStyle(), - callout: FortalezaCalloutStyle(), - card: FortalezaCardStyle(), - checkbox: FortalezaCheckboxStyle(), - dialog: FortalezaDialogStyle(), - chip: FortalezaChipStyle(), - divider: FortalezaDividerStyle(), - iconButton: FortalezaIconButtonStyle(), - menuItem: FortalezaMenuItemStyle(), - progress: FortalezaProgressStyle(), - radio: FortalezaRadioStyle(), - scaffold: FortalezaScaffoldStyle(), - segmentedControl: FortalezaSegmentedControlStyle(), - select: FortalezaSelectStyle(), - spinner: FortalezaSpinnerStyle(), - switchComponent: FortalezaSwitchStyle(), - textField: FortalezaTextFieldStyle(), - toast: FortalezaToastStyle(), - slider: FortalezaSliderStyle(), - ); - } - - factory RemixComponentTheme.fortalezaDark() { - return RemixComponentTheme.fortalezaLight().copyWith( - avatar: const FortalezaDarkAvatarStyle(), - badge: const FortalezaDarkBadgeStyle(), - segmentedControl: const FortalezaDarkSegmentedControlStyle(), - select: const FortalezaDarkSelectStyle(), - switchComponent: const FortalezaDarkSwitchStyle(), - ); - } - - RemixComponentTheme copyWith({ - AccordionStyle? accordion, - AvatarStyle? avatar, - BadgeStyle? badge, - ButtonStyle? button, - CalloutStyle? callout, - CardStyle? card, - CheckboxStyle? checkbox, - DialogStyle? dialog, - ChipStyle? chip, - DividerStyle? divider, - IconButtonStyle? iconButton, - MenuItemStyle? menuItem, - ProgressStyle? progress, - RadioStyle? radio, - ScaffoldStyle? scaffold, - SegmentedControlStyle? segmentedControl, - SelectStyle? select, - SpinnerStyle? spinner, - SwitchStyle? switchComponent, - TextFieldStyle? textField, - ToastStyle? toast, - SliderStyle? slider, - }) { - return RemixComponentTheme( - accordion: accordion ?? this.accordion, - avatar: avatar ?? this.avatar, - badge: badge ?? this.badge, - button: button ?? this.button, - callout: callout ?? this.callout, - card: card ?? this.card, - checkbox: checkbox ?? this.checkbox, - dialog: dialog ?? this.dialog, - chip: chip ?? this.chip, - divider: divider ?? this.divider, - iconButton: iconButton ?? this.iconButton, - menuItem: menuItem ?? this.menuItem, - progress: progress ?? this.progress, - radio: radio ?? this.radio, - scaffold: scaffold ?? this.scaffold, - segmentedControl: segmentedControl ?? this.segmentedControl, - select: select ?? this.select, - spinner: spinner ?? this.spinner, - switchComponent: switchComponent ?? this.switchComponent, - textField: textField ?? this.textField, - toast: toast ?? this.toast, - slider: slider ?? this.slider, - ); - } -} - -extension BuildContextRemixThemeX on BuildContext { - RemixThemeData get remix => RemixTheme.of(this); -} - -class RemixThemeData { - final RemixComponentTheme components; - final RemixTokens tokens; - const RemixThemeData({required this.components, required this.tokens}); - - static RemixThemeData base() => RemixThemeData( - components: RemixComponentTheme.baseLight(), - tokens: RemixTokens.base(), - ); - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - - return other is RemixThemeData && - other.components == components && - other.tokens == tokens; - } - - @override - int get hashCode => components.hashCode ^ tokens.hashCode; -} - -enum ThemeMode { - light, - dark, -} - -class RemixTheme extends StatelessWidget { - const RemixTheme({ - super.key, - required this.theme, - required this.child, - this.themeMode, - this.darkTheme, - }); - - static RemixThemeData of(BuildContext context) { - final _RemixThemeInherited? provider = - context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); - - if (provider == null) { - throw FlutterError( - 'RemixTheme.of() called with a context that does not contain a RemixTheme.\n' - 'No RemixTheme ancestor could be found starting from the context that was passed to RemixTheme.of(). ' - 'This can happen because the context you used comes from a widget above the RemixTheme.\n' - 'The context used was:\n' - ' $context', - ); - } - - return provider.data; - } - - static RemixThemeData? maybeOf(BuildContext context) { - return context - .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() - ?.data; - } - - final ThemeMode? themeMode; - - final RemixThemeData? theme; - - final RemixThemeData? darkTheme; - final Widget child; - - RemixThemeData get _defaultThemeDark => RemixThemeData.base(); - RemixThemeData get _defaultThemeLight => RemixThemeData.base(); - - RemixThemeData _defineRemixThemeData(BuildContext context) { - if (themeMode != null) { - return themeMode == ThemeMode.dark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - final brightness = MediaQuery.platformBrightnessOf(context); - final isDark = brightness == Brightness.dark; - - return isDark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - @override - Widget build(BuildContext context) { - final theme = _defineRemixThemeData(context); - final tokens = theme.tokens; - - return MixTheme( - data: MixThemeData( - colors: tokens.colors, - spaces: tokens.spaces, - textStyles: tokens.textStyles, - radii: tokens.radii, - ), - child: _RemixThemeInherited(data: theme, child: child), - ); - } -} - -class _RemixThemeInherited extends InheritedWidget { - const _RemixThemeInherited({required super.child, required this.data}); - - final RemixThemeData data; - - @override - bool updateShouldNotify(_RemixThemeInherited oldWidget) { - return data != oldWidget.data; - } -} diff --git a/packages/remix/lib/src/theme/remix_tokens.dart b/packages/remix/lib/src/theme/remix_tokens.dart deleted file mode 100644 index ba02d8af1..000000000 --- a/packages/remix/lib/src/theme/remix_tokens.dart +++ /dev/null @@ -1,66 +0,0 @@ -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; - -import '../helpers/color_palette.dart'; - -part 'tokens/color_tokens.dart'; -part 'tokens/radius_tokens.dart'; -part 'tokens/space_tokens.dart'; -part 'tokens/text_style_tokens.dart'; - -final $rx = _RemixTokenRef(); - -class _RemixTokenRef { - final color = RemixColors(); - final space = RemixSpace(); - final radii = RemixRadius(); - final text = RemixTypography(); - - _RemixTokenRef(); -} - -final light = RemixTokens( - colors: remixColorTokens, - textStyles: remixTextTokens, - spaces: remixSpaceTokens, - radii: remixRadiusTokens, -); - -final dark = RemixTokens( - colors: remixDarkColorTokens, - textStyles: remixTextTokens, - spaces: remixSpaceTokens, - radii: remixRadiusTokens, -); - -class RemixTokens { - final Map colors; - final Map textStyles; - final Map spaces; - final Map radii; - - const RemixTokens({ - required this.colors, - required this.textStyles, - required this.spaces, - required this.radii, - }); - - static RemixTokens base() { - return const RemixTokens( - colors: {}, - textStyles: {}, - spaces: {}, - radii: {}, - ); - } - - MixThemeData toThemeData() { - return MixThemeData( - colors: colors, - spaces: spaces, - textStyles: textStyles, - radii: radii, - ); - } -} diff --git a/packages/remix/lib/src/theme/tokens/color_tokens.dart b/packages/remix/lib/src/theme/tokens/color_tokens.dart deleted file mode 100644 index b6348a7ef..000000000 --- a/packages/remix/lib/src/theme/tokens/color_tokens.dart +++ /dev/null @@ -1,66 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixColors { - final _blackColor = const ColorToken('--black'); - final _whiteColor = const ColorToken('--white'); - final _accentSwatch = ColorSwatchToken.scale('--accent', 12); - final _accentAlphaSwatch = ColorSwatchToken.scale('--accent-alpha', 12); - - final _neutralSwatch = ColorSwatchToken.scale('--neutral', 12); - final _neutralAlphaSwatch = ColorSwatchToken.scale('--neutral-alpha', 12); - - RemixColors(); - - ColorToken black() => _blackColor; - ColorToken white() => _whiteColor; - - ColorToken accent([int? step]) { - return step == null ? _accentSwatch : _accentSwatch[step]; - } - - ColorToken accentAlpha([int? step]) { - return step == null ? _accentAlphaSwatch : _accentAlphaSwatch[step]; - } - - ColorToken neutral([int? step]) { - return step == null ? _neutralSwatch : _neutralSwatch[step]; - } - - ColorToken neutralAlpha([int? step]) { - return step == null ? _neutralAlphaSwatch : _neutralAlphaSwatch[step]; - } -} - -Map _mapColorRadixTokens({ - required RadixColors accent, - required RadixColors neutral, -}) { - final remix = RemixColors(); - - return { - remix._whiteColor: const Color(0xFFFFFFFF), - remix._blackColor: const Color(0xFF1C2024), - remix._accentSwatch: accent.swatch, - remix._accentAlphaSwatch: accent.alphaSwatch, - remix._neutralSwatch: neutral.swatch, - remix._neutralAlphaSwatch: neutral.alphaSwatch, - }; -} - -final remixColorTokens = _mapColorRadixTokens( - accent: RadixColors.indigo, - neutral: RadixColors.slate, -); -final remixDarkColorTokens = _mapColorRadixTokens( - accent: RadixColors.indigoDark, - neutral: RadixColors.slateDark, -); - -extension ColorUtilityX on ColorUtility { - T $black() => ref($rx.color.black()); - T $white() => ref($rx.color.white()); - T $neutral([int? step]) => ref($rx.color.neutral(step)); - T $neutralAlpha([int? step]) => ref($rx.color.neutralAlpha(step)); - T $accent([int? step]) => ref($rx.color.accent(step)); - T $accentAlpha([int? step]) => ref($rx.color.accentAlpha(step)); -} \ No newline at end of file diff --git a/packages/remix/lib/src/theme/tokens/radius_tokens.dart b/packages/remix/lib/src/theme/tokens/radius_tokens.dart deleted file mode 100644 index 2b7a68304..000000000 --- a/packages/remix/lib/src/theme/tokens/radius_tokens.dart +++ /dev/null @@ -1,34 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixRadius { - final radius1 = const RadiusToken('--radius-1'); - final radius2 = const RadiusToken('--radius-2'); - final radius3 = const RadiusToken('--radius-3'); - final radius4 = const RadiusToken('--radius-4'); - final radius5 = const RadiusToken('--radius-5'); - final radius6 = const RadiusToken('--radius-6'); - - RemixRadius(); - - RadiusToken call([int step = 1]) { - if (step < 1 || step > 6) { - throw ArgumentError('Invalid space step: $step'); - } - - return RadiusToken('--radius-$step'); - } -} - -final _r = RemixRadius(); -final remixRadiusTokens = { - _r.radius1: const Radius.circular(4), - _r.radius2: const Radius.circular(8), - _r.radius3: const Radius.circular(12), - _r.radius4: const Radius.circular(16), - _r.radius5: const Radius.circular(24), - _r.radius6: const Radius.circular(32), -}; - -extension RadiusUtilityX on RadiusUtility { - T $radius(int step) => ref($rx.radii(step)); -} diff --git a/packages/remix/lib/src/theme/tokens/space_tokens.dart b/packages/remix/lib/src/theme/tokens/space_tokens.dart deleted file mode 100644 index 68f2282fb..000000000 --- a/packages/remix/lib/src/theme/tokens/space_tokens.dart +++ /dev/null @@ -1,55 +0,0 @@ -part of '../remix_tokens.dart'; - -class RemixSpace { - final space1 = const SpaceToken('--space-1'); - final space2 = const SpaceToken('--space-2'); - final space3 = const SpaceToken('--space-3'); - final space4 = const SpaceToken('--space-4'); - final space5 = const SpaceToken('--space-5'); - final space6 = const SpaceToken('--space-6'); - final space7 = const SpaceToken('--space-7'); - final space8 = const SpaceToken('--space-8'); - final space9 = const SpaceToken('--space-9'); - - RemixSpace(); - - operator [](int index) { - return call(index); - } - - SpaceToken call(int step) { - return switch (step) { - 1 => space1, - 2 => space2, - 3 => space3, - 4 => space4, - 5 => space5, - 6 => space6, - 7 => space7, - 8 => space8, - 9 => space9, - _ => throw ArgumentError('Invalid space step: $step'), - }; - } -} - -final _s = RemixSpace(); -final remixSpaceTokens = { - _s.space1: 4.0, - _s.space2: 8.0, - _s.space3: 12.0, - _s.space4: 16.0, - _s.space5: 24.0, - _s.space6: 32.0, - _s.space7: 40.0, - _s.space8: 48.0, - _s.space9: 64.0, -}; - -extension SpacingSideUtilityX on SpacingSideUtility { - T $space(int step) => ref($rx.space(step)); -} - -extension GapUtilityX on GapUtility { - T $space(int step) => ref($rx.space(step)); -} diff --git a/packages/remix/lib/src/theme/tokens/text_style_tokens.dart b/packages/remix/lib/src/theme/tokens/text_style_tokens.dart deleted file mode 100644 index 37f3099f7..000000000 --- a/packages/remix/lib/src/theme/tokens/text_style_tokens.dart +++ /dev/null @@ -1,85 +0,0 @@ -// ignore_for_file: unnecessary-trailing-comma - -part of '../remix_tokens.dart'; - -class RemixTypography { - final text1 = const TextStyleToken('--text-1'); - final text2 = const TextStyleToken('--text-2'); - final text3 = const TextStyleToken('--text-3'); - final text4 = const TextStyleToken('--text-4'); - final text5 = const TextStyleToken('--text-5'); - final text6 = const TextStyleToken('--text-6'); - final text7 = const TextStyleToken('--text-7'); - final text8 = const TextStyleToken('--text-8'); - final text9 = const TextStyleToken('--text-9'); - - RemixTypography(); - - TextStyleToken call(int level) { - return switch (level) { - 1 => text1, - 2 => text2, - 3 => text3, - 4 => text4, - 5 => text5, - 6 => text6, - 7 => text7, - 8 => text8, - 9 => text9, - _ => throw ArgumentError('Invalid text level: $level'), - }; - } -} - -final _t = RemixTypography(); -final remixTextTokens = { - _t.text1: const TextStyle( - fontSize: 12, - letterSpacing: 0.0025, - height: 1.33, - ), - _t.text2: const TextStyle( - fontSize: 14, - letterSpacing: 0, - height: 1.43, - ), - _t.text3: const TextStyle( - fontSize: 16, - letterSpacing: 0, - height: 1.50, - ), - _t.text4: const TextStyle( - fontSize: 18, - letterSpacing: -0.0025, - height: 1.44, - ), - _t.text5: const TextStyle( - fontSize: 20, - letterSpacing: -0.005, - height: 1.40, - ), - _t.text6: const TextStyle( - fontSize: 24, - letterSpacing: -0.00625, - height: 1.25, - ), - _t.text7: const TextStyle( - fontSize: 28, - letterSpacing: -0.0075, - height: 1.29, - ), - _t.text8: const TextStyle( - fontSize: 35, - letterSpacing: -0.01, - height: 1.14, - ), - _t.text9: const TextStyle( - fontSize: 60, - letterSpacing: -0.025, - height: 1.00, - ), -}; - -extension TextStyleUtilityX on TextStyleUtility { - T $text(int level) => ref($rx.text(level)); -} diff --git a/packages/remix/lib/src/components/accordion/accordion_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart similarity index 85% rename from packages/remix/lib/src/components/accordion/accordion_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart index 51d474c20..b0134df22 100644 --- a/packages/remix/lib/src/components/accordion/accordion_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart @@ -1,4 +1,8 @@ -part of 'accordion.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/accordion/accordion.dart'; +import '../tokens.dart'; class FortalezaAccordionStyle extends AccordionStyle { const FortalezaAccordionStyle(); @@ -19,12 +23,12 @@ class FortalezaAccordionStyle extends AccordionStyle { ..shape.roundedRectangle.side.color.blue() ..border.all.color.$neutral(7) ..border.all.color.withOpacity(1) - ..borderRadius.all.$radius(2) + ..borderRadius.all.$radius2() ..color.$neutral(2), // Header $.header.chain - ..container.padding.horizontal.$space(4) + ..container.padding.horizontal.$space4() ..text.style.fontWeight.w400() ..text.style.color.$neutral(12) ..trailingIcon.color.$neutral(10) @@ -33,7 +37,7 @@ class FortalezaAccordionStyle extends AccordionStyle { ..container.animated.duration(const Duration(milliseconds: 100)), $.contentContainer.chain - ..padding.all.$space(3) + ..padding.all.$space3() ..border.style.none() ..border.top.color.$neutral(6) ..animated.curve.spring(stiffness: 100) diff --git a/packages/remix/lib/src/components/avatar/avatar_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart similarity index 90% rename from packages/remix/lib/src/components/avatar/avatar_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart index b230f5fbd..07e07ce0f 100644 --- a/packages/remix/lib/src/components/avatar/avatar_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart @@ -1,4 +1,7 @@ -part of 'avatar.dart'; +import 'package:mix/mix.dart'; + +import '../../../../themes/fortaleza.dart'; +import '../../../components/avatar/avatar.dart'; class FortalezaAvatarStyle extends AvatarStyle { static const soft = Variant('avatar.soft'); diff --git a/packages/remix/lib/src/components/badge/badge_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart similarity index 90% rename from packages/remix/lib/src/components/badge/badge_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart index 0606bc602..18ca22569 100644 --- a/packages/remix/lib/src/components/badge/badge_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart @@ -1,4 +1,7 @@ -part of 'badge.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/badge/badge.dart'; +import '../tokens.dart'; class FortalezaBadgeStyle extends BadgeStyle { static const soft = Variant('for.badge.soft'); @@ -16,9 +19,9 @@ class FortalezaBadgeStyle extends BadgeStyle { final baseStyle = super.makeStyle(spec); final baseStyleOverride = Style( $.container.chain - ..borderRadius.all.$radius(1) - ..padding.horizontal.$space(2) - ..padding.vertical.$space(1) + ..borderRadius.all.$radius1() + ..padding.horizontal.$space2() + ..padding.vertical.$space1() ..color.$accent(), $.label.style.color.$neutral(1), ); diff --git a/packages/remix/lib/src/components/button/button_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart similarity index 92% rename from packages/remix/lib/src/components/button/button_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/button_theme.dart index 1dde4cf16..334d4656e 100644 --- a/packages/remix/lib/src/components/button/button_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart @@ -1,4 +1,7 @@ -part of 'button.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/button/button.dart'; +import '../tokens.dart'; class FortalezaButtonStyle extends ButtonStyle { static const soft = Variant('for.button.soft'); @@ -18,10 +21,10 @@ class FortalezaButtonStyle extends ButtonStyle { final baseOverrides = Style( baseStyle(), $.container.chain - ..padding.vertical.$space(2) - ..padding.horizontal.$space(3) - ..flex.gap.$space(2), - $.label.style.$text(2), + ..padding.vertical.$space2() + ..padding.horizontal.$space3() + ..flex.gap.$space2(), + $.label.style.$text2(), $.icon.size(14), $.spinner.size(14), ); diff --git a/packages/remix/lib/src/components/callout/callout_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart similarity index 91% rename from packages/remix/lib/src/components/callout/callout_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart index 4acf4b753..de17d3e92 100644 --- a/packages/remix/lib/src/components/callout/callout_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart @@ -1,4 +1,7 @@ -part of 'callout.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/callout/callout.dart'; +import '../tokens.dart'; class FortalezaCalloutStyle extends CalloutStyle { static const surface = Variant('for.callout.surface'); @@ -21,7 +24,7 @@ class FortalezaCalloutStyle extends CalloutStyle { ..border.all.width(0) ..border.all.style.none() ..padding(16) - ..flex.gap.$space(3) + ..flex.gap.$space3() ..flex.crossAxisAlignment.center() ..flex.mainAxisAlignment.start(), $.icon.chain diff --git a/packages/remix/lib/src/components/card/card_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart similarity index 83% rename from packages/remix/lib/src/components/card/card_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/card_theme.dart index 53fb0dfdb..62d1f8816 100644 --- a/packages/remix/lib/src/components/card/card_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart @@ -1,4 +1,7 @@ -part of 'card.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/card/card.dart'; +import '../tokens.dart'; class FortalezaCardStyle extends CardStyle { static const ghost = Variant('ghost'); @@ -15,8 +18,8 @@ class FortalezaCardStyle extends CardStyle { final surfaceVariant = Style( $.container.chain - ..padding.all.$space(3) - ..borderRadius.all.$radius(2) + ..padding.all.$space3() + ..borderRadius.all.$radius2() ..border.all.color.$neutral(6) ..color.$neutral(1), spec.on.hover($.container.border.color.$neutral(8)), diff --git a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart similarity index 94% rename from packages/remix/lib/src/components/checkbox/checkbox_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart index b03320642..7f2dab979 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart @@ -1,4 +1,8 @@ -part of 'checkbox.dart'; +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/checkbox/checkbox.dart'; +import '../tokens.dart'; class FortalezaCheckboxStyle extends CheckboxStyle { static const soft = Variant('for.checkbox.soft'); diff --git a/packages/remix/lib/src/components/chip/chip_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart similarity index 92% rename from packages/remix/lib/src/components/chip/chip_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart index a460e8ac8..40799083a 100644 --- a/packages/remix/lib/src/components/chip/chip_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart @@ -1,4 +1,7 @@ -part of 'chip.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/chip/chip.dart'; +import '../tokens.dart'; class FortalezaChipStyle extends ChipStyle { static const ghost = Variant('for.chip.ghost'); @@ -15,13 +18,13 @@ class FortalezaChipStyle extends ChipStyle { final labelStyle = [ $.label.chain - ..style.$text(2) + ..style.$text2() ..style.color.$accent(), ]; final containerStyle = [ $.container.chain - ..flex.gap.$space(2) + ..flex.gap.$space2() ..borderRadius(20) ..color.$accent(2) ..border.color.$accent(6) diff --git a/packages/remix/lib/src/themes/fortaleza/components/components.dart b/packages/remix/lib/src/themes/fortaleza/components/components.dart new file mode 100644 index 000000000..60ef3d53b --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/components/components.dart @@ -0,0 +1,104 @@ +import '../../../components/accordion/accordion.dart'; +import '../../../components/avatar/avatar.dart'; +import '../../../components/badge/badge.dart'; +import '../../../components/button/button.dart'; +import '../../../components/callout/callout.dart'; +import '../../../components/card/card.dart'; +import '../../../components/checkbox/checkbox.dart'; +import '../../../components/chip/chip.dart'; +import '../../../components/dialog/dialog.dart'; +import '../../../components/divider/divider.dart'; +import '../../../components/icon_button/icon_button.dart'; +import '../../../components/menu_item/menu_item.dart'; +import '../../../components/progress/progress.dart'; +import '../../../components/radio/radio.dart'; +import '../../../components/scaffold/scaffold.dart'; +import '../../../components/segmented_control/segmented_control.dart'; +import '../../../components/select/select.dart'; +import '../../../components/slider/slider.dart'; +import '../../../components/spinner/spinner.dart'; +import '../../../components/switch/switch.dart'; +import '../../../components/textfield/textfield.dart'; +import '../../../components/toast/toast.dart'; +import '../../../core/theme/component.dart'; +import 'accordion_theme.dart'; +import 'avatar_theme.dart'; +import 'badge_theme.dart'; +import 'button_theme.dart'; +import 'callout_theme.dart'; +import 'card_theme.dart'; +import 'checkbox_theme.dart'; +import 'chip_theme.dart'; +import 'dialog_theme.dart'; +import 'divider_theme.dart'; +import 'icon_button_theme.dart'; +import 'menu_item_theme.dart'; +import 'progress_theme.dart'; +import 'radio_theme.dart'; +import 'scaffold_theme.dart'; +import 'segmented_control_theme.dart'; +import 'select_theme.dart'; +import 'slider_theme.dart'; +import 'spinner_theme.dart'; +import 'switch_theme.dart'; +import 'textfield_theme.dart'; +import 'toast_theme.dart'; + +class FortalezaComponentTheme extends RemixComponentTheme { + static const FortalezaComponentTheme light = FortalezaComponentTheme(); + static const FortalezaComponentTheme dark = FortalezaComponentTheme( + avatar: FortalezaDarkAvatarStyle(), + badge: FortalezaDarkBadgeStyle(), + segmentedControl: FortalezaDarkSegmentedControlStyle(), + select: FortalezaDarkSelectStyle(), + switchComponent: FortalezaDarkSwitchStyle(), + ); + + const FortalezaComponentTheme({ + AccordionStyle? accordion, + AvatarStyle? avatar, + BadgeStyle? badge, + ButtonStyle? button, + CalloutStyle? callout, + CardStyle? card, + CheckboxStyle? checkbox, + DialogStyle? dialog, + ChipStyle? chip, + DividerStyle? divider, + IconButtonStyle? iconButton, + MenuItemStyle? menuItem, + ProgressStyle? progress, + RadioStyle? radio, + ScaffoldStyle? scaffold, + SegmentedControlStyle? segmentedControl, + SelectStyle? select, + SpinnerStyle? spinner, + SwitchStyle? switchComponent, + TextFieldStyle? textField, + ToastStyle? toast, + SliderStyle? slider, + }) : super( + accordion: const FortalezaAccordionStyle(), + avatar: const FortalezaAvatarStyle(), + badge: const FortalezaBadgeStyle(), + button: const FortalezaButtonStyle(), + callout: const FortalezaCalloutStyle(), + card: const FortalezaCardStyle(), + checkbox: const FortalezaCheckboxStyle(), + dialog: const FortalezaDialogStyle(), + chip: const FortalezaChipStyle(), + divider: const FortalezaDividerStyle(), + iconButton: const FortalezaIconButtonStyle(), + menuItem: const FortalezaMenuItemStyle(), + progress: const FortalezaProgressStyle(), + radio: const FortalezaRadioStyle(), + scaffold: const FortalezaScaffoldStyle(), + segmentedControl: const FortalezaSegmentedControlStyle(), + select: const FortalezaSelectStyle(), + spinner: const FortalezaSpinnerStyle(), + switchComponent: const FortalezaSwitchStyle(), + textField: const FortalezaTextFieldStyle(), + toast: const FortalezaToastStyle(), + slider: const FortalezaSliderStyle(), + ); +} diff --git a/packages/remix/lib/src/components/dialog/dialog_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart similarity index 73% rename from packages/remix/lib/src/components/dialog/dialog_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart index 7426150b4..8716ed2c4 100644 --- a/packages/remix/lib/src/components/dialog/dialog_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart @@ -1,4 +1,7 @@ -part of 'dialog.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/dialog/dialog.dart'; +import '../tokens.dart'; class FortalezaDialogStyle extends DialogStyle { const FortalezaDialogStyle(); @@ -8,17 +11,17 @@ class FortalezaDialogStyle extends DialogStyle { final $ = spec.utilities; final containerStyle = $.container.chain - ..padding.all.$space(4) - ..borderRadius.all.$radius(2) + ..padding.all.$space4() + ..borderRadius.all.$radius2() ..border.all.color.$neutral(6) ..color.$neutral(1); final titleStyle = $.title.chain - ..style.$text(5) + ..style.$text5() ..style.color.$neutral(12); final descriptionStyle = $.description.chain - ..style.$text(2) + ..style.$text2() ..style.color.$neutral(9); return Style.create( diff --git a/packages/remix/lib/src/components/divider/divider_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart similarity index 77% rename from packages/remix/lib/src/components/divider/divider_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart index 917503a95..e8492d36e 100644 --- a/packages/remix/lib/src/components/divider/divider_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart @@ -1,4 +1,7 @@ -part of 'divider.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/divider/divider.dart'; +import '../tokens.dart'; class FortalezaDividerStyle extends DividerStyle { const FortalezaDividerStyle(); diff --git a/packages/remix/lib/src/components/icon_button/icon_button_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart similarity index 94% rename from packages/remix/lib/src/components/icon_button/icon_button_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart index 53cd89894..0dae77e6e 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart @@ -1,4 +1,7 @@ -part of 'icon_button.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/icon_button/icon_button.dart'; +import '../tokens.dart'; class FortalezaIconButtonStyle extends IconButtonStyle { static const soft = Variant('for.button.soft'); @@ -17,7 +20,7 @@ class FortalezaIconButtonStyle extends IconButtonStyle { final baseStyle = super.makeStyle(spec); final baseOverrides = Style( baseStyle(), - $.container.padding.all.$space(2), + $.container.padding.all.$space2(), $.icon.size(16), $.spinner.size(14), ); diff --git a/packages/remix/lib/src/components/menu_item/menu_item_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart similarity index 78% rename from packages/remix/lib/src/components/menu_item/menu_item_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart index bf9b0bc71..1bb2ab762 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart @@ -1,4 +1,7 @@ -part of 'menu_item.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/menu_item/menu_item.dart'; +import '../tokens.dart'; class FortalezaMenuItemStyle extends MenuItemStyle { const FortalezaMenuItemStyle(); @@ -8,23 +11,23 @@ class FortalezaMenuItemStyle extends MenuItemStyle { final $ = spec.utilities; final baseStyle = super.makeStyle(spec); - final titleSubtitleLayout = $.titleSubtitleContainer.flex.gap.$space(1); + final titleSubtitleLayout = $.titleSubtitleContainer.flex.gap.$space1(); final title = $.title.chain - ..style.$text(2) + ..style.$text2() ..style.color.resetDirectives() ..style.color.$neutral(12); final subtitle = $.subtitle.chain - ..style.$text(1) + ..style.$text1() ..style.color.resetDirectives() ..style.color.$neutral(9); final container = $.container.chain - ..padding.all.$space(3) - ..padding.right.$space(4) - ..borderRadius.all.$radius(2) - ..flex.gap.$space(3); + ..padding.all.$space3() + ..padding.right.$space4() + ..borderRadius.all.$radius2() + ..flex.gap.$space3(); final icon = $.icon.color.$neutral(11); diff --git a/packages/remix/lib/src/components/progress/progress_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart similarity index 89% rename from packages/remix/lib/src/components/progress/progress_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart index 2d7bd0719..845152138 100644 --- a/packages/remix/lib/src/components/progress/progress_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart @@ -1,4 +1,7 @@ -part of 'progress.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/progress/progress.dart'; +import '../tokens.dart'; class FortalezaProgressStyle extends ProgressStyle { static const soft = Variant('for.progress.soft'); diff --git a/packages/remix/lib/src/components/radio/radio_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart similarity index 95% rename from packages/remix/lib/src/components/radio/radio_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart index a89332c5e..d42ffc972 100644 --- a/packages/remix/lib/src/components/radio/radio_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart @@ -1,4 +1,7 @@ -part of 'radio.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/radio/radio.dart'; +import '../tokens.dart'; class FortalezaRadioStyle extends RadioStyle { static const soft = Variant('for.radio.soft'); diff --git a/packages/remix/lib/src/components/scaffold/scaffold_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart similarity index 70% rename from packages/remix/lib/src/components/scaffold/scaffold_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart index a32bd219d..7b8c3609e 100644 --- a/packages/remix/lib/src/components/scaffold/scaffold_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart @@ -1,4 +1,7 @@ -part of 'scaffold.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/scaffold/scaffold.dart'; +import '../tokens.dart'; class FortalezaScaffoldStyle extends ScaffoldStyle { const FortalezaScaffoldStyle(); @@ -6,7 +9,7 @@ class FortalezaScaffoldStyle extends ScaffoldStyle { @override Style makeStyle(SpecConfiguration spec) { final $ = spec.utilities; - + return Style.create([$.container.color.$neutral(1)]); } } diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart similarity index 83% rename from packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart index d2f39532f..2190b55c2 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart @@ -1,4 +1,7 @@ -part of 'segmented_control.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/segmented_control/segmented_control.dart'; +import '../tokens.dart'; class FortalezaSegmentedControlStyle extends SegmentedControlStyle { const FortalezaSegmentedControlStyle(); @@ -11,7 +14,7 @@ class FortalezaSegmentedControlStyle extends SegmentedControlStyle { final style = Style( $.container.padding(0), - $.item.container.padding.vertical.$space(2), + $.item.container.padding.vertical.$space2(), $.showDivider.on(), $.container.color.$neutral(3), $.item.label.style.color.$neutral(11), @@ -40,9 +43,9 @@ class FortalezaDarkSegmentedControlStyle final style = Style( $.container.color.$neutral(2), - $.container.borderRadius.all.$radius(1), + $.container.borderRadius.all.$radius1(), $on.selected( - $.item.container.borderRadius.all.$radius(1), + $.item.container.borderRadius.all.$radius1(), $.item.container.color.$neutral(4), $.item.chain ..label.style.color.$neutral(12) diff --git a/packages/remix/lib/src/components/select/select_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart similarity index 93% rename from packages/remix/lib/src/components/select/select_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/select_theme.dart index e8be48577..782093b62 100644 --- a/packages/remix/lib/src/components/select/select_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart @@ -1,4 +1,7 @@ -part of 'select.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/select/select.dart'; +import '../tokens.dart'; class FortalezaSelectStyle extends SelectStyle { static const soft = Variant('for.select.soft'); @@ -20,14 +23,14 @@ class FortalezaSelectStyle extends SelectStyle { ..color.$neutral(1) ..border.all.color.$neutral(6) ..wrap.intrinsicWidth() - ..padding.all.$space(2), + ..padding.all.$space2(), $.button.chain ..container.border.all.color.$neutral(6) ..container.color.$neutral(1) ..icon.color.$accentAlpha(12) - ..container.flex.gap.$space(1) + ..container.flex.gap.$space1() ..container.flex.mainAxisSize.min(), - $.item.container.padding.horizontal.$space(3), + $.item.container.padding.horizontal.$space3(), spec.on.disabled( $.button.chain ..container.color.$neutral(2) diff --git a/packages/remix/lib/src/components/slider/slider_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart similarity index 89% rename from packages/remix/lib/src/components/slider/slider_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart index 8ac2a55a1..bc19a9152 100644 --- a/packages/remix/lib/src/components/slider/slider_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart @@ -1,4 +1,8 @@ -part of 'slider.dart'; +import 'package:flutter/animation.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/slider/slider.dart'; +import '../tokens.dart'; class FortalezaSliderStyle extends SliderStyle { const FortalezaSliderStyle(); diff --git a/packages/remix/lib/src/components/spinner/spinner_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart similarity index 82% rename from packages/remix/lib/src/components/spinner/spinner_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart index 4524f4918..c0584f05d 100644 --- a/packages/remix/lib/src/components/spinner/spinner_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart @@ -1,4 +1,7 @@ -part of 'spinner.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/spinner/spinner.dart'; +import '../tokens.dart'; class FortalezaSpinnerStyle extends SpinnerStyle { static const soft = Variant('for.spinner.soft'); diff --git a/packages/remix/lib/src/components/switch/switch_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart similarity index 95% rename from packages/remix/lib/src/components/switch/switch_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart index 81001ea90..d2dcec2e0 100644 --- a/packages/remix/lib/src/components/switch/switch_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart @@ -1,4 +1,7 @@ -part of 'switch.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/switch/switch.dart'; +import '../tokens.dart'; class FortalezaSwitchStyle extends SwitchStyle { static const soft = Variant('for.switch.soft'); diff --git a/packages/remix/lib/src/components/textfield/textfield_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart similarity index 60% rename from packages/remix/lib/src/components/textfield/textfield_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart index 7193033f6..be12d24bf 100644 --- a/packages/remix/lib/src/components/textfield/textfield_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart @@ -1,4 +1,7 @@ -part of 'textfield.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/textfield/textfield.dart'; +import '../tokens.dart'; class FortalezaTextFieldStyle extends TextFieldStyle { const FortalezaTextFieldStyle(); @@ -9,31 +12,31 @@ class FortalezaTextFieldStyle extends TextFieldStyle { final textFieldContainerStyle = $.textFieldContainer.chain ..color.$neutral(1) - ..padding.horizontal.$space(3) - ..padding.vertical.$space(2) - ..borderRadius.all.$radius(2) - ..border.all.color.$neutral(6) + ..padding.horizontal.$space3() + ..padding.vertical.$space2() + ..borderRadius.all.$radius2() + ..border.all.color.$neutral() ..border.all.strokeAlign.outside() ..shadow.color.$neutral(4) - ..flex.gap.$space(2); + ..flex.gap.$space2(); - final textStyle = [$.style.$text(2), $.style.color.$neutral(12)]; + final textStyle = [$.style.$text2(), $.style.color.$neutral()]; - final containerStyle = $.container.flex.gap.$space(2); + final containerStyle = $.container.flex.gap.$space2(); final hintStyle = [ - $.hintTextStyle.color.$neutral(9), - $.hintTextStyle.$text(2), + $.hintTextStyle.color.$neutral(), + $.hintTextStyle.$text2(), ]; final floatingHintStyle = [ - $.floatingLabelStyle.color.$neutral(9), - $.floatingLabelStyle.$text(1), + $.floatingLabelStyle.color.$neutral(), + $.floatingLabelStyle.$text1(), ]; final helperStyle = [ - $.helperText.style.color.$neutral(9), - $.helperText.style.$text(1), + $.helperText.style.color.$neutral(), + $.helperText.style.$text1(), ]; final icon = $.icon.color.$accent(); diff --git a/packages/remix/lib/src/components/toast/toast_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart similarity index 66% rename from packages/remix/lib/src/components/toast/toast_theme.dart rename to packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart index e19fe1dcd..f21828b22 100644 --- a/packages/remix/lib/src/components/toast/toast_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart @@ -1,4 +1,7 @@ -part of 'toast.dart'; +import 'package:mix/mix.dart'; + +import '../../../components/toast/toast.dart'; +import '../tokens.dart'; class FortalezaToastStyle extends ToastStyle { const FortalezaToastStyle(); @@ -8,22 +11,22 @@ class FortalezaToastStyle extends ToastStyle { final $ = spec.utilities; final containerStyle = $.container.chain - ..borderRadius.all.$radius(2) + ..borderRadius.all.$radius2() ..color.$neutral(2) ..border.all.color.$neutral(6) - ..padding.all.$space(4) - ..margin.all.$space(4) - ..flex.gap.$space(5); + ..padding.all.$space4() + ..margin.all.$space4() + ..flex.gap.$space5(); final titleSubtitleContainerStyle = - $.titleSubtitleContainer.flex.gap.$space(1); + $.titleSubtitleContainer.flex.gap.$space1(); final titleStyle = $.title.chain - ..style.$text(2) + ..style.$text2() ..style.color.$neutral(12); final subtitleStyle = $.subtitle.chain - ..style.$text(1) + ..style.$text1() ..style.color.$neutral(9); return Style.create([ diff --git a/packages/remix/lib/src/themes/fortaleza/theme.dart b/packages/remix/lib/src/themes/fortaleza/theme.dart new file mode 100644 index 000000000..3317ddf97 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/theme.dart @@ -0,0 +1,34 @@ +import '../../core/theme/remix_theme.dart'; +import 'components/components.dart'; +import 'tokens.dart'; + +class FortalezaThemeData { + final FortalezaComponentTheme components; + final FortalezaTokens tokens; + + static final FortalezaThemeData light = FortalezaThemeData( + components: FortalezaComponentTheme.light, + tokens: FortalezaTokens.light(), + ); + + static final FortalezaThemeData dark = FortalezaThemeData( + components: FortalezaComponentTheme.dark, + tokens: FortalezaTokens.dark(), + ); + + const FortalezaThemeData({required this.components, required this.tokens}); + + FortalezaThemeData copyWith({ + FortalezaComponentTheme? components, + FortalezaTokens? tokens, + }) { + return FortalezaThemeData( + components: components ?? this.components, + tokens: tokens ?? this.tokens, + ); + } + + RemixThemeData toThemeData() { + return RemixThemeData(components: components, tokens: tokens.toThemeData()); + } +} diff --git a/packages/remix/lib/src/themes/fortaleza/tokens.dart b/packages/remix/lib/src/themes/fortaleza/tokens.dart new file mode 100644 index 000000000..64664ece3 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/tokens.dart @@ -0,0 +1,201 @@ +import 'package:flutter/widgets.dart'; +import 'package:mix/mix.dart'; +import 'package:mix_annotations/mix_annotations.dart'; + +import '../../helpers/color_palette.dart'; + +part 'tokens.g.dart'; + +class FortalezaTokens { + final FortalezaColor colors; + final FortalezaRadius radii; + final FortalezaSpace spaces; + final FortalezaTextStyle textStyles; + + const FortalezaTokens({ + required this.colors, + required this.radii, + required this.spaces, + required this.textStyles, + }); + + factory FortalezaTokens.light() { + return FortalezaTokens( + colors: FortalezaColor( + black: const Color(0xFF1C2024), + white: const Color(0xFFFFFFFF), + accent: RadixColors.indigo.swatch, + accentAlpha: RadixColors.indigo.alphaSwatch, + neutral: RadixColors.slate.swatch, + neutralAlpha: RadixColors.slate.alphaSwatch, + ), + radii: const FortalezaRadius( + radius1: Radius.circular(4), + radius2: Radius.circular(8), + radius3: Radius.circular(12), + radius4: Radius.circular(16), + radius5: Radius.circular(24), + radius6: Radius.circular(32), + ), + spaces: const FortalezaSpace( + space1: 4, + space2: 8, + space3: 12, + space4: 16, + space5: 24, + space6: 32, + space7: 40, + space8: 48, + space9: 64, + ), + textStyles: const FortalezaTextStyle( + text1: TextStyle(fontSize: 12, letterSpacing: 0.0025, height: 1.33), + text2: TextStyle(fontSize: 14, letterSpacing: 0, height: 1.43), + text3: TextStyle(fontSize: 16, letterSpacing: 0, height: 1.50), + text4: TextStyle(fontSize: 18, letterSpacing: -0.0025, height: 1.44), + text5: TextStyle(fontSize: 20, letterSpacing: -0.005, height: 1.40), + text6: TextStyle(fontSize: 24, letterSpacing: -0.00625, height: 1.25), + text7: TextStyle(fontSize: 28, letterSpacing: -0.0075, height: 1.29), + text8: TextStyle(fontSize: 35, letterSpacing: -0.01, height: 1.14), + text9: TextStyle(fontSize: 60, letterSpacing: -0.025, height: 1.00), + ), + ); + } + + factory FortalezaTokens.dark() { + return FortalezaTokens.light().copyWith( + colors: FortalezaColor( + black: const Color(0xFF1C2024), + white: const Color(0xFFFFFFFF), + accent: RadixColors.indigoDark.swatch, + accentAlpha: RadixColors.indigoDark.alphaSwatch, + neutral: RadixColors.slateDark.swatch, + neutralAlpha: RadixColors.slateDark.alphaSwatch, + ), + ); + } + + MixThemeData toThemeData() { + return MixThemeData( + colors: colors.toMap, + spaces: spaces.toMap, + textStyles: textStyles.toMap, + radii: radii.toMap, + ); + } + + FortalezaTokens copyWith({ + FortalezaColor? colors, + FortalezaRadius? radii, + FortalezaSpace? spaces, + FortalezaTextStyle? textStyles, + }) { + return FortalezaTokens( + colors: colors ?? this.colors, + radii: radii ?? this.radii, + spaces: spaces ?? this.spaces, + textStyles: textStyles ?? this.textStyles, + ); + } +} + +@MixableToken(Color) +class FortalezaColor { + final Color black; + final Color white; + + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color accent; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color accentAlpha; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color neutral; + @MixableSwatchColorToken(scale: 12, defaultValue: 9) + final Color neutralAlpha; + + const FortalezaColor({ + required this.black, + required this.white, + required this.accent, + required this.accentAlpha, + required this.neutral, + required this.neutralAlpha, + }); + + Map get toMap => _$FortalezaColorToMap(this); +} + +@MixableToken(Radius) +class FortalezaRadius { + final Radius radius1; + final Radius radius2; + final Radius radius3; + final Radius radius4; + final Radius radius5; + final Radius radius6; + + const FortalezaRadius({ + required this.radius1, + required this.radius2, + required this.radius3, + required this.radius4, + required this.radius5, + required this.radius6, + }); + + Map get toMap => _$FortalezaRadiusToMap(this); +} + +@MixableToken(double) +class FortalezaSpace { + final double space1; + final double space2; + final double space3; + final double space4; + final double space5; + final double space6; + final double space7; + final double space8; + final double space9; + + const FortalezaSpace({ + required this.space1, + required this.space2, + required this.space3, + required this.space4, + required this.space5, + required this.space6, + required this.space7, + required this.space8, + required this.space9, + }); + + Map get toMap => _$FortalezaSpaceToMap(this); +} + +@MixableToken(TextStyle) +class FortalezaTextStyle { + final TextStyle text1; + final TextStyle text2; + final TextStyle text3; + final TextStyle text4; + final TextStyle text5; + final TextStyle text6; + final TextStyle text7; + final TextStyle text8; + final TextStyle text9; + + const FortalezaTextStyle({ + required this.text1, + required this.text2, + required this.text3, + required this.text4, + required this.text5, + required this.text6, + required this.text7, + required this.text8, + required this.text9, + }); + + Map get toMap => _$FortalezaTextStyleToMap(this); +} diff --git a/packages/remix/lib/src/themes/fortaleza/tokens.g.dart b/packages/remix/lib/src/themes/fortaleza/tokens.g.dart new file mode 100644 index 000000000..769e95a31 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/tokens.g.dart @@ -0,0 +1,255 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'tokens.dart'; + +// ************************************************************************** +// MixableTokensGenerator +// ************************************************************************** + +class _$FortalezaColorStruct { + _$FortalezaColorStruct(); + + final ColorToken black = const ColorToken('black'); + final ColorToken white = const ColorToken('white'); + final ColorSwatchToken accent = ColorSwatchToken.scale('accent', 12); + final ColorSwatchToken accentAlpha = + ColorSwatchToken.scale('accentAlpha', 12); + final ColorSwatchToken neutral = ColorSwatchToken.scale('neutral', 12); + final ColorSwatchToken neutralAlpha = + ColorSwatchToken.scale('neutralAlpha', 12); +} + +final _structFortalezaColor = _$FortalezaColorStruct(); + +Map _$FortalezaColorToMap(FortalezaColor tokens) { + return { + _structFortalezaColor.black: tokens.black, + _structFortalezaColor.white: tokens.white, + _structFortalezaColor.accent: tokens.accent, + _structFortalezaColor.accentAlpha: tokens.accentAlpha, + _structFortalezaColor.neutral: tokens.neutral, + _structFortalezaColor.neutralAlpha: tokens.neutralAlpha, + }; +} + +extension $FortalezaColorColorUtilityX on ColorUtility { + T $black() => ref(_structFortalezaColor.black); + T $white() => ref(_structFortalezaColor.white); + T $accent([int step = 9]) => ref(_structFortalezaColor.accent[step]); + T $accentAlpha([int step = 9]) => + ref(_structFortalezaColor.accentAlpha[step]); + T $neutral([int step = 9]) => ref(_structFortalezaColor.neutral[step]); + T $neutralAlpha([int step = 9]) => + ref(_structFortalezaColor.neutralAlpha[step]); +} + +class BuildContextFortalezaColorMethods { + const BuildContextFortalezaColorMethods(this.context); + + final BuildContext context; + Color black() => _structFortalezaColor.black.resolve(context); + Color white() => _structFortalezaColor.white.resolve(context); + Color accent([int step = 9]) => + _structFortalezaColor.accent[step].resolve(context); + Color accentAlpha([int step = 9]) => + _structFortalezaColor.accentAlpha[step].resolve(context); + Color neutral([int step = 9]) => + _structFortalezaColor.neutral[step].resolve(context); + Color neutralAlpha([int step = 9]) => + _structFortalezaColor.neutralAlpha[step].resolve(context); +} + +extension $BuildContextFortalezaColorX on BuildContext { + BuildContextFortalezaColorMethods get $color => + BuildContextFortalezaColorMethods(this); +} + +class _$FortalezaRadiusStruct { + _$FortalezaRadiusStruct(); + + final RadiusToken radius1 = const RadiusToken('radius1'); + final RadiusToken radius2 = const RadiusToken('radius2'); + final RadiusToken radius3 = const RadiusToken('radius3'); + final RadiusToken radius4 = const RadiusToken('radius4'); + final RadiusToken radius5 = const RadiusToken('radius5'); + final RadiusToken radius6 = const RadiusToken('radius6'); +} + +final _structFortalezaRadius = _$FortalezaRadiusStruct(); + +Map _$FortalezaRadiusToMap(FortalezaRadius tokens) { + return { + _structFortalezaRadius.radius1: tokens.radius1, + _structFortalezaRadius.radius2: tokens.radius2, + _structFortalezaRadius.radius3: tokens.radius3, + _structFortalezaRadius.radius4: tokens.radius4, + _structFortalezaRadius.radius5: tokens.radius5, + _structFortalezaRadius.radius6: tokens.radius6, + }; +} + +extension $FortalezaRadiusRadiusUtilityX + on RadiusUtility { + T $radius1() => ref(_structFortalezaRadius.radius1); + T $radius2() => ref(_structFortalezaRadius.radius2); + T $radius3() => ref(_structFortalezaRadius.radius3); + T $radius4() => ref(_structFortalezaRadius.radius4); + T $radius5() => ref(_structFortalezaRadius.radius5); + T $radius6() => ref(_structFortalezaRadius.radius6); +} + +class BuildContextFortalezaRadiusMethods { + const BuildContextFortalezaRadiusMethods(this.context); + + final BuildContext context; + Radius radius1() => _structFortalezaRadius.radius1.resolve(context); + Radius radius2() => _structFortalezaRadius.radius2.resolve(context); + Radius radius3() => _structFortalezaRadius.radius3.resolve(context); + Radius radius4() => _structFortalezaRadius.radius4.resolve(context); + Radius radius5() => _structFortalezaRadius.radius5.resolve(context); + Radius radius6() => _structFortalezaRadius.radius6.resolve(context); +} + +extension $BuildContextFortalezaRadiusX on BuildContext { + BuildContextFortalezaRadiusMethods get $radius => + BuildContextFortalezaRadiusMethods(this); +} + +class _$FortalezaSpaceStruct { + _$FortalezaSpaceStruct(); + + final SpaceToken space1 = const SpaceToken('space1'); + final SpaceToken space2 = const SpaceToken('space2'); + final SpaceToken space3 = const SpaceToken('space3'); + final SpaceToken space4 = const SpaceToken('space4'); + final SpaceToken space5 = const SpaceToken('space5'); + final SpaceToken space6 = const SpaceToken('space6'); + final SpaceToken space7 = const SpaceToken('space7'); + final SpaceToken space8 = const SpaceToken('space8'); + final SpaceToken space9 = const SpaceToken('space9'); +} + +final _structFortalezaSpace = _$FortalezaSpaceStruct(); + +Map _$FortalezaSpaceToMap(FortalezaSpace tokens) { + return { + _structFortalezaSpace.space1: tokens.space1, + _structFortalezaSpace.space2: tokens.space2, + _structFortalezaSpace.space3: tokens.space3, + _structFortalezaSpace.space4: tokens.space4, + _structFortalezaSpace.space5: tokens.space5, + _structFortalezaSpace.space6: tokens.space6, + _structFortalezaSpace.space7: tokens.space7, + _structFortalezaSpace.space8: tokens.space8, + _structFortalezaSpace.space9: tokens.space9, + }; +} + +extension $FortalezaSpaceSpacingSideUtilityX + on SpacingSideUtility { + T $space1() => ref(_structFortalezaSpace.space1); + T $space2() => ref(_structFortalezaSpace.space2); + T $space3() => ref(_structFortalezaSpace.space3); + T $space4() => ref(_structFortalezaSpace.space4); + T $space5() => ref(_structFortalezaSpace.space5); + T $space6() => ref(_structFortalezaSpace.space6); + T $space7() => ref(_structFortalezaSpace.space7); + T $space8() => ref(_structFortalezaSpace.space8); + T $space9() => ref(_structFortalezaSpace.space9); +} + +extension $FortalezaSpaceGapUtilityX on GapUtility { + T $space1() => ref(_structFortalezaSpace.space1); + T $space2() => ref(_structFortalezaSpace.space2); + T $space3() => ref(_structFortalezaSpace.space3); + T $space4() => ref(_structFortalezaSpace.space4); + T $space5() => ref(_structFortalezaSpace.space5); + T $space6() => ref(_structFortalezaSpace.space6); + T $space7() => ref(_structFortalezaSpace.space7); + T $space8() => ref(_structFortalezaSpace.space8); + T $space9() => ref(_structFortalezaSpace.space9); +} + +class BuildContextFortalezaSpaceMethods { + const BuildContextFortalezaSpaceMethods(this.context); + + final BuildContext context; + double space1() => _structFortalezaSpace.space1.resolve(context); + double space2() => _structFortalezaSpace.space2.resolve(context); + double space3() => _structFortalezaSpace.space3.resolve(context); + double space4() => _structFortalezaSpace.space4.resolve(context); + double space5() => _structFortalezaSpace.space5.resolve(context); + double space6() => _structFortalezaSpace.space6.resolve(context); + double space7() => _structFortalezaSpace.space7.resolve(context); + double space8() => _structFortalezaSpace.space8.resolve(context); + double space9() => _structFortalezaSpace.space9.resolve(context); +} + +extension $BuildContextFortalezaSpaceX on BuildContext { + BuildContextFortalezaSpaceMethods get $space => + BuildContextFortalezaSpaceMethods(this); +} + +class _$FortalezaTextStyleStruct { + _$FortalezaTextStyleStruct(); + + final TextStyleToken text1 = const TextStyleToken('text1'); + final TextStyleToken text2 = const TextStyleToken('text2'); + final TextStyleToken text3 = const TextStyleToken('text3'); + final TextStyleToken text4 = const TextStyleToken('text4'); + final TextStyleToken text5 = const TextStyleToken('text5'); + final TextStyleToken text6 = const TextStyleToken('text6'); + final TextStyleToken text7 = const TextStyleToken('text7'); + final TextStyleToken text8 = const TextStyleToken('text8'); + final TextStyleToken text9 = const TextStyleToken('text9'); +} + +final _structFortalezaTextStyle = _$FortalezaTextStyleStruct(); + +Map _$FortalezaTextStyleToMap( + FortalezaTextStyle tokens) { + return { + _structFortalezaTextStyle.text1: tokens.text1, + _structFortalezaTextStyle.text2: tokens.text2, + _structFortalezaTextStyle.text3: tokens.text3, + _structFortalezaTextStyle.text4: tokens.text4, + _structFortalezaTextStyle.text5: tokens.text5, + _structFortalezaTextStyle.text6: tokens.text6, + _structFortalezaTextStyle.text7: tokens.text7, + _structFortalezaTextStyle.text8: tokens.text8, + _structFortalezaTextStyle.text9: tokens.text9, + }; +} + +extension $FortalezaTextStyleTextStyleUtilityX + on TextStyleUtility { + T $text1() => ref(_structFortalezaTextStyle.text1); + T $text2() => ref(_structFortalezaTextStyle.text2); + T $text3() => ref(_structFortalezaTextStyle.text3); + T $text4() => ref(_structFortalezaTextStyle.text4); + T $text5() => ref(_structFortalezaTextStyle.text5); + T $text6() => ref(_structFortalezaTextStyle.text6); + T $text7() => ref(_structFortalezaTextStyle.text7); + T $text8() => ref(_structFortalezaTextStyle.text8); + T $text9() => ref(_structFortalezaTextStyle.text9); +} + +class BuildContextFortalezaTextStyleMethods { + const BuildContextFortalezaTextStyleMethods(this.context); + + final BuildContext context; + TextStyle text1() => _structFortalezaTextStyle.text1.resolve(context); + TextStyle text2() => _structFortalezaTextStyle.text2.resolve(context); + TextStyle text3() => _structFortalezaTextStyle.text3.resolve(context); + TextStyle text4() => _structFortalezaTextStyle.text4.resolve(context); + TextStyle text5() => _structFortalezaTextStyle.text5.resolve(context); + TextStyle text6() => _structFortalezaTextStyle.text6.resolve(context); + TextStyle text7() => _structFortalezaTextStyle.text7.resolve(context); + TextStyle text8() => _structFortalezaTextStyle.text8.resolve(context); + TextStyle text9() => _structFortalezaTextStyle.text9.resolve(context); +} + +extension $BuildContextFortalezaTextStyleX on BuildContext { + BuildContextFortalezaTextStyleMethods get $textStyle => + BuildContextFortalezaTextStyleMethods(this); +} diff --git a/packages/remix/lib/themes/fortaleza.dart b/packages/remix/lib/themes/fortaleza.dart new file mode 100644 index 000000000..b423a0ac0 --- /dev/null +++ b/packages/remix/lib/themes/fortaleza.dart @@ -0,0 +1,26 @@ +library remix.fortaleza; + +export '../src/themes/fortaleza/components/accordion_theme.dart'; +export '../src/themes/fortaleza/components/avatar_theme.dart'; +export '../src/themes/fortaleza/components/badge_theme.dart'; +export '../src/themes/fortaleza/components/button_theme.dart'; +export '../src/themes/fortaleza/components/callout_theme.dart'; +export '../src/themes/fortaleza/components/card_theme.dart'; +export '../src/themes/fortaleza/components/checkbox_theme.dart'; +export '../src/themes/fortaleza/components/chip_theme.dart'; +export '../src/themes/fortaleza/components/components.dart'; +export '../src/themes/fortaleza/components/dialog_theme.dart'; +export '../src/themes/fortaleza/components/divider_theme.dart'; +export '../src/themes/fortaleza/components/icon_button_theme.dart'; +export '../src/themes/fortaleza/components/menu_item_theme.dart'; +export '../src/themes/fortaleza/components/progress_theme.dart'; +export '../src/themes/fortaleza/components/radio_theme.dart'; +export '../src/themes/fortaleza/components/scaffold_theme.dart'; +export '../src/themes/fortaleza/components/segmented_control_theme.dart'; +export '../src/themes/fortaleza/components/select_theme.dart'; +export '../src/themes/fortaleza/components/slider_theme.dart'; +export '../src/themes/fortaleza/components/spinner_theme.dart'; +export '../src/themes/fortaleza/components/switch_theme.dart'; +export '../src/themes/fortaleza/components/textfield_theme.dart'; +export '../src/themes/fortaleza/components/toast_theme.dart'; +export '../src/themes/fortaleza/tokens.dart'; From 74ee14d317dab585ac904ef482b29cb8bd846b6a Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:59:16 -0300 Subject: [PATCH 18/30] remove unused classes --- .../lib/src/helpers/builder_utils.dart | 13 ------------- .../mix_generator/lib/src/helpers/field_info.dart | 6 ------ 2 files changed, 19 deletions(-) diff --git a/packages/mix_generator/lib/src/helpers/builder_utils.dart b/packages/mix_generator/lib/src/helpers/builder_utils.dart index 5e29589c2..9e901c490 100644 --- a/packages/mix_generator/lib/src/helpers/builder_utils.dart +++ b/packages/mix_generator/lib/src/helpers/builder_utils.dart @@ -131,19 +131,6 @@ extension EnumElementX on EnumElement { } } -class TokenAnnotationContext extends AnnotationContext { - final Object? type; - - TokenAnnotationContext({ - required super.element, - required this.type, - }); - - String get name => element.name; - - String get generatedName => element.generatedName; -} - extension ClassElementX on ClassElement { bool get isConst => unnamedConstructor?.isConst ?? false; diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index 60794d995..4fea35223 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -321,12 +321,6 @@ class ClassBuilderContext { constructor.parameters.map(ParameterInfo.ofElement).toList(); } - // List get fields { - // // if (_fieldsCache != null) return _fieldsCache!; - - // return classElement.fields.map((e) => FieldInfo.ofElement(e)).toList(); - // } - bool get hasDiagnosticable => classElement.allSupertypes.any((e) => e.element.name == 'Diagnosticable'); From b7be240892ec362ca92a0334ad8adc5fcb10f626 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:58:56 -0300 Subject: [PATCH 19/30] create a test for theme --- packages/remix/test/app/remix_app_test.dart | 73 +++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 packages/remix/test/app/remix_app_test.dart diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart new file mode 100644 index 000000000..96f8b4687 --- /dev/null +++ b/packages/remix/test/app/remix_app_test.dart @@ -0,0 +1,73 @@ +import 'dart:ui'; + +import 'package:flutter/widgets.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:mix/mix.dart'; +import 'package:remix/remix.dart'; + +final _mockedTheme = MixThemeData( + colors: {const ColorToken('color'): const Color(0xFF000000)}, + spaces: {const SpaceToken('space'): 10}, + textStyles: {const TextStyleToken('text-style'): const TextStyle()}, + radii: {const RadiusToken('radius'): const Radius.circular(10)}, +); + +final _mockedTheme2 = MixThemeData( + colors: {const ColorToken('color_2'): const Color.fromARGB(255, 215, 60, 60)}, + spaces: {const SpaceToken('space_2'): 20}, + textStyles: {const TextStyleToken('text-style_2'): const TextStyle()}, + radii: {const RadiusToken('radius_2'): const Radius.circular(20)}, +); + +void main() { + testWidgets( + 'RemixApp should use the provided theme tokens when no dark theme is provided', + (WidgetTester tester) async { + for (final brightness in Brightness.values) { + await tester.pumpWidget( + MediaQuery( + data: MediaQueryData(platformBrightness: brightness), + child: RemixApp( + theme: RemixThemeData( + components: RemixComponentTheme.light(), + tokens: _mockedTheme, + ), + ), + ), + ); + final mixTheme = tester.firstWidget(find.byType(MixTheme)); + + expect(mixTheme.data, _mockedTheme); + } + }, + ); + + testWidgets( + 'RemixApp should use the specified theme when both themes are provided', + (WidgetTester tester) async { + for (final brightness in Brightness.values) { + await tester.pumpWidget( + MediaQuery( + data: MediaQueryData(platformBrightness: brightness), + child: RemixApp( + theme: RemixThemeData( + components: RemixComponentTheme.light(), + tokens: _mockedTheme, + ), + darkTheme: RemixThemeData( + components: RemixComponentTheme.dark(), + tokens: _mockedTheme2, + ), + ), + ), + ); + final mixTheme = tester.firstWidget(find.byType(MixTheme)); + + final expectedTheme = + brightness == Brightness.light ? _mockedTheme : _mockedTheme2; + + expect(mixTheme.data, expectedTheme); + } + }, + ); +} From 8f42ed155264d0f5a2d49ec1fc51c17e2dc5b637 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:24:59 -0300 Subject: [PATCH 20/30] fixing the theme --- .../demo/lib/components/badge_use_case.dart | 5 +- .../remix/demo/lib/helpers/theme_addon.dart | 16 +- packages/remix/demo/lib/main.dart | 12 +- .../ephemeral/FlutterInputs.xcfilelist | 1067 +++++++++-------- .../remix/lib/src/core/theme/remix_theme.dart | 29 +- .../lib/src/themes/fortaleza/components.dart | 138 +++ .../fortaleza/components/avatar_theme.dart | 2 +- .../fortaleza/components/components.dart | 104 -- .../fortaleza/components/radio_theme.dart | 1 + .../remix/lib/src/themes/fortaleza/theme.dart | 22 +- packages/remix/lib/themes/fortaleza.dart | 3 +- packages/remix/test/app/remix_app_test.dart | 51 +- 12 files changed, 740 insertions(+), 710 deletions(-) create mode 100644 packages/remix/lib/src/themes/fortaleza/components.dart delete mode 100644 packages/remix/lib/src/themes/fortaleza/components/components.dart diff --git a/packages/remix/demo/lib/components/badge_use_case.dart b/packages/remix/demo/lib/components/badge_use_case.dart index 915edc472..fe2d093b8 100644 --- a/packages/remix/demo/lib/components/badge_use_case.dart +++ b/packages/remix/demo/lib/components/badge_use_case.dart @@ -1,3 +1,4 @@ +import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; import 'package:remix/themes/fortaleza.dart'; @@ -16,8 +17,8 @@ Widget buildAvatarUseCase(BuildContext context) { label: 'Label', initialValue: 'New', ), - variants: const [ - // context.knobs.variant(FortalezaBadgeStyle.variants), + variants: [ + context.knobs.variant(FortalezaBadgeStyle.variants), ], ), ), diff --git a/packages/remix/demo/lib/helpers/theme_addon.dart b/packages/remix/demo/lib/helpers/theme_addon.dart index ceb5bae05..2d20309ff 100644 --- a/packages/remix/demo/lib/helpers/theme_addon.dart +++ b/packages/remix/demo/lib/helpers/theme_addon.dart @@ -1,11 +1,7 @@ import 'package:remix/remix.dart'; -import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; -typedef ThemeMultiBrightness = ({ - RemixComponentTheme light, - RemixComponentTheme dark -}); +typedef ThemeMultiBrightness = ({RemixThemeData light, RemixThemeData dark}); class RemixComponentThemeAddon extends ThemeAddon { @override @@ -18,14 +14,8 @@ class RemixComponentThemeAddon extends ThemeAddon { themeBuilder: (context, themes, child) { return RemixApp( debugShowCheckedModeBanner: false, - darkTheme: RemixThemeData( - tokens: FortalezaTokens.dark().toThemeData(), - components: themes.dark, - ), - theme: RemixThemeData( - components: themes.light, - tokens: FortalezaTokens.light().toThemeData(), - ), + darkTheme: themes.dark, + theme: themes.light, home: child, ); }, diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 26916b7bb..7ded3a44c 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -45,18 +45,20 @@ class HotReload extends StatelessWidget { ), RemixComponentThemeAddon( themes: [ - const WidgetbookTheme( + WidgetbookTheme( name: 'Fortaleza', data: ( - dark: FortalezaComponentTheme.dark, - light: FortalezaComponentTheme.light, + light: FortalezaThemeData.light().toThemeData(), + dark: FortalezaThemeData.dark().toThemeData(), ), ), WidgetbookTheme( name: 'Base', data: ( - dark: RemixComponentTheme.dark(), - light: RemixComponentTheme.light(), + light: RemixThemeData.base(), + dark: RemixThemeData.base().copyWith( + components: RemixComponentTheme.dark(), + ), ), ), ], diff --git a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist index d7deed5e4..463d06f4e 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist +++ b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist @@ -1,28 +1,28 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-72.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/accessibility_issue.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checker_manager.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/checker_base.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/flex_overflow_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/image_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/input_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/minimum_tap_area_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/mixin.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/checkers/semantic_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/enums/buttons_alignment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/floating_action_buttons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/color_mode_simulation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/info_button.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/multi_value_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/slider_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/switch_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/test_environment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/testing_tools_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.3/lib/src/testing_tools/testing_tools_wrapper.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_issue.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checker_manager.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/checker_base.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/flex_overflow_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/image_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/input_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/minimum_tap_area_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/mixin.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/semantic_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/enums/buttons_alignment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/floating_action_buttons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/color_mode_simulation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/info_button.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/multi_value_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/slider_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/switch_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/test_environment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_wrapper.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/analyzer-6.7.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.6.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.5.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/async.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/src/async_cache.dart @@ -106,7 +106,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/default.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/stopwatch.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/src/utils.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/code_builder-4.10.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/code_builder-4.10.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/collection.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/algorithms.dart @@ -132,8 +132,8 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/unmodifiable_wrappers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/wrappers.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/convert-3.1.2/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.6/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/convert-3.1.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.5/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/assets/CupertinoIcons.ttf /Users/lucasoliveira/.pub-cache/hosted/pub.dev/dart_style-2.3.7/LICENSE @@ -221,8 +221,8 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/theme.freezed.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/fake_async.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/lib/freezed_annotation.dart @@ -306,7 +306,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/src/leak_testing.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/src/matchers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/lints-4.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/logging-1.3.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/logging-1.2.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/macros-0.1.2-main.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/expect.dart @@ -508,7 +508,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/src/scaffolding/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/src/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/timing-1.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/typed_data-1.4.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/typed_data-1.3.2/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/src/vector_math_64/aabb2.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/src/vector_math_64/aabb3.dart @@ -546,182 +546,182 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web-1.1.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket-0.1.6/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Black.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Bold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Italic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Light.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-LightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Medium.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Regular.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Thin.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/logo.png -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/next.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/addons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/common.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/multi_addon_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/widgetbook_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/none_device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/widgetbook_theme.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/boolean_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_space.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hex_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hsl_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/number_text_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/rgb_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/date_time_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/duration_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_codec.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_type.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields_composable.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/list_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/string_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/integrations.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/boolean_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/double_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/int_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_extension.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/color_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/date_time_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/duration_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs_registry.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/list_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/string_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/base_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/desktop_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/mobile_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/responsive_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/component_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/expander_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/icons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/resolve_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/use_case_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/navigation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/nodes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_category.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_folder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_package.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_root.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_use_case.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_tile.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/search_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/widgets.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/experimental_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/bool_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/builder_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/color_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/const_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/double_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/duration_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/enum_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/int_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/single_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/story_args.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/string_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/experimental_badge.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/meta.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/scenario.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/story.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_config.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_parser.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router_delegate.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/routing.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/mobile_settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/nullable_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/default_app_builders.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_scope.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/themes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/widgetbook.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/safe_boundaries.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/use_case_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/workbench.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Black.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Bold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Italic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Light.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-LightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Medium.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Regular.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Thin.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/logo.png +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/next.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/addons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/common.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/multi_addon_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/widgetbook_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/none_device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/widgetbook_theme.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/boolean_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_space.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hex_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hsl_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/number_text_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/rgb_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/date_time_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/duration_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_codec.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_type.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields_composable.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/list_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/string_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/integrations.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/boolean_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/double_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/int_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_extension.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/color_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/date_time_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/duration_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs_registry.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/list_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/string_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/base_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/desktop_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/mobile_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/responsive_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/component_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/expander_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/icons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/resolve_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/use_case_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/navigation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/nodes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_category.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_folder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_package.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_root.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_use_case.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_tile.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/search_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/widgets.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/experimental_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/bool_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/builder_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/color_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/const_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/double_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/duration_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/enum_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/int_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/single_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/story_args.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/string_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/experimental_badge.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/meta.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/scenario.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/story.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_config.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_parser.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router_delegate.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/routing.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/mobile_settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/nullable_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/default_app_builders.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_scope.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/themes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/safe_boundaries.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/use_case_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/workbench.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/widgetbook.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addon_config.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addons_configs.dart @@ -730,333 +730,334 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/widgetbook_annotation.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_generator-3.9.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/yaml-3.1.2/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/mix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_data_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/animated/animated_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_radius_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/border_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/shape_border_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/border/shape_border_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_directives.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_directives_impl.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/color_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/color/material_colors_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/enum/enum_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/enum/enum_util.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gap/gap_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gap/spacing_side_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/nested_style/nested_style_attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/nested_style/nested_style_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/curves.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/scalar_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/scalars/scalar_util.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/shadow/shadow_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/spacing/spacing_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/attributes/text_style/text_style_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/attributes_map.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/deprecation_notices.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/directive.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/dto.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/mix_data.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/mix_provider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/style_mix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/factory/style_widgets_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/helpers.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/styled_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/utility.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/gesture_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/interactive_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/mix_widget_state_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/internal/mouse_region_mix_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/core/widget_state/widget_state_controller.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/build_context_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/compare_mixin.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/constants.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/deep_collection_equality.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/diagnostic_properties_builder_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/helper_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/iterable_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/mix_error.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/internal/string_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/align_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/align_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/render_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/modifiers/widget_modifiers_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/box/box_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flex/flex_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/flexbox/flexbox_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/icon/icon_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/image/image_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/spec_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/stack/stack_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_directives_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/specs/text/text_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/material/material_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/material/material_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/mix/mix_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/breakpoints_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/color_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/mix_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/radius_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/space_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/text_style_token.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/token_resolver.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/theme/tokens/token_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_breakpoint_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_brightness_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_directionality_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_not_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_orientation_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_platform_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/context_variant_util/on_util.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/variant_attribute.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/variants/widget_state_variant.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix/lib/src/widgets/pressable_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/lib/mix_annotations.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/mix_annotations/lib/src/annotations.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/LICENSE -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/addons/icon_data_knob.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/accordion_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/avatar_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/badge_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/button_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/callout_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/card_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/checkbox_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/chip_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/dialog_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/divider_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/icon_button_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/menu_item_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/progress_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/radio_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/segmented_control_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/select_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/slider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/spinner_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/switch_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/textfield_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/toast_use_case.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/knob_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/string.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/theme_addon.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/helpers/use_case_state.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/main.directories.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/pubspec.yaml -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/remix.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/app/remix_app.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/accordion_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/header/accordion_header.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/avatar/avatar_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/badge/badge_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/button/button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/callout/callout_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/card/card_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/divider/divider_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/radio/radio_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/scaffold/scaffold_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/button/select_button.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/button/select_button_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/item/select_menu.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/item/select_menu_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_painter.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/switch/switch_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/attributes/attributes.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/attributes/attributes.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/textfield/textfield_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_layer.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_style.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/toast/toast_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/color_palette.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/color_utils.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/component_builder.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/context_ext.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.g.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/helpers/utility_extension.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/remix_theme.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/remix_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/color_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/radius_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/space_tokens.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/text_style_tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/mix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_data_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/animated/animated_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_radius_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/border_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/shape_border_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/border/shape_border_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_directives.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_directives_impl.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/color_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/color/material_colors_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/constraints/constraints_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/decoration_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/decoration/image/decoration_image_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/enum/enum_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/enum/enum_util.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gap/gap_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gap/spacing_side_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/gradient/gradient_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_data_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/modifiers/widget_modifiers_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/nested_style/nested_style_attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/nested_style/nested_style_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/curves.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/scalar_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/scalars/scalar_util.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/shadow/shadow_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/edge_insets_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/spacing/spacing_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/strut_style/strut_style_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_height_behavior/text_height_behavior_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_dto.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/attributes/text_style/text_style_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/attributes_map.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/deprecation_notices.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/directive.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/dto.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/mix_data.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/mix_provider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/style_mix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/factory/style_widgets_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/helpers.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/styled_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/utility.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/gesture_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/interactive_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/mix_widget_state_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/internal/mouse_region_mix_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/core/widget_state/widget_state_controller.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/build_context_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/compare_mixin.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/constants.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/deep_collection_equality.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/diagnostic_properties_builder_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/helper_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/iterable_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/mix_error.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/internal/string_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/align_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/align_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/aspect_ratio_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/clip_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/flexible_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/fractionally_sized_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/render_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/internal/reset_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/intrinsic_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/mouse_cursor_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/opacity_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/padding_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/rotated_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/scroll_view_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/sized_box_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/transform_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/visibility_widget_modifier.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/modifiers/widget_modifiers_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/box/box_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flex/flex_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/flexbox/flexbox_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/icon/icon_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/image/image_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/spec_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/stack/stack_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_directives_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/specs/text/text_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/material/material_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/material/material_tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/mix/mix_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/breakpoints_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/color_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/mix_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/radius_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/space_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/text_style_token.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/token_resolver.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/theme/tokens/token_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_breakpoint_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_brightness_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_directionality_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_not_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_orientation_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_platform_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/context_variant_util/on_util.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/variant_attribute.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/variants/widget_state_variant.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix/lib/src/widgets/pressable_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/lib/mix_annotations.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/mix_annotations/lib/src/annotations.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/LICENSE +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/addons/icon_data_knob.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/accordion_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/avatar_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/badge_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/button_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/callout_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/card_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/checkbox_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/chip_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/dialog_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/divider_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/icon_button_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/menu_item_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/progress_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/radio_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/segmented_control_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/select_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/slider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/spinner_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/switch_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/textfield_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/components/toast_use_case.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/knob_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/string.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/theme_addon.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/helpers/use_case_state.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/lib/main.directories.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/demo/pubspec.yaml +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/remix.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/accordion_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/header/accordion_header.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/avatar/avatar_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/badge/badge_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/button/button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/callout/callout_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/card/card_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/checkbox/checkbox_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/chip/chip_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/dialog/dialog_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/divider/divider_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/icon_button/icon_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/menu_item/menu_item_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/progress/progress_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/radio/radio_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/scaffold/scaffold_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/button/select_button.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/button/select_button_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/item/select_menu.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/item/select_menu_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/select/select_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/slider/slider_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_painter.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/spinner/spinner_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/switch/switch_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/attributes/attributes.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/attributes/attributes.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/textfield/textfield_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_layer.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_style.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/components/toast/toast_widget.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/remix_app.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/theme/component.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/core/theme/remix_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/color_palette.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/color_utils.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/component_builder.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/context_ext.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/spec/composited_transform_follower_spec.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/helpers/utility_extension.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/accordion_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/badge_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/callout_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/card_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/checkbox_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/chip_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/dialog_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/divider_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/icon_button_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/menu_item_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/progress_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/scaffold_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/segmented_control_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/select_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/slider_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/spinner_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/switch_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/textfield_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/components/toast_theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/theme.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/tokens.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/src/themes/fortaleza/tokens.g.dart +/Users/lucasoliveira/Developer/Projects/hairday/packages/mix/packages/remix/lib/themes/fortaleza.dart /Users/lucasoliveira/fvm/versions/stable/bin/cache/artifacts/material_fonts/MaterialIcons-Regular.otf /Users/lucasoliveira/fvm/versions/stable/bin/cache/dart-sdk/pkg/_macros/LICENSE /Users/lucasoliveira/fvm/versions/stable/bin/cache/pkg/sky_engine/LICENSE diff --git a/packages/remix/lib/src/core/theme/remix_theme.dart b/packages/remix/lib/src/core/theme/remix_theme.dart index 5bd02234e..2dbe5deed 100644 --- a/packages/remix/lib/src/core/theme/remix_theme.dart +++ b/packages/remix/lib/src/core/theme/remix_theme.dart @@ -15,6 +15,16 @@ class RemixThemeData { tokens: const MixThemeData.empty(), ); + RemixThemeData copyWith({ + RemixComponentTheme? components, + MixThemeData? tokens, + }) { + return RemixThemeData( + components: components ?? this.components, + tokens: tokens ?? this.tokens, + ); + } + @override bool operator ==(Object other) { if (identical(this, other)) return true; @@ -43,8 +53,8 @@ class RemixTheme extends StatelessWidget { }); static RemixThemeData of(BuildContext context) { - final _RemixThemeInherited? provider = - context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); + final RemixThemeInherited? provider = + context.dependOnInheritedWidgetOfExactType(); if (provider == null) { throw FlutterError( @@ -61,7 +71,7 @@ class RemixTheme extends StatelessWidget { static RemixThemeData? maybeOf(BuildContext context) { return context - .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() + .dependOnInheritedWidgetOfExactType() ?.data; } @@ -97,18 +107,23 @@ class RemixTheme extends StatelessWidget { return MixTheme( data: tokens, - child: _RemixThemeInherited(data: theme, child: child), + child: RemixThemeInherited(data: theme, child: child), ); } } -class _RemixThemeInherited extends InheritedWidget { - const _RemixThemeInherited({required this.data, required super.child}); +@visibleForTesting +class RemixThemeInherited extends InheritedWidget { + const RemixThemeInherited({ + super.key, + required this.data, + required super.child, + }); final RemixThemeData data; @override - bool updateShouldNotify(_RemixThemeInherited oldWidget) { + bool updateShouldNotify(RemixThemeInherited oldWidget) { return data != oldWidget.data; } } diff --git a/packages/remix/lib/src/themes/fortaleza/components.dart b/packages/remix/lib/src/themes/fortaleza/components.dart new file mode 100644 index 000000000..d50a9cf05 --- /dev/null +++ b/packages/remix/lib/src/themes/fortaleza/components.dart @@ -0,0 +1,138 @@ +import '../../core/theme/component.dart'; +import 'components/accordion_theme.dart'; +import 'components/avatar_theme.dart'; +import 'components/badge_theme.dart'; +import 'components/button_theme.dart'; +import 'components/callout_theme.dart'; +import 'components/card_theme.dart'; +import 'components/checkbox_theme.dart'; +import 'components/chip_theme.dart'; +import 'components/dialog_theme.dart'; +import 'components/divider_theme.dart'; +import 'components/icon_button_theme.dart'; +import 'components/menu_item_theme.dart'; +import 'components/progress_theme.dart'; +import 'components/radio_theme.dart'; +import 'components/scaffold_theme.dart'; +import 'components/segmented_control_theme.dart'; +import 'components/select_theme.dart'; +import 'components/slider_theme.dart'; +import 'components/spinner_theme.dart'; +import 'components/switch_theme.dart'; +import 'components/textfield_theme.dart'; +import 'components/toast_theme.dart'; + +class FortalezaComponentTheme extends RemixComponentTheme { + const FortalezaComponentTheme({ + required super.accordion, + required super.avatar, + required super.badge, + required super.button, + required super.callout, + required super.card, + required super.checkbox, + required super.dialog, + required super.chip, + required super.divider, + required super.iconButton, + required super.menuItem, + required super.progress, + required super.radio, + required super.scaffold, + required super.segmentedControl, + required super.select, + required super.spinner, + required super.switchComponent, + required super.textField, + required super.toast, + required super.slider, + }); + + factory FortalezaComponentTheme.light() { + return const FortalezaComponentTheme( + accordion: FortalezaAccordionStyle(), + avatar: FortalezaAvatarStyle(), + badge: FortalezaBadgeStyle(), + button: FortalezaButtonStyle(), + callout: FortalezaCalloutStyle(), + card: FortalezaCardStyle(), + checkbox: FortalezaCheckboxStyle(), + dialog: FortalezaDialogStyle(), + chip: FortalezaChipStyle(), + divider: FortalezaDividerStyle(), + iconButton: FortalezaIconButtonStyle(), + menuItem: FortalezaMenuItemStyle(), + progress: FortalezaProgressStyle(), + radio: FortalezaRadioStyle(), + scaffold: FortalezaScaffoldStyle(), + segmentedControl: FortalezaSegmentedControlStyle(), + select: FortalezaSelectStyle(), + spinner: FortalezaSpinnerStyle(), + switchComponent: FortalezaSwitchStyle(), + textField: FortalezaTextFieldStyle(), + toast: FortalezaToastStyle(), + slider: FortalezaSliderStyle(), + ); + } + + factory FortalezaComponentTheme.dark() { + return FortalezaComponentTheme.light().copyWith( + avatar: const FortalezaDarkAvatarStyle(), + badge: const FortalezaDarkBadgeStyle(), + segmentedControl: const FortalezaDarkSegmentedControlStyle(), + select: const FortalezaDarkSelectStyle(), + switchComponent: const FortalezaDarkSwitchStyle(), + ); + } + + @override + FortalezaComponentTheme copyWith({ + covariant FortalezaAccordionStyle? accordion, + covariant FortalezaAvatarStyle? avatar, + covariant FortalezaBadgeStyle? badge, + covariant FortalezaButtonStyle? button, + covariant FortalezaCalloutStyle? callout, + covariant FortalezaCardStyle? card, + covariant FortalezaCheckboxStyle? checkbox, + covariant FortalezaDialogStyle? dialog, + covariant FortalezaChipStyle? chip, + covariant FortalezaDividerStyle? divider, + covariant FortalezaIconButtonStyle? iconButton, + covariant FortalezaMenuItemStyle? menuItem, + covariant FortalezaProgressStyle? progress, + covariant FortalezaRadioStyle? radio, + covariant FortalezaScaffoldStyle? scaffold, + covariant FortalezaSegmentedControlStyle? segmentedControl, + covariant FortalezaSelectStyle? select, + covariant FortalezaSpinnerStyle? spinner, + covariant FortalezaSwitchStyle? switchComponent, + covariant FortalezaTextFieldStyle? textField, + covariant FortalezaToastStyle? toast, + covariant FortalezaSliderStyle? slider, + }) { + return FortalezaComponentTheme( + accordion: accordion ?? this.accordion, + avatar: avatar ?? this.avatar, + badge: badge ?? this.badge, + button: button ?? this.button, + callout: callout ?? this.callout, + card: card ?? this.card, + checkbox: checkbox ?? this.checkbox, + dialog: dialog ?? this.dialog, + chip: chip ?? this.chip, + divider: divider ?? this.divider, + iconButton: iconButton ?? this.iconButton, + menuItem: menuItem ?? this.menuItem, + progress: progress ?? this.progress, + radio: radio ?? this.radio, + scaffold: scaffold ?? this.scaffold, + segmentedControl: segmentedControl ?? this.segmentedControl, + select: select ?? this.select, + spinner: spinner ?? this.spinner, + switchComponent: switchComponent ?? this.switchComponent, + textField: textField ?? this.textField, + toast: toast ?? this.toast, + slider: slider ?? this.slider, + ); + } +} diff --git a/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart index 07e07ce0f..a73d137d2 100644 --- a/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/avatar_theme.dart @@ -1,7 +1,7 @@ import 'package:mix/mix.dart'; -import '../../../../themes/fortaleza.dart'; import '../../../components/avatar/avatar.dart'; +import '../tokens.dart'; class FortalezaAvatarStyle extends AvatarStyle { static const soft = Variant('avatar.soft'); diff --git a/packages/remix/lib/src/themes/fortaleza/components/components.dart b/packages/remix/lib/src/themes/fortaleza/components/components.dart deleted file mode 100644 index 60ef3d53b..000000000 --- a/packages/remix/lib/src/themes/fortaleza/components/components.dart +++ /dev/null @@ -1,104 +0,0 @@ -import '../../../components/accordion/accordion.dart'; -import '../../../components/avatar/avatar.dart'; -import '../../../components/badge/badge.dart'; -import '../../../components/button/button.dart'; -import '../../../components/callout/callout.dart'; -import '../../../components/card/card.dart'; -import '../../../components/checkbox/checkbox.dart'; -import '../../../components/chip/chip.dart'; -import '../../../components/dialog/dialog.dart'; -import '../../../components/divider/divider.dart'; -import '../../../components/icon_button/icon_button.dart'; -import '../../../components/menu_item/menu_item.dart'; -import '../../../components/progress/progress.dart'; -import '../../../components/radio/radio.dart'; -import '../../../components/scaffold/scaffold.dart'; -import '../../../components/segmented_control/segmented_control.dart'; -import '../../../components/select/select.dart'; -import '../../../components/slider/slider.dart'; -import '../../../components/spinner/spinner.dart'; -import '../../../components/switch/switch.dart'; -import '../../../components/textfield/textfield.dart'; -import '../../../components/toast/toast.dart'; -import '../../../core/theme/component.dart'; -import 'accordion_theme.dart'; -import 'avatar_theme.dart'; -import 'badge_theme.dart'; -import 'button_theme.dart'; -import 'callout_theme.dart'; -import 'card_theme.dart'; -import 'checkbox_theme.dart'; -import 'chip_theme.dart'; -import 'dialog_theme.dart'; -import 'divider_theme.dart'; -import 'icon_button_theme.dart'; -import 'menu_item_theme.dart'; -import 'progress_theme.dart'; -import 'radio_theme.dart'; -import 'scaffold_theme.dart'; -import 'segmented_control_theme.dart'; -import 'select_theme.dart'; -import 'slider_theme.dart'; -import 'spinner_theme.dart'; -import 'switch_theme.dart'; -import 'textfield_theme.dart'; -import 'toast_theme.dart'; - -class FortalezaComponentTheme extends RemixComponentTheme { - static const FortalezaComponentTheme light = FortalezaComponentTheme(); - static const FortalezaComponentTheme dark = FortalezaComponentTheme( - avatar: FortalezaDarkAvatarStyle(), - badge: FortalezaDarkBadgeStyle(), - segmentedControl: FortalezaDarkSegmentedControlStyle(), - select: FortalezaDarkSelectStyle(), - switchComponent: FortalezaDarkSwitchStyle(), - ); - - const FortalezaComponentTheme({ - AccordionStyle? accordion, - AvatarStyle? avatar, - BadgeStyle? badge, - ButtonStyle? button, - CalloutStyle? callout, - CardStyle? card, - CheckboxStyle? checkbox, - DialogStyle? dialog, - ChipStyle? chip, - DividerStyle? divider, - IconButtonStyle? iconButton, - MenuItemStyle? menuItem, - ProgressStyle? progress, - RadioStyle? radio, - ScaffoldStyle? scaffold, - SegmentedControlStyle? segmentedControl, - SelectStyle? select, - SpinnerStyle? spinner, - SwitchStyle? switchComponent, - TextFieldStyle? textField, - ToastStyle? toast, - SliderStyle? slider, - }) : super( - accordion: const FortalezaAccordionStyle(), - avatar: const FortalezaAvatarStyle(), - badge: const FortalezaBadgeStyle(), - button: const FortalezaButtonStyle(), - callout: const FortalezaCalloutStyle(), - card: const FortalezaCardStyle(), - checkbox: const FortalezaCheckboxStyle(), - dialog: const FortalezaDialogStyle(), - chip: const FortalezaChipStyle(), - divider: const FortalezaDividerStyle(), - iconButton: const FortalezaIconButtonStyle(), - menuItem: const FortalezaMenuItemStyle(), - progress: const FortalezaProgressStyle(), - radio: const FortalezaRadioStyle(), - scaffold: const FortalezaScaffoldStyle(), - segmentedControl: const FortalezaSegmentedControlStyle(), - select: const FortalezaSelectStyle(), - spinner: const FortalezaSpinnerStyle(), - switchComponent: const FortalezaSwitchStyle(), - textField: const FortalezaTextFieldStyle(), - toast: const FortalezaToastStyle(), - slider: const FortalezaSliderStyle(), - ); -} diff --git a/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart index d42ffc972..972cda5b5 100644 --- a/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/radio_theme.dart @@ -1,3 +1,4 @@ +import 'package:flutter/animation.dart'; import 'package:mix/mix.dart'; import '../../../components/radio/radio.dart'; diff --git a/packages/remix/lib/src/themes/fortaleza/theme.dart b/packages/remix/lib/src/themes/fortaleza/theme.dart index 3317ddf97..7a8e80ba0 100644 --- a/packages/remix/lib/src/themes/fortaleza/theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/theme.dart @@ -1,20 +1,24 @@ import '../../core/theme/remix_theme.dart'; -import 'components/components.dart'; +import 'components.dart'; import 'tokens.dart'; class FortalezaThemeData { final FortalezaComponentTheme components; final FortalezaTokens tokens; - static final FortalezaThemeData light = FortalezaThemeData( - components: FortalezaComponentTheme.light, - tokens: FortalezaTokens.light(), - ); + factory FortalezaThemeData.light() { + return FortalezaThemeData( + components: FortalezaComponentTheme.light(), + tokens: FortalezaTokens.light(), + ); + } - static final FortalezaThemeData dark = FortalezaThemeData( - components: FortalezaComponentTheme.dark, - tokens: FortalezaTokens.dark(), - ); + factory FortalezaThemeData.dark() { + return FortalezaThemeData( + components: FortalezaComponentTheme.dark(), + tokens: FortalezaTokens.dark(), + ); + } const FortalezaThemeData({required this.components, required this.tokens}); diff --git a/packages/remix/lib/themes/fortaleza.dart b/packages/remix/lib/themes/fortaleza.dart index b423a0ac0..d3bb3c663 100644 --- a/packages/remix/lib/themes/fortaleza.dart +++ b/packages/remix/lib/themes/fortaleza.dart @@ -1,5 +1,6 @@ library remix.fortaleza; +export '../src/themes/fortaleza/components.dart'; export '../src/themes/fortaleza/components/accordion_theme.dart'; export '../src/themes/fortaleza/components/avatar_theme.dart'; export '../src/themes/fortaleza/components/badge_theme.dart'; @@ -8,7 +9,6 @@ export '../src/themes/fortaleza/components/callout_theme.dart'; export '../src/themes/fortaleza/components/card_theme.dart'; export '../src/themes/fortaleza/components/checkbox_theme.dart'; export '../src/themes/fortaleza/components/chip_theme.dart'; -export '../src/themes/fortaleza/components/components.dart'; export '../src/themes/fortaleza/components/dialog_theme.dart'; export '../src/themes/fortaleza/components/divider_theme.dart'; export '../src/themes/fortaleza/components/icon_button_theme.dart'; @@ -23,4 +23,5 @@ export '../src/themes/fortaleza/components/spinner_theme.dart'; export '../src/themes/fortaleza/components/switch_theme.dart'; export '../src/themes/fortaleza/components/textfield_theme.dart'; export '../src/themes/fortaleza/components/toast_theme.dart'; +export '../src/themes/fortaleza/theme.dart'; export '../src/themes/fortaleza/tokens.dart'; diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart index 96f8b4687..86dc6b273 100644 --- a/packages/remix/test/app/remix_app_test.dart +++ b/packages/remix/test/app/remix_app_test.dart @@ -2,42 +2,26 @@ import 'dart:ui'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:mix/mix.dart'; import 'package:remix/remix.dart'; - -final _mockedTheme = MixThemeData( - colors: {const ColorToken('color'): const Color(0xFF000000)}, - spaces: {const SpaceToken('space'): 10}, - textStyles: {const TextStyleToken('text-style'): const TextStyle()}, - radii: {const RadiusToken('radius'): const Radius.circular(10)}, -); - -final _mockedTheme2 = MixThemeData( - colors: {const ColorToken('color_2'): const Color.fromARGB(255, 215, 60, 60)}, - spaces: {const SpaceToken('space_2'): 20}, - textStyles: {const TextStyleToken('text-style_2'): const TextStyle()}, - radii: {const RadiusToken('radius_2'): const Radius.circular(20)}, -); +import 'package:remix/themes/fortaleza.dart'; void main() { testWidgets( 'RemixApp should use the provided theme tokens when no dark theme is provided', (WidgetTester tester) async { + final theme = FortalezaThemeData.light().toThemeData(); + for (final brightness in Brightness.values) { await tester.pumpWidget( MediaQuery( data: MediaQueryData(platformBrightness: brightness), - child: RemixApp( - theme: RemixThemeData( - components: RemixComponentTheme.light(), - tokens: _mockedTheme, - ), - ), + child: RemixApp(theme: theme), ), ); - final mixTheme = tester.firstWidget(find.byType(MixTheme)); + final remixTheme = tester + .firstWidget(find.byType(RemixThemeInherited)); - expect(mixTheme.data, _mockedTheme); + expect(remixTheme.data, theme); } }, ); @@ -50,23 +34,20 @@ void main() { MediaQuery( data: MediaQueryData(platformBrightness: brightness), child: RemixApp( - theme: RemixThemeData( - components: RemixComponentTheme.light(), - tokens: _mockedTheme, - ), - darkTheme: RemixThemeData( - components: RemixComponentTheme.dark(), - tokens: _mockedTheme2, - ), + theme: FortalezaThemeData.light().toThemeData(), + darkTheme: FortalezaThemeData.dark().toThemeData(), ), ), ); - final mixTheme = tester.firstWidget(find.byType(MixTheme)); + final remixTheme = tester + .firstWidget(find.byType(RemixThemeInherited)); - final expectedTheme = - brightness == Brightness.light ? _mockedTheme : _mockedTheme2; + final expectedTheme = (brightness == Brightness.light + ? FortalezaThemeData.light() + : FortalezaThemeData.dark()) + .toThemeData(); - expect(mixTheme.data, expectedTheme); + expect(remixTheme.data, expectedTheme); } }, ); From e8dfd2e342be2b34e3bc58de32e65f3b179081d9 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:28:48 -0300 Subject: [PATCH 21/30] Update field_info.dart --- packages/mix_generator/lib/src/helpers/field_info.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/mix_generator/lib/src/helpers/field_info.dart b/packages/mix_generator/lib/src/helpers/field_info.dart index 4fea35223..4b0827f88 100644 --- a/packages/mix_generator/lib/src/helpers/field_info.dart +++ b/packages/mix_generator/lib/src/helpers/field_info.dart @@ -99,8 +99,6 @@ class ParameterInfo extends FieldInfo { final ParameterElement element; - final ParameterElement element; - const ParameterInfo({ required super.name, required super.type, From ce95ae6b636025757915bf238565a820388c454e Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:31:05 -0300 Subject: [PATCH 22/30] remove token --- examples/todo_list/lib/style/token.dart | 137 ------------------- examples/todo_list/lib/style/token.g.dart | 155 ---------------------- 2 files changed, 292 deletions(-) delete mode 100644 examples/todo_list/lib/style/token.dart delete mode 100644 examples/todo_list/lib/style/token.g.dart diff --git a/examples/todo_list/lib/style/token.dart b/examples/todo_list/lib/style/token.dart deleted file mode 100644 index f84c47520..000000000 --- a/examples/todo_list/lib/style/token.dart +++ /dev/null @@ -1,137 +0,0 @@ -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; -import 'package:mix/mix.dart'; -import 'package:mix_annotations/mix_annotations.dart'; - -part 'token.g.dart'; - -final theme = MixThemeData( - colors: const MyThemeColorToken( - primary: Colors.blue, - onPrimary: Colors.white, - surface: ColorSwatch(2, { - 1: Colors.blue, - 2: Colors.blue, - }), - onSurface: Colors.black, - onSurfaceVariant: Colors.grey, - ).toMap, -); - -@MixableToken( - Color, - namespace: 'c', -) -class MyThemeColorToken { - final Color primary; - final Color onPrimary; - final Color onSurface; - - @MixableSwatchColorToken(scale: 12) - final Color onSurfaceVariant; - - final ColorSwatch surface; - - const MyThemeColorToken({ - required this.primary, - required this.onPrimary, - required this.surface, - required this.onSurface, - required this.onSurfaceVariant, - }); - - Map get toMap => _$MyThemeColorTokenToMap(this); -} - -@MixableToken( - TextStyle, - utilityExtension: false, - contextExtension: false, -) -class MyThemeTextStyleToken { - final TextStyle headline1; - final TextStyle headline2; - final TextStyle headline3; - final TextStyle body; - final TextStyle callout; - - const MyThemeTextStyleToken({ - required this.headline1, - required this.headline2, - required this.headline3, - required this.body, - required this.callout, - }); - - Map get toMap => - _$MyThemeTextStyleTokenToMap(this); -} - -@MixableToken(Radius) -class MyThemeRadiusToken { - const MyThemeRadiusToken({ - required this.large, - required this.medium, - }); - - final Radius large; - final Radius medium; - - Map get toMap => _$MyThemeRadiusTokenToMap(this); -} - -@MixableToken(double) -class MyThemeSpaceToken { - const MyThemeSpaceToken({ - required this.medium, - required this.large, - }); - - final double medium; - final double large; - - Map get toMap => _$MyThemeSpaceTokenToMap(this); -} - -final lightBlueTheme = MixThemeData( - colors: const MyThemeColorToken( - primary: Color(0xFF0093B9), - onPrimary: Color(0xFFFAFAFA), - surface: ColorSwatch(0xFFFAFAFA, { - 1: Color(0xFFFAFAFA), - 2: Color(0xFFFAFAFA), - }), - onSurface: Color(0xFF141C24), - onSurfaceVariant: Color(0xFF405473), - ).toMap, - textStyles: MyThemeTextStyleToken( - headline1: GoogleFonts.plusJakartaSans( - fontSize: 22, - fontWeight: FontWeight.bold, - ), - headline2: GoogleFonts.plusJakartaSans( - fontSize: 18, - fontWeight: FontWeight.bold, - ), - headline3: GoogleFonts.plusJakartaSans( - fontSize: 14, - fontWeight: FontWeight.bold, - ), - body: GoogleFonts.plusJakartaSans( - fontSize: 16, - fontWeight: FontWeight.normal, - ), - callout: GoogleFonts.plusJakartaSans( - fontSize: 14, - fontWeight: FontWeight.normal, - ), - ).toMap, - radii: const MyThemeRadiusToken( - large: Radius.circular(100), - medium: Radius.circular(12), - ).toMap, - spaces: const MyThemeSpaceToken( - medium: 16, - large: 24, - ).toMap, -); diff --git a/examples/todo_list/lib/style/token.g.dart b/examples/todo_list/lib/style/token.g.dart deleted file mode 100644 index 7d1d2e4b8..000000000 --- a/examples/todo_list/lib/style/token.g.dart +++ /dev/null @@ -1,155 +0,0 @@ -// GENERATED CODE - DO NOT MODIFY BY HAND - -part of 'token.dart'; - -// ************************************************************************** -// MixableTokensGenerator -// ************************************************************************** - -class _$MyThemeColorTokenStruct { - _$MyThemeColorTokenStruct(); - - final ColorToken primary = const ColorToken('primary'); - final ColorToken onPrimary = const ColorToken('onPrimary'); - final ColorToken surface = const ColorToken('surface'); - final ColorToken onSurface = const ColorToken('onSurface'); - final ColorSwatchToken onSurfaceVariant = - ColorSwatchToken.scale('onSurfaceVariant', 12); -} - -final _structMyThemeColorToken = _$MyThemeColorTokenStruct(); - -Map _$MyThemeColorTokenToMap(MyThemeColorToken tokens) { - return { - _structMyThemeColorToken.primary: tokens.primary, - _structMyThemeColorToken.onPrimary: tokens.onPrimary, - _structMyThemeColorToken.surface: tokens.surface, - _structMyThemeColorToken.onSurface: tokens.onSurface, - _structMyThemeColorToken.onSurfaceVariant: tokens.onSurfaceVariant, - }; -} - -extension $MyThemeColorTokenColorUtilityX - on ColorUtility { - primary() => ref(_structMyThemeColorToken.primary); - onPrimary() => ref(_structMyThemeColorToken.onPrimary); - surface() => ref(_structMyThemeColorToken.surface); - onSurface() => ref(_structMyThemeColorToken.onSurface); - onSurfaceVariant([int step = 1]) => - ref(_structMyThemeColorToken.onSurfaceVariant[step]); -} - -class BuildContextMyThemeColorTokenMethods { - const BuildContextMyThemeColorTokenMethods(this.context); - - final BuildContext context; - primary() => _structMyThemeColorToken.primary.resolve(context); - onPrimary() => _structMyThemeColorToken.onPrimary.resolve(context); - surface() => _structMyThemeColorToken.surface.resolve(context); - onSurface() => _structMyThemeColorToken.onSurface.resolve(context); - onSurfaceVariant([int step = 1]) => - _structMyThemeColorToken.onSurfaceVariant[step].resolve(context); -} - -extension $BuildContextMyThemeColorTokenX on BuildContext { - BuildContextMyThemeColorTokenMethods get $c => - BuildContextMyThemeColorTokenMethods(this); -} - -class _$MyThemeTextStyleTokenStruct { - _$MyThemeTextStyleTokenStruct(); - - final TextStyleToken headline1 = const TextStyleToken('headline1'); - final TextStyleToken headline2 = const TextStyleToken('headline2'); - final TextStyleToken headline3 = const TextStyleToken('headline3'); - final TextStyleToken body = const TextStyleToken('body'); - final TextStyleToken callout = const TextStyleToken('callout'); -} - -final _structMyThemeTextStyleToken = _$MyThemeTextStyleTokenStruct(); - -Map _$MyThemeTextStyleTokenToMap( - MyThemeTextStyleToken tokens) { - return { - _structMyThemeTextStyleToken.headline1: tokens.headline1, - _structMyThemeTextStyleToken.headline2: tokens.headline2, - _structMyThemeTextStyleToken.headline3: tokens.headline3, - _structMyThemeTextStyleToken.body: tokens.body, - _structMyThemeTextStyleToken.callout: tokens.callout, - }; -} - -class _$MyThemeRadiusTokenStruct { - _$MyThemeRadiusTokenStruct(); - - final RadiusToken large = const RadiusToken('large'); - final RadiusToken medium = const RadiusToken('medium'); -} - -final _structMyThemeRadiusToken = _$MyThemeRadiusTokenStruct(); - -Map _$MyThemeRadiusTokenToMap(MyThemeRadiusToken tokens) { - return { - _structMyThemeRadiusToken.large: tokens.large, - _structMyThemeRadiusToken.medium: tokens.medium, - }; -} - -extension $MyThemeRadiusTokenRadiusUtilityX - on RadiusUtility { - large() => ref(_structMyThemeRadiusToken.large); - medium() => ref(_structMyThemeRadiusToken.medium); -} - -class BuildContextMyThemeRadiusTokenMethods { - const BuildContextMyThemeRadiusTokenMethods(this.context); - - final BuildContext context; - large() => _structMyThemeRadiusToken.large.resolve(context); - medium() => _structMyThemeRadiusToken.medium.resolve(context); -} - -extension $BuildContextMyThemeRadiusTokenX on BuildContext { - BuildContextMyThemeRadiusTokenMethods get $radius => - BuildContextMyThemeRadiusTokenMethods(this); -} - -class _$MyThemeSpaceTokenStruct { - _$MyThemeSpaceTokenStruct(); - - final SpaceToken medium = const SpaceToken('medium'); - final SpaceToken large = const SpaceToken('large'); -} - -final _structMyThemeSpaceToken = _$MyThemeSpaceTokenStruct(); - -Map _$MyThemeSpaceTokenToMap(MyThemeSpaceToken tokens) { - return { - _structMyThemeSpaceToken.medium: tokens.medium, - _structMyThemeSpaceToken.large: tokens.large, - }; -} - -extension $MyThemeSpaceTokenSpacingSideUtilityX - on SpacingSideUtility { - medium() => ref(_structMyThemeSpaceToken.medium); - large() => ref(_structMyThemeSpaceToken.large); -} - -extension $MyThemeSpaceTokenGapUtilityX on GapUtility { - medium() => ref(_structMyThemeSpaceToken.medium); - large() => ref(_structMyThemeSpaceToken.large); -} - -class BuildContextMyThemeSpaceTokenMethods { - const BuildContextMyThemeSpaceTokenMethods(this.context); - - final BuildContext context; - medium() => _structMyThemeSpaceToken.medium.resolve(context); - large() => _structMyThemeSpaceToken.large.resolve(context); -} - -extension $BuildContextMyThemeSpaceTokenX on BuildContext { - BuildContextMyThemeSpaceTokenMethods get $space => - BuildContextMyThemeSpaceTokenMethods(this); -} From 58f9f7f659063919483b4c4e41d89fac6eb491b4 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:40:37 -0300 Subject: [PATCH 23/30] improve remixTheme --- packages/remix/demo/lib/main.dart | 10 +++----- .../remix/lib/src/core/theme/remix_theme.dart | 11 +++++--- .../remix/lib/src/themes/fortaleza/theme.dart | 25 +++---------------- packages/remix/test/app/remix_app_test.dart | 15 +++++------ 4 files changed, 24 insertions(+), 37 deletions(-) diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 7ded3a44c..242c1deed 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -48,17 +48,15 @@ class HotReload extends StatelessWidget { WidgetbookTheme( name: 'Fortaleza', data: ( - light: FortalezaThemeData.light().toThemeData(), - dark: FortalezaThemeData.dark().toThemeData(), + light: FortalezaThemeData.light(), + dark: FortalezaThemeData.dark(), ), ), WidgetbookTheme( name: 'Base', data: ( - light: RemixThemeData.base(), - dark: RemixThemeData.base().copyWith( - components: RemixComponentTheme.dark(), - ), + light: RemixThemeData.baseLight(), + dark: RemixThemeData.baseDark(), ), ), ], diff --git a/packages/remix/lib/src/core/theme/remix_theme.dart b/packages/remix/lib/src/core/theme/remix_theme.dart index 2dbe5deed..9e4ebc101 100644 --- a/packages/remix/lib/src/core/theme/remix_theme.dart +++ b/packages/remix/lib/src/core/theme/remix_theme.dart @@ -10,11 +10,16 @@ class RemixThemeData { const RemixThemeData({required this.components, required this.tokens}); - static RemixThemeData base() => RemixThemeData( + factory RemixThemeData.baseLight() => RemixThemeData( components: RemixComponentTheme.light(), tokens: const MixThemeData.empty(), ); + factory RemixThemeData.baseDark() => RemixThemeData( + components: RemixComponentTheme.dark(), + tokens: const MixThemeData.empty(), + ); + RemixThemeData copyWith({ RemixComponentTheme? components, MixThemeData? tokens, @@ -82,8 +87,8 @@ class RemixTheme extends StatelessWidget { final RemixThemeData? darkTheme; final Widget child; - RemixThemeData get _defaultThemeDark => RemixThemeData.base(); - RemixThemeData get _defaultThemeLight => RemixThemeData.base(); + RemixThemeData get _defaultThemeLight => RemixThemeData.baseLight(); + RemixThemeData get _defaultThemeDark => RemixThemeData.baseDark(); RemixThemeData _defineRemixThemeData(BuildContext context) { if (themeMode != null) { diff --git a/packages/remix/lib/src/themes/fortaleza/theme.dart b/packages/remix/lib/src/themes/fortaleza/theme.dart index 7a8e80ba0..c906c18e3 100644 --- a/packages/remix/lib/src/themes/fortaleza/theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/theme.dart @@ -2,37 +2,20 @@ import '../../core/theme/remix_theme.dart'; import 'components.dart'; import 'tokens.dart'; -class FortalezaThemeData { - final FortalezaComponentTheme components; - final FortalezaTokens tokens; - +class FortalezaThemeData extends RemixThemeData { factory FortalezaThemeData.light() { return FortalezaThemeData( components: FortalezaComponentTheme.light(), - tokens: FortalezaTokens.light(), + tokens: FortalezaTokens.light().toThemeData(), ); } factory FortalezaThemeData.dark() { return FortalezaThemeData( components: FortalezaComponentTheme.dark(), - tokens: FortalezaTokens.dark(), + tokens: FortalezaTokens.dark().toThemeData(), ); } - const FortalezaThemeData({required this.components, required this.tokens}); - - FortalezaThemeData copyWith({ - FortalezaComponentTheme? components, - FortalezaTokens? tokens, - }) { - return FortalezaThemeData( - components: components ?? this.components, - tokens: tokens ?? this.tokens, - ); - } - - RemixThemeData toThemeData() { - return RemixThemeData(components: components, tokens: tokens.toThemeData()); - } + const FortalezaThemeData({required super.components, required super.tokens}); } diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart index 86dc6b273..2cb41f8c5 100644 --- a/packages/remix/test/app/remix_app_test.dart +++ b/packages/remix/test/app/remix_app_test.dart @@ -9,7 +9,7 @@ void main() { testWidgets( 'RemixApp should use the provided theme tokens when no dark theme is provided', (WidgetTester tester) async { - final theme = FortalezaThemeData.light().toThemeData(); + final theme = FortalezaThemeData.light(); for (final brightness in Brightness.values) { await tester.pumpWidget( @@ -34,18 +34,19 @@ void main() { MediaQuery( data: MediaQueryData(platformBrightness: brightness), child: RemixApp( - theme: FortalezaThemeData.light().toThemeData(), - darkTheme: FortalezaThemeData.dark().toThemeData(), + theme: FortalezaThemeData.light(), + darkTheme: FortalezaThemeData.dark(), ), ), ); final remixTheme = tester .firstWidget(find.byType(RemixThemeInherited)); - final expectedTheme = (brightness == Brightness.light - ? FortalezaThemeData.light() - : FortalezaThemeData.dark()) - .toThemeData(); + final expectedTheme = ( + brightness == Brightness.light + ? FortalezaThemeData.light() + : FortalezaThemeData.dark(), + ); expect(remixTheme.data, expectedTheme); } From cfd6f99e6fd2d58218423e91e75b64e79e9664f7 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:18:29 -0300 Subject: [PATCH 24/30] Update card_use_case.dart --- packages/remix/demo/lib/components/card_use_case.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/remix/demo/lib/components/card_use_case.dart b/packages/remix/demo/lib/components/card_use_case.dart index 3d0a07422..03b3caaba 100644 --- a/packages/remix/demo/lib/components/card_use_case.dart +++ b/packages/remix/demo/lib/components/card_use_case.dart @@ -11,7 +11,6 @@ import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; type: Card, ) Widget buildCard(BuildContext context) { - final color = context.$color.neutral(10); return Scaffold( body: Center( child: Card( From a488c35a97f48f7915b9080c4e9fc60fdd1d31b6 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 16:19:08 -0300 Subject: [PATCH 25/30] Update toast_layer.dart --- packages/remix/lib/src/components/toast/toast_layer.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/remix/lib/src/components/toast/toast_layer.dart b/packages/remix/lib/src/components/toast/toast_layer.dart index 61dc8fa22..f2066592d 100644 --- a/packages/remix/lib/src/components/toast/toast_layer.dart +++ b/packages/remix/lib/src/components/toast/toast_layer.dart @@ -66,7 +66,6 @@ class ToastLayerState extends State implements ToastActions { return Stack( children: [ AnimatedSwitcher( - child: toastWidget, duration: toast?.animationDuration ?? const Duration(milliseconds: 500), reverseDuration: toast?.reverseAnimationDuration ?? @@ -97,6 +96,7 @@ class ToastLayerState extends State implements ToastActions { child: FadeTransition(opacity: animation, child: child), ); }, + child: toastWidget, ), widget.child, ], From 49fa5ec8cc5435da49c467f7566252d48f01a427 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:04:49 -0300 Subject: [PATCH 26/30] textfield --- packages/remix/test/app/remix_app_test.dart | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/remix/test/app/remix_app_test.dart b/packages/remix/test/app/remix_app_test.dart index 2cb41f8c5..845e1e258 100644 --- a/packages/remix/test/app/remix_app_test.dart +++ b/packages/remix/test/app/remix_app_test.dart @@ -39,16 +39,16 @@ void main() { ), ), ); - final remixTheme = tester - .firstWidget(find.byType(RemixThemeInherited)); + final remixThemeInherited = tester + .widget(find.byType(RemixThemeInherited)); - final expectedTheme = ( - brightness == Brightness.light - ? FortalezaThemeData.light() - : FortalezaThemeData.dark(), - ); + final remixTheme = tester.widget(find.byType(RemixTheme)); + + final expectedTheme = brightness == Brightness.light + ? remixTheme.theme + : remixTheme.darkTheme; - expect(remixTheme.data, expectedTheme); + expect(remixThemeInherited.data, expectedTheme); } }, ); From 16f9bf3434c25b95b4b5463fe92f2d94b7bcc7e7 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:27:39 -0300 Subject: [PATCH 27/30] Update component.dart --- packages/remix/lib/src/core/theme/component.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/remix/lib/src/core/theme/component.dart b/packages/remix/lib/src/core/theme/component.dart index d1cebe670..c608eb759 100644 --- a/packages/remix/lib/src/core/theme/component.dart +++ b/packages/remix/lib/src/core/theme/component.dart @@ -119,6 +119,7 @@ class RemixComponentTheme { spinner: const SpinnerDarkStyle(), switchComponent: const SwitchDarkStyle(), textField: const TextFieldDarkStyle(), + toast: const ToastDarkStyle(), slider: const SliderDarkStyle(), ); } From a45812238aeb42b0ebec36720b5c719dd75fe9ac Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:28:54 -0300 Subject: [PATCH 28/30] Delete remix_theme.dart --- packages/remix/lib/src/theme/remix_theme.dart | 335 ------------------ 1 file changed, 335 deletions(-) delete mode 100644 packages/remix/lib/src/theme/remix_theme.dart diff --git a/packages/remix/lib/src/theme/remix_theme.dart b/packages/remix/lib/src/theme/remix_theme.dart deleted file mode 100644 index 3a46635e3..000000000 --- a/packages/remix/lib/src/theme/remix_theme.dart +++ /dev/null @@ -1,335 +0,0 @@ -import 'package:flutter/foundation.dart'; -import 'package:flutter/widgets.dart'; -import 'package:mix/mix.dart'; - -import '../components/accordion/accordion.dart'; -import '../components/avatar/avatar.dart'; -import '../components/badge/badge.dart'; -import '../components/button/button.dart'; -import '../components/callout/callout.dart'; -import '../components/card/card.dart'; -import '../components/checkbox/checkbox.dart'; -import '../components/chip/chip.dart'; -import '../components/dialog/dialog.dart'; -import '../components/divider/divider.dart'; -import '../components/icon_button/icon_button.dart'; -import '../components/menu_item/menu_item.dart'; -import '../components/progress/progress.dart'; -import '../components/radio/radio.dart'; -import '../components/scaffold/scaffold.dart'; -import '../components/segmented_control/segmented_control.dart'; -import '../components/select/select.dart'; -import '../components/slider/slider.dart'; -import '../components/spinner/spinner.dart'; -import '../components/switch/switch.dart'; -import '../components/textfield/textfield.dart'; -import '../components/toast/toast.dart'; -import 'remix_tokens.dart'; - -class RemixComponentTheme { - final AccordionStyle accordion; - final AvatarStyle avatar; - final BadgeStyle badge; - final ButtonStyle button; - final CalloutStyle callout; - final CardStyle card; - final CheckboxStyle checkbox; - final DialogStyle dialog; - final ChipStyle chip; - final DividerStyle divider; - final IconButtonStyle iconButton; - final MenuItemStyle menuItem; - final ProgressStyle progress; - final RadioStyle radio; - final ScaffoldStyle scaffold; - final SegmentedControlStyle segmentedControl; - final SelectStyle select; - final SpinnerStyle spinner; - final SwitchStyle switchComponent; - final TextFieldStyle textField; - final ToastStyle toast; - final SliderStyle slider; - - const RemixComponentTheme({ - required this.accordion, - required this.avatar, - required this.badge, - required this.button, - required this.callout, - required this.card, - required this.checkbox, - required this.dialog, - required this.chip, - required this.divider, - required this.iconButton, - required this.menuItem, - required this.progress, - required this.radio, - required this.scaffold, - required this.segmentedControl, - required this.select, - required this.spinner, - required this.switchComponent, - required this.textField, - required this.toast, - required this.slider, - }); - - factory RemixComponentTheme.baseLight() { - return const RemixComponentTheme( - accordion: AccordionStyle(), - avatar: AvatarStyle(), - badge: BadgeStyle(), - button: ButtonStyle(), - callout: CalloutStyle(), - card: CardStyle(), - checkbox: CheckboxStyle(), - dialog: DialogStyle(), - chip: ChipStyle(), - divider: DividerStyle(), - iconButton: IconButtonStyle(), - menuItem: MenuItemStyle(), - progress: ProgressStyle(), - radio: RadioStyle(), - scaffold: ScaffoldStyle(), - segmentedControl: SegmentedControlStyle(), - select: SelectStyle(), - spinner: SpinnerStyle(), - switchComponent: SwitchStyle(), - textField: TextFieldStyle(), - toast: ToastStyle(), - slider: SliderStyle(), - ); - } - - factory RemixComponentTheme.baseDark() { - return RemixComponentTheme.baseLight().copyWith( - accordion: const AccordionDarkStyle(), - avatar: const AvatarDarkStyle(), - badge: const BadgeDarkStyle(), - button: const ButtonDarkStyle(), - callout: const CalloutDarkStyle(), - card: const CardDarkStyle(), - checkbox: const CheckboxDarkStyle(), - dialog: const DialogDarkStyle(), - chip: const ChipDarkStyle(), - divider: const DividerDarkStyle(), - iconButton: const IconButtonDarkStyle(), - menuItem: const MenuItemDarkStyle(), - progress: const ProgressDarkStyle(), - radio: const RadioDarkStyle(), - scaffold: const ScaffoldDarkStyle(), - segmentedControl: const SegmentedControlDarkStyle(), - select: const SelectDarkStyle(), - spinner: const SpinnerDarkStyle(), - switchComponent: const SwitchDarkStyle(), - textField: const TextFieldDarkStyle(), - toast: const ToastDarkStyle(), - slider: const SliderDarkStyle(), - ); - } - - factory RemixComponentTheme.fortalezaLight() { - return const RemixComponentTheme( - accordion: FortalezaAccordionStyle(), - avatar: FortalezaAvatarStyle(), - badge: FortalezaBadgeStyle(), - button: FortalezaButtonStyle(), - callout: FortalezaCalloutStyle(), - card: FortalezaCardStyle(), - checkbox: FortalezaCheckboxStyle(), - dialog: FortalezaDialogStyle(), - chip: FortalezaChipStyle(), - divider: FortalezaDividerStyle(), - iconButton: FortalezaIconButtonStyle(), - menuItem: FortalezaMenuItemStyle(), - progress: FortalezaProgressStyle(), - radio: FortalezaRadioStyle(), - scaffold: FortalezaScaffoldStyle(), - segmentedControl: FortalezaSegmentedControlStyle(), - select: FortalezaSelectStyle(), - spinner: FortalezaSpinnerStyle(), - switchComponent: FortalezaSwitchStyle(), - textField: FortalezaTextFieldStyle(), - toast: FortalezaToastStyle(), - slider: FortalezaSliderStyle(), - ); - } - - factory RemixComponentTheme.fortalezaDark() { - return RemixComponentTheme.fortalezaLight().copyWith( - avatar: const FortalezaDarkAvatarStyle(), - badge: const FortalezaDarkBadgeStyle(), - segmentedControl: const FortalezaDarkSegmentedControlStyle(), - select: const FortalezaDarkSelectStyle(), - switchComponent: const FortalezaDarkSwitchStyle(), - ); - } - - RemixComponentTheme copyWith({ - AccordionStyle? accordion, - AvatarStyle? avatar, - BadgeStyle? badge, - ButtonStyle? button, - CalloutStyle? callout, - CardStyle? card, - CheckboxStyle? checkbox, - DialogStyle? dialog, - ChipStyle? chip, - DividerStyle? divider, - IconButtonStyle? iconButton, - MenuItemStyle? menuItem, - ProgressStyle? progress, - RadioStyle? radio, - ScaffoldStyle? scaffold, - SegmentedControlStyle? segmentedControl, - SelectStyle? select, - SpinnerStyle? spinner, - SwitchStyle? switchComponent, - TextFieldStyle? textField, - ToastStyle? toast, - SliderStyle? slider, - }) { - return RemixComponentTheme( - accordion: accordion ?? this.accordion, - avatar: avatar ?? this.avatar, - badge: badge ?? this.badge, - button: button ?? this.button, - callout: callout ?? this.callout, - card: card ?? this.card, - checkbox: checkbox ?? this.checkbox, - dialog: dialog ?? this.dialog, - chip: chip ?? this.chip, - divider: divider ?? this.divider, - iconButton: iconButton ?? this.iconButton, - menuItem: menuItem ?? this.menuItem, - progress: progress ?? this.progress, - radio: radio ?? this.radio, - scaffold: scaffold ?? this.scaffold, - segmentedControl: segmentedControl ?? this.segmentedControl, - select: select ?? this.select, - spinner: spinner ?? this.spinner, - switchComponent: switchComponent ?? this.switchComponent, - textField: textField ?? this.textField, - toast: toast ?? this.toast, - slider: slider ?? this.slider, - ); - } -} - -extension BuildContextRemixThemeX on BuildContext { - RemixThemeData get remix => RemixTheme.of(this); -} - -class RemixThemeData { - final RemixComponentTheme components; - final RemixTokens tokens; - const RemixThemeData({required this.components, required this.tokens}); - - static RemixThemeData base() => RemixThemeData( - components: RemixComponentTheme.baseLight(), - tokens: RemixTokens.base(), - ); - - @override - bool operator ==(Object other) { - if (identical(this, other)) return true; - - return other is RemixThemeData && - other.components == components && - other.tokens == tokens; - } - - @override - int get hashCode => components.hashCode ^ tokens.hashCode; -} - -enum ThemeMode { - light, - dark, -} - -class RemixTheme extends StatelessWidget { - const RemixTheme({ - super.key, - required this.theme, - required this.child, - this.themeMode, - this.darkTheme, - }); - - static RemixThemeData of(BuildContext context) { - final _RemixThemeInherited? provider = - context.dependOnInheritedWidgetOfExactType<_RemixThemeInherited>(); - - if (provider == null) { - throw FlutterError( - 'RemixTheme.of() called with a context that does not contain a RemixTheme.\n' - 'No RemixTheme ancestor could be found starting from the context that was passed to RemixTheme.of(). ' - 'This can happen because the context you used comes from a widget above the RemixTheme.\n' - 'The context used was:\n' - ' $context', - ); - } - - return provider.data; - } - - static RemixThemeData? maybeOf(BuildContext context) { - return context - .dependOnInheritedWidgetOfExactType<_RemixThemeInherited>() - ?.data; - } - - final ThemeMode? themeMode; - - final RemixThemeData? theme; - - final RemixThemeData? darkTheme; - final Widget child; - - RemixThemeData get _defaultThemeDark => RemixThemeData.base(); - RemixThemeData get _defaultThemeLight => RemixThemeData.base(); - - RemixThemeData _defineRemixThemeData(BuildContext context) { - if (themeMode != null) { - return themeMode == ThemeMode.dark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - final brightness = MediaQuery.platformBrightnessOf(context); - final isDark = brightness == Brightness.dark; - - return isDark - ? (darkTheme ?? _defaultThemeDark) - : (theme ?? _defaultThemeLight); - } - - @override - Widget build(BuildContext context) { - final theme = _defineRemixThemeData(context); - final tokens = theme.tokens; - - return MixTheme( - data: MixThemeData( - colors: tokens.colors, - spaces: tokens.spaces, - textStyles: tokens.textStyles, - radii: tokens.radii, - ), - child: _RemixThemeInherited(data: theme, child: child), - ); - } -} - -class _RemixThemeInherited extends InheritedWidget { - const _RemixThemeInherited({required super.child, required this.data}); - - final RemixThemeData data; - - @override - bool updateShouldNotify(_RemixThemeInherited oldWidget) { - return data != oldWidget.data; - } -} From 98a5f277dad1d9de6ced70cefbfad3d9bf1ef068 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:18:54 -0300 Subject: [PATCH 29/30] some adjustments --- .../demo/lib/addons/brightness_addon.dart | 44 ++++++++---- .../remix/demo/lib/addons/theme_addon.dart | 70 +++++++++++++++++++ .../demo/lib/components/card_use_case.dart | 18 ++++- .../remix/demo/lib/helpers/theme_addon.dart | 23 ------ packages/remix/demo/lib/main.dart | 68 +++++++----------- .../src/components/button/button_widget.dart | 6 +- .../lib/src/themes/fortaleza/components.dart | 55 +-------------- .../fortaleza/components/button_theme.dart | 2 +- .../lib/src/themes/fortaleza/tokens.dart | 64 ++++++++++------- 9 files changed, 184 insertions(+), 166 deletions(-) create mode 100644 packages/remix/demo/lib/addons/theme_addon.dart delete mode 100644 packages/remix/demo/lib/helpers/theme_addon.dart diff --git a/packages/remix/demo/lib/addons/brightness_addon.dart b/packages/remix/demo/lib/addons/brightness_addon.dart index d44074d95..4cce88bc3 100644 --- a/packages/remix/demo/lib/addons/brightness_addon.dart +++ b/packages/remix/demo/lib/addons/brightness_addon.dart @@ -1,43 +1,59 @@ import 'package:flutter/material.dart'; import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart'; -class BrightnessAddon extends WidgetbookAddon { - final Brightness initialBrightness; +class WidgetBookBrightness { + static const light = 'light'; + static const dark = 'dark'; +} + +class BrightnessAddon extends WidgetbookAddon { + final String initialBrightness; BrightnessAddon({ - this.initialBrightness = Brightness.light, - }) : super(name: 'Brightness'); + this.initialBrightness = WidgetBookBrightness.light, + }) : super(name: 'brightness'); @override Widget buildUseCase( BuildContext context, Widget child, - Brightness setting, + String setting, ) { - return Theme( - data: ThemeData( - brightness: setting, + return MediaQuery( + data: MediaQueryData( + platformBrightness: setting == WidgetBookBrightness.light + ? Brightness.light + : Brightness.dark, ), child: child, ); } @override - List> get fields { + List> get fields { return [ - ListField( + ListField( name: 'brightness', initialValue: initialBrightness, values: [ - Brightness.light, - Brightness.dark, + WidgetBookBrightness.light, + WidgetBookBrightness.dark, ], ) ]; } @override - Brightness valueFromQueryGroup(Map group) { - return valueOf('brightness', group)!; + String valueFromQueryGroup(Map group) { + return valueOf('brightness', group)!; } } + +class BrightnessAddonConfig extends AddonConfig { + const BrightnessAddonConfig(String value) + : super( + 'brightness', + 'brightness:$value', + ); +} diff --git a/packages/remix/demo/lib/addons/theme_addon.dart b/packages/remix/demo/lib/addons/theme_addon.dart new file mode 100644 index 000000000..e5080acca --- /dev/null +++ b/packages/remix/demo/lib/addons/theme_addon.dart @@ -0,0 +1,70 @@ +import 'package:flutter/widgets.dart'; +import 'package:remix/remix.dart'; +import 'package:remix/themes/fortaleza.dart'; +import 'package:widgetbook/widgetbook.dart'; +import 'package:widgetbook_annotation/widgetbook_annotation.dart'; + +typedef ThemeMultiBrightness = ({RemixThemeData light, RemixThemeData dark}); + +final Map themes = { + 'fortaleza': ( + light: FortalezaThemeData.light(), + dark: FortalezaThemeData.dark(), + ), + 'base': ( + light: RemixThemeData.baseLight(), + dark: RemixThemeData.baseDark(), + ), +}; + +class ComponentTheme { + static const fortaleza = 'fortaleza'; + static const base = 'base'; +} + +class ComponentThemeAddon extends WidgetbookAddon { + final String initialBrightness; + + ComponentThemeAddon({ + this.initialBrightness = ComponentTheme.fortaleza, + }) : super(name: 'component theme'); + + @override + Widget buildUseCase( + BuildContext context, + Widget child, + String setting, + ) { + final theme = themes[setting]; + return RemixApp( + debugShowCheckedModeBanner: false, + darkTheme: theme!.dark, + theme: theme.light, + home: child, + ); + } + + @override + List> get fields { + return [ + ListField( + name: 'brightness', + initialValue: initialBrightness, + values: [ + ComponentTheme.fortaleza, + ComponentTheme.base, + ], + ) + ]; + } + + @override + String valueFromQueryGroup(Map group) { + return valueOf('brightness', group)!; + } +} + +class ComponentThemeAddonConfig extends AddonConfig { + const ComponentThemeAddonConfig(String value) + : super('component theme', 'component theme:$value'); +} diff --git a/packages/remix/demo/lib/components/card_use_case.dart b/packages/remix/demo/lib/components/card_use_case.dart index 03b3caaba..8a553b9a7 100644 --- a/packages/remix/demo/lib/components/card_use_case.dart +++ b/packages/remix/demo/lib/components/card_use_case.dart @@ -33,13 +33,25 @@ Widget buildCard(BuildContext context) { children: [ StyledText( 'Leo Farias', - style: Style($text.style.$text3()), + style: Style( + $text.chain + ..style.fontSize(14) + ..style.fontWeight.bold() + ..style.color.black87(), + $on.dark( + $text.style.color.white(), + ), + ), ), StyledText( 'Flutter Engineer', style: Style( - $text.style.$text2(), - $text.style.color.$neutral(10), + $text.chain + ..style.fontSize(12) + ..style.color.black54(), + $on.dark( + $text.style.color.white70(), + ), ), ), ], diff --git a/packages/remix/demo/lib/helpers/theme_addon.dart b/packages/remix/demo/lib/helpers/theme_addon.dart deleted file mode 100644 index 2d20309ff..000000000 --- a/packages/remix/demo/lib/helpers/theme_addon.dart +++ /dev/null @@ -1,23 +0,0 @@ -import 'package:remix/remix.dart'; -import 'package:widgetbook/widgetbook.dart'; - -typedef ThemeMultiBrightness = ({RemixThemeData light, RemixThemeData dark}); - -class RemixComponentThemeAddon extends ThemeAddon { - @override - String get name => 'Component Theme'; - - RemixComponentThemeAddon({ - required super.themes, - super.initialTheme, - }) : super( - themeBuilder: (context, themes, child) { - return RemixApp( - debugShowCheckedModeBanner: false, - darkTheme: themes.dark, - theme: themes.light, - home: child, - ); - }, - ); -} diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 242c1deed..5f37b8cfc 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -1,13 +1,33 @@ -import 'package:demo/helpers/theme_addon.dart'; +import 'package:demo/addons/theme_addon.dart'; import 'package:flutter/material.dart' hide Scaffold, ThemeMode; import 'package:remix/remix.dart'; import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; +import 'addons/brightness_addon.dart'; import 'main.directories.g.dart'; -@widgetbook.App() +@widgetbook.App( + cloudAddonsConfigs: { + 'dark fortaleza': [ + BrightnessAddonConfig(WidgetBookBrightness.dark), + ComponentThemeAddonConfig(ComponentTheme.fortaleza), + ], + 'light fortaleza': [ + BrightnessAddonConfig(WidgetBookBrightness.light), + ComponentThemeAddonConfig(ComponentTheme.fortaleza), + ], + 'dark base': [ + BrightnessAddonConfig(WidgetBookBrightness.dark), + ComponentThemeAddonConfig(ComponentTheme.base), + ], + 'light base': [ + BrightnessAddonConfig(WidgetBookBrightness.light), + ComponentThemeAddonConfig(ComponentTheme.base), + ], + }, +) void main() { runApp(const HotReload()); } @@ -19,48 +39,8 @@ class HotReload extends StatelessWidget { Widget build(BuildContext context) { return Widgetbook( addons: [ - ThemeAddon( - themes: [ - const WidgetbookTheme( - name: 'Light', - data: Brightness.light, - ), - const WidgetbookTheme( - name: 'Dark', - data: Brightness.dark, - ), - ], - initialTheme: const WidgetbookTheme( - name: 'Light', - data: Brightness.light, - ), - themeBuilder: (context, Brightness theme, child) { - return MediaQuery( - data: MediaQueryData( - platformBrightness: theme, - ), - child: child, - ); - }, - ), - RemixComponentThemeAddon( - themes: [ - WidgetbookTheme( - name: 'Fortaleza', - data: ( - light: FortalezaThemeData.light(), - dark: FortalezaThemeData.dark(), - ), - ), - WidgetbookTheme( - name: 'Base', - data: ( - light: RemixThemeData.baseLight(), - dark: RemixThemeData.baseDark(), - ), - ), - ], - ), + BrightnessAddon(), + ComponentThemeAddon(), InspectorAddon(), ], appBuilder: (context, child) => child, diff --git a/packages/remix/lib/src/components/button/button_widget.dart b/packages/remix/lib/src/components/button/button_widget.dart index cbaace8f5..58c12990c 100644 --- a/packages/remix/lib/src/components/button/button_widget.dart +++ b/packages/remix/lib/src/components/button/button_widget.dart @@ -118,7 +118,7 @@ class ButtonSpecWidget extends StatelessWidget { } Widget _buildChildren(ButtonSpec spec) { - final flexboxWidget = spec.container( + final flexWidget = spec.container.flex( direction: Axis.horizontal, children: [ if (iconLeft != null) spec.icon(iconLeft), @@ -128,13 +128,13 @@ class ButtonSpecWidget extends StatelessWidget { ], ); - return loading ? _buildLoadingOverlay(spec, flexboxWidget) : flexboxWidget; + return loading ? _buildLoadingOverlay(spec, flexWidget) : flexWidget; } @override Widget build(BuildContext context) { final spec = this.spec ?? const ButtonSpec(); - return _buildChildren(spec); + return spec.container.box(child: _buildChildren(spec)); } } diff --git a/packages/remix/lib/src/themes/fortaleza/components.dart b/packages/remix/lib/src/themes/fortaleza/components.dart index d50a9cf05..2319cfdff 100644 --- a/packages/remix/lib/src/themes/fortaleza/components.dart +++ b/packages/remix/lib/src/themes/fortaleza/components.dart @@ -48,7 +48,7 @@ class FortalezaComponentTheme extends RemixComponentTheme { required super.slider, }); - factory FortalezaComponentTheme.light() { + static RemixComponentTheme light() { return const FortalezaComponentTheme( accordion: FortalezaAccordionStyle(), avatar: FortalezaAvatarStyle(), @@ -75,7 +75,7 @@ class FortalezaComponentTheme extends RemixComponentTheme { ); } - factory FortalezaComponentTheme.dark() { + static RemixComponentTheme dark() { return FortalezaComponentTheme.light().copyWith( avatar: const FortalezaDarkAvatarStyle(), badge: const FortalezaDarkBadgeStyle(), @@ -84,55 +84,4 @@ class FortalezaComponentTheme extends RemixComponentTheme { switchComponent: const FortalezaDarkSwitchStyle(), ); } - - @override - FortalezaComponentTheme copyWith({ - covariant FortalezaAccordionStyle? accordion, - covariant FortalezaAvatarStyle? avatar, - covariant FortalezaBadgeStyle? badge, - covariant FortalezaButtonStyle? button, - covariant FortalezaCalloutStyle? callout, - covariant FortalezaCardStyle? card, - covariant FortalezaCheckboxStyle? checkbox, - covariant FortalezaDialogStyle? dialog, - covariant FortalezaChipStyle? chip, - covariant FortalezaDividerStyle? divider, - covariant FortalezaIconButtonStyle? iconButton, - covariant FortalezaMenuItemStyle? menuItem, - covariant FortalezaProgressStyle? progress, - covariant FortalezaRadioStyle? radio, - covariant FortalezaScaffoldStyle? scaffold, - covariant FortalezaSegmentedControlStyle? segmentedControl, - covariant FortalezaSelectStyle? select, - covariant FortalezaSpinnerStyle? spinner, - covariant FortalezaSwitchStyle? switchComponent, - covariant FortalezaTextFieldStyle? textField, - covariant FortalezaToastStyle? toast, - covariant FortalezaSliderStyle? slider, - }) { - return FortalezaComponentTheme( - accordion: accordion ?? this.accordion, - avatar: avatar ?? this.avatar, - badge: badge ?? this.badge, - button: button ?? this.button, - callout: callout ?? this.callout, - card: card ?? this.card, - checkbox: checkbox ?? this.checkbox, - dialog: dialog ?? this.dialog, - chip: chip ?? this.chip, - divider: divider ?? this.divider, - iconButton: iconButton ?? this.iconButton, - menuItem: menuItem ?? this.menuItem, - progress: progress ?? this.progress, - radio: radio ?? this.radio, - scaffold: scaffold ?? this.scaffold, - segmentedControl: segmentedControl ?? this.segmentedControl, - select: select ?? this.select, - spinner: spinner ?? this.spinner, - switchComponent: switchComponent ?? this.switchComponent, - textField: textField ?? this.textField, - toast: toast ?? this.toast, - slider: slider ?? this.slider, - ); - } } diff --git a/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart index 334d4656e..21c0fea89 100644 --- a/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart +++ b/packages/remix/lib/src/themes/fortaleza/components/button_theme.dart @@ -103,6 +103,6 @@ class FortalezaButtonStyle extends ButtonStyle { surface(surfaceVariant()), ghost(ghostVariant()), ], - ); + ).animate(duration: const Duration(milliseconds: 200)); } } diff --git a/packages/remix/lib/src/themes/fortaleza/tokens.dart b/packages/remix/lib/src/themes/fortaleza/tokens.dart index 64664ece3..cedf370d7 100644 --- a/packages/remix/lib/src/themes/fortaleza/tokens.dart +++ b/packages/remix/lib/src/themes/fortaleza/tokens.dart @@ -29,24 +29,11 @@ class FortalezaTokens { neutral: RadixColors.slate.swatch, neutralAlpha: RadixColors.slate.alphaSwatch, ), - radii: const FortalezaRadius( - radius1: Radius.circular(4), - radius2: Radius.circular(8), - radius3: Radius.circular(12), - radius4: Radius.circular(16), - radius5: Radius.circular(24), - radius6: Radius.circular(32), + radii: FortalezaRadius.values( + [4, 8, 12, 16, 24, 32], ), - spaces: const FortalezaSpace( - space1: 4, - space2: 8, - space3: 12, - space4: 16, - space5: 24, - space6: 32, - space7: 40, - space8: 48, - space9: 64, + spaces: FortalezaSpace.values( + [4, 8, 12, 16, 24, 32, 40, 48, 64], ), textStyles: const FortalezaTextStyle( text1: TextStyle(fontSize: 12, letterSpacing: 0.0025, height: 1.33), @@ -77,10 +64,10 @@ class FortalezaTokens { MixThemeData toThemeData() { return MixThemeData( - colors: colors.toMap, - spaces: spaces.toMap, - textStyles: textStyles.toMap, - radii: radii.toMap, + colors: colors.toMap(), + spaces: spaces.toMap(), + textStyles: textStyles.toMap(), + radii: radii.toMap(), ); } @@ -122,7 +109,7 @@ class FortalezaColor { required this.neutralAlpha, }); - Map get toMap => _$FortalezaColorToMap(this); + Map toMap() => _$FortalezaColorToMap(this); } @MixableToken(Radius) @@ -143,7 +130,19 @@ class FortalezaRadius { required this.radius6, }); - Map get toMap => _$FortalezaRadiusToMap(this); + factory FortalezaRadius.values(List values) { + assert(values.length == 6, 'Expected 6 values, got ${values.length}'); + return FortalezaRadius( + radius1: Radius.circular(values[0]), + radius2: Radius.circular(values[1]), + radius3: Radius.circular(values[2]), + radius4: Radius.circular(values[3]), + radius5: Radius.circular(values[4]), + radius6: Radius.circular(values[5]), + ); + } + + Map toMap() => _$FortalezaRadiusToMap(this); } @MixableToken(double) @@ -170,7 +169,22 @@ class FortalezaSpace { required this.space9, }); - Map get toMap => _$FortalezaSpaceToMap(this); + factory FortalezaSpace.values(List values) { + assert(values.length == 9, 'Expected 9 values, got ${values.length}'); + return FortalezaSpace( + space1: values[0], + space2: values[1], + space3: values[2], + space4: values[3], + space5: values[4], + space6: values[5], + space7: values[6], + space8: values[7], + space9: values[8], + ); + } + + Map toMap() => _$FortalezaSpaceToMap(this); } @MixableToken(TextStyle) @@ -197,5 +211,5 @@ class FortalezaTextStyle { required this.text9, }); - Map get toMap => _$FortalezaTextStyleToMap(this); + Map toMap() => _$FortalezaTextStyleToMap(this); } From a6a8b0f9ddc2713f321afc9b48059f29a43c2bc3 Mon Sep 17 00:00:00 2001 From: Lucas Oliveira <62367544+tilucasoli@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:25:08 -0300 Subject: [PATCH 30/30] Update main.dart --- packages/remix/demo/lib/main.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/remix/demo/lib/main.dart b/packages/remix/demo/lib/main.dart index 5f37b8cfc..db797f656 100644 --- a/packages/remix/demo/lib/main.dart +++ b/packages/remix/demo/lib/main.dart @@ -1,7 +1,5 @@ import 'package:demo/addons/theme_addon.dart'; import 'package:flutter/material.dart' hide Scaffold, ThemeMode; -import 'package:remix/remix.dart'; -import 'package:remix/themes/fortaleza.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook;