@autumnsgrove/groveengine 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 +163 -0
- package/dist/auth/jwt.d.ts +14 -0
- package/dist/auth/jwt.js +109 -0
- package/dist/auth/session.d.ts +42 -0
- package/dist/auth/session.js +105 -0
- package/dist/components/admin/GutterManager.svelte +910 -0
- package/dist/components/admin/GutterManager.svelte.d.ts +15 -0
- package/dist/components/admin/MarkdownEditor.svelte +3114 -0
- package/dist/components/admin/MarkdownEditor.svelte.d.ts +43 -0
- package/dist/components/custom/CollapsibleSection.svelte +74 -0
- package/dist/components/custom/CollapsibleSection.svelte.d.ts +15 -0
- package/dist/components/custom/ContentWithGutter.svelte +646 -0
- package/dist/components/custom/ContentWithGutter.svelte.d.ts +19 -0
- package/dist/components/custom/GutterItem.svelte +201 -0
- package/dist/components/custom/GutterItem.svelte.d.ts +11 -0
- package/dist/components/custom/LeftGutter.svelte +271 -0
- package/dist/components/custom/LeftGutter.svelte.d.ts +17 -0
- package/dist/components/custom/MobileTOC.svelte +273 -0
- package/dist/components/custom/MobileTOC.svelte.d.ts +11 -0
- package/dist/components/custom/TableOfContents.svelte +163 -0
- package/dist/components/custom/TableOfContents.svelte.d.ts +11 -0
- package/dist/components/gallery/ImageGallery.svelte +681 -0
- package/dist/components/gallery/ImageGallery.svelte.d.ts +11 -0
- package/dist/components/gallery/Lightbox.svelte +107 -0
- package/dist/components/gallery/Lightbox.svelte.d.ts +19 -0
- package/dist/components/gallery/LightboxCaption.svelte +25 -0
- package/dist/components/gallery/LightboxCaption.svelte.d.ts +11 -0
- package/dist/components/gallery/ZoomableImage.svelte +163 -0
- package/dist/components/gallery/ZoomableImage.svelte.d.ts +17 -0
- package/dist/components/ui/Accordion.svelte +74 -0
- package/dist/components/ui/Accordion.svelte.d.ts +42 -0
- package/dist/components/ui/Badge.svelte +48 -0
- package/dist/components/ui/Badge.svelte.d.ts +26 -0
- package/dist/components/ui/Button.svelte +74 -0
- package/dist/components/ui/Button.svelte.d.ts +34 -0
- package/dist/components/ui/Card.svelte +102 -0
- package/dist/components/ui/Card.svelte.d.ts +46 -0
- package/dist/components/ui/Dialog.svelte +91 -0
- package/dist/components/ui/Dialog.svelte.d.ts +43 -0
- package/dist/components/ui/Input.svelte +81 -0
- package/dist/components/ui/Input.svelte.d.ts +35 -0
- package/dist/components/ui/Select.svelte +69 -0
- package/dist/components/ui/Select.svelte.d.ts +36 -0
- package/dist/components/ui/Sheet.svelte +98 -0
- package/dist/components/ui/Sheet.svelte.d.ts +45 -0
- package/dist/components/ui/Skeleton.svelte +31 -0
- package/dist/components/ui/Skeleton.svelte.d.ts +26 -0
- package/dist/components/ui/Table.svelte +59 -0
- package/dist/components/ui/Table.svelte.d.ts +44 -0
- package/dist/components/ui/Tabs.svelte +76 -0
- package/dist/components/ui/Tabs.svelte.d.ts +41 -0
- package/dist/components/ui/Textarea.svelte +81 -0
- package/dist/components/ui/Textarea.svelte.d.ts +35 -0
- package/dist/components/ui/Toast.svelte +18 -0
- package/dist/components/ui/Toast.svelte.d.ts +7 -0
- package/dist/components/ui/accordion/accordion-content.svelte +24 -0
- package/dist/components/ui/accordion/accordion-content.svelte.d.ts +4 -0
- package/dist/components/ui/accordion/accordion-item.svelte +12 -0
- package/dist/components/ui/accordion/accordion-item.svelte.d.ts +4 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte +29 -0
- package/dist/components/ui/accordion/accordion-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/accordion/index.d.ts +6 -0
- package/dist/components/ui/accordion/index.js +8 -0
- package/dist/components/ui/badge/badge.svelte +50 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +60 -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 +132 -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-content.svelte +16 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +16 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +16 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +16 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +25 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
- package/dist/components/ui/card/card.svelte +20 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/card/index.js +9 -0
- package/dist/components/ui/dialog/dialog-content.svelte +38 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/dist/components/ui/dialog/dialog-description.svelte +16 -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 +19 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +16 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/index.d.ts +26 -0
- package/dist/components/ui/index.js +29 -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 +46 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +13 -0
- package/dist/components/ui/select/select-content.svelte +39 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
- package/dist/components/ui/select/select-group-heading.svelte +16 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +37 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +13 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +24 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +22 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/index.d.ts +12 -0
- package/dist/components/ui/sheet/index.js +14 -0
- package/dist/components/ui/sheet/sheet-content.svelte +53 -0
- package/dist/components/ui/sheet/sheet-content.svelte.d.ts +62 -0
- package/dist/components/ui/sheet/sheet-description.svelte +16 -0
- package/dist/components/ui/sheet/sheet-description.svelte.d.ts +4 -0
- package/dist/components/ui/sheet/sheet-footer.svelte +20 -0
- package/dist/components/ui/sheet/sheet-footer.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-header.svelte +20 -0
- package/dist/components/ui/sheet/sheet-header.svelte.d.ts +5 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte +21 -0
- package/dist/components/ui/sheet/sheet-overlay.svelte.d.ts +6 -0
- package/dist/components/ui/sheet/sheet-title.svelte +16 -0
- package/dist/components/ui/sheet/sheet-title.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -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 +16 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +16 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +20 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +16 -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 +16 -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 +18 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/tabs/index.js +8 -0
- package/dist/components/ui/tabs/tabs-content.svelte +19 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +19 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +19 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +24 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +6 -0
- package/dist/components/ui/toast.d.ts +86 -0
- package/dist/components/ui/toast.js +99 -0
- package/dist/db/schema.sql +238 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +20 -0
- package/dist/payments/index.d.ts +33 -0
- package/dist/payments/index.js +47 -0
- package/dist/payments/shop.d.ts +165 -0
- package/dist/payments/shop.js +588 -0
- package/dist/payments/stripe/client.d.ts +231 -0
- package/dist/payments/stripe/client.js +198 -0
- package/dist/payments/stripe/index.d.ts +18 -0
- package/dist/payments/stripe/index.js +17 -0
- package/dist/payments/stripe/provider.d.ts +50 -0
- package/dist/payments/stripe/provider.js +530 -0
- package/dist/payments/types.d.ts +355 -0
- package/dist/payments/types.js +7 -0
- package/dist/server/logger.d.ts +53 -0
- package/dist/server/logger.js +252 -0
- package/dist/styles/content.css +514 -0
- package/dist/styles/tokens.css +175 -0
- package/dist/utils/api.d.ts +20 -0
- package/dist/utils/api.js +109 -0
- package/dist/utils/cn.d.ts +15 -0
- package/dist/utils/cn.js +18 -0
- package/dist/utils/csrf.d.ts +22 -0
- package/dist/utils/csrf.js +72 -0
- package/dist/utils/debounce.d.ts +7 -0
- package/dist/utils/debounce.js +14 -0
- package/dist/utils/gallery.d.ts +66 -0
- package/dist/utils/gallery.js +181 -0
- package/dist/utils/gutter.d.ts +54 -0
- package/dist/utils/gutter.js +169 -0
- package/dist/utils/imageProcessor.d.ts +58 -0
- package/dist/utils/imageProcessor.js +205 -0
- package/dist/utils/json.d.ts +17 -0
- package/dist/utils/json.js +26 -0
- package/dist/utils/markdown.d.ts +101 -0
- package/dist/utils/markdown.js +947 -0
- package/dist/utils/sanitize.d.ts +25 -0
- package/dist/utils/sanitize.js +127 -0
- package/dist/utils/validation.d.ts +46 -0
- package/dist/utils/validation.js +169 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +5 -0
- package/package.json +129 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Wrappers
|
|
2
|
+
export { default as Button } from "./Button.svelte";
|
|
3
|
+
export { default as Card } from "./Card.svelte";
|
|
4
|
+
export { default as Badge } from "./Badge.svelte";
|
|
5
|
+
export { default as Dialog } from "./Dialog.svelte";
|
|
6
|
+
export { default as Input } from "./Input.svelte";
|
|
7
|
+
export { default as Textarea } from "./Textarea.svelte";
|
|
8
|
+
export { default as Select } from "./Select.svelte";
|
|
9
|
+
export { default as Tabs } from "./Tabs.svelte";
|
|
10
|
+
export { default as Accordion } from "./Accordion.svelte";
|
|
11
|
+
export { default as Sheet } from "./Sheet.svelte";
|
|
12
|
+
export { default as Toast } from "./Toast.svelte";
|
|
13
|
+
export { default as Skeleton } from "./Skeleton.svelte";
|
|
14
|
+
export { default as Table } from "./Table.svelte";
|
|
15
|
+
// Toast utilities
|
|
16
|
+
export { toast } from "./toast";
|
|
17
|
+
// Re-export shadcn components for advanced usage
|
|
18
|
+
export { Root as DialogRoot, Trigger as DialogTrigger, Close as DialogClose, Portal as DialogPortal } from "./dialog";
|
|
19
|
+
export { Root as SheetRoot, Trigger as SheetTrigger, Close as SheetClose, Portal as SheetPortal, Content as SheetContent, Header as SheetHeader, Footer as SheetFooter, Title as SheetTitle, Description as SheetDescription } from "./sheet";
|
|
20
|
+
export { Root as TableRoot, Body as TableBody, Caption as TableCaption, Cell as TableCell, Footer as TableFooter, Head as TableHead, Header as TableHeader, Row as TableRow } from "./table";
|
|
21
|
+
export { Root as SkeletonRoot, Skeleton as SkeletonComponent } from "./skeleton";
|
|
22
|
+
export { Root as AccordionRoot } from "./accordion";
|
|
23
|
+
export { Root as BadgeRoot } from "./badge";
|
|
24
|
+
export { Root as ButtonRoot } from "./button";
|
|
25
|
+
export { Root as CardRoot, Header as CardHeader, Title as CardTitle, Description as CardDescription, Content as CardContent, Footer as CardFooter } from "./card";
|
|
26
|
+
export { Root as InputRoot } from "./input";
|
|
27
|
+
export { Root as TextareaRoot } from "./textarea";
|
|
28
|
+
export { Root as SelectRoot, Trigger as SelectTrigger, Content as SelectContent, Item as SelectItem, Group as SelectGroup, GroupHeading as SelectLabel, Separator as SelectSeparator, ScrollUpButton as SelectScrollUpButton, ScrollDownButton as SelectScrollDownButton } from "./select";
|
|
29
|
+
export { Root as TabsRoot, List as TabsList, Trigger as TabsTrigger, Content as TabsContent } from "./tabs";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
type InputType = Exclude<HTMLInputTypeAttribute, "file">;
|
|
7
|
+
|
|
8
|
+
type Props = WithElementRef<
|
|
9
|
+
Omit<HTMLInputAttributes, "type"> &
|
|
10
|
+
({ type: "file"; files?: FileList } | { type?: InputType; files?: undefined })
|
|
11
|
+
>;
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
ref = $bindable(null),
|
|
15
|
+
value = $bindable(),
|
|
16
|
+
type,
|
|
17
|
+
files = $bindable(),
|
|
18
|
+
class: className,
|
|
19
|
+
...restProps
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if type === "file"}
|
|
24
|
+
<input
|
|
25
|
+
bind:this={ref}
|
|
26
|
+
class={cn(
|
|
27
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
type="file"
|
|
31
|
+
bind:files
|
|
32
|
+
bind:value
|
|
33
|
+
{...restProps}
|
|
34
|
+
/>
|
|
35
|
+
{:else}
|
|
36
|
+
<input
|
|
37
|
+
bind:this={ref}
|
|
38
|
+
class={cn(
|
|
39
|
+
"border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
40
|
+
className
|
|
41
|
+
)}
|
|
42
|
+
{type}
|
|
43
|
+
bind:value
|
|
44
|
+
{...restProps}
|
|
45
|
+
/>
|
|
46
|
+
{/if}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { HTMLInputAttributes, HTMLInputTypeAttribute } from "svelte/elements";
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
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, {}, "value" | "ref" | "files">;
|
|
12
|
+
type Input = ReturnType<typeof Input>;
|
|
13
|
+
export default Input;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
import GroupHeading from "./select-group-heading.svelte";
|
|
3
|
+
import Item from "./select-item.svelte";
|
|
4
|
+
import Content from "./select-content.svelte";
|
|
5
|
+
import Trigger from "./select-trigger.svelte";
|
|
6
|
+
import Separator from "./select-separator.svelte";
|
|
7
|
+
import ScrollDownButton from "./select-scroll-down-button.svelte";
|
|
8
|
+
import ScrollUpButton from "./select-scroll-up-button.svelte";
|
|
9
|
+
declare const Root: import("svelte").Component<import("bits-ui").ComboboxRootPropsWithoutHTML, {}, "value" | "open">;
|
|
10
|
+
declare const Group: import("svelte").Component<SelectPrimitive.GroupProps, {}, "ref">;
|
|
11
|
+
export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
import GroupHeading from "./select-group-heading.svelte";
|
|
3
|
+
import Item from "./select-item.svelte";
|
|
4
|
+
import Content from "./select-content.svelte";
|
|
5
|
+
import Trigger from "./select-trigger.svelte";
|
|
6
|
+
import Separator from "./select-separator.svelte";
|
|
7
|
+
import ScrollDownButton from "./select-scroll-down-button.svelte";
|
|
8
|
+
import ScrollUpButton from "./select-scroll-up-button.svelte";
|
|
9
|
+
const Root = SelectPrimitive.Root;
|
|
10
|
+
const Group = SelectPrimitive.Group;
|
|
11
|
+
export { Root, Group, GroupHeading, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton,
|
|
12
|
+
//
|
|
13
|
+
Root as Select, Group as SelectGroup, GroupHeading as SelectGroupHeading, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import SelectScrollUpButton from "./select-scroll-up-button.svelte";
|
|
4
|
+
import SelectScrollDownButton from "./select-scroll-down-button.svelte";
|
|
5
|
+
import { cn } from "../../../utils";
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
ref = $bindable(null),
|
|
9
|
+
class: className,
|
|
10
|
+
sideOffset = 4,
|
|
11
|
+
portalProps,
|
|
12
|
+
children,
|
|
13
|
+
...restProps
|
|
14
|
+
}: WithoutChild<SelectPrimitive.ContentProps> & {
|
|
15
|
+
portalProps?: SelectPrimitive.PortalProps;
|
|
16
|
+
} = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<SelectPrimitive.Portal {...portalProps}>
|
|
20
|
+
<SelectPrimitive.Content
|
|
21
|
+
bind:ref
|
|
22
|
+
{sideOffset}
|
|
23
|
+
class={cn(
|
|
24
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
25
|
+
className
|
|
26
|
+
)}
|
|
27
|
+
{...restProps}
|
|
28
|
+
>
|
|
29
|
+
<SelectScrollUpButton />
|
|
30
|
+
<SelectPrimitive.Viewport
|
|
31
|
+
class={cn(
|
|
32
|
+
"h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"
|
|
33
|
+
)}
|
|
34
|
+
>
|
|
35
|
+
{@render children?.()}
|
|
36
|
+
</SelectPrimitive.Viewport>
|
|
37
|
+
<SelectScrollDownButton />
|
|
38
|
+
</SelectPrimitive.Content>
|
|
39
|
+
</SelectPrimitive.Portal>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
2
|
+
type $$ComponentProps = WithoutChild<SelectPrimitive.ContentProps> & {
|
|
3
|
+
portalProps?: SelectPrimitive.PortalProps;
|
|
4
|
+
};
|
|
5
|
+
declare const SelectContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type SelectContent = ReturnType<typeof SelectContent>;
|
|
7
|
+
export default SelectContent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: SelectPrimitive.GroupHeadingProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<SelectPrimitive.GroupHeading
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Check from "@lucide/svelte/icons/check";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
value,
|
|
10
|
+
label,
|
|
11
|
+
children: childrenProp,
|
|
12
|
+
...restProps
|
|
13
|
+
}: WithoutChild<SelectPrimitive.ItemProps> = $props();
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<SelectPrimitive.Item
|
|
17
|
+
bind:ref
|
|
18
|
+
{value}
|
|
19
|
+
class={cn(
|
|
20
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
23
|
+
{...restProps}
|
|
24
|
+
>
|
|
25
|
+
{#snippet children({ selected, highlighted })}
|
|
26
|
+
<span class="absolute left-2 flex size-3.5 items-center justify-center">
|
|
27
|
+
{#if selected}
|
|
28
|
+
<Check class="size-4" />
|
|
29
|
+
{/if}
|
|
30
|
+
</span>
|
|
31
|
+
{#if childrenProp}
|
|
32
|
+
{@render childrenProp({ selected, highlighted })}
|
|
33
|
+
{:else}
|
|
34
|
+
{label || value}
|
|
35
|
+
{/if}
|
|
36
|
+
{/snippet}
|
|
37
|
+
</SelectPrimitive.Item>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SelectPrimitive.ScrollDownButtonProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SelectPrimitive.ScrollDownButton
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
<ChevronDown class="size-4" />
|
|
19
|
+
</SelectPrimitive.ScrollDownButton>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
declare const SelectScrollDownButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollDownButtonProps, "child">, "children">, {}, "ref">;
|
|
3
|
+
type SelectScrollDownButton = ReturnType<typeof SelectScrollDownButton>;
|
|
4
|
+
export default SelectScrollDownButton;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import ChevronUp from "@lucide/svelte/icons/chevron-up";
|
|
3
|
+
import { Select as SelectPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithoutChildrenOrChild<SelectPrimitive.ScrollUpButtonProps> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SelectPrimitive.ScrollUpButton
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
16
|
+
{...restProps}
|
|
17
|
+
>
|
|
18
|
+
<ChevronUp class="size-4" />
|
|
19
|
+
</SelectPrimitive.ScrollUpButton>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from "bits-ui";
|
|
2
|
+
declare const SelectScrollUpButton: import("svelte").Component<Omit<Omit<SelectPrimitive.ScrollUpButtonProps, "child">, "children">, {}, "ref">;
|
|
3
|
+
type SelectScrollUpButton = ReturnType<typeof SelectScrollUpButton>;
|
|
4
|
+
export default SelectScrollUpButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Separator as SeparatorPrimitive } from "bits-ui";
|
|
3
|
+
import { Separator } from "../separator/index.js";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
...restProps
|
|
10
|
+
}: SeparatorPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<Separator bind:ref class={cn("bg-muted -mx-1 my-1 h-px", className)} {...restProps} />
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive, type WithoutChild } from "bits-ui";
|
|
3
|
+
import ChevronDown from "@lucide/svelte/icons/chevron-down";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChild<SelectPrimitive.TriggerProps> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<SelectPrimitive.Trigger
|
|
15
|
+
bind:ref
|
|
16
|
+
class={cn(
|
|
17
|
+
"border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
<ChevronDown class="size-4 opacity-50" />
|
|
24
|
+
</SelectPrimitive.Trigger>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Separator as SeparatorPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
orientation = "horizontal",
|
|
9
|
+
...restProps
|
|
10
|
+
}: SeparatorPrimitive.RootProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<SeparatorPrimitive.Root
|
|
14
|
+
bind:ref
|
|
15
|
+
class={cn(
|
|
16
|
+
"bg-border shrink-0",
|
|
17
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "min-h-full w-[1px]",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{orientation}
|
|
21
|
+
{...restProps}
|
|
22
|
+
/>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
2
|
+
import Overlay from "./sheet-overlay.svelte";
|
|
3
|
+
import Content from "./sheet-content.svelte";
|
|
4
|
+
import Header from "./sheet-header.svelte";
|
|
5
|
+
import Footer from "./sheet-footer.svelte";
|
|
6
|
+
import Title from "./sheet-title.svelte";
|
|
7
|
+
import Description from "./sheet-description.svelte";
|
|
8
|
+
declare const Root: import("svelte").Component<import("bits-ui").AlertDialogRootPropsWithoutHTML, {}, "open">;
|
|
9
|
+
declare const Close: import("svelte").Component<SheetPrimitive.TriggerProps, {}, "ref">;
|
|
10
|
+
declare const Trigger: import("svelte").Component<SheetPrimitive.TriggerProps, {}, "ref">;
|
|
11
|
+
declare const Portal: import("svelte").Component<import("bits-ui").PortalProps, {}, "">;
|
|
12
|
+
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,14 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
2
|
+
import Overlay from "./sheet-overlay.svelte";
|
|
3
|
+
import Content from "./sheet-content.svelte";
|
|
4
|
+
import Header from "./sheet-header.svelte";
|
|
5
|
+
import Footer from "./sheet-footer.svelte";
|
|
6
|
+
import Title from "./sheet-title.svelte";
|
|
7
|
+
import Description from "./sheet-description.svelte";
|
|
8
|
+
const Root = SheetPrimitive.Root;
|
|
9
|
+
const Close = SheetPrimitive.Close;
|
|
10
|
+
const Trigger = SheetPrimitive.Trigger;
|
|
11
|
+
const Portal = SheetPrimitive.Portal;
|
|
12
|
+
export { Root, Close, Trigger, Portal, Overlay, Content, Header, Footer, Title, Description,
|
|
13
|
+
//
|
|
14
|
+
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,53 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
export const sheetVariants = tv({
|
|
4
|
+
base: "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
5
|
+
variants: {
|
|
6
|
+
side: {
|
|
7
|
+
top: "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",
|
|
8
|
+
bottom: "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",
|
|
9
|
+
left: "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
10
|
+
right: "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
side: "right",
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export type Side = VariantProps<typeof sheetVariants>["side"];
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { Dialog as SheetPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
23
|
+
import X from "@lucide/svelte/icons/x";
|
|
24
|
+
import type { Snippet } from "svelte";
|
|
25
|
+
import SheetOverlay from "./sheet-overlay.svelte";
|
|
26
|
+
import { cn } from "../../../utils";
|
|
27
|
+
|
|
28
|
+
let {
|
|
29
|
+
ref = $bindable(null),
|
|
30
|
+
class: className,
|
|
31
|
+
side = "right",
|
|
32
|
+
portalProps,
|
|
33
|
+
children,
|
|
34
|
+
...restProps
|
|
35
|
+
}: WithoutChildrenOrChild<SheetPrimitive.ContentProps> & {
|
|
36
|
+
portalProps?: SheetPrimitive.PortalProps;
|
|
37
|
+
side?: Side;
|
|
38
|
+
children: Snippet;
|
|
39
|
+
} = $props();
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<SheetPrimitive.Portal {...portalProps}>
|
|
43
|
+
<SheetOverlay />
|
|
44
|
+
<SheetPrimitive.Content bind:ref class={cn(sheetVariants({ side }), className)} {...restProps}>
|
|
45
|
+
{@render children?.()}
|
|
46
|
+
<SheetPrimitive.Close
|
|
47
|
+
class="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none"
|
|
48
|
+
>
|
|
49
|
+
<X class="size-4" />
|
|
50
|
+
<span class="sr-only">Close</span>
|
|
51
|
+
</SheetPrimitive.Close>
|
|
52
|
+
</SheetPrimitive.Content>
|
|
53
|
+
</SheetPrimitive.Portal>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const sheetVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
side: {
|
|
4
|
+
top: string;
|
|
5
|
+
bottom: string;
|
|
6
|
+
left: string;
|
|
7
|
+
right: string;
|
|
8
|
+
};
|
|
9
|
+
}, undefined, "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
10
|
+
side: {
|
|
11
|
+
top: string;
|
|
12
|
+
bottom: string;
|
|
13
|
+
left: string;
|
|
14
|
+
right: string;
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
side: {
|
|
18
|
+
top: string;
|
|
19
|
+
bottom: string;
|
|
20
|
+
left: string;
|
|
21
|
+
right: string;
|
|
22
|
+
};
|
|
23
|
+
}>, {
|
|
24
|
+
side: {
|
|
25
|
+
top: string;
|
|
26
|
+
bottom: string;
|
|
27
|
+
left: string;
|
|
28
|
+
right: string;
|
|
29
|
+
};
|
|
30
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
31
|
+
side: {
|
|
32
|
+
top: string;
|
|
33
|
+
bottom: string;
|
|
34
|
+
left: string;
|
|
35
|
+
right: string;
|
|
36
|
+
};
|
|
37
|
+
}, undefined, "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500", import("tailwind-variants/dist/config.js").TVConfig<{
|
|
38
|
+
side: {
|
|
39
|
+
top: string;
|
|
40
|
+
bottom: string;
|
|
41
|
+
left: string;
|
|
42
|
+
right: string;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
side: {
|
|
46
|
+
top: string;
|
|
47
|
+
bottom: string;
|
|
48
|
+
left: string;
|
|
49
|
+
right: string;
|
|
50
|
+
};
|
|
51
|
+
}>, unknown, unknown, undefined>>;
|
|
52
|
+
export type Side = VariantProps<typeof sheetVariants>["side"];
|
|
53
|
+
import { Dialog as SheetPrimitive, type WithoutChildrenOrChild } from "bits-ui";
|
|
54
|
+
import type { Snippet } from "svelte";
|
|
55
|
+
type $$ComponentProps = WithoutChildrenOrChild<SheetPrimitive.ContentProps> & {
|
|
56
|
+
portalProps?: SheetPrimitive.PortalProps;
|
|
57
|
+
side?: Side;
|
|
58
|
+
children: Snippet;
|
|
59
|
+
};
|
|
60
|
+
declare const SheetContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
61
|
+
type SheetContent = ReturnType<typeof SheetContent>;
|
|
62
|
+
export default SheetContent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: SheetPrimitive.DescriptionProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<SheetPrimitive.Description
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn("text-muted-foreground text-sm", className)}
|
|
15
|
+
{...restProps}
|
|
16
|
+
/>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "bits-ui";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const SheetFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type SheetFooter = ReturnType<typeof SheetFooter>;
|
|
5
|
+
export default SheetFooter;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
import type { WithElementRef } from "bits-ui";
|
|
4
|
+
import { cn } from "../../../utils";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
children,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn("flex flex-col space-y-2 text-center sm:text-left", 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 "bits-ui";
|
|
3
|
+
declare const SheetHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type SheetHeader = ReturnType<typeof SheetHeader>;
|
|
5
|
+
export default SheetHeader;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: SheetPrimitive.OverlayProps = $props();
|
|
10
|
+
|
|
11
|
+
export { className as class };
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<SheetPrimitive.Overlay
|
|
15
|
+
bind:ref
|
|
16
|
+
class={cn(
|
|
17
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
/>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Dialog as SheetPrimitive } from "bits-ui";
|
|
2
|
+
declare const SheetOverlay: import("svelte").Component<SheetPrimitive.OverlayProps, {
|
|
3
|
+
class: import("svelte/elements").ClassValue | null | undefined;
|
|
4
|
+
}, "ref">;
|
|
5
|
+
type SheetOverlay = ReturnType<typeof SheetOverlay>;
|
|
6
|
+
export default SheetOverlay;
|