svelte-docsmith 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/LICENSE +21 -0
- package/README.md +162 -0
- package/dist/clipboard.svelte.d.ts +6 -0
- package/dist/clipboard.svelte.js +27 -0
- package/dist/config.d.ts +79 -0
- package/dist/config.js +55 -0
- package/dist/content.d.ts +10 -0
- package/dist/content.js +4 -0
- package/dist/highlight.d.ts +17 -0
- package/dist/highlight.js +34 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +26 -0
- package/dist/markdown-layout.svelte +21 -0
- package/dist/markdown-layout.svelte.d.ts +18 -0
- package/dist/preprocess.d.ts +33 -0
- package/dist/preprocess.js +65 -0
- package/dist/shadcn.d.ts +12 -0
- package/dist/shadcn.js +5 -0
- package/dist/theme.css +201 -0
- package/dist/themes/amethyst.css +76 -0
- package/dist/themes/bubblegum.css +79 -0
- package/dist/themes/claude.css +79 -0
- package/dist/themes/evergreen.css +76 -0
- package/dist/themes/graphite.css +79 -0
- package/dist/themes/mono.css +79 -0
- package/dist/themes/nord.css +79 -0
- package/dist/themes/ocean.css +76 -0
- package/dist/themes/rose.css +78 -0
- package/dist/themes/tangerine.css +81 -0
- package/dist/toc/from-content.d.ts +11 -0
- package/dist/toc/from-content.js +18 -0
- package/dist/toc/index.d.ts +3 -0
- package/dist/toc/index.js +3 -0
- package/dist/toc/toc.svelte.d.ts +26 -0
- package/dist/toc/toc.svelte.js +74 -0
- package/dist/toc/types.d.ts +11 -0
- package/dist/toc/types.js +1 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.js +1 -0
- package/dist/ui/accordion-item.svelte +24 -0
- package/dist/ui/accordion-item.svelte.d.ts +9 -0
- package/dist/ui/accordion.svelte +45 -0
- package/dist/ui/accordion.svelte.d.ts +15 -0
- package/dist/ui/background-pattern.svelte +17 -0
- package/dist/ui/background-pattern.svelte.d.ts +26 -0
- package/dist/ui/badge.svelte +54 -0
- package/dist/ui/badge.svelte.d.ts +12 -0
- package/dist/ui/callout.svelte +125 -0
- package/dist/ui/callout.svelte.d.ts +13 -0
- package/dist/ui/card-grid.svelte +10 -0
- package/dist/ui/card-grid.svelte.d.ts +7 -0
- package/dist/ui/card.svelte +52 -0
- package/dist/ui/card.svelte.d.ts +14 -0
- package/dist/ui/copy-button.svelte +30 -0
- package/dist/ui/copy-button.svelte.d.ts +9 -0
- package/dist/ui/file-tree-item.svelte +70 -0
- package/dist/ui/file-tree-item.svelte.d.ts +14 -0
- package/dist/ui/file-tree.svelte +34 -0
- package/dist/ui/file-tree.svelte.d.ts +7 -0
- package/dist/ui/icons/github.svelte +14 -0
- package/dist/ui/icons/github.svelte.d.ts +6 -0
- package/dist/ui/kbd.svelte +11 -0
- package/dist/ui/kbd.svelte.d.ts +7 -0
- package/dist/ui/layouts/breadcrumbs.svelte +37 -0
- package/dist/ui/layouts/breadcrumbs.svelte.d.ts +10 -0
- package/dist/ui/layouts/docs-footer.svelte +40 -0
- package/dist/ui/layouts/docs-footer.svelte.d.ts +7 -0
- package/dist/ui/layouts/docs-header.svelte +109 -0
- package/dist/ui/layouts/docs-header.svelte.d.ts +18 -0
- package/dist/ui/layouts/docs-mobile-header.svelte +106 -0
- package/dist/ui/layouts/docs-mobile-header.svelte.d.ts +18 -0
- package/dist/ui/layouts/docs-shell.svelte +133 -0
- package/dist/ui/layouts/docs-shell.svelte.d.ts +25 -0
- package/dist/ui/layouts/docs-sidebar.svelte +36 -0
- package/dist/ui/layouts/docs-sidebar.svelte.d.ts +8 -0
- package/dist/ui/layouts/prev-next-nav.svelte +32 -0
- package/dist/ui/layouts/prev-next-nav.svelte.d.ts +8 -0
- package/dist/ui/live-example.svelte +67 -0
- package/dist/ui/live-example.svelte.d.ts +10 -0
- package/dist/ui/markdown/code.svelte +11 -0
- package/dist/ui/markdown/code.svelte.d.ts +7 -0
- package/dist/ui/markdown/h2.svelte +13 -0
- package/dist/ui/markdown/h2.svelte.d.ts +4 -0
- package/dist/ui/markdown/h3.svelte +13 -0
- package/dist/ui/markdown/h3.svelte.d.ts +4 -0
- package/dist/ui/markdown/index.d.ts +5 -0
- package/dist/ui/markdown/index.js +5 -0
- package/dist/ui/markdown/pre.svelte +88 -0
- package/dist/ui/markdown/pre.svelte.d.ts +7 -0
- package/dist/ui/markdown/table.svelte +80 -0
- package/dist/ui/markdown/table.svelte.d.ts +7 -0
- package/dist/ui/markdown/types.d.ts +3 -0
- package/dist/ui/markdown/types.js +1 -0
- package/dist/ui/prop.svelte +130 -0
- package/dist/ui/prop.svelte.d.ts +16 -0
- package/dist/ui/props-table.svelte +127 -0
- package/dist/ui/props-table.svelte.d.ts +9 -0
- package/dist/ui/shadcn/accordion/accordion-content.svelte +27 -0
- package/dist/ui/shadcn/accordion/accordion-content.svelte.d.ts +4 -0
- package/dist/ui/shadcn/accordion/accordion-item.svelte +17 -0
- package/dist/ui/shadcn/accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/ui/shadcn/accordion/accordion-trigger.svelte +38 -0
- package/dist/ui/shadcn/accordion/accordion-trigger.svelte.d.ts +8 -0
- package/dist/ui/shadcn/accordion/accordion.svelte +19 -0
- package/dist/ui/shadcn/accordion/accordion.svelte.d.ts +4 -0
- package/dist/ui/shadcn/accordion/index.d.ts +5 -0
- package/dist/ui/shadcn/accordion/index.js +7 -0
- package/dist/ui/shadcn/badge/badge.svelte +50 -0
- package/dist/ui/shadcn/badge/badge.svelte.d.ts +38 -0
- package/dist/ui/shadcn/badge/index.d.ts +2 -0
- package/dist/ui/shadcn/badge/index.js +2 -0
- package/dist/ui/shadcn/button/button.svelte +89 -0
- package/dist/ui/shadcn/button/button.svelte.d.ts +70 -0
- package/dist/ui/shadcn/button/index.d.ts +2 -0
- package/dist/ui/shadcn/button/index.js +4 -0
- package/dist/ui/shadcn/popover/index.d.ts +9 -0
- package/dist/ui/shadcn/popover/index.js +11 -0
- package/dist/ui/shadcn/popover/popover-close.svelte +7 -0
- package/dist/ui/shadcn/popover/popover-close.svelte.d.ts +4 -0
- package/dist/ui/shadcn/popover/popover-content.svelte +31 -0
- package/dist/ui/shadcn/popover/popover-content.svelte.d.ts +10 -0
- package/dist/ui/shadcn/popover/popover-description.svelte +20 -0
- package/dist/ui/shadcn/popover/popover-description.svelte.d.ts +5 -0
- package/dist/ui/shadcn/popover/popover-header.svelte +20 -0
- package/dist/ui/shadcn/popover/popover-header.svelte.d.ts +5 -0
- package/dist/ui/shadcn/popover/popover-portal.svelte +7 -0
- package/dist/ui/shadcn/popover/popover-portal.svelte.d.ts +3 -0
- package/dist/ui/shadcn/popover/popover-title.svelte +15 -0
- package/dist/ui/shadcn/popover/popover-title.svelte.d.ts +5 -0
- package/dist/ui/shadcn/popover/popover-trigger.svelte +17 -0
- package/dist/ui/shadcn/popover/popover-trigger.svelte.d.ts +4 -0
- package/dist/ui/shadcn/popover/popover.svelte +7 -0
- package/dist/ui/shadcn/popover/popover.svelte.d.ts +3 -0
- package/dist/ui/shadcn/scroll-area/index.d.ts +3 -0
- package/dist/ui/shadcn/scroll-area/index.js +5 -0
- package/dist/ui/shadcn/scroll-area/scroll-area-scrollbar.svelte +30 -0
- package/dist/ui/shadcn/scroll-area/scroll-area-scrollbar.svelte.d.ts +4 -0
- package/dist/ui/shadcn/scroll-area/scroll-area.svelte +43 -0
- package/dist/ui/shadcn/scroll-area/scroll-area.svelte.d.ts +11 -0
- package/dist/ui/shadcn/separator/index.d.ts +2 -0
- package/dist/ui/shadcn/separator/index.js +4 -0
- package/dist/ui/shadcn/separator/separator.svelte +23 -0
- package/dist/ui/shadcn/separator/separator.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/index.d.ts +11 -0
- package/dist/ui/shadcn/sheet/index.js +13 -0
- package/dist/ui/shadcn/sheet/sheet-close.svelte +7 -0
- package/dist/ui/shadcn/sheet/sheet-close.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/sheet-content.svelte +55 -0
- package/dist/ui/shadcn/sheet/sheet-content.svelte.d.ts +15 -0
- package/dist/ui/shadcn/sheet/sheet-description.svelte +17 -0
- package/dist/ui/shadcn/sheet/sheet-description.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/sheet-footer.svelte +20 -0
- package/dist/ui/shadcn/sheet/sheet-footer.svelte.d.ts +5 -0
- package/dist/ui/shadcn/sheet/sheet-header.svelte +20 -0
- package/dist/ui/shadcn/sheet/sheet-header.svelte.d.ts +5 -0
- package/dist/ui/shadcn/sheet/sheet-overlay.svelte +17 -0
- package/dist/ui/shadcn/sheet/sheet-overlay.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/sheet-portal.svelte +7 -0
- package/dist/ui/shadcn/sheet/sheet-portal.svelte.d.ts +3 -0
- package/dist/ui/shadcn/sheet/sheet-title.svelte +17 -0
- package/dist/ui/shadcn/sheet/sheet-title.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/sheet-trigger.svelte +7 -0
- package/dist/ui/shadcn/sheet/sheet-trigger.svelte.d.ts +4 -0
- package/dist/ui/shadcn/sheet/sheet.svelte +7 -0
- package/dist/ui/shadcn/sheet/sheet.svelte.d.ts +3 -0
- package/dist/ui/shadcn/tabs/index.d.ts +5 -0
- package/dist/ui/shadcn/tabs/index.js +7 -0
- package/dist/ui/shadcn/tabs/tabs-content.svelte +17 -0
- package/dist/ui/shadcn/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/ui/shadcn/tabs/tabs-list.svelte +40 -0
- package/dist/ui/shadcn/tabs/tabs-list.svelte.d.ts +25 -0
- package/dist/ui/shadcn/tabs/tabs-trigger.svelte +23 -0
- package/dist/ui/shadcn/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/ui/shadcn/tabs/tabs.svelte +19 -0
- package/dist/ui/shadcn/tabs/tabs.svelte.d.ts +4 -0
- package/dist/ui/step.svelte +82 -0
- package/dist/ui/step.svelte.d.ts +9 -0
- package/dist/ui/steps.svelte +71 -0
- package/dist/ui/steps.svelte.d.ts +7 -0
- package/dist/ui/tab-item.svelte +14 -0
- package/dist/ui/tab-item.svelte.d.ts +6 -0
- package/dist/ui/table-of-contents.svelte +114 -0
- package/dist/ui/table-of-contents.svelte.d.ts +9 -0
- package/dist/ui/tabs.svelte +29 -0
- package/dist/ui/tabs.svelte.d.ts +8 -0
- package/dist/ui/theme-provider.svelte +23 -0
- package/dist/ui/theme-provider.svelte.d.ts +10 -0
- package/dist/ui/theme-toggle.svelte +22 -0
- package/dist/ui/theme-toggle.svelte.d.ts +6 -0
- package/dist/vite.d.ts +32 -0
- package/dist/vite.js +216 -0
- package/package.json +115 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const badgeVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: string;
|
|
5
|
+
secondary: string;
|
|
6
|
+
destructive: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
ghost: string;
|
|
9
|
+
link: string;
|
|
10
|
+
};
|
|
11
|
+
}, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", {
|
|
12
|
+
variant: {
|
|
13
|
+
default: string;
|
|
14
|
+
secondary: string;
|
|
15
|
+
destructive: string;
|
|
16
|
+
outline: string;
|
|
17
|
+
ghost: string;
|
|
18
|
+
link: string;
|
|
19
|
+
};
|
|
20
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
21
|
+
variant: {
|
|
22
|
+
default: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
destructive: string;
|
|
25
|
+
outline: string;
|
|
26
|
+
ghost: string;
|
|
27
|
+
link: string;
|
|
28
|
+
};
|
|
29
|
+
}, undefined, "h-5 gap-1 rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium transition-all has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&>svg]:size-3! focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive group/badge inline-flex w-fit shrink-0 items-center justify-center overflow-hidden whitespace-nowrap transition-colors focus-visible:ring-[3px] [&>svg]:pointer-events-none", unknown, unknown, undefined>>;
|
|
30
|
+
export type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
|
|
31
|
+
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
32
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
33
|
+
type $$ComponentProps = WithElementRef<HTMLAnchorAttributes> & {
|
|
34
|
+
variant?: BadgeVariant;
|
|
35
|
+
};
|
|
36
|
+
declare const Badge: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
37
|
+
type Badge = ReturnType<typeof Badge>;
|
|
38
|
+
export default Badge;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
4
|
+
import { type VariantProps, tv } from 'tailwind-variants';
|
|
5
|
+
|
|
6
|
+
export const buttonVariants = tv({
|
|
7
|
+
base: "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/80',
|
|
11
|
+
outline:
|
|
12
|
+
'border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground shadow-xs',
|
|
13
|
+
secondary:
|
|
14
|
+
'bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
|
|
15
|
+
ghost:
|
|
16
|
+
'hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground',
|
|
17
|
+
destructive:
|
|
18
|
+
'bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30',
|
|
19
|
+
link: 'text-primary underline-offset-4 hover:underline'
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default:
|
|
23
|
+
'h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
|
|
24
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
sm: 'h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5',
|
|
26
|
+
lg: 'h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
|
|
27
|
+
icon: 'size-9',
|
|
28
|
+
'icon-xs':
|
|
29
|
+
"size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
+
'icon-sm':
|
|
31
|
+
'size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md',
|
|
32
|
+
'icon-lg': 'size-10'
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
variant: 'default',
|
|
37
|
+
size: 'default'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
42
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
|
|
43
|
+
|
|
44
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> &
|
|
45
|
+
WithElementRef<HTMLAnchorAttributes> & {
|
|
46
|
+
variant?: ButtonVariant;
|
|
47
|
+
size?: ButtonSize;
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
let {
|
|
53
|
+
class: className,
|
|
54
|
+
variant = 'default',
|
|
55
|
+
size = 'default',
|
|
56
|
+
ref = $bindable(null),
|
|
57
|
+
href = undefined,
|
|
58
|
+
type = 'button',
|
|
59
|
+
disabled,
|
|
60
|
+
children,
|
|
61
|
+
...restProps
|
|
62
|
+
}: ButtonProps = $props();
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
{#if href}
|
|
66
|
+
<a
|
|
67
|
+
bind:this={ref}
|
|
68
|
+
data-slot="button"
|
|
69
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
70
|
+
href={disabled ? undefined : href}
|
|
71
|
+
aria-disabled={disabled}
|
|
72
|
+
role={disabled ? 'link' : undefined}
|
|
73
|
+
tabindex={disabled ? -1 : undefined}
|
|
74
|
+
{...restProps}
|
|
75
|
+
>
|
|
76
|
+
{@render children?.()}
|
|
77
|
+
</a>
|
|
78
|
+
{:else}
|
|
79
|
+
<button
|
|
80
|
+
bind:this={ref}
|
|
81
|
+
data-slot="button"
|
|
82
|
+
class={cn(buttonVariants({ variant, size }), className)}
|
|
83
|
+
{type}
|
|
84
|
+
{disabled}
|
|
85
|
+
{...restProps}
|
|
86
|
+
>
|
|
87
|
+
{@render children?.()}
|
|
88
|
+
</button>
|
|
89
|
+
{/if}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
2
|
+
import type { HTMLAnchorAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
3
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
4
|
+
export declare const buttonVariants: import("tailwind-variants").TVReturnType<{
|
|
5
|
+
variant: {
|
|
6
|
+
default: string;
|
|
7
|
+
outline: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
ghost: string;
|
|
10
|
+
destructive: string;
|
|
11
|
+
link: string;
|
|
12
|
+
};
|
|
13
|
+
size: {
|
|
14
|
+
default: string;
|
|
15
|
+
xs: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
lg: string;
|
|
18
|
+
icon: string;
|
|
19
|
+
'icon-xs': string;
|
|
20
|
+
'icon-sm': string;
|
|
21
|
+
'icon-lg': string;
|
|
22
|
+
};
|
|
23
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
24
|
+
variant: {
|
|
25
|
+
default: string;
|
|
26
|
+
outline: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
ghost: string;
|
|
29
|
+
destructive: string;
|
|
30
|
+
link: string;
|
|
31
|
+
};
|
|
32
|
+
size: {
|
|
33
|
+
default: string;
|
|
34
|
+
xs: string;
|
|
35
|
+
sm: string;
|
|
36
|
+
lg: string;
|
|
37
|
+
icon: string;
|
|
38
|
+
'icon-xs': string;
|
|
39
|
+
'icon-sm': string;
|
|
40
|
+
'icon-lg': string;
|
|
41
|
+
};
|
|
42
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
43
|
+
variant: {
|
|
44
|
+
default: string;
|
|
45
|
+
outline: string;
|
|
46
|
+
secondary: string;
|
|
47
|
+
ghost: string;
|
|
48
|
+
destructive: string;
|
|
49
|
+
link: string;
|
|
50
|
+
};
|
|
51
|
+
size: {
|
|
52
|
+
default: string;
|
|
53
|
+
xs: string;
|
|
54
|
+
sm: string;
|
|
55
|
+
lg: string;
|
|
56
|
+
icon: string;
|
|
57
|
+
'icon-xs': string;
|
|
58
|
+
'icon-sm': string;
|
|
59
|
+
'icon-lg': string;
|
|
60
|
+
};
|
|
61
|
+
}, undefined, "focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 active:not-aria-[haspopup]:translate-y-px aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 group/button inline-flex shrink-0 items-center justify-center whitespace-nowrap transition-all outline-none select-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", unknown, unknown, undefined>>;
|
|
62
|
+
export type ButtonVariant = VariantProps<typeof buttonVariants>['variant'];
|
|
63
|
+
export type ButtonSize = VariantProps<typeof buttonVariants>['size'];
|
|
64
|
+
export type ButtonProps = WithElementRef<HTMLButtonAttributes> & WithElementRef<HTMLAnchorAttributes> & {
|
|
65
|
+
variant?: ButtonVariant;
|
|
66
|
+
size?: ButtonSize;
|
|
67
|
+
};
|
|
68
|
+
declare const Button: import("svelte").Component<ButtonProps, {}, "ref">;
|
|
69
|
+
type Button = ReturnType<typeof Button>;
|
|
70
|
+
export default Button;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Root from './popover.svelte';
|
|
2
|
+
import Close from './popover-close.svelte';
|
|
3
|
+
import Content from './popover-content.svelte';
|
|
4
|
+
import Description from './popover-description.svelte';
|
|
5
|
+
import Header from './popover-header.svelte';
|
|
6
|
+
import Title from './popover-title.svelte';
|
|
7
|
+
import Trigger from './popover-trigger.svelte';
|
|
8
|
+
import Portal from './popover-portal.svelte';
|
|
9
|
+
export { Root, Content, Description, Header, Title, Trigger, Close, Portal, Root as Popover, Content as PopoverContent, Description as PopoverDescription, Header as PopoverHeader, Title as PopoverTitle, Trigger as PopoverTrigger, Close as PopoverClose, Portal as PopoverPortal };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Root from './popover.svelte';
|
|
2
|
+
import Close from './popover-close.svelte';
|
|
3
|
+
import Content from './popover-content.svelte';
|
|
4
|
+
import Description from './popover-description.svelte';
|
|
5
|
+
import Header from './popover-header.svelte';
|
|
6
|
+
import Title from './popover-title.svelte';
|
|
7
|
+
import Trigger from './popover-trigger.svelte';
|
|
8
|
+
import Portal from './popover-portal.svelte';
|
|
9
|
+
export { Root, Content, Description, Header, Title, Trigger, Close, Portal,
|
|
10
|
+
//
|
|
11
|
+
Root as Popover, Content as PopoverContent, Description as PopoverDescription, Header as PopoverHeader, Title as PopoverTitle, 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 '../../../shadcn.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
|
+
'bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 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 ring-foreground/10 flex flex-col gap-4 rounded-md p-4 text-sm shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 w-72 origin-(--transform-origin) outline-hidden',
|
|
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 '../../../shadcn.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,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="popover-description"
|
|
16
|
+
class={cn('text-muted-foreground', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
declare const PopoverDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type PopoverDescription = ReturnType<typeof PopoverDescription>;
|
|
5
|
+
export default PopoverDescription;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="popover-header"
|
|
16
|
+
class={cn('flex flex-col gap-1 text-sm', className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
declare const PopoverHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type PopoverHeader = ReturnType<typeof PopoverHeader>;
|
|
5
|
+
export default PopoverHeader;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div bind:this={ref} data-slot="popover-title" class={cn('font-medium', className)} {...restProps}>
|
|
14
|
+
{@render children?.()}
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../shadcn.js';
|
|
3
|
+
declare const PopoverTitle: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type PopoverTitle = ReturnType<typeof PopoverTitle>;
|
|
5
|
+
export default PopoverTitle;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../shadcn.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,30 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn, type WithoutChild } from '../../../shadcn.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
orientation = 'vertical',
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChild<ScrollAreaPrimitive.ScrollbarProps> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<ScrollAreaPrimitive.Scrollbar
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="scroll-area-scrollbar"
|
|
17
|
+
data-orientation={orientation}
|
|
18
|
+
{orientation}
|
|
19
|
+
class={cn(
|
|
20
|
+
'data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none',
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{@render children?.()}
|
|
26
|
+
<ScrollAreaPrimitive.Thumb
|
|
27
|
+
data-slot="scroll-area-thumb"
|
|
28
|
+
class="rounded-full bg-border relative flex-1"
|
|
29
|
+
/>
|
|
30
|
+
</ScrollAreaPrimitive.Scrollbar>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
|
2
|
+
declare const ScrollAreaScrollbar: import("svelte").Component<Omit<ScrollAreaPrimitive.ScrollbarProps, "child">, {}, "ref">;
|
|
3
|
+
type ScrollAreaScrollbar = ReturnType<typeof ScrollAreaScrollbar>;
|
|
4
|
+
export default ScrollAreaScrollbar;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
|
3
|
+
import { Scrollbar } from './index.js';
|
|
4
|
+
import { cn, type WithoutChild } from '../../../shadcn.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
viewportRef = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
orientation = 'vertical',
|
|
11
|
+
scrollbarXClasses = '',
|
|
12
|
+
scrollbarYClasses = '',
|
|
13
|
+
children,
|
|
14
|
+
...restProps
|
|
15
|
+
}: WithoutChild<ScrollAreaPrimitive.RootProps> & {
|
|
16
|
+
orientation?: 'vertical' | 'horizontal' | 'both' | undefined;
|
|
17
|
+
scrollbarXClasses?: string | undefined;
|
|
18
|
+
scrollbarYClasses?: string | undefined;
|
|
19
|
+
viewportRef?: HTMLElement | null;
|
|
20
|
+
} = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<ScrollAreaPrimitive.Root
|
|
24
|
+
bind:ref
|
|
25
|
+
data-slot="scroll-area"
|
|
26
|
+
class={cn('relative', className)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
<ScrollAreaPrimitive.Viewport
|
|
30
|
+
bind:ref={viewportRef}
|
|
31
|
+
data-slot="scroll-area-viewport"
|
|
32
|
+
class="cn-scroll-area-viewport focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"
|
|
33
|
+
>
|
|
34
|
+
{@render children?.()}
|
|
35
|
+
</ScrollAreaPrimitive.Viewport>
|
|
36
|
+
{#if orientation === 'vertical' || orientation === 'both'}
|
|
37
|
+
<Scrollbar orientation="vertical" class={scrollbarYClasses} />
|
|
38
|
+
{/if}
|
|
39
|
+
{#if orientation === 'horizontal' || orientation === 'both'}
|
|
40
|
+
<Scrollbar orientation="horizontal" class={scrollbarXClasses} />
|
|
41
|
+
{/if}
|
|
42
|
+
<ScrollAreaPrimitive.Corner />
|
|
43
|
+
</ScrollAreaPrimitive.Root>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from 'bits-ui';
|
|
2
|
+
import { type WithoutChild } from '../../../shadcn.js';
|
|
3
|
+
type $$ComponentProps = WithoutChild<ScrollAreaPrimitive.RootProps> & {
|
|
4
|
+
orientation?: 'vertical' | 'horizontal' | 'both' | undefined;
|
|
5
|
+
scrollbarXClasses?: string | undefined;
|
|
6
|
+
scrollbarYClasses?: string | undefined;
|
|
7
|
+
viewportRef?: HTMLElement | null;
|
|
8
|
+
};
|
|
9
|
+
declare const ScrollArea: import("svelte").Component<$$ComponentProps, {}, "ref" | "viewportRef">;
|
|
10
|
+
type ScrollArea = ReturnType<typeof ScrollArea>;
|
|
11
|
+
export default ScrollArea;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Separator as SeparatorPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../shadcn.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
|
+
/>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Root from './sheet.svelte';
|
|
2
|
+
import Portal from './sheet-portal.svelte';
|
|
3
|
+
import Trigger from './sheet-trigger.svelte';
|
|
4
|
+
import Close from './sheet-close.svelte';
|
|
5
|
+
import Overlay from './sheet-overlay.svelte';
|
|
6
|
+
import Content from './sheet-content.svelte';
|
|
7
|
+
import Header from './sheet-header.svelte';
|
|
8
|
+
import Footer from './sheet-footer.svelte';
|
|
9
|
+
import Title from './sheet-title.svelte';
|
|
10
|
+
import Description from './sheet-description.svelte';
|
|
11
|
+
export { Root, Close, Trigger, Portal, Overlay, Content, Header, Footer, Title, Description, Root as Sheet, Close as SheetClose, Trigger as SheetTrigger, Portal as SheetPortal, Overlay as SheetOverlay, Content as SheetContent, Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, Description as SheetDescription };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Root from './sheet.svelte';
|
|
2
|
+
import Portal from './sheet-portal.svelte';
|
|
3
|
+
import Trigger from './sheet-trigger.svelte';
|
|
4
|
+
import Close from './sheet-close.svelte';
|
|
5
|
+
import Overlay from './sheet-overlay.svelte';
|
|
6
|
+
import Content from './sheet-content.svelte';
|
|
7
|
+
import Header from './sheet-header.svelte';
|
|
8
|
+
import Footer from './sheet-footer.svelte';
|
|
9
|
+
import Title from './sheet-title.svelte';
|
|
10
|
+
import Description from './sheet-description.svelte';
|
|
11
|
+
export { Root, Close, Trigger, Portal, Overlay, Content, Header, Footer, Title, Description,
|
|
12
|
+
//
|
|
13
|
+
Root as Sheet, Close as SheetClose, Trigger as SheetTrigger, Portal as SheetPortal, Overlay as SheetOverlay, Content as SheetContent, Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, Description as SheetDescription };
|