Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
ba79739
Add OudsListItem and OudsSmallListItem to the library
paulinea Jun 16, 2026
4fb8622
Fix typography warnings
paulinea Jun 26, 2026
aaa6e75
Add new drawables to NOTICE.txt
paulinea Jun 26, 2026
4c302be
Update visibility modifiers
paulinea Jun 26, 2026
cf3d707
Update OudsListItem and OudsSmallListItem during pair review
paulinea Jun 26, 2026
558fb58
Simplify CheckerboardPainter by removing parameters
paulinea Jun 26, 2026
f9ac8ec
Update previews
paulinea Jun 26, 2026
6f8e77f
Add OudsCardItem and OudsSmallCardItem
paulinea Jun 30, 2026
5ab3ad3
Update indicators in previews
paulinea Jul 1, 2026
9929cd6
Fix rounded corner when card item is outlined
paulinea Jul 1, 2026
84abd9a
Fix trailing text extra label font size
paulinea Jul 2, 2026
d38e4e9
Update NOTICE.txt
paulinea Jul 2, 2026
936db67
Set default size for leading and trailing images
paulinea Jul 2, 2026
dd16693
Add list item tokens in OudsTheme.components and use them in OudsList…
paulinea Jul 3, 2026
524cf72
Add snapshots for list items and card items
paulinea Jul 3, 2026
291ddce
Fix top app bar tests
paulinea Jul 3, 2026
2728b96
Add instrumented tests
paulinea Jul 3, 2026
458a6fe
Add samples and Kdoc for OudsListItem, OudsSmallListItem, OudsCardIte…
paulinea Jul 3, 2026
e631dd8
Refactor preview parameters for all list and card items
florentmaitre Jul 17, 2026
c43fb1a
Fix tokens use after rebase
paulinea Jul 21, 2026
1c412c9
Update snapshots with new tokens
paulinea Jul 21, 2026
99f7dd0
Review: Remove useless constructors on abstract class
paulinea Jul 21, 2026
c58a357
Review: Remove useless properties in OudsComponentImage
paulinea Jul 21, 2026
3a012b4
Review: Set contentDescription nullable
paulinea Jul 21, 2026
5cc5811
Review: Remove useless line
paulinea Jul 21, 2026
a168621
Review: Rename OudsListItemContentAlignment.Center to CenterVertically
paulinea Jul 22, 2026
210cb62
Review: Rename internal OudsListItem parameters to remove 'nullable' …
paulinea Jul 22, 2026
45a902d
Review: Add minHeight to the OudsListItem column
paulinea Jul 22, 2026
1abfa7f
Review: Simplify variable call
paulinea Jul 22, 2026
1544a30
Review: Add rememberInteractionColor on background and border color
paulinea Jul 22, 2026
46ba7c9
Review: Fix outlined on interaction states
paulinea Jul 22, 2026
0f5623e
Review: Remove divider variable set from when
paulinea Jul 22, 2026
be2c81d
Review: Remove useless this
paulinea Jul 22, 2026
5babbeb
Review: Factorize shape
paulinea Jul 22, 2026
1c1d6ed
Review: Set leading and trailing contentDescription to null
paulinea Jul 22, 2026
24484b3
Review: Factorize indicator icons in a composable
paulinea Jul 22, 2026
5e503ad
Review: Check overline is not null or blank
paulinea Jul 22, 2026
e1ba10a
Review: Set OudsListItemIconStatus internal
paulinea Jul 22, 2026
438e9e6
Review: Set OudsListItemAssetSize internal
paulinea Jul 22, 2026
cf82362
Review: Rename format in ratio and panoramic in widescreen
paulinea Jul 22, 2026
beadc96
Review: Rename assetSize variable in OudsListItemIconSize and OudsLis…
paulinea Jul 22, 2026
e3b0f82
Review: Allow rounded corners for ListItem images
paulinea Jul 22, 2026
bfa3b30
Review: Update trailing text top padding and add the same padding on …
paulinea Jul 22, 2026
df6bcc5
Review: Fix formatting detail and update kdoc for status icons
paulinea Jul 22, 2026
981b8ea
Review: Fix error in kdoc
paulinea Jul 22, 2026
f699679
Review: Add defaults values in OudsListItemDefaults and use them
paulinea Jul 22, 2026
d1a0485
Review: Set trailing text extraLabel non-nullable and remove default …
paulinea Jul 22, 2026
adff63b
Review: Use default value for content alignment in preview parameter
paulinea Jul 22, 2026
efd66bc
Review: Remove useless interactionSource parameters in previews
paulinea Jul 22, 2026
ddd4c2f
Review: Add boldLabel to previews
paulinea Jul 22, 2026
f52b840
Review: Fix formatting
paulinea Jul 22, 2026
d67cf93
Review: Add a method to factorize list item decoration
paulinea Jul 22, 2026
fb0e312
Review: Add missing interactionSource parameter
paulinea Jul 22, 2026
1205337
Review: Remove size parameter for small list item images
paulinea Jul 22, 2026
5e2bde9
Review: Add contentAlignment parameter to navigation small list item …
paulinea Jul 22, 2026
7af8da4
Review: Add missing divider and background parameters
paulinea Jul 22, 2026
4325543
Review: Fix typo in kdoc
paulinea Jul 22, 2026
f74ba31
Review: Fix kdoc
paulinea Jul 22, 2026
2df8893
Review: Use OudsPreview annotation
paulinea Jul 22, 2026
e74d5cf
Review: Add decoration preview parameter for OudsCardItem and OudsSma…
paulinea Jul 23, 2026
7566281
Review: Remove typealias
paulinea Jul 23, 2026
fbd6cef
Review: Remove empty line
paulinea Jul 23, 2026
11923de
Review: Rename tests
paulinea Jul 23, 2026
620a2e1
Review: Add tests for blank overline
paulinea Jul 23, 2026
aae0ad1
Review: Merge samples
paulinea Jul 23, 2026
d94bfc7
Review: Add missing samples to some signatures
paulinea Jul 23, 2026
13f3aaa
Review: Add sample with all elements for OudsSmallListItem and OudsSm…
paulinea Jul 23, 2026
fcfabe4
Review: Remove useless @Suppress("UNCHECKED_CAST")
paulinea Jul 23, 2026
845a3cf
Review: Add new icons to IconPaths
paulinea Jul 23, 2026
df2d40f
Review: Add preview with untinted icons
paulinea Jul 23, 2026
b20075b
Review: Rename OudsListItemContentAlignment to OudsListItemVerticalAl…
florentmaitre Jul 23, 2026
59b2040
Fix background of small list item previews
florentmaitre Jul 24, 2026
394fd1a
Fix padding of rounded corners previews
florentmaitre Jul 24, 2026
9030eeb
Various minor fixes
florentmaitre Jul 24, 2026
1ba01f8
Review: Fix list item rounded corners
paulinea Jul 27, 2026
9e2c9a6
Review: Remove minHeight from Column because it is already applied on…
paulinea Jul 27, 2026
f7c41f2
Factorize condition in borderRadius method
florentmaitre Jul 27, 2026
5d1c881
Add list item component to demo app
paulinea Jul 29, 2026
dc7b8a7
Add list item and card item code snippets
paulinea Jul 29, 2026
12278cd
Add edge to edge parameter to OudsListItem and OudsSmallListItem
paulinea Jul 29, 2026
424e2cb
Improve OudsListItem kdoc
paulinea Jul 29, 2026
6902356
Set edgeToEdge to false in previews
paulinea Jul 29, 2026
bbe3cc2
Fix OudsListItem background color on interaction when background is f…
paulinea Jul 29, 2026
26e1ae2
Rename ItemDemoState and ItemDemoScreen respectively to BaseListItemD…
paulinea Jul 29, 2026
c726007
Review: Remove OudsListItemDecoration.None and use OudsListItemDecora…
florentmaitre Jul 30, 2026
c72b7a7
Review: Add sentence in BackgroundOnInteraction decoration kdoc
paulinea Jul 31, 2026
7af6dd9
Review: Remove empty lines
paulinea Jul 31, 2026
53447a8
Review: Build tabs outside variable allocation if
paulinea Jul 31, 2026
f46365d
Review: Change condition for scrollbar display
paulinea Jul 31, 2026
12152ee
Review: Remove ic_untinted_icon
paulinea Jul 31, 2026
c9ea629
Review: Fix French string
paulinea Jul 31, 2026
a02c40b
Review: Rename contentAlignement to verticalAlignment
paulinea Jul 31, 2026
092ff6a
Review: Rename imageRoundedCorner to roundedCornersImage
paulinea Jul 31, 2026
6962c59
Review: Remove Trailing prefix from strings
paulinea Jul 31, 2026
07c6436
Review: Replace mutableStateOf by mutableIntStateOf
paulinea Jul 31, 2026
0a14aca
Review: Fix parameters order
paulinea Jul 31, 2026
b84e91d
Review: Rename variable
paulinea Jul 31, 2026
f0d2e0e
Review: Remove useless annotation
paulinea Jul 31, 2026
553e201
Review: Move CustomizationTab.Content() function to BaseListItemDemoS…
paulinea Jul 31, 2026
bdf1b20
Review: Rename Tabs and move helper text customization in Texts
paulinea Jul 31, 2026
bd261f1
Review: Adjust padding when label is null in CustomizationFilterChip
paulinea Jul 31, 2026
a49e23c
Review: Simplify expression
paulinea Jul 31, 2026
2a468e3
Review: Precise ImageType in inline function
paulinea Jul 31, 2026
203eb91
Review: Display NavigationListItem and NavigationCardItem versions
paulinea Jul 31, 2026
5cd8519
Review: Use base composable to display bottom sheet content
paulinea Jul 31, 2026
483ff5b
Review: Remove useless padding
paulinea Jul 31, 2026
d1d8a21
Review: Various minor fixes
florentmaitre Jul 31, 2026
a16380f
Refactor untinted painter methods
florentmaitre Jul 31, 2026
d3acb80
Update snapshots
florentmaitre Jul 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 11 additions & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ app/src/main/res/drawable/ic_sosh_tips_and_tricks.xml
app/src/main/res/drawable/ic_typography.xml
app/src/main/res/drawable/ic_ui_dark_mode.xml
app/src/main/res/drawable/ic_ui_light_mode.xml
app/src/main/res/drawable/ic_untinted_icon.png
app/src/main/res/drawable/ic_untinted_square.png
app/src/main/res/drawable/ic_untinted_widescreen.png
app/src/main/res/drawable/ic_wireframe_avatar.xml
app/src/main/res/drawable/ic_wireframe_call.xml
app/src/main/res/drawable/ic_wireframe_filters.xml
Expand Down Expand Up @@ -122,13 +123,16 @@ theme-orange/src/main/res/drawable/ic_orange_component_button_previous.xml
theme-orange/src/main/res/drawable/ic_orange_component_checkbox_selected.xml
theme-orange/src/main/res/drawable/ic_orange_component_checkbox_undetermined.xml
theme-orange/src/main/res/drawable/ic_orange_component_chip_tick.xml
theme-orange/src/main/res/drawable/ic_orange_component_control_item_next.xml
theme-orange/src/main/res/drawable/ic_orange_component_control_item_previous.xml
theme-orange/src/main/res/drawable/ic_orange_component_link_external_link.xml
theme-orange/src/main/res/drawable/ic_orange_component_link_next.xml
theme-orange/src/main/res/drawable/ic_orange_component_link_previous.xml
theme-orange/src/main/res/drawable/ic_orange_component_radio_button_selected.xml
theme-orange/src/main/res/drawable/ic_orange_component_switch_selected.xml
theme-orange/src/main/res/drawable/ic_orange_component_tag_close.xml
theme-orange/src/main/res/drawable/ic_orange_functional_actions_delete_cross_round.xml
theme-orange/src/main/res/drawable/ic_orange_functional_actions_external_link.xml
theme-orange/src/main/res/drawable/ic_orange_functional_navigation_form_chevron_left.xml
theme-orange/src/main/res/drawable/ic_orange_functional_navigation_menu_grid_ui_round.xml
theme-orange/src/main/res/drawable/ic_orange_functional_settings_and_tools_accessibility_hide.xml
Expand Down Expand Up @@ -159,13 +163,16 @@ theme-sosh/src/main/res/drawable/ic_sosh_component_button_previous.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_checkbox_selected.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_checkbox_undetermined.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_chip_tick.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_control_item_next.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_control_item_previous.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_link_external_link.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_link_next.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_link_previous.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_radio_button_selected.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_switch_selected.xml
theme-sosh/src/main/res/drawable/ic_sosh_component_tag_close.xml
theme-sosh/src/main/res/drawable/ic_sosh_functional_actions_delete_cross_round.xml
theme-sosh/src/main/res/drawable/ic_sosh_functional_actions_external_link.xml
theme-sosh/src/main/res/drawable/ic_sosh_functional_navigation_form_chevron_left.xml
theme-sosh/src/main/res/drawable/ic_sosh_functional_navigation_menu_grid_ui_round.xml
theme-sosh/src/main/res/drawable/ic_sosh_functional_settings_and_tools_accessibility_hide.xml
Expand Down Expand Up @@ -198,13 +205,16 @@ theme-wireframe/src/main/res/drawable/ic_wireframe_component_button_previous.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_checkbox_selected.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_checkbox_undetermined.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_chip_tick.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_control_item_next.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_control_item_previous.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_link_external_link.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_link_next.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_link_previous.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_radio_button_selected.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_switch_selected.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_component_tag_close.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_functional_actions_delete_cross_round.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_functional_actions_external_link.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_functional_navigation_form_chevron_left.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_functional_navigation_menu_grid_ui_round.xml
theme-wireframe/src/main/res/drawable/ic_wireframe_functional_settings_and_tools_accessibility_hide.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,13 @@ package com.orange.ouds.app.ui
import androidx.annotation.StringRes
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.PreviewLightDark
Expand Down Expand Up @@ -62,6 +60,7 @@ private fun ChangeThemeSettingsDialogContent(themeState: ThemeState, onThemeSett
checked = when (themeSetting) {
ThemeSetting.RoundedCornerAlertMessages -> themeSettings.roundedCornerAlertMessages.orElse { false }
ThemeSetting.RoundedCornerButtons -> themeSettings.roundedCornerButtons.orElse { false }
ThemeSetting.RoundedCornerCardItems -> themeSettings.roundedCornerCardItems.orElse { false }
ThemeSetting.RoundedCornerProgressIndicators -> themeSettings.roundedCornerProgressIndicators.orElse { false }
ThemeSetting.RoundedCornerTextInputs -> themeSettings.roundedCornerTextInputs.orElse { false }
},
Expand All @@ -70,6 +69,7 @@ private fun ChangeThemeSettingsDialogContent(themeState: ThemeState, onThemeSett
themeSettings = when (themeSetting) {
ThemeSetting.RoundedCornerAlertMessages -> themeSettings.copy(roundedCornerAlertMessages = checked)
ThemeSetting.RoundedCornerButtons -> themeSettings.copy(roundedCornerButtons = checked)
ThemeSetting.RoundedCornerCardItems -> themeSettings.copy(roundedCornerCardItems = checked)
ThemeSetting.RoundedCornerProgressIndicators -> themeSettings.copy(roundedCornerProgressIndicators = checked)
ThemeSetting.RoundedCornerTextInputs -> themeSettings.copy(roundedCornerTextInputs = checked)
}
Expand Down Expand Up @@ -104,6 +104,7 @@ private fun getSupportedThemeSettings(theme: OudsThemeContract): List<ThemeSetti
when (themeSetting) {
ThemeSetting.RoundedCornerAlertMessages -> roundedCornerAlertMessages != null
ThemeSetting.RoundedCornerButtons -> roundedCornerButtons != null
ThemeSetting.RoundedCornerCardItems -> roundedCornerCardItems != null
ThemeSetting.RoundedCornerProgressIndicators -> roundedCornerProgressIndicators != null
ThemeSetting.RoundedCornerTextInputs -> roundedCornerTextInputs != null
}
Expand All @@ -120,13 +121,14 @@ object ChangeThemeSettingsDialog {

private enum class ThemeSetting {

RoundedCornerAlertMessages, RoundedCornerButtons, RoundedCornerProgressIndicators, RoundedCornerTextInputs;
RoundedCornerAlertMessages, RoundedCornerButtons, RoundedCornerCardItems, RoundedCornerProgressIndicators, RoundedCornerTextInputs;

val titleResId: Int
@StringRes
get() = when (this) {
RoundedCornerAlertMessages -> R.string.app_themeSettingsDialog_roundedCornerAlertMessages_label
RoundedCornerButtons -> R.string.app_themeSettingsDialog_roundedCornerButtons_label
RoundedCornerCardItems -> R.string.app_themeSettingsDialog_roundedCornerCardItems_label
RoundedCornerProgressIndicators -> R.string.app_themeSettingsDialog_roundedCornerProgressIndicators_label
RoundedCornerTextInputs -> R.string.app_themeSettingsDialog_roundedCornerTextInputs_label
}
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/orange/ouds/app/ui/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class MainViewModel @Inject constructor(private val dataStoreService: DataStoreS
private const val USER_THEME_NAME_KEY = "userThemeName"
private const val USER_THEME_SETTINGS_ROUNDED_CORNER_ALERT_MESSAGES_KEY = "userThemeSettingsRoundedCornerAlertMessages"
private const val USER_THEME_SETTINGS_ROUNDED_CORNER_BUTTONS_KEY = "userThemeSettingsRoundedCornerButtons"
private const val USER_THEME_SETTINGS_ROUNDED_CORNER_CARD_ITEMS_KEY = "userThemeSettingsRoundedCornerCardItems"
private const val USER_THEME_SETTINGS_ROUNDED_CORNER_PROGRESS_INDICATORS_KEY = "userThemeSettingsRoundedCornerProgressIndicators"
private const val USER_THEME_SETTINGS_ROUNDED_CORNER_TEXT_INPUTS_KEY = "userThemeSettingsRoundedCornerTextInputs"
}
Expand All @@ -42,6 +43,7 @@ class MainViewModel @Inject constructor(private val dataStoreService: DataStoreS
fun storeUserThemeSettings(themeSettings: OudsThemeSettings) = runBlocking {
dataStoreService.putBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_ALERT_MESSAGES_KEY, themeSettings.roundedCornerAlertMessages)
dataStoreService.putBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_BUTTONS_KEY, themeSettings.roundedCornerButtons)
dataStoreService.putBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_CARD_ITEMS_KEY, themeSettings.roundedCornerCardItems)
dataStoreService.putBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_PROGRESS_INDICATORS_KEY, themeSettings.roundedCornerProgressIndicators)
dataStoreService.putBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_TEXT_INPUTS_KEY, themeSettings.roundedCornerTextInputs)
}
Expand All @@ -50,6 +52,7 @@ class MainViewModel @Inject constructor(private val dataStoreService: DataStoreS
OudsThemeSettings(
roundedCornerAlertMessages = dataStoreService.getBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_ALERT_MESSAGES_KEY),
roundedCornerButtons = dataStoreService.getBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_BUTTONS_KEY),
roundedCornerCardItems = dataStoreService.getBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_CARD_ITEMS_KEY),
roundedCornerProgressIndicators = dataStoreService.getBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_PROGRESS_INDICATORS_KEY),
roundedCornerTextInputs = dataStoreService.getBoolean(USER_THEME_SETTINGS_ROUNDED_CORNER_TEXT_INPUTS_KEY)
)
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/orange/ouds/app/ui/ThemeState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ class ThemeState(
orangeFontFamily = OrangeFontFamily(OrangeHelveticaNeueLatin.Downloadable, OrangeHelveticaNeueArabic.Downloadable),
roundedCornerAlertMessages = roundedCornerAlertMessages.orElse { false },
roundedCornerButtons = roundedCornerButtons.orElse { false },
roundedCornerCardItems = roundedCornerCardItems.orElse { false },
roundedCornerProgressIndicators = roundedCornerProgressIndicators.orElse { false },
roundedCornerTextInputs = roundedCornerTextInputs.orElse { false }
)
ORANGE_COMPACT_THEME_NAME -> OrangeCompactTheme(
orangeFontFamily = OrangeFontFamily(OrangeHelveticaNeueLatin.Downloadable, OrangeHelveticaNeueArabic.Downloadable),
roundedCornerAlertMessages = roundedCornerAlertMessages.orElse { false },
roundedCornerButtons = roundedCornerButtons.orElse { false },
roundedCornerCardItems = roundedCornerCardItems.orElse { false },
roundedCornerProgressIndicators = roundedCornerProgressIndicators.orElse { false },
roundedCornerTextInputs = roundedCornerTextInputs.orElse { false }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import com.orange.ouds.app.ui.components.coloredbackground.ColoredBackgroundDemo
import com.orange.ouds.app.ui.components.divider.DividerDemoScreen
import com.orange.ouds.app.ui.components.floatingactionbutton.FloatingActionButtonDemoScreen
import com.orange.ouds.app.ui.components.link.LinkDemoScreen
import com.orange.ouds.app.ui.components.listitem.BaseListItemDemoState
import com.orange.ouds.app.ui.components.listitem.CardItemDemoScreen
import com.orange.ouds.app.ui.components.listitem.ListItemDemoScreen
import com.orange.ouds.app.ui.components.navigationbar.NavigationBarDemoScreen
import com.orange.ouds.app.ui.components.passwordinput.PasswordInputDemoScreen
import com.orange.ouds.app.ui.components.pincodeinput.PinCodeInputDemoScreen
Expand Down Expand Up @@ -142,6 +145,13 @@ sealed class Component(
demoScreen = { LinkDemoScreen() }
)

data object ListItem : Component(
R.string.app_components_listItem_tech,
R.string.app_components_listItem_description_text,
{ ListItemIllustration() },
listOf(Variant.ListItem, Variant.SmallListItem, Variant.CardItem, Variant.SmallCardItem)
)

data object NavigationBar : Component(
R.string.app_components_navigationBar_tech,
R.string.app_components_navigationBar_description_text,
Expand Down Expand Up @@ -251,6 +261,12 @@ sealed class Variant(
data object HorizontalDivider : Variant(R.string.app_components_divider_horizontalDivider_tech, { DividerDemoScreen() })
data object VerticalDivider : Variant(R.string.app_components_divider_verticalDivider_tech, { DividerDemoScreen(vertical = true) })

// List item
data object ListItem : Variant(R.string.app_components_listItem_listItem_tech, { ListItemDemoScreen(size = BaseListItemDemoState.Size.Default) })
data object SmallListItem : Variant(R.string.app_components_listItem_smallListItem_tech, { ListItemDemoScreen(size = BaseListItemDemoState.Size.Small) })
data object CardItem : Variant(R.string.app_components_listItem_cardItem_tech, { CardItemDemoScreen(size = BaseListItemDemoState.Size.Default) })
data object SmallCardItem : Variant(R.string.app_components_listItem_smallCardItem_tech, { CardItemDemoScreen(size = BaseListItemDemoState.Size.Small) })

// Progress indicator
data object CircularProgressIndicator :
Variant(R.string.app_components_progressIndicator_circularProgressIndicator_tech, { CircularProgressIndicatorDemoScreen() }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ inline fun <reified T> FunctionCall.Builder.iconArgument(
tinted: Boolean = true
) {
constructorCallArgument<T>(name) {
painterArgument(if (tinted) resId else R.drawable.ic_untinted_icon)
painterArgument(if (tinted) resId else R.drawable.ic_untinted_square)
contentDescriptionResId?.let { contentDescriptionArgument(it) }
if (!tinted) tintedArgument(tinted)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import com.orange.ouds.core.component.OudsFloatingActionButtonIcon
import com.orange.ouds.core.component.OudsHorizontalDivider
import com.orange.ouds.core.component.OudsLink
import com.orange.ouds.core.component.OudsLinkIndicator
import com.orange.ouds.core.component.OudsListItem
import com.orange.ouds.core.component.OudsListItemLeading
import com.orange.ouds.core.component.OudsNavigationBar
import com.orange.ouds.core.component.OudsNavigationBarItem
import com.orange.ouds.core.component.OudsNavigationBarItemIcon
Expand All @@ -75,6 +77,7 @@ import com.orange.ouds.core.component.OudsTopAppBarAction
import com.orange.ouds.core.component.OudsTopAppBarNavigationIcon
import com.orange.ouds.core.component.rememberOudsPasswordInputState
import com.orange.ouds.core.theme.isOudsInDarkTheme
import com.orange.ouds.foundation.ExperimentalOudsApi

@Composable
fun AlertIllustration() = ComponentIllustration {
Expand Down Expand Up @@ -200,6 +203,18 @@ fun LinkIllustration() = ComponentIllustration {
)
}

@OptIn(ExperimentalOudsApi::class)
@Composable
fun ListItemIllustration() = ComponentIllustration {
OudsListItem(
modifier = Modifier.padding(horizontal = 12.dp),
label = stringResource(id = R.string.app_components_common_label_label),
description = stringResource(id = R.string.app_components_common_description_tech),
leading = OudsListItemLeading.Icon(painterResource(LocalThemeDrawableResources.current.tipsAndTricks), ""),
edgeToEdge = false
)
}

@Composable
fun NavigationBarIllustration() = ComponentIllustration {
val items = List(3) { index ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ private fun ControlItemIconCustomization(state: ControlItemDemoState) {
private fun ControlItemEdgeToEdgeCustomization(state: ControlItemDemoState) {
with(state) {
CustomizationSwitchItem(
label = stringResource(id = R.string.app_components_controlItem_edgeToEdge_tech),
label = stringResource(id = R.string.app_components_common_edgeToEdge_tech),
checked = edgeToEdge,
onCheckedChange = { edgeToEdge = it },
)
Expand All @@ -90,7 +90,7 @@ private fun ControlItemEdgeToEdgeCustomization(state: ControlItemDemoState) {
private fun ControlItemDividerCustomization(state: ControlItemDemoState) {
with(state) {
CustomizationSwitchItem(
label = stringResource(id = R.string.app_components_controlItem_divider_tech),
label = stringResource(R.string.app_components_common_divider_tech),
checked = divider,
onCheckedChange = { divider = it },
)
Expand Down
Loading