@profidev/pleiades 1.7.0 → 1.8.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/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/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/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/package.json +47 -19
|
@@ -17,15 +17,18 @@
|
|
|
17
17
|
class="bg-input/30 border-input/30 h-8! rounded-lg! shadow-none! *:data-[slot=input-group-addon]:pl-2!"
|
|
18
18
|
>
|
|
19
19
|
<CommandPrimitive.Input
|
|
20
|
+
{value}
|
|
20
21
|
data-slot="command-input"
|
|
21
22
|
class={cn(
|
|
22
23
|
'w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',
|
|
23
24
|
className
|
|
24
25
|
)}
|
|
25
|
-
bind:ref
|
|
26
26
|
{...restProps}
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
>
|
|
28
|
+
{#snippet child({ props })}
|
|
29
|
+
<InputGroup.Input {...props} bind:value bind:ref />
|
|
30
|
+
{/snippet}
|
|
31
|
+
</CommandPrimitive.Input>
|
|
29
32
|
<InputGroup.Addon>
|
|
30
33
|
<SearchIcon class="size-4 shrink-0 opacity-50" />
|
|
31
34
|
</InputGroup.Addon>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
bind:ref
|
|
16
16
|
data-slot="field-label"
|
|
17
17
|
class={cn(
|
|
18
|
-
'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5',
|
|
18
|
+
'has-data-checked:bg-primary/5 has-data-checked:border-primary/30 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 group/field-label peer/field-label flex w-fit gap-2 leading-snug leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-2.5',
|
|
19
19
|
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col',
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
bind:this={ref}
|
|
15
15
|
data-slot="field-label"
|
|
16
16
|
class={cn(
|
|
17
|
-
'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',
|
|
17
|
+
'flex w-fit items-center gap-2 text-sm leading-snug leading-snug font-medium group-data-[disabled=true]/field:opacity-50',
|
|
18
18
|
className
|
|
19
19
|
)}
|
|
20
20
|
{...restProps}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Tooltip as TooltipPrimitive } from 'bits-ui';
|
|
3
|
-
import TooltipProvider from './tooltip-provider.svelte';
|
|
4
3
|
|
|
5
4
|
let { open = $bindable(false), ...restProps }: TooltipPrimitive.RootProps =
|
|
6
5
|
$props();
|
|
7
6
|
</script>
|
|
8
7
|
|
|
9
|
-
<
|
|
10
|
-
<TooltipPrimitive.Root bind:open {...restProps} />
|
|
11
|
-
</TooltipProvider>
|
|
8
|
+
<TooltipPrimitive.Root bind:open {...restProps} />
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import {
|
|
4
|
+
buttonVariants,
|
|
5
|
+
type ButtonVariant,
|
|
6
|
+
type ButtonSize
|
|
7
|
+
} from '../button/index.js';
|
|
8
|
+
import { cn } from '../../../blocks/utils.js';
|
|
9
|
+
import { Spinner } from '../spinner';
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
ref = $bindable(null),
|
|
13
|
+
class: className,
|
|
14
|
+
variant = 'default',
|
|
15
|
+
size = 'default',
|
|
16
|
+
loading = false,
|
|
17
|
+
children,
|
|
18
|
+
...restProps
|
|
19
|
+
}: AlertDialogPrimitive.ActionProps & {
|
|
20
|
+
variant?: ButtonVariant;
|
|
21
|
+
size?: ButtonSize;
|
|
22
|
+
loading?: boolean;
|
|
23
|
+
} = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<AlertDialogPrimitive.Action
|
|
27
|
+
bind:ref
|
|
28
|
+
data-slot="alert-dialog-action"
|
|
29
|
+
class={cn(
|
|
30
|
+
buttonVariants({ variant, size }),
|
|
31
|
+
'cn-alert-dialog-action',
|
|
32
|
+
className
|
|
33
|
+
)}
|
|
34
|
+
{...restProps}
|
|
35
|
+
>
|
|
36
|
+
{#if loading}
|
|
37
|
+
<Spinner data-icon="inline-start" />
|
|
38
|
+
{/if}
|
|
39
|
+
{@render children?.()}
|
|
40
|
+
</AlertDialogPrimitive.Action>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import { type ButtonVariant, type ButtonSize } from '../button/index.js';
|
|
3
|
+
type $$ComponentProps = AlertDialogPrimitive.ActionProps & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const AlertDialogAction: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
9
|
+
type AlertDialogAction = ReturnType<typeof AlertDialogAction>;
|
|
10
|
+
export default AlertDialogAction;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import {
|
|
4
|
+
buttonVariants,
|
|
5
|
+
type ButtonVariant,
|
|
6
|
+
type ButtonSize
|
|
7
|
+
} from '../button/index.js';
|
|
8
|
+
import { cn } from '../../../blocks/utils.js';
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
ref = $bindable(null),
|
|
12
|
+
class: className,
|
|
13
|
+
variant = 'outline',
|
|
14
|
+
size = 'default',
|
|
15
|
+
...restProps
|
|
16
|
+
}: AlertDialogPrimitive.CancelProps & {
|
|
17
|
+
variant?: ButtonVariant;
|
|
18
|
+
size?: ButtonSize;
|
|
19
|
+
} = $props();
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<AlertDialogPrimitive.Cancel
|
|
23
|
+
bind:ref
|
|
24
|
+
data-slot="alert-dialog-cancel"
|
|
25
|
+
class={cn(
|
|
26
|
+
buttonVariants({ variant, size }),
|
|
27
|
+
'cn-alert-dialog-cancel',
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
{...restProps}
|
|
31
|
+
/>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import { type ButtonVariant, type ButtonSize } from '../button/index.js';
|
|
3
|
+
type $$ComponentProps = AlertDialogPrimitive.CancelProps & {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
};
|
|
7
|
+
declare const AlertDialogCancel: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
8
|
+
type AlertDialogCancel = ReturnType<typeof AlertDialogCancel>;
|
|
9
|
+
export default AlertDialogCancel;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import AlertDialogPortal from './alert-dialog-portal.svelte';
|
|
4
|
+
import AlertDialogOverlay from './alert-dialog-overlay.svelte';
|
|
5
|
+
import {
|
|
6
|
+
cn,
|
|
7
|
+
type WithoutChild,
|
|
8
|
+
type WithoutChildrenOrChild
|
|
9
|
+
} from '../../../blocks/utils.js';
|
|
10
|
+
import type { ComponentProps } from 'svelte';
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
ref = $bindable(null),
|
|
14
|
+
class: className,
|
|
15
|
+
size = 'default',
|
|
16
|
+
portalProps,
|
|
17
|
+
...restProps
|
|
18
|
+
}: WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
19
|
+
size?: 'default' | 'sm';
|
|
20
|
+
portalProps?: WithoutChildrenOrChild<
|
|
21
|
+
ComponentProps<typeof AlertDialogPortal>
|
|
22
|
+
>;
|
|
23
|
+
} = $props();
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<AlertDialogPortal {...portalProps}>
|
|
27
|
+
<AlertDialogOverlay />
|
|
28
|
+
<AlertDialogPrimitive.Content
|
|
29
|
+
bind:ref
|
|
30
|
+
data-slot="alert-dialog-content"
|
|
31
|
+
data-size={size}
|
|
32
|
+
class={cn(
|
|
33
|
+
'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 bg-popover text-popover-foreground ring-foreground/10 group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 ring-1 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-lg',
|
|
34
|
+
className
|
|
35
|
+
)}
|
|
36
|
+
{...restProps}
|
|
37
|
+
/>
|
|
38
|
+
</AlertDialogPortal>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
import AlertDialogPortal from './alert-dialog-portal.svelte';
|
|
3
|
+
import { type WithoutChild, type WithoutChildrenOrChild } from '../../../blocks/utils.js';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
type $$ComponentProps = WithoutChild<AlertDialogPrimitive.ContentProps> & {
|
|
6
|
+
size?: 'default' | 'sm';
|
|
7
|
+
portalProps?: WithoutChildrenOrChild<ComponentProps<typeof AlertDialogPortal>>;
|
|
8
|
+
};
|
|
9
|
+
declare const AlertDialogContent: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
10
|
+
type AlertDialogContent = ReturnType<typeof AlertDialogContent>;
|
|
11
|
+
export default AlertDialogContent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../blocks/utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: AlertDialogPrimitive.DescriptionProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AlertDialogPrimitive.Description
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="alert-dialog-description"
|
|
15
|
+
class={cn(
|
|
16
|
+
'text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
declare const AlertDialogDescription: import("svelte").Component<AlertDialogPrimitive.DescriptionProps, {}, "ref">;
|
|
3
|
+
type AlertDialogDescription = ReturnType<typeof AlertDialogDescription>;
|
|
4
|
+
export default AlertDialogDescription;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from '../../../blocks/utils.js';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="alert-dialog-footer"
|
|
16
|
+
class={cn(
|
|
17
|
+
'cn-alert-dialog-footer flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from '../../../blocks/utils.js';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
declare const AlertDialogFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type AlertDialogFooter = ReturnType<typeof AlertDialogFooter>;
|
|
5
|
+
export default AlertDialogFooter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../blocks/utils.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="alert-dialog-header"
|
|
16
|
+
class={cn(
|
|
17
|
+
'grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-6 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../blocks/utils.js';
|
|
3
|
+
declare const AlertDialogHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type AlertDialogHeader = ReturnType<typeof AlertDialogHeader>;
|
|
5
|
+
export default AlertDialogHeader;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { cn, type WithElementRef } from '../../../blocks/utils.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="alert-dialog-media"
|
|
16
|
+
class={cn(
|
|
17
|
+
"bg-muted mb-2 inline-flex size-16 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-8",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
2
|
+
import { type WithElementRef } from '../../../blocks/utils.js';
|
|
3
|
+
declare const AlertDialogMedia: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type AlertDialogMedia = ReturnType<typeof AlertDialogMedia>;
|
|
5
|
+
export default AlertDialogMedia;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../blocks/utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: AlertDialogPrimitive.OverlayProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AlertDialogPrimitive.Overlay
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="alert-dialog-overlay"
|
|
15
|
+
class={cn(
|
|
16
|
+
'data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
declare const AlertDialogOverlay: import("svelte").Component<AlertDialogPrimitive.OverlayProps, {}, "ref">;
|
|
3
|
+
type AlertDialogOverlay = ReturnType<typeof AlertDialogOverlay>;
|
|
4
|
+
export default AlertDialogOverlay;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
import { cn } from '../../../blocks/utils.js';
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: AlertDialogPrimitive.TitleProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<AlertDialogPrimitive.Title
|
|
13
|
+
bind:ref
|
|
14
|
+
data-slot="alert-dialog-title"
|
|
15
|
+
class={cn(
|
|
16
|
+
'text-lg font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2',
|
|
17
|
+
className
|
|
18
|
+
)}
|
|
19
|
+
{...restProps}
|
|
20
|
+
/>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
ref = $bindable(null),
|
|
6
|
+
...restProps
|
|
7
|
+
}: AlertDialogPrimitive.TriggerProps = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<AlertDialogPrimitive.Trigger
|
|
11
|
+
bind:ref
|
|
12
|
+
data-slot="alert-dialog-trigger"
|
|
13
|
+
{...restProps}
|
|
14
|
+
/>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AlertDialog as AlertDialogPrimitive } from 'bits-ui';
|
|
2
|
+
declare const AlertDialogTrigger: import("svelte").Component<AlertDialogPrimitive.TriggerProps, {}, "ref">;
|
|
3
|
+
type AlertDialogTrigger = ReturnType<typeof AlertDialogTrigger>;
|
|
4
|
+
export default AlertDialogTrigger;
|
|
@@ -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 };
|