Skip to content

fix(icons): use correct loader icon #4163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: v3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const items = [
</template>

<template #refresh-trailing>
<UIcon v-if="loading" name="i-lucide-refresh-cw" class="shrink-0 size-5 text-primary animate-spin" />
<UIcon v-if="loading" name="i-lucide-loader-circle" class="shrink-0 size-5 text-primary animate-spin" />
</template>
</UContextMenu>
</template>
2 changes: 1 addition & 1 deletion docs/content/1.getting-started/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ pnpm run test:vue # for Vue
```

::tip
If you have to update the snapshots, press `u` when running the tests.
If you have to update the snapshots, press `u` after the tests have finished running.
::

### Commit Conventions
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/button.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,13 @@ This also works with the [Form](/components/form) component.

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
props:
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
slots:
default: Button
---
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/command-palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
Expand All @@ -295,7 +295,7 @@ class: '!p-0'
props:
autofocus: false
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
groups:
- id: 'apps'
items:
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/input-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
Expand All @@ -532,7 +532,7 @@ external:
props:
modelValue: 'Backlog'
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
items:
- Backlog
- Todo
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
ignore:
- placeholder
props:
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
placeholder: 'Search...'
---
::
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/select-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
Expand All @@ -570,7 +570,7 @@ external:
props:
modelValue: 'Backlog'
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
items:
- Backlog
- Todo
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
Expand All @@ -522,7 +522,7 @@ external:
props:
modelValue: 'Backlog'
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
items:
- Backlog
- Todo
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/switch.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ props:

### Loading Icon

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
Expand All @@ -118,7 +118,7 @@ ignore:
- defaultValue
props:
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
defaultValue: true
label: Check me
---
Expand Down
4 changes: 2 additions & 2 deletions docs/content/3.components/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,15 @@ props:

### Loading Icon :badge{label="New" class="align-text-top"}

Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-refresh-cw`.
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.

::component-code
---
ignore:
- placeholder
props:
loading: true
loadingIcon: 'i-lucide-repeat-2'
loadingIcon: 'i-lucide-loader-circle'
placeholder: 'Search...'
rows: 1
---
Expand Down
2 changes: 1 addition & 1 deletion src/theme/icons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
external: 'i-lucide-arrow-up-right',
folder: 'i-lucide-folder',
folderOpen: 'i-lucide-folder-open',
loading: 'i-lucide-refresh-cw',
loading: 'i-lucide-loader-circle',
minus: 'i-lucide-minus',
plus: 'i-lucide-plus',
search: 'i-lucide-search'
Expand Down
4 changes: 2 additions & 2 deletions test/components/Button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ describe('Button', () => {
const icon = wrapper.findComponent({ name: 'Icon' })

expect(icon.classes()).toContain('animate-spin')
expect(icon?.vm?.name).toBe('i-lucide-refresh-cw')
expect(icon?.vm?.name).toBe('i-lucide-loader-circle')

resolve?.(null)
})
Expand Down Expand Up @@ -106,7 +106,7 @@ describe('Button', () => {
const icon = wrapper.findComponent({ name: 'Icon' })

expect(icon.classes()).toContain('animate-spin')
expect(icon?.vm?.name).toBe('i-lucide-refresh-cw')
expect(icon?.vm?.name).toBe('i-lucide-loader-circle')

resolve?.(null)
})
Expand Down
8 changes: 4 additions & 4 deletions test/components/__snapshots__/Button.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,29 @@ exports[`Button > renders with leadingIcon correctly 1`] = `
`;

exports[`Button > renders with loading and avatar correctly 1`] = `
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5"><span class="iconify i-lucide:refresh-cw shrink-0 size-5 animate-spin" aria-hidden="true"></span>
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5"><span class="iconify i-lucide:loader-circle shrink-0 size-5 animate-spin" aria-hidden="true"></span>
<!--v-if-->
<!--v-if-->
</button>"
`;

exports[`Button > renders with loading correctly 1`] = `
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5"><span class="iconify i-lucide:refresh-cw shrink-0 size-5 animate-spin" aria-hidden="true"></span>
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5"><span class="iconify i-lucide:loader-circle shrink-0 size-5 animate-spin" aria-hidden="true"></span>
<!--v-if-->
<!--v-if-->
</button>"
`;

exports[`Button > renders with loading trailing and avatar correctly 1`] = `
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-elevated size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" width="20" height="20" class="h-full w-full rounded-[inherit] object-cover"></span>
<!--v-if--><span class="iconify i-lucide:refresh-cw shrink-0 size-5 animate-spin" aria-hidden="true"></span>
<!--v-if--><span class="iconify i-lucide:loader-circle shrink-0 size-5 animate-spin" aria-hidden="true"></span>
</button>"
`;

exports[`Button > renders with loading trailing correctly 1`] = `
"<button type="button" disabled="" class="rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75 transition-colors text-sm gap-1.5 text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary p-1.5">
<!--v-if-->
<!--v-if--><span class="iconify i-lucide:refresh-cw shrink-0 size-5 animate-spin" aria-hidden="true"></span>
<!--v-if--><span class="iconify i-lucide:loader-circle shrink-0 size-5 animate-spin" aria-hidden="true"></span>
</button>"
`;

Expand Down
2 changes: 1 addition & 1 deletion test/components/__snapshots__/CommandPalette.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ exports[`CommandPalette > renders with labelKey correctly 1`] = `

exports[`CommandPalette > renders with loading correctly 1`] = `
"<div dir="ltr" class="flex flex-col min-h-0 min-w-0 divide-y divide-default">
<div class="relative inline-flex items-center [&amp;>input]:h-12"><input type="text" placeholder="Type a command or search..." class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-transparent ps-9" autocomplete="off" aria-disabled="false" value="" aria-activedescendant="reka-listbox-item-v-0-0-1"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:refresh-cw shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
<div class="relative inline-flex items-center [&amp;>input]:h-12"><input type="text" placeholder="Type a command or search..." class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-transparent ps-9" autocomplete="off" aria-disabled="false" value="" aria-activedescendant="reka-listbox-item-v-0-0-1"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:loader-circle shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
<!--v-if-->
</div>
<div role="listbox" aria-orientation="vertical" aria-multiselectable="false" data-orientation="vertical" class="relative overflow-hidden flex flex-col">
Expand Down
8 changes: 4 additions & 4 deletions test/components/__snapshots__/Input.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,22 @@ exports[`Input > renders with leadingIcon correctly 1`] = `
`;

exports[`Input > renders with loading and avatar correctly 1`] = `
"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:refresh-cw shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:loader-circle shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
<!--v-if-->
</div>"
`;

exports[`Input > renders with loading correctly 1`] = `
"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:refresh-cw shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="iconify i-lucide:loader-circle shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
<!--v-if-->
</div>"
`;

exports[`Input > renders with loading trailing and avatar correctly 1`] = `"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9 pe-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-elevated size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" width="20" height="20" class="h-full w-full rounded-[inherit] object-cover"></span></span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="iconify i-lucide:refresh-cw shrink-0 text-dimmed size-5" aria-hidden="true"></span></span></div>"`;
exports[`Input > renders with loading trailing and avatar correctly 1`] = `"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary ps-9 pe-9" autocomplete="off"><span class="absolute inset-y-0 start-0 flex items-center ps-2.5"><span class="inline-flex items-center justify-center select-none overflow-hidden rounded-full align-middle bg-elevated size-5 text-[10px] shrink-0"><img role="img" src="https://github.com/benjamincanac.png" width="20" height="20" class="h-full w-full rounded-[inherit] object-cover"></span></span><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="iconify i-lucide:loader-circle shrink-0 text-dimmed size-5" aria-hidden="true"></span></span></div>"`;

exports[`Input > renders with loading trailing correctly 1`] = `
"<div class="relative inline-flex items-center"><input type="text" class="w-full rounded-md border-0 placeholder:text-dimmed focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 transition-colors px-2.5 py-1.5 text-sm gap-1.5 text-highlighted bg-default ring ring-inset ring-accented focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary pe-9" autocomplete="off">
<!--v-if--><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="iconify i-lucide:refresh-cw shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
<!--v-if--><span class="absolute inset-y-0 end-0 flex items-center pe-2.5"><span class="iconify i-lucide:loader-circle shrink-0 text-dimmed size-5 animate-spin" aria-hidden="true"></span></span>
</div>"
`;

Expand Down
Loading