Skip to content

Commit 4073f31

Browse files
committed
chore: add icons by themes
1 parent 9835737 commit 4073f31

File tree

174 files changed

+674
-545
lines changed

Some content is hidden

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

174 files changed

+674
-545
lines changed

NOTICE.txt

Lines changed: 90 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,37 @@ ouds-flutter/app/assets/il_tokens_border.svg
3535
ouds-flutter/app/assets/il_tokens_border_dark.svg
3636

3737
## OUDS / Themes / Orange
38-
ouds_theme_orange/assets/ic_bullet.svg
39-
ouds_theme_orange/assets/ic_bullet_nested_1.svg
40-
ouds_theme_orange/assets/ic_bullet_nested_2.svg
41-
ouds_theme_orange/assets/ic_checkbox_selected.svg
42-
ouds_theme_orange/assets/ic_checkbox_undeterminate.svg
43-
ouds_theme_orange/assets/ic_chevron_down.svg
44-
ouds_theme_orange/assets/ic_chevron_left.svg
45-
ouds_theme_orange/assets/ic_chevron_right.svg
46-
ouds_theme_orange/assets/ic_chevron_up.svg
47-
ouds_theme_orange/assets/ic_delete.svg
48-
ouds_theme_orange/assets/ic_heart.svg
49-
ouds_theme_orange/assets/ic_radio-button_selected.svg
50-
ouds_theme_orange/assets/ic_search.svg
51-
ouds_theme_orange/assets/ic_switch_selected.svg
52-
ouds_theme_orange/assets/ic_success.svg
53-
ouds_theme_orange/assets/ic_positive.svg
54-
ouds_theme_orange/assets/ic_information.svg
55-
ouds_theme_orange/assets/ic_important.svg
56-
ouds_theme_orange/assets/ic_error.svg
57-
ouds_theme_orange/assets/ic_heart.svg
5838
ouds_theme_orange/assets/ic_bullet_rounded.svg
59-
ouds_theme_orange/assets/ic_important_alert.svg
60-
ouds_theme_orange/assets/ic_password_vision_hide.svg
61-
ouds_theme_orange/assets/ic_password_vision.svg
62-
ouds_theme_orange/assets/ic_password_lock.svg
63-
ouds_theme_orange/assets/ic_warning_external_shape.svg
39+
ouds_theme_orange/assets/accessibility/accessibility-vision.svg
40+
ouds_theme_orange/assets/communication/security-and-safety/lock.svg
41+
ouds_theme_orange/assets/component/alert/important.svg
42+
ouds_theme_orange/assets/component/alert/information.svg
43+
ouds_theme_orange/assets/component/alert/success.svg
44+
ouds_theme_orange/assets/component/alert/warning.svg
45+
ouds_theme_orange/assets/component/alert/warning-external-shape.svg
46+
ouds_theme_orange/assets/component/alert/warning-internal-shape.svg
47+
ouds_theme_orange/assets/component/button/expanded-false.svg
48+
ouds_theme_orange/assets/component/button/expanded-true.svg
49+
ouds_theme_orange/assets/component/button/expurge.svg
50+
ouds_theme_orange/assets/component/button/increment-higher.svg
51+
ouds_theme_orange/assets/component/button/increment-lower.svg
52+
ouds_theme_orange/assets/component/button/next.svg
53+
ouds_theme_orange/assets/component/button/previous.svg
54+
ouds_theme_orange/assets/component/checkbox/checkbox-selected.svg
55+
ouds_theme_orange/assets/component/checkbox/checkbox-undetermined.svg
56+
ouds_theme_orange/assets/component/chip/expanded-false.svg
57+
ouds_theme_orange/assets/component/chip/expanded-true.svg
58+
ouds_theme_orange/assets/component/chip/tick.svg
59+
ouds_theme_orange/assets/component/link/expanded-false.svg
60+
ouds_theme_orange/assets/component/link/expanded-true.svg
61+
ouds_theme_orange/assets/component/link/next.svg
62+
ouds_theme_orange/assets/component/link/previous.svg
63+
ouds_theme_orange/assets/component/radio-button/radio-button-selected.svg
64+
ouds_theme_orange/assets/component/switch/selected-switch.svg
65+
ouds_theme_orange/assets/component/tag/close.svg
66+
ouds_theme_orange/assets/functional/social-and-engagement/heart-empty.svg
67+
ouds_theme_orange/assets/settings-and-tools/hide.svg
68+
6469

6570
ouds_theme_sosh/fonts/Roboto-Black.ttf
6671
ouds_theme_sosh/fonts/Roboto-Bold.ttf
@@ -75,32 +80,36 @@ ouds_theme_sosh/fonts/SF-Pro-Display-Black-Thin.ttf
7580

7681

7782
## OUDS / Themes / Sosh
78-
ouds_theme_sosh/assets/ic_bullet.svg
79-
ouds_theme_sosh/assets/ic_bullet_nested_1.svg
80-
ouds_theme_sosh/assets/ic_bullet_nested_2.svg
81-
ouds_theme_sosh/assets/ic_checkbox_selected.svg
82-
ouds_theme_sosh/assets/ic_checkbox_undeterminate.svg
83-
ouds_theme_sosh/assets/ic_chevron_down.svg
84-
ouds_theme_sosh/assets/ic_chevron_left.svg
85-
ouds_theme_sosh/assets/ic_chevron_right.svg
86-
ouds_theme_sosh/assets/ic_chevron_up.svg
87-
ouds_theme_sosh/assets/ic_delete.svg
88-
ouds_theme_sosh/assets/ic_heart.svg
89-
ouds_theme_sosh/assets/ic_radio-button_selected.svg
90-
ouds_theme_sosh/assets/ic_search.svg
91-
ouds_theme_sosh/assets/ic_switch_selected.svg
92-
ouds_theme_sosh/assets/ic_success.svg
93-
ouds_theme_sosh/assets/ic_positive.svg
94-
ouds_theme_sosh/assets/ic_information.svg
95-
ouds_theme_sosh/assets/ic_important.svg
96-
ouds_theme_sosh/assets/ic_error.svg
97-
ouds_theme_sosh/assets/ic_heart.svg
98-
ouds_theme_sosh/assets/ic_bullet_tag.svg
99-
ouds_theme_sosh/assets/ic_important_alert.svg
100-
ouds_theme_sosh/assets/ic_password_vision_hide.svg
101-
ouds_theme_sosh/assets/ic_password_vision.svg
102-
ouds_theme_sosh/assets/ic_password_lock.svg
103-
ouds_theme_sosh/assets/ic_warning_external_shape.svg
83+
ouds_theme_sosh/assets/ic_bullet_rounded.svg
84+
ouds_theme_sosh/assets/accessibility/accessibility-vision.svg
85+
ouds_theme_sosh/assets/communication/security-and-safety/lock.svg
86+
ouds_theme_sosh/assets/component/alert/important.svg
87+
ouds_theme_sosh/assets/component/alert/information.svg
88+
ouds_theme_sosh/assets/component/alert/success.svg
89+
ouds_theme_sosh/assets/component/alert/warning.svg
90+
ouds_theme_sosh/assets/component/alert/warning-external-shape.svg
91+
ouds_theme_sosh/assets/component/alert/warning-internal-shape.svg
92+
ouds_theme_sosh/assets/component/button/expanded-false.svg
93+
ouds_theme_sosh/assets/component/button/expanded-true.svg
94+
ouds_theme_sosh/assets/component/button/expurge.svg
95+
ouds_theme_sosh/assets/component/button/increment-higher.svg
96+
ouds_theme_sosh/assets/component/button/increment-lower.svg
97+
ouds_theme_sosh/assets/component/button/next.svg
98+
ouds_theme_sosh/assets/component/button/previous.svg
99+
ouds_theme_sosh/assets/component/checkbox/checkbox-selected.svg
100+
ouds_theme_sosh/assets/component/checkbox/checkbox-undetermined.svg
101+
ouds_theme_sosh/assets/component/chip/expanded-false.svg
102+
ouds_theme_sosh/assets/component/chip/expanded-true.svg
103+
ouds_theme_sosh/assets/component/chip/tick.svg
104+
ouds_theme_sosh/assets/component/link/expanded-false.svg
105+
ouds_theme_sosh/assets/component/link/expanded-true.svg
106+
ouds_theme_sosh/assets/component/link/next.svg
107+
ouds_theme_sosh/assets/component/link/previous.svg
108+
ouds_theme_sosh/assets/component/radio-button/radio-button-selected.svg
109+
ouds_theme_sosh/assets/component/switch/selected-switch.svg
110+
ouds_theme_sosh/assets/component/tag/close.svg
111+
ouds_theme_sosh/assets/functional/social-and-engagement/heart-empty.svg
112+
ouds_theme_sosh/assets/settings-and-tools/hide.svg
104113

105114
ouds_theme_sosh/fonts/Sosh-Black.ttf
106115
ouds_theme_sosh/fonts/Sosh-Bold.ttf
@@ -109,29 +118,36 @@ ouds_theme_sosh/fonts/Sosh-Regular.ttf
109118
ouds_theme_sosh/fonts/Sosh-Thin.ttf
110119

111120
## OUDS / Themes / Wireframe
112-
ouds_theme_wireframe/assets/ic_bullet.svg
113-
ouds_theme_wireframe/assets/ic_bullet_nested_1.svg
114-
ouds_theme_wireframe/assets/ic_bullet_nested_2.svg
115-
ouds_theme_wireframe/assets/ic_checkbox_selected.svg
116-
ouds_theme_wireframe/assets/ic_checkbox_undeterminate.svg
117-
ouds_theme_wireframe/assets/ic_chevron_down.svg
118-
ouds_theme_wireframe/assets/ic_chevron_left.svg
119-
ouds_theme_wireframe/assets/ic_chevron_right.svg
120-
ouds_theme_wireframe/assets/ic_chevron_up.svg
121-
ouds_theme_wireframe/assets/ic_delete.svg
122-
ouds_theme_wireframe/assets/ic_heart.svg
123-
ouds_theme_wireframe/assets/ic_radio-button_selected.svg
124-
ouds_theme_wireframe/assets/ic_search.svg
125-
ouds_theme_wireframe/assets/ic_switch_selected.svg
126-
ouds_theme_wireframe/assets/ic_success.svg
127-
ouds_theme_wireframe/assets/ic_positive.svg
128-
ouds_theme_wireframe/assets/ic_information.svg
129-
ouds_theme_wireframe/assets/ic_important.svg
130-
ouds_theme_wireframe/assets/ic_error.svg
131-
ouds_theme_wireframe/assets/ic_heart.svg
132-
ouds_theme_wireframe/assets/ic_bullet_tag.svg
133-
ouds_theme_wireframe/assets/ic_important_alert.svg
134-
ouds_theme_wireframe/assets/ic_warning_external_shape.svg
121+
ouds_theme_wireframe/assets/ic_bullet_rounded.svg
122+
ouds_theme_wireframe/assets/accessibility/accessibility-vision.svg
123+
ouds_theme_wireframe/assets/communication/security-and-safety/lock.svg
124+
ouds_theme_wireframe/assets/component/alert/important.svg
125+
ouds_theme_wireframe/assets/component/alert/information.svg
126+
ouds_theme_wireframe/assets/component/alert/success.svg
127+
ouds_theme_wireframe/assets/component/alert/warning.svg
128+
ouds_theme_wireframe/assets/component/alert/warning-external-shape.svg
129+
ouds_theme_wireframe/assets/component/alert/warning-internal-shape.svg
130+
ouds_theme_wireframe/assets/component/button/expanded-false.svg
131+
ouds_theme_wireframe/assets/component/button/expanded-true.svg
132+
ouds_theme_wireframe/assets/component/button/expurge.svg
133+
ouds_theme_wireframe/assets/component/button/increment-higher.svg
134+
ouds_theme_wireframe/assets/component/button/increment-lower.svg
135+
ouds_theme_wireframe/assets/component/button/next.svg
136+
ouds_theme_wireframe/assets/component/button/previous.svg
137+
ouds_theme_wireframe/assets/component/checkbox/checkbox-selected.svg
138+
ouds_theme_wireframe/assets/component/checkbox/checkbox-undetermined.svg
139+
ouds_theme_wireframe/assets/component/chip/expanded-false.svg
140+
ouds_theme_wireframe/assets/component/chip/expanded-true.svg
141+
ouds_theme_wireframe/assets/component/chip/tick.svg
142+
ouds_theme_wireframe/assets/component/link/expanded-false.svg
143+
ouds_theme_wireframe/assets/component/link/expanded-true.svg
144+
ouds_theme_wireframe/assets/component/link/next.svg
145+
ouds_theme_wireframe/assets/component/link/previous.svg
146+
ouds_theme_wireframe/assets/component/radio-button/radio-button-selected.svg
147+
ouds_theme_wireframe/assets/component/switch/selected-switch.svg
148+
ouds_theme_wireframe/assets/component/tag/close.svg
149+
ouds_theme_wireframe/assets/functional/social-and-engagement/heart-empty.svg
150+
ouds_theme_wireframe/assets/settings-and-tools/hide.svg
135151

136152
ouds_theme_wireframe/fonts/ShantellSans-Bold.ttf
137153
ouds_theme_wireframe/fonts/ShantellSans-BoldItalic.ttf

app/lib/ui/utilities/app_assets.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class _Icons {
5454
final String icHeart = 'assets/ic_heart.svg';
5555
final String icHeartBadge = 'assets/ic_heart_badge.svg';
5656
final String icChipHeart = 'assets/ic_chip_heart.svg';
57-
57+
final String icDelete = 'assets/ic_delete.svg';
5858
}
5959

6060
class _Fonts {

app/lib/ui/utilities/customizable/customizable_textfield.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import 'package:ouds_flutter_demo/ui/components/link/link_customization.dart';
2222
import 'package:ouds_flutter_demo/ui/components/pin_code_input/pin_code_input_customization.dart';
2323
import 'package:ouds_flutter_demo/ui/components/tag/tag_customization.dart';
2424
import 'package:ouds_flutter_demo/ui/theme/theme_controller.dart';
25+
import 'package:ouds_flutter_demo/ui/utilities/app_assets.dart';
2526
import 'package:provider/provider.dart';
2627

2728
enum FieldType {
@@ -208,7 +209,7 @@ class CustomizableTextFieldState extends State<CustomizableTextField> {
208209
controller: _textController,
209210
focusNode: widget.focusNode,
210211
decoration: OudsInputDecoration(
211-
suffixIcon: 'assets/ic_delete.svg',
212+
suffixIcon: AppAssets.icons.icDelete,
212213
onSuffixPressed: () {
213214
_textController.clear();
214215
if (!widget.focusNode.hasFocus) {

ouds_core/lib/components/button/ouds_button.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ enum OudsButtonLayout {
7373
/// - [loader]: An optional loading progress indicator displayed in the button to indicate an ongoing operation.
7474
/// - [hierarchy]: The button appearance based on its [OudsButtonHierarchy].
7575
/// A button with [OudsButtonHierarchy.negative] hierarchy is not allowed as a direct or indirect child of an [OudsColoredBox] and will throw an [IllegalStateException].
76+
/// To create the widget with an asset from a package, the [package] argument
77+
/// must be provided. For instance, suppose a package called `my_icons` has
78+
/// `icons/heart.svg` .
7679
///
7780
/// ## You can use [OudsButton] like this :
7881
///
@@ -110,6 +113,7 @@ class OudsButton extends StatefulWidget {
110113
final VoidCallback? onPressed;
111114
final Loader? loader;
112115
final OudsButtonHierarchy hierarchy;
116+
final String? package;
113117

114118
const OudsButton({
115119
super.key,
@@ -118,6 +122,7 @@ class OudsButton extends StatefulWidget {
118122
this.onPressed,
119123
this.loader,
120124
required this.hierarchy,
125+
this.package,
121126
});
122127

123128
@override
@@ -395,7 +400,7 @@ class _OudsButtonState extends State<OudsButton> {
395400
}
396401
}
397402

398-
static Widget _buildIcon(
403+
Widget _buildIcon(
399404
BuildContext context,
400405
String assetName,
401406
final OudsButtonHierarchy hierarchy,
@@ -404,8 +409,8 @@ class _OudsButtonState extends State<OudsButton> {
404409
) {
405410
return SvgPicture.asset(
406411
excludeFromSemantics: true,
412+
package: widget.package,
407413
assetName,
408-
package: OudsTheme.of(context).packageName,
409414
fit: BoxFit.contain,
410415
width: OudsButtonIconModifier.getIconSize(context, layout),
411416
height: OudsButtonIconModifier.getIconSize(context, layout),

ouds_core/lib/components/checkbox/ouds_checkbox.dart

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
/// OudsCheckbox
1313
library;
1414

15-
import 'dart:developer';
1615
import 'dart:io';
1716

1817
import 'package:flutter/material.dart';
@@ -27,6 +26,7 @@ import 'package:ouds_core/components/control/internal/ouds_control_state.dart';
2726
import 'package:ouds_core/components/utilities/app_assets.dart';
2827
import 'package:ouds_core/l10n/gen/ouds_localizations.dart';
2928
import 'package:ouds_theme_contract/ouds_theme.dart';
29+
3030
enum ToggleableState { off, indeterminate, on }
3131

3232
///
@@ -88,7 +88,6 @@ class _OudsCheckboxState extends State<OudsCheckbox> {
8888
bool _isPressed = false;
8989
bool _isHighContrast = false;
9090

91-
9291
@override
9392
void didChangeDependencies() {
9493
super.didChangeDependencies();
@@ -122,8 +121,8 @@ class _OudsCheckboxState extends State<OudsCheckbox> {
122121
String? semanticsLabel = widget.value == true
123122
? l10n?.core_checkbox_checked_a11y
124123
: widget.value == null
125-
? l10n?.core_checkbox_indeterminate_a11y
126-
: l10n?.core_checkbox_not_checked_a11y;
124+
? l10n?.core_checkbox_indeterminate_a11y
125+
: l10n?.core_checkbox_not_checked_a11y;
127126

128127
// add “double tap to toggle” only for iOS
129128
if (Platform.isIOS && semanticsLabel != null) {
@@ -201,12 +200,7 @@ class _OudsCheckboxState extends State<OudsCheckbox> {
201200
DecoratedBox(
202201
decoration: BoxDecoration(
203202
border: Border.all(
204-
color: checkboxBorderModifier.getBorderColor(
205-
checkboxState,
206-
widget.isError,
207-
isCheckedOrIndeterminate(widget.value),
208-
_isHighContrast
209-
),
203+
color: checkboxBorderModifier.getBorderColor(checkboxState, widget.isError, isCheckedOrIndeterminate(widget.value), _isHighContrast),
210204
width: checkboxBorderModifier.getBorderWidth(
211205
checkboxState,
212206
isCheckedOrIndeterminate(widget.value),
@@ -222,11 +216,11 @@ class _OudsCheckboxState extends State<OudsCheckbox> {
222216
Center(
223217
child: SvgPicture.asset(
224218
excludeFromSemantics: true,
225-
AppAssets.icons.checkboxSelected,
219+
AppAssets.icons.componentCheckboxSelected,
226220
package: OudsTheme.of(context).packageName,
227221
fit: BoxFit.contain,
228222
colorFilter: ColorFilter.mode(
229-
checkboxTickModifier.getTickColor(checkboxState, widget.isError,_isHighContrast),
223+
checkboxTickModifier.getTickColor(checkboxState, widget.isError, _isHighContrast),
230224
BlendMode.srcIn,
231225
),
232226
),
@@ -235,11 +229,11 @@ class _OudsCheckboxState extends State<OudsCheckbox> {
235229
Center(
236230
child: SvgPicture.asset(
237231
excludeFromSemantics: true,
238-
AppAssets.icons.checkboxUndeterminate,
232+
AppAssets.icons.componentCheckboxUndetermined,
239233
package: OudsTheme.of(context).packageName,
240234
fit: BoxFit.contain,
241235
colorFilter: ColorFilter.mode(
242-
checkboxTickModifier.getTickColor(checkboxState, widget.isError,_isHighContrast),
236+
checkboxTickModifier.getTickColor(checkboxState, widget.isError, _isHighContrast),
243237
BlendMode.srcIn,
244238
),
245239
),

0 commit comments

Comments
 (0)