@profidev/pleiades 1.7.1 → 1.8.1
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/dist/components/form/form-dialog.svelte +1 -1
- package/dist/components/table/multiselect.svelte +2 -2
- package/dist/components/ui/command/command-input.svelte +6 -3
- package/dist/components/ui/field/field-label.svelte +1 -1
- package/dist/components/ui/field/field-title.svelte +1 -1
- package/dist/components/ui/native-select/native-select-option.svelte +8 -2
- package/dist/components/ui/native-select/native-select-option.svelte.d.ts +1 -1
- package/dist/components/ui/pagination/pagination-next.svelte +15 -9
- package/dist/components/ui/pagination/pagination-next.svelte.d.ts +2 -13
- package/dist/components/ui/pagination/pagination-previous.svelte +15 -9
- package/dist/components/ui/pagination/pagination-previous.svelte.d.ts +2 -13
- package/dist/components/ui/sidebar/constants.d.ts +1 -1
- package/dist/components/ui/sidebar/constants.js +1 -1
- package/dist/components/ui/slider/slider.svelte +1 -1
- package/dist/components/ui/tooltip/tooltip.svelte +1 -4
- package/dist/components/ui-extra/alert-dialog/alert-dialog-action.svelte +40 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-action.svelte.d.ts +10 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-cancel.svelte +31 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-cancel.svelte.d.ts +9 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-content.svelte +38 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-content.svelte.d.ts +11 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-description.svelte +20 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-footer.svelte +23 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-header.svelte +23 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-media.svelte +23 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-media.svelte.d.ts +5 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-overlay.svelte +20 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-portal.svelte +7 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-portal.svelte.d.ts +3 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-title.svelte +20 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-trigger.svelte +14 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog-trigger.svelte.d.ts +4 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog.svelte +10 -0
- package/dist/components/ui-extra/alert-dialog/alert-dialog.svelte.d.ts +3 -0
- package/dist/components/ui-extra/alert-dialog/index.d.ts +13 -0
- package/dist/components/ui-extra/alert-dialog/index.js +15 -0
- package/dist/components/ui-extra/button-group/button-group-separator.svelte +23 -0
- package/dist/components/ui-extra/button-group/button-group-separator.svelte.d.ts +13 -0
- package/dist/components/ui-extra/button-group/button-group-text.svelte +31 -0
- package/dist/components/ui-extra/button-group/button-group-text.svelte.d.ts +11 -0
- package/dist/components/ui-extra/button-group/button-group.svelte +48 -0
- package/dist/components/ui-extra/button-group/button-group.svelte.d.ts +26 -0
- package/dist/components/ui-extra/button-group/index.d.ts +4 -0
- package/dist/components/ui-extra/button-group/index.js +6 -0
- package/dist/components/ui-extra/confirm-delete-dialog/confirm-delete-dialog.svelte +131 -0
- package/dist/components/ui-extra/confirm-delete-dialog/confirm-delete-dialog.svelte.d.ts +35 -0
- package/dist/components/ui-extra/confirm-delete-dialog/index.d.ts +2 -0
- package/dist/components/ui-extra/confirm-delete-dialog/index.js +2 -0
- package/dist/components/ui-extra/copy-button/copy-button.svelte +12 -6
- package/dist/components/ui-extra/github-button/github-button.svelte +81 -0
- package/dist/components/ui-extra/github-button/github-button.svelte.d.ts +13 -0
- package/dist/components/ui-extra/github-button/index.d.ts +20 -0
- package/dist/components/ui-extra/github-button/index.js +27 -0
- package/dist/components/ui-extra/select/index.d.ts +12 -0
- package/dist/components/ui-extra/select/index.js +14 -0
- package/dist/components/ui-extra/select/select-content.svelte +45 -0
- package/dist/components/ui-extra/select/select-content.svelte.d.ts +11 -0
- package/dist/components/ui-extra/select/select-group-heading.svelte +21 -0
- package/dist/components/ui-extra/select/select-group-heading.svelte.d.ts +10 -0
- package/dist/components/ui-extra/select/select-group.svelte +17 -0
- package/dist/components/ui-extra/select/select-group.svelte.d.ts +4 -0
- package/dist/components/ui-extra/select/select-item.svelte +38 -0
- package/dist/components/ui-extra/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui-extra/select/select-label.svelte +20 -0
- package/dist/components/ui-extra/select/select-label.svelte.d.ts +6 -0
- package/dist/components/ui-extra/select/select-portal.svelte +7 -0
- package/dist/components/ui-extra/select/select-portal.svelte.d.ts +3 -0
- package/dist/components/ui-extra/select/select-scroll-down-button.svelte +23 -0
- package/dist/components/ui-extra/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui-extra/select/select-scroll-up-button.svelte +23 -0
- package/dist/components/ui-extra/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui-extra/select/select-separator.svelte +18 -0
- package/dist/components/ui-extra/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui-extra/select/select-trigger.svelte +29 -0
- package/dist/components/ui-extra/select/select-trigger.svelte.d.ts +8 -0
- package/dist/components/ui-extra/select/select.svelte +11 -0
- package/dist/components/ui-extra/select/select.svelte.d.ts +3 -0
- package/dist/components/ui-extra/separator/index.d.ts +2 -0
- package/dist/components/ui-extra/separator/index.js +4 -0
- package/dist/components/ui-extra/separator/separator.svelte +23 -0
- package/dist/components/ui-extra/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui-extra/split-button/index.d.ts +14 -0
- package/dist/components/ui-extra/split-button/index.js +9 -0
- package/dist/components/ui-extra/split-button/split-button-action.svelte +41 -0
- package/dist/components/ui-extra/split-button/split-button-action.svelte.d.ts +9 -0
- package/dist/components/ui-extra/split-button/split-button-content.svelte +19 -0
- package/dist/components/ui-extra/split-button/split-button-content.svelte.d.ts +6 -0
- package/dist/components/ui-extra/split-button/split-button-select-action.svelte +54 -0
- package/dist/components/ui-extra/split-button/split-button-select-action.svelte.d.ts +6 -0
- package/dist/components/ui-extra/split-button/split-button-select-trigger.svelte +47 -0
- package/dist/components/ui-extra/split-button/split-button-select-trigger.svelte.d.ts +10 -0
- package/dist/components/ui-extra/split-button/split-button-select.svelte +31 -0
- package/dist/components/ui-extra/split-button/split-button-select.svelte.d.ts +6 -0
- package/dist/components/ui-extra/split-button/split-button.svelte +53 -0
- package/dist/components/ui-extra/split-button/split-button.svelte.d.ts +17 -0
- package/dist/components/ui-extra/split-button/split-button.svelte.js +82 -0
- package/dist/components/ui-extra/stepper/stepper-indicator.svelte +1 -0
- package/dist/components/ui-extra/stepper/stepper-trigger.svelte +1 -1
- package/package.json +49 -21
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Root from './alert-dialog.svelte';
|
|
2
|
+
import Portal from './alert-dialog-portal.svelte';
|
|
3
|
+
import Trigger from './alert-dialog-trigger.svelte';
|
|
4
|
+
import Title from './alert-dialog-title.svelte';
|
|
5
|
+
import Action from './alert-dialog-action.svelte';
|
|
6
|
+
import Cancel from './alert-dialog-cancel.svelte';
|
|
7
|
+
import Footer from './alert-dialog-footer.svelte';
|
|
8
|
+
import Header from './alert-dialog-header.svelte';
|
|
9
|
+
import Overlay from './alert-dialog-overlay.svelte';
|
|
10
|
+
import Content from './alert-dialog-content.svelte';
|
|
11
|
+
import Description from './alert-dialog-description.svelte';
|
|
12
|
+
import Media from './alert-dialog-media.svelte';
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Media, Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, Media as AlertDialogMedia };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Root from './alert-dialog.svelte';
|
|
2
|
+
import Portal from './alert-dialog-portal.svelte';
|
|
3
|
+
import Trigger from './alert-dialog-trigger.svelte';
|
|
4
|
+
import Title from './alert-dialog-title.svelte';
|
|
5
|
+
import Action from './alert-dialog-action.svelte';
|
|
6
|
+
import Cancel from './alert-dialog-cancel.svelte';
|
|
7
|
+
import Footer from './alert-dialog-footer.svelte';
|
|
8
|
+
import Header from './alert-dialog-header.svelte';
|
|
9
|
+
import Overlay from './alert-dialog-overlay.svelte';
|
|
10
|
+
import Content from './alert-dialog-content.svelte';
|
|
11
|
+
import Description from './alert-dialog-description.svelte';
|
|
12
|
+
import Media from './alert-dialog-media.svelte';
|
|
13
|
+
export { Root, Title, Action, Cancel, Portal, Footer, Header, Trigger, Overlay, Content, Description, Media,
|
|
14
|
+
//
|
|
15
|
+
Root as AlertDialog, Title as AlertDialogTitle, Action as AlertDialogAction, Cancel as AlertDialogCancel, Portal as AlertDialogPortal, Footer as AlertDialogFooter, Header as AlertDialogHeader, Trigger as AlertDialogTrigger, Overlay as AlertDialogOverlay, Content as AlertDialogContent, Description as AlertDialogDescription, Media as AlertDialogMedia };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from '../../../blocks/utils.js';
|
|
3
|
+
import type { ComponentProps } from 'svelte';
|
|
4
|
+
import { Separator } from '../separator/index.js';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
orientation = 'vertical',
|
|
10
|
+
...restProps
|
|
11
|
+
}: ComponentProps<typeof Separator> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Separator
|
|
15
|
+
bind:ref
|
|
16
|
+
data-slot="button-group-separator"
|
|
17
|
+
{orientation}
|
|
18
|
+
class={cn(
|
|
19
|
+
'bg-input relative self-stretch data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...restProps}
|
|
23
|
+
/>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare const ButtonGroupSeparator: import("svelte").Component<Omit<{
|
|
2
|
+
orientation?: import("bits-ui").Orientation;
|
|
3
|
+
decorative?: boolean;
|
|
4
|
+
}, "child" | "children"> & {
|
|
5
|
+
child?: import("svelte").Snippet<[{
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}]> | undefined;
|
|
8
|
+
children?: import("svelte").Snippet<[]> | undefined;
|
|
9
|
+
style?: import("bits-ui").StyleProperties | string | null | undefined;
|
|
10
|
+
ref?: HTMLElement | null | undefined;
|
|
11
|
+
} & import("bits-ui").Without<import("bits-ui").BitsPrimitiveDivAttributes, import("bits-ui").SeparatorRootPropsWithoutHTML>, {}, "ref">;
|
|
12
|
+
type ButtonGroupSeparator = ReturnType<typeof ButtonGroupSeparator>;
|
|
13
|
+
export default ButtonGroupSeparator;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../blocks/utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import type { Snippet } from 'svelte';
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
child,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
12
|
+
child?: Snippet<[{ props: Record<string, unknown> }]>;
|
|
13
|
+
} = $props();
|
|
14
|
+
|
|
15
|
+
const mergedProps = $derived({
|
|
16
|
+
...restProps,
|
|
17
|
+
class: cn(
|
|
18
|
+
"bg-muted gap-2 rounded-md border px-2.5 text-sm font-medium shadow-xs [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none",
|
|
19
|
+
className
|
|
20
|
+
),
|
|
21
|
+
'data-slot': 'button-group-text'
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
{#if child}
|
|
26
|
+
{@render child({ props: mergedProps })}
|
|
27
|
+
{:else}
|
|
28
|
+
<div bind:this={ref} {...mergedProps}>
|
|
29
|
+
{@render mergedProps.children?.()}
|
|
30
|
+
</div>
|
|
31
|
+
{/if}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../blocks/utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import type { Snippet } from 'svelte';
|
|
4
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
5
|
+
child?: Snippet<[{
|
|
6
|
+
props: Record<string, unknown>;
|
|
7
|
+
}]>;
|
|
8
|
+
};
|
|
9
|
+
declare const ButtonGroupText: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
|
+
type ButtonGroupText = ReturnType<typeof ButtonGroupText>;
|
|
11
|
+
export default ButtonGroupText;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from 'tailwind-variants';
|
|
3
|
+
|
|
4
|
+
export const buttonGroupVariants = tv({
|
|
5
|
+
base: "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
6
|
+
variants: {
|
|
7
|
+
orientation: {
|
|
8
|
+
horizontal:
|
|
9
|
+
'[&>[data-slot]]:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-md! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0',
|
|
10
|
+
vertical:
|
|
11
|
+
'flex-col [&>[data-slot]]:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-md! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0'
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
orientation: 'horizontal'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export type ButtonGroupOrientation = VariantProps<
|
|
20
|
+
typeof buttonGroupVariants
|
|
21
|
+
>['orientation'];
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<script lang="ts">
|
|
25
|
+
import { cn, type WithElementRef } from '../../../blocks/utils.js';
|
|
26
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
27
|
+
|
|
28
|
+
let {
|
|
29
|
+
ref = $bindable(null),
|
|
30
|
+
class: className,
|
|
31
|
+
children,
|
|
32
|
+
orientation = 'horizontal',
|
|
33
|
+
...restProps
|
|
34
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
35
|
+
orientation?: ButtonGroupOrientation;
|
|
36
|
+
} = $props();
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<div
|
|
40
|
+
bind:this={ref}
|
|
41
|
+
role="group"
|
|
42
|
+
data-slot="button-group"
|
|
43
|
+
data-orientation={orientation}
|
|
44
|
+
class={cn(buttonGroupVariants({ orientation }), className)}
|
|
45
|
+
{...restProps}
|
|
46
|
+
>
|
|
47
|
+
{@render children?.()}
|
|
48
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from 'tailwind-variants';
|
|
2
|
+
export declare const buttonGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
orientation: {
|
|
4
|
+
horizontal: string;
|
|
5
|
+
vertical: string;
|
|
6
|
+
};
|
|
7
|
+
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
|
|
8
|
+
orientation: {
|
|
9
|
+
horizontal: string;
|
|
10
|
+
vertical: string;
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
13
|
+
orientation: {
|
|
14
|
+
horizontal: string;
|
|
15
|
+
vertical: string;
|
|
16
|
+
};
|
|
17
|
+
}, undefined, "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", unknown, unknown, undefined>>;
|
|
18
|
+
export type ButtonGroupOrientation = VariantProps<typeof buttonGroupVariants>['orientation'];
|
|
19
|
+
import { type WithElementRef } from '../../../blocks/utils.js';
|
|
20
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
21
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
22
|
+
orientation?: ButtonGroupOrientation;
|
|
23
|
+
};
|
|
24
|
+
declare const ButtonGroup: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
25
|
+
type ButtonGroup = ReturnType<typeof ButtonGroup>;
|
|
26
|
+
export default ButtonGroup;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import Root, { buttonGroupVariants, type ButtonGroupOrientation } from './button-group.svelte';
|
|
2
|
+
import Text from './button-group-text.svelte';
|
|
3
|
+
import Separator from './button-group-separator.svelte';
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants, type ButtonGroupOrientation, Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import Root, { buttonGroupVariants } from './button-group.svelte';
|
|
2
|
+
import Text from './button-group-text.svelte';
|
|
3
|
+
import Separator from './button-group-separator.svelte';
|
|
4
|
+
export { Root, Text, Separator, buttonGroupVariants,
|
|
5
|
+
//
|
|
6
|
+
Root as ButtonGroup, Text as ButtonGroupText, Separator as ButtonGroupSeparator };
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
class ConfirmDeleteDialogState {
|
|
3
|
+
open = $state(false);
|
|
4
|
+
inputText = $state('');
|
|
5
|
+
options = $state<ConfirmDeleteOptions | null>(null);
|
|
6
|
+
loading = $state(false);
|
|
7
|
+
|
|
8
|
+
constructor() {
|
|
9
|
+
this.confirm = this.confirm.bind(this);
|
|
10
|
+
this.cancel = this.cancel.bind(this);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
newConfirmation(options: ConfirmDeleteOptions) {
|
|
14
|
+
this.reset();
|
|
15
|
+
this.options = options;
|
|
16
|
+
this.open = true;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
reset() {
|
|
20
|
+
this.open = false;
|
|
21
|
+
this.inputText = '';
|
|
22
|
+
this.options = null;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
confirm() {
|
|
26
|
+
if (this.options?.input) {
|
|
27
|
+
if (this.inputText !== this.options.input.confirmationText) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
this.loading = true;
|
|
33
|
+
this.options
|
|
34
|
+
?.onConfirm()
|
|
35
|
+
.then(() => {
|
|
36
|
+
this.open = false;
|
|
37
|
+
})
|
|
38
|
+
.finally(() => {
|
|
39
|
+
this.loading = false;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
cancel() {
|
|
44
|
+
this.options?.onCancel?.();
|
|
45
|
+
this.open = false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const dialogState = new ConfirmDeleteDialogState();
|
|
50
|
+
|
|
51
|
+
export type ConfirmDeleteOptions = {
|
|
52
|
+
title: string;
|
|
53
|
+
description: string;
|
|
54
|
+
skipConfirmation?: boolean;
|
|
55
|
+
input?: {
|
|
56
|
+
confirmationText: string;
|
|
57
|
+
};
|
|
58
|
+
confirm?: {
|
|
59
|
+
text?: string;
|
|
60
|
+
};
|
|
61
|
+
cancel?: {
|
|
62
|
+
text?: string;
|
|
63
|
+
};
|
|
64
|
+
onConfirm: () => Promise<unknown>;
|
|
65
|
+
onCancel?: () => void;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export function confirmDelete(options: ConfirmDeleteOptions) {
|
|
69
|
+
if (options.skipConfirmation) {
|
|
70
|
+
options.onConfirm();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
dialogState.newConfirmation(options);
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<script lang="ts">
|
|
79
|
+
import * as AlertDialog from '../alert-dialog';
|
|
80
|
+
import { Input } from '../input';
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<AlertDialog.Root bind:open={dialogState.open}>
|
|
84
|
+
<AlertDialog.Content>
|
|
85
|
+
<form
|
|
86
|
+
method="POST"
|
|
87
|
+
onsubmit={(e) => {
|
|
88
|
+
e.preventDefault();
|
|
89
|
+
dialogState.confirm();
|
|
90
|
+
}}
|
|
91
|
+
class="flex flex-col gap-4"
|
|
92
|
+
>
|
|
93
|
+
<AlertDialog.Header>
|
|
94
|
+
<AlertDialog.Title>
|
|
95
|
+
{dialogState.options?.title}
|
|
96
|
+
</AlertDialog.Title>
|
|
97
|
+
<AlertDialog.Description>
|
|
98
|
+
{dialogState.options?.description}
|
|
99
|
+
</AlertDialog.Description>
|
|
100
|
+
</AlertDialog.Header>
|
|
101
|
+
{#if dialogState.options?.input}
|
|
102
|
+
<Input
|
|
103
|
+
bind:value={dialogState.inputText}
|
|
104
|
+
placeholder={`Enter \"${dialogState.options.input.confirmationText}\" to confirm.`}
|
|
105
|
+
onkeydown={(e) => {
|
|
106
|
+
if (e.key === 'Enter') {
|
|
107
|
+
// for some reason without this the form will submit and the dialog will close immediately
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
dialogState.confirm();
|
|
110
|
+
}
|
|
111
|
+
}}
|
|
112
|
+
/>
|
|
113
|
+
{/if}
|
|
114
|
+
<AlertDialog.Footer>
|
|
115
|
+
<AlertDialog.Cancel type="button" onclick={dialogState.cancel}>
|
|
116
|
+
{dialogState.options?.cancel?.text ?? 'Cancel'}
|
|
117
|
+
</AlertDialog.Cancel>
|
|
118
|
+
<AlertDialog.Action
|
|
119
|
+
type="submit"
|
|
120
|
+
variant="destructive"
|
|
121
|
+
loading={dialogState.loading}
|
|
122
|
+
disabled={dialogState.options?.input &&
|
|
123
|
+
dialogState.inputText !==
|
|
124
|
+
dialogState.options.input.confirmationText}
|
|
125
|
+
>
|
|
126
|
+
{dialogState.options?.confirm?.text ?? 'Delete'}
|
|
127
|
+
</AlertDialog.Action>
|
|
128
|
+
</AlertDialog.Footer>
|
|
129
|
+
</form>
|
|
130
|
+
</AlertDialog.Content>
|
|
131
|
+
</AlertDialog.Root>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type ConfirmDeleteOptions = {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
skipConfirmation?: boolean;
|
|
5
|
+
input?: {
|
|
6
|
+
confirmationText: string;
|
|
7
|
+
};
|
|
8
|
+
confirm?: {
|
|
9
|
+
text?: string;
|
|
10
|
+
};
|
|
11
|
+
cancel?: {
|
|
12
|
+
text?: string;
|
|
13
|
+
};
|
|
14
|
+
onConfirm: () => Promise<unknown>;
|
|
15
|
+
onCancel?: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function confirmDelete(options: ConfirmDeleteOptions): void;
|
|
18
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
19
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
20
|
+
$$bindings?: Bindings;
|
|
21
|
+
} & Exports;
|
|
22
|
+
(internal: unknown, props: {
|
|
23
|
+
$$events?: Events;
|
|
24
|
+
$$slots?: Slots;
|
|
25
|
+
}): Exports & {
|
|
26
|
+
$set?: any;
|
|
27
|
+
$on?: any;
|
|
28
|
+
};
|
|
29
|
+
z_$$bindings?: Bindings;
|
|
30
|
+
}
|
|
31
|
+
declare const ConfirmDeleteDialog: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
32
|
+
[evt: string]: CustomEvent<any>;
|
|
33
|
+
}, {}, {}, string>;
|
|
34
|
+
type ConfirmDeleteDialog = InstanceType<typeof ConfirmDeleteDialog>;
|
|
35
|
+
export default ConfirmDeleteDialog;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
import Button from '../../../blocks/button.svelte';
|
|
23
23
|
import { UseClipboard } from '../../../blocks/use-clipboard.svelte';
|
|
24
24
|
import { cn } from '../../../blocks/utils.js';
|
|
25
|
+
import { mergeProps } from 'bits-ui';
|
|
25
26
|
import CheckIcon from '@lucide/svelte/icons/check';
|
|
26
27
|
import CopyIcon from '@lucide/svelte/icons/copy';
|
|
27
28
|
import XIcon from '@lucide/svelte/icons/x';
|
|
@@ -48,6 +49,16 @@
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
const clipboard = new UseClipboard();
|
|
52
|
+
|
|
53
|
+
const merged = $derived(
|
|
54
|
+
mergeProps(rest, {
|
|
55
|
+
onclick: async () => {
|
|
56
|
+
const status = await clipboard.copy(text);
|
|
57
|
+
|
|
58
|
+
onCopy?.(status);
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
);
|
|
51
62
|
</script>
|
|
52
63
|
|
|
53
64
|
<Button
|
|
@@ -58,12 +69,7 @@
|
|
|
58
69
|
class={cn('flex items-center gap-2', className)}
|
|
59
70
|
type="button"
|
|
60
71
|
name="copy"
|
|
61
|
-
|
|
62
|
-
const status = await clipboard.copy(text);
|
|
63
|
-
|
|
64
|
-
onCopy?.(status);
|
|
65
|
-
}}
|
|
66
|
-
{...rest as /* eslint-disable-line @typescript-eslint/no-explicit-any */ any}
|
|
72
|
+
{...merged as /* eslint-disable-line @typescript-eslint/no-explicit-any */ any}
|
|
67
73
|
>
|
|
68
74
|
{#if clipboard.status === 'success'}
|
|
69
75
|
<div in:scale={{ duration: animationDuration, start: 0.85 }}>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import type { ButtonProps, Size } from '../../../blocks/button.svelte';
|
|
3
|
+
|
|
4
|
+
export type GithubButtonProps = Omit<
|
|
5
|
+
ButtonProps,
|
|
6
|
+
'href' | 'children' | 'size'
|
|
7
|
+
> & {
|
|
8
|
+
repo: {
|
|
9
|
+
owner: string;
|
|
10
|
+
repo: string;
|
|
11
|
+
};
|
|
12
|
+
stars?: Promise<number> | number;
|
|
13
|
+
starsTweenedDuration?: number;
|
|
14
|
+
size?: Size;
|
|
15
|
+
};
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import Button, { sizeMap } from '../../../blocks/button.svelte';
|
|
20
|
+
import { cn } from '../../../blocks/utils';
|
|
21
|
+
import { cubicInOut } from 'svelte/easing';
|
|
22
|
+
import { Tween } from 'svelte/motion';
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
starsTweenedDuration = 5000,
|
|
26
|
+
variant = 'outline',
|
|
27
|
+
repo,
|
|
28
|
+
class: className,
|
|
29
|
+
stars,
|
|
30
|
+
size = 'default',
|
|
31
|
+
...rest
|
|
32
|
+
}: GithubButtonProps = $props();
|
|
33
|
+
|
|
34
|
+
function displayStars(stars: number): string {
|
|
35
|
+
if (stars < 1000) return `${stars.toFixed(0)}`;
|
|
36
|
+
|
|
37
|
+
return `${(parseInt(stars.toFixed(0)) / 1000).toFixed(1)}k`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// svelte-ignore state_referenced_locally
|
|
41
|
+
const starsTweened = new Tween(typeof stars === 'number' ? stars : 0, {
|
|
42
|
+
duration: starsTweenedDuration,
|
|
43
|
+
easing: cubicInOut
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
$effect(() => {
|
|
47
|
+
if (stars instanceof Promise) {
|
|
48
|
+
stars.then((value) => starsTweened.set(value));
|
|
49
|
+
} else if (stars !== undefined) {
|
|
50
|
+
starsTweened.set(stars);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<Button
|
|
56
|
+
href={`https://github.com/${repo.owner}/${repo.repo}`}
|
|
57
|
+
class={cn(
|
|
58
|
+
'[&_span]:text-muted-foreground gap-2 font-mono text-xs',
|
|
59
|
+
className
|
|
60
|
+
)}
|
|
61
|
+
{variant}
|
|
62
|
+
size={stars === undefined ? sizeMap[size].icon : sizeMap[size].normal}
|
|
63
|
+
{...rest}
|
|
64
|
+
>
|
|
65
|
+
<svg
|
|
66
|
+
class={cn('text-foreground size-4 shrink-0 fill-current', className)}
|
|
67
|
+
viewBox="0 0 256 250"
|
|
68
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
69
|
+
preserveAspectRatio="xMidYMid"
|
|
70
|
+
aria-hidden="true"
|
|
71
|
+
>
|
|
72
|
+
<path
|
|
73
|
+
d="M128.001 0C57.317 0 0 57.307 0 128.001c0 56.554 36.676 104.535 87.535 121.46 6.397 1.185 8.746-2.777 8.746-6.158 0-3.052-.12-13.135-.174-23.83-35.61 7.742-43.124-15.103-43.124-15.103-5.823-14.795-14.213-18.73-14.213-18.73-11.613-7.944.876-7.78.876-7.78 12.853.902 19.621 13.19 19.621 13.19 11.417 19.568 29.945 13.911 37.249 10.64 1.149-8.272 4.466-13.92 8.127-17.116-28.431-3.236-58.318-14.212-58.318-63.258 0-13.975 5-25.394 13.188-34.358-1.329-3.224-5.71-16.242 1.24-33.874 0 0 10.749-3.44 35.21 13.121 10.21-2.836 21.16-4.258 32.038-4.307 10.878.049 21.837 1.47 32.066 4.307 24.431-16.56 35.165-13.12 35.165-13.12 6.967 17.63 2.584 30.65 1.255 33.873 8.207 8.964 13.173 20.383 13.173 34.358 0 49.163-29.944 59.988-58.447 63.157 4.591 3.972 8.682 11.762 8.682 23.704 0 17.126-.148 30.91-.148 35.126 0 3.407 2.304 7.398 8.792 6.14C219.37 232.5 256 184.537 256 128.002 256 57.307 198.691 0 128.001 0Zm-80.06 182.34c-.282.636-1.283.827-2.194.39-.929-.417-1.45-1.284-1.15-1.922.276-.655 1.279-.838 2.205-.399.93.418 1.46 1.293 1.139 1.931Zm6.296 5.618c-.61.566-1.804.303-2.614-.591-.837-.892-.994-2.086-.375-2.66.63-.566 1.787-.301 2.626.591.838.903 1 2.088.363 2.66Zm4.32 7.188c-.785.545-2.067.034-2.86-1.104-.784-1.138-.784-2.503.017-3.05.795-.547 2.058-.055 2.861 1.075.782 1.157.782 2.522-.019 3.08Zm7.304 8.325c-.701.774-2.196.566-3.29-.49-1.119-1.032-1.43-2.496-.726-3.27.71-.776 2.213-.558 3.315.49 1.11 1.03 1.45 2.505.701 3.27Zm9.442 2.81c-.31 1.003-1.75 1.459-3.199 1.033-1.448-.439-2.395-1.613-2.103-2.626.301-1.01 1.747-1.484 3.207-1.028 1.446.436 2.396 1.602 2.095 2.622Zm10.744 1.193c.036 1.055-1.193 1.93-2.715 1.95-1.53.034-2.769-.82-2.786-1.86 0-1.065 1.202-1.932 2.733-1.958 1.522-.03 2.768.818 2.768 1.868Zm10.555-.405c.182 1.03-.875 2.088-2.387 2.37-1.485.271-2.861-.365-3.05-1.386-.184-1.056.893-2.114 2.376-2.387 1.514-.263 2.868.356 3.061 1.403Z"
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
{#if stars !== undefined}
|
|
77
|
+
<span aria-label="Stars on GitHub" class="tabular-nums">
|
|
78
|
+
{displayStars(starsTweened.current)}
|
|
79
|
+
</span>
|
|
80
|
+
{/if}
|
|
81
|
+
</Button>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ButtonProps, Size } from '../../../blocks/button.svelte';
|
|
2
|
+
export type GithubButtonProps = Omit<ButtonProps, 'href' | 'children' | 'size'> & {
|
|
3
|
+
repo: {
|
|
4
|
+
owner: string;
|
|
5
|
+
repo: string;
|
|
6
|
+
};
|
|
7
|
+
stars?: Promise<number> | number;
|
|
8
|
+
starsTweenedDuration?: number;
|
|
9
|
+
size?: Size;
|
|
10
|
+
};
|
|
11
|
+
declare const GithubButton: import("svelte").Component<GithubButtonProps, {}, "">;
|
|
12
|
+
type GithubButton = ReturnType<typeof GithubButton>;
|
|
13
|
+
export default GithubButton;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Root from './github-button.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* Get the stars for a GitHub repository using the ungh.cc API.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const stars = await getStars({ owner: 'ieedan', repo: 'shadcn-svelte-extras', fallback: 539 });
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @param owner - The owner of the repository
|
|
11
|
+
* @param repoName - The name of the repository
|
|
12
|
+
* @param fallback - The fallback value to return if the request fails
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare function getStars({ owner, repo: repoName, fallback }: {
|
|
16
|
+
owner: string;
|
|
17
|
+
repo: string;
|
|
18
|
+
fallback?: number;
|
|
19
|
+
}): Promise<any>;
|
|
20
|
+
export { Root as GitHubButton };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Root from './github-button.svelte';
|
|
2
|
+
/**
|
|
3
|
+
* Get the stars for a GitHub repository using the ungh.cc API.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```ts
|
|
7
|
+
* const stars = await getStars({ owner: 'ieedan', repo: 'shadcn-svelte-extras', fallback: 539 });
|
|
8
|
+
* ```
|
|
9
|
+
*
|
|
10
|
+
* @param owner - The owner of the repository
|
|
11
|
+
* @param repoName - The name of the repository
|
|
12
|
+
* @param fallback - The fallback value to return if the request fails
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export async function getStars({ owner, repo: repoName, fallback = 0 }) {
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch(`https://ungh.cc/repos/${owner}/${repoName}`);
|
|
18
|
+
if (!response.ok)
|
|
19
|
+
return fallback;
|
|
20
|
+
const { repo } = await response.json();
|
|
21
|
+
return repo.stars;
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return fallback;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export { Root as GitHubButton };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Root from './select.svelte';
|
|
2
|
+
import Group from './select-group.svelte';
|
|
3
|
+
import Label from './select-label.svelte';
|
|
4
|
+
import Item from './select-item.svelte';
|
|
5
|
+
import Content from './select-content.svelte';
|
|
6
|
+
import Trigger from './select-trigger.svelte';
|
|
7
|
+
import Separator from './select-separator.svelte';
|
|
8
|
+
import ScrollDownButton from './select-scroll-down-button.svelte';
|
|
9
|
+
import ScrollUpButton from './select-scroll-up-button.svelte';
|
|
10
|
+
import GroupHeading from './select-group-heading.svelte';
|
|
11
|
+
import Portal from './select-portal.svelte';
|
|
12
|
+
export { Root, Group, Label, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, GroupHeading, Portal, Root as Select, Group as SelectGroup, Label as SelectLabel, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, GroupHeading as SelectGroupHeading, Portal as SelectPortal };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Root from './select.svelte';
|
|
2
|
+
import Group from './select-group.svelte';
|
|
3
|
+
import Label from './select-label.svelte';
|
|
4
|
+
import Item from './select-item.svelte';
|
|
5
|
+
import Content from './select-content.svelte';
|
|
6
|
+
import Trigger from './select-trigger.svelte';
|
|
7
|
+
import Separator from './select-separator.svelte';
|
|
8
|
+
import ScrollDownButton from './select-scroll-down-button.svelte';
|
|
9
|
+
import ScrollUpButton from './select-scroll-up-button.svelte';
|
|
10
|
+
import GroupHeading from './select-group-heading.svelte';
|
|
11
|
+
import Portal from './select-portal.svelte';
|
|
12
|
+
export { Root, Group, Label, Item, Content, Trigger, Separator, ScrollDownButton, ScrollUpButton, GroupHeading, Portal,
|
|
13
|
+
//
|
|
14
|
+
Root as Select, Group as SelectGroup, Label as SelectLabel, Item as SelectItem, Content as SelectContent, Trigger as SelectTrigger, Separator as SelectSeparator, ScrollDownButton as SelectScrollDownButton, ScrollUpButton as SelectScrollUpButton, GroupHeading as SelectGroupHeading, Portal as SelectPortal };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Select as SelectPrimitive } from 'bits-ui';
|
|
3
|
+
import SelectPortal from './select-portal.svelte';
|
|
4
|
+
import SelectScrollUpButton from './select-scroll-up-button.svelte';
|
|
5
|
+
import SelectScrollDownButton from './select-scroll-down-button.svelte';
|
|
6
|
+
import { cn, type WithoutChild } from '../../../blocks/utils.js';
|
|
7
|
+
import type { ComponentProps } from 'svelte';
|
|
8
|
+
import type { WithoutChildrenOrChild } from '../../../blocks/utils.js';
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
ref = $bindable(null),
|
|
12
|
+
class: className,
|
|
13
|
+
sideOffset = 4,
|
|
14
|
+
portalProps,
|
|
15
|
+
children,
|
|
16
|
+
preventScroll = true,
|
|
17
|
+
...restProps
|
|
18
|
+
}: WithoutChild<SelectPrimitive.ContentProps> & {
|
|
19
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof SelectPortal>>;
|
|
20
|
+
} = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<SelectPortal {...portalProps}>
|
|
24
|
+
<SelectPrimitive.Content
|
|
25
|
+
bind:ref
|
|
26
|
+
{sideOffset}
|
|
27
|
+
{preventScroll}
|
|
28
|
+
data-slot="select-content"
|
|
29
|
+
class={cn(
|
|
30
|
+
'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 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 relative isolate z-50 min-w-36 overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100',
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
33
|
+
{...restProps}
|
|
34
|
+
>
|
|
35
|
+
<SelectScrollUpButton />
|
|
36
|
+
<SelectPrimitive.Viewport
|
|
37
|
+
class={cn(
|
|
38
|
+
'h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1'
|
|
39
|
+
)}
|
|
40
|
+
>
|
|
41
|
+
{@render children?.()}
|
|
42
|
+
</SelectPrimitive.Viewport>
|
|
43
|
+
<SelectScrollDownButton />
|
|
44
|
+
</SelectPrimitive.Content>
|
|
45
|
+
</SelectPortal>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Select as SelectPrimitive } from 'bits-ui';
|
|
2
|
+
import SelectPortal from './select-portal.svelte';
|
|
3
|
+
import { type WithoutChild } from '../../../blocks/utils.js';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
import type { WithoutChildrenOrChild } from '../../../blocks/utils.js';
|
|
6
|
+
type $$ComponentProps = WithoutChild<SelectPrimitive.ContentProps> & {
|
|
7
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof SelectPortal>>;
|
|
8
|
+
};
|
|
9
|
+
declare const SelectContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
|
+
type SelectContent = ReturnType<typeof SelectContent>;
|
|
11
|
+
export default SelectContent;
|