@agnos-ui/core 0.7.0 → 0.8.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-Lp-LEbZ2.cjs → accordion-DTQj-TQ1.cjs} +16 -18
- package/{accordion-BGv150k9.js → accordion-hVi2XRk-.js} +12 -14
- package/{alert-DJ2l7bcA.js → alert-BSixS_cz.js} +1 -1
- package/{alert-Bq101evB.cjs → alert-BrVkxOnA.cjs} +1 -1
- package/{common-DvPjK7SS.cjs → common-CcQOJ_hf.cjs} +5 -6
- package/{common-Banw3FYN.js → common-CuZAeECD.js} +2 -3
- package/components/accordion/accordion.d.ts +1 -1
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/alert/common.d.ts +1 -1
- package/components/alert/index.cjs +1 -1
- package/components/alert/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- package/components/modal/modal.d.ts +2 -2
- 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 +84 -9
- 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 +3 -3
- package/config.js +1 -1
- package/{directive-CKEccryv.js → dom-BB9jLllr.js} +115 -102
- package/{directive-DdlwGFtf.cjs → dom-CuBx1JPZ.cjs} +116 -103
- package/index.cjs +14 -11
- package/index.js +15 -12
- package/{modal-DDHcrykD.cjs → modal-B7bYoubx.cjs} +12 -14
- package/{modal-DP-4I7vf.js → modal-BQcw6bnM.js} +6 -8
- package/package.json +4 -1
- package/{pagination-CBysiPUs.cjs → pagination-5YARuB3V.cjs} +8 -8
- package/{pagination-DwDRot6q.js → pagination-BwaZEokc.js} +8 -8
- package/{progressbar-DghzCJ6_.cjs → progressbar-BpSrg4HG.cjs} +2 -2
- package/{progressbar-CGmNq0cS.js → progressbar-b_kXzGPc.js} +3 -3
- package/{promise-CY2U8bTP.js → promise-CBh_HbSK.js} +1 -1
- package/{promise-BMJ8qhA8.cjs → promise-CxCD3NYv.cjs} +5 -5
- package/{rating-Da38uaZz.js → rating-B1JLZgIR.js} +8 -8
- package/{rating-DlfOuwuX.cjs → rating-C8tn9xTO.cjs} +9 -9
- package/{select-CAEPqdz1.js → select-Bb2RAVs0.js} +20 -20
- package/{select-LBVhNdrd.cjs → select-D1pBz4CM.cjs} +21 -21
- package/services/floatingUI.cjs +2 -2
- package/services/floatingUI.js +2 -2
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.js +1 -1
- package/services/intersection.cjs +2 -2
- package/services/intersection.js +1 -1
- package/services/matchMedia.cjs +3 -2
- package/services/matchMedia.js +3 -2
- package/services/navManager.cjs +1 -1
- package/services/navManager.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +3 -3
- package/services/resizeObserver.js +2 -2
- package/services/siblingsInert.cjs +4 -4
- package/services/siblingsInert.js +2 -2
- package/services/transitions/baseTransitions.cjs +7 -7
- 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 +4 -4
- package/services/transitions/cssTransitions.js +3 -3
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-1OSwok7u.cjs → slider-B2JFXDLt.cjs} +125 -24
- package/{slider-6LI4-f5s.js → slider-C-BSdQ0b.js} +126 -25
- package/{toast-CpvsibAI.js → toast-Bw2QSzBX.js} +9 -8
- package/{toast-D_uSrRZL.cjs → toast-CaIcB2sD.cjs} +8 -7
- package/{tree-Bb5KFqXp.cjs → tree-D4t2SOql.cjs} +7 -7
- package/{tree-B2Mr8b31.js → tree-DWv0zwFJ.js} +8 -8
- package/utils/directive.cjs +2 -3
- package/utils/directive.d.ts +7 -5
- package/utils/directive.js +2 -3
- package/{func-Qd3cD9a3.cjs → utils/func.cjs} +1 -0
- package/{func-DR0n-ShK.js → utils/func.js} +2 -2
- package/utils/stores.cjs +13 -3
- package/utils/stores.d.ts +9 -0
- package/utils/stores.js +12 -2
- /package/utils/{internal/func.d.ts → func.d.ts} +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
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
|
-
const
|
|
5
|
+
const utils_func = require("./utils/func.cjs");
|
|
6
6
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
7
|
-
const utils_directive = require("./
|
|
7
|
+
const utils_directive = require("./dom-CuBx1JPZ.cjs");
|
|
8
8
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
9
9
|
let keepOpen;
|
|
10
10
|
if (openItems.length == 2) {
|
|
@@ -27,13 +27,12 @@ function getItem(items, id) {
|
|
|
27
27
|
}
|
|
28
28
|
const defaultAccordionConfig = {
|
|
29
29
|
closeOthers: false,
|
|
30
|
-
onItemShown:
|
|
31
|
-
onItemHidden:
|
|
30
|
+
onItemShown: utils_func.noop,
|
|
31
|
+
onItemHidden: utils_func.noop,
|
|
32
32
|
className: "",
|
|
33
33
|
itemDestroyOnHide: true,
|
|
34
34
|
itemAnimated: true,
|
|
35
|
-
itemTransition:
|
|
36
|
-
},
|
|
35
|
+
itemTransition: utils_func.noop,
|
|
37
36
|
itemHeadingTag: "",
|
|
38
37
|
itemClassName: "",
|
|
39
38
|
itemHeaderClassName: "",
|
|
@@ -48,9 +47,9 @@ const defaultItemConfig = {
|
|
|
48
47
|
visible: false,
|
|
49
48
|
animated: defaultAccordionConfig.itemAnimated,
|
|
50
49
|
transition: defaultAccordionConfig.itemTransition,
|
|
51
|
-
onShown:
|
|
52
|
-
onHidden:
|
|
53
|
-
onVisibleChange:
|
|
50
|
+
onShown: utils_func.noop,
|
|
51
|
+
onHidden: utils_func.noop,
|
|
52
|
+
onVisibleChange: utils_func.noop,
|
|
54
53
|
className: defaultAccordionConfig.itemClassName,
|
|
55
54
|
headerClassName: defaultAccordionConfig.itemHeaderClassName,
|
|
56
55
|
buttonClassName: defaultAccordionConfig.itemButtonClassName,
|
|
@@ -115,8 +114,7 @@ function createAccordionItem(config) {
|
|
|
115
114
|
patch
|
|
116
115
|
] = utils_stores.writablesForProps(defaultItemConfig, config, configItemValidator);
|
|
117
116
|
const initDone$ = tansu.writable(false);
|
|
118
|
-
const
|
|
119
|
-
const id$ = tansu.computed(() => _dirtyId$() || _autoId$());
|
|
117
|
+
const id$ = utils_stores.idWithDefault(_dirtyId$);
|
|
120
118
|
const transition = services_transitions_baseTransitions.createTransition({
|
|
121
119
|
props: {
|
|
122
120
|
transition: transition$,
|
|
@@ -155,7 +153,7 @@ function createAccordionItem(config) {
|
|
|
155
153
|
const bodyContainerAttrsDirective = utils_directive.createAttributesDirective(() => ({
|
|
156
154
|
attributes: {
|
|
157
155
|
id: tansu.computed(() => `${id$()}-body-container`),
|
|
158
|
-
class: bodyContainerClassName
|
|
156
|
+
class: bodyContainerClassName$,
|
|
159
157
|
"aria-labelledby": tansu.computed(() => `${id$()}-toggle`)
|
|
160
158
|
}
|
|
161
159
|
}));
|
|
@@ -192,17 +190,17 @@ function createAccordionItem(config) {
|
|
|
192
190
|
toggleDirective,
|
|
193
191
|
utils_directive.createAttributesDirective(() => ({
|
|
194
192
|
attributes: {
|
|
195
|
-
type: "button",
|
|
196
|
-
class: buttonClassName$
|
|
193
|
+
type: tansu.readable("button"),
|
|
194
|
+
class: buttonClassName$
|
|
197
195
|
}
|
|
198
196
|
}))
|
|
199
197
|
),
|
|
200
|
-
headerDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: headerClassName$
|
|
201
|
-
bodyDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: bodyClassName$
|
|
198
|
+
headerDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: headerClassName$ } })),
|
|
199
|
+
bodyDirective: utils_directive.createAttributesDirective(() => ({ attributes: { class: bodyClassName$ } })),
|
|
202
200
|
transitionDirective,
|
|
203
201
|
bodyContainerAttrsDirective,
|
|
204
202
|
bodyContainerDirective: utils_directive.mergeDirectives(transitionDirective, bodyContainerAttrsDirective),
|
|
205
|
-
itemDirective:
|
|
203
|
+
itemDirective: utils_func.noop
|
|
206
204
|
}
|
|
207
205
|
};
|
|
208
206
|
}
|
|
@@ -305,7 +303,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
305
303
|
directives: {
|
|
306
304
|
accordionDirective: utils_directive.mergeDirectives(
|
|
307
305
|
utils_directive.directiveSubscribe(action$),
|
|
308
|
-
utils_directive.createAttributesDirective(() => ({ attributes: { class: className$
|
|
306
|
+
utils_directive.createAttributesDirective(() => ({ attributes: { class: className$ }, classNames: { "au-accordion": utils_stores.true$ } }))
|
|
309
307
|
)
|
|
310
308
|
}
|
|
311
309
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { writablesForProps, stateStores, mergeConfigStores, normalizeConfigStores } from "./utils/stores.js";
|
|
1
|
+
import { writablesForProps, idWithDefault, stateStores, mergeConfigStores, normalizeConfigStores, true$ } from "./utils/stores.js";
|
|
2
2
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
3
|
-
import { writable, computed,
|
|
4
|
-
import {
|
|
3
|
+
import { writable, computed, readable, asWritable } from "@amadeus-it-group/tansu";
|
|
4
|
+
import { noop } from "./utils/func.js";
|
|
5
5
|
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
6
|
-
import {
|
|
6
|
+
import { k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-BB9jLllr.js";
|
|
7
7
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
8
8
|
let keepOpen;
|
|
9
9
|
if (openItems.length == 2) {
|
|
@@ -31,8 +31,7 @@ const defaultAccordionConfig = {
|
|
|
31
31
|
className: "",
|
|
32
32
|
itemDestroyOnHide: true,
|
|
33
33
|
itemAnimated: true,
|
|
34
|
-
itemTransition:
|
|
35
|
-
},
|
|
34
|
+
itemTransition: noop,
|
|
36
35
|
itemHeadingTag: "",
|
|
37
36
|
itemClassName: "",
|
|
38
37
|
itemHeaderClassName: "",
|
|
@@ -114,8 +113,7 @@ function createAccordionItem(config) {
|
|
|
114
113
|
patch
|
|
115
114
|
] = writablesForProps(defaultItemConfig, config, configItemValidator);
|
|
116
115
|
const initDone$ = writable(false);
|
|
117
|
-
const
|
|
118
|
-
const id$ = computed(() => _dirtyId$() || _autoId$());
|
|
116
|
+
const id$ = idWithDefault(_dirtyId$);
|
|
119
117
|
const transition = createTransition({
|
|
120
118
|
props: {
|
|
121
119
|
transition: transition$,
|
|
@@ -154,7 +152,7 @@ function createAccordionItem(config) {
|
|
|
154
152
|
const bodyContainerAttrsDirective = createAttributesDirective(() => ({
|
|
155
153
|
attributes: {
|
|
156
154
|
id: computed(() => `${id$()}-body-container`),
|
|
157
|
-
class: bodyContainerClassName
|
|
155
|
+
class: bodyContainerClassName$,
|
|
158
156
|
"aria-labelledby": computed(() => `${id$()}-toggle`)
|
|
159
157
|
}
|
|
160
158
|
}));
|
|
@@ -191,13 +189,13 @@ function createAccordionItem(config) {
|
|
|
191
189
|
toggleDirective,
|
|
192
190
|
createAttributesDirective(() => ({
|
|
193
191
|
attributes: {
|
|
194
|
-
type: "button",
|
|
195
|
-
class: buttonClassName$
|
|
192
|
+
type: readable("button"),
|
|
193
|
+
class: buttonClassName$
|
|
196
194
|
}
|
|
197
195
|
}))
|
|
198
196
|
),
|
|
199
|
-
headerDirective: createAttributesDirective(() => ({ attributes: { class: headerClassName$
|
|
200
|
-
bodyDirective: createAttributesDirective(() => ({ attributes: { class: bodyClassName$
|
|
197
|
+
headerDirective: createAttributesDirective(() => ({ attributes: { class: headerClassName$ } })),
|
|
198
|
+
bodyDirective: createAttributesDirective(() => ({ attributes: { class: bodyClassName$ } })),
|
|
201
199
|
transitionDirective,
|
|
202
200
|
bodyContainerAttrsDirective,
|
|
203
201
|
bodyContainerDirective: mergeDirectives(transitionDirective, bodyContainerAttrsDirective),
|
|
@@ -304,7 +302,7 @@ function factoryCreateAccordion(itemFactory = createAccordionItem, accordionItem
|
|
|
304
302
|
directives: {
|
|
305
303
|
accordionDirective: mergeDirectives(
|
|
306
304
|
directiveSubscribe(action$),
|
|
307
|
-
createAttributesDirective(() => ({ attributes: { class: className$
|
|
305
|
+
createAttributesDirective(() => ({ attributes: { class: className$ }, classNames: { "au-accordion": true$ } }))
|
|
308
306
|
)
|
|
309
307
|
}
|
|
310
308
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-
|
|
1
|
+
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-CuZAeECD.js";
|
|
2
2
|
function getAlertDefaultConfig() {
|
|
3
3
|
return { ...getCommonAlertDefaultConfig() };
|
|
4
4
|
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
3
|
-
const
|
|
3
|
+
const utils_func = require("./utils/func.cjs");
|
|
4
4
|
const utils_stores = require("./utils/stores.cjs");
|
|
5
5
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
6
6
|
const defaultCommonAlertConfig = {
|
|
7
7
|
visible: true,
|
|
8
8
|
dismissible: true,
|
|
9
9
|
ariaCloseButtonLabel: "Close",
|
|
10
|
-
onVisibleChange:
|
|
11
|
-
onShown:
|
|
12
|
-
onHidden:
|
|
10
|
+
onVisibleChange: utils_func.noop,
|
|
11
|
+
onShown: utils_func.noop,
|
|
12
|
+
onHidden: utils_func.noop,
|
|
13
13
|
animated: true,
|
|
14
14
|
animatedOnInit: false,
|
|
15
|
-
transition:
|
|
16
|
-
},
|
|
15
|
+
transition: utils_func.noop,
|
|
17
16
|
className: ""
|
|
18
17
|
};
|
|
19
18
|
function getCommonAlertDefaultConfig() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
2
|
-
import {
|
|
2
|
+
import { noop } from "./utils/func.js";
|
|
3
3
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
4
4
|
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
5
5
|
const defaultCommonAlertConfig = {
|
|
@@ -11,8 +11,7 @@ const defaultCommonAlertConfig = {
|
|
|
11
11
|
onHidden: noop,
|
|
12
12
|
animated: true,
|
|
13
13
|
animatedOnInit: false,
|
|
14
|
-
transition:
|
|
15
|
-
},
|
|
14
|
+
transition: noop,
|
|
16
15
|
className: ""
|
|
17
16
|
};
|
|
18
17
|
function getCommonAlertDefaultConfig() {
|
|
@@ -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-DTQj-TQ1.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-BrVkxOnA.cjs");
|
|
4
4
|
exports.createAlert = alert.createAlert;
|
|
5
5
|
exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
|
|
@@ -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-B7bYoubx.cjs");
|
|
4
4
|
exports.createModal = modal.createModal;
|
|
5
5
|
exports.getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
6
6
|
exports.modalCloseButtonClick = modal.modalCloseButtonClick;
|
|
@@ -88,7 +88,7 @@ export interface ModalProps extends ModalCommonPropsAndState {
|
|
|
88
88
|
*
|
|
89
89
|
* @defaultValue
|
|
90
90
|
* ```ts
|
|
91
|
-
*
|
|
91
|
+
* () => {}
|
|
92
92
|
* ```
|
|
93
93
|
*/
|
|
94
94
|
backdropTransition: TransitionFn;
|
|
@@ -103,7 +103,7 @@ export interface ModalProps extends ModalCommonPropsAndState {
|
|
|
103
103
|
*
|
|
104
104
|
* @defaultValue
|
|
105
105
|
* ```ts
|
|
106
|
-
*
|
|
106
|
+
* () => {}
|
|
107
107
|
* ```
|
|
108
108
|
*/
|
|
109
109
|
modalTransition: TransitionFn;
|
|
@@ -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-5YARuB3V.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-BpSrg4HG.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-C8tn9xTO.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 select = require("../../select-
|
|
3
|
+
const select = require("../../select-D1pBz4CM.cjs");
|
|
4
4
|
exports.createSelect = select.createSelect;
|
|
5
5
|
exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
|
|
@@ -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-B2JFXDLt.cjs");
|
|
4
4
|
exports.createSlider = slider.createSlider;
|
|
5
5
|
exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
|
|
@@ -61,11 +61,44 @@ export interface SliderHandle {
|
|
|
61
61
|
/**
|
|
62
62
|
* ariaLabel of the handle
|
|
63
63
|
*/
|
|
64
|
-
ariaLabel: string;
|
|
64
|
+
ariaLabel: string | undefined;
|
|
65
65
|
/**
|
|
66
66
|
* ariaValueText of the handle
|
|
67
67
|
*/
|
|
68
|
-
ariaValueText: string;
|
|
68
|
+
ariaValueText: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* aria-labelledBy of the handle
|
|
71
|
+
*/
|
|
72
|
+
ariaLabelledBy: string | undefined;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Represents a tick in a slider component.
|
|
76
|
+
*/
|
|
77
|
+
export interface SliderTick {
|
|
78
|
+
/**
|
|
79
|
+
* CSS classes to be applied on the tick
|
|
80
|
+
*/
|
|
81
|
+
className?: string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Visualized optional explanation of the label
|
|
84
|
+
*/
|
|
85
|
+
legend?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Position of the tick in percent
|
|
88
|
+
*/
|
|
89
|
+
position: number;
|
|
90
|
+
/**
|
|
91
|
+
* If `true` the tick has selected style
|
|
92
|
+
*/
|
|
93
|
+
selected: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Value of the tick
|
|
96
|
+
*/
|
|
97
|
+
value: number;
|
|
98
|
+
/**
|
|
99
|
+
* If `true` the tick label is displayed
|
|
100
|
+
*/
|
|
101
|
+
displayLabel: boolean;
|
|
69
102
|
}
|
|
70
103
|
interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
71
104
|
/**
|
|
@@ -122,6 +155,12 @@ interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
122
155
|
* @defaultValue `true`
|
|
123
156
|
*/
|
|
124
157
|
showMinMaxLabels: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* If `true` the ticks are displayed on the slider
|
|
160
|
+
*
|
|
161
|
+
* @defaultValue `false`
|
|
162
|
+
*/
|
|
163
|
+
showTicks: boolean;
|
|
125
164
|
/**
|
|
126
165
|
* It `true` slider display is inversed
|
|
127
166
|
*
|
|
@@ -173,6 +212,10 @@ export interface SliderState extends SliderCommonPropsAndState {
|
|
|
173
212
|
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
174
213
|
*/
|
|
175
214
|
interactive: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Array of ticks to display on the slider component
|
|
217
|
+
*/
|
|
218
|
+
ticks: SliderTick[];
|
|
176
219
|
}
|
|
177
220
|
/**
|
|
178
221
|
* Interface representing the properties for the Slider component.
|
|
@@ -180,28 +223,35 @@ export interface SliderState extends SliderCommonPropsAndState {
|
|
|
180
223
|
export interface SliderProps extends SliderCommonPropsAndState {
|
|
181
224
|
/**
|
|
182
225
|
* Return the value for the 'aria-label' attribute for the handle
|
|
183
|
-
* @param value - value of the handle
|
|
184
226
|
* @param sortedIndex - index of the handle in the sorted list
|
|
185
|
-
* @param index - index of the handle in the original list
|
|
186
227
|
*
|
|
187
228
|
* @defaultValue
|
|
188
229
|
* ```ts
|
|
189
|
-
* (
|
|
230
|
+
* () => 'Value'
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
ariaLabel: (sortedIndex: number) => string;
|
|
234
|
+
/**
|
|
235
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
236
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
237
|
+
*
|
|
238
|
+
* @defaultValue
|
|
239
|
+
* ```ts
|
|
240
|
+
* () => ''
|
|
190
241
|
* ```
|
|
191
242
|
*/
|
|
192
|
-
|
|
243
|
+
ariaLabelledBy: (sortedIndex: number) => string;
|
|
193
244
|
/**
|
|
194
245
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
195
246
|
* @param value - value of the handle
|
|
196
247
|
* @param sortedIndex - index of the handle in the sorted list
|
|
197
|
-
* @param index - index of the handle in the original list
|
|
198
248
|
*
|
|
199
249
|
* @defaultValue
|
|
200
250
|
* ```ts
|
|
201
|
-
* (value: number) => ''
|
|
251
|
+
* (value: number) => ''
|
|
202
252
|
* ```
|
|
203
253
|
*/
|
|
204
|
-
ariaValueText: (value: number, sortedIndex: number
|
|
254
|
+
ariaValueText: (value: number, sortedIndex: number) => string;
|
|
205
255
|
/**
|
|
206
256
|
* An event emitted when slider values are changed
|
|
207
257
|
*
|
|
@@ -213,6 +263,19 @@ export interface SliderProps extends SliderCommonPropsAndState {
|
|
|
213
263
|
* ```
|
|
214
264
|
*/
|
|
215
265
|
onValuesChange: (values: number[]) => void;
|
|
266
|
+
/**
|
|
267
|
+
* Unit value between the ticks
|
|
268
|
+
* If value is set to `0` the {@link stepSize} is used to space the ticks
|
|
269
|
+
*
|
|
270
|
+
* @defaultValue `0`
|
|
271
|
+
*/
|
|
272
|
+
tickInterval: number;
|
|
273
|
+
/**
|
|
274
|
+
* If `true` the tick values are displayed on the slider
|
|
275
|
+
*
|
|
276
|
+
* @defaultValue `true`
|
|
277
|
+
*/
|
|
278
|
+
showTickValues: boolean;
|
|
216
279
|
}
|
|
217
280
|
/**
|
|
218
281
|
* Interface representing various directives used in the slider component.
|
|
@@ -264,6 +327,18 @@ export interface SliderDirectives {
|
|
|
264
327
|
handleLabelDisplayDirective: Directive<{
|
|
265
328
|
index: number;
|
|
266
329
|
}>;
|
|
330
|
+
/**
|
|
331
|
+
* Directive to apply to the slider tick
|
|
332
|
+
*/
|
|
333
|
+
tickDirective: Directive<{
|
|
334
|
+
tick: SliderTick;
|
|
335
|
+
}>;
|
|
336
|
+
/**
|
|
337
|
+
* Directive to apply to the slider tick label
|
|
338
|
+
*/
|
|
339
|
+
tickLabelDirective: Directive<{
|
|
340
|
+
tick: SliderTick;
|
|
341
|
+
}>;
|
|
267
342
|
}
|
|
268
343
|
/**
|
|
269
344
|
* Represents a slider widget component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const toast = require("../../toast-
|
|
3
|
+
const toast = require("../../toast-CaIcB2sD.cjs");
|
|
4
4
|
exports.createToast = toast.createToast;
|
|
5
5
|
exports.getToastDefaultConfig = toast.getToastDefaultConfig;
|
|
@@ -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-D4t2SOql.cjs");
|
|
4
4
|
exports.createTree = tree.createTree;
|
|
5
5
|
exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
|
package/components/tree/index.js
CHANGED
package/config.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
|
-
const
|
|
4
|
+
const utils_func = require("./utils/func.cjs");
|
|
5
5
|
const mergeInto = (destination, source, levels = Infinity) => {
|
|
6
6
|
if (source !== void 0) {
|
|
7
7
|
if (typeof source === "object" && source && levels >= 1) {
|
|
@@ -19,9 +19,9 @@ const mergeInto = (destination, source, levels = Infinity) => {
|
|
|
19
19
|
}
|
|
20
20
|
return destination;
|
|
21
21
|
};
|
|
22
|
-
const createWidgetsConfig = (parent$, adaptParentConfig =
|
|
22
|
+
const createWidgetsConfig = (parent$, adaptParentConfig = utils_func.identity) => {
|
|
23
23
|
const own$ = tansu.writable({});
|
|
24
|
-
const adaptedParent$ = adaptParentConfig ===
|
|
24
|
+
const adaptedParent$ = adaptParentConfig === utils_func.identity ? parent$ : tansu.computed(() => adaptParentConfig(mergeInto({}, parent$ == null ? void 0 : parent$(), 2)));
|
|
25
25
|
return tansu.asWritable(
|
|
26
26
|
tansu.computed(() => mergeInto(mergeInto({}, adaptedParent$ == null ? void 0 : adaptedParent$(), 2), own$(), 2)),
|
|
27
27
|
{
|
package/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writable, computed, asWritable } from "@amadeus-it-group/tansu";
|
|
2
|
-
import {
|
|
2
|
+
import { identity } from "./utils/func.js";
|
|
3
3
|
const mergeInto = (destination, source, levels = Infinity) => {
|
|
4
4
|
if (source !== void 0) {
|
|
5
5
|
if (typeof source === "object" && source && levels >= 1) {
|