-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
263 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"files.associations": { | ||
"*.css": "tailwindcss" | ||
} | ||
}, | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script lang="ts"> | ||
import { APPLICATION_NAME, APPLICATION_ICON } from "."; | ||
import ThemeToggle from "@/theme-toggle.svelte"; | ||
import Icons from "$lib/icons"; | ||
</script> | ||
|
||
<header | ||
class="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60" | ||
> | ||
<div class="container mx-auto flex h-14 max-w-screen-2xl items-center px-4"> | ||
<div class="flex md:mr-4"> | ||
<!-- This is apparently svelte 5, this is cursed --> | ||
<APPLICATION_ICON /> | ||
<span class="ml-2 font-bold sm:inline-block">{APPLICATION_NAME}</span> | ||
</div> | ||
|
||
<div | ||
class="hidden flex-1 items-center justify-between space-x-2 md:flex md:justify-end" | ||
> | ||
<ThemeToggle /> | ||
</div> | ||
</div> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import Icons from "../../icons"; | ||
|
||
export const APPLICATION_NAME = "Jail Bird"; | ||
export const APPLICATION_ICON = Icons.Lock; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import { APPLICATION_NAME, APPLICATION_ICON } from "."; | ||
import ThemeToggle from "@/theme-toggle.svelte"; | ||
</script> | ||
|
||
<header | ||
class="sticky top-0 z-50 w-full border-b border-border/40 bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60" | ||
> | ||
<div class="container mx-auto flex h-24 max-w-screen-2xl items-center px-4"> | ||
<div class="flex md:mr-4"> | ||
<!-- This is apparently svelte 5, this is cursed --> | ||
<APPLICATION_ICON /> | ||
<span class="ml-2 font-bold sm:inline-block">{APPLICATION_NAME}</span> | ||
</div> | ||
|
||
<div | ||
class="hidden flex-1 items-center justify-between space-x-2 md:flex md:justify-end" | ||
> | ||
<ThemeToggle /> | ||
</div> | ||
</div> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
<!-- | ||
@component | ||
This is a reusable `<main>` tag, it has all of the classes to be nice and | ||
usable and can be expanded later to also work on mobile. | ||
--> | ||
|
||
<main class="mx-auto max-w-screen-2xl py-4"> | ||
<slot /> | ||
</main> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,33 @@ | ||
<script lang="ts"> | ||
import { Button as ButtonPrimitive } from "bits-ui"; | ||
import { type Events, type Props, buttonVariants } from "./index.js"; | ||
import { type Props, buttonVariants } from "./index.js"; | ||
import { cn } from "$lib/utils.js"; | ||
type $$Props = Props; | ||
type $$Events = Events; | ||
let className: $$Props["class"] = undefined; | ||
export let variant: $$Props["variant"] = "default"; | ||
export let size: $$Props["size"] = "default"; | ||
export let builders: $$Props["builders"] = []; | ||
export { className as class }; | ||
let { | ||
class: className = undefined, | ||
variant, | ||
size, | ||
builders, | ||
children, | ||
}: Props = $props(); | ||
</script> | ||
|
||
<!-- | ||
@component | ||
> **NOTE** | ||
> | ||
> For some unknown dumbass reason, typescript screams in | ||
> pain when i use `...rest` in the `props`. So for now, we'll limit | ||
> our stuff to this. | ||
--> | ||
|
||
<ButtonPrimitive.Root | ||
{builders} | ||
class={cn(buttonVariants({ variant, size, className }))} | ||
type="button" | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
> | ||
<slot /> | ||
{@render children()} | ||
</ButtonPrimitive.Root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 8 additions & 5 deletions
13
src/lib/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<script lang="ts"> | ||
import { DropdownMenu as DropdownMenuPrimitive } from "bits-ui"; | ||
import type { RadioGroupProps } from "."; | ||
type $$Props = DropdownMenuPrimitive.RadioGroupProps; | ||
export let value: $$Props["value"] = undefined; | ||
let { | ||
value = $bindable(undefined), | ||
children, | ||
...rest | ||
}: RadioGroupProps = $props(); | ||
</script> | ||
|
||
<DropdownMenuPrimitive.RadioGroup {...$$restProps} bind:value> | ||
<slot /> | ||
<DropdownMenuPrimitive.RadioGroup {...rest} bind:value> | ||
{@render children()} | ||
</DropdownMenuPrimitive.RadioGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.