@svadmin/ui 0.29.0 → 0.29.2
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 +20 -9
- package/src/README.md +0 -18
- package/src/actions.ts +0 -110
- package/src/app.css +0 -519
- package/src/component-registry.svelte.ts +0 -60
- package/src/components/AICommandBar.svelte +0 -180
- package/src/components/AboutSettings.svelte +0 -106
- package/src/components/AdminApp.svelte +0 -199
- package/src/components/AnimatedCounter.svelte +0 -46
- package/src/components/AnomalyBadge.svelte +0 -65
- package/src/components/AppearanceSettings.svelte +0 -183
- package/src/components/AuditLogDrawer.svelte +0 -93
- package/src/components/AuditLogViewer.svelte +0 -226
- package/src/components/Authenticated.svelte +0 -51
- package/src/components/AutoForm.svelte +0 -242
- package/src/components/AutoSaveIndicator.svelte +0 -35
- package/src/components/AutoTable.svelte +0 -839
- package/src/components/Breadcrumbs.svelte +0 -58
- package/src/components/CanAccess.svelte +0 -23
- package/src/components/CatchAllNavigate.svelte +0 -21
- package/src/components/ChatDialog.svelte +0 -535
- package/src/components/ComboboxField.svelte +0 -129
- package/src/components/CommandPalette.svelte +0 -135
- package/src/components/ConfigErrorScreen.svelte +0 -126
- package/src/components/ConfirmDialog.svelte +0 -53
- package/src/components/CopilotPanel.svelte +0 -163
- package/src/components/CreatePage.svelte +0 -39
- package/src/components/DevTools.svelte +0 -149
- package/src/components/DraggableGrid.svelte +0 -86
- package/src/components/DraggableHeader.svelte +0 -112
- package/src/components/DrawerForm.svelte +0 -35
- package/src/components/EditPage.svelte +0 -52
- package/src/components/EmptyState.svelte +0 -31
- package/src/components/ErrorBoundary.svelte +0 -49
- package/src/components/ErrorComponent.svelte +0 -36
- package/src/components/FieldRenderer.svelte +0 -357
- package/src/components/ForgotPasswordPage.svelte +0 -112
- package/src/components/Header.svelte +0 -94
- package/src/components/InferencerPanel.svelte +0 -192
- package/src/components/InfiniteList.svelte +0 -93
- package/src/components/InlineEdit.svelte +0 -88
- package/src/components/InsightCard.svelte +0 -98
- package/src/components/KeyboardShortcuts.svelte +0 -61
- package/src/components/Layout.svelte +0 -167
- package/src/components/ListPage.svelte +0 -71
- package/src/components/LiveIndicator.svelte +0 -58
- package/src/components/LoginPage.svelte +0 -163
- package/src/components/MarkdownRenderer.svelte +0 -127
- package/src/components/ModalForm.svelte +0 -38
- package/src/components/NavigateToResource.svelte +0 -20
- package/src/components/PageHeader.svelte +0 -39
- package/src/components/PageSkeleton.svelte +0 -71
- package/src/components/PasswordInput.svelte +0 -96
- package/src/components/PermissionMatrix.svelte +0 -185
- package/src/components/ProfilePage.svelte +0 -284
- package/src/components/RegisterPage.svelte +0 -112
- package/src/components/RolesSettings.svelte +0 -146
- package/src/components/SettingsPage.svelte +0 -113
- package/src/components/ShowPage.svelte +0 -73
- package/src/components/Sidebar.svelte +0 -417
- package/src/components/SidebarItem.svelte +0 -129
- package/src/components/SmartSuggest.svelte +0 -158
- package/src/components/StatsCard.svelte +0 -79
- package/src/components/StepsForm.svelte +0 -192
- package/src/components/TaskQueueDrawer.svelte +0 -158
- package/src/components/TenantSwitcher.svelte +0 -84
- package/src/components/ThemedTitle.svelte +0 -32
- package/src/components/Toast.svelte +0 -46
- package/src/components/TooltipButton.svelte +0 -42
- package/src/components/UndoableNotification.svelte +0 -69
- package/src/components/UpdatePasswordPage.svelte +0 -89
- package/src/components/VirtualTable.svelte +0 -76
- package/src/components/VoiceInput.svelte +0 -120
- package/src/components/buttons/CloneButton.svelte +0 -30
- package/src/components/buttons/CreateButton.svelte +0 -29
- package/src/components/buttons/DeleteButton.svelte +0 -59
- package/src/components/buttons/EditButton.svelte +0 -30
- package/src/components/buttons/ExportButton.svelte +0 -30
- package/src/components/buttons/ImportButton.svelte +0 -56
- package/src/components/buttons/ListButton.svelte +0 -23
- package/src/components/buttons/RefreshButton.svelte +0 -36
- package/src/components/buttons/SaveButton.svelte +0 -27
- package/src/components/buttons/ShowButton.svelte +0 -31
- package/src/components/buttons/index.ts +0 -10
- package/src/components/charts/BarChart.svelte +0 -69
- package/src/components/charts/LineChart.svelte +0 -115
- package/src/components/charts/PieChart.svelte +0 -95
- package/src/components/charts/index.ts +0 -3
- package/src/components/fieldComponentMap.ts +0 -79
- package/src/components/fields/ArrayField.svelte +0 -86
- package/src/components/fields/BooleanField.svelte +0 -13
- package/src/components/fields/DateField.svelte +0 -6
- package/src/components/fields/EmailField.svelte +0 -9
- package/src/components/fields/FileField.svelte +0 -14
- package/src/components/fields/ImageField.svelte +0 -9
- package/src/components/fields/JsonField.svelte +0 -72
- package/src/components/fields/MarkdownField.svelte +0 -9
- package/src/components/fields/MultiSelectField.svelte +0 -21
- package/src/components/fields/NumberField.svelte +0 -6
- package/src/components/fields/RelationField.svelte +0 -24
- package/src/components/fields/RichTextField.svelte +0 -35
- package/src/components/fields/SelectField.svelte +0 -14
- package/src/components/fields/TagField.svelte +0 -12
- package/src/components/fields/TextField.svelte +0 -11
- package/src/components/fields/UrlField.svelte +0 -14
- package/src/components/ui/alert/alert-description.svelte +0 -17
- package/src/components/ui/alert/alert-title.svelte +0 -17
- package/src/components/ui/alert/alert.svelte +0 -44
- package/src/components/ui/alert/index.ts +0 -15
- package/src/components/ui/alert-dialog/alert-dialog-content.svelte +0 -29
- package/src/components/ui/alert-dialog/alert-dialog-description.svelte +0 -16
- package/src/components/ui/alert-dialog/alert-dialog-footer.svelte +0 -11
- package/src/components/ui/alert-dialog/alert-dialog-header.svelte +0 -11
- package/src/components/ui/alert-dialog/alert-dialog-overlay.svelte +0 -16
- package/src/components/ui/alert-dialog/alert-dialog-portal.svelte +0 -6
- package/src/components/ui/alert-dialog/alert-dialog-title.svelte +0 -16
- package/src/components/ui/alert-dialog/index.ts +0 -20
- package/src/components/ui/avatar/avatar.svelte +0 -63
- package/src/components/ui/avatar/index.ts +0 -2
- package/src/components/ui/badge/badge.svelte +0 -49
- package/src/components/ui/badge/index.ts +0 -3
- package/src/components/ui/breadcrumb/breadcrumb-ellipsis.svelte +0 -18
- package/src/components/ui/breadcrumb/breadcrumb-item.svelte +0 -15
- package/src/components/ui/breadcrumb/breadcrumb-link.svelte +0 -15
- package/src/components/ui/breadcrumb/breadcrumb-list.svelte +0 -15
- package/src/components/ui/breadcrumb/breadcrumb-page.svelte +0 -18
- package/src/components/ui/breadcrumb/breadcrumb-separator.svelte +0 -22
- package/src/components/ui/breadcrumb/breadcrumb.svelte +0 -11
- package/src/components/ui/breadcrumb/index.ts +0 -7
- package/src/components/ui/button/button.svelte +0 -90
- package/src/components/ui/button/index.ts +0 -18
- package/src/components/ui/card/card-action.svelte +0 -23
- package/src/components/ui/card/card-content.svelte +0 -20
- package/src/components/ui/card/card-description.svelte +0 -20
- package/src/components/ui/card/card-footer.svelte +0 -20
- package/src/components/ui/card/card-header.svelte +0 -23
- package/src/components/ui/card/card-title.svelte +0 -15
- package/src/components/ui/card/card.svelte +0 -22
- package/src/components/ui/card/index.ts +0 -25
- package/src/components/ui/checkbox/checkbox.svelte +0 -39
- package/src/components/ui/checkbox/index.ts +0 -6
- package/src/components/ui/collapsible/index.ts +0 -7
- package/src/components/ui/command/command-dialog.svelte +0 -31
- package/src/components/ui/command/index.ts +0 -2
- package/src/components/ui/context-menu/index.ts +0 -11
- package/src/components/ui/dialog/dialog-close.svelte +0 -11
- package/src/components/ui/dialog/dialog-content.svelte +0 -48
- package/src/components/ui/dialog/dialog-description.svelte +0 -17
- package/src/components/ui/dialog/dialog-footer.svelte +0 -32
- package/src/components/ui/dialog/dialog-header.svelte +0 -20
- package/src/components/ui/dialog/dialog-overlay.svelte +0 -17
- package/src/components/ui/dialog/dialog-portal.svelte +0 -7
- package/src/components/ui/dialog/dialog-title.svelte +0 -17
- package/src/components/ui/dialog/dialog-trigger.svelte +0 -11
- package/src/components/ui/dialog/dialog.svelte +0 -7
- package/src/components/ui/dialog/index.ts +0 -34
- package/src/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +0 -43
- package/src/components/ui/dropdown-menu/dropdown-menu-content.svelte +0 -35
- package/src/components/ui/dropdown-menu/dropdown-menu-item.svelte +0 -36
- package/src/components/ui/dropdown-menu/dropdown-menu-separator.svelte +0 -10
- package/src/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +0 -27
- package/src/components/ui/dropdown-menu/dropdown-menu.svelte +0 -45
- package/src/components/ui/dropdown-menu/index.ts +0 -21
- package/src/components/ui/input/index.ts +0 -7
- package/src/components/ui/input/input.svelte +0 -48
- package/src/components/ui/label/index.ts +0 -1
- package/src/components/ui/label/label.svelte +0 -18
- package/src/components/ui/pagination/index.ts +0 -7
- package/src/components/ui/pagination/pagination-content.svelte +0 -11
- package/src/components/ui/pagination/pagination-ellipsis.svelte +0 -12
- package/src/components/ui/pagination/pagination-item.svelte +0 -11
- package/src/components/ui/pagination/pagination-link.svelte +0 -26
- package/src/components/ui/pagination/pagination-next.svelte +0 -22
- package/src/components/ui/pagination/pagination-previous.svelte +0 -22
- package/src/components/ui/pagination/pagination.svelte +0 -11
- package/src/components/ui/popover/index.ts +0 -12
- package/src/components/ui/popover/popover-content.svelte +0 -25
- package/src/components/ui/progress/index.ts +0 -1
- package/src/components/ui/progress/progress.svelte +0 -22
- package/src/components/ui/scroll-area/index.ts +0 -1
- package/src/components/ui/scroll-area/scroll-area.svelte +0 -20
- package/src/components/ui/select/index.ts +0 -2
- package/src/components/ui/select/select.svelte +0 -36
- package/src/components/ui/separator/index.ts +0 -7
- package/src/components/ui/separator/separator.svelte +0 -23
- package/src/components/ui/sheet/index.ts +0 -16
- package/src/components/ui/sheet/sheet-content.svelte +0 -28
- package/src/components/ui/sheet/sheet-description.svelte +0 -22
- package/src/components/ui/sheet/sheet-footer.svelte +0 -22
- package/src/components/ui/sheet/sheet-header.svelte +0 -22
- package/src/components/ui/sheet/sheet-title.svelte +0 -22
- package/src/components/ui/sheet/sheet.svelte +0 -78
- package/src/components/ui/skeleton/index.ts +0 -2
- package/src/components/ui/skeleton/skeleton.svelte +0 -21
- package/src/components/ui/switch/index.ts +0 -2
- package/src/components/ui/switch/switch.svelte +0 -49
- package/src/components/ui/table/index.ts +0 -28
- package/src/components/ui/table/table-body.svelte +0 -15
- package/src/components/ui/table/table-caption.svelte +0 -20
- package/src/components/ui/table/table-cell.svelte +0 -15
- package/src/components/ui/table/table-footer.svelte +0 -20
- package/src/components/ui/table/table-head.svelte +0 -15
- package/src/components/ui/table/table-header.svelte +0 -20
- package/src/components/ui/table/table-row.svelte +0 -15
- package/src/components/ui/table/table.svelte +0 -17
- package/src/components/ui/tabs/index.ts +0 -15
- package/src/components/ui/tabs/tabs-content.svelte +0 -30
- package/src/components/ui/tabs/tabs-list.svelte +0 -26
- package/src/components/ui/tabs/tabs-trigger.svelte +0 -37
- package/src/components/ui/tabs/tabs.svelte +0 -27
- package/src/components/ui/textarea/index.ts +0 -2
- package/src/components/ui/textarea/textarea.svelte +0 -24
- package/src/components/ui/tooltip/index.ts +0 -19
- package/src/components/ui/tooltip/tooltip-content.svelte +0 -52
- package/src/components/ui/tooltip/tooltip-portal.svelte +0 -7
- package/src/components/ui/tooltip/tooltip-provider.svelte +0 -7
- package/src/components/ui/tooltip/tooltip-trigger.svelte +0 -7
- package/src/components/ui/tooltip/tooltip.svelte +0 -10
- package/src/editor-config.svelte.ts +0 -23
- package/src/index.ts +0 -155
- package/src/markdown-deps.d.ts +0 -21
- package/src/router-state.svelte.ts +0 -65
- package/src/types.ts +0 -33
- package/src/utils.ts +0 -28
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Separator as SeparatorPrimitive } from "bits-ui";
|
|
3
|
-
import { cn } from "../../../utils.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
"data-slot": dataSlot = "separator",
|
|
9
|
-
...restProps
|
|
10
|
-
}: SeparatorPrimitive.RootProps = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<SeparatorPrimitive.Root
|
|
14
|
-
bind:ref
|
|
15
|
-
data-slot={dataSlot}
|
|
16
|
-
class={cn(
|
|
17
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px",
|
|
18
|
-
// this is different in shadcn/ui but self-stretch breaks things for us
|
|
19
|
-
"data-[orientation=vertical]:h-full",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
{...restProps}
|
|
23
|
-
/>
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import Root from "./sheet.svelte";
|
|
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
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
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>
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|
|
@@ -1,22 +0,0 @@
|
|
|
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>
|
|
@@ -1,78 +0,0 @@
|
|
|
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
|
-
open?: boolean;
|
|
7
|
-
side?: "left" | "right";
|
|
8
|
-
onClose?: () => void;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
let {
|
|
12
|
-
ref = $bindable(null),
|
|
13
|
-
open = $bindable(false),
|
|
14
|
-
side = "right",
|
|
15
|
-
onClose,
|
|
16
|
-
class: className,
|
|
17
|
-
children,
|
|
18
|
-
...restProps
|
|
19
|
-
}: Props = $props();
|
|
20
|
-
|
|
21
|
-
function close() {
|
|
22
|
-
open = false;
|
|
23
|
-
onClose?.();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function handleKeydown(e: KeyboardEvent) {
|
|
27
|
-
if (e.key === "Escape") close();
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
$effect(() => {
|
|
31
|
-
if (open) {
|
|
32
|
-
document.addEventListener("keydown", handleKeydown);
|
|
33
|
-
document.body.style.overflow = "hidden";
|
|
34
|
-
return () => {
|
|
35
|
-
document.removeEventListener("keydown", handleKeydown);
|
|
36
|
-
document.body.style.overflow = "";
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
{#if open}
|
|
43
|
-
<!-- Overlay -->
|
|
44
|
-
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
|
45
|
-
<div
|
|
46
|
-
role="presentation"
|
|
47
|
-
class="fixed inset-0 z-50 bg-black/80 animate-in fade-in-0"
|
|
48
|
-
onclick={close}
|
|
49
|
-
></div>
|
|
50
|
-
|
|
51
|
-
<!-- Sheet panel -->
|
|
52
|
-
<div
|
|
53
|
-
bind:this={ref}
|
|
54
|
-
data-slot="sheet"
|
|
55
|
-
class={cn(
|
|
56
|
-
"fixed z-50 flex flex-col gap-4 bg-background p-6 shadow-lg transition-transform",
|
|
57
|
-
side === "right"
|
|
58
|
-
? "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l animate-in slide-in-from-right"
|
|
59
|
-
: "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r animate-in slide-in-from-left",
|
|
60
|
-
className
|
|
61
|
-
)}
|
|
62
|
-
{...restProps}
|
|
63
|
-
>
|
|
64
|
-
{@render children?.()}
|
|
65
|
-
|
|
66
|
-
<!-- Close button -->
|
|
67
|
-
<button
|
|
68
|
-
type="button"
|
|
69
|
-
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"
|
|
70
|
-
onclick={close}
|
|
71
|
-
>
|
|
72
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
73
|
-
<path d="M18 6 6 18"/><path d="m6 6 12 12"/>
|
|
74
|
-
</svg>
|
|
75
|
-
<span class="sr-only">Close</span>
|
|
76
|
-
</button>
|
|
77
|
-
</div>
|
|
78
|
-
{/if}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
class?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
ref = $bindable(null),
|
|
11
|
-
class: className,
|
|
12
|
-
...restProps
|
|
13
|
-
}: Props = $props();
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<div
|
|
17
|
-
bind:this={ref}
|
|
18
|
-
data-slot="skeleton"
|
|
19
|
-
class={cn("animate-pulse rounded-md bg-muted", className)}
|
|
20
|
-
{...restProps}
|
|
21
|
-
></div>
|
|
@@ -1,49 +0,0 @@
|
|
|
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, HTMLButtonElement> & {
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onCheckedChange?: (checked: boolean) => void;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
let {
|
|
12
|
-
ref = $bindable(null),
|
|
13
|
-
checked = $bindable(false),
|
|
14
|
-
disabled = false,
|
|
15
|
-
onCheckedChange,
|
|
16
|
-
class: className,
|
|
17
|
-
...restProps
|
|
18
|
-
}: Props = $props();
|
|
19
|
-
|
|
20
|
-
function toggle() {
|
|
21
|
-
if (disabled) return;
|
|
22
|
-
checked = !checked;
|
|
23
|
-
onCheckedChange?.(checked);
|
|
24
|
-
}
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<button
|
|
28
|
-
bind:this={ref}
|
|
29
|
-
type="button"
|
|
30
|
-
role="switch"
|
|
31
|
-
aria-checked={checked}
|
|
32
|
-
data-state={checked ? "checked" : "unchecked"}
|
|
33
|
-
data-slot="switch"
|
|
34
|
-
{disabled}
|
|
35
|
-
class={cn(
|
|
36
|
-
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-xs transition-all outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
37
|
-
checked ? "bg-primary" : "bg-input dark:bg-input/80",
|
|
38
|
-
className
|
|
39
|
-
)}
|
|
40
|
-
onclick={toggle}
|
|
41
|
-
{...restProps}
|
|
42
|
-
>
|
|
43
|
-
<span
|
|
44
|
-
class={cn(
|
|
45
|
-
"pointer-events-none block size-4 rounded-full bg-background shadow-lg ring-0 transition-transform",
|
|
46
|
-
checked ? "translate-x-4" : "translate-x-0"
|
|
47
|
-
)}
|
|
48
|
-
></span>
|
|
49
|
-
</button>
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import Root from "./table.svelte";
|
|
2
|
-
import Body from "./table-body.svelte";
|
|
3
|
-
import Caption from "./table-caption.svelte";
|
|
4
|
-
import Cell from "./table-cell.svelte";
|
|
5
|
-
import Footer from "./table-footer.svelte";
|
|
6
|
-
import Head from "./table-head.svelte";
|
|
7
|
-
import Header from "./table-header.svelte";
|
|
8
|
-
import Row from "./table-row.svelte";
|
|
9
|
-
|
|
10
|
-
export {
|
|
11
|
-
Root,
|
|
12
|
-
Body,
|
|
13
|
-
Caption,
|
|
14
|
-
Cell,
|
|
15
|
-
Footer,
|
|
16
|
-
Head,
|
|
17
|
-
Header,
|
|
18
|
-
Row,
|
|
19
|
-
//
|
|
20
|
-
Root as Table,
|
|
21
|
-
Body as TableBody,
|
|
22
|
-
Caption as TableCaption,
|
|
23
|
-
Cell as TableCell,
|
|
24
|
-
Footer as TableFooter,
|
|
25
|
-
Head as TableHead,
|
|
26
|
-
Header as TableHeader,
|
|
27
|
-
Row as TableRow,
|
|
28
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<tbody bind:this={ref} data-slot="table-body" class={cn(className)} {...restProps}>
|
|
14
|
-
{@render children?.()}
|
|
15
|
-
</tbody>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLElement>> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<caption
|
|
14
|
-
bind:this={ref}
|
|
15
|
-
data-slot="table-caption"
|
|
16
|
-
class={cn("text-muted-foreground mt-4 text-sm", className)}
|
|
17
|
-
{...restProps}
|
|
18
|
-
>
|
|
19
|
-
{@render children?.()}
|
|
20
|
-
</caption>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLTdAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLTdAttributes, HTMLTableCellElement> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<td bind:this={ref} data-slot="table-cell" class={cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)} {...restProps}>
|
|
14
|
-
{@render children?.()}
|
|
15
|
-
</td>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<tfoot
|
|
14
|
-
bind:this={ref}
|
|
15
|
-
data-slot="table-footer"
|
|
16
|
-
class={cn("bg-muted/50 font-medium", className)}
|
|
17
|
-
{...restProps}
|
|
18
|
-
>
|
|
19
|
-
{@render children?.()}
|
|
20
|
-
</tfoot>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLThAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLThAttributes, HTMLTableCellElement> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<th bind:this={ref} data-slot="table-head" class={cn("text-foreground h-9 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0", className)} {...restProps}>
|
|
14
|
-
{@render children?.()}
|
|
15
|
-
</th>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<thead
|
|
14
|
-
bind:this={ref}
|
|
15
|
-
data-slot="table-header"
|
|
16
|
-
class={cn(className)}
|
|
17
|
-
{...restProps}
|
|
18
|
-
>
|
|
19
|
-
{@render children?.()}
|
|
20
|
-
</thead>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
-
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLAttributes<HTMLTableRowElement>> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<tr bind:this={ref} data-slot="table-row" class={cn("hover:bg-muted/50 data-[state=selected]:bg-muted transition-colors", className)} {...restProps}>
|
|
14
|
-
{@render children?.()}
|
|
15
|
-
</tr>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { HTMLTableAttributes } from "svelte/elements";
|
|
3
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
|
-
|
|
5
|
-
let {
|
|
6
|
-
ref = $bindable(null),
|
|
7
|
-
class: className,
|
|
8
|
-
children,
|
|
9
|
-
...restProps
|
|
10
|
-
}: WithElementRef<HTMLTableAttributes, HTMLTableElement> = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div data-slot="table-container" class="relative w-full overflow-x-auto">
|
|
14
|
-
<table bind:this={ref} data-slot="table" class={cn("w-full caption-bottom text-sm", className)} {...restProps}>
|
|
15
|
-
{@render children?.()}
|
|
16
|
-
</table>
|
|
17
|
-
</div>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import Tabs from "./tabs.svelte";
|
|
2
|
-
import TabsList from "./tabs-list.svelte";
|
|
3
|
-
import TabsTrigger from "./tabs-trigger.svelte";
|
|
4
|
-
import TabsContent from "./tabs-content.svelte";
|
|
5
|
-
|
|
6
|
-
export {
|
|
7
|
-
Tabs,
|
|
8
|
-
TabsList,
|
|
9
|
-
TabsTrigger,
|
|
10
|
-
TabsContent,
|
|
11
|
-
Tabs as Root,
|
|
12
|
-
TabsList as List,
|
|
13
|
-
TabsTrigger as Trigger,
|
|
14
|
-
TabsContent as Content,
|
|
15
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
value: string;
|
|
7
|
-
active?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let {
|
|
11
|
-
ref = $bindable(null),
|
|
12
|
-
value,
|
|
13
|
-
active = false,
|
|
14
|
-
class: className,
|
|
15
|
-
children,
|
|
16
|
-
...restProps
|
|
17
|
-
}: Props = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
{#if active}
|
|
21
|
-
<div
|
|
22
|
-
bind:this={ref}
|
|
23
|
-
data-slot="tabs-content"
|
|
24
|
-
role="tabpanel"
|
|
25
|
-
class={cn("flex-1 outline-none", className)}
|
|
26
|
-
{...restProps}
|
|
27
|
-
>
|
|
28
|
-
{@render children?.()}
|
|
29
|
-
</div>
|
|
30
|
-
{/if}
|
|
@@ -1,26 +0,0 @@
|
|
|
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="tabs-list"
|
|
18
|
-
class={cn(
|
|
19
|
-
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px] gap-1",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
role="tablist"
|
|
23
|
-
{...restProps}
|
|
24
|
-
>
|
|
25
|
-
{@render children?.()}
|
|
26
|
-
</div>
|
|
@@ -1,37 +0,0 @@
|
|
|
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, HTMLButtonElement> & {
|
|
6
|
-
value: string;
|
|
7
|
-
active?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let {
|
|
11
|
-
ref = $bindable(null),
|
|
12
|
-
value,
|
|
13
|
-
active = false,
|
|
14
|
-
class: className,
|
|
15
|
-
children,
|
|
16
|
-
...restProps
|
|
17
|
-
}: Props = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<button
|
|
21
|
-
bind:this={ref}
|
|
22
|
-
type="button"
|
|
23
|
-
role="tab"
|
|
24
|
-
data-slot="tabs-trigger"
|
|
25
|
-
data-state={active ? "active" : "inactive"}
|
|
26
|
-
aria-selected={active}
|
|
27
|
-
class={cn(
|
|
28
|
-
"inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 py-1 text-sm font-medium transition-all outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0",
|
|
29
|
-
active
|
|
30
|
-
? "bg-background text-foreground shadow-sm"
|
|
31
|
-
: "text-muted-foreground hover:text-foreground",
|
|
32
|
-
className
|
|
33
|
-
)}
|
|
34
|
-
{...restProps}
|
|
35
|
-
>
|
|
36
|
-
{@render children?.()}
|
|
37
|
-
</button>
|
|
@@ -1,27 +0,0 @@
|
|
|
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
|
-
value?: string;
|
|
7
|
-
onValueChange?: (value: string) => void;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let {
|
|
11
|
-
ref = $bindable(null),
|
|
12
|
-
value = $bindable(""),
|
|
13
|
-
onValueChange,
|
|
14
|
-
class: className,
|
|
15
|
-
children,
|
|
16
|
-
...restProps
|
|
17
|
-
}: Props = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<div
|
|
21
|
-
bind:this={ref}
|
|
22
|
-
data-slot="tabs"
|
|
23
|
-
class={cn("flex flex-col gap-2", className)}
|
|
24
|
-
{...restProps}
|
|
25
|
-
>
|
|
26
|
-
{@render children?.()}
|
|
27
|
-
</div>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
3
|
-
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
|
-
|
|
5
|
-
type Props = WithElementRef<HTMLTextareaAttributes, HTMLTextAreaElement>;
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
ref = $bindable(null),
|
|
9
|
-
value = $bindable(),
|
|
10
|
-
class: className,
|
|
11
|
-
...restProps
|
|
12
|
-
}: Props = $props();
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
<textarea
|
|
16
|
-
bind:this={ref}
|
|
17
|
-
data-slot="textarea"
|
|
18
|
-
class={cn(
|
|
19
|
-
"dark:bg-input/30 border-input 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 w-full rounded-lg border bg-transparent px-3 py-2 text-base transition-colors focus-visible:ring-3 aria-invalid:ring-3 md:text-sm placeholder:text-muted-foreground min-h-[80px] outline-none disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 resize-y",
|
|
20
|
-
className
|
|
21
|
-
)}
|
|
22
|
-
bind:value
|
|
23
|
-
{...restProps}
|
|
24
|
-
></textarea>
|