@agnos-ui/core 0.7.1 → 0.8.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-CJxsVQtv.cjs → accordion-DTQj-TQ1.cjs} +16 -18
- package/{accordion-D0oG0wQD.js → accordion-OTiJtxDi.js} +12 -14
- package/{alert-Bq101evB.cjs → alert-BrVkxOnA.cjs} +1 -1
- package/{alert-DJ2l7bcA.js → alert-DH-mO6WX.js} +1 -1
- package/{common-Banw3FYN.js → common-Bffx1jJO.js} +3 -4
- package/{common-DvPjK7SS.cjs → common-CcQOJ_hf.cjs} +5 -6
- 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 +64 -0
- 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-BtOvPrmt.cjs → dom-CuBx1JPZ.cjs} +100 -102
- package/{directive-DrDJkTS5.js → dom-gfxqXJpK.js} +99 -101
- package/index.cjs +14 -11
- package/index.js +15 -12
- package/{modal-Qr4sHBFG.js → modal-85Sw8xuV.js} +7 -9
- package/{modal-DtzgRa5j.cjs → modal-B7bYoubx.cjs} +12 -14
- package/package.json +1 -1
- package/{pagination-BigQwc8I.js → pagination-4g3N8ktf.js} +9 -9
- package/{pagination-ETXueztI.cjs → pagination-5YARuB3V.cjs} +8 -8
- package/{progressbar-arTsTc5c.js → progressbar-BoJsBPH1.js} +4 -4
- package/{progressbar-BSgE9udi.cjs → progressbar-BpSrg4HG.cjs} +2 -2
- package/{promise-BMJ8qhA8.cjs → promise-CxCD3NYv.cjs} +5 -5
- package/{promise-CY2U8bTP.js → promise-XSP94FjG.js} +2 -2
- package/{rating-CGv-KO_P.js → rating-B3xktzOf.js} +9 -9
- package/{rating-BV6lk1US.cjs → rating-C8tn9xTO.cjs} +9 -9
- package/{select-C5DIoZrO.js → select-C-77MJfC.js} +20 -20
- package/{select-C6gwSGbr.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 +4 -4
- 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-CkYsilwM.cjs → slider-B2JFXDLt.cjs} +109 -14
- package/{slider-DtQrcvim.js → slider-Cs69pziL.js} +111 -16
- package/{toast-4f-ZdK1Y.js → toast-4HGIz3Bu.js} +10 -9
- package/{toast-Vku2ZxoN.cjs → toast-CaIcB2sD.cjs} +8 -7
- package/{tree-DVsZP8ze.js → tree-C_goOyCv.js} +9 -9
- package/{tree-BaSMyGyv.cjs → tree-D4t2SOql.cjs} +7 -7
- package/utils/directive.cjs +2 -3
- package/utils/directive.d.ts +3 -3
- 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
3
|
import { writable, computed, asWritable, readable } from "@amadeus-it-group/tansu";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { noop } from "./utils/func.js";
|
|
5
|
+
import { e as typeString, f as typeFunction, c as typeBoolean } from "./writables-DCiBdIBK.js";
|
|
6
|
+
import { k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./dom-gfxqXJpK.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 {
|
|
1
|
+
import { c as createCommonAlert, g as getCommonAlertDefaultConfig } from "./common-Bffx1jJO.js";
|
|
2
2
|
function getAlertDefaultConfig() {
|
|
3
3
|
return { ...getCommonAlertDefaultConfig() };
|
|
4
4
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
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
|
-
import {
|
|
4
|
+
import { e as typeString, c as typeBoolean, f as typeFunction } from "./writables-DCiBdIBK.js";
|
|
5
5
|
const defaultCommonAlertConfig = {
|
|
6
6
|
visible: true,
|
|
7
7
|
dismissible: true,
|
|
@@ -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,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,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;
|
|
@@ -71,6 +71,35 @@ export interface SliderHandle {
|
|
|
71
71
|
*/
|
|
72
72
|
ariaLabelledBy: string | undefined;
|
|
73
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;
|
|
102
|
+
}
|
|
74
103
|
interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
75
104
|
/**
|
|
76
105
|
* Minimum value that can be assigned to the slider
|
|
@@ -126,6 +155,12 @@ interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
|
126
155
|
* @defaultValue `true`
|
|
127
156
|
*/
|
|
128
157
|
showMinMaxLabels: boolean;
|
|
158
|
+
/**
|
|
159
|
+
* If `true` the ticks are displayed on the slider
|
|
160
|
+
*
|
|
161
|
+
* @defaultValue `false`
|
|
162
|
+
*/
|
|
163
|
+
showTicks: boolean;
|
|
129
164
|
/**
|
|
130
165
|
* It `true` slider display is inversed
|
|
131
166
|
*
|
|
@@ -177,6 +212,10 @@ export interface SliderState extends SliderCommonPropsAndState {
|
|
|
177
212
|
* Check if the slider is interactive, meaning it is not disabled or readonly
|
|
178
213
|
*/
|
|
179
214
|
interactive: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* Array of ticks to display on the slider component
|
|
217
|
+
*/
|
|
218
|
+
ticks: SliderTick[];
|
|
180
219
|
}
|
|
181
220
|
/**
|
|
182
221
|
* Interface representing the properties for the Slider component.
|
|
@@ -224,6 +263,19 @@ export interface SliderProps extends SliderCommonPropsAndState {
|
|
|
224
263
|
* ```
|
|
225
264
|
*/
|
|
226
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;
|
|
227
279
|
}
|
|
228
280
|
/**
|
|
229
281
|
* Interface representing various directives used in the slider component.
|
|
@@ -275,6 +327,18 @@ export interface SliderDirectives {
|
|
|
275
327
|
handleLabelDisplayDirective: Directive<{
|
|
276
328
|
index: number;
|
|
277
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
|
+
}>;
|
|
278
342
|
}
|
|
279
343
|
/**
|
|
280
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) {
|