@skeletonlabs/skeleton-svelte 4.11.0 → 4.12.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.
@@ -3,7 +3,8 @@
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
4
4
  import type { Props } from '@zag-js/tags-input';
5
5
 
6
- export interface TagsInputRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {}
6
+ export interface TagsInputRootProps
7
+ extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'placeholder'> {}
7
8
  </script>
8
9
 
9
10
  <script lang="ts">
@@ -1,7 +1,7 @@
1
1
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
3
3
  import type { Props } from '@zag-js/tags-input';
4
- export interface TagsInputRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
4
+ export interface TagsInputRootProps extends Omit<Props, 'id'>, PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'placeholder'> {
5
5
  }
6
6
  declare const Root: import("svelte").Component<TagsInputRootProps, {}, "">;
7
7
  type Root = ReturnType<typeof Root>;
@@ -1,12 +1,15 @@
1
1
  <script lang="ts" module>
2
2
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
4
+ import type { ToastOptions } from './root.svelte';
4
5
  import type { Props, Store } from '@zag-js/toast';
5
6
  import type { Snippet } from 'svelte';
6
7
 
8
+ export type ToastProps<T = any> = Props<T> & ToastOptions<T>;
9
+
7
10
  export interface ToastGroupProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'children'> {
8
11
  toaster: Store;
9
- children?: Snippet<[Props]>;
12
+ children?: Snippet<[ToastProps]>;
10
13
  }
11
14
  </script>
12
15
 
@@ -35,8 +38,8 @@
35
38
  {@render element(attributes)}
36
39
  {:else}
37
40
  <div {...attributes}>
38
- {#each api.getToasts() as toast (toast.id)}
39
- {@render children?.(toast)}
41
+ {#each api.getToasts() as toast, index (toast.id)}
42
+ {@render children?.({ ...toast, index })}
40
43
  {/each}
41
44
  </div>
42
45
  {/if}
@@ -1,10 +1,12 @@
1
1
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
3
+ import type { ToastOptions } from './root.svelte';
3
4
  import type { Props, Store } from '@zag-js/toast';
4
5
  import type { Snippet } from 'svelte';
6
+ export type ToastProps<T = any> = Props<T> & ToastOptions<T>;
5
7
  export interface ToastGroupProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir' | 'children'> {
6
8
  toaster: Store;
7
- children?: Snippet<[Props]>;
9
+ children?: Snippet<[ToastProps]>;
8
10
  }
9
11
  declare const Group: import("svelte").Component<ToastGroupProps, {}, "">;
10
12
  type Group = ReturnType<typeof Group>;
@@ -3,8 +3,12 @@
3
3
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
4
4
  import type { Options } from '@zag-js/toast';
5
5
 
6
+ export interface ToastOptions<T = any> extends Options<T> {
7
+ index: number;
8
+ }
9
+
6
10
  export interface ToastRootProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
7
- toast: Options;
11
+ toast: ToastOptions;
8
12
  }
9
13
  </script>
10
14
 
@@ -1,8 +1,11 @@
1
1
  import type { HTMLAttributes } from '../../../internal/html-attributes.js';
2
2
  import type { PropsWithElement } from '../../../internal/props-with-element.js';
3
3
  import type { Options } from '@zag-js/toast';
4
+ export interface ToastOptions<T = any> extends Options<T> {
5
+ index: number;
6
+ }
4
7
  export interface ToastRootProps extends PropsWithElement<'div'>, HTMLAttributes<'div', 'id' | 'dir'> {
5
- toast: Options;
8
+ toast: ToastOptions;
6
9
  }
7
10
  declare const Root: import("svelte").Component<ToastRootProps, {}, "">;
8
11
  type Root = ReturnType<typeof Root>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton-svelte",
3
- "version": "4.11.0",
3
+ "version": "4.12.1",
4
4
  "description": "The Svelte package for Skeleton.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {
@@ -21,35 +21,35 @@
21
21
  ],
22
22
  "sideEffects": false,
23
23
  "dependencies": {
24
- "@internationalized/date": "3.10.1",
25
- "@zag-js/accordion": "1.32.0",
26
- "@zag-js/avatar": "1.32.0",
27
- "@zag-js/carousel": "1.32.0",
28
- "@zag-js/collapsible": "1.32.0",
29
- "@zag-js/collection": "1.32.0",
30
- "@zag-js/combobox": "1.32.0",
31
- "@zag-js/date-picker": "1.32.0",
32
- "@zag-js/dialog": "1.32.0",
33
- "@zag-js/file-upload": "1.32.0",
34
- "@zag-js/floating-panel": "1.32.0",
35
- "@zag-js/listbox": "1.32.0",
36
- "@zag-js/menu": "1.32.0",
37
- "@zag-js/pagination": "1.32.0",
38
- "@zag-js/popover": "1.32.0",
39
- "@zag-js/progress": "1.32.0",
40
- "@zag-js/radio-group": "1.32.0",
41
- "@zag-js/rating-group": "1.32.0",
42
- "@zag-js/slider": "1.32.0",
43
- "@zag-js/steps": "1.32.0",
44
- "@zag-js/svelte": "1.32.0",
45
- "@zag-js/switch": "1.32.0",
46
- "@zag-js/tabs": "1.32.0",
47
- "@zag-js/tags-input": "1.32.0",
48
- "@zag-js/toast": "1.32.0",
49
- "@zag-js/toggle-group": "1.32.0",
50
- "@zag-js/tooltip": "1.32.0",
51
- "@zag-js/tree-view": "1.32.0",
52
- "@skeletonlabs/skeleton-common": "4.11.0"
24
+ "@internationalized/date": "3.11.0",
25
+ "@zag-js/accordion": "1.34.1",
26
+ "@zag-js/avatar": "1.34.1",
27
+ "@zag-js/carousel": "1.34.1",
28
+ "@zag-js/collapsible": "1.34.1",
29
+ "@zag-js/collection": "1.34.1",
30
+ "@zag-js/combobox": "1.34.1",
31
+ "@zag-js/date-picker": "1.34.1",
32
+ "@zag-js/dialog": "1.34.1",
33
+ "@zag-js/file-upload": "1.34.1",
34
+ "@zag-js/floating-panel": "1.34.1",
35
+ "@zag-js/listbox": "1.34.1",
36
+ "@zag-js/menu": "1.34.1",
37
+ "@zag-js/pagination": "1.34.1",
38
+ "@zag-js/popover": "1.34.1",
39
+ "@zag-js/progress": "1.34.1",
40
+ "@zag-js/radio-group": "1.34.1",
41
+ "@zag-js/rating-group": "1.34.1",
42
+ "@zag-js/slider": "1.34.1",
43
+ "@zag-js/steps": "1.34.1",
44
+ "@zag-js/svelte": "1.34.1",
45
+ "@zag-js/switch": "1.34.1",
46
+ "@zag-js/tabs": "1.34.1",
47
+ "@zag-js/tags-input": "1.34.1",
48
+ "@zag-js/toast": "1.34.1",
49
+ "@zag-js/toggle-group": "1.34.1",
50
+ "@zag-js/tooltip": "1.34.1",
51
+ "@zag-js/tree-view": "1.34.1",
52
+ "@skeletonlabs/skeleton-common": "4.12.1"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "svelte": "^5.29.0"