From a1a3cdc15d4d4cb1056c917f69e98621deeeaa19 Mon Sep 17 00:00:00 2001 From: "dima.avdeev" <99798741+dima-avdeev-jb@users.noreply.github.com> Date: Tue, 11 Oct 2022 17:39:01 +0400 Subject: [PATCH] totoapp compose 1.2.0-rc01 (#2387) * compose 1.2.0-rc01 * apply eymar patch to fix js --- examples/todoapp/buildSrc/gradle.properties | 4 ++-- examples/todoapp/gradle.properties | 2 ++ examples/todoapp/web/build.gradle.kts | 5 +++-- .../todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt | 4 ---- .../web/src/jsMain/kotlin/example/todo/web/Components.kt | 5 +---- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/examples/todoapp/buildSrc/gradle.properties b/examples/todoapp/buildSrc/gradle.properties index 5aab64a51b..6c6da6c883 100755 --- a/examples/todoapp/buildSrc/gradle.properties +++ b/examples/todoapp/buildSrc/gradle.properties @@ -1,3 +1,3 @@ # TODO can we get rid of duplication with root gradle.properties? -kotlin.version=1.6.10 -compose.version=1.1.0 +kotlin.version=1.7.10 +compose.version=1.2.0-rc01 diff --git a/examples/todoapp/gradle.properties b/examples/todoapp/gradle.properties index ed8a5683e0..a284a0decd 100755 --- a/examples/todoapp/gradle.properties +++ b/examples/todoapp/gradle.properties @@ -22,5 +22,7 @@ kotlin.code.style=official org.gradle.parallel=true org.gradle.caching=true kotlin.native.disableCompilerDaemon=true + +#TODO also change version in buildSrc/gradle.properties kotlin.version=1.7.10 compose.version=1.2.0-rc01 \ No newline at end of file diff --git a/examples/todoapp/web/build.gradle.kts b/examples/todoapp/web/build.gradle.kts index 47024f8202..89e634612b 100755 --- a/examples/todoapp/web/build.gradle.kts +++ b/examples/todoapp/web/build.gradle.kts @@ -1,4 +1,5 @@ import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension +import org.jetbrains.compose.compose plugins { kotlin("multiplatform") @@ -17,7 +18,7 @@ kotlin { named("jsMain") { dependencies { implementation(compose.runtime) - implementation(compose.web.widgets) + implementation(compose.web.core) implementation(project(":common:utils")) implementation(project(":common:database")) implementation(project(":common:root")) @@ -37,6 +38,6 @@ kotlin { afterEvaluate { rootProject.extensions.configure { versions.webpackDevServer.version = "4.0.0" - versions.webpackCli.version = "4.9.0" + versions.webpackCli.version = "4.10.0" } } diff --git a/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt b/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt index 61af087e5e..b59b5b8467 100644 --- a/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt +++ b/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/App.kt @@ -8,9 +8,7 @@ import example.todo.common.database.DefaultTodoSharedDatabase import example.todo.common.database.todoDatabaseDriver import example.todo.common.root.integration.TodoRootComponent import kotlinx.browser.document -import org.jetbrains.compose.web.css.Style import org.jetbrains.compose.web.renderComposable -import org.jetbrains.compose.web.ui.Styles import org.w3c.dom.HTMLElement fun main() { @@ -28,8 +26,6 @@ fun main() { lifecycle.resume() renderComposable(root = rootElement) { - Style(Styles) - TodoRootUi(root) } } diff --git a/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/Components.kt b/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/Components.kt index 0262901d3a..829dab3323 100644 --- a/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/Components.kt +++ b/examples/todoapp/web/src/jsMain/kotlin/example/todo/web/Components.kt @@ -1,8 +1,6 @@ package example.todo.web import androidx.compose.runtime.Composable -import org.jetbrains.compose.common.material.Text -import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.web.attributes.InputType import org.jetbrains.compose.web.css.AlignItems import org.jetbrains.compose.web.css.DisplayStyle @@ -66,7 +64,6 @@ fun Card(attrs: AttrBuilderContext<*> = {}, content: @Composable () -> Unit) { } } -@OptIn(ExperimentalComposeWebWidgetsApi::class) @Composable fun MaterialTextArea( id: String, @@ -95,7 +92,7 @@ fun MaterialTextArea( ) Label(forId = id) { - Text(text = label) + Text(value = label) } } }