Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.chipichipi.dobedobe.core.designsystem.component

import androidx.annotation.DrawableRes
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.size
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.runtime.Composable
Expand All @@ -11,24 +13,29 @@ import androidx.compose.ui.res.vectorResource
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.role
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
import com.chipichipi.dobedobe.core.designsystem.icon.DobeDobeIcons
import com.chipichipi.dobedobe.core.designsystem.theme.DobeDobeTheme

@Composable
fun DobeDobeCheckBox(
checked: Boolean,
onCheckedChange: ((Boolean) -> Unit)? = null,
modifier: Modifier = Modifier,
onCheckedChange: ((Boolean) -> Unit)? = null,
enabled: Boolean = true,
@DrawableRes checkedIconRes: Int = DobeDobeIcons.Checked,
@DrawableRes uncheckedIconRes: Int = DobeDobeIcons.Unchecked,
) {
IconButton(
onClick = { onCheckedChange?.invoke(!checked) },
modifier = modifier.semantics {
role = Role.Checkbox
},
modifier = modifier
.size(44.dp)
.semantics {
role = Role.Checkbox
},
enabled = enabled,
) {
val iconRes = if (checked) DobeDobeIcons.Checked else DobeDobeIcons.Unchecked
val iconRes = if (checked) checkedIconRes else uncheckedIconRes
Icon(
imageVector = ImageVector.vectorResource(iconRes),
contentDescription = "checked",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ import com.chipichpi.dobedobe.core.designsystem.R
object DobeDobeIcons {
val Add = R.drawable.ic_add_14
val ArrowBack = R.drawable.ic_arrow_back_24
val Bookmark = R.drawable.ic_bookmark
val PinnedFilled = R.drawable.ic_pin_fill_24
val PinnedOutLine = R.drawable.ic_pin_24
val FlagFilled = R.drawable.ic_flag_fill_24
val FlagOutLine = R.drawable.ic_flag_24
val Party = R.drawable.ic_party_24
val Fire = R.drawable.ic_fire_24
val Cancel = R.drawable.ic_cancel_circle_16
val Checked = R.drawable.ic_checked_24
val Unchecked = R.drawable.ic_unchecked_24
val Checked = R.drawable.ic_checked_36
val Unchecked = R.drawable.ic_unchecked_36
val Edit = R.drawable.ic_edit_24
val EditPlaceholder = R.drawable.ic_edit_placeholder_58
val Search = R.drawable.ic_search_24
Expand Down
16 changes: 0 additions & 16 deletions core/designsystem/src/main/res/drawable/ic_checked_24.xml

This file was deleted.

41 changes: 41 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_checked_36.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="36dp"
android:height="36dp"
android:viewportWidth="36"
android:viewportHeight="36">
<path
android:pathData="M8,0L28,0A8,8 0,0 1,36 8L36,28A8,8 0,0 1,28 36L8,36A8,8 0,0 1,0 28L0,8A8,8 0,0 1,8 0z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="18"
android:startY="0"
android:endX="18"
android:endY="36"
android:type="linear">
<item android:offset="0" android:color="#FF58FF92"/>
<item android:offset="1" android:color="#FF87F9AF"/>
</gradient>
</aapt:attr>
</path>
<path
android:pathData="M19.722,19.498L19.722,19.498C16.989,19.588 14.758,20.551 13.507,21.229L10.654,12.579C11.65,11.998 13.729,10.996 16.295,10.912L16.295,10.912C19.079,10.821 21.437,9.791 22.734,9.094L25.588,17.745C24.531,18.351 22.317,19.413 19.722,19.498Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#262C36"
android:strokeColor="#262C36"/>
<group>
<clip-path
android:pathData="M10.363,11.858L10.362,11.859C9.865,12.023 9.595,12.559 9.759,13.056L14.391,27.1C14.555,27.597 15.091,27.867 15.588,27.703L15.589,27.703C16.087,27.539 16.357,27.003 16.193,26.505L11.56,12.462C11.396,11.964 10.86,11.694 10.363,11.858Z"/>
<path
android:pathData="M10.989,13.758L10.99,13.758L9.737,9.959L9.736,9.959L10.989,13.758ZM10.99,13.758C10.438,13.94 9.843,13.64 9.661,13.088L13.46,11.835C12.95,10.289 11.283,9.449 9.737,9.959L10.99,13.758ZM9.661,13.088L14.293,27.132L18.092,25.879L13.46,11.835L9.661,13.088ZM14.293,27.132C14.111,26.58 14.411,25.985 14.963,25.803L16.216,29.602C17.762,29.092 18.602,27.425 18.092,25.879L14.293,27.132ZM14.963,25.803L14.962,25.803L16.215,29.602L16.216,29.602L14.963,25.803ZM14.962,25.803C15.514,25.622 16.108,25.921 16.291,26.473L12.492,27.726C13.002,29.272 14.669,30.112 16.215,29.602L14.962,25.803ZM16.291,26.473L11.658,12.429L7.86,13.682L12.492,27.726L16.291,26.473ZM11.658,12.429C11.84,12.981 11.54,13.576 10.989,13.758L9.736,9.959C8.189,10.469 7.35,12.136 7.86,13.682L11.658,12.429Z"
android:fillColor="#262C36"/>
</group>
<path
android:pathData="M16.327,15.472L18.5,16.5L20.67,13"
android:strokeLineJoin="round"
android:strokeWidth="1.4"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="round"/>
</vector>
6 changes: 3 additions & 3 deletions core/designsystem/src/main/res/drawable/ic_edit_24.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
android:pathData="M12.306,8.64L19.752,8.64A3,3 0,0 1,22.752 11.64L22.752,19.086A3,3 0,0 1,19.752 22.086L12.306,22.086A3,3 0,0 1,9.306 19.086L9.306,11.64A3,3 0,0 1,12.306 8.64z"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#7A828C"/>
android:strokeColor="#333945"/>
<path
android:pathData="M7.079,14.359C5.571,13.955 4.597,13.691 3.884,13.42C3.204,13.161 2.989,12.977 2.885,12.858C2.698,12.645 2.555,12.397 2.464,12.129C2.414,11.98 2.361,11.702 2.477,10.983C2.599,10.23 2.857,9.255 3.262,7.746C3.666,6.238 3.929,5.265 4.201,4.551C4.459,3.871 4.644,3.656 4.762,3.553C4.975,3.366 5.223,3.222 5.492,3.131C5.641,3.081 5.919,3.028 6.637,3.144C7.391,3.266 8.366,3.524 9.874,3.929C11.382,4.333 12.356,4.596 13.07,4.868C13.75,5.126 13.964,5.311 14.068,5.429C14.255,5.642 14.398,5.89 14.489,6.159C14.54,6.308 14.593,6.586 14.476,7.304C14.434,7.567 14.375,7.858 14.298,8.188C14.528,8.168 14.767,8.147 15.016,8.125L15.731,8.062C16.017,8.036 16.288,8.012 16.548,7.99C16.751,6.931 16.771,6.162 16.534,5.465C16.352,4.928 16.066,4.432 15.692,4.005C14.828,3.02 13.363,2.628 10.433,1.843C7.503,1.058 6.038,0.665 4.798,1.086C4.261,1.269 3.765,1.555 3.338,1.929C2.353,2.793 1.961,4.258 1.175,7.187C0.39,10.117 -0.002,11.582 0.419,12.823C0.601,13.36 0.888,13.856 1.262,14.282C2.126,15.267 3.591,15.66 6.52,16.445L6.52,16.445C7.299,16.653 7.974,16.834 8.568,16.98C8.559,16.87 8.549,16.758 8.539,16.643L8.476,15.929C8.437,15.488 8.401,15.08 8.37,14.701C7.987,14.602 7.56,14.488 7.079,14.359Z"
android:fillColor="#7A828C"
android:fillColor="#333945"
android:fillType="evenOdd"/>
<path
android:pathData="M16.03,11.421C15.636,11.421 15.317,11.74 15.317,12.133V14.716H12.734C12.34,14.716 12.021,15.035 12.021,15.429C12.021,15.822 12.34,16.141 12.734,16.141H15.317V18.724C15.317,19.117 15.636,19.436 16.03,19.436C16.423,19.436 16.742,19.117 16.742,18.724V16.141H19.324C19.718,16.141 20.037,15.822 20.037,15.429C20.037,15.035 19.718,14.716 19.324,14.716H16.742V12.133C16.742,11.74 16.423,11.421 16.03,11.421Z"
android:fillColor="#7A828C"
android:fillColor="#333945"
android:fillType="evenOdd"/>
</group>
</vector>
10 changes: 10 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_fire_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<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,22C16.418,22 20,18.642 20,14.5C20,10.358 15,2.5 13.5,2C12,1.5 4,10.358 4,14.5C4,18.642 7.582,22 12,22ZM12,19C13.657,19 15,17.658 15,16.003C15,14.348 13.125,11.208 12.563,11.008C12,10.808 9,14.348 9,16.003C9,17.658 10.343,19 12,19Z"
android:fillColor="#FF7948"
android:fillType="evenOdd"/>
</vector>
19 changes: 19 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_flag_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="20dp"
android:viewportWidth="18"
android:viewportHeight="20">
<path
android:pathData="M10.722,11.498L10.722,11.498C7.989,11.588 5.758,12.551 4.508,13.229L1.654,4.579C2.65,3.998 4.729,2.996 7.294,2.912L7.295,2.912C10.079,2.821 12.437,1.791 13.734,1.094L16.588,9.745C15.531,10.351 13.317,11.413 10.722,11.498Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#00000000"
android:strokeColor="#262C36"/>
<group>
<clip-path
android:pathData="M1.363,3.858L1.362,3.858C0.865,4.022 0.595,4.558 0.759,5.056L5.391,19.099C5.555,19.597 6.091,19.867 6.589,19.703L6.589,19.702C7.087,19.538 7.357,19.002 7.193,18.505L2.56,4.461C2.396,3.964 1.86,3.694 1.363,3.858Z"/>
<path
android:pathData="M1.989,5.758L1.99,5.757L0.737,1.959L0.736,1.959L1.989,5.758ZM1.99,5.757C1.438,5.939 0.843,5.64 0.661,5.088L4.46,3.835C3.95,2.289 2.283,1.449 0.737,1.959L1.99,5.757ZM0.661,5.088L5.293,19.132L9.092,17.879L4.46,3.835L0.661,5.088ZM5.293,19.132C5.111,18.58 5.411,17.985 5.963,17.803L7.216,21.602C8.762,21.092 9.602,19.425 9.092,17.879L5.293,19.132ZM5.963,17.803L5.962,17.803L7.215,21.602L7.216,21.602L5.963,17.803ZM5.962,17.803C6.514,17.621 7.109,17.921 7.291,18.473L3.492,19.726C4.002,21.272 5.669,22.112 7.215,21.602L5.962,17.803ZM7.291,18.473L2.658,4.429L-1.14,5.682L3.492,19.726L7.291,18.473ZM2.658,4.429C2.84,4.981 2.541,5.576 1.989,5.758L0.736,1.959C-0.81,2.469 -1.65,4.136 -1.14,5.682L2.658,4.429Z"
android:fillColor="#262C36"/>
</group>
</vector>
26 changes: 26 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_flag_fill_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<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.722,13.498L13.722,13.498C10.989,13.588 8.758,14.551 7.508,15.229L4.654,6.579C5.65,5.998 7.729,4.996 10.295,4.912L10.295,4.912C13.079,4.821 15.437,3.791 16.734,3.094L19.588,11.745C18.531,12.351 16.317,13.413 13.722,13.498Z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#262C36"
android:strokeColor="#262C36"/>
<group>
<clip-path
android:pathData="M4.363,5.858L4.362,5.858C3.865,6.022 3.595,6.558 3.759,7.056L8.391,21.099C8.555,21.597 9.091,21.867 9.589,21.703L9.589,21.702C10.087,21.538 10.357,21.002 10.193,20.505L5.56,6.461C5.396,5.964 4.86,5.694 4.363,5.858Z"/>
<path
android:pathData="M4.989,7.758L4.99,7.757L3.737,3.959L3.736,3.959L4.989,7.758ZM4.99,7.757C4.438,7.939 3.843,7.64 3.661,7.088L7.46,5.835C6.95,4.289 5.283,3.449 3.737,3.959L4.99,7.757ZM3.661,7.088L8.293,21.132L12.092,19.879L7.46,5.835L3.661,7.088ZM8.293,21.132C8.111,20.58 8.411,19.985 8.963,19.803L10.216,23.602C11.762,23.092 12.602,21.425 12.092,19.879L8.293,21.132ZM8.963,19.803L8.962,19.803L10.215,23.602L10.216,23.602L8.963,19.803ZM8.962,19.803C9.514,19.621 10.109,19.921 10.291,20.473L6.492,21.726C7.002,23.272 8.669,24.112 10.215,23.602L8.962,19.803ZM10.291,20.473L5.658,6.429L1.86,7.682L6.492,21.726L10.291,20.473ZM5.658,6.429C5.84,6.981 5.541,7.576 4.989,7.758L3.736,3.959C2.19,4.469 1.35,6.136 1.86,7.682L5.658,6.429Z"
android:fillColor="#262C36"/>
</group>
<path
android:pathData="M10.327,9.472L12.5,10.5L14.67,7"
android:strokeLineJoin="round"
android:strokeWidth="1.4"
android:fillColor="#00000000"
android:strokeColor="#ffffff"
android:strokeLineCap="round"/>
</vector>
35 changes: 35 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_party_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M0,0h24v24h-24z"/>
<path
android:pathData="M6.476,20.05C5.75,20.306 5.02,19.679 5.161,18.923L7.135,8.38C7.276,7.623 8.184,7.303 8.769,7.804L16.912,14.785C17.497,15.286 17.32,16.232 16.594,16.487L6.476,20.05Z"
android:fillColor="#30E585"/>
<path
android:pathData="M11.175,1.474C11.772,2.867 12.558,6.063 10.923,7.698"
android:strokeLineJoin="round"
android:strokeWidth="1.4"
android:fillColor="#00000000"
android:strokeColor="#30E585"
android:strokeLineCap="round"/>
<path
android:pathData="M16.942,11.09m-1.581,0a1.581,1.581 0,1 1,3.162 0a1.581,1.581 0,1 1,-3.162 0"
android:fillColor="#30E585"/>
<path
android:strokeWidth="1"
android:pathData="M16.114,5.393m-1.402,0a1.402,1.402 0,1 1,2.804 0a1.402,1.402 0,1 1,-2.804 0"
android:fillColor="#00000000"
android:strokeColor="#30E585"/>
<path
android:pathData="M19.52,8.817C19.959,8.697 21.015,8.462 21.727,8.488"
android:strokeLineJoin="round"
android:strokeWidth="1.4"
android:fillColor="#00000000"
android:strokeColor="#30E585"
android:strokeLineCap="round"/>
</group>
</vector>
18 changes: 18 additions & 0 deletions core/designsystem/src/main/res/drawable/ic_pin_24.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M0,0h24v24h-24z"/>
<group>
<clip-path
android:pathData="M19.911,7.322C20.305,7.55 20.44,8.053 20.212,8.447L15.485,16.635C15.483,16.638 15.484,16.641 15.487,16.642C15.488,16.643 15.489,16.645 15.489,16.647L15.217,20.351C15.173,20.956 14.51,21.307 13.984,21.004L9.548,18.442L8.415,20.404C8.128,20.901 7.492,21.071 6.995,20.784C6.498,20.497 6.328,19.862 6.615,19.365L7.747,17.403L3.308,14.84C2.782,14.536 2.755,13.787 3.257,13.446L6.328,11.359C6.33,11.357 6.333,11.357 6.335,11.358C6.338,11.36 6.341,11.359 6.343,11.356L11.07,3.169C11.297,2.775 11.801,2.64 12.195,2.867L19.911,7.322Z"
android:fillType="evenOdd"/>
<path
android:pathData="M20.212,8.447L18.48,7.447L20.212,8.447ZM15.485,16.635L17.217,17.635L15.485,16.635ZM15.489,16.647L13.495,16.5L13.495,16.5L15.489,16.647ZM15.217,20.351L17.212,20.497L17.212,20.497L15.217,20.351ZM13.984,21.004L12.984,22.736L13.984,21.004ZM9.548,18.442L10.547,16.71L8.815,15.71L7.815,17.442L9.548,18.442ZM8.415,20.404L6.683,19.404L8.415,20.404ZM6.615,19.365L4.883,18.365L6.615,19.365ZM7.747,17.403L9.479,18.403L10.479,16.671L8.747,15.671L7.747,17.403ZM3.257,13.446L4.381,15.1L4.381,15.1L3.257,13.446ZM6.328,11.359L7.452,13.013L7.452,13.013L6.328,11.359ZM6.343,11.356L4.611,10.356L6.343,11.356ZM11.07,3.169L12.802,4.169L11.07,3.169ZM21.944,9.447C22.724,8.097 22.261,6.37 20.911,5.59L18.911,9.054C18.348,8.729 18.156,8.01 18.48,7.447L21.944,9.447ZM17.217,17.635L21.944,9.447L18.48,7.447L13.753,15.635L17.217,17.635ZM16.487,14.91C17.441,15.461 17.768,16.681 17.217,17.635L13.753,15.635C13.199,16.594 13.528,17.821 14.487,18.374L16.487,14.91ZM17.484,16.794C17.54,16.027 17.153,15.295 16.487,14.91L14.487,18.374C13.824,17.992 13.438,17.264 13.495,16.5L17.484,16.794ZM17.212,20.497L17.484,16.793L13.495,16.5L13.222,20.204L17.212,20.497ZM12.984,22.736C14.788,23.777 17.059,22.574 17.212,20.497L13.222,20.204C13.286,19.339 14.233,18.838 14.984,19.271L12.984,22.736ZM8.548,20.174L12.984,22.736L14.984,19.271L10.547,16.71L8.548,20.174ZM7.815,17.442L6.683,19.404L10.147,21.404L11.28,19.442L7.815,17.442ZM6.683,19.404C6.948,18.944 7.536,18.787 7.995,19.052L5.995,22.516C7.449,23.356 9.308,22.858 10.147,21.404L6.683,19.404ZM7.995,19.052C8.455,19.317 8.612,19.905 8.347,20.365L4.883,18.365C4.043,19.818 4.541,21.677 5.995,22.516L7.995,19.052ZM8.347,20.365L9.479,18.403L6.015,16.403L4.883,18.365L8.347,20.365ZM2.308,16.572L6.747,19.135L8.747,15.671L4.308,13.108L2.308,16.572ZM2.133,11.791C0.41,12.962 0.505,15.53 2.308,16.572L4.308,13.108C5.06,13.542 5.099,14.612 4.381,15.1L2.133,11.791ZM5.204,9.704L2.133,11.791L4.381,15.1L7.452,13.013L5.204,9.704ZM7.335,9.626C6.668,9.242 5.84,9.272 5.204,9.704L7.452,13.013C6.82,13.443 5.997,13.473 5.335,13.09L7.335,9.626ZM4.611,10.356C5.162,9.402 6.381,9.076 7.335,9.626L5.335,13.09C6.294,13.644 7.521,13.316 8.075,12.356L4.611,10.356ZM9.338,2.169L4.611,10.356L8.075,12.356L12.802,4.169L9.338,2.169ZM13.195,1.135C11.844,0.356 10.118,0.818 9.338,2.169L12.802,4.169C12.477,4.731 11.758,4.924 11.195,4.599L13.195,1.135ZM20.911,5.59L13.195,1.135L11.195,4.599L18.911,9.054L20.911,5.59Z"
android:fillColor="#262C36"/>
</group>
</group>
</vector>
Loading