Package-level declarations

Types

Link copied to clipboard
data class UIAnimations(val visible: Boolean, val onEnter: EnterTransition, val onExit: ExitTransition)

Data class to use to animate a UI layout

Properties

Link copied to clipboard
private const val BLUE_PERCEPTION: Double = 0.114

BLUE_PERCEPTION the ratio of the blue perception from the color spectrum

Link copied to clipboard

currentActiveWritingMode the current active writing mode state in use, it allows to manage in automatically the disableWritingMode and the enableWritingMode mechanisms by the disableWritingModeOnTap or the disableWritingModeOnFocusGain methods

Link copied to clipboard

Default onValueChange to use in the EquinoxInputs components

Link copied to clipboard
private const val GREEN_PERCEPTION: Double = 0.587

GREEN_PERCEPTION the ratio of the green perception from the color spectrum

Link copied to clipboard
private const val RED_PERCEPTION: Double = 0.299

RED_PERCEPTION the ratio of the red perception from the color spectrum

Functions

Link copied to clipboard
fun ChameleonText(    text: String,     modifier: Modifier = Modifier,     fontSize: TextUnit = TextUnit.Unspecified,     fontStyle: FontStyle? = null,     fontWeight: FontWeight? = null,     fontFamily: FontFamily? = null,     letterSpacing: TextUnit = TextUnit.Unspecified,     textDecoration: TextDecoration? = null,     textAlign: TextAlign? = null,     lineHeight: TextUnit = TextUnit.Unspecified,     overflow: TextOverflow = TextOverflow.Clip,     softWrap: Boolean = true,     maxLines: Int = Int.MAX_VALUE,     minLines: Int = 1,     onTextLayout: (TextLayoutResult) -> Unit? = null,     style: TextStyle = LocalTextStyle.current,     backgroundColor: Color)
fun ChameleonText(    text: String,     modifier: Modifier = Modifier,     fontSize: TextUnit = TextUnit.Unspecified,     fontStyle: FontStyle? = null,     fontWeight: FontWeight? = null,     fontFamily: FontFamily? = null,     letterSpacing: TextUnit = TextUnit.Unspecified,     textDecoration: TextDecoration? = null,     textAlign: TextAlign? = null,     lineHeight: TextUnit = TextUnit.Unspecified,     overflow: TextOverflow = TextOverflow.Clip,     softWrap: Boolean = true,     maxLines: Int = Int.MAX_VALUE,     minLines: Int = 1,     onTextLayout: (TextLayoutResult) -> Unit? = null,     style: TextStyle = LocalTextStyle.current,     hexBackgroundColor: String)
fun ChameleonText(    text: StringResource,     modifier: Modifier = Modifier,     fontSize: TextUnit = TextUnit.Unspecified,     fontStyle: FontStyle? = null,     fontWeight: FontWeight? = null,     fontFamily: FontFamily? = null,     letterSpacing: TextUnit = TextUnit.Unspecified,     textDecoration: TextDecoration? = null,     textAlign: TextAlign? = null,     lineHeight: TextUnit = TextUnit.Unspecified,     overflow: TextOverflow = TextOverflow.Clip,     softWrap: Boolean = true,     maxLines: Int = Int.MAX_VALUE,     minLines: Int = 1,     onTextLayout: (TextLayoutResult) -> Unit? = null,     style: TextStyle = LocalTextStyle.current,     backgroundColor: Color)
fun ChameleonText(    text: StringResource,     modifier: Modifier = Modifier,     fontSize: TextUnit = TextUnit.Unspecified,     fontStyle: FontStyle? = null,     fontWeight: FontWeight? = null,     fontFamily: FontFamily? = null,     letterSpacing: TextUnit = TextUnit.Unspecified,     textDecoration: TextDecoration? = null,     textAlign: TextAlign? = null,     lineHeight: TextUnit = TextUnit.Unspecified,     overflow: TextOverflow = TextOverflow.Clip,     softWrap: Boolean = true,     maxLines: Int = Int.MAX_VALUE,     minLines: Int = 1,     onTextLayout: (TextLayoutResult) -> Unit? = null,     style: TextStyle = LocalTextStyle.current,     hexBackgroundColor: String)

Customization of the Text component to change the color of the text displayed dynamically based on the background color where the text is

Link copied to clipboard
private fun CustomDivider(modifier: Modifier = Modifier, thickness: Dp = DividerDefaults.Thickness, color: Color = DividerDefaults.color)

Custom divider to center the text message between two lines

Link copied to clipboard
fun DashedTile(    modifier: Modifier = Modifier,     strokeWidth: Float = 5.0f,     intervals: FloatArray = floatArrayOf(10f, 10f),     phase: Float = 0.0f,     size: Dp = 115.dp,     cornerRadius: Dp = 15.dp,     containerColor: Color = MaterialTheme.colorScheme.primary,     contentColor: Color = contentColorFor(containerColor),     elevation: Dp = 0.dp,     icon: ImageVector,     iconSize: Dp = 65.dp,     text: String,     fontWeight: FontWeight = FontWeight.Bold,     textStyle: TextStyle = TextStyle.Default.merge( color = contentColor, fontWeight = fontWeight ),     onClick: () -> Unit)
fun DashedTile(    modifier: Modifier = Modifier,     strokeWidth: Float = 5.0f,     intervals: FloatArray = floatArrayOf(10f, 10f),     phase: Float = 0.0f,     size: Dp = 115.dp,     cornerRadius: Dp = 15.dp,     containerColor: Color = MaterialTheme.colorScheme.primary,     contentColor: Color = contentColorFor(containerColor),     elevation: Dp = 0.dp,     icon: ImageVector,     iconSize: Dp = 65.dp,     text: StringResource,     fontWeight: FontWeight = FontWeight.Bold,     textStyle: TextStyle = TextStyle.Default.merge( color = contentColor, fontWeight = fontWeight ),     onClick: () -> Unit)

Tile component useful to execute action when clicked

Link copied to clipboard
fun DebouncedOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     debounceDelay: Long = 500,     debounce: suspend () -> Unit,     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: String? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: String? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: String? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)
fun DebouncedOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     debounceDelay: Long = 500,     debounce: suspend () -> Unit,     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: StringResource? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: StringResource? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: StringResource? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)

Custom implementation of a EquinoxOutlinedTextField with the debounce feature

Link copied to clipboard
fun DebouncedTextField(    modifier: Modifier = Modifier,     textFieldStyle: TextStyle = LocalTextStyle.current,     textFieldColors: TextFieldColors = TextFieldDefaults.colors(),     width: Dp = 280.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     debounceDelay: Long = 500,     debounce: suspend () -> Unit,     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: String? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: String? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: String? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     trailingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     visualTransformation: VisualTransformation = VisualTransformation.None,     singleLine: Boolean = false,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = TextFieldDefaults.shape)
fun DebouncedTextField(    modifier: Modifier = Modifier,     textFieldStyle: TextStyle = LocalTextStyle.current,     textFieldColors: TextFieldColors = TextFieldDefaults.colors(),     width: Dp = 280.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     debounceDelay: Long = 500,     debounce: suspend () -> Unit,     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: StringResource? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: StringResource? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: StringResource? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     trailingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     visualTransformation: VisualTransformation = VisualTransformation.None,     singleLine: Boolean = false,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = TextFieldDefaults.shape)

Custom implementation of a EquinoxTextField component with the debounce feature

Link copied to clipboard
private fun debounceRoutine(value: MutableState<String>, debounceDelay: Long = 500, debounce: suspend () -> Unit)
Link copied to clipboard

Method used to disable the currentActiveWritingMode

Link copied to clipboard

Extension Modifier function to apply to the components which have to manage the currentActiveWritingMode, this method allows to disable the writing mode when the component where this method is applied gains focus

Link copied to clipboard

Extension Modifier function to apply to the components which have to manage the currentActiveWritingMode, this method allows to disable the writing mode tapping any part of the component where this method is applied

Link copied to clipboard
fun EmptyListUI(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     animations: UIAnimations? = null,     textStyle: TextStyle = TextStyle.Default,     icon: ImageVector,     themeColor: Color = MaterialTheme.colorScheme.primary,     subText: String)
fun EmptyListUI(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     animations: UIAnimations? = null,     textStyle: TextStyle = TextStyle.Default,     icon: ImageVector,     themeColor: Color = MaterialTheme.colorScheme.primary,     subText: StringResource)

Method used to display a layout when a list of values is empty

Link copied to clipboard
private fun EmptyListUIContent(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     textStyle: TextStyle = TextStyle.Default,     icon: ImageVector,     themeColor: Color = MaterialTheme.colorScheme.primary,     subText: String)

Method used to display the content of the EmptyListUI

Link copied to clipboard
fun EmptyState(    animations: UIAnimations? = null,     containerModifier: Modifier = Modifier,     resourceModifier: Modifier = Modifier,     resourceSize: Dp = 200.dp,     resource: Painter,     contentDescription: String?,     title: String? = null,     titleStyle: TextStyle = TextStyle.Default,     subTitle: String? = null,     subTitleStyle: TextStyle = TextStyle.Default,     action: @Composable () -> Unit? = null)
fun EmptyState(    animations: UIAnimations? = null,     containerModifier: Modifier = Modifier,     resourceModifier: Modifier = Modifier,     resourceSize: Dp = 200.dp,     resource: ImageVector,     contentDescription: String?,     title: String? = null,     titleStyle: TextStyle = TextStyle.Default,     subTitle: String? = null,     subTitleStyle: TextStyle = TextStyle.Default,     action: @Composable () -> Unit? = null)
fun EmptyState(    animations: UIAnimations? = null,     containerModifier: Modifier = Modifier,     resourceModifier: Modifier = Modifier,     resourceSize: Dp = 200.dp,     resource: DrawableResource,     contentDescription: String?,     title: String? = null,     titleStyle: TextStyle = TextStyle.Default,     subTitle: String? = null,     subTitleStyle: TextStyle = TextStyle.Default,     action: @Composable () -> Unit? = null)

Container component useful to display a custom empty state graphics

Link copied to clipboard
private fun EmptyStateContent(    containerModifier: Modifier = Modifier,     resourceModifier: Modifier = Modifier,     resourceSize: Dp = 200.dp,     resource: Painter,     contentDescription: String?,     title: String? = null,     titleStyle: TextStyle = TextStyle.Default,     subTitle: String? = null,     subTitleStyle: TextStyle = TextStyle.Default,     action: @Composable () -> Unit? = null)

Content of the EmptyState component

Link copied to clipboard

Method used to enable the currentActiveWritingMode

Link copied to clipboard
fun EquinoxAlertDialog(    modifier: Modifier = Modifier,     shape: Shape = AlertDialogDefaults.shape,     containerColor: Color = AlertDialogDefaults.containerColor,     iconContentColor: Color = AlertDialogDefaults.iconContentColor,     titleContentColor: Color = AlertDialogDefaults.titleContentColor,     textContentColor: Color = AlertDialogDefaults.textContentColor,     tonalElevation: Dp = AlertDialogDefaults.TonalElevation,     properties: DialogProperties = DialogProperties(),     titleModifier: Modifier = Modifier,     titleStyle: TextStyle = TextStyle.Default,     show: MutableState<Boolean>,     icon: ImageVector? = null,     viewModel: EquinoxViewModel? = null,     onDismissAction: () -> Unit = { show.value = false viewModel?.restartRetriever() },     title: String,     text: @Composable () -> Unit,     dismissAction: () -> Unit = onDismissAction,     dismissText: String?,     dismissTextStyle: TextStyle = TextStyle.Default,     confirmAction: () -> Unit,     confirmText: String,     confirmTextStyle: TextStyle = TextStyle.Default)
fun EquinoxAlertDialog(    modifier: Modifier = Modifier,     shape: Shape = AlertDialogDefaults.shape,     containerColor: Color = AlertDialogDefaults.containerColor,     iconContentColor: Color = AlertDialogDefaults.iconContentColor,     titleContentColor: Color = AlertDialogDefaults.titleContentColor,     textContentColor: Color = AlertDialogDefaults.textContentColor,     tonalElevation: Dp = AlertDialogDefaults.TonalElevation,     properties: DialogProperties = DialogProperties(),     titleModifier: Modifier = Modifier,     titleStyle: TextStyle = TextStyle.Default,     show: MutableState<Boolean>,     icon: ImageVector? = null,     viewModel: EquinoxViewModel? = null,     onDismissAction: () -> Unit = { show.value = false viewModel?.restartRetriever() },     title: String,     text: String,     dismissAction: () -> Unit = onDismissAction,     dismissText: String?,     dismissTextStyle: TextStyle = TextStyle.Default,     confirmAction: () -> Unit,     confirmText: String,     confirmTextStyle: TextStyle = TextStyle.Default)
fun EquinoxAlertDialog(    modifier: Modifier = Modifier,     shape: Shape = AlertDialogDefaults.shape,     containerColor: Color = AlertDialogDefaults.containerColor,     iconContentColor: Color = AlertDialogDefaults.iconContentColor,     titleContentColor: Color = AlertDialogDefaults.titleContentColor,     textContentColor: Color = AlertDialogDefaults.textContentColor,     tonalElevation: Dp = AlertDialogDefaults.TonalElevation,     properties: DialogProperties = DialogProperties(),     titleModifier: Modifier = Modifier,     titleStyle: TextStyle = TextStyle.Default,     show: MutableState<Boolean>,     icon: ImageVector? = null,     viewModel: EquinoxViewModel? = null,     onDismissAction: () -> Unit = { show.value = false viewModel?.restartRetriever() },     title: StringResource,     text: @Composable () -> Unit,     dismissAction: () -> Unit = onDismissAction,     dismissText: StringResource? = Res.string.dismiss,     dismissTextStyle: TextStyle = TextStyle.Default,     confirmAction: () -> Unit,     confirmText: StringResource = Res.string.confirm,     confirmTextStyle: TextStyle = TextStyle.Default)
fun EquinoxAlertDialog(    modifier: Modifier = Modifier,     shape: Shape = AlertDialogDefaults.shape,     containerColor: Color = AlertDialogDefaults.containerColor,     iconContentColor: Color = AlertDialogDefaults.iconContentColor,     titleContentColor: Color = AlertDialogDefaults.titleContentColor,     textContentColor: Color = AlertDialogDefaults.textContentColor,     tonalElevation: Dp = AlertDialogDefaults.TonalElevation,     properties: DialogProperties = DialogProperties(),     titleModifier: Modifier = Modifier,     titleStyle: TextStyle = TextStyle.Default,     show: MutableState<Boolean>,     icon: ImageVector? = null,     viewModel: EquinoxViewModel? = null,     onDismissAction: () -> Unit = { show.value = false viewModel?.restartRetriever() },     title: StringResource,     text: StringResource,     dismissAction: () -> Unit = onDismissAction,     dismissText: StringResource? = Res.string.dismiss,     dismissTextStyle: TextStyle = TextStyle.Default,     confirmAction: () -> Unit,     confirmText: StringResource = Res.string.confirm,     confirmTextStyle: TextStyle = TextStyle.Default)

Method used to display a custom AlertDialog

Link copied to clipboard
fun EquinoxDialog(    show: MutableState<Boolean>,     viewModel: EquinoxViewModel? = null,     dialogProperties: DialogProperties = DialogProperties(),     onDismissRequest: () -> Unit = { show.value = false viewModel?.restartRetriever() },     dialogContent: @Composable () -> Unit)

Simply Dialog wrapper to attach the EquinoxViewModel's logic

Link copied to clipboard
fun EquinoxOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: String? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: String? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: String? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)
fun EquinoxOutlinedTextField(    modifier: Modifier = Modifier,     outlinedTextFieldStyle: TextStyle = LocalTextStyle.current,     outlinedTextFieldColors: TextFieldColors = OutlinedTextFieldDefaults.colors(),     width: Dp = 300.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: StringResource? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: StringResource? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: StringResource? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     trailingIcon: @Composable () -> Unit? = { IconButton( onClick = { value.value = "" } ) { Icon( imageVector = Icons.Default.Clear, contentDescription = null ) } },     visualTransformation: VisualTransformation = VisualTransformation.None,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = OutlinedTextFieldDefaults.shape)

Custom implementation of a OutlinedTextField

Link copied to clipboard
fun EquinoxTextField(    modifier: Modifier = Modifier,     textFieldStyle: TextStyle = LocalTextStyle.current,     textFieldColors: TextFieldColors = TextFieldDefaults.colors(),     width: Dp = 280.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: String? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: String? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: String? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     trailingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     visualTransformation: VisualTransformation = VisualTransformation.None,     singleLine: Boolean = false,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = TextFieldDefaults.shape)
fun EquinoxTextField(    modifier: Modifier = Modifier,     textFieldStyle: TextStyle = LocalTextStyle.current,     textFieldColors: TextFieldColors = TextFieldDefaults.colors(),     width: Dp = 280.dp,     value: MutableState<String>,     mustBeInLowerCase: Boolean = false,     allowsBlankSpaces: Boolean = true,     maxLines: Int = 1,     validator: (String) -> Boolean? = null,     isError: MutableState<Boolean> = remember { mutableStateOf(false) },     onValueChange: (String) -> Unit = { defaultOnValueChange(validator, isError, value, mustBeInLowerCase, allowsBlankSpaces, it) },     label: StringResource? = null,     labelStyle: TextStyle = LocalTextStyle.current,     placeholder: StringResource? = null,     placeholderStyle: TextStyle = LocalTextStyle.current,     errorText: StringResource? = null,     errorTextStyle: TextStyle = LocalTextStyle.current,     keyboardOptions: KeyboardOptions = KeyboardOptions.Default,     keyboardActions: KeyboardActions = KeyboardActions.Default,     enabled: Boolean = true,     readOnly: Boolean = false,     leadingIcon: @Composable () -> Unit? = null,     trailingIcon: @Composable () -> Unit? = null,     prefix: @Composable () -> Unit? = null,     suffix: @Composable () -> Unit? = null,     supportingText: @Composable () -> Unit? = null,     visualTransformation: VisualTransformation = VisualTransformation.None,     singleLine: Boolean = false,     minLines: Int = 1,     interactionSource: MutableInteractionSource? = null,     shape: Shape = TextFieldDefaults.shape)

Custom implementation of a TextField component

Link copied to clipboard
fun ErrorUI(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     animations: UIAnimations? = null,     textStyle: TextStyle = TextStyle.Default,     backgroundColor: Color = MaterialTheme.colorScheme.background,     errorIcon: ImageVector = Icons.Default.Error,     errorColor: Color = MaterialTheme.colorScheme.error,     errorMessage: String,     retryAction: @Composable () -> Unit? = null,     retryText: String? = null)

Method used to display the layout when an error occurred

fun ErrorUI(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     animations: UIAnimations? = null,     textStyle: TextStyle = TextStyle.Default,     backgroundColor: Color = MaterialTheme.colorScheme.background,     errorIcon: ImageVector = Icons.Default.Error,     errorColor: Color = MaterialTheme.colorScheme.error,     errorMessage: StringResource = Res.string.an_error_occurred,     retryAction: @Composable () -> Unit? = null,     retryText: StringResource? = Res.string.retry)

Method used to display a layout when an error occurred

Link copied to clipboard
private fun ErrorUIContent(    containerModifier: Modifier = Modifier,     imageModifier: Modifier = Modifier,     textStyle: TextStyle = TextStyle.Default,     backgroundColor: Color = MaterialTheme.colorScheme.background,     errorIcon: ImageVector = Icons.Default.Error,     errorColor: Color = MaterialTheme.colorScheme.error,     errorMessage: String,     retryAction: @Composable () -> Unit? = null,     retryText: String? = null)

Method used to display the content of the ErrorUI layout

Link copied to clipboard
fun ExpandableText(    containerModifier: Modifier = Modifier,     textModifier: Modifier = Modifier,     textStyle: TextStyle = TextStyle.Default,     text: String,     maxLines: Int = 5,     expandedMaxLines: Int = Int.MAX_VALUE,     overflow: TextOverflow = TextOverflow.Ellipsis,     iconSize: Dp = 30.dp,     expandedIcon: ImageVector = Outlined.ArrowCircleUp,     collapsedIcon: ImageVector = Outlined.ArrowCircleDown)
fun ExpandableText(    containerModifier: Modifier = Modifier,     textModifier: Modifier = Modifier,     textStyle: TextStyle = TextStyle.Default,     text: StringResource,     maxLines: Int = 5,     expandedMaxLines: Int = Int.MAX_VALUE,     overflow: TextOverflow = TextOverflow.Ellipsis,     iconSize: Dp = 30.dp,     expandedIcon: ImageVector = Outlined.ArrowCircleUp,     collapsedIcon: ImageVector = Outlined.ArrowCircleDown)

Component to dynamically display a long text initially collapsed

Link copied to clipboard
fun getContrastColor(backgroundColor: Color): Color

Method used to get the color to use on a specified backgroundColor based on its luminance

Link copied to clipboard
fun LoadingItemUI(    containerModifier: Modifier = Modifier,     animations: UIAnimations? = null,     textStyle: TextStyle = TextStyle.Default,     loadingRoutine: suspend () -> Boolean,     initialDelay: Long? = null,     contentLoaded: @Composable () -> Unit,     themeColor: Color = MaterialTheme.colorScheme.primary,     loadingIndicator: @Composable () -> Unit = { Surface { Column( modifier = containerModifier .fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center ) { CircularProgressIndicator( modifier = Modifier .size(85.dp), strokeWidth = 8.dp ) Text( modifier = Modifier .padding( top = 16.dp ), style = textStyle, text = stringResource(Res.string.loading_data), color = themeColor ) } } })

Method used to display a layout when a list of values is empty

Link copied to clipboard
private fun LoadingItemUIContent(    loadingRoutine: suspend () -> Boolean,     initialDelay: Long?,     loadingIndicator: @Composable () -> Unit,     contentLoaded: @Composable () -> Unit)

Method used to display the content of the EmptyListUI

Link copied to clipboard
fun TextDivider(containerModifier: Modifier = Modifier, textModifier: Modifier = Modifier, fillMaxWidth: Boolean = true, thickness: Dp = DividerDefaults.Thickness, dividerColor: Color = DividerDefaults.color, text: String, textStyle: TextStyle = TextStyle.Default)
fun TextDivider(containerModifier: Modifier = Modifier, textModifier: Modifier = Modifier, fillMaxWidth: Boolean = true, thickness: Dp = DividerDefaults.Thickness, dividerColor: Color = DividerDefaults.color, text: StringResource, textStyle: TextStyle = TextStyle.Default)

Component to divide sections by a representative text

Link copied to clipboard
fun Tile(    modifier: Modifier = Modifier,     size: Dp = 115.dp,     shape: Shape = RoundedCornerShape( size = 15.dp ),     containerColor: Color = MaterialTheme.colorScheme.primary,     contentColor: Color = contentColorFor(containerColor),     elevation: Dp = 3.dp,     icon: ImageVector,     iconSize: Dp = 65.dp,     text: String,     fontWeight: FontWeight = FontWeight.Bold,     textStyle: TextStyle = TextStyle.Default.merge( color = contentColor, fontWeight = fontWeight ),     onClick: () -> Unit)
fun Tile(    modifier: Modifier = Modifier,     size: Dp = 115.dp,     shape: Shape = RoundedCornerShape( size = 15.dp ),     containerColor: Color = MaterialTheme.colorScheme.primary,     contentColor: Color = contentColorFor(containerColor),     elevation: Dp = 3.dp,     icon: ImageVector,     iconSize: Dp = 65.dp,     text: StringResource,     fontWeight: FontWeight = FontWeight.Bold,     textStyle: TextStyle = TextStyle.Default.merge( color = contentColor, fontWeight = fontWeight ),     onClick: () -> Unit)

Tile component useful to execute action when clicked

Link copied to clipboard
fun WriteableText(    isInWritingMode: MutableState<Boolean>,     writableModifier: Modifier = Modifier,     writeableTextColors: TextFieldColors = TextFieldDefaults.colors( unfocusedContainerColor = MaterialTheme.colorScheme.primary, focusedContainerColor = MaterialTheme.colorScheme.primary, focusedIndicatorColor = MaterialTheme.colorScheme.inversePrimary, unfocusedIndicatorColor = MaterialTheme.colorScheme.primary, cursorColor = MaterialTheme.colorScheme.inversePrimary, focusedTextColor = Color.White, unfocusedTextColor = Color.White ),     writeableTextWidth: Dp = 280.dp,     writeableText: MutableState<String>,     writeableTextStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     onWriting: (String) -> Unit = { writeableText.value = it },     placeholder: String,     placeholderStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     displayedTextModifier: Modifier = Modifier,     displayedText: String = writeableText.value,     displayedTextStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     changeEditModeClickingOnSimpleText: Boolean = true)
fun WriteableText(    isInWritingMode: MutableState<Boolean>,     writableModifier: Modifier = Modifier,     writeableTextColors: TextFieldColors = TextFieldDefaults.colors( unfocusedContainerColor = MaterialTheme.colorScheme.primary, focusedContainerColor = MaterialTheme.colorScheme.primary, focusedIndicatorColor = MaterialTheme.colorScheme.inversePrimary, unfocusedIndicatorColor = MaterialTheme.colorScheme.primary, cursorColor = MaterialTheme.colorScheme.inversePrimary, focusedTextColor = Color.White, unfocusedTextColor = Color.White ),     writeableTextWidth: Dp = 280.dp,     writeableText: MutableState<String>,     writeableTextStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     onWriting: (String) -> Unit = { writeableText.value = it },     placeholder: StringResource,     placeholderStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     displayedTextModifier: Modifier = Modifier,     displayedText: String = writeableText.value,     displayedTextStyle: TextStyle = LocalTextStyle.current.merge( fontSize = 20.sp ),     changeEditModeClickingOnSimpleText: Boolean = true)

This component allows to display a text or writing a new one clicking on it or using the enableWritingMode method programmatically