@agnos-ui/core 0.2.0 → 0.3.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.
- package/README.md +3 -3
- package/accordion-BaWN0_n-.js +330 -0
- package/accordion-BuIgxZ0S.cjs +329 -0
- package/alert-C4jCg9Pl.cjs +8 -0
- package/alert-Dlf-BV98.js +9 -0
- package/common-DRdsw5m8.js +76 -0
- package/common-nJRMXbwj.cjs +75 -0
- package/components/accordion/accordion.d.ts +38 -49
- package/components/accordion/index.cjs +7 -0
- package/components/accordion/index.js +7 -1
- package/components/alert/alert.d.ts +3 -12
- package/components/alert/common.d.ts +4 -13
- package/components/alert/index.cjs +10 -0
- package/components/alert/index.js +10 -2
- package/components/modal/index.cjs +7 -0
- package/components/modal/index.js +7 -1
- package/components/modal/modal.d.ts +7 -49
- package/components/pagination/index.cjs +5 -0
- package/components/pagination/index.d.ts +0 -1
- package/components/pagination/index.js +5 -2
- package/components/pagination/pagination.d.ts +68 -139
- package/components/progressbar/index.cjs +5 -0
- package/components/progressbar/index.js +5 -1
- package/components/progressbar/progressbar.d.ts +6 -22
- package/components/rating/index.cjs +5 -0
- package/components/rating/index.js +5 -1
- package/components/rating/rating.d.ts +16 -11
- package/components/select/index.cjs +6 -0
- package/components/select/index.js +6 -1
- package/components/select/select.d.ts +15 -33
- package/components/slider/index.cjs +5 -0
- package/components/slider/index.js +5 -1
- package/components/slider/slider.d.ts +29 -35
- package/components/toast/index.cjs +5 -0
- package/components/toast/index.js +5 -1
- package/components/toast/toast.d.ts +11 -8
- package/config.cjs +38 -0
- package/config.d.ts +1 -1
- package/config.js +35 -50
- package/directive-BTSEYLF3.cjs +404 -0
- package/directive-DCYlDznf.js +405 -0
- package/func-DR0n-ShK.js +7 -0
- package/func-Qd3cD9a3.cjs +6 -0
- package/index.cjs +119 -0
- package/index.d.ts +1 -1
- package/index.js +119 -33
- package/modal-BI2qUu1M.js +251 -0
- package/modal-rzMpATf5.cjs +250 -0
- package/package.json +29 -19
- package/pagination--GkwduJn.js +263 -0
- package/pagination-EWSWQT1I.cjs +262 -0
- package/progressbar-DH7DHYMp.cjs +83 -0
- package/progressbar-DuRX7_my.js +84 -0
- package/promise-BMJ8qhA8.cjs +118 -0
- package/promise-CY2U8bTP.js +119 -0
- package/rating-BR5wD7y2.js +173 -0
- package/rating-CmuYUSxy.cjs +172 -0
- package/select-BCs6HQWn.js +358 -0
- package/select-CCIKn8WR.cjs +357 -0
- package/services/extendWidget.cjs +32 -0
- package/services/extendWidget.d.ts +2 -1
- package/services/extendWidget.js +31 -34
- package/services/floatingUI.cjs +131 -0
- package/services/floatingUI.d.ts +30 -14
- package/services/floatingUI.js +128 -102
- package/services/focustrack.cjs +47 -0
- package/services/focustrack.js +45 -44
- package/services/hash.cjs +15 -0
- package/services/hash.js +14 -12
- package/services/intersection.cjs +53 -0
- package/services/intersection.js +48 -50
- package/services/matchMedia.cjs +13 -0
- package/services/matchMedia.d.ts +7 -0
- package/services/matchMedia.js +13 -0
- package/services/navManager.cjs +196 -0
- package/services/navManager.d.ts +9 -9
- package/services/navManager.js +186 -168
- package/services/portal.cjs +43 -0
- package/services/portal.js +41 -42
- package/services/resizeObserver.cjs +32 -0
- package/services/resizeObserver.d.ts +1 -1
- package/services/resizeObserver.js +31 -28
- package/services/siblingsInert.cjs +40 -0
- package/services/siblingsInert.js +31 -31
- package/services/transitions/baseTransitions.cjs +171 -0
- package/services/transitions/baseTransitions.d.ts +16 -16
- package/services/transitions/baseTransitions.js +159 -170
- package/services/transitions/collapse.cjs +44 -0
- package/services/transitions/collapse.js +41 -49
- package/services/transitions/cssTransitions.cjs +32 -0
- package/services/transitions/cssTransitions.d.ts +2 -1
- package/services/transitions/cssTransitions.js +29 -39
- package/services/transitions/simpleClassTransition.cjs +31 -0
- package/services/transitions/simpleClassTransition.js +30 -41
- package/slider-CA_fszn7.js +536 -0
- package/slider-DsLvT87U.cjs +535 -0
- package/toast-8tWp6x89.js +63 -0
- package/toast-Aw8o0Iwe.cjs +62 -0
- package/types.cjs +12 -0
- package/types.d.ts +21 -1
- package/types.js +11 -13
- package/utils/directive.cjs +26 -0
- package/utils/directive.d.ts +148 -5
- package/utils/directive.js +25 -205
- package/utils/internal/dom.d.ts +43 -4
- package/utils/internal/promise.d.ts +2 -2
- package/utils/internal/ssrHTMLElement.d.ts +7 -0
- package/utils/stores.cjs +163 -0
- package/utils/stores.d.ts +9 -17
- package/utils/stores.js +149 -284
- package/utils/writables.cjs +13 -0
- package/utils/writables.js +12 -71
- package/writables-D46sFgGK.cjs +85 -0
- package/writables-DoU_XYTX.js +86 -0
- package/components/accordion/accordion.js +0 -264
- package/components/alert/alert.js +0 -22
- package/components/alert/common.js +0 -69
- package/components/commonProps.js +0 -1
- package/components/modal/modal.js +0 -186
- package/components/pagination/bootstrap.d.ts +0 -8
- package/components/pagination/bootstrap.js +0 -110
- package/components/pagination/pagination.js +0 -195
- package/components/progressbar/progressbar.js +0 -78
- package/components/rating/rating.js +0 -137
- package/components/select/select.js +0 -297
- package/components/slider/slider.js +0 -420
- package/components/toast/toast.js +0 -43
- package/services/transitions/bootstrap/collapse.d.ts +0 -2
- package/services/transitions/bootstrap/collapse.js +0 -15
- package/services/transitions/bootstrap/fade.d.ts +0 -1
- package/services/transitions/bootstrap/fade.js +0 -7
- package/services/transitions/bootstrap.d.ts +0 -2
- package/services/transitions/bootstrap.js +0 -2
- package/utils/internal/checks.js +0 -60
- package/utils/internal/dom.js +0 -82
- package/utils/internal/func.js +0 -11
- package/utils/internal/isFocusable.js +0 -37
- package/utils/internal/math.js +0 -13
- package/utils/internal/promise.js +0 -169
- package/utils/internal/scrollbars.js +0 -33
- package/utils/internal/sort.js +0 -28
- package/utils/internal/textDirection.js +0 -7
- package/utils/internal/traversal.js +0 -105
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
import type { PropsConfig, Widget,
|
|
1
|
+
import type { PropsConfig, Widget, Directive } from '../../types';
|
|
2
2
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
|
-
/**
|
|
4
|
-
* A type for the slot context of the pagination widget
|
|
5
|
-
*/
|
|
6
|
-
export type PaginationContext = WidgetSlotContext<PaginationWidget>;
|
|
7
|
-
/**
|
|
8
|
-
* A type for the slot context of the pagination widget when the slot is the number label
|
|
9
|
-
*/
|
|
10
|
-
export interface PaginationNumberContext extends PaginationContext {
|
|
11
|
-
/**
|
|
12
|
-
* Displayed page
|
|
13
|
-
*/
|
|
14
|
-
displayedPage: number;
|
|
15
|
-
}
|
|
16
3
|
export interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
17
4
|
/**
|
|
18
5
|
* The current page.
|
|
@@ -71,6 +58,13 @@ export interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndStat
|
|
|
71
58
|
* @defaultValue 'Action link for last page'
|
|
72
59
|
*/
|
|
73
60
|
ariaLastLabel: string;
|
|
61
|
+
/**
|
|
62
|
+
* The label for the "Ellipsis" page.
|
|
63
|
+
* for I18n, we suggest to use the global configuration
|
|
64
|
+
* override any configuration parameters provided for this
|
|
65
|
+
* @defaultValue 'Ellipsis page element'
|
|
66
|
+
*/
|
|
67
|
+
ariaEllipsisLabel: string;
|
|
74
68
|
/**
|
|
75
69
|
* If `true`, pagination links will be disabled.
|
|
76
70
|
* @defaultValue false
|
|
@@ -86,66 +80,6 @@ export interface PaginationCommonPropsAndState extends WidgetsCommonPropsAndStat
|
|
|
86
80
|
* @defaultValue false
|
|
87
81
|
*/
|
|
88
82
|
boundaryLinks: boolean;
|
|
89
|
-
/**
|
|
90
|
-
* The template to use for the structure of the pagination component
|
|
91
|
-
* The default structure uses {@link PaginationCommonPropsAndState.slotEllipsis|slotEllipsis}, {@link PaginationCommonPropsAndState.slotFirst|slotFirst},
|
|
92
|
-
* {@link PaginationCommonPropsAndState.slotPrevious|slotPrevious}, {@link PaginationCommonPropsAndState.slotNext|slotNext},
|
|
93
|
-
* {@link PaginationCommonPropsAndState.slotLast|slotLast}, {@link PaginationCommonPropsAndState.slotPages|slotPages},
|
|
94
|
-
* {@link PaginationCommonPropsAndState.slotNumberLabel|slotNumberLabel},
|
|
95
|
-
*/
|
|
96
|
-
slotStructure: SlotContent<PaginationContext>;
|
|
97
|
-
/**
|
|
98
|
-
* The template to use for the ellipsis slot
|
|
99
|
-
* for I18n, we suggest to use the global configuration
|
|
100
|
-
* override any configuration parameters provided for this
|
|
101
|
-
* @defaultValue '…'
|
|
102
|
-
*/
|
|
103
|
-
slotEllipsis: SlotContent<PaginationContext>;
|
|
104
|
-
/**
|
|
105
|
-
* The template to use for the first slot
|
|
106
|
-
* for I18n, we suggest to use the global configuration
|
|
107
|
-
* override any configuration parameters provided for this
|
|
108
|
-
* @defaultValue '«'
|
|
109
|
-
*/
|
|
110
|
-
slotFirst: SlotContent<PaginationContext>;
|
|
111
|
-
/**
|
|
112
|
-
* The template to use for the previous slot
|
|
113
|
-
* for I18n, we suggest to use the global configuration
|
|
114
|
-
* override any configuration parameters provided for this
|
|
115
|
-
* @defaultValue '‹'
|
|
116
|
-
*/
|
|
117
|
-
slotPrevious: SlotContent<PaginationContext>;
|
|
118
|
-
/**
|
|
119
|
-
* The template to use for the next slot
|
|
120
|
-
* for I18n, we suggest to use the global configuration
|
|
121
|
-
* override any configuration parameters provided for this
|
|
122
|
-
* @defaultValue '›'
|
|
123
|
-
*/
|
|
124
|
-
slotNext: SlotContent<PaginationContext>;
|
|
125
|
-
/**
|
|
126
|
-
* The template to use for the last slot
|
|
127
|
-
* for I18n, we suggest to use the global configuration
|
|
128
|
-
* override any configuration parameters provided for this
|
|
129
|
-
* @defaultValue '»'
|
|
130
|
-
*/
|
|
131
|
-
slotLast: SlotContent<PaginationContext>;
|
|
132
|
-
/**
|
|
133
|
-
* The template to use for the pages slot
|
|
134
|
-
* To use to customize the pages view
|
|
135
|
-
* override any configuration parameters provided for this
|
|
136
|
-
*/
|
|
137
|
-
slotPages: SlotContent<PaginationContext>;
|
|
138
|
-
/**
|
|
139
|
-
* The template to use for the number slot
|
|
140
|
-
* override any configuration parameters provided for this
|
|
141
|
-
* for I18n, we suggest to use the global configuration
|
|
142
|
-
* @defaultValue
|
|
143
|
-
* ```ts
|
|
144
|
-
* ({displayedPage}) => `${displayedPage}`
|
|
145
|
-
* ```
|
|
146
|
-
* @param displayedPage - The current page number
|
|
147
|
-
*/
|
|
148
|
-
slotNumberLabel: SlotContent<PaginationNumberContext>;
|
|
149
83
|
}
|
|
150
84
|
export interface PaginationProps extends PaginationCommonPropsAndState {
|
|
151
85
|
/**
|
|
@@ -209,6 +143,19 @@ export interface PaginationProps extends PaginationCommonPropsAndState {
|
|
|
209
143
|
* ```
|
|
210
144
|
*/
|
|
211
145
|
ariaPageLabel: (processPage: number, pageCount: number) => string;
|
|
146
|
+
/**
|
|
147
|
+
* Provide the label for the aria-live element
|
|
148
|
+
* This is used for accessibility purposes.
|
|
149
|
+
* for I18n, we suggest to use the global configuration
|
|
150
|
+
* override any configuration parameters provided for this
|
|
151
|
+
* @param currentPage - The current page number
|
|
152
|
+
* @param pageCount - The total number of pages
|
|
153
|
+
* @defaultValue
|
|
154
|
+
* ```ts
|
|
155
|
+
* ({currentPage, pageCount}) => `Current page is ${currentPage}`
|
|
156
|
+
* ```
|
|
157
|
+
*/
|
|
158
|
+
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
212
159
|
/**
|
|
213
160
|
* Factory function providing the href for a "Page" page anchor,
|
|
214
161
|
* based on the current page number
|
|
@@ -255,6 +202,8 @@ export interface PaginationState extends PaginationCommonPropsAndState {
|
|
|
255
202
|
pagesHrefs: string[];
|
|
256
203
|
/** The hrefs for the direction links */
|
|
257
204
|
directionsHrefs: DirectionsHrefs;
|
|
205
|
+
/** The aria-live text */
|
|
206
|
+
ariaLiveLabelText: string;
|
|
258
207
|
}
|
|
259
208
|
export interface PaginationActions {
|
|
260
209
|
/**
|
|
@@ -279,14 +228,34 @@ export interface PaginationActions {
|
|
|
279
228
|
*/
|
|
280
229
|
last(event?: MouseEvent): void;
|
|
281
230
|
}
|
|
282
|
-
export interface
|
|
231
|
+
export interface PaginationDirectives {
|
|
232
|
+
/**
|
|
233
|
+
* A directive to be applied to each page link
|
|
234
|
+
* This will handle the click, tabindex and aria attributes
|
|
235
|
+
*/
|
|
236
|
+
pageLink: Directive<{
|
|
237
|
+
page: number;
|
|
238
|
+
}>;
|
|
239
|
+
/**
|
|
240
|
+
* A directive to be applied on the previous link
|
|
241
|
+
*/
|
|
242
|
+
pagePrev: Directive;
|
|
243
|
+
/**
|
|
244
|
+
* A directive to be applied on the first link
|
|
245
|
+
*/
|
|
246
|
+
pageFirst: Directive;
|
|
247
|
+
/**
|
|
248
|
+
* A directive to be applied on the next link
|
|
249
|
+
*/
|
|
250
|
+
pageNext: Directive;
|
|
283
251
|
/**
|
|
284
|
-
*
|
|
285
|
-
* @param page - The page number to check
|
|
252
|
+
* A directive to be applied on the Last link
|
|
286
253
|
*/
|
|
287
|
-
|
|
254
|
+
pageLast: Directive;
|
|
288
255
|
}
|
|
289
|
-
export
|
|
256
|
+
export interface PaginationApi {
|
|
257
|
+
}
|
|
258
|
+
export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationActions, PaginationDirectives>;
|
|
290
259
|
/**
|
|
291
260
|
* Returns a shallow copy of the default pagination config
|
|
292
261
|
* @returns a copy of the default config
|
|
@@ -353,6 +322,19 @@ export declare function getPaginationDefaultConfig(): {
|
|
|
353
322
|
* ```
|
|
354
323
|
*/
|
|
355
324
|
ariaPageLabel: (processPage: number, pageCount: number) => string;
|
|
325
|
+
/**
|
|
326
|
+
* Provide the label for the aria-live element
|
|
327
|
+
* This is used for accessibility purposes.
|
|
328
|
+
* for I18n, we suggest to use the global configuration
|
|
329
|
+
* override any configuration parameters provided for this
|
|
330
|
+
* @param currentPage - The current page number
|
|
331
|
+
* @param pageCount - The total number of pages
|
|
332
|
+
* @defaultValue
|
|
333
|
+
* ```ts
|
|
334
|
+
* ({currentPage, pageCount}) => `Current page is ${currentPage}`
|
|
335
|
+
* ```
|
|
336
|
+
*/
|
|
337
|
+
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
356
338
|
/**
|
|
357
339
|
* Factory function providing the href for a "Page" page anchor,
|
|
358
340
|
* based on the current page number
|
|
@@ -420,6 +402,13 @@ export declare function getPaginationDefaultConfig(): {
|
|
|
420
402
|
* @defaultValue 'Action link for last page'
|
|
421
403
|
*/
|
|
422
404
|
ariaLastLabel: string;
|
|
405
|
+
/**
|
|
406
|
+
* The label for the "Ellipsis" page.
|
|
407
|
+
* for I18n, we suggest to use the global configuration
|
|
408
|
+
* override any configuration parameters provided for this
|
|
409
|
+
* @defaultValue 'Ellipsis page element'
|
|
410
|
+
*/
|
|
411
|
+
ariaEllipsisLabel: string;
|
|
423
412
|
/**
|
|
424
413
|
* If `true`, pagination links will be disabled.
|
|
425
414
|
* @defaultValue false
|
|
@@ -435,66 +424,6 @@ export declare function getPaginationDefaultConfig(): {
|
|
|
435
424
|
* @defaultValue false
|
|
436
425
|
*/
|
|
437
426
|
boundaryLinks: boolean;
|
|
438
|
-
/**
|
|
439
|
-
* The template to use for the structure of the pagination component
|
|
440
|
-
* The default structure uses {@link PaginationCommonPropsAndState.slotEllipsis|slotEllipsis}, {@link PaginationCommonPropsAndState.slotFirst|slotFirst},
|
|
441
|
-
* {@link PaginationCommonPropsAndState.slotPrevious|slotPrevious}, {@link PaginationCommonPropsAndState.slotNext|slotNext},
|
|
442
|
-
* {@link PaginationCommonPropsAndState.slotLast|slotLast}, {@link PaginationCommonPropsAndState.slotPages|slotPages},
|
|
443
|
-
* {@link PaginationCommonPropsAndState.slotNumberLabel|slotNumberLabel},
|
|
444
|
-
*/
|
|
445
|
-
slotStructure: SlotContent<PaginationContext>;
|
|
446
|
-
/**
|
|
447
|
-
* The template to use for the ellipsis slot
|
|
448
|
-
* for I18n, we suggest to use the global configuration
|
|
449
|
-
* override any configuration parameters provided for this
|
|
450
|
-
* @defaultValue '…'
|
|
451
|
-
*/
|
|
452
|
-
slotEllipsis: SlotContent<PaginationContext>;
|
|
453
|
-
/**
|
|
454
|
-
* The template to use for the first slot
|
|
455
|
-
* for I18n, we suggest to use the global configuration
|
|
456
|
-
* override any configuration parameters provided for this
|
|
457
|
-
* @defaultValue '«'
|
|
458
|
-
*/
|
|
459
|
-
slotFirst: SlotContent<PaginationContext>;
|
|
460
|
-
/**
|
|
461
|
-
* The template to use for the previous slot
|
|
462
|
-
* for I18n, we suggest to use the global configuration
|
|
463
|
-
* override any configuration parameters provided for this
|
|
464
|
-
* @defaultValue '‹'
|
|
465
|
-
*/
|
|
466
|
-
slotPrevious: SlotContent<PaginationContext>;
|
|
467
|
-
/**
|
|
468
|
-
* The template to use for the next slot
|
|
469
|
-
* for I18n, we suggest to use the global configuration
|
|
470
|
-
* override any configuration parameters provided for this
|
|
471
|
-
* @defaultValue '›'
|
|
472
|
-
*/
|
|
473
|
-
slotNext: SlotContent<PaginationContext>;
|
|
474
|
-
/**
|
|
475
|
-
* The template to use for the last slot
|
|
476
|
-
* for I18n, we suggest to use the global configuration
|
|
477
|
-
* override any configuration parameters provided for this
|
|
478
|
-
* @defaultValue '»'
|
|
479
|
-
*/
|
|
480
|
-
slotLast: SlotContent<PaginationContext>;
|
|
481
|
-
/**
|
|
482
|
-
* The template to use for the pages slot
|
|
483
|
-
* To use to customize the pages view
|
|
484
|
-
* override any configuration parameters provided for this
|
|
485
|
-
*/
|
|
486
|
-
slotPages: SlotContent<PaginationContext>;
|
|
487
|
-
/**
|
|
488
|
-
* The template to use for the number slot
|
|
489
|
-
* override any configuration parameters provided for this
|
|
490
|
-
* for I18n, we suggest to use the global configuration
|
|
491
|
-
* @defaultValue
|
|
492
|
-
* ```ts
|
|
493
|
-
* ({displayedPage}) => `${displayedPage}`
|
|
494
|
-
* ```
|
|
495
|
-
* @param displayedPage - The current page number
|
|
496
|
-
*/
|
|
497
|
-
slotNumberLabel: SlotContent<PaginationNumberContext>;
|
|
498
427
|
className: string;
|
|
499
428
|
};
|
|
500
429
|
/**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const progressbar = require("../../progressbar-DH7DHYMp.cjs");
|
|
4
|
+
exports.createProgressbar = progressbar.createProgressbar;
|
|
5
|
+
exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
2
2
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
|
-
export type ProgressbarContext = WidgetSlotContext<ProgressbarWidget>;
|
|
4
3
|
export interface ProgressbarCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
5
4
|
/**
|
|
6
5
|
* The minimum value.
|
|
@@ -21,27 +20,12 @@ export interface ProgressbarCommonPropsAndState extends WidgetsCommonPropsAndSta
|
|
|
21
20
|
* The aria label.
|
|
22
21
|
*/
|
|
23
22
|
ariaLabel: string;
|
|
23
|
+
}
|
|
24
|
+
export interface ProgressbarDirectives {
|
|
24
25
|
/**
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
slotStructure: SlotContent<ProgressbarContext>;
|
|
28
|
-
/**
|
|
29
|
-
* Label of the progress.
|
|
30
|
-
*/
|
|
31
|
-
slotDefault: SlotContent<ProgressbarContext>;
|
|
32
|
-
/**
|
|
33
|
-
* Height of the progressbar, can be any valid css height value.
|
|
34
|
-
*/
|
|
35
|
-
height: string;
|
|
36
|
-
/**
|
|
37
|
-
* If `true`, shows a striped progressbar.
|
|
38
|
-
*/
|
|
39
|
-
striped: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* If `true`, animates a striped progressbar.
|
|
42
|
-
* Takes effect only for browsers supporting CSS3 animations, and if `striped` is `true`.
|
|
26
|
+
* A directive to be applied to the main container that handles aria attributes.
|
|
43
27
|
*/
|
|
44
|
-
|
|
28
|
+
ariaDirective: Directive;
|
|
45
29
|
}
|
|
46
30
|
export interface ProgressbarState extends ProgressbarCommonPropsAndState {
|
|
47
31
|
/**
|
|
@@ -72,7 +56,7 @@ export interface ProgressbarProps extends ProgressbarCommonPropsAndState {
|
|
|
72
56
|
}
|
|
73
57
|
export interface ProgressbarApi {
|
|
74
58
|
}
|
|
75
|
-
export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, ProgressbarApi, object,
|
|
59
|
+
export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, ProgressbarApi, object, ProgressbarDirectives>;
|
|
76
60
|
/**
|
|
77
61
|
* Retrieve a shallow copy of the default Progressbar config
|
|
78
62
|
* @returns the default Progressbar config
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
2
2
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
3
3
|
export interface StarContext {
|
|
4
4
|
/**
|
|
@@ -38,10 +38,6 @@ export interface RatingCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
38
38
|
* If the component is disabled, `tabindex` will still be set to `-1`.
|
|
39
39
|
*/
|
|
40
40
|
tabindex: number;
|
|
41
|
-
/**
|
|
42
|
-
* The template to override the way each star is displayed.
|
|
43
|
-
*/
|
|
44
|
-
slotStar: SlotContent<StarContext>;
|
|
45
41
|
/**
|
|
46
42
|
* The aria label
|
|
47
43
|
*/
|
|
@@ -77,6 +73,19 @@ export interface RatingProps extends RatingCommonPropsAndState {
|
|
|
77
73
|
*/
|
|
78
74
|
onLeave: (rating: number) => void;
|
|
79
75
|
}
|
|
76
|
+
export interface RatingDirectives {
|
|
77
|
+
/**
|
|
78
|
+
* A directive to be applied to the main container
|
|
79
|
+
* This will handle the keydown, mouseleave, tabindex and aria attributes
|
|
80
|
+
*/
|
|
81
|
+
containerDirective: Directive;
|
|
82
|
+
/**
|
|
83
|
+
* A directive to be applied on each star element
|
|
84
|
+
*/
|
|
85
|
+
starDirective: Directive<{
|
|
86
|
+
index: number;
|
|
87
|
+
}>;
|
|
88
|
+
}
|
|
80
89
|
export interface RatingState extends RatingCommonPropsAndState {
|
|
81
90
|
/**
|
|
82
91
|
* the aria value of the rating
|
|
@@ -89,7 +98,7 @@ export interface RatingState extends RatingCommonPropsAndState {
|
|
|
89
98
|
/**
|
|
90
99
|
* is the rating interactive i.e. listening to hover, click and keyboard events
|
|
91
100
|
*/
|
|
92
|
-
|
|
101
|
+
interactive: boolean;
|
|
93
102
|
/**
|
|
94
103
|
* the list of stars
|
|
95
104
|
*/
|
|
@@ -123,7 +132,7 @@ export interface RatingActions {
|
|
|
123
132
|
*/
|
|
124
133
|
handleKey(event: KeyboardEvent): void;
|
|
125
134
|
}
|
|
126
|
-
export type RatingWidget = Widget<RatingProps, RatingState, object, RatingActions>;
|
|
135
|
+
export type RatingWidget = Widget<RatingProps, RatingState, object, RatingActions, RatingDirectives>;
|
|
127
136
|
/**
|
|
128
137
|
* Returns a shallow copy of the default rating config.
|
|
129
138
|
* @returns a copy of the default config
|
|
@@ -180,10 +189,6 @@ export declare function getRatingDefaultConfig(): {
|
|
|
180
189
|
* If the component is disabled, `tabindex` will still be set to `-1`.
|
|
181
190
|
*/
|
|
182
191
|
tabindex: number;
|
|
183
|
-
/**
|
|
184
|
-
* The template to override the way each star is displayed.
|
|
185
|
-
*/
|
|
186
|
-
slotStar: SlotContent<StarContext>;
|
|
187
192
|
/**
|
|
188
193
|
* The aria label
|
|
189
194
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const select = require("../../select-CCIKn8WR.cjs");
|
|
4
|
+
exports.createSelect = select.createSelect;
|
|
5
|
+
exports.defaultConfig = select.defaultConfig;
|
|
6
|
+
exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import type { Placement } from '@floating-ui/dom';
|
|
2
2
|
import type { FloatingUI } from '../../services/floatingUI';
|
|
3
3
|
import type { HasFocus } from '../../services/focustrack';
|
|
4
|
-
import type { Directive, PropsConfig,
|
|
4
|
+
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
5
5
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
6
|
-
/**
|
|
7
|
-
* A type for the slot context of the pagination widget
|
|
8
|
-
*/
|
|
9
|
-
export type SelectContext<Item> = WidgetSlotContext<SelectWidget<Item>>;
|
|
10
|
-
export interface SelectItemContext<Item> extends SelectContext<Item> {
|
|
11
|
-
/**
|
|
12
|
-
* Contextual data related to an item
|
|
13
|
-
*/
|
|
14
|
-
itemContext: ItemContext<Item>;
|
|
15
|
-
}
|
|
16
6
|
export interface SelectCommonPropsAndState<Item> extends WidgetsCommonPropsAndState {
|
|
17
7
|
/**
|
|
18
8
|
* id used for the input inside the select
|
|
@@ -54,16 +44,6 @@ export interface SelectCommonPropsAndState<Item> extends WidgetsCommonPropsAndSt
|
|
|
54
44
|
* true if a loading process is being done
|
|
55
45
|
*/
|
|
56
46
|
loading: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* The template to override the way each badge on the left of the input is displayed.
|
|
59
|
-
* This define the content of the badge inside the badge container.
|
|
60
|
-
*/
|
|
61
|
-
slotBadgeLabel: SlotContent<SelectItemContext<Item>>;
|
|
62
|
-
/**
|
|
63
|
-
* The template to override the way each item is displayed in the list.
|
|
64
|
-
* This define the content of the badge inside the badge container.
|
|
65
|
-
*/
|
|
66
|
-
slotItem: SlotContent<SelectItemContext<Item>>;
|
|
67
47
|
}
|
|
68
48
|
export interface SelectProps<T> extends SelectCommonPropsAndState<T> {
|
|
69
49
|
/**
|
|
@@ -200,7 +180,7 @@ export interface SelectApi<Item> {
|
|
|
200
180
|
*/
|
|
201
181
|
toggle(isOpen?: boolean): void;
|
|
202
182
|
}
|
|
203
|
-
export interface SelectDirectives {
|
|
183
|
+
export interface SelectDirectives<Item> {
|
|
204
184
|
/**
|
|
205
185
|
* Directive to be used in the input group and the menu containers
|
|
206
186
|
*/
|
|
@@ -217,6 +197,18 @@ export interface SelectDirectives {
|
|
|
217
197
|
* A directive to be applied to the element that contains the badges and the input
|
|
218
198
|
*/
|
|
219
199
|
inputContainerDirective: Directive;
|
|
200
|
+
/**
|
|
201
|
+
* A directive that applies all the necessary attributes to the container badges
|
|
202
|
+
*/
|
|
203
|
+
badgeAttributesDirective: Directive<ItemContext<Item>>;
|
|
204
|
+
/**
|
|
205
|
+
* A directive that applies all the necessary attributes to the dropdown menu
|
|
206
|
+
*/
|
|
207
|
+
menuAttributesDirective: Directive;
|
|
208
|
+
/**
|
|
209
|
+
* A directive that applies all the necessary attributes to the dropdown item
|
|
210
|
+
*/
|
|
211
|
+
itemAttributesDirective: Directive<ItemContext<Item>>;
|
|
220
212
|
}
|
|
221
213
|
export interface SelectActions<Item> {
|
|
222
214
|
/**
|
|
@@ -242,7 +234,7 @@ export interface SelectActions<Item> {
|
|
|
242
234
|
*/
|
|
243
235
|
onBadgeKeydown: (event: KeyboardEvent, item: Item) => void;
|
|
244
236
|
}
|
|
245
|
-
export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectActions<Item>, SelectDirectives
|
|
237
|
+
export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectActions<Item>, SelectDirectives<Item>>;
|
|
246
238
|
export declare const defaultConfig: SelectProps<any>;
|
|
247
239
|
/**
|
|
248
240
|
* Returns a shallow copy of the default select config.
|
|
@@ -323,16 +315,6 @@ export declare function getSelectDefaultConfig(): {
|
|
|
323
315
|
* true if a loading process is being done
|
|
324
316
|
*/
|
|
325
317
|
loading: boolean;
|
|
326
|
-
/**
|
|
327
|
-
* The template to override the way each badge on the left of the input is displayed.
|
|
328
|
-
* This define the content of the badge inside the badge container.
|
|
329
|
-
*/
|
|
330
|
-
slotBadgeLabel: SlotContent<SelectItemContext<any>>;
|
|
331
|
-
/**
|
|
332
|
-
* The template to override the way each item is displayed in the list.
|
|
333
|
-
* This define the content of the badge inside the badge container.
|
|
334
|
-
*/
|
|
335
|
-
slotItem: SlotContent<SelectItemContext<any>>;
|
|
336
318
|
className: string;
|
|
337
319
|
};
|
|
338
320
|
/**
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import type { WidgetsCommonPropsAndState } from '../commonProps';
|
|
2
|
-
import type { Directive, PropsConfig,
|
|
3
|
-
export type SliderContext = WidgetSlotContext<SliderWidget>;
|
|
4
|
-
export type SliderSlotLabelContext = SliderContext & {
|
|
5
|
-
value: number;
|
|
6
|
-
};
|
|
7
|
-
export type SliderSlotHandleContext = SliderContext & {
|
|
8
|
-
item: SliderHandle;
|
|
9
|
-
};
|
|
2
|
+
import type { Directive, PropsConfig, Widget } from '../../types';
|
|
10
3
|
export interface ProgressDisplayOptions {
|
|
11
4
|
/**
|
|
12
5
|
* Right offset of the progress in %
|
|
@@ -102,18 +95,6 @@ export interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
102
95
|
* It `true` slider display is inversed
|
|
103
96
|
*/
|
|
104
97
|
rtl: boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Slot to change the default display of the slider
|
|
107
|
-
*/
|
|
108
|
-
slotStructure: SlotContent<SliderContext>;
|
|
109
|
-
/**
|
|
110
|
-
* Slot to change the default labels of the slider
|
|
111
|
-
*/
|
|
112
|
-
slotLabel: SlotContent<SliderSlotLabelContext>;
|
|
113
|
-
/**
|
|
114
|
-
* Slot to change the handlers
|
|
115
|
-
*/
|
|
116
|
-
slotHandle: SlotContent<SliderSlotHandleContext>;
|
|
117
98
|
}
|
|
118
99
|
export interface SliderState extends SliderCommonPropsAndState {
|
|
119
100
|
/**
|
|
@@ -153,10 +134,9 @@ export interface SliderState extends SliderCommonPropsAndState {
|
|
|
153
134
|
*/
|
|
154
135
|
handleDisplayOptions: HandleDisplayOptions[];
|
|
155
136
|
/**
|
|
156
|
-
* Check if the slider is
|
|
157
|
-
* TODO: rename to `interactive`, issue #510
|
|
137
|
+
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
158
138
|
*/
|
|
159
|
-
|
|
139
|
+
interactive: boolean;
|
|
160
140
|
}
|
|
161
141
|
export interface SliderProps extends SliderCommonPropsAndState {
|
|
162
142
|
/**
|
|
@@ -187,6 +167,22 @@ export interface SliderDirectives {
|
|
|
187
167
|
* Directive to get the slider component elementRef
|
|
188
168
|
*/
|
|
189
169
|
sliderDirective: Directive;
|
|
170
|
+
/**
|
|
171
|
+
* Directive used to style the progress display for each handle
|
|
172
|
+
*/
|
|
173
|
+
progressDisplayDirective: Directive<{
|
|
174
|
+
option: ProgressDisplayOptions;
|
|
175
|
+
}>;
|
|
176
|
+
/**
|
|
177
|
+
* Directive to apply to the slider clickable area, to directly move the handle to a given specific position
|
|
178
|
+
*/
|
|
179
|
+
clickableAreaDirective: Directive;
|
|
180
|
+
/**
|
|
181
|
+
* Directive to apply to the slider handle if any
|
|
182
|
+
*/
|
|
183
|
+
handleDirective: Directive<{
|
|
184
|
+
item: SliderHandle;
|
|
185
|
+
}>;
|
|
190
186
|
/**
|
|
191
187
|
* Directive to get the minLabel elementRef
|
|
192
188
|
*/
|
|
@@ -195,6 +191,16 @@ export interface SliderDirectives {
|
|
|
195
191
|
* Directive to get the maxLabel elementRef
|
|
196
192
|
*/
|
|
197
193
|
maxLabelDirective: Directive;
|
|
194
|
+
/**
|
|
195
|
+
* Directive to apply to the handle when combined label display is active
|
|
196
|
+
*/
|
|
197
|
+
combinedHandleLabelDisplayDirective: Directive;
|
|
198
|
+
/**
|
|
199
|
+
* Directive to apply to the handle when combined label display is not active
|
|
200
|
+
*/
|
|
201
|
+
handleLabelDisplayDirective: Directive<{
|
|
202
|
+
index: number;
|
|
203
|
+
}>;
|
|
198
204
|
}
|
|
199
205
|
export interface SliderActions {
|
|
200
206
|
/**
|
|
@@ -287,18 +293,6 @@ export declare function getSliderDefaultConfig(): {
|
|
|
287
293
|
* It `true` slider display is inversed
|
|
288
294
|
*/
|
|
289
295
|
rtl: boolean;
|
|
290
|
-
/**
|
|
291
|
-
* Slot to change the default display of the slider
|
|
292
|
-
*/
|
|
293
|
-
slotStructure: SlotContent<SliderContext>;
|
|
294
|
-
/**
|
|
295
|
-
* Slot to change the default labels of the slider
|
|
296
|
-
*/
|
|
297
|
-
slotLabel: SlotContent<SliderSlotLabelContext>;
|
|
298
|
-
/**
|
|
299
|
-
* Slot to change the handlers
|
|
300
|
-
*/
|
|
301
|
-
slotHandle: SlotContent<SliderSlotHandleContext>;
|
|
302
296
|
className: string;
|
|
303
297
|
};
|
|
304
298
|
/**
|