@agnos-ui/core 0.9.3 → 0.10.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 (113) hide show
  1. package/{accordion-cR5JqWJ8.cjs → accordion-B5LiN1uy.cjs} +15 -20
  2. package/{accordion-CoM4efp-.js → accordion-_zen-g8l.js} +15 -20
  3. package/{alert-DtDozJal.cjs → alert-B-jQDQcB.cjs} +1 -1
  4. package/{alert-YIlqdEPO.js → alert-gGz2CDS9.js} +1 -1
  5. package/{collapse-DwXz2kNw.js → collapse-BV4kD3j9.js} +2 -2
  6. package/{collapse-DRp53EuG.cjs → collapse-gLiT080Y.cjs} +2 -2
  7. package/{common-BToNPUDq.cjs → common-D3QcdJ6S.cjs} +1 -1
  8. package/{common-BqUjUBPy.js → common-DK0ADNTX.js} +1 -1
  9. package/components/accordion/accordion.d.ts +6 -6
  10. package/components/accordion/index.cjs +1 -1
  11. package/components/accordion/index.js +1 -1
  12. package/components/alert/index.cjs +1 -1
  13. package/components/alert/index.js +1 -1
  14. package/components/carousel/carousel.d.ts +15 -0
  15. package/components/carousel/index.cjs +10 -23
  16. package/components/carousel/index.js +10 -23
  17. package/components/collapse/collapse.d.ts +5 -2
  18. package/components/collapse/index.cjs +1 -1
  19. package/components/collapse/index.js +1 -1
  20. package/components/drawer/drawer.d.ts +242 -0
  21. package/components/drawer/index.cjs +5 -0
  22. package/components/drawer/index.d.ts +1 -0
  23. package/components/drawer/index.js +5 -0
  24. package/components/modal/index.cjs +2 -1
  25. package/components/modal/index.js +2 -1
  26. package/components/modal/modal.d.ts +5 -0
  27. package/components/pagination/index.cjs +1 -1
  28. package/components/pagination/index.js +1 -1
  29. package/components/progressbar/index.cjs +1 -1
  30. package/components/progressbar/index.js +1 -1
  31. package/components/rating/index.cjs +1 -1
  32. package/components/rating/index.js +1 -1
  33. package/components/select/index.cjs +1 -1
  34. package/components/select/index.js +1 -1
  35. package/components/slider/index.cjs +1 -1
  36. package/components/slider/index.js +1 -1
  37. package/components/slider/slider.d.ts +4 -4
  38. package/components/toast/index.cjs +1 -1
  39. package/components/toast/index.js +1 -1
  40. package/components/tree/index.cjs +1 -1
  41. package/components/tree/index.js +1 -1
  42. package/components/tree/tree.d.ts +0 -6
  43. package/config.cjs +2 -2
  44. package/config.d.ts +5 -0
  45. package/config.js +2 -2
  46. package/{dom-gfxqXJpK.js → dom-Bcg9ORcA.js} +64 -54
  47. package/{dom-CuBx1JPZ.cjs → dom-C2gi9OCP.cjs} +47 -37
  48. package/drawer-D5SO73ew.js +251 -0
  49. package/drawer-DP7UPojk.cjs +250 -0
  50. package/index.cjs +19 -13
  51. package/index.d.ts +1 -0
  52. package/index.js +36 -30
  53. package/isFocusable-Ckwus82R.js +32 -0
  54. package/isFocusable-DfzDLeAN.cjs +31 -0
  55. package/{modal-D3wGIDlj.js → modal-CAvQW-vo.js} +26 -32
  56. package/{modal-BEnQ6c5M.cjs → modal-DiXZXYjR.cjs} +27 -33
  57. package/package.json +1 -1
  58. package/{pagination-B97wBLok.js → pagination-BKbMROV6.js} +4 -4
  59. package/{pagination-C1TT-oea.cjs → pagination-DvZ2rLsz.cjs} +4 -4
  60. package/{progressbar-BWBlRk_Y.js → progressbar-D8zIcm9n.js} +2 -2
  61. package/{progressbar-CRvhNB5R.cjs → progressbar-i9xfAxb7.cjs} +2 -2
  62. package/{promise-XSP94FjG.js → promise-Y53vc4Ia.js} +5 -5
  63. package/{rating-BXvy9kXq.js → rating-DEXTGWCU.js} +2 -2
  64. package/{rating-DAb6nR67.cjs → rating-DmG4oUkr.cjs} +2 -2
  65. package/scrollbars-CT87iv_6.cjs +30 -0
  66. package/scrollbars-CcxSrnCx.js +31 -0
  67. package/{select-BdjpnE7_.js → select-Bw68Xdu5.js} +4 -5
  68. package/{select-C0rJJQfl.cjs → select-MFjAnIt7.cjs} +4 -5
  69. package/services/extendWidget.cjs +2 -2
  70. package/services/extendWidget.js +2 -2
  71. package/services/floatingUI.cjs +8 -29
  72. package/services/floatingUI.js +9 -30
  73. package/services/focusElement.cjs +46 -0
  74. package/services/focusElement.d.ts +9 -0
  75. package/services/focusElement.js +46 -0
  76. package/services/focustrack.cjs +1 -1
  77. package/services/focustrack.js +1 -1
  78. package/services/matchMedia.cjs +1 -1
  79. package/services/matchMedia.js +1 -1
  80. package/services/navManager.cjs +7 -37
  81. package/services/navManager.js +6 -36
  82. package/services/portal.cjs +7 -10
  83. package/services/portal.js +7 -10
  84. package/services/resizeObserver.cjs +2 -2
  85. package/services/resizeObserver.js +2 -2
  86. package/services/siblingsInert.cjs +9 -8
  87. package/services/siblingsInert.d.ts +13 -3
  88. package/services/siblingsInert.js +9 -8
  89. package/services/transitions/baseTransitions.cjs +9 -10
  90. package/services/transitions/baseTransitions.js +10 -11
  91. package/services/transitions/collapse.cjs +1 -1
  92. package/services/transitions/collapse.js +1 -1
  93. package/services/transitions/cssTransitions.cjs +1 -1
  94. package/services/transitions/cssTransitions.js +2 -2
  95. package/services/transitions/simpleClassTransition.cjs +1 -1
  96. package/services/transitions/simpleClassTransition.js +1 -1
  97. package/{slider-BmxQ3A_u.js → slider-Cx50Eghd.js} +14 -24
  98. package/{slider-DSx5CAce.cjs → slider-Dl4Trh32.cjs} +14 -24
  99. package/toaster-UDglac7x.cjs +187 -0
  100. package/toaster-_p1GTtHI.js +188 -0
  101. package/{tree-BFrXdJox.js → tree-DV0tfPlZ.js} +7 -11
  102. package/{tree-Pvr2rZ-D.cjs → tree-rGHtmCnS.cjs} +7 -11
  103. package/utils/directive.cjs +3 -1
  104. package/utils/directive.d.ts +47 -0
  105. package/utils/directive.js +14 -12
  106. package/utils/stores.cjs +8 -9
  107. package/utils/stores.js +8 -9
  108. package/utils/writables.cjs +1 -1
  109. package/utils/writables.js +1 -1
  110. package/{writables-Bn3uhKEG.cjs → writables-DcGT98a7.cjs} +1 -1
  111. package/{writables-CgpOQ4hA.js → writables-e0tyaQpe.js} +1 -1
  112. package/toaster-Cayg6Lbq.cjs +0 -209
  113. package/toaster-XfzHDqz_.js +0 -210
@@ -0,0 +1,242 @@
1
+ import type { TransitionFn } from '../../services/transitions/baseTransitions';
2
+ import type { Directive, WidgetFactory } from '../../types';
3
+ import { type Widget } from '../../types';
4
+ import type { WidgetsCommonPropsAndState } from '../commonProps';
5
+ /**
6
+ * Possible values for the drawer positions
7
+ */
8
+ export type DrawerPositions = 'inline-start' | 'inline-end' | 'block-start' | 'block-end';
9
+ interface DrawerCommonPropsAndState extends WidgetsCommonPropsAndState {
10
+ /**
11
+ * CSS classes to be applied on the widget main container
12
+ *
13
+ * @defaultValue `'w-full'`
14
+ */
15
+ className: string;
16
+ /**
17
+ * Which element should contain the drawer and backdrop DOM elements.
18
+ * If it is not null, the drawer and backdrop DOM elements are moved to the specified container.
19
+ * Otherwise, they stay where the widget is located.
20
+ *
21
+ * @defaultValue
22
+ * ```ts
23
+ * typeof window !== 'undefined' ? document.body : null
24
+ * ```
25
+ */
26
+ container: HTMLElement | null;
27
+ /**
28
+ * Classes to add on the backdrop DOM element.
29
+ *
30
+ * @defaultValue `''`
31
+ */
32
+ backdropClass: string;
33
+ /**
34
+ * If `true`, the drawer is shown; otherwise, it is hidden.
35
+ *
36
+ * @defaultValue `false`
37
+ */
38
+ visible: boolean;
39
+ /**
40
+ * If `true`, the drawer can be resized by the user.
41
+ *
42
+ * @defaultValue `false`
43
+ */
44
+ resizable: boolean;
45
+ }
46
+ /**
47
+ * Interface representing the properties for the Drawer component.
48
+ */
49
+ export interface DrawerProps extends DrawerCommonPropsAndState {
50
+ /**
51
+ * The transition function will be executed when the drawer is displayed or hidden.
52
+ *
53
+ * @defaultValue
54
+ * ```ts
55
+ * () => {}
56
+ * ```
57
+ */
58
+ transition: TransitionFn;
59
+ /**
60
+ * The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.
61
+ *
62
+ * @defaultValue
63
+ * ```ts
64
+ * () => {}
65
+ * ```
66
+ */
67
+ verticalTransition: TransitionFn;
68
+ /**
69
+ * The transition to use for the backdrop behind the drawer (if present).
70
+ *
71
+ * @defaultValue
72
+ * ```ts
73
+ * () => {}
74
+ * ```
75
+ */
76
+ backdropTransition: TransitionFn;
77
+ /**
78
+ * If `true` opening and closing will be animated.
79
+ *
80
+ * @defaultValue `true`
81
+ */
82
+ animated: boolean;
83
+ /**
84
+ * aria-labelledby attribute to use for the drawer element.
85
+ *
86
+ * @defaultValue `''`
87
+ */
88
+ ariaLabelledBy: string;
89
+ /**
90
+ * aria-describedby attribute to use for the drawer element.
91
+ *
92
+ * @defaultValue `''`
93
+ */
94
+ ariaDescribedBy: string;
95
+ /**
96
+ * The width of the drawer in pixels.
97
+ *
98
+ * @defaultValue `200`
99
+ */
100
+ width: number;
101
+ /**
102
+ * The height of the drawer in pixels.
103
+ *
104
+ * @defaultValue `200`
105
+ */
106
+ height: number;
107
+ /**
108
+ * If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
109
+ *
110
+ * @defaultValue `true`
111
+ */
112
+ backdrop: boolean;
113
+ /**
114
+ * If `true` allows body scrolling when the drawer is open.
115
+ *
116
+ * @defaultValue `false`
117
+ */
118
+ bodyScroll: boolean;
119
+ /**
120
+ * Event to be triggered when the transition is completed and the drawer is not visible.
121
+ *
122
+ * @defaultValue
123
+ * ```ts
124
+ * () => {}
125
+ * ```
126
+ */
127
+ onHidden: () => void;
128
+ /**
129
+ * Event to be triggered when the transition is completed and the drawer is visible.
130
+ *
131
+ * @defaultValue
132
+ * ```ts
133
+ * () => {}
134
+ * ```
135
+ */
136
+ onShown: () => void;
137
+ /**
138
+ * An event emitted when the width is changed.
139
+ *
140
+ * Event payload is equal to the newly selected width.
141
+ *
142
+ * @defaultValue
143
+ * ```ts
144
+ * () => {}
145
+ * ```
146
+ */
147
+ onWidthChange: (width: number) => void;
148
+ /**
149
+ * An event emitted when the height is changed.
150
+ *
151
+ * Event payload is equal to the newly selected height.
152
+ *
153
+ * @defaultValue
154
+ * ```ts
155
+ * () => {}
156
+ * ```
157
+ */
158
+ onHeightChange: (width: number) => void;
159
+ /**
160
+ * Event to be triggered when the visible property changes.
161
+ *
162
+ * @param visible - new value of the visible propery
163
+ *
164
+ * @defaultValue
165
+ * ```ts
166
+ * () => {}
167
+ * ```
168
+ */
169
+ onVisibleChange: (visible: boolean) => void;
170
+ }
171
+ /**
172
+ * Represents the state of a Drawer component.
173
+ */
174
+ export interface DrawerState extends DrawerCommonPropsAndState {
175
+ /**
176
+ * Whether the backdrop is fully hidden. This can be true either because {@link DrawerProps.backdrop|backdrop} is false or
177
+ * because {@link DrawerProps.visible|visible} is false and there is no current transition.
178
+ */
179
+ backdropHidden: boolean;
180
+ /**
181
+ * Flag to show whether the drawer is fully hidden.
182
+ */
183
+ hidden: boolean;
184
+ }
185
+ /**
186
+ * Interface representing the API for a Drawer component.
187
+ */
188
+ export interface DrawerApi {
189
+ /**
190
+ * Trigger the opening of the drawer.
191
+ */
192
+ open: () => void;
193
+ /**
194
+ * Trigger the closing of the drawer.
195
+ */
196
+ close: () => void;
197
+ }
198
+ /**
199
+ * Interface representing various directives used in the Drawer component.
200
+ */
201
+ export interface DrawerDirectives {
202
+ /**
203
+ * Directive to put on the drawer DOM element.
204
+ */
205
+ drawerDirective: Directive;
206
+ /**
207
+ * Portal directive to put on the drawer DOM element.
208
+ */
209
+ drawerPortalDirective: Directive;
210
+ /**
211
+ * Directive to put on the backdrop DOM element.
212
+ */
213
+ backdropDirective: Directive;
214
+ /**
215
+ * Portal directive to put on the backdrop DOM element.
216
+ */
217
+ backdropPortalDirective: Directive;
218
+ /**
219
+ * Directive to put on the splitter DOM element.
220
+ */
221
+ splitterDirective: Directive;
222
+ /**
223
+ * Directive to put on the container DOM element in order for the drawer to size correctly.
224
+ */
225
+ containerDirective: Directive;
226
+ }
227
+ /**
228
+ * Represents a Drawer widget component.
229
+ */
230
+ export type DrawerWidget = Widget<DrawerProps, DrawerState, DrawerApi, DrawerDirectives>;
231
+ /**
232
+ * Retrieve a shallow copy of the default Drawer config
233
+ * @returns the default Drawer config
234
+ */
235
+ export declare function getDrawerDefaultConfig(): DrawerProps;
236
+ /**
237
+ * Create a Drawer widget with given config props
238
+ * @param config - an optional Drawer config
239
+ * @returns a DrawerWidget
240
+ */
241
+ export declare const createDrawer: WidgetFactory<DrawerWidget>;
242
+ export {};
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const drawer = require("../../drawer-DP7UPojk.cjs");
4
+ exports.createDrawer = drawer.createDrawer;
5
+ exports.getDrawerDefaultConfig = drawer.getDrawerDefaultConfig;
@@ -0,0 +1 @@
1
+ export * from './drawer';
@@ -0,0 +1,5 @@
1
+ import { c, g } from "../../drawer-D5SO73ew.js";
2
+ export {
3
+ c as createDrawer,
4
+ g as getDrawerDefaultConfig
5
+ };
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const modal = require("../../modal-BEnQ6c5M.cjs");
3
+ const modal = require("../../modal-DiXZXYjR.cjs");
4
4
  exports.createModal = modal.createModal;
5
5
  exports.getModalDefaultConfig = modal.getModalDefaultConfig;
6
6
  exports.modalCloseButtonClick = modal.modalCloseButtonClick;
7
+ exports.modalCloseEscape = modal.modalCloseEscape;
7
8
  exports.modalOutsideClick = modal.modalOutsideClick;
@@ -1,7 +1,8 @@
1
- import { c, g, a, m } from "../../modal-D3wGIDlj.js";
1
+ import { c, g, a, b, m } from "../../modal-CAvQW-vo.js";
2
2
  export {
3
3
  c as createModal,
4
4
  g as getModalDefaultConfig,
5
5
  a as modalCloseButtonClick,
6
+ b as modalCloseEscape,
6
7
  m as modalOutsideClick
7
8
  };
@@ -11,6 +11,11 @@ export declare const modalOutsideClick: unique symbol;
11
11
  * and returned by the {@link ModalApi.open|open} method, when the modal is closed by a click on the close button.
12
12
  */
13
13
  export declare const modalCloseButtonClick: unique symbol;
14
+ /**
15
+ * Value present in the {@link ModalBeforeCloseEvent.result|result} property of the {@link ModalProps.onBeforeClose|onBeforeClose} event
16
+ * and returned by the {@link ModalApi.open|open} method, when the modal is closed by pressing the Escape key.
17
+ */
18
+ export declare const modalCloseEscape: unique symbol;
14
19
  /**
15
20
  * Properties of the modal widget that are also in the state of the modal.
16
21
  */
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const pagination = require("../../pagination-C1TT-oea.cjs");
3
+ const pagination = require("../../pagination-DvZ2rLsz.cjs");
4
4
  exports.createPagination = pagination.createPagination;
5
5
  exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../pagination-B97wBLok.js";
1
+ import { c, g } from "../../pagination-BKbMROV6.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-CRvhNB5R.cjs");
3
+ const progressbar = require("../../progressbar-i9xfAxb7.cjs");
4
4
  exports.createProgressbar = progressbar.createProgressbar;
5
5
  exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../progressbar-BWBlRk_Y.js";
1
+ import { c, g } from "../../progressbar-D8zIcm9n.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-DAb6nR67.cjs");
3
+ const rating = require("../../rating-DmG4oUkr.cjs");
4
4
  exports.createRating = rating.createRating;
5
5
  exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../rating-BXvy9kXq.js";
1
+ import { c, g } from "../../rating-DEXTGWCU.js";
2
2
  export {
3
3
  c as createRating,
4
4
  g as getRatingDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const select = require("../../select-C0rJJQfl.cjs");
3
+ const select = require("../../select-MFjAnIt7.cjs");
4
4
  exports.createSelect = select.createSelect;
5
5
  exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../select-BdjpnE7_.js";
1
+ import { c, g } from "../../select-Bw68Xdu5.js";
2
2
  export {
3
3
  c as createSelect,
4
4
  g as getSelectDefaultConfig
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const slider = require("../../slider-DSx5CAce.cjs");
3
+ const slider = require("../../slider-Dl4Trh32.cjs");
4
4
  exports.createSlider = slider.createSlider;
5
5
  exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../slider-BmxQ3A_u.js";
1
+ import { c, g } from "../../slider-Cx50Eghd.js";
2
2
  export {
3
3
  c as createSlider,
4
4
  g as getSliderDefaultConfig
@@ -248,7 +248,7 @@ export interface SliderProps extends SliderCommonPropsAndState {
248
248
  *
249
249
  * @defaultValue
250
250
  * ```ts
251
- * (value: number) => ''
251
+ * () => ''
252
252
  * ```
253
253
  */
254
254
  ariaValueText: (value: number, sortedIndex: number) => string;
@@ -280,21 +280,21 @@ export interface SliderProps extends SliderCommonPropsAndState {
280
280
  * Minimum distance between two values.
281
281
  * When set to 0, no minimum distance constraint is applied.
282
282
  *
283
- * @defaultValue 0
283
+ * @defaultValue `0`
284
284
  */
285
285
  minRange: number;
286
286
  /**
287
287
  * Maximum distance between two values
288
288
  * When set to 0, no maximum distance constraint is applied.
289
289
  *
290
- * @defaultValue 0
290
+ * @defaultValue `0`
291
291
  */
292
292
  maxRange: number;
293
293
  /**
294
294
  * When true, if moving a value would break the minRange or maxRange constraint,
295
295
  * it will instead push or pull the neighboring values to keep the allowed range rather than just stopping.
296
296
  *
297
- * @defaultValue false
297
+ * @defaultValue `false`
298
298
  */
299
299
  pushRange: boolean;
300
300
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toaster = require("../../toaster-Cayg6Lbq.cjs");
3
+ const toaster = require("../../toaster-UDglac7x.cjs");
4
4
  exports.Toaster = toaster.Toaster;
5
5
  exports.createToast = toaster.createToast;
6
6
  exports.defaultToasterProps = toaster.defaultToasterProps;
@@ -1,4 +1,4 @@
1
- import { T, c, d, g } from "../../toaster-XfzHDqz_.js";
1
+ import { T, c, d, g } from "../../toaster-_p1GTtHI.js";
2
2
  export {
3
3
  T as Toaster,
4
4
  c as createToast,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const tree = require("../../tree-Pvr2rZ-D.cjs");
3
+ const tree = require("../../tree-rGHtmCnS.cjs");
4
4
  exports.createTree = tree.createTree;
5
5
  exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
@@ -1,4 +1,4 @@
1
- import { c, g } from "../../tree-BFrXdJox.js";
1
+ import { c, g } from "../../tree-DV0tfPlZ.js";
2
2
  export {
3
3
  c as createTree,
4
4
  g as getTreeDefaultConfig
@@ -40,12 +40,6 @@ export interface NormalizedTreeItem extends TreeItem {
40
40
  children: NormalizedTreeItem[];
41
41
  }
42
42
  interface TreeCommonPropsAndState extends WidgetsCommonPropsAndState {
43
- /**
44
- * Optional accessibility label for the tree if there is no explicit label
45
- *
46
- * @defaultValue `''`
47
- */
48
- ariaLabel?: string;
49
43
  }
50
44
  /**
51
45
  * Interface representing the properties for the Tree component.
package/config.cjs CHANGED
@@ -21,9 +21,9 @@ const mergeInto = (destination, source, levels = Infinity) => {
21
21
  };
22
22
  const createWidgetsConfig = (parent$, adaptParentConfig = utils_func.identity) => {
23
23
  const own$ = tansu.writable({});
24
- const adaptedParent$ = adaptParentConfig === utils_func.identity ? parent$ : tansu.computed(() => adaptParentConfig(mergeInto({}, parent$ == null ? void 0 : parent$(), 2)));
24
+ const adaptedParent$ = adaptParentConfig === utils_func.identity ? parent$ : tansu.computed(() => adaptParentConfig(mergeInto({}, parent$?.(), 2)));
25
25
  return tansu.asWritable(
26
- tansu.computed(() => mergeInto(mergeInto({}, adaptedParent$ == null ? void 0 : adaptedParent$(), 2), own$(), 2)),
26
+ tansu.computed(() => mergeInto(mergeInto({}, adaptedParent$?.(), 2), own$(), 2)),
27
27
  {
28
28
  ...own$,
29
29
  own$,
package/config.d.ts CHANGED
@@ -11,6 +11,7 @@ import type { ToastProps } from './components/toast/toast';
11
11
  import type { TreeProps } from './components/tree/tree';
12
12
  import type { CarouselProps } from './components/carousel';
13
13
  import type { CollapseProps } from './components/collapse';
14
+ import type { DrawerProps } from './components/drawer/drawer';
14
15
  /**
15
16
  * A utility type that makes all properties of an object type `T` optional,
16
17
  * and also makes all properties of the nested objects within `T` optional.
@@ -114,4 +115,8 @@ export type WidgetsConfig = {
114
115
  * collapse widget config
115
116
  */
116
117
  collapse: CollapseProps;
118
+ /**
119
+ * drawer widget config
120
+ */
121
+ drawer: DrawerProps;
117
122
  };
package/config.js CHANGED
@@ -19,9 +19,9 @@ const mergeInto = (destination, source, levels = Infinity) => {
19
19
  };
20
20
  const createWidgetsConfig = (parent$, adaptParentConfig = identity) => {
21
21
  const own$ = writable({});
22
- const adaptedParent$ = adaptParentConfig === identity ? parent$ : computed(() => adaptParentConfig(mergeInto({}, parent$ == null ? void 0 : parent$(), 2)));
22
+ const adaptedParent$ = adaptParentConfig === identity ? parent$ : computed(() => adaptParentConfig(mergeInto({}, parent$?.(), 2)));
23
23
  return asWritable(
24
- computed(() => mergeInto(mergeInto({}, adaptedParent$ == null ? void 0 : adaptedParent$(), 2), own$(), 2)),
24
+ computed(() => mergeInto(mergeInto({}, adaptedParent$?.(), 2), own$(), 2)),
25
25
  {
26
26
  ...own$,
27
27
  own$,