From 27a7f27f4146818954b947f00a333e1d344d5d0a Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Wed, 24 Jul 2024 10:46:34 +0200 Subject: [PATCH] Move ActionButton.kt to the right package (#488) --- .../standalone/view/component/Buttons.kt | 4 ++-- ui/api/ui.api | 24 +++++++++---------- .../component/{styling => }/ActionButton.kt | 7 +++--- .../{styling => }/IconActionButton.kt | 8 +++---- 4 files changed, 20 insertions(+), 23 deletions(-) rename ui/src/main/kotlin/org/jetbrains/jewel/ui/component/{styling => }/ActionButton.kt (94%) rename ui/src/main/kotlin/org/jetbrains/jewel/ui/component/{styling => }/IconActionButton.kt (95%) diff --git a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt index 93cc4d174..09d6d310c 100644 --- a/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt +++ b/samples/standalone/src/main/kotlin/org/jetbrains/jewel/samples/standalone/view/component/Buttons.kt @@ -13,15 +13,15 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import org.jetbrains.jewel.samples.standalone.viewmodel.View +import org.jetbrains.jewel.ui.component.ActionButton import org.jetbrains.jewel.ui.component.DefaultButton +import org.jetbrains.jewel.ui.component.IconActionButton import org.jetbrains.jewel.ui.component.IconButton import org.jetbrains.jewel.ui.component.OutlinedButton import org.jetbrains.jewel.ui.component.PlatformIcon import org.jetbrains.jewel.ui.component.SelectableIconButton import org.jetbrains.jewel.ui.component.Text import org.jetbrains.jewel.ui.component.Typography -import org.jetbrains.jewel.ui.component.styling.ActionButton -import org.jetbrains.jewel.ui.component.styling.IconActionButton import org.jetbrains.jewel.ui.component.styling.LocalIconButtonStyle import org.jetbrains.jewel.ui.icons.AllIconsKeys import org.jetbrains.jewel.ui.painter.hints.Selected diff --git a/ui/api/ui.api b/ui/api/ui.api index dcf5c85ad..5d8a4cb21 100644 --- a/ui/api/ui.api +++ b/ui/api/ui.api @@ -92,6 +92,11 @@ public final class org/jetbrains/jewel/ui/OutlineKt { public static final fun outline-HYR8e34 (Landroidx/compose/ui/Modifier;Lorg/jetbrains/jewel/foundation/state/FocusableComponentState;Lorg/jetbrains/jewel/ui/Outline;Landroidx/compose/ui/graphics/Shape;Lorg/jetbrains/jewel/foundation/Stroke$Alignment;FLandroidx/compose/runtime/Composer;II)Landroidx/compose/ui/Modifier; } +public final class org/jetbrains/jewel/ui/component/ActionButtonKt { + public static final fun ActionButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V + public static final fun ActionButton (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/layout/PaddingValues;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V +} + public final class org/jetbrains/jewel/ui/component/ButtonKt { public static final fun DefaultButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLandroidx/compose/foundation/interaction/MutableInteractionSource;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V public static final fun OutlinedButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZLandroidx/compose/foundation/interaction/MutableInteractionSource;Lorg/jetbrains/jewel/ui/component/styling/ButtonStyle;Landroidx/compose/ui/text/TextStyle;Lkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V @@ -301,6 +306,13 @@ public final class org/jetbrains/jewel/ui/component/GroupHeaderKt { public static final fun GroupHeader-cf5BqRc (Ljava/lang/String;Landroidx/compose/ui/Modifier;JLorg/jetbrains/jewel/ui/component/styling/GroupHeaderStyle;Landroidx/compose/runtime/Composer;II)V } +public final class org/jetbrains/jewel/ui/component/IconActionButtonKt { + public static final fun IconActionButton (Landroidx/compose/ui/graphics/painter/Painter;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/runtime/Composer;II)V + public static final fun IconActionButton (Landroidx/compose/ui/graphics/painter/Painter;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V + public static final fun IconActionButton (Lorg/jetbrains/jewel/ui/icon/IconKey;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Ljava/lang/Class;Landroidx/compose/runtime/Composer;II)V + public static final fun IconActionButton (Lorg/jetbrains/jewel/ui/icon/IconKey;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Ljava/lang/Class;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V +} + public final class org/jetbrains/jewel/ui/component/IconButtonKt { public static final fun IconButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V public static final fun SelectableIconButton (ZLkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function4;Landroidx/compose/runtime/Composer;II)V @@ -855,11 +867,6 @@ public final class org/jetbrains/jewel/ui/component/TypographyKt { public static final fun plus-NB67dxo (JJ)J } -public final class org/jetbrains/jewel/ui/component/styling/ActionButtonKt { - public static final fun ActionButton (Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/layout/PaddingValues;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V - public static final fun ActionButton (Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function2;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/layout/PaddingValues;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V -} - public final class org/jetbrains/jewel/ui/component/styling/ButtonColors { public static final field $stable I public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/ButtonColors$Companion; @@ -1310,13 +1317,6 @@ public final class org/jetbrains/jewel/ui/component/styling/HorizontalProgressBa public static final fun getLocalHorizontalProgressBarStyle ()Landroidx/compose/runtime/ProvidableCompositionLocal; } -public final class org/jetbrains/jewel/ui/component/styling/IconActionButtonKt { - public static final fun IconActionButton (Landroidx/compose/ui/graphics/painter/Painter;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Landroidx/compose/runtime/Composer;II)V - public static final fun IconActionButton (Landroidx/compose/ui/graphics/painter/Painter;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V - public static final fun IconActionButton (Lorg/jetbrains/jewel/ui/icon/IconKey;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Landroidx/compose/foundation/interaction/MutableInteractionSource;Ljava/lang/Class;Landroidx/compose/runtime/Composer;II)V - public static final fun IconActionButton (Lorg/jetbrains/jewel/ui/icon/IconKey;Ljava/lang/String;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/Modifier;ZZLorg/jetbrains/jewel/ui/component/styling/IconButtonStyle;Lorg/jetbrains/jewel/ui/component/styling/TooltipStyle;Landroidx/compose/foundation/TooltipPlacement;Landroidx/compose/foundation/interaction/MutableInteractionSource;Ljava/lang/Class;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;III)V -} - public final class org/jetbrains/jewel/ui/component/styling/IconButtonColors { public static final field $stable I public static final field Companion Lorg/jetbrains/jewel/ui/component/styling/IconButtonColors$Companion; diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/ActionButton.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ActionButton.kt similarity index 94% rename from ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/ActionButton.kt rename to ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ActionButton.kt index 2cf44cd61..da681a15a 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/ActionButton.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/ActionButton.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.jewel.ui.component.styling +package org.jetbrains.jewel.ui.component import androidx.compose.foundation.TooltipPlacement import androidx.compose.foundation.interaction.MutableInteractionSource @@ -26,9 +26,8 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.dp import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.component.FixedCursorPoint -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.Tooltip +import org.jetbrains.jewel.ui.component.styling.IconButtonStyle +import org.jetbrains.jewel.ui.component.styling.TooltipStyle import org.jetbrains.jewel.ui.theme.iconButtonStyle import org.jetbrains.jewel.ui.theme.tooltipStyle diff --git a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/IconActionButton.kt b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/IconActionButton.kt similarity index 95% rename from ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/IconActionButton.kt rename to ui/src/main/kotlin/org/jetbrains/jewel/ui/component/IconActionButton.kt index 701a2d4f1..90c049ab4 100644 --- a/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/styling/IconActionButton.kt +++ b/ui/src/main/kotlin/org/jetbrains/jewel/ui/component/IconActionButton.kt @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.jetbrains.jewel.ui.component.styling +package org.jetbrains.jewel.ui.component import androidx.compose.foundation.TooltipPlacement import androidx.compose.foundation.interaction.MutableInteractionSource @@ -24,10 +24,8 @@ import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.unit.DpOffset import androidx.compose.ui.unit.dp import org.jetbrains.jewel.foundation.theme.JewelTheme -import org.jetbrains.jewel.ui.component.FixedCursorPoint -import org.jetbrains.jewel.ui.component.Icon -import org.jetbrains.jewel.ui.component.IconButton -import org.jetbrains.jewel.ui.component.Tooltip +import org.jetbrains.jewel.ui.component.styling.IconButtonStyle +import org.jetbrains.jewel.ui.component.styling.TooltipStyle import org.jetbrains.jewel.ui.icon.IconKey import org.jetbrains.jewel.ui.theme.iconButtonStyle import org.jetbrains.jewel.ui.theme.tooltipStyle