Skip to content

Commit

Permalink
refactor: transitioned TextArea clear to styles api
Browse files Browse the repository at this point in the history
  • Loading branch information
vkaltyrin committed Jan 21, 2025
1 parent fd3bbe3 commit 53419e3
Show file tree
Hide file tree
Showing 22 changed files with 1,250 additions and 375 deletions.
86 changes: 68 additions & 18 deletions SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

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
)
)
}
}
Loading

0 comments on commit 53419e3

Please sign in to comment.