@agnos-ui/svelte-bootstrap 0.9.3 → 0.10.0-next.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/carousel/Carousel.svelte.d.ts +14 -3
- package/components/carousel/CarouselDefaultNavigation.svelte.d.ts +13 -3
- package/components/carousel/CarouselDefaultStructure.svelte.d.ts +13 -3
- package/components/drawer/Drawer.svelte +51 -0
- package/components/drawer/Drawer.svelte.d.ts +6 -0
- package/components/drawer/DrawerDefaultStructure.svelte +20 -0
- package/components/drawer/DrawerDefaultStructure.svelte.d.ts +3 -0
- package/components/drawer/drawer.gen.d.ts +289 -0
- package/components/drawer/drawer.gen.js +14 -0
- package/components/drawer/index.d.ts +3 -0
- package/components/drawer/index.js +3 -0
- package/components/modal/Modal.svelte.d.ts +12 -3
- package/components/modal/ModalDefaultHeader.svelte.d.ts +10 -3
- package/components/modal/ModalDefaultStructure.svelte.d.ts +10 -3
- package/components/modal/modal.gen.d.ts +7 -1
- package/components/modal/modal.gen.js +7 -1
- package/components/select/Select.svelte.d.ts +12 -3
- package/config.gen.d.ts +5 -0
- package/generated/index.d.ts +6 -5
- package/generated/index.js +6 -5
- package/generated/services/focusElement.d.ts +1 -0
- package/generated/services/focusElement.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -0
- package/package.json +3 -3
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { CarouselProps, CarouselApi } from './carousel.gen';
|
|
2
|
+
declare function $$render<SlideData extends {
|
|
3
|
+
id: string;
|
|
4
|
+
}>(): {
|
|
5
|
+
props: Partial<CarouselProps<SlideData>>;
|
|
6
|
+
exports: {
|
|
7
|
+
api: CarouselApi;
|
|
8
|
+
};
|
|
9
|
+
bindings: "";
|
|
10
|
+
slots: {};
|
|
11
|
+
events: {};
|
|
12
|
+
};
|
|
2
13
|
declare class __sveltets_Render<SlideData extends {
|
|
3
14
|
id: string;
|
|
4
15
|
}> {
|
|
5
|
-
props():
|
|
6
|
-
events():
|
|
7
|
-
slots():
|
|
16
|
+
props(): ReturnType<typeof $$render<SlideData>>['props'];
|
|
17
|
+
events(): ReturnType<typeof $$render<SlideData>>['events'];
|
|
18
|
+
slots(): ReturnType<typeof $$render<SlideData>>['slots'];
|
|
8
19
|
bindings(): "";
|
|
9
20
|
exports(): {
|
|
10
21
|
api: CarouselApi;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import type { CarouselContext } from './carousel.gen';
|
|
2
|
+
declare function $$render<SlideData extends {
|
|
3
|
+
id: string;
|
|
4
|
+
}>(): {
|
|
5
|
+
props: CarouselContext<SlideData>;
|
|
6
|
+
exports: {};
|
|
7
|
+
bindings: "";
|
|
8
|
+
slots: {};
|
|
9
|
+
events: {};
|
|
10
|
+
};
|
|
1
11
|
declare class __sveltets_Render<SlideData extends {
|
|
2
12
|
id: string;
|
|
3
13
|
}> {
|
|
4
|
-
props():
|
|
5
|
-
events():
|
|
6
|
-
slots():
|
|
14
|
+
props(): ReturnType<typeof $$render<SlideData>>['props'];
|
|
15
|
+
events(): ReturnType<typeof $$render<SlideData>>['events'];
|
|
16
|
+
slots(): ReturnType<typeof $$render<SlideData>>['slots'];
|
|
7
17
|
bindings(): "";
|
|
8
18
|
exports(): {};
|
|
9
19
|
}
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
+
import type { CarouselContext } from './carousel.gen';
|
|
2
|
+
declare function $$render<SlideData extends {
|
|
3
|
+
id: string;
|
|
4
|
+
}>(): {
|
|
5
|
+
props: CarouselContext<SlideData>;
|
|
6
|
+
exports: {};
|
|
7
|
+
bindings: "";
|
|
8
|
+
slots: {};
|
|
9
|
+
events: {};
|
|
10
|
+
};
|
|
1
11
|
declare class __sveltets_Render<SlideData extends {
|
|
2
12
|
id: string;
|
|
3
13
|
}> {
|
|
4
|
-
props():
|
|
5
|
-
events():
|
|
6
|
-
slots():
|
|
14
|
+
props(): ReturnType<typeof $$render<SlideData>>['props'];
|
|
15
|
+
events(): ReturnType<typeof $$render<SlideData>>['events'];
|
|
16
|
+
slots(): ReturnType<typeof $$render<SlideData>>['slots'];
|
|
7
17
|
bindings(): "";
|
|
8
18
|
exports(): {};
|
|
9
19
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {ssrAttributes as __AgnosUISveltePreprocess__ssrAttributes} from '@agnos-ui/svelte-headless/utils/directive';
|
|
3
|
+
import {BROWSER as __AgnosUISveltePreprocess__BROWSER} from 'esm-env';
|
|
4
|
+
|
|
5
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
6
|
+
import {callWidgetFactory} from '../../config';
|
|
7
|
+
import type {DrawerApi, DrawerContext, DrawerProps} from './drawer.gen';
|
|
8
|
+
import {createDrawer} from './drawer.gen';
|
|
9
|
+
import DrawerDefaultStructure from './DrawerDefaultStructure.svelte';
|
|
10
|
+
|
|
11
|
+
let {width = $bindable(), height = $bindable(), visible = $bindable(), ...props}: Partial<DrawerProps> = $props();
|
|
12
|
+
|
|
13
|
+
const widget = callWidgetFactory(createDrawer, {
|
|
14
|
+
get props() {
|
|
15
|
+
return {...props, width, height, visible};
|
|
16
|
+
},
|
|
17
|
+
defaultConfig: {structure},
|
|
18
|
+
events: {
|
|
19
|
+
onWidthChange: (value: number) => {
|
|
20
|
+
width = value;
|
|
21
|
+
},
|
|
22
|
+
onHeightChange: (value: number) => {
|
|
23
|
+
height = value;
|
|
24
|
+
},
|
|
25
|
+
onVisibleChange: (event) => {
|
|
26
|
+
visible = event;
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
const {
|
|
31
|
+
directives: {backdropDirective, backdropPortalDirective, drawerDirective, drawerPortalDirective, containerDirective},
|
|
32
|
+
state,
|
|
33
|
+
} = widget;
|
|
34
|
+
|
|
35
|
+
export const api: DrawerApi = widget.api;
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
{#snippet structure(props: DrawerContext)}
|
|
39
|
+
<DrawerDefaultStructure {...props} />
|
|
40
|
+
{/snippet}
|
|
41
|
+
|
|
42
|
+
{#if !state.hidden}
|
|
43
|
+
<div use:drawerPortalDirective use:drawerDirective {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(drawerPortalDirective, drawerDirective)}>
|
|
44
|
+
<div use:containerDirective {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(containerDirective)}>
|
|
45
|
+
<Slot content={state.structure} props={widget} />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
{/if}
|
|
49
|
+
{#if !state.backdropHidden}
|
|
50
|
+
<div use:backdropPortalDirective use:backdropDirective {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(backdropPortalDirective, backdropDirective)}></div>
|
|
51
|
+
{/if}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {ssrAttributes as __AgnosUISveltePreprocess__ssrAttributes} from '@agnos-ui/svelte-headless/utils/directive';
|
|
3
|
+
import {BROWSER as __AgnosUISveltePreprocess__BROWSER} from 'esm-env';
|
|
4
|
+
|
|
5
|
+
import {Slot} from '@agnos-ui/svelte-headless/slot';
|
|
6
|
+
import type {DrawerContext} from './drawer.gen';
|
|
7
|
+
|
|
8
|
+
let widget: DrawerContext = $props();
|
|
9
|
+
let {state, directives} = widget;
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<div class="au-drawer-header">
|
|
13
|
+
<Slot content={state.header} props={widget} />
|
|
14
|
+
</div>
|
|
15
|
+
<div class="au-drawer-body">
|
|
16
|
+
<Slot content={state.children} props={widget} />
|
|
17
|
+
</div>
|
|
18
|
+
{#if state.resizable}
|
|
19
|
+
<div use:directives.splitterDirective {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(directives.splitterDirective)}></div>
|
|
20
|
+
{/if}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const DrawerDefaultStructure: import("svelte").Component<WidgetSlotContext<Widget<import("./drawer.gen").DrawerProps, import("./drawer.gen").DrawerState, import("./drawer.gen").DrawerApi, import("./drawer.gen").DrawerDirectives>>, {}, "">;
|
|
2
|
+
type DrawerDefaultStructure = ReturnType<typeof DrawerDefaultStructure>;
|
|
3
|
+
export default DrawerDefaultStructure;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Directive, Widget, WidgetFactory } from '@agnos-ui/svelte-headless/types';
|
|
2
|
+
import type { TransitionFn } from '@agnos-ui/svelte-headless/services/transitions/baseTransitions';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieve a shallow copy of the default Drawer config
|
|
5
|
+
* @returns the default Drawer config
|
|
6
|
+
*/
|
|
7
|
+
declare const export_getDrawerDefaultConfig: () => DrawerProps;
|
|
8
|
+
export { export_getDrawerDefaultConfig as getDrawerDefaultConfig };
|
|
9
|
+
/**
|
|
10
|
+
* Represents the context for a Drawer widget.
|
|
11
|
+
* This interface is an alias for `WidgetSlotContext<DrawerWidget>`.
|
|
12
|
+
*/
|
|
13
|
+
export type DrawerContext = WidgetSlotContext<DrawerWidget>;
|
|
14
|
+
/**
|
|
15
|
+
* Represents the state of a Drawer component.
|
|
16
|
+
*/
|
|
17
|
+
export interface DrawerState {
|
|
18
|
+
/**
|
|
19
|
+
* Whether the backdrop is fully hidden. This can be true either because {@link DrawerProps.backdrop|backdrop} is false or
|
|
20
|
+
* because {@link DrawerProps.visible|visible} is false and there is no current transition.
|
|
21
|
+
*/
|
|
22
|
+
backdropHidden: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Flag to show whether the drawer is fully hidden.
|
|
25
|
+
*/
|
|
26
|
+
hidden: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Which element should contain the drawer and backdrop DOM elements.
|
|
29
|
+
* If it is not null, the drawer and backdrop DOM elements are moved to the specified container.
|
|
30
|
+
* Otherwise, they stay where the widget is located.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue
|
|
33
|
+
* ```ts
|
|
34
|
+
* typeof window !== 'undefined' ? document.body : null
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
container: HTMLElement | null;
|
|
38
|
+
/**
|
|
39
|
+
* Classes to add on the backdrop DOM element.
|
|
40
|
+
*
|
|
41
|
+
* @defaultValue `''`
|
|
42
|
+
*/
|
|
43
|
+
backdropClass: string;
|
|
44
|
+
/**
|
|
45
|
+
* If `true`, the drawer is shown; otherwise, it is hidden.
|
|
46
|
+
*
|
|
47
|
+
* @defaultValue `false`
|
|
48
|
+
*/
|
|
49
|
+
visible: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the drawer can be resized by the user.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue `false`
|
|
54
|
+
*/
|
|
55
|
+
resizable: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* CSS classes to be applied on the widget main container
|
|
58
|
+
*
|
|
59
|
+
* @defaultValue `''`
|
|
60
|
+
*/
|
|
61
|
+
className: string;
|
|
62
|
+
/**
|
|
63
|
+
* Global template for the drawer component
|
|
64
|
+
*/
|
|
65
|
+
structure: SlotContent<DrawerContext>;
|
|
66
|
+
/**
|
|
67
|
+
* Template for the drawer header
|
|
68
|
+
*/
|
|
69
|
+
header: SlotContent<DrawerContext>;
|
|
70
|
+
/**
|
|
71
|
+
* Template for the drawer body
|
|
72
|
+
*/
|
|
73
|
+
children: SlotContent<DrawerContext>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Represents the properties for the Drawer component.
|
|
77
|
+
*/
|
|
78
|
+
export interface DrawerProps {
|
|
79
|
+
/**
|
|
80
|
+
* The transition function will be executed when the drawer is displayed or hidden.
|
|
81
|
+
*
|
|
82
|
+
* @defaultValue
|
|
83
|
+
* ```ts
|
|
84
|
+
* () => {}
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
transition: TransitionFn;
|
|
88
|
+
/**
|
|
89
|
+
* The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.
|
|
90
|
+
*
|
|
91
|
+
* @defaultValue
|
|
92
|
+
* ```ts
|
|
93
|
+
* () => {}
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
verticalTransition: TransitionFn;
|
|
97
|
+
/**
|
|
98
|
+
* The transition to use for the backdrop behind the drawer (if present).
|
|
99
|
+
*
|
|
100
|
+
* @defaultValue
|
|
101
|
+
* ```ts
|
|
102
|
+
* () => {}
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
backdropTransition: TransitionFn;
|
|
106
|
+
/**
|
|
107
|
+
* If `true` opening and closing will be animated.
|
|
108
|
+
*/
|
|
109
|
+
animated: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* aria-labelledby attribute to use for the drawer element.
|
|
112
|
+
*/
|
|
113
|
+
ariaLabelledBy: string;
|
|
114
|
+
/**
|
|
115
|
+
* aria-describedby attribute to use for the drawer element.
|
|
116
|
+
*/
|
|
117
|
+
ariaDescribedBy: string;
|
|
118
|
+
/**
|
|
119
|
+
* The width of the drawer in pixels.
|
|
120
|
+
*/
|
|
121
|
+
width: number;
|
|
122
|
+
/**
|
|
123
|
+
* The height of the drawer in pixels.
|
|
124
|
+
*/
|
|
125
|
+
height: number;
|
|
126
|
+
/**
|
|
127
|
+
* If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
|
|
128
|
+
*/
|
|
129
|
+
backdrop: boolean;
|
|
130
|
+
/**
|
|
131
|
+
* If `true` allows body scrolling when the drawer is open.
|
|
132
|
+
*/
|
|
133
|
+
bodyScroll: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* Event to be triggered when the transition is completed and the drawer is not visible.
|
|
136
|
+
*
|
|
137
|
+
* @defaultValue
|
|
138
|
+
* ```ts
|
|
139
|
+
* () => {}
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
onHidden: () => void;
|
|
143
|
+
/**
|
|
144
|
+
* Event to be triggered when the transition is completed and the drawer is visible.
|
|
145
|
+
*
|
|
146
|
+
* @defaultValue
|
|
147
|
+
* ```ts
|
|
148
|
+
* () => {}
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
onShown: () => void;
|
|
152
|
+
/**
|
|
153
|
+
* An event emitted when the width is changed.
|
|
154
|
+
*
|
|
155
|
+
* Event payload is equal to the newly selected width.
|
|
156
|
+
*
|
|
157
|
+
* @defaultValue
|
|
158
|
+
* ```ts
|
|
159
|
+
* () => {}
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
onWidthChange: (width: number) => void;
|
|
163
|
+
/**
|
|
164
|
+
* An event emitted when the height is changed.
|
|
165
|
+
*
|
|
166
|
+
* Event payload is equal to the newly selected height.
|
|
167
|
+
*
|
|
168
|
+
* @defaultValue
|
|
169
|
+
* ```ts
|
|
170
|
+
* () => {}
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
onHeightChange: (width: number) => void;
|
|
174
|
+
/**
|
|
175
|
+
* Event to be triggered when the visible property changes.
|
|
176
|
+
*
|
|
177
|
+
* @param visible - new value of the visible propery
|
|
178
|
+
*
|
|
179
|
+
* @defaultValue
|
|
180
|
+
* ```ts
|
|
181
|
+
* () => {}
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
onVisibleChange: (visible: boolean) => void;
|
|
185
|
+
/**
|
|
186
|
+
* Which element should contain the drawer and backdrop DOM elements.
|
|
187
|
+
* If it is not null, the drawer and backdrop DOM elements are moved to the specified container.
|
|
188
|
+
* Otherwise, they stay where the widget is located.
|
|
189
|
+
*
|
|
190
|
+
* @defaultValue
|
|
191
|
+
* ```ts
|
|
192
|
+
* typeof window !== 'undefined' ? document.body : null
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
container: HTMLElement | null;
|
|
196
|
+
/**
|
|
197
|
+
* Classes to add on the backdrop DOM element.
|
|
198
|
+
*
|
|
199
|
+
* @defaultValue `''`
|
|
200
|
+
*/
|
|
201
|
+
backdropClass: string;
|
|
202
|
+
/**
|
|
203
|
+
* If `true`, the drawer is shown; otherwise, it is hidden.
|
|
204
|
+
*
|
|
205
|
+
* @defaultValue `false`
|
|
206
|
+
*/
|
|
207
|
+
visible: boolean;
|
|
208
|
+
/**
|
|
209
|
+
* If `true`, the drawer can be resized by the user.
|
|
210
|
+
*
|
|
211
|
+
* @defaultValue `false`
|
|
212
|
+
*/
|
|
213
|
+
resizable: boolean;
|
|
214
|
+
/**
|
|
215
|
+
* CSS classes to be applied on the widget main container
|
|
216
|
+
*
|
|
217
|
+
* @defaultValue `''`
|
|
218
|
+
*/
|
|
219
|
+
className: string;
|
|
220
|
+
/**
|
|
221
|
+
* Global template for the drawer component
|
|
222
|
+
*/
|
|
223
|
+
structure: SlotContent<DrawerContext>;
|
|
224
|
+
/**
|
|
225
|
+
* Template for the drawer header
|
|
226
|
+
*/
|
|
227
|
+
header: SlotContent<DrawerContext>;
|
|
228
|
+
/**
|
|
229
|
+
* Template for the drawer body
|
|
230
|
+
*/
|
|
231
|
+
children: SlotContent<DrawerContext>;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Represents the directives for the Drawer component.
|
|
235
|
+
*/
|
|
236
|
+
export interface DrawerDirectives {
|
|
237
|
+
/**
|
|
238
|
+
* Directive to put on the drawer DOM element.
|
|
239
|
+
*/
|
|
240
|
+
drawerDirective: Directive;
|
|
241
|
+
/**
|
|
242
|
+
* Directive to put on the backdrop DOM element.
|
|
243
|
+
*/
|
|
244
|
+
backdropDirective: Directive;
|
|
245
|
+
/**
|
|
246
|
+
* Directive to put on the splitter DOM element.
|
|
247
|
+
*/
|
|
248
|
+
splitterDirective: Directive;
|
|
249
|
+
/**
|
|
250
|
+
* Directive to put on the container DOM element in order for the drawer to size correctly.
|
|
251
|
+
*/
|
|
252
|
+
containerDirective: Directive;
|
|
253
|
+
/**
|
|
254
|
+
* Portal directive to put on the drawer DOM element.
|
|
255
|
+
*/
|
|
256
|
+
drawerPortalDirective: Directive;
|
|
257
|
+
/**
|
|
258
|
+
* Portal directive to put on the backdrop DOM element.
|
|
259
|
+
*/
|
|
260
|
+
backdropPortalDirective: Directive;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Represents a Drawer widget component.
|
|
264
|
+
*/
|
|
265
|
+
export type DrawerWidget = Widget<DrawerProps, DrawerState, DrawerApi, DrawerDirectives>;
|
|
266
|
+
/**
|
|
267
|
+
* Create a Drawer with given config props
|
|
268
|
+
* @param config - an optional Drawer config
|
|
269
|
+
* @returns a DrawerWidget
|
|
270
|
+
*/
|
|
271
|
+
declare const export_createDrawer: WidgetFactory<DrawerWidget>;
|
|
272
|
+
export { export_createDrawer as createDrawer };
|
|
273
|
+
/**
|
|
274
|
+
* Possible values for the drawer positions
|
|
275
|
+
*/
|
|
276
|
+
export type DrawerPositions = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
|
|
277
|
+
/**
|
|
278
|
+
* Interface representing the API for a Drawer component.
|
|
279
|
+
*/
|
|
280
|
+
export interface DrawerApi {
|
|
281
|
+
/**
|
|
282
|
+
* Trigger the opening of the drawer.
|
|
283
|
+
*/
|
|
284
|
+
open: () => void;
|
|
285
|
+
/**
|
|
286
|
+
* Trigger the closing of the drawer.
|
|
287
|
+
*/
|
|
288
|
+
close: () => void;
|
|
289
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getDrawerDefaultConfig, createDrawer } from '@agnos-ui/core-bootstrap/components/drawer';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Drawer config
|
|
4
|
+
* @returns the default Drawer config
|
|
5
|
+
*/
|
|
6
|
+
const export_getDrawerDefaultConfig = getDrawerDefaultConfig;
|
|
7
|
+
export { export_getDrawerDefaultConfig as getDrawerDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* Create a Drawer with given config props
|
|
10
|
+
* @param config - an optional Drawer config
|
|
11
|
+
* @returns a DrawerWidget
|
|
12
|
+
*/
|
|
13
|
+
const export_createDrawer = createDrawer;
|
|
14
|
+
export { export_createDrawer as createDrawer };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import type { ModalProps, ModalApi } from './modal.gen';
|
|
2
|
+
declare function $$render<Data>(): {
|
|
3
|
+
props: Partial<ModalProps<Data>>;
|
|
4
|
+
exports: {
|
|
5
|
+
api: ModalApi<Data>;
|
|
6
|
+
};
|
|
7
|
+
bindings: "visible";
|
|
8
|
+
slots: {};
|
|
9
|
+
events: {};
|
|
10
|
+
};
|
|
2
11
|
declare class __sveltets_Render<Data> {
|
|
3
|
-
props():
|
|
4
|
-
events():
|
|
5
|
-
slots():
|
|
12
|
+
props(): ReturnType<typeof $$render<Data>>['props'];
|
|
13
|
+
events(): ReturnType<typeof $$render<Data>>['events'];
|
|
14
|
+
slots(): ReturnType<typeof $$render<Data>>['slots'];
|
|
6
15
|
bindings(): "visible";
|
|
7
16
|
exports(): {
|
|
8
17
|
api: ModalApi<Data>;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { ModalContext } from './modal.gen';
|
|
2
|
+
declare function $$render<Data>(): {
|
|
3
|
+
props: ModalContext<Data>;
|
|
4
|
+
exports: {};
|
|
5
|
+
bindings: "";
|
|
6
|
+
slots: {};
|
|
7
|
+
events: {};
|
|
8
|
+
};
|
|
2
9
|
declare class __sveltets_Render<Data> {
|
|
3
|
-
props():
|
|
4
|
-
events():
|
|
5
|
-
slots():
|
|
10
|
+
props(): ReturnType<typeof $$render<Data>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<Data>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<Data>>['slots'];
|
|
6
13
|
bindings(): "";
|
|
7
14
|
exports(): {};
|
|
8
15
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { ModalContext } from './modal.gen';
|
|
2
|
+
declare function $$render<Data>(): {
|
|
3
|
+
props: ModalContext<Data>;
|
|
4
|
+
exports: {};
|
|
5
|
+
bindings: "";
|
|
6
|
+
slots: {};
|
|
7
|
+
events: {};
|
|
8
|
+
};
|
|
2
9
|
declare class __sveltets_Render<Data> {
|
|
3
|
-
props():
|
|
4
|
-
events():
|
|
5
|
-
slots():
|
|
10
|
+
props(): ReturnType<typeof $$render<Data>>['props'];
|
|
11
|
+
events(): ReturnType<typeof $$render<Data>>['events'];
|
|
12
|
+
slots(): ReturnType<typeof $$render<Data>>['slots'];
|
|
6
13
|
bindings(): "";
|
|
7
14
|
exports(): {};
|
|
8
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { modalOutsideClick, modalCloseButtonClick } from '@agnos-ui/core-bootstrap/components/modal';
|
|
1
|
+
import { modalOutsideClick, modalCloseButtonClick, modalCloseEscape } from '@agnos-ui/core-bootstrap/components/modal';
|
|
2
2
|
import type { WidgetSlotContext, SlotContent, Widget, PropsConfig, Directive } from '@agnos-ui/svelte-headless/types';
|
|
3
3
|
import type { TransitionFn } from '@agnos-ui/svelte-headless/services/transitions/baseTransitions';
|
|
4
4
|
/**
|
|
@@ -309,6 +309,12 @@ export { export_modalOutsideClick as modalOutsideClick };
|
|
|
309
309
|
*/
|
|
310
310
|
declare const export_modalCloseButtonClick: typeof modalCloseButtonClick;
|
|
311
311
|
export { export_modalCloseButtonClick as modalCloseButtonClick };
|
|
312
|
+
/**
|
|
313
|
+
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
314
|
+
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by pressing the Escape key.
|
|
315
|
+
*/
|
|
316
|
+
declare const export_modalCloseEscape: typeof modalCloseEscape;
|
|
317
|
+
export { export_modalCloseEscape as modalCloseEscape };
|
|
312
318
|
/**
|
|
313
319
|
* Type of the parameter of {@link ModalProps.onBeforeClose|onBeforeClose}.
|
|
314
320
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick } from '@agnos-ui/core-bootstrap/components/modal';
|
|
1
|
+
import { getModalDefaultConfig, createModal, modalOutsideClick, modalCloseButtonClick, modalCloseEscape } from '@agnos-ui/core-bootstrap/components/modal';
|
|
2
2
|
/**
|
|
3
3
|
* Retrieve a shallow copy of the default modal config
|
|
4
4
|
* @returns the default modal config
|
|
@@ -24,3 +24,9 @@ export { export_modalOutsideClick as modalOutsideClick };
|
|
|
24
24
|
*/
|
|
25
25
|
const export_modalCloseButtonClick = modalCloseButtonClick;
|
|
26
26
|
export { export_modalCloseButtonClick as modalCloseButtonClick };
|
|
27
|
+
/**
|
|
28
|
+
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
29
|
+
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by pressing the Escape key.
|
|
30
|
+
*/
|
|
31
|
+
const export_modalCloseEscape = modalCloseEscape;
|
|
32
|
+
export { export_modalCloseEscape as modalCloseEscape };
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import type { SelectApi, SelectProps } from './select.gen';
|
|
2
|
+
declare function $$render<Item>(): {
|
|
3
|
+
props: Partial<SelectProps<Item>>;
|
|
4
|
+
exports: {
|
|
5
|
+
api: SelectApi<Item>;
|
|
6
|
+
};
|
|
7
|
+
bindings: "open" | "selected" | "filterText";
|
|
8
|
+
slots: {};
|
|
9
|
+
events: {};
|
|
10
|
+
};
|
|
2
11
|
declare class __sveltets_Render<Item> {
|
|
3
|
-
props():
|
|
4
|
-
events():
|
|
5
|
-
slots():
|
|
12
|
+
props(): ReturnType<typeof $$render<Item>>['props'];
|
|
13
|
+
events(): ReturnType<typeof $$render<Item>>['events'];
|
|
14
|
+
slots(): ReturnType<typeof $$render<Item>>['slots'];
|
|
6
15
|
bindings(): "open" | "selected" | "filterText";
|
|
7
16
|
exports(): {
|
|
8
17
|
api: SelectApi<Item>;
|
package/config.gen.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AccordionProps } from './components/accordion';
|
|
|
2
2
|
import type { AlertProps } from './components/alert';
|
|
3
3
|
import type { CarouselProps } from './components/carousel';
|
|
4
4
|
import type { CollapseProps } from './components/collapse';
|
|
5
|
+
import type { DrawerProps } from './components/drawer';
|
|
5
6
|
import type { ModalProps } from './components/modal';
|
|
6
7
|
import type { PaginationProps } from './components/pagination';
|
|
7
8
|
import type { ProgressbarProps } from './components/progressbar';
|
|
@@ -27,6 +28,10 @@ export type WidgetsConfig = {
|
|
|
27
28
|
* the collapse widget config
|
|
28
29
|
*/
|
|
29
30
|
collapse: CollapseProps;
|
|
31
|
+
/**
|
|
32
|
+
* the drawer widget config
|
|
33
|
+
*/
|
|
34
|
+
drawer: DrawerProps;
|
|
30
35
|
/**
|
|
31
36
|
* the modal widget config
|
|
32
37
|
*/
|
package/generated/index.d.ts
CHANGED
|
@@ -3,11 +3,6 @@ export * from './slot';
|
|
|
3
3
|
export * from './index';
|
|
4
4
|
export * from './config';
|
|
5
5
|
export * from './utils/widget.svelte';
|
|
6
|
-
export * from './utils/writables';
|
|
7
|
-
export * from './utils/widget';
|
|
8
|
-
export * from './utils/stores';
|
|
9
|
-
export * from './utils/func';
|
|
10
|
-
export * from './utils/directive';
|
|
11
6
|
export * from './services/siblingsInert';
|
|
12
7
|
export * from './services/resizeObserver';
|
|
13
8
|
export * from './services/portal';
|
|
@@ -16,8 +11,14 @@ export * from './services/matchMedia';
|
|
|
16
11
|
export * from './services/intersection';
|
|
17
12
|
export * from './services/hash';
|
|
18
13
|
export * from './services/focustrack';
|
|
14
|
+
export * from './services/focusElement';
|
|
19
15
|
export * from './services/floatingUI';
|
|
20
16
|
export * from './services/extendWidget';
|
|
17
|
+
export * from './utils/writables';
|
|
18
|
+
export * from './utils/widget';
|
|
19
|
+
export * from './utils/stores';
|
|
20
|
+
export * from './utils/func';
|
|
21
|
+
export * from './utils/directive';
|
|
21
22
|
export * from './services/transitions/simpleClassTransition';
|
|
22
23
|
export * from './services/transitions/cssTransitions';
|
|
23
24
|
export * from './services/transitions/collapse';
|
package/generated/index.js
CHANGED
|
@@ -3,11 +3,6 @@ export * from './slot';
|
|
|
3
3
|
export * from './index';
|
|
4
4
|
export * from './config';
|
|
5
5
|
export * from './utils/widget.svelte';
|
|
6
|
-
export * from './utils/writables';
|
|
7
|
-
export * from './utils/widget';
|
|
8
|
-
export * from './utils/stores';
|
|
9
|
-
export * from './utils/func';
|
|
10
|
-
export * from './utils/directive';
|
|
11
6
|
export * from './services/siblingsInert';
|
|
12
7
|
export * from './services/resizeObserver';
|
|
13
8
|
export * from './services/portal';
|
|
@@ -16,8 +11,14 @@ export * from './services/matchMedia';
|
|
|
16
11
|
export * from './services/intersection';
|
|
17
12
|
export * from './services/hash';
|
|
18
13
|
export * from './services/focustrack';
|
|
14
|
+
export * from './services/focusElement';
|
|
19
15
|
export * from './services/floatingUI';
|
|
20
16
|
export * from './services/extendWidget';
|
|
17
|
+
export * from './utils/writables';
|
|
18
|
+
export * from './utils/widget';
|
|
19
|
+
export * from './utils/stores';
|
|
20
|
+
export * from './utils/func';
|
|
21
|
+
export * from './utils/directive';
|
|
21
22
|
export * from './services/transitions/simpleClassTransition';
|
|
22
23
|
export * from './services/transitions/cssTransitions';
|
|
23
24
|
export * from './services/transitions/collapse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/svelte-headless/services/focusElement';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@agnos-ui/svelte-headless/services/focusElement';
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/svelte-bootstrap",
|
|
3
3
|
"description": "Bootstrap-based component library for Svelte.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.0-next.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.
|
|
53
|
-
"@agnos-ui/svelte-headless": "0.
|
|
52
|
+
"@agnos-ui/core-bootstrap": "0.10.0-next.0",
|
|
53
|
+
"@agnos-ui/svelte-headless": "0.10.0-next.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@amadeus-it-group/tansu": "^2.0.0",
|