@design-factory/angular 21.0.4 → 21.1.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/drawer/README.md +54 -0
- package/fesm2022/design-factory-angular-drawer.mjs +202 -67
- package/fesm2022/design-factory-angular-drawer.mjs.map +1 -1
- package/fesm2022/design-factory-angular-internals.mjs +439 -17
- package/fesm2022/design-factory-angular-internals.mjs.map +1 -1
- package/fesm2022/design-factory-angular-sidenav.mjs +223 -210
- package/fesm2022/design-factory-angular-sidenav.mjs.map +1 -1
- package/fesm2022/design-factory-angular-theme.mjs +198 -0
- package/fesm2022/design-factory-angular-theme.mjs.map +1 -0
- package/fesm2022/design-factory-angular-topnav.mjs +1538 -0
- package/fesm2022/design-factory-angular-topnav.mjs.map +1 -0
- package/node_modules/@agnos-ui/core/README.md +5 -0
- package/node_modules/@agnos-ui/core/accordion-BC_9xn23.cjs +314 -0
- package/node_modules/@agnos-ui/core/accordion-Ca_0T8Bc.js +315 -0
- package/node_modules/@agnos-ui/core/alert-AhaliJ17.cjs +9 -0
- package/node_modules/@agnos-ui/core/alert-Cb9FhbFQ.js +10 -0
- package/node_modules/@agnos-ui/core/collapse-COriZO7o.cjs +94 -0
- package/node_modules/@agnos-ui/core/collapse-CP79atna.js +95 -0
- package/node_modules/@agnos-ui/core/common-B5jS-Ih_.cjs +73 -0
- package/node_modules/@agnos-ui/core/common-DFyZvkII.js +74 -0
- package/node_modules/@agnos-ui/core/components/accordion/accordion.d.ts +333 -0
- package/node_modules/@agnos-ui/core/components/accordion/index.cjs +7 -0
- package/node_modules/@agnos-ui/core/components/accordion/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/accordion/index.js +7 -0
- package/node_modules/@agnos-ui/core/components/alert/alert.d.ts +37 -0
- package/node_modules/@agnos-ui/core/components/alert/common.d.ts +138 -0
- package/node_modules/@agnos-ui/core/components/alert/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/alert/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/alert/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/carousel/carousel.d.ts +247 -0
- package/node_modules/@agnos-ui/core/components/carousel/index.cjs +292 -0
- package/node_modules/@agnos-ui/core/components/carousel/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/carousel/index.js +292 -0
- package/node_modules/@agnos-ui/core/components/collapse/collapse.d.ts +135 -0
- package/node_modules/@agnos-ui/core/components/collapse/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/collapse/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/collapse/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/commonProps.d.ts +11 -0
- package/node_modules/@agnos-ui/core/components/drawer/drawer.d.ts +279 -0
- package/node_modules/@agnos-ui/core/components/drawer/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/drawer/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/drawer/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/modal/index.cjs +8 -0
- package/node_modules/@agnos-ui/core/components/modal/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/modal/index.js +8 -0
- package/node_modules/@agnos-ui/core/components/modal/modal.d.ts +245 -0
- package/node_modules/@agnos-ui/core/components/pagination/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/pagination/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/pagination/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/pagination/pagination.d.ts +313 -0
- package/node_modules/@agnos-ui/core/components/progressbar/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/progressbar/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/progressbar/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/progressbar/progressbar.d.ts +91 -0
- package/node_modules/@agnos-ui/core/components/rating/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/rating/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/rating/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/rating/rating.d.ts +191 -0
- package/node_modules/@agnos-ui/core/components/slider/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/slider/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/slider/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/slider/slider-utils.d.ts +25 -0
- package/node_modules/@agnos-ui/core/components/slider/slider.d.ts +383 -0
- package/node_modules/@agnos-ui/core/components/toast/index.cjs +7 -0
- package/node_modules/@agnos-ui/core/components/toast/index.d.ts +2 -0
- package/node_modules/@agnos-ui/core/components/toast/index.js +7 -0
- package/node_modules/@agnos-ui/core/components/toast/toast.d.ts +66 -0
- package/node_modules/@agnos-ui/core/components/toast/toaster.d.ts +128 -0
- package/node_modules/@agnos-ui/core/components/tree/index.cjs +5 -0
- package/node_modules/@agnos-ui/core/components/tree/index.d.ts +1 -0
- package/node_modules/@agnos-ui/core/components/tree/index.js +5 -0
- package/node_modules/@agnos-ui/core/components/tree/tree.d.ts +143 -0
- package/node_modules/@agnos-ui/core/config.cjs +36 -0
- package/node_modules/@agnos-ui/core/config.d.ts +117 -0
- package/node_modules/@agnos-ui/core/config.js +36 -0
- package/node_modules/@agnos-ui/core/directive-Bsreu2z1.js +523 -0
- package/node_modules/@agnos-ui/core/directive-DCaXmRe_.cjs +522 -0
- package/node_modules/@agnos-ui/core/drawer-BbFAHV07.cjs +328 -0
- package/node_modules/@agnos-ui/core/drawer-C6Qa0xEu.js +329 -0
- package/node_modules/@agnos-ui/core/index.cjs +134 -0
- package/node_modules/@agnos-ui/core/index.d.ts +29 -0
- package/node_modules/@agnos-ui/core/index.js +134 -0
- package/node_modules/@agnos-ui/core/isFocusable-Ckwus82R.js +32 -0
- package/node_modules/@agnos-ui/core/isFocusable-DfzDLeAN.cjs +31 -0
- package/node_modules/@agnos-ui/core/modal-BsNuHhT7.cjs +252 -0
- package/node_modules/@agnos-ui/core/modal-CgzY8ezz.js +253 -0
- package/node_modules/@agnos-ui/core/package.json +57 -0
- package/node_modules/@agnos-ui/core/pagination-ZxGaNWZz.js +255 -0
- package/node_modules/@agnos-ui/core/pagination-xbcOHnhd.cjs +254 -0
- package/node_modules/@agnos-ui/core/progressbar-CRbMKp4b.cjs +86 -0
- package/node_modules/@agnos-ui/core/progressbar-CSEIFnlD.js +87 -0
- package/node_modules/@agnos-ui/core/promise-CxCD3NYv.cjs +118 -0
- package/node_modules/@agnos-ui/core/promise-D-RZVPuv.js +119 -0
- package/node_modules/@agnos-ui/core/rating-BIdiiPUo.js +184 -0
- package/node_modules/@agnos-ui/core/rating-qx1xaBmz.cjs +183 -0
- package/node_modules/@agnos-ui/core/scrollbars-CT87iv_6.cjs +30 -0
- package/node_modules/@agnos-ui/core/scrollbars-CcxSrnCx.js +31 -0
- package/node_modules/@agnos-ui/core/services/extendWidget.cjs +41 -0
- package/node_modules/@agnos-ui/core/services/extendWidget.d.ts +31 -0
- package/node_modules/@agnos-ui/core/services/extendWidget.js +41 -0
- package/node_modules/@agnos-ui/core/services/floatingUI.cjs +111 -0
- package/node_modules/@agnos-ui/core/services/floatingUI.d.ts +76 -0
- package/node_modules/@agnos-ui/core/services/floatingUI.js +111 -0
- package/node_modules/@agnos-ui/core/services/focusElement.cjs +46 -0
- package/node_modules/@agnos-ui/core/services/focusElement.d.ts +9 -0
- package/node_modules/@agnos-ui/core/services/focusElement.js +46 -0
- package/node_modules/@agnos-ui/core/services/focustrack.cjs +47 -0
- package/node_modules/@agnos-ui/core/services/focustrack.d.ts +40 -0
- package/node_modules/@agnos-ui/core/services/focustrack.js +47 -0
- package/node_modules/@agnos-ui/core/services/hash.cjs +15 -0
- package/node_modules/@agnos-ui/core/services/hash.d.ts +3 -0
- package/node_modules/@agnos-ui/core/services/hash.js +15 -0
- package/node_modules/@agnos-ui/core/services/intersection.cjs +53 -0
- package/node_modules/@agnos-ui/core/services/intersection.d.ts +30 -0
- package/node_modules/@agnos-ui/core/services/intersection.js +53 -0
- package/node_modules/@agnos-ui/core/services/matchMedia.cjs +14 -0
- package/node_modules/@agnos-ui/core/services/matchMedia.d.ts +8 -0
- package/node_modules/@agnos-ui/core/services/matchMedia.js +14 -0
- package/node_modules/@agnos-ui/core/services/navManager.cjs +166 -0
- package/node_modules/@agnos-ui/core/services/navManager.d.ts +144 -0
- package/node_modules/@agnos-ui/core/services/navManager.js +166 -0
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.cjs +60 -0
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.d.ts +42 -0
- package/node_modules/@agnos-ui/core/services/pointerdownPosition.js +60 -0
- package/node_modules/@agnos-ui/core/services/portal.cjs +42 -0
- package/node_modules/@agnos-ui/core/services/portal.d.ts +16 -0
- package/node_modules/@agnos-ui/core/services/portal.js +42 -0
- package/node_modules/@agnos-ui/core/services/resizeObserver.cjs +54 -0
- package/node_modules/@agnos-ui/core/services/resizeObserver.d.ts +18 -0
- package/node_modules/@agnos-ui/core/services/resizeObserver.js +54 -0
- package/node_modules/@agnos-ui/core/services/siblingsInert.cjs +44 -0
- package/node_modules/@agnos-ui/core/services/siblingsInert.d.ts +16 -0
- package/node_modules/@agnos-ui/core/services/siblingsInert.js +44 -0
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.cjs +186 -0
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.d.ts +166 -0
- package/node_modules/@agnos-ui/core/services/transitions/baseTransitions.js +186 -0
- package/node_modules/@agnos-ui/core/services/transitions/collapse.cjs +40 -0
- package/node_modules/@agnos-ui/core/services/transitions/collapse.d.ts +49 -0
- package/node_modules/@agnos-ui/core/services/transitions/collapse.js +40 -0
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.cjs +32 -0
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.d.ts +25 -0
- package/node_modules/@agnos-ui/core/services/transitions/cssTransitions.js +32 -0
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.cjs +37 -0
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.d.ts +47 -0
- package/node_modules/@agnos-ui/core/services/transitions/simpleClassTransition.js +37 -0
- package/node_modules/@agnos-ui/core/slider-B93hE0ag.cjs +807 -0
- package/node_modules/@agnos-ui/core/slider-Cjiq9FgI.js +808 -0
- package/node_modules/@agnos-ui/core/textDirection-cNgt24LJ.js +4 -0
- package/node_modules/@agnos-ui/core/textDirection-zqcZ5-eK.cjs +3 -0
- package/node_modules/@agnos-ui/core/toaster-BQWqxYv-.cjs +190 -0
- package/node_modules/@agnos-ui/core/toaster-BzEkshT2.js +191 -0
- package/node_modules/@agnos-ui/core/tree-DY04XPPg.cjs +228 -0
- package/node_modules/@agnos-ui/core/tree-HwcvZ0_p.js +229 -0
- package/node_modules/@agnos-ui/core/types.cjs +6 -0
- package/node_modules/@agnos-ui/core/types.d.ts +246 -0
- package/node_modules/@agnos-ui/core/types.js +6 -0
- package/node_modules/@agnos-ui/core/utils/directive.cjs +28 -0
- package/node_modules/@agnos-ui/core/utils/directive.d.ts +352 -0
- package/node_modules/@agnos-ui/core/utils/directive.js +28 -0
- package/node_modules/@agnos-ui/core/utils/func.cjs +7 -0
- package/node_modules/@agnos-ui/core/utils/func.d.ts +11 -0
- package/node_modules/@agnos-ui/core/utils/func.js +7 -0
- package/node_modules/@agnos-ui/core/utils/id.cjs +5 -0
- package/node_modules/@agnos-ui/core/utils/id.d.ts +6 -0
- package/node_modules/@agnos-ui/core/utils/id.js +5 -0
- package/node_modules/@agnos-ui/core/utils/internal/assign.d.ts +10 -0
- package/node_modules/@agnos-ui/core/utils/internal/checks.d.ts +57 -0
- package/node_modules/@agnos-ui/core/utils/internal/dom.d.ts +75 -0
- package/node_modules/@agnos-ui/core/utils/internal/isFocusable.d.ts +9 -0
- package/node_modules/@agnos-ui/core/utils/internal/math.d.ts +5 -0
- package/node_modules/@agnos-ui/core/utils/internal/promise.d.ts +98 -0
- package/node_modules/@agnos-ui/core/utils/internal/scrollbars.d.ts +8 -0
- package/node_modules/@agnos-ui/core/utils/internal/sort.d.ts +16 -0
- package/node_modules/@agnos-ui/core/utils/internal/ssrHTMLElement.d.ts +17 -0
- package/node_modules/@agnos-ui/core/utils/internal/textDirection.d.ts +7 -0
- package/node_modules/@agnos-ui/core/utils/internal/traversal.d.ts +54 -0
- package/node_modules/@agnos-ui/core/utils/stores.cjs +172 -0
- package/node_modules/@agnos-ui/core/utils/stores.d.ts +224 -0
- package/node_modules/@agnos-ui/core/utils/stores.js +172 -0
- package/node_modules/@agnos-ui/core/utils/widget.cjs +8 -0
- package/node_modules/@agnos-ui/core/utils/widget.d.ts +11 -0
- package/node_modules/@agnos-ui/core/utils/widget.js +8 -0
- package/node_modules/@agnos-ui/core/utils/writables.cjs +16 -0
- package/node_modules/@agnos-ui/core/utils/writables.d.ts +95 -0
- package/node_modules/@agnos-ui/core/utils/writables.js +16 -0
- package/node_modules/@agnos-ui/core/writables-DYGjj5T3.js +103 -0
- package/node_modules/@agnos-ui/core/writables-Dt68gADJ.cjs +102 -0
- package/package.json +25 -6
- package/schematics/collection.json +1 -1
- package/types/design-factory-angular-drawer.d.ts +71 -13
- package/types/design-factory-angular-internals.d.ts +220 -31
- package/types/design-factory-angular-sidenav.d.ts +15 -7
- package/types/design-factory-angular-theme.d.ts +122 -0
- package/types/design-factory-angular-topnav.d.ts +435 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
2
|
+
import type { ConfigValidator, Directive, PropsConfig, Widget, WidgetFactory } from '../../types';
|
|
3
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
4
|
+
/**
|
|
5
|
+
* Properties for the Accordion component.
|
|
6
|
+
*/
|
|
7
|
+
export interface AccordionProps extends WidgetsCommonPropsAndState {
|
|
8
|
+
/**
|
|
9
|
+
* If `true`, only one accordion-item at the time can stay open.
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue `false`
|
|
12
|
+
*/
|
|
13
|
+
closeOthers: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* An event fired when an item is shown.
|
|
16
|
+
*
|
|
17
|
+
* Event payload is the id of the item.
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue
|
|
20
|
+
* ```ts
|
|
21
|
+
* () => {}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
onItemShown: (itemId: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* An event fired when an item is hidden.
|
|
27
|
+
*
|
|
28
|
+
* Event payload is the id of the item.
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue
|
|
31
|
+
* ```ts
|
|
32
|
+
* () => {}
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
onItemHidden: (itemId: string) => void;
|
|
36
|
+
/**
|
|
37
|
+
* 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.
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `true`
|
|
40
|
+
*/
|
|
41
|
+
itemDestroyOnHide: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* If `true`, accordion-item will be animated.
|
|
44
|
+
*
|
|
45
|
+
* @defaultValue `true`
|
|
46
|
+
*/
|
|
47
|
+
itemAnimated: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The transition to use for the accordion-item body-container when the accordion-item is toggled.
|
|
50
|
+
*
|
|
51
|
+
* @defaultValue
|
|
52
|
+
* ```ts
|
|
53
|
+
* () => {}
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
itemTransition: TransitionFn;
|
|
57
|
+
/**
|
|
58
|
+
* CSS classes to add on the accordion-item DOM element.
|
|
59
|
+
*
|
|
60
|
+
* @defaultValue `''`
|
|
61
|
+
*/
|
|
62
|
+
itemClassName: string;
|
|
63
|
+
/**
|
|
64
|
+
* CSS classes to add on the accordion-item header DOM element.
|
|
65
|
+
*
|
|
66
|
+
* @defaultValue `''`
|
|
67
|
+
*/
|
|
68
|
+
itemHeaderClassName: string;
|
|
69
|
+
/**
|
|
70
|
+
* CSS classes to add on the accordion-item toggle button DOM element.
|
|
71
|
+
*
|
|
72
|
+
* @defaultValue `''`
|
|
73
|
+
*/
|
|
74
|
+
itemButtonClassName: string;
|
|
75
|
+
/**
|
|
76
|
+
* CSS classes to add on the accordion-item body container DOM element.
|
|
77
|
+
* The accordion-item body container is the DOM element on what the itemTransition is applied.
|
|
78
|
+
*
|
|
79
|
+
* @defaultValue `''`
|
|
80
|
+
*/
|
|
81
|
+
itemBodyContainerClassName: string;
|
|
82
|
+
/**
|
|
83
|
+
* CSS classes to add on the accordion-item body DOM element.
|
|
84
|
+
*
|
|
85
|
+
* @defaultValue `''`
|
|
86
|
+
*/
|
|
87
|
+
itemBodyClassName: string;
|
|
88
|
+
/**
|
|
89
|
+
* The html heading level to use for the accordion-item-header.
|
|
90
|
+
*
|
|
91
|
+
* @defaultValue `2`
|
|
92
|
+
*/
|
|
93
|
+
itemHeadingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Represents the state of an Accordion component.
|
|
97
|
+
*/
|
|
98
|
+
export interface AccordionState extends WidgetsCommonPropsAndState {
|
|
99
|
+
/**
|
|
100
|
+
* Array containing all the accordion-items contained in the accordion.
|
|
101
|
+
*/
|
|
102
|
+
itemWidgets: AccordionItemWidget[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Interface representing the API for an accordion component.
|
|
106
|
+
*/
|
|
107
|
+
export interface AccordionApi {
|
|
108
|
+
/**
|
|
109
|
+
* Given the itemId, will expand the corresponding accordion-item.
|
|
110
|
+
*
|
|
111
|
+
* If the itemId is not valid, nothing will happen.
|
|
112
|
+
* @returns A promise that resolves when the expand operation is completed.
|
|
113
|
+
*/
|
|
114
|
+
expand(itemId: string, animated?: boolean): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Given the itemId, will collapse the corresponding accordion-item.
|
|
117
|
+
*
|
|
118
|
+
* If the itemId is not valid, nothing will happen.
|
|
119
|
+
* @returns A promise that resolves when the collapse operation is completed.
|
|
120
|
+
*/
|
|
121
|
+
collapse(itemId: string, animated?: boolean): Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Given the itemId, will toggle the corresponding accordion-item.
|
|
124
|
+
*
|
|
125
|
+
* @returns A promise that resolves when the toggle operation is completed.
|
|
126
|
+
* If the itemId is not valid, nothing will happen.
|
|
127
|
+
*/
|
|
128
|
+
toggle(itemId: string): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* It will expand all the items in the accordion.
|
|
131
|
+
*
|
|
132
|
+
* If `closeOthers` is `true` it will expand only the last accordion-item.
|
|
133
|
+
*
|
|
134
|
+
* @returns A promise that resolves when all the expand operations are completed.
|
|
135
|
+
*/
|
|
136
|
+
expandAll(animated?: boolean): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* It will collapse all the accordion-items in the accordion.
|
|
139
|
+
*
|
|
140
|
+
* @returns A promise that resolves when all the collapse operations are completed.
|
|
141
|
+
*/
|
|
142
|
+
collapseAll(animated?: boolean): Promise<void>;
|
|
143
|
+
/**
|
|
144
|
+
* Creates a new accordionItem.
|
|
145
|
+
*/
|
|
146
|
+
registerItem(itemConfig?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Interface representing the directives used in the Accordion component.
|
|
150
|
+
*/
|
|
151
|
+
export interface AccordionDirectives {
|
|
152
|
+
/**
|
|
153
|
+
* Directive to put on the accordion DOM element
|
|
154
|
+
*/
|
|
155
|
+
accordionDirective: Directive;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Represents an Accordion widget with specific properties, state, API, and directives.
|
|
159
|
+
*/
|
|
160
|
+
export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, AccordionDirectives>;
|
|
161
|
+
/**
|
|
162
|
+
* Interface representing the API for an accordion item.
|
|
163
|
+
*/
|
|
164
|
+
export interface AccordionItemApi {
|
|
165
|
+
/**
|
|
166
|
+
* It will collapse the accordion-item.
|
|
167
|
+
* @returns A promise that resolves when the collapse operation is completed.
|
|
168
|
+
*/
|
|
169
|
+
collapse(animated?: boolean): Promise<void>;
|
|
170
|
+
/**
|
|
171
|
+
* It will expand the accordion-item.
|
|
172
|
+
* @returns A promise that resolves when the expand operation is completed.
|
|
173
|
+
*/
|
|
174
|
+
expand(animated?: boolean): Promise<void>;
|
|
175
|
+
/**
|
|
176
|
+
* It will toggle the accordion-item.
|
|
177
|
+
* @returns A promise that resolves when the toggle operation is completed.
|
|
178
|
+
*/
|
|
179
|
+
toggle(animated?: boolean): Promise<void>;
|
|
180
|
+
/**
|
|
181
|
+
* Method to be called after the initialization to allow animations.
|
|
182
|
+
*/
|
|
183
|
+
initDone(): void;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Interface representing the directives used in an accordion item.
|
|
187
|
+
*/
|
|
188
|
+
export interface AccordionItemDirectives {
|
|
189
|
+
/**
|
|
190
|
+
* Directive to use in special cases, if the accordion header does not use a button element to control the collapsing.
|
|
191
|
+
*/
|
|
192
|
+
toggleDirective: Directive;
|
|
193
|
+
/**
|
|
194
|
+
* Directive to put on the button element that will control the collapsing of the accordion-item.
|
|
195
|
+
*/
|
|
196
|
+
buttonDirective: Directive;
|
|
197
|
+
/**
|
|
198
|
+
* Directive to put on the accordion-item header that will contain the button element.
|
|
199
|
+
*/
|
|
200
|
+
headerDirective: Directive;
|
|
201
|
+
/**
|
|
202
|
+
* Directive to put on the accordion-item body.
|
|
203
|
+
*/
|
|
204
|
+
bodyDirective: Directive;
|
|
205
|
+
/**
|
|
206
|
+
* Directive to apply the itemTransition
|
|
207
|
+
*/
|
|
208
|
+
transitionDirective: Directive;
|
|
209
|
+
/**
|
|
210
|
+
* Directive to apply aria attributes to the expanded body panel
|
|
211
|
+
*/
|
|
212
|
+
bodyContainerAttrsDirective: Directive;
|
|
213
|
+
/**
|
|
214
|
+
* Directive to be put on the accordion-item body container. It will handle the animation.
|
|
215
|
+
*/
|
|
216
|
+
bodyContainerDirective: Directive;
|
|
217
|
+
/**
|
|
218
|
+
* Directive to be put on the accordion-item. It will handle adding the accordion-item to the accordion.
|
|
219
|
+
*/
|
|
220
|
+
itemDirective: Directive;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Interface representing the common properties and state for an accordion item.
|
|
224
|
+
*/
|
|
225
|
+
interface AccordionItemCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
226
|
+
/**
|
|
227
|
+
* If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
|
|
228
|
+
*/
|
|
229
|
+
visible: boolean;
|
|
230
|
+
/**
|
|
231
|
+
* If `true`, the accordion-item will be disabled.
|
|
232
|
+
* It will not react to user's clicks, but still will be possible to toggle programmatically.
|
|
233
|
+
*/
|
|
234
|
+
disabled: boolean;
|
|
235
|
+
/**
|
|
236
|
+
* The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
|
|
237
|
+
*/
|
|
238
|
+
id: string;
|
|
239
|
+
/**
|
|
240
|
+
* CSS classes to add on the accordion-item header DOM element.
|
|
241
|
+
*/
|
|
242
|
+
headerClassName: string;
|
|
243
|
+
/**
|
|
244
|
+
* CSS classes to add on the accordion-item collapse DOM element.
|
|
245
|
+
*/
|
|
246
|
+
buttonClassName: string;
|
|
247
|
+
/**
|
|
248
|
+
* CSS classes to add on the accordion-item body container DOM element.
|
|
249
|
+
* The accordion-item body container is the DOM element on what the itemTransition is applied.
|
|
250
|
+
*/
|
|
251
|
+
bodyContainerClassName: string;
|
|
252
|
+
/**
|
|
253
|
+
* CSS classes to add on the accordion-item body DOM element.
|
|
254
|
+
*/
|
|
255
|
+
bodyClassName: string;
|
|
256
|
+
/**
|
|
257
|
+
* The html heading level to use for the accordion-item-header.
|
|
258
|
+
*/
|
|
259
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Properties for an AccordionItem component.
|
|
263
|
+
*/
|
|
264
|
+
export interface AccordionItemProps extends AccordionItemCommonPropsAndState {
|
|
265
|
+
/**
|
|
266
|
+
* If `true`, accordion-item will be animated.
|
|
267
|
+
*/
|
|
268
|
+
animated: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* The transition to use for the accordion-item body-container when the accordion-item is toggled.
|
|
271
|
+
*/
|
|
272
|
+
transition: TransitionFn;
|
|
273
|
+
/**
|
|
274
|
+
* 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.
|
|
275
|
+
*/
|
|
276
|
+
destroyOnHide: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* An event fired when an item is shown.
|
|
279
|
+
*/
|
|
280
|
+
onShown: () => void;
|
|
281
|
+
/**
|
|
282
|
+
* An event fired when an item is hidden.
|
|
283
|
+
*/
|
|
284
|
+
onHidden: () => void;
|
|
285
|
+
/**
|
|
286
|
+
* An event fired when the `visible` value changes.
|
|
287
|
+
*
|
|
288
|
+
* Event payload is the new value of visible.
|
|
289
|
+
*/
|
|
290
|
+
onVisibleChange: (visible: boolean) => void;
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Represents the state of an accordion item.
|
|
294
|
+
*/
|
|
295
|
+
export interface AccordionItemState extends AccordionItemCommonPropsAndState {
|
|
296
|
+
/**
|
|
297
|
+
* If `true` the content of the accordion-item collapse should be in DOM. Its value depends on the
|
|
298
|
+
* value of the `visible` and `destroyOnHide`.
|
|
299
|
+
*/
|
|
300
|
+
shouldBeInDOM: boolean;
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Represents a widget for an accordion item.
|
|
304
|
+
*/
|
|
305
|
+
export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemDirectives>;
|
|
306
|
+
/**
|
|
307
|
+
* Retrieve a shallow copy of the default accordion config
|
|
308
|
+
* @returns the default accordion config
|
|
309
|
+
*/
|
|
310
|
+
export declare function getAccordionDefaultConfig(): AccordionProps;
|
|
311
|
+
/**
|
|
312
|
+
* Creates a new AccordionItem widget instance.
|
|
313
|
+
* @param config - config of the accordion item, either as a store or as an object containing values or stores.
|
|
314
|
+
* @returns a new accordion item widget instance
|
|
315
|
+
*/
|
|
316
|
+
export declare function createAccordionItem(config?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
|
|
317
|
+
/**
|
|
318
|
+
* Create an accordion WidgetFactory based on an item factory and the list of item props that should inherit from the parent accordion
|
|
319
|
+
*
|
|
320
|
+
* @param itemFactory - the item factory
|
|
321
|
+
* @param accordionItemProps - the list of item props
|
|
322
|
+
* @param accordionConfig - the default accordion config
|
|
323
|
+
* @param accordionValidator - the validator of props
|
|
324
|
+
* @returns the accordion widget factory
|
|
325
|
+
*/
|
|
326
|
+
export declare function factoryCreateAccordion(itemFactory?: WidgetFactory<AccordionItemWidget>, accordionItemProps?: string[], accordionConfig?: AccordionProps, accordionValidator?: ConfigValidator<AccordionProps>): WidgetFactory<AccordionWidget>;
|
|
327
|
+
/**
|
|
328
|
+
* Creates a new Accordion widget instance.
|
|
329
|
+
* @param config - config of the accordion, either as a store or as an object containing values or stores.
|
|
330
|
+
* @returns a new accordion widget instance
|
|
331
|
+
*/
|
|
332
|
+
export declare const createAccordion: WidgetFactory<AccordionWidget>;
|
|
333
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const accordion = require("../../accordion-BC_9xn23.cjs");
|
|
4
|
+
exports.createAccordion = accordion.createAccordion;
|
|
5
|
+
exports.createAccordionItem = accordion.createAccordionItem;
|
|
6
|
+
exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
|
|
7
|
+
exports.getAccordionDefaultConfig = accordion.getAccordionDefaultConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './accordion';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { CommonAlertApi, CommonAlertDirectives, CommonAlertProps, CommonAlertState } from './common';
|
|
2
|
+
import type { Widget, WidgetFactory } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Represents the state of an alert component.
|
|
5
|
+
*/
|
|
6
|
+
export interface AlertState extends CommonAlertState {
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Represents the properties for the alert component.
|
|
10
|
+
*/
|
|
11
|
+
export interface AlertProps extends CommonAlertProps {
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Represents the API for an alert component.
|
|
15
|
+
*/
|
|
16
|
+
export interface AlertApi extends CommonAlertApi {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Represents the directives for an alert component.
|
|
20
|
+
*/
|
|
21
|
+
export interface AlertDirectives extends CommonAlertDirectives {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Represents an alert widget with specific properties, state, API, and directives.
|
|
25
|
+
*/
|
|
26
|
+
export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, AlertDirectives>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a shallow copy of the default alert config
|
|
29
|
+
* @returns the default alert config
|
|
30
|
+
*/
|
|
31
|
+
export declare function getAlertDefaultConfig(): AlertProps;
|
|
32
|
+
/**
|
|
33
|
+
* Create an AlertWidget with given config props
|
|
34
|
+
* @param config - an optional alert config
|
|
35
|
+
* @returns an AlertWidget
|
|
36
|
+
*/
|
|
37
|
+
export declare const createAlert: WidgetFactory<AlertWidget>;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
2
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
|
+
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Interface representing the common properties and state for an alert component.
|
|
6
|
+
*/
|
|
7
|
+
export interface CommonAlertCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
8
|
+
/**
|
|
9
|
+
* If `true`, alert can be dismissed by the user.
|
|
10
|
+
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
11
|
+
*
|
|
12
|
+
* @defaultValue `true`
|
|
13
|
+
*/
|
|
14
|
+
dismissible: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* If `true` the alert is visible to the user
|
|
17
|
+
*
|
|
18
|
+
* @defaultValue `true`
|
|
19
|
+
*/
|
|
20
|
+
visible: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Accessibility close button label
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue `'Close'`
|
|
25
|
+
*/
|
|
26
|
+
ariaCloseButtonLabel: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Represents the state of a common alert component.
|
|
30
|
+
*/
|
|
31
|
+
export interface CommonAlertState extends CommonAlertCommonPropsAndState {
|
|
32
|
+
/**
|
|
33
|
+
* Is `true` when the alert is hidden. Compared to `visible`, this is updated after the transition is executed.
|
|
34
|
+
*/
|
|
35
|
+
hidden: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Interface representing the common properties for an alert component.
|
|
39
|
+
*/
|
|
40
|
+
export interface CommonAlertProps extends CommonAlertCommonPropsAndState {
|
|
41
|
+
/**
|
|
42
|
+
* Callback called when the alert visibility changed.
|
|
43
|
+
*
|
|
44
|
+
* @defaultValue
|
|
45
|
+
* ```ts
|
|
46
|
+
* () => {}
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
onVisibleChange: (visible: boolean) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Callback called when the alert is hidden.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue
|
|
54
|
+
* ```ts
|
|
55
|
+
* () => {}
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
onHidden: () => void;
|
|
59
|
+
/**
|
|
60
|
+
* Callback called when the alert is shown.
|
|
61
|
+
*
|
|
62
|
+
* @defaultValue
|
|
63
|
+
* ```ts
|
|
64
|
+
* () => {}
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
onShown: () => void;
|
|
68
|
+
/**
|
|
69
|
+
* The transition function will be executed when the alert is displayed or hidden.
|
|
70
|
+
*
|
|
71
|
+
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
72
|
+
*
|
|
73
|
+
* @defaultValue
|
|
74
|
+
* ```ts
|
|
75
|
+
* () => {}
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
transition: TransitionFn;
|
|
79
|
+
/**
|
|
80
|
+
* If `true`, alert opening will be animated.
|
|
81
|
+
*
|
|
82
|
+
* Animation is triggered when the `.open()` function is called
|
|
83
|
+
* or the visible prop is changed
|
|
84
|
+
*
|
|
85
|
+
* @defaultValue `false`
|
|
86
|
+
*/
|
|
87
|
+
animatedOnInit: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* If `true`, alert closing will be animated.
|
|
90
|
+
*
|
|
91
|
+
* Animation is triggered when clicked on the close button (×),
|
|
92
|
+
* via the `.close()` function or the visible prop is changed
|
|
93
|
+
*
|
|
94
|
+
* @defaultValue `true`
|
|
95
|
+
*/
|
|
96
|
+
animated: boolean;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Interface representing the common API for alert components.
|
|
100
|
+
*/
|
|
101
|
+
export interface CommonAlertApi {
|
|
102
|
+
/**
|
|
103
|
+
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
104
|
+
*
|
|
105
|
+
* @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` property is used.
|
|
106
|
+
*/
|
|
107
|
+
close(animated?: boolean): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Triggers the alert to be displayed for the user.
|
|
110
|
+
*
|
|
111
|
+
* @param animated - whether the transition should be animated. If the parameter is not defined, the `animated` property is used.
|
|
112
|
+
*/
|
|
113
|
+
open(animated?: boolean): Promise<void>;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Interface representing common alert directives.
|
|
117
|
+
*/
|
|
118
|
+
export interface CommonAlertDirectives {
|
|
119
|
+
/**
|
|
120
|
+
* the transition directive, piloting what is the visual effect of going from hidden to visible
|
|
121
|
+
*/
|
|
122
|
+
transitionDirective: Directive;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Represents a common alert widget with specified properties, state, API, and directives.
|
|
126
|
+
*/
|
|
127
|
+
export type CommonAlertWidget = Widget<CommonAlertProps, CommonAlertState, CommonAlertApi, CommonAlertDirectives>;
|
|
128
|
+
/**
|
|
129
|
+
* Retrieve a shallow copy of the default alert config
|
|
130
|
+
* @returns the default alert config
|
|
131
|
+
*/
|
|
132
|
+
export declare function getCommonAlertDefaultConfig(): CommonAlertProps;
|
|
133
|
+
/**
|
|
134
|
+
* Create an AlertWidget with given config props
|
|
135
|
+
* @param config - an optional alert config
|
|
136
|
+
* @returns an AlertWidget
|
|
137
|
+
*/
|
|
138
|
+
export declare function createCommonAlert(config?: PropsConfig<CommonAlertProps>): CommonAlertWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert';
|