Skip to content

Commit 94c5998

Browse files
boosted-botAhmed Amine Zribi
andauthored
chore(🤖): update of tokens (library version 1.5.0) (#293)(#290)
* chore: update tokens * fix: token component button 1.5.0 --------- Co-authored-by: boosted-bot <boosted-bot@users.noreply.github.com> Co-authored-by: Ahmed Amine Zribi <ahmedamine.zribi@sofrecom>
1 parent b997e2e commit 94c5998

File tree

101 files changed

+330
-224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+330
-224
lines changed

ouds_core/lib/components/button/internal/button_background_modifier.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ButtonBackgroundModifier {
4949
case OudsButtonHierarchy.strong:
5050
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgStrongEnabled : theme.colorScheme(context).actionEnabled;
5151
case OudsButtonHierarchy.minimal:
52-
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgMinimalEnabled : theme.componentsTokens(context).button.colorBgMinimalEnabled;
52+
return null;
5353
case OudsButtonHierarchy.negative:
5454
return theme.colorScheme(context).actionNegativeEnabled;
5555
default:
@@ -94,7 +94,7 @@ class ButtonBackgroundModifier {
9494
case OudsButtonHierarchy.strong:
9595
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgStrongDisabled : theme.colorScheme(context).actionDisabled;
9696
case OudsButtonHierarchy.minimal:
97-
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgMinimalDisabled : theme.componentsTokens(context).button.colorBgMinimalDisabled;
97+
return null;
9898
case OudsButtonHierarchy.negative:
9999
return theme.colorScheme(context).actionDisabled;
100100
default:

ouds_core/lib/components/button/internal/button_border_modifier.dart

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ class ButtonBorderModifier {
4646
case OudsButtonHierarchy.strong:
4747
return onColoredSurface ? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderStrongEnabled, width: theme.componentsTokens(context).button.borderWidthDefault) : BorderSide.none;
4848
case OudsButtonHierarchy.minimal:
49-
return BorderSide(
50-
color: onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBorderMinimalEnabled : theme.componentsTokens(context).button.colorBorderMinimalEnabled, width: theme.componentsTokens(context).button.borderWidthMinimal);
49+
return BorderSide.none;
5150
case OudsButtonHierarchy.negative:
5251
return BorderSide.none;
5352
default:
@@ -63,8 +62,7 @@ class ButtonBorderModifier {
6362
case OudsButtonHierarchy.strong:
6463
return onColoredSurface ? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderStrongHover, width: theme.componentsTokens(context).button.borderWidthDefaultInteraction) : BorderSide.none;
6564
case OudsButtonHierarchy.minimal:
66-
return BorderSide(
67-
color: onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBorderMinimalHover : theme.componentsTokens(context).button.colorBorderMinimalHover, width: theme.componentsTokens(context).button.borderWidthMinimalInteraction);
65+
return BorderSide.none;
6866
case OudsButtonHierarchy.negative:
6967
return BorderSide.none;
7068
default:
@@ -80,9 +78,7 @@ class ButtonBorderModifier {
8078
case OudsButtonHierarchy.strong:
8179
return onColoredSurface ? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderStrongPressed, width: theme.componentsTokens(context).button.borderWidthDefaultInteraction) : BorderSide.none;
8280
case OudsButtonHierarchy.minimal:
83-
return BorderSide(
84-
color: onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBorderMinimalPressed : theme.componentsTokens(context).button.colorBorderMinimalPressed,
85-
width: theme.componentsTokens(context).button.borderWidthMinimalInteraction);
81+
return BorderSide.none;
8682
case OudsButtonHierarchy.negative:
8783
return BorderSide.none;
8884
default:
@@ -99,9 +95,7 @@ class ButtonBorderModifier {
9995
case OudsButtonHierarchy.strong:
10096
return onColoredSurface ? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderStrongDisabled, width: theme.componentsTokens(context).button.borderWidthDefault) : BorderSide.none;
10197
case OudsButtonHierarchy.minimal:
102-
return BorderSide(
103-
color: onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBorderMinimalDisabled : theme.componentsTokens(context).button.colorBorderMinimalDisabled,
104-
width: theme.componentsTokens(context).button.borderWidthMinimalInteraction);
98+
return BorderSide.none;
10599
case OudsButtonHierarchy.negative:
106100
return BorderSide.none;
107101
default:

ouds_core/lib/components/button/internal/button_loading_modifier.dart

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ class ButtonLoadingModifier {
4242
}
4343
}
4444

45-
static Color getBackgroundToken(BuildContext context, OudsButtonHierarchy hierarchy) {
45+
static Color? getBackgroundToken(BuildContext context, OudsButtonHierarchy hierarchy) {
4646
final theme = OudsTheme.of(context);
4747
final onColoredSurface = OudsTheme.isOnColoredSurfaceOf(context);
4848
switch (hierarchy) {
4949
case OudsButtonHierarchy.strong:
5050
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgStrongLoading : theme.colorScheme(context).actionLoading;
5151
case OudsButtonHierarchy.minimal:
52-
return onColoredSurface ? theme.componentsTokens(context).buttonMono.colorBgMinimalLoading : theme.componentsTokens(context).button.colorBgMinimalLoading;
52+
return null;
5353
case OudsButtonHierarchy.negative:
5454
return theme.colorScheme(context).actionNegativeLoading;
5555
default:
@@ -64,9 +64,7 @@ class ButtonLoadingModifier {
6464
case OudsButtonHierarchy.strong:
6565
return onColoredSurface ? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderStrongLoading, width: theme.componentsTokens(context).button.borderWidthDefaultInteraction) : BorderSide.none;
6666
case OudsButtonHierarchy.minimal:
67-
return onColoredSurface
68-
? BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderMinimalLoading, width: theme.componentsTokens(context).button.borderWidthMinimalInteraction)
69-
: BorderSide(color: theme.componentsTokens(context).buttonMono.colorBorderMinimalLoading, width: theme.componentsTokens(context).button.borderWidthMinimalInteraction);
67+
return BorderSide.none;
7068
case OudsButtonHierarchy.negative:
7169
return BorderSide.none;
7270
default:

ouds_core/lib/components/button/internal/button_style_modifier.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ButtonStyleModifier {
5252
side: ButtonBorderModifier.resolveBorderColor(context, hierarchy, style),
5353
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
5454
RoundedRectangleBorder(
55-
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadius),
55+
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadiusDefault),
5656
),
5757
),
5858
padding: WidgetStateProperty.all<EdgeInsetsGeometry>(

ouds_core/lib/components/button/ouds_button.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class _OudsButtonState extends State<OudsButton> {
155155
switch (widget.style) {
156156
case OudsButtonStyle.defaultStyle:
157157
return ClipRRect(
158-
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadius),
158+
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadiusDefault),
159159
child: OutlinedButton(
160160
onPressed: widget.onPressed == null ? null : () => _handlePressed(widget.onPressed),
161161
style: ButtonStyleModifier.buildButtonStyle(context, hierarchy: widget.hierarchy, layout: widget.layout, style: widget.style, isPressed: _isPressed),
@@ -264,7 +264,7 @@ class _OudsButtonState extends State<OudsButton> {
264264
switch (widget.style) {
265265
case OudsButtonStyle.defaultStyle:
266266
return ClipRRect(
267-
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadius),
267+
borderRadius: BorderRadius.circular(OudsTheme.of(context).componentsTokens(context).button.borderRadiusDefault),
268268
child: OutlinedButton(
269269
style: ButtonStyleModifier.buildButtonStyle(context, hierarchy: widget.hierarchy, layout: widget.layout, isPressed: _isPressed),
270270
onPressed: widget.onPressed == null ? null : () => _handlePressed(widget.onPressed),

ouds_global_raw_tokens/lib/border_raw_tokens.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Software description: Flutter library of reusable graphical components
1111
//
1212

13-
// OUDS core tokens version 1.3.0
13+
// OUDS core tokens version 1.5.0
1414
// Generated by Tokenator
1515

1616
class BorderRawTokens {

ouds_global_raw_tokens/lib/color_raw_tokens.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Software description: Flutter library of reusable graphical components
1111
//
1212

13-
// OUDS core tokens version 1.3.0
13+
// OUDS core tokens version 1.5.0
1414
// Generated by Tokenator
1515

1616
import 'package:flutter/material.dart';

ouds_global_raw_tokens/lib/dimension_raw_tokens.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Software description: Flutter library of reusable graphical components
1111
//
1212

13-
// OUDS core tokens version 1.3.0
13+
// OUDS core tokens version 1.5.0
1414
// Generated by Tokenator
1515

1616
class DimensionRawTokens {

ouds_global_raw_tokens/lib/font_raw_tokens.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Software description: Flutter library of reusable graphical components
1111
//
1212

13-
// OUDS core tokens version 1.3.0
13+
// OUDS core tokens version 1.5.0
1414
// Generated by Tokenator
1515

1616
import 'package:flutter/material.dart';

ouds_global_raw_tokens/lib/grid_raw_tokens.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// Software description: Flutter library of reusable graphical components
1111
//
1212

13-
// OUDS core tokens version 1.3.0
13+
// OUDS core tokens version 1.5.0
1414
// Generated by Tokenator
1515

1616
import 'package:ouds_global_raw_tokens/dimension_raw_tokens.dart';

0 commit comments

Comments
 (0)