@agnos-ui/core 0.3.1 → 0.4.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 (79) hide show
  1. package/accordion-BnaSamoQ.js +322 -0
  2. package/accordion-DmPT0O0j.cjs +321 -0
  3. package/{alert-Dlf-BV98.js → alert-8ilqhLst.js} +1 -1
  4. package/{alert-C4jCg9Pl.cjs → alert-C-V64Qcs.cjs} +1 -1
  5. package/{common-DRdsw5m8.js → common-BCEqowKw.js} +1 -1
  6. package/{common-nJRMXbwj.cjs → common-Kb96q7i4.cjs} +1 -1
  7. package/components/accordion/accordion.d.ts +33 -86
  8. package/components/accordion/index.cjs +1 -1
  9. package/components/accordion/index.js +1 -1
  10. package/components/alert/common.d.ts +1 -1
  11. package/components/alert/index.cjs +2 -2
  12. package/components/alert/index.js +2 -2
  13. package/components/modal/index.cjs +1 -1
  14. package/components/modal/index.js +1 -1
  15. package/components/modal/modal.d.ts +11 -15
  16. package/components/pagination/index.cjs +1 -1
  17. package/components/pagination/index.js +1 -1
  18. package/components/progressbar/index.cjs +1 -1
  19. package/components/progressbar/index.js +1 -1
  20. package/components/rating/index.cjs +1 -1
  21. package/components/rating/index.js +1 -1
  22. package/components/select/index.cjs +1 -1
  23. package/components/select/index.js +1 -1
  24. package/components/select/select.d.ts +4 -5
  25. package/components/slider/index.cjs +1 -1
  26. package/components/slider/index.js +1 -1
  27. package/components/toast/index.cjs +1 -1
  28. package/components/toast/index.js +1 -1
  29. package/components/toast/toast.d.ts +3 -4
  30. package/config.cjs +2 -4
  31. package/config.d.ts +3 -3
  32. package/config.js +2 -4
  33. package/{directive-DCYlDznf.js → directive-3-8yr-ZK.js} +1 -2
  34. package/{directive-BTSEYLF3.cjs → directive-j-xRk-h3.cjs} +1 -2
  35. package/index.cjs +11 -11
  36. package/index.js +11 -11
  37. package/{modal-BI2qUu1M.js → modal-CeTI4jxI.js} +19 -4
  38. package/{modal-rzMpATf5.cjs → modal-D4d8sy85.cjs} +19 -4
  39. package/package.json +4 -4
  40. package/{pagination-EWSWQT1I.cjs → pagination-B9WFv70F.cjs} +1 -1
  41. package/{pagination--GkwduJn.js → pagination-BpPHKQsH.js} +1 -1
  42. package/{progressbar-DuRX7_my.js → progressbar-BybOg5FE.js} +1 -1
  43. package/{progressbar-DH7DHYMp.cjs → progressbar-DXCMeJvL.cjs} +1 -1
  44. package/{rating-CmuYUSxy.cjs → rating-C2Y95r50.cjs} +1 -1
  45. package/{rating-BR5wD7y2.js → rating-D6Tv_4Vx.js} +1 -1
  46. package/{select-BCs6HQWn.js → select-BS0mh7Qk.js} +1 -1
  47. package/{select-CCIKn8WR.cjs → select-CBlGWfZY.cjs} +1 -1
  48. package/services/extendWidget.d.ts +3 -3
  49. package/services/floatingUI.cjs +1 -1
  50. package/services/floatingUI.js +1 -1
  51. package/services/focustrack.cjs +1 -1
  52. package/services/focustrack.js +1 -1
  53. package/services/matchMedia.cjs +1 -1
  54. package/services/matchMedia.js +1 -1
  55. package/services/navManager.cjs +1 -1
  56. package/services/navManager.js +1 -1
  57. package/services/portal.cjs +1 -1
  58. package/services/portal.js +1 -1
  59. package/services/resizeObserver.cjs +1 -1
  60. package/services/resizeObserver.js +1 -1
  61. package/services/siblingsInert.cjs +1 -1
  62. package/services/siblingsInert.js +1 -1
  63. package/services/transitions/baseTransitions.cjs +1 -1
  64. package/services/transitions/baseTransitions.js +1 -1
  65. package/services/transitions/collapse.cjs +1 -1
  66. package/services/transitions/collapse.js +1 -1
  67. package/services/transitions/cssTransitions.cjs +1 -1
  68. package/services/transitions/cssTransitions.js +1 -1
  69. package/services/transitions/simpleClassTransition.cjs +1 -1
  70. package/services/transitions/simpleClassTransition.js +1 -1
  71. package/{slider-DsLvT87U.cjs → slider-BdsZpxJr.cjs} +1 -1
  72. package/{slider-CA_fszn7.js → slider-ByDkbyr1.js} +1 -1
  73. package/{toast-8tWp6x89.js → toast-DN0HwUbs.js} +2 -2
  74. package/{toast-Aw8o0Iwe.cjs → toast-DR8b0zpm.cjs} +2 -2
  75. package/types.d.ts +2 -0
  76. package/utils/directive.cjs +1 -1
  77. package/utils/directive.js +1 -1
  78. package/accordion-BaWN0_n-.js +0 -330
  79. package/accordion-BuIgxZ0S.cjs +0 -329
@@ -11,105 +11,48 @@ export interface AccordionProps extends WidgetsCommonPropsAndState {
11
11
  *
12
12
  * Event payload is the id of the item.
13
13
  */
14
- onShown: (itemId: string) => void;
14
+ onItemShown: (itemId: string) => void;
15
15
  /**
16
16
  * An event fired when an item is hidden.
17
17
  *
18
18
  * Event payload is the id of the item.
19
19
  */
20
- onHidden: (itemId: string) => void;
21
- /**
22
- * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
23
- *
24
- * It is a prop of the accordion-item.
25
- */
26
- itemId: string;
20
+ onItemHidden: (itemId: string) => void;
27
21
  /**
28
22
  * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
29
- *
30
- * It is a prop of the accordion-item.
31
23
  */
32
24
  itemDestroyOnHide: boolean;
33
- /**
34
- * If `true`, the accordion-item will be disabled.
35
- * It will not react to user's clicks, but still will be possible to toggle programmatically.
36
- *
37
- * It is a prop of the accordion-item.
38
- */
39
- itemDisabled: boolean;
40
- /**
41
- * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
42
- *
43
- * It is a prop of the accordion-item.
44
- */
45
- itemVisible: boolean;
46
25
  /**
47
26
  * If `true`, accordion-item will be animated.
48
- *
49
- * It is a prop of the accordion-item.
50
27
  */
51
28
  itemAnimated: boolean;
52
29
  /**
53
30
  * The transition to use for the accordion-item body-container when the accordion-item is toggled.
54
- *
55
- * It is a prop of the accordion-item.
56
31
  */
57
32
  itemTransition: TransitionFn;
58
- /**
59
- * An event fired when an item is shown.
60
- *
61
- * It is a prop of the accordion-item.
62
- */
63
- onItemShown: () => void;
64
- /**
65
- * An event fired when an item is hidden.
66
- *
67
- * It is a prop of the accordion-item.
68
- */
69
- onItemHidden: () => void;
70
- /**
71
- * An event fired when the `visible` value changes.
72
- *
73
- * Event payload is the new value of visible.
74
- *
75
- * It is a prop of the accordion-item.
76
- */
77
- onItemVisibleChange: (visible: boolean) => void;
78
33
  /**
79
34
  * CSS classes to add on the accordion-item DOM element.
80
- *
81
- * It is a prop of the accordion-item.
82
35
  */
83
- itemClass: string;
36
+ itemClassName: string;
84
37
  /**
85
38
  * CSS classes to add on the accordion-item header DOM element.
86
- *
87
- * It is a prop of the accordion-item.
88
39
  */
89
- itemHeaderClass: string;
40
+ itemHeaderClassName: string;
90
41
  /**
91
42
  * CSS classes to add on the accordion-item toggle button DOM element.
92
- *
93
- * It is a prop of the accordion-item.
94
43
  */
95
- itemButtonClass: string;
44
+ itemButtonClassName: string;
96
45
  /**
97
46
  * CSS classes to add on the accordion-item body container DOM element.
98
47
  * The accordion-item body container is the DOM element on what the itemTransition is applied.
99
- *
100
- * It is a prop of the accordion-item.
101
48
  */
102
- itemBodyContainerClass: string;
49
+ itemBodyContainerClassName: string;
103
50
  /**
104
51
  * CSS classes to add on the accordion-item body DOM element.
105
- *
106
- * It is a prop of the accordion-item.
107
52
  */
108
- itemBodyClass: string;
53
+ itemBodyClassName: string;
109
54
  /**
110
55
  * The html tag to use for the accordion-item-header.
111
- *
112
- * It is a prop of the accordion-item.
113
56
  */
114
57
  itemHeadingTag: string;
115
58
  }
@@ -117,7 +60,7 @@ export interface AccordionState extends WidgetsCommonPropsAndState {
117
60
  /**
118
61
  * Array containing all the accordion-items contained in the accordion.
119
62
  */
120
- itemsWidget: AccordionItemWidget[];
63
+ itemWidgets: AccordionItemWidget[];
121
64
  }
122
65
  export interface AccordionApi {
123
66
  /**
@@ -201,6 +144,14 @@ export interface AccordionItemDirectives {
201
144
  * Directive to put on the accordion-item body.
202
145
  */
203
146
  bodyDirective: Directive;
147
+ /**
148
+ * Directive to apply the itemTransition
149
+ */
150
+ transitionDirective: Directive;
151
+ /**
152
+ * Directive to apply aria attributes to the expanded body panel
153
+ */
154
+ bodyContainerAttrsDirective: Directive;
204
155
  /**
205
156
  * Directive to be put on the accordion-item body container. It will handle the animation.
206
157
  */
@@ -208,80 +159,76 @@ export interface AccordionItemDirectives {
208
159
  /**
209
160
  * Directive to be put on the accordion-item. It will handle adding the accordion-item to the accordion.
210
161
  */
211
- accordionItemDirective: Directive;
162
+ itemDirective: Directive;
212
163
  }
213
- export interface AccordionItemCommonPropsAndState {
164
+ export interface AccordionItemCommonPropsAndState extends WidgetsCommonPropsAndState {
214
165
  /**
215
166
  * If `true`, the accordion-item will be visible (expanded). Otherwise, it will be hidden (collapsed).
216
167
  */
217
- itemVisible: boolean;
168
+ visible: boolean;
218
169
  /**
219
170
  * If `true`, the accordion-item will be disabled.
220
171
  * It will not react to user's clicks, but still will be possible to toggle programmatically.
221
172
  */
222
- itemDisabled: boolean;
173
+ disabled: boolean;
223
174
  /**
224
175
  * The id of the accordion-item. It can be used for controlling the accordion-item via the accordion api.
225
176
  */
226
- itemId: string;
227
- /**
228
- * CSS classes to add on the accordion-item DOM element.
229
- */
230
- itemClass: string;
177
+ id: string;
231
178
  /**
232
179
  * CSS classes to add on the accordion-item header DOM element.
233
180
  */
234
- itemHeaderClass: string;
181
+ headerClassName: string;
235
182
  /**
236
183
  * CSS classes to add on the accordion-item collapse DOM element.
237
184
  */
238
- itemButtonClass: string;
185
+ buttonClassName: string;
239
186
  /**
240
187
  * CSS classes to add on the accordion-item body container DOM element.
241
188
  * The accordion-item body container is the DOM element on what the itemTransition is applied.
242
189
  */
243
- itemBodyContainerClass: string;
190
+ bodyContainerClassName: string;
244
191
  /**
245
192
  * CSS classes to add on the accordion-item body DOM element.
246
193
  */
247
- itemBodyClass: string;
194
+ bodyClassName: string;
248
195
  /**
249
196
  * The html tag to use for the accordion-item-header.
250
197
  */
251
- itemHeadingTag: string;
198
+ headingTag: string;
252
199
  }
253
200
  export interface AccordionItemProps extends AccordionItemCommonPropsAndState {
254
201
  /**
255
202
  * If `true`, accordion-item will be animated.
256
203
  */
257
- itemAnimated: boolean;
204
+ animated: boolean;
258
205
  /**
259
206
  * The transition to use for the accordion-item body-container when the accordion-item is toggled.
260
207
  */
261
- itemTransition: TransitionFn;
208
+ transition: TransitionFn;
262
209
  /**
263
210
  * If `true`, the accordion-item body container will be removed from the DOM when the accordion-item is collapsed. It will be just hidden otherwise.
264
211
  */
265
- itemDestroyOnHide: boolean;
212
+ destroyOnHide: boolean;
266
213
  /**
267
214
  * An event fired when an item is shown.
268
215
  */
269
- onItemShown: () => void;
216
+ onShown: () => void;
270
217
  /**
271
218
  * An event fired when an item is hidden.
272
219
  */
273
- onItemHidden: () => void;
220
+ onHidden: () => void;
274
221
  /**
275
222
  * An event fired when the `visible` value changes.
276
223
  *
277
224
  * Event payload is the new value of visible.
278
225
  */
279
- onItemVisibleChange: (visible: boolean) => void;
226
+ onVisibleChange: (visible: boolean) => void;
280
227
  }
281
228
  export interface AccordionItemState extends AccordionItemCommonPropsAndState {
282
229
  /**
283
230
  * If `true` the content of the accordion-item collapse should be in DOM. Its value depends on the
284
- * value of the `itemVisible` and `itemDestroyOnHide`.
231
+ * value of the `visible` and `destroyOnHide`.
285
232
  */
286
233
  shouldBeInDOM: boolean;
287
234
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const accordion = require("../../accordion-BuIgxZ0S.cjs");
3
+ const accordion = require("../../accordion-DmPT0O0j.cjs");
4
4
  exports.createAccordion = accordion.createAccordion;
5
5
  exports.createAccordionItem = accordion.createAccordionItem;
6
6
  exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
@@ -1,4 +1,4 @@
1
- import { a, c, f, g } from "../../accordion-BaWN0_n-.js";
1
+ import { a, c, f, g } from "../../accordion-BnaSamoQ.js";
2
2
  export {
3
3
  a as createAccordion,
4
4
  c as createAccordionItem,
@@ -38,7 +38,7 @@ export interface CommonAlertProps extends CommonAlertCommonPropsAndState {
38
38
  /**
39
39
  * The transition function will be executed when the alert is displayed or hidden.
40
40
  *
41
- * Depending on the value of {@link CommonAlertProps.animatedOnInit}, the animation can be optionally skipped during the showing process.
41
+ * Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
42
42
  */
43
43
  transition: TransitionFn;
44
44
  /**
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const common = require("../../common-nJRMXbwj.cjs");
4
- const alert = require("../../alert-C4jCg9Pl.cjs");
3
+ const common = require("../../common-Kb96q7i4.cjs");
4
+ const alert = require("../../alert-C-V64Qcs.cjs");
5
5
  exports.commonAlertConfigValidator = common.commonAlertConfigValidator;
6
6
  exports.createCommonAlert = common.createCommonAlert;
7
7
  exports.defaultCommonAlertConfig = common.defaultCommonAlertConfig;
@@ -1,5 +1,5 @@
1
- import { c, a, d, g } from "../../common-DRdsw5m8.js";
2
- import { c as c2, g as g2 } from "../../alert-Dlf-BV98.js";
1
+ import { c, a, d, g } from "../../common-BCEqowKw.js";
2
+ import { c as c2, g as g2 } from "../../alert-8ilqhLst.js";
3
3
  export {
4
4
  c as commonAlertConfigValidator,
5
5
  c2 as createAlert,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const modal = require("../../modal-rzMpATf5.cjs");
3
+ const modal = require("../../modal-D4d8sy85.cjs");
4
4
  exports.createModal = modal.createModal;
5
5
  exports.getModalDefaultConfig = modal.getModalDefaultConfig;
6
6
  exports.modalCloseButtonClick = modal.modalCloseButtonClick;
@@ -1,4 +1,4 @@
1
- import { c, g, a, m } from "../../modal-BI2qUu1M.js";
1
+ import { c, g, a, m } from "../../modal-CeTI4jxI.js";
2
2
  export {
3
3
  c as createModal,
4
4
  g as getModalDefaultConfig,
@@ -14,7 +14,7 @@ export declare const modalCloseButtonClick: unique symbol;
14
14
  /**
15
15
  * Properties of the modal widget that are also in the state of the modal.
16
16
  */
17
- export interface ModalCommonPropsAndState<Data> extends WidgetsCommonPropsAndState {
17
+ export interface ModalCommonPropsAndState extends WidgetsCommonPropsAndState {
18
18
  /**
19
19
  * Value of the aria-label attribute to put on the close button.
20
20
  */
@@ -37,10 +37,6 @@ export interface ModalCommonPropsAndState<Data> extends WidgetsCommonPropsAndSta
37
37
  * Whether the modal should be visible when the transition is completed.
38
38
  */
39
39
  visible: boolean;
40
- /**
41
- * Data to use in content slots
42
- */
43
- contentData: Data;
44
40
  }
45
41
  /**
46
42
  * Type of the parameter of {@link ModalProps.onBeforeClose|onBeforeClose}.
@@ -61,7 +57,7 @@ export interface ModalBeforeCloseEvent {
61
57
  /**
62
58
  * Properties of the modal widget.
63
59
  */
64
- export interface ModalProps<Data> extends ModalCommonPropsAndState<Data> {
60
+ export interface ModalProps extends ModalCommonPropsAndState {
65
61
  /**
66
62
  * Whether the modal and its backdrop (if present) should be animated when shown or hidden.
67
63
  */
@@ -107,7 +103,7 @@ export interface ModalProps<Data> extends ModalCommonPropsAndState<Data> {
107
103
  /**
108
104
  * State of the modal widget.
109
105
  */
110
- export interface ModalState<Data> extends ModalCommonPropsAndState<Data> {
106
+ export interface ModalState extends ModalCommonPropsAndState {
111
107
  /**
112
108
  * Whether the backdrop is fully hidden. This can be true either because {@link ModalProps.backdrop|backdrop} is false or
113
109
  * because {@link ModalCommonPropsAndState.visible|visible} is false and there is no current transition.
@@ -129,7 +125,7 @@ export interface ModalState<Data> extends ModalCommonPropsAndState<Data> {
129
125
  /**
130
126
  * API of the modal widget.
131
127
  */
132
- export interface ModalApi<Data> {
128
+ export interface ModalApi {
133
129
  /**
134
130
  * Closes the modal with the given result.
135
131
  *
@@ -146,7 +142,7 @@ export interface ModalApi<Data> {
146
142
  /**
147
143
  * Method to change some modal properties.
148
144
  */
149
- patch: ModalWidget<Data>['patch'];
145
+ patch: ModalWidget['patch'];
150
146
  }
151
147
  /**
152
148
  * Actions of the modal widget.
@@ -190,11 +186,15 @@ export interface ModalDirectives {
190
186
  * Directive that adds all the necessary attributes to the close button
191
187
  */
192
188
  closeButtonDirective: Directive;
189
+ /**
190
+ * Directive to apply to the dialog element when using the native [HTMLDialogElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement)
191
+ */
192
+ dialogDirective: Directive;
193
193
  }
194
194
  /**
195
195
  * Modal widget.
196
196
  */
197
- export type ModalWidget<Data> = Widget<ModalProps<Data>, ModalState<Data>, ModalApi<Data>, ModalActions, ModalDirectives>;
197
+ export type ModalWidget = Widget<ModalProps, ModalState, ModalApi, ModalActions, ModalDirectives>;
198
198
  /**
199
199
  * Returns a copy of the default modal config.
200
200
  * @returns a copy of the default modal config
@@ -263,10 +263,6 @@ export declare function getModalDefaultConfig(): {
263
263
  * Whether the modal should be visible when the transition is completed.
264
264
  */
265
265
  visible: boolean;
266
- /**
267
- * Data to use in content slots
268
- */
269
- contentData: any;
270
266
  className: string;
271
267
  };
272
268
  /**
@@ -274,4 +270,4 @@ export declare function getModalDefaultConfig(): {
274
270
  * @param config$ - config of the modal, either as a store or as an object containing values or stores.
275
271
  * @returns a new modal widget instance
276
272
  */
277
- export declare function createModal<Data>(config$?: PropsConfig<ModalProps<Data>>): ModalWidget<Data>;
273
+ export declare function createModal(config$?: PropsConfig<ModalProps>): ModalWidget;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const pagination = require("../../pagination-EWSWQT1I.cjs");
3
+ const pagination = require("../../pagination-B9WFv70F.cjs");
4
4
  exports.createPagination = pagination.createPagination;
5
5
  exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../pagination--GkwduJn.js";
1
+ import { c, g } from "../../pagination-BpPHKQsH.js";
2
2
  export {
3
3
  c as createPagination,
4
4
  g as getPaginationDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const progressbar = require("../../progressbar-DH7DHYMp.cjs");
3
+ const progressbar = require("../../progressbar-DXCMeJvL.cjs");
4
4
  exports.createProgressbar = progressbar.createProgressbar;
5
5
  exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../progressbar-DuRX7_my.js";
1
+ import { c, g } from "../../progressbar-BybOg5FE.js";
2
2
  export {
3
3
  c as createProgressbar,
4
4
  g as getProgressbarDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const rating = require("../../rating-CmuYUSxy.cjs");
3
+ const rating = require("../../rating-C2Y95r50.cjs");
4
4
  exports.createRating = rating.createRating;
5
5
  exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../rating-BR5wD7y2.js";
1
+ import { c, g } from "../../rating-D6Tv_4Vx.js";
2
2
  export {
3
3
  c as createRating,
4
4
  g as getRatingDefaultConfig
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const select = require("../../select-CCIKn8WR.cjs");
3
+ const select = require("../../select-CBlGWfZY.cjs");
4
4
  exports.createSelect = select.createSelect;
5
5
  exports.defaultConfig = select.defaultConfig;
6
6
  exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, d, g } from "../../select-BCs6HQWn.js";
1
+ import { c, d, g } from "../../select-BS0mh7Qk.js";
2
2
  export {
3
3
  c as createSelect,
4
4
  d as defaultConfig,
@@ -45,11 +45,11 @@ export interface SelectCommonPropsAndState<Item> extends WidgetsCommonPropsAndSt
45
45
  */
46
46
  loading: boolean;
47
47
  }
48
- export interface SelectProps<T> extends SelectCommonPropsAndState<T> {
48
+ export interface SelectProps<Item> extends SelectCommonPropsAndState<Item> {
49
49
  /**
50
50
  * List of available items for the dropdown
51
51
  */
52
- items: T[];
52
+ items: Item[];
53
53
  /**
54
54
  * List of allowed placements for the dropdown.
55
55
  * 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).
@@ -59,7 +59,7 @@ export interface SelectProps<T> extends SelectCommonPropsAndState<T> {
59
59
  * Custom function to get the id of an item
60
60
  * By default, the item is returned
61
61
  */
62
- itemIdFn(item: T): string;
62
+ itemIdFn(item: Item): string;
63
63
  /**
64
64
  * Retrieves navigable elements within an HTML element containing badges and the input.
65
65
  *
@@ -79,7 +79,7 @@ export interface SelectProps<T> extends SelectCommonPropsAndState<T> {
79
79
  /**
80
80
  * Callback called when the selection change
81
81
  */
82
- onSelectedChange(selected: T[]): void;
82
+ onSelectedChange(selected: Item[]): void;
83
83
  }
84
84
  /**
85
85
  * Item representation built from the items provided in parameters
@@ -103,7 +103,6 @@ export interface SelectState<Item> extends SelectCommonPropsAndState<Item> {
103
103
  * List of item contexts, to be displayed in the menu
104
104
  */
105
105
  visibleItems: ItemContext<Item>[];
106
- /**
107
106
  /**
108
107
  * List of selected items to be display
109
108
  */
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const slider = require("../../slider-DsLvT87U.cjs");
3
+ const slider = require("../../slider-BdsZpxJr.cjs");
4
4
  exports.createSlider = slider.createSlider;
5
5
  exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../slider-CA_fszn7.js";
1
+ import { c, g } from "../../slider-ByDkbyr1.js";
2
2
  export {
3
3
  c as createSlider,
4
4
  g as getSliderDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toast = require("../../toast-Aw8o0Iwe.cjs");
3
+ const toast = require("../../toast-DR8b0zpm.cjs");
4
4
  exports.createToast = toast.createToast;
5
5
  exports.getToastDefaultConfig = toast.getToastDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../toast-8tWp6x89.js";
1
+ import { c, g } from "../../toast-DN0HwUbs.js";
2
2
  export {
3
3
  c as createToast,
4
4
  g as getToastDefaultConfig
@@ -1,4 +1,3 @@
1
- import type { ExtendWidgetAdaptSlotWidgetProps, ExtendWidgetInterfaces } from '../../services/extendWidget';
2
1
  import type { Directive, PropsConfig, Widget } from '../../types';
3
2
  import type { CommonAlertApi, CommonAlertDirectives, CommonAlertProps, CommonAlertState } from '../alert/common';
4
3
  export interface ToastExtraProps {
@@ -25,13 +24,13 @@ export interface ExtraDirectives {
25
24
  */
26
25
  closeButtonDirective: Directive;
27
26
  }
28
- export interface ToastState extends ExtendWidgetAdaptSlotWidgetProps<CommonAlertState, ToastExtraProps, ExtraDirectives> {
27
+ export interface ToastState extends CommonAlertState, ToastExtraProps {
29
28
  }
30
- export interface ToastProps extends ExtendWidgetAdaptSlotWidgetProps<CommonAlertProps, ToastExtraProps, ExtraDirectives> {
29
+ export interface ToastProps extends CommonAlertProps, ToastExtraProps {
31
30
  }
32
31
  export interface ToastApi extends CommonAlertApi {
33
32
  }
34
- export interface ToastDirectives extends ExtendWidgetInterfaces<CommonAlertDirectives, ExtraDirectives> {
33
+ export interface ToastDirectives extends CommonAlertDirectives, ExtraDirectives {
35
34
  }
36
35
  export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, object, ToastDirectives>;
37
36
  /**
package/config.cjs CHANGED
@@ -9,10 +9,8 @@ const mergeInto = (destination, source, levels = Infinity) => {
9
9
  destination = {};
10
10
  }
11
11
  for (const key of Object.keys(source)) {
12
- if (!Object.prototype.hasOwnProperty.call(source, key))
13
- continue;
14
- if (key === "__proto__" || key === "constructor")
15
- continue;
12
+ if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
13
+ if (key === "__proto__" || key === "constructor") continue;
16
14
  destination[key] = mergeInto(destination[key], source[key], levels - 1);
17
15
  }
18
16
  } else {
package/config.d.ts CHANGED
@@ -46,7 +46,7 @@ export declare const mergeInto: <T>(destination: T, source: T | undefined, level
46
46
  * The resulting store is writable, its set function is actually the set function of the own$ store.
47
47
  */
48
48
  export declare const createWidgetsConfig: <T>(parent$?: WidgetsConfigStore<T> | undefined, adaptParentConfig?: (config: Partial2Levels<T>) => Partial2Levels<T>) => WidgetsConfigStore<T>;
49
- export interface WidgetsConfig {
49
+ export type WidgetsConfig = {
50
50
  /**
51
51
  * the pagination widget config
52
52
  */
@@ -62,7 +62,7 @@ export interface WidgetsConfig {
62
62
  /**
63
63
  * the modal widget config
64
64
  */
65
- modal: ModalProps<any>;
65
+ modal: ModalProps;
66
66
  /**
67
67
  * the alert widget config
68
68
  */
@@ -83,4 +83,4 @@ export interface WidgetsConfig {
83
83
  * toast widget config
84
84
  */
85
85
  toast: ToastProps;
86
- }
86
+ };
package/config.js CHANGED
@@ -7,10 +7,8 @@ const mergeInto = (destination, source, levels = Infinity) => {
7
7
  destination = {};
8
8
  }
9
9
  for (const key of Object.keys(source)) {
10
- if (!Object.prototype.hasOwnProperty.call(source, key))
11
- continue;
12
- if (key === "__proto__" || key === "constructor")
13
- continue;
10
+ if (!Object.prototype.hasOwnProperty.call(source, key)) continue;
11
+ if (key === "__proto__" || key === "constructor") continue;
14
12
  destination[key] = mergeInto(destination[key], source[key], levels - 1);
15
13
  }
16
14
  } else {
@@ -4,8 +4,7 @@ import { n as noop } from "./func-DR0n-ShK.js";
4
4
  import { toReadableStore } from "./utils/stores.js";
5
5
  const computeCommonAncestor = (elements) => {
6
6
  const length = elements.length;
7
- if (length === 0)
8
- return null;
7
+ if (length === 0) return null;
9
8
  let ancestor = elements[0];
10
9
  for (let i = 1; i < length && ancestor; i++) {
11
10
  const element = elements[i];
@@ -5,8 +5,7 @@ const func = require("./func-Qd3cD9a3.cjs");
5
5
  const utils_stores = require("./utils/stores.cjs");
6
6
  const computeCommonAncestor = (elements) => {
7
7
  const length = elements.length;
8
- if (length === 0)
9
- return null;
8
+ if (length === 0) return null;
10
9
  let ancestor = elements[0];
11
10
  for (let i = 1; i < length && ancestor; i++) {
12
11
  const element = elements[i];
package/index.cjs CHANGED
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const types = require("./types.cjs");
4
- const accordion = require("./accordion-BuIgxZ0S.cjs");
5
- const common = require("./common-nJRMXbwj.cjs");
6
- const alert = require("./alert-C4jCg9Pl.cjs");
7
- const modal = require("./modal-rzMpATf5.cjs");
8
- const pagination = require("./pagination-EWSWQT1I.cjs");
9
- const progressbar = require("./progressbar-DH7DHYMp.cjs");
10
- const rating = require("./rating-CmuYUSxy.cjs");
11
- const select = require("./select-CCIKn8WR.cjs");
12
- const slider = require("./slider-DsLvT87U.cjs");
13
- const toast = require("./toast-Aw8o0Iwe.cjs");
4
+ const accordion = require("./accordion-DmPT0O0j.cjs");
5
+ const common = require("./common-Kb96q7i4.cjs");
6
+ const alert = require("./alert-C-V64Qcs.cjs");
7
+ const modal = require("./modal-D4d8sy85.cjs");
8
+ const pagination = require("./pagination-B9WFv70F.cjs");
9
+ const progressbar = require("./progressbar-DXCMeJvL.cjs");
10
+ const rating = require("./rating-C2Y95r50.cjs");
11
+ const select = require("./select-CBlGWfZY.cjs");
12
+ const slider = require("./slider-BdsZpxJr.cjs");
13
+ const toast = require("./toast-DR8b0zpm.cjs");
14
14
  const config = require("./config.cjs");
15
15
  const services_extendWidget = require("./services/extendWidget.cjs");
16
16
  const services_floatingUI = require("./services/floatingUI.cjs");
@@ -24,7 +24,7 @@ const services_siblingsInert = require("./services/siblingsInert.cjs");
24
24
  const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
25
25
  const services_transitions_cssTransitions = require("./services/transitions/cssTransitions.cjs");
26
26
  const services_transitions_simpleClassTransition = require("./services/transitions/simpleClassTransition.cjs");
27
- const utils_directive = require("./directive-BTSEYLF3.cjs");
27
+ const utils_directive = require("./directive-j-xRk-h3.cjs");
28
28
  const utils_stores = require("./utils/stores.cjs");
29
29
  const utils_writables = require("./writables-D46sFgGK.cjs");
30
30
  exports.INVALID_VALUE = types.INVALID_VALUE;