-
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.
refactor: transitioned TextArea clear to styles api
- Loading branch information
Showing
22 changed files
with
1,250 additions
and
375 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
84 changes: 0 additions & 84 deletions
84
SDDSComponents/SDDSComponentsPreview/Components/SDDSTextArea/SDDSTextArea+Preview.swift
This file was deleted.
Oops, something went wrong.
159 changes: 0 additions & 159 deletions
159
...nts/SDDSComponentsPreview/Components/SDDSTextArea/SDDSTextAreaAppearance+Extensions.swift
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
SDDSComponents/SDDSComponentsPreview/Components/SDDSTextArea/SDDSTextAreaChipGroupSize.swift
This file was deleted.
Oops, something went wrong.
53 changes: 53 additions & 0 deletions
53
...nts/SDDSComponentsPreview/Components/SDDSTextArea/TextArea/TextArea+ColorVariations.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,53 @@ | ||
import Foundation | ||
import SDDSComponents | ||
import SDDSServTheme | ||
import SDDSThemeCore | ||
|
||
public extension ComponentAppearanceVariation<TextArea, TextAreaAppearance> { | ||
var secondary: Self { | ||
.init( | ||
appearance: appearance.applyColorVariation(variation: TextArea.default.appearance) | ||
) | ||
} | ||
} | ||
|
||
public extension TextArea { | ||
static var `default`: ComponentAppearanceVariation<TextArea, TextAreaAppearance> { | ||
.init( | ||
name: "default", | ||
appearance: .init( | ||
backgroundColor: .surfaceDefaultTransparentPrimary, | ||
backgroundColorReadOnly: .surfaceDefaultTransparentPrimary, | ||
borderColor: .clearColor, | ||
captionColor: .textDefaultSecondary, | ||
captionColorFocused: .textDefaultAccent, | ||
captionColorReadOnly: .textDefaultSecondary, | ||
captionTypography: TextAreaTypography.caption, | ||
counterColor: .textDefaultSecondary, | ||
counterColorReadOnly: .textDefaultSecondary, | ||
counterTypography: TextAreaTypography.counter, | ||
cursorColor: .textDefaultAccent, | ||
disabledAlpha: 0.4, | ||
endContentColor: .textDefaultPrimary, | ||
backgroundColorFocused: .surfaceDefaultTransparentSecondary, | ||
innerTitleTypography: TextAreaTypography.innerTitle, | ||
lineColor: .surfaceDefaultTransparentTertiary, | ||
lineColorFocused: .textDefaultAccent, | ||
optionalTitleColor: .textDefaultTertiary, | ||
placeholderColor: .textDefaultSecondary, | ||
placeholderColorFocused: .textDefaultSecondary, | ||
placeholderColorReadOnly: .textDefaultSecondary, | ||
requiredIndicatorColor: .surfaceOnDarkNegative, | ||
startContentColor: .textDefaultPrimary, | ||
textAfterColor: .textDefaultSecondary, | ||
textBeforeColor: .textDefaultSecondary, | ||
textColor: .textDefaultPrimary, | ||
textColorFocused: .textDefaultPrimary, | ||
textColorReadOnly: .textDefaultPrimary, | ||
textTypography: TextAreaTypography.text, | ||
titleColor: .textDefaultPrimary, | ||
titleTypography: TextAreaTypography.title | ||
) | ||
) | ||
} | ||
} |
Oops, something went wrong.