Package-level declarations

Types

Link copied to clipboard
open class CountDownTimerWithPause(val millisInFuture: Long, val countDownInterval: Long)
Link copied to clipboard
class DefaultFioriHeaderColors(backgroundColor: Color, textColor: Color, textButtonColor: FioriTextButtonColor, iconButtonColors: FioriStandardIconButtonColors, errorTextColor: Color) : FioriHeaderColors
Link copied to clipboard
class DefaultFioriHeaderStyles(headerContainerPaddings: PaddingValues, textButtonHeaderContainerPaddings: PaddingValues, iconButtonHeaderContainerPaddings: PaddingValues, iconButtonStyles: FioriStandardIconButtonStyles, textButtonStyles: FioriTextButtonStyles, textButtonEnabled: Boolean, iconButtonEnabled: Boolean) : FioriHeaderStyles
Link copied to clipboard

Default implementation of FioriLifecycleObserver that executes a callback when any lifecycle event occurs.

Link copied to clipboard
open class FioriBaseTestTags(val identifier: String? = null)

The class FioriBaseTestTags serves as the parent for all subclasses that encapsulate test tags within various Fiori Compose UI components.

Link copied to clipboard

This interface is preserved for enriching the template of each customization

Link copied to clipboard
interface FioriDrawable

An interface representing a drawable resource in Fiori Compose UI, such as Icon and Image.

Link copied to clipboard

A scope used in FioriFlowRow custom layout

Link copied to clipboard

Represents the color scheme for a Fiori header bar.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The concrete class of FioriBaseTestTags to represents the test tags for a FioriHeader.

Link copied to clipboard
class FioriHeaderTestTagsManager(val tags: FioriHeaderTestTags = FioriHeaderTestTags.Builder().build())

Manages the test tags for the FioriHeader.

Link copied to clipboard

Represents the typography used by a Fiori header bar.

Link copied to clipboard
data class FioriIcon(val iconType: IconType, val resId: Int? = null, val bitmap: Bitmap? = null, val imageVector: ImageVector? = null, val tint: Color? = null, val contentDescription: String? = "", val painterBuilder: @Composable () -> Painter? = null, val backgroundColor: Color = Color.Transparent, val url: String? = null, val drawable: Drawable? = null, val placeholderResId: Int? = null, val errorResId: Int? = null, val contentScale: ContentScale = ContentScale.Fit) : Parcelable, FioriDrawable

Data class for an icon.

Link copied to clipboard
object FioriIcons

A collection of default ImageVector icons used for standard Fiori navigation destinations.

Link copied to clipboard
data class FioriImage(val imageType: ImageType, val resId: Int? = null, val drawable: Drawable? = null, val bitmap: Bitmap? = null, val url: String? = null, val contentDescription: String? = "", val painterBuilder: @Composable () -> Painter? = null, val contentScale: ContentScale = ContentScale.Fit, val color: Color? = null, val backgroundColor: Color = Color.Transparent, val placeholderResId: Int? = null, val errorResId: Int? = null, val aspectRatio: Float? = null) : Parcelable, FioriDrawable

Data class for an image.

Link copied to clipboard
abstract class FioriImageResource

Abstract class that can be converted to Painter.

Link copied to clipboard
data class FioriImageThumbnail(val imageShape: ImageShape, val image: FioriImage) : Parcelable

Data class for an image thumbnail.

Link copied to clipboard

Specifies the layout orientation of a Fiori component.

Link copied to clipboard

Interface for observing lifecycle events in Fiori components. Implement this to receive lifecycle event callbacks.

Link copied to clipboard
data class FioriLifecycleObserverManager(var observer: FioriLifecycleObserver = DefaultFioriLifecycleObserver())

Data class that manages a FioriLifecycleObserver instance. Provides a way to store and update the observer.

Link copied to clipboard

Interface for required field configuration. It often used for change the configuration of required filed.

Link copied to clipboard

Enumerates the semantic color roles used throughout Fiori components for status and emphasis.

Link copied to clipboard

Fiori design system default configuration for state layers.

Link copied to clipboard

The FioriTestTagsBuilder is an abstract class designed to build instances of a concrete subclass of the FioriBaseTestTags.

Link copied to clipboard

Default values for ValidationMessage components.

Link copied to clipboard

Used to specify the alignment of a layout's children, in cross axis direction.

Link copied to clipboard
Link copied to clipboard
sealed class Icon

A sealed class to make dealing with ImageVector and DrawableRes icons easier.

Link copied to clipboard

Enum for icon type.

Link copied to clipboard

Enum for shape of FioriImageThumbnail

Link copied to clipboard
data class ImageThumbnail(val imageShape: ImageShape = ImageShape.ROUNDEDCORNER, val imageType: Enum<ImageType>, val resId: Int? = null, val url: String? = null, val drawable: Drawable? = null, val imageDesc: String? = "", val painterBuilder: @Composable () -> Painter? = null)
Link copied to clipboard

Enum for ImageType in FioriImage.

Link copied to clipboard

Used to specify the alignment of a layout's children, in main axis direction.

Link copied to clipboard

A builder class to create Painter instance. Call PainterBuilder.build to build a Painter instance.

Link copied to clipboard
Link copied to clipboard

Used to specify how a layout chooses its own size when multiple behaviors are possible.

Link copied to clipboard
data class ValidationMessageData(var semanticType: SemanticType = SemanticType.None, var warningMessage: String? = null, var informationMessage: String? = null, var successMessage: String? = null, var warningIcon: FioriIcon? = FioriIcon( resId = com.sap.cloud.mobile.fiori.compose.R.drawable.ic_sap_icon_message_warning ), var informationIcon: FioriIcon? = FioriIcon( resId = com.sap.cloud.mobile.fiori.compose.R.drawable.ic_sap_icon_message_information ), var successIcon: FioriIcon? = FioriIcon( resId = com.sap.cloud.mobile.fiori.compose.R.drawable.ic_sap_icon_message_success ), var helperIcon: FioriIcon? = null, var helperText: String? = null, var errorIcon: FioriIcon? = FioriIcon( resId = com.sap.cloud.mobile.fiori.compose.R.drawable.ic_sap_icon_status_circle_outlined ), var errorMessage: String? = null) : Parcelable

Data class to hold the validation message data

Link copied to clipboard
data class WindowWidthSizeHorizontalPaddings(val compact: Dp = 16.dp, val medium: Dp = 24.dp, val expanded: Dp = 24.dp, val default: Dp = 0.dp)

Horizontal paddings defined for various window width sizes.

Properties

Link copied to clipboard

A semantics property key for representing a drawable resource ID.

Link copied to clipboard

Drawable resource id attached to this semantics node.

Link copied to clipboard

CompositionLocal that provides FioriLifecycleObserverManager through the composition tree. Allows components to access the lifecycle observer manager without explicit parameter passing.

Link copied to clipboard

The CompositionLocal to provide required field configuration FioriRequiredFieldConfig for Fiori Required Field.

Link copied to clipboard

CompositionLocal global object for horizontal padding based on window width sizes.

Functions

Link copied to clipboard
fun FioriDivider(padding: FioriDividerPadding = FioriDividerPadding.NONE, topPadding: Dp = 7.dp, bottomPadding: Dp = 8.dp, startPadding: Dp = 16.dp, endPadding: Dp = 16.dp, modifier: Modifier = Modifier)

Fiori Divider

Link copied to clipboard
fun FioriFlowRow(modifier: Modifier = Modifier, innerVerticalSpacing: Dp = 0.dp, body: @Composable FioriFlowRowScope.() -> Unit)
fun FioriFlowRow(verticalAlignment: Alignment.Vertical, modifier: Modifier = Modifier, innerVerticalSpacing: Dp = 0.dp, body: @Composable FioriFlowRowScope.() -> Unit)

A flow row layout that has following capabilities:

Link copied to clipboard
fun FioriHeader(text: String, modifier: Modifier = Modifier, isInCard: Boolean = false, textButton: FioriButtonContent? = null, iconButton: FioriIcon? = null, onClick: () -> Unit = {}, colors: FioriHeaderColors = FioriHeaderDefaults.colors(isDarkMode = isSystemInDarkTheme()), typography: FioriHeaderTypography = FioriHeaderDefaults.headerTypography(isInCard = isInCard))

Fiori Section Header

Link copied to clipboard
fun FioriHeaderForCard(modifier: Modifier = Modifier, text: String, colors: FioriHeaderColors = FioriHeaderDefaults.colors(isDarkMode = isSystemInDarkTheme()), typography: FioriHeaderTypography = FioriHeaderDefaults.headerTypography(isInCard = true))
Link copied to clipboard
fun FioriHeaderRegular(text: String, textButton: FioriButtonContent? = null, iconButton: FioriIcon? = null, onClick: () -> Unit = {}, colors: FioriHeaderColors = FioriHeaderDefaults.colors(isDarkMode = isSystemInDarkTheme()), typography: FioriHeaderTypography = FioriHeaderDefaults.headerTypography(isInCard = false), styles: FioriHeaderStyles = FioriHeaderDefaults.styles(), modifier: Modifier, isError: Boolean = false, contentDescription: String = "")
Link copied to clipboard
fun FioriHorizontalPagerIndicator(pagerState: PagerState, pageCount: Int, modifier: Modifier = Modifier, pageIndexMapping: (Int) -> Int = { it }, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorWidth: Dp = 8.dp, indicatorHeight: Dp = indicatorWidth, spacing: Dp = indicatorWidth, indicatorShape: Shape = CircleShape)

A horizontally laid out indicator for a HorizontalPager, representing the currently active page and total pages drawn using a Shape.

Link copied to clipboard
Link copied to clipboard
fun FioriProfileInitial(initial: String, modifier: Modifier = Modifier, size: Dp = 48.dp, color: Color = Color.Unspecified, textStyle: TextStyle = MaterialTheme.typography.subtitle1, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
Link copied to clipboard
fun FlowColumn(modifier: Modifier = Modifier, mainAxisSize: SizeMode = SizeMode.Wrap, mainAxisAlignment: FlowMainAxisAlignment = MainAxisAlignment.Start, mainAxisSpacing: Dp = 0.dp, crossAxisAlignment: FlowCrossAxisAlignment = FlowCrossAxisAlignment.Start, crossAxisSpacing: Dp = 0.dp, lastLineMainAxisAlignment: FlowMainAxisAlignment = mainAxisAlignment, content: @Composable () -> Unit)

A composable that places its children in a vertical flow. Unlike Column, if the vertical space is too small to put all the children in one column, multiple columns may be used.

Link copied to clipboard
fun FlowRow(modifier: Modifier = Modifier, mainAxisSize: SizeMode = SizeMode.Wrap, mainAxisAlignment: FlowMainAxisAlignment = MainAxisAlignment.Start, mainAxisSpacing: Dp = 0.dp, crossAxisAlignment: FlowCrossAxisAlignment = FlowCrossAxisAlignment.Start, crossAxisSpacing: Dp = 0.dp, lastLineMainAxisAlignment: FlowMainAxisAlignment = mainAxisAlignment, maxLines: Int = 2, content: @Composable () -> Unit)

A composable that places its children in a horizontal flow. Unlike Row, if the horizontal space is too small to put all the children in one row, multiple rows may be used.

Link copied to clipboard
fun Modifier.focusIndicatorBorder(borderColor: Color? = null, borderWidth: Dp = 2.dp, borderPadding: Dp = 2.dp, shape: Shape? = null): Modifier

Applies a focus indicator border to a composable when it gains focus.

fun Modifier.focusIndicatorBorder(isFocused: Boolean, borderColor: Color = MaterialTheme.fioriHorizonAttributes.SapFioriColorBorderSelected, borderWidth: Dp = 2.dp, borderPadding: Dp = 2.dp, shape: Shape? = null): Modifier

Applies a focus indicator border to a composable based on an explicit focus state.

Get the horizontal padding based on window width sizes.

Used when a color with an alpha value is rendered transparent and the requirement is to have an opaque color. It takes the theme's surface color and the alpha of the color passed into the account to return the appropriate color, which will be opaque.

Link copied to clipboard

Get the WindowSizeClass for the current activity.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Check whether the external keyboard is connected.

Link copied to clipboard

Determine if the screen orientation is Landscape. Return true when orientation is Landscape; return false when orientation is Portrait.

Link copied to clipboard

A utility function that determines the tablet or not base on the device's size. Can only be used in a Composable function.

Link copied to clipboard

Check whether Talkback is enabled.

Determine whether the window height size is compact and the window width size is medium or expanded. Usually refers to a device that is a phone in landscape mode.

Link copied to clipboard

A utility function that determines whether the window size(width and height) is medium or expanded. Usually refers to a tablet device. Can only be used in a Composable function.

Link copied to clipboard

Determine whether window width size is compact. Usually refers to a device that is a phone in portrait mode.

Link copied to clipboard
fun Modifier.maxWidth(@FloatRange(from = 0.0, to = 1.0) fraction: Float = 1.0f): Modifier

Set the maxWidth by fraction of constraints' maxWidth.

Link copied to clipboard
fun requiredFieldConfig(requiredFieldText: String = "*", requiredFieldColor: @Composable () -> Color = { MaterialTheme.fioriHorizonAttributes.SapFioriColorT2 }, errorRequiredFieldColor: @Composable () -> Color = { MaterialTheme.fioriHorizonAttributes.SapFioriColorSemanticNegative }, focusedRequiredFieldColor: @Composable () -> Color = { MaterialTheme.fioriHorizonAttributes.SapFioriColorT4 }, readOnlyRequiredFieldColor: @Composable () -> Color = { MaterialTheme.fioriHorizonAttributes.SapFioriColorT2 }, disabledRequiredFieldColor: @Composable () -> Color = { MaterialTheme.fioriHorizonAttributes.SapFioriColorT2 }, requiredFieldSpanStyle: SpanStyle? = null, requiredFieldPrefixText: String? = null, requiredFieldSuffixText: String? = null, isRequired: Boolean = false): FioriRequiredFieldConfig

The function should provide the ability to apply a specific style to the symbol for a 'required' field label through the Composition Local context LocalRequiredFieldConfiguration.

Link copied to clipboard
fun Modifier.searchInputFieldModifier(interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, hoverColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f), focusedColor: Color = Color.Unspecified, defaultBackgroundColor: Color = Color.Transparent, rippleColor: Color = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.1f), shape: Shape = RoundedCornerShape(30.dp)): Modifier

Fiori Modifier to setting status of hovered, pressed, focused.

Link copied to clipboard
fun View.startHapticFeedback(feedbackConstant: Int)

Helper for performing haptic feedback.

Link copied to clipboard
fun Modifier.stateLayer(interactionSource: InteractionSource, shape: Shape = RoundedCornerShape(8.dp), enabled: Boolean = true, rippleEnabled: Boolean = true, stateLayer: FioriStateLayerDefaults.FioriStateLayer = FioriStateLayerDefaults.stateLayer()): Modifier

Applies a state layer to a composable, providing visual feedback for interaction states such as pressed, hovered, focused, and dragged. The state layer is drawn above the component’s background but below its content or ripple.

Link copied to clipboard
fun String.toHslColor(saturation: Float = 0.5f, lightness: Float = 0.4f): Int