@agnos-ui/core 0.10.0-next.4 → 0.11.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{accordion-nxveC0GZ.cjs → accordion-BNq8mApi.cjs} +16 -21
- package/{accordion-47EpOD36.js → accordion-CYAFmYRn.js} +19 -24
- package/{alert-anMaigvi.js → alert-Cb9FhbFQ.js} +1 -1
- package/{collapse-CrfvGo_T.js → collapse-Cg9s33tY.js} +2 -2
- package/{collapse-Da_27YUU.cjs → collapse-yKsOxJlH.cjs} +1 -1
- package/{common-CCxNtFNM.js → common-DFyZvkII.js} +1 -1
- package/components/accordion/accordion.d.ts +18 -8
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +3 -3
- package/components/alert/common.d.ts +2 -2
- package/components/alert/index.js +1 -1
- package/components/carousel/index.cjs +1 -1
- package/components/carousel/index.js +3 -3
- package/components/collapse/collapse.d.ts +3 -3
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/drawer/drawer.d.ts +12 -2
- package/components/drawer/index.cjs +1 -1
- package/components/drawer/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +4 -4
- package/components/pagination/index.cjs +1 -1
- package/components/pagination/index.js +1 -1
- package/components/progressbar/index.cjs +1 -1
- package/components/progressbar/index.js +1 -1
- package/components/rating/index.cjs +1 -1
- package/components/rating/index.js +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +1 -1
- package/components/tree/index.cjs +1 -1
- package/components/tree/index.js +1 -1
- package/config.d.ts +0 -5
- package/{dom-Cm9_uROp.cjs → dom-BX4ImCTd.cjs} +28 -4
- package/{dom-DD1hAVZy.js → dom-Bb5ZCr_a.js} +49 -25
- package/{drawer-CGHyRTM9.js → drawer-CYtNS8c1.js} +16 -9
- package/{drawer-B5Yaqpiu.cjs → drawer-DoaLRui_.cjs} +13 -6
- package/index.cjs +12 -14
- package/index.d.ts +0 -1
- package/index.js +56 -58
- package/{modal-B_3Uxplo.cjs → modal-CMeWLNO-.cjs} +1 -1
- package/{modal-cKd3qUn1.js → modal-EHJERSIp.js} +6 -6
- package/package.json +1 -1
- package/{pagination-DlOyP_2C.js → pagination-BDKo2d3i.js} +2 -2
- package/{pagination-2Vor6JPZ.cjs → pagination-Ddk3z56A.cjs} +1 -1
- package/{progressbar-B5g76eMV.js → progressbar-BFdAfV5g.js} +2 -2
- package/{progressbar-DyBRINco.cjs → progressbar-ysfDQD0Q.cjs} +1 -1
- package/{promise-Y53vc4Ia.js → promise-D-RZVPuv.js} +1 -1
- package/{rating-C7C4-p4B.js → rating-D04FQgtR.js} +2 -2
- package/{rating-C0y1j4SC.cjs → rating-DO_fKNp3.cjs} +1 -1
- package/services/floatingUI.cjs +1 -1
- package/services/floatingUI.js +2 -2
- package/services/focusElement.cjs +1 -1
- package/services/focusElement.js +1 -1
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.js +1 -1
- package/services/matchMedia.cjs +1 -1
- package/services/matchMedia.js +1 -1
- package/services/navManager.cjs +5 -5
- package/services/navManager.js +2 -2
- package/services/pointerdownPosition.cjs +1 -1
- package/services/pointerdownPosition.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +1 -1
- package/services/resizeObserver.js +1 -1
- package/services/siblingsInert.cjs +1 -1
- package/services/siblingsInert.js +1 -1
- package/services/transitions/baseTransitions.cjs +1 -1
- package/services/transitions/baseTransitions.js +3 -3
- package/services/transitions/collapse.cjs +1 -1
- package/services/transitions/collapse.js +1 -1
- package/services/transitions/cssTransitions.cjs +1 -1
- package/services/transitions/cssTransitions.js +2 -2
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-B4WrdTeE.js → slider-BPQIKRKL.js} +3 -3
- package/{slider-DTO58syz.cjs → slider-BRktp0--.cjs} +1 -1
- package/textDirection-cNgt24LJ.js +4 -0
- package/textDirection-zqcZ5-eK.cjs +3 -0
- package/{toaster-CT148JSJ.cjs → toaster-Kq-cZoiD.cjs} +1 -1
- package/{toaster-CRPErgI2.js → toaster-y_hXuh4o.js} +3 -3
- package/{tree-CHpFqJPx.js → tree-AM_J23Hz.js} +2 -2
- package/{tree-C4l2Wqny.cjs → tree-BAE89Xjn.cjs} +1 -1
- package/utils/directive.cjs +2 -1
- package/utils/directive.d.ts +8 -0
- package/utils/directive.js +20 -19
- package/utils/stores.cjs +5 -2
- package/utils/stores.js +6 -3
- package/utils/writables.js +11 -11
- package/{writables-Is1bF1Vt.js → writables-DYGjj5T3.js} +10 -10
- package/components/select/index.cjs +0 -5
- package/components/select/index.d.ts +0 -1
- package/components/select/index.js +0 -5
- package/components/select/select.d.ts +0 -311
- package/select-Dhsb9msC.cjs +0 -376
- package/select-nnl00UWY.js +0 -377
|
@@ -4,7 +4,7 @@ const services_transitions_baseTransitions = require("./services/transitions/bas
|
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
5
|
const utils_func = require("./utils/func.cjs");
|
|
6
6
|
const utils_writables = require("./writables-Dt68gADJ.cjs");
|
|
7
|
-
const utils_directive = require("./dom-
|
|
7
|
+
const utils_directive = require("./dom-BX4ImCTd.cjs");
|
|
8
8
|
const utils_widget = require("./utils/widget.cjs");
|
|
9
9
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
10
10
|
let keepOpen;
|
|
@@ -145,7 +145,7 @@ function createAccordionItem(config) {
|
|
|
145
145
|
events: {
|
|
146
146
|
click: () => {
|
|
147
147
|
if (!disabled$()) {
|
|
148
|
-
|
|
148
|
+
void transition.api.toggle();
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
}
|
|
@@ -176,15 +176,9 @@ function createAccordionItem(config) {
|
|
|
176
176
|
initDone: () => {
|
|
177
177
|
initDone$.set(true);
|
|
178
178
|
},
|
|
179
|
-
collapse:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
expand: () => {
|
|
183
|
-
visible$.set(true);
|
|
184
|
-
},
|
|
185
|
-
toggle: () => {
|
|
186
|
-
visible$.update((c) => !c);
|
|
187
|
-
}
|
|
179
|
+
collapse: transition.api.hide,
|
|
180
|
+
expand: transition.api.show,
|
|
181
|
+
toggle: transition.api.toggle
|
|
188
182
|
},
|
|
189
183
|
directives: {
|
|
190
184
|
toggleDirective,
|
|
@@ -237,20 +231,20 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
237
231
|
...utils_stores.stateStores({ itemWidgets$, className$ }),
|
|
238
232
|
patch,
|
|
239
233
|
api: {
|
|
240
|
-
expand: (id) => {
|
|
241
|
-
getItem(itemWidgets$(), id)?.api.expand();
|
|
234
|
+
expand: async (id) => {
|
|
235
|
+
await getItem(itemWidgets$(), id)?.api.expand();
|
|
242
236
|
},
|
|
243
|
-
collapse: (id) => {
|
|
244
|
-
getItem(itemWidgets$(), id)?.api.collapse();
|
|
237
|
+
collapse: async (id) => {
|
|
238
|
+
await getItem(itemWidgets$(), id)?.api.collapse();
|
|
245
239
|
},
|
|
246
|
-
toggle: (id) => {
|
|
247
|
-
getItem(itemWidgets$(), id)?.api.toggle();
|
|
240
|
+
toggle: async (id) => {
|
|
241
|
+
await getItem(itemWidgets$(), id)?.api.toggle();
|
|
248
242
|
},
|
|
249
|
-
expandAll: () => {
|
|
250
|
-
itemWidgets$().
|
|
243
|
+
expandAll: async () => {
|
|
244
|
+
await Promise.all(itemWidgets$().map((i) => i.api.expand()));
|
|
251
245
|
},
|
|
252
|
-
collapseAll: () => {
|
|
253
|
-
itemWidgets$().
|
|
246
|
+
collapseAll: async () => {
|
|
247
|
+
await Promise.all(itemWidgets$().map((i) => i.api.collapse()));
|
|
254
248
|
},
|
|
255
249
|
registerItem: (propsConfig) => {
|
|
256
250
|
const itemProps = accordionItemProps;
|
|
@@ -260,6 +254,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
260
254
|
onHidden: defaultItemConfig.onHidden,
|
|
261
255
|
onShown: defaultItemConfig.onShown
|
|
262
256
|
},
|
|
257
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
263
258
|
{ config: config2, props: propsConfig?.props }
|
|
264
259
|
);
|
|
265
260
|
const item = itemFactory({
|
|
@@ -2,8 +2,8 @@ import { writablesForProps, idWithDefault, stateStores, true$, mergeConfigStores
|
|
|
2
2
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
3
3
|
import { writable, computed, readable, asWritable } from "@amadeus-it-group/tansu";
|
|
4
4
|
import { noop } from "./utils/func.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { j as typeString, e as typeFunction, b as typeBoolean, c as createTypeEnum } from "./writables-DYGjj5T3.js";
|
|
6
|
+
import { s as mergeDirectives, g as createAttributesDirective, u as registrationArray, o as directiveSubscribe } from "./dom-Bb5ZCr_a.js";
|
|
7
7
|
import { createWidgetFactory } from "./utils/widget.js";
|
|
8
8
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
9
9
|
let keepOpen;
|
|
@@ -144,7 +144,7 @@ function createAccordionItem(config) {
|
|
|
144
144
|
events: {
|
|
145
145
|
click: () => {
|
|
146
146
|
if (!disabled$()) {
|
|
147
|
-
|
|
147
|
+
void transition.api.toggle();
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -175,15 +175,9 @@ function createAccordionItem(config) {
|
|
|
175
175
|
initDone: () => {
|
|
176
176
|
initDone$.set(true);
|
|
177
177
|
},
|
|
178
|
-
collapse:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
expand: () => {
|
|
182
|
-
visible$.set(true);
|
|
183
|
-
},
|
|
184
|
-
toggle: () => {
|
|
185
|
-
visible$.update((c) => !c);
|
|
186
|
-
}
|
|
178
|
+
collapse: transition.api.hide,
|
|
179
|
+
expand: transition.api.show,
|
|
180
|
+
toggle: transition.api.toggle
|
|
187
181
|
},
|
|
188
182
|
directives: {
|
|
189
183
|
toggleDirective,
|
|
@@ -236,20 +230,20 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
236
230
|
...stateStores({ itemWidgets$, className$ }),
|
|
237
231
|
patch,
|
|
238
232
|
api: {
|
|
239
|
-
expand: (id) => {
|
|
240
|
-
getItem(itemWidgets$(), id)?.api.expand();
|
|
233
|
+
expand: async (id) => {
|
|
234
|
+
await getItem(itemWidgets$(), id)?.api.expand();
|
|
241
235
|
},
|
|
242
|
-
collapse: (id) => {
|
|
243
|
-
getItem(itemWidgets$(), id)?.api.collapse();
|
|
236
|
+
collapse: async (id) => {
|
|
237
|
+
await getItem(itemWidgets$(), id)?.api.collapse();
|
|
244
238
|
},
|
|
245
|
-
toggle: (id) => {
|
|
246
|
-
getItem(itemWidgets$(), id)?.api.toggle();
|
|
239
|
+
toggle: async (id) => {
|
|
240
|
+
await getItem(itemWidgets$(), id)?.api.toggle();
|
|
247
241
|
},
|
|
248
|
-
expandAll: () => {
|
|
249
|
-
itemWidgets$().
|
|
242
|
+
expandAll: async () => {
|
|
243
|
+
await Promise.all(itemWidgets$().map((i) => i.api.expand()));
|
|
250
244
|
},
|
|
251
|
-
collapseAll: () => {
|
|
252
|
-
itemWidgets$().
|
|
245
|
+
collapseAll: async () => {
|
|
246
|
+
await Promise.all(itemWidgets$().map((i) => i.api.collapse()));
|
|
253
247
|
},
|
|
254
248
|
registerItem: (propsConfig) => {
|
|
255
249
|
const itemProps = accordionItemProps;
|
|
@@ -259,6 +253,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
259
253
|
onHidden: defaultItemConfig.onHidden,
|
|
260
254
|
onShown: defaultItemConfig.onShown
|
|
261
255
|
},
|
|
256
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
262
257
|
{ config: config2, props: propsConfig?.props }
|
|
263
258
|
);
|
|
264
259
|
const item = itemFactory({
|
|
@@ -307,8 +302,8 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
307
302
|
}
|
|
308
303
|
const createAccordion = factoryCreateAccordion();
|
|
309
304
|
export {
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
createAccordionItem as a,
|
|
306
|
+
createAccordion as c,
|
|
312
307
|
factoryCreateAccordion as f,
|
|
313
308
|
getAccordionDefaultConfig as g
|
|
314
309
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-
|
|
1
|
+
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-DFyZvkII.js";
|
|
2
2
|
import { createWidgetFactory } from "./utils/widget.js";
|
|
3
3
|
function getAlertDefaultConfig() {
|
|
4
4
|
return { ...getCommonAlertDefaultConfig() };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
2
2
|
import { writablesForProps, idWithDefault, stateStores } from "./utils/stores.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { g as createAttributesDirective, s as mergeDirectives } from "./dom-Bb5ZCr_a.js";
|
|
4
|
+
import { e as typeFunction, j as typeString, b as typeBoolean } from "./writables-DYGjj5T3.js";
|
|
5
5
|
import { computed } from "@amadeus-it-group/tansu";
|
|
6
6
|
import { noop } from "./utils/func.js";
|
|
7
7
|
import { createWidgetFactory } from "./utils/widget.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
3
3
|
const utils_stores = require("./utils/stores.cjs");
|
|
4
|
-
const utils_directive = require("./dom-
|
|
4
|
+
const utils_directive = require("./dom-BX4ImCTd.cjs");
|
|
5
5
|
const utils_writables = require("./writables-Dt68gADJ.cjs");
|
|
6
6
|
const tansu = require("@amadeus-it-group/tansu");
|
|
7
7
|
const utils_func = require("./utils/func.cjs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
2
2
|
import { noop } from "./utils/func.js";
|
|
3
3
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
4
|
-
import {
|
|
4
|
+
import { j as typeString, b as typeBoolean, e as typeFunction } from "./writables-DYGjj5T3.js";
|
|
5
5
|
const defaultCommonAlertConfig = {
|
|
6
6
|
visible: true,
|
|
7
7
|
dismissible: true,
|
|
@@ -109,30 +109,37 @@ export interface AccordionApi {
|
|
|
109
109
|
* Given the itemId, will expand the corresponding accordion-item.
|
|
110
110
|
*
|
|
111
111
|
* If the itemId is not valid, nothing will happen.
|
|
112
|
+
* @returns A promise that resolves when the expand operation is completed.
|
|
112
113
|
*/
|
|
113
|
-
expand(itemId: string): void
|
|
114
|
+
expand(itemId: string): Promise<void>;
|
|
114
115
|
/**
|
|
115
116
|
* Given the itemId, will collapse the corresponding accordion-item.
|
|
116
117
|
*
|
|
117
118
|
* If the itemId is not valid, nothing will happen.
|
|
119
|
+
* @returns A promise that resolves when the collapse operation is completed.
|
|
118
120
|
*/
|
|
119
|
-
collapse(itemId: string): void
|
|
121
|
+
collapse(itemId: string): Promise<void>;
|
|
120
122
|
/**
|
|
121
123
|
* Given the itemId, will toggle the corresponding accordion-item.
|
|
122
124
|
*
|
|
125
|
+
* @returns A promise that resolves when the toggle operation is completed.
|
|
123
126
|
* If the itemId is not valid, nothing will happen.
|
|
124
127
|
*/
|
|
125
|
-
toggle(itemId: string): void
|
|
128
|
+
toggle(itemId: string): Promise<void>;
|
|
126
129
|
/**
|
|
127
130
|
* It will expand all the items in the accordion.
|
|
128
131
|
*
|
|
129
132
|
* If `closeOthers` is `true` it will expand only the last accordion-item.
|
|
133
|
+
*
|
|
134
|
+
* @returns A promise that resolves when all the expand operations are completed.
|
|
130
135
|
*/
|
|
131
|
-
expandAll(): void
|
|
136
|
+
expandAll(): Promise<void>;
|
|
132
137
|
/**
|
|
133
138
|
* It will collapse all the accordion-items in the accordion.
|
|
139
|
+
*
|
|
140
|
+
* @returns A promise that resolves when all the collapse operations are completed.
|
|
134
141
|
*/
|
|
135
|
-
collapseAll(): void
|
|
142
|
+
collapseAll(): Promise<void>;
|
|
136
143
|
/**
|
|
137
144
|
* Creates a new accordionItem.
|
|
138
145
|
*/
|
|
@@ -157,16 +164,19 @@ export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionAp
|
|
|
157
164
|
export interface AccordionItemApi {
|
|
158
165
|
/**
|
|
159
166
|
* It will collapse the accordion-item.
|
|
167
|
+
* @returns A promise that resolves when the collapse operation is completed.
|
|
160
168
|
*/
|
|
161
|
-
collapse(): void
|
|
169
|
+
collapse(): Promise<void>;
|
|
162
170
|
/**
|
|
163
171
|
* It will expand the accordion-item.
|
|
172
|
+
* @returns A promise that resolves when the expand operation is completed.
|
|
164
173
|
*/
|
|
165
|
-
expand(): void
|
|
174
|
+
expand(): Promise<void>;
|
|
166
175
|
/**
|
|
167
176
|
* It will toggle the accordion-item.
|
|
177
|
+
* @returns A promise that resolves when the toggle operation is completed.
|
|
168
178
|
*/
|
|
169
|
-
toggle(): void
|
|
179
|
+
toggle(): Promise<void>;
|
|
170
180
|
/**
|
|
171
181
|
* Method to be called after the initialization to allow animations.
|
|
172
182
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const accordion = require("../../accordion-
|
|
3
|
+
const accordion = require("../../accordion-BNq8mApi.cjs");
|
|
4
4
|
exports.createAccordion = accordion.createAccordion;
|
|
5
5
|
exports.createAccordionItem = accordion.createAccordionItem;
|
|
6
6
|
exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c, a, f, g } from "../../accordion-CYAFmYRn.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
c as createAccordion,
|
|
4
|
+
a as createAccordionItem,
|
|
5
5
|
f as factoryCreateAccordion,
|
|
6
6
|
g as getAccordionDefaultConfig
|
|
7
7
|
};
|
|
@@ -102,11 +102,11 @@ export interface CommonAlertApi {
|
|
|
102
102
|
/**
|
|
103
103
|
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
104
104
|
*/
|
|
105
|
-
close(): void
|
|
105
|
+
close(): Promise<void>;
|
|
106
106
|
/**
|
|
107
107
|
* Triggers the alert to be displayed for the user.
|
|
108
108
|
*/
|
|
109
|
-
open(): void
|
|
109
|
+
open(): Promise<void>;
|
|
110
110
|
}
|
|
111
111
|
/**
|
|
112
112
|
* Interface representing common alert directives.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const utils_stores = require("../../utils/stores.cjs");
|
|
4
|
-
const utils_directive = require("../../dom-
|
|
4
|
+
const utils_directive = require("../../dom-BX4ImCTd.cjs");
|
|
5
5
|
const EmblaCarousel = require("embla-carousel");
|
|
6
6
|
const tansu = require("@amadeus-it-group/tansu");
|
|
7
7
|
const utils_writables = require("../../writables-Dt68gADJ.cjs");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { writablesForProps, stateStores
|
|
2
|
-
import {
|
|
1
|
+
import { writablesForProps, true$, stateStores } from "../../utils/stores.js";
|
|
2
|
+
import { b as bindDirective, d as browserDirective, g as createAttributesDirective, s as mergeDirectives } from "../../dom-Bb5ZCr_a.js";
|
|
3
3
|
import EmblaCarousel from "embla-carousel";
|
|
4
4
|
import { writable, computed, asReadable, readable } from "@amadeus-it-group/tansu";
|
|
5
|
-
import {
|
|
5
|
+
import { e as typeFunction, j as typeString, b as typeBoolean, g as typeNumber, k as typeStringOrNull, a as typeArray, c as createTypeEnum } from "../../writables-DYGjj5T3.js";
|
|
6
6
|
import { createNavManager } from "../../services/navManager.js";
|
|
7
7
|
import { createWidgetFactory } from "../../utils/widget.js";
|
|
8
8
|
const defaultConfig = {
|
|
@@ -89,15 +89,15 @@ export interface CollapseApi {
|
|
|
89
89
|
/**
|
|
90
90
|
* Triggers collapse closing programmatically.
|
|
91
91
|
*/
|
|
92
|
-
close(): void
|
|
92
|
+
close(): Promise<void>;
|
|
93
93
|
/**
|
|
94
94
|
* Triggers the collapse content to be displayed for the user.
|
|
95
95
|
*/
|
|
96
|
-
open(): void
|
|
96
|
+
open(): Promise<void>;
|
|
97
97
|
/**
|
|
98
98
|
* Toggles the collapse content visibility.
|
|
99
99
|
*/
|
|
100
|
-
toggle(): void
|
|
100
|
+
toggle(): Promise<void>;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
103
|
* Interface representing the directives used in a collapse component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const collapse = require("../../collapse-
|
|
3
|
+
const collapse = require("../../collapse-yKsOxJlH.cjs");
|
|
4
4
|
exports.createCollapse = collapse.createCollapse;
|
|
5
5
|
exports.getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
|
|
@@ -111,6 +111,12 @@ export interface DrawerProps extends DrawerCommonPropsAndState {
|
|
|
111
111
|
* @defaultValue `false`
|
|
112
112
|
*/
|
|
113
113
|
bodyScroll: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* If `true` focuses the drawer when it is opened.
|
|
116
|
+
*
|
|
117
|
+
* @defaultValue `true`
|
|
118
|
+
*/
|
|
119
|
+
focusOnInit: boolean;
|
|
114
120
|
/**
|
|
115
121
|
* Event to be triggered when the transition is completed and the drawer is not visible.
|
|
116
122
|
*
|
|
@@ -192,6 +198,10 @@ export interface DrawerState extends DrawerCommonPropsAndState {
|
|
|
192
198
|
* Flag to show whether the drawer is fully hidden.
|
|
193
199
|
*/
|
|
194
200
|
hidden: boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Flag to show whether the drawer is vertically positioned.
|
|
203
|
+
*/
|
|
204
|
+
isVertical: boolean;
|
|
195
205
|
}
|
|
196
206
|
/**
|
|
197
207
|
* Interface representing the API for a Drawer component.
|
|
@@ -200,11 +210,11 @@ export interface DrawerApi {
|
|
|
200
210
|
/**
|
|
201
211
|
* Trigger the opening of the drawer.
|
|
202
212
|
*/
|
|
203
|
-
open: () => void
|
|
213
|
+
open: () => Promise<void>;
|
|
204
214
|
/**
|
|
205
215
|
* Trigger the closing of the drawer.
|
|
206
216
|
*/
|
|
207
|
-
close: () => void
|
|
217
|
+
close: () => Promise<void>;
|
|
208
218
|
}
|
|
209
219
|
/**
|
|
210
220
|
* Interface representing various directives used in the Drawer component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const drawer = require("../../drawer-
|
|
3
|
+
const drawer = require("../../drawer-DoaLRui_.cjs");
|
|
4
4
|
exports.createDrawer = drawer.createDrawer;
|
|
5
5
|
exports.getDrawerDefaultConfig = drawer.getDrawerDefaultConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const modal = require("../../modal-
|
|
3
|
+
const modal = require("../../modal-CMeWLNO-.cjs");
|
|
4
4
|
exports.createModal = modal.createModal;
|
|
5
5
|
exports.getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
6
6
|
exports.modalCloseButtonClick = modal.modalCloseButtonClick;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { c, g, a, b
|
|
1
|
+
import { c, g, m, a, b } from "../../modal-EHJERSIp.js";
|
|
2
2
|
export {
|
|
3
3
|
c as createModal,
|
|
4
4
|
g as getModalDefaultConfig,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
m as modalCloseButtonClick,
|
|
6
|
+
a as modalCloseEscape,
|
|
7
|
+
b as modalOutsideClick
|
|
8
8
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const pagination = require("../../pagination-
|
|
3
|
+
const pagination = require("../../pagination-Ddk3z56A.cjs");
|
|
4
4
|
exports.createPagination = pagination.createPagination;
|
|
5
5
|
exports.getPaginationDefaultConfig = pagination.getPaginationDefaultConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const progressbar = require("../../progressbar-
|
|
3
|
+
const progressbar = require("../../progressbar-ysfDQD0Q.cjs");
|
|
4
4
|
exports.createProgressbar = progressbar.createProgressbar;
|
|
5
5
|
exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const rating = require("../../rating-
|
|
3
|
+
const rating = require("../../rating-DO_fKNp3.cjs");
|
|
4
4
|
exports.createRating = rating.createRating;
|
|
5
5
|
exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const slider = require("../../slider-
|
|
3
|
+
const slider = require("../../slider-BRktp0--.cjs");
|
|
4
4
|
exports.createSlider = slider.createSlider;
|
|
5
5
|
exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toaster = require("../../toaster-
|
|
3
|
+
const toaster = require("../../toaster-Kq-cZoiD.cjs");
|
|
4
4
|
exports.Toaster = toaster.Toaster;
|
|
5
5
|
exports.createToast = toaster.createToast;
|
|
6
6
|
exports.defaultToasterProps = toaster.defaultToasterProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const tree = require("../../tree-
|
|
3
|
+
const tree = require("../../tree-BAE89Xjn.cjs");
|
|
4
4
|
exports.createTree = tree.createTree;
|
|
5
5
|
exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
|
package/components/tree/index.js
CHANGED
package/config.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import type { ModalProps } from './components/modal/modal';
|
|
|
3
3
|
import type { AlertProps } from './components/alert/alert';
|
|
4
4
|
import type { PaginationProps } from './components/pagination/pagination';
|
|
5
5
|
import type { RatingProps } from './components/rating/rating';
|
|
6
|
-
import type { SelectProps } from './components/select/select';
|
|
7
6
|
import type { AccordionProps } from './components/accordion/accordion';
|
|
8
7
|
import type { ProgressbarProps } from './components/progressbar/progressbar';
|
|
9
8
|
import type { SliderProps } from './components/slider/slider';
|
|
@@ -75,10 +74,6 @@ export type WidgetsConfig = {
|
|
|
75
74
|
* the rating widget config
|
|
76
75
|
*/
|
|
77
76
|
rating: RatingProps;
|
|
78
|
-
/**
|
|
79
|
-
* the select widget config
|
|
80
|
-
*/
|
|
81
|
-
select: SelectProps<any>;
|
|
82
77
|
/**
|
|
83
78
|
* the modal widget config
|
|
84
79
|
*/
|
|
@@ -122,10 +122,13 @@ function clsx() {
|
|
|
122
122
|
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
123
123
|
return n;
|
|
124
124
|
}
|
|
125
|
-
const isBrowserHTMLElement = esmEnv.BROWSER ? (
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
const isBrowserHTMLElement = esmEnv.BROWSER ? (
|
|
126
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
127
|
+
((element) => {
|
|
128
|
+
const contentWindow = element?.ownerDocument?.defaultView ?? window;
|
|
129
|
+
return element instanceof contentWindow.HTMLElement;
|
|
130
|
+
})
|
|
131
|
+
) : (
|
|
129
132
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
130
133
|
((element) => false)
|
|
131
134
|
);
|
|
@@ -277,6 +280,26 @@ const createBrowserStoreDirective = () => {
|
|
|
277
280
|
const { directive, element$ } = createStoreDirective();
|
|
278
281
|
return { directive: browserDirective(directive), element$ };
|
|
279
282
|
};
|
|
283
|
+
const conditionalDirective = (directive, condition) => (element, arg) => {
|
|
284
|
+
const instance$ = tansu.derived(
|
|
285
|
+
condition,
|
|
286
|
+
(enabled, set) => {
|
|
287
|
+
const instance = enabled ? directive(element, arg) : void 0;
|
|
288
|
+
set(instance);
|
|
289
|
+
return () => instance?.destroy?.();
|
|
290
|
+
},
|
|
291
|
+
void 0
|
|
292
|
+
);
|
|
293
|
+
const destroy = instance$.subscribe(() => {
|
|
294
|
+
});
|
|
295
|
+
return {
|
|
296
|
+
update(newArg) {
|
|
297
|
+
arg = newArg;
|
|
298
|
+
instance$()?.update?.(newArg);
|
|
299
|
+
},
|
|
300
|
+
destroy
|
|
301
|
+
};
|
|
302
|
+
};
|
|
280
303
|
const mergeDirectives = (...args) => (element, arg) => {
|
|
281
304
|
const instances = tansu.batch(() => args.map((directive) => directive(element, arg)));
|
|
282
305
|
return {
|
|
@@ -481,6 +504,7 @@ exports.bindDirectiveNoArg = bindDirectiveNoArg;
|
|
|
481
504
|
exports.browserDirective = browserDirective;
|
|
482
505
|
exports.classDirective = classDirective;
|
|
483
506
|
exports.computeCommonAncestor = computeCommonAncestor;
|
|
507
|
+
exports.conditionalDirective = conditionalDirective;
|
|
484
508
|
exports.createAttributesDirective = createAttributesDirective;
|
|
485
509
|
exports.createBrowserStoreArrayDirective = createBrowserStoreArrayDirective;
|
|
486
510
|
exports.createBrowserStoreDirective = createBrowserStoreDirective;
|