refactor: migrate UI components to nebula module

This commit is contained in:
Prad Nukala
2024-12-08 16:17:21 -05:00
parent c64c506c52
commit b65e844824
34 changed files with 62 additions and 2291 deletions
@@ -1,6 +1,6 @@
package dash
import "github.com/onsonr/sonr/pkg/styles/layout"
import "github.com/onsonr/nebula/ui/layout"
templ ProfileView() {
@layout.Root("Sonr.ID") {
@@ -8,7 +8,7 @@ package dash
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import "github.com/onsonr/sonr/pkg/styles/layout"
import "github.com/onsonr/nebula/ui/layout"
func ProfileView() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
@@ -1,25 +0,0 @@
package internal
templ IntroView() {
<div class="relative w-full max-w-sm mx-auto lg:mb-0">
<div class="relative text-center">
<div class="flex flex-col mb-6 space-y-2">
<span>
<wa-qr-code size="140" value="https://shoelace.style/"></wa-qr-code>
</span>
<h1 class="text-2xl lg:text-3xl font-bold pb-3">
<span>Shoelace</span>
</h1>
<p class="text-lg text-zinc-500">
A lightweight library for building accessible, high-performance UI components with
no dependencies.
</p>
</div>
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
<button class="inline-flex items-center justify-center w-full h-10 px-4 py-2 text-sm font font-medium text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900">
Get started
</button>
</div>
</div>
</div>
}
@@ -1,40 +0,0 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package internal
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func IntroView() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"relative w-full max-w-sm mx-auto lg:mb-0\"><div class=\"relative text-center\"><div class=\"flex flex-col mb-6 space-y-2\"><span><wa-qr-code size=\"140\" value=\"https://shoelace.style/\"></wa-qr-code></span><h1 class=\"text-2xl lg:text-3xl font-bold pb-3\"><span>Shoelace</span></h1><p class=\"text-lg text-zinc-500\">A lightweight library for building accessible, high-performance UI components with no dependencies.</p></div><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\"><button class=\"inline-flex items-center justify-center w-full h-10 px-4 py-2 text-sm font font-medium text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900\">Get started</button></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
@@ -1,25 +0,0 @@
package internal
templ ProfileForm() {
<div class="relative w-full max-w-sm mx-auto lg:mb-0">
<div class="relative text-center">
<div class="flex flex-col mb-6 space-y-2">
<span>
<wa-qr-code size="140" value="https://shoelace.style/"></wa-qr-code>
</span>
<h1 class="text-2xl lg:text-3xl font-bold pb-3">
<span>Shoelace</span>
</h1>
<p class="text-lg text-zinc-500">
A lightweight library for building accessible, high-performance UI components with
no dependencies.
</p>
</div>
<div class="max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4">
<button class="inline-flex items-center justify-center w-full h-10 px-4 py-2 text-sm font-medium text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900">
Get started
</button>
</div>
</div>
</div>
}
@@ -1,40 +0,0 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.2.793
package internal
//lint:file-ignore SA4006 This context is only used if a nested component is present.
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
func ProfileForm() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context
if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil {
return templ_7745c5c3_CtxErr
}
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W)
if !templ_7745c5c3_IsBuffer {
defer func() {
templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer)
if templ_7745c5c3_Err == nil {
templ_7745c5c3_Err = templ_7745c5c3_BufErr
}
}()
}
ctx = templ.InitializeContext(ctx)
templ_7745c5c3_Var1 := templ.GetChildren(ctx)
if templ_7745c5c3_Var1 == nil {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<div class=\"relative w-full max-w-sm mx-auto lg:mb-0\"><div class=\"relative text-center\"><div class=\"flex flex-col mb-6 space-y-2\"><span><wa-qr-code size=\"140\" value=\"https://shoelace.style/\"></wa-qr-code></span><h1 class=\"text-2xl lg:text-3xl font-bold pb-3\"><span>Shoelace</span></h1><p class=\"text-lg text-zinc-500\">A lightweight library for building accessible, high-performance UI components with no dependencies.</p></div><div class=\"max-w-xs mx-auto sm:max-w-none sm:inline-flex sm:justify-center space-y-4 sm:space-y-0 sm:space-x-4\"><button class=\"inline-flex items-center justify-center w-full h-10 px-4 py-2 text-sm font-medium text-white transition-colors duration-200 rounded-md bg-neutral-950 hover:bg-neutral-900 focus:ring-2 focus:ring-offset-2 focus:ring-neutral-900\">Get started</button></div></div></div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
return templ_7745c5c3_Err
})
}
var _ = templruntime.GeneratedTemplate
+1 -1
View File
@@ -1,6 +1,6 @@
package index
import "github.com/onsonr/sonr/pkg/styles/layout"
import "github.com/onsonr/nebula/ui/layout"
templ InitialView() {
@layout.Root("Sonr.ID") {
+1 -1
View File
@@ -8,7 +8,7 @@ package index
import "github.com/a-h/templ"
import templruntime "github.com/a-h/templ/runtime"
import "github.com/onsonr/sonr/pkg/styles/layout"
import "github.com/onsonr/nebula/ui/layout"
func InitialView() templ.Component {
return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) {
+1 -1
View File
@@ -1,6 +1,6 @@
package wallet
import "github.com/onsonr/sonr/pkg/styles/layout"
import "github.com/onsonr/nebula/ui/layout"
templ DepositFundsView() {
@layout.Root("Sonr.ID") {