diff --git a/src/lib/components/collection/CollectionFilters.svelte b/src/lib/components/collection/CollectionFilters.svelte new file mode 100644 index 00000000..cb925a91 --- /dev/null +++ b/src/lib/components/collection/CollectionFilters.svelte @@ -0,0 +1,421 @@ + + +
+ {#if showFilters.element} +
+ +
+ {#each elements as element} + + {/each} +
+
+ {/if} + + {#if showFilters.rarity} +
+ +
+ {#each rarities as rarity} + + {/each} +
+
+ {/if} + + {#if showFilters.season} +
+ +
+ {#each seasons as season} + + {/each} +
+
+ {/if} + + {#if showFilters.series} +
+ +
+ {#each series as s} + + {/each} +
+
+ {/if} + + {#if showFilters.race} +
+ +
+ {#each races as race} + + {/each} +
+
+ {/if} + + {#if showFilters.proficiency} +
+ +
+ {#each proficiencies as prof} + + {/each} +
+
+ {/if} + + {#if showFilters.gender} +
+ +
+ {#each genders as gender} + + {/each} +
+
+ {/if} + + {#if hasActiveFilters} + + {/if} +
+ + diff --git a/src/lib/components/ui/Dialog.svelte b/src/lib/components/ui/Dialog.svelte index 938915b7..4e185f5d 100644 --- a/src/lib/components/ui/Dialog.svelte +++ b/src/lib/components/ui/Dialog.svelte @@ -3,11 +3,14 @@ import type { Snippet } from 'svelte' import Icon from '$lib/components/Icon.svelte' + type DialogSize = 'default' | 'large' + interface DialogProps { open: boolean onOpenChange?: (open: boolean) => void title?: string description?: string + size?: DialogSize children: Snippet footer?: Snippet } @@ -17,10 +20,13 @@ onOpenChange, title, description, + size = 'default', children, footer }: DialogProps = $props() + const sizeClass = $derived(size === 'large' ? 'dialog-content-large' : '') + function handleOpenChange(newOpen: boolean) { open = newOpen onOpenChange?.(newOpen) @@ -30,7 +36,7 @@ - + {#if title} {title} {/if} @@ -143,6 +149,24 @@ justify-content: flex-end; } + // Large dialog variant for collection modals, etc. + :global(.dialog-content-large) { + width: 90vw; + max-width: 1400px; + height: 85vh; + max-height: 85vh; + } + + :global(.dialog-content-large .dialog-body) { + padding: $unit-3x; + } + + :global(.dialog-content-large .dialog-footer) { + padding: $unit-3x; + padding-top: $unit-2x; + border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1)); + } + @keyframes fade-in { from { opacity: 0;