@agnos-ui/core 0.9.3 → 0.10.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-CoM4efp-.js → accordion-CcirvrjR.js} +10 -15
- package/{accordion-cR5JqWJ8.cjs → accordion-yD-czBna.cjs} +10 -15
- package/{alert-DtDozJal.cjs → alert-B-jQDQcB.cjs} +1 -1
- package/{alert-YIlqdEPO.js → alert-gGz2CDS9.js} +1 -1
- package/{collapse-DwXz2kNw.js → collapse-BV4kD3j9.js} +2 -2
- package/{collapse-DRp53EuG.cjs → collapse-gLiT080Y.cjs} +2 -2
- package/{common-BToNPUDq.cjs → common-D3QcdJ6S.cjs} +1 -1
- package/{common-BqUjUBPy.js → common-DK0ADNTX.js} +1 -1
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/carousel/index.cjs +10 -23
- package/components/carousel/index.js +10 -23
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/drawer/drawer.d.ts +222 -0
- package/components/drawer/index.cjs +5 -0
- package/components/drawer/index.d.ts +1 -0
- package/components/drawer/index.js +5 -0
- package/components/modal/index.cjs +2 -1
- package/components/modal/index.js +2 -1
- package/components/modal/modal.d.ts +5 -0
- 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/select/index.cjs +1 -1
- package/components/select/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.cjs +2 -2
- package/config.d.ts +5 -0
- package/config.js +2 -2
- package/{dom-gfxqXJpK.js → dom-Bcg9ORcA.js} +64 -54
- package/{dom-CuBx1JPZ.cjs → dom-C2gi9OCP.cjs} +47 -37
- package/drawer-D5SO73ew.js +251 -0
- package/drawer-DP7UPojk.cjs +250 -0
- package/index.cjs +19 -13
- package/index.d.ts +1 -0
- package/index.js +36 -30
- package/isFocusable-Ckwus82R.js +32 -0
- package/isFocusable-DfzDLeAN.cjs +31 -0
- package/{modal-D3wGIDlj.js → modal-CAvQW-vo.js} +26 -32
- package/{modal-BEnQ6c5M.cjs → modal-DiXZXYjR.cjs} +27 -33
- package/package.json +1 -1
- package/{pagination-B97wBLok.js → pagination-BKbMROV6.js} +4 -4
- package/{pagination-C1TT-oea.cjs → pagination-DvZ2rLsz.cjs} +4 -4
- package/{progressbar-BWBlRk_Y.js → progressbar-D8zIcm9n.js} +2 -2
- package/{progressbar-CRvhNB5R.cjs → progressbar-i9xfAxb7.cjs} +2 -2
- package/{promise-XSP94FjG.js → promise-Y53vc4Ia.js} +5 -5
- package/{rating-BXvy9kXq.js → rating-DEXTGWCU.js} +2 -2
- package/{rating-DAb6nR67.cjs → rating-DmG4oUkr.cjs} +2 -2
- package/scrollbars-CT87iv_6.cjs +30 -0
- package/scrollbars-CcxSrnCx.js +31 -0
- package/{select-BdjpnE7_.js → select-Bw68Xdu5.js} +4 -5
- package/{select-C0rJJQfl.cjs → select-MFjAnIt7.cjs} +4 -5
- package/services/extendWidget.cjs +2 -2
- package/services/extendWidget.js +2 -2
- package/services/floatingUI.cjs +8 -29
- package/services/floatingUI.js +9 -30
- package/services/focusElement.cjs +46 -0
- package/services/focusElement.d.ts +9 -0
- package/services/focusElement.js +46 -0
- 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 +7 -37
- package/services/navManager.js +6 -36
- package/services/portal.cjs +7 -10
- package/services/portal.js +7 -10
- package/services/resizeObserver.cjs +2 -2
- package/services/resizeObserver.js +2 -2
- package/services/siblingsInert.cjs +9 -8
- package/services/siblingsInert.d.ts +13 -3
- package/services/siblingsInert.js +9 -8
- package/services/transitions/baseTransitions.cjs +9 -10
- package/services/transitions/baseTransitions.js +10 -11
- 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-BmxQ3A_u.js → slider-Cx50Eghd.js} +14 -24
- package/{slider-DSx5CAce.cjs → slider-Dl4Trh32.cjs} +14 -24
- package/toaster-UDglac7x.cjs +187 -0
- package/toaster-_p1GTtHI.js +188 -0
- package/{tree-BFrXdJox.js → tree-DV0tfPlZ.js} +7 -11
- package/{tree-Pvr2rZ-D.cjs → tree-rGHtmCnS.cjs} +7 -11
- package/utils/directive.cjs +3 -1
- package/utils/directive.d.ts +47 -0
- package/utils/directive.js +14 -12
- package/utils/stores.cjs +8 -9
- package/utils/stores.js +8 -9
- package/utils/writables.cjs +1 -1
- package/utils/writables.js +1 -1
- package/{writables-Bn3uhKEG.cjs → writables-DcGT98a7.cjs} +1 -1
- package/{writables-CgpOQ4hA.js → writables-e0tyaQpe.js} +1 -1
- package/toaster-Cayg6Lbq.cjs +0 -209
- package/toaster-XfzHDqz_.js +0 -210
|
@@ -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 { e as typeString, g as typeFunction, c as typeBoolean } from "./writables-
|
|
6
|
-
import {
|
|
5
|
+
import { e as typeString, g as typeFunction, c as typeBoolean } from "./writables-e0tyaQpe.js";
|
|
6
|
+
import { n as mergeDirectives, p as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-Bcg9ORcA.js";
|
|
7
7
|
import { createWidgetFactory } from "./utils/widget.js";
|
|
8
8
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
9
9
|
let keepOpen;
|
|
@@ -236,16 +236,13 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
236
236
|
patch,
|
|
237
237
|
api: {
|
|
238
238
|
expand: (id) => {
|
|
239
|
-
|
|
240
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.expand();
|
|
239
|
+
getItem(itemWidgets$(), id)?.api.expand();
|
|
241
240
|
},
|
|
242
241
|
collapse: (id) => {
|
|
243
|
-
|
|
244
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.collapse();
|
|
242
|
+
getItem(itemWidgets$(), id)?.api.collapse();
|
|
245
243
|
},
|
|
246
244
|
toggle: (id) => {
|
|
247
|
-
|
|
248
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.toggle();
|
|
245
|
+
getItem(itemWidgets$(), id)?.api.toggle();
|
|
249
246
|
},
|
|
250
247
|
expandAll: () => {
|
|
251
248
|
itemWidgets$().forEach((i) => i.api.expand());
|
|
@@ -255,23 +252,22 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
255
252
|
},
|
|
256
253
|
registerItem: (propsConfig) => {
|
|
257
254
|
const itemProps = accordionItemProps;
|
|
258
|
-
const config2 = mergeConfigStores(itemProps, normalizeConfigStores(itemProps, propsConfig
|
|
255
|
+
const config2 = mergeConfigStores(itemProps, normalizeConfigStores(itemProps, propsConfig?.config), accordionItemConfig);
|
|
259
256
|
const [{ onHidden$, onShown$ }] = writablesForProps(
|
|
260
257
|
{
|
|
261
258
|
onHidden: defaultItemConfig.onHidden,
|
|
262
259
|
onShown: defaultItemConfig.onShown
|
|
263
260
|
},
|
|
264
|
-
{ config: config2, props: propsConfig
|
|
261
|
+
{ config: config2, props: propsConfig?.props }
|
|
265
262
|
);
|
|
266
263
|
const item = itemFactory({
|
|
267
264
|
config: config2,
|
|
268
265
|
props: {
|
|
269
|
-
...propsConfig
|
|
266
|
+
...propsConfig?.props,
|
|
270
267
|
onHidden: asWritable(
|
|
271
268
|
readable(() => {
|
|
272
|
-
var _a;
|
|
273
269
|
onItemHidden$()(item.stores.id$());
|
|
274
|
-
|
|
270
|
+
onHidden$()?.();
|
|
275
271
|
}),
|
|
276
272
|
(val) => {
|
|
277
273
|
onItemHidden$.set(val);
|
|
@@ -279,9 +275,8 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
279
275
|
),
|
|
280
276
|
onShown: asWritable(
|
|
281
277
|
readable(() => {
|
|
282
|
-
var _a;
|
|
283
278
|
onItemShown$()(item.stores.id$());
|
|
284
|
-
|
|
279
|
+
onShown$()?.();
|
|
285
280
|
}),
|
|
286
281
|
(val) => {
|
|
287
282
|
onItemShown$.set(val);
|
|
@@ -3,8 +3,8 @@ const utils_stores = require("./utils/stores.cjs");
|
|
|
3
3
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
5
|
const utils_func = require("./utils/func.cjs");
|
|
6
|
-
const utils_writables = require("./writables-
|
|
7
|
-
const utils_directive = require("./dom-
|
|
6
|
+
const utils_writables = require("./writables-DcGT98a7.cjs");
|
|
7
|
+
const utils_directive = require("./dom-C2gi9OCP.cjs");
|
|
8
8
|
const utils_widget = require("./utils/widget.cjs");
|
|
9
9
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
10
10
|
let keepOpen;
|
|
@@ -237,16 +237,13 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
237
237
|
patch,
|
|
238
238
|
api: {
|
|
239
239
|
expand: (id) => {
|
|
240
|
-
|
|
241
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.expand();
|
|
240
|
+
getItem(itemWidgets$(), id)?.api.expand();
|
|
242
241
|
},
|
|
243
242
|
collapse: (id) => {
|
|
244
|
-
|
|
245
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.collapse();
|
|
243
|
+
getItem(itemWidgets$(), id)?.api.collapse();
|
|
246
244
|
},
|
|
247
245
|
toggle: (id) => {
|
|
248
|
-
|
|
249
|
-
(_a = getItem(itemWidgets$(), id)) == null ? void 0 : _a.api.toggle();
|
|
246
|
+
getItem(itemWidgets$(), id)?.api.toggle();
|
|
250
247
|
},
|
|
251
248
|
expandAll: () => {
|
|
252
249
|
itemWidgets$().forEach((i) => i.api.expand());
|
|
@@ -256,23 +253,22 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
256
253
|
},
|
|
257
254
|
registerItem: (propsConfig) => {
|
|
258
255
|
const itemProps = accordionItemProps;
|
|
259
|
-
const config2 = utils_stores.mergeConfigStores(itemProps, utils_stores.normalizeConfigStores(itemProps, propsConfig
|
|
256
|
+
const config2 = utils_stores.mergeConfigStores(itemProps, utils_stores.normalizeConfigStores(itemProps, propsConfig?.config), accordionItemConfig);
|
|
260
257
|
const [{ onHidden$, onShown$ }] = utils_stores.writablesForProps(
|
|
261
258
|
{
|
|
262
259
|
onHidden: defaultItemConfig.onHidden,
|
|
263
260
|
onShown: defaultItemConfig.onShown
|
|
264
261
|
},
|
|
265
|
-
{ config: config2, props: propsConfig
|
|
262
|
+
{ config: config2, props: propsConfig?.props }
|
|
266
263
|
);
|
|
267
264
|
const item = itemFactory({
|
|
268
265
|
config: config2,
|
|
269
266
|
props: {
|
|
270
|
-
...propsConfig
|
|
267
|
+
...propsConfig?.props,
|
|
271
268
|
onHidden: tansu.asWritable(
|
|
272
269
|
tansu.readable(() => {
|
|
273
|
-
var _a;
|
|
274
270
|
onItemHidden$()(item.stores.id$());
|
|
275
|
-
|
|
271
|
+
onHidden$()?.();
|
|
276
272
|
}),
|
|
277
273
|
(val) => {
|
|
278
274
|
onItemHidden$.set(val);
|
|
@@ -280,9 +276,8 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
280
276
|
),
|
|
281
277
|
onShown: tansu.asWritable(
|
|
282
278
|
tansu.readable(() => {
|
|
283
|
-
var _a;
|
|
284
279
|
onItemShown$()(item.stores.id$());
|
|
285
|
-
|
|
280
|
+
onShown$()?.();
|
|
286
281
|
}),
|
|
287
282
|
(val) => {
|
|
288
283
|
onItemShown$.set(val);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-
|
|
1
|
+
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-DK0ADNTX.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 { g as typeFunction, e as typeString, c as typeBoolean } from "./writables-
|
|
3
|
+
import { p as createAttributesDirective, n as mergeDirectives } from "./dom-Bcg9ORcA.js";
|
|
4
|
+
import { g as typeFunction, e as typeString, c as typeBoolean } from "./writables-e0tyaQpe.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,8 +1,8 @@
|
|
|
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-
|
|
5
|
-
const utils_writables = require("./writables-
|
|
4
|
+
const utils_directive = require("./dom-C2gi9OCP.cjs");
|
|
5
|
+
const utils_writables = require("./writables-DcGT98a7.cjs");
|
|
6
6
|
const tansu = require("@amadeus-it-group/tansu");
|
|
7
7
|
const utils_func = require("./utils/func.cjs");
|
|
8
8
|
const utils_widget = require("./utils/widget.cjs");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
3
3
|
const utils_func = require("./utils/func.cjs");
|
|
4
4
|
const utils_stores = require("./utils/stores.cjs");
|
|
5
|
-
const utils_writables = require("./writables-
|
|
5
|
+
const utils_writables = require("./writables-DcGT98a7.cjs");
|
|
6
6
|
const defaultCommonAlertConfig = {
|
|
7
7
|
visible: true,
|
|
8
8
|
dismissible: true,
|
|
@@ -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 { e as typeString, c as typeBoolean, g as typeFunction } from "./writables-
|
|
4
|
+
import { e as typeString, c as typeBoolean, g as typeFunction } from "./writables-e0tyaQpe.js";
|
|
5
5
|
const defaultCommonAlertConfig = {
|
|
6
6
|
visible: true,
|
|
7
7
|
dismissible: true,
|
|
@@ -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-yD-czBna.cjs");
|
|
4
4
|
exports.createAccordion = accordion.createAccordion;
|
|
5
5
|
exports.createAccordionItem = accordion.createAccordionItem;
|
|
6
6
|
exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const alert = require("../../alert-
|
|
3
|
+
const alert = require("../../alert-B-jQDQcB.cjs");
|
|
4
4
|
exports.createAlert = alert.createAlert;
|
|
5
5
|
exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
|
|
@@ -1,10 +1,10 @@
|
|
|
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-C2gi9OCP.cjs");
|
|
5
5
|
const EmblaCarousel = require("embla-carousel");
|
|
6
6
|
const tansu = require("@amadeus-it-group/tansu");
|
|
7
|
-
const utils_writables = require("../../writables-
|
|
7
|
+
const utils_writables = require("../../writables-DcGT98a7.cjs");
|
|
8
8
|
const services_navManager = require("../../services/navManager.cjs");
|
|
9
9
|
const utils_widget = require("../../utils/widget.cjs");
|
|
10
10
|
const defaultConfig = {
|
|
@@ -94,7 +94,7 @@ function createEmblaCarousel(options$, plugins$) {
|
|
|
94
94
|
emblaApi.reInit(options2, plugins2);
|
|
95
95
|
},
|
|
96
96
|
destroy: () => {
|
|
97
|
-
emblaApi
|
|
97
|
+
emblaApi?.destroy();
|
|
98
98
|
emblaApi = void 0;
|
|
99
99
|
initialized$.set(false);
|
|
100
100
|
scrolling$.set(false);
|
|
@@ -176,21 +176,15 @@ const createCarousel = utils_widget.createWidgetFactory("carousel", (config) =>
|
|
|
176
176
|
patch,
|
|
177
177
|
api: {
|
|
178
178
|
scrollPrev: (jump) => {
|
|
179
|
-
|
|
180
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollPrev) == null ? void 0 : _b.call(_a, jump);
|
|
179
|
+
emblaCarousel.api?.scrollPrev?.(jump);
|
|
181
180
|
},
|
|
182
181
|
scrollNext: (jump) => {
|
|
183
|
-
|
|
184
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollNext) == null ? void 0 : _b.call(_a, jump);
|
|
182
|
+
emblaCarousel.api?.scrollNext?.(jump);
|
|
185
183
|
},
|
|
186
184
|
scrollTo: (index, jump) => {
|
|
187
|
-
|
|
188
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, index, jump);
|
|
189
|
-
},
|
|
190
|
-
plugins: () => {
|
|
191
|
-
var _a, _b;
|
|
192
|
-
return (_b = (_a = emblaCarousel.api) == null ? void 0 : _a.plugins) == null ? void 0 : _b.call(_a);
|
|
185
|
+
emblaCarousel.api?.scrollTo?.(index, jump);
|
|
193
186
|
},
|
|
187
|
+
plugins: () => emblaCarousel.api?.plugins?.(),
|
|
194
188
|
emblaApi: () => emblaCarousel.api
|
|
195
189
|
},
|
|
196
190
|
directives: {
|
|
@@ -213,10 +207,7 @@ const createCarousel = utils_widget.createWidgetFactory("carousel", (config) =>
|
|
|
213
207
|
disabled: tansu.computed(() => !emblaCarousel.stores.canScrollPrev$() || void 0)
|
|
214
208
|
},
|
|
215
209
|
events: {
|
|
216
|
-
click: () =>
|
|
217
|
-
var _a;
|
|
218
|
-
return (_a = emblaCarousel.api) == null ? void 0 : _a.scrollPrev();
|
|
219
|
-
},
|
|
210
|
+
click: () => emblaCarousel.api?.scrollPrev(),
|
|
220
211
|
pointerdown: (event) => event.preventDefault(),
|
|
221
212
|
touchstart: (event) => event.stopPropagation()
|
|
222
213
|
}
|
|
@@ -227,10 +218,7 @@ const createCarousel = utils_widget.createWidgetFactory("carousel", (config) =>
|
|
|
227
218
|
disabled: tansu.computed(() => !emblaCarousel.stores.canScrollNext$() || void 0)
|
|
228
219
|
},
|
|
229
220
|
events: {
|
|
230
|
-
click: () =>
|
|
231
|
-
var _a;
|
|
232
|
-
return (_a = emblaCarousel.api) == null ? void 0 : _a.scrollNext();
|
|
233
|
-
},
|
|
221
|
+
click: () => emblaCarousel.api?.scrollNext(),
|
|
234
222
|
pointerdown: (event) => event.preventDefault(),
|
|
235
223
|
touchstart: (event) => event.stopPropagation()
|
|
236
224
|
}
|
|
@@ -254,8 +242,7 @@ const createCarousel = utils_widget.createWidgetFactory("carousel", (config) =>
|
|
|
254
242
|
tabIndicator: utils_directive.createAttributesDirective((slide$) => ({
|
|
255
243
|
events: {
|
|
256
244
|
click: () => {
|
|
257
|
-
|
|
258
|
-
(_a = emblaCarousel.api) == null ? void 0 : _a.scrollTo(slide$().index, slide$().jump ?? true);
|
|
245
|
+
emblaCarousel.api?.scrollTo(slide$().index, slide$().jump ?? true);
|
|
259
246
|
}
|
|
260
247
|
},
|
|
261
248
|
attributes: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { writablesForProps, stateStores, true$ } from "../../utils/stores.js";
|
|
2
|
-
import { a as bindDirective, b as browserDirective,
|
|
2
|
+
import { a as bindDirective, b as browserDirective, p as createAttributesDirective, n as mergeDirectives } from "../../dom-Bcg9ORcA.js";
|
|
3
3
|
import EmblaCarousel from "embla-carousel";
|
|
4
4
|
import { writable, computed, asReadable, readable } from "@amadeus-it-group/tansu";
|
|
5
|
-
import { g as typeFunction, e as typeString, c as typeBoolean, a as typeNumber, j as createTypeEnum, f as typeStringOrNull, i as typeArray } from "../../writables-
|
|
5
|
+
import { g as typeFunction, e as typeString, c as typeBoolean, a as typeNumber, j as createTypeEnum, f as typeStringOrNull, i as typeArray } from "../../writables-e0tyaQpe.js";
|
|
6
6
|
import { createNavManager } from "../../services/navManager.js";
|
|
7
7
|
import { createWidgetFactory } from "../../utils/widget.js";
|
|
8
8
|
const defaultConfig = {
|
|
@@ -92,7 +92,7 @@ function createEmblaCarousel(options$, plugins$) {
|
|
|
92
92
|
emblaApi.reInit(options2, plugins2);
|
|
93
93
|
},
|
|
94
94
|
destroy: () => {
|
|
95
|
-
emblaApi
|
|
95
|
+
emblaApi?.destroy();
|
|
96
96
|
emblaApi = void 0;
|
|
97
97
|
initialized$.set(false);
|
|
98
98
|
scrolling$.set(false);
|
|
@@ -174,21 +174,15 @@ const createCarousel = createWidgetFactory("carousel", (config) => {
|
|
|
174
174
|
patch,
|
|
175
175
|
api: {
|
|
176
176
|
scrollPrev: (jump) => {
|
|
177
|
-
|
|
178
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollPrev) == null ? void 0 : _b.call(_a, jump);
|
|
177
|
+
emblaCarousel.api?.scrollPrev?.(jump);
|
|
179
178
|
},
|
|
180
179
|
scrollNext: (jump) => {
|
|
181
|
-
|
|
182
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollNext) == null ? void 0 : _b.call(_a, jump);
|
|
180
|
+
emblaCarousel.api?.scrollNext?.(jump);
|
|
183
181
|
},
|
|
184
182
|
scrollTo: (index, jump) => {
|
|
185
|
-
|
|
186
|
-
(_b = (_a = emblaCarousel.api) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, index, jump);
|
|
187
|
-
},
|
|
188
|
-
plugins: () => {
|
|
189
|
-
var _a, _b;
|
|
190
|
-
return (_b = (_a = emblaCarousel.api) == null ? void 0 : _a.plugins) == null ? void 0 : _b.call(_a);
|
|
183
|
+
emblaCarousel.api?.scrollTo?.(index, jump);
|
|
191
184
|
},
|
|
185
|
+
plugins: () => emblaCarousel.api?.plugins?.(),
|
|
192
186
|
emblaApi: () => emblaCarousel.api
|
|
193
187
|
},
|
|
194
188
|
directives: {
|
|
@@ -211,10 +205,7 @@ const createCarousel = createWidgetFactory("carousel", (config) => {
|
|
|
211
205
|
disabled: computed(() => !emblaCarousel.stores.canScrollPrev$() || void 0)
|
|
212
206
|
},
|
|
213
207
|
events: {
|
|
214
|
-
click: () =>
|
|
215
|
-
var _a;
|
|
216
|
-
return (_a = emblaCarousel.api) == null ? void 0 : _a.scrollPrev();
|
|
217
|
-
},
|
|
208
|
+
click: () => emblaCarousel.api?.scrollPrev(),
|
|
218
209
|
pointerdown: (event) => event.preventDefault(),
|
|
219
210
|
touchstart: (event) => event.stopPropagation()
|
|
220
211
|
}
|
|
@@ -225,10 +216,7 @@ const createCarousel = createWidgetFactory("carousel", (config) => {
|
|
|
225
216
|
disabled: computed(() => !emblaCarousel.stores.canScrollNext$() || void 0)
|
|
226
217
|
},
|
|
227
218
|
events: {
|
|
228
|
-
click: () =>
|
|
229
|
-
var _a;
|
|
230
|
-
return (_a = emblaCarousel.api) == null ? void 0 : _a.scrollNext();
|
|
231
|
-
},
|
|
219
|
+
click: () => emblaCarousel.api?.scrollNext(),
|
|
232
220
|
pointerdown: (event) => event.preventDefault(),
|
|
233
221
|
touchstart: (event) => event.stopPropagation()
|
|
234
222
|
}
|
|
@@ -252,8 +240,7 @@ const createCarousel = createWidgetFactory("carousel", (config) => {
|
|
|
252
240
|
tabIndicator: createAttributesDirective((slide$) => ({
|
|
253
241
|
events: {
|
|
254
242
|
click: () => {
|
|
255
|
-
|
|
256
|
-
(_a = emblaCarousel.api) == null ? void 0 : _a.scrollTo(slide$().index, slide$().jump ?? true);
|
|
243
|
+
emblaCarousel.api?.scrollTo(slide$().index, slide$().jump ?? true);
|
|
257
244
|
}
|
|
258
245
|
},
|
|
259
246
|
attributes: {
|
|
@@ -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-gLiT080Y.cjs");
|
|
4
4
|
exports.createCollapse = collapse.createCollapse;
|
|
5
5
|
exports.getCollapseDefaultConfig = collapse.getCollapseDefaultConfig;
|
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
* Which element should contain the drawer and backdrop DOM elements.
|
|
12
|
+
* If it is not null, the drawer and backdrop DOM elements are moved to the specified container.
|
|
13
|
+
* Otherwise, they stay where the widget is located.
|
|
14
|
+
*
|
|
15
|
+
* @defaultValue
|
|
16
|
+
* ```ts
|
|
17
|
+
* typeof window !== 'undefined' ? document.body : null
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
container: HTMLElement | null;
|
|
21
|
+
/**
|
|
22
|
+
* Classes to add on the backdrop DOM element.
|
|
23
|
+
*
|
|
24
|
+
* @defaultValue `''`
|
|
25
|
+
*/
|
|
26
|
+
backdropClass: string;
|
|
27
|
+
/**
|
|
28
|
+
* If `true`, the drawer is shown; otherwise, it is hidden.
|
|
29
|
+
*
|
|
30
|
+
* @defaultValue `false`
|
|
31
|
+
*/
|
|
32
|
+
visible: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* If `true`, the drawer can be resized by the user.
|
|
35
|
+
*
|
|
36
|
+
* @defaultValue `false`
|
|
37
|
+
*/
|
|
38
|
+
resizable: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Interface representing the properties for the Drawer component.
|
|
42
|
+
*/
|
|
43
|
+
export interface DrawerProps extends DrawerCommonPropsAndState {
|
|
44
|
+
/**
|
|
45
|
+
* The transition function will be executed when the drawer is displayed or hidden.
|
|
46
|
+
*
|
|
47
|
+
* @defaultValue
|
|
48
|
+
* ```ts
|
|
49
|
+
* () => {}
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
transition: TransitionFn;
|
|
53
|
+
/**
|
|
54
|
+
* The transition function for vertically positioned drawer (top, bottom) that will be executed when the drawer is displayed or hidden.
|
|
55
|
+
*
|
|
56
|
+
* @defaultValue
|
|
57
|
+
* ```ts
|
|
58
|
+
* () => {}
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
verticalTransition: TransitionFn;
|
|
62
|
+
/**
|
|
63
|
+
* The transition to use for the backdrop behind the drawer (if present).
|
|
64
|
+
*
|
|
65
|
+
* @defaultValue
|
|
66
|
+
* ```ts
|
|
67
|
+
* () => {}
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
backdropTransition: TransitionFn;
|
|
71
|
+
/**
|
|
72
|
+
* If `true` opening and closing will be animated.
|
|
73
|
+
*/
|
|
74
|
+
animated: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* aria-labelledby attribute to use for the drawer element.
|
|
77
|
+
*/
|
|
78
|
+
ariaLabelledBy: string;
|
|
79
|
+
/**
|
|
80
|
+
* aria-describedby attribute to use for the drawer element.
|
|
81
|
+
*/
|
|
82
|
+
ariaDescribedBy: string;
|
|
83
|
+
/**
|
|
84
|
+
* The width of the drawer in pixels.
|
|
85
|
+
*/
|
|
86
|
+
width: number;
|
|
87
|
+
/**
|
|
88
|
+
* The height of the drawer in pixels.
|
|
89
|
+
*/
|
|
90
|
+
height: number;
|
|
91
|
+
/**
|
|
92
|
+
* If `true` displays the backdrop element and disables the body scrolling, otherwise the body of the document is navigable
|
|
93
|
+
*/
|
|
94
|
+
backdrop: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* If `true` allows body scrolling when the drawer is open.
|
|
97
|
+
*/
|
|
98
|
+
bodyScroll: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Event to be triggered when the transition is completed and the drawer is not visible.
|
|
101
|
+
*
|
|
102
|
+
* @defaultValue
|
|
103
|
+
* ```ts
|
|
104
|
+
* () => {}
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
onHidden: () => void;
|
|
108
|
+
/**
|
|
109
|
+
* Event to be triggered when the transition is completed and the drawer is visible.
|
|
110
|
+
*
|
|
111
|
+
* @defaultValue
|
|
112
|
+
* ```ts
|
|
113
|
+
* () => {}
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
onShown: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* An event emitted when the width is changed.
|
|
119
|
+
*
|
|
120
|
+
* Event payload is equal to the newly selected width.
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue
|
|
123
|
+
* ```ts
|
|
124
|
+
* () => {}
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
onWidthChange: (width: number) => void;
|
|
128
|
+
/**
|
|
129
|
+
* An event emitted when the height is changed.
|
|
130
|
+
*
|
|
131
|
+
* Event payload is equal to the newly selected height.
|
|
132
|
+
*
|
|
133
|
+
* @defaultValue
|
|
134
|
+
* ```ts
|
|
135
|
+
* () => {}
|
|
136
|
+
* ```
|
|
137
|
+
*/
|
|
138
|
+
onHeightChange: (width: number) => void;
|
|
139
|
+
/**
|
|
140
|
+
* Event to be triggered when the visible property changes.
|
|
141
|
+
*
|
|
142
|
+
* @param visible - new value of the visible propery
|
|
143
|
+
*
|
|
144
|
+
* @defaultValue
|
|
145
|
+
* ```ts
|
|
146
|
+
* () => {}
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
onVisibleChange: (visible: boolean) => void;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Represents the state of a Drawer component.
|
|
153
|
+
*/
|
|
154
|
+
export interface DrawerState extends DrawerCommonPropsAndState {
|
|
155
|
+
/**
|
|
156
|
+
* Whether the backdrop is fully hidden. This can be true either because {@link DrawerProps.backdrop|backdrop} is false or
|
|
157
|
+
* because {@link DrawerProps.visible|visible} is false and there is no current transition.
|
|
158
|
+
*/
|
|
159
|
+
backdropHidden: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Flag to show whether the drawer is fully hidden.
|
|
162
|
+
*/
|
|
163
|
+
hidden: boolean;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Interface representing the API for a Drawer component.
|
|
167
|
+
*/
|
|
168
|
+
export interface DrawerApi {
|
|
169
|
+
/**
|
|
170
|
+
* Trigger the opening of the drawer.
|
|
171
|
+
*/
|
|
172
|
+
open: () => void;
|
|
173
|
+
/**
|
|
174
|
+
* Trigger the closing of the drawer.
|
|
175
|
+
*/
|
|
176
|
+
close: () => void;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Interface representing various directives used in the Drawer component.
|
|
180
|
+
*/
|
|
181
|
+
export interface DrawerDirectives {
|
|
182
|
+
/**
|
|
183
|
+
* Directive to put on the drawer DOM element.
|
|
184
|
+
*/
|
|
185
|
+
drawerDirective: Directive;
|
|
186
|
+
/**
|
|
187
|
+
* Portal directive to put on the drawer DOM element.
|
|
188
|
+
*/
|
|
189
|
+
drawerPortalDirective: Directive;
|
|
190
|
+
/**
|
|
191
|
+
* Directive to put on the backdrop DOM element.
|
|
192
|
+
*/
|
|
193
|
+
backdropDirective: Directive;
|
|
194
|
+
/**
|
|
195
|
+
* Portal directive to put on the backdrop DOM element.
|
|
196
|
+
*/
|
|
197
|
+
backdropPortalDirective: Directive;
|
|
198
|
+
/**
|
|
199
|
+
* Directive to put on the splitter DOM element.
|
|
200
|
+
*/
|
|
201
|
+
splitterDirective: Directive;
|
|
202
|
+
/**
|
|
203
|
+
* Directive to put on the container DOM element in order for the drawer to size correctly.
|
|
204
|
+
*/
|
|
205
|
+
containerDirective: Directive;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Represents a Drawer widget component.
|
|
209
|
+
*/
|
|
210
|
+
export type DrawerWidget = Widget<DrawerProps, DrawerState, DrawerApi, DrawerDirectives>;
|
|
211
|
+
/**
|
|
212
|
+
* Retrieve a shallow copy of the default Drawer config
|
|
213
|
+
* @returns the default Drawer config
|
|
214
|
+
*/
|
|
215
|
+
export declare function getDrawerDefaultConfig(): DrawerProps;
|
|
216
|
+
/**
|
|
217
|
+
* Create a Drawer widget with given config props
|
|
218
|
+
* @param config - an optional Drawer config
|
|
219
|
+
* @returns a DrawerWidget
|
|
220
|
+
*/
|
|
221
|
+
export declare const createDrawer: WidgetFactory<DrawerWidget>;
|
|
222
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './drawer';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const modal = require("../../modal-
|
|
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;
|