Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ ouds_theme_orange/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_orange/assets/functional/settings-and-tools/hide.svg
ouds_theme_orange/assets/functional/navigation/menu.svg
ouds_theme_orange/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_orange/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_orange/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_orange/assets/component/badge-icon/error-fill.svg
ouds_theme_orange/assets/component/badge-icon/info-fill.svg
ouds_theme_orange/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_orange/fonts/Roboto-Black.ttf
Expand Down Expand Up @@ -167,6 +172,12 @@ ouds_theme_orange_compact/assets/functional/social-and-engagement/heart-empty.sv
ouds_theme_orange_compact/assets/functional/settings-and-tools/hide.svg
ouds_theme_orange_compact/assets/functional/navigation/menu.svg
ouds_theme_orange_compact/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_orange_compact/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_orange_compact/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_orange_compact/assets/component/badge-icon/error-fill.svg
ouds_theme_orange_compact/assets/component/badge-icon/info-fill.svg
ouds_theme_orange_compact/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_orange_compact/fonts/Roboto-Black.ttf
ouds_theme_orange_compact/fonts/Roboto-Bold.ttf
Expand Down Expand Up @@ -211,6 +222,12 @@ ouds_theme_sosh/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_sosh/assets/functional/settings-and-tools/hide.svg
ouds_theme_sosh/assets/functional/navigation/menu.svg
ouds_theme_sosh/assets/component/bullet-list/bullet-level-0.svg
ouds_theme_sosh/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_sosh/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_sosh/assets/component/badge-icon/error-fill.svg
ouds_theme_sosh/assets/component/badge-icon/info-fill.svg
ouds_theme_sosh/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_sosh/fonts/Sosh-Black.ttf
ouds_theme_sosh/fonts/Sosh-Bold.ttf
Expand Down Expand Up @@ -249,6 +266,12 @@ ouds_theme_wireframe/assets/component/tag/close.svg
ouds_theme_wireframe/assets/functional/social-and-engagement/heart-empty.svg
ouds_theme_wireframe/assets/functional/settings-and-tools/hide.svg
ouds_theme_wireframe/assets/functional/navigation/menu.svg
ouds_theme_wireframe/assets/component/badge-icon/warning-external-shape.svg
ouds_theme_wireframe/assets/component/badge-icon/warning-internal-shape.svg
ouds_theme_wireframe/assets/component/badge-icon/error-fill.svg
ouds_theme_wireframe/assets/component/badge-icon/info-fill.svg
ouds_theme_wireframe/assets/component/badge-icon/tick-confirmation-fill.svg


ouds_theme_wireframe/fonts/ShantellSans-Bold.ttf
ouds_theme_wireframe/fonts/ShantellSans-BoldItalic.ttf
Expand Down
3 changes: 3 additions & 0 deletions app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.3.1](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.3.0...1.3.1) - 2026-05-14
### Added
### Changed
- [DemoApp][Library] update `badge icon` component to 1.3.0 ([#680](https://github.com/Orange-OpenSource/ouds-flutter/issues/680))
- [DemoApp][Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed
- [Library] Null check operator used on a null value in all components has isHighContrastEnabled ([#756](https://github.com/Orange-OpenSource/ouds-flutter/issues/756))
- [DemoApp] Layout Overflow on Demo Screen for component version when system font size is increased for accessibility. ([#748](https://github.com/Orange-OpenSource/ouds-flutter/issues/748))
Expand Down
8 changes: 2 additions & 6 deletions app/lib/ui/components/badge/badge_customization.dart
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,15 @@ class BadgeCustomizationState
final isSmallSize =
selectedState == BadgeEnumSize.xsmall ||
selectedState == BadgeEnumSize.small;
final isTypeTrigger =
selectedType == BadgeEnumType.icon ||
selectedType == BadgeEnumType.count;
final isTypeTrigger = selectedType == BadgeEnumType.count;

if (isSmallSize && isTypeTrigger) {
selectedState = BadgeEnumSize.medium;
}
}

bool isSizeDisabled(BadgeEnumSize size) {
final isTypeTrigger =
selectedType == BadgeEnumType.icon ||
selectedType == BadgeEnumType.count;
final isTypeTrigger = selectedType == BadgeEnumType.count;
if (isTypeTrigger &&
(size == BadgeEnumSize.xsmall || size == BadgeEnumSize.small)) {
return true;
Expand Down
20 changes: 18 additions & 2 deletions app/lib/ui/components/badge/badge_demo_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,25 @@ class _Body extends StatefulWidget {
class _BodyState extends State<_Body> {
@override
Widget build(BuildContext context) {
final customizationState = BadgeCustomization.of(context)!;
ThemeController? themeController = Provider.of<ThemeController>(
context,
listen: false,
);

Comment thread
nouha06 marked this conversation as resolved.
//after update of badge component, each variant of badge component have his only version,
// so we need to retrieve the version based on the selected type
String getVersion() {
switch (customizationState.selectedType) {
case BadgeEnumType.standard:
return OudsComponentVersion.badge;
case BadgeEnumType.count:
return OudsComponentVersion.badgeCount;
case BadgeEnumType.icon:
return OudsComponentVersion.badgeIcon;
}
}

return DetailScreenDescription(
description: context.l10n.app_components_badge_description_text,
widget: Column(
Expand All @@ -120,7 +135,9 @@ class _BodyState extends State<_Body> {
.fixedMedium,
),
Code(code: BadgeCodeGenerator.updateCode(context)),
ReferenceDesignVersionComponent(version: OudsComponentVersion.badge),
//after update of badge component, each variant of badge component have his only version,
// so we need to retrieve the version based on the selected type
ReferenceDesignVersionComponent(version: getVersion()),
],
),
);
Expand Down Expand Up @@ -280,7 +297,6 @@ class _CustomizationContentState extends State<_CustomizationContent> {
onSelected: (selectedOption) {
setState(() {
bool isTypeTrigger =
customizationState.selectedType == BadgeEnumType.icon ||
customizationState.selectedType == BadgeEnumType.count;
bool isSizeTrigger =
selectedOption == BadgeEnumSize.xsmall ||
Expand Down
3 changes: 3 additions & 0 deletions ouds_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.3.1](https://github.com/Orange-OpenSource/ouds-flutter/compare/1.3.0...1.3.1) - 2026-05-14
### Added
### Changed
- [Library] update `badge` icon component to 1.3.0 ([#680](https://github.com/Orange-OpenSource/ouds-flutter/issues/680))
- [Library] update tokens 2.4.0 ([#726](https://github.com/Orange-OpenSource/ouds-flutter/issues/726))

### Fixed
- [Library] Null check operator used on a null value in all components has isHighContrastEnabled ([#756](https://github.com/Orange-OpenSource/ouds-flutter/issues/756))
- [Library] `Pin code input` Paste of less than 4 characters drops or merges characters ([#749](https://github.com/Orange-OpenSource/ouds-flutter/issues/749))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
library;

import 'package:flutter/material.dart';
import 'package:ouds_theme_contract/ouds_theme.dart';
import 'package:ouds_core/components/badge/ouds_badge.dart';
import 'package:ouds_core/components/common/ouds_icon_status.dart';
import 'package:ouds_theme_contract/ouds_theme.dart';

class OudsBadgeSizeModifier {
final BuildContext context;
Expand All @@ -40,4 +41,29 @@ class OudsBadgeSizeModifier {
return theme.sizeMedium;
}
}

double getBadgeIconOffsetsPadding(
OudsBadgeStatus? state,
OudsBadgeSize? size,
OudsIconStatus? status,
) {
final badgeToken = OudsTheme.of(context).componentsTokens(context).badge;
if ((state != null &&
(state != OudsBadgeStatus.neutral &&
state != OudsBadgeStatus.accent)) ||
!OudsIconStatus.functionalStatuses.contains(status.runtimeType)) {
switch (size) {
case OudsBadgeSize.xsmall:
return badgeToken.spaceInsetXsmall;
case OudsBadgeSize.small:
return badgeToken.spaceInsetSmall;
case OudsBadgeSize.medium:
case OudsBadgeSize.large:
return badgeToken.spaceInsetMediumLarge;
case null:
return badgeToken.sizeMedium;
}
}
return 0.0;
}
}
Loading
Loading