@agnos-ui/svelte-headless 0.8.0-next.1 → 0.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/components/toast/index.d.ts +3 -0
- package/components/toast/index.js +3 -0
- package/components/toast/toasterService.d.ts +21 -0
- package/components/toast/toasterService.js +25 -0
- package/generated/components/carousel/index.d.ts +1 -0
- package/generated/components/carousel/index.js +1 -0
- package/generated/components/toast/index.d.ts +1 -1
- package/generated/components/toast/index.js +1 -1
- package/generated/index.d.ts +7 -6
- package/generated/index.js +7 -6
- package/package.json +4 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Directive } from '../../generated';
|
|
2
|
+
import type { ToastProps, ToasterToast, ToasterProps } from '@agnos-ui/core/components/toast';
|
|
3
|
+
/**
|
|
4
|
+
* Create a toaster provider with helpers and state.
|
|
5
|
+
* @param props Options for the toaster.
|
|
6
|
+
* @template Props Type of the toast properties.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Toaster<Props extends Partial<ToastProps>> {
|
|
9
|
+
#private;
|
|
10
|
+
readonly toasts: {
|
|
11
|
+
current: ToasterToast<Props>[];
|
|
12
|
+
};
|
|
13
|
+
readonly options: {
|
|
14
|
+
current: ToasterProps;
|
|
15
|
+
};
|
|
16
|
+
readonly addToast: (props: Props) => number;
|
|
17
|
+
readonly removeToast: (id: number) => void;
|
|
18
|
+
readonly eventsDirective: Directive<number>;
|
|
19
|
+
readonly closeAll: () => void;
|
|
20
|
+
constructor(options?: ToasterProps);
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Toaster as CoreToaster } from '@agnos-ui/core/components/toast';
|
|
2
|
+
import { fromStore } from 'svelte/store';
|
|
3
|
+
/**
|
|
4
|
+
* Create a toaster provider with helpers and state.
|
|
5
|
+
* @param props Options for the toaster.
|
|
6
|
+
* @template Props Type of the toast properties.
|
|
7
|
+
*/
|
|
8
|
+
export class Toaster {
|
|
9
|
+
#toaster;
|
|
10
|
+
toasts;
|
|
11
|
+
options;
|
|
12
|
+
addToast;
|
|
13
|
+
removeToast;
|
|
14
|
+
eventsDirective;
|
|
15
|
+
closeAll;
|
|
16
|
+
constructor(options) {
|
|
17
|
+
this.#toaster = new CoreToaster(options);
|
|
18
|
+
this.toasts = fromStore(this.#toaster.toasts);
|
|
19
|
+
this.options = fromStore(this.#toaster.options);
|
|
20
|
+
this.addToast = this.#toaster.addToast;
|
|
21
|
+
this.removeToast = this.#toaster.removeToast;
|
|
22
|
+
this.eventsDirective = this.#toaster.eventsDirective;
|
|
23
|
+
this.closeAll = this.#toaster.closeAll;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/components/carousel';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/core/components/carousel';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from './../../../components/toast';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from './../../../components/toast';
|
package/generated/index.d.ts
CHANGED
|
@@ -8,18 +8,16 @@ export * from './services/hash';
|
|
|
8
8
|
export * from './services/focustrack';
|
|
9
9
|
export * from './services/floatingUI';
|
|
10
10
|
export * from './services/extendWidget';
|
|
11
|
-
export * from './services/transitions/simpleClassTransition';
|
|
12
|
-
export * from './services/transitions/cssTransitions';
|
|
13
|
-
export * from './services/transitions/collapse';
|
|
14
|
-
export * from './services/transitions/baseTransitions';
|
|
15
11
|
export * from './utils/writables';
|
|
16
12
|
export * from './utils/stores';
|
|
17
13
|
export * from './utils/func';
|
|
18
14
|
export * from './utils/directive';
|
|
15
|
+
export * from './services/transitions/simpleClassTransition';
|
|
16
|
+
export * from './services/transitions/cssTransitions';
|
|
17
|
+
export * from './services/transitions/collapse';
|
|
18
|
+
export * from './services/transitions/baseTransitions';
|
|
19
19
|
export * from './types';
|
|
20
20
|
export * from './config';
|
|
21
|
-
export * from './utils/widget.svelte';
|
|
22
|
-
export * from './slot';
|
|
23
21
|
export * from './components/tree/index';
|
|
24
22
|
export * from './components/toast/index';
|
|
25
23
|
export * from './components/slider/index';
|
|
@@ -28,5 +26,8 @@ export * from './components/rating/index';
|
|
|
28
26
|
export * from './components/progressbar/index';
|
|
29
27
|
export * from './components/pagination/index';
|
|
30
28
|
export * from './components/modal/index';
|
|
29
|
+
export * from './components/carousel/index';
|
|
31
30
|
export * from './components/alert/index';
|
|
32
31
|
export * from './components/accordion/index';
|
|
32
|
+
export * from './utils/widget.svelte';
|
|
33
|
+
export * from './slot';
|
package/generated/index.js
CHANGED
|
@@ -8,18 +8,16 @@ export * from './services/hash';
|
|
|
8
8
|
export * from './services/focustrack';
|
|
9
9
|
export * from './services/floatingUI';
|
|
10
10
|
export * from './services/extendWidget';
|
|
11
|
-
export * from './services/transitions/simpleClassTransition';
|
|
12
|
-
export * from './services/transitions/cssTransitions';
|
|
13
|
-
export * from './services/transitions/collapse';
|
|
14
|
-
export * from './services/transitions/baseTransitions';
|
|
15
11
|
export * from './utils/writables';
|
|
16
12
|
export * from './utils/stores';
|
|
17
13
|
export * from './utils/func';
|
|
18
14
|
export * from './utils/directive';
|
|
15
|
+
export * from './services/transitions/simpleClassTransition';
|
|
16
|
+
export * from './services/transitions/cssTransitions';
|
|
17
|
+
export * from './services/transitions/collapse';
|
|
18
|
+
export * from './services/transitions/baseTransitions';
|
|
19
19
|
export * from './types';
|
|
20
20
|
export * from './config';
|
|
21
|
-
export * from './utils/widget.svelte';
|
|
22
|
-
export * from './slot';
|
|
23
21
|
export * from './components/tree/index';
|
|
24
22
|
export * from './components/toast/index';
|
|
25
23
|
export * from './components/slider/index';
|
|
@@ -28,5 +26,8 @@ export * from './components/rating/index';
|
|
|
28
26
|
export * from './components/progressbar/index';
|
|
29
27
|
export * from './components/pagination/index';
|
|
30
28
|
export * from './components/modal/index';
|
|
29
|
+
export * from './components/carousel/index';
|
|
31
30
|
export * from './components/alert/index';
|
|
32
31
|
export * from './components/accordion/index';
|
|
32
|
+
export * from './utils/widget.svelte';
|
|
33
|
+
export * from './slot';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/svelte-headless",
|
|
3
3
|
"description": "Headless component library for Svelte.",
|
|
4
|
-
"version": "0.8.0
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core": "0.8.0
|
|
52
|
+
"@agnos-ui/core": "0.8.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
55
|
"@amadeus-it-group/tansu": "^2.0.0",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"accordion",
|
|
71
71
|
"AgnosUI",
|
|
72
72
|
"alert",
|
|
73
|
+
"carousel",
|
|
73
74
|
"collapse",
|
|
74
75
|
"components",
|
|
75
76
|
"modal",
|
|
@@ -78,6 +79,7 @@
|
|
|
78
79
|
"rating",
|
|
79
80
|
"slider",
|
|
80
81
|
"toast",
|
|
82
|
+
"tree",
|
|
81
83
|
"widgets"
|
|
82
84
|
]
|
|
83
85
|
}
|