Update dependencies and replace radix-icons-svelte with lucide-svelte

This commit is contained in:
Bart van der Braak 2024-04-22 02:46:04 +02:00
parent 9b0fa288ee
commit eb404980b3
26 changed files with 62 additions and 53 deletions

View file

@ -1,8 +1,10 @@
import type { Icon as LucideIcon } from 'lucide-svelte';
import { ArrowRight, Loader2 } from 'lucide-svelte';
import { GithubLogo, VercelLogo, LinkedinLogo } from 'radix-icons-svelte';
import Logo from './logo.svelte';
import Svelte from './svelte.svelte';
import GitHubLogo from './github.svelte';
import VercelLogo from './vercel.svelte';
import LinkedInLogo from './linkedin.svelte';
import MicrosoftLogo from './microsoft.svelte';
import AppleLogo from './apple.svelte';
import GitLabLogo from './gitlab.svelte';
@ -17,11 +19,11 @@ export type Icon = LucideIcon;
export const Icons = {
logo: Logo,
gitHub: GithubLogo,
gitHub: GitHubLogo,
microsoft: MicrosoftLogo,
svelte: Svelte,
vercel: VercelLogo,
linkedIn: LinkedinLogo,
linkedIn: LinkedInLogo,
spinner: Loader2,
arrowRight: ArrowRight,
apple: AppleLogo,

View file

@ -0,0 +1,14 @@
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$restProps}
><path
d="M2 1C1.44772 1 1 1.44772 1 2V13C1 13.5523 1.44772 14 2 14H13C13.5523 14 14 13.5523 14 13V2C14 1.44772 13.5523 1 13 1H2ZM3.05 6H4.95V12H3.05V6ZM5.075 4.005C5.075 4.59871 4.59371 5.08 4 5.08C3.4063 5.08 2.925 4.59871 2.925 4.005C2.925 3.41129 3.4063 2.93 4 2.93C4.59371 2.93 5.075 3.41129 5.075 4.005ZM12 8.35713C12 6.55208 10.8334 5.85033 9.67449 5.85033C9.29502 5.83163 8.91721 5.91119 8.57874 6.08107C8.32172 6.21007 8.05265 6.50523 7.84516 7.01853H7.79179V6.00044H6V12.0047H7.90616V8.8112C7.8786 8.48413 7.98327 8.06142 8.19741 7.80987C8.41156 7.55832 8.71789 7.49825 8.95015 7.46774H9.02258C9.62874 7.46774 10.0786 7.84301 10.0786 8.78868V12.0047H11.9847L12 8.35713Z"
fill="currentColor"
fill-rule="evenodd"
clip-rule="evenodd"
></path></svg
>

After

Width:  |  Height:  |  Size: 885 B

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { Calendar as CalendarPrimitive } from 'bits-ui';
import { ChevronRight } from 'radix-icons-svelte';
import { ChevronRight } from 'lucide-svelte';
import { buttonVariants } from '$lib/components/ui/button';
import { cn } from '$lib/utils';

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { Calendar as CalendarPrimitive } from 'bits-ui';
import { ChevronLeft } from 'radix-icons-svelte';
import { ChevronLeft } from 'lucide-svelte';
import { buttonVariants } from '$lib/components/ui/button';
import { cn } from '$lib/utils';

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { Checkbox as CheckboxPrimitive } from 'bits-ui';
import { Check, Minus } from 'radix-icons-svelte';
import { Check, Minus } from 'lucide-svelte';
import { cn } from '$lib/utils';
type $$Props = CheckboxPrimitive.Props;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { Command as CommandPrimitive } from 'cmdk-sv';
import { MagnifyingGlass } from 'radix-icons-svelte';
import { Search } from 'lucide-svelte';
import { cn } from '$lib/utils';
type $$Props = CommandPrimitive.InputProps;
@ -11,7 +11,7 @@
</script>
<div class="flex items-center border-b px-3" data-cmdk-input-wrapper="">
<MagnifyingGlass class="mr-2 h-4 w-4 shrink-0 opacity-50" />
<Search class="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
class={cn(
'flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50',

View file

@ -2,7 +2,7 @@
import { Dialog as DialogPrimitive } from 'bits-ui';
import * as Dialog from '.';
import { cn, flyAndScale } from '$lib/utils';
import { Cross2 } from 'radix-icons-svelte';
import { X } from 'lucide-svelte';
type $$Props = DialogPrimitive.ContentProps;
@ -29,7 +29,7 @@
<DialogPrimitive.Close
class="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground"
>
<Cross2 class="h-4 w-4" />
<X class="h-4 w-4" />
<span class="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import { cn } from '$lib/utils';
import { Check } from 'radix-icons-svelte';
import { Check } from 'lucide-svelte';
type $$Props = DropdownMenuPrimitive.CheckboxItemProps;
type $$Events = DropdownMenuPrimitive.CheckboxItemEvents;

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import { cn } from '$lib/utils';
import { DotFilled } from 'radix-icons-svelte';
import { Dot } from 'lucide-svelte';
type $$Props = DropdownMenuPrimitive.RadioItemProps;
type $$Events = DropdownMenuPrimitive.RadioItemEvents;
@ -28,7 +28,7 @@
>
<span class="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
<DropdownMenuPrimitive.RadioIndicator>
<DotFilled class="h-4 w-4 fill-current" />
<Dot class="h-4 w-4 fill-current" />
</DropdownMenuPrimitive.RadioIndicator>
</span>
<slot />

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { DropdownMenu as DropdownMenuPrimitive } from 'bits-ui';
import { cn } from '$lib/utils';
import { ChevronRight } from 'radix-icons-svelte';
import { ChevronRight } from 'lucide-svelte';
type $$Props = DropdownMenuPrimitive.SubTriggerProps & {
inset?: boolean;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { RadioGroup as RadioGroupPrimitive } from 'bits-ui';
import { Check } from 'radix-icons-svelte';
import { Check } from 'lucide-svelte';
import { cn } from '$lib/utils';
type $$Props = RadioGroupPrimitive.ItemProps & {

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { cn } from '$lib/utils';
import { Select as SelectPrimitive } from 'bits-ui';
import { Check } from 'radix-icons-svelte';
import { Check } from 'lucide-svelte';
type $$Props = SelectPrimitive.ItemProps;
type $$Events = Required<SelectPrimitive.ItemEvents>;

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { Select as SelectPrimitive } from 'bits-ui';
import { CaretSort } from 'radix-icons-svelte';
import { ArrowUpDown } from 'lucide-svelte';
import { cn } from '$lib/utils';
type $$Props = SelectPrimitive.TriggerProps;
@ -18,5 +18,5 @@
{...$$restProps}
>
<slot />
<CaretSort class="h-4 w-4 opacity-50" />
<ArrowUpDown class="h-4 w-4 opacity-50" />
</SelectPrimitive.Trigger>

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { Dialog as SheetPrimitive } from 'bits-ui';
import { SheetOverlay, SheetPortal, sheetVariants, sheetTransitions, type Side } from '.';
import { Cross2 } from 'radix-icons-svelte';
import { Cross2 } from 'lucide-svelte';
import { cn } from '$lib/utils';
import { fly } from 'svelte/transition';