-
-
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.
✨ Updated design and texts && improved project page && added 2 projects
- Loading branch information
Showing
36 changed files
with
599 additions
and
395 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
40 changes: 40 additions & 0 deletions
40
src/lib/components/ui/dropdown-menu/dropdown-menu-checkbox-item.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<script lang="ts"> | ||
import { DropdownMenu as DropdownMenuPrimitive, type WithoutChildrenOrChild } from 'bits-ui'; | ||
import Check from 'lucide-svelte/icons/check'; | ||
import Minus from 'lucide-svelte/icons/minus'; | ||
import { cn } from '$lib/utils.js'; | ||
import type { Snippet } from 'svelte'; | ||
let { | ||
ref = $bindable(null), | ||
checked = $bindable(false), | ||
indeterminate = $bindable(false), | ||
class: className, | ||
children: childrenProp, | ||
...restProps | ||
}: WithoutChildrenOrChild<DropdownMenuPrimitive.CheckboxItemProps> & { | ||
children?: Snippet; | ||
} = $props(); | ||
</script> | ||
|
||
<DropdownMenuPrimitive.CheckboxItem | ||
bind:ref | ||
bind:checked | ||
bind:indeterminate | ||
class={cn( | ||
'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50', | ||
className | ||
)} | ||
{...restProps} | ||
> | ||
{#snippet children({ checked, indeterminate })} | ||
<span class="absolute left-2 flex size-3.5 items-center justify-center"> | ||
{#if indeterminate} | ||
<Minus class="size-4" /> | ||
{:else} | ||
<Check class={cn('size-4', !checked && 'text-transparent')} /> | ||
{/if} | ||
</span> | ||
{@render childrenProp?.()} | ||
{/snippet} | ||
</DropdownMenuPrimitive.CheckboxItem> |
26 changes: 26 additions & 0 deletions
26
src/lib/components/ui/dropdown-menu/dropdown-menu-content.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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script lang="ts"> | ||
import { cn } from '$lib/utils.js'; | ||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; | ||
let { | ||
ref = $bindable(null), | ||
sideOffset = 4, | ||
portalProps, | ||
class: className, | ||
...restProps | ||
}: DropdownMenuPrimitive.ContentProps & { | ||
portalProps?: DropdownMenuPrimitive.PortalProps; | ||
} = $props(); | ||
</script> | ||
|
||
<DropdownMenuPrimitive.Portal {...portalProps}> | ||
<DropdownMenuPrimitive.Content | ||
bind:ref | ||
{sideOffset} | ||
class={cn( | ||
'z-50 min-w-[8rem] overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', | ||
className | ||
)} | ||
{...restProps} | ||
/> | ||
</DropdownMenuPrimitive.Portal> |
19 changes: 19 additions & 0 deletions
19
src/lib/components/ui/dropdown-menu/dropdown-menu-group-heading.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script lang="ts"> | ||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; | ||
import { cn } from '$lib/utils.js'; | ||
let { | ||
ref = $bindable(null), | ||
class: className, | ||
inset, | ||
...restProps | ||
}: DropdownMenuPrimitive.GroupHeadingProps & { | ||
inset?: boolean; | ||
} = $props(); | ||
</script> | ||
|
||
<DropdownMenuPrimitive.GroupHeading | ||
bind:ref | ||
class={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)} | ||
{...restProps} | ||
/> |
23 changes: 23 additions & 0 deletions
23
src/lib/components/ui/dropdown-menu/dropdown-menu-item.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import { cn } from '$lib/utils.js'; | ||
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui'; | ||
let { | ||
ref = $bindable(null), | ||
class: className, | ||
inset, | ||
...restProps | ||
}: DropdownMenuPrimitive.ItemProps & { | ||
inset?: boolean; | ||
} = $props(); | ||
</script> | ||
|
||
<DropdownMenuPrimitive.Item | ||
bind:ref | ||
class={cn( | ||
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', | ||
inset && 'pl-8', | ||
className | ||
)} | ||
{...restProps} | ||
/> |
12 changes: 5 additions & 7 deletions
12
...ib/components/ui/alert/alert-title.svelte → .../dropdown-menu/dropdown-menu-label.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
Oops, something went wrong.