Skip to content

Commit b9b2a39

Browse files
authored
Merge branch 'main' into fix-lunaria-html-report
2 parents 7177506 + 9fbdb32 commit b9b2a39

File tree

135 files changed

+3111
-535
lines changed

Some content is hidden

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

135 files changed

+3111
-535
lines changed

CONTRIBUTING.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This focus helps guide our project decisions as a community and what we choose t
4141
- [Naming conventions](#naming-conventions)
4242
- [Vue components](#vue-components)
4343
- [Internal linking](#internal-linking)
44+
- [Cursor and navigation](#cursor-and-navigation)
4445
- [RTL Support](#rtl-support)
4546
- [Localization (i18n)](#localization-i18n)
4647
- [Approach](#approach)
@@ -392,6 +393,18 @@ For package links, use the auto-imported `packageRoute()` utility from `app/util
392393
| `~username` | `/~:username` | `username` |
393394
| `~username-orgs` | `/~:username/orgs` | `username` |
394395

396+
### Cursor and navigation
397+
398+
**npmx** uses `cursor: pointer` only for links to match users’ everyday experience. For all other interactive elements, including buttons, use the default cursor (_or another appropriate cursor to indicate state_).
399+
400+
> [!NOTE]
401+
> A link is any element that leads to another content (_go to another page, authorize_)
402+
> A button is any element that operates an action (_show tooltip, open menu, "like" package, open dropdown_)
403+
> If you're unsure which element to use - feel free to ask question in the issue or on discord
404+
405+
> [!IMPORTANT]
406+
> Always Prefer implementing navigation as real links whenever possible. This ensures they can be opened in a new tab, shared or reloaded, and so the same content is available at a stable URL
407+
395408
## RTL Support
396409

397410
We support `right-to-left` languages, we need to make sure that the UI is working correctly in both directions.

app/components/AppHeader.vue

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const desktopLinks = computed<NavigationConfig>(() => [
2323
keyshortcut: 'c',
2424
type: 'link',
2525
external: false,
26-
iconClass: 'i-carbon:compare',
26+
iconClass: 'i-lucide:git-compare',
2727
},
2828
{
2929
name: 'Settings',
@@ -32,7 +32,7 @@ const desktopLinks = computed<NavigationConfig>(() => [
3232
keyshortcut: ',',
3333
type: 'link',
3434
external: false,
35-
iconClass: 'i-carbon:settings',
35+
iconClass: 'i-lucide:settings',
3636
},
3737
])
3838
@@ -55,23 +55,23 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
5555
to: { name: 'about' },
5656
type: 'link',
5757
external: false,
58-
iconClass: 'i-carbon:information',
58+
iconClass: 'i-lucide:info',
5959
},
6060
{
6161
name: 'Privacy Policy',
6262
label: $t('privacy_policy.title'),
6363
to: { name: 'privacy' },
6464
type: 'link',
6565
external: false,
66-
iconClass: 'i-carbon:security',
66+
iconClass: 'i-lucide:shield-check',
6767
},
6868
{
6969
name: 'Accessibility',
7070
label: $t('a11y.title'),
7171
to: { name: 'accessibility' },
7272
type: 'link',
7373
external: false,
74-
iconClass: 'i-carbon:accessibility-alt',
74+
iconClass: 'i-custom:a11y',
7575
},
7676
{
7777
name: 'Translation Status',
@@ -98,7 +98,7 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
9898
target: '_blank',
9999
type: 'link',
100100
external: true,
101-
iconClass: 'i-carbon:document',
101+
iconClass: 'i-lucide:file-text',
102102
},
103103
{
104104
name: 'Source',
@@ -107,7 +107,7 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
107107
target: '_blank',
108108
type: 'link',
109109
external: true,
110-
iconClass: 'i-carbon:logo-github',
110+
iconClass: 'i-simple-icons:github',
111111
},
112112
{
113113
name: 'Social',
@@ -116,7 +116,7 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
116116
target: '_blank',
117117
type: 'link',
118118
external: true,
119-
iconClass: 'i-carbon:logo-bluesky',
119+
iconClass: 'i-simple-icons:bluesky',
120120
},
121121
{
122122
name: 'Chat',
@@ -125,7 +125,7 @@ const mobileLinks = computed<NavigationConfigWithGroups>(() => [
125125
target: '_blank',
126126
type: 'link',
127127
external: true,
128-
iconClass: 'i-carbon:chat',
128+
iconClass: 'i-lucide:message-circle',
129129
},
130130
],
131131
},
@@ -296,7 +296,7 @@ onKeyStroke(
296296
:aria-expanded="showMobileMenu"
297297
@click="expandMobileSearch"
298298
v-if="!isSearchExpanded && !isOnHomePage"
299-
classicon="i-carbon:search"
299+
classicon="i-lucide:search"
300300
/>
301301

302302
<!-- Mobile: Menu button (always visible, click to open menu) -->
@@ -306,7 +306,7 @@ onKeyStroke(
306306
:aria-label="$t('nav.open_menu')"
307307
:aria-expanded="showMobileMenu"
308308
@click="showMobileMenu = !showMobileMenu"
309-
classicon="i-carbon:menu"
309+
classicon="i-lucide:menu"
310310
/>
311311
</nav>
312312

app/components/BlueskyPostEmbed.client.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const { data: post, status } = useAsyncData(
8383
<div class="text-sm text-fg-subtle truncate">@{{ post.author.handle }}</div>
8484
</div>
8585
<span
86-
class="i-carbon:logo-bluesky w-5 h-5 text-fg-subtle ms-auto shrink-0"
86+
class="i-simple-icons:bluesky w-5 h-5 text-fg-subtle ms-auto shrink-0"
8787
aria-hidden="true"
8888
/>
8989
</div>
@@ -112,15 +112,15 @@ const { data: post, status } = useAsyncData(
112112
<div class="flex items-center gap-4 text-sm text-fg-subtle">
113113
<DateTime :datetime="post.record.createdAt" date-style="medium" />
114114
<span v-if="post.likeCount" class="flex items-center gap-1">
115-
<span class="i-carbon:favorite w-3.5 h-3.5" aria-hidden="true" />
115+
<span class="i-lucide:heart w-3.5 h-3.5" aria-hidden="true" />
116116
{{ post.likeCount }}
117117
</span>
118118
<span v-if="post.repostCount" class="flex items-center gap-1">
119-
<span class="i-carbon:repeat w-3.5 h-3.5" aria-hidden="true" />
119+
<span class="i-lucide:repeat w-3.5 h-3.5" aria-hidden="true" />
120120
{{ post.repostCount }}
121121
</span>
122122
<span v-if="post.replyCount" class="flex items-center gap-1">
123-
<span class="i-carbon:chat w-3.5 h-3.5" aria-hidden="true" />
123+
<span class="i-lucide:message-circle w-3.5 h-3.5" aria-hidden="true" />
124124
{{ post.replyCount }}
125125
</span>
126126
</div>

app/components/Button/Base.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defineExpose({
2828
<template>
2929
<button
3030
ref="el"
31-
class="group cursor-pointer gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
31+
class="group gap-x-1 items-center justify-center font-mono border border-border rounded-md transition-all duration-200 disabled:(opacity-40 cursor-not-allowed border-transparent)"
3232
:class="{
3333
'inline-flex': !block,
3434
'flex': block,

app/components/CallToAction.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ const socialLinks = computed(() => [
33
{
44
id: 'github',
55
href: 'https://repo.npmx.dev',
6-
icon: 'i-carbon:logo-github',
6+
icon: 'i-simple-icons:github',
77
titleKey: $t('about.get_involved.contribute.title'),
88
descriptionKey: $t('about.get_involved.contribute.description'),
99
ctaKey: $t('about.get_involved.contribute.cta'),
1010
},
1111
{
1212
id: 'discord',
1313
href: 'https://chat.npmx.dev',
14-
icon: 'i-carbon:chat',
14+
icon: 'i-lucide:message-circle',
1515
titleKey: $t('about.get_involved.community.title'),
1616
descriptionKey: $t('about.get_involved.community.description'),
1717
ctaKey: $t('about.get_involved.community.cta'),
1818
},
1919
{
2020
id: 'bluesky',
2121
href: 'https://social.npmx.dev',
22-
icon: 'i-carbon:logo-bluesky',
22+
icon: 'i-simple-icons:bluesky',
2323
titleKey: $t('about.get_involved.follow.title'),
2424
descriptionKey: $t('about.get_involved.follow.description'),
2525
ctaKey: $t('about.get_involved.follow.cta'),
@@ -55,7 +55,7 @@ const socialLinks = computed(() => [
5555
class="text-sm text-fg-muted group-hover:text-fg inline-flex items-center gap-1 mt-auto focus-visible:outline-none"
5656
>
5757
{{ link.ctaKey }}
58-
<span class="i-carbon:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
58+
<span class="i-lucide:arrow-right rtl-flip w-3 h-3" aria-hidden="true" />
5959
<span class="absolute z-0 inset-0" aria-hidden="true" />
6060
</a>
6161
</div>

app/components/Code/FileTree.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ watch(
5959
:aria-pressed="isNodeActive(node)"
6060
:style="{ paddingLeft: `${depth * 12 + 12}px` }"
6161
@click="toggleDir(node.path)"
62-
:classicon="isExpanded(node.path) ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right'"
62+
:classicon="isExpanded(node.path) ? 'i-lucide:chevron-down' : 'i-lucide:chevron-right'"
6363
>
6464
<svg
6565
class="size-[1em] me-1 shrink-0"

app/components/Code/MobileTreeDrawer.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ watch(isOpen, open => (isLocked.value = open))
3232
class="md:hidden fixed bottom-4 inset-ie-4 z-45"
3333
:aria-label="$t('code.toggle_tree')"
3434
@click="isOpen = !isOpen"
35-
:classicon="isOpen ? 'i-carbon:close' : 'i-carbon:folder'"
35+
:classicon="isOpen ? 'i-lucide:x' : 'i-lucide:folder'"
3636
/>
3737

3838
<!-- Backdrop -->
@@ -68,7 +68,7 @@ watch(isOpen, open => (isLocked.value = open))
6868
<ButtonBase
6969
:aria-label="$t('code.close_tree')"
7070
@click="isOpen = false"
71-
classicon="i-carbon-close"
71+
classicon="i-lucide:x"
7272
/>
7373
</div>
7474
<CodeFileTree

app/components/CollapsibleSection.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,11 @@ useHead({
9292
:aria-label="ariaLabel"
9393
@click="toggle"
9494
>
95-
<span
96-
v-if="isLoading"
97-
class="i-carbon:rotate-180 w-3 h-3 motion-safe:animate-spin"
98-
aria-hidden="true"
99-
/>
95+
<span v-if="isLoading" class="i-svg-spinners:ring-resize w-3 h-3" aria-hidden="true" />
10096
<span
10197
v-else
10298
class="w-3 h-3 transition-transform duration-200"
103-
:class="isOpen ? 'i-carbon:chevron-down' : 'i-carbon:chevron-right'"
99+
:class="isOpen ? 'i-lucide:chevron-down' : 'i-lucide:chevron-right'"
104100
aria-hidden="true"
105101
/>
106102
</button>

app/components/ColumnPicker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function handleReset() {
7575
aria-haspopup="true"
7676
:aria-controls="menuId"
7777
@click.stop="isOpen = !isOpen"
78-
classicon="i-carbon-column"
78+
classicon="i-lucide:columns-3-cog"
7979
>
8080
{{ $t('filters.columns.title') }}
8181
</ButtonBase>

app/components/Compare/ComparisonGrid.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function getReplacementTooltip(col: ComparisonGridColumn): string {
5050
</LinkBase>
5151
<TooltipApp v-if="col.replacement" :text="getReplacementTooltip(col)" position="bottom">
5252
<span
53-
class="i-carbon:idea w-3.5 h-3.5 text-amber-500 shrink-0 cursor-help"
53+
class="i-lucide:lightbulb w-3.5 h-3.5 text-amber-500 shrink-0 cursor-help"
5454
role="img"
5555
:aria-label="$t('package.replacement.title')"
5656
/>
@@ -69,7 +69,7 @@ function getReplacementTooltip(col: ComparisonGridColumn): string {
6969
{{ $t('compare.no_dependency.label') }}
7070
<TooltipApp interactive position="bottom">
7171
<span
72-
class="i-carbon:idea w-3.5 h-3.5 text-amber-500 shrink-0 cursor-help"
72+
class="i-lucide:lightbulb w-3.5 h-3.5 text-amber-500 shrink-0 cursor-help"
7373
role="img"
7474
:aria-label="$t('compare.no_dependency.tooltip_title')"
7575
/>

0 commit comments

Comments
 (0)