@agnos-ui/svelte-bootstrap 0.4.0-next.0 → 0.4.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/accordion/Accordion.svelte.d.ts +1 -1
- package/components/accordion/Item.svelte.d.ts +1 -1
- package/components/accordion/accordion.d.ts +3 -6
- package/components/accordion/accordion.gen.d.ts +77 -5
- package/components/accordion/accordion.gen.js +32 -1
- package/components/accordion/accordion.js +1 -4
- package/components/alert/Alert.svelte.d.ts +1 -1
- package/components/alert/alert.d.ts +3 -5
- package/components/alert/alert.gen.d.ts +61 -7
- package/components/alert/alert.gen.js +14 -1
- package/components/alert/alert.js +1 -3
- package/components/modal/Modal.svelte +4 -4
- package/components/modal/ModalDefaultHeader.svelte +1 -1
- package/components/modal/ModalDefaultStructure.svelte +4 -4
- package/components/modal/modal.d.ts +3 -6
- package/components/modal/modal.gen.d.ts +131 -31
- package/components/modal/modal.gen.js +26 -1
- package/components/modal/modal.js +1 -4
- package/components/pagination/Pagination.svelte +10 -10
- package/components/pagination/Pagination.svelte.d.ts +1 -1
- package/components/pagination/PaginationDefaultPages.svelte +15 -15
- package/components/pagination/PaginationDefaultStructure.svelte +40 -40
- package/components/pagination/pagination.d.ts +3 -5
- package/components/pagination/pagination.gen.d.ts +204 -34
- package/components/pagination/pagination.gen.js +14 -1
- package/components/pagination/pagination.js +1 -3
- package/components/progressbar/Progressbar.svelte +3 -3
- package/components/progressbar/Progressbar.svelte.d.ts +1 -1
- package/components/progressbar/progressbar.d.ts +3 -5
- package/components/progressbar/progressbar.gen.d.ts +56 -3
- package/components/progressbar/progressbar.gen.js +14 -1
- package/components/progressbar/progressbar.js +1 -3
- package/components/rating/rating.d.ts +3 -5
- package/components/rating/rating.gen.d.ts +84 -1
- package/components/rating/rating.gen.js +14 -1
- package/components/rating/rating.js +1 -3
- package/components/select/select.d.ts +3 -5
- package/components/select/select.gen.d.ts +121 -1
- package/components/select/select.gen.js +14 -1
- package/components/select/select.js +1 -3
- package/components/slider/Slider.svelte.d.ts +1 -1
- package/components/slider/slider.d.ts +3 -5
- package/components/slider/slider.gen.d.ts +98 -3
- package/components/slider/slider.gen.js +14 -1
- package/components/slider/slider.js +1 -3
- package/components/toast/Toast.svelte.d.ts +1 -1
- package/components/toast/toast.d.ts +3 -5
- package/components/toast/toast.gen.d.ts +65 -7
- package/components/toast/toast.gen.js +14 -1
- package/components/toast/toast.js +1 -3
- package/config.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, Directive } from '@agnos-ui/svelte-headless/types';
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive } from '@agnos-ui/svelte-headless/types';
|
|
2
2
|
import type { TransitionFn } from '@agnos-ui/svelte-headless/services/transitions/baseTransitions';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve a shallow copy of the default Toast config
|
|
5
|
+
* @returns the default Toast config
|
|
6
|
+
*/
|
|
7
|
+
declare const export_getToastDefaultConfig: () => ToastProps;
|
|
8
|
+
export { export_getToastDefaultConfig as getToastDefaultConfig };
|
|
3
9
|
export type ToastContext = WidgetSlotContext<ToastWidget>;
|
|
4
10
|
export interface ToastState {
|
|
5
11
|
/**
|
|
@@ -9,26 +15,38 @@ export interface ToastState {
|
|
|
9
15
|
/**
|
|
10
16
|
* If `true`, alert can be dismissed by the user.
|
|
11
17
|
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue `true`
|
|
12
20
|
*/
|
|
13
21
|
dismissible: boolean;
|
|
14
22
|
/**
|
|
15
23
|
* If `true` the alert is visible to the user
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue `true`
|
|
16
26
|
*/
|
|
17
27
|
visible: boolean;
|
|
18
28
|
/**
|
|
19
29
|
* Accessibility close button label
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue `'Close'`
|
|
20
32
|
*/
|
|
21
33
|
ariaCloseButtonLabel: string;
|
|
22
34
|
/**
|
|
23
35
|
* CSS classes to be applied on the widget main container
|
|
36
|
+
*
|
|
37
|
+
* @defaultValue `''`
|
|
24
38
|
*/
|
|
25
39
|
className: string;
|
|
26
40
|
/**
|
|
27
41
|
* If `true` automatically hides the toast after the delay.
|
|
42
|
+
*
|
|
43
|
+
* @defaultValue `true`
|
|
28
44
|
*/
|
|
29
45
|
autoHide: boolean;
|
|
30
46
|
/**
|
|
31
47
|
* Delay in milliseconds before hiding the toast.
|
|
48
|
+
*
|
|
49
|
+
* @defaultValue `5000`
|
|
32
50
|
*/
|
|
33
51
|
delay: number;
|
|
34
52
|
/**
|
|
@@ -45,29 +63,48 @@ export interface ToastState {
|
|
|
45
63
|
header: SlotContent<ToastContext>;
|
|
46
64
|
}
|
|
47
65
|
export interface ToastProps {
|
|
66
|
+
/**
|
|
67
|
+
* The transition function will be executed when the alert is displayed or hidden.
|
|
68
|
+
*
|
|
69
|
+
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
70
|
+
*
|
|
71
|
+
* @defaultValue `fadeTransition`
|
|
72
|
+
*/
|
|
73
|
+
transition: TransitionFn;
|
|
48
74
|
/**
|
|
49
75
|
* Callback called when the alert visibility changed.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue
|
|
78
|
+
* ```ts
|
|
79
|
+
* () => {}
|
|
80
|
+
* ```
|
|
50
81
|
*/
|
|
51
82
|
onVisibleChange: (visible: boolean) => void;
|
|
52
83
|
/**
|
|
53
84
|
* Callback called when the alert is hidden.
|
|
85
|
+
*
|
|
86
|
+
* @defaultValue
|
|
87
|
+
* ```ts
|
|
88
|
+
* () => {}
|
|
89
|
+
* ```
|
|
54
90
|
*/
|
|
55
91
|
onHidden: () => void;
|
|
56
92
|
/**
|
|
57
93
|
* Callback called when the alert is shown.
|
|
58
|
-
*/
|
|
59
|
-
onShown: () => void;
|
|
60
|
-
/**
|
|
61
|
-
* The transition function will be executed when the alert is displayed or hidden.
|
|
62
94
|
*
|
|
63
|
-
*
|
|
95
|
+
* @defaultValue
|
|
96
|
+
* ```ts
|
|
97
|
+
* () => {}
|
|
98
|
+
* ```
|
|
64
99
|
*/
|
|
65
|
-
|
|
100
|
+
onShown: () => void;
|
|
66
101
|
/**
|
|
67
102
|
* If `true`, alert opening will be animated.
|
|
68
103
|
*
|
|
69
104
|
* Animation is triggered when the `.open()` function is called
|
|
70
105
|
* or the visible prop is changed
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue `false`
|
|
71
108
|
*/
|
|
72
109
|
animatedOnInit: boolean;
|
|
73
110
|
/**
|
|
@@ -75,31 +112,45 @@ export interface ToastProps {
|
|
|
75
112
|
*
|
|
76
113
|
* Animation is triggered when clicked on the close button (×),
|
|
77
114
|
* via the `.close()` function or the visible prop is changed
|
|
115
|
+
*
|
|
116
|
+
* @defaultValue `true`
|
|
78
117
|
*/
|
|
79
118
|
animated: boolean;
|
|
80
119
|
/**
|
|
81
120
|
* If `true`, alert can be dismissed by the user.
|
|
82
121
|
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
122
|
+
*
|
|
123
|
+
* @defaultValue `true`
|
|
83
124
|
*/
|
|
84
125
|
dismissible: boolean;
|
|
85
126
|
/**
|
|
86
127
|
* If `true` the alert is visible to the user
|
|
128
|
+
*
|
|
129
|
+
* @defaultValue `true`
|
|
87
130
|
*/
|
|
88
131
|
visible: boolean;
|
|
89
132
|
/**
|
|
90
133
|
* Accessibility close button label
|
|
134
|
+
*
|
|
135
|
+
* @defaultValue `'Close'`
|
|
91
136
|
*/
|
|
92
137
|
ariaCloseButtonLabel: string;
|
|
93
138
|
/**
|
|
94
139
|
* CSS classes to be applied on the widget main container
|
|
140
|
+
*
|
|
141
|
+
* @defaultValue `''`
|
|
95
142
|
*/
|
|
96
143
|
className: string;
|
|
97
144
|
/**
|
|
98
145
|
* If `true` automatically hides the toast after the delay.
|
|
146
|
+
*
|
|
147
|
+
* @defaultValue `true`
|
|
99
148
|
*/
|
|
100
149
|
autoHide: boolean;
|
|
101
150
|
/**
|
|
102
151
|
* Delay in milliseconds before hiding the toast.
|
|
152
|
+
*
|
|
153
|
+
* @defaultValue `5000`
|
|
103
154
|
*/
|
|
104
155
|
delay: number;
|
|
105
156
|
/**
|
|
@@ -116,6 +167,13 @@ export interface ToastProps {
|
|
|
116
167
|
header: SlotContent<ToastContext>;
|
|
117
168
|
}
|
|
118
169
|
export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, object, ToastDirectives>;
|
|
170
|
+
/**
|
|
171
|
+
* Create an ToastWidget with given config props
|
|
172
|
+
* @param config - an optional alert config
|
|
173
|
+
* @returns an ToastWidget
|
|
174
|
+
*/
|
|
175
|
+
declare const export_createToast: WidgetFactory<ToastWidget>;
|
|
176
|
+
export { export_createToast as createToast };
|
|
119
177
|
export interface ToastApi {
|
|
120
178
|
/**
|
|
121
179
|
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { getToastDefaultConfig, createToast } from '@agnos-ui/core-bootstrap/components/toast';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Toast config
|
|
4
|
+
* @returns the default Toast config
|
|
5
|
+
*/
|
|
6
|
+
const export_getToastDefaultConfig = getToastDefaultConfig;
|
|
7
|
+
export { export_getToastDefaultConfig as getToastDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* Create an ToastWidget with given config props
|
|
10
|
+
* @param config - an optional alert config
|
|
11
|
+
* @returns an ToastWidget
|
|
12
|
+
*/
|
|
13
|
+
const export_createToast = createToast;
|
|
14
|
+
export { export_createToast as createToast };
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const createToast = coreCreateToast;
|
|
3
|
-
export const getToastDefaultConfig = coreGetToastDefaultConfig;
|
|
1
|
+
export * from './toast.gen';
|
package/config.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ type WidgetFactoryInput<W extends Widget> = {
|
|
|
15
15
|
type AdaptParentConfig = (config: Partial2Levels<WidgetsConfig>) => Partial2Levels<WidgetsConfig>;
|
|
16
16
|
type CreateWidgetsDefaultConfig = (adaptParentConfig?: AdaptParentConfig) => WidgetsConfigStore<WidgetsConfig>;
|
|
17
17
|
export declare const widgetsDefaultConfigKey: symbol, createWidgetsDefaultConfig: CreateWidgetsDefaultConfig, getContextWidgetConfig: <N extends keyof WidgetsConfig>(widgetName: N) => ReadableSignal<Partial<WidgetsConfig[N]> | undefined>, callWidgetFactory: <W extends Widget>({ factory, widgetName, $$slots, defaultConfig, events, $$props, }: WidgetFactoryInput<W>) => W & {
|
|
18
|
-
patchChangedProps: W[
|
|
18
|
+
patchChangedProps: W["patch"];
|
|
19
19
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/svelte-bootstrap",
|
|
3
3
|
"description": "Bootstrap-based widget library for Svelte.",
|
|
4
|
-
"version": "0.4.0
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@agnos-ui/core-bootstrap": "0.4.0
|
|
53
|
-
"@agnos-ui/svelte-headless": "0.4.0
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.4.0",
|
|
53
|
+
"@agnos-ui/svelte-headless": "0.4.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@amadeus-it-group/tansu": "^1.0.0",
|