Skip to content

Commit 37fc6c1

Browse files
committed
feat: add RTL support to PackageDependencies
1 parent ca3942a commit 37fc6c1

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

app/components/PackageDependencies.vue

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const sortedOptionalDependencies = computed(() => {
8080
>
8181
{{ $t('package.dependencies.title', { count: sortedDependencies.length }) }}
8282
<span
83-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
83+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
8484
aria-hidden="true"
8585
/>
8686
</a>
@@ -89,7 +89,7 @@ const sortedOptionalDependencies = computed(() => {
8989
<li
9090
v-for="[dep, version] in sortedDependencies.slice(0, depsExpanded ? undefined : 10)"
9191
:key="dep"
92-
class="flex items-center justify-between py-1 text-sm gap-2"
92+
class="flex items-center justify-start py-1 text-sm gap-2"
9393
>
9494
<NuxtLink
9595
:to="{ name: 'package', params: { package: dep.split('/') } }"
@@ -105,8 +105,9 @@ const sortedOptionalDependencies = computed(() => {
105105
:title="getOutdatedTooltip(outdatedDeps[dep])"
106106
aria-hidden="true"
107107
>
108-
<span class="i-carbon-warning-alt w-3 h-3 block" />
108+
<span class="i-carbon:warning-alt w-3 h-3 block" />
109109
</span>
110+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
110111
<NuxtLink
111112
v-if="getVulnerableDepInfo(dep)"
112113
:to="{
@@ -117,12 +118,12 @@ const sortedOptionalDependencies = computed(() => {
117118
:class="SEVERITY_TEXT_COLORS[getHighestSeverity(getVulnerableDepInfo(dep)!.counts)]"
118119
:title="`${getVulnerableDepInfo(dep)!.counts.total} vulnerabilities`"
119120
>
120-
<span class="i-carbon-security w-3 h-3 block" aria-hidden="true" />
121+
<span class="i-carbon:security w-3 h-3 block" aria-hidden="true" />
121122
<span class="sr-only">{{ $t('package.dependencies.view_vulnerabilities') }}</span>
122123
</NuxtLink>
123124
<NuxtLink
124125
:to="{ name: 'package', params: { package: [...dep.split('/'), 'v', version] } }"
125-
class="font-mono text-xs text-right truncate"
126+
class="font-mono text-xs text-end truncate"
126127
:class="getVersionClass(outdatedDeps[dep])"
127128
:title="outdatedDeps[dep] ? getOutdatedTooltip(outdatedDeps[dep]) : version"
128129
>
@@ -164,7 +165,7 @@ const sortedOptionalDependencies = computed(() => {
164165
>
165166
{{ $t('package.peer_dependencies.title', { count: sortedPeerDependencies.length }) }}
166167
<span
167-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
168+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
168169
aria-hidden="true"
169170
/>
170171
</a>
@@ -176,7 +177,7 @@ const sortedOptionalDependencies = computed(() => {
176177
<li
177178
v-for="peer in sortedPeerDependencies.slice(0, peerDepsExpanded ? undefined : 10)"
178179
:key="peer.name"
179-
class="flex items-center justify-between py-1 text-sm gap-2"
180+
class="flex items-center justify-start py-1 text-sm gap-2"
180181
>
181182
<div class="flex items-center gap-2 min-w-0">
182183
<NuxtLink
@@ -193,12 +194,13 @@ const sortedOptionalDependencies = computed(() => {
193194
{{ $t('package.dependencies.optional') }}
194195
</span>
195196
</div>
197+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
196198
<NuxtLink
197199
:to="{
198200
name: 'package',
199201
params: { package: [...peer.name.split('/'), 'v', peer.version] },
200202
}"
201-
class="font-mono text-xs text-fg-subtle max-w-[40%] text-right truncate"
203+
class="font-mono text-xs text-fg-subtle max-w-[40%] text-end truncate"
202204
:title="peer.version"
203205
>
204206
{{ peer.version }}
@@ -234,7 +236,7 @@ const sortedOptionalDependencies = computed(() => {
234236
$t('package.optional_dependencies.title', { count: sortedOptionalDependencies.length })
235237
}}
236238
<span
237-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
239+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
238240
aria-hidden="true"
239241
/>
240242
</a>
@@ -249,17 +251,18 @@ const sortedOptionalDependencies = computed(() => {
249251
optionalDepsExpanded ? undefined : 10,
250252
)"
251253
:key="dep"
252-
class="flex items-center justify-between py-1 text-sm gap-2"
254+
class="flex items-center justify-start py-1 text-sm gap-2"
253255
>
254256
<NuxtLink
255257
:to="{ name: 'package', params: { package: dep.split('/') } }"
256258
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate min-w-0"
257259
>
258260
{{ dep }}
259261
</NuxtLink>
262+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
260263
<NuxtLink
261264
:to="{ name: 'package', params: { package: [...dep.split('/'), 'v', version] } }"
262-
class="font-mono text-xs text-fg-subtle max-w-[50%] text-right truncate"
265+
class="font-mono text-xs text-fg-subtle max-w-[50%] text-end truncate"
263266
:title="version"
264267
>
265268
{{ version }}

0 commit comments

Comments
 (0)