diff --git a/core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt b/core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt index 408130807..4432d3dcb 100644 --- a/core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt +++ b/core/src/main/java/com/orange/ouds/core/component/OudsBadge.kt @@ -111,7 +111,7 @@ fun OudsBadge( * Badges have five statuses depending on the context of the information they represent. * Each status is designed to convey a specific meaning and ensure clarity in communication. * - * This version of the badge displays numerical values (e.g., unread messages, notifications). + * This version of the badge displays numerical values (e.g. unread messages, notifications). * * **A11Y recommendation:** Provide a more explicit `contentDescription` than the count alone by using a semantics Modifier. * diff --git a/core/src/main/java/com/orange/ouds/core/extensions/OudsLightDarkColorTokenExt.kt b/core/src/main/java/com/orange/ouds/core/extensions/OudsLightDarkColorTokenExt.kt index b6bc62b15..518896f38 100644 --- a/core/src/main/java/com/orange/ouds/core/extensions/OudsLightDarkColorTokenExt.kt +++ b/core/src/main/java/com/orange/ouds/core/extensions/OudsLightDarkColorTokenExt.kt @@ -18,6 +18,14 @@ import androidx.compose.ui.graphics.Color import com.orange.ouds.core.theme.isOudsInDarkTheme import com.orange.ouds.theme.tokens.components.OudsLightDarkColor +/** + * Returns the color corresponding to the current theme mode (Light or Dark). + * + * This extension property checks the current theme state using [isOudsInDarkTheme] + * and returns either the [OudsLightDarkColor.dark] or [OudsLightDarkColor.light] value accordingly. + * + * @return The resolved [Color] for the current theme context. + */ val OudsLightDarkColor.value: Color @ReadOnlyComposable @Composable diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt index 071740936..191375c3a 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsBorders.kt @@ -40,14 +40,36 @@ import com.orange.ouds.theme.tokens.semantic.OudsBorderSemanticTokens import java.util.Locale /** - * @suppress + * Holds all the border-related properties defined in the OUDS theme. + * + * Borders are used to define boundaries around UI elements to materialise the visual hierarchy and improve usability. + * + * > Design guidelines: [Border tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-border) + * + * @property width Collection of border width values. + * @property radius Collection of border radius values. + * @property style Collection of border styles (solid, dashed, etc.). */ -data class OudsBorders( +@ConsistentCopyVisibility +data class OudsBorders internal constructor( val width: Width, val radius: Radius, val style: Style ) { - data class Width( + /** + * Represents the available border widths in OUDS. + * + * @property none Width of 0 dp, used when no border is visible. + * @property default The standard border width used for most cases. + * @property thin A thinner border width for subtle separations. + * @property medium A medium border width for increased visibility. + * @property thick A thick border width for emphasis. + * @property thicker A very thick border width for strong emphasis. + * @property focus The border width used to indicate focus states. + * @property focusInset The width of the inner border (inset) used in focus states to create a double-border effect. + */ + @ConsistentCopyVisibility + data class Width internal constructor( val none: Dp, val default: Dp, val thin: Dp, @@ -58,7 +80,18 @@ data class OudsBorders( val focusInset: Dp ) - data class Radius( + /** + * Represents the available border radius in OUDS. + * + * @property none No radius (0 dp), resulting in square corners. + * @property default The standard radius used for most components. + * @property small A small radius for subtle rounding. + * @property medium A medium radius for noticeable rounding. + * @property large A large radius for significantly rounded corners. + * @property pill A fully rounded radius. + */ + @ConsistentCopyVisibility + data class Radius internal constructor( val none: Dp, val default: Dp, val small: Dp, @@ -67,7 +100,14 @@ data class OudsBorders( val pill: Dp ) - data class Style( + /** + * Represents the available border styles in OUDS. + * + * @property default The standard border style (usually solid). + * @property drag The specific border style used when an element is being dragged (often dashed). + */ + @ConsistentCopyVisibility + data class Style internal constructor( val default: OudsBorderStyle, val drag: OudsBorderStyle ) @@ -134,6 +174,8 @@ private fun OudsBorders.fromToken(token: OudsBorderKeyToken.Style): OudsBorderSt /** * Converts an OUDS border radius token to the local border radius value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsBorderKeyToken.Radius.value: Dp @@ -143,6 +185,8 @@ val OudsBorderKeyToken.Radius.value: Dp /** * Converts an OUDS border style token to the local [OudsBorderStyle] value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsBorderKeyToken.Style.value: OudsBorderStyle @@ -152,6 +196,8 @@ val OudsBorderKeyToken.Style.value: OudsBorderStyle /** * Converts an OUDS border width token to the local border width value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsBorderKeyToken.Width.value: Dp diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt index 611c7affd..7cf5f9d7a 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsColorScheme.kt @@ -26,9 +26,23 @@ import com.orange.ouds.theme.tokens.material.OudsMaterialColorTokens import com.orange.ouds.theme.tokens.semantic.OudsColorSemanticTokens /** - * @suppress + * Holds all the colour-related properties defined in the OUDS theme. + * + * Colour reinforces our brand identity and ensures consistency across all product experiences. + * + * > Design guidelines: [Color tokens documentation](https://unified-design-system.orange.com/472794e18/p/217ac6-color) + * + * @property action Colors associated with interactive elements and actions. + * @property always Colors that remain constant regardless of the theme (Light/Dark). + * @property background Colors used for the underlying layers of the interface. + * @property border Colors applied to borders and dividers. + * @property content Colors used for text, icons, and other foreground elements. + * @property opacity Colors representing various levels of opacity (transparency). + * @property overlay Colors used for overlay elements like modals or tooltips. + * @property surface Colors used for surface elements like cards or banners. */ -data class OudsColorScheme( +@ConsistentCopyVisibility +data class OudsColorScheme internal constructor( val action: Action, val always: Always, val background: Background, @@ -41,7 +55,24 @@ data class OudsColorScheme( internal val modes: Modes ) { - data class Action( + /** + * Colors associated with interactive elements and actions. + * + * @property disabled Color for disabled interactive elements. + * @property enabled Default color for enabled interactive elements. + * @property focus Color indicating focus state. + * @property highlighted Color for highlighted elements. + * @property hover Color for hover state. + * @property loading Color used during loading states within actions. + * @property negative Colors for destructive or negative actions. + * @property pressed Color for pressed state. + * @property readOnly Colors for read-only elements. + * @property selected Color for selected state. + * @property support Colors for supportive or secondary actions. + * @property visited Color for visited links. + */ + @ConsistentCopyVisibility + data class Action internal constructor( val disabled: Color, val enabled: Color, val focus: Color, @@ -55,7 +86,18 @@ data class OudsColorScheme( val support: Support, val visited: Color ) { - data class Negative( + + /** + * Colors for destructive or negative actions. + * + * @property enabled Default color for negative actions. + * @property focus Color for focused negative actions. + * @property hover Color for hovered negative actions. + * @property loading Color for loading state in negative actions. + * @property pressed Color for pressed negative actions. + */ + @ConsistentCopyVisibility + data class Negative internal constructor( val enabled: Color, val focus: Color, val hover: Color, @@ -63,12 +105,30 @@ data class OudsColorScheme( val pressed: Color ) - data class ReadOnly( + /** + * Colors for read-only elements. + * + * @property primary Primary read-only color. + * @property secondary Secondary read-only color. + */ + @ConsistentCopyVisibility + data class ReadOnly internal constructor( val primary: Color, val secondary: Color ) - data class Support( + /** + * Colors for supportive or secondary actions. + * + * @property disabled Color for disabled supportive actions. + * @property enabled Default color for supportive actions. + * @property focus Color for focused supportive actions. + * @property hover Color for hovered supportive actions. + * @property loading Color for loading state in supportive actions. + * @property pressed Color for pressed supportive actions. + */ + @ConsistentCopyVisibility + data class Support internal constructor( val disabled: Color, val enabled: Color, val focus: Color, @@ -78,14 +138,33 @@ data class OudsColorScheme( ) } - data class Always( + /** + * Colors that remain constant regardless of the theme (Light/Dark). + * + * @property black Absolute black. + * @property onBlack Content color on black background. + * @property onWhite Content color on white background. + * @property white Absolute white. + */ + @ConsistentCopyVisibility + data class Always internal constructor( val black: Color, val onBlack: Color, val onWhite: Color, val white: Color ) - data class Background( + /** + * Colors used for the underlying layers of the interface. + * + * @property inverseHigh High contrast inverse background color. + * @property inverseLow Low contrast inverse background color. + * @property primary Primary background color (page background). + * @property secondary Secondary background color. + * @property tertiary Tertiary background color. + */ + @ConsistentCopyVisibility + data class Background internal constructor( val inverseHigh: Color, val inverseLow: Color, val primary: Color, @@ -93,7 +172,23 @@ data class OudsColorScheme( val tertiary: Color ) - data class Border( + /** + * Colors applied to borders and dividers. + * + * @property brandPrimary Primary brand border color. + * @property brandSecondary Secondary brand border color. + * @property brandTertiary Tertiary brand border color. + * @property default Default border color. + * @property emphasized Emphasized border color for better visibility. + * @property focus Border color indicating focus. + * @property focusInset Inner border color for focus indication. + * @property minimal Minimal visibility border color. + * @property muted Muted border color. + * @property onBrand Border colors used specifically on brand backgrounds. + * @property status Border colors associated with specific statuses. + */ + @ConsistentCopyVisibility + data class Border internal constructor( val brandPrimary: Color, val brandSecondary: Color, val brandTertiary: Color, @@ -106,13 +201,31 @@ data class OudsColorScheme( val onBrand: OnBrand, val status: Status ) { - data class OnBrand( + /** + * Border colors used specifically on brand backgrounds. + * + * @property primary Primary border on brand background. + * @property secondary Secondary border on brand background. + * @property tertiary Tertiary border on brand background. + */ + @ConsistentCopyVisibility + data class OnBrand internal constructor( val primary: Color, val secondary: Color, val tertiary: Color ) - data class Status( + /** + * Border colors associated with specific statuses. + * + * @property accent Accent status border. + * @property info Info status border. + * @property negative Negative/Error status border. + * @property positive Positive/Success status border. + * @property warning Warning status border. + */ + @ConsistentCopyVisibility + data class Status internal constructor( val accent: Color, val info: Color, val negative: Color, @@ -121,7 +234,24 @@ data class OudsColorScheme( ) } - data class Content( + + /** + * Colors used for text, icons, and other foreground elements. + * + * @property brandPrimary Primary brand content color. + * @property brandSecondary Secondary brand content color. + * @property brandTertiary Tertiary brand content color. + * @property default Default content color (e.g., main text). + * @property disabled Content color for disabled states. + * @property inverse Inverse content color for contrast. + * @property muted Muted content color (e.g., secondary text). + * @property onAction Content colors displayed on top of action backgrounds. + * @property onBrand Content colors displayed on top of brand backgrounds. + * @property onStatus Content colors displayed on top of status backgrounds. + * @property status Content colors representing statuses directly (e.g. colored text). + */ + @ConsistentCopyVisibility + data class Content internal constructor( val brandPrimary: Color, val brandSecondary: Color, val brandTertiary: Color, @@ -134,7 +264,20 @@ data class OudsColorScheme( val onStatus: OnStatus, val status: Status ) { - data class OnAction( + /** + * Content colors displayed on top of action backgrounds. + * + * @property disabled On-action color for disabled state. + * @property enabled On-action color for enabled state. + * @property focus On-action color for focused state. + * @property highlighted On-action color for highlighted state. + * @property hover On-action color for hover state. + * @property loading On-action color for loading state. + * @property pressed On-action color for pressed state. + * @property selected On-action color for selected state. + */ + @ConsistentCopyVisibility + data class OnAction internal constructor( val disabled: Color, val enabled: Color, val focus: Color, @@ -145,46 +288,109 @@ data class OudsColorScheme( val selected: Color, ) - data class OnBrand( + /** + * Content colors displayed on top of brand backgrounds. + * + * @property primary Primary content on brand background. + * @property secondary Secondary content on brand background. + * @property tertiary Tertiary content on brand background. + */ + @ConsistentCopyVisibility + data class OnBrand internal constructor( val primary: Color, val secondary: Color, val tertiary: Color ) - data class OnStatus( + /** + * Content colors displayed on top of status backgrounds. + * + * @property positive Content on positive status background. + * @property info Content on info status background. + * @property warning Content on warning status background. + * @property negative Content on negative status background. + * @property accent Content on accent status background. + */ + @ConsistentCopyVisibility + data class OnStatus internal constructor( val positive: Positive, val info: Info, val warning: Warning, val negative: Negative, val accent: Accent ) { - data class Positive( + /** + * Content colors displayed on top of positive status backgrounds. + * + * @property emphasized Emphasized content color on positive status. + * @property muted Muted content color on positive status. + */ + @ConsistentCopyVisibility + data class Positive internal constructor( val emphasized: Color, val muted: Color ) - data class Info( + /** + * Content colors displayed on top of info status backgrounds. + * + * @property emphasized Emphasized content color on info status. + * @property muted Muted content color on info status. + */ + @ConsistentCopyVisibility + data class Info internal constructor( val emphasized: Color, val muted: Color ) - data class Warning( + /** + * Content colors displayed on top of warning status backgrounds. + * + * @property emphasized Emphasized content color on warning status. + * @property muted Muted content color on warning status. + */ + @ConsistentCopyVisibility + data class Warning internal constructor( val emphasized: Color, val muted: Color ) - data class Negative( + /** + * Content colors displayed on top of negative status backgrounds. + * + * @property emphasized Emphasized content color on negative status. + * @property muted Muted content color on negative status. + */ + @ConsistentCopyVisibility + data class Negative internal constructor( val emphasized: Color, val muted: Color ) - data class Accent( + /** + * Content colors displayed on top of accent status backgrounds. + * + * @property emphasized Emphasized content color on accent status. + * @property muted Muted content color on accent status. + */ + @ConsistentCopyVisibility + data class Accent internal constructor( val emphasized: Color, val muted: Color ) } - data class Status( + /** + * Content colors representing statuses directly (e.g. colored text). + * + * @property accent Accent status content color. + * @property info Info status content color. + * @property negative Negative/Error status content color. + * @property positive Positive/Success status content color. + * @property warning Warning status content color. + */ + @ConsistentCopyVisibility + data class Status internal constructor( val accent: Color, val info: Color, val negative: Color, @@ -193,20 +399,41 @@ data class OudsColorScheme( ) } - data class Opacity( + /** + * Colors representing various levels of opacity (transparency). + * + * @property transparent Fully transparent color. + * @property lowest Very high transparency. + * @property lower High transparency. + */ + @ConsistentCopyVisibility + data class Opacity internal constructor( val transparent: Color, val lowest: Color, val lower: Color ) - data class Overlay( + /** + * Colors used for overlay elements like modals or tooltips. + * + * @property dropdown Background color for dropdowns. + * @property drag Background color for dragged items. + * @property modal Background color for modal dialogs (scrim). + * @property tooltip Background color for tooltips. + */ + @ConsistentCopyVisibility + data class Overlay internal constructor( val dropdown: Color, val drag: Color, val modal: Color, val tooltip: Color ) - data class Repository( + /** + * @suppress + */ + @ConsistentCopyVisibility + data class Repository internal constructor( val accent: Accent, val info: Info, val negative: Negative, @@ -218,7 +445,8 @@ data class OudsColorScheme( val tertiary: Tertiary, val warning: Warning ) { - data class Accent( + @ConsistentCopyVisibility + data class Accent internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -228,7 +456,8 @@ data class OudsColorScheme( val medium: Color ) - data class Info( + @ConsistentCopyVisibility + data class Info internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -238,7 +467,8 @@ data class OudsColorScheme( val medium: Color ) - data class Negative( + @ConsistentCopyVisibility + data class Negative internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -248,11 +478,13 @@ data class OudsColorScheme( val medium: Color ) - data class Neutral( + @ConsistentCopyVisibility + data class Neutral internal constructor( val emphasized: Emphasized, val muted: Muted ) { - data class Emphasized( + @ConsistentCopyVisibility + data class Emphasized internal constructor( val black: Color, val high: Color, val higher: Color, @@ -263,7 +495,8 @@ data class OudsColorScheme( val medium: Color ) - data class Muted( + @ConsistentCopyVisibility + data class Muted internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -275,7 +508,8 @@ data class OudsColorScheme( ) } - data class Opacity( + @ConsistentCopyVisibility + data class Opacity internal constructor( val accent: Accent, val black: Black, val info: Info, @@ -285,12 +519,14 @@ data class OudsColorScheme( val warning: Warning, val white: White ) { - data class Accent( + @ConsistentCopyVisibility + data class Accent internal constructor( val low: Color, val medium: Color, ) - data class Black( + @ConsistentCopyVisibility + data class Black internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -303,22 +539,26 @@ data class OudsColorScheme( val transparent: Color ) - data class Info( + @ConsistentCopyVisibility + data class Info internal constructor( val low: Color, val medium: Color, ) - data class Negative( + @ConsistentCopyVisibility + data class Negative internal constructor( val low: Color, val medium: Color, ) - data class Positive( + @ConsistentCopyVisibility + data class Positive internal constructor( val low: Color, val medium: Color, ) - data class Primary( + @ConsistentCopyVisibility + data class Primary internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -329,12 +569,14 @@ data class OudsColorScheme( val transparent: Color ) - data class Warning( + @ConsistentCopyVisibility + data class Warning internal constructor( val low: Color, val medium: Color, ) - data class White( + @ConsistentCopyVisibility + data class White internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -347,7 +589,8 @@ data class OudsColorScheme( ) } - data class Positive( + @ConsistentCopyVisibility + data class Positive internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -357,7 +600,8 @@ data class OudsColorScheme( val medium: Color ) - data class Primary( + @ConsistentCopyVisibility + data class Primary internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -367,7 +611,8 @@ data class OudsColorScheme( val medium: Color ) - data class Secondary( + @ConsistentCopyVisibility + data class Secondary internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -377,7 +622,8 @@ data class OudsColorScheme( val medium: Color ) - data class Tertiary( + @ConsistentCopyVisibility + data class Tertiary internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -387,7 +633,8 @@ data class OudsColorScheme( val medium: Color ) - data class Warning( + @ConsistentCopyVisibility + data class Warning internal constructor( val high: Color, val higher: Color, val highest: Color, @@ -398,7 +645,19 @@ data class OudsColorScheme( ) } - data class Surface( + /** + * Colors used for surface elements like cards or banners. + * + * @property brand Surfaces using brand colors. + * @property inverseHigh High contrast inverse surface color. + * @property inverseLow Low contrast inverse surface color. + * @property primary Primary surface color. + * @property secondary Secondary surface color. + * @property status Surfaces using status colors. + * @property tertiary Tertiary surface color. + */ + @ConsistentCopyVisibility + data class Surface internal constructor( val brand: Brand, val inverseHigh: Color, val inverseLow: Color, @@ -407,47 +666,104 @@ data class OudsColorScheme( val status: Status, val tertiary: Color ) { - data class Brand( + /** + * Surfaces using brand colors. + * + * @property primary Primary brand surface. + * @property secondary Secondary brand surface. + * @property tertiary Tertiary brand surface. + */ + @ConsistentCopyVisibility + data class Brand internal constructor( val primary: Color, val secondary: Color, val tertiary: Color ) - data class Status( + /** + * Surfaces using status colors. + * + * @property accent Accent status surface colors. + * @property info Info status surface colors. + * @property negative Negative/Error status surface colors. + * @property positive Positive/Success status surface colors. + * @property warning Warning status surface colors. + */ + @ConsistentCopyVisibility + data class Status internal constructor( val accent: Accent, val info: Info, val negative: Negative, val positive: Positive, val warning: Warning ) { - data class Accent( + /** + * Accent status surface colors. + * + * @property emphasized Emphasized content color on accent status. + * @property muted Muted content color on accent status. + */ + @ConsistentCopyVisibility + data class Accent internal constructor( val emphasized: Color, val muted: Color ) - data class Info( + /** + * Info status surface colors. + * + * @property emphasized Emphasized content color on info status. + * @property muted Muted content color on info status. + */ + @ConsistentCopyVisibility + data class Info internal constructor( val emphasized: Color, val muted: Color ) - data class Negative( + /** + * Negative status surface colors. + * + * @property emphasized Emphasized content color on negative status. + * @property muted Muted content color on negative status. + */ + @ConsistentCopyVisibility + data class Negative internal constructor( val emphasized: Color, val muted: Color ) - data class Positive( + /** + * Positive status surface colors. + * + * @property emphasized Emphasized content color on positive status. + * @property muted Muted content color on positive status. + */ + @ConsistentCopyVisibility + data class Positive internal constructor( val emphasized: Color, val muted: Color ) - data class Warning( + /** + * Warning status surface colors. + * + * @property emphasized Emphasized content color on warning status. + * @property muted Muted content color on warning status. + */ + @ConsistentCopyVisibility + data class Warning internal constructor( val emphasized: Color, val muted: Color ) } } - data class Modes( + /** + * @suppress + */ + @ConsistentCopyVisibility + data class Modes internal constructor( val navigationBar: OudsColorMode, val onBackground: OnBackground, val onBrand: OnBrand, @@ -456,7 +772,8 @@ data class OudsColorScheme( val onSurface: OnSurface, ) { - data class OnBackground( + @ConsistentCopyVisibility + data class OnBackground internal constructor( val inverseHigh: OudsColorMode, val inverseLow: OudsColorMode, val primary: OudsColorMode, @@ -464,52 +781,61 @@ data class OudsColorScheme( val tertiary: OudsColorMode ) - data class OnBrand( + @ConsistentCopyVisibility + data class OnBrand internal constructor( val primary: OudsColorMode, val secondary: OudsColorMode, val tertiary: OudsColorMode ) - data class OnOverlay( + @ConsistentCopyVisibility + data class OnOverlay internal constructor( val dropdown: OudsColorMode, val modal: OudsColorMode, val tooltip: OudsColorMode ) - data class OnStatus( + @ConsistentCopyVisibility + data class OnStatus internal constructor( val accent: Accent, val info: Info, val negative: Negative, val positive: Positive, val warning: Warning ) { - data class Accent( + @ConsistentCopyVisibility + data class Accent internal constructor( val emphasized: OudsColorMode, val muted: OudsColorMode ) - data class Info( + @ConsistentCopyVisibility + data class Info internal constructor( val emphasized: OudsColorMode, val muted: OudsColorMode ) - data class Negative( + @ConsistentCopyVisibility + data class Negative internal constructor( val emphasized: OudsColorMode, val muted: OudsColorMode ) - data class Positive( + @ConsistentCopyVisibility + data class Positive internal constructor( val emphasized: OudsColorMode, val muted: OudsColorMode ) - data class Warning( + @ConsistentCopyVisibility + data class Warning internal constructor( val emphasized: OudsColorMode, val muted: OudsColorMode ) } - data class OnSurface( + @ConsistentCopyVisibility + data class OnSurface internal constructor( val inverseHigh: OudsColorMode, val inverseLow: OudsColorMode, val primary: OudsColorMode, @@ -1514,8 +1840,9 @@ val OudsMaterialColorTokens.materialDarkColorScheme: ColorScheme /** * Converts an OUDS color token to the local color value provided by the theme. + * + * @suppress */ -@Suppress("RecursivePropertyAccessor") @InternalOudsApi val OudsColorKeyToken.value: Color @ReadOnlyComposable diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsComponents.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsComponents.kt index 877330e79..f0b9e1cda 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsComponents.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsComponents.kt @@ -15,13 +15,27 @@ package com.orange.ouds.core.theme import com.orange.ouds.theme.tokens.components.OudsComponentsTokens /** - * @suppress + * Holds component-specific tokens that are exposed for public use. + * + * While most component styling is handled automatically by OUDS components, + * these properties allow accessing specific token values that might be needed + * for custom implementations. + * + * @property bar Properties specific to the OUDS bars (e.g. [com.orange.ouds.core.component.OudsTopAppBar] or [com.orange.ouds.core.component.OudsNavigationBar]). */ -data class OudsComponents( +@ConsistentCopyVisibility +data class OudsComponents internal constructor( val bar: Bar ) { - data class Bar( + /** + * Properties specific to the OUDS bars. + * + * @property blurRadius The blur radius applied to the bars background + * to create the glassmorphism effect. + */ + @ConsistentCopyVisibility + data class Bar internal constructor( val blurRadius: Int ) } diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsEffects.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsEffects.kt index baa3c6854..a358559a3 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsEffects.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsEffects.kt @@ -20,13 +20,19 @@ import com.orange.ouds.theme.tokens.OudsEffectKeyToken import com.orange.ouds.theme.tokens.semantic.OudsEffectSemanticTokens /** - * @suppress + * Holds the visual effects defined in the OUDS theme. + * + * Visual effects, such as blurs and shadows, add depth and realism to the UI, + * helping to define hierarchy and interaction states. + * + * @property blurDrag The radius of the blur effect applied to an element when it is being dragged. */ -data class OudsEffects( +@ConsistentCopyVisibility +data class OudsEffects internal constructor( val blurDrag: Int ) -internal fun OudsEffectSemanticTokens.getEffect() = OudsEffects( +internal fun OudsEffectSemanticTokens.getEffects() = OudsEffects( blurDrag = blurDrag, ) @@ -40,6 +46,8 @@ private fun OudsEffects.fromToken(token: OudsEffectKeyToken): Int { /** * Converts an OUDS effect token to the local effect value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsEffectKeyToken.value: Int diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt index 0cf8f5457..e45e08115 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsElevations.kt @@ -22,9 +22,21 @@ import com.orange.ouds.theme.tokens.OudsElevationKeyToken import com.orange.ouds.theme.tokens.semantic.OudsElevationSemanticTokens /** - * @suppress + * Holds the elevation values defined in the OUDS theme. + * + * Elevation is used to create a sense of depth and hierarchy in a design, helping to distinguish between layers and interactive elements. + * + * > Design guidelines: [Elevation tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-elevation) + * + * @property none No elevation (0 dp). The element is at the same level as the background. + * @property default The standard elevation level for components. + * @property drag The elevation applied to an element when it is being dragged. + * @property emphasized A higher elevation for emphasized elements. + * @property raised A slight elevation to detach an element from the surface. + * @property sticky The elevation used for sticky elements. */ -data class OudsElevations( +@ConsistentCopyVisibility +data class OudsElevations internal constructor( val none: Dp, val default: Dp, val drag: Dp, @@ -33,7 +45,7 @@ data class OudsElevations( val sticky: Dp, ) -internal fun OudsElevationSemanticTokens.getElevation() = OudsElevations( +internal fun OudsElevationSemanticTokens.getElevations() = OudsElevations( none = none.dp, raised = raised.dp, default = default.dp, @@ -56,6 +68,8 @@ private fun OudsElevations.fromToken(token: OudsElevationKeyToken): Dp { /** * Converts an OUDS elevation token to the local elevation value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsElevationKeyToken.value: Dp diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsGrids.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsGrids.kt index 82c4999e4..ce859c0f2 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsGrids.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsGrids.kt @@ -21,9 +21,20 @@ import com.orange.ouds.theme.tokens.OudsGridKeyToken import com.orange.ouds.theme.tokens.semantic.OudsGridSemanticTokens /** - * @suppress + * Holds the grid-related properties defined in the OUDS theme. + * + * Grids are used to place content and create consistent page layouts across different screen sizes. + * The values typically adapt based on the current window size class. + * + * > Design guidelines: [Grid tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-grid) + * + * @property minWidth The minimum width of the grid container. + * @property maxWidth The maximum width of the grid container. + * @property margin The horizontal spacing between the content and the screen edges. + * @property columnGap The spacing (gutter) between columns. */ -data class OudsGrids( +@ConsistentCopyVisibility +data class OudsGrids internal constructor( val minWidth: Dp, val maxWidth: Dp, val margin: Dp, @@ -52,6 +63,8 @@ private fun OudsGrids.fromToken(token: OudsGridKeyToken): Dp { /** * Converts an OUDS grid token to the local grid value provided by the theme. * Note that grid token value returned varies depending on the window size. + * + * @suppress */ @InternalOudsApi val OudsGridKeyToken.value: Dp diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsOpacities.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsOpacities.kt index d33b08ba8..0a149b2de 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsOpacities.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsOpacities.kt @@ -20,9 +20,25 @@ import com.orange.ouds.theme.tokens.OudsOpacityKeyToken import com.orange.ouds.theme.tokens.semantic.OudsOpacitySemanticTokens /** - * @suppress + * Holds the opacity values defined in the OUDS theme. + * + * Opacity controls the transparency of elements, ranging from fully invisible (0.0) to fully opaque (1.0). + * It can help distinguish foreground elements from background elements, making content easier to read + * and important actions more noticeable. + * + * > Design guidelines: [Opacity tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-opacity) + * + * @property disabled The opacity applied to disabled elements to indicate they are not interactive. + * @property invisible Fully transparent (0.0). The element is not visible. + * @property weakest A very low opacity level, barely visible. + * @property weaker A low opacity level. + * @property weak A moderate opacity level. + * @property medium A medium opacity level. + * @property strong A high opacity level, almost opaque. + * @property opaque Fully opaque (1.0). The element is solid and blocks content behind it. */ -data class OudsOpacities( +@ConsistentCopyVisibility +data class OudsOpacities internal constructor( val disabled: Float, val invisible: Float, val weakest: Float, @@ -33,7 +49,7 @@ data class OudsOpacities( val opaque: Float, ) -internal fun OudsOpacitySemanticTokens.getOpacity() = OudsOpacities( +internal fun OudsOpacitySemanticTokens.getOpacities() = OudsOpacities( disabled = disabled, invisible = invisible, weakest = weakest, @@ -61,6 +77,8 @@ private fun OudsOpacities.fromToken(token: OudsOpacityKeyToken): Float { /** * Converts an OUDS opacity token to the local opacity value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsOpacityKeyToken.value: Float diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt index 1039d5353..a8cd9f2c4 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsSizes.kt @@ -21,20 +21,53 @@ import com.orange.ouds.theme.tokens.OudsSizeKeyToken import com.orange.ouds.theme.tokens.semantic.OudsSizeSemanticTokens /** - * @suppress + * Holds the size values defined in the OUDS theme. + * + * These values ensure consistent sizing for icons, touch targets, and layout constraints + * across different screen sizes and contexts. + * + * > Design guidelines: [Size tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-size) + * + * @property icon Sizes related to icons. + * @property maxWidth Max width constraints for layouts. + * @property minInteractiveArea The minimum size for an interactive touch target. */ -data class OudsSizes( +@ConsistentCopyVisibility +data class OudsSizes internal constructor( val icon: Icon, val maxWidth: MaxWidth, val minInteractiveArea: Dp ) { - data class Icon( + /** + * Sizes for icons depending on their usage context. + * + * @property decorative Sizes for standalone decorative icons. + * @property withHeading Sizes for icons paired with heading typography. + * @property withLabel Sizes for icons paired with label typography. + * @property withBody Sizes for icons paired with body typography. + */ + @ConsistentCopyVisibility + data class Icon internal constructor( val decorative: Decorative, val withHeading: WithHeading, val withLabel: WithLabel, val withBody: WithBody ) { - data class Decorative( + /** + * Sizes for standalone decorative icons. + * + * @property fourExtraSmall 4xs size. + * @property threeExtraSmall 3xs size. + * @property twoExtraSmall 2xs size. + * @property extraSmall Extra small size. + * @property small Small size. + * @property medium Medium size. + * @property large Large size. + * @property extraLarge Extra large size. + * @property twoExtraLarge 2xl size. + */ + @ConsistentCopyVisibility + data class Decorative internal constructor( val fourExtraSmall: Dp, val threeExtraSmall: Dp, val twoExtraSmall: Dp, @@ -46,58 +79,140 @@ data class OudsSizes( val twoExtraLarge: Dp, ) - data class WithHeading( + /** + * Sizes for icons paired with heading typography. + * + * The properties correspond to the size of the associated heading text. + * + * @property small Icons associated with small heading. + * @property medium Icons associated with medium heading. + * @property large Icons associated with large heading. + * @property extraLarge Icons associated with extra large heading. + */ + @ConsistentCopyVisibility + data class WithHeading internal constructor( val small: Small, val medium: Medium, val large: Large, val extraLarge: ExtraLarge ) { - data class Small( + /** + * Icon sizes for small heading. + * + * @property sizeSmall Small icon size for use with a small heading. + * @property sizeMedium Medium icon size for use with a small heading. + * @property sizeLarge Large icon size for use with a small heading. + */ + @ConsistentCopyVisibility + data class Small internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Medium( + /** + * Icon sizes for medium heading. + * + * @property sizeSmall Small icon size for use with a medium heading. + * @property sizeMedium Medium icon size for use with a medium heading. + * @property sizeLarge Large icon size for use with a medium heading. + */ + @ConsistentCopyVisibility + data class Medium internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Large( + /** + * Icon sizes for large heading. + * + * @property sizeSmall Small icon size for use with a large heading. + * @property sizeMedium Medium icon size for use with a large heading. + * @property sizeLarge Large icon size for use with a large heading. + */ + @ConsistentCopyVisibility + data class Large internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class ExtraLarge( + /** + * Icon sizes for extra large heading. + * + * @property sizeSmall Small icon size for use with an extra large heading. + * @property sizeMedium Medium icon size for use with an extra large heading. + * @property sizeLarge Large icon size for use with an extra large heading. + */ + @ConsistentCopyVisibility + data class ExtraLarge internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) } - data class WithLabel( + /** + * Sizes for icons paired with label typography. + * + * The properties correspond to the size of the associated label text. + * + * @property small Icons associated with small labels. + * @property medium Icons associated with medium labels. + * @property large Icons associated with large labels. + * @property extraLarge Icons associated with extra large labels. + */ + @ConsistentCopyVisibility + data class WithLabel internal constructor( val small: Small, val medium: Medium, val large: Large, val extraLarge: ExtraLarge ) { - data class Small( + /** + * Icon sizes for small label. + * + * @property sizeExtraSmall Extra small icon size for use with a small label. + * @property sizeSmall Small icon size for use with a small label. + * @property sizeMedium Medium icon size for use with a small label. + * @property sizeLarge Large icon size for use with a small label. + */ + @ConsistentCopyVisibility + data class Small internal constructor( val sizeExtraSmall: Dp, val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Medium( + /** + * Icon sizes for medium label. + * + * @property sizeExtraSmall Extra small icon size for use with a medium label. + * @property sizeSmall Small icon size for use with a medium label. + * @property sizeMedium Medium icon size for use with a medium label. + * @property sizeLarge Large icon size for use with a medium label. + */ + @ConsistentCopyVisibility + data class Medium internal constructor( val sizeExtraSmall: Dp, val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Large( + /** + * Icon sizes for large label. + * + * @property sizeExtraSmall Extra small icon size for use with a large label. + * @property sizeSmall Small icon size for use with a large label. + * @property sizeMedium Medium icon size for use with a large label. + * @property sizeLarge Large icon size for use with a large label. + * @property sizeExtraLarge Extra large icon size for use with a large label. + */ + @ConsistentCopyVisibility + data class Large internal constructor( val sizeExtraSmall: Dp, val sizeSmall: Dp, val sizeMedium: Dp, @@ -105,31 +220,73 @@ data class OudsSizes( val sizeExtraLarge: Dp, ) - data class ExtraLarge( + /** + * Icon sizes for extra large label. + * + * @property sizeSmall Small icon size for use with an extra large label. + * @property sizeMedium Medium icon size for use with an extra large label. + * @property sizeLarge Large icon size for use with an extra large label. + */ + @ConsistentCopyVisibility + data class ExtraLarge internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) } - data class WithBody( + /** + * Sizes for icons paired with body typography. + * + * The properties correspond to the size of the associated body text. + * + * @property small Icons associated with small body. + * @property medium Icons associated with medium body. + * @property large Icons associated with large body. + */ + @ConsistentCopyVisibility + data class WithBody internal constructor( val small: Small, val medium: Medium, val large: Large, ) { - data class Small( + /** + * Icon sizes for small body. + * + * @property sizeSmall Small icon size for use with small body text. + * @property sizeMedium Medium icon size for use with small body text. + * @property sizeLarge Large icon size for use with small body text. + */ + @ConsistentCopyVisibility + data class Small internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Medium( + /** + * Icon sizes for medium body. + * + * @property sizeSmall Small icon size for use with medium body text. + * @property sizeMedium Medium icon size for use with medium body text. + * @property sizeLarge Large icon size for use with medium body text. + */ + @ConsistentCopyVisibility + data class Medium internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, ) - data class Large( + /** + * Icon sizes for large body. + * + * @property sizeSmall Small icon size for use with large body text. + * @property sizeMedium Medium icon size for use with large body text. + * @property sizeLarge Large icon size for use with large body text. + */ + @ConsistentCopyVisibility + data class Large internal constructor( val sizeSmall: Dp, val sizeMedium: Dp, val sizeLarge: Dp, @@ -137,35 +294,84 @@ data class OudsSizes( } } - data class MaxWidth( + /** + * Maximum width constraints used to control line length and layout density. + * + * @property type Contains max width values grouped by typography type. + */ + @ConsistentCopyVisibility + data class MaxWidth internal constructor( val type: Type ) { - data class Type( + /** + * Max width values grouped by typography type. + * + * @property body Max widths for body text contexts. + * @property display Max widths for display text contexts. + * @property heading Max widths for heading text contexts. + * @property label Max widths for label text contexts. + */ + @ConsistentCopyVisibility + data class Type internal constructor( val body: Body, val display: Display, val heading: Heading, val label: Label ) { - data class Body( + /** + * Max widths for body text contexts. + * + * @property small Max width constraint for small body text. + * @property medium Max width constraint for medium body text. + * @property large Max width constraint for large body text. + */ + @ConsistentCopyVisibility + data class Body internal constructor( val small: Dp, val medium: Dp, val large: Dp ) - data class Display( + /** + * Max widths for display text contexts. + * + * @property small Max width constraint for small display text. + * @property medium Max width constraint for medium display text. + * @property large Max width constraint for large display text. + */ + @ConsistentCopyVisibility + data class Display internal constructor( val small: Dp, val medium: Dp, val large: Dp ) - data class Heading( + /** + * Max widths for heading text contexts. + * + * @property small Max width constraint for small heading text. + * @property medium Max width constraint for medium heading text. + * @property large Max width constraint for large heading text. + * @property extraLarge Max width constraint for extra large heading text. + */ + @ConsistentCopyVisibility + data class Heading internal constructor( val small: Dp, val medium: Dp, val large: Dp, val extraLarge: Dp ) - data class Label( + /** + * Max widths for label text contexts. + * + * @property small Max width constraint for small label text. + * @property medium Max width constraint for medium label text. + * @property large Max width constraint for large label text. + * @property extraLarge Max width constraint for extra large label text. + */ + @ConsistentCopyVisibility + data class Label internal constructor( val small: Dp, val medium: Dp, val large: Dp, @@ -385,6 +591,11 @@ private fun OudsSizes.fromToken(token: OudsSizeKeyToken.MaxWidth): Dp { } } +/** + * Converts an OUDS size token to the local size value provided by the theme. + * + * @suppress + */ @InternalOudsApi val OudsSizeKeyToken.value: Dp @Composable diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt index b69ad8537..c60931f56 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsSpaces.kt @@ -21,9 +21,23 @@ import com.orange.ouds.theme.tokens.OudsSpaceKeyToken import com.orange.ouds.theme.tokens.semantic.OudsSpaceSemanticTokens /** - * @suppress + * Holds the spacing values defined in the OUDS theme. + * + * Spacing tokens are used to define margins, paddings, and gaps between elements, + * ensuring a consistent rhythm and layout structure across the application. + * + * > Design guidelines: [Space tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-space) + * + * @property fixed Fixed spacing values that do not change based on screen size. + * @property scaled Spacing values that scale adaptively based on the screen size (e.g., Mobile vs Tablet). + * @property paddingInline Spacing used for horizontal padding (start/end). + * @property paddingBlock Spacing used for vertical padding (top/bottom). + * @property inset Spacing used for inset distances (e.g., distance from the edge of a container). + * @property columnGap Spacing used for gaps between columns in a grid or layout. + * @property rowGap Spacing used for gaps between rows in a grid or layout. */ -data class OudsSpaces( +@ConsistentCopyVisibility +data class OudsSpaces internal constructor( val fixed: Fixed, val scaled: Scaled, val paddingInline: PaddingInline, @@ -33,7 +47,24 @@ data class OudsSpaces( val rowGap: RowGap ) { - data class Fixed( + /** + * Fixed spacing values that remain constant regardless of the screen size context. + * + * @property none 0dp space. + * @property threeExtraSmall 3xs space. + * @property twoExtraSmall 2xs space. + * @property extraSmall Extra small space. + * @property small Small space. + * @property medium Medium space. + * @property large Large space. + * @property extraLarge Extra large space. + * @property twoExtraLarge 2xl space. + * @property threeExtraLarge 3xl space. + * @property fourExtraLarge 4xl space. + * @property fiveExtraLarge 5xl space. + */ + @ConsistentCopyVisibility + data class Fixed internal constructor( val none: Dp, val threeExtraSmall: Dp, val twoExtraSmall: Dp, @@ -48,7 +79,23 @@ data class OudsSpaces( val fiveExtraLarge: Dp ) - data class Scaled( + + /** + * Scaled spacing values that adapt based on the window size class (e.g. larger on tablets). + * + * @property none 0dp space. + * @property threeExtraSmall 3xs scaled space. + * @property twoExtraSmall 2xs scaled space. + * @property extraSmall Extra small scaled space. + * @property small Small scaled space. + * @property medium Medium scaled space. + * @property large Large scaled space. + * @property extraLarge Extra large scaled space. + * @property twoExtraLarge 2xl scaled space. + * @property threeExtraLarge 3xl scaled space. + */ + @ConsistentCopyVisibility + data class Scaled internal constructor( val none: Dp, val threeExtraSmall: Dp, val twoExtraSmall: Dp, @@ -61,7 +108,24 @@ data class OudsSpaces( val threeExtraLarge: Dp ) - data class PaddingInline( + /** + * Spacing values specifically designed for inline padding (Start/End). + * + * @property none 0dp padding. + * @property fourExtraSmall 4xs padding. + * @property threeExtraSmall 3xs padding. + * @property twoExtraSmall 2xs padding. + * @property extraSmall Extra small padding. + * @property small Small padding. + * @property medium Medium padding. + * @property large Large padding. + * @property extraLarge Extra large padding. + * @property twoExtraLarge 2xl padding. + * @property threeExtraLarge 3xl padding. + * @property fourExtraLarge 4xl padding. + */ + @ConsistentCopyVisibility + data class PaddingInline internal constructor( val none: Dp, val fourExtraSmall: Dp, val threeExtraSmall: Dp, @@ -76,7 +140,25 @@ data class OudsSpaces( val fourExtraLarge: Dp, ) - data class PaddingBlock( + + /** + * Spacing values specifically designed for block padding (Top/Bottom). + * + * @property none 0dp padding. + * @property fourExtraSmall 4xs padding. + * @property threeExtraSmall 3xs padding. + * @property twoExtraSmall 2xs padding. + * @property extraSmall Extra small padding. + * @property small Small padding. + * @property medium Medium padding. + * @property large Large padding. + * @property extraLarge Extra large padding. + * @property twoExtraLarge 2xl padding. + * @property threeExtraLarge 3xl padding. + * @property fourExtraLarge 4xl padding. + */ + @ConsistentCopyVisibility + data class PaddingBlock internal constructor( val none: Dp, val fourExtraSmall: Dp, val threeExtraSmall: Dp, @@ -91,7 +173,23 @@ data class OudsSpaces( val fourExtraLarge: Dp, ) - data class Inset( + /** + * Spacing values used for inset positioning. + * + * @property none 0dp inset. + * @property fourExtraSmall 4xs inset. + * @property threeExtraSmall 3xs inset. + * @property twoExtraSmall 2xs inset. + * @property extraSmall Extra small inset. + * @property small Small inset. + * @property medium Medium inset. + * @property large Large inset. + * @property extraLarge Extra large inset. + * @property twoExtraLarge 2xl inset. + * @property threeExtraLarge 3xl inset. + */ + @ConsistentCopyVisibility + data class Inset internal constructor( val none: Dp, val fourExtraSmall: Dp, val threeExtraSmall: Dp, @@ -105,7 +203,21 @@ data class OudsSpaces( val threeExtraLarge: Dp, ) - data class ColumnGap( + /** + * Spacing values used for gaps between columns. + * + * @property none 0dp gap. + * @property threeExtraSmall 3xs gap. + * @property twoExtraSmall 2xs gap. + * @property extraSmall Extra small gap. + * @property small Small gap. + * @property medium Medium gap. + * @property large Large gap. + * @property extraLarge Extra large gap. + * @property twoExtraLarge 2xl gap. + */ + @ConsistentCopyVisibility + data class ColumnGap internal constructor( val none: Dp, val threeExtraSmall: Dp, val twoExtraSmall: Dp, @@ -117,7 +229,19 @@ data class OudsSpaces( val twoExtraLarge: Dp, ) - data class RowGap( + /** + * Spacing values used for gaps between rows. + * + * @property none 0dp gap. + * @property threeExtraSmall 3xs gap. + * @property twoExtraSmall 2xs gap. + * @property extraSmall Extra small gap. + * @property small Small gap. + * @property medium Medium gap. + * @property large Large gap. + */ + @ConsistentCopyVisibility + data class RowGap internal constructor( val none: Dp, val threeExtraSmall: Dp, val twoExtraSmall: Dp, @@ -337,6 +461,8 @@ private fun OudsSpaces.fromToken(token: OudsSpaceKeyToken.RowGap): Dp { /** * Converts an OUDS space token to the local space value provided by the theme. + * + * @suppress */ @InternalOudsApi val OudsSpaceKeyToken.value: Dp diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsTheme.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsTheme.kt index bd7bf4d5e..aa1f81a3c 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsTheme.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsTheme.kt @@ -22,6 +22,9 @@ import androidx.compose.runtime.compositionLocalOf import androidx.compose.runtime.staticCompositionLocalOf import androidx.compose.ui.platform.LocalContext import com.orange.ouds.core.extensions.isHighContrastModeEnabled +import com.orange.ouds.core.theme.OudsTheme.Tweak.ForceDark +import com.orange.ouds.core.theme.OudsTheme.Tweak.ForceLight +import com.orange.ouds.core.theme.OudsTheme.Tweak.Invert import com.orange.ouds.theme.OudsDrawableResources import com.orange.ouds.theme.OudsThemeContract import com.orange.ouds.theme.OudsThemeSettings @@ -57,9 +60,11 @@ internal val LocalComponents = staticCompositionLocalOf { missin object OudsTheme { /** - * Tweak of the current [OudsTheme] which can be passed to [OudsThemeTweak] composable: - * - Invert set theme in dark when app is in light or in light when app is in dark - * - ForceDark and ForceLight force the theme to be in dark or in light + * Defines adjustments that can be applied to the current [OudsTheme] via the [OudsThemeTweak] composable. + * + * @property Invert Inverts the current theme (switches from Light to Dark or Dark to Light). + * @property ForceDark Forces the theme to Dark mode, regardless of the system setting. + * @property ForceLight Forces the theme to Light mode, regardless of the system setting. */ enum class Tweak { Invert, ForceDark, ForceLight @@ -132,9 +137,7 @@ object OudsTheme { } /** - * [OudsTheme] is the theme to apply to your screens in a Jetpack Compose application. Use it at the top of - * your application in replacement of the `MaterialTheme`. - * Cause OUDS supports multi-theme, you should pass the OUDS supported [theme] used by your application. + * Applies the OUDS theme to the composable hierarchy. * * @param theme Theme to apply to your application. It must implement [OudsThemeContract] (e.g., OrangeTheme, SoshTheme, ...) * @param darkThemeEnabled Indicates whether the dark theme is enabled or not. @@ -160,11 +163,11 @@ fun OudsTheme( LocalMaterialLightColorScheme provides materialColorTokens.materialLightColorScheme, LocalMaterialDarkColorScheme provides materialColorTokens.materialDarkColorScheme, LocalBorders provides borderTokens.getBorders(), - LocalEffects provides effectTokens.getEffect(), - LocalElevations provides elevationTokens.getElevation(), + LocalEffects provides effectTokens.getEffects(), + LocalElevations provides elevationTokens.getElevations(), LocalTypography provides fontTokens.getTypography(fontFamily, windowWidthSizeClass), LocalGrids provides gridTokens.getGrids(windowWidthSizeClass), - LocalOpacities provides opacityTokens.getOpacity(), + LocalOpacities provides opacityTokens.getOpacities(), LocalSizes provides sizeTokens.getSizes(windowWidthSizeClass), LocalSpaces provides spaceTokens.getSpaces(windowWidthSizeClass), LocalComponentsTokens provides componentsTokens, @@ -181,12 +184,12 @@ fun OudsTheme( } /** - * Tweaks the current OUDS theme and displays given [content] according to the selected [tweak]. + * Modifies the current OUDS theme configuration and applies it to the given [content]. * - * Note: This composable is directly related to [OudsTheme] and MUST be used inside it. + * Note: This composable relies on [OudsTheme] and must be nested within it. * - * @param tweak Tweak applied to the current [OudsTheme]. - * @param content Theme tweak nested content. OudsThemeTweak will be applied to this content. + * @param tweak The specific adjustment to apply to the current [OudsTheme] (e.g., forcing dark mode). + * @param content The content to which the tweaked theme will be applied. */ @Composable fun OudsThemeTweak(tweak: OudsTheme.Tweak, content: @Composable () -> Unit) { @@ -210,12 +213,16 @@ fun OudsThemeTweak(tweak: OudsTheme.Tweak, content: @Composable () -> Unit) { } /** - * This function is equivalent to [isSystemInDarkTheme] except it takes the OUDS theme setting into account instead of the system one. + * Determines if the OUDS theme is currently in dark mode. * - * The OUDS theme can be inverted or forced to light or dark when calling [OudsThemeTweak] and the value returned by this method reflects that kind of change. - * If there is no call to [OudsThemeTweak] anywhere in the layout hierarchy, then this function returns the same value as [isSystemInDarkTheme]. + * This function is equivalent to [isSystemInDarkTheme], but it respects overrides applied by [OudsThemeTweak]. * - * @return `true` if OUDS is considered to be in 'dark theme'. + * The OUDS theme can be inverted or forced to light/dark modes using [OudsThemeTweak]. + * The value returned by this function reflects these effective changes. + * + * If [OudsThemeTweak] is not used in the layout hierarchy, this function returns the value of the `darkThemeEnabled` parameter of the root `OudsTheme` method. + * + * @return `true` if the effective OUDS theme is dark, `false` otherwise. */ @Composable @ReadOnlyComposable diff --git a/core/src/main/java/com/orange/ouds/core/theme/OudsTypography.kt b/core/src/main/java/com/orange/ouds/core/theme/OudsTypography.kt index eba5e20cb..df6a4cc68 100644 --- a/core/src/main/java/com/orange/ouds/core/theme/OudsTypography.kt +++ b/core/src/main/java/com/orange/ouds/core/theme/OudsTypography.kt @@ -24,72 +24,168 @@ import com.orange.ouds.theme.tokens.OudsTypographyKeyToken import com.orange.ouds.theme.tokens.semantic.OudsFontSemanticTokens /** - * @suppress + * Holds the typography styles defined in the OUDS theme. + * + * Typography is managed with a defined set of text styles. It enhances communication and reinforce the attribution to the brand. + * + * > Design guidelines: [Typography tokens documentation](https://r.orange.fr/r/S-ouds-doc-token-typography) + * + * @property fontFamily The default font family used for text. + * @property display Styles for large, prominent text. + * @property heading Styles for headings and titles. + * @property body Styles for body text (paragraphs, descriptions). + * @property label Styles for smaller utility text (e.g., captions, labels). */ -data class OudsTypography( +@ConsistentCopyVisibility +data class OudsTypography internal constructor( val fontFamily: FontFamily, val display: Display, val heading: Heading, val body: Body, val label: Label ) { - data class Display( + /** + * Styles for large, prominent text, typically used for major application titles. + * + * @property large Large display text style. + * @property medium Medium display text style. + * @property small Small display text style. + */ + @ConsistentCopyVisibility + data class Display internal constructor( val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Heading( + /** + * Styles for headings and titles, used to structure content hierarchy. + * + * @property extraLarge Extra large heading style. + * @property large Large heading style. + * @property medium Medium heading style. + * @property small Small heading style. + */ + @ConsistentCopyVisibility + data class Heading internal constructor( val extraLarge: TextStyle, val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Body( + /** + * Styles for body text, used for the main content, paragraphs, and descriptions. + * + * @property default Default font weight styles (Regular). + * @property moderate Moderate font weight styles (Medium). + * @property strong Strong font weight styles (Bold). + */ + @ConsistentCopyVisibility + data class Body internal constructor( val default: Default, val moderate: Moderate, val strong: Strong ) { - data class Default( + /** + * Body styles with Default font weight (Regular). + * + * @property large Large body text. + * @property medium Medium body text. + * @property small Small body text. + */ + @ConsistentCopyVisibility + data class Default internal constructor( val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Moderate( + /** + * Body styles with Moderate font weight (Medium). + * + * @property large Large moderate body text. + * @property medium Medium moderate body text. + * @property small Small moderate body text. + */ + @ConsistentCopyVisibility + data class Moderate internal constructor( val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Strong( + /** + * Body styles with Strong font weight (Bold). + * + * @property large Large strong body text. + * @property medium Medium strong body text. + * @property small Small strong body text. + */ + @ConsistentCopyVisibility + data class Strong internal constructor( val large: TextStyle, val medium: TextStyle, val small: TextStyle ) } - data class Label( + + /** + * Styles for utility text such as captions, input labels, and metadata. + * + * @property default Default font weight styles (Regular). + * @property moderate Moderate font weight styles (Medium). + * @property strong Strong font weight styles (Bold). + */ + @ConsistentCopyVisibility + data class Label internal constructor( val default: Default, val moderate: Moderate, val strong: Strong ) { - data class Default( + /** + * Label styles with Default font weight (Regular). + * + * @property extraLarge Extra large label text. + * @property large Large label text. + * @property medium Medium label text. + * @property small Small label text. + */ + @ConsistentCopyVisibility + data class Default internal constructor( val extraLarge: TextStyle, val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Moderate( + /** + * Label styles with Moderate font weight (Medium). + * + * @property extraLarge Extra large moderate label text. + * @property large Large moderate label text. + * @property medium Medium moderate label text. + * @property small Small moderate label text. + */ + @ConsistentCopyVisibility + data class Moderate internal constructor( val extraLarge: TextStyle, val large: TextStyle, val medium: TextStyle, val small: TextStyle ) - data class Strong( + /** + * Label styles with Strong font weight (Bold). + * + * @property extraLarge Extra large strong label text. + * @property large Large strong label text. + * @property medium Medium strong label text. + * @property small Small strong label text. + */ + @ConsistentCopyVisibility + data class Strong internal constructor( val extraLarge: TextStyle, val large: TextStyle, val medium: TextStyle, @@ -344,6 +440,8 @@ private fun OudsTypography.fromToken(token: OudsTypographyKeyToken): TextStyle { /** * Converts an OUDS typography token to the local typography value provided by the theme. * Note that the typography value returned varies depending on the window size. + * + * @suppress */ @InternalOudsApi val OudsTypographyKeyToken.value: TextStyle diff --git a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreviewableComponent.kt b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreviewableComponent.kt index 0da3a9737..f9381bb08 100644 --- a/core/src/main/java/com/orange/ouds/core/utilities/OudsPreviewableComponent.kt +++ b/core/src/main/java/com/orange/ouds/core/utilities/OudsPreviewableComponent.kt @@ -93,8 +93,12 @@ import com.orange.ouds.core.component.PreviewOudsTopAppBar import com.orange.ouds.foundation.InternalOudsApi import com.orange.ouds.theme.OudsThemeContract -// This interface and its nested objects allow to use preview methods and parameters in the core-test module while keeping them internal in the core module. -// This avoids polluting Android Studio code completion with methods and classes related to component previews. +/** + * This interface and its nested objects allow to use preview methods and parameters in the core-test module while keeping them internal in the core module. + * This avoids polluting Android Studio code completion with methods and classes related to component previews. + * + * @suppress + */ @InternalOudsApi interface OudsPreviewableComponent { diff --git a/theme-contract/Module.mustache b/theme-contract/Module.mustache index de04fdf45..ce461b555 100644 --- a/theme-contract/Module.mustache +++ b/theme-contract/Module.mustache @@ -1,6 +1,5 @@ # Module theme-contract - The **OUDS Theme Contract** module is the cornerstone of the design system's theming architecture. It defines the **abstract interfaces** that all concrete themes (Orange, Sosh, Wireframe, etc.) must implement. It enforces a strict separation of concerns: @@ -101,4 +100,4 @@ This package defines the `OudsMaterialColorTokens` interface, which establishes # Package com.orange.ouds.theme.tokens.semantic This package contains the **interfaces** defining the semantic properties of the theme. It hosts the **contracts** for colors (`OudsColorSemanticTokens`), typography (`OudsFontSemanticTokens`), borders, elevations, grids, and opacities. -It dictates that every theme must implement these specific interfaces to provide the fundamental visual attributes. \ No newline at end of file +It dictates that every theme must implement these specific interfaces to provide the fundamental visual attributes. diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/OudsDrawableResources.kt b/theme-contract/src/main/java/com/orange/ouds/theme/OudsDrawableResources.kt index 371c9f155..0002a32ee 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/OudsDrawableResources.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/OudsDrawableResources.kt @@ -15,6 +15,9 @@ package com.orange.ouds.theme import androidx.annotation.DrawableRes import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi interface OudsDrawableResources { val component: Component diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/OudsThemeContract.kt b/theme-contract/src/main/java/com/orange/ouds/theme/OudsThemeContract.kt index 72f7dcb67..37b95ae31 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/OudsThemeContract.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/OudsThemeContract.kt @@ -29,88 +29,94 @@ import com.orange.ouds.theme.tokens.semantic.OudsSpaceSemanticTokens /** * An interface to create an OUDS supported theme. * - * Any values that are not set will inherit the Orange theme. + * Implementations of this interface define the look and feel of the application by providing specific token values + * (colors, typography, spacing, etc.). Any values not explicitly set will generally rely on abstract definitions, + * but typical implementations should provide full sets of tokens. */ interface OudsThemeContract : Parcelable { /** - * The theme display name. + * The display name of the theme (e.g., "Orange", "Sosh"). */ val name: String /** - * The theme settings. + * The general settings for the theme configuration. */ val settings: OudsThemeSettings /** - * Color semantic tokens values used in the theme. + * The collection of semantic color tokens used in the theme. */ val colorTokens: OudsColorSemanticTokens /** - * Material color matching used in the theme. + * The mapping of OUDS tokens to standard Material 3 color roles. + * This ensures compatibility with standard Material components. */ val materialColorTokens: OudsMaterialColorTokens /** - * Border semantic tokens values used in the theme. + * The collection of border-related tokens (width, radius, style) used in the theme. */ val borderTokens: OudsBorderSemanticTokens /** - * Effect semantic tokens values used in the theme. + * The collection of visual effect tokens (e.g., blurs) used in the theme. */ val effectTokens: OudsEffectSemanticTokens /** - * Elevation semantic tokens values used in the theme. + * The collection of elevation tokens (z-index, shadows) used in the theme. */ val elevationTokens: OudsElevationSemanticTokens /** - * Font family used in the theme. - * You can provide your own theme font family `FontFamily(Font(R.font.my_theme_font))`. + * The font family used in the theme. + * + * Defaults to [FontFamily.Default] (system font). + * You can provide a custom font family, for example: `FontFamily(Font(R.font.my_custom_font))`. */ val fontFamily: FontFamily get() = FontFamily.Default /** - * Font semantic tokens values used in the theme. + * The collection of typography semantic tokens (font sizes, weights, line heights) used in the theme. */ val fontTokens: OudsFontSemanticTokens /** - * Grid semantic tokens values used in the theme. + * The collection of grid layout tokens used in the theme. */ val gridTokens: OudsGridSemanticTokens /** - * Opacity semantic tokens values used in the theme. + * The collection of opacity tokens used in the theme. */ val opacityTokens: OudsOpacitySemanticTokens /** - * Size semantic tokens values used in the theme. + * The collection of size tokens (icons, constraints) used in the theme. */ val sizeTokens: OudsSizeSemanticTokens /** - * Space semantic tokens values used in the theme. + * The collection of spacing tokens (padding, margins, gaps) used in the theme. */ val spaceTokens: OudsSpaceSemanticTokens /** - * Allows customization of OUDS components. + * Specific tokens for customizing the internal behavior or style of OUDS components. */ val componentsTokens: OudsComponentsTokens /** - * Allows customization of drawable resources used by OUDS components. + * Allows customization of drawable resources used explicitly by OUDS components. * - * Caution: + * **Caution:** * To avoid resource conflicts, Android recommends using a prefix or other consistent naming scheme that is unique to the module (or is unique across all project modules). - * So, we strongly recommend that you prefix your resources with the name of your theme. For example, if your theme is called "LoremIpsum" you might name your resources as ic_lorem_ipsum_checkbox_selected, ic_lorem_ipsum_chip_tick, etc. + * We strongly recommend that you prefix your resources with the theme name. + * Example: If your theme is "LoremIpsum", name resources like `ic_lorem_ipsum_checkbox_selected`, `ic_lorem_ipsum_chip_tick`, etc. */ val drawableResources: OudsDrawableResources } \ No newline at end of file diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt index 1819844d0..4101df106 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsBorderKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsBorderKeyToken : OudsKeyToken { sealed interface Radius : OudsBorderKeyToken { @@ -27,10 +30,12 @@ sealed interface OudsBorderKeyToken : OudsKeyToken { data object Pill : Radius data object Small : Radius } + sealed interface Style : OudsBorderKeyToken { data object Default : Style data object Drag : Style } + sealed interface Width : OudsBorderKeyToken { data object Default : Width data object Focus : Width diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt index 2cb8a7b59..b32afec0c 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsColorKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsColorKeyToken : OudsKeyToken { sealed interface Action : OudsColorKeyToken { @@ -33,6 +36,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Loading : Negative data object Pressed : Negative } + data object Pressed : Action data object ReadOnlyPrimary : Action data object ReadOnlySecondary : Action @@ -45,14 +49,17 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Loading : Support data object Pressed : Support } + data object Visited : Action } + sealed interface Always : OudsColorKeyToken { data object Black : Always data object OnBlack : Always data object OnWhite : Always data object White : Always } + sealed interface Background : OudsColorKeyToken { data object InverseHigh : Background data object InverseLow : Background @@ -60,6 +67,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Secondary : Background data object Tertiary : Background } + sealed interface Border : OudsColorKeyToken { data object BrandPrimary : Border data object BrandSecondary : Border @@ -75,6 +83,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Secondary : OnBrand data object Tertiary : OnBrand } + sealed interface Status : Border { data object Accent : Status data object Info : Status @@ -83,6 +92,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Warning : Status } } + sealed interface Content : OudsColorKeyToken { data object BrandPrimary : Content data object BrandSecondary : Content @@ -101,33 +111,40 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Pressed : OnAction data object Selected : OnAction } + sealed interface OnBrand : Content { data object Primary : OnBrand data object Secondary : OnBrand data object Tertiary : OnBrand } + sealed interface OnStatus : Content { sealed interface Accent : OnStatus { data object Emphasized : Accent data object Muted : Accent } + sealed interface Info : OnStatus { data object Emphasized : Info data object Muted : Info } + sealed interface Negative : OnStatus { data object Emphasized : Negative data object Muted : Negative } + sealed interface Positive : OnStatus { data object Emphasized : Positive data object Muted : Positive } + sealed interface Warning : OnStatus { data object Emphasized : Warning data object Muted : Warning } } + sealed interface Status : Content { data object Accent : Status data object Info : Status @@ -136,17 +153,20 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Warning : Status } } + sealed interface Opacity : OudsColorKeyToken { data object Lower : Opacity data object Lowest : Opacity data object Transparent : Opacity } + sealed interface Overlay : OudsColorKeyToken { data object Drag : Overlay data object Dropdown : Overlay data object Modal : Overlay data object Tooltip : Overlay } + sealed interface Repository : OudsColorKeyToken { sealed interface Accent : Repository { data object High : Accent @@ -157,6 +177,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Accent data object Medium : Accent } + sealed interface Info : Repository { data object High : Info data object Higher : Info @@ -166,6 +187,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Info data object Medium : Info } + sealed interface Negative : Repository { data object High : Negative data object Higher : Negative @@ -175,6 +197,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Negative data object Medium : Negative } + sealed interface Neutral : Repository { sealed interface Emphasized : Neutral { data object Black : Emphasized @@ -186,6 +209,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Emphasized data object Medium : Emphasized } + sealed interface Muted : Neutral { data object High : Muted data object Higher : Muted @@ -197,11 +221,13 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object White : Muted } } + sealed interface Opacity : Repository { sealed interface Accent : Opacity { data object Low : Accent data object Medium : Accent } + sealed interface Black : Opacity { data object High : Black data object Higher : Black @@ -214,18 +240,22 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object MediumLow : Black data object Transparent : Black } + sealed interface Info : Opacity { data object Low : Info data object Medium : Info } + sealed interface Negative : Opacity { data object Low : Negative data object Medium : Negative } + sealed interface Positive : Opacity { data object Low : Positive data object Medium : Positive } + sealed interface Primary : Opacity { data object High : Primary data object Higher : Primary @@ -236,10 +266,12 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Medium : Primary data object Transparent : Primary } + sealed interface Warning : Opacity { data object Low : Warning data object Medium : Warning } + sealed interface White : Opacity { data object High : White data object Higher : White @@ -252,6 +284,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Transparent : White } } + sealed interface Positive : Repository { data object High : Positive data object Higher : Positive @@ -261,6 +294,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Positive data object Medium : Positive } + sealed interface Primary : Repository { data object High : Primary data object Higher : Primary @@ -270,6 +304,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Primary data object Medium : Primary } + sealed interface Secondary : Repository { data object High : Secondary data object Higher : Secondary @@ -279,6 +314,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Secondary data object Medium : Secondary } + sealed interface Tertiary : Repository { data object High : Tertiary data object Higher : Tertiary @@ -288,6 +324,7 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Lowest : Tertiary data object Medium : Tertiary } + sealed interface Warning : Repository { data object High : Warning data object Higher : Warning @@ -298,12 +335,14 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Medium : Warning } } + sealed interface Surface : OudsColorKeyToken { sealed interface Brand : Surface { data object Primary : Brand data object Secondary : Brand data object Tertiary : Brand } + data object InverseHigh : Surface data object InverseLow : Surface data object Primary : Surface @@ -313,23 +352,28 @@ sealed interface OudsColorKeyToken : OudsKeyToken { data object Emphasized : Accent data object Muted : Accent } + sealed interface Info : Status { data object Emphasized : Info data object Muted : Info } + sealed interface Negative : Status { data object Emphasized : Negative data object Muted : Negative } + sealed interface Positive : Status { data object Emphasized : Positive data object Muted : Positive } + sealed interface Warning : Status { data object Emphasized : Warning data object Muted : Warning } } + data object Tertiary : Surface } } diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsEffectKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsEffectKeyToken.kt index d4dbc56e2..42ee4d656 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsEffectKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsEffectKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsEffectKeyToken : OudsKeyToken { sealed interface Blur : OudsEffectKeyToken { diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt index df5916558..e06d46869 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsElevationKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsElevationKeyToken : OudsKeyToken { data object Default : OudsElevationKeyToken diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt index 1e984fe40..2c7b88893 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsGridKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsGridKeyToken : OudsKeyToken { data object ColumnGap : OudsGridKeyToken diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt index ee9584b5a..a55d21d4a 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsOpacityKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsOpacityKeyToken : OudsKeyToken { data object Disabled : OudsOpacityKeyToken diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt index aa587a369..4f6634bd1 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSizeKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsSizeKeyToken : OudsKeyToken { sealed interface Icon : OudsSizeKeyToken { @@ -31,51 +34,60 @@ sealed interface OudsSizeKeyToken : OudsKeyToken { data object TwoExtraLarge : Decorative data object TwoExtraSmall : Decorative } + sealed interface WithBody : Icon { sealed interface Large : WithBody { data object SizeLarge : Large data object SizeMedium : Large data object SizeSmall : Large } + sealed interface Medium : WithBody { data object SizeLarge : Medium data object SizeMedium : Medium data object SizeSmall : Medium } + sealed interface Small : WithBody { data object SizeLarge : Small data object SizeMedium : Small data object SizeSmall : Small } } + sealed interface WithHeading : Icon { sealed interface ExtraLarge : WithHeading { data object SizeLarge : ExtraLarge data object SizeMedium : ExtraLarge data object SizeSmall : ExtraLarge } + sealed interface Large : WithHeading { data object SizeLarge : Large data object SizeMedium : Large data object SizeSmall : Large } + sealed interface Medium : WithHeading { data object SizeLarge : Medium data object SizeMedium : Medium data object SizeSmall : Medium } + sealed interface Small : WithHeading { data object SizeLarge : Small data object SizeMedium : Small data object SizeSmall : Small } } + sealed interface WithLabel : Icon { sealed interface ExtraLarge : WithLabel { data object SizeLarge : ExtraLarge data object SizeMedium : ExtraLarge data object SizeSmall : ExtraLarge } + sealed interface Large : WithLabel { data object SizeExtraLarge : Large data object SizeExtraSmall : Large @@ -83,12 +95,14 @@ sealed interface OudsSizeKeyToken : OudsKeyToken { data object SizeMedium : Large data object SizeSmall : Large } + sealed interface Medium : WithLabel { data object SizeExtraSmall : Medium data object SizeLarge : Medium data object SizeMedium : Medium data object SizeSmall : Medium } + sealed interface Small : WithLabel { data object SizeExtraSmall : Small data object SizeLarge : Small @@ -97,6 +111,7 @@ sealed interface OudsSizeKeyToken : OudsKeyToken { } } } + sealed interface MaxWidth : OudsSizeKeyToken { sealed interface Type : MaxWidth { sealed interface Body : Type { @@ -104,17 +119,20 @@ sealed interface OudsSizeKeyToken : OudsKeyToken { data object Medium : Body data object Small : Body } + sealed interface Display : Type { data object Large : Display data object Medium : Display data object Small : Display } + sealed interface Heading : Type { data object ExtraLarge : Heading data object Large : Heading data object Medium : Heading data object Small : Heading } + sealed interface Label : Type { data object ExtraLarge : Label data object Large : Label @@ -123,6 +141,7 @@ sealed interface OudsSizeKeyToken : OudsKeyToken { } } } + data object MinInteractiveArea : OudsSizeKeyToken } diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt index 285fd687d..2d0cf9161 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsSpaceKeyToken.kt @@ -17,6 +17,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsSpaceKeyToken : OudsKeyToken { sealed interface ColumnGap : OudsSpaceKeyToken { @@ -30,6 +33,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object TwoExtraLarge : ColumnGap data object TwoExtraSmall : ColumnGap } + sealed interface Fixed : OudsSpaceKeyToken { data object ExtraLarge : Fixed data object ExtraSmall : Fixed @@ -44,6 +48,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object TwoExtraLarge : Fixed data object TwoExtraSmall : Fixed } + sealed interface Inset : OudsSpaceKeyToken { data object ExtraLarge : Inset data object ExtraSmall : Inset @@ -57,6 +62,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object TwoExtraLarge : Inset data object TwoExtraSmall : Inset } + sealed interface PaddingBlock : OudsSpaceKeyToken { data object ExtraLarge : PaddingBlock data object ExtraSmall : PaddingBlock @@ -71,6 +77,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object TwoExtraLarge : PaddingBlock data object TwoExtraSmall : PaddingBlock } + sealed interface PaddingInline : OudsSpaceKeyToken { data object ExtraLarge : PaddingInline data object ExtraSmall : PaddingInline @@ -85,6 +92,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object TwoExtraLarge : PaddingInline data object TwoExtraSmall : PaddingInline } + sealed interface RowGap : OudsSpaceKeyToken { data object ExtraSmall : RowGap data object Large : RowGap @@ -94,6 +102,7 @@ sealed interface OudsSpaceKeyToken : OudsKeyToken { data object ThreeExtraSmall : RowGap data object TwoExtraSmall : RowGap } + sealed interface Scaled : OudsSpaceKeyToken { data object ExtraLarge : Scaled data object ExtraSmall : Scaled diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsTypographyKeyToken.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsTypographyKeyToken.kt index 4f2a5e947..5dd3e944b 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsTypographyKeyToken.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/OudsTypographyKeyToken.kt @@ -14,6 +14,9 @@ package com.orange.ouds.theme.tokens import com.orange.ouds.foundation.InternalOudsApi +/** + * @suppress + */ @InternalOudsApi sealed interface OudsTypographyKeyToken : OudsKeyToken { diff --git a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt index 28778f323..7377795a7 100644 --- a/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt +++ b/theme-contract/src/main/java/com/orange/ouds/theme/tokens/semantic/OudsColorSemanticTokens.kt @@ -24,9 +24,11 @@ interface OudsColorSemanticTokens { val overlayColorTokens: OudsColorOverlaySemanticTokens val surfaceColorTokens: OudsColorSurfaceSemanticTokens + /** @suppress */ @InternalOudsApi val repositoryColorTokens: OudsColorRepositorySemanticTokens + /** @suppress */ @InternalOudsApi val colorModeTokens: OudsColorModeSemanticTokens } \ No newline at end of file