-
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.
feat(sdds-components): styles api migration
- Loading branch information
Showing
142 changed files
with
4,406 additions
and
2,150 deletions.
There are no files selected for viewing
404 changes: 245 additions & 159 deletions
404
SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj
Large diffs are not rendered by default.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
SDDSComponents/SDDSComponentsPreview/Components/SDDSAvatar/AvatarAppearance.swift
This file was deleted.
Oops, something went wrong.
122 changes: 11 additions & 111 deletions
122
SDDSComponents/SDDSComponentsPreview/Components/SDDSAvatar/SDDSAvatarPreview.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,120 +1,20 @@ | ||
import Foundation | ||
import SwiftUI | ||
import SDDSComponents | ||
import SDDSServTheme | ||
import SwiftUI | ||
|
||
// MARK: - Preview | ||
|
||
struct SDDSAvatarPreview: PreviewProvider { | ||
static var previews: some View { | ||
Group { | ||
// Online Status Previews | ||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: nil, | ||
status: .online, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Online - Text Only") | ||
|
||
SDDSAvatar( | ||
text: "", | ||
image: .image(Image.image("checker")), | ||
placeholderImage: nil, | ||
status: .online, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Online - Image") | ||
|
||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: .image(Image.image("checker")), | ||
status: .online, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Online - Placeholder with Text") | ||
|
||
// Offline Status Previews | ||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: nil, | ||
status: .offline, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Offline - Text Only") | ||
|
||
SDDSAvatar( | ||
text: "", | ||
image: .image(Image.image("checker")), | ||
placeholderImage: nil, | ||
status: .offline, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Offline - Image") | ||
|
||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: .image(Image.image("checker")), | ||
status: .offline, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Offline - Placeholder with Text") | ||
|
||
// Hidden Status Previews | ||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: nil, | ||
status: .hidden, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Hidden - Text Only") | ||
|
||
SDDSAvatar( | ||
text: "", | ||
image: .image(Image.image("checker")), | ||
placeholderImage: nil, | ||
status: .hidden, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Hidden - Image") | ||
|
||
SDDSAvatar( | ||
text: "JD", | ||
image: nil, | ||
placeholderImage: .image(Image.image("checker")), | ||
status: .hidden, | ||
appearance: .default, | ||
size: DefaultAvatarSize.extraExtraLarge, | ||
accessibility: defaultAccessibility | ||
) | ||
.previewDisplayName("Hidden - Placeholder with Text") | ||
} | ||
.previewLayout(.sizeThatFits) | ||
.padding() | ||
} | ||
|
||
private static var defaultAccessibility: AvatarAccessibility { | ||
AvatarAccessibility(label: "User Avatar", hint: "Displays user status and initials or image") | ||
SDDSAvatar( | ||
text: "", | ||
image: .image(Image.image("checker")), | ||
placeholderImage: nil, | ||
status: .online, | ||
appearance: SDDSAvatar.extraExtraLarge.medium.appearance, | ||
accessibility: AvatarAccessibility() | ||
) | ||
.previewLayout(PreviewLayout.sizeThatFits) | ||
.previewDisplayName("Default") | ||
} | ||
} |
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
16 changes: 0 additions & 16 deletions
16
...ponents/SDDSComponentsPreview/Components/SDDSCheckbox/CheckboxAppearance+Extensions.swift
This file was deleted.
Oops, something went wrong.
84 changes: 0 additions & 84 deletions
84
SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckbox+Preview.swift
This file was deleted.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
SDDSComponents/SDDSComponentsPreview/Components/SDDSCheckbox/SDDSCheckboxPreview.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,20 @@ | ||
import Foundation | ||
import SDDSComponents | ||
import SDDSServTheme | ||
import SwiftUI | ||
|
||
// MARK: - Preview | ||
struct SDDSCheckboxPreview: PreviewProvider { | ||
static var previews: some View { | ||
SDDSCheckbox( | ||
state: .constant(.indeterminate), | ||
title: "Valur", | ||
subtitle: "Description", | ||
isEnabled: true, | ||
images: .checkbox, | ||
appearance: SDDSCheckbox.medium.default.appearance | ||
) | ||
.previewLayout(PreviewLayout.sizeThatFits) | ||
.previewDisplayName("Default") | ||
} | ||
} |
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.