@svadmin/ui 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +9 -4
- package/src/actions.ts +110 -0
- package/src/components/AdminApp.svelte +7 -4
- package/src/components/Authenticated.svelte +1 -7
- package/src/components/AutoForm.svelte +158 -69
- package/src/components/AutoSaveIndicator.svelte +19 -14
- package/src/components/AutoTable.svelte +465 -243
- package/src/components/Breadcrumbs.svelte +20 -17
- package/src/components/CanAccess.svelte +6 -4
- package/src/components/ComboboxField.svelte +122 -0
- package/src/components/CommandPalette.svelte +93 -0
- package/src/components/ConfigErrorScreen.svelte +53 -151
- package/src/components/ConfirmDialog.svelte +25 -17
- package/src/components/CreatePage.svelte +3 -2
- package/src/components/DevTools.svelte +99 -230
- package/src/components/DrawerForm.svelte +19 -10
- package/src/components/EditPage.svelte +25 -6
- package/src/components/EmptyState.svelte +5 -1
- package/src/components/ErrorBoundary.svelte +38 -40
- package/src/components/ErrorComponent.svelte +18 -17
- package/src/components/FieldRenderer.svelte +240 -75
- package/src/components/ForgotPasswordPage.svelte +20 -111
- package/src/components/Header.svelte +28 -8
- package/src/components/InferencerPanel.svelte +136 -110
- package/src/components/InfiniteList.svelte +93 -0
- package/src/components/Layout.svelte +85 -22
- package/src/components/ListPage.svelte +25 -1
- package/src/components/LiveIndicator.svelte +30 -87
- package/src/components/LoginPage.svelte +81 -155
- package/src/components/ModalForm.svelte +6 -2
- package/src/components/PageSkeleton.svelte +2 -1
- package/src/components/PasswordInput.svelte +95 -0
- package/src/components/ProfilePage.svelte +166 -0
- package/src/components/RegisterPage.svelte +35 -164
- package/src/components/ShowPage.svelte +32 -33
- package/src/components/Sidebar.svelte +185 -73
- package/src/components/StatsCard.svelte +12 -3
- package/src/components/StepsForm.svelte +139 -0
- package/src/components/Toast.svelte +15 -54
- package/src/components/TooltipButton.svelte +52 -0
- package/src/components/UndoableNotification.svelte +28 -96
- package/src/components/UpdatePasswordPage.svelte +32 -160
- package/src/components/buttons/RefreshButton.svelte +7 -2
- package/src/components/fieldComponentMap.ts +79 -0
- package/src/components/fields/BooleanField.svelte +9 -9
- package/src/components/fields/EmailField.svelte +2 -8
- package/src/components/fields/FileField.svelte +4 -9
- package/src/components/fields/ImageField.svelte +2 -7
- package/src/components/fields/JsonField.svelte +72 -0
- package/src/components/fields/MarkdownField.svelte +2 -12
- package/src/components/fields/MultiSelectField.svelte +20 -0
- package/src/components/fields/RelationField.svelte +24 -0
- package/src/components/fields/RichTextField.svelte +35 -0
- package/src/components/fields/SelectField.svelte +14 -0
- package/src/components/fields/TagField.svelte +6 -11
- package/src/components/fields/TextField.svelte +2 -7
- package/src/components/fields/UrlField.svelte +4 -10
- package/src/components/ui/alert-dialog/alert-dialog-content.svelte +25 -0
- package/src/components/ui/alert-dialog/alert-dialog-description.svelte +16 -0
- package/src/components/ui/alert-dialog/alert-dialog-footer.svelte +8 -0
- package/src/components/ui/alert-dialog/alert-dialog-header.svelte +8 -0
- package/src/components/ui/alert-dialog/alert-dialog-overlay.svelte +16 -0
- package/src/components/ui/alert-dialog/alert-dialog-portal.svelte +6 -0
- package/src/components/ui/alert-dialog/alert-dialog-title.svelte +16 -0
- package/src/components/ui/alert-dialog/index.ts +20 -0
- package/src/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +18 -0
- package/src/components/ui/breadcrumb/breadcrumb-item.svelte +15 -0
- package/src/components/ui/breadcrumb/breadcrumb-link.svelte +15 -0
- package/src/components/ui/breadcrumb/breadcrumb-list.svelte +15 -0
- package/src/components/ui/breadcrumb/breadcrumb-page.svelte +18 -0
- package/src/components/ui/breadcrumb/breadcrumb-separator.svelte +22 -0
- package/src/components/ui/breadcrumb/breadcrumb.svelte +11 -0
- package/src/components/ui/breadcrumb/index.ts +7 -0
- package/src/components/ui/collapsible/index.ts +7 -0
- package/src/components/ui/command/command-dialog.svelte +31 -0
- package/src/components/ui/command/index.ts +2 -0
- package/src/components/ui/context-menu/index.ts +11 -0
- package/src/components/ui/drawer/drawer-content.svelte +21 -0
- package/src/components/ui/drawer/drawer-description.svelte +11 -0
- package/src/components/ui/drawer/drawer-footer.svelte +11 -0
- package/src/components/ui/drawer/drawer-header.svelte +11 -0
- package/src/components/ui/drawer/drawer-title.svelte +11 -0
- package/src/components/ui/drawer/drawer.svelte +18 -0
- package/src/components/ui/drawer/index.ts +6 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +43 -0
- package/src/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +27 -0
- package/src/components/ui/dropdown-menu/index.ts +6 -0
- package/src/components/ui/label/index.ts +1 -0
- package/src/components/ui/label/label.svelte +18 -0
- package/src/components/ui/pagination/index.ts +7 -0
- package/src/components/ui/pagination/pagination-content.svelte +11 -0
- package/src/components/ui/pagination/pagination-ellipsis.svelte +12 -0
- package/src/components/ui/pagination/pagination-item.svelte +11 -0
- package/src/components/ui/pagination/pagination-link.svelte +26 -0
- package/src/components/ui/pagination/pagination-next.svelte +22 -0
- package/src/components/ui/pagination/pagination-previous.svelte +22 -0
- package/src/components/ui/pagination/pagination.svelte +11 -0
- package/src/components/ui/popover/index.ts +12 -0
- package/src/components/ui/popover/popover-content.svelte +25 -0
- package/src/components/ui/progress/index.ts +1 -0
- package/src/components/ui/progress/progress.svelte +22 -0
- package/src/components/ui/scroll-area/index.ts +1 -0
- package/src/components/ui/scroll-area/scroll-area.svelte +20 -0
- package/src/components/ui/sheet/index.ts +15 -1
- package/src/components/ui/sheet/sheet-content.svelte +28 -0
- package/src/components/ui/sheet/sheet-description.svelte +22 -0
- package/src/components/ui/sheet/sheet-footer.svelte +22 -0
- package/src/components/ui/sheet/sheet-header.svelte +22 -0
- package/src/components/ui/sheet/sheet-title.svelte +22 -0
- package/src/index.ts +31 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLButtonAttributes>;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
child,
|
|
12
|
+
...restProps
|
|
13
|
+
}: Props & { child?: import("svelte").Snippet<[{ props: Record<string, unknown> }]> } = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if child}
|
|
17
|
+
{@render child({ props: { ...restProps, class: cn(className), "data-slot": "dropdown-menu-trigger" } })}
|
|
18
|
+
{:else}
|
|
19
|
+
<button
|
|
20
|
+
bind:this={ref}
|
|
21
|
+
data-slot="dropdown-menu-trigger"
|
|
22
|
+
class={cn(className)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{@render children?.()}
|
|
26
|
+
</button>
|
|
27
|
+
{/if}
|
|
@@ -2,14 +2,20 @@ import DropdownMenu from "./dropdown-menu.svelte";
|
|
|
2
2
|
import DropdownMenuContent from "./dropdown-menu-content.svelte";
|
|
3
3
|
import DropdownMenuItem from "./dropdown-menu-item.svelte";
|
|
4
4
|
import DropdownMenuSeparator from "./dropdown-menu-separator.svelte";
|
|
5
|
+
import DropdownMenuTrigger from "./dropdown-menu-trigger.svelte";
|
|
6
|
+
import DropdownMenuCheckboxItem from "./dropdown-menu-checkbox-item.svelte";
|
|
5
7
|
|
|
6
8
|
export {
|
|
7
9
|
DropdownMenu,
|
|
8
10
|
DropdownMenuContent,
|
|
9
11
|
DropdownMenuItem,
|
|
10
12
|
DropdownMenuSeparator,
|
|
13
|
+
DropdownMenuTrigger,
|
|
14
|
+
DropdownMenuCheckboxItem,
|
|
11
15
|
DropdownMenu as Root,
|
|
12
16
|
DropdownMenuContent as Content,
|
|
13
17
|
DropdownMenuItem as Item,
|
|
14
18
|
DropdownMenuSeparator as Separator,
|
|
19
|
+
DropdownMenuTrigger as Trigger,
|
|
20
|
+
DropdownMenuCheckboxItem as CheckboxItem,
|
|
15
21
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Label } from './label.svelte';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../utils.js';
|
|
3
|
+
import type { HTMLLabelAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let { ref = $bindable(null), class: className, children, ...restProps }: WithElementRef<HTMLLabelAttributes> = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<label
|
|
9
|
+
bind:this={ref}
|
|
10
|
+
data-slot="label"
|
|
11
|
+
class={cn(
|
|
12
|
+
"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",
|
|
13
|
+
className
|
|
14
|
+
)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
>
|
|
17
|
+
{@render children?.()}
|
|
18
|
+
</label>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as Root } from './pagination.svelte';
|
|
2
|
+
export { default as Content } from './pagination-content.svelte';
|
|
3
|
+
export { default as Item } from './pagination-item.svelte';
|
|
4
|
+
export { default as Link } from './pagination-link.svelte';
|
|
5
|
+
export { default as Ellipsis } from './pagination-ellipsis.svelte';
|
|
6
|
+
export { default as Previous } from './pagination-previous.svelte';
|
|
7
|
+
export { default as Next } from './pagination-next.svelte';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
|
+
|
|
6
|
+
let { class: className, children, ...restProps }: HTMLAttributes<HTMLUListElement> & { children?: Snippet } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<ul data-slot="pagination-content" class={cn("flex flex-row items-center gap-1", className)} {...restProps}>
|
|
10
|
+
{@render children?.()}
|
|
11
|
+
</ul>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import { Ellipsis } from 'lucide-svelte';
|
|
5
|
+
|
|
6
|
+
let { class: className, ...restProps }: HTMLAttributes<HTMLSpanElement> = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<span aria-hidden data-slot="pagination-ellipsis" class={cn("flex size-9 items-center justify-center", className)} {...restProps}>
|
|
10
|
+
<Ellipsis class="size-4" />
|
|
11
|
+
<span class="sr-only">More pages</span>
|
|
12
|
+
</span>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLLiAttributes } from 'svelte/elements';
|
|
5
|
+
|
|
6
|
+
let { class: className, children, ...restProps }: HTMLLiAttributes & { children?: Snippet } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<li data-slot="pagination-item" class={cn("", className)} {...restProps}>
|
|
10
|
+
{@render children?.()}
|
|
11
|
+
</li>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
5
|
+
import { buttonVariants } from '../button/index.js';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
class: className,
|
|
9
|
+
isActive = false,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: HTMLButtonAttributes & { isActive?: boolean; children?: Snippet } = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<button
|
|
16
|
+
aria-current={isActive ? 'page' : undefined}
|
|
17
|
+
data-slot="pagination-link"
|
|
18
|
+
data-active={isActive}
|
|
19
|
+
class={cn(
|
|
20
|
+
buttonVariants({ variant: isActive ? 'outline' : 'ghost', size: 'icon-sm' }),
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{@render children?.()}
|
|
26
|
+
</button>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
5
|
+
import { buttonVariants } from '../button/index.js';
|
|
6
|
+
import { ChevronRight } from 'lucide-svelte';
|
|
7
|
+
|
|
8
|
+
let { class: className, children, ...restProps }: HTMLButtonAttributes & { children?: Snippet } = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<button
|
|
12
|
+
aria-label="Go to next page"
|
|
13
|
+
data-slot="pagination-next"
|
|
14
|
+
class={cn(buttonVariants({ variant: 'ghost', size: 'icon-sm' }), "gap-1", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
>
|
|
17
|
+
{#if children}
|
|
18
|
+
{@render children()}
|
|
19
|
+
{:else}
|
|
20
|
+
<ChevronRight class="size-4" />
|
|
21
|
+
{/if}
|
|
22
|
+
</button>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
5
|
+
import { buttonVariants } from '../button/index.js';
|
|
6
|
+
import { ChevronLeft } from 'lucide-svelte';
|
|
7
|
+
|
|
8
|
+
let { class: className, children, ...restProps }: HTMLButtonAttributes & { children?: Snippet } = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<button
|
|
12
|
+
aria-label="Go to previous page"
|
|
13
|
+
data-slot="pagination-previous"
|
|
14
|
+
class={cn(buttonVariants({ variant: 'ghost', size: 'icon-sm' }), "gap-1", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
>
|
|
17
|
+
{#if children}
|
|
18
|
+
{@render children()}
|
|
19
|
+
{:else}
|
|
20
|
+
<ChevronLeft class="size-4" />
|
|
21
|
+
{/if}
|
|
22
|
+
</button>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
5
|
+
|
|
6
|
+
let { class: className, children, ...restProps }: HTMLAttributes<HTMLElement> & { children?: Snippet } = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<nav aria-label="pagination" data-slot="pagination" class={cn("mx-auto flex w-full justify-center", className)} {...restProps}>
|
|
10
|
+
{@render children?.()}
|
|
11
|
+
</nav>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive } from "bits-ui";
|
|
2
|
+
|
|
3
|
+
const Root = PopoverPrimitive.Root;
|
|
4
|
+
const Trigger = PopoverPrimitive.Trigger;
|
|
5
|
+
const Close = PopoverPrimitive.Close;
|
|
6
|
+
|
|
7
|
+
export {
|
|
8
|
+
Root,
|
|
9
|
+
Trigger,
|
|
10
|
+
Close,
|
|
11
|
+
};
|
|
12
|
+
export { default as Content } from "./popover-content.svelte";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Popover as PopoverPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
align = "center",
|
|
9
|
+
sideOffset = 4,
|
|
10
|
+
...restProps
|
|
11
|
+
}: PopoverPrimitive.ContentProps & { class?: string } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<PopoverPrimitive.Portal>
|
|
15
|
+
<PopoverPrimitive.Content
|
|
16
|
+
bind:ref
|
|
17
|
+
{align}
|
|
18
|
+
{sideOffset}
|
|
19
|
+
class={cn(
|
|
20
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
/>
|
|
25
|
+
</PopoverPrimitive.Portal>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Progress } from "./progress.svelte";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../utils.js";
|
|
3
|
+
|
|
4
|
+
let { value = 0, max = 100, class: className, ...restProps }:
|
|
5
|
+
{ value?: number; max?: number; class?: string } & Record<string, unknown> = $props();
|
|
6
|
+
|
|
7
|
+
const percentage = $derived(Math.min(100, Math.max(0, (value / max) * 100)));
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div
|
|
11
|
+
class={cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className)}
|
|
12
|
+
role="progressbar"
|
|
13
|
+
aria-valuenow={value}
|
|
14
|
+
aria-valuemin={0}
|
|
15
|
+
aria-valuemax={max}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
<div
|
|
19
|
+
class="h-full w-full flex-1 bg-primary transition-all duration-200"
|
|
20
|
+
style="transform: translateX(-{100 - percentage}%)"
|
|
21
|
+
></div>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ScrollArea } from "./scroll-area.svelte";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from "svelte";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let { class: className, children, orientation = 'vertical', ...restProps }:
|
|
6
|
+
{ class?: string; children: Snippet; orientation?: 'vertical' | 'horizontal' } & Record<string, unknown> = $props();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div
|
|
10
|
+
class={cn("relative overflow-hidden", className)}
|
|
11
|
+
{...restProps}
|
|
12
|
+
>
|
|
13
|
+
<div class={cn(
|
|
14
|
+
"h-full w-full overflow-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border hover:scrollbar-thumb-muted-foreground/50",
|
|
15
|
+
orientation === 'horizontal' ? 'overflow-x-auto overflow-y-hidden' : 'overflow-y-auto overflow-x-hidden'
|
|
16
|
+
)}>
|
|
17
|
+
{@render children()}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
@@ -1,2 +1,16 @@
|
|
|
1
1
|
import Root from "./sheet.svelte";
|
|
2
|
-
|
|
2
|
+
import Content from "./sheet-content.svelte";
|
|
3
|
+
import Header from "./sheet-header.svelte";
|
|
4
|
+
import Title from "./sheet-title.svelte";
|
|
5
|
+
import Description from "./sheet-description.svelte";
|
|
6
|
+
import Footer from "./sheet-footer.svelte";
|
|
7
|
+
|
|
8
|
+
export {
|
|
9
|
+
Root,
|
|
10
|
+
Content,
|
|
11
|
+
Header,
|
|
12
|
+
Title,
|
|
13
|
+
Description,
|
|
14
|
+
Footer,
|
|
15
|
+
Root as Sheet,
|
|
16
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
side?: "left" | "right";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
ref = $bindable(null),
|
|
11
|
+
side = "right",
|
|
12
|
+
class: className,
|
|
13
|
+
children,
|
|
14
|
+
...restProps
|
|
15
|
+
}: Props = $props();
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
bind:this={ref}
|
|
20
|
+
data-slot="sheet-content"
|
|
21
|
+
class={cn(
|
|
22
|
+
"flex flex-col gap-4 h-full",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...restProps}
|
|
26
|
+
>
|
|
27
|
+
{@render children?.()}
|
|
28
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLAttributes<HTMLParagraphElement>>;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<p
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
data-slot="sheet-description"
|
|
18
|
+
class={cn("text-sm text-muted-foreground", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</p>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>>;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
data-slot="sheet-footer"
|
|
18
|
+
class={cn("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLAttributes<HTMLDivElement>>;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<div
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
data-slot="sheet-header"
|
|
18
|
+
class={cn("flex flex-col gap-1.5 pb-4", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
type Props = WithElementRef<HTMLAttributes<HTMLHeadingElement>>;
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
children,
|
|
11
|
+
...restProps
|
|
12
|
+
}: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<h3
|
|
16
|
+
bind:this={ref}
|
|
17
|
+
data-slot="sheet-title"
|
|
18
|
+
class={cn("text-lg font-semibold text-foreground", className)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
>
|
|
21
|
+
{@render children?.()}
|
|
22
|
+
</h3>
|
package/src/index.ts
CHANGED
|
@@ -28,6 +28,7 @@ export { default as DrawerForm } from './components/DrawerForm.svelte';
|
|
|
28
28
|
export { default as DevTools } from './components/DevTools.svelte';
|
|
29
29
|
export { default as Authenticated } from './components/Authenticated.svelte';
|
|
30
30
|
export { default as UpdatePasswordPage } from './components/UpdatePasswordPage.svelte';
|
|
31
|
+
export { default as ProfilePage } from './components/ProfilePage.svelte';
|
|
31
32
|
export { default as ConfigErrorScreen } from './components/ConfigErrorScreen.svelte';
|
|
32
33
|
export { default as InferencerPanel } from './components/InferencerPanel.svelte';
|
|
33
34
|
export { default as LiveIndicator } from './components/LiveIndicator.svelte';
|
|
@@ -40,6 +41,11 @@ export { default as PageSkeleton } from './components/PageSkeleton.svelte';
|
|
|
40
41
|
export { default as NavigateToResource } from './components/NavigateToResource.svelte';
|
|
41
42
|
export { default as CatchAllNavigate } from './components/CatchAllNavigate.svelte';
|
|
42
43
|
export { default as ThemedTitle } from './components/ThemedTitle.svelte';
|
|
44
|
+
export { default as CommandPalette } from './components/CommandPalette.svelte';
|
|
45
|
+
export { default as StepsForm } from './components/StepsForm.svelte';
|
|
46
|
+
export { default as InfiniteList } from './components/InfiniteList.svelte';
|
|
47
|
+
export { default as ComboboxField } from './components/ComboboxField.svelte';
|
|
48
|
+
export { default as PasswordInput } from './components/PasswordInput.svelte';
|
|
43
49
|
|
|
44
50
|
// Field display components
|
|
45
51
|
export { default as NumberField } from './components/fields/NumberField.svelte';
|
|
@@ -52,6 +58,11 @@ export { default as FileField } from './components/fields/FileField.svelte';
|
|
|
52
58
|
export { default as MarkdownField } from './components/fields/MarkdownField.svelte';
|
|
53
59
|
export { default as TextField } from './components/fields/TextField.svelte';
|
|
54
60
|
export { default as ImageField } from './components/fields/ImageField.svelte';
|
|
61
|
+
export { default as SelectField } from './components/fields/SelectField.svelte';
|
|
62
|
+
export { default as MultiSelectField } from './components/fields/MultiSelectField.svelte';
|
|
63
|
+
export { default as RelationField } from './components/fields/RelationField.svelte';
|
|
64
|
+
export { default as JsonField } from './components/fields/JsonField.svelte';
|
|
65
|
+
export { default as RichTextField } from './components/fields/RichTextField.svelte';
|
|
55
66
|
|
|
56
67
|
// CRUD Buttons
|
|
57
68
|
export {
|
|
@@ -70,7 +81,7 @@ export { Badge } from './components/ui/badge/index.js';
|
|
|
70
81
|
export { Separator } from './components/ui/separator/index.js';
|
|
71
82
|
export { Avatar } from './components/ui/avatar/index.js';
|
|
72
83
|
export { Skeleton } from './components/ui/skeleton/index.js';
|
|
73
|
-
export
|
|
84
|
+
export * as Sheet from './components/ui/sheet/index.js';
|
|
74
85
|
export * as Alert from './components/ui/alert/index.js';
|
|
75
86
|
export * as Card from './components/ui/card/index.js';
|
|
76
87
|
export * as Dialog from './components/ui/dialog/index.js';
|
|
@@ -79,5 +90,24 @@ export * as Tabs from './components/ui/tabs/index.js';
|
|
|
79
90
|
export * as Tooltip from './components/ui/tooltip/index.js';
|
|
80
91
|
export * as DropdownMenu from './components/ui/dropdown-menu/index.js';
|
|
81
92
|
|
|
93
|
+
// Additional shadcn components
|
|
94
|
+
export * as Breadcrumb from './components/ui/breadcrumb/index.js';
|
|
95
|
+
export * as Pagination from './components/ui/pagination/index.js';
|
|
96
|
+
export * as ContextMenu from './components/ui/context-menu/index.js';
|
|
97
|
+
export * as Drawer from './components/ui/drawer/index.js';
|
|
98
|
+
export * as Collapsible from './components/ui/collapsible/index.js';
|
|
99
|
+
export { Label } from './components/ui/label/index.js';
|
|
100
|
+
export { Command } from './components/ui/command/index.js';
|
|
101
|
+
|
|
82
102
|
// Utils
|
|
83
103
|
export { cn } from './utils';
|
|
104
|
+
|
|
105
|
+
// Field component registry
|
|
106
|
+
export {
|
|
107
|
+
builtinDisplayComponents, registerDisplayComponent,
|
|
108
|
+
getDisplayComponent, hasDisplayComponent,
|
|
109
|
+
} from './components/fieldComponentMap';
|
|
110
|
+
export type { FieldComponentMap } from './components/fieldComponentMap';
|
|
111
|
+
|
|
112
|
+
// Svelte Actions
|
|
113
|
+
export { clickOutside, shortcut, intersect, copyOnClick } from './actions';
|