chore: purge shadcn from codebase. Replace with bits-ui components and other tools
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { typographySettingsStore } from '$features/SetupFont';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import clsx from 'clsx';
|
||||
import { comparisonStore } from '../../model';
|
||||
|
||||
interface Props {
|
||||
@@ -52,7 +52,7 @@ $effect(() => {
|
||||
>
|
||||
{#each [0, 1] as s (s)}
|
||||
<span
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'char-inner',
|
||||
'transition-colors duration-300',
|
||||
isPast
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
<script lang="ts">
|
||||
import { ThemeSwitch } from '$features/ChangeAppTheme';
|
||||
import type { ResponsiveManager } from '$shared/lib';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import {
|
||||
Badge,
|
||||
Divider,
|
||||
@@ -17,6 +16,7 @@ import {
|
||||
} from '$shared/ui';
|
||||
import PanelLeftClose from '@lucide/svelte/icons/panel-left-close';
|
||||
import PanelLeftOpen from '@lucide/svelte/icons/panel-left-open';
|
||||
import clsx from 'clsx';
|
||||
import { getContext } from 'svelte';
|
||||
import { comparisonStore } from '../../model';
|
||||
|
||||
@@ -49,7 +49,7 @@ const fontBName = $derived(comparisonStore.fontB?.name ?? '');
|
||||
</script>
|
||||
|
||||
<header
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'flex items-center justify-between',
|
||||
'px-4 md:px-8 py-4 md:py-6',
|
||||
'h-16 md:h-20 z-20',
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
Content (font list, controls) is injected via snippets.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import {
|
||||
ButtonGroup,
|
||||
Label,
|
||||
ToggleButton,
|
||||
} from '$shared/ui';
|
||||
import clsx from 'clsx';
|
||||
import type { Snippet } from 'svelte';
|
||||
import {
|
||||
type Side,
|
||||
@@ -40,7 +40,7 @@ let {
|
||||
</script>
|
||||
|
||||
<div
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'flex flex-col h-full',
|
||||
'w-80',
|
||||
'bg-surface dark:bg-dark-bg',
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
import {
|
||||
CharacterComparisonEngine,
|
||||
} from '$shared/lib/helpers/CharacterComparisonEngine/CharacterComparisonEngine.svelte';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import { Loader } from '$shared/ui';
|
||||
import clsx from 'clsx';
|
||||
import { getContext } from 'svelte';
|
||||
import { Spring } from 'svelte/motion';
|
||||
import { fade } from 'svelte/transition';
|
||||
@@ -186,10 +186,10 @@ const scaleClass = $derived(
|
||||
Outer flex container — fills parent.
|
||||
The paper div inside scales down when the sidebar opens on desktop.
|
||||
-->
|
||||
<div class={cn('flex-1 relative flex items-center justify-center p-0 overflow-hidden bg-surface dark:bg-dark-bg', className)}>
|
||||
<div class={clsx('flex-1 relative flex items-center justify-center p-0 overflow-hidden bg-surface dark:bg-dark-bg', className)}>
|
||||
<!-- Paper surface -->
|
||||
<div
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'w-full h-full flex flex-col items-center justify-center relative',
|
||||
'bg-paper dark:bg-dark-card',
|
||||
'shadow-2xl shadow-black/5 dark:shadow-black/20',
|
||||
@@ -253,7 +253,7 @@ const scaleClass = $derived(
|
||||
</div>
|
||||
|
||||
<TypographyMenu
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'absolute bottom-4 sm:bottom-5 right-4 sm:left-1/2 sm:right-[unset] sm:-translate-x-1/2 z-50',
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
1px red vertical rule with square handles at top and bottom.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import clsx from 'clsx';
|
||||
import { cubicOut } from 'svelte/easing';
|
||||
import { fade } from 'svelte/transition';
|
||||
|
||||
@@ -31,7 +31,7 @@ let { sliderPos, isDragging }: Props = $props();
|
||||
>
|
||||
<!-- Top handle -->
|
||||
<div
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'w-5 h-5 md:w-6 md:h-6',
|
||||
'-ml-2.5 md:-ml-3',
|
||||
'mt-2 md:mt-4',
|
||||
@@ -47,7 +47,7 @@ let { sliderPos, isDragging }: Props = $props();
|
||||
|
||||
<!-- Bottom handle -->
|
||||
<div
|
||||
class={cn(
|
||||
class={clsx(
|
||||
'w-5 h-5 md:w-6 md:h-6',
|
||||
'-ml-2.5 md:-ml-3',
|
||||
'mb-2 md:mb-4',
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
<script lang="ts">
|
||||
import { NavigationWrapper } from '$entities/Breadcrumb';
|
||||
import type { ResponsiveManager } from '$shared/lib';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import { Section } from '$shared/ui';
|
||||
import clsx from 'clsx';
|
||||
import {
|
||||
getContext,
|
||||
untrack,
|
||||
@@ -38,7 +38,7 @@ $effect(() => {
|
||||
headerAction={registerAction}
|
||||
>
|
||||
{#snippet content({ className })}
|
||||
<div class={cn(className, !responsive.isDesktopLarge && 'col-start-0 col-span-2')}>
|
||||
<div class={clsx(className, !responsive.isDesktopLarge && 'col-start-0 col-span-2')}>
|
||||
<FontSearch bind:showFilters={isExpanded} />
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
import { NavigationWrapper } from '$entities/Breadcrumb';
|
||||
import { fontStore } from '$entities/Font';
|
||||
import type { ResponsiveManager } from '$shared/lib';
|
||||
import { cn } from '$shared/shadcn/utils/shadcn-utils';
|
||||
import {
|
||||
Label,
|
||||
Section,
|
||||
} from '$shared/ui';
|
||||
import clsx from 'clsx';
|
||||
import { getContext } from 'svelte';
|
||||
import { layoutManager } from '../../model';
|
||||
import LayoutSwitch from '../LayoutSwitch/LayoutSwitch.svelte';
|
||||
@@ -50,7 +50,7 @@ const responsive = getContext<ResponsiveManager>('responsive');
|
||||
{/snippet}
|
||||
|
||||
{#snippet content({ className })}
|
||||
<div class={cn(className, !responsive.isDesktopLarge && 'col-start-0 col-span-2')}>
|
||||
<div class={clsx(className, !responsive.isDesktopLarge && 'col-start-0 col-span-2')}>
|
||||
<SampleList />
|
||||
</div>
|
||||
{/snippet}
|
||||
|
||||
Reference in New Issue
Block a user