compote-ui 0.31.0 → 0.31.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/button/button.svelte +2 -1
- package/dist/components/button/button.svelte.d.ts +2 -1
- package/dist/components/button/link-button.svelte +2 -1
- package/dist/components/button/link-button.svelte.d.ts +2 -1
- package/dist/components/collapsible/collapsible-content.svelte +2 -1
- package/dist/components/collapsible/collapsible-content.svelte.d.ts +2 -1
- package/dist/components/collapsible/collapsible-indicator.svelte +2 -1
- package/dist/components/collapsible/collapsible-indicator.svelte.d.ts +2 -1
- package/dist/components/collapsible/collapsible-root.svelte +2 -1
- package/dist/components/collapsible/collapsible-root.svelte.d.ts +2 -1
- package/dist/components/collapsible/collapsible-trigger.svelte +2 -1
- package/dist/components/collapsible/collapsible-trigger.svelte.d.ts +2 -1
- package/dist/components/combobox/combobox.svelte +1 -1
- package/dist/components/dialog/alert-dialog.svelte +2 -2
- package/dist/components/dialog/dialog-close-trigger.svelte +2 -1
- package/dist/components/dialog/dialog-close-trigger.svelte.d.ts +2 -1
- package/dist/components/dialog/dialog-description.svelte +2 -1
- package/dist/components/dialog/dialog-description.svelte.d.ts +2 -1
- package/dist/components/dialog/dialog-footer.svelte +2 -1
- package/dist/components/dialog/dialog-footer.svelte.d.ts +2 -1
- package/dist/components/dialog/{dialog.svelte → dialog-root.svelte} +33 -33
- package/dist/components/dialog/dialog-root.svelte.d.ts +4 -0
- package/dist/components/dialog/dialog-title.svelte +2 -1
- package/dist/components/dialog/dialog-title.svelte.d.ts +2 -1
- package/dist/components/dialog/dialog-trigger.svelte +2 -1
- package/dist/components/dialog/dialog-trigger.svelte.d.ts +2 -1
- package/dist/components/dialog/dialog.types.d.ts +2 -1
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/drawer/drawer-backdrop.svelte +12 -30
- package/dist/components/drawer/drawer-backdrop.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-close-trigger.svelte +2 -2
- package/dist/components/drawer/drawer-close-trigger.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-content.svelte +10 -3
- package/dist/components/drawer/drawer-content.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-grabber-indicator.svelte +4 -2
- package/dist/components/drawer/drawer-grabber-indicator.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-grabber.svelte +7 -3
- package/dist/components/drawer/drawer-grabber.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-positioner.svelte +10 -3
- package/dist/components/drawer/drawer-positioner.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-root.svelte +2 -6
- package/dist/components/drawer/drawer-title.svelte +4 -2
- package/dist/components/drawer/drawer-title.svelte.d.ts +2 -1
- package/dist/components/drawer/drawer-trigger.svelte +2 -1
- package/dist/components/drawer/drawer-trigger.svelte.d.ts +2 -1
- package/dist/components/field/types.d.ts +7 -6
- package/dist/components/fieldset/types.d.ts +5 -4
- package/dist/components/listbox/listbox-content.svelte +2 -1
- package/dist/components/listbox/listbox-content.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-empty.svelte +2 -1
- package/dist/components/listbox/listbox-empty.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-input.svelte +2 -1
- package/dist/components/listbox/listbox-input.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-item-group-label.svelte +2 -1
- package/dist/components/listbox/listbox-item-group-label.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-item-group.svelte +2 -1
- package/dist/components/listbox/listbox-item-group.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-item-indicator.svelte +2 -1
- package/dist/components/listbox/listbox-item-indicator.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-item-text.svelte +2 -1
- package/dist/components/listbox/listbox-item-text.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-item.svelte +2 -1
- package/dist/components/listbox/listbox-item.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-label.svelte +2 -1
- package/dist/components/listbox/listbox-label.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-root.svelte +2 -1
- package/dist/components/listbox/listbox-root.svelte.d.ts +2 -1
- package/dist/components/listbox/listbox-value-text.svelte +2 -1
- package/dist/components/listbox/listbox-value-text.svelte.d.ts +2 -1
- package/dist/components/select/select.svelte +1 -1
- package/dist/components/tooltip/tooltip-content.svelte +2 -2
- package/package.json +2 -1
- package/dist/components/dialog/dialog.svelte.d.ts +0 -5
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
3
|
import { button, type ButtonVariant, type ButtonSize } from './button.variants';
|
|
4
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
4
5
|
|
|
5
6
|
type Props = Omit<HTMLButtonAttributes, 'class'> & {
|
|
6
7
|
variant?: ButtonVariant;
|
|
7
8
|
size?: ButtonSize;
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
let { variant, size, class: className, children, ...rest }: Props = $props();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
2
2
|
import { type ButtonVariant, type ButtonSize } from './button.variants';
|
|
3
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
3
4
|
type Props = Omit<HTMLButtonAttributes, 'class'> & {
|
|
4
5
|
variant?: ButtonVariant;
|
|
5
6
|
size?: ButtonSize;
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
};
|
|
8
9
|
declare const Button: import("svelte").Component<Props, {}, "">;
|
|
9
10
|
type Button = ReturnType<typeof Button>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
3
3
|
import { button, type ButtonVariant, type ButtonSize } from './button.variants';
|
|
4
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
4
5
|
|
|
5
6
|
type Props = Omit<HTMLAnchorAttributes, 'class'> & {
|
|
6
7
|
variant?: ButtonVariant;
|
|
7
8
|
size?: ButtonSize;
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
let { variant, size, class: className, children, ...rest }: Props = $props();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { HTMLAnchorAttributes } from 'svelte/elements';
|
|
2
2
|
import { type ButtonVariant, type ButtonSize } from './button.variants';
|
|
3
|
+
import type { ClassValue } from 'tailwind-variants';
|
|
3
4
|
type Props = Omit<HTMLAnchorAttributes, 'class'> & {
|
|
4
5
|
variant?: ButtonVariant;
|
|
5
6
|
size?: ButtonSize;
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
};
|
|
8
9
|
declare const LinkButton: import("svelte").Component<Props, {}, "">;
|
|
9
10
|
type LinkButton = ReturnType<typeof LinkButton>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Collapsible } from '@ark-ui/svelte/collapsible';
|
|
3
3
|
import type { CollapsibleContentBaseProps } from '@ark-ui/svelte/collapsible';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
import { cn } from 'tailwind-variants';
|
|
5
6
|
|
|
6
7
|
interface Props extends CollapsibleContentBaseProps {
|
|
7
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CollapsibleContentBaseProps } from '@ark-ui/svelte/collapsible';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends CollapsibleContentBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const CollapsibleContent: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type CollapsibleContent = ReturnType<typeof CollapsibleContent>;
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
6
|
import PhCaretRight from '../../icons/PhCaretRight.svelte';
|
|
7
|
+
import type { ClassValue } from 'svelte/elements';
|
|
7
8
|
|
|
8
9
|
interface Props extends CollapsibleIndicatorBaseProps {
|
|
9
|
-
class?:
|
|
10
|
+
class?: ClassValue;
|
|
10
11
|
children?: Snippet;
|
|
11
12
|
}
|
|
12
13
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { CollapsibleIndicatorBaseProps } from '@ark-ui/svelte/collapsible';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
interface Props extends CollapsibleIndicatorBaseProps {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
}
|
|
7
8
|
declare const CollapsibleIndicator: import("svelte").Component<Props, {}, "">;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Collapsible } from '@ark-ui/svelte/collapsible';
|
|
3
3
|
import type { CollapsibleRootBaseProps } from '@ark-ui/svelte/collapsible';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
import { cn } from 'tailwind-variants';
|
|
5
6
|
|
|
6
7
|
interface Props extends CollapsibleRootBaseProps {
|
|
7
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CollapsibleRootBaseProps } from '@ark-ui/svelte/collapsible';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends CollapsibleRootBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const CollapsibleRoot: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type CollapsibleRoot = ReturnType<typeof CollapsibleRoot>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Collapsible } from '@ark-ui/svelte/collapsible';
|
|
3
3
|
import type { CollapsibleTriggerBaseProps } from '@ark-ui/svelte/collapsible';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
import { cn } from 'tailwind-variants';
|
|
5
6
|
|
|
6
7
|
interface Props extends CollapsibleTriggerBaseProps {
|
|
7
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CollapsibleTriggerBaseProps } from '@ark-ui/svelte/collapsible';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends CollapsibleTriggerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const CollapsibleTrigger: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type CollapsibleTrigger = ReturnType<typeof CollapsibleTrigger>;
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
<Portal>
|
|
134
134
|
<Combobox.Positioner class="data-[state=closed]:pointer-events-none">
|
|
135
135
|
<Combobox.Content
|
|
136
|
-
class="data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0
|
|
136
|
+
class="z-50 max-h-60 min-w-(--reference-width) overflow-auto rounded-md border bg-surface-document p-1 shadow-md data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
|
|
137
137
|
>
|
|
138
138
|
{#if loading}
|
|
139
139
|
<div class="flex items-center justify-center py-4">
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
<Dialog.Root role="alertdialog" bind:open {lazyMount} {unmountOnExit} {...restProps}>
|
|
29
29
|
<Portal>
|
|
30
30
|
<Dialog.Backdrop
|
|
31
|
-
class="data-[state=
|
|
31
|
+
class="fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0"
|
|
32
32
|
/>
|
|
33
33
|
<Dialog.Positioner class="fixed inset-0 z-50 flex items-center justify-center">
|
|
34
34
|
<Dialog.Content
|
|
35
|
-
class="data-[state=
|
|
35
|
+
class="relative w-full max-w-md rounded-lg border bg-surface-1 p-6 shadow-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
|
|
36
36
|
>
|
|
37
37
|
<Dialog.Title class="text-lg leading-none font-semibold tracking-tight">
|
|
38
38
|
{title}
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
3
|
import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
4
4
|
import { PhX } from '../../icons';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
|
|
6
7
|
interface Props extends DialogCloseTriggerBaseProps {
|
|
7
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DialogCloseTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DialogCloseTriggerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DialogCloseTrigger: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DialogCloseTrigger = ReturnType<typeof DialogCloseTrigger>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
3
|
import type { DialogDescriptionBaseProps } from '@ark-ui/svelte/dialog';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
interface Props extends DialogDescriptionBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DialogDescriptionBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DialogDescriptionBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DialogDescription: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DialogDescription = ReturnType<typeof DialogDescription>;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
|
-
import { Portal } from '@ark-ui/svelte/portal';
|
|
4
|
-
import { cn } from 'tailwind-variants';
|
|
5
|
-
import type { DialogProps } from './dialog.types';
|
|
6
|
-
|
|
7
|
-
let {
|
|
8
|
-
open = $bindable(),
|
|
9
|
-
children,
|
|
10
|
-
contentClass,
|
|
11
|
-
lazyMount = true,
|
|
12
|
-
unmountOnExit = true,
|
|
13
|
-
...restProps
|
|
14
|
-
}: DialogProps = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
<Dialog.Root bind:open {lazyMount} {unmountOnExit} {...restProps}>
|
|
18
|
-
<Portal>
|
|
19
|
-
<Dialog.Backdrop
|
|
20
|
-
class="data-[state=
|
|
21
|
-
/>
|
|
22
|
-
<Dialog.Positioner class="fixed inset-0 z-50 flex items-center justify-center p-4">
|
|
23
|
-
<Dialog.Content
|
|
24
|
-
class={cn(
|
|
25
|
-
'data-[state=
|
|
26
|
-
contentClass
|
|
27
|
-
)}
|
|
28
|
-
>
|
|
29
|
-
{@render children()}
|
|
30
|
-
</Dialog.Content>
|
|
31
|
-
</Dialog.Positioner>
|
|
32
|
-
</Portal>
|
|
33
|
-
</Dialog.Root>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
|
+
import { Portal } from '@ark-ui/svelte/portal';
|
|
4
|
+
import { cn } from 'tailwind-variants';
|
|
5
|
+
import type { DialogProps } from './dialog.types';
|
|
6
|
+
|
|
7
|
+
let {
|
|
8
|
+
open = $bindable(),
|
|
9
|
+
children,
|
|
10
|
+
contentClass,
|
|
11
|
+
lazyMount = true,
|
|
12
|
+
unmountOnExit = true,
|
|
13
|
+
...restProps
|
|
14
|
+
}: DialogProps = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Dialog.Root bind:open {lazyMount} {unmountOnExit} {...restProps}>
|
|
18
|
+
<Portal>
|
|
19
|
+
<Dialog.Backdrop
|
|
20
|
+
class="fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0"
|
|
21
|
+
/>
|
|
22
|
+
<Dialog.Positioner class="fixed inset-0 z-50 flex items-center justify-center p-4">
|
|
23
|
+
<Dialog.Content
|
|
24
|
+
class={cn(
|
|
25
|
+
'relative w-full max-w-2xl rounded-lg border bg-surface-1 p-6 shadow-xl data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95',
|
|
26
|
+
contentClass
|
|
27
|
+
)}
|
|
28
|
+
>
|
|
29
|
+
{@render children()}
|
|
30
|
+
</Dialog.Content>
|
|
31
|
+
</Dialog.Positioner>
|
|
32
|
+
</Portal>
|
|
33
|
+
</Dialog.Root>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
3
|
import type { DialogTitleBaseProps } from '@ark-ui/svelte/dialog';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
interface Props extends DialogTitleBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DialogTitleBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DialogTitleBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DialogTitle: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DialogTitle = ReturnType<typeof DialogTitle>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Dialog } from '@ark-ui/svelte/dialog';
|
|
3
3
|
import type { DialogTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
interface Props extends DialogTriggerBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DialogTriggerBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DialogTriggerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DialogTrigger: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DialogTrigger = ReturnType<typeof DialogTrigger>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { DialogRootBaseProps } from '@ark-ui/svelte/dialog';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
export type { DialogRootBaseProps };
|
|
4
5
|
type DialogSharedProps = Pick<DialogRootBaseProps, 'closeOnEscape' | 'closeOnInteractOutside' | 'onOpenChange' | 'lazyMount' | 'unmountOnExit'>;
|
|
5
6
|
export interface DialogProps extends DialogSharedProps {
|
|
6
7
|
open: boolean;
|
|
7
8
|
children: Snippet;
|
|
8
|
-
contentClass?:
|
|
9
|
+
contentClass?: ClassValue;
|
|
9
10
|
initialFocusEl?: DialogRootBaseProps['initialFocusEl'];
|
|
10
11
|
}
|
|
11
12
|
export type AlertDialogVariant = 'default' | 'destructive';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Root } from './dialog.svelte';
|
|
1
|
+
export { default as Root } from './dialog-root.svelte';
|
|
2
2
|
export { default as Title } from './dialog-title.svelte';
|
|
3
3
|
export { default as Description } from './dialog-description.svelte';
|
|
4
4
|
export { default as Trigger } from './dialog-trigger.svelte';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Root } from './dialog.svelte';
|
|
1
|
+
export { default as Root } from './dialog-root.svelte';
|
|
2
2
|
export { default as Title } from './dialog-title.svelte';
|
|
3
3
|
export { default as Description } from './dialog-description.svelte';
|
|
4
4
|
export { default as Trigger } from './dialog-trigger.svelte';
|
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerBackdropBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerBackdropBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, ...rest }: Props = $props();
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<Drawer.Backdrop
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
@keyframes fade-in {
|
|
24
|
-
from {
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
27
|
-
to {
|
|
28
|
-
opacity: 1;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@keyframes fade-out {
|
|
33
|
-
from {
|
|
34
|
-
opacity: 1;
|
|
35
|
-
}
|
|
36
|
-
to {
|
|
37
|
-
opacity: 0;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
14
|
+
<Drawer.Backdrop
|
|
15
|
+
{...rest}
|
|
16
|
+
class={cn(
|
|
17
|
+
'fixed inset-0 z-50 bg-black/50',
|
|
18
|
+
'data-[state=closed]:animate-out data-[state=closed]:fade-out-0',
|
|
19
|
+
'data-[state=open]:animate-in data-[state=open]:fade-in-0',
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
/>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerBackdropBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerBackdropBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerBackdrop: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerBackdrop = ReturnType<typeof DrawerBackdrop>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerCloseTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
interface Props extends DrawerCloseTriggerBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -11,7 +12,6 @@
|
|
|
11
12
|
|
|
12
13
|
<Drawer.CloseTrigger
|
|
13
14
|
{...rest}
|
|
14
|
-
onclick={() => console.log('Click:')}
|
|
15
15
|
class={className ??
|
|
16
16
|
'absolute top-12 right-4 flex h-7 w-7 cursor-pointer items-center justify-center rounded border-none bg-transparent text-ink-dim hover:bg-surface-2 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-[-1px]'}
|
|
17
17
|
>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerCloseTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerCloseTriggerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerCloseTrigger: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerCloseTrigger = ReturnType<typeof DrawerCloseTrigger>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerContentBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerContentBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -11,8 +13,13 @@
|
|
|
11
13
|
|
|
12
14
|
<Drawer.Content
|
|
13
15
|
{...rest}
|
|
14
|
-
class={
|
|
15
|
-
'relative flex h-full max-h-[96svh] w-full flex-col rounded-t-2xl bg-surface-1 px-5 shadow-xl outline-none
|
|
16
|
+
class={cn(
|
|
17
|
+
'relative flex h-full max-h-[96svh] w-full flex-col rounded-t-2xl bg-surface-1 px-5 shadow-xl outline-none',
|
|
18
|
+
'data-[swipe-direction=left]:rounded-none data-[swipe-direction=left]:rounded-r-2xl',
|
|
19
|
+
'data-[swipe-direction=right]:rounded-none data-[swipe-direction=right]:rounded-l-2xl',
|
|
20
|
+
'data-[swipe-direction=up]:rounded-none data-[swipe-direction=up]:rounded-b-2xl',
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
16
23
|
>
|
|
17
24
|
{@render children?.()}
|
|
18
25
|
</Drawer.Content>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerContentBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerContentBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerContent: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerContent = ReturnType<typeof DrawerContent>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerGrabberIndicatorBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerGrabberIndicatorBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, ...rest }: Props = $props();
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<Drawer.GrabberIndicator {...rest} class={
|
|
14
|
+
<Drawer.GrabberIndicator {...rest} class={cn('h-1 w-10 rounded-full bg-border', className)} />
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerGrabberIndicatorBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerGrabberIndicatorBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerGrabberIndicator: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerGrabberIndicator = ReturnType<typeof DrawerGrabberIndicator>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerGrabberBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerGrabberBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -11,8 +13,10 @@
|
|
|
11
13
|
|
|
12
14
|
<Drawer.Grabber
|
|
13
15
|
{...rest}
|
|
14
|
-
class={
|
|
15
|
-
'flex w-full shrink-0 cursor-grab touch-none items-center justify-center py-5 select-none active:cursor-grabbing'
|
|
16
|
+
class={cn(
|
|
17
|
+
'flex w-full shrink-0 cursor-grab touch-none items-center justify-center py-5 select-none active:cursor-grabbing',
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
16
20
|
>
|
|
17
21
|
{@render children?.()}
|
|
18
22
|
</Drawer.Grabber>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerGrabberBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerGrabberBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerGrabber: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerGrabber = ReturnType<typeof DrawerGrabber>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerPositionerBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerPositionerBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -11,8 +13,13 @@
|
|
|
11
13
|
|
|
12
14
|
<Drawer.Positioner
|
|
13
15
|
{...rest}
|
|
14
|
-
class={
|
|
15
|
-
'fixed inset-0 z-50 flex items-end justify-center
|
|
16
|
+
class={cn(
|
|
17
|
+
'fixed inset-0 z-50 flex items-end justify-center',
|
|
18
|
+
'data-[swipe-direction=left]:items-stretch data-[swipe-direction=left]:justify-start',
|
|
19
|
+
'data-[swipe-direction=right]:items-stretch data-[swipe-direction=right]:justify-end',
|
|
20
|
+
'data-[swipe-direction=up]:items-start',
|
|
21
|
+
className
|
|
22
|
+
)}
|
|
16
23
|
>
|
|
17
24
|
{@render children?.()}
|
|
18
25
|
</Drawer.Positioner>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerPositionerBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerPositionerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerPositioner: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerPositioner = ReturnType<typeof DrawerPositioner>;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
|
-
import type { DrawerRootProps
|
|
3
|
+
import type { DrawerRootProps } from '@ark-ui/svelte/drawer';
|
|
4
4
|
|
|
5
5
|
interface Props extends Omit<DrawerRootProps, 'open' | 'onOpenChange'> {
|
|
6
6
|
open?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
let { children, open = $bindable(), ...rest }: Props = $props();
|
|
10
|
-
|
|
11
|
-
const handleOpenChange = (details: DrawerOpenChangeDetails) => {
|
|
12
|
-
open = details.open;
|
|
13
|
-
};
|
|
14
10
|
</script>
|
|
15
11
|
|
|
16
|
-
<Drawer.Root
|
|
12
|
+
<Drawer.Root bind:open {...rest}>
|
|
17
13
|
{@render children?.()}
|
|
18
14
|
</Drawer.Root>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerTitleBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
|
+
import { cn } from 'tailwind-variants';
|
|
4
6
|
|
|
5
7
|
interface Props extends DrawerTitleBaseProps {
|
|
6
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
let { class: className, children, ...rest }: Props = $props();
|
|
10
12
|
</script>
|
|
11
13
|
|
|
12
|
-
<Drawer.Title {...rest} class={
|
|
14
|
+
<Drawer.Title {...rest} class={cn('mb-2 text-lg leading-7 font-medium text-ink', className)}>
|
|
13
15
|
{@render children?.()}
|
|
14
16
|
</Drawer.Title>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerTitleBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerTitleBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerTitle: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerTitle = ReturnType<typeof DrawerTitle>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Drawer } from '@ark-ui/svelte/drawer';
|
|
3
3
|
import type { DrawerTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
|
|
5
6
|
interface Props extends DrawerTriggerBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
let { class: className, children, ...rest }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { DrawerTriggerBaseProps } from '@ark-ui/svelte/drawer';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
interface Props extends DrawerTriggerBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
declare const DrawerTrigger: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type DrawerTrigger = ReturnType<typeof DrawerTrigger>;
|
|
@@ -1,30 +1,31 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { FieldRootBaseProps, FieldLabelBaseProps, FieldInputProps as ArkFieldInputProps, FieldTextareaProps as ArkFieldTextareaProps, FieldHelperTextBaseProps, FieldErrorTextBaseProps } from '@ark-ui/svelte/field';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
export interface FormAdapter {
|
|
4
5
|
invalid(field: string): boolean;
|
|
5
6
|
isRequired(field: string): boolean;
|
|
6
7
|
errors: Record<string, string[]>;
|
|
7
8
|
}
|
|
8
9
|
export interface FieldRootProps extends FieldRootBaseProps {
|
|
9
|
-
class?:
|
|
10
|
+
class?: ClassValue;
|
|
10
11
|
form?: FormAdapter;
|
|
11
12
|
field?: string;
|
|
12
13
|
helperText?: string;
|
|
13
14
|
}
|
|
14
15
|
export interface FieldLabelProps extends FieldLabelBaseProps {
|
|
15
|
-
class?:
|
|
16
|
+
class?: ClassValue;
|
|
16
17
|
}
|
|
17
18
|
export interface FieldInputProps extends ArkFieldInputProps {
|
|
18
|
-
class?:
|
|
19
|
+
class?: ClassValue;
|
|
19
20
|
startIcon?: Snippet;
|
|
20
21
|
endIcon?: Snippet;
|
|
21
22
|
}
|
|
22
23
|
export interface FieldTextareaProps extends ArkFieldTextareaProps {
|
|
23
|
-
class?:
|
|
24
|
+
class?: ClassValue;
|
|
24
25
|
}
|
|
25
26
|
export interface FieldHelperTextProps extends FieldHelperTextBaseProps {
|
|
26
|
-
class?:
|
|
27
|
+
class?: ClassValue;
|
|
27
28
|
}
|
|
28
29
|
export interface FieldErrorTextProps extends FieldErrorTextBaseProps {
|
|
29
|
-
class?:
|
|
30
|
+
class?: ClassValue;
|
|
30
31
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { FieldsetRootBaseProps, FieldsetLegendBaseProps, FieldsetHelperTextBaseProps, FieldsetErrorTextBaseProps } from '@ark-ui/svelte/fieldset';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
export interface FieldsetRootProps extends FieldsetRootBaseProps {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
}
|
|
5
6
|
export interface FieldsetLegendProps extends FieldsetLegendBaseProps {
|
|
6
|
-
class?:
|
|
7
|
+
class?: ClassValue;
|
|
7
8
|
}
|
|
8
9
|
export interface FieldsetHelperTextProps extends FieldsetHelperTextBaseProps {
|
|
9
|
-
class?:
|
|
10
|
+
class?: ClassValue;
|
|
10
11
|
}
|
|
11
12
|
export interface FieldsetErrorTextProps extends FieldsetErrorTextBaseProps {
|
|
12
|
-
class?:
|
|
13
|
+
class?: ClassValue;
|
|
13
14
|
}
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
import type { ListItem } from '../../utils/collections';
|
|
6
6
|
import { cn } from 'tailwind-variants';
|
|
7
7
|
import { getListboxContext } from './listbox-context';
|
|
8
|
+
import type { ClassValue } from 'svelte/elements';
|
|
8
9
|
|
|
9
10
|
type Props = ListboxContentBaseProps & {
|
|
10
|
-
class?:
|
|
11
|
+
class?: ClassValue;
|
|
11
12
|
items?: Snippet<[{ items: ListItem[]; group: [string, ListItem[]][] }]>;
|
|
12
13
|
};
|
|
13
14
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { ListboxContentBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { ListItem } from '../../utils/collections';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
type Props = ListboxContentBaseProps & {
|
|
5
|
-
class?:
|
|
6
|
+
class?: ClassValue;
|
|
6
7
|
items?: Snippet<[{
|
|
7
8
|
items: ListItem[];
|
|
8
9
|
group: [string, ListItem[]][];
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxEmptyBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxEmptyBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxEmptyBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxEmptyBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxEmpty: import("svelte").Component<Props, {}, "">;
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import type { ListboxInputBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import { cn } from 'tailwind-variants';
|
|
5
5
|
import { getListboxContext } from './listbox-context';
|
|
6
|
+
import type { ClassValue } from 'svelte/elements';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxInputBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
oninput?: (event: Event & { currentTarget: HTMLInputElement }) => void;
|
|
11
12
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ListboxInputBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
type Props = ListboxInputBaseProps & {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
placeholder?: string;
|
|
5
6
|
oninput?: (event: Event & {
|
|
6
7
|
currentTarget: HTMLInputElement;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxItemGroupLabelBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxItemGroupLabelBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxItemGroupLabelBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxItemGroupLabelBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxItemGroupLabel: import("svelte").Component<Props, {}, "">;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxItemGroupBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxItemGroupBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxItemGroupBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxItemGroupBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxItemGroup: import("svelte").Component<Props, {}, "">;
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
5
|
import { cn } from 'tailwind-variants';
|
|
6
6
|
import { PhCheck } from '../../icons';
|
|
7
|
+
import type { ClassValue } from 'svelte/elements';
|
|
7
8
|
|
|
8
9
|
type Props = ListboxItemIndicatorBaseProps & {
|
|
9
|
-
class?:
|
|
10
|
+
class?: ClassValue;
|
|
10
11
|
children?: Snippet;
|
|
11
12
|
};
|
|
12
13
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxItemIndicatorBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxItemIndicatorBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxItemIndicator: import("svelte").Component<Props, {}, "">;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxItemTextBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxItemTextBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxItemTextBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxItemTextBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxItemText: import("svelte").Component<Props, {}, "">;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxItemBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxItemBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxItemBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxItemBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxItem: import("svelte").Component<Props, {}, "">;
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxLabelBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
4
|
import type { Snippet } from 'svelte';
|
|
5
|
+
import type { ClassValue } from 'svelte/elements';
|
|
5
6
|
import { cn } from 'tailwind-variants';
|
|
6
7
|
|
|
7
8
|
type Props = ListboxLabelBaseProps & {
|
|
8
|
-
class?:
|
|
9
|
+
class?: ClassValue;
|
|
9
10
|
children?: Snippet;
|
|
10
11
|
};
|
|
11
12
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { ListboxLabelBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { ClassValue } from 'svelte/elements';
|
|
3
4
|
type Props = ListboxLabelBaseProps & {
|
|
4
|
-
class?:
|
|
5
|
+
class?: ClassValue;
|
|
5
6
|
children?: Snippet;
|
|
6
7
|
};
|
|
7
8
|
declare const ListboxLabel: import("svelte").Component<Props, {}, "">;
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
import type { ListItem } from '../../utils/collections';
|
|
8
8
|
import { cn } from 'tailwind-variants';
|
|
9
9
|
import { setListboxContext } from './listbox-context';
|
|
10
|
+
import type { ClassValue } from 'svelte/elements';
|
|
10
11
|
|
|
11
12
|
type Props = Omit<ListboxRootBaseProps<ListItem<T>>, 'collection' | 'value'> & {
|
|
12
13
|
items: ListItem<T>[];
|
|
13
14
|
value?: T[];
|
|
14
15
|
name?: string;
|
|
15
|
-
class?:
|
|
16
|
+
class?: ClassValue;
|
|
16
17
|
children?: Snippet;
|
|
17
18
|
};
|
|
18
19
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
2
2
|
import type { Snippet } from 'svelte';
|
|
3
3
|
import type { ListItem } from '../../utils/collections';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
declare function $$render<T extends string | number = string>(): {
|
|
5
6
|
props: Omit<Listbox.RootBaseProps<ListItem<T>>, "value" | "collection"> & {
|
|
6
7
|
items: ListItem<T>[];
|
|
7
8
|
value?: T[];
|
|
8
9
|
name?: string;
|
|
9
|
-
class?:
|
|
10
|
+
class?: ClassValue;
|
|
10
11
|
children?: Snippet;
|
|
11
12
|
};
|
|
12
13
|
exports: {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Listbox } from '@ark-ui/svelte/listbox';
|
|
3
3
|
import type { ListboxValueTextBaseProps } from '@ark-ui/svelte/listbox';
|
|
4
|
+
import type { ClassValue } from 'svelte/elements';
|
|
4
5
|
import { cn } from 'tailwind-variants';
|
|
5
6
|
|
|
6
7
|
type Props = ListboxValueTextBaseProps & {
|
|
7
|
-
class?:
|
|
8
|
+
class?: ClassValue;
|
|
8
9
|
};
|
|
9
10
|
|
|
10
11
|
let { class: className, ...restProps }: Props = $props();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ListboxValueTextBaseProps } from '@ark-ui/svelte/listbox';
|
|
2
|
+
import type { ClassValue } from 'svelte/elements';
|
|
2
3
|
type Props = ListboxValueTextBaseProps & {
|
|
3
|
-
class?:
|
|
4
|
+
class?: ClassValue;
|
|
4
5
|
};
|
|
5
6
|
declare const ListboxValueText: import("svelte").Component<Props, {}, "">;
|
|
6
7
|
type ListboxValueText = ReturnType<typeof ListboxValueText>;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
<Portal>
|
|
66
66
|
<Select.Positioner>
|
|
67
67
|
<Select.Content
|
|
68
|
-
class="data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95
|
|
68
|
+
class="z-50 max-h-60 min-w-(--reference-width) overflow-auto rounded-md border bg-surface-document p-1 text-ink shadow-md data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
|
|
69
69
|
>
|
|
70
70
|
<Select.ItemGroup>
|
|
71
71
|
{#each items as item (item.value)}
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<Tooltip.Content
|
|
20
20
|
{...restProps}
|
|
21
21
|
class={cn(
|
|
22
|
-
'z-50 max-w-80 rounded-md border bg-
|
|
22
|
+
'z-50 max-w-80 rounded-md border bg-well px-2.5 py-1.5 text-xs font-medium text-ink shadow-md outline-none [--arrow-background:var(--compote-well)] [--arrow-size:10px]',
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
>
|
|
26
26
|
{#if showArrow}
|
|
27
27
|
<Tooltip.Arrow>
|
|
28
|
-
<Tooltip.ArrowTip class="border-
|
|
28
|
+
<Tooltip.ArrowTip class="border-t border-l" />
|
|
29
29
|
</Tooltip.Arrow>
|
|
30
30
|
{/if}
|
|
31
31
|
{@render children()}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "compote-ui",
|
|
3
|
-
"version": "0.31.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev --open",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"svelte": "^5.55.4",
|
|
56
56
|
"svelte-check": "^4.4.6",
|
|
57
57
|
"tailwindcss": "^4.2.4",
|
|
58
|
+
"tw-animate-css": "^1.4.0",
|
|
58
59
|
"typescript": "^6.0.3",
|
|
59
60
|
"typescript-eslint": "^8.59.1",
|
|
60
61
|
"unplugin-icons": "^23.0.1",
|