From c208f59fd84fb5ff96cebe4769d72de83d0e4ded Mon Sep 17 00:00:00 2001 From: Raja Jawahar Date: Mon, 27 Nov 2023 21:42:20 +0530 Subject: [PATCH] Package organising --- .../uicomponents/TUICheckBoxRowTest.kt | 12 +++--- .../uicomponents/TUIDraggableCardTest.kt | 2 +- .../uicomponents/TUIEmailFieldTest.kt | 10 ++--- .../uicomponents/TUIRadioButtonRowTest.kt | 12 +++--- .../uicomponents/TUISelectionCardTest.kt | 4 +- .../tarkalabs/uicomponents/TUITabBarTest.kt | 7 ++-- .../com/tarkalabs/uicomponents/TUITabTest.kt | 4 +- .../TUIDraggableCardScreenshotTest.kt | 2 +- .../TUIRadioButtonScreenShotTest.kt | 2 +- .../TUISelectionCardScreenShotTest.kt | 2 +- .../screenshots/TUITabBarScreenshotTest.kt | 38 +++++++++---------- .../screenshots/TUITabScreenshotTest.kt | 2 +- .../screenshots/TUIToggleRowScreenShotTest.kt | 9 +++-- .../components/{ => card}/TUIDraggableCard.kt | 4 +- .../components/{ => card}/TUISelectionCard.kt | 18 +++++---- .../components/{ => checkbox}/TUICheckBox.kt | 12 +++--- .../{ => checkbox}/TUICheckBoxRow.kt | 23 ++++++----- .../{ => email}/TUIEmailAreaField.kt | 2 +- .../components/{ => email}/TUIEmailField.kt | 11 ++++-- .../{ => email}/TUIEmailSubjectField.kt | 2 +- .../{ => radiobutton}/TUIRadioButton.kt | 3 +- .../{ => radiobutton}/TUIRadioButtonRow.kt | 14 ++++--- .../components/{ => tab}/TUITab.kt | 10 +++-- .../components/{ => tab}/TUITabBar.kt | 21 +++++----- 24 files changed, 124 insertions(+), 102 deletions(-) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => card}/TUIDraggableCard.kt (95%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => card}/TUISelectionCard.kt (94%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => checkbox}/TUICheckBox.kt (87%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => checkbox}/TUICheckBoxRow.kt (83%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => email}/TUIEmailAreaField.kt (98%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => email}/TUIEmailField.kt (96%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => email}/TUIEmailSubjectField.kt (98%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => radiobutton}/TUIRadioButton.kt (97%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => radiobutton}/TUIRadioButtonRow.kt (88%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => tab}/TUITab.kt (93%) rename tarkaui/src/main/java/com/tarkalabs/uicomponents/components/{ => tab}/TUITabBar.kt (86%) diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUICheckBoxRowTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUICheckBoxRowTest.kt index 093dca8b..7f2eb267 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUICheckBoxRowTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUICheckBoxRowTest.kt @@ -7,11 +7,11 @@ import androidx.compose.ui.test.hasTestTag import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.onNodeWithText -import com.tarkalabs.uicomponents.components.TUICheckBoxRow -import com.tarkalabs.uicomponents.components.TUICheckBoxRowTags -import com.tarkalabs.uicomponents.components.TUICheckBoxTags +import com.tarkalabs.uicomponents.components.checkbox.TUICheckBoxRow +import com.tarkalabs.uicomponents.components.checkbox.TUICheckBoxRowTags +import com.tarkalabs.uicomponents.components.checkbox.TUICheckBoxTags import com.tarkalabs.uicomponents.components.TUITextRowTags -import com.tarkalabs.uicomponents.components.base.ToggleRowStyle +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.Title import org.junit.Rule import org.junit.Test @@ -34,7 +34,7 @@ class TUICheckBoxRowTest { TUICheckBoxRow( checked = checkedState, title = title, - style = ToggleRowStyle.Title, + style = Title, onCheckedChange = onCheckedChange, tags = tuiCheckBoxRowTags ) @@ -60,7 +60,7 @@ class TUICheckBoxRowTest { TUICheckBoxRow( checked = checkedState, title = title, - style = ToggleRowStyle.Title, + style = Title, onCheckedChange = onCheckedChange, tags = tuiCheckBoxRowTags ) diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIDraggableCardTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIDraggableCardTest.kt index d047715c..f2935835 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIDraggableCardTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIDraggableCardTest.kt @@ -5,7 +5,7 @@ import androidx.compose.ui.test.assertIsToggleable import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.onNodeWithText -import com.tarkalabs.uicomponents.components.TUIDraggableCard +import com.tarkalabs.uicomponents.components.card.TUIDraggableCard import com.tarkalabs.uicomponents.components.TUIToggleSwitchTags import org.junit.Rule import org.junit.Test diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIEmailFieldTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIEmailFieldTest.kt index f961c43c..6cacca66 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIEmailFieldTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIEmailFieldTest.kt @@ -10,9 +10,9 @@ import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performImeAction import androidx.compose.ui.test.performTextInput import com.tarkalabs.tarkaicons.AddCircle24 -import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUIEmailField -import com.tarkalabs.uicomponents.components.TUIEmailFieldTags +import com.tarkalabs.tarkaicons.TarkaIcons.Regular +import com.tarkalabs.uicomponents.components.email.TUIEmailField +import com.tarkalabs.uicomponents.components.email.TUIEmailFieldTags import com.tarkalabs.uicomponents.components.base.TUIIconButtonTags import org.junit.Rule import org.junit.Test @@ -41,7 +41,7 @@ class TUIEmailFieldTest { TUIEmailField( title = "To", emailAddressList = emailList, - trailingIcon = TarkaIcons.Regular.AddCircle24, + trailingIcon = Regular.AddCircle24, onItemRemoved = { position -> }, @@ -82,7 +82,7 @@ class TUIEmailFieldTest { TUIEmailField( title = "To", emailAddressList = emailList, - trailingIcon = TarkaIcons.Regular.AddCircle24, + trailingIcon = Regular.AddCircle24, onItemRemoved = { position -> }, diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIRadioButtonRowTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIRadioButtonRowTest.kt index 8c43dd5c..57de44da 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIRadioButtonRowTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUIRadioButtonRowTest.kt @@ -6,10 +6,10 @@ import androidx.compose.ui.test.hasTestTag import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.onNodeWithText -import com.tarkalabs.uicomponents.components.TUIRadioButtonRow -import com.tarkalabs.uicomponents.components.TUIRadioButtonRowTags -import com.tarkalabs.uicomponents.components.TUIRadioButtonTags -import com.tarkalabs.uicomponents.components.base.ToggleRowStyle +import com.tarkalabs.uicomponents.components.radiobutton.TUIRadioButtonRow +import com.tarkalabs.uicomponents.components.radiobutton.TUIRadioButtonRowTags +import com.tarkalabs.uicomponents.components.radiobutton.TUIRadioButtonTags +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.Title import org.junit.Rule import org.junit.Test @@ -30,7 +30,7 @@ class TUIRadioButtonRowTest { TUIRadioButtonRow( selected = selectedState, title = title, - style = ToggleRowStyle.Title, + style = Title, onOptionSelected = onOptionSelected, tags = radioButtonRowTag ) @@ -56,7 +56,7 @@ class TUIRadioButtonRowTest { TUIRadioButtonRow( selected = selectedState, title = title, - style = ToggleRowStyle.Title, + style = Title, onOptionSelected = onOptionSelected, tags = radioButtonRowTag ) diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUISelectionCardTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUISelectionCardTest.kt index d577bd14..aa37a25f 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUISelectionCardTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUISelectionCardTest.kt @@ -7,8 +7,8 @@ import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.performClick import com.tarkalabs.tarkaicons.ChevronRight24 import com.tarkalabs.tarkaicons.Person24 -import com.tarkalabs.uicomponents.components.TUISelectionCard -import com.tarkalabs.uicomponents.components.TUISelectionCardTags +import com.tarkalabs.uicomponents.components.card.TUISelectionCard +import com.tarkalabs.uicomponents.components.card.TUISelectionCardTags import com.tarkalabs.tarkaicons.TarkaIcons import org.junit.Rule import org.junit.Test diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabBarTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabBarTest.kt index 04bf5c85..713c55f8 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabBarTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabBarTest.kt @@ -11,10 +11,9 @@ import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.performClick import com.tarkalabs.tarkaicons.Tabs24 import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUITabBar -import com.tarkalabs.uicomponents.components.TUITabBarTags -import com.tarkalabs.uicomponents.components.TUITabTags -import com.tarkalabs.uicomponents.components.TabItem +import com.tarkalabs.uicomponents.components.tab.TUITabBar +import com.tarkalabs.uicomponents.components.tab.TUITabBarTags +import com.tarkalabs.uicomponents.components.tab.TabItem import org.junit.Rule import org.junit.Test import org.mockito.kotlin.mock diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabTest.kt index 0613ab67..30c7defb 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/TUITabTest.kt @@ -7,8 +7,8 @@ import androidx.compose.ui.test.onNodeWithText import androidx.compose.ui.test.performClick import com.tarkalabs.tarkaicons.Circle20 import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUITab -import com.tarkalabs.uicomponents.components.TUITabTags +import com.tarkalabs.uicomponents.components.tab.TUITab +import com.tarkalabs.uicomponents.components.tab.TUITabTags import org.junit.Rule import org.junit.Test import org.mockito.kotlin.mock diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIDraggableCardScreenshotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIDraggableCardScreenshotTest.kt index 039baf23..cd575855 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIDraggableCardScreenshotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIDraggableCardScreenshotTest.kt @@ -1,7 +1,7 @@ package com.tarkalabs.uicomponents.screenshots import androidx.compose.ui.Modifier -import com.tarkalabs.uicomponents.components.TUIDraggableCard +import com.tarkalabs.uicomponents.components.card.TUIDraggableCard import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIRadioButtonScreenShotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIRadioButtonScreenShotTest.kt index 9f207914..7f984304 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIRadioButtonScreenShotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIRadioButtonScreenShotTest.kt @@ -1,6 +1,6 @@ package com.tarkalabs.uicomponents.screenshots -import com.tarkalabs.uicomponents.components.TUIRadioButton +import com.tarkalabs.uicomponents.components.radiobutton.TUIRadioButton import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUISelectionCardScreenShotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUISelectionCardScreenShotTest.kt index 6c0220f2..b58d7ac2 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUISelectionCardScreenShotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUISelectionCardScreenShotTest.kt @@ -6,7 +6,7 @@ import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Person24 import com.tarkalabs.tarkaicons.TarkaIcon import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUISelectionCard +import com.tarkalabs.uicomponents.components.card.TUISelectionCard import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabBarScreenshotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabBarScreenshotTest.kt index 1ba45295..2ed2bc60 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabBarScreenshotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabBarScreenshotTest.kt @@ -4,9 +4,9 @@ import androidx.compose.foundation.layout.padding import androidx.compose.ui.Modifier import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Circle12 -import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUITabBar -import com.tarkalabs.uicomponents.components.TabItem +import com.tarkalabs.tarkaicons.TarkaIcons.Regular +import com.tarkalabs.uicomponents.components.tab.TUITabBar +import com.tarkalabs.uicomponents.components.tab.TabItem import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized @@ -41,14 +41,14 @@ class TUITabBarScreenshotTest( ) val tabItemsWithIcons = listOf( - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), ) val tabItemsWithContent = listOf( @@ -63,14 +63,14 @@ class TUITabBarScreenshotTest( ) val tabItemsWithIconAndContent = listOf( - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), ) } diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabScreenshotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabScreenshotTest.kt index 45093f19..43e191ea 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabScreenshotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUITabScreenshotTest.kt @@ -3,7 +3,7 @@ package com.tarkalabs.uicomponents.screenshots import com.tarkalabs.tarkaicons.Circle20 import com.tarkalabs.tarkaicons.TarkaIcon import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.TUITab +import com.tarkalabs.uicomponents.components.tab.TUITab import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized diff --git a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIToggleRowScreenShotTest.kt b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIToggleRowScreenShotTest.kt index 98984028..ffa5546b 100644 --- a/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIToggleRowScreenShotTest.kt +++ b/tarkaui/src/androidTest/java/com/tarkalabs/uicomponents/screenshots/TUIToggleRowScreenShotTest.kt @@ -1,10 +1,11 @@ package com.tarkalabs.uicomponents.screenshots -import com.tarkalabs.uicomponents.components.TUICheckBoxRow -import com.tarkalabs.uicomponents.components.TUIRadioButtonRow +import com.tarkalabs.uicomponents.components.checkbox.TUICheckBoxRow +import com.tarkalabs.uicomponents.components.radiobutton.TUIRadioButtonRow import com.tarkalabs.uicomponents.components.base.TUIToggleRow import com.tarkalabs.uicomponents.components.base.ToggleRowStyle import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.Title +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.TitleWithDescription import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized @@ -48,7 +49,7 @@ open class TUIToggleRowScreenShotTest( compareScreenshotFor(darkTheme, "_testCheckboxRowStyleTitleDescription_$testName") { TUICheckBoxRow( title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description"), + style = TitleWithDescription("Description"), checked = isChecked, onCheckedChange = {}) } @@ -57,7 +58,7 @@ open class TUIToggleRowScreenShotTest( compareScreenshotFor(darkTheme, "_testRadioRowStyleTitleDescription_$testName") { TUIRadioButtonRow( title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description"), + style = TitleWithDescription("Description"), selected = isChecked, onOptionSelected = {}) } diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIDraggableCard.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUIDraggableCard.kt similarity index 95% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIDraggableCard.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUIDraggableCard.kt index 442f40b1..db6323a0 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIDraggableCard.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUIDraggableCard.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.card import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -21,6 +21,8 @@ import androidx.compose.ui.unit.dp import androidx.compose.ui.zIndex import com.tarkalabs.tarkaicons.ReOrderDotsVertical24 import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.uicomponents.components.TUIToggleSwitch +import com.tarkalabs.uicomponents.components.VerticalSpacer import com.tarkalabs.uicomponents.theme.TUITheme /** diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUISelectionCard.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUISelectionCard.kt similarity index 94% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUISelectionCard.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUISelectionCard.kt index fc0ebcae..f28d1fdc 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUISelectionCard.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/card/TUISelectionCard.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.card import androidx.compose.foundation.background import androidx.compose.foundation.clickable @@ -26,8 +26,10 @@ import com.tarkalabs.tarkaicons.ChevronRight24 import com.tarkalabs.tarkaicons.Person24 import com.tarkalabs.tarkaicons.TarkaIcon import com.tarkalabs.tarkaicons.TarkaIcons -import com.tarkalabs.uicomponents.components.SecondaryDetailsStyle.ERROR -import com.tarkalabs.uicomponents.components.SecondaryDetailsStyle.NORMAL +import com.tarkalabs.tarkaicons.TarkaIcons.Regular +import com.tarkalabs.uicomponents.components.VerticalSpacer +import com.tarkalabs.uicomponents.components.card.SecondaryDetailsStyle.ERROR +import com.tarkalabs.uicomponents.components.card.SecondaryDetailsStyle.NORMAL import com.tarkalabs.uicomponents.components.base.TUIBadge import com.tarkalabs.uicomponents.theme.TUITheme @@ -212,7 +214,7 @@ fun TUISelectionCardPreview() { ) {} VerticalSpacer(space = 14) TUISelectionCard( - leadingIcon = TarkaIcons.Regular.Person24, + leadingIcon = Regular.Person24, label = "Label", primaryDescription = "Description", isSelected = true @@ -226,7 +228,7 @@ fun TUISelectionCardPreview() { VerticalSpacer(space = 14) TUISelectionCard( - leadingIcon = TarkaIcons.Regular.Person24, + leadingIcon = Regular.Person24, label = "Label", primaryDescription = "Description", secondaryDescription = "Description2", @@ -238,7 +240,7 @@ fun TUISelectionCardPreview() { ) {} VerticalSpacer(space = 14) TUISelectionCard( - leadingIcon = TarkaIcons.Regular.Person24, + leadingIcon = Regular.Person24, label = "Label", primaryDescription = "Description", secondaryDescription = "Description2", @@ -251,7 +253,7 @@ fun TUISelectionCardPreview() { VerticalSpacer(space = 14) TUISelectionCard( - leadingIcon = TarkaIcons.Regular.Person24, + leadingIcon = Regular.Person24, label = "Label", primaryDescription = "Description", secondaryDescription = "Description2", @@ -263,7 +265,7 @@ fun TUISelectionCardPreview() { ) {} VerticalSpacer(space = 14) TUISelectionCard( - leadingIcon = TarkaIcons.Regular.Person24, + leadingIcon = Regular.Person24, label = "Label", primaryDescription = "Description", secondaryDescription = "Description2", diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBox.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBox.kt similarity index 87% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBox.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBox.kt index 455881e4..e2ca0ee3 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBox.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBox.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.checkbox import androidx.compose.foundation.background import androidx.compose.foundation.border @@ -21,6 +21,8 @@ import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Checkmark16 import com.tarkalabs.tarkaicons.TarkaIcon import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.tarkaicons.TarkaIcons.Filled +import com.tarkalabs.uicomponents.components.VerticalSpacer import com.tarkalabs.uicomponents.theme.TUITheme /** @@ -97,16 +99,16 @@ import com.tarkalabs.uicomponents.theme.TUITheme .fillMaxWidth() .padding(20.dp) ) { - TUICheckBox(checked = true, enabled = true, icon = TarkaIcons.Filled.Checkmark16) { + TUICheckBox(checked = true, enabled = true, icon = Filled.Checkmark16) { } VerticalSpacer(space = 20) - TUICheckBox(checked = true, enabled = false, icon = TarkaIcons.Filled.Checkmark16) { + TUICheckBox(checked = true, enabled = false, icon = Filled.Checkmark16) { } VerticalSpacer(space = 20) - TUICheckBox(checked = false, enabled = true, icon = TarkaIcons.Filled.Checkmark16) { + TUICheckBox(checked = false, enabled = true, icon = Filled.Checkmark16) { } VerticalSpacer(space = 20) - TUICheckBox(checked = false, enabled = false, icon = TarkaIcons.Filled.Checkmark16) { + TUICheckBox(checked = false, enabled = false, icon = Filled.Checkmark16) { } } diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBoxRow.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBoxRow.kt similarity index 83% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBoxRow.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBoxRow.kt index 4e8d0a55..980af452 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUICheckBoxRow.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/checkbox/TUICheckBoxRow.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.checkbox import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -18,8 +18,13 @@ import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Checkmark16 import com.tarkalabs.tarkaicons.TarkaIcon import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.tarkaicons.TarkaIcons.Filled +import com.tarkalabs.uicomponents.components.HorizontalSpacer +import com.tarkalabs.uicomponents.components.TUITextRowTags import com.tarkalabs.uicomponents.components.base.TUIToggleRow import com.tarkalabs.uicomponents.components.base.ToggleRowStyle +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.Title +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.TitleWithDescription /** * A composable function that displays a checkbox and a text row in a horizontal layout. @@ -101,35 +106,35 @@ data class TUICheckBoxRowTags( TUICheckBoxRow( checked = true, enabled = true, - icon = TarkaIcons.Filled.Checkmark16, + icon = Filled.Checkmark16, title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description") + style = TitleWithDescription("Description") ) { } TUICheckBoxRow( checked = false, enabled = true, - icon = TarkaIcons.Filled.Checkmark16, + icon = Filled.Checkmark16, title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description") + style = TitleWithDescription("Description") ) { } TUICheckBoxRow( checked = true, enabled = false, - icon = TarkaIcons.Filled.Checkmark16, + icon = Filled.Checkmark16, title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description") + style = TitleWithDescription("Description") ) { } TUICheckBoxRow( checked = true, enabled = false, - icon = TarkaIcons.Filled.Checkmark16, + icon = Filled.Checkmark16, title = "Title", - style = ToggleRowStyle.Title + style = Title ) { } diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailAreaField.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailAreaField.kt similarity index 98% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailAreaField.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailAreaField.kt index a66981b6..7c0e5fc8 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailAreaField.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailAreaField.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.email import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailField.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailField.kt similarity index 96% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailField.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailField.kt index 0da49c15..110355e4 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailField.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailField.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.email import android.util.Patterns import androidx.compose.animation.AnimatedVisibility @@ -44,8 +44,11 @@ import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.AddCircle24 import com.tarkalabs.tarkaicons.Dismiss20 import com.tarkalabs.tarkaicons.TarkaIcon -import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.tarkaicons.TarkaIcons.Filled +import com.tarkalabs.tarkaicons.TarkaIcons.Regular import com.tarkalabs.uicomponents.components.ChipType.Input +import com.tarkalabs.uicomponents.components.TUIChip +import com.tarkalabs.uicomponents.components.TUIChipTags import com.tarkalabs.uicomponents.components.base.IconButtonStyle.GHOST import com.tarkalabs.uicomponents.components.base.TUIIconButton import com.tarkalabs.uicomponents.components.base.TUIIconButtonTags @@ -128,7 +131,7 @@ import kotlinx.coroutines.launch TUIChip(modifier = Modifier .padding(2.dp) .testTag(email), type = Input( - trailingIcon = TarkaIcons.Filled.Dismiss20, + trailingIcon = Filled.Dismiss20, containerColor = TUITheme.colors.surfaceVariant ), label = email, tags = tags.chipTags, onClick = { @@ -239,7 +242,7 @@ data class TUIEmailFieldTags( Box(modifier = Modifier.fillMaxWidth()) { TUIEmailField(title = "To", emailAddressList = emailList, - trailingIcon = TarkaIcons.Regular.AddCircle24, + trailingIcon = Regular.AddCircle24, onItemRemoved = { position -> emailList.removeAt(position) }, diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailSubjectField.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailSubjectField.kt similarity index 98% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailSubjectField.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailSubjectField.kt index a6ceae71..d6976c30 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIEmailSubjectField.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/email/TUIEmailSubjectField.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.email import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButton.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButton.kt similarity index 97% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButton.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButton.kt index 0b840079..f480807f 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButton.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButton.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.radiobutton import androidx.compose.foundation.Canvas import androidx.compose.foundation.background @@ -21,6 +21,7 @@ import androidx.compose.ui.platform.testTag import androidx.compose.ui.semantics.Role import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.tarkalabs.uicomponents.components.VerticalSpacer import com.tarkalabs.uicomponents.theme.TUITheme /** diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButtonRow.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButtonRow.kt similarity index 88% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButtonRow.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButtonRow.kt index 997ace82..23bbacf3 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUIRadioButtonRow.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/radiobutton/TUIRadioButtonRow.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.radiobutton import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -16,8 +16,12 @@ import androidx.compose.ui.platform.testTag import androidx.compose.ui.semantics.Role import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp +import com.tarkalabs.uicomponents.components.HorizontalSpacer +import com.tarkalabs.uicomponents.components.TUITextRowTags import com.tarkalabs.uicomponents.components.base.TUIToggleRow import com.tarkalabs.uicomponents.components.base.ToggleRowStyle +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.Title +import com.tarkalabs.uicomponents.components.base.ToggleRowStyle.TitleWithDescription /** * A composable function that displays a RadioButton and a text row in a horizontal layout. @@ -99,28 +103,28 @@ data class TUIRadioButtonRowTags( selected = true, enabled = true, title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description") + style = TitleWithDescription("Description") ) { } TUIRadioButtonRow( selected = false, enabled = true, title = "Title", - style = ToggleRowStyle.TitleWithDescription("Description") + style = TitleWithDescription("Description") ) { } TUIRadioButtonRow( selected = true, enabled = true, title = "Title", - style = ToggleRowStyle.Title + style = Title ) { } TUIRadioButtonRow( selected = false, enabled = true, title = "Title", - style = ToggleRowStyle.Title + style = Title ) { } } diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITab.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITab.kt similarity index 93% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITab.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITab.kt index 556344f9..41d44f42 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITab.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITab.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.tab import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement @@ -23,7 +23,9 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Circle20 import com.tarkalabs.tarkaicons.TarkaIcon -import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.tarkaicons.TarkaIcons.Regular +import com.tarkalabs.uicomponents.components.HorizontalSpacer +import com.tarkalabs.uicomponents.components.VerticalSpacer import com.tarkalabs.uicomponents.theme.TUITheme /** @@ -119,13 +121,13 @@ fun TUITabPreview() { TUITab( modifier = Modifier.width(105.dp), title = "Tab", - leadingIcon = TarkaIcons.Regular.Circle20 + leadingIcon = Regular.Circle20 ) {} HorizontalSpacer(space = 5) TUITab( modifier = Modifier.width(105.dp), title = "Tab", - leadingIcon = TarkaIcons.Regular.Circle20, + leadingIcon = Regular.Circle20, isSelected = true ) {} } diff --git a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITabBar.kt b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITabBar.kt similarity index 86% rename from tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITabBar.kt rename to tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITabBar.kt index cefb9445..8f608d76 100644 --- a/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/TUITabBar.kt +++ b/tarkaui/src/main/java/com/tarkalabs/uicomponents/components/tab/TUITabBar.kt @@ -1,4 +1,4 @@ -package com.tarkalabs.uicomponents.components +package com.tarkalabs.uicomponents.components.tab import androidx.compose.foundation.background import androidx.compose.foundation.horizontalScroll @@ -22,7 +22,8 @@ import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import com.tarkalabs.tarkaicons.Circle12 import com.tarkalabs.tarkaicons.TarkaIcon -import com.tarkalabs.tarkaicons.TarkaIcons +import com.tarkalabs.tarkaicons.TarkaIcons.Regular +import com.tarkalabs.uicomponents.components.VerticalSpacer import com.tarkalabs.uicomponents.theme.TUITheme /** @@ -99,14 +100,14 @@ fun PreviewTUITabRow() { TabItem("Tab"), ) val tabItemsWithIcons = listOf( - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), - TabItem("Tab", leadingTabIcon = TarkaIcons.Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), + TabItem("Tab", leadingTabIcon = Regular.Circle12), ) TUITheme {