Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Demo/.figmagen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ tokens:
destination: FigmaGenDemo/Generated/SpacingTokens.swift
templateOptions:
publicAccess: true
borders:
destination: FigmaGenDemo/Generated/BorderTokens.swift
templateOptions:
publicAccess: true
theme:
destination: FigmaGenDemo/Generated/Theme.swift
templateOptions:
Expand Down
143 changes: 143 additions & 0 deletions Demo/FigmaGenDemo/Generated/BorderTokens.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
// swiftlint:disable all
// Generated using FigmaGen - https://github.com/hhru/FigmaGen

#if canImport(UIKit)
import UIKit
#else
import AppKit
#endif

public struct BorderToken: Hashable {
public let width: CGFloat
public let style: String

public init(width: CGFloat, style: String) {
self.width = width
self.style = style
}
}

internal struct BorderTokens {
// MARK: - Instance Properties

/// semantic.border.applied
///
/// Width: 2
/// Style: solid
internal var semanticBorderApplied: BorderToken {
BorderToken(
width: 2,
style: "solid"
)
}

/// semantic.border.checkable
///
/// Width: 1.5
/// Style: solid
internal var semanticBorderCheckable: BorderToken {
BorderToken(
width: 1.5,
style: "solid"
)
}

/// semantic.border.dashed-default
///
/// Width: 2
/// Style: dashed
internal var semanticBorderDashedDefault: BorderToken {
BorderToken(
width: 2,
style: "dashed"
)
}

/// semantic.border.dashed-focused
///
/// Width: 2
/// Style: dashed
internal var semanticBorderDashedFocused: BorderToken {
BorderToken(
width: 2,
style: "dashed"
)
}

/// semantic.border.default
///
/// Width: 1
/// Style: solid
internal var semanticBorderDefault: BorderToken {
BorderToken(
width: 1,
style: "solid"
)
}

/// semantic.border.disabled
///
/// Width: 1
/// Style: solid
internal var semanticBorderDisabled: BorderToken {
BorderToken(
width: 1,
style: "solid"
)
}

/// semantic.border.focused
///
/// Width: 2
/// Style: solid
internal var semanticBorderFocused: BorderToken {
BorderToken(
width: 2,
style: "solid"
)
}

/// semantic.border.hovered
///
/// Width: 1
/// Style: solid
internal var semanticBorderHovered: BorderToken {
BorderToken(
width: 1,
style: "solid"
)
}

/// semantic.border.invalid
///
/// Width: 1
/// Style: solid
internal var semanticBorderInvalid: BorderToken {
BorderToken(
width: 1,
style: "solid"
)
}

/// semantic.border.selected
///
/// Width: 2
/// Style: solid
internal var semanticBorderSelected: BorderToken {
BorderToken(
width: 2,
style: "solid"
)
}

/// semantic.border.tab-focused
///
/// Width: 4
/// Style: solid
internal var semanticBorderTabFocused: BorderToken {
BorderToken(
width: 4,
style: "solid"
)
}
}
4 changes: 2 additions & 2 deletions Demo/FigmaGenDemo/Resources/Colors.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.35686275362968445",
"alpha" : "0.75",
"blue" : "0.5882353186607361",
"green" : "0.25882354378700256"
"green" : "0.25882354378700256",
"red" : "0.35686275362968445"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.2235294133424759",
"alpha" : "1.0",
"blue" : "0.2235294133424759",
"green" : "0.2235294133424759"
"green" : "0.2235294133424759",
"red" : "0.2235294133424759"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.25882354378700256",
"alpha" : "1.0",
"blue" : "0.5882353186607361",
"green" : "0.4901960790157318"
"green" : "0.4901960790157318",
"red" : "0.25882354378700256"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.25882354378700256",
"alpha" : "1.0",
"blue" : "0.4901960790157318",
"green" : "0.5882353186607361"
"green" : "0.5882353186607361",
"red" : "0.25882354378700256"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.8901960849761963",
"alpha" : "1.0",
"blue" : "0.3607843220233917",
"green" : "0.04313725605607033"
"green" : "0.04313725605607033",
"red" : "0.8901960849761963"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.8549019694328308",
"alpha" : "1.0",
"blue" : "0.8509804010391235",
"green" : "0.8549019694328308"
"green" : "0.8549019694328308",
"red" : "0.8549019694328308"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.5803921818733215",
"alpha" : "1.0",
"blue" : "0.5960784554481506",
"green" : "0.5921568870544434"
"green" : "0.5921568870544434",
"red" : "0.5803921818733215"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"red" : "0.9137254953384399",
"alpha" : "1.0",
"blue" : "0.9137254953384399",
"green" : "0.9137254953384399"
"green" : "0.9137254953384399",
"red" : "0.9137254953384399"
}
},
"idiom" : "universal"
}
]
],
"info" : {
"author" : "FigmaGen",
"version" : 1
}
}
Binary file not shown.
Loading