compote-ui 0.58.0 → 0.58.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/toast/index.d.ts +1 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast.d.ts +1 -0
- package/dist/components/toast/toast.js +2 -0
- package/dist/components/toast/toaster.svelte +7 -8
- package/dist/components/toast/toaster.svelte.d.ts +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const toast: import("@zag-js/toast").Store<any>;
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Toast, Toaster
|
|
2
|
+
import { Toast, Toaster } from '@ark-ui/svelte/toast';
|
|
3
3
|
import { Portal } from '@ark-ui/svelte/portal';
|
|
4
4
|
import { cn } from 'tailwind-variants';
|
|
5
5
|
import type { ClassValue } from 'tailwind-variants';
|
|
6
|
-
import
|
|
6
|
+
import { toast } from './toast.js';
|
|
7
7
|
import PhX from '../../icons/PhX.svelte';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
10
|
-
toaster: CreateToasterReturn;
|
|
11
10
|
class?: ClassValue;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
|
-
let {
|
|
13
|
+
let { class: className }: Props = $props();
|
|
15
14
|
</script>
|
|
16
15
|
|
|
17
16
|
<Portal>
|
|
18
|
-
<
|
|
19
|
-
{#snippet children(
|
|
20
|
-
{@const t =
|
|
17
|
+
<Toaster toaster={toast}>
|
|
18
|
+
{#snippet children(toastItem)}
|
|
19
|
+
{@const t = toastItem()}
|
|
21
20
|
<Toast.Root
|
|
22
21
|
class={cn(
|
|
23
22
|
'relative min-w-80 rounded-lg border border-border bg-surface-1 p-4 pr-8 shadow-lg transition-all duration-200',
|
|
@@ -45,5 +44,5 @@
|
|
|
45
44
|
</Toast.CloseTrigger>
|
|
46
45
|
</Toast.Root>
|
|
47
46
|
{/snippet}
|
|
48
|
-
</
|
|
47
|
+
</Toaster>
|
|
49
48
|
</Portal>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { Toaster } from '@ark-ui/svelte/toast';
|
|
1
2
|
import type { ClassValue } from 'tailwind-variants';
|
|
2
|
-
import type { CreateToasterReturn } from '@ark-ui/svelte/toast';
|
|
3
3
|
interface Props {
|
|
4
|
-
toaster: CreateToasterReturn;
|
|
5
4
|
class?: ClassValue;
|
|
6
5
|
}
|
|
7
6
|
declare const Toaster: import("svelte").Component<Props, {}, "">;
|
package/dist/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export type { SplitterPanelConfig, SplitterProps } from './components/splitter/t
|
|
|
45
45
|
export { default as Switch } from './components/switch/switch.svelte';
|
|
46
46
|
export * as Tabs from './components/tabs';
|
|
47
47
|
export * as Toast from './components/toast';
|
|
48
|
+
export { toast } from './components/toast';
|
|
48
49
|
export { createToaster } from '@ark-ui/svelte/toast';
|
|
49
50
|
export type { CreateToasterReturn } from '@ark-ui/svelte/toast';
|
|
50
51
|
export { default as Toggle } from './components/toggle/toggle.svelte';
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export { default as Splitter } from './components/splitter/splitter.svelte';
|
|
|
34
34
|
export { default as Switch } from './components/switch/switch.svelte';
|
|
35
35
|
export * as Tabs from './components/tabs';
|
|
36
36
|
export * as Toast from './components/toast';
|
|
37
|
+
export { toast } from './components/toast';
|
|
37
38
|
export { createToaster } from '@ark-ui/svelte/toast';
|
|
38
39
|
export { default as Toggle } from './components/toggle/toggle.svelte';
|
|
39
40
|
export * as ToggleGroup from './components/toggle-group';
|