@agnos-ui/core 0.4.3 → 0.5.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/README.md +2 -2
- package/{accordion-BnaSamoQ.js → accordion-BGv150k9.js} +10 -13
- package/{accordion-DmPT0O0j.cjs → accordion-Lp-LEbZ2.cjs} +10 -13
- package/{alert-CEFbEgvG.cjs → alert-Bq101evB.cjs} +1 -1
- package/{alert-DdGuK__c.js → alert-DJ2l7bcA.js} +1 -1
- package/{common-CO5b5G_J.js → common-Banw3FYN.js} +15 -14
- package/{common-nxv_hKNE.cjs → common-DvPjK7SS.cjs} +15 -14
- package/components/accordion/accordion.d.ts +35 -8
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/alert.d.ts +16 -1
- package/components/alert/common.d.ts +19 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/commonProps.d.ts +3 -0
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.d.ts +3 -135
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/pagination/pagination.d.ts +30 -217
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/progressbar/progressbar.d.ts +13 -3
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/rating/rating.d.ts +26 -115
- package/components/select/index.cjs +1 -1
- package/components/select/index.js +1 -1
- package/components/select/select.d.ts +21 -148
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/slider/slider.d.ts +31 -126
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/toast/toast.d.ts +16 -1
- package/config.d.ts +17 -1
- package/{directive-3-8yr-ZK.js → directive-CKEccryv.js} +11 -5
- package/{directive-j-xRk-h3.cjs → directive-DdlwGFtf.cjs} +11 -5
- package/index.cjs +13 -13
- package/index.js +15 -15
- package/{modal-D4d8sy85.cjs → modal-DDHcrykD.cjs} +10 -21
- package/{modal-CeTI4jxI.js → modal-DP-4I7vf.js} +11 -22
- package/package.json +6 -5
- package/{pagination-B9WFv70F.cjs → pagination-CBysiPUs.cjs} +23 -35
- package/{pagination-BpPHKQsH.js → pagination-DwDRot6q.js} +23 -35
- package/{progressbar-BybOg5FE.js → progressbar-CGmNq0cS.js} +3 -4
- package/{progressbar-DXCMeJvL.cjs → progressbar-DghzCJ6_.cjs} +3 -4
- package/{rating-D6Tv_4Vx.js → rating-Da38uaZz.js} +61 -54
- package/{rating-C2Y95r50.cjs → rating-DlfOuwuX.cjs} +61 -54
- package/{select-jUrt_lSn.js → select-CAEPqdz1.js} +92 -72
- package/{select-BBiF-m3N.cjs → select-LBVhNdrd.cjs} +92 -72
- package/services/extendWidget.d.ts +37 -4
- package/services/floatingUI.cjs +3 -2
- package/services/floatingUI.d.ts +28 -27
- package/services/floatingUI.js +3 -2
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.d.ts +21 -0
- package/services/focustrack.js +1 -1
- package/services/hash.d.ts +2 -1
- package/services/intersection.cjs +1 -1
- package/services/intersection.d.ts +9 -13
- package/services/intersection.js +1 -1
- package/services/matchMedia.cjs +1 -1
- package/services/matchMedia.d.ts +2 -1
- package/services/matchMedia.js +1 -1
- package/services/navManager.cjs +1 -1
- package/services/navManager.d.ts +85 -41
- package/services/navManager.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.d.ts +3 -0
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +2 -2
- package/services/resizeObserver.d.ts +2 -6
- package/services/resizeObserver.js +2 -2
- package/services/siblingsInert.cjs +3 -3
- package/services/siblingsInert.d.ts +3 -5
- package/services/siblingsInert.js +3 -3
- package/services/transitions/baseTransitions.cjs +4 -5
- package/services/transitions/baseTransitions.d.ts +21 -4
- package/services/transitions/baseTransitions.js +4 -5
- package/services/transitions/collapse.cjs +1 -1
- package/services/transitions/collapse.d.ts +6 -0
- package/services/transitions/collapse.js +1 -1
- package/services/transitions/cssTransitions.cjs +1 -1
- package/services/transitions/cssTransitions.d.ts +3 -0
- package/services/transitions/cssTransitions.js +1 -1
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.d.ts +9 -2
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-ByDkbyr1.js → slider-DYrwS7Mv.js} +118 -116
- package/{slider-BdsZpxJr.cjs → slider-DlOAawbZ.cjs} +118 -116
- package/{toast-BzxextBQ.js → toast-CpvsibAI.js} +3 -3
- package/{toast-Dy3ck2cM.cjs → toast-D_uSrRZL.cjs} +3 -3
- package/types.cjs +0 -8
- package/types.d.ts +151 -19
- package/types.js +1 -9
- package/utils/directive.cjs +1 -1
- package/utils/directive.d.ts +81 -32
- package/utils/directive.js +1 -1
- package/utils/internal/checks.d.ts +6 -0
- package/utils/internal/dom.d.ts +5 -5
- package/utils/internal/promise.d.ts +9 -0
- package/utils/internal/sort.d.ts +2 -2
- package/utils/internal/ssrHTMLElement.d.ts +4 -0
- package/utils/stores.cjs +1 -1
- package/utils/stores.d.ts +80 -42
- package/utils/stores.js +1 -1
- package/utils/writables.cjs +2 -1
- package/utils/writables.d.ts +52 -3
- package/utils/writables.js +2 -1
- package/{writables-D46sFgGK.cjs → writables-BPAJvaL_.cjs} +9 -0
- package/{writables-DoU_XYTX.js → writables-DCiBdIBK.js} +11 -2
|
@@ -193,24 +193,6 @@ export interface ModalApi {
|
|
|
193
193
|
*/
|
|
194
194
|
patch: ModalWidget['patch'];
|
|
195
195
|
}
|
|
196
|
-
/**
|
|
197
|
-
* Actions of the modal widget.
|
|
198
|
-
*/
|
|
199
|
-
export interface ModalActions {
|
|
200
|
-
/**
|
|
201
|
-
* Action to be called when the user clicks on the close button. It closes the modal with the {@link modalCloseButtonClick} result.
|
|
202
|
-
* @param event - mouse event
|
|
203
|
-
*/
|
|
204
|
-
closeButtonClick(event: Pick<MouseEvent, never>): void;
|
|
205
|
-
/**
|
|
206
|
-
* Action to be called when the user clicks on the modal DOM element (which is supposed to have the size of the full viewport).
|
|
207
|
-
* If the click is not done on a descendant of the modal DOM element, it is considered to be done outside the modal
|
|
208
|
-
* and, depending on the value of the {@link ModalProps.closeOnOutsideClick|closeOnOutsideClick} prop, the modal is or isn't closed
|
|
209
|
-
* (with the {@link modalOutsideClick} result).
|
|
210
|
-
* @param event - mouse event
|
|
211
|
-
*/
|
|
212
|
-
modalClick(event: Pick<MouseEvent, 'target' | 'currentTarget'>): void;
|
|
213
|
-
}
|
|
214
196
|
/**
|
|
215
197
|
* Directives of the modal widget.
|
|
216
198
|
*/
|
|
@@ -236,133 +218,19 @@ export interface ModalDirectives {
|
|
|
236
218
|
*/
|
|
237
219
|
closeButtonDirective: Directive;
|
|
238
220
|
/**
|
|
239
|
-
* Directive to apply to the dialog element when using the native
|
|
221
|
+
* Directive to apply to the dialog element when using the native {@link https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement | HTMLDialogElement}
|
|
240
222
|
*/
|
|
241
223
|
dialogDirective: Directive;
|
|
242
224
|
}
|
|
243
225
|
/**
|
|
244
226
|
* Modal widget.
|
|
245
227
|
*/
|
|
246
|
-
export type ModalWidget = Widget<ModalProps, ModalState, ModalApi,
|
|
228
|
+
export type ModalWidget = Widget<ModalProps, ModalState, ModalApi, ModalDirectives>;
|
|
247
229
|
/**
|
|
248
230
|
* Returns a copy of the default modal config.
|
|
249
231
|
* @returns a copy of the default modal config
|
|
250
232
|
*/
|
|
251
|
-
export declare function getModalDefaultConfig():
|
|
252
|
-
/**
|
|
253
|
-
* Whether the modal and its backdrop (if present) should be animated when shown or hidden.
|
|
254
|
-
*
|
|
255
|
-
* @defaultValue `true`
|
|
256
|
-
*/
|
|
257
|
-
animated: boolean;
|
|
258
|
-
/**
|
|
259
|
-
* Whether a backdrop should be created behind the modal.
|
|
260
|
-
*
|
|
261
|
-
* @defaultValue `true`
|
|
262
|
-
*/
|
|
263
|
-
backdrop: boolean;
|
|
264
|
-
/**
|
|
265
|
-
* The transition to use for the backdrop behind the modal (if present).
|
|
266
|
-
*
|
|
267
|
-
* @defaultValue
|
|
268
|
-
* ```ts
|
|
269
|
-
* async () => {}
|
|
270
|
-
* ```
|
|
271
|
-
*/
|
|
272
|
-
backdropTransition: TransitionFn;
|
|
273
|
-
/**
|
|
274
|
-
* Whether the modal should be closed when clicking on the viewport outside the modal.
|
|
275
|
-
*
|
|
276
|
-
* @defaultValue `true`
|
|
277
|
-
*/
|
|
278
|
-
closeOnOutsideClick: boolean;
|
|
279
|
-
/**
|
|
280
|
-
* The transition to use for the modal.
|
|
281
|
-
*
|
|
282
|
-
* @defaultValue
|
|
283
|
-
* ```ts
|
|
284
|
-
* async () => {}
|
|
285
|
-
* ```
|
|
286
|
-
*/
|
|
287
|
-
modalTransition: TransitionFn;
|
|
288
|
-
/**
|
|
289
|
-
* Event to be triggered when the modal is about to be closed (i.e. the {@link ModalApi.close|close} method was called).
|
|
290
|
-
*
|
|
291
|
-
* @param event - event giving access to the argument given to the {@link ModalApi.close|close} method and allowing
|
|
292
|
-
* to cancel the close process.
|
|
293
|
-
*
|
|
294
|
-
* @defaultValue
|
|
295
|
-
* ```ts
|
|
296
|
-
* () => {}
|
|
297
|
-
* ```
|
|
298
|
-
*/
|
|
299
|
-
onBeforeClose: (event: ModalBeforeCloseEvent) => void;
|
|
300
|
-
/**
|
|
301
|
-
* Event to be triggered when the visible property changes.
|
|
302
|
-
*
|
|
303
|
-
* @param visible - new value of the visible propery
|
|
304
|
-
*
|
|
305
|
-
* @defaultValue
|
|
306
|
-
* ```ts
|
|
307
|
-
* () => {}
|
|
308
|
-
* ```
|
|
309
|
-
*/
|
|
310
|
-
onVisibleChange: (visible: boolean) => void;
|
|
311
|
-
/**
|
|
312
|
-
* Event to be triggered when the transition is completed and the modal is not visible.
|
|
313
|
-
*
|
|
314
|
-
* @defaultValue
|
|
315
|
-
* ```ts
|
|
316
|
-
* () => {}
|
|
317
|
-
* ```
|
|
318
|
-
*/
|
|
319
|
-
onHidden: () => void;
|
|
320
|
-
/**
|
|
321
|
-
* Event to be triggered when the transition is completed and the modal is visible.
|
|
322
|
-
*
|
|
323
|
-
* @defaultValue
|
|
324
|
-
* ```ts
|
|
325
|
-
* () => {}
|
|
326
|
-
* ```
|
|
327
|
-
*/
|
|
328
|
-
onShown: () => void;
|
|
329
|
-
/**
|
|
330
|
-
* Value of the aria-label attribute to put on the close button.
|
|
331
|
-
*
|
|
332
|
-
* @defaultValue `'Close'`
|
|
333
|
-
*/
|
|
334
|
-
ariaCloseButtonLabel: string;
|
|
335
|
-
/**
|
|
336
|
-
* Classes to add on the backdrop DOM element.
|
|
337
|
-
*
|
|
338
|
-
* @defaultValue `''`
|
|
339
|
-
*/
|
|
340
|
-
backdropClass: string;
|
|
341
|
-
/**
|
|
342
|
-
* Whether to display the close button.
|
|
343
|
-
*
|
|
344
|
-
* @defaultValue `true`
|
|
345
|
-
*/
|
|
346
|
-
closeButton: boolean;
|
|
347
|
-
/**
|
|
348
|
-
* Which element should contain the modal and backdrop DOM elements.
|
|
349
|
-
* If it is not null, the modal and backdrop DOM elements are moved to the specified container.
|
|
350
|
-
* Otherwise, they stay where the widget is located.
|
|
351
|
-
*
|
|
352
|
-
* @defaultValue
|
|
353
|
-
* ```ts
|
|
354
|
-
* typeof window !== 'undefined' ? document.body : null
|
|
355
|
-
* ```
|
|
356
|
-
*/
|
|
357
|
-
container: HTMLElement | null;
|
|
358
|
-
/**
|
|
359
|
-
* Whether the modal should be visible when the transition is completed.
|
|
360
|
-
*
|
|
361
|
-
* @defaultValue `false`
|
|
362
|
-
*/
|
|
363
|
-
visible: boolean;
|
|
364
|
-
className: string;
|
|
365
|
-
};
|
|
233
|
+
export declare function getModalDefaultConfig(): ModalProps;
|
|
366
234
|
/**
|
|
367
235
|
* Creates a new modal widget instance.
|
|
368
236
|
* @param config$ - config of the modal, either as a store or as an object containing values or stores.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const pagination = require("../../pagination-
|
|
3
|
+
const pagination = require("../../pagination-CBysiPUs.cjs");
|
|
4
4
|
exports.createPagination = pagination.createPagination;
|
|
5
5
|
exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { PropsConfig, Widget, Directive } from '../../types';
|
|
2
2
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
|
+
/**
|
|
4
|
+
* Interface representing the common properties and state for a pagination component.
|
|
5
|
+
*/
|
|
3
6
|
interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
4
7
|
/**
|
|
5
8
|
* The current page.
|
|
@@ -9,14 +12,6 @@ interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
9
12
|
* @defaultValue `1`
|
|
10
13
|
*/
|
|
11
14
|
page: number;
|
|
12
|
-
/**
|
|
13
|
-
* The pagination display size.
|
|
14
|
-
*
|
|
15
|
-
* Bootstrap currently supports small and large sizes.
|
|
16
|
-
*
|
|
17
|
-
* @defaultValue `null`
|
|
18
|
-
*/
|
|
19
|
-
size: 'sm' | 'lg' | null;
|
|
20
15
|
/**
|
|
21
16
|
* The label for the nav element.
|
|
22
17
|
*
|
|
@@ -108,6 +103,9 @@ interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
108
103
|
*/
|
|
109
104
|
boundaryLinks: boolean;
|
|
110
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Interface representing the properties for the Pagination component.
|
|
108
|
+
*/
|
|
111
109
|
export interface PaginationProps extends PaginationCommonPropsAndState {
|
|
112
110
|
/**
|
|
113
111
|
* The number of items in your paginated collection.
|
|
@@ -184,7 +182,7 @@ export interface PaginationProps extends PaginationCommonPropsAndState {
|
|
|
184
182
|
*
|
|
185
183
|
* @defaultValue
|
|
186
184
|
* ```ts
|
|
187
|
-
* (currentPage: number
|
|
185
|
+
* (currentPage: number) => `Current page is ${currentPage}`
|
|
188
186
|
* ```
|
|
189
187
|
*/
|
|
190
188
|
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
@@ -200,6 +198,9 @@ export interface PaginationProps extends PaginationCommonPropsAndState {
|
|
|
200
198
|
*/
|
|
201
199
|
pageLink: (pageNumber: number) => string;
|
|
202
200
|
}
|
|
201
|
+
/**
|
|
202
|
+
* Interface representing the hrefs for pagination navigation links.
|
|
203
|
+
*/
|
|
203
204
|
export interface DirectionsHrefs {
|
|
204
205
|
/**
|
|
205
206
|
* The href for the 'Previous' navigation link
|
|
@@ -210,6 +211,9 @@ export interface DirectionsHrefs {
|
|
|
210
211
|
*/
|
|
211
212
|
next: string;
|
|
212
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* Represents the state of the pagination component.
|
|
216
|
+
*/
|
|
213
217
|
export interface PaginationState extends PaginationCommonPropsAndState {
|
|
214
218
|
/**
|
|
215
219
|
* The number of pages.
|
|
@@ -238,29 +242,35 @@ export interface PaginationState extends PaginationCommonPropsAndState {
|
|
|
238
242
|
/** The aria-live text */
|
|
239
243
|
ariaLiveLabelText: string;
|
|
240
244
|
}
|
|
241
|
-
|
|
245
|
+
/**
|
|
246
|
+
* Interface representing pagination API for navigating through pages.
|
|
247
|
+
*/
|
|
248
|
+
export interface PaginationApi {
|
|
242
249
|
/**
|
|
243
250
|
* To "go" to a specific page
|
|
244
251
|
* @param page - The page number to select
|
|
245
252
|
*/
|
|
246
|
-
select(page: number
|
|
253
|
+
select(page: number): void;
|
|
247
254
|
/**
|
|
248
255
|
* To "go" to the first page
|
|
249
256
|
*/
|
|
250
|
-
first(
|
|
257
|
+
first(): void;
|
|
251
258
|
/**
|
|
252
259
|
* To "go" to the previous page
|
|
253
260
|
*/
|
|
254
|
-
previous(
|
|
261
|
+
previous(): void;
|
|
255
262
|
/**
|
|
256
263
|
* To "go" to the next page
|
|
257
264
|
*/
|
|
258
|
-
next(
|
|
265
|
+
next(): void;
|
|
259
266
|
/**
|
|
260
267
|
* To "go" to the last page
|
|
261
268
|
*/
|
|
262
|
-
last(
|
|
269
|
+
last(): void;
|
|
263
270
|
}
|
|
271
|
+
/**
|
|
272
|
+
* Interface representing the directives for pagination components.
|
|
273
|
+
*/
|
|
264
274
|
export interface PaginationDirectives {
|
|
265
275
|
/**
|
|
266
276
|
* A directive to be applied to each page link
|
|
@@ -286,212 +296,15 @@ export interface PaginationDirectives {
|
|
|
286
296
|
*/
|
|
287
297
|
pageLast: Directive;
|
|
288
298
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
299
|
+
/**
|
|
300
|
+
* Represents a pagination widget with specific properties, state, API, actions, and directives.
|
|
301
|
+
*/
|
|
302
|
+
export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationDirectives>;
|
|
292
303
|
/**
|
|
293
304
|
* Returns a shallow copy of the default pagination config
|
|
294
305
|
* @returns a copy of the default config
|
|
295
306
|
*/
|
|
296
|
-
export declare function getPaginationDefaultConfig():
|
|
297
|
-
/**
|
|
298
|
-
* The number of items in your paginated collection.
|
|
299
|
-
*
|
|
300
|
-
* Note, that this is not the number of pages. Page numbers are calculated dynamically based on
|
|
301
|
-
* `collectionSize` and `pageSize`.
|
|
302
|
-
*
|
|
303
|
-
* Ex. if you have 100 items in your collection and displaying 20 items per page, you'll end up with 5 pages.
|
|
304
|
-
*
|
|
305
|
-
* Whatever the collectionSize the page number is of minimum 1.
|
|
306
|
-
*
|
|
307
|
-
* @defaultValue `0`
|
|
308
|
-
*/
|
|
309
|
-
collectionSize: number;
|
|
310
|
-
/**
|
|
311
|
-
* The number of items per page.
|
|
312
|
-
* @remarks min value is 1
|
|
313
|
-
*
|
|
314
|
-
* @defaultValue `10`
|
|
315
|
-
*/
|
|
316
|
-
pageSize: number;
|
|
317
|
-
/**
|
|
318
|
-
* An event fired when the page is changed.
|
|
319
|
-
*
|
|
320
|
-
* Event payload is the number of the newly selected page.
|
|
321
|
-
*
|
|
322
|
-
* Page numbers start with `1`.
|
|
323
|
-
* @defaultValue
|
|
324
|
-
* ```ts
|
|
325
|
-
* () => {}
|
|
326
|
-
* ```
|
|
327
|
-
*/
|
|
328
|
-
onPageChange: (page: number) => void;
|
|
329
|
-
/**
|
|
330
|
-
* pagesFactory returns a function computing the array of pages to be displayed
|
|
331
|
-
* as number (-1 are treated as ellipsis).
|
|
332
|
-
* Use Page slot to customize the pages view and not this
|
|
333
|
-
* @param page - The current page number
|
|
334
|
-
* @param pageCount - The total number of pages
|
|
335
|
-
*
|
|
336
|
-
* @defaultValue
|
|
337
|
-
* ```ts
|
|
338
|
-
* (_page: number, pageCount: number) => {
|
|
339
|
-
* const pages: number[] = [];
|
|
340
|
-
* for (let i = 1; i <= pageCount; i++) {
|
|
341
|
-
* pages.push(i);
|
|
342
|
-
* }
|
|
343
|
-
* return pages;
|
|
344
|
-
* }
|
|
345
|
-
* ```
|
|
346
|
-
*/
|
|
347
|
-
pagesFactory: (page: number, pageCount: number) => number[];
|
|
348
|
-
/**
|
|
349
|
-
* Provide the label for each "Page" page button.
|
|
350
|
-
* This is used for accessibility purposes.
|
|
351
|
-
* for I18n, we suggest to use the global configuration
|
|
352
|
-
* override any configuration parameters provided for this
|
|
353
|
-
* @param processPage - The current page number
|
|
354
|
-
* @param pageCount - The total number of pages
|
|
355
|
-
*
|
|
356
|
-
* @defaultValue
|
|
357
|
-
* ```ts
|
|
358
|
-
* (processPage: number, pageCount: number) => `Page ${processPage} of ${pageCount}`
|
|
359
|
-
* ```
|
|
360
|
-
*/
|
|
361
|
-
ariaPageLabel: (processPage: number, pageCount: number) => string;
|
|
362
|
-
/**
|
|
363
|
-
* Provide the label for the aria-live element
|
|
364
|
-
* This is used for accessibility purposes.
|
|
365
|
-
* for I18n, we suggest to use the global configuration
|
|
366
|
-
* override any configuration parameters provided for this
|
|
367
|
-
* @param currentPage - The current page number
|
|
368
|
-
* @param pageCount - The total number of pages
|
|
369
|
-
*
|
|
370
|
-
* @defaultValue
|
|
371
|
-
* ```ts
|
|
372
|
-
* (currentPage: number, pageCount: number) => `Current page is ${currentPage}`
|
|
373
|
-
* ```
|
|
374
|
-
*/
|
|
375
|
-
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
376
|
-
/**
|
|
377
|
-
* Factory function providing the href for a "Page" page anchor,
|
|
378
|
-
* based on the current page number
|
|
379
|
-
* @param pageNumber - The index to use in the link
|
|
380
|
-
*
|
|
381
|
-
* @defaultValue
|
|
382
|
-
* ```ts
|
|
383
|
-
* (_page: number) => PAGE_LINK_DEFAULT
|
|
384
|
-
* ```
|
|
385
|
-
*/
|
|
386
|
-
pageLink: (pageNumber: number) => string;
|
|
387
|
-
/**
|
|
388
|
-
* The current page.
|
|
389
|
-
*
|
|
390
|
-
* Page numbers start with `1`.
|
|
391
|
-
*
|
|
392
|
-
* @defaultValue `1`
|
|
393
|
-
*/
|
|
394
|
-
page: number;
|
|
395
|
-
/**
|
|
396
|
-
* The pagination display size.
|
|
397
|
-
*
|
|
398
|
-
* Bootstrap currently supports small and large sizes.
|
|
399
|
-
*
|
|
400
|
-
* @defaultValue `null`
|
|
401
|
-
*/
|
|
402
|
-
size: "sm" | "lg" | null;
|
|
403
|
-
/**
|
|
404
|
-
* The label for the nav element.
|
|
405
|
-
*
|
|
406
|
-
* for I18n, we suggest to use the global configuration
|
|
407
|
-
* override any configuration parameters provided for this
|
|
408
|
-
*
|
|
409
|
-
* @defaultValue `'Page navigation'`
|
|
410
|
-
*/
|
|
411
|
-
ariaLabel: string;
|
|
412
|
-
/**
|
|
413
|
-
* The label for the "active" page.
|
|
414
|
-
* for I18n, we suggest to use the global configuration
|
|
415
|
-
* override any configuration parameters provided for this
|
|
416
|
-
*
|
|
417
|
-
* @defaultValue
|
|
418
|
-
* ```ts
|
|
419
|
-
* '(current)'
|
|
420
|
-
* ```
|
|
421
|
-
*/
|
|
422
|
-
activeLabel: string;
|
|
423
|
-
/**
|
|
424
|
-
* The label for the "First" page button.
|
|
425
|
-
* for I18n, we suggest to use the global configuration
|
|
426
|
-
* override any configuration parameters provided for this
|
|
427
|
-
*
|
|
428
|
-
* @defaultValue
|
|
429
|
-
* ```ts
|
|
430
|
-
* 'Action link for first page'
|
|
431
|
-
* ```
|
|
432
|
-
*/
|
|
433
|
-
ariaFirstLabel: string;
|
|
434
|
-
/**
|
|
435
|
-
* The label for the "Previous" page button.
|
|
436
|
-
* for I18n, we suggest to use the global configuration
|
|
437
|
-
* override any configuration parameters provided for this
|
|
438
|
-
*
|
|
439
|
-
* @defaultValue
|
|
440
|
-
* ```ts
|
|
441
|
-
* 'Action link for previous page'
|
|
442
|
-
* ```
|
|
443
|
-
*/
|
|
444
|
-
ariaPreviousLabel: string;
|
|
445
|
-
/**
|
|
446
|
-
* The label for the "Next" page button.
|
|
447
|
-
* for I18n, we suggest to use the global configuration
|
|
448
|
-
* override any configuration parameters provided for this
|
|
449
|
-
*
|
|
450
|
-
* @defaultValue
|
|
451
|
-
* ```ts
|
|
452
|
-
* 'Action link for next page'
|
|
453
|
-
* ```
|
|
454
|
-
*/
|
|
455
|
-
ariaNextLabel: string;
|
|
456
|
-
/**
|
|
457
|
-
* The label for the "Last" page button.
|
|
458
|
-
* for I18n, we suggest to use the global configuration
|
|
459
|
-
* override any configuration parameters provided for this
|
|
460
|
-
*
|
|
461
|
-
* @defaultValue
|
|
462
|
-
* ```ts
|
|
463
|
-
* 'Action link for last page'
|
|
464
|
-
* ```
|
|
465
|
-
*/
|
|
466
|
-
ariaLastLabel: string;
|
|
467
|
-
/**
|
|
468
|
-
* The label for the "Ellipsis" page.
|
|
469
|
-
* for I18n, we suggest to use the global configuration
|
|
470
|
-
* override any configuration parameters provided for this
|
|
471
|
-
*
|
|
472
|
-
* @defaultValue `'Ellipsis page element'`
|
|
473
|
-
*/
|
|
474
|
-
ariaEllipsisLabel: string;
|
|
475
|
-
/**
|
|
476
|
-
* If `true`, pagination links will be disabled.
|
|
477
|
-
*
|
|
478
|
-
* @defaultValue `false`
|
|
479
|
-
*/
|
|
480
|
-
disabled: boolean;
|
|
481
|
-
/**
|
|
482
|
-
* If `true`, the "Next" and "Previous" page links are shown.
|
|
483
|
-
*
|
|
484
|
-
* @defaultValue `true`
|
|
485
|
-
*/
|
|
486
|
-
directionLinks: boolean;
|
|
487
|
-
/**
|
|
488
|
-
* If `true`, the "First" and "Last" page links are shown.
|
|
489
|
-
*
|
|
490
|
-
* @defaultValue `false`
|
|
491
|
-
*/
|
|
492
|
-
boundaryLinks: boolean;
|
|
493
|
-
className: string;
|
|
494
|
-
};
|
|
307
|
+
export declare function getPaginationDefaultConfig(): PaginationProps;
|
|
495
308
|
/**
|
|
496
309
|
* Create a PaginationWidget with given config props
|
|
497
310
|
* @param config - an optional pagination config
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const progressbar = require("../../progressbar-
|
|
3
|
+
const progressbar = require("../../progressbar-DghzCJ6_.cjs");
|
|
4
4
|
exports.createProgressbar = progressbar.createProgressbar;
|
|
5
5
|
exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
|
|
@@ -26,12 +26,18 @@ interface ProgressbarCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
26
26
|
*/
|
|
27
27
|
ariaLabel: string;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Interface representing directives for a progress bar component.
|
|
31
|
+
*/
|
|
29
32
|
export interface ProgressbarDirectives {
|
|
30
33
|
/**
|
|
31
34
|
* A directive to be applied to the main container that handles aria attributes.
|
|
32
35
|
*/
|
|
33
36
|
ariaDirective: Directive;
|
|
34
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Represents the state of a progress bar component.
|
|
40
|
+
*/
|
|
35
41
|
export interface ProgressbarState extends ProgressbarCommonPropsAndState {
|
|
36
42
|
/**
|
|
37
43
|
* Percentage of completion.
|
|
@@ -50,6 +56,9 @@ export interface ProgressbarState extends ProgressbarCommonPropsAndState {
|
|
|
50
56
|
*/
|
|
51
57
|
ariaValueText: string | undefined;
|
|
52
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Interface representing the properties for the Progressbar component.
|
|
61
|
+
*/
|
|
53
62
|
export interface ProgressbarProps extends ProgressbarCommonPropsAndState {
|
|
54
63
|
/**
|
|
55
64
|
* Return the value for the 'aria-valuetext' attribute.
|
|
@@ -64,9 +73,10 @@ export interface ProgressbarProps extends ProgressbarCommonPropsAndState {
|
|
|
64
73
|
*/
|
|
65
74
|
ariaValueTextFn: (value: number, minimum: number, maximum: number) => string | undefined;
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Represents a Progressbar widget with specific properties, state, API, and directives.
|
|
78
|
+
*/
|
|
79
|
+
export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, object, ProgressbarDirectives>;
|
|
70
80
|
/**
|
|
71
81
|
* Retrieve a shallow copy of the default Progressbar config
|
|
72
82
|
* @returns the default Progressbar config
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const rating = require("../../rating-
|
|
3
|
+
const rating = require("../../rating-DlfOuwuX.cjs");
|
|
4
4
|
exports.createRating = rating.createRating;
|
|
5
5
|
exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
|