diff --git a/web/src/lib/components/icons/Bluesky.svelte b/web/src/lib/components/icons/Bluesky.svelte new file mode 100644 index 00000000..72be9924 --- /dev/null +++ b/web/src/lib/components/icons/Bluesky.svelte @@ -0,0 +1,24 @@ + + + + Bluesky + + diff --git a/web/src/lib/components/ui/Field.svelte b/web/src/lib/components/ui/Field.svelte index 0df26037..0eca6620 100644 --- a/web/src/lib/components/ui/Field.svelte +++ b/web/src/lib/components/ui/Field.svelte @@ -1,3 +1,28 @@ + + -
+
{#if label} -
diff --git a/web/src/lib/components/ui/Textarea.svelte b/web/src/lib/components/ui/Textarea.svelte index f320f907..ca85aa78 100644 --- a/web/src/lib/components/ui/Textarea.svelte +++ b/web/src/lib/components/ui/Textarea.svelte @@ -9,14 +9,20 @@ export const textareaField = tv({ slots: { root: "relative flex items-start gap-1 rounded-sm border bg-background-default transition-colors", - // the floor has to live on the textarea, not the root: the resize handle only ever - // shrinks the textarea, so a min-height on the root would let the handle drag past the - // box's own minimum and leave dead space under the field. keep this in sync with - // textareaMinHeight above — it's 2px shorter because the root's border sits outside it. textarea: - "min-h-63.5 flex-1 self-stretch bg-transparent py-2 typography-paragraph-small leading-6 outline-none placeholder:text-foreground-placeholder read-only:resize-none disabled:cursor-not-allowed disabled:resize-none" + "flex-1 self-stretch bg-transparent py-2 outline-none placeholder:text-foreground-placeholder read-only:resize-none disabled:cursor-not-allowed disabled:resize-none" }, variants: { + // the floor has to live on the textarea, not the root: the resize handle only ever + // shrinks the textarea, so a min-height on the root would let the handle drag past the + // box's own minimum and leave dead space under the field. `default` keeps + // textareaMinHeight above in sync — it's 2px shorter because the root's border sits + // outside it. `compact` is for short fields (an ssh key, a one-line note) where the + // editor-sized floor would swallow the form. + size: { + default: { textarea: "min-h-63.5" }, + compact: { textarea: "min-h-20" } + }, error: { false: { root: "border-border-default focus-within:border-border-strong focus-within:ring-1 focus-within:ring-border-strong" @@ -46,7 +52,8 @@ defaultVariants: { error: false, disabled: false, - readonly: false + readonly: false, + size: "default" } }); @@ -65,6 +72,7 @@ loading?: boolean; readonly?: boolean; resizeable?: boolean; + size?: TextareaFieldVariants["size"]; iconLeft?: Component; iconRight?: Component; class?: string; @@ -78,6 +86,7 @@ loading = false, readonly = false, resizeable = false, + size = "default", iconLeft, iconRight, class: className, @@ -85,7 +94,9 @@ ...rest }: Props = $props(); - const { root, textarea } = $derived(textareaField({ error, disabled, readonly, resizeable })); + const { root, textarea } = $derived( + textareaField({ error, disabled, readonly, resizeable, size }) + ); // The root no longer carries the text inset (so the scrollbar/resize handle can sit flush // against the border) — the textarea itself owns its horizontal padding, collapsing to 0 on diff --git a/web/src/lib/components/welcome/FinishStep.svelte b/web/src/lib/components/welcome/FinishStep.svelte new file mode 100644 index 00000000..904a900c --- /dev/null +++ b/web/src/lib/components/welcome/FinishStep.svelte @@ -0,0 +1,167 @@ + + + + +
+ + +
+
+ {@render heading(BookMarked, "Create a repository")} +

Kick things off by creating your first repository.

+ + Create + +
+ +
+ {@render heading(GitPullRequest, "Contribute to the Tangled project")} +

+ Tangled is fully open-source: Open a feature request, or submit a bug-fix! +

+ All contributions are welcome. +

+ + Contribute + +
+ + {#each docs as doc (doc.title)} +
+ {@render heading(doc.icon, doc.title)} +

{doc.body}

+ + Read the docs + +
+ {/each} +
+ + +
+ +{#snippet heading(icon: Component, title: string)} + {@const Icon = icon} + + +{/snippet} diff --git a/web/src/lib/components/welcome/KeysStep.svelte b/web/src/lib/components/welcome/KeysStep.svelte new file mode 100644 index 00000000..eff4fa66 --- /dev/null +++ b/web/src/lib/components/welcome/KeysStep.svelte @@ -0,0 +1,68 @@ + + +
+ + + {#if draft.keys.length > 0} +
    + {#each draft.keys as pubkey (pubkey.id)} +
  • + removeKey(pubkey.id)} + /> +
  • + {/each} +
+ {/if} + +
+ + {#snippet children({ id })} + + {/snippet} + + + + {#snippet children({ id })} +