sonr/pkl/uiux.pkl

144 lines
4.2 KiB
Plaintext

@go.Package { name = "github.com/onsonr/sonr/pkg/nebula/models" }
module models
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
// ╭───────────────────────────────────────────────────────────╮
// │ General State │
// ╰───────────────────────────────────────────────────────────╯
typealias FormState = "initial" | "error" | "success" | "warning"
class Image {
src: String
width: String
height: String
}
class Link {
text: String
href: String
}
class SocialLink {
link: Link
icon: String
}
class Button {
text: String
href: String
}
class Input {
label: String
type: String
placeholder: String
value: String?
error: String?
help: String?
required: Boolean
}
// ╭───────────────────────────────────────────────────────────╮
// │ Data Models │
// ╰───────────────────────────────────────────────────────────╯
class Highlight {
title: String
description: String
image: Image
}
class Stat {
value: String
label: String
}
// ╭───────────────────────────────────────────────────────────╮
// │ Homepage View Model │
// ╰───────────────────────────────────────────────────────────╯
class Hero {
titleFirst: String
titleEmphasis: String
titleSecond: String
subtitle: String
primaryButton: Button
secondaryButton: Button
image: Image
stats: Listing<Stat>
}
class Highlights {
title: String
description: String
image: Image
}
class Features {
title: String
description: String
image: Image
}
class Bento {
title: String
description: String
primaryButton: Button
secondaryButton: Button
}
class Lowlights {
title: String
description: String
image: Image
}
class CallToAction {
title: String
description: String
primaryButton: Button
secondaryButton: Button
}
class Footer {
logo: Image
mediumLink: SocialLink
twitterLink: SocialLink
discordLink: SocialLink
githubLink: SocialLink
companyLinks: Listing<Link>
resourcesLinks: Listing<Link>
}
class Home {
hero: Hero
}
// ╭───────────────────────────────────────────────────────────╮
// │ Registration View Model │
// ╰───────────────────────────────────────────────────────────╯
class RegistrationForm {
title: String
description: String
state: FormState
inputs: List<Input>
}
// ╭───────────────────────────────────────────────────────────╮
// │ Login View Model │
// ╰───────────────────────────────────────────────────────────╯
// ╭───────────────────────────────────────────────────────────╮
// │ FINAL INPUTS │
// ╰───────────────────────────────────────────────────────────╯
// Pages
home : Home