From c263fd5c7e6126369d9eef8945e73e42dd4ff350 Mon Sep 17 00:00:00 2001 From: Denozordec Date: Wed, 20 May 2026 00:37:00 +0700 Subject: [PATCH] refactor: improve code consistency and formatting across components - Standardized formatting in various Svelte components for better readability. - Updated README.md and .prettierrc for consistent styling and improved documentation. - Refactored class attributes in UI components to enhance clarity and maintainability. - Adjusted layout files to ensure proper alignment and spacing in the application interface. --- web/.prettierrc | 5 +- web/.vscode/extensions.json | 6 +- web/README.md | 12 +- .../operations/OperationsDiffTab.svelte | 55 ++- .../operations/OperationsJobsFilters.svelte | 19 +- .../operations/OperationsJobsTab.svelte | 34 +- .../operations/OperationsQuickActions.svelte | 58 ++- .../operations/OperationsRevisionsTab.svelte | 107 +++-- web/src/lib/sort-prefixes.ts | 5 +- web/src/lib/ui/app/layout/app-layout.svelte | 4 +- .../lib/ui/app/layout/app-mobile-nav.svelte | 6 +- .../lib/ui/app/layout/app-nav-links.svelte | 9 +- web/src/lib/ui/app/layout/app-sidebar.svelte | 11 +- web/src/lib/ui/app/layout/app-topbar.svelte | 4 +- web/src/lib/ui/app/layout/theme-menu.svelte | 7 +- .../lib/ui/app/page-header/page-header.svelte | 2 +- web/src/lib/ui/app/tokens.md | 8 +- .../alert-dialog/alert-dialog-action.svelte | 14 +- .../alert-dialog/alert-dialog-cancel.svelte | 14 +- .../alert-dialog/alert-dialog-content.svelte | 16 +- .../alert-dialog-description.svelte | 9 +- .../alert-dialog/alert-dialog-footer.svelte | 6 +- .../alert-dialog/alert-dialog-header.svelte | 9 +- .../alert-dialog/alert-dialog-media.svelte | 9 +- .../alert-dialog/alert-dialog-overlay.svelte | 9 +- .../alert-dialog/alert-dialog-portal.svelte | 2 +- .../alert-dialog/alert-dialog-title.svelte | 9 +- .../alert-dialog/alert-dialog-trigger.svelte | 2 +- .../ui/core/alert-dialog/alert-dialog.svelte | 2 +- web/src/lib/ui/core/alert-dialog/index.ts | 26 +- web/src/lib/ui/core/alert/alert-action.svelte | 6 +- .../ui/core/alert/alert-description.svelte | 6 +- web/src/lib/ui/core/alert/alert-title.svelte | 6 +- web/src/lib/ui/core/alert/alert.svelte | 21 +- web/src/lib/ui/core/alert/index.ts | 12 +- web/src/lib/ui/core/badge/badge.svelte | 33 +- web/src/lib/ui/core/badge/index.ts | 4 +- web/src/lib/ui/core/button/button.svelte | 57 ++- web/src/lib/ui/core/button/index.ts | 6 +- web/src/lib/ui/core/card/card-action.svelte | 6 +- web/src/lib/ui/core/card/card-content.svelte | 6 +- .../lib/ui/core/card/card-description.svelte | 6 +- web/src/lib/ui/core/card/card-footer.svelte | 9 +- web/src/lib/ui/core/card/card-header.svelte | 6 +- web/src/lib/ui/core/card/card-title.svelte | 6 +- web/src/lib/ui/core/card/card.svelte | 13 +- web/src/lib/ui/core/card/index.ts | 16 +- web/src/lib/ui/core/checkbox/checkbox.svelte | 12 +- web/src/lib/ui/core/checkbox/index.ts | 4 +- .../ui/core/data-table/data-table.svelte.ts | 14 +- .../lib/ui/core/data-table/flex-render.svelte | 8 +- web/src/lib/ui/core/data-table/index.ts | 6 +- .../lib/ui/core/data-table/render-helpers.ts | 4 +- .../lib/ui/core/dialog/dialog-close.svelte | 4 +- .../lib/ui/core/dialog/dialog-content.svelte | 18 +- .../ui/core/dialog/dialog-description.svelte | 9 +- .../lib/ui/core/dialog/dialog-footer.svelte | 13 +- .../lib/ui/core/dialog/dialog-header.svelte | 6 +- .../lib/ui/core/dialog/dialog-overlay.svelte | 9 +- .../lib/ui/core/dialog/dialog-portal.svelte | 2 +- .../lib/ui/core/dialog/dialog-title.svelte | 6 +- .../lib/ui/core/dialog/dialog-trigger.svelte | 4 +- web/src/lib/ui/core/dialog/dialog.svelte | 2 +- web/src/lib/ui/core/dialog/index.ts | 22 +- .../dropdown-menu-checkbox-group.svelte | 2 +- .../dropdown-menu-checkbox-item.svelte | 14 +- .../dropdown-menu-content.svelte | 12 +- .../dropdown-menu-group-heading.svelte | 8 +- .../dropdown-menu/dropdown-menu-group.svelte | 2 +- .../dropdown-menu/dropdown-menu-item.svelte | 10 +- .../dropdown-menu/dropdown-menu-label.svelte | 9 +- .../dropdown-menu/dropdown-menu-portal.svelte | 2 +- .../dropdown-menu-radio-group.svelte | 2 +- .../dropdown-menu-radio-item.svelte | 10 +- .../dropdown-menu-separator.svelte | 6 +- .../dropdown-menu-shortcut.svelte | 9 +- .../dropdown-menu-sub-content.svelte | 9 +- .../dropdown-menu-sub-trigger.svelte | 6 +- .../dropdown-menu/dropdown-menu-sub.svelte | 2 +- .../dropdown-menu-trigger.svelte | 2 +- .../core/dropdown-menu/dropdown-menu.svelte | 2 +- web/src/lib/ui/core/dropdown-menu/index.ts | 36 +- web/src/lib/ui/core/form/form-button.svelte | 2 +- .../lib/ui/core/form/form-description.svelte | 6 +- .../ui/core/form/form-element-field.svelte | 10 +- .../lib/ui/core/form/form-field-errors.svelte | 6 +- web/src/lib/ui/core/form/form-field.svelte | 15 +- web/src/lib/ui/core/form/form-fieldset.svelte | 8 +- web/src/lib/ui/core/form/form-label.svelte | 8 +- web/src/lib/ui/core/form/form-legend.svelte | 6 +- web/src/lib/ui/core/form/index.ts | 20 +- web/src/lib/ui/core/input/index.ts | 4 +- web/src/lib/ui/core/input/input.svelte | 18 +- web/src/lib/ui/core/label/index.ts | 4 +- web/src/lib/ui/core/label/label.svelte | 6 +- web/src/lib/ui/core/popover/index.ts | 18 +- .../lib/ui/core/popover/popover-close.svelte | 2 +- .../ui/core/popover/popover-content.svelte | 12 +- .../core/popover/popover-description.svelte | 6 +- .../lib/ui/core/popover/popover-header.svelte | 6 +- .../lib/ui/core/popover/popover-portal.svelte | 2 +- .../lib/ui/core/popover/popover-title.svelte | 11 +- .../ui/core/popover/popover-trigger.svelte | 6 +- web/src/lib/ui/core/popover/popover.svelte | 2 +- web/src/lib/ui/core/scroll-area/index.ts | 6 +- .../scroll-area/scroll-area-scrollbar.svelte | 10 +- .../ui/core/scroll-area/scroll-area.svelte | 22 +- web/src/lib/ui/core/select/index.ts | 24 +- .../lib/ui/core/select/select-content.svelte | 18 +- .../core/select/select-group-heading.svelte | 8 +- .../lib/ui/core/select/select-group.svelte | 6 +- web/src/lib/ui/core/select/select-item.svelte | 6 +- .../lib/ui/core/select/select-label.svelte | 6 +- .../lib/ui/core/select/select-portal.svelte | 2 +- .../select/select-scroll-down-button.svelte | 11 +- .../select/select-scroll-up-button.svelte | 11 +- .../ui/core/select/select-separator.svelte | 8 +- .../lib/ui/core/select/select-trigger.svelte | 12 +- web/src/lib/ui/core/select/select.svelte | 2 +- web/src/lib/ui/core/separator/index.ts | 4 +- .../lib/ui/core/separator/separator.svelte | 10 +- web/src/lib/ui/core/sheet/index.ts | 22 +- web/src/lib/ui/core/sheet/sheet-close.svelte | 2 +- .../lib/ui/core/sheet/sheet-content.svelte | 22 +- .../ui/core/sheet/sheet-description.svelte | 6 +- web/src/lib/ui/core/sheet/sheet-footer.svelte | 6 +- web/src/lib/ui/core/sheet/sheet-header.svelte | 6 +- .../lib/ui/core/sheet/sheet-overlay.svelte | 6 +- web/src/lib/ui/core/sheet/sheet-portal.svelte | 2 +- web/src/lib/ui/core/sheet/sheet-title.svelte | 6 +- .../lib/ui/core/sheet/sheet-trigger.svelte | 2 +- web/src/lib/ui/core/sheet/sheet.svelte | 2 +- web/src/lib/ui/core/skeleton/index.ts | 4 +- web/src/lib/ui/core/skeleton/skeleton.svelte | 6 +- web/src/lib/ui/core/switch/index.ts | 4 +- web/src/lib/ui/core/switch/switch.svelte | 10 +- web/src/lib/ui/core/table/index.ts | 18 +- web/src/lib/ui/core/table/table-body.svelte | 11 +- .../lib/ui/core/table/table-caption.svelte | 6 +- web/src/lib/ui/core/table/table-cell.svelte | 11 +- web/src/lib/ui/core/table/table-footer.svelte | 6 +- web/src/lib/ui/core/table/table-head.svelte | 14 +- web/src/lib/ui/core/table/table-header.svelte | 6 +- web/src/lib/ui/core/table/table-row.svelte | 14 +- web/src/lib/ui/core/table/table.svelte | 11 +- web/src/lib/ui/core/tabs/index.ts | 10 +- web/src/lib/ui/core/tabs/tabs-content.svelte | 6 +- web/src/lib/ui/core/tabs/tabs-list.svelte | 22 +- web/src/lib/ui/core/tabs/tabs-trigger.svelte | 12 +- web/src/lib/ui/core/tabs/tabs.svelte | 8 +- web/src/lib/ui/core/textarea/index.ts | 4 +- web/src/lib/ui/core/textarea/textarea.svelte | 8 +- web/src/lib/ui/core/tooltip/index.ts | 12 +- .../ui/core/tooltip/tooltip-content.svelte | 24 +- .../lib/ui/core/tooltip/tooltip-portal.svelte | 2 +- .../ui/core/tooltip/tooltip-provider.svelte | 2 +- .../ui/core/tooltip/tooltip-trigger.svelte | 2 +- web/src/lib/ui/core/tooltip/tooltip.svelte | 4 +- .../ui/patterns/confirm/confirm-dialog.svelte | 4 +- .../patterns/data-table/app-data-table.svelte | 2 +- .../patterns/empty-state/empty-state.svelte | 8 +- web/src/lib/ui/patterns/form/app-input.svelte | 7 +- .../lib/ui/patterns/form/app-textarea.svelte | 6 +- .../lib/ui/patterns/form/form-field.svelte | 14 +- web/src/routes/+page.svelte | 32 +- web/src/routes/directories/+page.svelte | 104 +++- web/src/routes/modules/+page.svelte | 63 ++- .../routes/modules/[moduleId]/+page.svelte | 450 +++++++++++++----- web/src/routes/monitoring/+page.svelte | 77 ++- web/src/routes/network/+page.svelte | 73 ++- web/src/routes/operations/+page.svelte | 8 +- web/src/routes/schedule/+page.svelte | 65 ++- web/src/routes/settings/+page.svelte | 63 ++- 173 files changed, 1608 insertions(+), 1015 deletions(-) diff --git a/web/.prettierrc b/web/.prettierrc index 6255599..e2076ea 100644 --- a/web/.prettierrc +++ b/web/.prettierrc @@ -3,10 +3,7 @@ "singleQuote": true, "trailingComma": "none", "printWidth": 100, - "plugins": [ - "prettier-plugin-svelte", - "prettier-plugin-tailwindcss" - ], + "plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"], "tailwindStylesheet": "./src/routes/layout.css", "overrides": [ { diff --git a/web/.vscode/extensions.json b/web/.vscode/extensions.json index cdab7df..11efe25 100644 --- a/web/.vscode/extensions.json +++ b/web/.vscode/extensions.json @@ -1,7 +1,3 @@ { - "recommendations": [ - "svelte.svelte-vscode", - "bradlc.vscode-tailwindcss", - "esbenp.prettier-vscode" - ] + "recommendations": ["svelte.svelte-vscode", "bradlc.vscode-tailwindcss", "esbenp.prettier-vscode"] } diff --git a/web/README.md b/web/README.md index ed27ee6..306da05 100644 --- a/web/README.md +++ b/web/README.md @@ -6,12 +6,12 @@ SvelteKit-приложение панели управления EvoBGP. Зап ## UI-архитектура -| Путь | Назначение | -|------|------------| -| `src/lib/ui/core/` | shadcn-svelte (только через `npx shadcn-svelte@latest add … -y -o`) | -| `src/lib/ui/app/` | Layout, PageHeader, toast (`notify`) | -| `src/lib/ui/patterns/` | FormField, AppDataTable, ConfirmDialog, EmptyState | -| `src/lib/components/ui/` | Re-export на `ui/core` (совместимость) | +| Путь | Назначение | +| ------------------------ | ------------------------------------------------------------------- | +| `src/lib/ui/core/` | shadcn-svelte (только через `npx shadcn-svelte@latest add … -y -o`) | +| `src/lib/ui/app/` | Layout, PageHeader, toast (`notify`) | +| `src/lib/ui/patterns/` | FormField, AppDataTable, ConfirmDialog, EmptyState | +| `src/lib/components/ui/` | Re-export на `ui/core` (совместимость) | Токены темы: `src/routes/layout.css`. Справочник: `src/lib/ui/app/tokens.md`. diff --git a/web/src/lib/components/operations/OperationsDiffTab.svelte b/web/src/lib/components/operations/OperationsDiffTab.svelte index 11653bc..329b143 100644 --- a/web/src/lib/components/operations/OperationsDiffTab.svelte +++ b/web/src/lib/components/operations/OperationsDiffTab.svelte @@ -1,7 +1,13 @@ -
+
-
+
EvoBGP
diff --git a/web/src/lib/ui/app/layout/app-mobile-nav.svelte b/web/src/lib/ui/app/layout/app-mobile-nav.svelte index 84b696d..7758a87 100644 --- a/web/src/lib/ui/app/layout/app-mobile-nav.svelte +++ b/web/src/lib/ui/app/layout/app-mobile-nav.svelte @@ -28,12 +28,12 @@ - - + + EvoBGP -

Панель управления

+

Панель управления

diff --git a/web/src/lib/ui/app/layout/app-nav-links.svelte b/web/src/lib/ui/app/layout/app-nav-links.svelte index 712545f..4b7aaa4 100644 --- a/web/src/lib/ui/app/layout/app-nav-links.svelte +++ b/web/src/lib/ui/app/layout/app-nav-links.svelte @@ -25,8 +25,13 @@ function linkClass(active: boolean, iconOnly: boolean) { return cn( - buttonVariants({ variant: active ? 'secondary' : 'ghost', size: iconOnly ? 'icon-sm' : 'sm' }), - iconOnly ? 'flex w-full items-center justify-center no-underline' : 'flex w-full items-center justify-start gap-2 no-underline', + buttonVariants({ + variant: active ? 'secondary' : 'ghost', + size: iconOnly ? 'icon-sm' : 'sm' + }), + iconOnly + ? 'flex w-full items-center justify-center no-underline' + : 'flex w-full items-center justify-start gap-2 no-underline', active && (iconOnly ? 'ring-sidebar-primary/50 bg-sidebar-accent/90 text-sidebar-accent-foreground ring-1' diff --git a/web/src/lib/ui/app/layout/app-sidebar.svelte b/web/src/lib/ui/app/layout/app-sidebar.svelte index fd588be..a51ae1d 100644 --- a/web/src/lib/ui/app/layout/app-sidebar.svelte +++ b/web/src/lib/ui/app/layout/app-sidebar.svelte @@ -20,7 +20,7 @@
{#if actions} diff --git a/web/src/lib/ui/app/layout/theme-menu.svelte b/web/src/lib/ui/app/layout/theme-menu.svelte index 3fcc0ed..7bf6d55 100644 --- a/web/src/lib/ui/app/layout/theme-menu.svelte +++ b/web/src/lib/ui/app/layout/theme-menu.svelte @@ -14,14 +14,17 @@ import Moon from '@lucide/svelte/icons/moon'; import Monitor from '@lucide/svelte/icons/monitor'; - let { theme = $bindable('system'), class: className }: { theme?: ThemePreference; class?: string } = $props(); + let { + theme = $bindable('system'), + class: className + }: { theme?: ThemePreference; class?: string } = $props();

{title}

{#if description} -

{description}

+

{description}

{/if}
diff --git a/web/src/lib/ui/app/tokens.md b/web/src/lib/ui/app/tokens.md index b112ae5..bb2d98d 100644 --- a/web/src/lib/ui/app/tokens.md +++ b/web/src/lib/ui/app/tokens.md @@ -4,10 +4,10 @@ ## Layout -| Token | Значение | Tailwind | -|-------|----------|----------| -| `--page-padding` | 1.5rem | `p-page` через `p-[var(--page-padding)]` | -| `--section-gap` | 1.5rem | `gap-section` | +| Token | Значение | Tailwind | +| ---------------- | -------- | ---------------------------------------- | +| `--page-padding` | 1.5rem | `p-page` через `p-[var(--page-padding)]` | +| `--section-gap` | 1.5rem | `gap-section` | ## Радиусы diff --git a/web/src/lib/ui/core/alert-dialog/alert-dialog-action.svelte b/web/src/lib/ui/core/alert-dialog/alert-dialog-action.svelte index 60cb405..8393d03 100644 --- a/web/src/lib/ui/core/alert-dialog/alert-dialog-action.svelte +++ b/web/src/lib/ui/core/alert-dialog/alert-dialog-action.svelte @@ -1,17 +1,17 @@ @@ -24,7 +24,7 @@ data-slot="alert-dialog-content" data-size={size} class={cn( - "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-popover text-popover-foreground ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none", + 'group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm', className )} {...restProps} diff --git a/web/src/lib/ui/core/alert-dialog/alert-dialog-description.svelte b/web/src/lib/ui/core/alert-dialog/alert-dialog-description.svelte index 5024f3f..9b2dd92 100644 --- a/web/src/lib/ui/core/alert-dialog/alert-dialog-description.svelte +++ b/web/src/lib/ui/core/alert-dialog/alert-dialog-description.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/alert-dialog/alert-dialog-title.svelte b/web/src/lib/ui/core/alert-dialog/alert-dialog-title.svelte index 652da33..21e20e5 100644 --- a/web/src/lib/ui/core/alert-dialog/alert-dialog-title.svelte +++ b/web/src/lib/ui/core/alert-dialog/alert-dialog-title.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/alert-dialog/alert-dialog.svelte b/web/src/lib/ui/core/alert-dialog/alert-dialog.svelte index 7ea78bb..cde7911 100644 --- a/web/src/lib/ui/core/alert-dialog/alert-dialog.svelte +++ b/web/src/lib/ui/core/alert-dialog/alert-dialog.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/alert-dialog/index.ts b/web/src/lib/ui/core/alert-dialog/index.ts index ca81c2a..260a544 100644 --- a/web/src/lib/ui/core/alert-dialog/index.ts +++ b/web/src/lib/ui/core/alert-dialog/index.ts @@ -1,15 +1,15 @@ -import Root from "./alert-dialog.svelte"; -import Portal from "./alert-dialog-portal.svelte"; -import Trigger from "./alert-dialog-trigger.svelte"; -import Title from "./alert-dialog-title.svelte"; -import Action from "./alert-dialog-action.svelte"; -import Cancel from "./alert-dialog-cancel.svelte"; -import Footer from "./alert-dialog-footer.svelte"; -import Header from "./alert-dialog-header.svelte"; -import Overlay from "./alert-dialog-overlay.svelte"; -import Content from "./alert-dialog-content.svelte"; -import Description from "./alert-dialog-description.svelte"; -import Media from "./alert-dialog-media.svelte"; +import Root from './alert-dialog.svelte'; +import Portal from './alert-dialog-portal.svelte'; +import Trigger from './alert-dialog-trigger.svelte'; +import Title from './alert-dialog-title.svelte'; +import Action from './alert-dialog-action.svelte'; +import Cancel from './alert-dialog-cancel.svelte'; +import Footer from './alert-dialog-footer.svelte'; +import Header from './alert-dialog-header.svelte'; +import Overlay from './alert-dialog-overlay.svelte'; +import Content from './alert-dialog-content.svelte'; +import Description from './alert-dialog-description.svelte'; +import Media from './alert-dialog-media.svelte'; export { Root, @@ -36,5 +36,5 @@ export { Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, - Media as AlertDialogMedia, + Media as AlertDialogMedia }; diff --git a/web/src/lib/ui/core/alert/alert-action.svelte b/web/src/lib/ui/core/alert/alert-action.svelte index 1877d38..3df2083 100644 --- a/web/src/lib/ui/core/alert/alert-action.svelte +++ b/web/src/lib/ui/core/alert/alert-action.svelte @@ -1,6 +1,6 @@ - import { cn, type WithElementRef } from "$lib/utils.js"; - import type { HTMLAnchorAttributes, HTMLButtonAttributes } from "svelte/elements"; - import { type VariantProps, tv } from "tailwind-variants"; + import { cn, type WithElementRef } from '$lib/utils.js'; + import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements'; + import { type VariantProps, tv } from 'tailwind-variants'; export const buttonVariants = tv({ base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", variants: { variant: { - default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80", - outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground", - secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground", - ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground", - destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30", - link: "text-primary underline-offset-4 hover:underline", + default: 'bg-primary text-primary-foreground [a]:hover:bg-primary/80', + outline: + 'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground', + secondary: + 'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground', + ghost: + 'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground', + destructive: + 'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30', + link: 'text-primary underline-offset-4 hover:underline' }, size: { - default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", + default: + 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2', xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3", sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5", - lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2", - icon: "size-8", - "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3", - "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg", - "icon-lg": "size-9", - }, + lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2', + icon: 'size-8', + 'icon-xs': + "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3", + 'icon-sm': + 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg', + 'icon-lg': 'size-9' + } }, defaultVariants: { - variant: "default", - size: "default", - }, + variant: 'default', + size: 'default' + } }); - export type ButtonVariant = VariantProps["variant"]; - export type ButtonSize = VariantProps["size"]; + export type ButtonVariant = VariantProps['variant']; + export type ButtonSize = VariantProps['size']; export type ButtonProps = WithElementRef & WithElementRef & { @@ -44,11 +51,11 @@
img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className)} + class={cn( + 'group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl', + className + )} {...restProps} > {@render children?.()} diff --git a/web/src/lib/ui/core/card/index.ts b/web/src/lib/ui/core/card/index.ts index 4d3fce4..77d3674 100644 --- a/web/src/lib/ui/core/card/index.ts +++ b/web/src/lib/ui/core/card/index.ts @@ -1,10 +1,10 @@ -import Root from "./card.svelte"; -import Content from "./card-content.svelte"; -import Description from "./card-description.svelte"; -import Footer from "./card-footer.svelte"; -import Header from "./card-header.svelte"; -import Title from "./card-title.svelte"; -import Action from "./card-action.svelte"; +import Root from './card.svelte'; +import Content from './card-content.svelte'; +import Description from './card-description.svelte'; +import Footer from './card-footer.svelte'; +import Header from './card-header.svelte'; +import Title from './card-title.svelte'; +import Action from './card-action.svelte'; export { Root, @@ -21,5 +21,5 @@ export { Footer as CardFooter, Header as CardHeader, Title as CardTitle, - Action as CardAction, + Action as CardAction }; diff --git a/web/src/lib/ui/core/checkbox/checkbox.svelte b/web/src/lib/ui/core/checkbox/checkbox.svelte index 27b0da6..98c2477 100644 --- a/web/src/lib/ui/core/checkbox/checkbox.svelte +++ b/web/src/lib/ui/core/checkbox/checkbox.svelte @@ -1,6 +1,6 @@ -{#if typeof content === "string"} +{#if typeof content === 'string'} {content} {:else if content instanceof Function} diff --git a/web/src/lib/ui/core/data-table/index.ts b/web/src/lib/ui/core/data-table/index.ts index 5f4e77e..05fb821 100644 --- a/web/src/lib/ui/core/data-table/index.ts +++ b/web/src/lib/ui/core/data-table/index.ts @@ -1,3 +1,3 @@ -export { default as FlexRender } from "./flex-render.svelte"; -export { renderComponent, renderSnippet } from "./render-helpers.js"; -export { createSvelteTable } from "./data-table.svelte.js"; +export { default as FlexRender } from './flex-render.svelte'; +export { renderComponent, renderSnippet } from './render-helpers.js'; +export { createSvelteTable } from './data-table.svelte.js'; diff --git a/web/src/lib/ui/core/data-table/render-helpers.ts b/web/src/lib/ui/core/data-table/render-helpers.ts index fa036d6..aea5dc2 100644 --- a/web/src/lib/ui/core/data-table/render-helpers.ts +++ b/web/src/lib/ui/core/data-table/render-helpers.ts @@ -1,4 +1,4 @@ -import type { Component, ComponentProps, Snippet } from "svelte"; +import type { Component, ComponentProps, Snippet } from 'svelte'; /** * A helper class to make it easy to identify Svelte components in @@ -77,7 +77,7 @@ export class RenderSnippetConfig { export function renderComponent< // eslint-disable-next-line @typescript-eslint/no-explicit-any T extends Component, - Props extends ComponentProps, + Props extends ComponentProps >(component: T, props: Props = {} as Props) { return new RenderComponentConfig(component, props); } diff --git a/web/src/lib/ui/core/dialog/dialog-close.svelte b/web/src/lib/ui/core/dialog/dialog-close.svelte index de68f2f..4141704 100644 --- a/web/src/lib/ui/core/dialog/dialog-close.svelte +++ b/web/src/lib/ui/core/dialog/dialog-close.svelte @@ -1,9 +1,9 @@ diff --git a/web/src/lib/ui/core/dialog/dialog-content.svelte b/web/src/lib/ui/core/dialog/dialog-content.svelte index ade7777..27998c1 100644 --- a/web/src/lib/ui/core/dialog/dialog-content.svelte +++ b/web/src/lib/ui/core/dialog/dialog-content.svelte @@ -1,11 +1,11 @@ diff --git a/web/src/lib/ui/core/dialog/dialog-title.svelte b/web/src/lib/ui/core/dialog/dialog-title.svelte index 6ff1a4a..f3aa721 100644 --- a/web/src/lib/ui/core/dialog/dialog-title.svelte +++ b/web/src/lib/ui/core/dialog/dialog-title.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/dialog/dialog.svelte b/web/src/lib/ui/core/dialog/dialog.svelte index 211672c..c1444b2 100644 --- a/web/src/lib/ui/core/dialog/dialog.svelte +++ b/web/src/lib/ui/core/dialog/dialog.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/dialog/index.ts b/web/src/lib/ui/core/dialog/index.ts index 076cef5..9143f72 100644 --- a/web/src/lib/ui/core/dialog/index.ts +++ b/web/src/lib/ui/core/dialog/index.ts @@ -1,13 +1,13 @@ -import Root from "./dialog.svelte"; -import Portal from "./dialog-portal.svelte"; -import Title from "./dialog-title.svelte"; -import Footer from "./dialog-footer.svelte"; -import Header from "./dialog-header.svelte"; -import Overlay from "./dialog-overlay.svelte"; -import Content from "./dialog-content.svelte"; -import Description from "./dialog-description.svelte"; -import Trigger from "./dialog-trigger.svelte"; -import Close from "./dialog-close.svelte"; +import Root from './dialog.svelte'; +import Portal from './dialog-portal.svelte'; +import Title from './dialog-title.svelte'; +import Footer from './dialog-footer.svelte'; +import Header from './dialog-header.svelte'; +import Overlay from './dialog-overlay.svelte'; +import Content from './dialog-content.svelte'; +import Description from './dialog-description.svelte'; +import Trigger from './dialog-trigger.svelte'; +import Close from './dialog-close.svelte'; export { Root, @@ -30,5 +30,5 @@ export { Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, - Close as DialogClose, + Close as DialogClose }; diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-checkbox-group.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-checkbox-group.svelte index e0e1971..c0bf94b 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-checkbox-group.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-checkbox-group.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-item.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-item.svelte index c425190..ccfd86b 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-item.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-item.svelte @@ -1,16 +1,16 @@ @@ -20,7 +20,7 @@ data-inset={inset} data-variant={variant} class={cn( - "focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0", + "group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-7 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className )} {...restProps} diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-label.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-label.svelte index e0c534f..e45f53a 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-label.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-label.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-radio-group.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-radio-group.svelte index 189aef4..3e98749 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-radio-group.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-radio-group.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-trigger.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-trigger.svelte index cb05344..032b645 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu-trigger.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu-trigger.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/dropdown-menu/dropdown-menu.svelte b/web/src/lib/ui/core/dropdown-menu/dropdown-menu.svelte index cb4bc62..fbbb790 100644 --- a/web/src/lib/ui/core/dropdown-menu/dropdown-menu.svelte +++ b/web/src/lib/ui/core/dropdown-menu/dropdown-menu.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/dropdown-menu/index.ts b/web/src/lib/ui/core/dropdown-menu/index.ts index 7850c6a..b097e3f 100644 --- a/web/src/lib/ui/core/dropdown-menu/index.ts +++ b/web/src/lib/ui/core/dropdown-menu/index.ts @@ -1,20 +1,20 @@ -import Root from "./dropdown-menu.svelte"; -import Sub from "./dropdown-menu-sub.svelte"; -import CheckboxGroup from "./dropdown-menu-checkbox-group.svelte"; -import CheckboxItem from "./dropdown-menu-checkbox-item.svelte"; -import Content from "./dropdown-menu-content.svelte"; -import Group from "./dropdown-menu-group.svelte"; -import Item from "./dropdown-menu-item.svelte"; -import Label from "./dropdown-menu-label.svelte"; -import RadioGroup from "./dropdown-menu-radio-group.svelte"; -import RadioItem from "./dropdown-menu-radio-item.svelte"; -import Separator from "./dropdown-menu-separator.svelte"; -import Shortcut from "./dropdown-menu-shortcut.svelte"; -import Trigger from "./dropdown-menu-trigger.svelte"; -import SubContent from "./dropdown-menu-sub-content.svelte"; -import SubTrigger from "./dropdown-menu-sub-trigger.svelte"; -import GroupHeading from "./dropdown-menu-group-heading.svelte"; -import Portal from "./dropdown-menu-portal.svelte"; +import Root from './dropdown-menu.svelte'; +import Sub from './dropdown-menu-sub.svelte'; +import CheckboxGroup from './dropdown-menu-checkbox-group.svelte'; +import CheckboxItem from './dropdown-menu-checkbox-item.svelte'; +import Content from './dropdown-menu-content.svelte'; +import Group from './dropdown-menu-group.svelte'; +import Item from './dropdown-menu-item.svelte'; +import Label from './dropdown-menu-label.svelte'; +import RadioGroup from './dropdown-menu-radio-group.svelte'; +import RadioItem from './dropdown-menu-radio-item.svelte'; +import Separator from './dropdown-menu-separator.svelte'; +import Shortcut from './dropdown-menu-shortcut.svelte'; +import Trigger from './dropdown-menu-trigger.svelte'; +import SubContent from './dropdown-menu-sub-content.svelte'; +import SubTrigger from './dropdown-menu-sub-trigger.svelte'; +import GroupHeading from './dropdown-menu-group-heading.svelte'; +import Portal from './dropdown-menu-portal.svelte'; export { CheckboxGroup, @@ -50,5 +50,5 @@ export { Sub, SubContent, SubTrigger, - Trigger, + Trigger }; diff --git a/web/src/lib/ui/core/form/form-button.svelte b/web/src/lib/ui/core/form/form-button.svelte index 8ff467d..6dd356b 100644 --- a/web/src/lib/ui/core/form/form-button.svelte +++ b/web/src/lib/ui/core/form/form-button.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/form/form-description.svelte b/web/src/lib/ui/core/form/form-description.svelte index a5f42be..034270a 100644 --- a/web/src/lib/ui/core/form/form-description.svelte +++ b/web/src/lib/ui/core/form/form-description.svelte @@ -1,6 +1,6 @@ - + diff --git a/web/src/lib/ui/core/form/form-label.svelte b/web/src/lib/ui/core/form/form-label.svelte index 284bfc2..d1af1d0 100644 --- a/web/src/lib/ui/core/form/form-label.svelte +++ b/web/src/lib/ui/core/form/form-label.svelte @@ -1,7 +1,7 @@ -{#if type === "file"} +{#if type === 'file'} - import { Label as LabelPrimitive } from "bits-ui"; - import { cn } from "$lib/utils.js"; + import { Label as LabelPrimitive } from 'bits-ui'; + import { cn } from '$lib/utils.js'; let { ref = $bindable(null), @@ -13,7 +13,7 @@ bind:ref data-slot="label" class={cn( - "gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", + 'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className )} {...restProps} diff --git a/web/src/lib/ui/core/popover/index.ts b/web/src/lib/ui/core/popover/index.ts index 5f18036..7ca18f4 100644 --- a/web/src/lib/ui/core/popover/index.ts +++ b/web/src/lib/ui/core/popover/index.ts @@ -1,11 +1,11 @@ -import Root from "./popover.svelte"; -import Close from "./popover-close.svelte"; -import Content from "./popover-content.svelte"; -import Description from "./popover-description.svelte"; -import Header from "./popover-header.svelte"; -import Title from "./popover-title.svelte"; -import Trigger from "./popover-trigger.svelte"; -import Portal from "./popover-portal.svelte"; +import Root from './popover.svelte'; +import Close from './popover-close.svelte'; +import Content from './popover-content.svelte'; +import Description from './popover-description.svelte'; +import Header from './popover-header.svelte'; +import Title from './popover-title.svelte'; +import Trigger from './popover-trigger.svelte'; +import Portal from './popover-portal.svelte'; export { Root, @@ -24,5 +24,5 @@ export { Title as PopoverTitle, Trigger as PopoverTrigger, Close as PopoverClose, - Portal as PopoverPortal, + Portal as PopoverPortal }; diff --git a/web/src/lib/ui/core/popover/popover-close.svelte b/web/src/lib/ui/core/popover/popover-close.svelte index c360925..dc4dec4 100644 --- a/web/src/lib/ui/core/popover/popover-close.svelte +++ b/web/src/lib/ui/core/popover/popover-close.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/popover/popover-content.svelte b/web/src/lib/ui/core/popover/popover-content.svelte index dd9a38f..ace2111 100644 --- a/web/src/lib/ui/core/popover/popover-content.svelte +++ b/web/src/lib/ui/core/popover/popover-content.svelte @@ -1,14 +1,14 @@ diff --git a/web/src/lib/ui/core/popover/popover-title.svelte b/web/src/lib/ui/core/popover/popover-title.svelte index ee9f2ff..cf7a141 100644 --- a/web/src/lib/ui/core/popover/popover-title.svelte +++ b/web/src/lib/ui/core/popover/popover-title.svelte @@ -1,6 +1,6 @@ -
+
{@render children?.()}
diff --git a/web/src/lib/ui/core/popover/popover-trigger.svelte b/web/src/lib/ui/core/popover/popover-trigger.svelte index 586323c..f21b1b3 100644 --- a/web/src/lib/ui/core/popover/popover-trigger.svelte +++ b/web/src/lib/ui/core/popover/popover-trigger.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/scroll-area/index.ts b/web/src/lib/ui/core/scroll-area/index.ts index e86a25b..d546806 100644 --- a/web/src/lib/ui/core/scroll-area/index.ts +++ b/web/src/lib/ui/core/scroll-area/index.ts @@ -1,10 +1,10 @@ -import Scrollbar from "./scroll-area-scrollbar.svelte"; -import Root from "./scroll-area.svelte"; +import Scrollbar from './scroll-area-scrollbar.svelte'; +import Root from './scroll-area.svelte'; export { Root, Scrollbar, //, Root as ScrollArea, - Scrollbar as ScrollAreaScrollbar, + Scrollbar as ScrollAreaScrollbar }; diff --git a/web/src/lib/ui/core/scroll-area/scroll-area-scrollbar.svelte b/web/src/lib/ui/core/scroll-area/scroll-area-scrollbar.svelte index b9518f3..b77de20 100644 --- a/web/src/lib/ui/core/scroll-area/scroll-area-scrollbar.svelte +++ b/web/src/lib/ui/core/scroll-area/scroll-area-scrollbar.svelte @@ -1,11 +1,11 @@ diff --git a/web/src/lib/ui/core/select/select-scroll-down-button.svelte b/web/src/lib/ui/core/select/select-scroll-down-button.svelte index 94f41cd..cba5a02 100644 --- a/web/src/lib/ui/core/select/select-scroll-down-button.svelte +++ b/web/src/lib/ui/core/select/select-scroll-down-button.svelte @@ -1,6 +1,6 @@ @@ -19,11 +19,11 @@ data-slot="select-trigger" data-size={size} class={cn( - "border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0", + "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className )} {...restProps} > {@render children?.()} - + diff --git a/web/src/lib/ui/core/select/select.svelte b/web/src/lib/ui/core/select/select.svelte index 05eb663..b9bf9ba 100644 --- a/web/src/lib/ui/core/select/select.svelte +++ b/web/src/lib/ui/core/select/select.svelte @@ -1,5 +1,5 @@ @@ -14,9 +14,9 @@ bind:ref data-slot={dataSlot} class={cn( - "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px", + 'shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px', // this is different in shadcn/ui but self-stretch breaks things for us - "data-[orientation=vertical]:h-full", + 'data-[orientation=vertical]:h-full', className )} {...restProps} diff --git a/web/src/lib/ui/core/sheet/index.ts b/web/src/lib/ui/core/sheet/index.ts index 28d7da1..781bc48 100644 --- a/web/src/lib/ui/core/sheet/index.ts +++ b/web/src/lib/ui/core/sheet/index.ts @@ -1,13 +1,13 @@ -import Root from "./sheet.svelte"; -import Portal from "./sheet-portal.svelte"; -import Trigger from "./sheet-trigger.svelte"; -import Close from "./sheet-close.svelte"; -import Overlay from "./sheet-overlay.svelte"; -import Content from "./sheet-content.svelte"; -import Header from "./sheet-header.svelte"; -import Footer from "./sheet-footer.svelte"; -import Title from "./sheet-title.svelte"; -import Description from "./sheet-description.svelte"; +import Root from './sheet.svelte'; +import Portal from './sheet-portal.svelte'; +import Trigger from './sheet-trigger.svelte'; +import Close from './sheet-close.svelte'; +import Overlay from './sheet-overlay.svelte'; +import Content from './sheet-content.svelte'; +import Header from './sheet-header.svelte'; +import Footer from './sheet-footer.svelte'; +import Title from './sheet-title.svelte'; +import Description from './sheet-description.svelte'; export { Root, @@ -30,5 +30,5 @@ export { Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, - Description as SheetDescription, + Description as SheetDescription }; diff --git a/web/src/lib/ui/core/sheet/sheet-close.svelte b/web/src/lib/ui/core/sheet/sheet-close.svelte index ae382c1..b0180c0 100644 --- a/web/src/lib/ui/core/sheet/sheet-close.svelte +++ b/web/src/lib/ui/core/sheet/sheet-close.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/sheet/sheet-content.svelte b/web/src/lib/ui/core/sheet/sheet-content.svelte index d738333..296603b 100644 --- a/web/src/lib/ui/core/sheet/sheet-content.svelte +++ b/web/src/lib/ui/core/sheet/sheet-content.svelte @@ -1,21 +1,21 @@ diff --git a/web/src/lib/ui/core/sheet/sheet-title.svelte b/web/src/lib/ui/core/sheet/sheet-title.svelte index 10c1717..b140d19 100644 --- a/web/src/lib/ui/core/sheet/sheet-title.svelte +++ b/web/src/lib/ui/core/sheet/sheet-title.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/core/sheet/sheet.svelte b/web/src/lib/ui/core/sheet/sheet.svelte index 5bf9783..d65b76b 100644 --- a/web/src/lib/ui/core/sheet/sheet.svelte +++ b/web/src/lib/ui/core/sheet/sheet.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/skeleton/index.ts b/web/src/lib/ui/core/skeleton/index.ts index 186db21..3120ce1 100644 --- a/web/src/lib/ui/core/skeleton/index.ts +++ b/web/src/lib/ui/core/skeleton/index.ts @@ -1,7 +1,7 @@ -import Root from "./skeleton.svelte"; +import Root from './skeleton.svelte'; export { Root, // - Root as Skeleton, + Root as Skeleton }; diff --git a/web/src/lib/ui/core/skeleton/skeleton.svelte b/web/src/lib/ui/core/skeleton/skeleton.svelte index 1a940ee..e2b514b 100644 --- a/web/src/lib/ui/core/skeleton/skeleton.svelte +++ b/web/src/lib/ui/core/skeleton/skeleton.svelte @@ -1,6 +1,6 @@ - + {@render children?.()} diff --git a/web/src/lib/ui/core/table/table-caption.svelte b/web/src/lib/ui/core/table/table-caption.svelte index 4696cff..7ad3aee 100644 --- a/web/src/lib/ui/core/table/table-caption.svelte +++ b/web/src/lib/ui/core/table/table-caption.svelte @@ -1,6 +1,6 @@ - + {@render children?.()} diff --git a/web/src/lib/ui/core/table/table-footer.svelte b/web/src/lib/ui/core/table/table-footer.svelte index b9b14eb..565b244 100644 --- a/web/src/lib/ui/core/table/table-footer.svelte +++ b/web/src/lib/ui/core/table/table-footer.svelte @@ -1,6 +1,6 @@ - + {@render children?.()} diff --git a/web/src/lib/ui/core/table/table-header.svelte b/web/src/lib/ui/core/table/table-header.svelte index f47d259..615b5d8 100644 --- a/web/src/lib/ui/core/table/table-header.svelte +++ b/web/src/lib/ui/core/table/table-header.svelte @@ -1,6 +1,6 @@ - + {@render children?.()} diff --git a/web/src/lib/ui/core/table/table.svelte b/web/src/lib/ui/core/table/table.svelte index d95a02e..38b0176 100644 --- a/web/src/lib/ui/core/table/table.svelte +++ b/web/src/lib/ui/core/table/table.svelte @@ -1,6 +1,6 @@
- +
{@render children?.()}
diff --git a/web/src/lib/ui/core/tabs/index.ts b/web/src/lib/ui/core/tabs/index.ts index 31267e5..2ea3623 100644 --- a/web/src/lib/ui/core/tabs/index.ts +++ b/web/src/lib/ui/core/tabs/index.ts @@ -1,7 +1,7 @@ -import Root from "./tabs.svelte"; -import Content from "./tabs-content.svelte"; -import List, { tabsListVariants, type TabsListVariant } from "./tabs-list.svelte"; -import Trigger from "./tabs-trigger.svelte"; +import Root from './tabs.svelte'; +import Content from './tabs-content.svelte'; +import List, { tabsListVariants, type TabsListVariant } from './tabs-list.svelte'; +import Trigger from './tabs-trigger.svelte'; export { Root, @@ -14,5 +14,5 @@ export { Root as Tabs, Content as TabsContent, List as TabsList, - Trigger as TabsTrigger, + Trigger as TabsTrigger }; diff --git a/web/src/lib/ui/core/tabs/tabs-content.svelte b/web/src/lib/ui/core/tabs/tabs-content.svelte index 394ab3e..2f30880 100644 --- a/web/src/lib/ui/core/tabs/tabs-content.svelte +++ b/web/src/lib/ui/core/tabs/tabs-content.svelte @@ -1,6 +1,6 @@ @@ -15,7 +15,7 @@ bind:this={ref} data-slot={dataSlot} class={cn( - "border-input dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 rounded-lg border bg-transparent px-2.5 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50", + 'flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40', className )} bind:value diff --git a/web/src/lib/ui/core/tooltip/index.ts b/web/src/lib/ui/core/tooltip/index.ts index 1718604..809e219 100644 --- a/web/src/lib/ui/core/tooltip/index.ts +++ b/web/src/lib/ui/core/tooltip/index.ts @@ -1,8 +1,8 @@ -import Root from "./tooltip.svelte"; -import Trigger from "./tooltip-trigger.svelte"; -import Content from "./tooltip-content.svelte"; -import Provider from "./tooltip-provider.svelte"; -import Portal from "./tooltip-portal.svelte"; +import Root from './tooltip.svelte'; +import Trigger from './tooltip-trigger.svelte'; +import Content from './tooltip-content.svelte'; +import Provider from './tooltip-provider.svelte'; +import Portal from './tooltip-portal.svelte'; export { Root, @@ -15,5 +15,5 @@ export { Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, - Portal as TooltipPortal, + Portal as TooltipPortal }; diff --git a/web/src/lib/ui/core/tooltip/tooltip-content.svelte b/web/src/lib/ui/core/tooltip/tooltip-content.svelte index 0cf0694..c4c4324 100644 --- a/web/src/lib/ui/core/tooltip/tooltip-content.svelte +++ b/web/src/lib/ui/core/tooltip/tooltip-content.svelte @@ -1,15 +1,15 @@ diff --git a/web/src/lib/ui/core/tooltip/tooltip-provider.svelte b/web/src/lib/ui/core/tooltip/tooltip-provider.svelte index 6dba9a6..fde5bb2 100644 --- a/web/src/lib/ui/core/tooltip/tooltip-provider.svelte +++ b/web/src/lib/ui/core/tooltip/tooltip-provider.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/tooltip/tooltip-trigger.svelte b/web/src/lib/ui/core/tooltip/tooltip-trigger.svelte index 1acdaa4..5631d1b 100644 --- a/web/src/lib/ui/core/tooltip/tooltip-trigger.svelte +++ b/web/src/lib/ui/core/tooltip/tooltip-trigger.svelte @@ -1,5 +1,5 @@ diff --git a/web/src/lib/ui/core/tooltip/tooltip.svelte b/web/src/lib/ui/core/tooltip/tooltip.svelte index 44bee9f..3a21dab 100644 --- a/web/src/lib/ui/core/tooltip/tooltip.svelte +++ b/web/src/lib/ui/core/tooltip/tooltip.svelte @@ -1,6 +1,6 @@ diff --git a/web/src/lib/ui/patterns/confirm/confirm-dialog.svelte b/web/src/lib/ui/patterns/confirm/confirm-dialog.svelte index 2570230..9db74bc 100644 --- a/web/src/lib/ui/patterns/confirm/confirm-dialog.svelte +++ b/web/src/lib/ui/patterns/confirm/confirm-dialog.svelte @@ -33,7 +33,9 @@ {state.cancelLabel ?? 'Отмена'} diff --git a/web/src/lib/ui/patterns/data-table/app-data-table.svelte b/web/src/lib/ui/patterns/data-table/app-data-table.svelte index 1c000e3..fc1268b 100644 --- a/web/src/lib/ui/patterns/data-table/app-data-table.svelte +++ b/web/src/lib/ui/patterns/data-table/app-data-table.svelte @@ -103,7 +103,7 @@ {/if} {:else} - + {/if} {:else} diff --git a/web/src/lib/ui/patterns/empty-state/empty-state.svelte b/web/src/lib/ui/patterns/empty-state/empty-state.svelte index a88ca8d..bf74c56 100644 --- a/web/src/lib/ui/patterns/empty-state/empty-state.svelte +++ b/web/src/lib/ui/patterns/empty-state/empty-state.svelte @@ -13,15 +13,17 @@ let { title = 'Нет данных', description, icon: Icon, action, class: className }: Props = $props(); -
+
{#if Icon} -