Implementing a Design System compatible with UIKit and SwiftUI

Definition

Concepts

Tokens

Figure 1 — Example of properties linked to Color and Font.
Figure 2 — The ColorScale provider that describes the color intensity.
Figure 3 — ColorVariant is a provider that implements intermediate properties.
Figure 4 — The ImageSpace defines all the categories for a family of icons.
Figure 5 — Implementation of ColorType protocol in UIColor.
Figure 6 — Implementation of DSColors with distinct properties.
Figure 7 — Implementation of a token for shadow with internal methods.
Figure 8 — Adaptation of Shadow token to support UIKit and SwiftUI.
Figure 9 — Spacing contains a generic Number type.
Figure 10 — Double supporting Spacing.
Figure 11 — RoundedView implementation to set the corner radius.

Graphic components

Figure 12 — Text(_:) method implementation that generates the CheckBox’ UILabel.
Figure 13 — ImageView method that renders the check symbol.
Figure 14 — CheckBox(_:) method that renders the box with the check symbol, applying the ComposableStyle style.
Figure 15 — The ContentView(_:) method that creates the CheckBox component and apply the rules and layout.
Figure 16 — Public LightStyle with empty initialization.
Figure 17 — LabelComposableStyle implementation.
Figure 18 — Exploring the EditableObject to create declarative methods.
Figure 19 — The LabelStyle protocol definition.
Figure 20 — LightStyle integration with LabelStyle.

Extra components

Figure 21 — MarginView implementation with WrapperViewable protocol.
Figure 22 — MarginViewable protocol implementation.

Project organization

Final considerations

Special thanks

Amo o que a tecnologia e pessoas inspiradas trabalhando juntas conseguem fazer!