-
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.
- Loading branch information
1 parent
703fff7
commit 8ea7bb8
Showing
19 changed files
with
245 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--swiftversion 5.9 | ||
--swiftversion 6.0 | ||
--disable preferKeyPath | ||
--ifdef no-indent |
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
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,19 @@ | ||
// | ||
// Copyright © 2024 Alexander Romanov | ||
// Illustration.swift, created on 16.11.2024 | ||
// | ||
|
||
import SwiftUI | ||
|
||
public extension SwiftUI.Image { | ||
enum Illustration { | ||
public enum Status { | ||
public static let success = Image("Status/Success", bundle: .module) | ||
public static let error = Image("Status/Error", bundle: .module) | ||
public static let warning = Image("Status/Warning", bundle: .module) | ||
public enum Warning { | ||
public static let fill = Image("Status/Warning/Triangle", bundle: .module) | ||
} | ||
} | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
Sources/OversizeUI/Core/ViewModifier/DelayTask/DelayTask.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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Copyright © 2024 Alexander Romanov | ||
// DelayTaskViewModifier.swift, created on 13.11.2024 | ||
// | ||
|
||
import SwiftUI | ||
|
||
@available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *) | ||
struct DelayTaskViewModifier: ViewModifier { | ||
let delay: ContinuousClock.Instant.Duration | ||
let action: @Sendable () async -> Void | ||
|
||
func body(content: Content) -> some View { | ||
content | ||
.task { | ||
do { | ||
try await Task.sleep(for: delay) | ||
await action() | ||
} catch {} | ||
} | ||
} | ||
} | ||
|
||
@available(iOS 16.0, tvOS 16.0, watchOS 9.0, macOS 13.0, *) | ||
public extension View { | ||
func task( | ||
delay: ContinuousClock.Duration, | ||
action: @Sendable @escaping () async -> Void | ||
) -> some View { | ||
modifier(DelayTaskViewModifier(delay: delay, action: action)) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
}, | ||
"properties" : { | ||
"provides-namespace" : true | ||
} | ||
} |
47 changes: 31 additions & 16 deletions
47
Sources/OversizeUI/Resources/Images.xcassets/Status/Error.imageset/Error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 31 additions & 16 deletions
47
Sources/OversizeUI/Resources/Images.xcassets/Status/Success.imageset/Success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.