@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,383 @@
|
|
|
1
|
+
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
2
|
+
import type { Directive, Widget, WidgetFactory } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Options for displaying progress in a slider component.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProgressDisplayOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Right offset of the progress in %
|
|
9
|
+
*/
|
|
10
|
+
left: number | null;
|
|
11
|
+
/**
|
|
12
|
+
* Left offset of the progress in %
|
|
13
|
+
*/
|
|
14
|
+
right: number | null;
|
|
15
|
+
/**
|
|
16
|
+
* Top offset of the progress in %
|
|
17
|
+
*/
|
|
18
|
+
top: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* Bottom offset of the progress in %
|
|
21
|
+
*/
|
|
22
|
+
bottom: number | null;
|
|
23
|
+
/**
|
|
24
|
+
* Width of the progress in %
|
|
25
|
+
*/
|
|
26
|
+
width: number;
|
|
27
|
+
/**
|
|
28
|
+
* Height of the progress in %
|
|
29
|
+
*/
|
|
30
|
+
height: number;
|
|
31
|
+
/**
|
|
32
|
+
* Id of the progress
|
|
33
|
+
*/
|
|
34
|
+
id: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Options for displaying a handle in a slider component.
|
|
38
|
+
*/
|
|
39
|
+
export interface HandleDisplayOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Left offset of the handle in %
|
|
42
|
+
*/
|
|
43
|
+
left: number | null;
|
|
44
|
+
/**
|
|
45
|
+
* Top offset of the handle in %
|
|
46
|
+
*/
|
|
47
|
+
top: number | null;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Represents a handle in a slider component.
|
|
51
|
+
*/
|
|
52
|
+
export interface SliderHandle {
|
|
53
|
+
/**
|
|
54
|
+
* Value of the handle
|
|
55
|
+
*/
|
|
56
|
+
value: number;
|
|
57
|
+
/**
|
|
58
|
+
* Handle id
|
|
59
|
+
*/
|
|
60
|
+
id: number;
|
|
61
|
+
/**
|
|
62
|
+
* ariaLabel of the handle
|
|
63
|
+
*/
|
|
64
|
+
ariaLabel: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* ariaValueText of the handle
|
|
67
|
+
*/
|
|
68
|
+
ariaValueText: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* aria-labelledBy of the handle
|
|
71
|
+
*/
|
|
72
|
+
ariaLabelledBy: string | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Represents a tick in a slider component.
|
|
76
|
+
*/
|
|
77
|
+
export interface SliderTick {
|
|
78
|
+
/**
|
|
79
|
+
* CSS classes to be applied on the tick
|
|
80
|
+
*/
|
|
81
|
+
className?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Visualized optional explanation of the label
|
|
84
|
+
*/
|
|
85
|
+
legend?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Position of the tick in percent
|
|
88
|
+
*/
|
|
89
|
+
position: number;
|
|
90
|
+
/**
|
|
91
|
+
* If `true` the tick has selected style
|
|
92
|
+
*/
|
|
93
|
+
selected: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Value of the tick
|
|
96
|
+
*/
|
|
97
|
+
value: number;
|
|
98
|
+
/**
|
|
99
|
+
* If `true` the tick label is displayed
|
|
100
|
+
*/
|
|
101
|
+
displayLabel: boolean;
|
|
102
|
+
}
|
|
103
|
+
interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
104
|
+
/**
|
|
105
|
+
* Minimum value that can be assigned to the slider
|
|
106
|
+
*
|
|
107
|
+
* @defaultValue `0`
|
|
108
|
+
*/
|
|
109
|
+
min: number;
|
|
110
|
+
/**
|
|
111
|
+
* Maximum value that can be assigned to the slider
|
|
112
|
+
*
|
|
113
|
+
* @defaultValue `100`
|
|
114
|
+
*/
|
|
115
|
+
max: number;
|
|
116
|
+
/**
|
|
117
|
+
* Unit value between slider steps
|
|
118
|
+
*
|
|
119
|
+
* @defaultValue `1`
|
|
120
|
+
*/
|
|
121
|
+
stepSize: number;
|
|
122
|
+
/**
|
|
123
|
+
* If `true` slider value cannot be changed but the slider is still focusable
|
|
124
|
+
*
|
|
125
|
+
* @defaultValue `false`
|
|
126
|
+
*/
|
|
127
|
+
readonly: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* If `true` slider value cannot be changed and the slider cannot be focused
|
|
130
|
+
*
|
|
131
|
+
* @defaultValue `false`
|
|
132
|
+
*/
|
|
133
|
+
disabled: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* If `true` is vertically positioned otherwise it is horizontal
|
|
136
|
+
*
|
|
137
|
+
* @defaultValue `false`
|
|
138
|
+
*/
|
|
139
|
+
vertical: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Current slider values
|
|
142
|
+
*
|
|
143
|
+
* @defaultValue `[0]`
|
|
144
|
+
*/
|
|
145
|
+
values: number[];
|
|
146
|
+
/**
|
|
147
|
+
* If `true` the value labels are displayed on the slider
|
|
148
|
+
*
|
|
149
|
+
* @defaultValue `true`
|
|
150
|
+
*/
|
|
151
|
+
showValueLabels: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* If `true` the min and max labels are displayed on the slider
|
|
154
|
+
*
|
|
155
|
+
* @defaultValue `true`
|
|
156
|
+
*/
|
|
157
|
+
showMinMaxLabels: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* If `true` the ticks are displayed on the slider
|
|
160
|
+
*
|
|
161
|
+
* @defaultValue `false`
|
|
162
|
+
*/
|
|
163
|
+
showTicks: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* It `true` slider display is inversed
|
|
166
|
+
*
|
|
167
|
+
* @defaultValue `false`
|
|
168
|
+
*/
|
|
169
|
+
rtl: boolean;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Represents the state of a slider component.
|
|
173
|
+
*/
|
|
174
|
+
export interface SliderState extends SliderCommonPropsAndState {
|
|
175
|
+
/**
|
|
176
|
+
* Sorted slider values
|
|
177
|
+
*/
|
|
178
|
+
sortedValues: number[];
|
|
179
|
+
/**
|
|
180
|
+
* Combined label left offset in %
|
|
181
|
+
*/
|
|
182
|
+
combinedLabelPositionLeft: number;
|
|
183
|
+
/**
|
|
184
|
+
* Combined label top offset in %
|
|
185
|
+
*/
|
|
186
|
+
combinedLabelPositionTop: number;
|
|
187
|
+
/**
|
|
188
|
+
* If true, the minimum label will be visible
|
|
189
|
+
*/
|
|
190
|
+
minValueLabelDisplay: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* If true, the maximum label will be visible
|
|
193
|
+
*/
|
|
194
|
+
maxValueLabelDisplay: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* If true, the label when the handles are close is visible
|
|
197
|
+
*/
|
|
198
|
+
combinedLabelDisplay: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* Array of the sorted handles to display
|
|
201
|
+
*/
|
|
202
|
+
sortedHandles: SliderHandle[];
|
|
203
|
+
/**
|
|
204
|
+
* Array of objects representing progress display options
|
|
205
|
+
*/
|
|
206
|
+
progressDisplayOptions: ProgressDisplayOptions[];
|
|
207
|
+
/**
|
|
208
|
+
* Array of objects representing handle display options
|
|
209
|
+
*/
|
|
210
|
+
handleDisplayOptions: HandleDisplayOptions[];
|
|
211
|
+
/**
|
|
212
|
+
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
213
|
+
*/
|
|
214
|
+
interactive: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Array of ticks to display on the slider component
|
|
217
|
+
*/
|
|
218
|
+
ticks: SliderTick[];
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Interface representing the properties for the Slider component.
|
|
222
|
+
*/
|
|
223
|
+
export interface SliderProps extends SliderCommonPropsAndState {
|
|
224
|
+
/**
|
|
225
|
+
* Return the value for the 'aria-label' attribute for the handle
|
|
226
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
227
|
+
*
|
|
228
|
+
* @defaultValue
|
|
229
|
+
* ```ts
|
|
230
|
+
* () => 'Value'
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
ariaLabel: (sortedIndex: number) => string;
|
|
234
|
+
/**
|
|
235
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
236
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
237
|
+
*
|
|
238
|
+
* @defaultValue
|
|
239
|
+
* ```ts
|
|
240
|
+
* () => ''
|
|
241
|
+
* ```
|
|
242
|
+
*/
|
|
243
|
+
ariaLabelledBy: (sortedIndex: number) => string;
|
|
244
|
+
/**
|
|
245
|
+
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
246
|
+
* @param value - value of the handle
|
|
247
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
248
|
+
*
|
|
249
|
+
* @defaultValue
|
|
250
|
+
* ```ts
|
|
251
|
+
* () => ''
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
ariaValueText: (value: number, sortedIndex: number) => string;
|
|
255
|
+
/**
|
|
256
|
+
* An event emitted when slider values are changed
|
|
257
|
+
*
|
|
258
|
+
* Event payload equals to the updated slider values
|
|
259
|
+
*
|
|
260
|
+
* @defaultValue
|
|
261
|
+
* ```ts
|
|
262
|
+
* () => {}
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
onValuesChange: (values: number[]) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Unit value between the ticks
|
|
268
|
+
* If value is set to `0` the {@link stepSize} is used to space the ticks
|
|
269
|
+
*
|
|
270
|
+
* @defaultValue `0`
|
|
271
|
+
*/
|
|
272
|
+
tickInterval: number;
|
|
273
|
+
/**
|
|
274
|
+
* If `true` the tick values are displayed on the slider
|
|
275
|
+
*
|
|
276
|
+
* @defaultValue `true`
|
|
277
|
+
*/
|
|
278
|
+
showTickValues: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Minimum distance between two values.
|
|
281
|
+
* When set to 0, no minimum distance constraint is applied.
|
|
282
|
+
*
|
|
283
|
+
* @defaultValue `0`
|
|
284
|
+
*/
|
|
285
|
+
minRange: number;
|
|
286
|
+
/**
|
|
287
|
+
* Maximum distance between two values
|
|
288
|
+
* When set to 0, no maximum distance constraint is applied.
|
|
289
|
+
*
|
|
290
|
+
* @defaultValue `0`
|
|
291
|
+
*/
|
|
292
|
+
maxRange: number;
|
|
293
|
+
/**
|
|
294
|
+
* When true, if moving a value would break the minRange or maxRange constraint,
|
|
295
|
+
* it will instead push or pull the neighboring values to keep the allowed range rather than just stopping.
|
|
296
|
+
*
|
|
297
|
+
* @defaultValue `false`
|
|
298
|
+
*/
|
|
299
|
+
pushRange: boolean;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Interface representing various directives used in the slider component.
|
|
303
|
+
*/
|
|
304
|
+
export interface SliderDirectives {
|
|
305
|
+
/**
|
|
306
|
+
* Directive to get the slider component elementRef
|
|
307
|
+
*/
|
|
308
|
+
sliderDirective: Directive;
|
|
309
|
+
/**
|
|
310
|
+
* Directive to apply to the slider container wrapping the slider content
|
|
311
|
+
*/
|
|
312
|
+
containerDirective: Directive;
|
|
313
|
+
/**
|
|
314
|
+
* Directive used to style the progress display for each handle
|
|
315
|
+
*/
|
|
316
|
+
progressDisplayDirective: Directive<{
|
|
317
|
+
option: ProgressDisplayOptions;
|
|
318
|
+
}>;
|
|
319
|
+
/**
|
|
320
|
+
* Directive to apply to the slider clickable area, to directly move the handle to a given specific position
|
|
321
|
+
*/
|
|
322
|
+
clickableAreaDirective: Directive;
|
|
323
|
+
/**
|
|
324
|
+
* Directive to apply handle events handlers
|
|
325
|
+
*/
|
|
326
|
+
handleEventsDirective: Directive<{
|
|
327
|
+
item: {
|
|
328
|
+
id: number;
|
|
329
|
+
};
|
|
330
|
+
}>;
|
|
331
|
+
/**
|
|
332
|
+
* Directive to apply to the slider handle if any
|
|
333
|
+
*/
|
|
334
|
+
handleDirective: Directive<{
|
|
335
|
+
item: SliderHandle;
|
|
336
|
+
}>;
|
|
337
|
+
/**
|
|
338
|
+
* Directive to get the minLabel elementRef
|
|
339
|
+
*/
|
|
340
|
+
minLabelDirective: Directive;
|
|
341
|
+
/**
|
|
342
|
+
* Directive to get the maxLabel elementRef
|
|
343
|
+
*/
|
|
344
|
+
maxLabelDirective: Directive;
|
|
345
|
+
/**
|
|
346
|
+
* Directive to apply to the handle when combined label display is active
|
|
347
|
+
*/
|
|
348
|
+
combinedHandleLabelDisplayDirective: Directive;
|
|
349
|
+
/**
|
|
350
|
+
* Directive to apply to the handle when combined label display is not active
|
|
351
|
+
*/
|
|
352
|
+
handleLabelDisplayDirective: Directive<{
|
|
353
|
+
index: number;
|
|
354
|
+
}>;
|
|
355
|
+
/**
|
|
356
|
+
* Directive to apply to the slider tick
|
|
357
|
+
*/
|
|
358
|
+
tickDirective: Directive<{
|
|
359
|
+
tick: SliderTick;
|
|
360
|
+
}>;
|
|
361
|
+
/**
|
|
362
|
+
* Directive to apply to the slider tick label
|
|
363
|
+
*/
|
|
364
|
+
tickLabelDirective: Directive<{
|
|
365
|
+
tick: SliderTick;
|
|
366
|
+
}>;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Represents a slider widget component.
|
|
370
|
+
*/
|
|
371
|
+
export type SliderWidget = Widget<SliderProps, SliderState, object, SliderDirectives>;
|
|
372
|
+
/**
|
|
373
|
+
* Returns a shallow copy of the default slider config.
|
|
374
|
+
* @returns a copy of the default config
|
|
375
|
+
*/
|
|
376
|
+
export declare function getSliderDefaultConfig(): SliderProps;
|
|
377
|
+
/**
|
|
378
|
+
* Create a slider widget with given config props
|
|
379
|
+
* @param config - an optional slider config
|
|
380
|
+
* @returns a SliderWidget
|
|
381
|
+
*/
|
|
382
|
+
export declare const createSlider: WidgetFactory<SliderWidget>;
|
|
383
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const toaster = require("../../toaster-BQWqxYv-.cjs");
|
|
4
|
+
exports.Toaster = toaster.Toaster;
|
|
5
|
+
exports.createToast = toaster.createToast;
|
|
6
|
+
exports.defaultToasterProps = toaster.defaultToasterProps;
|
|
7
|
+
exports.getToastDefaultConfig = toaster.getToastDefaultConfig;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Directive, Widget, WidgetFactory } from '../../types';
|
|
2
|
+
import type { CommonAlertApi, CommonAlertDirectives, CommonAlertProps, CommonAlertState } from '../alert/common';
|
|
3
|
+
interface ToastExtraProps {
|
|
4
|
+
/**
|
|
5
|
+
* If `true` automatically hides the toast after the delay.
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue `true`
|
|
8
|
+
*/
|
|
9
|
+
autoHide: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Delay in milliseconds before hiding the toast.
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue `5000`
|
|
14
|
+
*/
|
|
15
|
+
delay: number;
|
|
16
|
+
}
|
|
17
|
+
interface ExtraDirectives {
|
|
18
|
+
/**
|
|
19
|
+
* Directive that handles the autohide of the toast component
|
|
20
|
+
*/
|
|
21
|
+
autoHideDirective: Directive;
|
|
22
|
+
/**
|
|
23
|
+
* Directive that adds all the necessary attributes to the body
|
|
24
|
+
*/
|
|
25
|
+
bodyDirective: Directive;
|
|
26
|
+
/**
|
|
27
|
+
* Directive that adds all the necessary attributes to the close button depending on the presence of the header
|
|
28
|
+
*/
|
|
29
|
+
closeButtonDirective: Directive;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Represents the state of a toast component.
|
|
33
|
+
*/
|
|
34
|
+
export interface ToastState extends CommonAlertState, ToastExtraProps {
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Represents the properties for the toast component.
|
|
38
|
+
*/
|
|
39
|
+
export interface ToastProps extends CommonAlertProps, ToastExtraProps {
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Represents the API for the toast component.
|
|
43
|
+
*/
|
|
44
|
+
export interface ToastApi extends CommonAlertApi {
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Interface representing the directives for a toast component.
|
|
48
|
+
*/
|
|
49
|
+
export interface ToastDirectives extends CommonAlertDirectives, ExtraDirectives {
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents a toast widget with specific properties, state, API, and directives.
|
|
53
|
+
*/
|
|
54
|
+
export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectives>;
|
|
55
|
+
/**
|
|
56
|
+
* Retrieve a shallow copy of the default toast config
|
|
57
|
+
* @returns the default toast config
|
|
58
|
+
*/
|
|
59
|
+
export declare function getToastDefaultConfig(): ToastProps;
|
|
60
|
+
/**
|
|
61
|
+
* Create a ToastWidget with given config props
|
|
62
|
+
* @param config - an optional toast config
|
|
63
|
+
* @returns a ToastWidget
|
|
64
|
+
*/
|
|
65
|
+
export declare const createToast: WidgetFactory<ToastWidget>;
|
|
66
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { type ToastProps } from './toast';
|
|
2
|
+
import type { Directive } from '../../types';
|
|
3
|
+
import type { ReadableSignal, WritableSignal } from '@amadeus-it-group/tansu';
|
|
4
|
+
/**
|
|
5
|
+
* Represents the possible positions for displaying a toast notification.
|
|
6
|
+
*
|
|
7
|
+
* The positions are defined based on a grid layout with three horizontal
|
|
8
|
+
* alignments (left, center, right) and three vertical alignments (top, middle, bottom).
|
|
9
|
+
*
|
|
10
|
+
* Available positions:
|
|
11
|
+
* - `topLeft`: Top-left corner of the screen.
|
|
12
|
+
* - `topCenter`: Top-center of the screen.
|
|
13
|
+
* - `topRight`: Top-right corner of the screen.
|
|
14
|
+
* - `middleLeft`: Middle-left side of the screen.
|
|
15
|
+
* - `middleCenter`: Center of the screen.
|
|
16
|
+
* - `middleRight`: Middle-right side of the screen.
|
|
17
|
+
* - `bottomLeft`: Bottom-left corner of the screen.
|
|
18
|
+
* - `bottomCenter`: Bottom-center of the screen.
|
|
19
|
+
* - `bottomRight`: Bottom-right corner of the screen.
|
|
20
|
+
*/
|
|
21
|
+
export type ToastPositions = 'topLeft' | 'topCenter' | 'topRight' | 'middleLeft' | 'middleCenter' | 'middleRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
22
|
+
/**
|
|
23
|
+
* Props of the toaster
|
|
24
|
+
*/
|
|
25
|
+
export interface ToasterProps {
|
|
26
|
+
/** How much time (ms) a toast is displayed; 0 means it won't be removed until a manual action */
|
|
27
|
+
duration: number;
|
|
28
|
+
/** Where to position the toasts */
|
|
29
|
+
position: ToastPositions;
|
|
30
|
+
/** Maximum number of toasts displayed */
|
|
31
|
+
limit?: number;
|
|
32
|
+
/** Pause toast when hover */
|
|
33
|
+
pauseOnHover?: boolean;
|
|
34
|
+
/** Display a dismiss button on each toast. When duration = 0, this is enforced to true */
|
|
35
|
+
dismissible: boolean;
|
|
36
|
+
/** Add a button to close all the toasts at once */
|
|
37
|
+
closeAll?: boolean;
|
|
38
|
+
/** Close all label */
|
|
39
|
+
closeAllLabel?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Toast object
|
|
43
|
+
* @template Props Type of the toast properties.
|
|
44
|
+
*/
|
|
45
|
+
export interface ToasterToast<Props> {
|
|
46
|
+
/** Identifier of the toasts in the toaster */
|
|
47
|
+
id: number;
|
|
48
|
+
/** Properties of the toast */
|
|
49
|
+
props: Props;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Represents a timer used by the toaster service.
|
|
53
|
+
*/
|
|
54
|
+
export interface ToasterTimer {
|
|
55
|
+
/**
|
|
56
|
+
* The timeout identifier returned by `setTimeout`.
|
|
57
|
+
*/
|
|
58
|
+
timeout: ReturnType<typeof setTimeout> | null;
|
|
59
|
+
/**
|
|
60
|
+
* The timestamp when the timer was started.
|
|
61
|
+
*/
|
|
62
|
+
started: number;
|
|
63
|
+
/**
|
|
64
|
+
* The timestamp when the timer was paused (optional).
|
|
65
|
+
*/
|
|
66
|
+
paused?: number;
|
|
67
|
+
/**
|
|
68
|
+
* The duration for which the timer is set (optional). Used internally to compute the remaining time.
|
|
69
|
+
*/
|
|
70
|
+
duration: number;
|
|
71
|
+
}
|
|
72
|
+
export declare const defaultToasterProps: ToasterProps;
|
|
73
|
+
/**
|
|
74
|
+
* Create a toaster provider with helpers and state.
|
|
75
|
+
* @param props Options for the toaster.
|
|
76
|
+
* @template Props Type of the toast properties.
|
|
77
|
+
*/
|
|
78
|
+
export declare class Toaster<Props extends Partial<ToastProps> = ToastProps> {
|
|
79
|
+
#private;
|
|
80
|
+
/**
|
|
81
|
+
* Get the toasts value from the store
|
|
82
|
+
* @returns The array of toasts.
|
|
83
|
+
*/
|
|
84
|
+
readonly toasts: ReadableSignal<ToasterToast<Props>[]>;
|
|
85
|
+
readonly options: WritableSignal<ToasterProps>;
|
|
86
|
+
/**
|
|
87
|
+
* Get the timers value from the store
|
|
88
|
+
* @returns The map of timers.
|
|
89
|
+
*/
|
|
90
|
+
get timers(): ReadonlyMap<number, ToasterTimer>;
|
|
91
|
+
constructor(props?: Partial<ToasterProps>);
|
|
92
|
+
/**
|
|
93
|
+
* Add timer for a toast
|
|
94
|
+
* @param id Id of the toast
|
|
95
|
+
* @param duration Duration of the timer, by default taken from options
|
|
96
|
+
*/
|
|
97
|
+
readonly addTimer: (id: number, duration?: number) => void;
|
|
98
|
+
/**
|
|
99
|
+
* Pause a timer for a toast
|
|
100
|
+
* @param id Id of the toast
|
|
101
|
+
*/
|
|
102
|
+
readonly pauseTimer: (id: number) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Resume a timer for a toast
|
|
105
|
+
* @param id Id of the toast
|
|
106
|
+
*/
|
|
107
|
+
readonly resumeTimer: (id: number) => void;
|
|
108
|
+
/**
|
|
109
|
+
* Events directive is used to set events on the Toast component, to keep track for example of pointer enter/leave,
|
|
110
|
+
* used to pause / resume the timer in case of duration and pauseOnHover are specified.
|
|
111
|
+
*/
|
|
112
|
+
readonly eventsDirective: Directive<number>;
|
|
113
|
+
/**
|
|
114
|
+
* Helper to add a toast to the viewport.
|
|
115
|
+
* @param props Options for the toast.
|
|
116
|
+
* @returns The ID of the added toast.
|
|
117
|
+
*/
|
|
118
|
+
readonly addToast: (props: Props) => number;
|
|
119
|
+
/**
|
|
120
|
+
* Helper to remove a toast to the viewport.
|
|
121
|
+
* @param id Id of the toast to remove.
|
|
122
|
+
*/
|
|
123
|
+
readonly removeToast: (id: number) => void;
|
|
124
|
+
/** Helper to update toasts when options change */
|
|
125
|
+
readonly updateToasts: () => void;
|
|
126
|
+
/** Helper to close all toasts at once */
|
|
127
|
+
readonly closeAll: () => void;
|
|
128
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tree';
|