svelte-incant 0.1.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/README.md +75 -0
- package/dist/attachment.svelte.d.ts +8 -0
- package/dist/attachment.svelte.js +93 -0
- package/dist/combobox-example.svelte +155 -0
- package/dist/combobox-example.svelte.d.ts +3 -0
- package/dist/components/CodeBlock.svelte +213 -0
- package/dist/components/CodeBlock.svelte.d.ts +12 -0
- package/dist/components/header.svelte +155 -0
- package/dist/components/header.svelte.d.ts +3 -0
- package/dist/components/kbds.svelte +31 -0
- package/dist/components/kbds.svelte.d.ts +7 -0
- package/dist/components/ui/badge/badge.svelte +49 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +32 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button.svelte +82 -0
- package/dist/components/ui/button/button.svelte.d.ts +64 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-action.svelte +20 -0
- package/dist/components/ui/card/card-action.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-content.svelte +15 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +20 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +23 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +20 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +5 -0
- package/dist/components/ui/card/card.svelte +23 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +8 -0
- package/dist/components/ui/card/index.js +10 -0
- package/dist/components/ui/command/command-dialog.svelte +40 -0
- package/dist/components/ui/command/command-dialog.svelte.d.ts +12 -0
- package/dist/components/ui/command/command-empty.svelte +17 -0
- package/dist/components/ui/command/command-empty.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-group.svelte +30 -0
- package/dist/components/ui/command/command-group.svelte.d.ts +7 -0
- package/dist/components/ui/command/command-input.svelte +26 -0
- package/dist/components/ui/command/command-input.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-item.svelte +20 -0
- package/dist/components/ui/command/command-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-link-item.svelte +20 -0
- package/dist/components/ui/command/command-link-item.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-list.svelte +17 -0
- package/dist/components/ui/command/command-list.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-loading.svelte +7 -0
- package/dist/components/ui/command/command-loading.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-separator.svelte +17 -0
- package/dist/components/ui/command/command-separator.svelte.d.ts +4 -0
- package/dist/components/ui/command/command-shortcut.svelte +20 -0
- package/dist/components/ui/command/command-shortcut.svelte.d.ts +5 -0
- package/dist/components/ui/command/command.svelte +28 -0
- package/dist/components/ui/command/command.svelte.d.ts +8 -0
- package/dist/components/ui/command/index.d.ts +12 -0
- package/dist/components/ui/command/index.js +14 -0
- package/dist/components/ui/dialog/dialog-close.svelte +7 -0
- package/dist/components/ui/dialog/dialog-close.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +45 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +13 -0
- package/dist/components/ui/dialog/dialog-description.svelte +17 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +20 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +20 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-portal.svelte +7 -0
- package/dist/components/ui/dialog/dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/dialog-title.svelte +17 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte +7 -0
- package/dist/components/ui/dialog/dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog.svelte +7 -0
- package/dist/components/ui/dialog/dialog.svelte.d.ts +3 -0
- package/dist/components/ui/dialog/index.d.ts +11 -0
- package/dist/components/ui/dialog/index.js +13 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +52 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/kbd/index.d.ts +3 -0
- package/dist/components/ui/kbd/index.js +5 -0
- package/dist/components/ui/kbd/kbd-group.svelte +20 -0
- package/dist/components/ui/kbd/kbd-group.svelte.d.ts +5 -0
- package/dist/components/ui/kbd/kbd.svelte +25 -0
- package/dist/components/ui/kbd/kbd.svelte.d.ts +5 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-close.svelte +7 -0
- package/dist/components/ui/popover/popover-close.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover-content.svelte +31 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +10 -0
- package/dist/components/ui/popover/popover-portal.svelte +7 -0
- package/dist/components/ui/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/components/ui/popover/popover-trigger.svelte +17 -0
- package/dist/components/ui/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/popover/popover.svelte +7 -0
- package/dist/components/ui/popover/popover.svelte.d.ts +3 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/table/index.js +11 -0
- package/dist/components/ui/table/table-body.svelte +20 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +20 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +23 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +20 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +23 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +20 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +23 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +22 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +5 -0
- package/dist/components/ui/tabs/index.js +7 -0
- package/dist/components/ui/tabs/tabs-content.svelte +17 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +20 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +20 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs.svelte +19 -0
- package/dist/components/ui/tabs/tabs.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +52 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +11 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-portal.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-provider.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/tooltip/tooltip.svelte +7 -0
- package/dist/components/ui/tooltip/tooltip.svelte.d.ts +4 -0
- package/dist/focus.svelte +56 -0
- package/dist/focus.svelte.d.ts +13 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/overlay-component.svelte +19 -0
- package/dist/overlay-component.svelte.d.ts +6 -0
- package/dist/palette.svelte +132 -0
- package/dist/palette.svelte.d.ts +7 -0
- package/dist/palette.svelte.js +177 -0
- package/dist/shortcut.svelte +26 -0
- package/dist/shortcut.svelte.d.ts +8 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +32 -0
- package/package.json +87 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Root from './dialog.svelte';
|
|
2
|
+
import Portal from './dialog-portal.svelte';
|
|
3
|
+
import Title from './dialog-title.svelte';
|
|
4
|
+
import Footer from './dialog-footer.svelte';
|
|
5
|
+
import Header from './dialog-header.svelte';
|
|
6
|
+
import Overlay from './dialog-overlay.svelte';
|
|
7
|
+
import Content from './dialog-content.svelte';
|
|
8
|
+
import Description from './dialog-description.svelte';
|
|
9
|
+
import Trigger from './dialog-trigger.svelte';
|
|
10
|
+
import Close from './dialog-close.svelte';
|
|
11
|
+
export { Root, Title, Portal, Footer, Header, Trigger, Overlay, Content, Description, Close, Root as Dialog, Title as DialogTitle, Portal as DialogPortal, Footer as DialogFooter, Header as DialogHeader, Trigger as DialogTrigger, Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, Close as DialogClose };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Root from './dialog.svelte';
|
|
2
|
+
import Portal from './dialog-portal.svelte';
|
|
3
|
+
import Title from './dialog-title.svelte';
|
|
4
|
+
import Footer from './dialog-footer.svelte';
|
|
5
|
+
import Header from './dialog-header.svelte';
|
|
6
|
+
import Overlay from './dialog-overlay.svelte';
|
|
7
|
+
import Content from './dialog-content.svelte';
|
|
8
|
+
import Description from './dialog-description.svelte';
|
|
9
|
+
import Trigger from './dialog-trigger.svelte';
|
|
10
|
+
import Close from './dialog-close.svelte';
|
|
11
|
+
export { Root, Title, Portal, Footer, Header, Trigger, Overlay, Content, Description, Close,
|
|
12
|
+
//
|
|
13
|
+
Root as Dialog, Title as DialogTitle, Portal as DialogPortal, Footer as DialogFooter, Header as DialogHeader, Trigger as DialogTrigger, Overlay as DialogOverlay, Content as DialogContent, Description as DialogDescription, Close as DialogClose };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from "svelte/elements";
|
|
3
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
type InputType = Exclude<HTMLInputTypeAttribute, "file">;
|
|
6
|
+
|
|
7
|
+
type Props = WithElementRef<
|
|
8
|
+
Omit<HTMLInputAttributes, "type"> &
|
|
9
|
+
({ type: "file"; files?: FileList } | { type?: InputType; files?: undefined })
|
|
10
|
+
>;
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
ref = $bindable(null),
|
|
14
|
+
value = $bindable(),
|
|
15
|
+
type,
|
|
16
|
+
files = $bindable(),
|
|
17
|
+
class: className,
|
|
18
|
+
"data-slot": dataSlot = "input",
|
|
19
|
+
...restProps
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if type === "file"}
|
|
24
|
+
<input
|
|
25
|
+
bind:this={ref}
|
|
26
|
+
data-slot={dataSlot}
|
|
27
|
+
class={cn(
|
|
28
|
+
"selection:bg-primary dark:bg-input/30 selection:text-primary-foreground border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
29
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
30
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
type="file"
|
|
34
|
+
bind:files
|
|
35
|
+
bind:value
|
|
36
|
+
{...restProps}
|
|
37
|
+
/>
|
|
38
|
+
{:else}
|
|
39
|
+
<input
|
|
40
|
+
bind:this={ref}
|
|
41
|
+
data-slot={dataSlot}
|
|
42
|
+
class={cn(
|
|
43
|
+
"border-input bg-background selection:bg-primary dark:bg-input/30 selection:text-primary-foreground ring-offset-background placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
44
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
45
|
+
"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
46
|
+
className
|
|
47
|
+
)}
|
|
48
|
+
{type}
|
|
49
|
+
bind:value
|
|
50
|
+
{...restProps}
|
|
51
|
+
/>
|
|
52
|
+
{/if}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from "svelte/elements";
|
|
2
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
3
|
+
type InputType = Exclude<HTMLInputTypeAttribute, "file">;
|
|
4
|
+
type Props = WithElementRef<Omit<HTMLInputAttributes, "type"> & ({
|
|
5
|
+
type: "file";
|
|
6
|
+
files?: FileList;
|
|
7
|
+
} | {
|
|
8
|
+
type?: InputType;
|
|
9
|
+
files?: undefined;
|
|
10
|
+
})>;
|
|
11
|
+
declare const Input: import("svelte").Component<Props, {}, "ref" | "value" | "files">;
|
|
12
|
+
type Input = ReturnType<typeof Input>;
|
|
13
|
+
export default Input;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
<kbd
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="kbd-group"
|
|
16
|
+
class={cn('inline-flex items-center gap-1', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</kbd>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const KbdGroup: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type KbdGroup = ReturnType<typeof KbdGroup>;
|
|
5
|
+
export default KbdGroup;
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
<kbd
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="kbd"
|
|
16
|
+
class={cn(
|
|
17
|
+
'pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none',
|
|
18
|
+
"[&_svg:not([class*='size-'])]:size-3",
|
|
19
|
+
'[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
>
|
|
24
|
+
{@render children?.()}
|
|
25
|
+
</kbd>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const Kbd: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type Kbd = ReturnType<typeof Kbd>;
|
|
5
|
+
export default Kbd;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Root from './popover.svelte';
|
|
2
|
+
import Close from './popover-close.svelte';
|
|
3
|
+
import Content from './popover-content.svelte';
|
|
4
|
+
import Trigger from './popover-trigger.svelte';
|
|
5
|
+
import Portal from './popover-portal.svelte';
|
|
6
|
+
export { Root, Content, Trigger, Close, Portal, Root as Popover, Content as PopoverContent, Trigger as PopoverTrigger, Close as PopoverClose, Portal as PopoverPortal };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Root from './popover.svelte';
|
|
2
|
+
import Close from './popover-close.svelte';
|
|
3
|
+
import Content from './popover-content.svelte';
|
|
4
|
+
import Trigger from './popover-trigger.svelte';
|
|
5
|
+
import Portal from './popover-portal.svelte';
|
|
6
|
+
export { Root, Content, Trigger, Close, Portal,
|
|
7
|
+
//
|
|
8
|
+
Root as Popover, Content as PopoverContent, Trigger as PopoverTrigger, Close as PopoverClose, Portal as PopoverPortal };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Popover as PopoverPrimitive } from 'bits-ui';
|
|
3
|
+
import PopoverPortal from './popover-portal.svelte';
|
|
4
|
+
import { cn, type WithoutChildrenOrChild } from '../../../utils.js';
|
|
5
|
+
import type { ComponentProps } from 'svelte';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
sideOffset = 4,
|
|
11
|
+
align = 'center',
|
|
12
|
+
portalProps,
|
|
13
|
+
...restProps
|
|
14
|
+
}: PopoverPrimitive.ContentProps & {
|
|
15
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>>;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<PopoverPortal {...portalProps}>
|
|
20
|
+
<PopoverPrimitive.Content
|
|
21
|
+
bind:ref
|
|
22
|
+
data-slot="popover-content"
|
|
23
|
+
{sideOffset}
|
|
24
|
+
{align}
|
|
25
|
+
class={cn(
|
|
26
|
+
'z-50 w-72 origin-(--bits-popover-content-transform-origin) rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
/>
|
|
31
|
+
</PopoverPortal>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Popover as PopoverPrimitive } from 'bits-ui';
|
|
2
|
+
import PopoverPortal from './popover-portal.svelte';
|
|
3
|
+
import { type WithoutChildrenOrChild } from '../../../utils.js';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
type $$ComponentProps = PopoverPrimitive.ContentProps & {
|
|
6
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof PopoverPortal>>;
|
|
7
|
+
};
|
|
8
|
+
declare const PopoverContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
|
+
type PopoverContent = ReturnType<typeof PopoverContent>;
|
|
10
|
+
export default PopoverContent;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../utils.js';
|
|
3
|
+
import { Popover as PopoverPrimitive } from 'bits-ui';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: PopoverPrimitive.TriggerProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<PopoverPrimitive.Trigger
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="popover-trigger"
|
|
15
|
+
class={cn('', className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row, Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow };
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export { Root, Body, Caption, Cell, Footer, Head, Header, Row,
|
|
10
|
+
//
|
|
11
|
+
Root as Table, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow };
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-body"
|
|
16
|
+
class={cn('[&_tr:last-child]:border-0', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</tbody>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableBody: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableBody = ReturnType<typeof TableBody>;
|
|
5
|
+
export default TableBody;
|
|
@@ -0,0 +1,20 @@
|
|
|
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('mt-4 text-sm text-muted-foreground', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</caption>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableCaption: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLElement>>, {}, "ref">;
|
|
4
|
+
type TableCaption = ReturnType<typeof TableCaption>;
|
|
5
|
+
export default TableCaption;
|
|
@@ -0,0 +1,23 @@
|
|
|
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> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<td
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-cell"
|
|
16
|
+
class={cn(
|
|
17
|
+
'bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</td>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLTdAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableCell: import("svelte").Component<WithElementRef<HTMLTdAttributes>, {}, "ref">;
|
|
4
|
+
type TableCell = ReturnType<typeof TableCell>;
|
|
5
|
+
export default TableCell;
|
|
@@ -0,0 +1,20 @@
|
|
|
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('border-t bg-muted/50 font-medium [&>tr]:last:border-b-0', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</tfoot>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableFooter = ReturnType<typeof TableFooter>;
|
|
5
|
+
export default TableFooter;
|
|
@@ -0,0 +1,23 @@
|
|
|
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> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<th
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-head"
|
|
16
|
+
class={cn(
|
|
17
|
+
'h-10 bg-clip-padding px-2 text-start align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pe-0',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</th>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLThAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableHead: import("svelte").Component<WithElementRef<HTMLThAttributes>, {}, "ref">;
|
|
4
|
+
type TableHead = ReturnType<typeof TableHead>;
|
|
5
|
+
export default TableHead;
|
|
@@ -0,0 +1,20 @@
|
|
|
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('[&_tr]:border-b', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</thead>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableHeader = ReturnType<typeof TableHeader>;
|
|
5
|
+
export default TableHeader;
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="table-row"
|
|
16
|
+
class={cn(
|
|
17
|
+
'border-b transition-colors data-[state=selected]:bg-muted hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</tr>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const TableRow: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableRowElement>>, {}, "ref">;
|
|
4
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
5
|
+
export default TableRow;
|
|
@@ -0,0 +1,22 @@
|
|
|
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> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div data-slot="table-container" class="relative w-full overflow-x-auto">
|
|
14
|
+
<table
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
data-slot="table"
|
|
17
|
+
class={cn('w-full caption-bottom text-sm', className)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
>
|
|
20
|
+
{@render children?.()}
|
|
21
|
+
</table>
|
|
22
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLTableAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../utils.js';
|
|
3
|
+
declare const Table: import("svelte").Component<WithElementRef<HTMLTableAttributes>, {}, "ref">;
|
|
4
|
+
type Table = ReturnType<typeof Table>;
|
|
5
|
+
export default Table;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import Root from "./tabs.svelte";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Root from "./tabs.svelte";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
export { Root, Content, List, Trigger,
|
|
6
|
+
//
|
|
7
|
+
Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.ContentProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.Content
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="tabs-content"
|
|
15
|
+
class={cn("flex-1 outline-none", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.ListProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.List
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="tabs-list"
|
|
15
|
+
class={cn(
|
|
16
|
+
"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|