Skip to content

Commit 0d83ffc

Browse files
authored
feat: add RTL support to PackageDependencies (#337)
1 parent e824aa1 commit 0d83ffc

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
@@ -86,7 +86,7 @@ const sortedOptionalDependencies = computed(() => {
8686
>
8787
{{ $t('package.dependencies.title', { count: sortedDependencies.length }) }}
8888
<span
89-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
89+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
9090
aria-hidden="true"
9191
/>
9292
</a>
@@ -95,7 +95,7 @@ const sortedOptionalDependencies = computed(() => {
9595
<li
9696
v-for="[dep, version] in sortedDependencies.slice(0, depsExpanded ? undefined : 10)"
9797
:key="dep"
98-
class="flex items-center justify-between py-1 text-sm gap-2"
98+
class="flex items-center justify-start py-1 text-sm gap-2"
9999
>
100100
<NuxtLink
101101
:to="{ name: 'package', params: { package: dep.split('/') } }"
@@ -111,8 +111,9 @@ const sortedOptionalDependencies = computed(() => {
111111
:title="getOutdatedTooltip(outdatedDeps[dep])"
112112
aria-hidden="true"
113113
>
114-
<span class="i-carbon-warning-alt w-3 h-3 block" />
114+
<span class="i-carbon:warning-alt w-3 h-3 block" />
115115
</span>
116+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
116117
<NuxtLink
117118
v-if="getVulnerableDepInfo(dep)"
118119
:to="{
@@ -123,7 +124,7 @@ const sortedOptionalDependencies = computed(() => {
123124
:class="SEVERITY_TEXT_COLORS[getHighestSeverity(getVulnerableDepInfo(dep)!.counts)]"
124125
:title="`${getVulnerableDepInfo(dep)!.counts.total} vulnerabilities`"
125126
>
126-
<span class="i-carbon-security w-3 h-3 block" aria-hidden="true" />
127+
<span class="i-carbon:security w-3 h-3 block" aria-hidden="true" />
127128
<span class="sr-only">{{ $t('package.dependencies.view_vulnerabilities') }}</span>
128129
</NuxtLink>
129130
<NuxtLink
@@ -140,7 +141,7 @@ const sortedOptionalDependencies = computed(() => {
140141
</NuxtLink>
141142
<NuxtLink
142143
:to="{ name: 'package', params: { package: [...dep.split('/'), 'v', version] } }"
143-
class="font-mono text-xs text-right truncate"
144+
class="font-mono text-xs text-end truncate"
144145
:class="getVersionClass(outdatedDeps[dep])"
145146
:title="outdatedDeps[dep] ? getOutdatedTooltip(outdatedDeps[dep]) : version"
146147
>
@@ -182,7 +183,7 @@ const sortedOptionalDependencies = computed(() => {
182183
>
183184
{{ $t('package.peer_dependencies.title', { count: sortedPeerDependencies.length }) }}
184185
<span
185-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
186+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
186187
aria-hidden="true"
187188
/>
188189
</a>
@@ -194,7 +195,7 @@ const sortedOptionalDependencies = computed(() => {
194195
<li
195196
v-for="peer in sortedPeerDependencies.slice(0, peerDepsExpanded ? undefined : 10)"
196197
:key="peer.name"
197-
class="flex items-center justify-between py-1 text-sm gap-2"
198+
class="flex items-center justify-start py-1 text-sm gap-2"
198199
>
199200
<div class="flex items-center gap-2 min-w-0">
200201
<NuxtLink
@@ -211,12 +212,13 @@ const sortedOptionalDependencies = computed(() => {
211212
{{ $t('package.dependencies.optional') }}
212213
</span>
213214
</div>
215+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
214216
<NuxtLink
215217
:to="{
216218
name: 'package',
217219
params: { package: [...peer.name.split('/'), 'v', peer.version] },
218220
}"
219-
class="font-mono text-xs text-fg-subtle max-w-[40%] text-right truncate"
221+
class="font-mono text-xs text-fg-subtle max-w-[40%] text-end truncate"
220222
:title="peer.version"
221223
>
222224
{{ peer.version }}
@@ -252,7 +254,7 @@ const sortedOptionalDependencies = computed(() => {
252254
$t('package.optional_dependencies.title', { count: sortedOptionalDependencies.length })
253255
}}
254256
<span
255-
class="i-carbon-link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
257+
class="i-carbon:link w-3 h-3 block opacity-0 group-hover:opacity-100 transition-opacity duration-200"
256258
aria-hidden="true"
257259
/>
258260
</a>
@@ -267,17 +269,18 @@ const sortedOptionalDependencies = computed(() => {
267269
optionalDepsExpanded ? undefined : 10,
268270
)"
269271
:key="dep"
270-
class="flex items-center justify-between py-1 text-sm gap-2"
272+
class="flex items-center justify-start py-1 text-sm gap-2"
271273
>
272274
<NuxtLink
273275
:to="{ name: 'package', params: { package: dep.split('/') } }"
274276
class="font-mono text-fg-muted hover:text-fg transition-colors duration-200 truncate min-w-0"
275277
>
276278
{{ dep }}
277279
</NuxtLink>
280+
<span aria-hidden="true" class="flex-shrink-1 flex-grow-1" />
278281
<NuxtLink
279282
:to="{ name: 'package', params: { package: [...dep.split('/'), 'v', version] } }"
280-
class="font-mono text-xs text-fg-subtle max-w-[50%] text-right truncate"
283+
class="font-mono text-xs text-fg-subtle max-w-[50%] text-end truncate"
281284
:title="version"
282285
>
283286
{{ version }}

0 commit comments

Comments
 (0)