Something went wrong. Try again.
source code of sayemon10.com sayemon10.com
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546<script lang="ts"> import { Select as SelectPrimitive } from 'bits-ui'; import SelectPortal from './select-portal.svelte'; import SelectScrollUpButton from './select-scroll-up-button.svelte'; import SelectScrollDownButton from './select-scroll-down-button.svelte'; import { cn, type WithoutChild } from '#lib/utils.js'; import type { ComponentProps } from 'svelte'; import type { WithoutChildrenOrChild } from '#lib/utils.js';
let { ref = $bindable(null), class: className, sideOffset = 4, portalProps, children, preventScroll = true, ...restProps }: WithoutChild<SelectPrimitive.ContentProps> & { portalProps?: WithoutChildrenOrChild<ComponentProps<typeof SelectPortal>>; } = $props();</script>
<SelectPortal {...portalProps}> <SelectPrimitive.Content bind:ref {sideOffset} {preventScroll} data-slot="select-content" class={cn( 'relative isolate z-50 min-w-36 overflow-x-hidden overflow-y-auto rounded-3xl bg-popover text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', className )} {...restProps} > <SelectScrollUpButton /> <SelectPrimitive.Viewport class={cn( 'h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1' )} > {@render children?.()} </SelectPrimitive.Viewport> <SelectScrollDownButton /> </SelectPrimitive.Content></SelectPortal>