@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.
- package/{accordion-cR5JqWJ8.cjs → accordion-B5LiN1uy.cjs} +15 -20
- package/{accordion-CoM4efp-.js → accordion-_zen-g8l.js} +15 -20
- 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/accordion.d.ts +6 -6
- 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/carousel.d.ts +15 -0
- package/components/carousel/index.cjs +10 -23
- package/components/carousel/index.js +10 -23
- package/components/collapse/collapse.d.ts +5 -2
- package/components/collapse/index.cjs +1 -1
- package/components/collapse/index.js +1 -1
- package/components/drawer/drawer.d.ts +242 -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/slider/slider.d.ts +4 -4
- 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/components/tree/tree.d.ts +0 -6
- 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
|
@@ -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;
|
|
@@ -34,7 +34,7 @@ const defaultAccordionConfig = {
|
|
|
34
34
|
itemDestroyOnHide: true,
|
|
35
35
|
itemAnimated: true,
|
|
36
36
|
itemTransition: utils_func.noop,
|
|
37
|
-
|
|
37
|
+
itemHeadingLevel: 2,
|
|
38
38
|
itemClassName: "",
|
|
39
39
|
itemHeaderClassName: "",
|
|
40
40
|
itemButtonClassName: "",
|
|
@@ -56,7 +56,7 @@ const defaultItemConfig = {
|
|
|
56
56
|
buttonClassName: defaultAccordionConfig.itemButtonClassName,
|
|
57
57
|
bodyContainerClassName: defaultAccordionConfig.itemBodyContainerClassName,
|
|
58
58
|
bodyClassName: defaultAccordionConfig.itemBodyClassName,
|
|
59
|
-
|
|
59
|
+
headingLevel: defaultAccordionConfig.itemHeadingLevel
|
|
60
60
|
};
|
|
61
61
|
const coreAccordionItemProps = Object.keys(defaultItemConfig);
|
|
62
62
|
function getAccordionDefaultConfig() {
|
|
@@ -75,7 +75,7 @@ const configAccordionValidator = {
|
|
|
75
75
|
itemButtonClassName: utils_writables.typeString,
|
|
76
76
|
itemBodyContainerClassName: utils_writables.typeString,
|
|
77
77
|
itemBodyClassName: utils_writables.typeString,
|
|
78
|
-
|
|
78
|
+
itemHeadingLevel: utils_writables.createTypeEnum([1, 2, 3, 4, 5, 6])
|
|
79
79
|
};
|
|
80
80
|
const configItemValidator = {
|
|
81
81
|
id: utils_writables.typeString,
|
|
@@ -92,7 +92,7 @@ const configItemValidator = {
|
|
|
92
92
|
buttonClassName: utils_writables.typeString,
|
|
93
93
|
bodyContainerClassName: utils_writables.typeString,
|
|
94
94
|
bodyClassName: utils_writables.typeString,
|
|
95
|
-
|
|
95
|
+
headingLevel: utils_writables.createTypeEnum([1, 2, 3, 4, 5, 6])
|
|
96
96
|
};
|
|
97
97
|
function createAccordionItem(config) {
|
|
98
98
|
const [
|
|
@@ -132,7 +132,7 @@ function createAccordionItem(config) {
|
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
|
-
const shouldBeInDOM$ = tansu.computed(() => destroyOnHide$()
|
|
135
|
+
const shouldBeInDOM$ = tansu.computed(() => !destroyOnHide$() || !transition.stores.hidden$());
|
|
136
136
|
const toggleDirective = utils_directive.createAttributesDirective(() => ({
|
|
137
137
|
attributes: {
|
|
138
138
|
id: tansu.computed(() => `${id$()}-toggle`),
|
|
@@ -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);
|
|
@@ -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 { j as createTypeEnum, 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;
|
|
@@ -33,7 +33,7 @@ const defaultAccordionConfig = {
|
|
|
33
33
|
itemDestroyOnHide: true,
|
|
34
34
|
itemAnimated: true,
|
|
35
35
|
itemTransition: noop,
|
|
36
|
-
|
|
36
|
+
itemHeadingLevel: 2,
|
|
37
37
|
itemClassName: "",
|
|
38
38
|
itemHeaderClassName: "",
|
|
39
39
|
itemButtonClassName: "",
|
|
@@ -55,7 +55,7 @@ const defaultItemConfig = {
|
|
|
55
55
|
buttonClassName: defaultAccordionConfig.itemButtonClassName,
|
|
56
56
|
bodyContainerClassName: defaultAccordionConfig.itemBodyContainerClassName,
|
|
57
57
|
bodyClassName: defaultAccordionConfig.itemBodyClassName,
|
|
58
|
-
|
|
58
|
+
headingLevel: defaultAccordionConfig.itemHeadingLevel
|
|
59
59
|
};
|
|
60
60
|
const coreAccordionItemProps = Object.keys(defaultItemConfig);
|
|
61
61
|
function getAccordionDefaultConfig() {
|
|
@@ -74,7 +74,7 @@ const configAccordionValidator = {
|
|
|
74
74
|
itemButtonClassName: typeString,
|
|
75
75
|
itemBodyContainerClassName: typeString,
|
|
76
76
|
itemBodyClassName: typeString,
|
|
77
|
-
|
|
77
|
+
itemHeadingLevel: createTypeEnum([1, 2, 3, 4, 5, 6])
|
|
78
78
|
};
|
|
79
79
|
const configItemValidator = {
|
|
80
80
|
id: typeString,
|
|
@@ -91,7 +91,7 @@ const configItemValidator = {
|
|
|
91
91
|
buttonClassName: typeString,
|
|
92
92
|
bodyContainerClassName: typeString,
|
|
93
93
|
bodyClassName: typeString,
|
|
94
|
-
|
|
94
|
+
headingLevel: createTypeEnum([1, 2, 3, 4, 5, 6])
|
|
95
95
|
};
|
|
96
96
|
function createAccordionItem(config) {
|
|
97
97
|
const [
|
|
@@ -131,7 +131,7 @@ function createAccordionItem(config) {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
});
|
|
134
|
-
const shouldBeInDOM$ = computed(() => destroyOnHide$()
|
|
134
|
+
const shouldBeInDOM$ = computed(() => !destroyOnHide$() || !transition.stores.hidden$());
|
|
135
135
|
const toggleDirective = createAttributesDirective(() => ({
|
|
136
136
|
attributes: {
|
|
137
137
|
id: computed(() => `${id$()}-toggle`),
|
|
@@ -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);
|
|
@@ -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,
|
|
@@ -86,11 +86,11 @@ export interface AccordionProps extends WidgetsCommonPropsAndState {
|
|
|
86
86
|
*/
|
|
87
87
|
itemBodyClassName: string;
|
|
88
88
|
/**
|
|
89
|
-
* The html
|
|
89
|
+
* The html heading level to use for the accordion-item-header.
|
|
90
90
|
*
|
|
91
|
-
* @defaultValue `
|
|
91
|
+
* @defaultValue `2`
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
itemHeadingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* Represents the state of an Accordion component.
|
|
@@ -244,9 +244,9 @@ interface AccordionItemCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
244
244
|
*/
|
|
245
245
|
bodyClassName: string;
|
|
246
246
|
/**
|
|
247
|
-
* The html
|
|
247
|
+
* The html heading level to use for the accordion-item-header.
|
|
248
248
|
*/
|
|
249
|
-
|
|
249
|
+
headingLevel: 1 | 2 | 3 | 4 | 5 | 6;
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Properties for an AccordionItem component.
|
|
@@ -305,7 +305,7 @@ export declare function getAccordionDefaultConfig(): AccordionProps;
|
|
|
305
305
|
*/
|
|
306
306
|
export declare function createAccordionItem(config?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
|
|
307
307
|
/**
|
|
308
|
-
* Create an accordion WidgetFactory based on
|
|
308
|
+
* Create an accordion WidgetFactory based on an item factory and the list of item props that should inherit from the parent accordion
|
|
309
309
|
*
|
|
310
310
|
* @param itemFactory - the item factory
|
|
311
311
|
* @param accordionItemProps - the list of item props
|
|
@@ -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-B5LiN1uy.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;
|
|
@@ -16,6 +16,8 @@ interface EmblaOptions {
|
|
|
16
16
|
* Enables choosing a custom container element which holds the slides. By default, Embla will choose the first direct child element of the root element. Provide a valid CSS selector string.
|
|
17
17
|
*
|
|
18
18
|
* @see {@link https://www.embla-carousel.com/api/options/#container}
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue `null`
|
|
19
21
|
*/
|
|
20
22
|
container: string | null;
|
|
21
23
|
/**
|
|
@@ -71,10 +73,14 @@ interface EmblaOptions {
|
|
|
71
73
|
interface CarouselCommonPropsState extends Pick<EmblaOptions, 'direction'> {
|
|
72
74
|
/**
|
|
73
75
|
* If `true`, 'previous' and 'next' navigation arrows will be visible.
|
|
76
|
+
*
|
|
77
|
+
* @defaultValue `true`
|
|
74
78
|
*/
|
|
75
79
|
showNavigationArrows: boolean;
|
|
76
80
|
/**
|
|
77
81
|
* If `true`, navigation indicators at the bottom of the slide will be visible.
|
|
82
|
+
*
|
|
83
|
+
* @defaultValue `true`
|
|
78
84
|
*/
|
|
79
85
|
showNavigationIndicators: boolean;
|
|
80
86
|
}
|
|
@@ -89,14 +95,23 @@ export interface CarouselProps extends EmblaOptions, CarouselCommonPropsState {
|
|
|
89
95
|
plugins: EmblaPluginType[];
|
|
90
96
|
/**
|
|
91
97
|
* Aria label for navigation indicators
|
|
98
|
+
*
|
|
99
|
+
* @defaultValue
|
|
100
|
+
* ```ts
|
|
101
|
+
* (index: number) => `Select slide ${index + 1}`
|
|
102
|
+
* ```
|
|
92
103
|
*/
|
|
93
104
|
ariaIndicatorLabel: (index: number) => string;
|
|
94
105
|
/**
|
|
95
106
|
* Aria label for previous button
|
|
107
|
+
*
|
|
108
|
+
* @defaultValue `'Select previous slide'`
|
|
96
109
|
*/
|
|
97
110
|
ariaPrevLabel: string;
|
|
98
111
|
/**
|
|
99
112
|
* Aria label for next button
|
|
113
|
+
*
|
|
114
|
+
* @defaultValue `'Select next slide'`
|
|
100
115
|
*/
|
|
101
116
|
ariaNextLabel: string;
|
|
102
117
|
}
|
|
@@ -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: {
|
|
@@ -7,7 +7,7 @@ interface CollapseCommonPropsAndState {
|
|
|
7
7
|
/**
|
|
8
8
|
* If `true` the collapse is visible to the user
|
|
9
9
|
*
|
|
10
|
-
* @defaultValue `
|
|
10
|
+
* @defaultValue `false`
|
|
11
11
|
*/
|
|
12
12
|
visible: boolean;
|
|
13
13
|
}
|
|
@@ -75,7 +75,10 @@ export interface CollapseProps extends CollapseCommonPropsAndState {
|
|
|
75
75
|
*
|
|
76
76
|
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
77
77
|
*
|
|
78
|
-
* @defaultValue
|
|
78
|
+
* @defaultValue
|
|
79
|
+
* ```ts
|
|
80
|
+
* () => {}
|
|
81
|
+
* ```
|
|
79
82
|
*/
|
|
80
83
|
transition: TransitionFn;
|
|
81
84
|
}
|
|
@@ -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;
|