|  | 
| 2 | 2 | 	import { getContext, type Snippet } from 'svelte'; | 
| 3 | 3 | 	import type { HTMLAttributes } from 'svelte/elements'; | 
| 4 | 4 | 	import { fly } from 'svelte/transition'; | 
|  | 5 | +	import { cubicOut } from 'svelte/easing'; | 
| 5 | 6 | 
 | 
| 6 | 7 | 	interface Props extends HTMLAttributes<HTMLDivElement> { | 
| 7 | 8 | 		class?: string; | 
|  | 
| 29 | 30 | 
 | 
| 30 | 31 | 	let content: HTMLDivElement = $state<any>(); | 
| 31 | 32 | 	$effect(() => { | 
| 32 |  | -		if (rootState.getIsActive()) { | 
| 33 |  | -			content.setAttribute('aria-hidden', 'false'); | 
| 34 |  | -		} else { | 
| 35 |  | -			content.setAttribute('aria-hidden', 'true'); | 
|  | 33 | +		if (content) { | 
|  | 34 | +			if (rootState.getIsActive()) { | 
|  | 35 | +				content.setAttribute('aria-hidden', 'false'); | 
|  | 36 | +			} else { | 
|  | 37 | +				content.setAttribute('aria-hidden', 'true'); | 
|  | 38 | +			} | 
| 36 | 39 | 		} | 
| 37 | 40 | 	}); | 
| 38 | 41 | </script> | 
|  | 
| 41 | 44 | 	{#if rootState.getIsActive()} | 
| 42 | 45 | 		<div | 
| 43 | 46 | 			bind:this={content} | 
| 44 |  | -			in:fly|local={{ y: '100vh', duration: 500, opacity: 1 }} | 
| 45 |  | -			out:fly|local={{ y: '100vh', duration: 500, opacity: 1 }} | 
| 46 |  | -			class="fixed bottom-0 left-0 w-full rounded-t-[15px] bg-kui-light-bg-secondary dark:bg-kui-dark-bg-secondary lg:bg-transparent z-[1001]" | 
|  | 47 | +			in:fly|local={{ y: '50vh', duration: 500, opacity: 1 }} | 
|  | 48 | +			out:fly|local={{ y: '100vh', duration: 600, easing: cubicOut, opacity: 1 }} | 
|  | 49 | +			class="fixed bottom-0 left-0 w-full rounded-t-[10px] bg-kui-light-bg-secondary dark:bg-kui-dark-bg-secondary lg:bg-transparent z-[1001]" | 
| 47 | 50 | 			{...rest} | 
| 48 | 51 | 		> | 
| 49 | 52 | 			<div | 
| 50 |  | -				class="hide-scrollbar bg-kui-light-bg dark:bg-kui-dark-bg px-3 rounded-t-[15px] border-t | 
| 51 |  | -				border-kui-light-gray-200 dark:border-kui-dark-gray-200 scroll-smooth overflow-y-auto" | 
|  | 53 | +				class="hide-scrollbar bg-kui-light-bg dark:bg-kui-dark-bg px-3 rounded-t-[10px] border-t | 
|  | 54 | +				border-kui-light-gray-600 dark:border-kui-dark-gray-500 scroll-smooth overflow-y-auto" | 
| 52 | 55 | 			> | 
| 53 | 56 | 				{@render children()} | 
| 54 | 57 | 			</div> | 
|  | 
0 commit comments