Skip to content

Commit 0013151

Browse files
committed
Deprecate theme interactive size APIs
1 parent fa66ab2 commit 0013151

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616

1717
- Themes now default text selection colors to `Color.Unspecified` instead of inheriting parent
1818
selection styling.
19+
- Deprecated `minimumInteractiveComponentSize`, `ComponentInteractiveSize`, and
20+
`defaultComponentInteractiveSize`. These APIs will be removed in 3.0. It is now up to you to
21+
implement this behavior if it is a requirement for your design system.
1922

2023
## [2.2.0] - 2026-05-18
2124

composeunstyled-theming/src/commonMain/kotlin/com/composeunstyled/MinimumComponentInteractiveSize.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
* SOFTWARE.
2121
*/
22-
@file:Suppress("ktlint:standard:max-line-length")
22+
@file:Suppress("DEPRECATION", "ktlint:standard:max-line-length")
2323

2424
package com.composeunstyled
2525

@@ -34,6 +34,9 @@ import com.composeunstyled.theme.supportsTouch
3434
internal val LocalMinimumComponentInteractiveSize =
3535
compositionLocalOf { ComponentInteractiveSize(Dp.Unspecified) }
3636

37+
@Deprecated(
38+
message = "This will be removed in 3.0. It is now up to you to implement this behavior if it is a requirement for your design system.",
39+
)
3740
@Composable
3841
fun Modifier.minimumInteractiveComponentSize(): Modifier {
3942
val size = LocalMinimumComponentInteractiveSize.current

composeunstyled-theming/src/commonMain/kotlin/com/composeunstyled/theme/Theme.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2020
* SOFTWARE.
2121
*/
22-
@file:Suppress("ktlint:standard:max-line-length")
22+
@file:Suppress("DEPRECATION", "ktlint:standard:max-line-length")
2323

2424
package com.composeunstyled.theme
2525

@@ -138,11 +138,17 @@ private val UnspecifiedTextSelectionColors = TextSelectionColors(
138138
@DslMarker
139139
annotation class ThemeBuilderMarker
140140

141+
@Deprecated(
142+
message = "This will be removed in 3.0. It is now up to you to implement this behavior if it is a requirement for your design system.",
143+
)
141144
data class ComponentInteractiveSize(
142145
val nonTouchInteractionSize: Dp = Dp.Unspecified,
143146
val touchInteractionSize: Dp = Dp.Unspecified,
144147
)
145148

149+
@Deprecated(
150+
message = "This will be removed in 3.0. It is now up to you to implement this behavior if it is a requirement for your design system.",
151+
)
146152
fun ComponentInteractiveSize(size: Dp): ComponentInteractiveSize {
147153
return ComponentInteractiveSize(size, size)
148154
}
@@ -156,6 +162,9 @@ class ThemeBuilder internal constructor() {
156162
var defaultContentColor: Color by mutableStateOf(Color.Unspecified)
157163
var defaultTextSelectionColors: TextSelectionColors? by mutableStateOf(null)
158164

165+
@Deprecated(
166+
message = "This will be removed in 3.0. It is now up to you to implement this behavior if it is a requirement for your design system.",
167+
)
159168
var defaultComponentInteractiveSize: ComponentInteractiveSize by mutableStateOf(
160169
ComponentInteractiveSize(Dp.Unspecified, Dp.Unspecified),
161170
)

0 commit comments

Comments
 (0)