Compare commits
3 Commits
cded44207c
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 78c5fd1fd4 | |||
| e1919cab83 | |||
| 55ad536513 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -10,6 +10,8 @@ are no binary releases; "version" tracks the shared `version` in the root build
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [0.1.0] - 2026-07-07
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- **`core-time`** (JVM library) — pure-Kotlin date/time helpers, no Android and
|
- **`core-time`** (JVM library) — pure-Kotlin date/time helpers, no Android and
|
||||||
@@ -30,8 +32,11 @@ are no binary releases; "version" tracks the shared `version` in the root build
|
|||||||
own thin themed `CrashReportActivity`.
|
own thin themed `CrashReportActivity`.
|
||||||
- **`identity`** (Android library) — the family's Material 3 Expressive theme
|
- **`identity`** (Android library) — the family's Material 3 Expressive theme
|
||||||
factory `FloretExpressiveTheme(lightScheme, darkScheme, …)` (dynamic colour on
|
factory `FloretExpressiveTheme(lightScheme, darkScheme, …)` (dynamic colour on
|
||||||
API 31+, system light/dark fallback, the standard motion scheme) plus
|
API 31+, system light/dark fallback, the standard motion scheme) plus the
|
||||||
`rememberNavSlideSpec()`. Each app passes its own seed-derived colour schemes
|
shared motion helpers — `rememberNavSlideSpec()`, the content transitions,
|
||||||
|
`Modifier.predictiveBack()` and `Modifier.animateContentSizeMotion()` (eases a
|
||||||
|
block's own height changes, e.g. a text field wrapping to a new line), each
|
||||||
|
reduced-motion-aware. Each app passes its own seed-derived colour schemes
|
||||||
and typography — the mechanics are shared, the look is not.
|
and typography — the mechanics are shared, the look is not.
|
||||||
- **`components`** (Android library) — the shared Compose component vocabulary:
|
- **`components`** (Android library) — the shared Compose component vocabulary:
|
||||||
- `GroupedSurface` / `GroupedRow` + `Position` / `positionOf` — the canonical
|
- `GroupedSurface` / `GroupedRow` + `Position` / `positionOf` — the canonical
|
||||||
@@ -43,7 +48,9 @@ are no binary releases; "version" tracks the shared `version` in the root build
|
|||||||
`largeTopBar = false` for a pinned single-line bar (the picker variant).
|
`largeTopBar = false` for a pinned single-line bar (the picker variant).
|
||||||
- `FullScreenPicker` / `OptionPicker` — the full-screen single-select picker,
|
- `FullScreenPicker` / `OptionPicker` — the full-screen single-select picker,
|
||||||
now over a pinned single-line bar (a picker is a short list, so no tall
|
now over a pinned single-line bar (a picker is a short list, so no tall
|
||||||
collapsing header to scroll past).
|
collapsing header to scroll past). `FullScreenPicker` takes an optional
|
||||||
|
`actions` slot (app-bar trailing items) for pickers that carry a commit or
|
||||||
|
extra action — a custom-value **Add**/**OK**, a **Reset**.
|
||||||
- `ReorderableColumn` — dependency-free drag-to-reorder for the short, fixed
|
- `ReorderableColumn` — dependency-free drag-to-reorder for the short, fixed
|
||||||
grouped-card Settings lists; pairs with `GroupedRow(gapBelow = false)`, which
|
grouped-card Settings lists; pairs with `GroupedRow(gapBelow = false)`, which
|
||||||
hands the column uniform control of row spacing.
|
hands the column uniform control of row spacing.
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package de.jeanlucmakiola.floret.components
|
|||||||
|
|
||||||
import android.view.WindowManager
|
import android.view.WindowManager
|
||||||
import androidx.compose.foundation.layout.ColumnScope
|
import androidx.compose.foundation.layout.ColumnScope
|
||||||
|
import androidx.compose.foundation.layout.RowScope
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.rounded.Check
|
import androidx.compose.material.icons.rounded.Check
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
@@ -25,6 +26,7 @@ fun FullScreenPicker(
|
|||||||
title: String,
|
title: String,
|
||||||
onDismiss: () -> Unit,
|
onDismiss: () -> Unit,
|
||||||
predictiveBack: Boolean = false,
|
predictiveBack: Boolean = false,
|
||||||
|
actions: @Composable RowScope.() -> Unit = {},
|
||||||
content: @Composable ColumnScope.() -> Unit,
|
content: @Composable ColumnScope.() -> Unit,
|
||||||
) {
|
) {
|
||||||
Dialog(
|
Dialog(
|
||||||
@@ -48,6 +50,7 @@ fun FullScreenPicker(
|
|||||||
onBack = onDismiss,
|
onBack = onDismiss,
|
||||||
largeTopBar = false,
|
largeTopBar = false,
|
||||||
predictiveBack = predictiveBack,
|
predictiveBack = predictiveBack,
|
||||||
|
actions = actions,
|
||||||
content = content,
|
content = content,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ package de.jeanlucmakiola.floret.identity
|
|||||||
import android.provider.Settings
|
import android.provider.Settings
|
||||||
import androidx.activity.BackEventCompat
|
import androidx.activity.BackEventCompat
|
||||||
import androidx.activity.compose.PredictiveBackHandler
|
import androidx.activity.compose.PredictiveBackHandler
|
||||||
|
import androidx.compose.animation.animateContentSize
|
||||||
import androidx.compose.animation.core.Animatable
|
import androidx.compose.animation.core.Animatable
|
||||||
import androidx.compose.animation.core.FastOutSlowInEasing
|
import androidx.compose.animation.core.FastOutSlowInEasing
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
|
import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi
|
||||||
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
@@ -14,6 +17,7 @@ import androidx.compose.runtime.setValue
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.graphics.graphicsLayer
|
import androidx.compose.ui.graphics.graphicsLayer
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
|
import androidx.compose.ui.unit.IntSize
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
import kotlin.coroutines.cancellation.CancellationException
|
import kotlin.coroutines.cancellation.CancellationException
|
||||||
|
|
||||||
@@ -36,6 +40,21 @@ fun rememberReduceMotion(): Boolean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animates a composable's own size changes with the family's spatial motion, so
|
||||||
|
* a block that grows or shrinks — a text field wrapping to a new line, a value
|
||||||
|
* swapped for a longer one — eases into its new height instead of jumping. Wraps
|
||||||
|
* Compose's [androidx.compose.animation.animateContentSize] onto the active M3
|
||||||
|
* Expressive motion scheme; under reduced motion the new size snaps in.
|
||||||
|
*
|
||||||
|
* Apply it high in the modifier chain of the element whose height changes.
|
||||||
|
*/
|
||||||
|
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||||
|
@Composable
|
||||||
|
fun Modifier.animateContentSizeMotion(reduceMotion: Boolean = rememberReduceMotion()): Modifier =
|
||||||
|
if (reduceMotion) this
|
||||||
|
else animateContentSize(animationSpec = MaterialTheme.motionScheme.fastSpatialSpec<IntSize>())
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The standard Android predictive-back transform for a full-screen surface: as
|
* The standard Android predictive-back transform for a full-screen surface: as
|
||||||
* the back gesture is dragged, the surface scales toward ~90%, shifts toward the
|
* the back gesture is dragged, the surface scales toward ~90%, shifts toward the
|
||||||
|
|||||||
Reference in New Issue
Block a user