Merge branch 'develop' of https://github.com/vector-im/element-x-android into dla/feature/custom_room_notification_settings_list

This commit is contained in:
David Langley 2023-10-18 22:07:14 +01:00
commit 87b8bfe99d
1981 changed files with 15504 additions and 5063 deletions

View file

@ -1,49 +0,0 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem
object VectorIcons {
val Copy = R.drawable.ic_content_copy
val Forward = R.drawable.ic_forward
val Delete = R.drawable.ic_delete
val Reply = R.drawable.ic_reply
val Edit = R.drawable.ic_edit
val DoorOpen = R.drawable.ic_door_open_24
val DeveloperMode = R.drawable.ic_developer_mode
val ReportContent = R.drawable.ic_report_content
val Groups = R.drawable.ic_groups
val Share = R.drawable.ic_share
val Poll = R.drawable.ic_poll
val PollEnd = R.drawable.ic_poll_end
val Bold = R.drawable.ic_bold
val BulletList = R.drawable.ic_bullet_list
val CodeBlock = R.drawable.ic_code_block
val IndentIncrease = R.drawable.ic_indent_increase
val IndentDecrease = R.drawable.ic_indent_decrease
val InlineCode = R.drawable.ic_inline_code
val Italic = R.drawable.ic_italic
val Link = R.drawable.ic_link
val NumberedList = R.drawable.ic_numbered_list
val Quote = R.drawable.ic_quote
val Strikethrough = R.drawable.ic_strikethrough
val Underline = R.drawable.ic_underline
val Mention = R.drawable.ic_mention
val Mute = R.drawable.ic_mute
val ThreadDecoration = R.drawable.ic_thread_decoration
val Plus = R.drawable.ic_plus
val Cancel = R.drawable.ic_cancel
}

View file

@ -0,0 +1,49 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.animation
import androidx.compose.animation.core.animateFloatAsState
import androidx.compose.animation.core.tween
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.State
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.platform.LocalInspectionMode
@Composable
fun alphaAnimation(
fromAlpha: Float = 0f,
toAlpha: Float = 1f,
delayMillis: Int = 150,
durationMillis: Int = 150,
label: String = "AlphaAnimation",
): State<Float> {
val firstAlpha = if (LocalInspectionMode.current) 1f else fromAlpha
var alpha by remember { mutableFloatStateOf(firstAlpha) }
LaunchedEffect(Unit) { alpha = toAlpha }
return animateFloatAsState(
targetValue = alpha,
animationSpec = tween(
delayMillis = delayMillis,
durationMillis = durationMillis,
),
label = label
)
}

View file

@ -37,7 +37,7 @@ import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.modifiers.blurCompat
import io.element.android.libraries.designsystem.modifiers.blurredShapeShadow
import io.element.android.libraries.designsystem.modifiers.canUseBlurMaskFilter
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.theme.ElementTheme
@ -149,25 +149,25 @@ sealed class ElementLogoAtomSize(
}
@Composable
@DayNightPreviews
@PreviewsDayNight
internal fun ElementLogoAtomMediumPreview() = ElementPreview {
ContentToPreview(ElementLogoAtomSize.Medium)
}
@Composable
@DayNightPreviews
@PreviewsDayNight
internal fun ElementLogoAtomLargePreview() = ElementPreview {
ContentToPreview(ElementLogoAtomSize.Large)
}
@Composable
@DayNightPreviews
@PreviewsDayNight
internal fun ElementLogoAtomMediumNoBlurShadowPreview() = ElementPreview {
ContentToPreview(ElementLogoAtomSize.Medium, useBlurredShadow = false)
}
@Composable
@DayNightPreviews
@PreviewsDayNight
internal fun ElementLogoAtomLargeNoBlurShadowPreview() = ElementPreview {
ContentToPreview(ElementLogoAtomSize.Large, useBlurredShadow = false)
}

View file

@ -26,7 +26,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.placeholderBackground
import io.element.android.libraries.theme.ElementTheme
@ -49,7 +49,7 @@ fun PlaceholderAtom(
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun PlaceholderAtomPreview() = ElementPreview {
// Use a Red background to see the shape

View file

@ -32,7 +32,7 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.temporaryColorBgSpecial
@ -96,7 +96,7 @@ private fun RoundedIconAtomSize.toIconSize(): Dp {
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun RoundedIconAtomPreview() = ElementPreview {
Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {

View file

@ -26,7 +26,7 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.unreadIndicator
import io.element.android.libraries.theme.ElementTheme
@ -46,7 +46,7 @@ fun UnreadIndicatorAtom(
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun UnreadIndicatorAtomPreview() = ElementPreview {
UnreadIndicatorAtom()

View file

@ -24,7 +24,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Button
import io.element.android.libraries.designsystem.theme.components.OutlinedButton
@ -45,7 +45,7 @@ fun ButtonColumnMolecule(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun ButtonColumnMoleculePreview() = ElementPreview {
ButtonColumnMolecule {

View file

@ -22,7 +22,7 @@ import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.TextButton
@ -39,7 +39,7 @@ fun ButtonRowMolecule(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun ButtonRowMoleculePreview() = ElementPreview {
ButtonRowMolecule {

View file

@ -31,7 +31,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.atomic.atoms.PlaceholderAtom
import io.element.android.libraries.designsystem.components.avatar.AvatarSize
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.placeholderBackground
import io.element.android.libraries.theme.ElementTheme
@ -61,7 +61,7 @@ fun IconTitlePlaceholdersRowMolecule(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun IconTitlePlaceholdersRowMoleculePreview() = ElementPreview {
IconTitlePlaceholdersRowMolecule(

View file

@ -31,8 +31,8 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.atomic.atoms.RoundedIconAtom
import io.element.android.libraries.designsystem.atomic.atoms.RoundedIconAtomSize
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
@ -49,7 +49,7 @@ import io.element.android.libraries.theme.ElementTheme
@Composable
fun IconTitleSubtitleMolecule(
title: String,
subTitle: String,
subTitle: String?,
modifier: Modifier = Modifier,
iconResourceId: Int? = null,
iconImageVector: ImageVector? = null,
@ -73,23 +73,25 @@ fun IconTitleSubtitleMolecule(
style = ElementTheme.typography.fontHeadingMdBold,
color = MaterialTheme.colorScheme.primary,
)
Spacer(Modifier.height(8.dp))
Text(
text = subTitle,
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
style = ElementTheme.typography.fontBodyMdRegular,
color = MaterialTheme.colorScheme.secondary,
)
if (subTitle != null) {
Spacer(Modifier.height(8.dp))
Text(
text = subTitle,
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
style = ElementTheme.typography.fontBodyMdRegular,
color = MaterialTheme.colorScheme.secondary,
)
}
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun IconTitleSubtitleMoleculePreview() = ElementPreview {
IconTitleSubtitleMolecule(
iconResourceId = R.drawable.ic_edit,
iconResourceId = R.drawable.ic_compound_chat,
title = "Title",
subTitle = "Sub iitle",
subTitle = "Subtitle",
)
}

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.designsystem.atomic.atoms
package io.element.android.libraries.designsystem.atomic.molecules
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
@ -24,17 +24,16 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Info
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.CommonDrawables
@Composable
fun InfoListItemMolecule(
@ -68,7 +67,7 @@ fun InfoListItemMolecule(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun InfoListItemMoleculePreview() {
ElementPreview {
@ -79,25 +78,25 @@ internal fun InfoListItemMoleculePreview() {
) {
InfoListItemMolecule(
message = { Text("A single item") },
icon = { Icon(imageVector = Icons.Default.Info, contentDescription = null) },
icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) },
position = InfoListItemPosition.Single,
backgroundColor = color,
)
InfoListItemMolecule(
message = { Text("A top item") },
icon = { Icon(imageVector = Icons.Default.Info, contentDescription = null) },
icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) },
position = InfoListItemPosition.Top,
backgroundColor = color,
)
InfoListItemMolecule(
message = { Text("A middle item") },
icon = { Icon(imageVector = Icons.Default.Info, contentDescription = null) },
icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) },
position = InfoListItemPosition.Middle,
backgroundColor = color,
)
InfoListItemMolecule(
message = { Text("A bottom item") },
icon = { Icon(imageVector = Icons.Default.Info, contentDescription = null) },
icon = { Icon(resourceId = CommonDrawables.ic_compound_info, contentDescription = null) },
position = InfoListItemPosition.Bottom,
backgroundColor = color,
)

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package io.element.android.libraries.designsystem.atomic.molecules
package io.element.android.libraries.designsystem.atomic.organisms
import androidx.annotation.DrawableRes
import androidx.compose.foundation.layout.Arrangement
@ -27,12 +27,15 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.atomic.atoms.InfoListItemMolecule
import io.element.android.libraries.designsystem.atomic.atoms.InfoListItemPosition
import io.element.android.libraries.designsystem.atomic.molecules.InfoListItemMolecule
import io.element.android.libraries.designsystem.atomic.molecules.InfoListItemPosition
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
@Composable
fun InfoListOrganism(
@ -84,3 +87,17 @@ data class InfoListItem(
val iconVector: ImageVector? = null,
val iconComposable: @Composable () -> Unit = {},
)
@PreviewsDayNight
@Composable
internal fun InfoListOrganismPreview() = ElementPreview {
val items = persistentListOf(
InfoListItem(message = "A top item"),
InfoListItem(message = "A middle item"),
InfoListItem(message = "A bottom item"),
)
InfoListOrganism(
items,
backgroundColor = ElementTheme.materialColors.surfaceVariant,
)
}

View file

@ -26,7 +26,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
@ -65,7 +65,7 @@ fun HeaderFooterPage(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun HeaderFooterPagePreview() = ElementPreview {
HeaderFooterPage(

View file

@ -30,7 +30,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
@ -87,7 +87,7 @@ fun OnBoardingPage(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun OnBoardingPagePreview() = ElementPreview {
OnBoardingPage(

View file

@ -38,7 +38,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.text.withColoredPeriod
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
@ -134,7 +134,7 @@ private fun SunsetBackground(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun SunsetPagePreview() = ElementPreview {
SunsetPage(

View file

@ -33,8 +33,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.IconButton
import androidx.compose.material3.TopAppBarDefaults
@ -100,20 +98,20 @@ import androidx.compose.ui.unit.toSize
import coil.imageLoader
import coil.request.DefaultRequestOptions
import coil.request.ImageRequest
import coil.size.Size
import com.airbnb.android.showkase.annotation.ShowkaseComposable
import com.vanniktech.blurhash.BlurHash
import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.colors.AvatarColorsProvider
import io.element.android.libraries.designsystem.components.avatar.AvatarData
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.text.toDp
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.MediumTopAppBar
import io.element.android.libraries.designsystem.theme.components.Scaffold
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
@ -130,7 +128,9 @@ object BloomDefaults {
* Number of components to use with BlurHash to generate the blur effect.
* Larger values mean more detailed blurs.
*/
const val HASH_COMPONENTS = 5
const val HASH_COMPONENTS = 4
const val ENCODE_SIZE_PX = 20
const val DECODE_SIZE_PX = 5
/** Default bloom layers. */
@Composable
@ -190,7 +190,11 @@ fun Modifier.bloom(
if (hash == null) return@composed this
val hashedBitmap = remember(hash) {
BlurHash.decode(hash, BloomDefaults.HASH_COMPONENTS, BloomDefaults.HASH_COMPONENTS)?.asImageBitmap()
BlurHash.decode(
blurHash = hash,
width = BloomDefaults.DECODE_SIZE_PX,
height = BloomDefaults.DECODE_SIZE_PX,
)?.asImageBitmap()
} ?: return@composed this
val density = LocalDensity.current
val pixelSize = remember(blurSize, density) { blurSize.toIntSize(density) }
@ -328,7 +332,6 @@ fun Modifier.avatarBloom(
// Request the avatar contents to use as the bloom source
val context = LocalContext.current
val density = LocalDensity.current
if (avatarData.url != null) {
val painterRequest = remember(avatarData) {
ImageRequest.Builder(context)
@ -338,7 +341,7 @@ fun Modifier.avatarBloom(
// Needed to be able to read pixels from the Bitmap for the hash
.allowHardware(false)
// Reduce size so it loads faster for large avatars
.size(with(density) { Size(64.dp.roundToPx(), 64.dp.roundToPx()) })
.size(BloomDefaults.ENCODE_SIZE_PX, BloomDefaults.ENCODE_SIZE_PX)
.build()
}
@ -350,9 +353,9 @@ fun Modifier.avatarBloom(
context.imageLoader.execute(painterRequest).drawable ?: return@withContext
val bitmap = (drawable as? BitmapDrawable)?.bitmap ?: return@withContext
blurHash = BlurHash.encode(
bitmap,
BloomDefaults.HASH_COMPONENTS,
BloomDefaults.HASH_COMPONENTS
bitmap = bitmap,
componentX = BloomDefaults.HASH_COMPONENTS,
componentY = BloomDefaults.HASH_COMPONENTS,
)
}
}
@ -372,14 +375,18 @@ fun Modifier.avatarBloom(
// There is no URL so we'll generate an avatar with the initials and use that as the bloom source
val avatarColors = AvatarColorsProvider.provide(avatarData.id, ElementTheme.isLightTheme)
val initialsBitmap = initialsBitmap(
width = avatarData.size.dp,
height = avatarData.size.dp,
width = BloomDefaults.ENCODE_SIZE_PX.toDp(),
height = BloomDefaults.ENCODE_SIZE_PX.toDp(),
text = avatarData.initial,
textColor = avatarColors.foreground,
textColor = avatarColors.foreground,
backgroundColor = avatarColors.background,
)
val hash = remember(avatarData, avatarColors) {
BlurHash.encode(initialsBitmap.asAndroidBitmap(), BloomDefaults.HASH_COMPONENTS, BloomDefaults.HASH_COMPONENTS)
BlurHash.encode(
bitmap = initialsBitmap.asAndroidBitmap(),
componentX = BloomDefaults.HASH_COMPONENTS,
componentY = BloomDefaults.HASH_COMPONENTS,
)
}
bloom(
hash = hash,
@ -430,7 +437,7 @@ private fun initialsBitmap(
val bitmap = Bitmap.createBitmap(width.roundToPx(), height.roundToPx(), Bitmap.Config.ARGB_8888).asImageBitmap()
androidx.compose.ui.graphics.Canvas(bitmap).also { canvas ->
canvas.drawCircle(centerPx.toOffset(), width.toPx() / 2, backgroundPaint)
canvas.nativeCanvas.drawText(text, centerPx.x.toFloat() - result.size.width/2, centerPx.y * 2f - result.size.height/2 - 4, textPaint)
canvas.nativeCanvas.drawText(text, centerPx.x.toFloat() - result.size.width / 2, centerPx.y * 2f - result.size.height / 2 - 4, textPaint)
}
bitmap
}
@ -457,7 +464,7 @@ fun DrawScope.drawWithLayer(block: DrawScope.() -> Unit) {
}
@OptIn(ExperimentalMaterial3Api::class)
@DayNightPreviews
@PreviewsDayNight
@ShowkaseComposable(group = PreviewGroup.Bloom)
@Composable
internal fun BloomPreview() {
@ -467,7 +474,9 @@ internal fun BloomPreview() {
val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior(topAppBarState)
ElementPreview {
Scaffold(
modifier = Modifier.fillMaxSize().nestedScroll(scrollBehavior.nestedScrollConnection),
modifier = Modifier
.fillMaxSize()
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
Box {
MediumTopAppBar(
@ -499,7 +508,10 @@ internal fun BloomPreview() {
},
actions = {
IconButton(onClick = {}) {
Icon(imageVector = Icons.Default.Share, contentDescription = null)
Icon(
resourceId = CommonDrawables.ic_compound_share_android,
contentDescription = null,
)
}
},
title = {
@ -525,21 +537,26 @@ internal fun BloomPreview() {
}
}
class InitialsColorStateProvider : PreviewParameterProvider<Int> {
class InitialsColorIntProvider : PreviewParameterProvider<Int> {
override val values: Sequence<Int>
get() = sequenceOf(0, 1, 2, 3, 4, 5, 6, 7)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
@ShowkaseComposable(group = PreviewGroup.Bloom)
internal fun BloomInitialsPreview(@PreviewParameter(InitialsColorStateProvider::class) color: Int) {
internal fun BloomInitialsPreview(@PreviewParameter(InitialsColorIntProvider::class) color: Int) {
ElementPreview {
val avatarColors = AvatarColorsProvider.provide("$color", ElementTheme.isLightTheme)
val bitmap = initialsBitmap(text = "F", backgroundColor = avatarColors.background, textColor = avatarColors.foreground)
val hash = BlurHash.encode(bitmap.asAndroidBitmap(), BloomDefaults.HASH_COMPONENTS, BloomDefaults.HASH_COMPONENTS)
val hash = BlurHash.encode(
bitmap = bitmap.asAndroidBitmap(),
componentX = BloomDefaults.HASH_COMPONENTS,
componentY = BloomDefaults.HASH_COMPONENTS,
)
Box(
modifier = Modifier.size(256.dp)
modifier = Modifier
.size(256.dp)
.bloom(
hash = hash,
background = if (ElementTheme.isLightTheme) {

View file

@ -71,7 +71,7 @@ fun BlurHashAsyncImage(
}
@Composable
fun BlurHashImage(
private fun BlurHashImage(
blurHash: String?,
modifier: Modifier = Modifier,
contentDescription: String? = null,

View file

@ -25,7 +25,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.OutlinedTextField
import io.element.android.libraries.designsystem.theme.components.Text
@ -65,7 +65,7 @@ fun LabelledOutlinedTextField(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun LabelledOutlinedTextFieldPreview() = ElementPreview {
Column {

View file

@ -25,7 +25,7 @@ import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.theme.components.TextField
@ -65,7 +65,7 @@ fun LabelledTextField(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun LabelledTextFieldPreview() = ElementPreview {
Column {

View file

@ -25,7 +25,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.R
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.theme.ElementTheme
@ -49,7 +49,7 @@ fun PinIcon(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun PinIconPreview() = ElementPreview {
PinIcon()

View file

@ -26,7 +26,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Button
import io.element.android.libraries.designsystem.theme.components.Text
@ -55,7 +55,7 @@ fun AsyncFailure(
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun AsyncFailurePreview() = ElementPreview {
AsyncFailure(

View file

@ -23,7 +23,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.CircularProgressIndicator
@ -39,7 +39,7 @@ fun AsyncLoading(modifier: Modifier = Modifier) {
}
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun AsyncLoadingPreview() = ElementPreview {
AsyncLoading()

View file

@ -24,12 +24,12 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.colors.avatarColorsLight
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun UserAvatarPreview() = ElementPreview {
Column(

View file

@ -16,25 +16,25 @@
package io.element.android.libraries.designsystem.components.button
import androidx.annotation.DrawableRes
import androidx.compose.foundation.layout.Column
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.IconButton
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.ui.strings.CommonStrings
@Composable
fun BackButton(
onClick: () -> Unit,
modifier: Modifier = Modifier,
imageVector: ImageVector = Icons.Default.ArrowBack,
// TODO Handle RTL languages
@DrawableRes resourceId: Int = CommonDrawables.ic_compound_arrow_left,
contentDescription: String = stringResource(CommonStrings.action_back),
enabled: Boolean = true,
) {
@ -43,7 +43,7 @@ fun BackButton(
onClick = onClick,
enabled = enabled,
) {
Icon(imageVector = imageVector, contentDescription = contentDescription)
Icon(resourceId = resourceId, contentDescription = contentDescription)
}
}

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.designsystem.components.button
import androidx.annotation.DrawableRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
@ -24,8 +25,6 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Share
import androidx.compose.material.ripple.rememberRipple
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
@ -33,19 +32,19 @@ import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@Composable
fun MainActionButton(
title: String,
icon: ImageVector,
@DrawableRes iconResourceId: Int,
onClick: () -> Unit,
modifier: Modifier = Modifier,
enabled: Boolean = true,
@ -64,7 +63,7 @@ fun MainActionButton(
) {
val tintColor = if (enabled) LocalContentColor.current else MaterialTheme.colorScheme.secondary
Icon(
icon,
resourceId = iconResourceId,
contentDescription = contentDescription,
tint = tintColor,
)
@ -88,8 +87,17 @@ internal fun MainActionButtonPreview() {
@Composable
private fun ContentsToPreview() {
Row(Modifier.padding(10.dp)) {
MainActionButton(title = "Share", icon = Icons.Outlined.Share, onClick = { })
MainActionButton(
title = "Share",
iconResourceId = CommonDrawables.ic_compound_share_android,
onClick = { },
)
Spacer(modifier = Modifier.width(20.dp))
MainActionButton(title = "Share", icon = Icons.Outlined.Share, onClick = { }, enabled = false)
MainActionButton(
title = "Share",
iconResourceId = CommonDrawables.ic_compound_share_android,
onClick = { },
enabled = false,
)
}
}

View file

@ -27,7 +27,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.airbnb.android.showkase.annotation.ShowkaseComposable
import io.element.android.libraries.designsystem.components.list.TextFieldListItem
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.DialogPreview
@ -72,7 +72,7 @@ fun ListDialog(
}
@Composable
internal fun ListDialogContent(
private fun ListDialogContent(
listItems: LazyListScope.() -> Unit,
onDismissRequest: () -> Unit,
onSubmitClicked: () -> Unit,
@ -98,7 +98,7 @@ internal fun ListDialogContent(
}
}
@DayNightPreviews
@PreviewsDayNight
@ShowkaseComposable(group = PreviewGroup.Dialogs)
@Composable
internal fun ListDialogContentPreview() {

View file

@ -29,7 +29,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.airbnb.android.showkase.annotation.ShowkaseComposable
import io.element.android.libraries.designsystem.components.list.CheckboxListItem
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.DialogPreview
@ -78,7 +78,7 @@ fun MultipleSelectionDialog(
}
@Composable
internal fun MultipleSelectionDialogContent(
private fun MultipleSelectionDialogContent(
options: ImmutableList<ListOption>,
confirmButtonTitle: String,
onConfirmClicked: (List<Int>) -> Unit,
@ -126,7 +126,7 @@ internal fun MultipleSelectionDialogContent(
}
}
@DayNightPreviews
@PreviewsDayNight
@ShowkaseComposable(group = PreviewGroup.Dialogs)
@Composable
internal fun MultipleSelectionDialogContentPreview() {

View file

@ -27,7 +27,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import com.airbnb.android.showkase.annotation.ShowkaseComposable
import io.element.android.libraries.designsystem.components.list.RadioButtonListItem
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.DialogPreview
@ -74,7 +74,7 @@ fun SingleSelectionDialog(
}
@Composable
internal fun SingleSelectionDialogContent(
private fun SingleSelectionDialogContent(
options: ImmutableList<ListOption>,
onOptionSelected: (Int) -> Unit,
onDismissRequest: () -> Unit,
@ -107,7 +107,7 @@ internal fun SingleSelectionDialogContent(
}
}
@DayNightPreviews
@PreviewsDayNight
@ShowkaseComposable(group = PreviewGroup.Dialogs)
@Composable
internal fun SingleSelectionDialogContentPreview() {

View file

@ -20,9 +20,6 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Announcement
import androidx.compose.material.icons.filled.BugReport
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
@ -30,6 +27,7 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@Composable
@ -54,7 +52,7 @@ fun PreferenceCategory(
}
@Composable
fun PreferenceCategoryTitle(title: String, modifier: Modifier = Modifier) {
private fun PreferenceCategoryTitle(title: String, modifier: Modifier = Modifier) {
Text(
modifier = modifier.padding(
top = 20.dp,
@ -79,11 +77,11 @@ private fun ContentToPreview() {
) {
PreferenceText(
title = "Title",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
)
PreferenceSwitch(
title = "Switch",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_threads,
isChecked = true
)
PreferenceSlide(

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.designsystem.components.preferences
import androidx.annotation.DrawableRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
@ -23,8 +24,6 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Announcement
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -38,6 +37,7 @@ import io.element.android.libraries.designsystem.theme.components.Checkbox
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.toEnabledColor
import io.element.android.libraries.designsystem.toSecondaryEnabledColor
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@Composable
@ -48,6 +48,7 @@ fun PreferenceCheckbox(
supportingText: String? = null,
enabled: Boolean = true,
icon: ImageVector? = null,
@DrawableRes iconResourceId: Int? = null,
showIconAreaIfNoIcon: Boolean = false,
onCheckedChange: (Boolean) -> Unit = {},
) {
@ -61,6 +62,7 @@ fun PreferenceCheckbox(
) {
PreferenceIcon(
icon = icon,
iconResourceId = iconResourceId,
enabled = enabled,
isVisible = showIconAreaIfNoIcon
)
@ -100,14 +102,14 @@ private fun ContentToPreview() {
Column {
PreferenceCheckbox(
title = "Checkbox",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_threads,
enabled = true,
isChecked = true
)
PreferenceCheckbox(
title = "Checkbox with supporting text",
supportingText = "Supporting text",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_threads,
enabled = true,
isChecked = true
)

View file

@ -28,25 +28,23 @@ import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.systemBarsPadding
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Announcement
import androidx.compose.material.icons.filled.BugReport
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.style.TextOverflow
import io.element.android.libraries.designsystem.components.button.BackButton
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.aliasScreenTitle
import io.element.android.libraries.designsystem.theme.components.Scaffold
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.theme.components.TopAppBar
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@OptIn(ExperimentalLayoutApi::class)
@Composable
fun PreferenceView(
fun PreferencePage(
title: String,
modifier: Modifier = Modifier,
onBackPressed: () -> Unit = {},
@ -81,7 +79,7 @@ fun PreferenceView(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun PreferenceTopAppBar(
private fun PreferenceTopAppBar(
title: String,
modifier: Modifier = Modifier,
onBackPressed: () -> Unit = {},
@ -103,10 +101,10 @@ fun PreferenceTopAppBar(
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun PreferenceViewPreview() = ElementPreview {
PreferenceView(
PreferencePage(
title = "Preference screen"
) {
PreferenceCategory(
@ -115,18 +113,18 @@ internal fun PreferenceViewPreview() = ElementPreview {
PreferenceText(
title = "Title",
subtitle = "Some other text",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
)
PreferenceDivider()
PreferenceSwitch(
title = "Switch",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_threads,
isChecked = true,
)
PreferenceDivider()
PreferenceCheckbox(
title = "Checkbox",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_notifications,
isChecked = true,
)
PreferenceDivider()

View file

@ -16,14 +16,13 @@
package io.element.android.libraries.designsystem.components.preferences
import androidx.annotation.DrawableRes
import androidx.annotation.FloatRange
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.defaultMinSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Person
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
@ -35,6 +34,7 @@ import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.theme.components.Slider
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.toEnabledColor
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@Composable
@ -44,6 +44,7 @@ fun PreferenceSlide(
value: Float,
modifier: Modifier = Modifier,
icon: ImageVector? = null,
@DrawableRes iconResourceId: Int? = null,
showIconAreaIfNoIcon: Boolean = false,
enabled: Boolean = true,
summary: String? = null,
@ -56,7 +57,11 @@ fun PreferenceSlide(
.defaultMinSize(minHeight = preferenceMinHeight)
.padding(vertical = 4.dp, horizontal = preferencePaddingHorizontal),
) {
PreferenceIcon(icon = icon, isVisible = showIconAreaIfNoIcon)
PreferenceIcon(
icon = icon,
iconResourceId = iconResourceId,
isVisible = showIconAreaIfNoIcon,
)
Column(
modifier = Modifier
.weight(1f),
@ -90,7 +95,7 @@ internal fun PreferenceSlidePreview() = ElementThemedPreview { ContentToPreview(
@Composable
private fun ContentToPreview() {
PreferenceSlide(
icon = Icons.Default.Person,
iconResourceId = CommonDrawables.ic_compound_user_profile,
title = "Slide",
summary = "Summary",
value = 0.75F

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.designsystem.components.preferences
import androidx.annotation.DrawableRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
@ -25,8 +26,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Announcement
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -40,6 +39,7 @@ import io.element.android.libraries.designsystem.theme.components.Switch
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.toEnabledColor
import io.element.android.libraries.designsystem.toSecondaryEnabledColor
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@Composable
@ -50,6 +50,7 @@ fun PreferenceSwitch(
subtitle: String? = null,
enabled: Boolean = true,
icon: ImageVector? = null,
@DrawableRes iconResourceId: Int? = null,
showIconAreaIfNoIcon: Boolean = false,
onCheckedChange: (Boolean) -> Unit = {},
switchAlignment: Alignment.Vertical = Alignment.CenterVertically
@ -64,6 +65,7 @@ fun PreferenceSwitch(
) {
PreferenceIcon(
icon = icon,
iconResourceId = iconResourceId,
enabled = enabled,
isVisible = showIconAreaIfNoIcon
)
@ -107,7 +109,7 @@ private fun ContentToPreview() {
PreferenceSwitch(
title = "Switch",
subtitle = "Subtitle Switch",
icon = Icons.Default.Announcement,
iconResourceId = CommonDrawables.ic_compound_threads,
enabled = true,
isChecked = true
)

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.designsystem.components.preferences
import androidx.annotation.DrawableRes
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
@ -25,8 +26,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.progressSemantics
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.BugReport
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
@ -41,6 +40,7 @@ import io.element.android.libraries.designsystem.theme.components.CircularProgre
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.toEnabledColor
import io.element.android.libraries.designsystem.toSecondaryEnabledColor
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
/**
@ -55,6 +55,7 @@ fun PreferenceText(
currentValue: String? = null,
loadingCurrentValue: Boolean = false,
icon: ImageVector? = null,
@DrawableRes iconResourceId: Int? = null,
showIconAreaIfNoIcon: Boolean = false,
tintColor: Color? = null,
onClick: () -> Unit = {},
@ -71,6 +72,7 @@ fun PreferenceText(
) {
PreferenceIcon(
icon = icon,
iconResourceId = iconResourceId,
enabled = enabled,
isVisible = showIconAreaIfNoIcon,
tintColor = tintColor ?: enabled.toSecondaryEnabledColor(),
@ -126,40 +128,40 @@ private fun ContentToPreview() {
) {
PreferenceText(
title = "Title",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
)
PreferenceText(
title = "Title",
subtitle = "Some content",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
)
PreferenceText(
title = "Title",
subtitle = "Some content",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
currentValue = "123",
)
PreferenceText(
title = "Title",
subtitle = "Some content",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
currentValue = "123",
enabled = false,
)
PreferenceText(
title = "Title",
subtitle = "Some content",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
loadingCurrentValue = true,
)
PreferenceText(
title = "Title",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
currentValue = "123",
)
PreferenceText(
title = "Title",
icon = Icons.Default.BugReport,
iconResourceId = CommonDrawables.ic_compound_chat_problem,
loadingCurrentValue = true,
)
PreferenceText(

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.designsystem.components.preferences.components
import androidx.annotation.DrawableRes
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
@ -34,15 +35,17 @@ import io.element.android.libraries.designsystem.toSecondaryEnabledColor
@Composable
fun PreferenceIcon(
icon: ImageVector?,
modifier: Modifier = Modifier,
icon: ImageVector? = null,
@DrawableRes iconResourceId: Int? = null,
tintColor: Color? = null,
enabled: Boolean = true,
isVisible: Boolean = true,
) {
if (icon != null) {
if (icon != null || iconResourceId != null) {
Icon(
imageVector = icon,
resourceId = iconResourceId,
contentDescription = "",
tint = tintColor ?: enabled.toSecondaryEnabledColor(),
modifier = modifier
@ -61,5 +64,5 @@ internal fun PreferenceIconPreview(@PreviewParameter(ImageVectorProvider::class)
@Composable
private fun ContentToPreview(content: ImageVector?) {
PreferenceIcon(content)
PreferenceIcon(icon = content)
}

View file

@ -0,0 +1,133 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.icons
import io.element.android.libraries.designsystem.R
internal val iconsCompound = listOf(
R.drawable.ic_compound_arrow_left,
R.drawable.ic_compound_arrow_right,
R.drawable.ic_compound_arrow_up_right,
R.drawable.ic_compound_block,
R.drawable.ic_compound_chat,
R.drawable.ic_compound_chat_new,
R.drawable.ic_compound_chat_problem,
R.drawable.ic_compound_check,
R.drawable.ic_compound_check_circle,
R.drawable.ic_compound_chevron_down,
R.drawable.ic_compound_chevron_left,
R.drawable.ic_compound_chevron_right,
R.drawable.ic_compound_chevron_up_down,
R.drawable.ic_compound_close,
R.drawable.ic_compound_computer,
R.drawable.ic_compound_delete,
R.drawable.ic_compound_download,
R.drawable.ic_compound_drag_grid,
R.drawable.ic_compound_drag_list,
R.drawable.ic_compound_end_call,
R.drawable.ic_compound_error,
R.drawable.ic_compound_export_archive,
R.drawable.ic_compound_extensions,
R.drawable.ic_compound_favourite_off,
R.drawable.ic_compound_favourite_on,
R.drawable.ic_compound_files,
R.drawable.ic_compound_filter,
R.drawable.ic_compound_grid_view,
R.drawable.ic_compound_info,
R.drawable.ic_compound_leave,
R.drawable.ic_compound_link,
R.drawable.ic_compound_lock,
R.drawable.ic_compound_lock_off,
R.drawable.ic_compound_marker_read_receipts,
R.drawable.ic_compound_mention,
R.drawable.ic_compound_mic_off_outline,
R.drawable.ic_compound_mic_off_solid,
R.drawable.ic_compound_mic_on_outline,
R.drawable.ic_compound_mic_on_solid,
R.drawable.ic_compound_mobile,
R.drawable.ic_compound_notifications,
R.drawable.ic_compound_notifications_off,
R.drawable.ic_compound_notifications_solid,
R.drawable.ic_compound_notifications_solid_off,
R.drawable.ic_compound_offline,
R.drawable.ic_compound_overflow_horizontal,
R.drawable.ic_compound_overflow_vertical,
R.drawable.ic_compound_polls,
R.drawable.ic_compound_pop_out,
R.drawable.ic_compound_public,
R.drawable.ic_compound_search,
R.drawable.ic_compound_settings,
R.drawable.ic_compound_settings_solid,
R.drawable.ic_compound_share,
R.drawable.ic_compound_share_android,
R.drawable.ic_compound_share_screen_outline,
R.drawable.ic_compound_share_screen_solid,
R.drawable.ic_compound_spotlight_view,
R.drawable.ic_compound_threads,
R.drawable.ic_compound_threads_solid,
R.drawable.ic_compound_user_add,
R.drawable.ic_compound_user_add_solid,
R.drawable.ic_compound_user_profile,
R.drawable.ic_compound_verified,
R.drawable.ic_compound_video_call,
R.drawable.ic_compound_video_call_declined,
R.drawable.ic_compound_video_call_missed,
R.drawable.ic_compound_video_call_off,
R.drawable.ic_compound_visibility_off,
R.drawable.ic_compound_visibility_on,
R.drawable.ic_compound_voice_call,
R.drawable.ic_compound_web_browser,
)
internal val iconsSeptember = listOf(
R.drawable.ic_september_add_reaction,
R.drawable.ic_september_attachment,
R.drawable.ic_september_compose_button,
R.drawable.ic_september_copy,
R.drawable.ic_september_decryption_error,
R.drawable.ic_september_edit_outline,
R.drawable.ic_september_edit_solid_16,
R.drawable.ic_september_forward,
R.drawable.ic_september_location,
R.drawable.ic_september_photo_camera,
R.drawable.ic_september_photo_video_library,
R.drawable.ic_september_reply,
R.drawable.ic_september_send,
R.drawable.ic_september_take_photo_camera,
R.drawable.ic_september_text_formatting,
R.drawable.ic_september_video_call,
R.drawable.ic_september_view_source,
)
// This list and all the drawable it contains should be removed at some point.
// All the icons should be defined in Compound.
internal val iconsOther = listOf(
R.drawable.ic_developer_mode,
R.drawable.ic_groups,
R.drawable.ic_indent_decrease,
R.drawable.ic_indent_increase,
R.drawable.ic_inline_code,
R.drawable.ic_italic,
R.drawable.ic_link,
R.drawable.ic_numbered_list,
R.drawable.ic_plus,
R.drawable.ic_poll_end,
R.drawable.ic_quote,
R.drawable.ic_strikethrough,
R.drawable.ic_thread_decoration,
R.drawable.ic_underline,
)

View file

@ -0,0 +1,132 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.icons
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.theme.ElementTheme
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toPersistentList
@PreviewsDayNight
@Composable
internal fun IconsCompoundPart1Preview() = ElementPreview {
IconsPreview(
title = "R.drawable.ic_compound_* 1 / 2",
iconsList = iconsCompound.take(36).toPersistentList(),
iconNameTransform = { name ->
name.removePrefix("ic_compound_")
.replace("_", " ")
})
}
@PreviewsDayNight
@Composable
internal fun IconsCompoundPart2Preview() = ElementPreview {
IconsPreview(
title = "R.drawable.ic_compound_* 2 / 2",
iconsList = iconsCompound.drop(36).toPersistentList(),
iconNameTransform = { name ->
name.removePrefix("ic_compound_")
.replace("_", " ")
})
}
@PreviewsDayNight
@Composable
internal fun IconsSeptemberPreview() = ElementPreview {
IconsPreview(
title = "R.drawable.ic_september_*",
iconsList = iconsSeptember.toPersistentList(),
iconNameTransform = { name ->
name.removePrefix("ic_september_")
.replace("_", " ")
})
}
@PreviewsDayNight
@Composable
internal fun IconsOtherPreview() = ElementPreview {
IconsPreview(
title = "R.drawable.ic_*",
iconsList = iconsOther.toPersistentList(),
iconNameTransform = { name ->
name.removePrefix("ic_")
.replace("_", " ")
})
}
@Composable
private fun IconsPreview(
title: String,
iconsList: ImmutableList<Int>,
iconNameTransform: (String) -> String,
modifier: Modifier = Modifier,
) = ElementPreview {
val context = LocalContext.current
Column(
modifier = modifier,
verticalArrangement = Arrangement.spacedBy(2.dp),
) {
Text(
modifier = Modifier.fillMaxWidth(),
style = ElementTheme.typography.fontHeadingSmMedium,
text = title,
textAlign = TextAlign.Center,
)
iconsList.chunked(6).forEach { iconsRow ->
Row(horizontalArrangement = Arrangement.spacedBy(1.dp)) {
iconsRow.forEach { icon ->
Column(
modifier = Modifier.width(48.dp),
horizontalAlignment = Alignment.CenterHorizontally,
) {
Icon(
modifier = Modifier.padding(2.dp),
resourceId = icon,
contentDescription = null,
)
Text(
text = iconNameTransform(
context.resources
.getResourceEntryName(icon)
),
modifier = Modifier.fillMaxWidth(),
textAlign = TextAlign.Center,
style = ElementTheme.typography.fontBodyXsMedium,
color = ElementTheme.colors.textSecondary,
)
}
}
}
}
}
}

View file

@ -21,7 +21,6 @@ import android.os.Build
import androidx.annotation.ChecksSdkIntAtLeast
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.draw.BlurredEdgeTreatment
import androidx.compose.ui.draw.blur
import androidx.compose.ui.draw.drawBehind
@ -94,8 +93,8 @@ fun Modifier.blurredShapeShadow(
fun Modifier.blurCompat(
radius: Dp,
edgeTreatment: BlurredEdgeTreatment = BlurredEdgeTreatment.Rectangle
): Modifier = composed {
when {
): Modifier {
return when {
radius.value == 0f -> this
canUseBlur() -> blur(radius, edgeTreatment)
else -> this // Added in case we find a way to make this work on older devices

View file

@ -16,90 +16,11 @@
package io.element.android.libraries.designsystem.preview
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.theme.components.Surface
import io.element.android.libraries.theme.ElementTheme
@Composable
fun ElementPreviewLight(
showBackground: Boolean = true,
content: @Composable () -> Unit
) {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content
)
}
@Composable
fun ElementPreviewDark(
showBackground: Boolean = true,
content: @Composable () -> Unit
) {
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}
@Composable
@Suppress("ModifierMissing")
fun ElementThemedPreview(
showBackground: Boolean = true,
vertical: Boolean = true,
content: @Composable () -> Unit,
) {
Box(
modifier = Modifier
.background(Color.Gray)
.padding(4.dp)
) {
if (vertical) {
Column {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content,
)
Spacer(modifier = Modifier.height(4.dp))
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}
} else {
Row {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content,
)
Spacer(modifier = Modifier.width(4.dp))
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}
}
}
}
@Composable
@Suppress("ModifierMissing")
fun ElementPreview(

View file

@ -0,0 +1,31 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.preview
import androidx.compose.runtime.Composable
@Composable
fun ElementPreviewDark(
showBackground: Boolean = true,
content: @Composable () -> Unit
) {
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}

View file

@ -0,0 +1,31 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.preview
import androidx.compose.runtime.Composable
@Composable
fun ElementPreviewLight(
showBackground: Boolean = true,
content: @Composable () -> Unit
) {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content
)
}

View file

@ -0,0 +1,74 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.preview
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
@Composable
@Suppress("ModifierMissing")
fun ElementThemedPreview(
showBackground: Boolean = true,
vertical: Boolean = true,
content: @Composable () -> Unit,
) {
Box(
modifier = Modifier
.background(Color.Gray)
.padding(4.dp)
) {
if (vertical) {
Column {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content,
)
Spacer(modifier = Modifier.height(4.dp))
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}
} else {
Row {
ElementPreview(
darkTheme = false,
showBackground = showBackground,
content = content,
)
Spacer(modifier = Modifier.width(4.dp))
ElementPreview(
darkTheme = true,
showBackground = showBackground,
content = content
)
}
}
}
}

View file

@ -23,4 +23,4 @@ import androidx.compose.ui.tooling.preview.Preview
* adding extra vertical space so long scrolling components can be displayed. This is a helper for that functionality.
*/
@Preview(heightDp = 1000)
annotation class LargeHeightPreview
annotation class PreviewWithLargeHeight

View file

@ -51,4 +51,4 @@ const val DAY_MODE_NAME = "D"
uiMode = Configuration.UI_MODE_NIGHT_YES,
fontScale = 1f,
)
annotation class DayNightPreviews
annotation class PreviewsDayNight

View file

@ -26,7 +26,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
/**
@ -64,7 +64,7 @@ private fun HorizontalRulerItem(height: Dp, color: Color) {
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun HorizontalRulerPreview() = ElementPreview {
HorizontalRuler()

View file

@ -26,7 +26,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
/**
@ -64,7 +64,7 @@ private fun VerticalRulerItem(width: Dp, color: Color) {
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun VerticalRulerPreview() = ElementPreview {
VerticalRuler()

View file

@ -21,7 +21,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.theme.components.ButtonSize
import io.element.android.libraries.designsystem.theme.components.OutlinedButton
@ -62,7 +62,7 @@ fun WithRulers(
)
}
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun WithRulerPreview() = ElementPreview {
WithRulers(xRulersOffset = 20.dp, yRulersOffset = 15.dp) {

View file

@ -21,9 +21,10 @@ import androidx.compose.animation.core.tween
import androidx.compose.foundation.MutatePriority
import androidx.compose.foundation.gestures.DraggableState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.FloatState
import androidx.compose.runtime.Stable
import androidx.compose.runtime.State
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
@ -41,8 +42,8 @@ class SwipeableActionsState {
/**
* The current position (in pixels) of the content.
*/
val offset: State<Float> get() = offsetState
private var offsetState = mutableStateOf(0f)
val offset: FloatState get() = offsetState
private var offsetState = mutableFloatStateOf(0f)
/**
* Whether the content is currently animating to reset its offset after it was swiped.
@ -51,21 +52,21 @@ class SwipeableActionsState {
private set
val draggableState = DraggableState { delta ->
val targetOffset = offsetState.value + delta
val targetOffset = offsetState.floatValue + delta
val isAllowed = isResettingOnRelease || targetOffset > 0f
offsetState.value += if (isAllowed) delta else 0f
offsetState.floatValue += if (isAllowed) delta else 0f
}
suspend fun resetOffset() {
draggableState.drag(MutatePriority.PreventUserInput) {
isResettingOnRelease = true
try {
Animatable(offsetState.value).animateTo(
Animatable(offsetState.floatValue).animateTo(
targetValue = 0f,
animationSpec = tween(durationMillis = 300),
) {
dragBy(value - offsetState.value)
dragBy(value - offsetState.floatValue)
}
} finally {
isResettingOnRelease = false

View file

@ -52,7 +52,7 @@ fun Dp.applyScaleUp(): Dp = with(LocalDensity.current) {
@Preview
@Composable
internal fun DpScalePreview_0_75f() = WithFontScale(0.75f) {
internal fun DpScale_0_75f_Preview() = WithFontScale(0.75f) {
ElementPreviewLight {
val fontSizeInDp = 16.dp
Column(
@ -77,7 +77,7 @@ internal fun DpScalePreview_0_75f() = WithFontScale(0.75f) {
@Preview
@Composable
internal fun DpScalePreview_1_0f() = WithFontScale(1f) {
internal fun DpScale_1_0f_Preview() = WithFontScale(1f) {
ElementPreviewLight {
val fontSizeInDp = 16.dp
Column(
@ -102,7 +102,7 @@ internal fun DpScalePreview_1_0f() = WithFontScale(1f) {
@Preview
@Composable
internal fun DpScalePreview_1_5f() = WithFontScale(1.5f) {
internal fun DpScale_1_5f_Preview() = WithFontScale(1.5f) {
ElementPreviewLight {
val fontSizeInDp = 16.dp
Column(

View file

@ -19,7 +19,7 @@ package io.element.android.libraries.designsystem.theme
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color
import io.element.android.libraries.designsystem.preview.DayNightPreviews
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.theme.ElementTheme
import io.element.android.libraries.theme.compound.generated.SemanticColors
@ -98,7 +98,7 @@ val SemanticColors.bgSubtleTertiary
val SemanticColors.temporaryColorBgSpecial
get() = if (isLight) Color(0xFFE4E8F0) else Color(0xFF3A4048)
@DayNightPreviews
@PreviewsDayNight
@Composable
internal fun ColorAliasesPreview() = ElementPreview {
ColorListPreview(

View file

@ -24,8 +24,6 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.sizeIn
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Notifications
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
@ -44,6 +42,7 @@ import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
import kotlin.math.max
@ -417,7 +416,10 @@ internal fun DialogWithTitleIconAndOkButtonPreview() {
DialogPreview {
SimpleAlertDialogContent(
icon = {
Icon(imageVector = Icons.Default.Notifications, contentDescription = null)
Icon(
resourceId = CommonDrawables.ic_compound_notifications_solid,
contentDescription = null
)
},
title = "Dialog Title",
content = "A dialog is a type of modal window that appears in front of app content to provide critical information, or prompt for a decision to be made. Learn more",

View file

@ -0,0 +1,76 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.RectangleShape
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementPreview
import io.element.android.libraries.designsystem.preview.PreviewsDayNight
import io.element.android.libraries.theme.ElementTheme
@Composable
fun BottomSheetDragHandle(
modifier: Modifier = Modifier
) {
Box(
modifier = modifier
.height(36.dp)
.background(Color.Transparent)
.fillMaxWidth()
.clip(RectangleShape),
contentAlignment = Alignment.Center
) {
Box(
modifier = Modifier
.fillMaxWidth()
.requiredHeight(72.dp)
.offset(y = 18.dp)
.clip(MaterialTheme.shapes.extraLarge)
.background(MaterialTheme.colorScheme.background)
.border(0.5.dp, ElementTheme.colors.borderDisabled, MaterialTheme.shapes.extraLarge)
)
Box(
modifier = Modifier
.width(32.dp)
.height(4.dp)
.background(ElementTheme.colors.iconQuaternary, RoundedCornerShape(2.dp))
)
}
}
@PreviewsDayNight
@Composable
internal fun BottomSheetDragHandlePreview() = ElementPreview {
BottomSheetDragHandle()
}

View file

@ -31,8 +31,6 @@ import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.progressSemantics
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Share
import androidx.compose.material3.ButtonColors
import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.LocalContentColor
@ -53,6 +51,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
// Designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&mode=design&t=U03tOFZz5FSLVUMa-1
@ -118,7 +117,7 @@ fun TextButton(
)
@Composable
internal fun ButtonInternal(
private fun ButtonInternal(
text: String,
onClick: () -> Unit,
style: ButtonStyle,
@ -346,7 +345,7 @@ private fun ButtonCombinationPreview(
// With icon
ButtonRowPreview(
modifier = Modifier.then(modifier),
leadingIcon = IconSource.Vector(Icons.Outlined.Share),
leadingIcon = IconSource.Resource(CommonDrawables.ic_compound_share_android),
style = style,
size = size,
)

View file

@ -19,9 +19,6 @@ package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowRight
import androidx.compose.material.icons.filled.BugReport
import androidx.compose.material3.LocalTextStyle
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MenuDefaults
@ -33,6 +30,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
// Figma designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=1032%3A44063&mode=design&t=rsNegTbEVLYAXL76-1
@ -88,32 +86,32 @@ private fun ContentToPreview() {
DropdownMenuItem(
text = { Text(text = "Item") },
onClick = {},
trailingIcon = { Icon(Icons.Default.ArrowRight, contentDescription = null) },
trailingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chevron_right, contentDescription = null) },
)
HorizontalDivider()
DropdownMenuItem(
text = { Text(text = "Item") },
onClick = {},
leadingIcon = { Icon(Icons.Default.BugReport, contentDescription = null) },
leadingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chat_problem, contentDescription = null) },
)
DropdownMenuItem(
text = { Text(text = "Item") },
onClick = {},
leadingIcon = { Icon(Icons.Default.BugReport, contentDescription = null) },
trailingIcon = { Icon(Icons.Default.ArrowRight, contentDescription = null) },
leadingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chat_problem, contentDescription = null) },
trailingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chevron_right, contentDescription = null) },
)
DropdownMenuItem(
text = { Text(text = "Item") },
onClick = {},
enabled = false,
leadingIcon = { Icon(Icons.Default.BugReport, contentDescription = null) },
trailingIcon = { Icon(Icons.Default.ArrowRight, contentDescription = null) },
leadingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chat_problem, contentDescription = null) },
trailingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chevron_right, contentDescription = null) },
)
HorizontalDivider()
DropdownMenuItem(
text = { Text(text = "Multiline\nItem") },
onClick = {},
trailingIcon = { Icon(Icons.Default.ArrowRight, contentDescription = null) },
trailingIcon = { Icon(resourceId = CommonDrawables.ic_compound_chevron_right, contentDescription = null) },
)
}
}

View file

@ -20,8 +20,6 @@ import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.FloatingActionButtonDefaults
import androidx.compose.material3.FloatingActionButtonElevation
import androidx.compose.material3.contentColorFor
@ -34,6 +32,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
@Composable
fun FloatingActionButton(
@ -67,7 +66,7 @@ internal fun FloatingActionButtonPreview() =
private fun ContentToPreview() {
Box(modifier = Modifier.padding(8.dp)) {
FloatingActionButton(onClick = {}) {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}
}
}

View file

@ -17,8 +17,6 @@
package io.element.android.libraries.designsystem.theme.components
import androidx.annotation.DrawableRes
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.LocalContentColor
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@ -30,6 +28,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
/**
* Icon is a wrapper around [androidx.compose.material3.Icon] which allows to use
@ -146,5 +145,5 @@ internal fun IconImageVectorPreview() =
@Composable
private fun ContentToPreview() {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}

View file

@ -19,8 +19,6 @@ package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.IconButtonDefaults
import androidx.compose.material3.LocalContentColor
import androidx.compose.runtime.Composable
@ -30,6 +28,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
// Figma designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=1182%3A48861&mode=design&t=Shlcvznm1oUyqGC2-1
@ -67,20 +66,20 @@ private fun ContentToPreview() {
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconPrimary) {
Row {
IconButton(onClick = {}) {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}
IconButton(enabled = false, onClick = {}) {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}
}
}
CompositionLocalProvider(LocalContentColor provides ElementTheme.colors.iconSecondary) {
Row {
IconButton(onClick = {}) {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}
IconButton(enabled = false, onClick = {}) {
Icon(imageVector = Icons.Filled.Close, contentDescription = "")
Icon(resourceId = CommonDrawables.ic_compound_close, contentDescription = "")
}
}
}

View file

@ -17,8 +17,6 @@
package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.clickable
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Share
import androidx.compose.material3.ListItemColors
import androidx.compose.material3.ListItemDefaults
import androidx.compose.material3.LocalContentColor
@ -37,6 +35,7 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.components.list.ListItemContent
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
// Designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24208&mode=design&t=G5hCfkLB6GgXDuWe-1
@ -119,7 +118,9 @@ fun ListItem(
androidx.compose.material3.ListItem(
headlineContent = decoratedHeadlineContent,
modifier = if (onClick != null) Modifier.clickable(enabled = enabled, onClick = onClick).then(modifier) else modifier,
modifier = if (onClick != null) Modifier
.clickable(enabled = enabled, onClick = onClick)
.then(modifier) else modifier,
overlineContent = null,
supportingContent = decoratedSupportingContent,
leadingContent = decoratedLeadingContent,
@ -135,27 +136,31 @@ fun ListItem(
*/
sealed interface ListItemStyle {
data object Default : ListItemStyle
data object Primary: ListItemStyle
data object Primary : ListItemStyle
data object Destructive : ListItemStyle
@Composable fun headlineColor() = when (this) {
@Composable
fun headlineColor() = when (this) {
Default, Primary -> ListItemDefaultColors.headline
Destructive -> ElementTheme.colors.textCriticalPrimary
}
@Composable fun supportingTextColor() = when (this) {
@Composable
fun supportingTextColor() = when (this) {
Default, Primary -> ListItemDefaultColors.supportingText
// FIXME once we have a defined color for this value
Destructive -> ElementTheme.colors.textCriticalPrimary.copy(alpha = 0.8f)
}
@Composable fun leadingIconColor() = when (this) {
@Composable
fun leadingIconColor() = when (this) {
Default -> ListItemDefaultColors.icon
Primary -> ElementTheme.colors.iconPrimary
Destructive -> ElementTheme.colors.iconCriticalPrimary
}
@Composable fun trailingIconColor() = when (this) {
@Composable
fun trailingIconColor() = when (this) {
Default -> ListItemDefaultColors.icon
Primary -> ElementTheme.colors.iconPrimary
Destructive -> ElementTheme.colors.iconCriticalPrimary
@ -169,15 +174,16 @@ object ListItemDefaultColors {
val icon: Color @Composable get() = ElementTheme.colors.iconTertiary
val iconDisabled: Color @Composable get() = ElementTheme.colors.iconDisabled
val colors: ListItemColors @Composable get() = ListItemDefaults.colors(
headlineColor = headline,
supportingColor = supportingText,
leadingIconColor = icon,
trailingIconColor = icon,
disabledHeadlineColor = headlineDisabled,
disabledLeadingIconColor = iconDisabled,
disabledTrailingIconColor = iconDisabled,
)
val colors: ListItemColors
@Composable get() = ListItemDefaults.colors(
headlineColor = headline,
supportingColor = supportingText,
leadingIconColor = icon,
trailingIconColor = icon,
disabledHeadlineColor = headlineDisabled,
disabledLeadingIconColor = iconDisabled,
disabledTrailingIconColor = iconDisabled,
)
}
// region: Simple list item
@ -191,7 +197,7 @@ internal fun ListItemTwoLinesSimplePreview() = PreviewItems.TwoLinesListItemPrev
@Preview(name = "List item (1 line) - Simple", group = PreviewGroup.ListItems)
@Composable
internal fun ListItemSingleLineSimplePreview() = PreviewItems.OneLineListItemPreview()
internal fun ListItemSingleLineSimplePreview() = PreviewItems.OneLineListItemPreview()
// endregion
// region: Trailing Checkbox
@ -453,10 +459,12 @@ private object PreviewItems {
}
@Composable
fun switch() : ListItemContent {
fun switch(): ListItemContent {
var checked by remember { mutableStateOf(false) }
return ListItemContent.Switch(checked = checked, onChange = { checked = !checked })
}
fun icon() = ListItemContent.Icon(iconSource = IconSource.Vector(Icons.Outlined.Share))
fun icon() = ListItemContent.Icon(
iconSource = IconSource.Resource(CommonDrawables.ic_compound_share_android)
)
}

View file

@ -0,0 +1,127 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.LocalTextStyle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.theme.ElementTheme
// Designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24208&mode=design&t=G5hCfkLB6GgXDuWe-1
/**
* List section header.
* @param title The title of the section.
* @param modifier The modifier to be applied to the section.
* @param hasDivider Whether to show a divider above the section or not. Default is `true`.
* @param description A description for the section. It's empty by default.
*/
@Composable
fun ListSectionHeader(
title: String,
modifier: Modifier = Modifier,
hasDivider: Boolean = true,
description: @Composable () -> Unit = {},
) {
Column(modifier.fillMaxWidth()) {
if (hasDivider) {
HorizontalDivider(modifier = Modifier.padding(top = 16.dp))
}
Column(
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(
text = title,
style = ElementTheme.typography.fontBodyLgMedium,
color = ElementTheme.colors.textPrimary,
)
CompositionLocalProvider(
LocalTextStyle provides ElementTheme.typography.fontBodySmRegular,
LocalContentColor provides ElementTheme.colors.textSecondary,
) {
description()
}
}
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header")
@Composable
internal fun ListSectionHeaderPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
hasDivider = false,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with divider")
@Composable
internal fun ListSectionHeaderWithDividerPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
hasDivider = true,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with description")
@Composable
internal fun ListSectionHeaderWithDescriptionPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
description = {
ListSupportingText(
text = "Supporting line text lorem ipsum dolor sit amet, consectetur. Read more",
contentPadding = ListSupportingTextDefaults.Padding.None,
)
},
hasDivider = false,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with description and divider")
@Composable
internal fun ListSectionHeaderWithDescriptionAndDividerPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
description = {
ListSupportingText(
text = "Supporting line text lorem ipsum dolor sit amet, consectetur. Read more",
contentPadding = ListSupportingTextDefaults.Padding.None,
)
},
hasDivider = true,
)
}
}

View file

@ -16,17 +16,10 @@
package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Share
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.LocalTextStyle
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.ExperimentalTextApi
@ -37,47 +30,11 @@ import io.element.android.libraries.designsystem.components.ClickableLinkText
import io.element.android.libraries.designsystem.components.list.ListItemContent
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
// Designs: https://www.figma.com/file/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?type=design&node-id=425%3A24208&mode=design&t=G5hCfkLB6GgXDuWe-1
/**
* List section header.
* @param title The title of the section.
* @param modifier The modifier to be applied to the section.
* @param hasDivider Whether to show a divider above the section or not. Default is `true`.
* @param description A description for the section. It's empty by default.
*/
@Composable
fun ListSectionHeader(
title: String,
modifier: Modifier = Modifier,
hasDivider: Boolean = true,
description: @Composable () -> Unit = {},
) {
Column(modifier.fillMaxWidth()) {
if (hasDivider) {
HorizontalDivider(modifier = Modifier.padding(top = 16.dp))
}
Column(
modifier = Modifier.padding(16.dp),
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
Text(
text = title,
style = ElementTheme.typography.fontBodyLgMedium,
color = ElementTheme.colors.textPrimary,
)
CompositionLocalProvider(
LocalTextStyle provides ElementTheme.typography.fontBodySmRegular,
LocalContentColor provides ElementTheme.colors.textSecondary,
) {
description()
}
}
}
}
/**
* List supporting text item. Used to display an explanation in the list with a pre-formatted style.
* @param text The text to display.
@ -128,12 +85,16 @@ object ListSupportingTextDefaults {
sealed interface Padding {
/** No padding. */
data object None : Padding
/** Default padding, it will align fine with a [ListItem] with no leading content. */
data object Default : Padding
/** It will align to a [ListItem] with an [Icon] or [Checkbox] as leading content. */
data object SmallLeadingContent : Padding
/** It will align to with a [ListItem] with a [Switch] as leading content. */
data object LargeLeadingContent : Padding
/** It will align to with a [ListItem] with a custom start [padding]. */
data class Custom(val padding: Dp) : Padding
@ -164,68 +125,6 @@ object ListSupportingTextDefaults {
}
}
// region: List header previews
@Preview(group = PreviewGroup.ListSections, name = "List section header")
@Composable
internal fun ListSectionHeaderPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
hasDivider = false,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with divider")
@Composable
internal fun ListSectionHeaderWithDividerPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
hasDivider = true,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with description")
@Composable
internal fun ListSectionHeaderWithDescriptionPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
description = {
ListSupportingText(
text = "Supporting line text lorem ipsum dolor sit amet, consectetur. Read more",
contentPadding = ListSupportingTextDefaults.Padding.None,
)
},
hasDivider = false,
)
}
}
@Preview(group = PreviewGroup.ListSections, name = "List section header with description and divider")
@Composable
internal fun ListSectionHeaderWithDescriptionAndDividerPreview() {
ElementThemedPreview {
ListSectionHeader(
title = "List section",
description = {
ListSupportingText(
text = "Supporting line text lorem ipsum dolor sit amet, consectetur. Read more",
contentPadding = ListSupportingTextDefaults.Padding.None,
)
},
hasDivider = true,
)
}
}
// endregion
// region: List supporting text previews
@Preview(group = PreviewGroup.ListSections, name = "List supporting text - no padding")
@Composable
internal fun ListSupportingTextNoPaddingPreview() {
@ -256,7 +155,10 @@ internal fun ListSupportingTextDefaultPaddingPreview() {
internal fun ListSupportingTextSmallPaddingPreview() {
ElementThemedPreview {
Column {
ListItem(headlineContent = { Text("A title") }, leadingContent = ListItemContent.Icon(IconSource.Vector(Icons.Outlined.Share)))
ListItem(
headlineContent = { Text("A title") },
leadingContent = ListItemContent.Icon(IconSource.Resource(CommonDrawables.ic_compound_share_android))
)
ListSupportingText(
text = "Supporting line text lorem ipsum dolor sit amet, consectetur. Read more",
contentPadding = ListSupportingTextDefaults.Padding.SmallLeadingContent,
@ -292,5 +194,3 @@ internal fun ListSupportingTextCustomPaddingPreview() {
}
}
}
// endregion

View file

@ -18,8 +18,6 @@ package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.TopAppBarColors
@ -32,6 +30,7 @@ import androidx.compose.ui.tooling.preview.Preview
import io.element.android.libraries.designsystem.components.button.BackButton
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@OptIn(ExperimentalMaterial3Api::class)
@ -74,7 +73,10 @@ private fun ContentToPreview() {
actions = {
TextButton(text = "Action", onClick = {})
IconButton(onClick = {}) {
Icon(imageVector = Icons.Default.Share, contentDescription = null)
Icon(
resourceId = CommonDrawables.ic_compound_share_android,
contentDescription = null,
)
}
}
)

View file

@ -24,9 +24,6 @@ import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Search
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.SearchBarColors
@ -46,6 +43,7 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.components.button.BackButton
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
import io.element.android.libraries.ui.strings.CommonStrings
@ -99,7 +97,7 @@ fun <T> SearchBar(
{
IconButton(onClick = { onQueryChange("") }) {
Icon(
imageVector = Icons.Default.Close,
resourceId = CommonDrawables.ic_compound_close,
contentDescription = stringResource(CommonStrings.action_clear),
)
}
@ -109,7 +107,7 @@ fun <T> SearchBar(
!active -> {
{
Icon(
imageVector = Icons.Default.Search,
resourceId = CommonDrawables.ic_compound_search,
contentDescription = stringResource(CommonStrings.action_search),
tint = MaterialTheme.colorScheme.tertiary,
)
@ -195,11 +193,11 @@ sealed interface SearchBarResultState<in T> {
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewInactive() = ElementThemedPreview { ContentToPreview() }
internal fun SearchBarInactivePreview() = ElementThemedPreview { ContentToPreview() }
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewActiveEmptyQuery() = ElementThemedPreview {
internal fun SearchBarActiveEmptyQueryPreview() = ElementThemedPreview {
ContentToPreview(
query = "",
active = true,
@ -208,7 +206,7 @@ internal fun SearchBarPreviewActiveEmptyQuery() = ElementThemedPreview {
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewActiveWithQuery() = ElementThemedPreview {
internal fun SearchBarActiveWithQueryPreview() = ElementThemedPreview {
ContentToPreview(
query = "search term",
active = true,
@ -217,7 +215,7 @@ internal fun SearchBarPreviewActiveWithQuery() = ElementThemedPreview {
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewActiveWithQueryNoBackButton() = ElementThemedPreview {
internal fun SearchBarActiveWithQueryNoBackButtonPreview() = ElementThemedPreview {
ContentToPreview(
query = "search term",
active = true,
@ -227,7 +225,7 @@ internal fun SearchBarPreviewActiveWithQueryNoBackButton() = ElementThemedPrevie
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewActiveWithNoResults() = ElementThemedPreview {
internal fun SearchBarActiveWithNoResultsPreview() = ElementThemedPreview {
ContentToPreview(
query = "search term",
active = true,
@ -237,7 +235,7 @@ internal fun SearchBarPreviewActiveWithNoResults() = ElementThemedPreview {
@Preview(group = PreviewGroup.Search)
@Composable
internal fun SearchBarPreviewActiveWithContent() = ElementThemedPreview {
internal fun SearchBarActiveWithContentPreview() = ElementThemedPreview {
ContentToPreview(
query = "search term",
active = true,

View file

@ -22,7 +22,7 @@ import androidx.compose.material3.SliderColors
import androidx.compose.material3.SliderDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.mutableFloatStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
@ -62,7 +62,7 @@ internal fun SlidersPreview() = ElementThemedPreview { ContentToPreview() }
@Composable
private fun ContentToPreview() {
var value by remember { mutableStateOf(0.33f) }
var value by remember { mutableFloatStateOf(0.33f) }
Column {
Slider(onValueChange = { value = it }, value = value, enabled = true)
Slider(steps = 10, onValueChange = { value = it }, value = value, enabled = true)

View file

@ -17,8 +17,6 @@
package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.SnackbarDefaults
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
@ -29,6 +27,7 @@ import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.components.button.ButtonVisuals
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
import io.element.android.libraries.theme.SnackBarLabelColorDark
import io.element.android.libraries.theme.SnackBarLabelColorLight
@ -119,8 +118,10 @@ internal fun SnackbarWithActionAndCloseButtonPreview() {
ElementThemedPreview {
Snackbar(
message = "Snackbar supporting text",
action = ButtonVisuals.Text("Action", {}),
dismissAction = ButtonVisuals.Icon(IconSource.Vector(Icons.Default.Close), {})
action = ButtonVisuals.Text("Action") {},
dismissAction = ButtonVisuals.Icon(
IconSource.Resource(CommonDrawables.ic_compound_close)
) {}
)
}
}
@ -140,7 +141,9 @@ internal fun SnackbarWithActionOnNewLineAndCloseButtonPreview() {
Snackbar(
message = "Snackbar supporting text",
action = ButtonVisuals.Text("Action", {}),
dismissAction = ButtonVisuals.Icon(IconSource.Vector(Icons.Default.Close), {}),
dismissAction = ButtonVisuals.Icon(
IconSource.Resource(CommonDrawables.ic_compound_close)
) {},
actionOnNewLine = true
)
}

View file

@ -18,8 +18,6 @@ package io.element.android.libraries.designsystem.theme.components
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Share
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.TopAppBarColors
@ -32,6 +30,7 @@ import androidx.compose.ui.tooling.preview.Preview
import io.element.android.libraries.designsystem.components.button.BackButton
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
import io.element.android.libraries.designsystem.preview.PreviewGroup
import io.element.android.libraries.designsystem.utils.CommonDrawables
import io.element.android.libraries.theme.ElementTheme
@OptIn(ExperimentalMaterial3Api::class)
@ -74,7 +73,10 @@ private fun ContentToPreview() {
actions = {
TextButton(text = "Action", onClick = {})
IconButton(onClick = {}) {
Icon(imageVector = Icons.Default.Share, contentDescription = null)
Icon(
resourceId = CommonDrawables.ic_compound_share_android,
contentDescription = null,
)
}
}
)

View file

@ -30,13 +30,13 @@ import io.element.android.libraries.designsystem.preview.PreviewGroup
@Preview(group = PreviewGroup.DateTimePickers)
@Composable
internal fun DatePickerPreviewLight() {
internal fun DatePickerLightPreview() {
ElementPreviewLight { ContentToPreview() }
}
@Preview(group = PreviewGroup.DateTimePickers)
@Composable
internal fun DatePickerPreviewDark() {
internal fun DatePickerDarkPreview() {
ElementPreviewDark { ContentToPreview() }
}

View file

@ -17,7 +17,6 @@
package io.element.android.libraries.designsystem.theme.components.previews
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowRight
import androidx.compose.material.icons.filled.Favorite
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
@ -32,6 +31,7 @@ import io.element.android.libraries.designsystem.theme.components.DropdownMenu
import io.element.android.libraries.designsystem.theme.components.DropdownMenuItem
import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.utils.CommonDrawables
@Preview(group = PreviewGroup.Menus)
@Composable
@ -51,7 +51,10 @@ internal fun MenuPreview() {
val trailingIcon: @Composable (() -> Unit)? = if (i in 3..4) {
@Composable {
Icon(Icons.Filled.ArrowRight, contentDescription = "Favorite")
Icon(
resourceId = CommonDrawables.ic_compound_chevron_right,
contentDescription = "Favorite",
)
}
} else {
null

View file

@ -55,7 +55,7 @@ internal fun TimePickerHorizontalPreview() {
@OptIn(ExperimentalMaterial3Api::class)
@Preview(group = PreviewGroup.DateTimePickers)
@Composable
internal fun TimePickerVerticalPreviewLight() {
internal fun TimePickerVerticalLightPreview() {
ElementPreviewLight {
AlertDialogContent(
buttons = { /*TODO*/ },
@ -77,7 +77,7 @@ internal fun TimePickerVerticalPreviewLight() {
@OptIn(ExperimentalMaterial3Api::class)
@Preview(group = PreviewGroup.DateTimePickers)
@Composable
internal fun TimePickerVerticalPreviewDark() {
internal fun TimePickerVerticalDarkPreview() {
val pickerState = rememberTimePickerState(
initialHour = 12,
initialMinute = 0,

View file

@ -20,5 +20,5 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
open class BooleanProvider : PreviewParameterProvider<Boolean> {
override val values: Sequence<Boolean>
get() = sequenceOf(false, true)
get() = sequenceOf(true, false)
}

View file

@ -16,15 +16,21 @@
package io.element.android.libraries.designsystem.utils
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect
import androidx.compose.ui.platform.LocalView
open class PairCombinedProvider<T1, T2>(
private val provider: Pair<PreviewParameterProvider<T1>, PreviewParameterProvider<T2>>
) : PreviewParameterProvider<Pair<T1, T2>> {
override val values: Sequence<Pair<T1, T2>>
get() = provider.first.values.flatMap { first ->
provider.second.values.map { second ->
first to second
@Composable
fun KeepScreenOn(
keepScreenOn: Boolean = true
) {
if (keepScreenOn) {
val currentView = LocalView.current
DisposableEffect(Unit) {
currentView.keepScreenOn = true
onDispose {
currentView.keepScreenOn = false
}
}
}
}

View file

@ -14,13 +14,8 @@
* limitations under the License.
*/
package io.element.android.libraries.designsystem.utils
package io.element.android.libraries.designsystem.utils.snackbar
import androidx.annotation.StringRes
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.SnackbarDuration
import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@ -28,11 +23,7 @@ import androidx.compose.runtime.State
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.components.button.ButtonVisuals
import io.element.android.libraries.designsystem.theme.components.IconSource
import io.element.android.libraries.designsystem.theme.components.Snackbar
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.currentCoroutineContext
@ -40,7 +31,6 @@ import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.isActive
import kotlinx.coroutines.sync.Mutex
import java.util.concurrent.atomic.AtomicBoolean
/**
* A global dispatcher of [SnackbarMessage] to be displayed in [Snackbar] via a [SnackbarHostState].
@ -80,20 +70,6 @@ fun SnackbarDispatcher.collectSnackbarMessageAsState(): State<SnackbarMessage?>
return snackbarMessage.collectAsState(initial = null)
}
@Composable
fun SnackbarHost(hostState: SnackbarHostState, modifier: Modifier = Modifier) {
androidx.compose.material3.SnackbarHost(hostState, modifier) { data ->
Snackbar(
modifier = Modifier.padding(12.dp), // Add default padding
message = data.visuals.message,
action = data.visuals.actionLabel?.let { ButtonVisuals.Text(it, data::performAction) },
dismissAction = if (data.visuals.withDismissAction) {
ButtonVisuals.Icon(IconSource.Vector(Icons.Default.Close), data::dismiss)
} else null,
)
}
}
/**
* Helper method to display a [SnackbarMessage] in a [SnackbarHostState] handling cancellations.
*/
@ -126,19 +102,3 @@ fun rememberSnackbarHostState(snackbarMessage: SnackbarMessage?): SnackbarHostSt
}
return snackbarHostState
}
/**
* A message to be displayed in a [Snackbar].
* @param messageResId The message to be displayed.
* @param duration The duration of the message. The default value is [SnackbarDuration.Short].
* @param actionResId The action text to be displayed. The default value is `null`.
* @param isDisplayed Used to track if the current message is already displayed or not.
* @param action The action to be performed when the action is clicked.
*/
data class SnackbarMessage(
@StringRes val messageResId: Int,
val duration: SnackbarDuration = SnackbarDuration.Short,
@StringRes val actionResId: Int? = null,
val isDisplayed: AtomicBoolean = AtomicBoolean(false),
val action: () -> Unit = {},
)

View file

@ -0,0 +1,44 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.utils.snackbar
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import io.element.android.libraries.designsystem.components.button.ButtonVisuals
import io.element.android.libraries.designsystem.theme.components.IconSource
import io.element.android.libraries.designsystem.theme.components.Snackbar
import io.element.android.libraries.designsystem.utils.CommonDrawables
@Composable
fun SnackbarHost(hostState: SnackbarHostState, modifier: Modifier = Modifier) {
androidx.compose.material3.SnackbarHost(hostState, modifier) { data ->
Snackbar(
modifier = Modifier.padding(12.dp), // Add default padding
message = data.visuals.message,
action = data.visuals.actionLabel?.let { ButtonVisuals.Text(it, data::performAction) },
dismissAction = if (data.visuals.withDismissAction) {
ButtonVisuals.Icon(
IconSource.Resource(CommonDrawables.ic_compound_close),
data::dismiss
)
} else null,
)
}
}

View file

@ -0,0 +1,37 @@
/*
* Copyright (c) 2023 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.element.android.libraries.designsystem.utils.snackbar
import androidx.annotation.StringRes
import androidx.compose.material3.SnackbarDuration
import java.util.concurrent.atomic.AtomicBoolean
/**
* A message to be displayed in a [Snackbar].
* @param messageResId The message to be displayed.
* @param duration The duration of the message. The default value is [SnackbarDuration.Short].
* @param actionResId The action text to be displayed. The default value is `null`.
* @param isDisplayed Used to track if the current message is already displayed or not.
* @param action The action to be performed when the action is clicked.
*/
data class SnackbarMessage(
@StringRes val messageResId: Int,
val duration: SnackbarDuration = SnackbarDuration.Short,
@StringRes val actionResId: Int? = null,
val isDisplayed: AtomicBoolean = AtomicBoolean(false),
val action: () -> Unit = {},
)

View file

@ -5,5 +5,5 @@
android:viewportHeight="20">
<path
android:pathData="M7.333,15.833C6.875,15.833 6.483,15.67 6.156,15.343C5.83,15.017 5.667,14.624 5.667,14.166V5.833C5.667,5.374 5.83,4.982 6.156,4.656C6.483,4.329 6.875,4.166 7.333,4.166H10.271C11.174,4.166 12.007,4.444 12.771,4.999C13.535,5.555 13.917,6.326 13.917,7.312C13.917,8.02 13.757,8.565 13.438,8.947C13.118,9.329 12.819,9.604 12.542,9.77C12.889,9.923 13.274,10.208 13.698,10.624C14.122,11.041 14.333,11.666 14.333,12.499C14.333,13.736 13.882,14.6 12.979,15.093C12.076,15.586 11.229,15.833 10.438,15.833H7.333ZM8.188,13.499H10.354C11.021,13.499 11.427,13.329 11.573,12.989C11.719,12.649 11.792,12.402 11.792,12.249C11.792,12.097 11.719,11.85 11.573,11.51C11.427,11.17 11,10.999 10.292,10.999H8.188V13.499ZM8.188,8.749H10.125C10.583,8.749 10.917,8.631 11.125,8.395C11.333,8.159 11.438,7.895 11.438,7.604C11.438,7.27 11.319,6.999 11.083,6.791C10.847,6.583 10.542,6.479 10.167,6.479H8.188V8.749Z"
android:fillColor="#656D77"/>
android:fillColor="@android:color/white"/>
</vector>

View file

@ -5,5 +5,5 @@
android:viewportHeight="20">
<path
android:pathData="M8.333,15.834C8.097,15.834 7.899,15.754 7.74,15.594C7.58,15.435 7.5,15.237 7.5,15.001C7.5,14.764 7.58,14.567 7.74,14.407C7.899,14.247 8.097,14.167 8.333,14.167H16.667C16.903,14.167 17.101,14.247 17.26,14.407C17.42,14.567 17.5,14.764 17.5,15.001C17.5,15.237 17.42,15.435 17.26,15.594C17.101,15.754 16.903,15.834 16.667,15.834H8.333ZM8.333,10.834C8.097,10.834 7.899,10.754 7.74,10.594C7.58,10.435 7.5,10.237 7.5,10.001C7.5,9.765 7.58,9.567 7.74,9.407C7.899,9.247 8.097,9.167 8.333,9.167H16.667C16.903,9.167 17.101,9.247 17.26,9.407C17.42,9.567 17.5,9.765 17.5,10.001C17.5,10.237 17.42,10.435 17.26,10.594C17.101,10.754 16.903,10.834 16.667,10.834H8.333ZM8.333,5.834C8.097,5.834 7.899,5.754 7.74,5.594C7.58,5.435 7.5,5.237 7.5,5.001C7.5,4.765 7.58,4.567 7.74,4.407C7.899,4.247 8.097,4.167 8.333,4.167H16.667C16.903,4.167 17.101,4.247 17.26,4.407C17.42,4.567 17.5,4.765 17.5,5.001C17.5,5.237 17.42,5.435 17.26,5.594C17.101,5.754 16.903,5.834 16.667,5.834H8.333ZM4.167,16.667C3.708,16.667 3.316,16.504 2.99,16.178C2.663,15.851 2.5,15.459 2.5,15.001C2.5,14.542 2.663,14.15 2.99,13.824C3.316,13.497 3.708,13.334 4.167,13.334C4.625,13.334 5.017,13.497 5.344,13.824C5.67,14.15 5.833,14.542 5.833,15.001C5.833,15.459 5.67,15.851 5.344,16.178C5.017,16.504 4.625,16.667 4.167,16.667ZM4.167,11.667C3.708,11.667 3.316,11.504 2.99,11.178C2.663,10.851 2.5,10.459 2.5,10.001C2.5,9.542 2.663,9.15 2.99,8.824C3.316,8.497 3.708,8.334 4.167,8.334C4.625,8.334 5.017,8.497 5.344,8.824C5.67,9.15 5.833,9.542 5.833,10.001C5.833,10.459 5.67,10.851 5.344,11.178C5.017,11.504 4.625,11.667 4.167,11.667ZM4.167,6.667C3.708,6.667 3.316,6.504 2.99,6.178C2.663,5.851 2.5,5.459 2.5,5.001C2.5,4.542 2.663,4.15 2.99,3.824C3.316,3.497 3.708,3.334 4.167,3.334C4.625,3.334 5.017,3.497 5.344,3.824C5.67,4.15 5.833,4.542 5.833,5.001C5.833,5.459 5.67,5.851 5.344,6.178C5.017,6.504 4.625,6.667 4.167,6.667Z"
android:fillColor="#656D77"/>
android:fillColor="@android:color/white"/>
</vector>

View file

@ -5,5 +5,5 @@
android:viewportHeight="20">
<path
android:pathData="M7.354,10L8.583,8.771C8.75,8.604 8.833,8.41 8.833,8.188C8.833,7.965 8.75,7.771 8.583,7.604C8.417,7.438 8.219,7.354 7.99,7.354C7.76,7.354 7.563,7.438 7.396,7.604L5.583,9.417C5.5,9.5 5.441,9.59 5.406,9.688C5.372,9.785 5.354,9.889 5.354,10C5.354,10.111 5.372,10.215 5.406,10.313C5.441,10.41 5.5,10.5 5.583,10.583L7.396,12.396C7.563,12.563 7.76,12.646 7.99,12.646C8.219,12.646 8.417,12.563 8.583,12.396C8.75,12.229 8.833,12.035 8.833,11.813C8.833,11.59 8.75,11.396 8.583,11.229L7.354,10ZM12.646,10L11.417,11.229C11.25,11.396 11.167,11.59 11.167,11.813C11.167,12.035 11.25,12.229 11.417,12.396C11.583,12.563 11.781,12.646 12.01,12.646C12.24,12.646 12.438,12.563 12.604,12.396L14.417,10.583C14.5,10.5 14.559,10.41 14.594,10.313C14.628,10.215 14.646,10.111 14.646,10C14.646,9.889 14.628,9.785 14.594,9.688C14.559,9.59 14.5,9.5 14.417,9.417L12.604,7.604C12.521,7.521 12.427,7.458 12.323,7.417C12.219,7.375 12.115,7.354 12.01,7.354C11.906,7.354 11.802,7.375 11.698,7.417C11.594,7.458 11.5,7.521 11.417,7.604C11.25,7.771 11.167,7.965 11.167,8.188C11.167,8.41 11.25,8.604 11.417,8.771L12.646,10ZM4.167,17.5C3.708,17.5 3.316,17.337 2.99,17.01C2.663,16.684 2.5,16.292 2.5,15.833V4.167C2.5,3.708 2.663,3.316 2.99,2.99C3.316,2.663 3.708,2.5 4.167,2.5H15.833C16.292,2.5 16.684,2.663 17.01,2.99C17.337,3.316 17.5,3.708 17.5,4.167V15.833C17.5,16.292 17.337,16.684 17.01,17.01C16.684,17.337 16.292,17.5 15.833,17.5H4.167ZM4.167,15.833H15.833V4.167H4.167V15.833Z"
android:fillColor="#656D77"/>
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12.207,5.293C12.598,5.683 12.598,6.317 12.207,6.707L7.914,11H18.5C19.052,11 19.5,11.448 19.5,12C19.5,12.552 19.052,13 18.5,13H7.914L12.207,17.293C12.598,17.683 12.598,18.317 12.207,18.707C11.817,19.098 11.183,19.098 10.793,18.707L4.793,12.707C4.402,12.317 4.402,11.683 4.793,11.293L10.793,5.293C11.183,4.902 11.817,4.902 12.207,5.293Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M11.793,5.293C12.183,4.902 12.817,4.902 13.207,5.293L19.207,11.293C19.598,11.683 19.598,12.317 19.207,12.707L13.207,18.707C12.817,19.098 12.183,19.098 11.793,18.707C11.402,18.317 11.402,17.683 11.793,17.293L16.086,13H5.5C4.948,13 4.5,12.552 4.5,12C4.5,11.448 4.948,11 5.5,11H16.086L11.793,6.707C11.402,6.317 11.402,5.683 11.793,5.293Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.924,6.617C17.973,6.734 18,6.863 18,6.997C18,6.998 18,7 18,7.001V15C18,15.552 17.552,16 17,16C16.448,16 16,15.552 16,15V9.414L7.707,17.707C7.317,18.098 6.683,18.098 6.293,17.707C5.902,17.317 5.902,16.683 6.293,16.293L14.586,8H9C8.448,8 8,7.552 8,7C8,6.448 8.448,6 9,6H17C17.275,6 17.524,6.111 17.705,6.291C17.706,6.292 17.708,6.294 17.709,6.295C17.804,6.39 17.876,6.5 17.924,6.617Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,22C10.617,22 9.317,21.737 8.1,21.212C6.883,20.688 5.825,19.975 4.925,19.075C4.025,18.175 3.313,17.117 2.787,15.9C2.263,14.683 2,13.383 2,12C2,10.617 2.263,9.317 2.787,8.1C3.313,6.883 4.025,5.825 4.925,4.925C5.825,4.025 6.883,3.313 8.1,2.787C9.317,2.263 10.617,2 12,2C13.383,2 14.683,2.263 15.9,2.787C17.117,3.313 18.175,4.025 19.075,4.925C19.975,5.825 20.688,6.883 21.212,8.1C21.737,9.317 22,10.617 22,12C22,13.383 21.737,14.683 21.212,15.9C20.688,17.117 19.975,18.175 19.075,19.075C18.175,19.975 17.117,20.688 15.9,21.212C14.683,21.737 13.383,22 12,22ZM12,20C14.233,20 16.125,19.225 17.675,17.675C19.225,16.125 20,14.233 20,12C20,11.1 19.854,10.233 19.563,9.4C19.271,8.567 18.85,7.8 18.3,7.1L7.1,18.3C7.8,18.85 8.567,19.271 9.4,19.563C10.233,19.854 11.1,20 12,20ZM5.7,16.9L16.9,5.7C16.2,5.15 15.433,4.729 14.6,4.438C13.767,4.146 12.9,4 12,4C9.767,4 7.875,4.775 6.325,6.325C4.775,7.875 4,9.767 4,12C4,12.9 4.146,13.767 4.438,14.6C4.729,15.433 5.15,16.2 5.7,16.9Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M1.5,21.25L2.95,16.3C2.633,15.617 2.396,14.917 2.238,14.2C2.079,13.483 2,12.75 2,12C2,10.617 2.263,9.317 2.788,8.1C3.313,6.883 4.025,5.825 4.925,4.925C5.825,4.025 6.883,3.313 8.1,2.787C9.317,2.263 10.617,2 12,2C13.383,2 14.683,2.263 15.9,2.787C17.117,3.313 18.175,4.025 19.075,4.925C19.975,5.825 20.688,6.883 21.212,8.1C21.737,9.317 22,10.617 22,12C22,13.383 21.737,14.683 21.212,15.9C20.688,17.117 19.975,18.175 19.075,19.075C18.175,19.975 17.117,20.688 15.9,21.212C14.683,21.737 13.383,22 12,22C11.25,22 10.517,21.921 9.8,21.763C9.083,21.604 8.383,21.367 7.7,21.05L2.75,22.5C2.367,22.617 2.033,22.533 1.75,22.25C1.467,21.967 1.383,21.633 1.5,21.25ZM3.95,20.05L7.15,19.1C7.233,19.067 7.325,19.046 7.425,19.038C7.525,19.029 7.617,19.025 7.7,19.025C7.85,19.025 7.996,19.038 8.138,19.063C8.279,19.087 8.417,19.133 8.55,19.2C9.083,19.467 9.642,19.667 10.225,19.8C10.808,19.933 11.4,20 12,20C14.233,20 16.125,19.225 17.675,17.675C19.225,16.125 20,14.233 20,12C20,9.767 19.225,7.875 17.675,6.325C16.125,4.775 14.233,4 12,4C9.767,4 7.875,4.775 6.325,6.325C4.775,7.875 4,9.767 4,12C4,12.6 4.067,13.192 4.2,13.775C4.333,14.358 4.533,14.917 4.8,15.45C4.917,15.667 4.979,15.896 4.988,16.138C4.996,16.379 4.967,16.617 4.9,16.85L3.95,20.05Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,28 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,6H17C16.717,6 16.479,5.904 16.288,5.713C16.096,5.521 16,5.283 16,5C16,4.717 16.096,4.479 16.288,4.287C16.479,4.096 16.717,4 17,4H19V2C19,1.717 19.096,1.479 19.288,1.288C19.479,1.096 19.717,1 20,1C20.283,1 20.521,1.096 20.712,1.288C20.904,1.479 21,1.717 21,2V4H23C23.283,4 23.521,4.096 23.712,4.287C23.904,4.479 24,4.717 24,5C24,5.283 23.904,5.521 23.712,5.713C23.521,5.904 23.283,6 23,6H21V8C21,8.283 20.904,8.521 20.712,8.712C20.521,8.904 20.283,9 20,9C19.717,9 19.479,8.904 19.288,8.712C19.096,8.521 19,8.283 19,8V6Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M22,17V10.659C21.374,10.88 20.701,11 20,11V17H6C5.47,17 4.961,17.211 4.586,17.586L4,18.172V5H14C14,4.299 14.12,3.626 14.341,3H4C2.895,3 2,3.895 2,5V20.586C2,21.477 3.077,21.923 3.707,21.293L6,19H20C21.105,19 22,18.105 22,17Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,31 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12.712,16.712C12.521,16.904 12.283,17 12,17C11.717,17 11.479,16.904 11.288,16.712C11.096,16.521 11,16.283 11,16C11,15.717 11.096,15.479 11.288,15.288C11.479,15.096 11.717,15 12,15C12.283,15 12.521,15.096 12.712,15.288C12.904,15.479 13,15.717 13,16C13,16.283 12.904,16.521 12.712,16.712Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M12.712,12.712C12.521,12.904 12.283,13 12,13C11.717,13 11.479,12.904 11.288,12.712C11.096,12.521 11,12.283 11,12V8C11,7.717 11.096,7.479 11.288,7.287C11.479,7.096 11.717,7 12,7C12.283,7 12.521,7.096 12.712,7.287C12.904,7.479 13,7.717 13,8V12C13,12.283 12.904,12.521 12.712,12.712Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M2.95,16.3C2.633,15.617 2.396,14.917 2.238,14.2C2.079,13.483 2,12.75 2,12C2,10.617 2.263,9.317 2.788,8.1C3.313,6.883 4.025,5.825 4.925,4.925C5.825,4.025 6.883,3.313 8.1,2.787C9.317,2.263 10.617,2 12,2C13.383,2 14.683,2.263 15.9,2.787C17.117,3.313 18.175,4.025 19.075,4.925C19.975,5.825 20.688,6.883 21.212,8.1C21.737,9.317 22,10.617 22,12C22,13.383 21.737,14.683 21.212,15.9C20.688,17.117 19.975,18.175 19.075,19.075C18.175,19.975 17.117,20.688 15.9,21.212C14.683,21.737 13.383,22 12,22C11.25,22 10.517,21.921 9.8,21.763C9.083,21.604 8.383,21.367 7.7,21.05L2.75,22.5C2.367,22.617 2.033,22.533 1.75,22.25C1.467,21.967 1.383,21.633 1.5,21.25L2.95,16.3ZM7.15,19.1C7.233,19.067 7.325,19.046 7.425,19.038C7.525,19.029 7.617,19.025 7.7,19.025C7.85,19.025 7.996,19.038 8.138,19.063C8.279,19.087 8.417,19.133 8.55,19.2C9.083,19.467 9.642,19.667 10.225,19.8C10.808,19.933 11.4,20 12,20C14.233,20 16.125,19.225 17.675,17.675C19.225,16.125 20,14.233 20,12C20,9.767 19.225,7.875 17.675,6.325C16.125,4.775 14.233,4 12,4C9.767,4 7.875,4.775 6.325,6.325C4.775,7.875 4,9.767 4,12C4,12.6 4.067,13.192 4.2,13.775C4.333,14.358 4.533,14.917 4.8,15.45C4.917,15.667 4.979,15.896 4.988,16.138C4.996,16.379 4.967,16.617 4.9,16.85L3.95,20.05L7.15,19.1Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9.55,17.575C9.417,17.575 9.292,17.554 9.175,17.513C9.058,17.471 8.95,17.4 8.85,17.3L4.55,13C4.367,12.817 4.279,12.579 4.288,12.288C4.296,11.996 4.392,11.758 4.575,11.575C4.758,11.392 4.992,11.3 5.275,11.3C5.558,11.3 5.792,11.392 5.975,11.575L9.55,15.15L18.025,6.675C18.208,6.492 18.446,6.4 18.737,6.4C19.029,6.4 19.267,6.492 19.45,6.675C19.633,6.858 19.725,7.096 19.725,7.388C19.725,7.679 19.633,7.917 19.45,8.1L10.25,17.3C10.15,17.4 10.042,17.471 9.925,17.513C9.808,17.554 9.683,17.575 9.55,17.575Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M10.6,13.8L8.45,11.65C8.267,11.467 8.033,11.375 7.75,11.375C7.467,11.375 7.233,11.467 7.05,11.65C6.867,11.833 6.775,12.067 6.775,12.35C6.775,12.633 6.867,12.867 7.05,13.05L9.9,15.9C10.1,16.1 10.333,16.2 10.6,16.2C10.867,16.2 11.1,16.1 11.3,15.9L16.95,10.25C17.133,10.067 17.225,9.833 17.225,9.55C17.225,9.267 17.133,9.033 16.95,8.85C16.767,8.667 16.533,8.575 16.25,8.575C15.967,8.575 15.733,8.667 15.55,8.85L10.6,13.8ZM12,22C10.617,22 9.317,21.737 8.1,21.212C6.883,20.688 5.825,19.975 4.925,19.075C4.025,18.175 3.313,17.117 2.787,15.9C2.263,14.683 2,13.383 2,12C2,10.617 2.263,9.317 2.787,8.1C3.313,6.883 4.025,5.825 4.925,4.925C5.825,4.025 6.883,3.313 8.1,2.787C9.317,2.263 10.617,2 12,2C13.383,2 14.683,2.263 15.9,2.787C17.117,3.313 18.175,4.025 19.075,4.925C19.975,5.825 20.688,6.883 21.212,8.1C21.737,9.317 22,10.617 22,12C22,13.383 21.737,14.683 21.212,15.9C20.688,17.117 19.975,18.175 19.075,19.075C18.175,19.975 17.117,20.688 15.9,21.212C14.683,21.737 13.383,22 12,22Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,14.95C11.867,14.95 11.742,14.929 11.625,14.887C11.508,14.846 11.4,14.775 11.3,14.675L6.675,10.05C6.492,9.867 6.404,9.638 6.413,9.363C6.421,9.088 6.517,8.858 6.7,8.675C6.883,8.492 7.117,8.4 7.4,8.4C7.683,8.4 7.917,8.492 8.1,8.675L12,12.575L15.925,8.65C16.108,8.467 16.337,8.379 16.612,8.388C16.888,8.396 17.117,8.492 17.3,8.675C17.483,8.858 17.575,9.092 17.575,9.375C17.575,9.658 17.483,9.892 17.3,10.075L12.7,14.675C12.6,14.775 12.492,14.846 12.375,14.887C12.258,14.929 12.133,14.95 12,14.95Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M13.3,17.3L8.7,12.7C8.6,12.6 8.529,12.492 8.487,12.375C8.446,12.258 8.425,12.133 8.425,12C8.425,11.867 8.446,11.742 8.487,11.625C8.529,11.508 8.6,11.4 8.7,11.3L13.3,6.7C13.483,6.517 13.717,6.425 14,6.425C14.283,6.425 14.517,6.517 14.7,6.7C14.883,6.883 14.975,7.117 14.975,7.4C14.975,7.683 14.883,7.917 14.7,8.1L10.8,12L14.7,15.9C14.883,16.083 14.975,16.317 14.975,16.6C14.975,16.883 14.883,17.117 14.7,17.3C14.517,17.483 14.283,17.575 14,17.575C13.717,17.575 13.483,17.483 13.3,17.3Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8.7,17.3C8.517,17.117 8.425,16.883 8.425,16.6C8.425,16.317 8.517,16.083 8.7,15.9L12.6,12L8.7,8.1C8.517,7.917 8.425,7.683 8.425,7.4C8.425,7.117 8.517,6.883 8.7,6.7C8.883,6.517 9.117,6.425 9.4,6.425C9.683,6.425 9.917,6.517 10.1,6.7L14.7,11.3C14.8,11.4 14.871,11.508 14.913,11.625C14.954,11.742 14.975,11.867 14.975,12C14.975,12.133 14.954,12.258 14.913,12.375C14.871,12.492 14.8,12.6 14.7,12.7L10.1,17.3C9.917,17.483 9.683,17.575 9.4,17.575C9.117,17.575 8.883,17.483 8.7,17.3Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M8.225,8.325C8.042,8.142 7.95,7.9 7.95,7.6C7.95,7.3 8.042,7.058 8.225,6.875L11.3,3.8C11.4,3.7 11.508,3.629 11.625,3.588C11.742,3.546 11.867,3.525 12,3.525C12.133,3.525 12.262,3.546 12.387,3.588C12.512,3.629 12.617,3.7 12.7,3.8L15.8,6.9C15.983,7.083 16.071,7.321 16.063,7.613C16.054,7.904 15.958,8.142 15.775,8.325C15.592,8.508 15.35,8.6 15.05,8.6C14.75,8.6 14.508,8.508 14.325,8.325L12,6L9.65,8.35C9.467,8.533 9.229,8.621 8.937,8.613C8.646,8.604 8.408,8.508 8.225,8.325ZM12,20.575C11.867,20.575 11.742,20.55 11.625,20.5C11.508,20.45 11.4,20.383 11.3,20.3L8.225,17.225C8.042,17.042 7.95,16.8 7.95,16.5C7.95,16.2 8.042,15.958 8.225,15.775C8.408,15.592 8.65,15.5 8.95,15.5C9.25,15.5 9.492,15.592 9.675,15.775L12,18.1L14.35,15.75C14.533,15.567 14.771,15.479 15.063,15.488C15.354,15.496 15.592,15.592 15.775,15.775C15.958,15.958 16.05,16.2 16.05,16.5C16.05,16.8 15.958,17.042 15.775,17.225L12.7,20.3C12.617,20.383 12.512,20.45 12.387,20.5C12.262,20.55 12.133,20.575 12,20.575Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M6.293,6.293C6.683,5.902 7.317,5.902 7.707,6.293L12,10.586L16.293,6.293C16.683,5.902 17.317,5.902 17.707,6.293C18.098,6.683 18.098,7.317 17.707,7.707L13.414,12L17.707,16.293C18.098,16.683 18.098,17.317 17.707,17.707C17.317,18.098 16.683,18.098 16.293,17.707L12,13.414L7.707,17.707C7.317,18.098 6.683,18.098 6.293,17.707C5.902,17.317 5.902,16.683 6.293,16.293L10.586,12L6.293,7.707C5.902,7.317 5.902,6.683 6.293,6.293Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M4,18C3.45,18 2.979,17.804 2.588,17.413C2.196,17.021 2,16.55 2,16V5C2,4.45 2.196,3.979 2.588,3.588C2.979,3.196 3.45,3 4,3H20C20.55,3 21.021,3.196 21.413,3.588C21.804,3.979 22,4.45 22,5V16C22,16.55 21.804,17.021 21.413,17.413C21.021,17.804 20.55,18 20,18H4ZM4,16H20V5H4V16ZM2,21C1.717,21 1.479,20.904 1.288,20.712C1.096,20.521 1,20.283 1,20C1,19.717 1.096,19.479 1.288,19.288C1.479,19.096 1.717,19 2,19H22C22.283,19 22.521,19.096 22.712,19.288C22.904,19.479 23,19.717 23,20C23,20.283 22.904,20.521 22.712,20.712C22.521,20.904 22.283,21 22,21H2Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M7,21C6.45,21 5.979,20.804 5.588,20.413C5.196,20.021 5,19.55 5,19V6C4.717,6 4.479,5.904 4.287,5.713C4.096,5.521 4,5.283 4,5C4,4.717 4.096,4.479 4.287,4.287C4.479,4.096 4.717,4 5,4H9C9,3.717 9.096,3.479 9.288,3.287C9.479,3.096 9.717,3 10,3H14C14.283,3 14.521,3.096 14.712,3.287C14.904,3.479 15,3.717 15,4H19C19.283,4 19.521,4.096 19.712,4.287C19.904,4.479 20,4.717 20,5C20,5.283 19.904,5.521 19.712,5.713C19.521,5.904 19.283,6 19,6V19C19,19.55 18.804,20.021 18.413,20.413C18.021,20.804 17.55,21 17,21H7ZM7,6V19H17V6H7ZM9,16C9,16.283 9.096,16.521 9.288,16.712C9.479,16.904 9.717,17 10,17C10.283,17 10.521,16.904 10.712,16.712C10.904,16.521 11,16.283 11,16V9C11,8.717 10.904,8.479 10.712,8.288C10.521,8.096 10.283,8 10,8C9.717,8 9.479,8.096 9.288,8.288C9.096,8.479 9,8.717 9,9V16ZM13,16C13,16.283 13.096,16.521 13.288,16.712C13.479,16.904 13.717,17 14,17C14.283,17 14.521,16.904 14.712,16.712C14.904,16.521 15,16.283 15,16V9C15,8.717 14.904,8.479 14.712,8.288C14.521,8.096 14.283,8 14,8C13.717,8 13.479,8.096 13.288,8.288C13.096,8.479 13,8.717 13,9V16Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,15.575C11.867,15.575 11.742,15.554 11.625,15.512C11.508,15.471 11.4,15.4 11.3,15.3L7.7,11.7C7.517,11.517 7.425,11.283 7.425,11C7.425,10.717 7.517,10.483 7.7,10.3C7.883,10.117 8.121,10.021 8.413,10.012C8.704,10.004 8.942,10.092 9.125,10.275L11,12.15V5C11,4.717 11.096,4.479 11.288,4.287C11.479,4.096 11.717,4 12,4C12.283,4 12.521,4.096 12.712,4.287C12.904,4.479 13,4.717 13,5V12.15L14.875,10.275C15.058,10.092 15.296,10.004 15.587,10.012C15.879,10.021 16.117,10.117 16.3,10.3C16.483,10.483 16.575,10.717 16.575,11C16.575,11.283 16.483,11.517 16.3,11.7L12.7,15.3C12.6,15.4 12.492,15.471 12.375,15.512C12.258,15.554 12.133,15.575 12,15.575ZM6,20C5.45,20 4.979,19.804 4.588,19.413C4.196,19.021 4,18.55 4,18V16C4,15.717 4.096,15.479 4.287,15.288C4.479,15.096 4.717,15 5,15C5.283,15 5.521,15.096 5.713,15.288C5.904,15.479 6,15.717 6,16V18H18V16C18,15.717 18.096,15.479 18.288,15.288C18.479,15.096 18.717,15 19,15C19.283,15 19.521,15.096 19.712,15.288C19.904,15.479 20,15.717 20,16V18C20,18.55 19.804,19.021 19.413,19.413C19.021,19.804 18.55,20 18,20H6Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M9,20C8.45,20 7.979,19.804 7.588,19.413C7.196,19.021 7,18.55 7,18C7,17.45 7.196,16.979 7.588,16.587C7.979,16.196 8.45,16 9,16C9.55,16 10.021,16.196 10.413,16.587C10.804,16.979 11,17.45 11,18C11,18.55 10.804,19.021 10.413,19.413C10.021,19.804 9.55,20 9,20ZM15,20C14.45,20 13.979,19.804 13.587,19.413C13.196,19.021 13,18.55 13,18C13,17.45 13.196,16.979 13.587,16.587C13.979,16.196 14.45,16 15,16C15.55,16 16.021,16.196 16.413,16.587C16.804,16.979 17,17.45 17,18C17,18.55 16.804,19.021 16.413,19.413C16.021,19.804 15.55,20 15,20ZM9,14C8.45,14 7.979,13.804 7.588,13.413C7.196,13.021 7,12.55 7,12C7,11.45 7.196,10.979 7.588,10.587C7.979,10.196 8.45,10 9,10C9.55,10 10.021,10.196 10.413,10.587C10.804,10.979 11,11.45 11,12C11,12.55 10.804,13.021 10.413,13.413C10.021,13.804 9.55,14 9,14ZM15,14C14.45,14 13.979,13.804 13.587,13.413C13.196,13.021 13,12.55 13,12C13,11.45 13.196,10.979 13.587,10.587C13.979,10.196 14.45,10 15,10C15.55,10 16.021,10.196 16.413,10.587C16.804,10.979 17,11.45 17,12C17,12.55 16.804,13.021 16.413,13.413C16.021,13.804 15.55,14 15,14ZM9,8C8.45,8 7.979,7.804 7.588,7.412C7.196,7.021 7,6.55 7,6C7,5.45 7.196,4.979 7.588,4.588C7.979,4.196 8.45,4 9,4C9.55,4 10.021,4.196 10.413,4.588C10.804,4.979 11,5.45 11,6C11,6.55 10.804,7.021 10.413,7.412C10.021,7.804 9.55,8 9,8ZM15,8C14.45,8 13.979,7.804 13.587,7.412C13.196,7.021 13,6.55 13,6C13,5.45 13.196,4.979 13.587,4.588C13.979,4.196 14.45,4 15,4C15.55,4 16.021,4.196 16.413,4.588C16.804,4.979 17,5.45 17,6C17,6.55 16.804,7.021 16.413,7.412C16.021,7.804 15.55,8 15,8Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M5,15C4.717,15 4.479,14.904 4.287,14.712C4.096,14.521 4,14.283 4,14C4,13.717 4.096,13.479 4.287,13.288C4.479,13.096 4.717,13 5,13H19C19.283,13 19.521,13.096 19.712,13.288C19.904,13.479 20,13.717 20,14C20,14.283 19.904,14.521 19.712,14.712C19.521,14.904 19.283,15 19,15H5ZM5,11C4.717,11 4.479,10.904 4.287,10.712C4.096,10.521 4,10.283 4,10C4,9.717 4.096,9.479 4.287,9.288C4.479,9.096 4.717,9 5,9H19C19.283,9 19.521,9.096 19.712,9.288C19.904,9.479 20,9.717 20,10C20,10.283 19.904,10.521 19.712,10.712C19.521,10.904 19.283,11 19,11H5Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M0.295,14.604L2.765,17.02C2.962,17.217 3.19,17.324 3.45,17.342C3.709,17.36 3.946,17.288 4.161,17.127L7.275,14.765C7.418,14.658 7.526,14.532 7.597,14.389C7.669,14.246 7.705,14.085 7.705,13.906L7.705,11.635C8.403,11.403 9.11,11.228 9.825,11.112C10.541,10.995 12,10.937 12,10.937C12,10.937 13.459,10.995 14.175,11.112C14.89,11.228 15.597,11.403 16.295,11.635V13.906C16.295,14.085 16.331,14.246 16.403,14.389C16.474,14.532 16.582,14.658 16.725,14.765L19.839,17.127C20.054,17.288 20.291,17.36 20.55,17.342C20.81,17.324 21.038,17.217 21.235,17.02L23.705,14.604C23.902,14.407 24,14.156 24,13.852C24,13.548 23.902,13.297 23.705,13.101C22.183,11.472 20.412,10.215 18.389,9.329C16.367,8.443 14.237,8 12,8C9.763,8 7.633,8.438 5.611,9.315C3.588,10.192 1.817,11.454 0.295,13.101C0.098,13.297 0,13.548 0,13.852C0,14.156 0.098,14.407 0.295,14.604Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M12,17C12.283,17 12.521,16.904 12.712,16.712C12.904,16.521 13,16.283 13,16C13,15.717 12.904,15.479 12.712,15.288C12.521,15.096 12.283,15 12,15C11.717,15 11.479,15.096 11.288,15.288C11.096,15.479 11,15.717 11,16C11,16.283 11.096,16.521 11.288,16.712C11.479,16.904 11.717,17 12,17ZM12,13C12.283,13 12.521,12.904 12.712,12.712C12.904,12.521 13,12.283 13,12V8C13,7.717 12.904,7.479 12.712,7.287C12.521,7.096 12.283,7 12,7C11.717,7 11.479,7.096 11.288,7.287C11.096,7.479 11,7.717 11,8V12C11,12.283 11.096,12.521 11.288,12.712C11.479,12.904 11.717,13 12,13ZM12,22C10.617,22 9.317,21.737 8.1,21.212C6.883,20.688 5.825,19.975 4.925,19.075C4.025,18.175 3.313,17.117 2.787,15.9C2.263,14.683 2,13.383 2,12C2,10.617 2.263,9.317 2.787,8.1C3.313,6.883 4.025,5.825 4.925,4.925C5.825,4.025 6.883,3.313 8.1,2.787C9.317,2.263 10.617,2 12,2C13.383,2 14.683,2.263 15.9,2.787C17.117,3.313 18.175,4.025 19.075,4.925C19.975,5.825 20.688,6.883 21.212,8.1C21.737,9.317 22,10.617 22,12C22,13.383 21.737,14.683 21.212,15.9C20.688,17.117 19.975,18.175 19.075,19.075C18.175,19.975 17.117,20.688 15.9,21.212C14.683,21.737 13.383,22 12,22Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M5,21C4.45,21 3.979,20.804 3.588,20.413C3.196,20.021 3,19.55 3,19V6.5C3,6.25 3.042,6.025 3.125,5.825C3.208,5.625 3.317,5.433 3.45,5.25L4.85,3.55C4.983,3.367 5.15,3.229 5.35,3.138C5.55,3.046 5.767,3 6,3H18C18.233,3 18.45,3.046 18.65,3.138C18.85,3.229 19.017,3.367 19.15,3.55L20.55,5.25C20.683,5.433 20.792,5.625 20.875,5.825C20.958,6.025 21,6.25 21,6.5V19C21,19.55 20.804,20.021 20.413,20.413C20.021,20.804 19.55,21 19,21H5ZM5.4,6H18.6L17.75,5H6.25L5.4,6ZM5,19H19V8H5V19ZM12,17.575C12.133,17.575 12.258,17.554 12.375,17.513C12.492,17.471 12.6,17.4 12.7,17.3L15.3,14.7C15.483,14.517 15.575,14.283 15.575,14C15.575,13.717 15.483,13.483 15.3,13.3C15.117,13.117 14.883,13.025 14.6,13.025C14.317,13.025 14.083,13.117 13.9,13.3L13,14.2V11C13,10.717 12.904,10.479 12.712,10.288C12.521,10.096 12.283,10 12,10C11.717,10 11.479,10.096 11.288,10.288C11.096,10.479 11,10.717 11,11V14.2L10.1,13.3C9.917,13.117 9.683,13.025 9.4,13.025C9.117,13.025 8.883,13.117 8.7,13.3C8.517,13.483 8.425,13.717 8.425,14C8.425,14.283 8.517,14.517 8.7,14.7L11.3,17.3C11.4,17.4 11.508,17.471 11.625,17.513C11.742,17.554 11.867,17.575 12,17.575Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,34 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M17.25,11.672C16.996,11.672 16.775,11.578 16.587,11.39L12.61,7.413C12.422,7.225 12.328,7.004 12.328,6.75C12.328,6.496 12.422,6.275 12.61,6.087L16.587,2.11C16.775,1.922 16.996,1.828 17.25,1.828C17.504,1.828 17.725,1.922 17.913,2.11L21.89,6.087C22.078,6.275 22.172,6.496 22.172,6.75C22.172,7.004 22.078,7.225 21.89,7.413L17.913,11.39C17.725,11.578 17.504,11.672 17.25,11.672ZM19.725,6.75L17.25,4.275L14.775,6.75L17.25,9.225L19.725,6.75Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M4,11C3.717,11 3.479,10.904 3.287,10.712C3.096,10.521 3,10.283 3,10V4C3,3.717 3.096,3.479 3.287,3.288C3.479,3.096 3.717,3 4,3H10C10.283,3 10.521,3.096 10.712,3.288C10.904,3.479 11,3.717 11,4V10C11,10.283 10.904,10.521 10.712,10.712C10.521,10.904 10.283,11 10,11H4ZM9,9V5H5V9H9Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M14,21C13.717,21 13.479,20.904 13.288,20.712C13.096,20.521 13,20.283 13,20V14C13,13.717 13.096,13.479 13.288,13.288C13.479,13.096 13.717,13 14,13H20C20.283,13 20.521,13.096 20.712,13.288C20.904,13.479 21,13.717 21,14V20C21,20.283 20.904,20.521 20.712,20.712C20.521,20.904 20.283,21 20,21H14ZM19,19V15H15V19H19Z"
android:fillColor="@android:color/white"/>
<path
android:pathData="M4,21C3.717,21 3.479,20.904 3.287,20.712C3.096,20.521 3,20.283 3,20V14C3,13.717 3.096,13.479 3.287,13.288C3.479,13.096 3.717,13 4,13H10C10.283,13 10.521,13.096 10.712,13.288C10.904,13.479 11,13.717 11,14V20C11,20.283 10.904,20.521 10.712,20.712C10.521,20.904 10.283,21 10,21H4ZM9,19V15H5V19H9Z"
android:fillColor="@android:color/white"/>
</vector>

View file

@ -0,0 +1,25 @@
<!--
~ Copyright (c) 2023 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M13.905,9.378L12,5.519L10.095,9.378L5.836,9.997L8.918,13.001L8.191,17.243L12,15.24L15.809,17.243L15.082,13.001L18.164,9.997L13.905,9.378ZM8.767,7.55L11.103,2.817C11.47,2.074 12.53,2.074 12.897,2.817L15.233,7.55L20.456,8.309C21.277,8.429 21.604,9.437 21.011,10.015L17.231,13.7L18.123,18.902C18.263,19.719 17.406,20.342 16.672,19.956L12,17.5L7.328,19.956C6.594,20.342 5.737,19.719 5.877,18.902L6.769,13.7L2.989,10.015C2.396,9.437 2.723,8.429 3.544,8.309L8.767,7.55Z"
android:fillColor="@android:color/white"/>
</vector>

Some files were not shown because too many files have changed in this diff Show more