From d7ed044b0de8bbeae0faa2cc798e777d39ef208c Mon Sep 17 00:00:00 2001 From: KevinnZou <43654611+KevinnZou@users.noreply.github.com> Date: Wed, 18 Oct 2023 10:54:37 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20KevinnZo?= =?UTF-8?q?u/compose-swipebox-multiplatform@a4e8d9dc1234359929cbdd780701b8?= =?UTF-8?q?a23115704e=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 10 +- lib/[root]/get-platform-name.html | 81 ------- lib/[root]/index.html | 104 --------- lib/navigation.html | 17 -- navigation.html | 52 ++++- package-list | 5 +- scripts/pages.json | 2 +- scripts/sourceset_dependencies.js | 2 +- .../-swipe-content.html | 76 +++++++ .../-swipe-icon.html | 76 +++++++ .../-swipe-text.html | 76 +++++++ .../com.kevinnzou.swipebox.widget/index.html | 129 +++++++++++ .../com.kevinnzou.swipebox/-swipe-box.html | 76 +++++++ .../-swipe-direction/-both/index.html | 115 ++++++++++ .../-swipe-direction/-end-to-start/index.html | 115 ++++++++++ .../-swipe-direction/-start-to-end/index.html | 115 ++++++++++ .../-swipe-direction/entries.html | 76 +++++++ .../-swipe-direction/index.html | 213 ++++++++++++++++++ .../-swipe-direction/value-of.html | 76 +++++++ .../-swipe-direction/values.html | 76 +++++++ swipebox/com.kevinnzou.swipebox/index.html | 118 ++++++++++ {lib => swipebox}/index.html | 42 ++-- swipebox/navigation.html | 57 +++++ 23 files changed, 1477 insertions(+), 232 deletions(-) delete mode 100644 lib/[root]/get-platform-name.html delete mode 100644 lib/[root]/index.html delete mode 100644 lib/navigation.html create mode 100644 swipebox/com.kevinnzou.swipebox.widget/-swipe-content.html create mode 100644 swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html create mode 100644 swipebox/com.kevinnzou.swipebox.widget/-swipe-text.html create mode 100644 swipebox/com.kevinnzou.swipebox.widget/index.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-box.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/-both/index.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/-end-to-start/index.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/-start-to-end/index.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/entries.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/index.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/value-of.html create mode 100644 swipebox/com.kevinnzou.swipebox/-swipe-direction/values.html create mode 100644 swipebox/com.kevinnzou.swipebox/index.html rename {lib => swipebox}/index.html (67%) create mode 100644 swipebox/navigation.html diff --git a/index.html b/index.html index 59b8d2c..95d6c18 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@
- compose-multiplatform-library-template + compose-swipebox-multiplatform
@@ -57,16 +57,16 @@
-
+

All modules:

-
+
- - + +
Link copied to clipboard
diff --git a/lib/[root]/get-platform-name.html b/lib/[root]/get-platform-name.html deleted file mode 100644 index a2e2ab9..0000000 --- a/lib/[root]/get-platform-name.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - getPlatformName - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

getPlatformName

-
-
-
-
actual fun getPlatformName(): String
expect fun getPlatformName(): String
actual fun getPlatformName(): String
actual fun getPlatformName(): String
-
- -
-
-
- - - diff --git a/lib/[root]/index.html b/lib/[root]/index.html deleted file mode 100644 index ce730ba..0000000 --- a/lib/[root]/index.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - [root] - - - - - - - - - - - - - - - - - -
- -
- -
-
- -
-

Package-level declarations

-
-
-
-
-
-

Functions

-
-
-
-
- - -
Link copied to clipboard
-
-
-
-
-
-
actual fun getPlatformName(): String
expect fun getPlatformName(): String
actual fun getPlatformName(): String
actual fun getPlatformName(): String
-
-
-
-
-
-
-
-
-
- -
-
-
- - - diff --git a/lib/navigation.html b/lib/navigation.html deleted file mode 100644 index 0c11dfc..0000000 --- a/lib/navigation.html +++ /dev/null @@ -1,17 +0,0 @@ -
-
-
- lib -
-
-
- [root] -
- -
-
-
diff --git a/navigation.html b/navigation.html index 83fe3ef..bd73d18 100644 --- a/navigation.html +++ b/navigation.html @@ -1,15 +1,55 @@
-
+
-
+
-
+ +
+ +
+ +
+
+ +
+
+
+ Both +
+
+
+
+ diff --git a/package-list b/package-list index f2710fe..3d47f09 100644 --- a/package-list +++ b/package-list @@ -1,5 +1,6 @@ $dokka.format:html-v1 $dokka.linkExtension:html -$dokka.location:////PointingToDeclaration/lib/[root]/index.html -$dokka.location://getPlatformName/#/PointingToDeclaration/lib/[root]/get-platform-name.html +module:swipebox +com.kevinnzou.swipebox +com.kevinnzou.swipebox.widget diff --git a/scripts/pages.json b/scripts/pages.json index f54bf15..d812ca4 100644 --- a/scripts/pages.json +++ b/scripts/pages.json @@ -1 +1 @@ -[{"name":"expect fun getPlatformName(): String","description":"getPlatformName","location":"lib/[root]/get-platform-name.html","searchKeys":["getPlatformName","expect fun getPlatformName(): String","getPlatformName"]}] \ No newline at end of file +[{"name":"Both","description":"com.kevinnzou.swipebox.SwipeDirection.Both","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/-both/index.html","searchKeys":["Both","Both","com.kevinnzou.swipebox.SwipeDirection.Both"]},{"name":"EndToStart","description":"com.kevinnzou.swipebox.SwipeDirection.EndToStart","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/-end-to-start/index.html","searchKeys":["EndToStart","EndToStart","com.kevinnzou.swipebox.SwipeDirection.EndToStart"]},{"name":"StartToEnd","description":"com.kevinnzou.swipebox.SwipeDirection.StartToEnd","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/-start-to-end/index.html","searchKeys":["StartToEnd","StartToEnd","com.kevinnzou.swipebox.SwipeDirection.StartToEnd"]},{"name":"enum SwipeDirection : Enum ","description":"com.kevinnzou.swipebox.SwipeDirection","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/index.html","searchKeys":["SwipeDirection","enum SwipeDirection : Enum ","com.kevinnzou.swipebox.SwipeDirection"]},{"name":"fun RowScope.SwipeContent(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, content: () -> Unit)","description":"com.kevinnzou.swipebox.widget.SwipeContent","location":"swipebox/com.kevinnzou.swipebox.widget/-swipe-content.html","searchKeys":["SwipeContent","fun RowScope.SwipeContent(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, content: () -> Unit)","com.kevinnzou.swipebox.widget.SwipeContent"]},{"name":"fun RowScope.SwipeIcon(background: Color = Color.White, bitmap: ImageBitmap, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)","description":"com.kevinnzou.swipebox.widget.SwipeIcon","location":"swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html","searchKeys":["SwipeIcon","fun RowScope.SwipeIcon(background: Color = Color.White, bitmap: ImageBitmap, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)","com.kevinnzou.swipebox.widget.SwipeIcon"]},{"name":"fun RowScope.SwipeIcon(background: Color = Color.White, painter: Painter, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)","description":"com.kevinnzou.swipebox.widget.SwipeIcon","location":"swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html","searchKeys":["SwipeIcon","fun RowScope.SwipeIcon(background: Color = Color.White, painter: Painter, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)","com.kevinnzou.swipebox.widget.SwipeIcon"]},{"name":"fun RowScope.SwipeIcon(imageVector: ImageVector, contentDescription: String?, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), background: Color = Color.White, iconSize: Dp = 16.dp, weight: Float = 1.0f, onClick: () -> Unit)","description":"com.kevinnzou.swipebox.widget.SwipeIcon","location":"swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html","searchKeys":["SwipeIcon","fun RowScope.SwipeIcon(imageVector: ImageVector, contentDescription: String?, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), background: Color = Color.White, iconSize: Dp = 16.dp, weight: Float = 1.0f, onClick: () -> Unit)","com.kevinnzou.swipebox.widget.SwipeIcon"]},{"name":"fun RowScope.SwipeText(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, text: () -> Unit)","description":"com.kevinnzou.swipebox.widget.SwipeText","location":"swipebox/com.kevinnzou.swipebox.widget/-swipe-text.html","searchKeys":["SwipeText","fun RowScope.SwipeText(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, text: () -> Unit)","com.kevinnzou.swipebox.widget.SwipeText"]},{"name":"fun SwipeBox(modifier: Modifier = Modifier, state: SwipeableState = rememberSwipeableState(initialValue = 0), swipeDirection: SwipeDirection = SwipeDirection.EndToStart, startContentWidth: Dp = 0.dp, startContent: RowScope.(swipeableState: SwipeableState, startSwipeProgress: Float) -> Unit? = null, endContentWidth: Dp = 0.dp, endContent: RowScope.(swipeableState: SwipeableState, endSwipeProgress: Float) -> Unit? = null, thresholds: (from: Int, to: Int) -> ThresholdConfig = { _, _ -> FixedThreshold(12.dp) }, content: BoxScope.(swipeableState: SwipeableState, startSwipeProgress: Float, endSwipeProgress: Float) -> Unit)","description":"com.kevinnzou.swipebox.SwipeBox","location":"swipebox/com.kevinnzou.swipebox/-swipe-box.html","searchKeys":["SwipeBox","fun SwipeBox(modifier: Modifier = Modifier, state: SwipeableState = rememberSwipeableState(initialValue = 0), swipeDirection: SwipeDirection = SwipeDirection.EndToStart, startContentWidth: Dp = 0.dp, startContent: RowScope.(swipeableState: SwipeableState, startSwipeProgress: Float) -> Unit? = null, endContentWidth: Dp = 0.dp, endContent: RowScope.(swipeableState: SwipeableState, endSwipeProgress: Float) -> Unit? = null, thresholds: (from: Int, to: Int) -> ThresholdConfig = { _, _ -> FixedThreshold(12.dp) }, content: BoxScope.(swipeableState: SwipeableState, startSwipeProgress: Float, endSwipeProgress: Float) -> Unit)","com.kevinnzou.swipebox.SwipeBox"]},{"name":"fun valueOf(value: String): SwipeDirection","description":"com.kevinnzou.swipebox.SwipeDirection.valueOf","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/value-of.html","searchKeys":["valueOf","fun valueOf(value: String): SwipeDirection","com.kevinnzou.swipebox.SwipeDirection.valueOf"]},{"name":"fun values(): Array","description":"com.kevinnzou.swipebox.SwipeDirection.values","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/values.html","searchKeys":["values","fun values(): Array","com.kevinnzou.swipebox.SwipeDirection.values"]},{"name":"val entries: EnumEntries","description":"com.kevinnzou.swipebox.SwipeDirection.entries","location":"swipebox/com.kevinnzou.swipebox/-swipe-direction/entries.html","searchKeys":["entries","val entries: EnumEntries","com.kevinnzou.swipebox.SwipeDirection.entries"]}] \ No newline at end of file diff --git a/scripts/sourceset_dependencies.js b/scripts/sourceset_dependencies.js index eaae2b1..cdfc767 100644 --- a/scripts/sourceset_dependencies.js +++ b/scripts/sourceset_dependencies.js @@ -1 +1 @@ -sourceset_dependencies = '{":lib:dokkaHtmlPartial/androidDebug":[":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/androidMain":[":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/androidRelease":[":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/commonMain":[],":lib:dokkaHtmlPartial/desktopMain":[":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/iosArm64Main":[":lib:dokkaHtmlPartial/iosMain",":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/iosMain":[":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/iosSimulatorArm64Main":[":lib:dokkaHtmlPartial/iosMain",":lib:dokkaHtmlPartial/commonMain"],":lib:dokkaHtmlPartial/iosX64Main":[":lib:dokkaHtmlPartial/iosMain",":lib:dokkaHtmlPartial/commonMain"]}' \ No newline at end of file +sourceset_dependencies = '{":swipebox:dokkaHtmlPartial/androidDebug":[":swipebox:dokkaHtmlPartial/commonMain"],":swipebox:dokkaHtmlPartial/androidMain":[":swipebox:dokkaHtmlPartial/commonMain"],":swipebox:dokkaHtmlPartial/androidRelease":[":swipebox:dokkaHtmlPartial/commonMain"],":swipebox:dokkaHtmlPartial/commonMain":[],":swipebox:dokkaHtmlPartial/desktopMain":[":swipebox:dokkaHtmlPartial/commonMain"],":swipebox:dokkaHtmlPartial/iosArm64Main":[":swipebox:dokkaHtmlPartial/commonMain",":swipebox:dokkaHtmlPartial/iosMain"],":swipebox:dokkaHtmlPartial/iosMain":[":swipebox:dokkaHtmlPartial/commonMain"],":swipebox:dokkaHtmlPartial/iosSimulatorArm64Main":[":swipebox:dokkaHtmlPartial/commonMain",":swipebox:dokkaHtmlPartial/iosMain"],":swipebox:dokkaHtmlPartial/iosX64Main":[":swipebox:dokkaHtmlPartial/commonMain",":swipebox:dokkaHtmlPartial/iosMain"]}' \ No newline at end of file diff --git a/swipebox/com.kevinnzou.swipebox.widget/-swipe-content.html b/swipebox/com.kevinnzou.swipebox.widget/-swipe-content.html new file mode 100644 index 0000000..41b90dc --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox.widget/-swipe-content.html @@ -0,0 +1,76 @@ + + + + + SwipeContent + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SwipeContent

+
+
fun RowScope.SwipeContent(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, content: @Composable () -> Unit)

Created By Kevin Zou On 2023/10/18

Wrap the real content into a box with weight set and align the content at center

Parameters

background

the background color of the box

weight

the weight of the box

onClick

the action to be executed when the box is clicked

content

the real content of the box

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html b/swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html new file mode 100644 index 0000000..6ccce02 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox.widget/-swipe-icon.html @@ -0,0 +1,76 @@ + + + + + SwipeIcon + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SwipeIcon

+
+
fun RowScope.SwipeIcon(imageVector: ImageVector, contentDescription: String?, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), background: Color = Color.White, iconSize: Dp = 16.dp, weight: Float = 1.0f, onClick: () -> Unit)

Created By Kevin Zou On 2023/10/18

Wrap the Icon into the SwipeContent with required size so that the icon size will not change with the outside container


fun RowScope.SwipeIcon(background: Color = Color.White, painter: Painter, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)
fun RowScope.SwipeIcon(background: Color = Color.White, bitmap: ImageBitmap, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox.widget/-swipe-text.html b/swipebox/com.kevinnzou.swipebox.widget/-swipe-text.html new file mode 100644 index 0000000..1db61a1 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox.widget/-swipe-text.html @@ -0,0 +1,76 @@ + + + + + SwipeText + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SwipeText

+
+
fun RowScope.SwipeText(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, text: @Composable () -> Unit)

Created By Kevin Zou On 2023/10/18

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox.widget/index.html b/swipebox/com.kevinnzou.swipebox.widget/index.html new file mode 100644 index 0000000..158ab35 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox.widget/index.html @@ -0,0 +1,129 @@ + + + + + com.kevinnzou.swipebox.widget + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun RowScope.SwipeContent(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, content: @Composable () -> Unit)

Created By Kevin Zou On 2023/10/18

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun RowScope.SwipeIcon(background: Color = Color.White, bitmap: ImageBitmap, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)
fun RowScope.SwipeIcon(background: Color = Color.White, painter: Painter, contentDescription: String?, iconSize: Dp = 16.dp, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), weight: Float = 1.0f, onClick: () -> Unit)

fun RowScope.SwipeIcon(imageVector: ImageVector, contentDescription: String?, tint: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), background: Color = Color.White, iconSize: Dp = 16.dp, weight: Float = 1.0f, onClick: () -> Unit)

Created By Kevin Zou On 2023/10/18

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun RowScope.SwipeText(background: Color = Color.White, weight: Float = 1.0f, onClick: () -> Unit, text: @Composable () -> Unit)

Created By Kevin Zou On 2023/10/18

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-box.html b/swipebox/com.kevinnzou.swipebox/-swipe-box.html new file mode 100644 index 0000000..d82597c --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-box.html @@ -0,0 +1,76 @@ + + + + + SwipeBox + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SwipeBox

+
+
fun SwipeBox(modifier: Modifier = Modifier, state: SwipeableState<Int> = rememberSwipeableState(initialValue = 0), swipeDirection: SwipeDirection = SwipeDirection.EndToStart, startContentWidth: Dp = 0.dp, startContent: @Composable RowScope.(swipeableState: SwipeableState<Int>, startSwipeProgress: Float) -> Unit? = null, endContentWidth: Dp = 0.dp, endContent: @Composable RowScope.(swipeableState: SwipeableState<Int>, endSwipeProgress: Float) -> Unit? = null, thresholds: (from: Int, to: Int) -> ThresholdConfig = { _, _ -> FixedThreshold(12.dp) }, content: @Composable BoxScope.(swipeableState: SwipeableState<Int>, startSwipeProgress: Float, endSwipeProgress: Float) -> Unit)

Designed a box layout that you can swipe to show action boxes from both directions

Parameters

modifier

The modifier to be applied to the SwipeBox.

state

The state object to be used to control the SwipeBox.

swipeDirection

The direction to swipe to. If the direction is SwipeDirection.EndToStart, then only the endContent will be shown.

startContentWidth

The width of the start content which will be shown when the swipe direction is StartToEnd or Both.

startContent

The content of the start content. Two parameters will be provided to that content:

  1. swipeableState: SwipeableState, which can be used to change the swipe state.

  2. startSwipeProgress: Float, which represent the progress of the swipe of the start content, 0f for null startContent.

Note that the content will be layout in a RowScope with mutable width. Thus, for sub content inside it, you have to use the weight modifier to determine the width of the content instead of use the width modifier directly. Also, since the width of the container will change with swipe progress, the content inside the sub container have to use the requiredWidth modifier to avoid the abnormal recompose to that width change. Like size or visibility change. For content with just icon or text, I would recommend you to use the SwipeIcon and SwipeText which setup the size restriction for you and you only need to set the real content.

endContentWidth

The width of the end content which will be shown when the swipe direction is EndToStart or Both.

endContent

The content of the end content. Two parameters will be provided to that content:

  1. swipeableState: SwipeableState, which can be used to change the swipe state.

  2. endSwipeProgress: Float, which represent the progress of the swipe of the end content, 0f for null endContent.

Note that the content will be layout in a RowScope with mutable width. Thus, for sub content inside it, you have to use the weight modifier to determine the width of the content instead of use the width modifier directly. Also, since the width of the container will change with swipe progress, the content inside the sub container have to use the requiredWidth modifier to avoid the abnormal recompose to that width change. Like size or visibility change. For content with just icon or text, I would recommend you to use the SwipeIcon and SwipeText which setup the size restriction for you and you only need to set the real content.

thresholds

Specifies where the thresholds between the states are. The thresholds will be used to determine which state to animate to when swiping stops. This is represented as a lambda that takes two states and returns the threshold between them in the form of a ThresholdConfig. Note that the order of the states corresponds to the swipe direction.

content

The main content that will be shown at max width when there is no swipe action. It will be provided three parameters:

  1. swipeableState: SwipeableState, which can be used to change the swipe state.

  2. startSwipeProgress: Float, which represent the progress of the swipe of the start content, 0f for null startContent.

  3. endSwipeProgress: Float, which represent the progress of the swipe of the end content, 0f for null endContent.

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/-both/index.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-both/index.html new file mode 100644 index 0000000..5c31fd2 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-both/index.html @@ -0,0 +1,115 @@ + + + + + Both + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Both

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/-end-to-start/index.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-end-to-start/index.html new file mode 100644 index 0000000..45d1a79 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-end-to-start/index.html @@ -0,0 +1,115 @@ + + + + + EndToStart + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

EndToStart

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/-start-to-end/index.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-start-to-end/index.html new file mode 100644 index 0000000..ab19a70 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/-start-to-end/index.html @@ -0,0 +1,115 @@ + + + + + StartToEnd + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

StartToEnd

+ +
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/entries.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/entries.html new file mode 100644 index 0000000..88e0ca8 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/entries.html @@ -0,0 +1,76 @@ + + + + + entries + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

entries

+
+

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/index.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/index.html new file mode 100644 index 0000000..9eeed99 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/index.html @@ -0,0 +1,213 @@ + + + + + SwipeDirection + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

SwipeDirection

+ +
+
+
+
+
+

Entries

+
+
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+ +
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Properties

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns a representation of an immutable list of all enum entries, in the order they're declared.

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+ +
+
+
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

+
+
+
+
+ +
+
+
+ + +
Link copied to clipboard
+
+
+
+

Returns an array containing the constants of this enum type, in the order they're declared.

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/value-of.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/value-of.html new file mode 100644 index 0000000..b6024e2 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/value-of.html @@ -0,0 +1,76 @@ + + + + + valueOf + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

valueOf

+
+

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws

if this enum type has no constant with the specified name

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/-swipe-direction/values.html b/swipebox/com.kevinnzou.swipebox/-swipe-direction/values.html new file mode 100644 index 0000000..e111aa0 --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/-swipe-direction/values.html @@ -0,0 +1,76 @@ + + + + + values + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

values

+
+

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

+
+ +
+
+
+ + + diff --git a/swipebox/com.kevinnzou.swipebox/index.html b/swipebox/com.kevinnzou.swipebox/index.html new file mode 100644 index 0000000..6a5297e --- /dev/null +++ b/swipebox/com.kevinnzou.swipebox/index.html @@ -0,0 +1,118 @@ + + + + + com.kevinnzou.swipebox + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+

Package-level declarations

+
+
+
+
+
+

Types

+
+
+
+
+ + +
Link copied to clipboard
+
+ +
+
+
+
+
+

Functions

+
+
+
+
+ + +
Link copied to clipboard
+
+
+
+
fun SwipeBox(modifier: Modifier = Modifier, state: SwipeableState<Int> = rememberSwipeableState(initialValue = 0), swipeDirection: SwipeDirection = SwipeDirection.EndToStart, startContentWidth: Dp = 0.dp, startContent: @Composable RowScope.(swipeableState: SwipeableState<Int>, startSwipeProgress: Float) -> Unit? = null, endContentWidth: Dp = 0.dp, endContent: @Composable RowScope.(swipeableState: SwipeableState<Int>, endSwipeProgress: Float) -> Unit? = null, thresholds: (from: Int, to: Int) -> ThresholdConfig = { _, _ -> FixedThreshold(12.dp) }, content: @Composable BoxScope.(swipeableState: SwipeableState<Int>, startSwipeProgress: Float, endSwipeProgress: Float) -> Unit)

Designed a box layout that you can swipe to show action boxes from both directions

+
+
+
+
+
+
+
+
+
+ +
+
+
+ + + diff --git a/lib/index.html b/swipebox/index.html similarity index 67% rename from lib/index.html rename to swipebox/index.html index f1f802d..b8352bb 100644 --- a/lib/index.html +++ b/swipebox/index.html @@ -2,7 +2,7 @@ - lib + swipebox