Skip to content

Commit

Permalink
feat: added mapper
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirDimitraki committed Dec 27, 2024
1 parent 4c90ff5 commit e6e28e4
Show file tree
Hide file tree
Showing 21 changed files with 723 additions and 453 deletions.
48 changes: 48 additions & 0 deletions SDDSComponents/SDDSComponents.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@
objects = {

/* Begin PBXBuildFile section */
6950A1282D1D4C47001695C5 /* SegmentElementAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6950A1272D1D4C28001695C5 /* SegmentElementAppearance.swift */; };
6950A12A2D1D4D56001695C5 /* SegmentElementSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6950A1292D1D4D4E001695C5 /* SegmentElementSize.swift */; };
69573D682D1D638600359D53 /* AppearanceConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69573D672D1D637D00359D53 /* AppearanceConfiguration.swift */; };
69573D6A2D1D756000359D53 /* SegmentElementAppearance+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69573D692D1D754400359D53 /* SegmentElementAppearance+Extensions.swift */; };
69573D6C2D1D7C5D00359D53 /* SegmentElementAppearance+Variation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69573D6B2D1D7C4300359D53 /* SegmentElementAppearance+Variation.swift */; };
6968433D2D1D934F002F8C7A /* SegmentElement+Exstensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6968433C2D1D9338002F8C7A /* SegmentElement+Exstensions.swift */; };
6968433F2D1DC003002F8C7A /* SegmentElementShapeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6968433E2D1DBFF8002F8C7A /* SegmentElementShapeStyle.swift */; };
696843412D1E720B002F8C7A /* SegmentElement+ShapeStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 696843402D1E71FE002F8C7A /* SegmentElement+ShapeStyle.swift */; };
6969EADC2D1D5A74008536E5 /* SegmentElementColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6969EADB2D1D5A6C008536E5 /* SegmentElementColor.swift */; };
6969EADE2D1D5B8E008536E5 /* SegmentElementAppearanceVariations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6969EADD2D1D5B73008536E5 /* SegmentElementAppearanceVariations.swift */; };
6987445F2D1C367700559ABA /* SDDSCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6987445D2D1C367700559ABA /* SDDSCounter.swift */; };
698744602D1C367700559ABA /* CounterAppearance+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6987445A2D1C367700559ABA /* CounterAppearance+Extensions.swift */; };
698744612D1C367700559ABA /* CounterSize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 698744582D1C367700559ABA /* CounterSize.swift */; };
Expand Down Expand Up @@ -153,6 +163,16 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
6950A1272D1D4C28001695C5 /* SegmentElementAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentElementAppearance.swift; sourceTree = "<group>"; };
6950A1292D1D4D4E001695C5 /* SegmentElementSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentElementSize.swift; sourceTree = "<group>"; };
69573D672D1D637D00359D53 /* AppearanceConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppearanceConfiguration.swift; sourceTree = "<group>"; };
69573D692D1D754400359D53 /* SegmentElementAppearance+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SegmentElementAppearance+Extensions.swift"; sourceTree = "<group>"; };
69573D6B2D1D7C4300359D53 /* SegmentElementAppearance+Variation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SegmentElementAppearance+Variation.swift"; sourceTree = "<group>"; };
6968433C2D1D9338002F8C7A /* SegmentElement+Exstensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SegmentElement+Exstensions.swift"; sourceTree = "<group>"; };
6968433E2D1DBFF8002F8C7A /* SegmentElementShapeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentElementShapeStyle.swift; sourceTree = "<group>"; };
696843402D1E71FE002F8C7A /* SegmentElement+ShapeStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SegmentElement+ShapeStyle.swift"; sourceTree = "<group>"; };
6969EADB2D1D5A6C008536E5 /* SegmentElementColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentElementColor.swift; sourceTree = "<group>"; };
6969EADD2D1D5B73008536E5 /* SegmentElementAppearanceVariations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentElementAppearanceVariations.swift; sourceTree = "<group>"; };
698744562D1C367700559ABA /* CounterAppearance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterAppearance.swift; sourceTree = "<group>"; };
698744572D1C367700559ABA /* CounterColor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterColor.swift; sourceTree = "<group>"; };
698744582D1C367700559ABA /* CounterSize.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CounterSize.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -338,6 +358,22 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
6950A1262D1D4BE1001695C5 /* SegmentAppearance */ = {
isa = PBXGroup;
children = (
696843402D1E71FE002F8C7A /* SegmentElement+ShapeStyle.swift */,
6968433E2D1DBFF8002F8C7A /* SegmentElementShapeStyle.swift */,
6968433C2D1D9338002F8C7A /* SegmentElement+Exstensions.swift */,
69573D6B2D1D7C4300359D53 /* SegmentElementAppearance+Variation.swift */,
69573D692D1D754400359D53 /* SegmentElementAppearance+Extensions.swift */,
6969EADD2D1D5B73008536E5 /* SegmentElementAppearanceVariations.swift */,
6969EADB2D1D5A6C008536E5 /* SegmentElementColor.swift */,
6950A1292D1D4D4E001695C5 /* SegmentElementSize.swift */,
6950A1272D1D4C28001695C5 /* SegmentElementAppearance.swift */,
);
path = SegmentAppearance;
sourceTree = "<group>";
};
698744592D1C367700559ABA /* CounterAppearance */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -370,6 +406,7 @@
698744662D1C368E00559ABA /* SDDSSegmentElement */ = {
isa = PBXGroup;
children = (
6950A1262D1D4BE1001695C5 /* SegmentAppearance */,
698744652D1C368E00559ABA /* SDDSSegmentElement.swift */,
);
path = SDDSSegmentElement;
Expand Down Expand Up @@ -662,6 +699,7 @@
818C03AF2C418705002C6D0A /* Components */ = {
isa = PBXGroup;
children = (
69573D672D1D637D00359D53 /* AppearanceConfiguration.swift */,
698744662D1C368E00559ABA /* SDDSSegmentElement */,
6987445E2D1C367700559ABA /* SDDSCounter */,
8102BA282CBE9B3300C589D3 /* SDDSTextArea */,
Expand Down Expand Up @@ -1194,6 +1232,7 @@
8102BA322CBE9B3300C589D3 /* TextAreaSizeConfiguration.swift in Sources */,
818C03E62C47BCDC002C6D0A /* SDDSProgressBar.swift in Sources */,
817339DE2D033D860092608A /* ChipAccessibility.swift in Sources */,
69573D682D1D638600359D53 /* AppearanceConfiguration.swift in Sources */,
817339F12D033EF30092608A /* AvatarImageSource.swift in Sources */,
818C03BF2C43C371002C6D0A /* DebugModifier.swift in Sources */,
817339D72D033C0A0092608A /* ProgressBarAccessibility.swift in Sources */,
Expand Down Expand Up @@ -1221,12 +1260,15 @@
814E303A2C99AFBD004601F7 /* BackportAsyncImage.swift in Sources */,
81CF12192C6E686D0074174F /* SDDSRadioboxGroup.swift in Sources */,
814185CA2C34260300D8E524 /* ButtonSize.swift in Sources */,
69573D6A2D1D756000359D53 /* SegmentElementAppearance+Extensions.swift in Sources */,
817339ED2D033EC90092608A /* AvatarSizeConfiguration.swift in Sources */,
81733A3A2D0733460092608A /* ChipAppearance+Extensions.swift in Sources */,
81F753422CF505DE000156D9 /* IconButton+Extensions.swift in Sources */,
81F752E22CECD40A000156D9 /* BasicButton.swift in Sources */,
814E30412C99B090004601F7 /* Text+FillModifier.swift in Sources */,
6969EADC2D1D5A74008536E5 /* SegmentElementColor.swift in Sources */,
817339E62D033E650092608A /* RadioboxData.swift in Sources */,
6968433F2D1DC003002F8C7A /* SegmentElementShapeStyle.swift in Sources */,
816C62A22CB80EC400352891 /* Opacity.swift in Sources */,
814E30382C99AFB0004601F7 /* SDDSAvatarModifiers.swift in Sources */,
81D2B1992C32B3E400CAA7FD /* SDDSButton.swift in Sources */,
Expand All @@ -1235,7 +1277,9 @@
81F753262CF467F6000156D9 /* ButtonIconAttributes.swift in Sources */,
817339EB2D033EB90092608A /* AvatarStatus.swift in Sources */,
81F7532C2CF46885000156D9 /* ButtonShapeStyle.swift in Sources */,
6950A12A2D1D4D56001695C5 /* SegmentElementSize.swift in Sources */,
81A901532CF6EAA800992B04 /* LinkButton.swift in Sources */,
69573D6C2D1D7C5D00359D53 /* SegmentElementAppearance+Variation.swift in Sources */,
81F7531C2CF46755000156D9 /* ButtonStyle.swift in Sources */,
81F753282CF46831000156D9 /* ButtonColor.swift in Sources */,
811DE1582C5017C3000DD354 /* ProgressBarAppearance.swift in Sources */,
Expand All @@ -1247,6 +1291,7 @@
8102BA312CBE9B3300C589D3 /* TextAreaAppearance.swift in Sources */,
8159F7302C5D1CFE00622836 /* FillStyle.swift in Sources */,
81F753242CF467E5000156D9 /* ButtonContentAlignment.swift in Sources */,
6969EADE2D1D5B8E008536E5 /* SegmentElementAppearanceVariations.swift in Sources */,
816AA9B02C97424000C3347C /* TextFieldSizeConfiguration.swift in Sources */,
818C03CE2C4515ED002C6D0A /* SDDSRadiobox.swift in Sources */,
81998FF92C35503D009074B7 /* View+Modifiers.swift in Sources */,
Expand All @@ -1260,11 +1305,13 @@
81685C2B2CFF898D00278446 /* SwitchAppearance+Extensions.swift in Sources */,
818C03B92C43B99B002C6D0A /* ColorToken+Extensions.swift in Sources */,
817339E92D033E8E0092608A /* AvatarAppearance.swift in Sources */,
6950A1282D1D4C47001695C5 /* SegmentElementAppearance.swift in Sources */,
811DE1712C5783B6000DD354 /* HierarchicalList.swift in Sources */,
818C03D02C451651002C6D0A /* SelectionControlAppearance.swift in Sources */,
814E30362C99AFAB004601F7 /* SDDSAvatar.swift in Sources */,
81F753392CF50015000156D9 /* ButtonAppearance+Variations.swift in Sources */,
816AA9AE2C97421F00C3347C /* TextFieldAppearance.swift in Sources */,
696843412D1E720B002F8C7A /* SegmentElement+ShapeStyle.swift in Sources */,
8154644B2C96FDE600DAD8EA /* ViewProvider.swift in Sources */,
81F7532A2CF4684F000156D9 /* ButtonAppearance.swift in Sources */,
818C03C52C4512A6002C6D0A /* SelectionControl.swift in Sources */,
Expand All @@ -1273,6 +1320,7 @@
81733A2B2D072FB70092608A /* AvatarAppearance+Extensions.swift in Sources */,
811DE15B2C5017FE000DD354 /* SDDSChipGroup.swift in Sources */,
81E9FA8F2C92B13E0041B5FF /* SDDSTextField.swift in Sources */,
6968433D2D1D934F002F8C7A /* SegmentElement+Exstensions.swift in Sources */,
8102BA3A2CBEAFB800C589D3 /* PlaceholderTextEditor.swift in Sources */,
818C03C72C45140B002C6D0A /* CheckboxAppearance.swift in Sources */,
814E30372C99AFAE004601F7 /* SDDSAvatarData.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

public protocol AppearanceConfiguration {
var size: SizeConfiguration { get }
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public struct SDDSCounter: View {
counterMinimumSize
}
}
.padding(appearance.size.paddings)
.background(currentColor(for: appearance.backgroundColor))
.cornerRadius(cornerRadius)
.frame(maxWidth: dynamicWidth, minHeight: appearance.size.height)
Expand All @@ -37,7 +38,7 @@ public struct SDDSCounter: View {
Text(text)
.typography(dataTypography)
.foregroundColor(currentColor(for: appearance.dataColor))
.padding(appearance.size.paddings)
// .padding(appearance.size.paddings)
}

@ViewBuilder
Expand All @@ -47,7 +48,7 @@ public struct SDDSCounter: View {
Text(text)
.typography(dataTypography)
.foregroundColor(currentColor(for: appearance.dataColor))
.padding(appearance.size.paddings)
// .padding(appearance.size.paddings)
}
}

Expand Down
Loading

0 comments on commit e6e28e4

Please sign in to comment.