@datagouv/components-next 1.0.2-dev.190 → 1.0.2-dev.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Datafair.client-VsEj9A00.js → Datafair.client-fxOwwaND.js} +1 -1
- package/dist/{ImagePreview.client-cv32--L0.js → ImagePreview.client-XSR9THWR.js} +1 -1
- package/dist/{JsonPreview.client-JmyzznjY.js → JsonPreview.client-CU1FWFIy.js} +2 -2
- package/dist/{MapContainer.client-BxGjbFJV.js → MapContainer.client-D0-Dn7jq.js} +2 -2
- package/dist/{PdfPreview.client-CkrjnmJP.js → PdfPreview.client-B7eDgq8y.js} +2 -2
- package/dist/{Pmtiles.client-EAekMgpr.js → Pmtiles.client-CCpvggkZ.js} +1 -1
- package/dist/{PreviewWrapper.vue_vue_type_script_setup_true_lang-B0OeAb39.js → PreviewWrapper.vue_vue_type_script_setup_true_lang-BzhNjYoY.js} +1 -1
- package/dist/{XmlPreview.client-WcOMRUAD.js → XmlPreview.client-CyjpNh5i.js} +3 -3
- package/dist/components-next.js +1 -1
- package/dist/{index-DLsJxwiN.js → index-BBnxH-Nj.js} +1 -1
- package/dist/{leaflet-src-D0FPslrZ.js → leaflet-src-Be0Ohp2k.js} +1 -1
- package/dist/{main-HzoTSLAM.js → main-C2kCZkPD.js} +588 -583
- package/dist/{vue3-xml-viewer.common-iq0K0tIG.js → vue3-xml-viewer.common-__BZsi8i.js} +1 -1
- package/package.json +1 -1
- package/src/components/ResourceListItem.vue +36 -29
package/package.json
CHANGED
|
@@ -43,37 +43,43 @@
|
|
|
43
43
|
|
|
44
44
|
<!-- Hover card: the row truncates the title, so surface the full name plus the
|
|
45
45
|
same metadata line as the viewer header. Placed beside the row (not below) so
|
|
46
|
-
it doesn't hide the sibling rows we're scanning.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
46
|
+
it doesn't hide the sibling rows we're scanning.
|
|
47
|
+
ClientOnly: Vue hydrates a teleport by scanning the target from its first child,
|
|
48
|
+
so an SSR-rendered teleport to `body` breaks as soon as anything else is prepended
|
|
49
|
+
there — and Nuxt emits the `bodyOpen` head tags before it. The card only ever opens
|
|
50
|
+
on hover, so there is nothing to render on the server anyway. -->
|
|
51
|
+
<ClientOnly>
|
|
52
|
+
<Teleport to="body">
|
|
53
|
+
<div
|
|
54
|
+
v-if="show"
|
|
55
|
+
ref="card"
|
|
56
|
+
role="tooltip"
|
|
57
|
+
class="pointer-events-none z-[80] w-max rounded border border-gray-default bg-white p-2 text-left shadow-[0_2px_4px_rgba(0,0,0,0.04),2px_4px_16px_rgba(0,0,0,0.12)]"
|
|
58
|
+
:style="floatingStyles"
|
|
59
|
+
>
|
|
60
|
+
<span class="block whitespace-nowrap text-[13px] font-medium leading-5 text-gray-title">{{ resource.title || t('Fichier sans nom') }}</span>
|
|
61
|
+
<div class="mt-1 flex items-center gap-1 text-[12px] leading-4 text-gray-medium">
|
|
62
|
+
<span>{{ t('mis à jour {date}', { date: formatRelativeIfRecentDate(resource.last_modified) }) }}</span>
|
|
63
|
+
<template v-if="humanFilesize">
|
|
64
|
+
<span>·</span>
|
|
65
|
+
<span>{{ humanFilesize }}</span>
|
|
66
|
+
</template>
|
|
67
|
+
<template v-if="resource.format">
|
|
68
|
+
<span>·</span>
|
|
69
|
+
<span class="rounded bg-gray-lower px-1.5 py-0.5 uppercase leading-4">{{ resource.format }}</span>
|
|
70
|
+
</template>
|
|
63
71
|
<span>·</span>
|
|
64
|
-
<span class="
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
{{ summarize(resource.metrics.views) }}
|
|
73
|
-
</span>
|
|
72
|
+
<span class="inline-flex items-center gap-0.5">
|
|
73
|
+
<RiDownloadLine
|
|
74
|
+
class="size-3"
|
|
75
|
+
aria-hidden="true"
|
|
76
|
+
/>
|
|
77
|
+
{{ summarize(resource.metrics.views) }}
|
|
78
|
+
</span>
|
|
79
|
+
</div>
|
|
74
80
|
</div>
|
|
75
|
-
</
|
|
76
|
-
</
|
|
81
|
+
</Teleport>
|
|
82
|
+
</ClientOnly>
|
|
77
83
|
</template>
|
|
78
84
|
|
|
79
85
|
<script setup lang="ts">
|
|
@@ -83,6 +89,7 @@ import { useEventListener } from '@vueuse/core'
|
|
|
83
89
|
import type { RouteLocationRaw } from 'vue-router'
|
|
84
90
|
import { RiDownloadLine } from '@remixicon/vue'
|
|
85
91
|
import AppLink from './AppLink.vue'
|
|
92
|
+
import ClientOnly from './ClientOnly.vue'
|
|
86
93
|
import File from './Icons/File.vue'
|
|
87
94
|
import { getResourceFormatIcon, getResourceIconColor, getResourceFilesize } from '../functions/resources'
|
|
88
95
|
import { filesize, summarize } from '../functions/helpers'
|