-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com>
- Loading branch information
1 parent
1c55379
commit 8be8260
Showing
27 changed files
with
576 additions
and
27 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { DropdownMenu as MenuPrimitive } from 'bits-ui'; | ||
import CheckboxItem from './menu-checkbox-item.svelte'; | ||
import Content from './menu-content.svelte'; | ||
import Item from './menu-item.svelte'; | ||
import Label from './menu-label.svelte'; | ||
import RadioGroup from './menu-radio-group.svelte'; | ||
import RadioItem from './menu-radio-item.svelte'; | ||
import Separator from './menu-separator.svelte'; | ||
import Shortcut from './menu-shortcut.svelte'; | ||
import SubContent from './menu-sub-content.svelte'; | ||
import SubTrigger from './menu-sub-trigger.svelte'; | ||
|
||
const Sub = MenuPrimitive.Sub; | ||
const Root = MenuPrimitive.Root; | ||
const Trigger = MenuPrimitive.Trigger; | ||
const Group = MenuPrimitive.Group; | ||
|
||
export { | ||
CheckboxItem, | ||
Content, | ||
Group, | ||
Item, | ||
Label, | ||
Root as Menu, | ||
CheckboxItem as MenuCheckboxItem, | ||
Content as MenuContent, | ||
Group as MenuGroup, | ||
Item as MenuItem, | ||
Label as MenuLabel, | ||
RadioGroup as MenuRadioGroup, | ||
RadioItem as MenuRadioItem, | ||
Separator as MenuSeparator, | ||
Shortcut as MenuShortcut, | ||
Sub as MenuSub, | ||
SubContent as MenuSubContent, | ||
SubTrigger as MenuSubTrigger, | ||
Trigger as MenuTrigger, | ||
RadioGroup, | ||
RadioItem, | ||
Root, | ||
Separator, | ||
Shortcut, | ||
Sub, | ||
SubContent, | ||
SubTrigger, | ||
Trigger | ||
}; |
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,35 @@ | ||
<script lang="ts"> | ||
import { Icons } from '$lib/assets/icons'; | ||
import { cn } from '$lib/utils.js'; | ||
import { DropdownMenu as MenuPrimitive } from 'bits-ui'; | ||
type $$Props = MenuPrimitive.CheckboxItemProps; | ||
type $$Events = MenuPrimitive.CheckboxItemEvents; | ||
let className: $$Props['class'] = undefined; | ||
export let checked: $$Props['checked'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<MenuPrimitive.CheckboxItem | ||
bind:checked | ||
class={cn( | ||
'relative flex h-10 cursor-pointer select-none items-center rounded-md pl-8 pr-2 text-sm outline-none data-[disabled]:cursor-default data-[highlighted]:bg-gray-200 data-[disabled]:text-gray-700', | ||
className | ||
)} | ||
{...$$restProps} | ||
on:click | ||
on:keydown | ||
on:focusin | ||
on:focusout | ||
on:pointerdown | ||
on:pointerleave | ||
on:pointermove | ||
> | ||
<span class="absolute left-2 flex size-3.5 items-center justify-center"> | ||
<MenuPrimitive.CheckboxIndicator> | ||
<Icons.Check class="size-3" /> | ||
</MenuPrimitive.CheckboxIndicator> | ||
</span> | ||
<slot /> | ||
</MenuPrimitive.CheckboxItem> |
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,27 @@ | ||
<script lang="ts"> | ||
import { cn, flyAndScale } from '$lib/utils.js'; | ||
import { DropdownMenu as MenuPrimitive } from 'bits-ui'; | ||
type $$Props = MenuPrimitive.ContentProps; | ||
type $$Events = MenuPrimitive.ContentEvents; | ||
let className: $$Props['class'] = undefined; | ||
export let sideOffset: $$Props['sideOffset'] = 4; | ||
export let transition: $$Props['transition'] = flyAndScale; | ||
export let transitionConfig: $$Props['transitionConfig'] = undefined; | ||
export { className as class }; | ||
</script> | ||
|
||
<MenuPrimitive.Content | ||
{transition} | ||
{transitionConfig} | ||
{sideOffset} | ||
class={cn( | ||
'z-50 min-w-[10rem] rounded-xl bg-background-100 p-2 text-gray-1000 shadow-shadow-menu focus:outline-none', | ||
className | ||
)} | ||
{...$$restProps} | ||
on:keydown | ||
> | ||
<slot /> | ||
</MenuPrimitive.Content> |
Oops, something went wrong.