@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,279 @@
|
|
|
1
|
+
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
2
|
+
import type { Directive, WidgetFactory } from '../../types';
|
|
3
|
+
import { type Widget } from '../../types';
|
|
4
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
5
|
+
/**
|
|
6
|
+
* Possible values for the drawer positions
|
|
7
|
+
*/
|
|
8
|
+
export type DrawerPosition = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
|
|
9
|
+
/**
|
|
10
|
+
* Possible values for the drawer display configuration.
|
|
11
|
+
* - `'overlay'`: the drawer overlays the page content with a backdrop.
|
|
12
|
+
* - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.
|
|
13
|
+
*/
|
|
14
|
+
export type DrawerConfiguration = 'inline' | 'overlay';
|
|
15
|
+
interface DrawerCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
16
|
+
/**
|
|
17
|
+
* CSS classes to be applied on the widget main container
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue `''`
|
|
20
|
+
*/
|
|
21
|
+
className: string;
|
|
22
|
+
/**
|
|
23
|
+
* Which element should contain the drawer and backdrop DOM elements.
|
|
24
|
+
* If it is not null, the drawer and backdrop DOM elements are moved to the specified container.
|
|
25
|
+
* Otherwise, they stay where the widget is located.
|
|
26
|
+
*
|
|
27
|
+
* @defaultValue
|
|
28
|
+
* ```ts
|
|
29
|
+
* typeof window !== 'undefined' ? document.body : null
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
container: HTMLElement | null;
|
|
33
|
+
/**
|
|
34
|
+
* Classes to add on the backdrop DOM element.
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue `''`
|
|
37
|
+
*/
|
|
38
|
+
backdropClass: string;
|
|
39
|
+
/**
|
|
40
|
+
* If `true`, the drawer is shown; otherwise, it is hidden.
|
|
41
|
+
*
|
|
42
|
+
* @defaultValue `false`
|
|
43
|
+
*/
|
|
44
|
+
visible: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* If `true`, the drawer can be resized by the user.
|
|
47
|
+
*
|
|
48
|
+
* @defaultValue `false`
|
|
49
|
+
*/
|
|
50
|
+
resizable: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Size of the drawer in pixel once the user start interacting.
|
|
53
|
+
* It corresponds to the height or the width depending on the drawer orientation
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue `null`
|
|
56
|
+
*/
|
|
57
|
+
size: number | null;
|
|
58
|
+
/**
|
|
59
|
+
* The display configuration of the drawer.
|
|
60
|
+
* - `'overlay'` (default): the drawer overlays the page content with a backdrop.
|
|
61
|
+
* - `'inline'`: the drawer stays in the document flow and moves content as it expands/resizes.
|
|
62
|
+
*
|
|
63
|
+
* @defaultValue `'overlay'`
|
|
64
|
+
*/
|
|
65
|
+
configuration: DrawerConfiguration;
|
|
66
|
+
/**
|
|
67
|
+
* The position of the drawer on the screen.
|
|
68
|
+
*
|
|
69
|
+
* @defaultValue `'inline-start'`
|
|
70
|
+
*/
|
|
71
|
+
position: DrawerPosition;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Interface representing the properties for the Drawer component.
|
|
75
|
+
*/
|
|
76
|
+
export interface DrawerProps extends DrawerCommonPropsAndState {
|
|
77
|
+
/**
|
|
78
|
+
* The transition function will be executed when the drawer is displayed or hidden.
|
|
79
|
+
*
|
|
80
|
+
* @defaultValue
|
|
81
|
+
* ```ts
|
|
82
|
+
* () => {}
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
transition: TransitionFn;
|
|
86
|
+
/**
|
|
87
|
+
* The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.
|
|
88
|
+
*
|
|
89
|
+
* @defaultValue
|
|
90
|
+
* ```ts
|
|
91
|
+
* () => {}
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
verticalTransition: TransitionFn;
|
|
95
|
+
/**
|
|
96
|
+
* The transition to use for the backdrop behind the drawer (if present).
|
|
97
|
+
*
|
|
98
|
+
* @defaultValue
|
|
99
|
+
* ```ts
|
|
100
|
+
* () => {}
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
backdropTransition: TransitionFn;
|
|
104
|
+
/**
|
|
105
|
+
* If `true` opening and closing will be animated.
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue `true`
|
|
108
|
+
*/
|
|
109
|
+
animated: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* aria-labelledby attribute to use for the drawer element.
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue `''`
|
|
114
|
+
*/
|
|
115
|
+
ariaLabelledBy: string;
|
|
116
|
+
/**
|
|
117
|
+
* aria-describedby attribute to use for the drawer element.
|
|
118
|
+
*
|
|
119
|
+
* @defaultValue `''`
|
|
120
|
+
*/
|
|
121
|
+
ariaDescribedBy: string;
|
|
122
|
+
/**
|
|
123
|
+
* If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
|
|
124
|
+
*
|
|
125
|
+
* @defaultValue `true`
|
|
126
|
+
*/
|
|
127
|
+
backdrop: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* If `true` allows body scrolling when the drawer is open.
|
|
130
|
+
*
|
|
131
|
+
* @defaultValue `false`
|
|
132
|
+
*/
|
|
133
|
+
bodyScroll: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* If `true` focuses the drawer when it is opened.
|
|
136
|
+
*
|
|
137
|
+
* @defaultValue `true`
|
|
138
|
+
*/
|
|
139
|
+
focusOnInit: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Event to be triggered when the transition is completed and the drawer is not visible.
|
|
142
|
+
*
|
|
143
|
+
* @defaultValue
|
|
144
|
+
* ```ts
|
|
145
|
+
* () => {}
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
onHidden: () => void;
|
|
149
|
+
/**
|
|
150
|
+
* Event to be triggered when the transition is completed and the drawer is visible.
|
|
151
|
+
*
|
|
152
|
+
* @defaultValue
|
|
153
|
+
* ```ts
|
|
154
|
+
* () => {}
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
onShown: () => void;
|
|
158
|
+
/**
|
|
159
|
+
* An event emitted when the drawer size changes (width or height depending on the orientation).
|
|
160
|
+
*
|
|
161
|
+
* Event payload is equal to the newly selected width or height.
|
|
162
|
+
*
|
|
163
|
+
* @defaultValue
|
|
164
|
+
* ```ts
|
|
165
|
+
* () => {}
|
|
166
|
+
* ```
|
|
167
|
+
*/
|
|
168
|
+
onSizeChange: (size: number | null) => void;
|
|
169
|
+
/**
|
|
170
|
+
* Event to be triggered when the visible property changes.
|
|
171
|
+
*
|
|
172
|
+
* @param visible - new value of the visible propery
|
|
173
|
+
*
|
|
174
|
+
* @defaultValue
|
|
175
|
+
* ```ts
|
|
176
|
+
* () => {}
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
onVisibleChange: (visible: boolean) => void;
|
|
180
|
+
/**
|
|
181
|
+
* Event to be triggered when the minimized state changes.
|
|
182
|
+
*
|
|
183
|
+
* @defaultValue
|
|
184
|
+
* ```ts
|
|
185
|
+
* () => {}
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
onMinimizedChange: (isMinimized: boolean) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Event to be triggered when the maximized state changes.
|
|
191
|
+
*
|
|
192
|
+
* @defaultValue
|
|
193
|
+
* ```ts
|
|
194
|
+
* () => {}
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
onMaximizedChange: (isMaximized: boolean) => void;
|
|
198
|
+
/**
|
|
199
|
+
* Event to be triggered when the user starts or stops resizing the drawer.
|
|
200
|
+
*
|
|
201
|
+
* @defaultValue
|
|
202
|
+
* ```ts
|
|
203
|
+
* () => {}
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
onResizingChange: (isResizing: boolean) => void;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Represents the state of a Drawer component.
|
|
210
|
+
*/
|
|
211
|
+
export interface DrawerState extends DrawerCommonPropsAndState {
|
|
212
|
+
/**
|
|
213
|
+
* Whether the backdrop is fully hidden. This can be true either because {@link DrawerProps.backdrop|backdrop} is false or
|
|
214
|
+
* because {@link DrawerProps.visible|visible} is false and there is no current transition.
|
|
215
|
+
*/
|
|
216
|
+
backdropHidden: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* Flag to show whether the drawer is fully hidden.
|
|
219
|
+
*/
|
|
220
|
+
hidden: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Flag to show whether the drawer is vertically positioned.
|
|
223
|
+
*/
|
|
224
|
+
isVertical: boolean;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Interface representing the API for a Drawer component.
|
|
228
|
+
*/
|
|
229
|
+
export interface DrawerApi {
|
|
230
|
+
/**
|
|
231
|
+
* Trigger the opening of the drawer.
|
|
232
|
+
*/
|
|
233
|
+
open: (animated?: boolean) => Promise<void>;
|
|
234
|
+
/**
|
|
235
|
+
* Trigger the closing of the drawer.
|
|
236
|
+
*/
|
|
237
|
+
close: (animated?: boolean) => Promise<void>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Interface representing various directives used in the Drawer component.
|
|
241
|
+
*/
|
|
242
|
+
export interface DrawerDirectives {
|
|
243
|
+
/**
|
|
244
|
+
* Directive to put on the drawer DOM element.
|
|
245
|
+
*/
|
|
246
|
+
drawerDirective: Directive;
|
|
247
|
+
/**
|
|
248
|
+
* Portal directive to put on the drawer DOM element.
|
|
249
|
+
*/
|
|
250
|
+
drawerPortalDirective: Directive;
|
|
251
|
+
/**
|
|
252
|
+
* Directive to put on the backdrop DOM element.
|
|
253
|
+
*/
|
|
254
|
+
backdropDirective: Directive;
|
|
255
|
+
/**
|
|
256
|
+
* Portal directive to put on the backdrop DOM element.
|
|
257
|
+
*/
|
|
258
|
+
backdropPortalDirective: Directive;
|
|
259
|
+
/**
|
|
260
|
+
* Directive to put on the splitter DOM element.
|
|
261
|
+
*/
|
|
262
|
+
splitterDirective: Directive;
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Represents a Drawer widget component.
|
|
266
|
+
*/
|
|
267
|
+
export type DrawerWidget = Widget<DrawerProps, DrawerState, DrawerApi, DrawerDirectives>;
|
|
268
|
+
/**
|
|
269
|
+
* Retrieve a shallow copy of the default Drawer config
|
|
270
|
+
* @returns the default Drawer config
|
|
271
|
+
*/
|
|
272
|
+
export declare function getDrawerDefaultConfig(): DrawerProps;
|
|
273
|
+
/**
|
|
274
|
+
* Create a Drawer widget with given config props
|
|
275
|
+
* @param config - an optional Drawer config
|
|
276
|
+
* @returns a DrawerWidget
|
|
277
|
+
*/
|
|
278
|
+
export declare const createDrawer: WidgetFactory<DrawerWidget>;
|
|
279
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drawer';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const modal = require("../../modal-BsNuHhT7.cjs");
|
|
4
|
+
exports.createModal = modal.createModal;
|
|
5
|
+
exports.getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
6
|
+
exports.modalCloseButtonClick = modal.modalCloseButtonClick;
|
|
7
|
+
exports.modalCloseEscape = modal.modalCloseEscape;
|
|
8
|
+
exports.modalOutsideClick = modal.modalOutsideClick;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './modal';
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
2
|
+
import type { TransitionFn } from '../../services/transitions/baseTransitions';
|
|
3
|
+
import type { Directive, Widget, WidgetFactory } from '../../types';
|
|
4
|
+
/**
|
|
5
|
+
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
6
|
+
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click inside the viewport but outside the modal.
|
|
7
|
+
*/
|
|
8
|
+
export declare const modalOutsideClick: unique symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
11
|
+
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click on the close button.
|
|
12
|
+
*/
|
|
13
|
+
export declare const modalCloseButtonClick: unique symbol;
|
|
14
|
+
/**
|
|
15
|
+
* Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
|
|
16
|
+
* and returned by the {@link ModalApi.open|open} method, when the modal is closed by pressing the Escape key.
|
|
17
|
+
*/
|
|
18
|
+
export declare const modalCloseEscape: unique symbol;
|
|
19
|
+
/**
|
|
20
|
+
* Properties of the modal widget that are also in the state of the modal.
|
|
21
|
+
*/
|
|
22
|
+
interface ModalCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
23
|
+
/**
|
|
24
|
+
* Value of the aria-label attribute to put on the close button.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue `'Close'`
|
|
27
|
+
*/
|
|
28
|
+
ariaCloseButtonLabel: string;
|
|
29
|
+
/**
|
|
30
|
+
* Classes to add on the backdrop DOM element.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue `''`
|
|
33
|
+
*/
|
|
34
|
+
backdropClass: string;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to display the close button.
|
|
37
|
+
*
|
|
38
|
+
* @defaultValue `true`
|
|
39
|
+
*/
|
|
40
|
+
closeButton: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Which element should contain the modal and backdrop DOM elements.
|
|
43
|
+
* If it is not null, the modal and backdrop DOM elements are moved to the specified container.
|
|
44
|
+
* Otherwise, they stay where the widget is located.
|
|
45
|
+
*
|
|
46
|
+
* @defaultValue
|
|
47
|
+
* ```ts
|
|
48
|
+
* typeof window !== 'undefined' ? document.body : null
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
container: HTMLElement | null;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the modal should be visible when the transition is completed.
|
|
54
|
+
*
|
|
55
|
+
* @defaultValue `false`
|
|
56
|
+
*/
|
|
57
|
+
visible: boolean;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Type of the parameter of {@link ModalProps.onBeforeClose|onBeforeClose}.
|
|
61
|
+
*/
|
|
62
|
+
export interface ModalBeforeCloseEvent {
|
|
63
|
+
/**
|
|
64
|
+
* Result of the modal, which is the value passed to the {@link ModalApi.close|close} method
|
|
65
|
+
* and later resolved by the promise returned by the {@link ModalApi.open|open} method.
|
|
66
|
+
* If needed, it can be changed from the {@link ModalProps.onBeforeClose|onBeforeClose} event handler.
|
|
67
|
+
*/
|
|
68
|
+
result: any;
|
|
69
|
+
/**
|
|
70
|
+
* Whether to cancel the close of the modal.
|
|
71
|
+
* It can be changed from the {@link ModalProps.onBeforeClose|onBeforeClose} event handler.
|
|
72
|
+
*/
|
|
73
|
+
cancel: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Properties of the modal widget.
|
|
77
|
+
*/
|
|
78
|
+
export interface ModalProps extends ModalCommonPropsAndState {
|
|
79
|
+
/**
|
|
80
|
+
* Whether the modal and its backdrop (if present) should be animated when shown or hidden.
|
|
81
|
+
*
|
|
82
|
+
* @defaultValue `true`
|
|
83
|
+
*/
|
|
84
|
+
animated: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Whether a backdrop should be created behind the modal.
|
|
87
|
+
*
|
|
88
|
+
* @defaultValue `true`
|
|
89
|
+
*/
|
|
90
|
+
backdrop: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The transition to use for the backdrop behind the modal (if present).
|
|
93
|
+
*
|
|
94
|
+
* @defaultValue
|
|
95
|
+
* ```ts
|
|
96
|
+
* () => {}
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
backdropTransition: TransitionFn;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the modal should be closed when clicking on the viewport outside the modal.
|
|
102
|
+
*
|
|
103
|
+
* @defaultValue `true`
|
|
104
|
+
*/
|
|
105
|
+
closeOnOutsideClick: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* The transition to use for the modal.
|
|
108
|
+
*
|
|
109
|
+
* @defaultValue
|
|
110
|
+
* ```ts
|
|
111
|
+
* () => {}
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
modalTransition: TransitionFn;
|
|
115
|
+
/**
|
|
116
|
+
* Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.close|close} method was called).
|
|
117
|
+
*
|
|
118
|
+
* @param event - event giving access to the argument given to the {@link ModalApi.close|close} method and allowing
|
|
119
|
+
* to cancel the close process.
|
|
120
|
+
*
|
|
121
|
+
* @defaultValue
|
|
122
|
+
* ```ts
|
|
123
|
+
* () => {}
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
126
|
+
onBeforeClose: (event: ModalBeforeCloseEvent) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Event to be triggered when the visible property changes.
|
|
129
|
+
*
|
|
130
|
+
* @param visible - new value of the visible propery
|
|
131
|
+
*
|
|
132
|
+
* @defaultValue
|
|
133
|
+
* ```ts
|
|
134
|
+
* () => {}
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
onVisibleChange: (visible: boolean) => void;
|
|
138
|
+
/**
|
|
139
|
+
* Event to be triggered when the transition is completed and the modal is not visible.
|
|
140
|
+
*
|
|
141
|
+
* @defaultValue
|
|
142
|
+
* ```ts
|
|
143
|
+
* () => {}
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
onHidden: () => void;
|
|
147
|
+
/**
|
|
148
|
+
* Event to be triggered when the transition is completed and the modal is visible.
|
|
149
|
+
*
|
|
150
|
+
* @defaultValue
|
|
151
|
+
* ```ts
|
|
152
|
+
* () => {}
|
|
153
|
+
* ```
|
|
154
|
+
*/
|
|
155
|
+
onShown: () => void;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* State of the modal widget.
|
|
159
|
+
*/
|
|
160
|
+
export interface ModalState extends ModalCommonPropsAndState {
|
|
161
|
+
/**
|
|
162
|
+
* Whether the backdrop is fully hidden. This can be true either because {@link ModalProps.backdrop|backdrop} is false or
|
|
163
|
+
* because {@link ModalProps.visible|visible} is false and there is no current transition.
|
|
164
|
+
*/
|
|
165
|
+
backdropHidden: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the modal is fully hidden.
|
|
168
|
+
*/
|
|
169
|
+
hidden: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Whether there is an active transition to either display or hide the modal.
|
|
172
|
+
*/
|
|
173
|
+
transitioning: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* DOM element of the modal.
|
|
176
|
+
*/
|
|
177
|
+
modalElement: HTMLElement | null;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* API of the modal widget.
|
|
181
|
+
*/
|
|
182
|
+
export interface ModalApi {
|
|
183
|
+
/**
|
|
184
|
+
* Closes the modal with the given result.
|
|
185
|
+
*
|
|
186
|
+
* @param result - result of the modal, as passed in the {@link ModalBeforeCloseEvent.result|result} property of the event passed to the
|
|
187
|
+
* {@link ModalProps.onBeforeClose|onBeforeClose} event handler (and possibly changed by it) and resolved by the promise returned by the {@link ModalApi.open|open} method.
|
|
188
|
+
*/
|
|
189
|
+
close(result?: any): void;
|
|
190
|
+
/**
|
|
191
|
+
* Opens the modal and returns a promise that is resolved when the modal is closed.
|
|
192
|
+
* The resolved value is the result passed to the {@link ModalApi.close|close} method and possibly changed by the
|
|
193
|
+
* {@link ModalProps.onBeforeClose|onBeforeClose} event handler
|
|
194
|
+
*/
|
|
195
|
+
open(): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Method to change some modal properties.
|
|
198
|
+
*/
|
|
199
|
+
patch: ModalWidget['patch'];
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Directives of the modal widget.
|
|
203
|
+
*/
|
|
204
|
+
export interface ModalDirectives {
|
|
205
|
+
/**
|
|
206
|
+
* Directive to put on the modal DOM element.
|
|
207
|
+
*/
|
|
208
|
+
modalDirective: Directive;
|
|
209
|
+
/**
|
|
210
|
+
* Directive to put on the backdrop DOM element.
|
|
211
|
+
*/
|
|
212
|
+
backdropDirective: Directive;
|
|
213
|
+
/**
|
|
214
|
+
* Portal directive to put on the modal DOM element.
|
|
215
|
+
*/
|
|
216
|
+
modalPortalDirective: Directive;
|
|
217
|
+
/**
|
|
218
|
+
* Portal directive to put on the backdrop DOM element.
|
|
219
|
+
*/
|
|
220
|
+
backdropPortalDirective: Directive;
|
|
221
|
+
/**
|
|
222
|
+
* Directive that adds all the necessary attributes to the close button
|
|
223
|
+
*/
|
|
224
|
+
closeButtonDirective: Directive;
|
|
225
|
+
/**
|
|
226
|
+
* Directive to apply to the dialog element when using the native {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement | HTMLDialogElement}
|
|
227
|
+
*/
|
|
228
|
+
dialogDirective: Directive;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Modal widget.
|
|
232
|
+
*/
|
|
233
|
+
export type ModalWidget = Widget<ModalProps, ModalState, ModalApi, ModalDirectives>;
|
|
234
|
+
/**
|
|
235
|
+
* Returns a copy of the default modal config.
|
|
236
|
+
* @returns a copy of the default modal config
|
|
237
|
+
*/
|
|
238
|
+
export declare function getModalDefaultConfig(): ModalProps;
|
|
239
|
+
/**
|
|
240
|
+
* Creates a new modal widget instance.
|
|
241
|
+
* @param config$ - config of the modal, either as a store or as an object containing values or stores.
|
|
242
|
+
* @returns a new modal widget instance
|
|
243
|
+
*/
|
|
244
|
+
export declare const createModal: WidgetFactory<ModalWidget>;
|
|
245
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const pagination = require("../../pagination-xbcOHnhd.cjs");
|
|
4
|
+
exports.createPagination = pagination.createPagination;
|
|
5
|
+
exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pagination';
|