@agnos-ui/angular-bootstrap 0.8.0-next.1 → 0.8.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.
@@ -9,10 +9,12 @@ import * as i7 from "./components/accordion/accordion.component";
9
9
  import * as i8 from "./components/slider/slider.component";
10
10
  import * as i9 from "./components/progressbar/progressbar.component";
11
11
  import * as i10 from "./components/toast/toast.component";
12
- import * as i11 from "./components/collapse/collapse.component";
13
- import * as i12 from "./components/tree/tree.component";
12
+ import * as i11 from "./components/toast/toaster.component";
13
+ import * as i12 from "./components/collapse/collapse.component";
14
+ import * as i13 from "./components/tree/tree.component";
15
+ import * as i14 from "./components/carousel/carousel.component";
14
16
  export declare class AgnosUIAngularModule {
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<AgnosUIAngularModule, never>;
16
- static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective, typeof i11.CollapseTriggerDirective, typeof i12.TreeComponent, typeof i12.TreeStructureDirective, typeof i12.TreeItemToggleDirective, typeof i12.TreeItemContentDirective, typeof i12.TreeItemDirective]>;
18
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.ToasterComponent, typeof i12.CollapseDirective, typeof i12.CollapseTriggerDirective, typeof i13.TreeComponent, typeof i13.TreeStructureDirective, typeof i13.TreeItemToggleDirective, typeof i13.TreeItemContentDirective, typeof i13.TreeItemDirective, typeof i14.CarouselComponent, typeof i14.CarouselSlideDirective, typeof i14.CarouselStructureDirective, typeof i14.CarouselNavigationDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i8.SliderTickDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.ToasterComponent, typeof i12.CollapseDirective, typeof i12.CollapseTriggerDirective, typeof i13.TreeComponent, typeof i13.TreeStructureDirective, typeof i13.TreeItemToggleDirective, typeof i13.TreeItemContentDirective, typeof i13.TreeItemDirective, typeof i14.CarouselComponent, typeof i14.CarouselSlideDirective, typeof i14.CarouselStructureDirective, typeof i14.CarouselNavigationDirective]>;
17
19
  static ɵinj: i0.ɵɵInjectorDeclaration<AgnosUIAngularModule>;
18
20
  }
@@ -0,0 +1,207 @@
1
+ import { BaseWidgetDirective, type SlotContent } from '@agnos-ui/angular-headless';
2
+ import type { CarouselContext, CarouselSlideContext, CarouselWidget } from './carousel.gen';
3
+ import type { InputSignal } from '@angular/core';
4
+ import { TemplateRef } from '@angular/core';
5
+ import type { EmblaPluginType } from 'embla-carousel';
6
+ import * as i0 from "@angular/core";
7
+ /**
8
+ * Directive that provides a template reference for the carousel structure using the {@link CarouselContext}.
9
+ */
10
+ export declare class CarouselStructureDirective<SlideData extends {
11
+ id: string;
12
+ }> {
13
+ templateRef: TemplateRef<any>;
14
+ static ngTemplateContextGuard<SlideData extends {
15
+ id: string;
16
+ }>(_dir: CarouselStructureDirective<SlideData>, context: unknown): context is CarouselContext<SlideData>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<CarouselStructureDirective<any>, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CarouselStructureDirective<any>, "ng-template[auCarouselStructure]", never, {}, {}, never, never, true, never>;
19
+ }
20
+ /**
21
+ * Directive that provides a template reference for the carousel navigation using the {@link CarouselContext}.
22
+ */
23
+ export declare class CarouselNavigationDirective<SlideData extends {
24
+ id: string;
25
+ }> {
26
+ templateRef: TemplateRef<any>;
27
+ static ngTemplateContextGuard<SlideData extends {
28
+ id: string;
29
+ }>(_dir: CarouselNavigationDirective<SlideData>, context: unknown): context is CarouselContext<SlideData>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<CarouselNavigationDirective<any>, never>;
31
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CarouselNavigationDirective<any>, "ng-template[auCarouselNavigation]", never, {}, {}, never, never, true, never>;
32
+ }
33
+ /**
34
+ * Directive that provides a template reference for the carousel slide using the {@link CarouselSlideContext}.
35
+ */
36
+ export declare class CarouselSlideDirective<SlideData extends {
37
+ id: string;
38
+ }> {
39
+ templateRef: TemplateRef<any>;
40
+ static ngTemplateContextGuard<SlideData extends {
41
+ id: string;
42
+ }>(_dir: CarouselSlideDirective<SlideData>, context: unknown): context is CarouselSlideContext<SlideData>;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<CarouselSlideDirective<any>, never>;
44
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CarouselSlideDirective<any>, "ng-template[auCarouselSlide]", never, {}, {}, never, never, true, never>;
45
+ }
46
+ /**
47
+ * The default slot for the structure
48
+ */
49
+ export declare const carouselDefaultSlotStructure: SlotContent<CarouselContext<any>>;
50
+ /**
51
+ * The default slot for the navigation
52
+ */
53
+ export declare const carouselDefaultSlotNavigation: SlotContent<CarouselContext<any>>;
54
+ /**
55
+ * CarouselComponent is an Angular Component that extends {@link BaseWidgetDirective}<{@link CarouselWidget}>
56
+ * to create a customizable carousel widget. It provides various inputs (see {@link CarouselProps})
57
+ * to configure the appearance and behavior of the carousel.
58
+ */
59
+ export declare class CarouselComponent<SlideData extends {
60
+ id: string;
61
+ }> extends BaseWidgetDirective<CarouselWidget<SlideData>> {
62
+ /**
63
+ * Aria label for navigation indicators
64
+ */
65
+ readonly ariaIndicatorLabel: InputSignal<((index: number) => string) | undefined>;
66
+ /**
67
+ * Aria label for previous button
68
+ */
69
+ readonly ariaPrevLabel: InputSignal<string | undefined>;
70
+ /**
71
+ * Aria label for next button
72
+ */
73
+ readonly ariaNextLabel: InputSignal<string | undefined>;
74
+ /**
75
+ * Choose content direction between `ltr` and `rtl`
76
+ *
77
+ * @see {@link https://www.embla-carousel.com/api/options/#direction}
78
+ * @defaultValue `'ltr'`
79
+ */
80
+ readonly direction: InputSignal<"ltr" | "rtl" | undefined>;
81
+ /**
82
+ * Enables momentum scrolling
83
+ *
84
+ * @see {@link https://www.embla-carousel.com/api/options/#dragFree}
85
+ * @defaultValue `false`
86
+ */
87
+ readonly dragFree: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
88
+ /**
89
+ * Drag threshold in pixels
90
+ *
91
+ * @see {@link https://www.embla-carousel.com/api/options/#dragThreshold}
92
+ * @defaultValue `10`
93
+ */
94
+ readonly dragThreshold: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
95
+ /**
96
+ * Set scroll duration when triggered by any of the API methods
97
+ *
98
+ * @see {@link https://www.embla-carousel.com/api/options/#duration}
99
+ * @defaultValue `25`
100
+ */
101
+ readonly duration: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
102
+ /**
103
+ * Enables infinite looping
104
+ *
105
+ * @see {@link https://www.embla-carousel.com/api/options/#loop}
106
+ * @defaultValue `false`
107
+ */
108
+ readonly loop: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
109
+ /**
110
+ * Allow the carousel to skip scroll snaps if it's dragged vigorously
111
+ *
112
+ * @see {@link https://www.embla-carousel.com/api/options/#skipsnaps}
113
+ * @defaultValue `false`
114
+ */
115
+ readonly skipSnaps: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
116
+ /**
117
+ * If `true`, 'previous' and 'next' navigation arrows will be visible.
118
+ */
119
+ readonly showNavigationArrows: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
120
+ /**
121
+ * If `true`, navigation indicators at the bottom of the slide will be visible.
122
+ */
123
+ readonly showNavigationIndicators: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
124
+ /**
125
+ * Plugins to extend the carousel with additional features
126
+ * @defaultValue `[]`
127
+ */
128
+ readonly plugins: InputSignal<EmblaPluginType[] | undefined>;
129
+ /**
130
+ * Align the slides relative to the carousel viewport
131
+ *
132
+ * @see {@link https://www.embla-carousel.com/api/options/#align}
133
+ * @defaultValue `'center'`
134
+ */
135
+ readonly align: InputSignal<"start" | "center" | "end" | undefined>;
136
+ /**
137
+ * Enables choosing a custom container element which holds the slides. By default, Embla will choose the first direct child element of the root element. Provide a valid CSS selector string.
138
+ *
139
+ * @see {@link https://www.embla-carousel.com/api/options/#container}
140
+ */
141
+ readonly container: InputSignal<string | null | undefined>;
142
+ /**
143
+ * Clear leading and trailing empty space that causes excessive scrolling
144
+ *
145
+ * @see {@link https://www.embla-carousel.com/api/options/#containScroll}
146
+ * @defaultValue `'trimSnaps'`
147
+ */
148
+ readonly containScroll: InputSignal<false | "trimSnaps" | "keepSnaps" | undefined>;
149
+ /**
150
+ * CSS classes to be applied on the widget main container
151
+ *
152
+ * @defaultValue `''`
153
+ */
154
+ readonly className: InputSignal<string | undefined>;
155
+ /**
156
+ * Class name to apply to the container of the carousel.
157
+ *
158
+ * @defaultValue `''`
159
+ */
160
+ readonly containerClass: InputSignal<string | undefined>;
161
+ /**
162
+ * Class name to apply to each slide in the carousel.
163
+ *
164
+ * @defaultValue `''`
165
+ */
166
+ readonly slideClass: InputSignal<string | ((slideContext: {
167
+ id: string;
168
+ index: number;
169
+ active: boolean;
170
+ }) => string) | undefined>;
171
+ /**
172
+ * The aria-live attribute value for the carousel container.
173
+ *
174
+ * @defaultValue `'polite'`
175
+ */
176
+ readonly ariaLive: InputSignal<string | undefined>;
177
+ /**
178
+ * The data for each slide in the carousel.
179
+ *
180
+ * @defaultValue `[]`
181
+ */
182
+ readonly slidesData: InputSignal<SlideData[] | undefined>;
183
+ /**
184
+ * The structure of the carousel.
185
+ *
186
+ * @defaultValue `undefined`
187
+ */
188
+ readonly structure: InputSignal<SlotContent<CarouselContext<SlideData>>>;
189
+ /**
190
+ * The navigation layer of the carousel.
191
+ *
192
+ * @defaultValue `undefined`
193
+ */
194
+ readonly navigation: InputSignal<SlotContent<CarouselContext<SlideData>>>;
195
+ /**
196
+ * The content of each slide in the carousel.
197
+ *
198
+ * @defaultValue `undefined`
199
+ */
200
+ readonly slide: InputSignal<SlotContent<CarouselSlideContext<SlideData>>>;
201
+ readonly slotSlideFromContent: import("@angular/core").Signal<CarouselSlideDirective<any> | undefined>;
202
+ readonly slotStructureFromContent: import("@angular/core").Signal<CarouselStructureDirective<any> | undefined>;
203
+ readonly slotNavigationFromContent: import("@angular/core").Signal<CarouselNavigationDirective<any> | undefined>;
204
+ constructor();
205
+ static ɵfac: i0.ɵɵFactoryDeclaration<CarouselComponent<any>, never>;
206
+ static ɵcmp: i0.ɵɵComponentDeclaration<CarouselComponent<any>, "[auCarousel]", never, { "ariaIndicatorLabel": { "alias": "auAriaIndicatorLabel"; "required": false; "isSignal": true; }; "ariaPrevLabel": { "alias": "auAriaPrevLabel"; "required": false; "isSignal": true; }; "ariaNextLabel": { "alias": "auAriaNextLabel"; "required": false; "isSignal": true; }; "direction": { "alias": "auDirection"; "required": false; "isSignal": true; }; "dragFree": { "alias": "auDragFree"; "required": false; "isSignal": true; }; "dragThreshold": { "alias": "auDragThreshold"; "required": false; "isSignal": true; }; "duration": { "alias": "auDuration"; "required": false; "isSignal": true; }; "loop": { "alias": "auLoop"; "required": false; "isSignal": true; }; "skipSnaps": { "alias": "auSkipSnaps"; "required": false; "isSignal": true; }; "showNavigationArrows": { "alias": "auShowNavigationArrows"; "required": false; "isSignal": true; }; "showNavigationIndicators": { "alias": "auShowNavigationIndicators"; "required": false; "isSignal": true; }; "plugins": { "alias": "auPlugins"; "required": false; "isSignal": true; }; "align": { "alias": "auAlign"; "required": false; "isSignal": true; }; "container": { "alias": "auContainer"; "required": false; "isSignal": true; }; "containScroll": { "alias": "auContainScroll"; "required": false; "isSignal": true; }; "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "containerClass": { "alias": "auContainerClass"; "required": false; "isSignal": true; }; "slideClass": { "alias": "auSlideClass"; "required": false; "isSignal": true; }; "ariaLive": { "alias": "auAriaLive"; "required": false; "isSignal": true; }; "slidesData": { "alias": "auSlidesData"; "required": false; "isSignal": true; }; "structure": { "alias": "auStructure"; "required": false; "isSignal": true; }; "navigation": { "alias": "auNavigation"; "required": false; "isSignal": true; }; "slide": { "alias": "auSlide"; "required": false; "isSignal": true; }; }, {}, ["slotSlideFromContent", "slotStructureFromContent", "slotNavigationFromContent"], never, true, never>;
207
+ }
@@ -0,0 +1,358 @@
1
+ import type { PropsConfig, WidgetSlotContext, SlotContent, Directive, Widget } from '@agnos-ui/angular-headless';
2
+ import type { EmblaPluginType, EmblaPluginsType, EmblaCarouselType } from 'embla-carousel';
3
+ /**
4
+ * Retrieve a shallow copy of the default Carousel config
5
+ * @returns the default Carousel config
6
+ */
7
+ declare const export_getCarouselDefaultConfig: () => CarouselProps<any>;
8
+ export { export_getCarouselDefaultConfig as getCarouselDefaultConfig };
9
+ /**
10
+ * Create a Carousel with given config props
11
+ *
12
+ * @template SlideData - The type of the data for each slide.
13
+ * @param config - an optional carousel config
14
+ * @returns a CarouselWidget
15
+ */
16
+ declare const export_createCarousel: <SlideData extends {
17
+ id: string;
18
+ }>(config?: PropsConfig<CarouselProps<SlideData>>) => CarouselWidget<SlideData>;
19
+ export { export_createCarousel as createCarousel };
20
+ /**
21
+ * Represents the context for a carousel.
22
+ *
23
+ * @template SlideData - The type of data used by each slide in the carousel.
24
+ */
25
+ export type CarouselContext<SlideData extends {
26
+ id: string;
27
+ }> = WidgetSlotContext<CarouselWidget<SlideData>>;
28
+ /**
29
+ * Represents the context for a carousel slide.
30
+ *
31
+ * @template SlideData - The type of data used by each slide in the carousel.
32
+ */
33
+ export type CarouselSlideContext<SlideData extends {
34
+ id: string;
35
+ }> = WidgetSlotContext<CarouselWidget<SlideData>> & SlideData;
36
+ /**
37
+ * Represents the state of a carousel component.
38
+ *
39
+ * @template SlideData - The type of data used by each slide in the carousel.
40
+ */
41
+ export interface CarouselState<SlideData extends {
42
+ id: string;
43
+ }> {
44
+ /**
45
+ * is the carousel currently scrolling
46
+ */
47
+ scrolling: boolean;
48
+ /**
49
+ * can carousel scroll to previous slide
50
+ */
51
+ canScrollPrev: boolean;
52
+ /**
53
+ * can carousel scroll to next slide
54
+ */
55
+ canScrollNext: boolean;
56
+ /**
57
+ * selected scroll snap
58
+ */
59
+ selectedScrollSnap: number;
60
+ /**
61
+ * is the carousel initialized
62
+ */
63
+ initialized: boolean;
64
+ /**
65
+ * If `true`, 'previous' and 'next' navigation arrows will be visible.
66
+ */
67
+ showNavigationArrows: boolean;
68
+ /**
69
+ * If `true`, navigation indicators at the bottom of the slide will be visible.
70
+ */
71
+ showNavigationIndicators: boolean;
72
+ /**
73
+ * Choose content direction between `ltr` and `rtl`
74
+ *
75
+ * @see {@link https://www.embla-carousel.com/api/options/#direction}
76
+ * @defaultValue `'ltr'`
77
+ */
78
+ direction: 'ltr' | 'rtl';
79
+ /**
80
+ * CSS classes to be applied on the widget main container
81
+ *
82
+ * @defaultValue `''`
83
+ */
84
+ className: string;
85
+ /**
86
+ * Class name to apply to the container of the carousel.
87
+ *
88
+ * @defaultValue `''`
89
+ */
90
+ containerClass: string;
91
+ /**
92
+ * Class name to apply to each slide in the carousel.
93
+ *
94
+ * @defaultValue `''`
95
+ */
96
+ slideClass: string | ((slideContext: {
97
+ id: string;
98
+ index: number;
99
+ active: boolean;
100
+ }) => string);
101
+ /**
102
+ * The data for each slide in the carousel.
103
+ *
104
+ * @defaultValue `[]`
105
+ */
106
+ slidesData: SlideData[];
107
+ /**
108
+ * The structure of the carousel.
109
+ *
110
+ * @defaultValue `undefined`
111
+ */
112
+ structure: SlotContent<CarouselContext<SlideData>>;
113
+ /**
114
+ * The navigation layer of the carousel.
115
+ *
116
+ * @defaultValue `undefined`
117
+ */
118
+ navigation: SlotContent<CarouselContext<SlideData>>;
119
+ /**
120
+ * The content of each slide in the carousel.
121
+ *
122
+ * @defaultValue `undefined`
123
+ */
124
+ slide: SlotContent<CarouselSlideContext<SlideData>>;
125
+ /**
126
+ * The aria-live attribute value for the carousel container.
127
+ *
128
+ * @defaultValue `'polite'`
129
+ */
130
+ ariaLive: string;
131
+ }
132
+ /**
133
+ * Interface representing the properties for a carousel component.
134
+ *
135
+ * @template SlideData - The type of data used by each slide in the carousel.
136
+ */
137
+ export interface CarouselProps<SlideData extends {
138
+ id: string;
139
+ }> {
140
+ /**
141
+ * Plugins to extend the carousel with additional features
142
+ * @defaultValue `[]`
143
+ */
144
+ plugins: EmblaPluginType[];
145
+ /**
146
+ * Aria label for navigation indicators
147
+ */
148
+ ariaIndicatorLabel: (index: number) => string;
149
+ /**
150
+ * Aria label for previous button
151
+ */
152
+ ariaPrevLabel: string;
153
+ /**
154
+ * Aria label for next button
155
+ */
156
+ ariaNextLabel: string;
157
+ /**
158
+ * Align the slides relative to the carousel viewport
159
+ *
160
+ * @see {@link https://www.embla-carousel.com/api/options/#align}
161
+ * @defaultValue `'center'`
162
+ */
163
+ align: 'start' | 'center' | 'end';
164
+ /**
165
+ * Enables choosing a custom container element which holds the slides. By default, Embla will choose the first direct child element of the root element. Provide a valid CSS selector string.
166
+ *
167
+ * @see {@link https://www.embla-carousel.com/api/options/#container}
168
+ */
169
+ container: string | null;
170
+ /**
171
+ * Clear leading and trailing empty space that causes excessive scrolling
172
+ *
173
+ * @see {@link https://www.embla-carousel.com/api/options/#containScroll}
174
+ * @defaultValue `'trimSnaps'`
175
+ */
176
+ containScroll: false | 'trimSnaps' | 'keepSnaps';
177
+ /**
178
+ * Choose content direction between `ltr` and `rtl`
179
+ *
180
+ * @see {@link https://www.embla-carousel.com/api/options/#direction}
181
+ * @defaultValue `'ltr'`
182
+ */
183
+ direction: 'ltr' | 'rtl';
184
+ /**
185
+ * Enables momentum scrolling
186
+ *
187
+ * @see {@link https://www.embla-carousel.com/api/options/#dragFree}
188
+ * @defaultValue `false`
189
+ */
190
+ dragFree: boolean;
191
+ /**
192
+ * Drag threshold in pixels
193
+ *
194
+ * @see {@link https://www.embla-carousel.com/api/options/#dragThreshold}
195
+ * @defaultValue `10`
196
+ */
197
+ dragThreshold: number;
198
+ /**
199
+ * Set scroll duration when triggered by any of the API methods
200
+ *
201
+ * @see {@link https://www.embla-carousel.com/api/options/#duration}
202
+ * @defaultValue `25`
203
+ */
204
+ duration: number;
205
+ /**
206
+ * Enables infinite looping
207
+ *
208
+ * @see {@link https://www.embla-carousel.com/api/options/#loop}
209
+ * @defaultValue `false`
210
+ */
211
+ loop: boolean;
212
+ /**
213
+ * Allow the carousel to skip scroll snaps if it's dragged vigorously
214
+ *
215
+ * @see {@link https://www.embla-carousel.com/api/options/#skipsnaps}
216
+ * @defaultValue `false`
217
+ */
218
+ skipSnaps: boolean;
219
+ /**
220
+ * If `true`, 'previous' and 'next' navigation arrows will be visible.
221
+ */
222
+ showNavigationArrows: boolean;
223
+ /**
224
+ * If `true`, navigation indicators at the bottom of the slide will be visible.
225
+ */
226
+ showNavigationIndicators: boolean;
227
+ /**
228
+ * CSS classes to be applied on the widget main container
229
+ *
230
+ * @defaultValue `''`
231
+ */
232
+ className: string;
233
+ /**
234
+ * Class name to apply to the container of the carousel.
235
+ *
236
+ * @defaultValue `''`
237
+ */
238
+ containerClass: string;
239
+ /**
240
+ * Class name to apply to each slide in the carousel.
241
+ *
242
+ * @defaultValue `''`
243
+ */
244
+ slideClass: string | ((slideContext: {
245
+ id: string;
246
+ index: number;
247
+ active: boolean;
248
+ }) => string);
249
+ /**
250
+ * The data for each slide in the carousel.
251
+ *
252
+ * @defaultValue `[]`
253
+ */
254
+ slidesData: SlideData[];
255
+ /**
256
+ * The structure of the carousel.
257
+ *
258
+ * @defaultValue `undefined`
259
+ */
260
+ structure: SlotContent<CarouselContext<SlideData>>;
261
+ /**
262
+ * The navigation layer of the carousel.
263
+ *
264
+ * @defaultValue `undefined`
265
+ */
266
+ navigation: SlotContent<CarouselContext<SlideData>>;
267
+ /**
268
+ * The content of each slide in the carousel.
269
+ *
270
+ * @defaultValue `undefined`
271
+ */
272
+ slide: SlotContent<CarouselSlideContext<SlideData>>;
273
+ /**
274
+ * The aria-live attribute value for the carousel container.
275
+ *
276
+ * @defaultValue `'polite'`
277
+ */
278
+ ariaLive: string;
279
+ }
280
+ /**
281
+ * Represents the directives for a carousel component.
282
+ */
283
+ export interface CarouselDirectives {
284
+ /**
285
+ * A directive to be applied to each slide in the carousel.
286
+ */
287
+ slide: Directive<{
288
+ id: string;
289
+ index: number;
290
+ }>;
291
+ /**
292
+ * A directive to be applied to container of the carousel.
293
+ */
294
+ container: Directive;
295
+ /**
296
+ * the root directive
297
+ */
298
+ root: Directive;
299
+ /**
300
+ * A directive to be applied to a navigation button allowing to scroll to the previous slide.
301
+ */
302
+ scrollPrev: Directive;
303
+ /**
304
+ * A directive to be applied to a navigation button allowing to scroll to the next slide.
305
+ */
306
+ scrollNext: Directive;
307
+ /**
308
+ * A directive to be applied to a tab list allowing to navigate to the corresponding slide.
309
+ * This directive adds the role `tablist` and is recommended to be used together with {@link tabIndicator}.
310
+ */
311
+ tabList: Directive;
312
+ /**
313
+ * A directive to be applied to a navigation indicator allowing to scroll to the corresponding slide.
314
+ * As this directive adds the role `tab` to the element, it is recommended to use it on a button or a link and the parent element should have the {@link tabList} directive attached.
315
+ */
316
+ tabIndicator: Directive<{
317
+ index: number;
318
+ id: string;
319
+ jump?: boolean;
320
+ }>;
321
+ }
322
+ /**
323
+ * Represents a carousel widget with specific properties, state, API, and directives.
324
+ *
325
+ * @template SlideData - The type of the data for each slide.
326
+ */
327
+ export type CarouselWidget<SlideData extends {
328
+ id: string;
329
+ }> = Widget<CarouselProps<SlideData>, CarouselState<SlideData>, CarouselApi, CarouselDirectives>;
330
+ /**
331
+ * Represents the API for a carousel component.
332
+ */
333
+ export interface CarouselApi {
334
+ /**
335
+ * Scroll to the previous snap point if possible.
336
+ * @param jump - scroll instantly
337
+ */
338
+ scrollPrev: (jump?: boolean) => void;
339
+ /**
340
+ * Scroll to the next snap point if possible.
341
+ * @param jump - scroll instantly
342
+ */
343
+ scrollNext: (jump?: boolean) => void;
344
+ /**
345
+ * Scroll to a snap point by index
346
+ * @param index - the snap point index
347
+ * @param jump - scroll instantly
348
+ */
349
+ scrollTo: (index: number, jump?: boolean) => void;
350
+ /**
351
+ * Retrieve the enabled plugins
352
+ */
353
+ plugins: () => EmblaPluginsType | undefined;
354
+ /**
355
+ * Retrieve the inner EmblaApi object
356
+ */
357
+ emblaApi: () => EmblaCarouselType | undefined;
358
+ }
@@ -0,0 +1,2 @@
1
+ export * from './carousel.gen';
2
+ export * from './carousel.component';
@@ -1,2 +1,4 @@
1
1
  export * from './toast.component';
2
2
  export * from './toast.gen';
3
+ export * from './toaster.component';
4
+ export * from './toaster.service';