@agnos-ui/angular-bootstrap 0.3.1 → 0.4.0-next.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.
Files changed (65) hide show
  1. package/agnos-ui-angular.module.d.ts +1 -1
  2. package/components/accordion/accordion.component.d.ts +63 -97
  3. package/components/accordion/accordion.d.ts +5 -10
  4. package/components/accordion/accordion.gen.d.ts +342 -0
  5. package/components/alert/alert.component.d.ts +11 -5
  6. package/components/alert/alert.d.ts +4 -6
  7. package/components/alert/alert.gen.d.ts +118 -0
  8. package/components/modal/modal.component.d.ts +28 -12
  9. package/components/modal/modal.d.ts +5 -8
  10. package/components/modal/modal.gen.d.ts +238 -0
  11. package/components/pagination/pagination.component.d.ts +51 -9
  12. package/components/pagination/pagination.d.ts +4 -7
  13. package/components/pagination/pagination.gen.d.ts +394 -0
  14. package/components/progressbar/progressbar.component.d.ts +9 -3
  15. package/components/progressbar/progressbar.d.ts +4 -6
  16. package/components/progressbar/progressbar.gen.d.ts +126 -0
  17. package/components/rating/rating.component.d.ts +6 -3
  18. package/components/rating/rating.d.ts +4 -5
  19. package/components/rating/rating.gen.d.ts +179 -0
  20. package/components/select/select.component.d.ts +16 -8
  21. package/components/select/select.d.ts +4 -7
  22. package/components/select/select.gen.d.ts +291 -0
  23. package/components/slider/slider.component.d.ts +13 -4
  24. package/components/slider/slider.d.ts +4 -8
  25. package/components/slider/slider.gen.d.ts +293 -0
  26. package/components/toast/toast.component.d.ts +15 -6
  27. package/components/toast/toast.d.ts +4 -6
  28. package/components/toast/toast.gen.d.ts +145 -0
  29. package/config.d.ts +3 -5
  30. package/config.gen.d.ts +47 -0
  31. package/esm2022/agnos-ui-angular.module.mjs +5 -5
  32. package/esm2022/components/accordion/accordion.component.mjs +121 -155
  33. package/esm2022/components/accordion/accordion.gen.mjs +2 -0
  34. package/esm2022/components/accordion/accordion.mjs +4 -3
  35. package/esm2022/components/alert/alert.component.mjs +20 -20
  36. package/esm2022/components/alert/alert.gen.mjs +2 -0
  37. package/esm2022/components/alert/alert.mjs +3 -3
  38. package/esm2022/components/modal/modal.component.mjs +42 -42
  39. package/esm2022/components/modal/modal.gen.mjs +2 -0
  40. package/esm2022/components/modal/modal.mjs +4 -3
  41. package/esm2022/components/pagination/pagination.component.mjs +67 -67
  42. package/esm2022/components/pagination/pagination.gen.mjs +2 -0
  43. package/esm2022/components/pagination/pagination.mjs +3 -3
  44. package/esm2022/components/progressbar/progressbar.component.mjs +18 -18
  45. package/esm2022/components/progressbar/progressbar.gen.mjs +2 -0
  46. package/esm2022/components/progressbar/progressbar.mjs +3 -3
  47. package/esm2022/components/rating/rating.component.mjs +11 -12
  48. package/esm2022/components/rating/rating.gen.mjs +2 -0
  49. package/esm2022/components/rating/rating.mjs +3 -3
  50. package/esm2022/components/select/select.component.mjs +24 -24
  51. package/esm2022/components/select/select.gen.mjs +2 -0
  52. package/esm2022/components/select/select.mjs +3 -3
  53. package/esm2022/components/slider/slider.component.mjs +42 -42
  54. package/esm2022/components/slider/slider.gen.mjs +2 -0
  55. package/esm2022/components/slider/slider.mjs +3 -3
  56. package/esm2022/components/toast/toast.component.mjs +31 -31
  57. package/esm2022/components/toast/toast.gen.mjs +2 -0
  58. package/esm2022/components/toast/toast.mjs +3 -3
  59. package/esm2022/config.gen.mjs +2 -0
  60. package/esm2022/config.mjs +1 -1
  61. package/esm2022/index.mjs +1 -1
  62. package/fesm2022/agnos-ui-angular-bootstrap.mjs +391 -434
  63. package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
  64. package/index.d.ts +9 -9
  65. package/package.json +7 -7
@@ -11,6 +11,6 @@ import * as i9 from "./components/progressbar/progressbar.component";
11
11
  import * as i10 from "./components/toast/toast.component";
12
12
  export declare class AgnosUIAngularModule {
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<AgnosUIAngularModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemDirective, 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 i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemDirective, 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 i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective]>;
14
+ 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 i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective], [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 i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective]>;
15
15
  static ɵinj: i0.ɵɵInjectorDeclaration<AgnosUIAngularModule>;
16
16
  }
@@ -2,7 +2,7 @@ import type { SlotContent, TransitionFn } from '@agnos-ui/angular-headless';
2
2
  import { BaseWidgetDirective, ComponentTemplate } from '@agnos-ui/angular-headless';
3
3
  import type { AfterContentChecked, AfterViewInit } from '@angular/core';
4
4
  import { EventEmitter, TemplateRef } from '@angular/core';
5
- import type { AccordionItemContext, AccordionItemWidget, AccordionWidget } from './accordion';
5
+ import type { AccordionItemContext, AccordionItemProps, AccordionItemWidget, AccordionWidget } from './accordion';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class AccordionBodyDirective {
8
8
  templateRef: TemplateRef<any>;
@@ -29,86 +29,105 @@ export declare class AccordionItemDefaultSlotsComponent {
29
29
  }
30
30
  export declare const accordionItemDefaultSlotItemStructure: ComponentTemplate<unknown, "structure", AccordionItemDefaultSlotsComponent>;
31
31
  export declare class AccordionItemComponent extends BaseWidgetDirective<AccordionItemWidget> implements AfterContentChecked, AfterViewInit {
32
- slotItemHeader: SlotContent<AccordionItemContext>;
33
- slotItemHeaderFromContent: AccordionHeaderDirective | null;
34
- slotItemBody: SlotContent<AccordionItemContext>;
35
- slotItemBodyFromContent: AccordionBodyDirective | null;
36
- slotItemStructure: SlotContent<AccordionItemContext>;
37
- slotItemStructureFromContent: AccordionItemStructureDirective | null;
32
+ /**
33
+ * Content present in the accordion button inside the accordion header.
34
+ *
35
+ * It is a prop of the accordion-item.
36
+ */
37
+ header: SlotContent<AccordionItemContext>;
38
+ slotHeaderFromContent: AccordionHeaderDirective | undefined;
39
+ /**
40
+ * Content present in the accordion body.
41
+ *
42
+ * It is a prop of the accordion-item.
43
+ */
44
+ children: SlotContent<AccordionItemContext>;
45
+ slotBodyFromContent: AccordionBodyDirective | undefined;
46
+ /**
47
+ * Structure of the accordion-item. The default item structure is: accordion-item
48
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
49
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
50
+ * The itemTransition is applied on this element.
51
+ *
52
+ * It is a prop of the accordion-item.
53
+ */
54
+ structure: SlotContent<AccordionItemContext>;
55
+ slotStructureFromContent: AccordionItemStructureDirective | undefined;
38
56
  /**
39
57
  * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
40
58
  */
41
- itemId: string | undefined;
59
+ id: string | undefined;
42
60
  /**
43
61
  * The transition to use for the accordion-item body-container when the accordion-item is toggled.
44
62
  */
45
- itemTransition: TransitionFn | undefined;
63
+ transition: TransitionFn | undefined;
46
64
  /**
47
- * CSS classes to add on the accordion-item DOM element.
65
+ * CSS classes to be applied on the widget main container
48
66
  */
49
- itemClass: string | undefined;
67
+ className: string | undefined;
50
68
  /**
51
69
  * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
52
70
  */
53
- itemDestroyOnHide: boolean | undefined;
71
+ destroyOnHide: boolean | undefined;
54
72
  /**
55
73
  * If `true`, the accordion-item will be disabled.
56
74
  * It will not react to user's clicks, but still will be possible to toggle programmatically.
57
75
  */
58
- itemDisabled: boolean | undefined;
76
+ disabled: boolean | undefined;
59
77
  /**
60
78
  * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
61
79
  */
62
- itemVisible: boolean | undefined;
80
+ visible: boolean | undefined;
63
81
  /**
64
82
  * If `true`, accordion-item will be animated.
65
83
  */
66
- itemAnimated: boolean | undefined;
84
+ animated: boolean | undefined;
67
85
  /**
68
86
  * CSS classes to add on the accordion-item header DOM element.
69
87
  */
70
- itemHeaderClass: string | undefined;
88
+ headerClassName: string | undefined;
71
89
  /**
72
90
  * CSS classes to add on the accordion-item collapse DOM element.
73
91
  */
74
- itemButtonClass: string | undefined;
92
+ buttonClassName: string | undefined;
75
93
  /**
76
94
  * CSS classes to add on the accordion-item body container DOM element.
77
95
  * The accordion-item body container is the DOM element on what the itemTransition is applied.
78
96
  */
79
- itemBodyContainerClass: string | undefined;
97
+ bodyContainerClassName: string | undefined;
80
98
  /**
81
99
  * CSS classes to add on the accordion-item body DOM element.
82
100
  */
83
- itemBodyClass: string | undefined;
101
+ bodyClassName: string | undefined;
84
102
  /**
85
103
  * The html tag to use for the accordion-item-header.
86
104
  */
87
- itemHeadingTag: string | undefined;
105
+ headingTag: string | undefined;
88
106
  /**
89
107
  * An event fired when an item is shown.
90
108
  */
91
- itemShown: EventEmitter<void>;
109
+ shown: EventEmitter<void>;
92
110
  /**
93
111
  * An event fired when an item is hidden.
94
112
  */
95
- itemHidden: EventEmitter<void>;
113
+ hidden: EventEmitter<void>;
96
114
  /**
97
115
  * An event fired when the `visible` value changes.
98
116
  *
99
117
  * Event payload is the new value of visible.
100
118
  */
101
- itemVisibleChange: EventEmitter<boolean>;
119
+ visibleChange: EventEmitter<boolean>;
102
120
  readonly ad: AccordionDirective;
121
+ readonly defaultSlots: import("@amadeus-it-group/tansu").WritableSignal<Partial<AccordionItemProps>, Partial<AccordionItemProps>>;
103
122
  readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AccordionItemWidget>;
104
123
  ngAfterContentChecked(): void;
105
124
  ngAfterViewInit(): void;
106
125
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "[auAccordionItem]", ["auAccordionItem"], { "slotItemHeader": { "alias": "auSlotItemHeader"; "required": false; }; "slotItemBody": { "alias": "auSlotItemBody"; "required": false; }; "slotItemStructure": { "alias": "auSlotItemStructure"; "required": false; }; "itemId": { "alias": "auItemId"; "required": false; }; "itemTransition": { "alias": "auItemTransition"; "required": false; }; "itemClass": { "alias": "auItemClass"; "required": false; }; "itemDestroyOnHide": { "alias": "auItemDestroyOnHide"; "required": false; }; "itemDisabled": { "alias": "auItemDisabled"; "required": false; }; "itemVisible": { "alias": "auItemVisible"; "required": false; }; "itemAnimated": { "alias": "auItemAnimated"; "required": false; }; "itemHeaderClass": { "alias": "auItemHeaderClass"; "required": false; }; "itemButtonClass": { "alias": "auItemButtonClass"; "required": false; }; "itemBodyContainerClass": { "alias": "auItemBodyContainerClass"; "required": false; }; "itemBodyClass": { "alias": "auItemBodyClass"; "required": false; }; "itemHeadingTag": { "alias": "auItemHeadingTag"; "required": false; }; }, { "itemShown": "auItemShown"; "itemHidden": "auItemHidden"; "itemVisibleChange": "auItemVisibleChange"; }, ["slotItemHeaderFromContent", "slotItemBodyFromContent", "slotItemStructureFromContent"], never, true, never>;
108
- static ngAcceptInputType_itemDestroyOnHide: unknown;
109
- static ngAcceptInputType_itemDisabled: unknown;
110
- static ngAcceptInputType_itemVisible: unknown;
111
- static ngAcceptInputType_itemAnimated: unknown;
126
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "[auAccordionItem]", ["auAccordionItem"], { "header": { "alias": "auHeader"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "id": { "alias": "auId"; "required": false; }; "transition": { "alias": "auTransition"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "destroyOnHide": { "alias": "auDestroyOnHide"; "required": false; }; "disabled": { "alias": "auDisabled"; "required": false; }; "visible": { "alias": "auVisible"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "headerClassName": { "alias": "auHeaderClassName"; "required": false; }; "buttonClassName": { "alias": "auButtonClassName"; "required": false; }; "bodyContainerClassName": { "alias": "auBodyContainerClassName"; "required": false; }; "bodyClassName": { "alias": "auBodyClassName"; "required": false; }; "headingTag": { "alias": "auHeadingTag"; "required": false; }; }, { "shown": "auShown"; "hidden": "auHidden"; "visibleChange": "auVisibleChange"; }, ["slotHeaderFromContent", "slotBodyFromContent", "slotStructureFromContent"], ["*"], true, never>;
127
+ static ngAcceptInputType_destroyOnHide: unknown;
128
+ static ngAcceptInputType_disabled: unknown;
129
+ static ngAcceptInputType_visible: unknown;
130
+ static ngAcceptInputType_animated: unknown;
112
131
  }
113
132
  export declare class AccordionDirective extends BaseWidgetDirective<AccordionWidget> {
114
133
  /**
@@ -124,116 +143,63 @@ export declare class AccordionDirective extends BaseWidgetDirective<AccordionWid
124
143
  *
125
144
  * Event payload is the id of the item.
126
145
  */
127
- shown: EventEmitter<string>;
146
+ itemShown: EventEmitter<string>;
128
147
  /**
129
148
  * An event fired when an item is hidden.
130
149
  *
131
150
  * Event payload is the id of the item.
132
151
  */
133
- hidden: EventEmitter<string>;
134
- /**
135
- * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
136
- *
137
- * It is a prop of the accordion-item.
138
- */
139
- itemId: string | undefined;
152
+ itemHidden: EventEmitter<string>;
140
153
  /**
141
154
  * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
142
- *
143
- * It is a prop of the accordion-item.
144
155
  */
145
156
  itemDestroyOnHide: boolean | undefined;
146
- /**
147
- * If `true`, the accordion-item will be disabled.
148
- * It will not react to user's clicks, but still will be possible to toggle programmatically.
149
- *
150
- * It is a prop of the accordion-item.
151
- */
152
- itemDisabled: boolean | undefined;
153
- /**
154
- * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
155
- *
156
- * It is a prop of the accordion-item.
157
- */
158
- itemVisible: boolean | undefined;
159
157
  /**
160
158
  * If `true`, accordion-item will be animated.
161
- *
162
- * It is a prop of the accordion-item.
163
159
  */
164
160
  itemAnimated: boolean | undefined;
165
161
  /**
166
162
  * The transition to use for the accordion-item body-container when the accordion-item is toggled.
167
- *
168
- * It is a prop of the accordion-item.
169
163
  */
170
164
  itemTransition: TransitionFn | undefined;
171
- slotItemStructure: SlotContent<AccordionItemContext>;
172
- slotItemBody: SlotContent<AccordionItemContext>;
173
- slotItemHeader: SlotContent<AccordionItemContext>;
174
165
  /**
175
- * CSS classes to add on the accordion-item DOM element.
166
+ * Structure of the accordion-item. The default item structure is: accordion-item
167
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
168
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
169
+ * The itemTransition is applied on this element.
176
170
  *
177
171
  * It is a prop of the accordion-item.
178
172
  */
179
- itemClass: string | undefined;
173
+ itemStructure: SlotContent<AccordionItemContext>;
174
+ /**
175
+ * CSS classes to add on the accordion-item DOM element.
176
+ */
177
+ itemClassName: string | undefined;
180
178
  /**
181
179
  * CSS classes to add on the accordion-item header DOM element.
182
- *
183
- * It is a prop of the accordion-item.
184
180
  */
185
- itemHeaderClass: string | undefined;
181
+ itemHeaderClassName: string | undefined;
186
182
  /**
187
183
  * CSS classes to add on the accordion-item toggle button DOM element.
188
- *
189
- * It is a prop of the accordion-item.
190
184
  */
191
- itemButtonClass: string | undefined;
185
+ itemButtonClassName: string | undefined;
192
186
  /**
193
187
  * CSS classes to add on the accordion-item body container DOM element.
194
188
  * The accordion-item body container is the DOM element on what the itemTransition is applied.
195
- *
196
- * It is a prop of the accordion-item.
197
189
  */
198
- itemBodyContainerClass: string | undefined;
190
+ itemBodyContainerClassName: string | undefined;
199
191
  /**
200
192
  * CSS classes to add on the accordion-item body DOM element.
201
- *
202
- * It is a prop of the accordion-item.
203
193
  */
204
- itemBodyClass: string | undefined;
194
+ itemBodyClassName: string | undefined;
205
195
  /**
206
196
  * The html tag to use for the accordion-item-header.
207
- *
208
- * It is a prop of the accordion-item.
209
197
  */
210
198
  itemHeadingTag: string | undefined;
211
- /**
212
- * An event fired when an item is shown.
213
- *
214
- * It is a prop of the accordion-item.
215
- */
216
- itemShown: EventEmitter<void>;
217
- /**
218
- * An event fired when an item is hidden.
219
- *
220
- * It is a prop of the accordion-item.
221
- */
222
- itemHidden: EventEmitter<void>;
223
- /**
224
- * An event fired when the `visible` value changes.
225
- *
226
- * Event payload is the new value of visible.
227
- *
228
- * It is a prop of the accordion-item.
229
- */
230
- itemVisibleChange: EventEmitter<boolean>;
231
199
  readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AccordionWidget>;
232
200
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionDirective, never>;
233
- static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionDirective, "[auAccordion]", ["auAccordion"], { "closeOthers": { "alias": "auCloseOthers"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "itemId": { "alias": "auItemId"; "required": false; }; "itemDestroyOnHide": { "alias": "auItemDestroyOnHide"; "required": false; }; "itemDisabled": { "alias": "auItemDisabled"; "required": false; }; "itemVisible": { "alias": "auItemVisible"; "required": false; }; "itemAnimated": { "alias": "auItemAnimated"; "required": false; }; "itemTransition": { "alias": "auItemTransition"; "required": false; }; "slotItemStructure": { "alias": "auSlotItemStructure"; "required": false; }; "slotItemBody": { "alias": "auSlotItemBody"; "required": false; }; "slotItemHeader": { "alias": "auSlotItemHeader"; "required": false; }; "itemClass": { "alias": "auItemClass"; "required": false; }; "itemHeaderClass": { "alias": "auItemHeaderClass"; "required": false; }; "itemButtonClass": { "alias": "auItemButtonClass"; "required": false; }; "itemBodyContainerClass": { "alias": "auItemBodyContainerClass"; "required": false; }; "itemBodyClass": { "alias": "auItemBodyClass"; "required": false; }; "itemHeadingTag": { "alias": "auItemHeadingTag"; "required": false; }; }, { "shown": "auShown"; "hidden": "auHidden"; "itemShown": "auItemShown"; "itemHidden": "auItemHidden"; "itemVisibleChange": "auItemVisibleChange"; }, never, never, true, never>;
201
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionDirective, "[auAccordion]", ["auAccordion"], { "closeOthers": { "alias": "auCloseOthers"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "itemDestroyOnHide": { "alias": "auItemDestroyOnHide"; "required": false; }; "itemAnimated": { "alias": "auItemAnimated"; "required": false; }; "itemTransition": { "alias": "auItemTransition"; "required": false; }; "itemStructure": { "alias": "auItemStructure"; "required": false; }; "itemClassName": { "alias": "auItemClassName"; "required": false; }; "itemHeaderClassName": { "alias": "auItemHeaderClassName"; "required": false; }; "itemButtonClassName": { "alias": "auItemButtonClassName"; "required": false; }; "itemBodyContainerClassName": { "alias": "auItemBodyContainerClassName"; "required": false; }; "itemBodyClassName": { "alias": "auItemBodyClassName"; "required": false; }; "itemHeadingTag": { "alias": "auItemHeadingTag"; "required": false; }; }, { "itemShown": "auItemShown"; "itemHidden": "auItemHidden"; }, never, never, true, never>;
234
202
  static ngAcceptInputType_closeOthers: unknown;
235
203
  static ngAcceptInputType_itemDestroyOnHide: unknown;
236
- static ngAcceptInputType_itemDisabled: unknown;
237
- static ngAcceptInputType_itemVisible: unknown;
238
204
  static ngAcceptInputType_itemAnimated: unknown;
239
205
  }
@@ -1,11 +1,6 @@
1
- import type { AdaptWidgetSlots, WidgetProps, WidgetState, AdaptSlotContentProps, WidgetFactory } from '@agnos-ui/angular-headless';
2
- export * from '@agnos-ui/core-bootstrap/components/accordion';
3
- export type AccordionWidget = AdaptWidgetSlots<import('@agnos-ui/core-bootstrap/components/accordion').AccordionWidget>;
4
- export type AccordionProps = WidgetProps<AccordionWidget>;
5
- export type AccordionState = WidgetState<AccordionWidget>;
6
- export type AccordionApi = AccordionWidget['api'];
7
- export type AccordionItemWidget = AdaptWidgetSlots<import('@agnos-ui/core-bootstrap/components/accordion').AccordionItemWidget>;
8
- export type AccordionItemProps = WidgetProps<AccordionItemWidget>;
9
- export type AccordionItemState = WidgetState<AccordionItemWidget>;
10
- export type AccordionItemContext = AdaptSlotContentProps<import('@agnos-ui/core-bootstrap/components/accordion').AccordionItemContext>;
1
+ import type { WidgetFactory } from '@agnos-ui/angular-headless';
2
+ import type { AccordionItemWidget, AccordionProps, AccordionWidget } from './accordion.gen';
3
+ export type * from './accordion.gen';
11
4
  export declare const createAccordion: WidgetFactory<AccordionWidget>;
5
+ export declare const getAccordionDefaultConfig: () => AccordionProps;
6
+ export declare const createAccordionItem: WidgetFactory<AccordionItemWidget>;
@@ -0,0 +1,342 @@
1
+ import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, PropsConfig, Directive } from '@agnos-ui/angular-headless';
2
+ export type AccordionItemContext = WidgetSlotContext<AccordionItemWidget>;
3
+ export interface AccordionState {
4
+ /**
5
+ * Array containing all the accordion-items contained in the accordion.
6
+ */
7
+ itemWidgets: AccordionItemWidget[];
8
+ /**
9
+ * CSS classes to be applied on the widget main container
10
+ */
11
+ className: string;
12
+ /**
13
+ * Structure of the accordion-item. The default item structure is: accordion-item
14
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
15
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
16
+ * The itemTransition is applied on this element.
17
+ *
18
+ * It is a prop of the accordion-item.
19
+ */
20
+ itemStructure: SlotContent<AccordionItemContext>;
21
+ }
22
+ export interface AccordionProps {
23
+ /**
24
+ * If `true`, only one accordion-item at the time can stay open.
25
+ */
26
+ closeOthers: boolean;
27
+ /**
28
+ * An event fired when an item is shown.
29
+ *
30
+ * Event payload is the id of the item.
31
+ */
32
+ onItemShown: (itemId: string) => void;
33
+ /**
34
+ * An event fired when an item is hidden.
35
+ *
36
+ * Event payload is the id of the item.
37
+ */
38
+ onItemHidden: (itemId: string) => void;
39
+ /**
40
+ * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
41
+ */
42
+ itemDestroyOnHide: boolean;
43
+ /**
44
+ * If `true`, accordion-item will be animated.
45
+ */
46
+ itemAnimated: boolean;
47
+ /**
48
+ * The transition to use for the accordion-item body-container when the accordion-item is toggled.
49
+ */
50
+ itemTransition: TransitionFn;
51
+ /**
52
+ * CSS classes to add on the accordion-item DOM element.
53
+ */
54
+ itemClassName: string;
55
+ /**
56
+ * CSS classes to add on the accordion-item header DOM element.
57
+ */
58
+ itemHeaderClassName: string;
59
+ /**
60
+ * CSS classes to add on the accordion-item toggle button DOM element.
61
+ */
62
+ itemButtonClassName: string;
63
+ /**
64
+ * CSS classes to add on the accordion-item body container DOM element.
65
+ * The accordion-item body container is the DOM element on what the itemTransition is applied.
66
+ */
67
+ itemBodyContainerClassName: string;
68
+ /**
69
+ * CSS classes to add on the accordion-item body DOM element.
70
+ */
71
+ itemBodyClassName: string;
72
+ /**
73
+ * The html tag to use for the accordion-item-header.
74
+ */
75
+ itemHeadingTag: string;
76
+ /**
77
+ * CSS classes to be applied on the widget main container
78
+ */
79
+ className: string;
80
+ /**
81
+ * Structure of the accordion-item. The default item structure is: accordion-item
82
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
83
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
84
+ * The itemTransition is applied on this element.
85
+ *
86
+ * It is a prop of the accordion-item.
87
+ */
88
+ itemStructure: SlotContent<AccordionItemContext>;
89
+ }
90
+ export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, object, AccordionDirectives>;
91
+ export interface AccordionItemState {
92
+ /**
93
+ * If `true` the content of the accordion-item collapse should be in DOM. Its value depends on the
94
+ * value of the `visible` and `destroyOnHide`.
95
+ */
96
+ shouldBeInDOM: boolean;
97
+ /**
98
+ * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
99
+ */
100
+ visible: boolean;
101
+ /**
102
+ * If `true`, the accordion-item will be disabled.
103
+ * It will not react to user's clicks, but still will be possible to toggle programmatically.
104
+ */
105
+ disabled: boolean;
106
+ /**
107
+ * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
108
+ */
109
+ id: string;
110
+ /**
111
+ * CSS classes to add on the accordion-item header DOM element.
112
+ */
113
+ headerClassName: string;
114
+ /**
115
+ * CSS classes to add on the accordion-item collapse DOM element.
116
+ */
117
+ buttonClassName: string;
118
+ /**
119
+ * CSS classes to add on the accordion-item body container DOM element.
120
+ * The accordion-item body container is the DOM element on what the itemTransition is applied.
121
+ */
122
+ bodyContainerClassName: string;
123
+ /**
124
+ * CSS classes to add on the accordion-item body DOM element.
125
+ */
126
+ bodyClassName: string;
127
+ /**
128
+ * The html tag to use for the accordion-item-header.
129
+ */
130
+ headingTag: string;
131
+ /**
132
+ * CSS classes to be applied on the widget main container
133
+ */
134
+ className: string;
135
+ /**
136
+ * Structure of the accordion-item. The default item structure is: accordion-item
137
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
138
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
139
+ * The itemTransition is applied on this element.
140
+ *
141
+ * It is a prop of the accordion-item.
142
+ */
143
+ structure: SlotContent<AccordionItemContext>;
144
+ /**
145
+ * Content present in the accordion body.
146
+ *
147
+ * It is a prop of the accordion-item.
148
+ */
149
+ children: SlotContent<AccordionItemContext>;
150
+ /**
151
+ * Content present in the accordion button inside the accordion header.
152
+ *
153
+ * It is a prop of the accordion-item.
154
+ */
155
+ header: SlotContent<AccordionItemContext>;
156
+ }
157
+ export interface AccordionItemProps {
158
+ /**
159
+ * If `true`, accordion-item will be animated.
160
+ */
161
+ animated: boolean;
162
+ /**
163
+ * The transition to use for the accordion-item body-container when the accordion-item is toggled.
164
+ */
165
+ transition: TransitionFn;
166
+ /**
167
+ * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
168
+ */
169
+ destroyOnHide: boolean;
170
+ /**
171
+ * An event fired when an item is shown.
172
+ */
173
+ onShown: () => void;
174
+ /**
175
+ * An event fired when an item is hidden.
176
+ */
177
+ onHidden: () => void;
178
+ /**
179
+ * An event fired when the `visible` value changes.
180
+ *
181
+ * Event payload is the new value of visible.
182
+ */
183
+ onVisibleChange: (visible: boolean) => void;
184
+ /**
185
+ * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
186
+ */
187
+ visible: boolean;
188
+ /**
189
+ * If `true`, the accordion-item will be disabled.
190
+ * It will not react to user's clicks, but still will be possible to toggle programmatically.
191
+ */
192
+ disabled: boolean;
193
+ /**
194
+ * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
195
+ */
196
+ id: string;
197
+ /**
198
+ * CSS classes to add on the accordion-item header DOM element.
199
+ */
200
+ headerClassName: string;
201
+ /**
202
+ * CSS classes to add on the accordion-item collapse DOM element.
203
+ */
204
+ buttonClassName: string;
205
+ /**
206
+ * CSS classes to add on the accordion-item body container DOM element.
207
+ * The accordion-item body container is the DOM element on what the itemTransition is applied.
208
+ */
209
+ bodyContainerClassName: string;
210
+ /**
211
+ * CSS classes to add on the accordion-item body DOM element.
212
+ */
213
+ bodyClassName: string;
214
+ /**
215
+ * The html tag to use for the accordion-item-header.
216
+ */
217
+ headingTag: string;
218
+ /**
219
+ * CSS classes to be applied on the widget main container
220
+ */
221
+ className: string;
222
+ /**
223
+ * Structure of the accordion-item. The default item structure is: accordion-item
224
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
225
+ * (that contains `header`), while the accordion-item body container contains the accordion body (that contains `children`).
226
+ * The itemTransition is applied on this element.
227
+ *
228
+ * It is a prop of the accordion-item.
229
+ */
230
+ structure: SlotContent<AccordionItemContext>;
231
+ /**
232
+ * Content present in the accordion body.
233
+ *
234
+ * It is a prop of the accordion-item.
235
+ */
236
+ children: SlotContent<AccordionItemContext>;
237
+ /**
238
+ * Content present in the accordion button inside the accordion header.
239
+ *
240
+ * It is a prop of the accordion-item.
241
+ */
242
+ header: SlotContent<AccordionItemContext>;
243
+ }
244
+ export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemActions, AccordionItemDirectives>;
245
+ export interface AccordionApi {
246
+ /**
247
+ * Given the itemId, will expand the corresponding accordion-item.
248
+ *
249
+ * If the itemId is not valid, nothing will happen.
250
+ */
251
+ expand(itemId: string): void;
252
+ /**
253
+ * Given the itemId, will collapse the corresponding accordion-item.
254
+ *
255
+ * If the itemId is not valid, nothing will happen.
256
+ */
257
+ collapse(itemId: string): void;
258
+ /**
259
+ * Given the itemId, will toggle the corresponding accordion-item.
260
+ *
261
+ * If the itemId is not valid, nothing will happen.
262
+ */
263
+ toggle(itemId: string): void;
264
+ /**
265
+ * It will expand all the items in the accordion.
266
+ *
267
+ * If `closeOthers` is `true` it will expand only the last accordion-item.
268
+ */
269
+ expandAll(): void;
270
+ /**
271
+ * It will collapse all the accordion-items in the accordion.
272
+ */
273
+ collapseAll(): void;
274
+ /**
275
+ * Creates a new accordionItem.
276
+ */
277
+ registerItem(itemConfig?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
278
+ }
279
+ export interface AccordionDirectives {
280
+ /**
281
+ * Directive to put on the accordion DOM element
282
+ */
283
+ accordionDirective: Directive;
284
+ }
285
+ export interface AccordionItemActions {
286
+ /**
287
+ * Action to be called when the user clicks on the accordion-item button. If the accordion-item is disabled nothing will happen.
288
+ */
289
+ click(): void;
290
+ }
291
+ export interface AccordionItemApi {
292
+ /**
293
+ * It will collapse the accordion-item.
294
+ */
295
+ collapse(): void;
296
+ /**
297
+ * It will expand the accordion-item.
298
+ */
299
+ expand(): void;
300
+ /**
301
+ * It will toggle the accordion-item.
302
+ */
303
+ toggle(): void;
304
+ /**
305
+ * Method to be called after the initialization to allow animations.
306
+ */
307
+ initDone(): void;
308
+ }
309
+ export interface AccordionItemDirectives {
310
+ /**
311
+ * Directive to use in special cases, if the accordion header does not use a button element to control the collapsing.
312
+ */
313
+ toggleDirective: Directive;
314
+ /**
315
+ * Directive to put on the button element that will control the collapsing of the accordion-item.
316
+ */
317
+ buttonDirective: Directive;
318
+ /**
319
+ * Directive to put on the accordion-item header that will contain the button element.
320
+ */
321
+ headerDirective: Directive;
322
+ /**
323
+ * Directive to put on the accordion-item body.
324
+ */
325
+ bodyDirective: Directive;
326
+ /**
327
+ * Directive to apply the itemTransition
328
+ */
329
+ transitionDirective: Directive;
330
+ /**
331
+ * Directive to apply aria attributes to the expanded body panel
332
+ */
333
+ bodyContainerAttrsDirective: Directive;
334
+ /**
335
+ * Directive to be put on the accordion-item body container. It will handle the animation.
336
+ */
337
+ bodyContainerDirective: Directive;
338
+ /**
339
+ * Directive to be put on the accordion-item. It will handle adding the accordion-item to the accordion.
340
+ */
341
+ itemDirective: Directive;
342
+ }