Skip to content

Commit e0e8fdb

Browse files
committed
feat: add enlarged downloads chart with filters
1 parent 2df63c6 commit e0e8fdb

7 files changed

Lines changed: 1106 additions & 93 deletions

File tree

app/components/ChartModal.vue

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<script setup lang="ts">
2+
const open = defineModel<boolean>('open', { default: false })
3+
</script>
4+
5+
<template>
6+
<Teleport to="body">
7+
<Transition
8+
enter-active-class="transition-opacity duration-200"
9+
leave-active-class="transition-opacity duration-200"
10+
enter-from-class="opacity-0"
11+
leave-to-class="opacity-0"
12+
>
13+
<div v-if="open" class="fixed inset-0 z-50 flex items-center justify-center p-4">
14+
<!-- Backdrop -->
15+
<button
16+
type="button"
17+
class="absolute inset-0 bg-black/60 cursor-default"
18+
aria-label="Close modal"
19+
@click="open = false"
20+
/>
21+
22+
<div
23+
class="relative w-full bg-bg border border-border rounded-lg shadow-xl max-h-[90vh] overflow-y-auto overscroll-contain max-w-3xl"
24+
role="dialog"
25+
aria-modal="true"
26+
aria-labelledby="package-download-stats"
27+
>
28+
<div class="p-6">
29+
<div class="flex items-center justify-between mb-6">
30+
<h2 id="package-download-stats" class="font-mono text-lg font-medium">
31+
<slot name="title" />
32+
</h2>
33+
<button
34+
type="button"
35+
class="text-fg-subtle hover:text-fg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
36+
aria-label="Close"
37+
@click="open = false"
38+
>
39+
<span class="i-carbon-close block w-5 h-5" aria-hidden="true" />
40+
</button>
41+
</div>
42+
<div class="flex items-center font-mono text-sm">
43+
<slot />
44+
</div>
45+
</div>
46+
</div>
47+
</div>
48+
</Transition>
49+
</Teleport>
50+
</template>

0 commit comments

Comments
 (0)