Skip to content

Commit 95278b9

Browse files
authored
Merge branch 'main' into serhalp/security-audit
2 parents de9d588 + 7f2fc1a commit 95278b9

File tree

99 files changed

+1408
-479
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1408
-479
lines changed

app/components/BackButton.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<script setup lang="ts">
2+
const router = useRouter()
3+
const canGoBack = useCanGoBack()
4+
</script>
5+
6+
<template>
7+
<button
8+
v-if="canGoBack"
9+
type="button"
10+
class="inline-flex items-center gap-2 p-1.5 -mx-1.5 font-mono text-sm text-fg-muted hover:text-fg transition-colors duration-200 rounded focus-visible:outline-accent/70 shrink-0"
11+
@click="router.back()"
12+
>
13+
<span class="i-lucide:arrow-left rtl-flip w-4 h-4" aria-hidden="true" />
14+
<span class="sr-only sm:not-sr-only">{{ $t('nav.back') }}</span>
15+
</button>
16+
</template>

app/components/Button/Base.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const props = withDefaults(
1515
type?: 'button' | 'submit'
1616
/** @default "secondary" */
1717
variant?: 'primary' | 'secondary'
18-
/** @default "medium" */
19-
size?: 'small' | 'medium'
18+
/** @default "md" */
19+
size?: 'sm' | 'md'
2020
/** Keyboard shortcut hint */
2121
ariaKeyshortcuts?: string
2222
/** Forces the button to occupy the entire width of its container. */
@@ -27,7 +27,7 @@ const props = withDefaults(
2727
{
2828
type: 'button',
2929
variant: 'secondary',
30-
size: 'medium',
30+
size: 'md',
3131
},
3232
)
3333
@@ -48,8 +48,8 @@ defineExpose({
4848
:class="{
4949
'inline-flex': !block,
5050
'flex': block,
51-
'text-sm px-4 py-2': size === 'medium',
52-
'text-xs px-2 py-0.5': size === 'small',
51+
'text-sm px-4 py-2': size === 'md',
52+
'text-xs px-2 py-0.5': size === 'sm',
5353
'bg-transparent text-fg hover:enabled:(bg-fg/10) focus-visible:enabled:(bg-fg/10) aria-pressed:(bg-fg/10 border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
5454
variant === 'secondary',
5555
'text-bg bg-fg hover:enabled:(bg-fg/50) focus-visible:enabled:(bg-fg/50) aria-pressed:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':

app/components/Button/ButtonBase.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const Secondary: Story = {
5252

5353
export const Small: Story = {
5454
args: {
55-
size: 'small',
55+
size: 'sm',
5656
},
5757
render: args => ({
5858
components: { ButtonBase },

app/components/Compare/FacetSelector.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function isCategoryNoneSelected(category: string): boolean {
4040
:aria-pressed="isCategoryAllSelected(category)"
4141
:disabled="isCategoryAllSelected(category)"
4242
@click="selectCategory(category)"
43-
size="small"
43+
size="sm"
4444
>
4545
{{ $t('compare.facets.all') }}
4646
</ButtonBase>
@@ -52,7 +52,7 @@ function isCategoryNoneSelected(category: string): boolean {
5252
:aria-pressed="isCategoryNoneSelected(category)"
5353
:disabled="isCategoryNoneSelected(category)"
5454
@click="deselectCategory(category)"
55-
size="small"
55+
size="sm"
5656
>
5757
{{ $t('compare.facets.none') }}
5858
</ButtonBase>
@@ -64,7 +64,7 @@ function isCategoryNoneSelected(category: string): boolean {
6464
<ButtonBase
6565
v-for="facet in facetsByCategory[category]"
6666
:key="facet.id"
67-
size="small"
67+
size="sm"
6868
:title="facet.comingSoon ? $t('compare.facets.coming_soon') : facet.description"
6969
:disabled="facet.comingSoon"
7070
:aria-pressed="isFacetSelected(facet.id)"

app/components/Compare/PackageSelector.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ onClickOutside(containerRef, () => {
213213
{{ pkg }}
214214
</LinkBase>
215215
<ButtonBase
216-
size="small"
216+
size="sm"
217217
:aria-label="
218218
$t('compare.selector.remove_package', {
219219
package: pkg === NO_DEPENDENCY_ID ? $t('compare.no_dependency.label') : pkg,
@@ -246,7 +246,6 @@ onClickOutside(containerRef, () => {
246246
: $t('compare.selector.search_add')
247247
"
248248
no-correct
249-
size="medium"
250249
class="w-full min-w-25 ps-7"
251250
aria-autocomplete="list"
252251
ref="inputRef"

app/components/Compare/ReplacementSuggestion.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ const docUrl = computed(() => {
6565
<!-- No dependency action button -->
6666
<ButtonBase
6767
v-if="variant === 'nodep' && showAction !== false"
68-
size="small"
68+
size="sm"
6969
:aria-label="$t('compare.no_dependency.add_column')"
7070
@click="emit('addNoDep')"
7171
>
7272
{{ $t('package.replacement.consider_no_dep') }}
7373
</ButtonBase>
7474

7575
<!-- Info link -->
76-
<LinkBase v-else-if="docUrl" :to="docUrl" variant="button-secondary" size="small">
76+
<LinkBase v-else-if="docUrl" :to="docUrl" variant="button-secondary" size="sm">
7777
{{ $t('package.replacement.learn_more') }}
7878
</LinkBase>
7979
</div>
File renamed without changes.

0 commit comments

Comments
 (0)