Updated on 2026-08-14
This commit is contained in:
commit
8fe3e9e3c1
974 changed files with 23162 additions and 21412 deletions
|
|
@ -0,0 +1,17 @@
|
|||
package com.tangem.core.ui.components.artwork
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import kotlinx.collections.immutable.ImmutableList
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
|
||||
@Immutable
|
||||
data class ArtworkUM(
|
||||
val verifiedArtwork: ImmutableList<Byte>? = null,
|
||||
val defaultUrl: String,
|
||||
) {
|
||||
|
||||
constructor(bytes: ByteArray?, defaultUrl: String) : this(
|
||||
verifiedArtwork = bytes?.toList()?.toImmutableList(),
|
||||
defaultUrl = defaultUrl,
|
||||
)
|
||||
}
|
||||
|
|
@ -0,0 +1,485 @@
|
|||
package com.tangem.core.ui.components.atoms.text
|
||||
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.BoxWithConstraints
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.BasicText
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.runtime.Stable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.AnnotatedString
|
||||
import androidx.compose.ui.text.LinkAnnotation
|
||||
import androidx.compose.ui.text.SpanStyle
|
||||
import androidx.compose.ui.text.TextLayoutResult
|
||||
import androidx.compose.ui.text.TextMeasurer
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.buildAnnotatedString
|
||||
import androidx.compose.ui.text.rememberTextMeasurer
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.text.withLink
|
||||
import androidx.compose.ui.text.withStyle
|
||||
import androidx.compose.ui.unit.Constraints
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
/**
|
||||
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* https://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.
|
||||
**/
|
||||
|
||||
private const val READ_MORE_TAG = "read_more"
|
||||
private const val READ_LESS_TAG = "read_less"
|
||||
|
||||
/**
|
||||
* Basic element that displays text with read more.
|
||||
*
|
||||
* @param text The text to be displayed.
|
||||
* @param expanded whether this text is expanded or collapsed.
|
||||
* @param modifier [Modifier] to apply to this layout node.
|
||||
* @param onExpandRequested called when this text is clicked. If `null`, then this text will not be
|
||||
* interactable, unless something else handles its input events and updates its state.
|
||||
* @param contentPadding a padding around the text.
|
||||
* @param style Style configuration for the text such as color, font, line height etc.
|
||||
* @param onTextLayout Callback that is executed when a new text layout is calculated. A
|
||||
* [TextLayoutResult] object that callback provides contains paragraph information, size of the
|
||||
* text, baselines and other details. The callback can be used to add additional decoration or
|
||||
* functionality to the text. For example, to draw selection around the text.
|
||||
* @param softWrap Whether the text should break at soft line breaks. If false, the glyphs in the
|
||||
* text will be positioned as if there was unlimited horizontal space. If [softWrap] is false,
|
||||
* [readMoreOverflow] and TextAlign may have unexpected effects.
|
||||
* @param readMoreText The read more text to be displayed in the collapsed state.
|
||||
* @param readMoreMaxLines An optional maximum number of lines for the text to span, wrapping if
|
||||
* necessary. If the text exceeds the given number of lines, it will be truncated according to
|
||||
* [readMoreOverflow]. If it is not null, then it must be greater than zero.
|
||||
* @param readMoreOverflow How visual overflow should be handled in the collapsed state.
|
||||
* @param readMoreStyle Style configuration for the read more text such as color, font, line height
|
||||
* etc.
|
||||
* @param readLessText The read less text to be displayed in the expanded state.
|
||||
* @param readLessStyle Style configuration for the read less text such as color, font, line height
|
||||
* etc.
|
||||
* @param toggleArea A clickable area of text to toggle.
|
||||
*/
|
||||
@Composable
|
||||
fun ReadMoreText(
|
||||
text: String,
|
||||
expanded: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
onExpandRequested: ((Boolean) -> Unit)? = null,
|
||||
contentPadding: PaddingValues = PaddingValues(0.dp),
|
||||
style: TextStyle = TextStyle.Default,
|
||||
onTextLayout: (TextLayoutResult) -> Unit = {},
|
||||
softWrap: Boolean = true,
|
||||
readMoreText: String = "",
|
||||
readMoreMaxLines: Int = 2,
|
||||
readMoreOverflow: ReadMoreTextOverflow = ReadMoreTextOverflow.Ellipsis,
|
||||
readMoreStyle: SpanStyle = style.toSpanStyle(),
|
||||
readLessText: String = "",
|
||||
readLessStyle: SpanStyle = readMoreStyle,
|
||||
toggleArea: ToggleArea = ToggleArea.All,
|
||||
) {
|
||||
ReadMoreTextInternal(
|
||||
text = AnnotatedString(text),
|
||||
expanded = expanded,
|
||||
modifier = modifier,
|
||||
onExpandRequested = onExpandRequested,
|
||||
contentPadding = contentPadding,
|
||||
style = style,
|
||||
onTextLayout = onTextLayout,
|
||||
softWrap = softWrap,
|
||||
readMoreText = readMoreText,
|
||||
readMoreMaxLines = readMoreMaxLines,
|
||||
readMoreOverflow = readMoreOverflow,
|
||||
readMoreStyle = readMoreStyle,
|
||||
readLessText = readLessText,
|
||||
readLessStyle = readLessStyle,
|
||||
toggleArea = toggleArea,
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Basic element that displays text with read more.
|
||||
*
|
||||
* @param text The text to be displayed.
|
||||
* @param expanded whether this text is expanded or collapsed.
|
||||
* @param modifier [Modifier] to apply to this layout node.
|
||||
* @param onExpandRequested called when this text is clicked. If `null`, then this text will not be
|
||||
* interactable, unless something else handles its input events and updates its state.
|
||||
* @param contentPadding a padding around the text.
|
||||
* @param style Style configuration for the text such as color, font, line height etc.
|
||||
* @param onTextLayout Callback that is executed when a new text layout is calculated. A
|
||||
* [TextLayoutResult] object that callback provides contains paragraph information, size of the
|
||||
* text, baselines and other details. The callback can be used to add additional decoration or
|
||||
* functionality to the text. For example, to draw selection around the text.
|
||||
* @param softWrap Whether the text should break at soft line breaks. If false, the glyphs in the
|
||||
* text will be positioned as if there was unlimited horizontal space. If [softWrap] is false,
|
||||
* [readMoreOverflow] and TextAlign may have unexpected effects.
|
||||
* @param readMoreText The read more text to be displayed in the collapsed state.
|
||||
* @param readMoreMaxLines An optional maximum number of lines for the text to span, wrapping if
|
||||
* necessary. If the text exceeds the given number of lines, it will be truncated according to
|
||||
* [readMoreOverflow]. If it is not null, then it must be greater than zero.
|
||||
* @param readMoreOverflow How visual overflow should be handled in the collapsed state.
|
||||
* @param readMoreStyle Style configuration for the read more text such as color, font, line height
|
||||
* etc.
|
||||
* @param readLessText The read less text to be displayed in the expanded state.
|
||||
* @param readLessStyle Style configuration for the read less text such as color, font, line height
|
||||
* etc.
|
||||
* @param toggleArea A clickable area of text to toggle.
|
||||
*/
|
||||
@Composable
|
||||
fun ReadMoreText(
|
||||
text: AnnotatedString,
|
||||
expanded: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
onExpandRequested: ((Boolean) -> Unit)? = null,
|
||||
contentPadding: PaddingValues = PaddingValues(0.dp),
|
||||
style: TextStyle = TextStyle.Default,
|
||||
onTextLayout: (TextLayoutResult) -> Unit = {},
|
||||
softWrap: Boolean = true,
|
||||
readMoreText: String = "",
|
||||
readMoreMaxLines: Int = 2,
|
||||
readMoreOverflow: ReadMoreTextOverflow = ReadMoreTextOverflow.Ellipsis,
|
||||
readMoreStyle: SpanStyle = style.toSpanStyle(),
|
||||
readLessText: String = "",
|
||||
readLessStyle: SpanStyle = readMoreStyle,
|
||||
toggleArea: ToggleArea = ToggleArea.All,
|
||||
) {
|
||||
ReadMoreTextInternal(
|
||||
text = text,
|
||||
expanded = expanded,
|
||||
modifier = modifier,
|
||||
onExpandRequested = onExpandRequested,
|
||||
contentPadding = contentPadding,
|
||||
style = style,
|
||||
onTextLayout = onTextLayout,
|
||||
softWrap = softWrap,
|
||||
readMoreText = readMoreText,
|
||||
readMoreMaxLines = readMoreMaxLines,
|
||||
readMoreOverflow = readMoreOverflow,
|
||||
readMoreStyle = readMoreStyle,
|
||||
readLessText = readLessText,
|
||||
readLessStyle = readLessStyle,
|
||||
toggleArea = toggleArea,
|
||||
)
|
||||
}
|
||||
|
||||
@Suppress("LongMethod", "LongParameterList")
|
||||
@Composable
|
||||
private fun ReadMoreTextInternal(
|
||||
text: AnnotatedString,
|
||||
expanded: Boolean,
|
||||
modifier: Modifier = Modifier,
|
||||
onExpandRequested: ((Boolean) -> Unit)? = null,
|
||||
contentPadding: PaddingValues = PaddingValues(0.dp),
|
||||
style: TextStyle = TextStyle.Default,
|
||||
onTextLayout: (TextLayoutResult) -> Unit = {},
|
||||
softWrap: Boolean = true,
|
||||
readMoreText: String = "",
|
||||
readMoreMaxLines: Int = 2,
|
||||
readMoreOverflow: ReadMoreTextOverflow = ReadMoreTextOverflow.Ellipsis,
|
||||
readMoreStyle: SpanStyle = style.toSpanStyle(),
|
||||
readLessText: String = "",
|
||||
readLessStyle: SpanStyle = readMoreStyle,
|
||||
toggleArea: ToggleArea = ToggleArea.All,
|
||||
) {
|
||||
require(readMoreMaxLines > 0) { "readMoreMaxLines should be greater than 0" }
|
||||
|
||||
val overflowText: String = remember(readMoreOverflow) {
|
||||
buildString {
|
||||
when (readMoreOverflow) {
|
||||
ReadMoreTextOverflow.Clip -> {
|
||||
}
|
||||
ReadMoreTextOverflow.Ellipsis -> {
|
||||
append(Typography.ellipsis)
|
||||
}
|
||||
}
|
||||
if (readMoreText.isNotEmpty()) {
|
||||
append(Typography.nbsp)
|
||||
}
|
||||
}
|
||||
}
|
||||
val readMoreTextWithStyle: AnnotatedString = remember(readMoreText, readMoreStyle) {
|
||||
buildAnnotatedString {
|
||||
if (readMoreText.isNotEmpty()) {
|
||||
withStyle(readMoreStyle) {
|
||||
append(readMoreText.replace(' ', Typography.nbsp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
val readLessTextWithStyle: AnnotatedString = remember(readLessText, readLessStyle) {
|
||||
buildAnnotatedString {
|
||||
if (readLessText.isNotEmpty()) {
|
||||
withStyle(readLessStyle) {
|
||||
append(readLessText)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val textMeasurer = rememberTextMeasurer()
|
||||
val state = remember { ReadMoreState() }
|
||||
|
||||
val currentText = buildAnnotatedString {
|
||||
if (expanded) {
|
||||
append(text)
|
||||
if (readLessTextWithStyle.isNotEmpty()) {
|
||||
append(' ')
|
||||
if (toggleArea == ToggleArea.More) {
|
||||
withLink(
|
||||
LinkAnnotation.Clickable(tag = READ_LESS_TAG) {
|
||||
onExpandRequested?.invoke(false)
|
||||
},
|
||||
) {
|
||||
append(readLessTextWithStyle)
|
||||
}
|
||||
} else {
|
||||
append(readLessTextWithStyle)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
val collapsedText = state.collapsedText
|
||||
if (collapsedText.isNotEmpty()) {
|
||||
append(collapsedText)
|
||||
append(overflowText)
|
||||
|
||||
if (toggleArea == ToggleArea.More) {
|
||||
withLink(
|
||||
LinkAnnotation.Clickable(tag = READ_MORE_TAG) {
|
||||
onExpandRequested?.invoke(true)
|
||||
},
|
||||
) {
|
||||
append(readMoreTextWithStyle)
|
||||
}
|
||||
} else {
|
||||
append(readMoreTextWithStyle)
|
||||
}
|
||||
} else {
|
||||
append(text)
|
||||
}
|
||||
}
|
||||
}
|
||||
val toggleableModifier = if (onExpandRequested != null && toggleArea == ToggleArea.All) {
|
||||
Modifier.clickable(
|
||||
enabled = state.isCollapsible,
|
||||
onClick = { onExpandRequested(!expanded) },
|
||||
)
|
||||
} else {
|
||||
Modifier
|
||||
}
|
||||
BoxWithConstraints(
|
||||
modifier = modifier
|
||||
.then(toggleableModifier)
|
||||
.padding(contentPadding),
|
||||
) {
|
||||
BasicText(
|
||||
text = currentText,
|
||||
modifier = Modifier,
|
||||
style = style,
|
||||
onTextLayout = onTextLayout,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
softWrap = softWrap,
|
||||
maxLines = if (expanded) Int.MAX_VALUE else readMoreMaxLines,
|
||||
)
|
||||
|
||||
val constraints = Constraints(maxWidth = constraints.maxWidth)
|
||||
LaunchedEffect(
|
||||
textMeasurer,
|
||||
constraints,
|
||||
overflowText,
|
||||
readMoreTextWithStyle,
|
||||
style,
|
||||
readMoreStyle,
|
||||
text,
|
||||
readMoreMaxLines,
|
||||
softWrap,
|
||||
) {
|
||||
state.applyCollapsedText(
|
||||
textMeasurer = textMeasurer,
|
||||
constraints = constraints,
|
||||
overflowText = overflowText,
|
||||
readMoreTextWithStyle = readMoreTextWithStyle,
|
||||
style = style,
|
||||
readMoreStyle = readMoreStyle,
|
||||
text = text,
|
||||
readMoreMaxLines = readMoreMaxLines,
|
||||
softWrap = softWrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Stable
|
||||
private class ReadMoreState {
|
||||
private var _collapsedText: AnnotatedString by mutableStateOf(AnnotatedString(""))
|
||||
|
||||
var collapsedText: AnnotatedString
|
||||
get() = _collapsedText
|
||||
internal set(value) {
|
||||
if (value != _collapsedText) {
|
||||
_collapsedText = value
|
||||
}
|
||||
}
|
||||
|
||||
val isCollapsible: Boolean
|
||||
get() = collapsedText.isNotEmpty()
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
fun applyCollapsedText(
|
||||
textMeasurer: TextMeasurer,
|
||||
constraints: Constraints,
|
||||
overflowText: String,
|
||||
readMoreTextWithStyle: AnnotatedString,
|
||||
style: TextStyle,
|
||||
readMoreStyle: SpanStyle,
|
||||
text: AnnotatedString,
|
||||
readMoreMaxLines: Int,
|
||||
softWrap: Boolean,
|
||||
) {
|
||||
val overflowTextWidth = if (overflowText.isNotEmpty()) {
|
||||
textMeasurer.measure(
|
||||
text = overflowText,
|
||||
style = style,
|
||||
).size.width
|
||||
} else {
|
||||
0
|
||||
}
|
||||
val readMoreTextWidth = if (readMoreTextWithStyle.isNotEmpty()) {
|
||||
textMeasurer.measure(
|
||||
text = readMoreTextWithStyle,
|
||||
style = style.merge(readMoreStyle),
|
||||
).size.width
|
||||
} else {
|
||||
0
|
||||
}
|
||||
val textLayout = textMeasurer.measure(
|
||||
text = text,
|
||||
style = style,
|
||||
maxLines = readMoreMaxLines,
|
||||
overflow = TextOverflow.Clip,
|
||||
softWrap = softWrap,
|
||||
constraints = constraints,
|
||||
)
|
||||
|
||||
val clipTextCount = textLayout.getLineEnd(lineIndex = textLayout.lineCount - 1)
|
||||
val isLineClipped = text.count() > clipTextCount
|
||||
if (isLineClipped) {
|
||||
val countUntilMaxLine =
|
||||
textLayout.getLineEnd(readMoreMaxLines - 1, visibleEnd = true)
|
||||
|
||||
val decorationWidth = overflowTextWidth + readMoreTextWidth
|
||||
val replaceCount = text
|
||||
.substringOf(textLayout, line = readMoreMaxLines)
|
||||
.calculateReplaceCountToBeSingleLineWith(
|
||||
maximumTextWidth = constraints.maxWidth - decorationWidth,
|
||||
measureTextWidth = { subText ->
|
||||
textMeasurer.measure(
|
||||
text = subText,
|
||||
style = style,
|
||||
softWrap = softWrap,
|
||||
).size.width
|
||||
},
|
||||
)
|
||||
collapsedText = text.subSequence(0, countUntilMaxLine - replaceCount)
|
||||
} else {
|
||||
collapsedText = AnnotatedString("")
|
||||
}
|
||||
}
|
||||
|
||||
private fun AnnotatedString.substringOf(layout: TextLayoutResult, line: Int): AnnotatedString {
|
||||
val lastLineStartIndex = layout.getLineStart(line - 1)
|
||||
val lastLineEndIndex = layout.getLineEnd(line - 1, visibleEnd = true)
|
||||
return subSequence(lastLineStartIndex, lastLineEndIndex)
|
||||
}
|
||||
|
||||
private inline fun AnnotatedString.calculateReplaceCountToBeSingleLineWith(
|
||||
maximumTextWidth: Int,
|
||||
measureTextWidth: (subText: AnnotatedString) -> Int,
|
||||
): Int {
|
||||
var replacedTextWidth: Int
|
||||
var replacedCount = -1
|
||||
do {
|
||||
replacedCount++
|
||||
replacedTextWidth = measureTextWidth(
|
||||
subSequence(0, this.length - replacedCount),
|
||||
)
|
||||
} while (replacedCount < this.length && replacedTextWidth >= maximumTextWidth)
|
||||
|
||||
val lastVisibleChar: Char? = this.getOrNull(this.length - replacedCount - 1)
|
||||
val firstOverflowChar: Char? = this.getOrNull(this.length - replacedCount)
|
||||
if (lastVisibleChar?.isSurrogate() == true && firstOverflowChar?.isHighSurrogate() == false) {
|
||||
val subText = subSequence(0, this.length - replacedCount)
|
||||
if (subText.isNotEmpty()) {
|
||||
return length - subText.indexOfLast { it.isHighSurrogate() }
|
||||
}
|
||||
}
|
||||
return replacedCount
|
||||
}
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class ToggleArea private constructor(internal val value: Int) {
|
||||
|
||||
override fun toString(): String {
|
||||
return when (this) {
|
||||
All -> "All"
|
||||
More -> "More"
|
||||
else -> "Invalid"
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* All area of the text is clickable to toggle.
|
||||
*/
|
||||
@Stable
|
||||
val All: ToggleArea = ToggleArea(1)
|
||||
|
||||
/**
|
||||
* 'More' and 'Less' area of the text is clickable to toggle.
|
||||
*/
|
||||
@Stable
|
||||
val More: ToggleArea = ToggleArea(2)
|
||||
}
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class ReadMoreTextOverflow private constructor(internal val value: Int) {
|
||||
|
||||
override fun toString(): String {
|
||||
return when (this) {
|
||||
Clip -> "Clip"
|
||||
Ellipsis -> "Ellipsis"
|
||||
else -> "Invalid"
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Clip the overflowing text to fix its container.
|
||||
*/
|
||||
@Stable
|
||||
val Clip: ReadMoreTextOverflow = ReadMoreTextOverflow(1)
|
||||
|
||||
/**
|
||||
* Use an ellipsis to indicate that the text has overflowed.
|
||||
*/
|
||||
@Stable
|
||||
val Ellipsis: ReadMoreTextOverflow = ReadMoreTextOverflow(2)
|
||||
}
|
||||
}
|
||||
|
|
@ -145,8 +145,6 @@ inline fun <reified T : TangemBottomSheetConfigContent> BasicModalBottomSheet(
|
|||
) {
|
||||
val model = config.content as? T ?: return
|
||||
|
||||
val bottomBarHeight = with(LocalDensity.current) { WindowInsets.systemBars.getBottom(this).toDp() }
|
||||
|
||||
val bsContent: @Composable ColumnScope.() -> Unit = {
|
||||
val maxHeight = LocalConfiguration.current.screenHeightDp * MODAL_SHEET_MAX_HEIGHT
|
||||
|
||||
|
|
@ -157,7 +155,6 @@ inline fun <reified T : TangemBottomSheetConfigContent> BasicModalBottomSheet(
|
|||
.clip(TangemTheme.shapes.roundedCornersLarge)
|
||||
.background(containerColor)
|
||||
.heightIn(max = maxHeight.dp)
|
||||
.padding(bottom = bottomBarHeight)
|
||||
.fillMaxWidth(),
|
||||
) {
|
||||
Box(modifier = Modifier.fillMaxWidth()) {
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.size
|
|||
import androidx.compose.foundation.shape.CircleShape
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ColorFilter
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import com.tangem.core.ui.res.TangemTheme
|
||||
|
|
@ -19,12 +20,13 @@ fun CurrencyIconTopBadge(
|
|||
alpha: Float,
|
||||
colorFilter: ColorFilter?,
|
||||
modifier: Modifier = Modifier,
|
||||
background: Color = TangemTheme.colors.background.primary,
|
||||
) {
|
||||
Box(
|
||||
modifier = modifier
|
||||
.size(TangemTheme.dimens.size18)
|
||||
.background(
|
||||
color = TangemTheme.colors.background.primary,
|
||||
color = background,
|
||||
shape = CircleShape,
|
||||
),
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ fun SearchBar(
|
|||
state: SearchBarUM,
|
||||
modifier: Modifier = Modifier,
|
||||
colors: TextFieldColors = TangemSearchBarDefaults.defaultTextFieldColors,
|
||||
enabled: Boolean = true,
|
||||
) {
|
||||
val keyboardController = LocalSoftwareKeyboardController.current
|
||||
val focusManager = LocalFocusManager.current
|
||||
|
|
@ -57,6 +58,7 @@ fun SearchBar(
|
|||
state.onActiveChange(false)
|
||||
}
|
||||
},
|
||||
enabled = enabled,
|
||||
value = state.query,
|
||||
onValueChange = state.onQueryChange,
|
||||
interactionSource = interactionSource,
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ import com.tangem.core.ui.components.notifications.NotificationConfig.ButtonsSta
|
|||
fun Notification(
|
||||
config: NotificationConfig,
|
||||
modifier: Modifier = Modifier,
|
||||
titleColor: Color = TangemTheme.colors.text.primary1,
|
||||
subtitleColor: Color = TangemTheme.colors.text.tertiary,
|
||||
containerColor: Color? = null,
|
||||
iconTint: Color? = null,
|
||||
|
|
@ -73,6 +74,7 @@ fun Notification(
|
|||
iconTint = iconTint,
|
||||
iconSize = iconSize,
|
||||
title = config.title,
|
||||
titleColor = titleColor,
|
||||
subtitle = config.subtitle,
|
||||
subtitleColor = subtitleColor,
|
||||
showArrowIcon = isEnabled && config.showArrowIcon,
|
||||
|
|
@ -134,6 +136,7 @@ private fun MainContent(
|
|||
iconSize: Dp,
|
||||
title: TextReference?,
|
||||
subtitle: TextReference,
|
||||
titleColor: Color,
|
||||
subtitleColor: Color,
|
||||
showArrowIcon: Boolean,
|
||||
) {
|
||||
|
|
@ -148,7 +151,7 @@ private fun MainContent(
|
|||
|
||||
SpacerW(width = TangemTheme.dimens.spacing10)
|
||||
|
||||
TextsBlock(title = title, subtitle = subtitle, subtitleColor = subtitleColor)
|
||||
TextsBlock(title = title, titleColor = titleColor, subtitle = subtitle, subtitleColor = subtitleColor)
|
||||
|
||||
if (showArrowIcon) {
|
||||
SpacerWMax()
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ fun ChainRow(model: ChainRowUM, modifier: Modifier = Modifier, action: @Composab
|
|||
} else {
|
||||
null
|
||||
},
|
||||
isEnabled = model.enabled,
|
||||
accentMainText = true,
|
||||
accentSecondText = false,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,4 +9,5 @@ data class ChainRowUM(
|
|||
val type: String,
|
||||
val icon: CurrencyIconState,
|
||||
val showCustom: Boolean,
|
||||
val enabled: Boolean = true,
|
||||
)
|
||||
|
|
@ -6,6 +6,7 @@ import androidx.compose.ui.graphics.luminance
|
|||
import androidx.core.graphics.toColorInt
|
||||
import com.tangem.core.ui.res.TangemColorPalette
|
||||
import com.tangem.domain.tokens.model.CryptoCurrency
|
||||
import com.tangem.domain.tokens.model.Network
|
||||
|
||||
private const val LIGHT_LUMINANCE = 0.5f
|
||||
private const val COLOR_HEX_START_INDEX = 2
|
||||
|
|
@ -18,7 +19,15 @@ private const val COLOR_HEX_END_INDEX = 7
|
|||
*/
|
||||
@get:DrawableRes
|
||||
val CryptoCurrency.networkIconResId: Int
|
||||
get() = getActiveIconRes(network.id.value)
|
||||
get() = network.iconResId
|
||||
|
||||
/**
|
||||
* Retrieves the resource ID.
|
||||
*
|
||||
* @return Drawable resource ID for the network.
|
||||
*/
|
||||
val Network.iconResId: Int
|
||||
get() = getActiveIconRes(id.value)
|
||||
|
||||
/**
|
||||
* Tries to extract a background color from the contract address of a token.
|
||||
|
|
|
|||
|
|
@ -42,13 +42,15 @@ object Dialogs {
|
|||
/**
|
||||
* Universal error dialog
|
||||
*/
|
||||
fun universalErrorDialog(universalError: UniversalError, onOkClick: () -> Unit): DialogMessage {
|
||||
fun universalErrorDialog(universalError: UniversalError, onDismiss: () -> Unit): DialogMessage {
|
||||
return DialogMessage(
|
||||
message = resourceReference(R.string.universal_error, wrappedList(universalError.errorCode)),
|
||||
firstAction = EventMessageAction(
|
||||
title = resourceReference(R.string.common_ok),
|
||||
onClick = onOkClick,
|
||||
onClick = {},
|
||||
),
|
||||
dismissOnFirstAction = true,
|
||||
onDismissRequest = onDismiss,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,7 @@ data class TangemDimens internal constructor(
|
|||
val size142: Dp = 142.dp,
|
||||
val size158: Dp = 158.dp,
|
||||
val size164: Dp = 164.dp,
|
||||
val size180: Dp = 180.dp,
|
||||
val size200: Dp = 200.dp,
|
||||
val size248: Dp = 248.dp,
|
||||
val size350: Dp = 350.dp,
|
||||
|
|
|
|||
|
|
@ -87,6 +87,8 @@ fun TangemTheme(
|
|||
DefaultHapticManager(view = view, vibratorHapticManager = vibratorHapticManager)
|
||||
}
|
||||
|
||||
val rootBackgroundColor = rememberedColors.background.secondary
|
||||
|
||||
MaterialTheme(
|
||||
colors = materialThemeColors(colors = themeColors, isDark = isDark),
|
||||
) {
|
||||
|
|
@ -105,6 +107,7 @@ fun TangemTheme(
|
|||
CompositionLocalProvider(
|
||||
LocalTangemShimmer provides TangemShimmer,
|
||||
LocalMainBottomSheetColor provides remember { mutableStateOf(Color.Unspecified) },
|
||||
LocalRootBackgroundColor provides remember { mutableStateOf(rootBackgroundColor) },
|
||||
LocalTextSelectionColors provides TangemTextSelectionColors,
|
||||
) {
|
||||
ProvideTextStyle(
|
||||
|
|
@ -308,13 +311,12 @@ val LocalMainBottomSheetColor = staticCompositionLocalOf<MutableState<Color>> {
|
|||
error("No MainBottomSheetColor provided")
|
||||
}
|
||||
|
||||
val LocalBladeAnimation = staticCompositionLocalOf<BladeAnimation> {
|
||||
val LocalRootBackgroundColor = staticCompositionLocalOf<MutableState<Color>> {
|
||||
error("No MainBottomSheetColor provided")
|
||||
}
|
||||
|
||||
// TODO remove this after migration to new navigation
|
||||
val LocalIsNavigationRefactoringEnabled = staticCompositionLocalOf<Boolean> {
|
||||
false
|
||||
val LocalBladeAnimation = staticCompositionLocalOf<BladeAnimation> {
|
||||
error("No MainBottomSheetColor provided")
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ import com.tangem.core.decompose.ui.UiMessageSender
|
|||
import com.tangem.core.error.UniversalError
|
||||
import com.tangem.core.ui.message.dialog.Dialogs
|
||||
|
||||
fun UiMessageSender.showErrorDialog(universalError: UniversalError) {
|
||||
send(Dialogs.universalErrorDialog(universalError) {})
|
||||
fun UiMessageSender.showErrorDialog(universalError: UniversalError, onDismiss: () -> Unit = {}) {
|
||||
send(Dialogs.universalErrorDialog(universalError, onDismiss = onDismiss))
|
||||
}
|
||||
16
core/ui/src/main/res/drawable/ic_connect_new_24.xml
Normal file
16
core/ui/src/main/res/drawable/ic_connect_new_24.xml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:pathData="M14.488,8.842C14.965,9.743 15.236,10.77 15.236,11.861C15.236,15.425 12.347,18.313 8.783,18.313C5.22,18.313 2.331,15.425 2.331,11.861C2.331,8.297 5.22,5.408 8.783,5.408C9.397,5.408 9.99,5.494 10.552,5.654C10.266,5.87 9.994,6.106 9.737,6.363C9.557,6.543 9.386,6.732 9.225,6.928C9.079,6.915 8.932,6.908 8.783,6.908C6.048,6.908 3.831,9.126 3.831,11.861C3.831,14.596 6.048,16.813 8.783,16.813C11.519,16.813 13.736,14.596 13.736,11.861C13.736,11.024 13.528,10.235 13.161,9.543C13.542,9.203 13.998,8.963 14.488,8.842Z" />
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:pathData="M9.531,14.88C9.054,13.979 8.783,12.951 8.783,11.861C8.783,8.297 11.672,5.408 15.236,5.408C18.799,5.408 21.688,8.297 21.688,11.861C21.688,15.425 18.799,18.313 15.236,18.313C14.622,18.313 14.029,18.228 13.467,18.068C13.753,17.852 14.025,17.615 14.282,17.359C14.462,17.178 14.633,16.99 14.794,16.794C14.94,16.807 15.087,16.813 15.236,16.813C17.971,16.813 20.188,14.596 20.188,11.861C20.188,9.126 17.971,6.908 15.236,6.908C12.501,6.908 10.283,9.126 10.283,11.861C10.283,12.698 10.491,13.487 10.858,14.178C10.477,14.519 10.021,14.758 9.531,14.88Z" />
|
||||
|
||||
</vector>
|
||||
19
core/ui/src/main/res/drawable/ic_doc_new_24.xml
Normal file
19
core/ui/src/main/res/drawable/ic_doc_new_24.xml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<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,8.028C7.586,8.028 7.25,8.363 7.25,8.778C7.25,9.192 7.586,9.528 8,9.528L16,9.528C16.414,9.528 16.75,9.192 16.75,8.778C16.75,8.363 16.414,8.028 16,8.028L8,8.028Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M8,11.25C7.586,11.25 7.25,11.586 7.25,12C7.25,12.415 7.586,12.75 8,12.75L16,12.75C16.414,12.75 16.75,12.415 16.75,12C16.75,11.586 16.414,11.25 16,11.25L8,11.25Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M8,14.473C7.586,14.473 7.25,14.809 7.25,15.223C7.25,15.637 7.586,15.973 8,15.973H12.171C12.585,15.973 12.921,15.637 12.921,15.223C12.921,14.809 12.585,14.473 12.171,14.473H8Z"
|
||||
android:fillColor="#000000"/>
|
||||
<path
|
||||
android:pathData="M19.652,4.11C19.05,3.508 18.292,3.25 17.392,3.129C16.526,3.013 15.425,3.013 14.06,3.013L9.945,3.013C8.578,3.013 7.475,3.013 6.608,3.129C5.708,3.25 4.95,3.509 4.348,4.111C3.746,4.713 3.488,5.471 3.367,6.371C3.25,7.238 3.25,8.34 3.25,9.708L3.25,14.293C3.25,15.66 3.25,16.763 3.367,17.63C3.488,18.53 3.746,19.288 4.348,19.89C4.95,20.492 5.708,20.75 6.608,20.871C7.475,20.988 8.578,20.988 9.945,20.988L14.055,20.987C15.422,20.987 16.525,20.987 17.392,20.871C18.292,20.75 19.05,20.491 19.652,19.889C20.254,19.287 20.513,18.529 20.633,17.629C20.75,16.762 20.75,15.66 20.75,14.292L20.75,9.707C20.75,8.34 20.75,7.237 20.633,6.37C20.513,5.47 20.254,4.712 19.652,4.11ZM14,4.513C15.436,4.513 16.437,4.514 17.192,4.616C17.926,4.714 18.314,4.894 18.591,5.171C18.868,5.448 19.048,5.836 19.147,6.57C19.248,7.326 19.25,8.327 19.25,9.762L19.25,14.237C19.25,15.673 19.248,16.674 19.147,17.429C19.048,18.163 18.868,18.552 18.591,18.828C18.314,19.105 17.926,19.285 17.192,19.384C16.437,19.486 15.435,19.487 14,19.487L10,19.488C8.565,19.488 7.563,19.486 6.808,19.385C6.074,19.286 5.686,19.106 5.409,18.829C5.132,18.552 4.952,18.164 4.853,17.43C4.752,16.674 4.75,15.673 4.75,14.238L4.75,9.763C4.75,8.327 4.752,7.326 4.853,6.571C4.952,5.837 5.132,5.448 5.409,5.172C5.686,4.895 6.074,4.714 6.808,4.616C7.563,4.514 8.565,4.513 10,4.513L14,4.513Z"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<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,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:autoMirrored="true" android:height="24dp" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||
|
||||
<path android:fillColor="#1E1E1E" android:pathData="M5.5,17.5C3.967,17.5 2.667,16.967 1.6,15.9C0.533,14.833 0,13.533 0,12C0,10.467 0.533,9.167 1.6,8.1C2.667,7.033 3.967,6.5 5.5,6.5C6.117,6.5 6.708,6.608 7.275,6.825C7.842,7.042 8.35,7.35 8.8,7.75L10.5,9.3L9,10.65L7.45,9.25C7.183,9.017 6.883,8.833 6.55,8.7C6.217,8.567 5.867,8.5 5.5,8.5C4.533,8.5 3.708,8.842 3.025,9.525C2.342,10.208 2,11.033 2,12C2,12.967 2.342,13.792 3.025,14.475C3.708,15.158 4.533,15.5 5.5,15.5C5.867,15.5 6.217,15.433 6.55,15.3C6.883,15.167 7.183,14.983 7.45,14.75L15.2,7.75C15.65,7.35 16.158,7.042 16.725,6.825C17.292,6.608 17.883,6.5 18.5,6.5C20.033,6.5 21.333,7.033 22.4,8.1C23.467,9.167 24,10.467 24,12C24,13.533 23.467,14.833 22.4,15.9C21.333,16.967 20.033,17.5 18.5,17.5C17.883,17.5 17.292,17.392 16.725,17.175C16.158,16.958 15.65,16.65 15.2,16.25L13.5,14.7L15,13.35L16.55,14.75C16.817,14.983 17.117,15.167 17.45,15.3C17.783,15.433 18.133,15.5 18.5,15.5C19.467,15.5 20.292,15.158 20.975,14.475C21.658,13.792 22,12.967 22,12C22,11.033 21.658,10.208 20.975,9.525C20.292,8.842 19.467,8.5 18.5,8.5C18.133,8.5 17.783,8.567 17.45,8.7C17.117,8.833 16.817,9.017 16.55,9.25L8.8,16.25C8.35,16.65 7.842,16.958 7.275,17.175C6.708,17.392 6.117,17.5 5.5,17.5Z"/>
|
||||
|
||||
</vector>
|
||||
13
core/ui/src/main/res/drawable/ic_network_new_24.xml
Normal file
13
core/ui/src/main/res/drawable/ic_network_new_24.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M6.532,6.791C6.532,5.272 7.763,4.041 9.282,4.041C10.801,4.041 12.032,5.272 12.032,6.791C12.032,7.766 11.525,8.622 10.76,9.111L11.04,9.85C11.292,9.773 11.559,9.732 11.836,9.732C12.655,9.732 13.39,10.09 13.894,10.658L14.119,10.418C13.92,10.038 13.808,9.605 13.808,9.146C13.808,7.627 15.039,6.396 16.558,6.396C18.076,6.396 19.308,7.627 19.308,9.146C19.308,10.664 18.076,11.896 16.558,11.896C16.044,11.896 15.563,11.755 15.152,11.509L14.564,12.135C14.579,12.249 14.586,12.365 14.586,12.482C14.586,13.038 14.421,13.556 14.137,13.989L16.034,15.229C16.533,14.724 17.226,14.41 17.992,14.41C19.511,14.41 20.742,15.641 20.742,17.16C20.742,18.679 19.511,19.91 17.992,19.91C16.473,19.91 15.242,18.679 15.242,17.16C15.242,16.95 15.266,16.745 15.311,16.548L12.943,15C12.605,15.149 12.23,15.232 11.836,15.232C11.269,15.232 10.742,15.061 10.304,14.766L8.465,16.455C8.603,16.783 8.68,17.144 8.68,17.522C8.68,19.041 7.448,20.272 5.93,20.272C4.411,20.272 3.18,19.041 3.18,17.522C3.18,16.004 4.411,14.773 5.93,14.773C6.524,14.773 7.074,14.961 7.524,15.282L9.33,13.624L9.337,13.632C9.176,13.283 9.086,12.893 9.086,12.482C9.086,11.796 9.337,11.169 9.753,10.687L9.319,9.541L9.282,9.541C7.763,9.541 6.532,8.31 6.532,6.791ZM9.282,5.541C8.592,5.541 8.032,6.101 8.032,6.791C8.032,7.481 8.592,8.041 9.282,8.041C9.973,8.041 10.532,7.481 10.532,6.791C10.532,6.101 9.973,5.541 9.282,5.541ZM16.558,7.896C15.867,7.896 15.308,8.455 15.308,9.146C15.308,9.836 15.867,10.396 16.558,10.396C17.248,10.396 17.808,9.836 17.808,9.146C17.808,8.455 17.248,7.896 16.558,7.896ZM11.836,11.232C11.146,11.232 10.586,11.792 10.586,12.482C10.586,13.173 11.146,13.732 11.836,13.732C12.526,13.732 13.086,13.173 13.086,12.482C13.086,11.792 12.526,11.232 11.836,11.232ZM4.68,17.522C4.68,16.832 5.239,16.272 5.93,16.272C6.62,16.272 7.18,16.832 7.18,17.522C7.18,18.213 6.62,18.772 5.93,18.772C5.239,18.772 4.68,18.213 4.68,17.522ZM16.742,17.16C16.742,16.47 17.302,15.91 17.992,15.91C18.683,15.91 19.242,16.47 19.242,17.16C19.242,17.851 18.683,18.41 17.992,18.41C17.302,18.41 16.742,17.851 16.742,17.16Z" />
|
||||
|
||||
</vector>
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="28dp"
|
||||
android:height="28dp"
|
||||
android:viewportWidth="28"
|
||||
android:viewportHeight="28">
|
||||
<path
|
||||
android:pathData="M15.05,6.65C15.05,6.07 14.58,5.6 14,5.6C13.42,5.6 12.95,6.07 12.95,6.65V12.95H6.65C6.07,12.95 5.6,13.42 5.6,14C5.6,14.58 6.07,15.05 6.65,15.05H12.95V21.35C12.95,21.93 13.42,22.4 14,22.4C14.58,22.4 15.05,21.93 15.05,21.35V15.05H21.35C21.93,15.05 22.4,14.58 22.4,14C22.4,13.42 21.93,12.95 21.35,12.95H15.05V6.65Z"
|
||||
android:fillColor="#000000"
|
||||
android:fillType="evenOdd"/>
|
||||
</vector>
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
<path
|
||||
android:pathData="M9,16H11V14H9V16ZM10,0C8.687,0 7.386,0.259 6.173,0.761C4.96,1.264 3.858,2 2.929,2.929C1.054,4.804 0,7.348 0,10C0,12.652 1.054,15.196 2.929,17.071C3.858,18 4.96,18.736 6.173,19.239C7.386,19.741 8.687,20 10,20C12.652,20 15.196,18.946 17.071,17.071C18.946,15.196 20,12.652 20,10C20,8.687 19.741,7.386 19.239,6.173C18.736,4.96 18,3.858 17.071,2.929C16.142,2 15.04,1.264 13.827,0.761C12.614,0.259 11.313,0 10,0ZM10,18C5.59,18 2,14.41 2,10C2,5.59 5.59,2 10,2C14.41,2 18,5.59 18,10C18,14.41 14.41,18 10,18ZM10,4C8.939,4 7.922,4.421 7.172,5.172C6.421,5.922 6,6.939 6,8H8C8,7.47 8.211,6.961 8.586,6.586C8.961,6.211 9.47,6 10,6C10.53,6 11.039,6.211 11.414,6.586C11.789,6.961 12,7.47 12,8C12,10 9,9.75 9,13H11C11,10.75 14,10.5 14,8C14,6.939 13.579,5.922 12.828,5.172C12.078,4.421 11.061,4 10,4Z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
||||
18
core/ui/src/main/res/drawable/ic_select_18_24.xml
Normal file
18
core/ui/src/main/res/drawable/ic_select_18_24.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="18dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="18"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M4.47,13.597C4.763,13.304 5.237,13.304 5.53,13.597L9,17.067L12.47,13.597C12.763,13.304 13.237,13.304 13.53,13.597C13.823,13.89 13.823,14.365 13.53,14.658L9.53,18.658C9.237,18.951 8.763,18.951 8.47,18.658L4.47,14.658C4.177,14.365 4.177,13.89 4.47,13.597Z" />
|
||||
|
||||
<path
|
||||
android:fillColor="#919191"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M4.47,10.404C4.763,10.697 5.237,10.697 5.53,10.404L9,6.935L12.47,10.404C12.763,10.697 13.237,10.697 13.53,10.404C13.823,10.111 13.823,9.637 13.53,9.344L9.53,5.344C9.237,5.051 8.763,5.051 8.47,5.344L4.47,9.344C4.177,9.637 4.177,10.111 4.47,10.404Z" />
|
||||
|
||||
</vector>
|
||||
17
core/ui/src/main/res/drawable/ic_wallet_new_24.xml
Normal file
17
core/ui/src/main/res/drawable/ic_wallet_new_24.xml
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:pathData="M6.877,8.742C6.431,8.742 6.07,9.103 6.07,9.549C6.07,9.994 6.431,10.355 6.877,10.355H10.64C11.086,10.355 11.447,9.994 11.447,9.549C11.447,9.103 11.086,8.742 10.64,8.742H6.877Z" />
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M6.277,4.684C4.206,4.684 2.527,6.363 2.527,8.434V15.566C2.527,17.637 4.206,19.316 6.277,19.316H17.722C19.793,19.316 21.472,17.637 21.472,15.566V8.434C21.472,6.363 19.793,4.684 17.722,4.684H6.277ZM4.027,8.434C4.027,7.191 5.035,6.184 6.277,6.184H17.722C18.965,6.184 19.972,7.191 19.972,8.434V15.566C19.972,16.809 18.965,17.816 17.722,17.816H6.277C5.035,17.816 4.027,16.809 4.027,15.566V8.434Z" />
|
||||
|
||||
</vector>
|
||||
18
core/ui/src/main/res/drawable/img_approvale2_20.xml
Normal file
18
core/ui/src/main/res/drawable/img_approvale2_20.xml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="20dp"
|
||||
android:height="20dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="20"
|
||||
android:viewportHeight="20">
|
||||
|
||||
<path
|
||||
android:fillColor="#0099FF"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M8.807,1.939C9.142,1.683 9.524,1.482 9.999,1.482C10.473,1.482 10.855,1.683 11.191,1.939C11.501,2.176 11.842,2.517 12.231,2.906L12.263,2.938C12.646,3.32 12.967,3.464 13.474,3.464C13.536,3.464 13.617,3.461 13.711,3.459C13.958,3.452 14.291,3.442 14.576,3.466C14.993,3.502 15.537,3.615 15.956,4.03C16.377,4.448 16.494,4.995 16.53,5.415C16.555,5.702 16.545,6.037 16.538,6.286C16.536,6.38 16.534,6.461 16.534,6.523C16.534,6.867 16.572,7.046 16.631,7.181C16.692,7.32 16.803,7.477 17.06,7.734L17.091,7.766C17.481,8.155 17.821,8.496 18.059,8.807C18.315,9.142 18.515,9.524 18.515,9.998C18.515,10.473 18.315,10.855 18.059,11.19C17.821,11.501 17.481,11.842 17.091,12.231L17.06,12.263C16.803,12.52 16.692,12.677 16.631,12.816C16.572,12.951 16.534,13.13 16.534,13.474C16.534,13.536 16.536,13.617 16.538,13.711C16.545,13.96 16.555,14.295 16.53,14.582C16.494,15.002 16.377,15.549 15.956,15.967C15.537,16.382 14.993,16.495 14.576,16.531C14.291,16.555 13.958,16.545 13.711,16.538C13.618,16.535 13.536,16.533 13.474,16.533C13.136,16.533 12.96,16.567 12.828,16.622C12.696,16.676 12.545,16.777 12.305,17.017C12.258,17.065 12.192,17.135 12.115,17.217C11.934,17.411 11.689,17.674 11.467,17.868C11.13,18.163 10.628,18.515 9.999,18.515C9.37,18.515 8.868,18.163 8.531,17.868C8.308,17.674 8.063,17.411 7.882,17.217C7.805,17.135 7.74,17.065 7.692,17.017C7.452,16.777 7.302,16.676 7.17,16.622C7.038,16.567 6.861,16.533 6.524,16.533C6.462,16.533 6.38,16.535 6.287,16.538C6.039,16.545 5.707,16.555 5.422,16.531C5.004,16.495 4.46,16.382 4.042,15.967C3.62,15.549 3.504,15.002 3.468,14.582C3.443,14.295 3.452,13.96 3.459,13.711C3.462,13.617 3.464,13.536 3.464,13.474C3.464,13.13 3.426,12.951 3.367,12.816C3.306,12.677 3.195,12.52 2.938,12.263L2.906,12.231C2.517,11.842 2.176,11.501 1.939,11.19C1.683,10.855 1.482,10.473 1.482,9.998C1.482,9.524 1.683,9.142 1.939,8.807C2.176,8.496 2.517,8.155 2.906,7.766L2.938,7.734C3.321,7.351 3.464,7.03 3.464,6.523C3.464,6.461 3.462,6.38 3.459,6.286C3.452,6.039 3.443,5.706 3.467,5.421C3.502,5.004 3.615,4.46 4.03,4.041C4.448,3.62 4.995,3.504 5.415,3.467C5.703,3.442 6.038,3.452 6.287,3.459C6.38,3.461 6.461,3.464 6.524,3.464C7.03,3.464 7.352,3.32 7.734,2.938L7.766,2.906C8.155,2.517 8.496,2.176 8.807,1.939Z" />
|
||||
|
||||
<path
|
||||
android:fillColor="#ffffff"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M13.464,8.04C13.821,7.854 13.96,7.414 13.774,7.057C13.587,6.7 13.147,6.561 12.79,6.747C11.373,7.485 10.195,8.914 9.399,10.075C9.087,10.531 8.823,10.96 8.616,11.317C8.408,11.119 8.2,10.95 8.016,10.811C7.8,10.649 7.606,10.521 7.465,10.432C7.394,10.388 7.336,10.354 7.294,10.33C7.273,10.318 7.257,10.308 7.244,10.301L7.23,10.293L7.225,10.29L7.223,10.289L7.222,10.289C6.868,10.097 6.425,10.228 6.233,10.581C6.041,10.935 6.172,11.378 6.526,11.57L6.532,11.573C6.538,11.577 6.549,11.583 6.563,11.592C6.592,11.608 6.637,11.635 6.693,11.67C6.806,11.74 6.964,11.844 7.139,11.976C7.499,12.248 7.888,12.603 8.132,12.992C8.273,13.217 8.526,13.347 8.791,13.332C9.056,13.317 9.292,13.159 9.407,12.92L9.407,12.919L9.411,12.913L9.425,12.884C9.438,12.858 9.457,12.818 9.484,12.767C9.537,12.664 9.616,12.513 9.719,12.328C9.926,11.956 10.227,11.447 10.602,10.9C11.369,9.781 12.379,8.605 13.464,8.04Z" />
|
||||
|
||||
</vector>
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 58 KiB |
13
core/ui/src/main/res/drawable/img_knight_shield_32.xml
Normal file
13
core/ui/src/main/res/drawable/img_knight_shield_32.xml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
|
||||
<path
|
||||
android:fillColor="#FFB71B"
|
||||
android:fillType="evenOdd"
|
||||
android:pathData="M16.214,1.668C14.03,1.668 12.267,2.448 10.774,3.263C10.303,3.52 9.876,3.769 9.474,4.002C8.525,4.554 7.719,5.023 6.819,5.326C6.683,5.371 6.542,5.416 6.399,5.461C5.631,5.703 4.787,5.969 4.269,6.575C3.799,7.126 3.677,7.846 3.56,8.537L3.543,8.634C2.104,17.057 5.406,26.376 13.794,29.764C14.591,30.086 15.207,30.335 16.218,30.335C17.23,30.335 17.846,30.086 18.643,29.764C27.031,26.376 30.331,17.065 28.889,8.633L28.873,8.537C28.755,7.845 28.633,7.125 28.163,6.575C27.646,5.968 26.801,5.703 26.034,5.461L26.033,5.461C25.889,5.416 25.749,5.371 25.614,5.326C24.713,5.023 23.906,4.554 22.956,4.002C22.554,3.768 22.127,3.52 21.656,3.263C20.163,2.448 18.399,1.668 16.214,1.668ZM14.884,21.634C14.884,20.897 15.48,20.3 16.217,20.3H16.229C16.965,20.3 17.562,20.897 17.562,21.634C17.562,22.37 16.965,22.967 16.229,22.967H16.217C15.48,22.967 14.884,22.37 14.884,21.634ZM15.217,17.634C15.217,18.186 15.665,18.634 16.217,18.634C16.769,18.634 17.217,18.186 17.217,17.634V9.634C17.217,9.081 16.769,8.634 16.217,8.634C15.665,8.634 15.217,9.081 15.217,9.634V17.634Z" />
|
||||
|
||||
</vector>
|
||||
Loading…
Add table
Add a link
Reference in a new issue