@design-factory/core 21.1.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +3 -0
  2. package/accordion-B0vs8JWM.cjs +314 -0
  3. package/accordion-D9ba0XYq.js +315 -0
  4. package/alert-AhaliJ17.cjs +9 -0
  5. package/alert-Cb9FhbFQ.js +10 -0
  6. package/collapse-Bn8iHKrd.js +95 -0
  7. package/collapse-BnWw4Hnc.cjs +94 -0
  8. package/common-B5jS-Ih_.cjs +73 -0
  9. package/common-DFyZvkII.js +74 -0
  10. package/components/accordion/accordion.d.ts +333 -0
  11. package/components/accordion/index.cjs +7 -0
  12. package/components/accordion/index.d.ts +1 -0
  13. package/components/accordion/index.js +7 -0
  14. package/components/alert/alert.d.ts +37 -0
  15. package/components/alert/common.d.ts +138 -0
  16. package/components/alert/index.cjs +5 -0
  17. package/components/alert/index.d.ts +1 -0
  18. package/components/alert/index.js +5 -0
  19. package/components/carousel/carousel.d.ts +247 -0
  20. package/components/carousel/index.cjs +292 -0
  21. package/components/carousel/index.d.ts +1 -0
  22. package/components/carousel/index.js +292 -0
  23. package/components/collapse/collapse.d.ts +135 -0
  24. package/components/collapse/index.cjs +5 -0
  25. package/components/collapse/index.d.ts +1 -0
  26. package/components/collapse/index.js +5 -0
  27. package/components/commonProps.d.ts +11 -0
  28. package/components/drawer/drawer.d.ts +279 -0
  29. package/components/drawer/index.cjs +5 -0
  30. package/components/drawer/index.d.ts +1 -0
  31. package/components/drawer/index.js +5 -0
  32. package/components/modal/index.cjs +8 -0
  33. package/components/modal/index.d.ts +1 -0
  34. package/components/modal/index.js +8 -0
  35. package/components/modal/modal.d.ts +245 -0
  36. package/components/pagination/index.cjs +5 -0
  37. package/components/pagination/index.d.ts +1 -0
  38. package/components/pagination/index.js +5 -0
  39. package/components/pagination/pagination.d.ts +313 -0
  40. package/components/progressbar/index.cjs +5 -0
  41. package/components/progressbar/index.d.ts +1 -0
  42. package/components/progressbar/index.js +5 -0
  43. package/components/progressbar/progressbar.d.ts +91 -0
  44. package/components/rating/index.cjs +5 -0
  45. package/components/rating/index.d.ts +1 -0
  46. package/components/rating/index.js +5 -0
  47. package/components/rating/rating.d.ts +191 -0
  48. package/components/slider/index.cjs +5 -0
  49. package/components/slider/index.d.ts +1 -0
  50. package/components/slider/index.js +5 -0
  51. package/components/slider/slider-utils.d.ts +25 -0
  52. package/components/slider/slider.d.ts +383 -0
  53. package/components/toast/index.cjs +7 -0
  54. package/components/toast/index.d.ts +2 -0
  55. package/components/toast/index.js +7 -0
  56. package/components/toast/toast.d.ts +66 -0
  57. package/components/toast/toaster.d.ts +128 -0
  58. package/components/tree/index.cjs +5 -0
  59. package/components/tree/index.d.ts +1 -0
  60. package/components/tree/index.js +5 -0
  61. package/components/tree/tree.d.ts +143 -0
  62. package/config.cjs +36 -0
  63. package/config.d.ts +117 -0
  64. package/config.js +36 -0
  65. package/directive-CNNSo5Yn.js +524 -0
  66. package/directive-DyTodNPd.cjs +523 -0
  67. package/drawer-BIIfJa0F.js +329 -0
  68. package/drawer-C8ojtwIn.cjs +328 -0
  69. package/index.cjs +134 -0
  70. package/index.d.ts +29 -0
  71. package/index.js +134 -0
  72. package/isFocusable-Ckwus82R.js +32 -0
  73. package/isFocusable-DfzDLeAN.cjs +31 -0
  74. package/modal-C13G13jV.js +253 -0
  75. package/modal-DWv0VqiG.cjs +252 -0
  76. package/package.json +56 -0
  77. package/pagination-BLVa1UsZ.cjs +254 -0
  78. package/pagination-BQWusWXN.js +255 -0
  79. package/progressbar-RopgvVeA.cjs +86 -0
  80. package/progressbar-S1pNn5rM.js +87 -0
  81. package/promise-CxCD3NYv.cjs +118 -0
  82. package/promise-D-RZVPuv.js +119 -0
  83. package/rating-DWgGgwk3.js +184 -0
  84. package/rating-DZ3OQgtt.cjs +183 -0
  85. package/scrollbars-CT87iv_6.cjs +30 -0
  86. package/scrollbars-CcxSrnCx.js +31 -0
  87. package/services/extendWidget.cjs +41 -0
  88. package/services/extendWidget.d.ts +31 -0
  89. package/services/extendWidget.js +41 -0
  90. package/services/floatingUI.cjs +111 -0
  91. package/services/floatingUI.d.ts +76 -0
  92. package/services/floatingUI.js +111 -0
  93. package/services/focusElement.cjs +46 -0
  94. package/services/focusElement.d.ts +9 -0
  95. package/services/focusElement.js +46 -0
  96. package/services/focustrack.cjs +47 -0
  97. package/services/focustrack.d.ts +40 -0
  98. package/services/focustrack.js +47 -0
  99. package/services/hash.cjs +15 -0
  100. package/services/hash.d.ts +3 -0
  101. package/services/hash.js +15 -0
  102. package/services/intersection.cjs +53 -0
  103. package/services/intersection.d.ts +30 -0
  104. package/services/intersection.js +53 -0
  105. package/services/matchMedia.cjs +14 -0
  106. package/services/matchMedia.d.ts +8 -0
  107. package/services/matchMedia.js +14 -0
  108. package/services/navManager.cjs +166 -0
  109. package/services/navManager.d.ts +144 -0
  110. package/services/navManager.js +166 -0
  111. package/services/pointerdownPosition.cjs +60 -0
  112. package/services/pointerdownPosition.d.ts +42 -0
  113. package/services/pointerdownPosition.js +60 -0
  114. package/services/portal.cjs +42 -0
  115. package/services/portal.d.ts +16 -0
  116. package/services/portal.js +42 -0
  117. package/services/resizeObserver.cjs +54 -0
  118. package/services/resizeObserver.d.ts +18 -0
  119. package/services/resizeObserver.js +54 -0
  120. package/services/siblingsInert.cjs +44 -0
  121. package/services/siblingsInert.d.ts +16 -0
  122. package/services/siblingsInert.js +44 -0
  123. package/services/transitions/baseTransitions.cjs +186 -0
  124. package/services/transitions/baseTransitions.d.ts +166 -0
  125. package/services/transitions/baseTransitions.js +186 -0
  126. package/services/transitions/collapse.cjs +40 -0
  127. package/services/transitions/collapse.d.ts +49 -0
  128. package/services/transitions/collapse.js +40 -0
  129. package/services/transitions/cssTransitions.cjs +32 -0
  130. package/services/transitions/cssTransitions.d.ts +25 -0
  131. package/services/transitions/cssTransitions.js +32 -0
  132. package/services/transitions/simpleClassTransition.cjs +37 -0
  133. package/services/transitions/simpleClassTransition.d.ts +47 -0
  134. package/services/transitions/simpleClassTransition.js +37 -0
  135. package/slider-Br_Qiopx.js +808 -0
  136. package/slider-pgDq1V5r.cjs +807 -0
  137. package/textDirection-cNgt24LJ.js +4 -0
  138. package/textDirection-zqcZ5-eK.cjs +3 -0
  139. package/toaster-BUBzFeJM.js +162 -0
  140. package/toaster-Dlube4Ya.cjs +161 -0
  141. package/tree-Chcy4ulJ.cjs +228 -0
  142. package/tree-vD7ZkV8Z.js +229 -0
  143. package/types.cjs +6 -0
  144. package/types.d.ts +246 -0
  145. package/types.js +6 -0
  146. package/utils/directive.cjs +28 -0
  147. package/utils/directive.d.ts +352 -0
  148. package/utils/directive.js +28 -0
  149. package/utils/func.cjs +7 -0
  150. package/utils/func.d.ts +11 -0
  151. package/utils/func.js +7 -0
  152. package/utils/id.cjs +5 -0
  153. package/utils/id.d.ts +6 -0
  154. package/utils/id.js +5 -0
  155. package/utils/internal/assign.d.ts +10 -0
  156. package/utils/internal/checks.d.ts +57 -0
  157. package/utils/internal/dom.d.ts +75 -0
  158. package/utils/internal/isFocusable.d.ts +9 -0
  159. package/utils/internal/math.d.ts +5 -0
  160. package/utils/internal/promise.d.ts +98 -0
  161. package/utils/internal/scrollbars.d.ts +8 -0
  162. package/utils/internal/sort.d.ts +16 -0
  163. package/utils/internal/ssrHTMLElement.d.ts +17 -0
  164. package/utils/internal/textDirection.d.ts +7 -0
  165. package/utils/internal/traversal.d.ts +54 -0
  166. package/utils/stores.cjs +172 -0
  167. package/utils/stores.d.ts +224 -0
  168. package/utils/stores.js +172 -0
  169. package/utils/widget.cjs +8 -0
  170. package/utils/widget.d.ts +11 -0
  171. package/utils/widget.js +8 -0
  172. package/utils/writables.cjs +16 -0
  173. package/utils/writables.d.ts +95 -0
  174. package/utils/writables.js +16 -0
  175. package/writables-DYGjj5T3.js +103 -0
  176. package/writables-Dt68gADJ.cjs +102 -0
@@ -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-BLVa1UsZ.cjs");
4
+ exports.createPagination = pagination.createPagination;
5
+ exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
@@ -0,0 +1 @@
1
+ export * from './pagination';
@@ -0,0 +1,5 @@
1
+ import { c, g } from "../../pagination-BQWusWXN.js";
2
+ export {
3
+ c as createPagination,
4
+ g as getPaginationDefaultConfig
5
+ };
@@ -0,0 +1,313 @@
1
+ import type { Widget, Directive, WidgetFactory } from '../../types';
2
+ import type { WidgetsCommonPropsAndState } from '../commonProps';
3
+ /**
4
+ * Interface representing the common properties and state for a pagination component.
5
+ */
6
+ interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
7
+ /**
8
+ * The current page.
9
+ *
10
+ * Page numbers start with `1`.
11
+ *
12
+ * @defaultValue `1`
13
+ */
14
+ page: number;
15
+ /**
16
+ * The label for the nav element.
17
+ *
18
+ * for I18n, we suggest to use the global configuration
19
+ * override any configuration parameters provided for this
20
+ *
21
+ * @defaultValue `'Page navigation'`
22
+ */
23
+ ariaLabel: string;
24
+ /**
25
+ * The label for the "active" page.
26
+ * for I18n, we suggest to use the global configuration
27
+ * override any configuration parameters provided for this
28
+ *
29
+ * @defaultValue
30
+ * ```ts
31
+ * '(current)'
32
+ * ```
33
+ */
34
+ activeLabel: string;
35
+ /**
36
+ * The label for the "First" page button.
37
+ * for I18n, we suggest to use the global configuration
38
+ * override any configuration parameters provided for this
39
+ *
40
+ * @defaultValue
41
+ * ```ts
42
+ * 'Action link for first page'
43
+ * ```
44
+ */
45
+ ariaFirstLabel: string;
46
+ /**
47
+ * The label for the "Previous" page button.
48
+ * for I18n, we suggest to use the global configuration
49
+ * override any configuration parameters provided for this
50
+ *
51
+ * @defaultValue
52
+ * ```ts
53
+ * 'Action link for previous page'
54
+ * ```
55
+ */
56
+ ariaPreviousLabel: string;
57
+ /**
58
+ * The label for the "Next" page button.
59
+ * for I18n, we suggest to use the global configuration
60
+ * override any configuration parameters provided for this
61
+ *
62
+ * @defaultValue
63
+ * ```ts
64
+ * 'Action link for next page'
65
+ * ```
66
+ */
67
+ ariaNextLabel: string;
68
+ /**
69
+ * The label for the "Last" page button.
70
+ * for I18n, we suggest to use the global configuration
71
+ * override any configuration parameters provided for this
72
+ *
73
+ * @defaultValue
74
+ * ```ts
75
+ * 'Action link for last page'
76
+ * ```
77
+ */
78
+ ariaLastLabel: string;
79
+ /**
80
+ * The label for the "Ellipsis" page.
81
+ * for I18n, we suggest to use the global configuration
82
+ * override any configuration parameters provided for this
83
+ *
84
+ * @defaultValue `'Ellipsis page element'`
85
+ */
86
+ ariaEllipsisLabel: string;
87
+ /**
88
+ * If `true`, pagination links will be disabled.
89
+ *
90
+ * @defaultValue `false`
91
+ */
92
+ disabled: boolean;
93
+ /**
94
+ * If `true`, the "Next" and "Previous" page links are shown.
95
+ *
96
+ * @defaultValue `true`
97
+ */
98
+ directionLinks: boolean;
99
+ /**
100
+ * If `true`, the "First" and "Last" page links are shown.
101
+ *
102
+ * @defaultValue `false`
103
+ */
104
+ boundaryLinks: boolean;
105
+ }
106
+ /**
107
+ * Interface representing the properties for the Pagination component.
108
+ */
109
+ export interface PaginationProps extends PaginationCommonPropsAndState {
110
+ /**
111
+ * The number of items in your paginated collection.
112
+ *
113
+ * Note, that this is not the number of pages. Page numbers are calculated dynamically based on
114
+ * `collectionSize` and `pageSize`.
115
+ *
116
+ * Ex. if you have 100 items in your collection and displaying 20 items per page, you'll end up with 5 pages.
117
+ *
118
+ * Whatever the collectionSize the page number is of minimum 1.
119
+ *
120
+ * @defaultValue `0`
121
+ */
122
+ collectionSize: number;
123
+ /**
124
+ * The number of items per page.
125
+ * @remarks min value is 1
126
+ *
127
+ * @defaultValue `10`
128
+ */
129
+ pageSize: number;
130
+ /**
131
+ * An event fired when the page is changed.
132
+ *
133
+ * Event payload is the number of the newly selected page.
134
+ *
135
+ * Page numbers start with `1`.
136
+ * @defaultValue
137
+ * ```ts
138
+ * () => {}
139
+ * ```
140
+ */
141
+ onPageChange: (page: number) => void;
142
+ /**
143
+ * pagesFactory returns a function computing the array of pages to be displayed
144
+ * as number (-1 are treated as ellipsis).
145
+ * @param page - The current page number
146
+ * @param pageCount - The total number of pages
147
+ *
148
+ * @defaultValue
149
+ * ```ts
150
+ * (_page: number, pageCount: number) => {
151
+ * const pages: number[] = [];
152
+ * for (let i = 1; i <= pageCount; i++) {
153
+ * pages.push(i);
154
+ * }
155
+ * return pages;
156
+ * }
157
+ * ```
158
+ */
159
+ pagesFactory: (page: number, pageCount: number) => number[];
160
+ /**
161
+ * Provide the label for each "Page" page button.
162
+ * This is used for accessibility purposes.
163
+ * for I18n, we suggest to use the global configuration
164
+ * override any configuration parameters provided for this
165
+ * @param processPage - The current page number
166
+ * @param pageCount - The total number of pages
167
+ *
168
+ * @defaultValue
169
+ * ```ts
170
+ * (processPage: number, pageCount: number) => `Page ${processPage} of ${pageCount}`
171
+ * ```
172
+ */
173
+ ariaPageLabel: (processPage: number, pageCount: number) => string;
174
+ /**
175
+ * Provide the label for the aria-live element
176
+ * This is used for accessibility purposes.
177
+ * for I18n, we suggest to use the global configuration
178
+ * override any configuration parameters provided for this
179
+ * @param currentPage - The current page number
180
+ * @param pageCount - The total number of pages
181
+ *
182
+ * @defaultValue
183
+ * ```ts
184
+ * (currentPage: number) => `Current page is ${currentPage}`
185
+ * ```
186
+ */
187
+ ariaLiveLabel: (currentPage: number, pageCount: number) => string;
188
+ /**
189
+ * Factory function providing the href for a "Page" page anchor,
190
+ * based on the current page number
191
+ * @param pageNumber - The index to use in the link
192
+ *
193
+ * @defaultValue
194
+ * ```ts
195
+ * (_page: number) => PAGE_LINK_DEFAULT
196
+ * ```
197
+ */
198
+ pageLink: (pageNumber: number) => string;
199
+ }
200
+ /**
201
+ * Interface representing the hrefs for pagination navigation links.
202
+ */
203
+ export interface DirectionsHrefs {
204
+ /**
205
+ * The href for the 'Previous' navigation link
206
+ */
207
+ previous: string;
208
+ /**
209
+ * The href for the 'Next' direction link
210
+ */
211
+ next: string;
212
+ }
213
+ /**
214
+ * Represents the state of the pagination component.
215
+ */
216
+ export interface PaginationState extends PaginationCommonPropsAndState {
217
+ /**
218
+ * The number of pages.
219
+ */
220
+ pageCount: number;
221
+ /**
222
+ * The current pages, the number in the Array is the number of the page.
223
+ */
224
+ pages: number[];
225
+ /**
226
+ * true if the previous link need to be disabled
227
+ */
228
+ previousDisabled: boolean;
229
+ /**
230
+ * true if the next link need to be disabled
231
+ */
232
+ nextDisabled: boolean;
233
+ /**
234
+ * The label for each "Page" page link.
235
+ */
236
+ pagesLabel: string[];
237
+ /** The hrefs for each "Page" page link */
238
+ pagesHrefs: string[];
239
+ /** The hrefs for the direction links */
240
+ directionsHrefs: DirectionsHrefs;
241
+ /** The aria-live text */
242
+ ariaLiveLabelText: string;
243
+ }
244
+ /**
245
+ * Interface representing pagination API for navigating through pages.
246
+ */
247
+ export interface PaginationApi {
248
+ /**
249
+ * To "go" to a specific page
250
+ * @param page - The page number to select
251
+ */
252
+ select(page: number): void;
253
+ /**
254
+ * To "go" to the first page
255
+ */
256
+ first(): void;
257
+ /**
258
+ * To "go" to the previous page
259
+ */
260
+ previous(): void;
261
+ /**
262
+ * To "go" to the next page
263
+ */
264
+ next(): void;
265
+ /**
266
+ * To "go" to the last page
267
+ */
268
+ last(): void;
269
+ }
270
+ /**
271
+ * Interface representing the directives for pagination components.
272
+ */
273
+ export interface PaginationDirectives {
274
+ /**
275
+ * A directive to be applied to each page link
276
+ * This will handle the click, tabindex and aria attributes
277
+ */
278
+ pageLink: Directive<{
279
+ page: number;
280
+ }>;
281
+ /**
282
+ * A directive to be applied on the previous link
283
+ */
284
+ pagePrev: Directive;
285
+ /**
286
+ * A directive to be applied on the first link
287
+ */
288
+ pageFirst: Directive;
289
+ /**
290
+ * A directive to be applied on the next link
291
+ */
292
+ pageNext: Directive;
293
+ /**
294
+ * A directive to be applied on the Last link
295
+ */
296
+ pageLast: Directive;
297
+ }
298
+ /**
299
+ * Represents a pagination widget with specific properties, state, API, actions, and directives.
300
+ */
301
+ export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationDirectives>;
302
+ /**
303
+ * Returns a shallow copy of the default pagination config
304
+ * @returns a copy of the default config
305
+ */
306
+ export declare function getPaginationDefaultConfig(): PaginationProps;
307
+ /**
308
+ * Create a PaginationWidget with given config props
309
+ * @param config - an optional pagination config
310
+ * @returns a PaginationWidget
311
+ */
312
+ export declare const createPagination: WidgetFactory<PaginationWidget>;
313
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const progressbar = require("../../progressbar-RopgvVeA.cjs");
4
+ exports.createProgressbar = progressbar.createProgressbar;
5
+ exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
@@ -0,0 +1 @@
1
+ export * from './progressbar';
@@ -0,0 +1,5 @@
1
+ import { c, g } from "../../progressbar-S1pNn5rM.js";
2
+ export {
3
+ c as createProgressbar,
4
+ g as getProgressbarDefaultConfig
5
+ };
@@ -0,0 +1,91 @@
1
+ import type { Directive, Widget, WidgetFactory } from '../../types';
2
+ import type { WidgetsCommonPropsAndState } from '../commonProps';
3
+ interface ProgressbarCommonPropsAndState extends WidgetsCommonPropsAndState {
4
+ /**
5
+ * The minimum value.
6
+ *
7
+ * @defaultValue `0`
8
+ */
9
+ min: number;
10
+ /**
11
+ * The maximum value.
12
+ *
13
+ * @defaultValue `100`
14
+ */
15
+ max: number;
16
+ /**
17
+ * The current value.
18
+ *
19
+ * @defaultValue `0`
20
+ */
21
+ value: number;
22
+ /**
23
+ * The aria label.
24
+ *
25
+ * @defaultValue `'Progressbar'`
26
+ */
27
+ ariaLabel: string;
28
+ }
29
+ /**
30
+ * Interface representing directives for a progress bar component.
31
+ */
32
+ export interface ProgressbarDirectives {
33
+ /**
34
+ * A directive to be applied to the main container that handles aria attributes.
35
+ */
36
+ ariaDirective: Directive;
37
+ }
38
+ /**
39
+ * Represents the state of a progress bar component.
40
+ */
41
+ export interface ProgressbarState extends ProgressbarCommonPropsAndState {
42
+ /**
43
+ * Percentage of completion.
44
+ */
45
+ percentage: number;
46
+ /**
47
+ * `true` if the value is above its minimum value.
48
+ */
49
+ started: boolean;
50
+ /**
51
+ * `true` if the value has reached its maximum value.
52
+ */
53
+ finished: boolean;
54
+ /**
55
+ * The aria value text.
56
+ */
57
+ ariaValueText: string | undefined;
58
+ }
59
+ /**
60
+ * Interface representing the properties for the Progressbar component.
61
+ */
62
+ export interface ProgressbarProps extends ProgressbarCommonPropsAndState {
63
+ /**
64
+ * Return the value for the 'aria-valuetext' attribute.
65
+ * @param value - current value
66
+ * @param minimum - minimum value
67
+ * @param maximum - maximum value
68
+ *
69
+ * @defaultValue
70
+ * ```ts
71
+ * () => undefined
72
+ * ```
73
+ */
74
+ ariaValueTextFn: (value: number, minimum: number, maximum: number) => string | undefined;
75
+ }
76
+ /**
77
+ * Represents a Progressbar widget with specific properties, state, API, and directives.
78
+ */
79
+ export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, object, ProgressbarDirectives>;
80
+ /**
81
+ * Retrieve a shallow copy of the default Progressbar config
82
+ * @returns the default Progressbar config
83
+ */
84
+ export declare function getProgressbarDefaultConfig(): ProgressbarProps;
85
+ /**
86
+ * Create an ProgressbarWidget with given config props
87
+ * @param config - an optional progress bar config
88
+ * @returns an ProgressbarWidget
89
+ */
90
+ export declare const createProgressbar: WidgetFactory<ProgressbarWidget>;
91
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const rating = require("../../rating-DZ3OQgtt.cjs");
4
+ exports.createRating = rating.createRating;
5
+ exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
@@ -0,0 +1 @@
1
+ export * from './rating';
@@ -0,0 +1,5 @@
1
+ import { c, g } from "../../rating-DWgGgwk3.js";
2
+ export {
3
+ c as createRating,
4
+ g as getRatingDefaultConfig
5
+ };