Skip to content

Commit d2a184f

Browse files
committed
Initial Commit
0 parents  commit d2a184f

File tree

36 files changed

+2337
-0
lines changed

36 files changed

+2337
-0
lines changed

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: ci
2+
on:
3+
push:
4+
branches:
5+
- main
6+
permissions:
7+
contents: write
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Configure Git Credentials
14+
run: |
15+
git config user.name github-actions[bot]
16+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17+
- uses: actions/setup-java@v3
18+
with:
19+
distribution: 'corretto'
20+
java-version: '17'
21+
- uses: actions/setup-python@v5
22+
with:
23+
python-version: 3.x
24+
- name: Prepare demo app
25+
run: bash scripts/update_demo.sh
26+
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
27+
- uses: actions/cache@v4
28+
with:
29+
key: mkdocs-material-${{ env.cache_id }}
30+
path: .cache
31+
restore-keys: |
32+
mkdocs-material-
33+
- run: pip install mkdocs-material
34+
- run: pip install "mkdocs-material[imaging]"
35+
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*.iml
2+
.gradle
3+
**/build/
4+
xcuserdata
5+
!src/**/build/
6+
local.properties
7+
.idea
8+
kotlin-js-store/
9+
.DS_Store
10+
captures
11+
.externalNativeBuild
12+
.cxx
13+
*.xcodeproj/*
14+
!*.xcodeproj/project.pbxproj
15+
!*.xcodeproj/xcshareddata/
16+
!*.xcodeproj/project.xcworkspace/
17+
!*.xcworkspace/contents.xcworkspacedata
18+
**/xcshareddata/WorkspaceSettings.xcsettings
19+
venv/
20+
.cache/
21+
docs/preview/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Composable Horizons
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Compose Menu (Dropdown)
2+
3+
An unstyled Composable component for Compose Multiplatform that can be used to implement Dropdown Menus with the styling of your choice.
4+
5+
Comes with built-in Keyboard management and animation support. Supports Compose Desktop, Web (WASM), Android and iOS.
6+
7+
## Installation
8+
9+
Ensure you have `mavenCentral()` to your `dependencyResolutionManagement{}` block, then add the dependency:
10+
11+
```kotlin
12+
dependencies {
13+
implementation("com.composables.ui:menu:0.0.2")
14+
}
15+
```
16+
17+
## Documentation
18+
19+
For full documentation, checkout: https://composablehorizons.github.io/compose-menu
20+
21+
## Contributing
22+
23+
We are currently accepting contributions in the form of bug reports and feature requests, in the form of Github issues.

build.gradle.kts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
2+
3+
plugins {
4+
alias(libs.plugins.jetbrainsCompose) apply false
5+
alias(libs.plugins.kotlinMultiplatform) apply false
6+
id("com.android.application") version "8.2.0" apply false
7+
id("com.android.library") version "8.2.0" apply false
8+
id("org.jetbrains.dokka").version("1.9.10").apply(false)
9+
id("io.github.gradle-nexus.publish-plugin").version("2.0.0-rc-1")
10+
}
11+
12+
nexusPublishing {
13+
repositories {
14+
sonatype {
15+
with(gradleLocalProperties(rootDir)) {
16+
stagingProfileId.set(getProperty("sonatype.stagingProfileId") ?: System.getenv("SONATYPE_STAGING_PROFILE_ID"))
17+
username.set(getProperty("sonatype.username") ?: System.getenv("OSSRH_USERNAME"))
18+
password.set(getProperty("sonatype.password") ?: System.getenv("OSSRH_PASSWORD"))
19+
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
20+
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
21+
}
22+
}
23+
}
24+
}

demo/build.gradle.kts

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
2+
3+
plugins {
4+
alias(libs.plugins.kotlinMultiplatform)
5+
alias(libs.plugins.jetbrainsCompose)
6+
id("com.android.application")
7+
}
8+
9+
kotlin {
10+
@OptIn(ExperimentalWasmDsl::class) wasmJs {
11+
moduleName = "demo"
12+
browser {
13+
commonWebpackConfig {
14+
outputFileName = "composeApp.js"
15+
}
16+
}
17+
binaries.executable()
18+
}
19+
20+
jvm("desktop")
21+
22+
androidTarget {
23+
compilations.all {
24+
kotlinOptions {
25+
jvmTarget = "1.8"
26+
}
27+
}
28+
}
29+
30+
listOf(iosX64(), iosArm64(), iosSimulatorArm64()).forEach { iosTarget ->
31+
iosTarget.binaries.framework {
32+
baseName = "ComposeApp"
33+
isStatic = true
34+
}
35+
}
36+
37+
sourceSets {
38+
commonMain.dependencies {
39+
implementation(compose.runtime)
40+
implementation(compose.foundation)
41+
implementation(compose.ui)
42+
implementation(compose.components.resources)
43+
implementation(project(":menu"))
44+
}
45+
46+
val desktopMain by getting {
47+
dependencies {
48+
implementation(compose.desktop.common)
49+
implementation(compose.desktop.currentOs)
50+
}
51+
}
52+
53+
val androidMain by getting {
54+
dependencies {
55+
implementation ("androidx.compose.ui:ui:1.6.6")
56+
implementation ("androidx.activity:activity-compose:1.9.0")
57+
}
58+
}
59+
}
60+
}
61+
62+
compose.experimental {
63+
web.application {}
64+
}
65+
66+
compose.desktop {
67+
application {
68+
mainClass = "MainKt"
69+
}
70+
}
71+
72+
android {
73+
namespace = "com.composables.ui.demo"
74+
compileSdk = 34
75+
defaultConfig {
76+
minSdk = 21
77+
targetSdk = 34
78+
79+
applicationId = "com.composables.ui.demo"
80+
versionCode = 1
81+
versionName = "1.0.0"
82+
}
83+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<uses-permission android:name="android.permission.INTERNET"/>
5+
6+
<application>
7+
<activity android:name="MainActivity" android:exported="true">
8+
<intent-filter>
9+
<action android:name="android.intent.action.MAIN"/>
10+
<category android:name="android.intent.category.LAUNCHER"/>
11+
</intent-filter>
12+
</activity>
13+
</application>
14+
15+
</manifest>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.composables.ui
2+
3+
import App
4+
import android.os.Bundle
5+
import androidx.activity.ComponentActivity
6+
import androidx.activity.compose.setContent
7+
import androidx.activity.enableEdgeToEdge
8+
import androidx.compose.foundation.layout.Box
9+
import androidx.compose.foundation.layout.systemBarsPadding
10+
import androidx.compose.ui.Modifier
11+
12+
class MainActivity : ComponentActivity() {
13+
override fun onCreate(savedInstanceState: Bundle?) {
14+
super.onCreate(savedInstanceState)
15+
16+
enableEdgeToEdge()
17+
actionBar?.hide()
18+
19+
setContent {
20+
Box(Modifier.systemBarsPadding()) {
21+
App()
22+
}
23+
}
24+
}
25+
}

0 commit comments

Comments
 (0)