Kit > healthstack.kit.ui

Package healthstack.kit.ui

Types

Name Summary
BottomNavItem

[androidJvm]
data class BottomNavItem(val title: String, val icon: ImageVector, val onClick: () -> Unit = { })

ButtonShape

[androidJvm]
enum ButtonShape : Enum<ButtonShape>

DropdownMenuItemData

[androidJvm]
data class DropdownMenuItemData(val text: String, val icon: ImageVector, val onClick: () -> Unit)

HyperLinkAction

[androidJvm]
enum HyperLinkAction : Enum<HyperLinkAction>

InsightUnit

[androidJvm]
data class InsightUnit(val value: String, val unit: String? = null, val color: Color? = null)

TabContent

[androidJvm]
data class TabContent(val title: String, val Render: @Composable() -> Unit = { Text(title) })

TextType

[androidJvm]
enum TextType : Enum<TextType>

Functions

Name Summary
addCommaToInt

[androidJvm]
fun addCommaToInt(input: Int): String

AlertPopup

[androidJvm]
@Composable
fun AlertPopup(initiateText: String?, title: String, body: String, confirmText: String, dismissText: String?, onDismissRequest: () -> Unit = {}, onConfirmClicked: () -> Unit = {})

BottomBar

[androidJvm]
@Composable
fun BottomBar(text: String, buttonEnabled: Boolean = true, shape: ButtonShape = SQUARE, onClick: () -> Unit)
@Composable
fun BottomBar(leftButtonText: String, rightButtonText: String, onClickLeftButton: () -> Unit, onClickRightButton: () -> Unit, leftButtonEnabled: Boolean = true, rightButtonEnabled: Boolean = true)

BottomBarNavigation

[androidJvm]
@Composable
fun BottomBarNavigation(items: List<BottomNavItem>, initial: Int = 0)

BottomBarNavigationPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun BottomBarNavigationPreview()

BottomBarWithGradientBackground

[androidJvm]
@Composable
fun BottomBarWithGradientBackground(text: String, buttonEnabled: Boolean = true, gradientBrush: Brush = Brush.verticalGradient( 0.0f to Color(0x00000000), 0.5f to AppTheme.colors.background, startY = 0.0f, endY = 100.0f ), shape: ButtonShape = SQUARE, onClick: () -> Unit)

BottomRoundButton

[androidJvm]
@Composable
fun BottomRoundButton(text: String = "Dummy name", enabled: Boolean = true, onClick: () -> Unit)

BottomRoundButtonPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun BottomRoundButtonPreview()

BottomSquareButton

[androidJvm]
@Composable
fun BottomSquareButton(text: String = "Dummy name", enabled: Boolean = true, onClick: () -> Unit)

BottomSquareButtonPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun BottomSquareButtonPreview()

CalendarModalInitiator

[androidJvm]
@Composable
fun CalendarModalInitiator(title: String, placeholder: String, dateFormat: DateFormat = SimpleDateFormat("dd / MM / yyyy", Locale.US), updateValue: (String) -> Unit)

ChoiceModal

[androidJvm]
@Composable
fun ChoiceModal(title: String, values: List<String>, changeValue: (String) -> Unit, state: ModalBottomSheetState)

CircularTimer

[androidJvm]
@Composable
fun CircularTimer(modifier: Modifier = Modifier, color: Color = AppTheme.colors.primary, strokeWidth: Dp = 24.dp, timeSeconds: Long = 10, interactionType: InteractionType = InteractionType.NOTHING, callback: () -> Unit = {})

CircularTimerPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun CircularTimerPreview()

ConsentTopBarPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun ConsentTopBarPreview()

ConsentTopBarPreview2

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun ConsentTopBarPreview2()

ConsentTopBarPreview3

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun ConsentTopBarPreview3()

DialCard

[androidJvm]
@Composable
fun DialCard(@DrawableResdrawableId: Int, title: String, description: String, dial: String)

EducationCard

[androidJvm]
@Composable
fun EducationCard(type: String, title: String, description: String, previewContent: @Composable() -> Unit, onClick: () -> Unit = { })

ExerciseCard

[androidJvm]
@Composable
fun ExerciseCard(title: String, values: List<String>)

HealthDataStatusCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun HealthDataStatusCardPreview()

HealthDataStatusRow

[androidJvm]
@Composable
fun HealthDataStatusRow(@DrawableResdrawableId: Int, value: String, unit: String = "")

HorizontalTab

[androidJvm]
@Composable
fun HorizontalTab(tabContents: List<TabContent>)

HorizontalTabPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun HorizontalTabPreview()

HyperLinkText

[androidJvm]
@Composable
fun HyperLinkText(text: String, meta: String, action: HyperLinkAction = WEB)
When clicked, it performs a specific action.

IconCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun IconCardPreview()

InsightCard

[androidJvm]
@Composable
fun InsightCard(title: String, lastUpdatedTime: LocalDateTime, insightUnits: List<InsightUnit>? = null, onClick: () -> Unit = { })

InsightCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardPreview()

InsightCardPreview2

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardPreview2()

InsightCardPreview3

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardPreview3()

InsightCardPreview4

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardPreview4()

InsightCardWithProgress

[androidJvm]
@Composable
fun InsightCardWithProgress(title: String, current: Int, total: Int, unit: String, onClick: () -> Unit = { })

InsightCardWithProgressPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardWithProgressPreview()

InsightCardWithProgressPreview2

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun InsightCardWithProgressPreview2()

KitButton

[androidJvm]
@Composable
fun KitButton(text: String = "", buttonColor: Color = AppTheme.colors.primary, textColor: Color = AppTheme.colors.surface, shape: RoundedCornerShape = RoundedCornerShape( MaterialTheme.shapes.small.topStart, MaterialTheme.shapes.small.topEnd, MaterialTheme.shapes.small.bottomEnd, MaterialTheme.shapes.small.bottomStart, ), border: BorderStroke? = null, modifier: Modifier = Modifier .height(44.dp) .fillMaxWidth(), enabled: Boolean = true, onClick: () -> Unit)

KitDatePickerDialog

[androidJvm]
@Composable
fun KitDatePickerDialog(context: Context, dateFormat: DateFormat, changeValue: (String) -> Unit): DatePickerDialog

KitTimePickerDialog

[androidJvm]
@Composable
fun KitTimePickerDialog(context: Context, initialHour: Int = 12, initialMinute: Int = 0, changeValue: (String) -> Unit): TimePickerDialog

LabeledCheckbox

[androidJvm]
@Composable
fun LabeledCheckbox(isChecked: Boolean, onCheckedChange: (Boolean) -> Unit, labelText: String)

LabeledCheckBoxCheckedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun LabeledCheckBoxCheckedPreview()

LabeledCheckBoxUnCheckedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun LabeledCheckBoxUnCheckedPreview()

ListedText

[androidJvm]
@Composable
fun ListedText(bodies: List<String>, type: TextType = PARAGRAPH, horizontalPadding: Dp = 24.dp, fontStyle: TextStyle = AppTheme.typography.body1, fontColor: Color = AppTheme.colors.onSurface, textAlign: TextAlign = TextAlign.Center)

ListedTextBulletPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun ListedTextBulletPreview()

ListedTextNumberPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun ListedTextNumberPreview()

ListedTextPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun ListedTextPreview()

MinuteTextTimer

[androidJvm]
@Composable
fun MinuteTextTimer(timeSeconds: Int = 10, onTimeout: () -> Unit = {})

MinuteTimerPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun MinuteTimerPreview()

ModalInitiator

[androidJvm]
@Composable
fun ModalInitiator(id: String, title: String, placeholder: String, state: ModalBottomSheetState, selectedValue: MutableState<String>, changeModal: (String) -> Unit)

PdfViewCard

[androidJvm]
@Composable
fun PdfViewCard(type: String, title: String, buttonText: String = "View PDF", filePath: String, drawableId: Int)

PlainText

[androidJvm]
@Composable
fun PlainText(header: String, body: String, article: @Composable() -> Unit? = null)

PlainText2Preview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun PlainText2Preview()

PlainTextPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun PlainTextPreview()

RoundButton

[androidJvm]
@Composable
fun RoundButton(text: String = "", buttonColor: Color = AppTheme.colors.primary, textColor: Color = AppTheme.colors.surface, border: BorderStroke? = null, modifier: Modifier = Modifier .height(44.dp) .fillMaxWidth(), radius: Dp = 4.dp, enabled: Boolean = true, onClick: () -> Unit)

RoundTextBoxWithIcon

[androidJvm]
@Composable
fun RoundTextBoxWithIcon(label: String = "", modifier: Modifier = Modifier, value: String, placeholder: String = "Select", enabled: Boolean = true, icon: ImageVector = Icons.Filled.AccessTimeFilled, onClick: () -> Unit = { })

RoundTextBoxWithIconPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun RoundTextBoxWithIconPreview()

RoundTextBoxWithIconPreview2

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun RoundTextBoxWithIconPreview2()

RoundTextBoxWithIconPreview3

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun RoundTextBoxWithIconPreview3()

RoundTextField

[androidJvm]
@Composable
fun RoundTextField(modifier: Modifier = Modifier, value: String, onValueChange: (String) -> Unit, placeholder: String = "", colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors( textColor = AppTheme.colors.onSurface, backgroundColor = AppTheme.colors.surface, disabledTextColor = AppTheme.colors.onSurface.copy(0.38F), cursorColor = AppTheme.colors.primary, focusedBorderColor = AppTheme.colors.primary, unfocusedBorderColor = Color.Transparent, ), shouldMask: Boolean = false)

RoundTextFieldMaskedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun RoundTextFieldMaskedPreview()

RoundTextFieldUnMaskedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun RoundTextFieldUnMaskedPreview()

SdkCard

[androidJvm]
@Composable
fun SdkCard(modifier: Modifier = Modifier, shape: Shape = RectangleShape, color: Color = AppTheme.colors.surface, contentColor: Color = AppTheme.colors.primary, border: BorderStroke? = null, elevation: Dp = 0.dp, content: @Composable() -> Unit = {})

SquareButton

[androidJvm]
@Composable
fun SquareButton(text: String = "", buttonColor: Color = AppTheme.colors.primary, textColor: Color = AppTheme.colors.surface, border: BorderStroke? = null, modifier: Modifier = Modifier .height(44.dp) .fillMaxWidth(), enabled: Boolean = true, onClick: () -> Unit)

SquareTextField

[androidJvm]
@Composable
fun SquareTextField(modifier: Modifier = Modifier, value: String, onValueChange: (String) -> Unit, placeholder: String = "", colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors( textColor = AppTheme.colors.onSurface, backgroundColor = AppTheme.colors.surface, disabledTextColor = AppTheme.colors.onSurface.copy(0.38F), cursorColor = AppTheme.colors.primary, focusedBorderColor = AppTheme.colors.primary, unfocusedBorderColor = Color.Transparent, ), shouldMask: Boolean = false)

SquareTextFieldMaskedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun SquareTextFieldMaskedPreview()

SquareTextFieldUnMaskedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun SquareTextFieldUnMaskedPreview()

StatusCard

[androidJvm]
@Composable
fun StatusCard(@DrawableResdrawableId: Int, value: String, unit: String = "")

StatusCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun StatusCardPreview()

TaskCard

[androidJvm]
@Composable
fun TaskCard(@DrawableResid: Int = R.drawable.ic_task, taskName: String, description: String, isActive: Boolean = true, buttonText: String? = null, isCompleted: Boolean = false, onClick: () -> Unit = { })

TaskCardCompleted1Preview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun TaskCardCompleted1Preview()

TaskCardCompletedPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun TaskCardCompletedPreview()

TaskCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun TaskCardPreview()

TaskCardPreview1

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun TaskCardPreview1()

TaskStatus

[androidJvm]
@Composable
fun TaskStatus(@DrawableResdrawableId: Int, value: String, unit: String = "")

TaskStatusCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun TaskStatusCardPreview()

ThinInsightCard

[androidJvm]
@Composable
fun ThinInsightCard(title: String, insightUnit: InsightUnit)

ThinInsightCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun ThinInsightCardPreview()

TimePickerInitiator

[androidJvm]
@Composable
fun TimePickerInitiator(title: String, placeholder: String, updateValue: (String) -> Unit)

ToggleSwitch

[androidJvm]
@Composable
fun ToggleSwitch(text: String, initialState: Boolean, changeState: (Boolean) -> Unit = {})

ToggleSwitchPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun ToggleSwitchPreview()

ToggleSwitchPreview2

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true, device = "id:Nexus 5")
@Composable
fun ToggleSwitchPreview2()

TopBar

[androidJvm]
@Composable
fun TopBar(title: String = "", color: Color = AppTheme.colors.onSurface, onClickBack: () -> Unit? = null)
@Composable
fun TopBar(title: String = "", color: Color = AppTheme.colors.onSurface, onClickBack: () -> Unit?, actionIcon: ImageVector = Icons.Default.MoreVert, onClickAction: () -> Unit)

TopBarWithDropDown

[androidJvm]
@Composable
fun TopBarWithDropDown(title: String = "", style: TextStyle = AppTheme.typography.subtitle1, color: Color = AppTheme.colors.onSurface, items: List<DropdownMenuItemData>)

Waveform

[androidJvm]
@Composable
fun Waveform(modifier: Modifier = Modifier, spikeColor: Color = AppTheme.colors.primary, spikeWidth: Dp = 1.dp, spikePadding: Dp = 1.dp, axisColor: Color = AppTheme.colors.primaryVariant, axisHeight: Dp = 2.dp, amplitudes: MutableList<Int> = mutableListOf(), move: Boolean = false)

WeeklyCard

[androidJvm]
@Composable
fun WeeklyCard(targetDay: LocalDate, modifier: Modifier = Modifier .fillMaxWidth() .height(71.dp))

WeeklyCardPreview

[androidJvm]
@PreviewGenerated
@Preview(showBackground = true)
@Composable
fun WeeklyCardPreview()