Skip to content

Commit

Permalink
feat(sdds-acore/uikit): Vs base theme (#7)
Browse files Browse the repository at this point in the history
* feat(sdds-acore/uikit): Added material dependency

* feat(sdds-acore/uikit): Added color and font attrs. Added base theme

* feat(sdds-acore/uikit): Removed unnecessary text-appearances.xml

* feat(sdds-acore/uikit): Added text-appearance and typographhy attrs. Added typography attrs to theme

* feat(sdds-acore/uikit): Apply auto format

* feat(sdds-acore/uikit): Removed unnecessary string format

* feat(sdds-acore/uikit): Added round shapes

* feat(sdds-acore/uikit): Moved attrs to base theme
  • Loading branch information
raininforest authored Mar 22, 2024
1 parent 912cd07 commit ec5d743
Show file tree
Hide file tree
Showing 12 changed files with 825 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ staticAnalysis-ktlint = "0.50.0"
staticAnalysis-lint = "30.4.2"
staticAnalysis-spotless = "6.20.0"

android-material = "1.3.0"
androidX-core = "1.7.0"
androidX-appcompat = "1.3.1"
androidX-composeBom = "2022.11.00"
Expand All @@ -29,6 +30,7 @@ plugin-gradleNexusPublish = "1.3.0"
plugin-gradlePluginPublish = "1.2.1"

[libraries]
base-android-material = { module = "com.google.android.material:material", version.ref = "android-material" }
base-androidX-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidX-appcompat" }
base-androidX-core = { module = "androidx.core:core-ktx", version.ref = "androidX-core" }
base-androidX-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "androidX-composeBom" }
Expand Down
1 change: 1 addition & 0 deletions sdds-core/uikit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ android {

dependencies {
implementation(libs.base.androidX.appcompat)
implementation(libs.base.android.material)
androidTestImplementation(libs.base.test.ui.espresso.core)
}
7 changes: 7 additions & 0 deletions sdds-core/uikit/src/main/res/values-night/themes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Sdds.Theme.DayNight" parent="Sdds.Theme">

</style>
</resources>
414 changes: 414 additions & 0 deletions sdds-core/uikit/src/main/res/values/color-attrs.xml

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions sdds-core/uikit/src/main/res/values/font-family-attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="sdds_fontFamilyDisplay" format="reference" />
<attr name="sdds_fontFamilyHeader" format="reference" />
<attr name="sdds_fontFamilyBody" format="reference" />
<attr name="sdds_fontFamilyText" format="reference" />
</resources>
10 changes: 10 additions & 0 deletions sdds-core/uikit/src/main/res/values/radius-attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="sdds_cRxxs" format="reference|dimension" />
<attr name="sdds_cRxs" format="reference|dimension" />
<attr name="sdds_cRs" format="reference|dimension" />
<attr name="sdds_cRm" format="reference|dimension" />
<attr name="sdds_cRl" format="reference|dimension" />
<attr name="sdds_cRxl" format="reference|dimension" />
<attr name="sdds_cRxxl" format="reference|dimension" />
</resources>
10 changes: 10 additions & 0 deletions sdds-core/uikit/src/main/res/values/shape-attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="sdds_shapeRoundXXS" format="reference" />
<attr name="sdds_shapeRoundXS" format="reference" />
<attr name="sdds_shapeRoundS" format="reference" />
<attr name="sdds_shapeRoundM" format="reference" />
<attr name="sdds_shapeRoundL" format="reference" />
<attr name="sdds_shapeRoundXL" format="reference" />
<attr name="sdds_shapeRoundXXL" format="reference" />
</resources>
37 changes: 37 additions & 0 deletions sdds-core/uikit/src/main/res/values/shapes.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Sdds.Shape" />

<style name="Sdds.Shape.Round">
<item name="cornerFamily">rounded</item>
</style>

<style name="Sdds.Shape.Round.XXS">
<item name="cornerSize">?sdds_cRxxs</item>
</style>

<style name="Sdds.Shape.Round.XS">
<item name="cornerSize">?sdds_cRxs</item>
</style>

<style name="Sdds.Shape.Round.S">
<item name="cornerSize">?sdds_cRs</item>
</style>

<style name="Sdds.Shape.Round.M">
<item name="cornerSize">?sdds_cRm</item>
</style>

<style name="Sdds.Shape.Round.L">
<item name="cornerSize">?sdds_cRl</item>
</style>

<style name="Sdds.Shape.Round.XL">
<item name="cornerSize">?sdds_cRxl</item>
</style>

<style name="Sdds.Shape.Round.XXL">
<item name="cornerSize">?sdds_cRxxl</item>
</style>
</resources>
44 changes: 44 additions & 0 deletions sdds-core/uikit/src/main/res/values/text-appearance-attrs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Display -->
<attr name="sdds_textAppearanceDisplayLN" format="reference" />
<attr name="sdds_textAppearanceDisplayLB" format="reference" />
<attr name="sdds_textAppearanceDisplayMN" format="reference" />
<attr name="sdds_textAppearanceDisplayMB" format="reference" />
<attr name="sdds_textAppearanceDisplaySN" format="reference" />
<attr name="sdds_textAppearanceDisplaySB" format="reference" />

<!-- Header -->
<attr name="sdds_textAppearanceH1N" format="reference" />
<attr name="sdds_textAppearanceH1B" format="reference" />
<attr name="sdds_textAppearanceH2N" format="reference" />
<attr name="sdds_textAppearanceH2B" format="reference" />
<attr name="sdds_textAppearanceH3N" format="reference" />
<attr name="sdds_textAppearanceH3B" format="reference" />
<attr name="sdds_textAppearanceH4N" format="reference" />
<attr name="sdds_textAppearanceH4B" format="reference" />
<attr name="sdds_textAppearanceH5N" format="reference" />
<attr name="sdds_textAppearanceH5B" format="reference" />

<!-- Body -->
<attr name="sdds_textAppearanceBodyLN" format="reference" />
<attr name="sdds_textAppearanceBodyLB" format="reference" />
<attr name="sdds_textAppearanceBodyMN" format="reference" />
<attr name="sdds_textAppearanceBodyMB" format="reference" />
<attr name="sdds_textAppearanceBodySN" format="reference" />
<attr name="sdds_textAppearanceBodySB" format="reference" />
<attr name="sdds_textAppearanceBodyXSN" format="reference" />
<attr name="sdds_textAppearanceBodyXSB" format="reference" />
<attr name="sdds_textAppearanceBodyXXSN" format="reference" />
<attr name="sdds_textAppearanceBodyXXSB" format="reference" />

<!-- Text -->
<attr name="sdds_textAppearanceTextLN" format="reference" />
<attr name="sdds_textAppearanceTextLB" format="reference" />
<attr name="sdds_textAppearanceTextMN" format="reference" />
<attr name="sdds_textAppearanceTextMB" format="reference" />
<attr name="sdds_textAppearanceTextSN" format="reference" />
<attr name="sdds_textAppearanceTextSB" format="reference" />
<attr name="sdds_textAppearanceTextXSN" format="reference" />
<attr name="sdds_textAppearanceTextXSB" format="reference" />
</resources>
183 changes: 183 additions & 0 deletions sdds-core/uikit/src/main/res/values/text-styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="Sdds.Typography" />

<style name="Sdds.Typography.Display" />

<style name="Sdds.Typography.Display.L" />

<style name="Sdds.Typography.Display.L.Normal">
<item name="android:textAppearance">?sdds_textAppearanceDisplayLN</item>
</style>

<style name="Sdds.Typography.Display.L.Bold">
<item name="android:textAppearance">?sdds_textAppearanceDisplayLB</item>
</style>

<style name="Sdds.Typography.Display.M" />

<style name="Sdds.Typography.Display.M.Normal">
<item name="android:textAppearance">?sdds_textAppearanceDisplayMN</item>
</style>

<style name="Sdds.Typography.Display.M.Bold">
<item name="android:textAppearance">?sdds_textAppearanceDisplayMB</item>
</style>

<style name="Sdds.Typography.Display.S" />

<style name="Sdds.Typography.Display.S.Normal">
<item name="android:textAppearance">?sdds_textAppearanceDisplaySN</item>
</style>

<style name="Sdds.Typography.Display.S.Bold">
<item name="android:textAppearance">?sdds_textAppearanceDisplaySB</item>
</style>

<style name="Sdds.Typography.Header" />

<style name="Sdds.Typography.Header.H1" />

<style name="Sdds.Typography.Header.H1.Normal">
<item name="android:textAppearance">?sdds_textAppearanceH1N</item>
</style>

<style name="Sdds.Typography.Header.H1.Bold">
<item name="android:textAppearance">?sdds_textAppearanceH1B</item>
</style>

<style name="Sdds.Typography.Header.H2" />

<style name="Sdds.Typography.Header.H2.Normal">
<item name="android:textAppearance">?sdds_textAppearanceH2N</item>
</style>

<style name="Sdds.Typography.Header.H2.Bold">
<item name="android:textAppearance">?sdds_textAppearanceH2B</item>
</style>

<style name="Sdds.Typography.Header.H3" />

<style name="Sdds.Typography.Header.H3.Normal">
<item name="android:textAppearance">?sdds_textAppearanceH3N</item>
</style>

<style name="Sdds.Typography.Header.H3.Bold">
<item name="android:textAppearance">?sdds_textAppearanceH3B</item>
</style>

<style name="Sdds.Typography.Header.H4" />

<style name="Sdds.Typography.Header.H4.Normal">
<item name="android:textAppearance">?sdds_textAppearanceH4N</item>
</style>

<style name="Sdds.Typography.Header.H4.Bold">
<item name="android:textAppearance">?sdds_textAppearanceH4B</item>
</style>

<style name="Sdds.Typography.Header.H5" />

<style name="Sdds.Typography.Header.H5.Normal">
<item name="android:textAppearance">?sdds_textAppearanceH5N</item>
</style>

<style name="Sdds.Typography.Header.H5.Bold">
<item name="android:textAppearance">?sdds_textAppearanceH5B</item>
</style>

<style name="Sdds.Typography.Body" />

<style name="Sdds.Typography.Body.L" />

<style name="Sdds.Typography.Body.L.Normal">
<item name="android:textAppearance">?sdds_textAppearanceBodyLN</item>
</style>

<style name="Sdds.Typography.Body.L.Bold">
<item name="android:textAppearance">?sdds_textAppearanceBodyLB</item>
</style>

<style name="Sdds.Typography.Body.M" />

<style name="Sdds.Typography.Body.M.Normal">
<item name="android:textAppearance">?sdds_textAppearanceBodyMN</item>
</style>

<style name="Sdds.Typography.Body.M.Bold">
<item name="android:textAppearance">?sdds_textAppearanceBodyMB</item>
</style>

<style name="Sdds.Typography.Body.S" />

<style name="Sdds.Typography.Body.S.Normal">
<item name="android:textAppearance">?sdds_textAppearanceBodySN</item>
</style>

<style name="Sdds.Typography.Body.S.Bold">
<item name="android:textAppearance">?sdds_textAppearanceBodySB</item>
</style>

<style name="Sdds.Typography.Body.XS" />

<style name="Sdds.Typography.Body.XS.Normal">
<item name="android:textAppearance">?sdds_textAppearanceBodyXSN</item>
</style>

<style name="Sdds.Typography.Body.XS.Bold">
<item name="android:textAppearance">?sdds_textAppearanceBodyXSB</item>
</style>

<style name="Sdds.Typography.Body.XXS" />

<style name="Sdds.Typography.Body.XXS.Normal">
<item name="android:textAppearance">?sdds_textAppearanceBodyXXSN</item>
</style>

<style name="Sdds.Typography.Body.XXS.Bold">
<item name="android:textAppearance">?sdds_textAppearanceBodyXXSB</item>
</style>

<style name="Sdds.Typography.Text" />

<style name="Sdds.Typography.Text.L" />

<style name="Sdds.Typography.Text.L.Normal">
<item name="android:textAppearance">?sdds_textAppearanceTextLN</item>
</style>

<style name="Sdds.Typography.Text.L.Bold">
<item name="android:textAppearance">?sdds_textAppearanceTextLB</item>
</style>

<style name="Sdds.Typography.Text.M" />

<style name="Sdds.Typography.Text.M.Normal">
<item name="android:textAppearance">?sdds_textAppearanceTextMN</item>
</style>

<style name="Sdds.Typography.Text.M.Bold">
<item name="android:textAppearance">?sdds_textAppearanceTextMB</item>
</style>

<style name="Sdds.Typography.Text.S" />

<style name="Sdds.Typography.Text.S.Normal">
<item name="android:textAppearance">?sdds_textAppearanceTextSN</item>
</style>

<style name="Sdds.Typography.Text.S.Bold">
<item name="android:textAppearance">?sdds_textAppearanceTextSB</item>
</style>

<style name="Sdds.Typography.Text.XS" />

<style name="Sdds.Typography.Text.XS.Normal">
<item name="android:textAppearance">?sdds_textAppearanceTextXSN</item>
</style>

<style name="Sdds.Typography.Text.XS.Bold">
<item name="android:textAppearance">?sdds_textAppearanceTextXSB</item>
</style>
</resources>
Loading

0 comments on commit ec5d743

Please sign in to comment.