Skip to content

Commit 5764eba

Browse files
committed
Initial Commit
Initial Commit
1 parent 01f1acc commit 5764eba

34 files changed

Lines changed: 1524 additions & 0 deletions

Example/Example.xcodeproj/project.pbxproj

Lines changed: 610 additions & 0 deletions
Large diffs are not rendered by default.

Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>Example.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"colors" : [
3+
{
4+
"idiom" : "universal"
5+
}
6+
],
7+
"info" : {
8+
"author" : "xcode",
9+
"version" : 1
10+
}
11+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "mac",
5+
"scale" : "1x",
6+
"size" : "16x16"
7+
},
8+
{
9+
"idiom" : "mac",
10+
"scale" : "2x",
11+
"size" : "16x16"
12+
},
13+
{
14+
"idiom" : "mac",
15+
"scale" : "1x",
16+
"size" : "32x32"
17+
},
18+
{
19+
"idiom" : "mac",
20+
"scale" : "2x",
21+
"size" : "32x32"
22+
},
23+
{
24+
"idiom" : "mac",
25+
"scale" : "1x",
26+
"size" : "128x128"
27+
},
28+
{
29+
"idiom" : "mac",
30+
"scale" : "2x",
31+
"size" : "128x128"
32+
},
33+
{
34+
"idiom" : "mac",
35+
"scale" : "1x",
36+
"size" : "256x256"
37+
},
38+
{
39+
"idiom" : "mac",
40+
"scale" : "2x",
41+
"size" : "256x256"
42+
},
43+
{
44+
"idiom" : "mac",
45+
"scale" : "1x",
46+
"size" : "512x512"
47+
},
48+
{
49+
"idiom" : "mac",
50+
"scale" : "2x",
51+
"size" : "512x512"
52+
}
53+
],
54+
"info" : {
55+
"author" : "xcode",
56+
"version" : 1
57+
}
58+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}

Example/Example/ContentView.swift

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
//
2+
// ContentView.swift
3+
// Example
4+
//
5+
// Created by Farooq Mulla on 1/7/26.
6+
//
7+
8+
import SwiftUI
9+
import SwiftUIFlowLayout
10+
import SwiftUI3Components
11+
12+
struct ContentView: View {
13+
@State private var count = 0
14+
@State private var name = ""
15+
@State private var chips: [String] = ["SwiftUI", "Design", "iOS"]
16+
17+
var body: some View {
18+
ScrollView {
19+
VStack(alignment: .leading, spacing: 16) {
20+
21+
Text("SwiftUIComponents")
22+
.font(.largeTitle.bold())
23+
24+
Card {
25+
VStack(alignment: .leading, spacing: 10) {
26+
Text("Buttons").font(CFont.title)
27+
HStack {
28+
Button("Primary") { }
29+
.buttonStyle(.primary)
30+
Button("Glass") { }
31+
.glassButtonCompat()
32+
}
33+
}
34+
}
35+
36+
GlassCard {
37+
VStack(alignment: .leading, spacing: 10) {
38+
Text("Glass Card").font(CFont.title)
39+
Text("Uses material fallback on iOS < 26.")
40+
.foregroundStyle(CColor.textSecondary)
41+
}
42+
}
43+
44+
VStack(alignment: .leading, spacing: 10) {
45+
Text("Chips").font(CFont.title)
46+
FlowLayout(mode: .scrollable, items: chips) { chip in
47+
Chip(chip, variant: .filled, onRemove: {
48+
chips.removeAll { $0 == chip }
49+
})
50+
}
51+
}
52+
53+
VStack(alignment: .leading, spacing: 10) {
54+
Text("Inputs").font(CFont.title)
55+
FloatingLabelTextField("Name", text: $name)
56+
}
57+
}
58+
.padding()
59+
}
60+
// VStack(spacing: 16) {
61+
// Text("Count: \(count)")
62+
// .accessibilityIdentifier("countLabel")
63+
//
64+
// Button("Increment") { count += 1 }
65+
// .buttonStyle(.primary)
66+
// .accessibilityIdentifier("incrementButton")
67+
//
68+
// FloatingLabelTextField("Name", text: $name)
69+
// .accessibilityIdentifier("nameField")
70+
// }
71+
// .padding()
72+
}
73+
}
74+
75+
#Preview {
76+
ContentView()
77+
}

Example/Example/ExampleApp.swift

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// ExampleApp.swift
3+
// Example
4+
//
5+
// Created by Farooq Mulla on 1/7/26.
6+
//
7+
8+
import SwiftUI
9+
10+
@main
11+
struct ExampleApp: App {
12+
var body: some Scene {
13+
WindowGroup {
14+
ContentView()
15+
}
16+
}
17+
}

0 commit comments

Comments
 (0)