| 
									
										
										
										
											2023-04-16 04:13:09 +02:00
										 |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |   import { createEventDispatcher } from "svelte" | 
					
						
							|  |  |  |   import { XCircleIcon } from "@rgossiaux/svelte-heroicons/solid" | 
					
						
							| 
									
										
										
										
											2023-04-16 04:13:09 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |   /** | 
					
						
							|  |  |  |    * The slotted element will be shown on the right side | 
					
						
							|  |  |  |    */ | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |   const dispatch = createEventDispatcher<{ close }>() | 
					
						
							| 
									
										
										
										
											2023-04-16 04:13:09 +02:00
										 |  |  | </script> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  | <div | 
					
						
							| 
									
										
										
										
											2023-12-19 23:02:02 +01:00
										 |  |  |   aria-modal="true" | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |   autofocus | 
					
						
							| 
									
										
										
										
											2025-02-10 02:04:58 +01:00
										 |  |  |   class="normal-background absolute right-0 top-0 flex h-screen w-full flex-col overflow-y-auto drop-shadow-2xl md:w-6/12 lg:w-5/12 xl:w-4/12" | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |   role="dialog" | 
					
						
							| 
									
										
										
										
											2024-08-22 22:50:37 +02:00
										 |  |  |   style="max-width: 100vw; max-height: 100vh; z-index: 11" | 
					
						
							| 
									
										
										
										
											2023-12-19 23:02:02 +01:00
										 |  |  |   tabindex="-1" | 
					
						
							| 
									
										
										
										
											2024-04-24 02:44:31 +02:00
										 |  |  |   id="modal-right" | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  | > | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |   <slot name="close-button"> | 
					
						
							|  |  |  |     <button | 
					
						
							| 
									
										
										
										
											2023-12-20 02:50:08 +01:00
										 |  |  |       class="absolute right-10 top-10 h-8 w-8 cursor-pointer rounded-full" | 
					
						
							| 
									
										
										
										
											2023-12-15 01:46:01 +01:00
										 |  |  |       on:click={() => dispatch("close")} | 
					
						
							|  |  |  |     > | 
					
						
							|  |  |  |       <XCircleIcon /> | 
					
						
							|  |  |  |     </button> | 
					
						
							|  |  |  |   </slot> | 
					
						
							| 
									
										
										
										
											2023-12-19 23:02:02 +01:00
										 |  |  |   <div role="document"> | 
					
						
							| 
									
										
										
										
											2023-06-14 20:39:36 +02:00
										 |  |  |     <slot /> | 
					
						
							| 
									
										
										
										
											2023-04-16 04:13:09 +02:00
										 |  |  |   </div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2024-04-24 02:44:31 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | <!-- Experimental support for foldable devices --> | 
					
						
							|  |  |  | <style lang="scss"> | 
					
						
							|  |  |  |   @media (horizontal-viewport-segments: 2) { | 
					
						
							|  |  |  |     #modal-right { | 
					
						
							|  |  |  |       width: 50%; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |   } | 
					
						
							|  |  |  | </style> |