Browse Source

Introduce webWidgetsDeprecationMessage which is used in Deprecated annotation (#1459)

pull/1461/head
Shagen Ogandzhanian 3 years ago committed by GitHub
parent
commit
1a817574f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      web/widgets/src/commonMain/kotlin/Alignment.kt
  2. 7
      web/widgets/src/commonMain/kotlin/Arrangement.kt
  3. 25
      web/widgets/src/commonMain/kotlin/Color.kt
  4. 9
      web/widgets/src/commonMain/kotlin/Modifier.kt
  5. 8
      web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt
  6. 3
      web/widgets/src/commonMain/kotlin/layouts/box.kt
  7. 3
      web/widgets/src/commonMain/kotlin/layouts/button.kt
  8. 3
      web/widgets/src/commonMain/kotlin/layouts/column.kt
  9. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt
  10. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt
  11. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt
  12. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt
  13. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt
  14. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt
  15. 3
      web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt
  16. 3
      web/widgets/src/commonMain/kotlin/layouts/row.kt
  17. 5
      web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt
  18. 3
      web/widgets/src/commonMain/kotlin/layouts/slider.kt
  19. 3
      web/widgets/src/commonMain/kotlin/layouts/text.kt
  20. 3
      web/widgets/src/commonMain/kotlin/modifiers/border.kt
  21. 3
      web/widgets/src/commonMain/kotlin/modifiers/clickable.kt
  22. 3
      web/widgets/src/commonMain/kotlin/modifiers/clip.kt
  23. 3
      web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt
  24. 3
      web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt
  25. 3
      web/widgets/src/commonMain/kotlin/modifiers/offset.kt
  26. 3
      web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt
  27. 3
      web/widgets/src/commonMain/kotlin/modifiers/size.kt
  28. 3
      web/widgets/src/commonMain/kotlin/modifiers/width.kt
  29. 3
      web/widgets/src/commonMain/kotlin/units/Dp.kt
  30. 3
      web/widgets/src/commonMain/kotlin/units/IntSize.kt
  31. 7
      web/widgets/src/commonMain/kotlin/units/TextUnit.kt
  32. 11
      web/widgets/src/commonMain/kotlin/units/unitConversion.kt
  33. 7
      web/widgets/src/jsMain/kotlin/Modifier.kt
  34. 3
      web/widgets/src/jsMain/kotlin/Styles.kt
  35. 5
      web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt
  36. 3
      web/widgets/src/jsMain/kotlin/layouts/box.kt
  37. 3
      web/widgets/src/jsMain/kotlin/layouts/button.kt
  38. 3
      web/widgets/src/jsMain/kotlin/layouts/column.kt
  39. 3
      web/widgets/src/jsMain/kotlin/layouts/row.kt
  40. 4
      web/widgets/src/jsMain/kotlin/layouts/slider.kt
  41. 3
      web/widgets/src/jsMain/kotlin/layouts/text.kt
  42. 3
      web/widgets/src/jsMain/kotlin/modifiers/border.kt
  43. 3
      web/widgets/src/jsMain/kotlin/modifiers/clickable.kt
  44. 3
      web/widgets/src/jsMain/kotlin/modifiers/clip.kt
  45. 3
      web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt
  46. 3
      web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt
  47. 3
      web/widgets/src/jsMain/kotlin/modifiers/offset.kt
  48. 3
      web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt
  49. 3
      web/widgets/src/jsMain/kotlin/modifiers/size.kt
  50. 3
      web/widgets/src/jsMain/kotlin/modifiers/width.kt
  51. 3
      web/widgets/src/jvmMain/kotlin/Alignment.kt
  52. 3
      web/widgets/src/jvmMain/kotlin/Arrangement.kt
  53. 3
      web/widgets/src/jvmMain/kotlin/Color.kt
  54. 7
      web/widgets/src/jvmMain/kotlin/Modifier.kt
  55. 7
      web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt
  56. 3
      web/widgets/src/jvmMain/kotlin/layouts/box.kt
  57. 3
      web/widgets/src/jvmMain/kotlin/layouts/button.kt
  58. 3
      web/widgets/src/jvmMain/kotlin/layouts/column.kt
  59. 3
      web/widgets/src/jvmMain/kotlin/layouts/row.kt
  60. 3
      web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt
  61. 3
      web/widgets/src/jvmMain/kotlin/layouts/slider.kt
  62. 3
      web/widgets/src/jvmMain/kotlin/layouts/text.kt
  63. 3
      web/widgets/src/jvmMain/kotlin/modifiers/border.kt
  64. 3
      web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt
  65. 3
      web/widgets/src/jvmMain/kotlin/modifiers/clip.kt
  66. 3
      web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt
  67. 3
      web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt
  68. 3
      web/widgets/src/jvmMain/kotlin/modifiers/offset.kt
  69. 3
      web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt
  70. 3
      web/widgets/src/jvmMain/kotlin/modifiers/size.kt
  71. 3
      web/widgets/src/jvmMain/kotlin/modifiers/width.kt
  72. 3
      web/widgets/src/jvmMain/kotlin/units/Dp.kt
  73. 3
      web/widgets/src/jvmMain/kotlin/units/TextUnit.kt

8
web/widgets/src/commonMain/kotlin/Alignment.kt

@ -1,11 +1,13 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Alignment { interface Alignment {
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Vertical : Alignment interface Vertical : Alignment
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Horizontal : Alignment interface Horizontal : Alignment
companion object { companion object {

7
web/widgets/src/commonMain/kotlin/Arrangement.kt

@ -1,16 +1,17 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
object Arrangement { object Arrangement {
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Horizontal interface Horizontal
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Vertical interface Vertical
val End = object : Horizontal {} val End = object : Horizontal {}

25
web/widgets/src/commonMain/kotlin/Color.kt

@ -1,33 +1,34 @@
package org.jetbrains.compose.common.core.graphics package org.jetbrains.compose.common.core.graphics
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
public data class Color(val red: Int, val green: Int, val blue: Int) { public data class Color(val red: Int, val green: Int, val blue: Int) {
companion object { companion object {
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Black = Color(0, 0, 0) val Black = Color(0, 0, 0)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val DarkGray = Color(0x44, 0x44, 0x44) val DarkGray = Color(0x44, 0x44, 0x44)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Gray = Color(0x88, 0x88, 0x88) val Gray = Color(0x88, 0x88, 0x88)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val LightGray = Color(0xCC, 0xCC, 0xCC) val LightGray = Color(0xCC, 0xCC, 0xCC)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val White = Color(0xFF, 0xFF, 0xFF) val White = Color(0xFF, 0xFF, 0xFF)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Red = Color(0xFF, 0, 0) val Red = Color(0xFF, 0, 0)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Green = Color(0, 0xFF, 0) val Green = Color(0, 0xFF, 0)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Blue = Color(0, 0, 0xFF) val Blue = Color(0, 0, 0xFF)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Yellow = Color(0xFF, 0xFF, 0x00) val Yellow = Color(0xFF, 0xFF, 0x00)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Cyan = Color(0, 0xFF, 0xFF) val Cyan = Color(0, 0xFF, 0xFF)
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Magenta = Color(0xFF, 0, 0xFF) val Magenta = Color(0xFF, 0, 0xFF)
} }
} }

9
web/widgets/src/commonMain/kotlin/Modifier.kt

@ -1,20 +1,21 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Modifier { interface Modifier {
open class Element : Modifier open class Element : Modifier
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
companion object : Element() companion object : Element()
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.background(color: Color): Modifier expect fun Modifier.background(color: Color): Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.padding(all: Dp): Modifier expect fun Modifier.padding(all: Dp): Modifier

8
web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt

@ -0,0 +1,8 @@
/*
* Copyright 2020-2021 JetBrains s.r.o. and respective authors and developers.
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/
package org.jetbrains.compose.annotations
const val webWidgetsDeprecationMessage = "compose.web.web-widgets API is deprecated"

3
web/widgets/src/commonMain/kotlin/layouts/box.kt

@ -2,9 +2,10 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) internal expect fun BoxActual(modifier: Modifier, content: @Composable () -> Unit)

3
web/widgets/src/commonMain/kotlin/layouts/button.kt

@ -2,11 +2,12 @@ package org.jetbrains.compose.common.material
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun ButtonActual( internal expect fun ButtonActual(
modifier: Modifier, modifier: Modifier,
onClick: () -> Unit, onClick: () -> Unit,

3
web/widgets/src/commonMain/kotlin/layouts/column.kt

@ -2,9 +2,10 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) internal expect fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit)

3
web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt

@ -2,11 +2,12 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Box( fun Box(
modifier: Modifier = Modifier.Companion, modifier: Modifier = Modifier.Companion,
content: @Composable () -> Unit content: @Composable () -> Unit

3
web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt

@ -2,11 +2,12 @@ package org.jetbrains.compose.common.material
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Button( fun Button(
modifier: Modifier = Modifier.Companion, modifier: Modifier = Modifier.Companion,
onClick: () -> Unit, onClick: () -> Unit,

3
web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt

@ -2,11 +2,12 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Column( fun Column(
modifier: Modifier = Modifier.Companion, modifier: Modifier = Modifier.Companion,
content: @Composable () -> Unit content: @Composable () -> Unit

3
web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Modifier.size(size: Dp): Modifier { fun Modifier.size(size: Dp): Modifier {
return size(size, size) return size(size, size)
} }

3
web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt

@ -2,12 +2,13 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.Alignment
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Row( fun Row(
modifier: Modifier = Modifier.Companion, modifier: Modifier = Modifier.Companion,
horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start,

3
web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt

@ -1,12 +1,13 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Slider( fun Slider(
value: Float, value: Float,
onValueChange: (Float) -> Unit = {}, onValueChange: (Float) -> Unit = {},

3
web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt

@ -1,6 +1,7 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.unit.TextUnit
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Text( fun Text(
text: String, text: String,
modifier: Modifier = Modifier.Companion, modifier: Modifier = Modifier.Companion,

3
web/widgets/src/commonMain/kotlin/layouts/row.kt

@ -2,12 +2,13 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.Alignment
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun RowActual( internal expect fun RowActual(
modifier: Modifier, modifier: Modifier,
horizontalArrangement: Arrangement.Horizontal, horizontalArrangement: Arrangement.Horizontal,

5
web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt

@ -1,11 +1,12 @@
package jetbrains.compose.common.shapes package jetbrains.compose.common.shapes
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
interface Shape interface Shape
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
object CircleShape : Shape object CircleShape : Shape

3
web/widgets/src/commonMain/kotlin/layouts/slider.kt

@ -1,12 +1,13 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun SliderActual( internal expect fun SliderActual(
value: Float, value: Float,
onValueChange: (Float) -> Unit, onValueChange: (Float) -> Unit,

3
web/widgets/src/commonMain/kotlin/layouts/text.kt

@ -1,6 +1,7 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.unit.TextUnit
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal expect fun TextActual( internal expect fun TextActual(
text: String, text: String,
modifier: Modifier, modifier: Modifier,

3
web/widgets/src/commonMain/kotlin/modifiers/border.kt

@ -1,10 +1,11 @@
package org.jetbrains.compose.common.foundation package org.jetbrains.compose.common.foundation
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.border(size: Dp, color: Color): Modifier expect fun Modifier.border(size: Dp, color: Color): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/clickable.kt

@ -1,8 +1,9 @@
package org.jetbrains.compose.common.foundation package org.jetbrains.compose.common.foundation
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.clickable(onClick: () -> Unit): Modifier expect fun Modifier.clickable(onClick: () -> Unit): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/clip.kt

@ -2,8 +2,9 @@ package org.jetbrains.compose.common.ui.draw
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import jetbrains.compose.common.shapes.Shape import jetbrains.compose.common.shapes.Shape
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.clip(shape: Shape): Modifier expect fun Modifier.clip(shape: Shape): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt

@ -1,8 +1,9 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.fillMaxHeight(fraction: Float): Modifier expect fun Modifier.fillMaxHeight(fraction: Float): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt

@ -1,8 +1,9 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.fillMaxWidth(): Modifier expect fun Modifier.fillMaxWidth(): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/offset.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.offset(x: Dp, y: Dp): Modifier expect fun Modifier.offset(x: Dp, y: Dp): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt

@ -1,11 +1,12 @@
package org.jetbrains.compose.common.ui.layout package org.jetbrains.compose.common.ui.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.ui.unit.IntSize import org.jetbrains.compose.common.ui.unit.IntSize
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.onSizeChanged( expect fun Modifier.onSizeChanged(
onSizeChanged: (IntSize) -> Unit onSizeChanged: (IntSize) -> Unit
): Modifier ): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/size.kt

@ -1,7 +1,8 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.size(width: Dp, height: Dp): Modifier expect fun Modifier.size(width: Dp, height: Dp): Modifier

3
web/widgets/src/commonMain/kotlin/modifiers/width.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
expect fun Modifier.width(size: Dp): Modifier expect fun Modifier.width(size: Dp): Modifier

3
web/widgets/src/commonMain/kotlin/units/Dp.kt

@ -1,7 +1,8 @@
package org.jetbrains.compose.common.ui.unit package org.jetbrains.compose.common.ui.unit
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
data class Dp(val value: Float) data class Dp(val value: Float)

3
web/widgets/src/commonMain/kotlin/units/IntSize.kt

@ -1,7 +1,8 @@
package org.jetbrains.compose.common.ui.unit package org.jetbrains.compose.common.ui.unit
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
data class IntSize(val width: Int, val height: Int) data class IntSize(val width: Int, val height: Int)

7
web/widgets/src/commonMain/kotlin/units/TextUnit.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.ui.unit package org.jetbrains.compose.common.ui.unit
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
enum class TextUnitType { enum class TextUnitType {
Unspecified, Unspecified,
Em, Em,
@ -11,10 +12,10 @@ enum class TextUnitType {
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
data class TextUnit(val value: Float, val unitType: TextUnitType) { data class TextUnit(val value: Float, val unitType: TextUnitType) {
companion object { companion object {
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Unspecified = TextUnit(Float.NaN, TextUnitType.Unspecified) val Unspecified = TextUnit(Float.NaN, TextUnitType.Unspecified)
} }
} }

11
web/widgets/src/commonMain/kotlin/units/unitConversion.kt

@ -1,29 +1,30 @@
package org.jetbrains.compose.common.ui.unit package org.jetbrains.compose.common.ui.unit
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
// TODO: this have to be in a separate package otherwise there's an error for in cross-module usage (for JVM target) // TODO: this have to be in a separate package otherwise there's an error for in cross-module usage (for JVM target)
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Int.dp: Dp val Int.dp: Dp
get() = Dp(this.toFloat()) get() = Dp(this.toFloat())
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Int.em: TextUnit val Int.em: TextUnit
get() = TextUnit(toFloat(), TextUnitType.Em) get() = TextUnit(toFloat(), TextUnitType.Em)
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Float.em: TextUnit val Float.em: TextUnit
get() = TextUnit(this, TextUnitType.Em) get() = TextUnit(this, TextUnitType.Em)
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Int.sp: TextUnit val Int.sp: TextUnit
get() = TextUnit(toFloat(), TextUnitType.Sp) get() = TextUnit(toFloat(), TextUnitType.Sp)
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Float.sp: TextUnit val Float.sp: TextUnit
get() = TextUnit(this, TextUnitType.Sp) get() = TextUnit(this, TextUnitType.Sp)

7
web/widgets/src/jsMain/kotlin/Modifier.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.web.css.backgroundColor import org.jetbrains.compose.web.css.backgroundColor
@ -10,7 +11,7 @@ import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.web.attributes.AttrsBuilder import org.jetbrains.compose.web.attributes.AttrsBuilder
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply { actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply {
add { add {
backgroundColor(RGB(color.red, color.green, color.blue)) backgroundColor(RGB(color.red, color.green, color.blue))
@ -18,7 +19,7 @@ actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply {
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Modifier.asAttributeBuilderApplier( fun Modifier.asAttributeBuilderApplier(
passThroughHandler: (AttrsBuilder<*>.() -> Unit)? = null passThroughHandler: (AttrsBuilder<*>.() -> Unit)? = null
): AttrsBuilder<*>.() -> Unit = ): AttrsBuilder<*>.() -> Unit =
@ -37,7 +38,7 @@ fun Modifier.asAttributeBuilderApplier(
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply { actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply {
// yes, it's not a typo, what Modifier.padding does is actually adding margin // yes, it's not a typo, what Modifier.padding does is actually adding margin
add { add {

3
web/widgets/src/jsMain/kotlin/Styles.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.web.ui package org.jetbrains.compose.web.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.web.css.justifyContent import org.jetbrains.compose.web.css.justifyContent
import org.jetbrains.compose.web.css.JustifyContent import org.jetbrains.compose.web.css.JustifyContent
import org.jetbrains.compose.web.css.alignItems import org.jetbrains.compose.web.css.alignItems
@ -13,7 +14,7 @@ import org.jetbrains.compose.web.css.px
import org.jetbrains.compose.web.css.StyleSheet import org.jetbrains.compose.web.css.StyleSheet
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
object Styles : StyleSheet() { object Styles : StyleSheet() {
val columnClass = "compose-web-column" val columnClass = "compose-web-column"

5
web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt

@ -1,12 +1,13 @@
package org.jetbrains.compose.common.internal package org.jetbrains.compose.common.internal
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.web.css.StyleBuilder import org.jetbrains.compose.web.css.StyleBuilder
import org.jetbrains.compose.web.attributes.AttrsBuilder import org.jetbrains.compose.web.attributes.AttrsBuilder
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
class ActualModifier : Modifier { class ActualModifier : Modifier {
val styleHandlers = mutableListOf<StyleBuilder.() -> Unit>() val styleHandlers = mutableListOf<StyleBuilder.() -> Unit>()
val attrHandlers = mutableListOf<AttrsBuilder<*>.() -> Unit>() val attrHandlers = mutableListOf<AttrsBuilder<*>.() -> Unit>()
@ -21,5 +22,5 @@ class ActualModifier : Modifier {
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier() fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier()

3
web/widgets/src/jsMain/kotlin/layouts/box.kt

@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.Div
import org.jetbrains.compose.common.ui.asAttributeBuilderApplier import org.jetbrains.compose.common.ui.asAttributeBuilderApplier
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) { internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) {
Div( Div(
attrs = modifier.asAttributeBuilderApplier() attrs = modifier.asAttributeBuilderApplier()

3
web/widgets/src/jsMain/kotlin/layouts/button.kt

@ -2,12 +2,13 @@ package org.jetbrains.compose.common.material
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.web.dom.Button import org.jetbrains.compose.web.dom.Button
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun ButtonActual( actual fun ButtonActual(
modifier: Modifier, modifier: Modifier,
onClick: () -> Unit, onClick: () -> Unit,

3
web/widgets/src/jsMain/kotlin/layouts/column.kt

@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.Div
import org.jetbrains.compose.web.ui.Styles import org.jetbrains.compose.web.ui.Styles
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) { internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) {
Div( Div(
attrs = { attrs = {

3
web/widgets/src/jsMain/kotlin/layouts/row.kt

@ -2,6 +2,7 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.dom.Div
import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.Alignment
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ -22,7 +23,7 @@ private fun Alignment.Vertical.asClassName() = when (this) {
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun RowActual( internal actual fun RowActual(
modifier: Modifier, modifier: Modifier,
horizontalArrangement: Arrangement.Horizontal, horizontalArrangement: Arrangement.Horizontal,

4
web/widgets/src/jsMain/kotlin/layouts/slider.kt

@ -1,15 +1,15 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.web.dom.Input import org.jetbrains.compose.web.dom.Input
import org.jetbrains.compose.web.attributes.InputType import org.jetbrains.compose.web.attributes.InputType
import org.jetbrains.compose.web.attributes.value
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun SliderActual( actual fun SliderActual(
value: Float, value: Float,
onValueChange: (Float) -> Unit, onValueChange: (Float) -> Unit,

3
web/widgets/src/jsMain/kotlin/layouts/text.kt

@ -1,6 +1,7 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.web.dom.Text as TextNode import org.jetbrains.compose.web.dom.Text as TextNode
import org.jetbrains.compose.web.dom.Span import org.jetbrains.compose.web.dom.Span
import org.jetbrains.compose.web.ui.Styles import org.jetbrains.compose.web.ui.Styles
@ -18,7 +19,7 @@ import org.jetbrains.compose.web.css.px
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun TextActual( internal actual fun TextActual(
text: String, text: String,
modifier: Modifier, modifier: Modifier,

3
web/widgets/src/jsMain/kotlin/modifiers/border.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.foundation package org.jetbrains.compose.common.foundation
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@ -11,7 +12,7 @@ import org.jetbrains.compose.web.css.border
import org.jetbrains.compose.web.css.Color.RGB import org.jetbrains.compose.web.css.Color.RGB
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply { actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply {
add { add {
border(size.value.px, LineStyle.Solid, RGB(color.red, color.green, color.blue)) border(size.value.px, LineStyle.Solid, RGB(color.red, color.green, color.blue))

3
web/widgets/src/jsMain/kotlin/modifiers/clickable.kt

@ -1,11 +1,12 @@
package org.jetbrains.compose.common.foundation package org.jetbrains.compose.common.foundation
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply { actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply {
addAttributeBuilder { addAttributeBuilder {
onClick { onClick() } onClick { onClick() }

3
web/widgets/src/jsMain/kotlin/modifiers/clip.kt

@ -3,13 +3,14 @@ package org.jetbrains.compose.common.ui.draw
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import jetbrains.compose.common.shapes.Shape import jetbrains.compose.common.shapes.Shape
import jetbrains.compose.common.shapes.CircleShape import jetbrains.compose.common.shapes.CircleShape
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.web.css.borderRadius import org.jetbrains.compose.web.css.borderRadius
import org.jetbrains.compose.web.css.percent import org.jetbrains.compose.web.css.percent
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply { actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply {
when (shape) { when (shape) {
CircleShape -> add { CircleShape -> add {

3
web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.height
import org.jetbrains.compose.web.css.percent import org.jetbrains.compose.web.css.percent
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply { actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply {
add { add {
height((100 * fraction).percent) height((100 * fraction).percent)

3
web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.width
import org.jetbrains.compose.web.css.percent import org.jetbrains.compose.web.css.percent
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply { actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply {
add { add {
width(100.percent) width(100.percent)

3
web/widgets/src/jsMain/kotlin/modifiers/offset.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
@ -9,7 +10,7 @@ import org.jetbrains.compose.web.css.marginLeft
import org.jetbrains.compose.web.css.px import org.jetbrains.compose.web.css.px
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply { actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply {
add { add {
marginLeft(x.value.px) marginLeft(x.value.px)

3
web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt

@ -1,11 +1,12 @@
package org.jetbrains.compose.common.ui.layout package org.jetbrains.compose.common.ui.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.ui.unit.IntSize import org.jetbrains.compose.common.ui.unit.IntSize
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.onSizeChanged( actual fun Modifier.onSizeChanged(
onSizeChanged: (IntSize) -> Unit onSizeChanged: (IntSize) -> Unit
): Modifier { ): Modifier {

3
web/widgets/src/jsMain/kotlin/modifiers/size.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.web.css.width import org.jetbrains.compose.web.css.width
import org.jetbrains.compose.web.css.height import org.jetbrains.compose.web.css.height
@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.px
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply { actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply {
add { add {
width(width.value.px) width(width.value.px)

3
web/widgets/src/jsMain/kotlin/modifiers/width.kt

@ -1,5 +1,6 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
@ -8,7 +9,7 @@ import org.jetbrains.compose.web.css.px
import org.jetbrains.compose.web.css.width import org.jetbrains.compose.web.css.width
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply { actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply {
add { add {
width(size.value.px) width(size.value.px)

3
web/widgets/src/jvmMain/kotlin/Alignment.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.ui package org.jetbrains.compose.common.ui
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import androidx.compose.ui.Alignment as JAlignment import androidx.compose.ui.Alignment as JAlignment
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Alignment.Vertical.implementation: JAlignment.Vertical val Alignment.Vertical.implementation: JAlignment.Vertical
get() = when (this) { get() = when (this) {
Alignment.Top -> JAlignment.Top Alignment.Top -> JAlignment.Top

3
web/widgets/src/jvmMain/kotlin/Arrangement.kt

@ -1,10 +1,11 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.foundation.layout.Arrangement as JArrangement import androidx.compose.foundation.layout.Arrangement as JArrangement
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Arrangement.Horizontal.implementation: JArrangement.Horizontal val Arrangement.Horizontal.implementation: JArrangement.Horizontal
get() = when (this) { get() = when (this) {
Arrangement.End -> JArrangement.End Arrangement.End -> JArrangement.End

3
web/widgets/src/jvmMain/kotlin/Color.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.core.graphics package org.jetbrains.compose.common.core.graphics
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.ui.graphics.Color as JColor import androidx.compose.ui.graphics.Color as JColor
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Color.implementation val Color.implementation
get() = JColor(red, green, blue) get() = JColor(red, green, blue)

7
web/widgets/src/jvmMain/kotlin/Modifier.kt

@ -7,20 +7,21 @@ import org.jetbrains.compose.common.core.graphics.Color
import org.jetbrains.compose.common.core.graphics.implementation import org.jetbrains.compose.common.core.graphics.implementation
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply { actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply {
modifier = modifier.background(color.implementation) modifier = modifier.background(color.implementation)
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply { actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply {
modifier = modifier.padding(all.implementation) modifier = modifier.padding(all.implementation)
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Modifier.implementation val Modifier.implementation
get() = castOrCreate().modifier get() = castOrCreate().modifier

7
web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt

@ -1,18 +1,19 @@
package org.jetbrains.compose.common.internal package org.jetbrains.compose.common.internal
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.ui.Modifier as JModifier import androidx.compose.ui.Modifier as JModifier
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
private class ModifierElement : JModifier.Element private class ModifierElement : JModifier.Element
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
class ActualModifier : Modifier { class ActualModifier : Modifier {
var modifier: JModifier = ModifierElement() var modifier: JModifier = ModifierElement()
} }
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier() fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier()

3
web/widgets/src/jvmMain/kotlin/layouts/box.kt

@ -3,12 +3,13 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.ui.implementation import org.jetbrains.compose.common.ui.implementation
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.foundation.layout.Box as JBox import androidx.compose.foundation.layout.Box as JBox
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) { internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) {
JBox(modifier.implementation) { JBox(modifier.implementation) {
content.invoke() content.invoke()

3
web/widgets/src/jvmMain/kotlin/layouts/button.kt

@ -2,13 +2,14 @@ package org.jetbrains.compose.common.material
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.implementation import org.jetbrains.compose.common.ui.implementation
import androidx.compose.material.Button as JButton import androidx.compose.material.Button as JButton
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun ButtonActual( internal actual fun ButtonActual(
modifier: Modifier, modifier: Modifier,
onClick: () -> Unit, onClick: () -> Unit,

3
web/widgets/src/jvmMain/kotlin/layouts/column.kt

@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.foundation.layout.Column as JColumn import androidx.compose.foundation.layout.Column as JColumn
import org.jetbrains.compose.common.ui.implementation import org.jetbrains.compose.common.ui.implementation
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) { internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) {
JColumn(modifier = modifier.implementation) { JColumn(modifier = modifier.implementation) {
content.invoke() content.invoke()

3
web/widgets/src/jvmMain/kotlin/layouts/row.kt

@ -1,12 +1,13 @@
package org.jetbrains.compose.common.foundation.layout package org.jetbrains.compose.common.foundation.layout
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.* import org.jetbrains.compose.common.ui.*
import androidx.compose.foundation.layout.Row as JRow import androidx.compose.foundation.layout.Row as JRow
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun RowActual( internal actual fun RowActual(
modifier: Modifier, modifier: Modifier,
horizontalArrangement: Arrangement.Horizontal, horizontalArrangement: Arrangement.Horizontal,

3
web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt

@ -1,11 +1,12 @@
package jetbrains.compose.common.shapes package jetbrains.compose.common.shapes
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.ui.graphics.Shape as JShape import androidx.compose.ui.graphics.Shape as JShape
import androidx.compose.foundation.shape.CircleShape as JCircleShape import androidx.compose.foundation.shape.CircleShape as JCircleShape
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Shape.implementation: JShape val Shape.implementation: JShape
get() = when (this) { get() = when (this) {
CircleShape -> JCircleShape CircleShape -> JCircleShape

3
web/widgets/src/jvmMain/kotlin/layouts/slider.kt

@ -1,6 +1,7 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import androidx.compose.material.Slider as JSlider import androidx.compose.material.Slider as JSlider
@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.implementation
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun SliderActual( internal actual fun SliderActual(
value: Float, value: Float,
onValueChange: (Float) -> Unit, onValueChange: (Float) -> Unit,

3
web/widgets/src/jvmMain/kotlin/layouts/text.kt

@ -1,6 +1,7 @@
package org.jetbrains.compose.common.material package org.jetbrains.compose.common.material
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import androidx.compose.material.Text as JText import androidx.compose.material.Text as JText
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.ui.implementation import org.jetbrains.compose.common.ui.implementation
@ -12,7 +13,7 @@ import org.jetbrains.compose.common.ui.unit.implementation
@Composable @Composable
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
internal actual fun TextActual( internal actual fun TextActual(
text: String, text: String,
modifier: Modifier, modifier: Modifier,

3
web/widgets/src/jvmMain/kotlin/modifiers/border.kt

@ -7,10 +7,11 @@ import org.jetbrains.compose.common.internal.castOrCreate
import org.jetbrains.compose.common.core.graphics.implementation import org.jetbrains.compose.common.core.graphics.implementation
import org.jetbrains.compose.common.ui.unit.implementation import org.jetbrains.compose.common.ui.unit.implementation
import androidx.compose.foundation.border import androidx.compose.foundation.border
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply { actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply {
modifier = modifier.border(size.implementation, color.implementation) modifier = modifier.border(size.implementation, color.implementation)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt

@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply { actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply {
modifier = modifier.clickable(onClick = onClick) modifier = modifier.clickable(onClick = onClick)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/clip.kt

@ -5,10 +5,11 @@ import jetbrains.compose.common.shapes.Shape
import jetbrains.compose.common.shapes.implementation import jetbrains.compose.common.shapes.implementation
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply { actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply {
modifier = modifier.clip(shape.implementation) modifier = modifier.clip(shape.implementation)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt

@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.layout.fillMaxHeight import androidx.compose.foundation.layout.fillMaxHeight
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply { actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply {
modifier = modifier.fillMaxHeight(fraction) modifier = modifier.fillMaxHeight(fraction)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt

@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation.layout
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply { actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply {
modifier = modifier.fillMaxWidth() modifier = modifier.fillMaxWidth()
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/offset.kt

@ -4,11 +4,12 @@ import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.offset
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.unit.implementation import org.jetbrains.compose.common.ui.unit.implementation
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply { actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply {
modifier = modifier.offset(x.implementation, y.implementation) modifier = modifier.offset(x.implementation, y.implementation)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt

@ -4,10 +4,11 @@ import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.ui.unit.IntSize import org.jetbrains.compose.common.ui.unit.IntSize
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.ui.layout.onSizeChanged import androidx.compose.ui.layout.onSizeChanged
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.onSizeChanged( actual fun Modifier.onSizeChanged(
onSizeChanged: (IntSize) -> Unit onSizeChanged: (IntSize) -> Unit
): Modifier = castOrCreate().apply { ): Modifier = castOrCreate().apply {

3
web/widgets/src/jvmMain/kotlin/modifiers/size.kt

@ -3,10 +3,11 @@ package org.jetbrains.compose.common.ui
import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.unit.implementation import org.jetbrains.compose.common.ui.unit.implementation
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply { actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply {
modifier = modifier.size(width.implementation, height.implementation) modifier = modifier.size(width.implementation, height.implementation)
} }

3
web/widgets/src/jvmMain/kotlin/modifiers/width.kt

@ -4,11 +4,12 @@ import org.jetbrains.compose.common.ui.unit.Dp
import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.Modifier
import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.internal.castOrCreate
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import org.jetbrains.compose.common.ui.unit.implementation import org.jetbrains.compose.common.ui.unit.implementation
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply { actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply {
modifier = modifier.width(size.implementation) modifier = modifier.width(size.implementation)
} }

3
web/widgets/src/jvmMain/kotlin/units/Dp.kt

@ -1,9 +1,10 @@
package org.jetbrains.compose.common.ui.unit package org.jetbrains.compose.common.ui.unit
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
import androidx.compose.ui.unit.Dp as JDp import androidx.compose.ui.unit.Dp as JDp
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val Dp.implementation: JDp val Dp.implementation: JDp
get() = JDp(value) get() = JDp(value)

3
web/widgets/src/jvmMain/kotlin/units/TextUnit.kt

@ -3,10 +3,11 @@ package org.jetbrains.compose.common.ui.unit
import androidx.compose.ui.unit.TextUnit as JTextUnit import androidx.compose.ui.unit.TextUnit as JTextUnit
import androidx.compose.ui.unit.em import androidx.compose.ui.unit.em
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage
import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi
@ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi
@Deprecated(message = "compose.web.web-widgets API is deprecated") @Deprecated(message = webWidgetsDeprecationMessage)
val TextUnit.implementation: JTextUnit val TextUnit.implementation: JTextUnit
get() = when (unitType) { get() = when (unitType) {
TextUnitType.Em -> (value).em TextUnitType.Em -> (value).em

Loading…
Cancel
Save