@agnos-ui/core 0.4.4 → 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.
Files changed (113) hide show
  1. package/README.md +2 -2
  2. package/{accordion-BnaSamoQ.js → accordion-BGv150k9.js} +10 -13
  3. package/{accordion-DmPT0O0j.cjs → accordion-Lp-LEbZ2.cjs} +10 -13
  4. package/{alert-CEFbEgvG.cjs → alert-Bq101evB.cjs} +1 -1
  5. package/{alert-DdGuK__c.js → alert-DJ2l7bcA.js} +1 -1
  6. package/{common-CO5b5G_J.js → common-Banw3FYN.js} +15 -14
  7. package/{common-nxv_hKNE.cjs → common-DvPjK7SS.cjs} +15 -14
  8. package/components/accordion/accordion.d.ts +35 -8
  9. package/components/accordion/index.cjs +1 -1
  10. package/components/accordion/index.js +1 -1
  11. package/components/alert/alert.d.ts +16 -1
  12. package/components/alert/common.d.ts +19 -1
  13. package/components/alert/index.cjs +1 -1
  14. package/components/alert/index.js +1 -1
  15. package/components/commonProps.d.ts +3 -0
  16. package/components/modal/index.cjs +1 -1
  17. package/components/modal/index.js +1 -1
  18. package/components/modal/modal.d.ts +3 -135
  19. package/components/pagination/index.cjs +1 -1
  20. package/components/pagination/index.js +1 -1
  21. package/components/pagination/pagination.d.ts +30 -217
  22. package/components/progressbar/index.cjs +1 -1
  23. package/components/progressbar/index.js +1 -1
  24. package/components/progressbar/progressbar.d.ts +13 -3
  25. package/components/rating/index.cjs +1 -1
  26. package/components/rating/index.js +1 -1
  27. package/components/rating/rating.d.ts +26 -115
  28. package/components/select/index.cjs +1 -1
  29. package/components/select/index.js +1 -1
  30. package/components/select/select.d.ts +21 -148
  31. package/components/slider/index.cjs +1 -1
  32. package/components/slider/index.js +1 -1
  33. package/components/slider/slider.d.ts +31 -126
  34. package/components/toast/index.cjs +1 -1
  35. package/components/toast/index.js +1 -1
  36. package/components/toast/toast.d.ts +16 -1
  37. package/config.d.ts +17 -1
  38. package/{directive-3-8yr-ZK.js → directive-CKEccryv.js} +11 -5
  39. package/{directive-j-xRk-h3.cjs → directive-DdlwGFtf.cjs} +11 -5
  40. package/index.cjs +13 -13
  41. package/index.js +15 -15
  42. package/{modal-D4d8sy85.cjs → modal-DDHcrykD.cjs} +10 -21
  43. package/{modal-CeTI4jxI.js → modal-DP-4I7vf.js} +11 -22
  44. package/package.json +6 -5
  45. package/{pagination-B9WFv70F.cjs → pagination-CBysiPUs.cjs} +23 -35
  46. package/{pagination-BpPHKQsH.js → pagination-DwDRot6q.js} +23 -35
  47. package/{progressbar-BybOg5FE.js → progressbar-CGmNq0cS.js} +3 -4
  48. package/{progressbar-DXCMeJvL.cjs → progressbar-DghzCJ6_.cjs} +3 -4
  49. package/{rating-D6Tv_4Vx.js → rating-Da38uaZz.js} +61 -54
  50. package/{rating-C2Y95r50.cjs → rating-DlfOuwuX.cjs} +61 -54
  51. package/{select-jUrt_lSn.js → select-CAEPqdz1.js} +92 -72
  52. package/{select-BBiF-m3N.cjs → select-LBVhNdrd.cjs} +92 -72
  53. package/services/extendWidget.d.ts +37 -4
  54. package/services/floatingUI.cjs +3 -2
  55. package/services/floatingUI.d.ts +28 -27
  56. package/services/floatingUI.js +3 -2
  57. package/services/focustrack.cjs +1 -1
  58. package/services/focustrack.d.ts +21 -0
  59. package/services/focustrack.js +1 -1
  60. package/services/hash.d.ts +2 -1
  61. package/services/intersection.cjs +1 -1
  62. package/services/intersection.d.ts +9 -13
  63. package/services/intersection.js +1 -1
  64. package/services/matchMedia.cjs +1 -1
  65. package/services/matchMedia.d.ts +2 -1
  66. package/services/matchMedia.js +1 -1
  67. package/services/navManager.cjs +1 -1
  68. package/services/navManager.d.ts +85 -41
  69. package/services/navManager.js +1 -1
  70. package/services/portal.cjs +1 -1
  71. package/services/portal.d.ts +3 -0
  72. package/services/portal.js +1 -1
  73. package/services/resizeObserver.cjs +2 -2
  74. package/services/resizeObserver.d.ts +2 -6
  75. package/services/resizeObserver.js +2 -2
  76. package/services/siblingsInert.cjs +3 -3
  77. package/services/siblingsInert.d.ts +3 -5
  78. package/services/siblingsInert.js +3 -3
  79. package/services/transitions/baseTransitions.cjs +4 -5
  80. package/services/transitions/baseTransitions.d.ts +21 -4
  81. package/services/transitions/baseTransitions.js +4 -5
  82. package/services/transitions/collapse.cjs +1 -1
  83. package/services/transitions/collapse.d.ts +6 -0
  84. package/services/transitions/collapse.js +1 -1
  85. package/services/transitions/cssTransitions.cjs +1 -1
  86. package/services/transitions/cssTransitions.d.ts +3 -0
  87. package/services/transitions/cssTransitions.js +1 -1
  88. package/services/transitions/simpleClassTransition.cjs +1 -1
  89. package/services/transitions/simpleClassTransition.d.ts +9 -2
  90. package/services/transitions/simpleClassTransition.js +1 -1
  91. package/{slider-ByDkbyr1.js → slider-DYrwS7Mv.js} +118 -116
  92. package/{slider-BdsZpxJr.cjs → slider-DlOAawbZ.cjs} +118 -116
  93. package/{toast-BzxextBQ.js → toast-CpvsibAI.js} +3 -3
  94. package/{toast-Dy3ck2cM.cjs → toast-D_uSrRZL.cjs} +3 -3
  95. package/types.cjs +0 -8
  96. package/types.d.ts +151 -19
  97. package/types.js +1 -9
  98. package/utils/directive.cjs +1 -1
  99. package/utils/directive.d.ts +81 -32
  100. package/utils/directive.js +1 -1
  101. package/utils/internal/checks.d.ts +6 -0
  102. package/utils/internal/dom.d.ts +5 -5
  103. package/utils/internal/promise.d.ts +9 -0
  104. package/utils/internal/sort.d.ts +2 -2
  105. package/utils/internal/ssrHTMLElement.d.ts +4 -0
  106. package/utils/stores.cjs +1 -1
  107. package/utils/stores.d.ts +80 -42
  108. package/utils/stores.js +1 -1
  109. package/utils/writables.cjs +2 -1
  110. package/utils/writables.d.ts +52 -3
  111. package/utils/writables.js +2 -1
  112. package/{writables-D46sFgGK.cjs → writables-BPAJvaL_.cjs} +9 -0
  113. package/{writables-DoU_XYTX.js → writables-DCiBdIBK.js} +11 -2
@@ -1,5 +1,8 @@
1
1
  import type { Directive, PropsConfig, Widget } from '../../types';
2
2
  import type { WidgetsCommonPropsAndState } from '../commonProps';
3
+ /**
4
+ * Represents the context for a star in a rating component.
5
+ */
3
6
  export interface StarContext {
4
7
  /**
5
8
  * indicates how much the current star is filled, from 0 to 100
@@ -63,6 +66,9 @@ interface RatingCommonPropsAndState extends WidgetsCommonPropsAndState {
63
66
  */
64
67
  ariaLabelledBy: string;
65
68
  }
69
+ /**
70
+ * Interface representing the properties for the Rating widget.
71
+ */
66
72
  export interface RatingProps extends RatingCommonPropsAndState {
67
73
  /**
68
74
  * Return the value for the 'aria-valuetext' attribute.
@@ -109,6 +115,9 @@ export interface RatingProps extends RatingCommonPropsAndState {
109
115
  */
110
116
  onLeave: (rating: number) => void;
111
117
  }
118
+ /**
119
+ * Interface representing directives for a rating component.
120
+ */
112
121
  export interface RatingDirectives {
113
122
  /**
114
123
  * A directive to be applied to the main container
@@ -122,6 +131,9 @@ export interface RatingDirectives {
122
131
  index: number;
123
132
  }>;
124
133
  }
134
+ /**
135
+ * Represents the state of a rating component.
136
+ */
125
137
  export interface RatingState extends RatingCommonPropsAndState {
126
138
  /**
127
139
  * the aria value of the rating
@@ -140,137 +152,36 @@ export interface RatingState extends RatingCommonPropsAndState {
140
152
  */
141
153
  stars: StarContext[];
142
154
  }
143
- export interface RatingActions {
155
+ /**
156
+ * Interface representing the API that can be performed on a rating component.
157
+ */
158
+ export interface RatingApi {
144
159
  /**
145
- * Method to be used when a star is clicked.
160
+ * Sets the rating value.
146
161
  *
147
- * To be used in the onclick event of a star
148
162
  * @param index - Star index, starting from 1
149
163
  */
150
- click(index: number): void;
164
+ setRating(index: number): void;
151
165
  /**
152
- * Method to be used when the mouse enter in a star.
166
+ * Sets the hovered rating value.
153
167
  *
154
- * To be used in the onmouseenter of a star
155
168
  * @param index - Star index, starting from 1
156
169
  */
157
- hover(index: number): void;
170
+ setHoveredRating(index: number): void;
158
171
  /**
159
- * Method to be used when the mouse leave the widget.
160
- *
161
- * To be used in the onmouseleave of the rating container
172
+ * Leave the rating, resetting the visible rating to the rating value and triggering the onLeave callback
162
173
  */
163
174
  leave(): void;
164
- /**
165
- * Method to be used to handle the keyboard.
166
- *
167
- * To be used in the onkeydown of the rating container
168
- */
169
- handleKey(event: KeyboardEvent): void;
170
175
  }
171
- export type RatingWidget = Widget<RatingProps, RatingState, object, RatingActions, RatingDirectives>;
176
+ /**
177
+ * Represents a Rating widget.
178
+ */
179
+ export type RatingWidget = Widget<RatingProps, RatingState, RatingApi, RatingDirectives>;
172
180
  /**
173
181
  * Returns a shallow copy of the default rating config.
174
182
  * @returns a copy of the default config
175
183
  */
176
- export declare function getRatingDefaultConfig(): {
177
- /**
178
- * Return the value for the 'aria-valuetext' attribute.
179
- * @param rating - Current rating value.
180
- * @param maxRating - maxRating value.
181
- *
182
- * @defaultValue
183
- * ```ts
184
- * (rating: number, maxRating: number) => `${rating} out of ${maxRating}`
185
- * ```
186
- */
187
- ariaValueTextFn: (rating: number, maxRating: number) => string;
188
- /**
189
- * An event emitted when the rating is changed.
190
- *
191
- * Event payload is equal to the newly selected rating.
192
- *
193
- * @defaultValue
194
- * ```ts
195
- * () => {}
196
- * ```
197
- */
198
- onRatingChange: (rating: number) => void;
199
- /**
200
- * An event emitted when the user is hovering over a given rating.
201
- *
202
- * Event payload is equal to the rating being hovered over.
203
- *
204
- * @defaultValue
205
- * ```ts
206
- * () => {}
207
- * ```
208
- */
209
- onHover: (rating: number) => void;
210
- /**
211
- * An event emitted when the user stops hovering over a given rating.
212
- *
213
- * Event payload is equal to the rating of the last item being hovered over.
214
- *
215
- * @defaultValue
216
- * ```ts
217
- * () => {}
218
- * ```
219
- */
220
- onLeave: (rating: number) => void;
221
- /**
222
- * The current rating. Could be a decimal value like `3.75`.
223
- *
224
- * @defaultValue `0`
225
- */
226
- rating: number;
227
- /**
228
- * The maximum rating that can be given.
229
- *
230
- * @defaultValue `10`
231
- */
232
- maxRating: number;
233
- /**
234
- * If `true`, the rating is disabled.
235
- *
236
- * @defaultValue `false`
237
- */
238
- disabled: boolean;
239
- /**
240
- * If `true`, the rating can't be changed.
241
- *
242
- * @defaultValue `false`
243
- */
244
- readonly: boolean;
245
- /**
246
- * Define if the rating can be reset.
247
- *
248
- * If set to true, the user can 'unset' the rating value by cliking on the current rating value.
249
- *
250
- * @defaultValue `true`
251
- */
252
- resettable: boolean;
253
- /**
254
- * Allows setting a custom rating tabindex.
255
- * If the component is disabled, `tabindex` will still be set to `-1`.
256
- *
257
- * @defaultValue `0`
258
- */
259
- tabindex: number;
260
- /**
261
- * The aria label
262
- *
263
- * @defaultValue `'Rating'`
264
- */
265
- ariaLabel: string;
266
- /**
267
- * The aria labelled by
268
- *
269
- * @defaultValue `''`
270
- */
271
- ariaLabelledBy: string;
272
- className: string;
273
- };
184
+ export declare function getRatingDefaultConfig(): RatingProps;
274
185
  /**
275
186
  * Create a RatingWidget with given config props
276
187
  * @param config - an optional alert config
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const select = require("../../select-BBiF-m3N.cjs");
3
+ const select = require("../../select-LBVhNdrd.cjs");
4
4
  exports.createSelect = select.createSelect;
5
5
  exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../select-jUrt_lSn.js";
1
+ import { c, g } from "../../select-CAEPqdz1.js";
2
2
  export {
3
3
  c as createSelect,
4
4
  g as getSelectDefaultConfig
@@ -63,6 +63,9 @@ interface SelectCommonPropsAndState<Item> extends WidgetsCommonPropsAndState {
63
63
  */
64
64
  loading: boolean;
65
65
  }
66
+ /**
67
+ * Props for the Select component.
68
+ */
66
69
  export interface SelectProps<Item> extends SelectCommonPropsAndState<Item> {
67
70
  /**
68
71
  * List of available items for the dropdown
@@ -148,6 +151,9 @@ export interface ItemContext<T> {
148
151
  */
149
152
  selected: boolean;
150
153
  }
154
+ /**
155
+ * Represents the state of a Select component.
156
+ */
151
157
  export interface SelectState<Item> extends SelectCommonPropsAndState<Item> {
152
158
  /**
153
159
  * List of item contexts, to be displayed in the menu
@@ -167,6 +173,9 @@ export interface SelectState<Item> extends SelectCommonPropsAndState<Item> {
167
173
  */
168
174
  placement: Placement | undefined;
169
175
  }
176
+ /**
177
+ * Interface representing the API for a Select component.
178
+ */
170
179
  export interface SelectApi<Item> {
171
180
  /**
172
181
  * Clear all the selected items
@@ -229,6 +238,9 @@ export interface SelectApi<Item> {
229
238
  */
230
239
  toggle(isOpen?: boolean): void;
231
240
  }
241
+ /**
242
+ * Interface representing the directives used in the Select component.
243
+ */
232
244
  export interface SelectDirectives<Item> {
233
245
  /**
234
246
  * Directive to be used in the input group and the menu containers
@@ -258,163 +270,24 @@ export interface SelectDirectives<Item> {
258
270
  * A directive that applies all the necessary attributes to the dropdown item
259
271
  */
260
272
  itemAttributesDirective: Directive<ItemContext<Item>>;
261
- }
262
- export interface SelectActions<Item> {
263
273
  /**
264
- * Method to be plugged to on the 'input' event. The input text will be used as the filter text.
274
+ * A directive to be applied to the input
265
275
  */
266
- onInput: (e: {
267
- target: any;
268
- }) => void;
276
+ inputDirective: Directive;
269
277
  /**
270
- * Method to be attached to the node element to close a badge on click.
278
+ * A directive to be applied to a button that closes a badge
271
279
  */
272
- onRemoveBadgeClick: (event: MouseEvent, item: Item) => void;
273
- /**
274
- * Method to be plugged to on an keydown event of the main input, in order to control the keyboard interactions with the highlighted item.
275
- * It manages arrow keys to move the highlighted item, or enter to toggle the item.
276
- */
277
- onInputKeydown: (event: KeyboardEvent) => void;
278
- /**
279
- * Method to be plugged to on an keydown event of a badge container, in order to manage main actions on badges.
280
- *
281
- * @param event - keyboard event
282
- * @param item - corresponding item
283
- */
284
- onBadgeKeydown: (event: KeyboardEvent, item: Item) => void;
280
+ badgeCloseButtonDirective: Directive<ItemContext<Item>>;
285
281
  }
286
- export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectActions<Item>, SelectDirectives<Item>>;
282
+ /**
283
+ * Represents a Select widget component.
284
+ */
285
+ export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectDirectives<Item>>;
287
286
  /**
288
287
  * Returns a shallow copy of the default select config.
289
288
  * @returns a copy of the default config
290
289
  */
291
- export declare function getSelectDefaultConfig(): {
292
- /**
293
- * List of available items for the dropdown
294
- *
295
- * @defaultValue `[]`
296
- */
297
- items: any[];
298
- /**
299
- * List of allowed placements for the dropdown.
300
- * This refers to the [allowedPlacements from floating UI](https://floating-ui.com/docs/autoPlacement#allowedplacements), given the different [Placement possibilities](https://floating-ui.com/docs/computePosition#placement).
301
- *
302
- * @defaultValue
303
- * ```ts
304
- * ['bottom-start', 'top-start', 'bottom-end', 'top-end']
305
- * ```
306
- */
307
- allowedPlacements: Placement[];
308
- /**
309
- * Custom function to get the id of an item
310
- * By default, the item is returned
311
- *
312
- * @defaultValue
313
- * ```ts
314
- * (item: any) => '' + item
315
- * ```
316
- */
317
- itemIdFn(item: any): string;
318
- /**
319
- * Retrieves navigable elements within an HTML element containing badges and the input.
320
- *
321
- * @param node - HTMLElement that contains the badges and the input
322
- *
323
- * @defaultValue
324
- * ```ts
325
- * (node: HTMLElement) => node.querySelectorAll('.au-select-badge,input')
326
- * ```
327
- */
328
- navSelector(node: HTMLElement): NodeListOf<HTMLSpanElement | HTMLInputElement>;
329
- /**
330
- * Callback called dropdown open state change
331
- * @param isOpen - updated open state
332
- *
333
- * @defaultValue
334
- * ```ts
335
- * () => {}
336
- * ```
337
- */
338
- onOpenChange(isOpen: boolean): void;
339
- /**
340
- * Callback called when the text filter change
341
- * @param text - Filtered text
342
- *
343
- * @defaultValue
344
- * ```ts
345
- * () => {}
346
- * ```
347
- */
348
- onFilterTextChange(text: string): void;
349
- /**
350
- * Callback called when the selection change
351
- *
352
- * @defaultValue
353
- * ```ts
354
- * () => {}
355
- * ```
356
- */
357
- onSelectedChange(selected: any[]): void;
358
- /**
359
- * id used for the input inside the select
360
- */
361
- id: string | undefined;
362
- /**
363
- * aria-label used for the input inside the select
364
- *
365
- * @defaultValue `'Select'`
366
- */
367
- ariaLabel: string | undefined;
368
- /**
369
- * List of selected item ids
370
- *
371
- * @defaultValue `[]`
372
- */
373
- selected: any[];
374
- /**
375
- * Filtered text to be display in the filter input
376
- *
377
- * @defaultValue `''`
378
- */
379
- filterText: string;
380
- /**
381
- * true if the select is disabled
382
- *
383
- * @defaultValue `false`
384
- */
385
- disabled: boolean;
386
- /**
387
- * true if the select is open
388
- *
389
- * @defaultValue `false`
390
- */
391
- open: boolean;
392
- /**
393
- * Class to be added on the dropdown menu container
394
- *
395
- * @defaultValue `''`
396
- */
397
- menuClassName: string;
398
- /**
399
- * Class to be added on menu items
400
- *
401
- * @defaultValue `''`
402
- */
403
- menuItemClassName: string;
404
- /**
405
- * Class to be added on selected items (displayed in the input zone)
406
- *
407
- * @defaultValue `''`
408
- */
409
- badgeClassName: string;
410
- /**
411
- * true if a loading process is being done
412
- *
413
- * @defaultValue `false`
414
- */
415
- loading: boolean;
416
- className: string;
417
- };
290
+ export declare function getSelectDefaultConfig(): SelectProps<any>;
418
291
  /**
419
292
  * Create a SelectWidget with given config props
420
293
  * @param config - an optional alert config
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const slider = require("../../slider-BdsZpxJr.cjs");
3
+ const slider = require("../../slider-DlOAawbZ.cjs");
4
4
  exports.createSlider = slider.createSlider;
5
5
  exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../slider-ByDkbyr1.js";
1
+ import { c, g } from "../../slider-DYrwS7Mv.js";
2
2
  export {
3
3
  c as createSlider,
4
4
  g as getSliderDefaultConfig
@@ -1,5 +1,8 @@
1
1
  import type { WidgetsCommonPropsAndState } from '../commonProps';
2
2
  import type { Directive, PropsConfig, Widget } from '../../types';
3
+ /**
4
+ * Options for displaying progress in a slider component.
5
+ */
3
6
  export interface ProgressDisplayOptions {
4
7
  /**
5
8
  * Right offset of the progress in %
@@ -26,6 +29,9 @@ export interface ProgressDisplayOptions {
26
29
  */
27
30
  height: number;
28
31
  }
32
+ /**
33
+ * Options for displaying a handle in a slider component.
34
+ */
29
35
  export interface HandleDisplayOptions {
30
36
  /**
31
37
  * Left offset of the handle in %
@@ -36,6 +42,9 @@ export interface HandleDisplayOptions {
36
42
  */
37
43
  top: number | null;
38
44
  }
45
+ /**
46
+ * Represents a handle in a slider component.
47
+ */
39
48
  export interface SliderHandle {
40
49
  /**
41
50
  * Value of the handle
@@ -116,6 +125,9 @@ interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
116
125
  */
117
126
  rtl: boolean;
118
127
  }
128
+ /**
129
+ * Represents the state of a slider component.
130
+ */
119
131
  export interface SliderState extends SliderCommonPropsAndState {
120
132
  /**
121
133
  * Sorted slider values
@@ -158,6 +170,9 @@ export interface SliderState extends SliderCommonPropsAndState {
158
170
  */
159
171
  interactive: boolean;
160
172
  }
173
+ /**
174
+ * Interface representing the properties for the Slider component.
175
+ */
161
176
  export interface SliderProps extends SliderCommonPropsAndState {
162
177
  /**
163
178
  * Return the value for the 'aria-label' attribute for the handle
@@ -195,8 +210,9 @@ export interface SliderProps extends SliderCommonPropsAndState {
195
210
  */
196
211
  onValuesChange: (values: number[]) => void;
197
212
  }
198
- export interface SliderApi {
199
- }
213
+ /**
214
+ * Interface representing various directives used in the slider component.
215
+ */
200
216
  export interface SliderDirectives {
201
217
  /**
202
218
  * Directive to get the slider component elementRef
@@ -212,6 +228,14 @@ export interface SliderDirectives {
212
228
  * Directive to apply to the slider clickable area, to directly move the handle to a given specific position
213
229
  */
214
230
  clickableAreaDirective: Directive;
231
+ /**
232
+ * Directive to apply handle events handlers
233
+ */
234
+ handleEventsDirective: Directive<{
235
+ item: {
236
+ id: number;
237
+ };
238
+ }>;
215
239
  /**
216
240
  * Directive to apply to the slider handle if any
217
241
  */
@@ -237,134 +261,15 @@ export interface SliderDirectives {
237
261
  index: number;
238
262
  }>;
239
263
  }
240
- export interface SliderActions {
241
- /**
242
- * Method to handle click on the slider
243
- * @param event - mouse event
244
- */
245
- click(event: MouseEvent): void;
246
- /**
247
- * Method to process the keyboard event
248
- * @param event - keyboard event object
249
- * @param handleNumber - id of the modified handle
250
- */
251
- keydown(event: KeyboardEvent, handleNumber: number): void;
252
- /**
253
- * Method describing the behavior of the slider handle on mouse down event
254
- * @param event - mouse event
255
- * @param handleId - numeric id of the handle
256
- */
257
- mouseDown(event: MouseEvent, handleId: number): void;
258
- /**
259
- * Method describing the behavior of the slider handle on touch start event
260
- * @param event - touch event
261
- * @param handleId - number id of the handle
262
- */
263
- touchStart(event: TouchEvent, handleId: number): void;
264
- }
265
- export type SliderWidget = Widget<SliderProps, SliderState, SliderApi, SliderActions, SliderDirectives>;
264
+ /**
265
+ * Represents a slider widget component.
266
+ */
267
+ export type SliderWidget = Widget<SliderProps, SliderState, object, SliderDirectives>;
266
268
  /**
267
269
  * Returns a shallow copy of the default slider config.
268
270
  * @returns a copy of the default config
269
271
  */
270
- export declare function getSliderDefaultConfig(): {
271
- /**
272
- * Return the value for the 'aria-label' attribute for the handle
273
- * @param value - value of the handle
274
- * @param sortedIndex - index of the handle in the sorted list
275
- * @param index - index of the handle in the original list
276
- *
277
- * @defaultValue
278
- * ```ts
279
- * (value: number) => '' + value
280
- * ```
281
- */
282
- ariaLabelHandle: (value: number, sortedIndex: number, index: number) => string;
283
- /**
284
- * Return the value for the 'aria-valuetext' attribute for the handle
285
- * @param value - value of the handle
286
- * @param sortedIndex - index of the handle in the sorted list
287
- * @param index - index of the handle in the original list
288
- *
289
- * @defaultValue
290
- * ```ts
291
- * (value: number) => '' + value
292
- * ```
293
- */
294
- ariaValueText: (value: number, sortedIndex: number, index: number) => string;
295
- /**
296
- * An event emitted when slider values are changed
297
- *
298
- * Event payload equals to the updated slider values
299
- *
300
- * @defaultValue
301
- * ```ts
302
- * () => {}
303
- * ```
304
- */
305
- onValuesChange: (values: number[]) => void;
306
- /**
307
- * Minimum value that can be assigned to the slider
308
- *
309
- * @defaultValue `0`
310
- */
311
- min: number;
312
- /**
313
- * Maximum value that can be assigned to the slider
314
- *
315
- * @defaultValue `100`
316
- */
317
- max: number;
318
- /**
319
- * Unit value between slider steps
320
- *
321
- * @defaultValue `1`
322
- */
323
- stepSize: number;
324
- /**
325
- * If `true` slider value cannot be changed but the slider is still focusable
326
- *
327
- * @defaultValue `false`
328
- */
329
- readonly: boolean;
330
- /**
331
- * If `true` slider value cannot be changed and the slider cannot be focused
332
- *
333
- * @defaultValue `false`
334
- */
335
- disabled: boolean;
336
- /**
337
- * If `true` is vertically positioned otherwise it is horizontal
338
- *
339
- * @defaultValue `false`
340
- */
341
- vertical: boolean;
342
- /**
343
- * Current slider values
344
- *
345
- * @defaultValue `[0]`
346
- */
347
- values: number[];
348
- /**
349
- * If `true` the value labels are displayed on the slider
350
- *
351
- * @defaultValue `true`
352
- */
353
- showValueLabels: boolean;
354
- /**
355
- * If `true` the min and max labels are displayed on the slider
356
- *
357
- * @defaultValue `true`
358
- */
359
- showMinMaxLabels: boolean;
360
- /**
361
- * It `true` slider display is inversed
362
- *
363
- * @defaultValue `false`
364
- */
365
- rtl: boolean;
366
- className: string;
367
- };
272
+ export declare function getSliderDefaultConfig(): SliderProps;
368
273
  /**
369
274
  * Create a slider widget with given config props
370
275
  * @param config - an optional slider config
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toast = require("../../toast-Dy3ck2cM.cjs");
3
+ const toast = require("../../toast-D_uSrRZL.cjs");
4
4
  exports.createToast = toast.createToast;
5
5
  exports.getToastDefaultConfig = toast.getToastDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../toast-BzxextBQ.js";
1
+ import { c, g } from "../../toast-CpvsibAI.js";
2
2
  export {
3
3
  c as createToast,
4
4
  g as getToastDefaultConfig
@@ -28,15 +28,30 @@ interface ExtraDirectives {
28
28
  */
29
29
  closeButtonDirective: Directive;
30
30
  }
31
+ /**
32
+ * Represents the state of a toast component.
33
+ */
31
34
  export interface ToastState extends CommonAlertState, ToastExtraProps {
32
35
  }
36
+ /**
37
+ * Represents the properties for the toast component.
38
+ */
33
39
  export interface ToastProps extends CommonAlertProps, ToastExtraProps {
34
40
  }
41
+ /**
42
+ * Represents the API for the toast component.
43
+ */
35
44
  export interface ToastApi extends CommonAlertApi {
36
45
  }
46
+ /**
47
+ * Interface representing the directives for a toast component.
48
+ */
37
49
  export interface ToastDirectives extends CommonAlertDirectives, ExtraDirectives {
38
50
  }
39
- export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, object, ToastDirectives>;
51
+ /**
52
+ * Represents a toast widget with specific properties, state, API, and directives.
53
+ */
54
+ export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectives>;
40
55
  /**
41
56
  * Retrieve a shallow copy of the default toast config
42
57
  * @returns the default toast config