Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
1184ff7
feat(ui): components interfaces
comfrt1k Jan 9, 2026
1265115
feat(common): storybook resources
comfrt1k Jan 9, 2026
b3d1916
feat(app): storybook sidebar
comfrt1k Jan 9, 2026
b8ddfe8
feat(app): storybook component
comfrt1k Jan 9, 2026
c54afd8
refactor(common): extract storybook to separate module
comfrt1k Jan 9, 2026
08ab910
refactor(storybook): module structure
comfrt1k Jan 9, 2026
5820544
feat(theme): button component
comfrt1k Jan 9, 2026
d66e606
feat(common): storybook resources
comfrt1k Jan 9, 2026
2680693
feat(app): storybook sidebar
comfrt1k Jan 9, 2026
ab697e4
feat(app): storybook component
comfrt1k Jan 9, 2026
a01e1dc
refactor(common): extract storybook to separate module
comfrt1k Jan 9, 2026
11b4d5c
refactor(storybook): module structure
comfrt1k Jan 9, 2026
82fac57
Merge branch 'feat/theme' into feat/components-part1
comfrt1k Jan 9, 2026
23d8f2d
refactor(button): state as enum
comfrt1k Jan 9, 2026
415356a
refactor(button): appearance colors
comfrt1k Jan 9, 2026
4f64103
feat(button): story
comfrt1k Jan 9, 2026
88ac576
feat(theme): spacers
comfrt1k Jan 9, 2026
ce06810
chore(theme): remove unused elevation
comfrt1k Jan 9, 2026
7d81277
chore(theme): none border stroke
comfrt1k Jan 9, 2026
858508f
feat(button): styles
comfrt1k Jan 9, 2026
4ee53d9
feat(ui): card component with styles
comfrt1k Jan 10, 2026
6f5b8d3
feat(ui): avatar styles
comfrt1k Jan 10, 2026
c85acc4
feat(ui): avatar component
comfrt1k Jan 10, 2026
a5ee798
feat(ui): checkbox styles
comfrt1k Jan 10, 2026
2b2e863
feat(ui): checkbox state
comfrt1k Jan 10, 2026
97d3091
feat(ui): checkbox component with story
comfrt1k Jan 10, 2026
3673050
feat(ui): divider styles
comfrt1k Jan 10, 2026
234b4e4
feat(ui): divider components
comfrt1k Jan 10, 2026
142f51b
refactor(ui): border token
comfrt1k Jan 10, 2026
38f3193
feat(ui): weight token
comfrt1k Jan 10, 2026
1f46487
feat(ui): icon primitive
comfrt1k Jan 10, 2026
c7ac81b
feat(ui): image components
comfrt1k Jan 10, 2026
3bd2482
feat(ui): link components
comfrt1k Jan 10, 2026
eaef57b
feat(ui): text component
comfrt1k Jan 10, 2026
d04a833
feat(theme): checkbox and image sizes
comfrt1k Jan 10, 2026
bc06816
feat(common): ktor engine deps
comfrt1k Jan 10, 2026
ee9b93f
refactor(common): use theme transparent color
comfrt1k Jan 12, 2026
5644f2a
chore(sample): new components story usage
comfrt1k Jan 12, 2026
306cc8c
Merge branch 'master' into feat/components-part1
comfrt1k Jan 12, 2026
438c709
feat(ui): input styles
comfrt1k Jan 12, 2026
0d651ef
feat(ui): input locals
comfrt1k Jan 12, 2026
25c5786
feat(ui): input component
comfrt1k Jan 12, 2026
4fa29c2
feat(theme): alpha tokens
comfrt1k Jan 12, 2026
2a026a3
feat(ui): switch styles
comfrt1k Jan 12, 2026
3888d58
feat(ui): switch component
comfrt1k Jan 12, 2026
44202f0
feat(ui): column layouts
comfrt1k Jan 12, 2026
c4b5734
feat(ui): grid layout
comfrt1k Jan 12, 2026
43b1966
feat(ui): row layout
comfrt1k Jan 12, 2026
e2a437e
feat(ui): date picker week days
comfrt1k Jan 13, 2026
f0c73fd
feat(ui): calendar header component
comfrt1k Jan 13, 2026
0bdfe49
feat(ui): date picker day component
comfrt1k Jan 13, 2026
202bf44
chore(theme): aspect square util
comfrt1k Jan 13, 2026
9987ce9
chore(theme): icon sizes
comfrt1k Jan 13, 2026
7e9c5ce
feat(ui): date picker components
comfrt1k Jan 13, 2026
12d5782
feat(ui): date picker fragment
comfrt1k Jan 13, 2026
be56069
feat(ui): date picker model
comfrt1k Jan 13, 2026
27c19d8
feat(ui): date utils
comfrt1k Jan 13, 2026
22f485a
chore(ui): date picker constants
comfrt1k Jan 13, 2026
b49d542
feat(ui): date picker styles
comfrt1k Jan 13, 2026
6b25b13
feat(ui): chevron icons
comfrt1k Jan 13, 2026
278ef5f
feat(theme): draghandle sizes
comfrt1k Jan 13, 2026
210881a
chore(theme): new elevation token
comfrt1k Jan 13, 2026
e681594
refactor(ui): rename divider files
comfrt1k Jan 13, 2026
55eae6d
feat(ui): drag handle component
comfrt1k Jan 13, 2026
a04a68b
feat(ui): modal styles
comfrt1k Jan 13, 2026
f813368
feat(ui): modal components with stories
comfrt1k Jan 13, 2026
90c4ea2
feat(ui): date picker stories
comfrt1k Jan 13, 2026
66b844c
feat(ui): date/calendar deps
comfrt1k Jan 13, 2026
6633cda
chore(storybook): spacing for component variants
comfrt1k Jan 13, 2026
5bbdcc5
chore(deps): toml update
comfrt1k Jan 13, 2026
3834a64
feat(app): new stories usage
comfrt1k Jan 13, 2026
bf306c3
Merge branch 'feat/components-part1' into feat/components-part2
comfrt1k Jan 13, 2026
fe5a744
chore(input): remove todo
comfrt1k Jan 13, 2026
ccfaeb8
Merge remote-tracking branch 'origin/feat/components-part2' into feat…
comfrt1k Jan 13, 2026
2a99091
refactor(ui): move sizes from theme
comfrt1k Jan 13, 2026
c56b203
Merge branch 'feat/components-part1' into feat/components-part2
comfrt1k Jan 13, 2026
3c881b1
refactor(ui): move alpha from colors to effects
comfrt1k Jan 13, 2026
beea202
refactor(theme): move component sizes to components
comfrt1k Jan 13, 2026
7150f6d
refactor(theme): move elevation tokens to layout
comfrt1k Jan 13, 2026
2c20615
refactor(picker): split styles
comfrt1k Jan 13, 2026
0737e78
Merge pull request #663
TorinAsakura Jan 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions mobile/kmp/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
[versions]
calendar = "2.9.0"
kotlin = "2.2.0"
ktor = "3.3.1"
compose = "1.10.0-rc02"
composeShadow = "2.0.4"
coilCompose = "3.3.0"
kotlinxDatetime = "0.6.1"
agp = "8.9.0"
androidx-activityCompose = "1.9.3"

[libraries]
compose-calendar = { module = "com.kizitonwose.calendar:compose-multiplatform", version.ref = "calendar" }
kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "kotlinxDatetime" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
compose-shadow = { module = "com.adamglin:compose-shadow", version.ref = "composeShadow" }
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coilCompose" }
coil-network-ktor = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coilCompose" }
ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }

[plugins]
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
Expand Down
1 change: 1 addition & 0 deletions mobile/kmp/sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ kotlin {
sourceSets {
commonMain.dependencies {
implementation(project(":ui"))
implementation(project(":storybook"))
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,41 @@
package com.atls.hyperion.sample

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.atls.hyperion.storybook.fragments.storybook.Storybook
import com.atls.hyperion.ui.components.avatar.stories.AvatarStory
import com.atls.hyperion.ui.components.button.stories.ButtonStory
import com.atls.hyperion.ui.components.card.stories.CardStory
import com.atls.hyperion.ui.components.checkbox.stories.CheckboxStory
import com.atls.hyperion.ui.components.divider.stories.DividerStory
import com.atls.hyperion.ui.components.input.stories.InputStory
import com.atls.hyperion.ui.components.modal.bottom.stories.BottomDialogStory
import com.atls.hyperion.ui.components.modal.popup.stories.PopupStory
import com.atls.hyperion.ui.components.switch.stories.SwitchStory
import com.atls.hyperion.ui.fragment.datepicker.stories.DatePickerStory
import com.atls.hyperion.ui.fragment.datepicker.stories.DateRangePickerStory
import com.atls.hyperion.ui.primitives.stories.LinkStory
import com.atls.hyperion.ui.primitives.stories.TextStory

@Composable
fun App() {
MaterialTheme {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp)
) {
//TODO use for demonstration and tests
}
Storybook(
components = listOf(
AvatarStory(),
BottomDialogStory(),
ButtonStory(),
CheckboxStory(),
DatePickerStory(),
DateRangePickerStory(),
DividerStory(),
InputStory(),
PopupStory(),
SwitchStory(),
CardStory(),
TextStory(),
LinkStory()
)
)
}
}
2 changes: 2 additions & 0 deletions mobile/kmp/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ dependencyResolutionManagement {
rootProject.name = "hyperion"
include(":sample")
include(":ui")
include(":storybook")
include(":storybook-api")
1 change: 1 addition & 0 deletions mobile/kmp/storybook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
65 changes: 65 additions & 0 deletions mobile/kmp/storybook/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.androidLibrary)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
}

group = "com.atls.hyperion"
version = "0.1.0"

kotlin {
androidTarget {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}

listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach { iosTarget ->
iosTarget.binaries.framework {
baseName = "storybook"
isStatic = true
}
}

sourceSets {
commonMain.dependencies {
implementation(compose.runtime)
implementation(compose.foundation)
implementation(compose.material)
implementation(compose.ui)
implementation(compose.components.resources)
}
}
}

compose.resources {
publicResClass = false
generateResClass = auto
}

android {
namespace = "com.atls.hyperion.storybook"

val compileSdkValue = System.getenv(Versions.COMPILE_SDK_KEY)?.toInt()
?: (extra[Versions.COMPILE_SDK_KEY] as String).toInt()
val minSdkValue = System.getenv(Versions.MIN_SDK_KEY)?.toInt()
?: (extra[Versions.MIN_SDK_KEY] as String).toInt()
val javaTargetValue = System.getenv(Versions.JAVA_TARGET_KEY)?.toInt()
?: (extra[Versions.JAVA_TARGET_KEY] as String).toInt()

compileSdk = compileSdkValue
defaultConfig {
minSdk = minSdkValue
}
compileOptions {
sourceCompatibility = JavaVersion.toVersion(javaTargetValue)
targetCompatibility = JavaVersion.toVersion(javaTargetValue)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
Comment thread
Amiditin marked this conversation as resolved.

<path android:fillColor="#00000000" android:pathData="M4,17H20M4,12H20M4,7H20" android:strokeColor="#000000" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="1.5"/>

</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<resources>
<string name="components">Components</string>
<string name="select_component_from_sidebar">Select a component from the sidebar</string>
<string name="toggle_sidebar">Toggle Sidebar</string>
</resources>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.atls.hyperion.storybook.config

import androidx.compose.ui.unit.dp

internal val sidebarWidth = 250.dp
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
package com.atls.hyperion.storybook.fragments.storybook

import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.material.Icon
import androidx.compose.material.IconButton
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.atls.hyperion.storybook.fragments.storybook.ui.Sidebar
import com.atls.hyperion.storybook.generated.resources.Res
import com.atls.hyperion.storybook.generated.resources.menu
import com.atls.hyperion.storybook.generated.resources.select_component_from_sidebar
import com.atls.hyperion.storybook.generated.resources.toggle_sidebar
import com.atls.hyperion.storybook.shared.model.ComponentExample
import com.atls.hyperion.storybook.shared.ui.theme.Padding
import org.jetbrains.compose.resources.painterResource
import org.jetbrains.compose.resources.stringResource

@Composable
fun Storybook(
components: List<ComponentExample>
) {
var isSidebarVisible by remember { mutableStateOf(false) }
var selectedComponent by remember(components) {
mutableStateOf(components.firstOrNull())
}

Box {
Column(
modifier = Modifier
.fillMaxSize()
.safeDrawingPadding()
) {
IconButton(
onClick = { isSidebarVisible = !isSidebarVisible },
modifier = Modifier
.padding(Padding.small)
) {
Icon(
painter = painterResource(Res.drawable.menu),
contentDescription = stringResource(Res.string.toggle_sidebar),
tint = MaterialTheme.colors.onSurface
)
}
Box(
modifier = Modifier
.fillMaxSize()
) {
if (selectedComponent != null) {
selectedComponent?.Content()
} else {
Text(
text = stringResource(Res.string.select_component_from_sidebar),
modifier = Modifier
.align(Alignment.Center),
)
}
}
}

AnimatedVisibility(
visible = isSidebarVisible,
enter = slideInHorizontally(),
exit = slideOutHorizontally()
) {
Sidebar(
components = components,
selectedComponent = selectedComponent,
onComponentClick = { component ->
selectedComponent = component
isSidebarVisible = false
},
onClose = { isSidebarVisible = false }
)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package com.atls.hyperion.storybook.fragments.storybook.ui

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.Divider
import androidx.compose.material.MaterialTheme
import androidx.compose.material.Surface
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontWeight
import com.atls.hyperion.storybook.config.sidebarWidth
import com.atls.hyperion.storybook.generated.resources.Res
import com.atls.hyperion.storybook.generated.resources.components
import com.atls.hyperion.storybook.shared.model.ComponentExample
import com.atls.hyperion.storybook.shared.ui.theme.FontSize
import com.atls.hyperion.storybook.shared.ui.theme.Padding
import org.jetbrains.compose.resources.stringResource

@Composable
fun Sidebar(
components: List<ComponentExample>,
selectedComponent: ComponentExample?,
onComponentClick: (ComponentExample) -> Unit,
onClose: () -> Unit
) {
Box(
modifier = Modifier
.fillMaxSize()
.clickable { onClose() }
) {
Surface(
modifier = Modifier
.fillMaxHeight()
.width(sidebarWidth),
color = MaterialTheme.colors.surface
) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(Padding.medium)
) {
Text(
text = stringResource(Res.string.components),
fontSize = FontSize.large,
fontWeight = FontWeight.Bold,
modifier = Modifier.padding(vertical = Padding.large)
)
LazyColumn {
items(components) { component ->
Text(
text = component.name,
modifier = Modifier
.fillMaxWidth()
.clickable { onComponentClick(component) }
.padding(vertical = Padding.small),
fontWeight = if (component == selectedComponent) FontWeight.Bold else FontWeight.Normal,
fontSize = FontSize.small
)
Divider()
}
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.atls.hyperion.storybook.shared.model

import androidx.compose.runtime.Composable

interface ComponentExample {
val name: String
@Composable
fun Content()
}
Loading