-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redesign Package Structure. Added BorderStyleModifier via BezierPathS…
…hape (#19) * Background Style * Color Style * Theme model and Background, Color Styles * Re-design Package Structure. Added BorderStyleModifier via BezierPathShape --------- Co-authored-by: PraveenP <ppraveetr@gmail.com>
- Loading branch information
1 parent
5197267
commit b8a961d
Showing
24 changed files
with
552 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ces/Core/Extenstions/Data+Extension.swift → ...es/Theme/Extenstions/Data+Extension.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// | ||
// Data+Extension.swift | ||
// Core | ||
// Theme | ||
// | ||
// Created by Praveen Prabhakar on 16/09/22. | ||
// | ||
|
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
Sources/Core/Models/ColorSchemeValue.swift → Sources/Theme/Models/ColorSchemeValue.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
// | ||
// ColorSchemeValue.swift | ||
// Core | ||
// Theme | ||
// | ||
// Created by Praveen Prabhakar on 16/09/22. | ||
// | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// RectCorner.swift | ||
// Theme | ||
// | ||
// Created by Praveen P on 10/9/23. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct RectCorner: OptionSet { | ||
let rawValue: Int | ||
|
||
static let topLeft = RectCorner(rawValue: 1 << 0) | ||
static let topRight = RectCorner(rawValue: 1 << 1) | ||
static let bottomRight = RectCorner(rawValue: 1 << 2) | ||
static let bottomLeft = RectCorner(rawValue: 1 << 3) | ||
|
||
static let allCorners: RectCorner = [.topLeft, topRight, .bottomLeft, .bottomRight] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// | ||
// ThemeJSONStructure.swift | ||
// Theme | ||
// | ||
// Created by Praveen Prabhakar on 16/09/22. | ||
// | ||
|
||
import Foundation | ||
import SwiftUI | ||
|
||
struct ThemeJSONStructure: Codable { | ||
struct FontStyle: Codable { | ||
var size: CGFloat? | ||
/// Based on ``Font/Weight`` | ||
var weight: String? | ||
/// Based on ``Font/TextStyle`` | ||
var styleName: String? | ||
} | ||
|
||
struct ColorStyle: Codable { | ||
var light: String | ||
var dark: String? | ||
} | ||
|
||
struct UserStyle: Codable { | ||
var forgroundColor: String? | ||
var font: String? | ||
var background: BackgroundStyle? | ||
} | ||
|
||
struct BackgroundStyle: Codable { | ||
var color: String? | ||
var ignoringSafeArea: Bool? | ||
var gradient: StyleGradient? | ||
var border: StyleBorder? | ||
} | ||
|
||
struct StyleGradient: Codable { | ||
var colors: [String] | ||
var locations: [CGFloat]? | ||
} | ||
|
||
struct StyleBorder: Codable { | ||
var radius: [CGFloat]? | ||
var thickness: Int? | ||
var color: String? | ||
|
||
var borderColor: Color? { | ||
color?.getColor() | ||
} | ||
} | ||
|
||
var colors: [String: String]? | ||
var fonts: [String: FontStyle]? | ||
var styles: [String: UserStyle]? | ||
} | ||
|
||
enum Alignment: String, Codable { | ||
case left, center, right | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.