diff --git a/app/components/Button/Base.vue b/app/components/Button/Base.vue
index 11f220148..4c5b8951c 100644
--- a/app/components/Button/Base.vue
+++ b/app/components/Button/Base.vue
@@ -18,6 +18,8 @@ const props = withDefaults(
)
const el = useTemplateRef('el')
+const slots = useSlots()
+const iconOnly = computed(() => !!props.classicon && !slots.default)
defineExpose({
focus: () => el.value?.focus(),
@@ -32,8 +34,14 @@ defineExpose({
:class="{
'inline-flex': !block,
'flex': block,
- 'text-sm px-4 py-2': size === 'medium',
- 'text-xs px-2 py-0.5': size === 'small',
+ 'text-sm py-2': size === 'medium' && !iconOnly,
+ 'text-sm p-2': size === 'medium' && !!iconOnly,
+ 'px-4': size === 'medium' && !classicon && !iconOnly,
+ 'ps-3 pe-4': size === 'medium' && !!classicon && !iconOnly,
+ 'text-xs py-0.5': size === 'small' && !iconOnly,
+ 'text-xs p-0.5': size === 'small' && !!iconOnly,
+ 'px-2': size === 'small' && !classicon && !iconOnly,
+ 'ps-1.5 pe-2': size === 'small' && !!classicon && !iconOnly,
'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))':
variant === 'secondary',
'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))':
diff --git a/app/components/Link/Base.vue b/app/components/Link/Base.vue
index 1dffa3db3..2de9fd25f 100644
--- a/app/components/Link/Base.vue
+++ b/app/components/Link/Base.vue
@@ -55,6 +55,8 @@ const isLink = computed(() => props.variant === 'link')
const isButton = computed(() => !isLink.value)
const isButtonSmall = computed(() => props.size === 'small' && !isLink.value)
const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
+const slots = useSlots()
+const iconOnly = computed(() => !!props.classicon && !slots.default)
@@ -65,8 +67,14 @@ const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
'inline-flex': !block,
'opacity-50 gap-x-1 items-center justify-center font-mono border border-transparent rounded-md':
isButton,
- 'text-sm px-4 py-2': isButtonMedium,
- 'text-xs px-2 py-0.5': isButtonSmall,
+ 'text-sm py-2': isButtonMedium && !iconOnly,
+ 'text-sm p-2': isButtonMedium && !!iconOnly,
+ 'px-4': isButtonMedium && !classicon && !iconOnly,
+ 'ps-3 pe-4': isButtonMedium && !!classicon && !iconOnly,
+ 'text-xs py-0.5': isButtonSmall && !iconOnly,
+ 'text-xs p-0.5': isButtonSmall && !!iconOnly,
+ 'px-2': isButtonSmall && !classicon && !iconOnly,
+ 'ps-1.5 pe-2': isButtonSmall && !!classicon && !iconOnly,
'text-bg bg-fg': variant === 'button-primary',
'bg-transparent text-fg': variant === 'button-secondary',
}"
@@ -85,8 +93,14 @@ const isButtonMedium = computed(() => props.size === 'medium' && !isLink.value)
isLink,
'justify-center font-mono border border-border rounded-md transition-all duration-200':
isButton,
- 'text-sm px-4 py-2': isButtonMedium,
- 'text-xs px-2 py-0.5': isButtonSmall,
+ 'text-sm py-2': isButtonMedium && !iconOnly,
+ 'text-sm p-2': isButtonMedium && iconOnly,
+ 'px-4': isButtonMedium && !classicon && !iconOnly,
+ 'ps-3 pe-4': isButtonMedium && !!classicon && !iconOnly,
+ 'text-xs py-0.5': isButtonSmall && !iconOnly,
+ 'text-xs p-0.5': isButtonSmall && iconOnly,
+ 'px-2': isButtonSmall && !classicon && !iconOnly,
+ 'ps-1.5 pe-2': isButtonSmall && !!classicon && !iconOnly,
'bg-transparent text-fg hover:(bg-fg/10 text-accent) focus-visible:(bg-fg/10 text-accent) aria-[current=true]:(bg-fg/10 text-accent border-fg/20 hover:enabled:(bg-fg/20 text-fg/50))':
variant === 'button-secondary',
'text-bg bg-fg hover:(bg-fg/50 text-accent) focus-visible:(bg-fg/50) aria-current:(bg-fg text-bg border-fg hover:enabled:(text-bg/50))':
diff --git a/app/components/Package/Dependencies.vue b/app/components/Package/Dependencies.vue
index 2e518f9a1..7f9978782 100644
--- a/app/components/Package/Dependencies.vue
+++ b/app/components/Package/Dependencies.vue
@@ -150,20 +150,18 @@ const numberFormatter = useNumberFormatter()
:to="packageRoute(dep, getVulnerableDepInfo(dep)!.version)"
class="shrink-0"
:class="SEVERITY_TEXT_COLORS[getHighestSeverity(getVulnerableDepInfo(dep)!.counts)]"
+ :aria-label="$t('package.dependencies.view_vulnerabilities')"
:title="`${getVulnerableDepInfo(dep)!.counts.total} vulnerabilities`"
classicon="i-lucide:shield-check"
- >
- {{ $t('package.dependencies.view_vulnerabilities') }}
-
+ />