@agnos-ui/core 0.7.0-next.0 → 0.7.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-Lp-LEbZ2.cjs → accordion-CJxsVQtv.cjs} +1 -1
- package/{accordion-BGv150k9.js → accordion-D0oG0wQD.js} +1 -1
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +1 -1
- package/components/modal/index.cjs +1 -1
- package/components/modal/index.js +1 -1
- 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 +25 -10
- 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 +1 -1
- package/{directive-DdlwGFtf.cjs → directive-BtOvPrmt.cjs} +16 -1
- package/{directive-CKEccryv.js → directive-DrDJkTS5.js} +17 -2
- package/index.cjs +10 -10
- package/index.js +10 -10
- package/{modal-DDHcrykD.cjs → modal-DtzgRa5j.cjs} +1 -1
- package/{modal-DP-4I7vf.js → modal-Qr4sHBFG.js} +1 -1
- package/package.json +4 -1
- package/{pagination-DwDRot6q.js → pagination-BigQwc8I.js} +1 -1
- package/{pagination-CBysiPUs.cjs → pagination-ETXueztI.cjs} +1 -1
- package/{progressbar-DghzCJ6_.cjs → progressbar-BSgE9udi.cjs} +1 -1
- package/{progressbar-CGmNq0cS.js → progressbar-arTsTc5c.js} +1 -1
- package/{rating-DlfOuwuX.cjs → rating-BV6lk1US.cjs} +1 -1
- package/{rating-Da38uaZz.js → rating-CGv-KO_P.js} +1 -1
- package/{select-CAEPqdz1.js → select-C5DIoZrO.js} +1 -1
- package/{select-LBVhNdrd.cjs → select-C6gwSGbr.cjs} +1 -1
- package/services/floatingUI.cjs +1 -1
- package/services/floatingUI.js +1 -1
- package/services/focustrack.cjs +1 -1
- package/services/focustrack.js +1 -1
- package/services/matchMedia.cjs +1 -1
- package/services/matchMedia.js +1 -1
- package/services/navManager.cjs +1 -1
- package/services/navManager.d.ts +4 -4
- package/services/navManager.js +1 -1
- package/services/portal.cjs +1 -1
- package/services/portal.js +1 -1
- package/services/resizeObserver.cjs +1 -1
- package/services/resizeObserver.js +1 -1
- package/services/siblingsInert.cjs +1 -1
- package/services/siblingsInert.js +1 -1
- package/services/transitions/baseTransitions.cjs +1 -1
- package/services/transitions/baseTransitions.js +1 -1
- 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 +1 -1
- package/services/transitions/simpleClassTransition.cjs +1 -1
- package/services/transitions/simpleClassTransition.js +1 -1
- package/{slider-DlOAawbZ.cjs → slider-CkYsilwM.cjs} +21 -13
- package/{slider-DYrwS7Mv.js → slider-DtQrcvim.js} +21 -13
- package/{toast-CpvsibAI.js → toast-4f-ZdK1Y.js} +1 -1
- package/{toast-D_uSrRZL.cjs → toast-Vku2ZxoN.cjs} +1 -1
- package/{tree-Bh1WO63V.cjs → tree-BaSMyGyv.cjs} +6 -2
- package/{tree-C4v9rTQl.js → tree-DVsZP8ze.js} +6 -2
- package/utils/directive.cjs +1 -1
- package/utils/directive.d.ts +4 -2
- package/utils/directive.js +1 -1
|
@@ -4,7 +4,7 @@ const services_transitions_baseTransitions = require("./services/transitions/bas
|
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
5
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
6
6
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
7
|
-
const utils_directive = require("./directive-
|
|
7
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
8
8
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
9
9
|
let keepOpen;
|
|
10
10
|
if (openItems.length == 2) {
|
|
@@ -3,7 +3,7 @@ import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
|
3
3
|
import { writable, computed, asWritable, readable } from "@amadeus-it-group/tansu";
|
|
4
4
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
5
5
|
import { c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
6
|
-
import { t as generateId, k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./directive-
|
|
6
|
+
import { t as generateId, k as mergeDirectives, n as createAttributesDirective, r as registrationArray, d as directiveSubscribe } from "./directive-DrDJkTS5.js";
|
|
7
7
|
function adjustItemsCloseOthers(items, openItems, oldOpen) {
|
|
8
8
|
let keepOpen;
|
|
9
9
|
if (openItems.length == 2) {
|
|
@@ -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-CJxsVQtv.cjs");
|
|
4
4
|
exports.createAccordion = accordion.createAccordion;
|
|
5
5
|
exports.createAccordionItem = accordion.createAccordionItem;
|
|
6
6
|
exports.factoryCreateAccordion = accordion.factoryCreateAccordion;
|
|
@@ -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-DtzgRa5j.cjs");
|
|
4
4
|
exports.createModal = modal.createModal;
|
|
5
5
|
exports.getModalDefaultConfig = modal.getModalDefaultConfig;
|
|
6
6
|
exports.modalCloseButtonClick = modal.modalCloseButtonClick;
|
|
@@ -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-ETXueztI.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-BSgE9udi.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-BV6lk1US.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-C6gwSGbr.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-CkYsilwM.cjs");
|
|
4
4
|
exports.createSlider = slider.createSlider;
|
|
5
5
|
exports.getSliderDefaultConfig = slider.getSliderDefaultConfig;
|
|
@@ -25,9 +25,13 @@ export interface ProgressDisplayOptions {
|
|
|
25
25
|
*/
|
|
26
26
|
width: number;
|
|
27
27
|
/**
|
|
28
|
-
* Height of
|
|
28
|
+
* Height of the progress in %
|
|
29
29
|
*/
|
|
30
30
|
height: number;
|
|
31
|
+
/**
|
|
32
|
+
* Id of the progress
|
|
33
|
+
*/
|
|
34
|
+
id: number;
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
37
|
* Options for displaying a handle in a slider component.
|
|
@@ -57,11 +61,15 @@ export interface SliderHandle {
|
|
|
57
61
|
/**
|
|
58
62
|
* ariaLabel of the handle
|
|
59
63
|
*/
|
|
60
|
-
ariaLabel: string;
|
|
64
|
+
ariaLabel: string | undefined;
|
|
61
65
|
/**
|
|
62
66
|
* ariaValueText of the handle
|
|
63
67
|
*/
|
|
64
|
-
ariaValueText: string;
|
|
68
|
+
ariaValueText: string | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* aria-labelledBy of the handle
|
|
71
|
+
*/
|
|
72
|
+
ariaLabelledBy: string | undefined;
|
|
65
73
|
}
|
|
66
74
|
interface SliderCommonPropsAndState extends WidgetsCommonPropsAndState {
|
|
67
75
|
/**
|
|
@@ -176,28 +184,35 @@ export interface SliderState extends SliderCommonPropsAndState {
|
|
|
176
184
|
export interface SliderProps extends SliderCommonPropsAndState {
|
|
177
185
|
/**
|
|
178
186
|
* Return the value for the 'aria-label' attribute for the handle
|
|
179
|
-
* @param value - value of the handle
|
|
180
187
|
* @param sortedIndex - index of the handle in the sorted list
|
|
181
|
-
* @param index - index of the handle in the original list
|
|
182
188
|
*
|
|
183
189
|
* @defaultValue
|
|
184
190
|
* ```ts
|
|
185
|
-
* (
|
|
191
|
+
* () => 'Value'
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
ariaLabel: (sortedIndex: number) => string;
|
|
195
|
+
/**
|
|
196
|
+
* Return the value for the 'aria-labelledBy' attribute for the handle
|
|
197
|
+
* @param sortedIndex - index of the handle in the sorted list
|
|
198
|
+
*
|
|
199
|
+
* @defaultValue
|
|
200
|
+
* ```ts
|
|
201
|
+
* () => ''
|
|
186
202
|
* ```
|
|
187
203
|
*/
|
|
188
|
-
|
|
204
|
+
ariaLabelledBy: (sortedIndex: number) => string;
|
|
189
205
|
/**
|
|
190
206
|
* Return the value for the 'aria-valuetext' attribute for the handle
|
|
191
207
|
* @param value - value of the handle
|
|
192
208
|
* @param sortedIndex - index of the handle in the sorted list
|
|
193
|
-
* @param index - index of the handle in the original list
|
|
194
209
|
*
|
|
195
210
|
* @defaultValue
|
|
196
211
|
* ```ts
|
|
197
|
-
* (value: number) => ''
|
|
212
|
+
* (value: number) => ''
|
|
198
213
|
* ```
|
|
199
214
|
*/
|
|
200
|
-
ariaValueText: (value: number, sortedIndex: number
|
|
215
|
+
ariaValueText: (value: number, sortedIndex: number) => string;
|
|
201
216
|
/**
|
|
202
217
|
* An event emitted when slider values are changed
|
|
203
218
|
*
|
|
@@ -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-Vku2ZxoN.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-BaSMyGyv.cjs");
|
|
4
4
|
exports.createTree = tree.createTree;
|
|
5
5
|
exports.getTreeDefaultConfig = tree.getTreeDefaultConfig;
|
package/components/tree/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export interface TreeProps extends TreeCommonPropsAndState {
|
|
|
78
78
|
* (node: HTMLElement) => node.querySelectorAll('button')
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
navSelector(node: HTMLElement): NodeListOf<
|
|
81
|
+
navSelector(node: HTMLElement): NodeListOf<HTMLElement>;
|
|
82
82
|
/**
|
|
83
83
|
* Return the value for the 'aria-label' attribute of the toggle
|
|
84
84
|
* @param label - tree item label
|
|
@@ -139,6 +139,19 @@ const ssrHTMLElement = () => {
|
|
|
139
139
|
}
|
|
140
140
|
};
|
|
141
141
|
};
|
|
142
|
+
function r(e) {
|
|
143
|
+
var t, f, n = "";
|
|
144
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
145
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
146
|
+
var o = e.length;
|
|
147
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
148
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
149
|
+
return n;
|
|
150
|
+
}
|
|
151
|
+
function clsx() {
|
|
152
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
153
|
+
return n;
|
|
154
|
+
}
|
|
142
155
|
const isBrowserHTMLElement = esmEnv.BROWSER ? (element) => {
|
|
143
156
|
var _a;
|
|
144
157
|
const contentWindow = ((_a = element == null ? void 0 : element.ownerDocument) == null ? void 0 : _a.defaultView) ?? window;
|
|
@@ -369,7 +382,9 @@ const attributesData = (...directives) => {
|
|
|
369
382
|
});
|
|
370
383
|
}
|
|
371
384
|
};
|
|
372
|
-
const classDirective = createAttributesDirective((className) => ({
|
|
385
|
+
const classDirective = createAttributesDirective((className$) => ({
|
|
386
|
+
attributes: { class: tansu.computed(() => clsx(className$())) }
|
|
387
|
+
}));
|
|
373
388
|
function directiveAttributes(...directives) {
|
|
374
389
|
const { attributes, classNames, style } = attributesData(...directives);
|
|
375
390
|
if (classNames.length) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readable, writable, asReadable, batch } from "@amadeus-it-group/tansu";
|
|
1
|
+
import { readable, writable, asReadable, batch, computed } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { BROWSER } from "esm-env";
|
|
3
3
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
4
4
|
import { toReadableStore } from "./utils/stores.js";
|
|
@@ -138,6 +138,19 @@ const ssrHTMLElement = () => {
|
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
};
|
|
141
|
+
function r(e) {
|
|
142
|
+
var t, f, n = "";
|
|
143
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
144
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
145
|
+
var o = e.length;
|
|
146
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
147
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
148
|
+
return n;
|
|
149
|
+
}
|
|
150
|
+
function clsx() {
|
|
151
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
152
|
+
return n;
|
|
153
|
+
}
|
|
141
154
|
const isBrowserHTMLElement = BROWSER ? (element) => {
|
|
142
155
|
var _a;
|
|
143
156
|
const contentWindow = ((_a = element == null ? void 0 : element.ownerDocument) == null ? void 0 : _a.defaultView) ?? window;
|
|
@@ -368,7 +381,9 @@ const attributesData = (...directives) => {
|
|
|
368
381
|
});
|
|
369
382
|
}
|
|
370
383
|
};
|
|
371
|
-
const classDirective = createAttributesDirective((className) => ({
|
|
384
|
+
const classDirective = createAttributesDirective((className$) => ({
|
|
385
|
+
attributes: { class: computed(() => clsx(className$())) }
|
|
386
|
+
}));
|
|
372
387
|
function directiveAttributes(...directives) {
|
|
373
388
|
const { attributes, classNames, style } = attributesData(...directives);
|
|
374
389
|
if (classNames.length) {
|
package/index.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const types = require("./types.cjs");
|
|
4
|
-
const accordion = require("./accordion-
|
|
4
|
+
const accordion = require("./accordion-CJxsVQtv.cjs");
|
|
5
5
|
const alert = require("./alert-Bq101evB.cjs");
|
|
6
|
-
const modal = require("./modal-
|
|
7
|
-
const pagination = require("./pagination-
|
|
8
|
-
const progressbar = require("./progressbar-
|
|
9
|
-
const rating = require("./rating-
|
|
10
|
-
const select = require("./select-
|
|
11
|
-
const slider = require("./slider-
|
|
12
|
-
const toast = require("./toast-
|
|
13
|
-
const tree = require("./tree-
|
|
6
|
+
const modal = require("./modal-DtzgRa5j.cjs");
|
|
7
|
+
const pagination = require("./pagination-ETXueztI.cjs");
|
|
8
|
+
const progressbar = require("./progressbar-BSgE9udi.cjs");
|
|
9
|
+
const rating = require("./rating-BV6lk1US.cjs");
|
|
10
|
+
const select = require("./select-C6gwSGbr.cjs");
|
|
11
|
+
const slider = require("./slider-CkYsilwM.cjs");
|
|
12
|
+
const toast = require("./toast-Vku2ZxoN.cjs");
|
|
13
|
+
const tree = require("./tree-BaSMyGyv.cjs");
|
|
14
14
|
const config = require("./config.cjs");
|
|
15
15
|
const services_extendWidget = require("./services/extendWidget.cjs");
|
|
16
16
|
const services_floatingUI = require("./services/floatingUI.cjs");
|
|
@@ -25,7 +25,7 @@ const services_hash = require("./services/hash.cjs");
|
|
|
25
25
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
26
26
|
const services_transitions_cssTransitions = require("./services/transitions/cssTransitions.cjs");
|
|
27
27
|
const services_transitions_simpleClassTransition = require("./services/transitions/simpleClassTransition.cjs");
|
|
28
|
-
const utils_directive = require("./directive-
|
|
28
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
29
29
|
const utils_stores = require("./utils/stores.cjs");
|
|
30
30
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
31
31
|
exports.INVALID_VALUE = types.INVALID_VALUE;
|
package/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { INVALID_VALUE } from "./types.js";
|
|
2
|
-
import { a, c, f, g } from "./accordion-
|
|
2
|
+
import { a, c, f, g } from "./accordion-D0oG0wQD.js";
|
|
3
3
|
import { c as c2, g as g2 } from "./alert-DJ2l7bcA.js";
|
|
4
|
-
import { c as c3, g as g3, a as a2, m } from "./modal-
|
|
5
|
-
import { c as c4, g as g4 } from "./pagination-
|
|
6
|
-
import { c as c5, g as g5 } from "./progressbar-
|
|
7
|
-
import { c as c6, g as g6 } from "./rating-
|
|
8
|
-
import { c as c7, g as g7 } from "./select-
|
|
9
|
-
import { c as c8, g as g8 } from "./slider-
|
|
10
|
-
import { c as c9, g as g9 } from "./toast-
|
|
11
|
-
import { c as c10, g as g10 } from "./tree-
|
|
4
|
+
import { c as c3, g as g3, a as a2, m } from "./modal-Qr4sHBFG.js";
|
|
5
|
+
import { c as c4, g as g4 } from "./pagination-BigQwc8I.js";
|
|
6
|
+
import { c as c5, g as g5 } from "./progressbar-arTsTc5c.js";
|
|
7
|
+
import { c as c6, g as g6 } from "./rating-CGv-KO_P.js";
|
|
8
|
+
import { c as c7, g as g7 } from "./select-C5DIoZrO.js";
|
|
9
|
+
import { c as c8, g as g8 } from "./slider-DtQrcvim.js";
|
|
10
|
+
import { c as c9, g as g9 } from "./toast-4f-ZdK1Y.js";
|
|
11
|
+
import { c as c10, g as g10 } from "./tree-DVsZP8ze.js";
|
|
12
12
|
import { createWidgetsConfig, mergeInto } from "./config.js";
|
|
13
13
|
import { extendWidgetProps } from "./services/extendWidget.js";
|
|
14
14
|
import { createFloatingUI } from "./services/floatingUI.js";
|
|
@@ -23,7 +23,7 @@ import { hash$ } from "./services/hash.js";
|
|
|
23
23
|
import { createTransition, noAnimation } from "./services/transitions/baseTransitions.js";
|
|
24
24
|
import { createCSSTransition, getTransitionDurationMs, hasTransition } from "./services/transitions/cssTransitions.js";
|
|
25
25
|
import { createSimpleClassTransition } from "./services/transitions/simpleClassTransition.js";
|
|
26
|
-
import { o, a as a3, c as c11, b, p, n, g as g11, j, f as f2, h, q, d, e, i, m as m2, k, l, r, s } from "./directive-
|
|
26
|
+
import { o, a as a3, c as c11, b, p, n, g as g11, j, f as f2, h, q, d, e, i, m as m2, k, l, r, s } from "./directive-DrDJkTS5.js";
|
|
27
27
|
import { bindableDerived, bindableProp, createPatch, findChangedProperties, isStore, mergeConfigStores, normalizeConfigStores, stateStores, toReadableStore, toWritableStore, writableWithDefault, writablesForProps, writablesWithDefault } from "./utils/stores.js";
|
|
28
28
|
import { i as i2, t, h as h2, c as c12, d as d2, f as f3, g as g12, a as a4, b as b2, e as e2 } from "./writables-DCiBdIBK.js";
|
|
29
29
|
export {
|
|
@@ -5,7 +5,7 @@ const utils_stores = require("./utils/stores.cjs");
|
|
|
5
5
|
const services_transitions_baseTransitions = require("./services/transitions/baseTransitions.cjs");
|
|
6
6
|
const promise = require("./promise-BMJ8qhA8.cjs");
|
|
7
7
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
8
|
-
const utils_directive = require("./directive-
|
|
8
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
9
9
|
const services_portal = require("./services/portal.cjs");
|
|
10
10
|
const services_siblingsInert = require("./services/siblingsInert.cjs");
|
|
11
11
|
const internalRemoveScrollbars = () => {
|
|
@@ -4,7 +4,7 @@ import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
|
4
4
|
import { createTransition } from "./services/transitions/baseTransitions.js";
|
|
5
5
|
import { d as promiseFromStore } from "./promise-CY2U8bTP.js";
|
|
6
6
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
7
|
-
import { r as registrationArray, a as bindDirective, k as mergeDirectives, d as directiveSubscribe, b as browserDirective, n as createAttributesDirective } from "./directive-
|
|
7
|
+
import { r as registrationArray, a as bindDirective, k as mergeDirectives, d as directiveSubscribe, b as browserDirective, n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
8
8
|
import { portal } from "./services/portal.js";
|
|
9
9
|
import { siblingsInert } from "./services/siblingsInert.js";
|
|
10
10
|
const internalRemoveScrollbars = () => {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/core",
|
|
3
3
|
"description": "Framework-agnostic headless component library.",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.cjs",
|
|
7
7
|
"module": "./index.js",
|
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
"default": "./utils/*.js"
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"clsx": "^2.1.1"
|
|
48
|
+
},
|
|
46
49
|
"peerDependencies": {
|
|
47
50
|
"@amadeus-it-group/tansu": "^2.0.0",
|
|
48
51
|
"@floating-ui/dom": "^1.6.12",
|
|
@@ -2,7 +2,7 @@ import { computed } from "@amadeus-it-group/tansu";
|
|
|
2
2
|
import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
|
|
3
3
|
import { j as clamp, a as typeNumber, c as typeBoolean, f as typeFunction, e as typeString, k as isNumber } from "./writables-DCiBdIBK.js";
|
|
4
4
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
5
|
-
import { n as createAttributesDirective } from "./directive-
|
|
5
|
+
import { n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
6
6
|
const PAGE_LINK_DEFAULT = "#";
|
|
7
7
|
const defaultConfig = {
|
|
8
8
|
page: 1,
|
|
@@ -3,7 +3,7 @@ const tansu = require("@amadeus-it-group/tansu");
|
|
|
3
3
|
const utils_stores = require("./utils/stores.cjs");
|
|
4
4
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
5
5
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
6
|
-
const utils_directive = require("./directive-
|
|
6
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
7
7
|
const PAGE_LINK_DEFAULT = "#";
|
|
8
8
|
const defaultConfig = {
|
|
9
9
|
page: 1,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
3
3
|
const utils_stores = require("./utils/stores.cjs");
|
|
4
4
|
const tansu = require("@amadeus-it-group/tansu");
|
|
5
|
-
const utils_directive = require("./directive-
|
|
5
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
6
6
|
const defaultConfig = {
|
|
7
7
|
min: 0,
|
|
8
8
|
max: 100,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as clamp, a as typeNumber, e as typeString, f as typeFunction } from "./writables-DCiBdIBK.js";
|
|
2
2
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
3
3
|
import { computed } from "@amadeus-it-group/tansu";
|
|
4
|
-
import { n as createAttributesDirective } from "./directive-
|
|
4
|
+
import { n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
5
5
|
const defaultConfig = {
|
|
6
6
|
min: 0,
|
|
7
7
|
max: 100,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
3
|
const types = require("./types.cjs");
|
|
4
|
-
const utils_directive = require("./directive-
|
|
4
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
5
5
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
6
6
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
7
7
|
const utils_stores = require("./utils/stores.cjs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, writable } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { INVALID_VALUE } from "./types.js";
|
|
3
|
-
import { n as createAttributesDirective } from "./directive-
|
|
3
|
+
import { n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
4
4
|
import { j as clamp, a as typeNumber, k as isNumber, c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
5
5
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
6
6
|
import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
|
|
@@ -3,7 +3,7 @@ import { offset, autoPlacement, size } from "@floating-ui/dom";
|
|
|
3
3
|
import { createFloatingUI } from "./services/floatingUI.js";
|
|
4
4
|
import { createHasFocus } from "./services/focustrack.js";
|
|
5
5
|
import { createNavManager } from "./services/navManager.js";
|
|
6
|
-
import { t as generateId, k as mergeDirectives, a as bindDirective, n as createAttributesDirective } from "./directive-
|
|
6
|
+
import { t as generateId, k as mergeDirectives, a as bindDirective, n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
7
7
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
8
8
|
import { writablesForProps, bindableProp, bindableDerived, stateStores } from "./utils/stores.js";
|
|
9
9
|
const defaultConfig = {
|
|
@@ -4,7 +4,7 @@ const dom = require("@floating-ui/dom");
|
|
|
4
4
|
const services_floatingUI = require("./services/floatingUI.cjs");
|
|
5
5
|
const services_focustrack = require("./services/focustrack.cjs");
|
|
6
6
|
const services_navManager = require("./services/navManager.cjs");
|
|
7
|
-
const utils_directive = require("./directive-
|
|
7
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
8
8
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
9
9
|
const utils_stores = require("./utils/stores.cjs");
|
|
10
10
|
const defaultConfig = {
|
package/services/floatingUI.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
4
|
const dom = require("@floating-ui/dom");
|
|
5
|
-
const utils_directive = require("../directive-
|
|
5
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
6
6
|
const promise = require("../promise-BMJ8qhA8.cjs");
|
|
7
7
|
const utils_stores = require("../utils/stores.cjs");
|
|
8
8
|
const defaultConfig = {
|
package/services/floatingUI.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, derived } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { arrow, autoUpdate, computePosition } from "@floating-ui/dom";
|
|
3
|
-
import { j as createBrowserStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../directive-
|
|
3
|
+
import { j as createBrowserStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../directive-DrDJkTS5.js";
|
|
4
4
|
import { p as promiseStoreToValueStore } from "../promise-CY2U8bTP.js";
|
|
5
5
|
import { writablesForProps, stateStores } from "../utils/stores.js";
|
|
6
6
|
const defaultConfig = {
|
package/services/focustrack.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 utils_directive = require("../directive-
|
|
4
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
5
5
|
const esmEnv = require("esm-env");
|
|
6
6
|
const evtFocusIn = "focusin";
|
|
7
7
|
const evtFocusOut = "focusout";
|
package/services/focustrack.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readable, computed } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { g as createBrowserStoreArrayDirective } from "../directive-
|
|
2
|
+
import { g as createBrowserStoreArrayDirective } from "../directive-DrDJkTS5.js";
|
|
3
3
|
import { BROWSER } from "esm-env";
|
|
4
4
|
const evtFocusIn = "focusin";
|
|
5
5
|
const evtFocusOut = "focusout";
|
package/services/matchMedia.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
4
|
const esmEnv = require("esm-env");
|
|
5
|
-
const utils_directive = require("../directive-
|
|
5
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
6
6
|
const createMatchMedia = (query) => esmEnv.BROWSER ? tansu.readable(false, {
|
|
7
7
|
onUse({ set }) {
|
|
8
8
|
const mql = window.matchMedia(query.trim());
|
package/services/matchMedia.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readable } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { BROWSER } from "esm-env";
|
|
3
|
-
import { u as addEvent } from "../directive-
|
|
3
|
+
import { u as addEvent } from "../directive-DrDJkTS5.js";
|
|
4
4
|
const createMatchMedia = (query) => BROWSER ? readable(false, {
|
|
5
5
|
onUse({ set }) {
|
|
6
6
|
const mql = window.matchMedia(query.trim());
|
package/services/navManager.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 utils_directive = require("../directive-
|
|
4
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
5
5
|
const isInertOrInvisible = (element) => {
|
|
6
6
|
let curElement = element;
|
|
7
7
|
while (curElement) {
|
package/services/navManager.d.ts
CHANGED
|
@@ -43,15 +43,15 @@ export type NavManager<T> = {
|
|
|
43
43
|
*/
|
|
44
44
|
focusIndex: (index: number, moveDirection: -1 | 0 | 1) => HTMLElement | null;
|
|
45
45
|
/**
|
|
46
|
-
* Focus the previous element, respecting the
|
|
46
|
+
* Focus the previous element, respecting the ancestor direction.
|
|
47
47
|
*/
|
|
48
48
|
focusPrevious: FocusNeighbour;
|
|
49
49
|
/**
|
|
50
|
-
* Focus the next element, respecting the
|
|
50
|
+
* Focus the next element, respecting the ancestor direction.
|
|
51
51
|
*/
|
|
52
52
|
focusNext: FocusNeighbour;
|
|
53
53
|
/**
|
|
54
|
-
* Focus the first element, respecting the
|
|
54
|
+
* Focus the first element, respecting the ancestor direction.
|
|
55
55
|
*/
|
|
56
56
|
focusFirst: FocusEnd;
|
|
57
57
|
/**
|
|
@@ -63,7 +63,7 @@ export type NavManager<T> = {
|
|
|
63
63
|
*/
|
|
64
64
|
focusFirstRight: FocusEnd;
|
|
65
65
|
/**
|
|
66
|
-
* Focus the last element, respecting the
|
|
66
|
+
* Focus the last element, respecting the ancestor direction.
|
|
67
67
|
*/
|
|
68
68
|
focusLast: FocusEnd;
|
|
69
69
|
/**
|
package/services/navManager.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { writable, computed } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { r as registrationArray, y as computeCommonAncestor, b as browserDirective } from "../directive-
|
|
2
|
+
import { r as registrationArray, y as computeCommonAncestor, b as browserDirective } from "../directive-DrDJkTS5.js";
|
|
3
3
|
const isInertOrInvisible = (element) => {
|
|
4
4
|
let curElement = element;
|
|
5
5
|
while (curElement) {
|
package/services/portal.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_directive = require("../directive-
|
|
3
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
4
4
|
const portal = utils_directive.browserDirective((content, newArg) => {
|
|
5
5
|
let arg;
|
|
6
6
|
let replaceComment;
|
package/services/portal.js
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 utils_directive = require("../directive-
|
|
4
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
5
5
|
const func = require("../func-Qd3cD9a3.cjs");
|
|
6
6
|
const createResizeObserver = () => {
|
|
7
7
|
const { element$, directive } = utils_directive.createBrowserStoreDirective();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { derived } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { j as createBrowserStoreDirective } from "../directive-
|
|
2
|
+
import { j as createBrowserStoreDirective } from "../directive-DrDJkTS5.js";
|
|
3
3
|
import { n as noop } from "../func-DR0n-ShK.js";
|
|
4
4
|
const createResizeObserver = () => {
|
|
5
5
|
const { element$, directive } = createBrowserStoreDirective();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const tansu = require("@amadeus-it-group/tansu");
|
|
4
4
|
const func = require("../func-Qd3cD9a3.cjs");
|
|
5
|
-
const utils_directive = require("../directive-
|
|
5
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
6
6
|
const internalSetSiblingsInert = (element) => {
|
|
7
7
|
const inertValues = /* @__PURE__ */ new Map();
|
|
8
8
|
const recursiveHelper = (element2) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { n as noop } from "../func-DR0n-ShK.js";
|
|
3
|
-
import { g as createBrowserStoreArrayDirective, k as mergeDirectives, d as directiveSubscribe } from "../directive-
|
|
3
|
+
import { g as createBrowserStoreArrayDirective, k as mergeDirectives, d as directiveSubscribe } from "../directive-DrDJkTS5.js";
|
|
4
4
|
const internalSetSiblingsInert = (element) => {
|
|
5
5
|
const inertValues = /* @__PURE__ */ new Map();
|
|
6
6
|
const recursiveHelper = (element2) => {
|
|
@@ -5,7 +5,7 @@ const utils_writables = require("../../writables-BPAJvaL_.cjs");
|
|
|
5
5
|
const promise = require("../../promise-BMJ8qhA8.cjs");
|
|
6
6
|
const func = require("../../func-Qd3cD9a3.cjs");
|
|
7
7
|
const utils_stores = require("../../utils/stores.cjs");
|
|
8
|
-
const utils_directive = require("../../directive-
|
|
8
|
+
const utils_directive = require("../../directive-BtOvPrmt.cjs");
|
|
9
9
|
const neverEndingPromise = new Promise(func.noop);
|
|
10
10
|
const noAnimation = (element, direction) => {
|
|
11
11
|
element.style.display = direction === "show" ? "" : "none";
|
|
@@ -3,7 +3,7 @@ import { c as typeBoolean, f as typeFunction, d as typeBooleanOrNull } from "../
|
|
|
3
3
|
import { c as promiseWithResolve } from "../../promise-CY2U8bTP.js";
|
|
4
4
|
import { n as noop } from "../../func-DR0n-ShK.js";
|
|
5
5
|
import { writablesForProps, bindableDerived, stateStores } from "../../utils/stores.js";
|
|
6
|
-
import { h as createStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../../directive-
|
|
6
|
+
import { h as createStoreDirective, k as mergeDirectives, d as directiveSubscribe } from "../../directive-DrDJkTS5.js";
|
|
7
7
|
const neverEndingPromise = new Promise(noop);
|
|
8
8
|
const noAnimation = (element, direction) => {
|
|
9
9
|
element.style.display = direction === "show" ? "" : "none";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_directive = require("../../directive-
|
|
3
|
+
const utils_directive = require("../../directive-BtOvPrmt.cjs");
|
|
4
4
|
const services_transitions_cssTransitions = require("./cssTransitions.cjs");
|
|
5
5
|
const createCollapseTransition = ({
|
|
6
6
|
dimension = "height",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isBrowserHTMLElement, v as removeClasses, w as addClasses, x as reflow } from "../../directive-
|
|
1
|
+
import { i as isBrowserHTMLElement, v as removeClasses, w as addClasses, x as reflow } from "../../directive-DrDJkTS5.js";
|
|
2
2
|
import { createCSSTransition } from "./cssTransitions.js";
|
|
3
3
|
const createCollapseTransition = ({
|
|
4
4
|
dimension = "height",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const utils_directive = require("../../directive-
|
|
3
|
+
const utils_directive = require("../../directive-BtOvPrmt.cjs");
|
|
4
4
|
const func = require("../../func-Qd3cD9a3.cjs");
|
|
5
5
|
const promise = require("../../promise-BMJ8qhA8.cjs");
|
|
6
6
|
function hasTransition(element) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isBrowserHTMLElement } from "../../directive-
|
|
1
|
+
import { i as isBrowserHTMLElement } from "../../directive-DrDJkTS5.js";
|
|
2
2
|
import { n as noop } from "../../func-DR0n-ShK.js";
|
|
3
3
|
import { a as promiseFromEvent, b as promiseFromTimeout } from "../../promise-CY2U8bTP.js";
|
|
4
4
|
function hasTransition(element) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const services_transitions_cssTransitions = require("./cssTransitions.cjs");
|
|
4
|
-
const utils_directive = require("../../directive-
|
|
4
|
+
const utils_directive = require("../../directive-BtOvPrmt.cjs");
|
|
5
5
|
const createSimpleClassTransition = (config) => {
|
|
6
6
|
const { animationPendingClasses, animationPendingShowClasses, animationPendingHideClasses, showClasses, hideClasses } = config;
|
|
7
7
|
return services_transitions_cssTransitions.createCSSTransition((element, direction, animated, context) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createCSSTransition } from "./cssTransitions.js";
|
|
2
|
-
import { v as removeClasses, w as addClasses, x as reflow } from "../../directive-
|
|
2
|
+
import { v as removeClasses, w as addClasses, x as reflow } from "../../directive-DrDJkTS5.js";
|
|
3
3
|
const createSimpleClassTransition = (config) => {
|
|
4
4
|
const { animationPendingClasses, animationPendingShowClasses, animationPendingHideClasses, showClasses, hideClasses } = config;
|
|
5
5
|
return createCSSTransition((element, direction, animated, context) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
|
-
const utils_directive = require("./directive-
|
|
3
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
4
4
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
5
5
|
const utils_stores = require("./utils/stores.cjs");
|
|
6
6
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
@@ -24,8 +24,9 @@ const defaultSliderConfig = {
|
|
|
24
24
|
disabled: false,
|
|
25
25
|
vertical: false,
|
|
26
26
|
className: "",
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ariaLabel: () => "Value",
|
|
28
|
+
ariaLabelledBy: () => "",
|
|
29
|
+
ariaValueText: () => "",
|
|
29
30
|
onValuesChange: func.noop,
|
|
30
31
|
values: [0],
|
|
31
32
|
showValueLabels: true,
|
|
@@ -42,7 +43,8 @@ const configValidator = {
|
|
|
42
43
|
readonly: utils_writables.typeBoolean,
|
|
43
44
|
disabled: utils_writables.typeBoolean,
|
|
44
45
|
vertical: utils_writables.typeBoolean,
|
|
45
|
-
|
|
46
|
+
ariaLabel: utils_writables.typeFunction,
|
|
47
|
+
ariaLabelledBy: utils_writables.typeFunction,
|
|
46
48
|
ariaValueText: utils_writables.typeFunction,
|
|
47
49
|
onValuesChange: utils_writables.typeFunction,
|
|
48
50
|
values: utils_writables.typeArray,
|
|
@@ -92,7 +94,8 @@ function createSlider(config) {
|
|
|
92
94
|
stepSize$,
|
|
93
95
|
rtl$,
|
|
94
96
|
values$: _dirtyValues$,
|
|
95
|
-
|
|
97
|
+
ariaLabel$,
|
|
98
|
+
ariaLabelledBy$,
|
|
96
99
|
ariaValueText$,
|
|
97
100
|
onValuesChange$,
|
|
98
101
|
showValueLabels$,
|
|
@@ -178,12 +181,13 @@ function createSlider(config) {
|
|
|
178
181
|
}).sort((a, b) => a.value - b.value);
|
|
179
182
|
});
|
|
180
183
|
const sortedHandles$ = tansu.computed(() => {
|
|
181
|
-
const ariaLabelHandle =
|
|
184
|
+
const ariaLabelHandle = ariaLabel$(), ariaValueText = ariaValueText$(), ariaLabelledBy = ariaLabelledBy$();
|
|
182
185
|
return _sortedHandlesValues$().map((sortedValue, index) => {
|
|
183
186
|
return {
|
|
184
187
|
...sortedValue,
|
|
185
|
-
ariaLabel: ariaLabelHandle(
|
|
186
|
-
|
|
188
|
+
ariaLabel: ariaLabelledBy(index) ? void 0 : ariaLabelHandle(index),
|
|
189
|
+
ariaLabelledBy: ariaLabelledBy(index) || void 0,
|
|
190
|
+
ariaValueText: ariaValueText(sortedValue.value, index) || void 0
|
|
187
191
|
};
|
|
188
192
|
});
|
|
189
193
|
});
|
|
@@ -243,7 +247,8 @@ function createSlider(config) {
|
|
|
243
247
|
bottom: vertical ? rtl ? null : 0 : null,
|
|
244
248
|
top: vertical ? rtl ? 0 : null : null,
|
|
245
249
|
width: vertical ? 100 : sortedValuesPercent[0],
|
|
246
|
-
height: vertical ? sortedValuesPercent[0] : 100
|
|
250
|
+
height: vertical ? sortedValuesPercent[0] : 100,
|
|
251
|
+
id: 0
|
|
247
252
|
}
|
|
248
253
|
];
|
|
249
254
|
} else {
|
|
@@ -254,7 +259,8 @@ function createSlider(config) {
|
|
|
254
259
|
bottom: vertical ? rtl ? null : svp : null,
|
|
255
260
|
top: vertical ? rtl ? array[index] : null : null,
|
|
256
261
|
width: vertical ? 100 : index === array.length - 1 ? svp : array[index + 1] - svp,
|
|
257
|
-
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100
|
|
262
|
+
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100,
|
|
263
|
+
id: index
|
|
258
264
|
};
|
|
259
265
|
}).slice(0, sortedValuesPercent.length - 1);
|
|
260
266
|
}
|
|
@@ -269,9 +275,11 @@ function createSlider(config) {
|
|
|
269
275
|
return 0;
|
|
270
276
|
}
|
|
271
277
|
const sortedValues = sortedValues$();
|
|
272
|
-
const closestBigger = sortedValues.find((sv) => sv > clickedPercent * 100);
|
|
278
|
+
const closestBigger = sortedValues.find((sv) => percentCompute(sv) > clickedPercent * 100);
|
|
273
279
|
const closestBiggerIndex = closestBigger ? sortedValues.indexOf(closestBigger) : sortedValues.length - 1;
|
|
274
|
-
const midPoint =
|
|
280
|
+
const midPoint = percentCompute(
|
|
281
|
+
sortedValues[closestBiggerIndex - 1] + (sortedValues[closestBiggerIndex] - sortedValues[closestBiggerIndex - 1]) / 2
|
|
282
|
+
);
|
|
275
283
|
const closestValue = sortedValues[clickedPercent * 100 <= midPoint ? closestBiggerIndex - 1 : closestBiggerIndex];
|
|
276
284
|
return values.indexOf(closestValue);
|
|
277
285
|
};
|
|
@@ -364,7 +372,6 @@ function createSlider(config) {
|
|
|
364
372
|
return;
|
|
365
373
|
}
|
|
366
374
|
event.preventDefault();
|
|
367
|
-
event.stopPropagation();
|
|
368
375
|
}
|
|
369
376
|
},
|
|
370
377
|
mousedown: (event) => {
|
|
@@ -487,6 +494,7 @@ function createSlider(config) {
|
|
|
487
494
|
"aria-valuenow": tansu.computed(() => handleContext$().item.value),
|
|
488
495
|
"aria-valuetext": tansu.computed(() => handleContext$().item.ariaValueText),
|
|
489
496
|
"aria-label": tansu.computed(() => handleContext$().item.ariaLabel),
|
|
497
|
+
"aria-labelledBy": tansu.computed(() => handleContext$().item.ariaLabelledBy),
|
|
490
498
|
"aria-orientation": tansu.computed(() => vertical$() ? "vertical" : void 0),
|
|
491
499
|
"aria-disabled": tansu.computed(() => disabled$() ? "true" : void 0),
|
|
492
500
|
disabled: disabled$,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, writable } from "@amadeus-it-group/tansu";
|
|
2
|
-
import { j as createBrowserStoreDirective, k as mergeDirectives, n as createAttributesDirective } from "./directive-
|
|
2
|
+
import { j as createBrowserStoreDirective, k as mergeDirectives, n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
3
3
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
4
4
|
import { writablesForProps, bindableProp, stateStores } from "./utils/stores.js";
|
|
5
5
|
import { h as typeArray, a as typeNumber, b as typeNumberInRangeFactory, c as typeBoolean, f as typeFunction, e as typeString } from "./writables-DCiBdIBK.js";
|
|
@@ -23,8 +23,9 @@ const defaultSliderConfig = {
|
|
|
23
23
|
disabled: false,
|
|
24
24
|
vertical: false,
|
|
25
25
|
className: "",
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
ariaLabel: () => "Value",
|
|
27
|
+
ariaLabelledBy: () => "",
|
|
28
|
+
ariaValueText: () => "",
|
|
28
29
|
onValuesChange: noop,
|
|
29
30
|
values: [0],
|
|
30
31
|
showValueLabels: true,
|
|
@@ -41,7 +42,8 @@ const configValidator = {
|
|
|
41
42
|
readonly: typeBoolean,
|
|
42
43
|
disabled: typeBoolean,
|
|
43
44
|
vertical: typeBoolean,
|
|
44
|
-
|
|
45
|
+
ariaLabel: typeFunction,
|
|
46
|
+
ariaLabelledBy: typeFunction,
|
|
45
47
|
ariaValueText: typeFunction,
|
|
46
48
|
onValuesChange: typeFunction,
|
|
47
49
|
values: typeArray,
|
|
@@ -91,7 +93,8 @@ function createSlider(config) {
|
|
|
91
93
|
stepSize$,
|
|
92
94
|
rtl$,
|
|
93
95
|
values$: _dirtyValues$,
|
|
94
|
-
|
|
96
|
+
ariaLabel$,
|
|
97
|
+
ariaLabelledBy$,
|
|
95
98
|
ariaValueText$,
|
|
96
99
|
onValuesChange$,
|
|
97
100
|
showValueLabels$,
|
|
@@ -177,12 +180,13 @@ function createSlider(config) {
|
|
|
177
180
|
}).sort((a, b) => a.value - b.value);
|
|
178
181
|
});
|
|
179
182
|
const sortedHandles$ = computed(() => {
|
|
180
|
-
const ariaLabelHandle =
|
|
183
|
+
const ariaLabelHandle = ariaLabel$(), ariaValueText = ariaValueText$(), ariaLabelledBy = ariaLabelledBy$();
|
|
181
184
|
return _sortedHandlesValues$().map((sortedValue, index) => {
|
|
182
185
|
return {
|
|
183
186
|
...sortedValue,
|
|
184
|
-
ariaLabel: ariaLabelHandle(
|
|
185
|
-
|
|
187
|
+
ariaLabel: ariaLabelledBy(index) ? void 0 : ariaLabelHandle(index),
|
|
188
|
+
ariaLabelledBy: ariaLabelledBy(index) || void 0,
|
|
189
|
+
ariaValueText: ariaValueText(sortedValue.value, index) || void 0
|
|
186
190
|
};
|
|
187
191
|
});
|
|
188
192
|
});
|
|
@@ -242,7 +246,8 @@ function createSlider(config) {
|
|
|
242
246
|
bottom: vertical ? rtl ? null : 0 : null,
|
|
243
247
|
top: vertical ? rtl ? 0 : null : null,
|
|
244
248
|
width: vertical ? 100 : sortedValuesPercent[0],
|
|
245
|
-
height: vertical ? sortedValuesPercent[0] : 100
|
|
249
|
+
height: vertical ? sortedValuesPercent[0] : 100,
|
|
250
|
+
id: 0
|
|
246
251
|
}
|
|
247
252
|
];
|
|
248
253
|
} else {
|
|
@@ -253,7 +258,8 @@ function createSlider(config) {
|
|
|
253
258
|
bottom: vertical ? rtl ? null : svp : null,
|
|
254
259
|
top: vertical ? rtl ? array[index] : null : null,
|
|
255
260
|
width: vertical ? 100 : index === array.length - 1 ? svp : array[index + 1] - svp,
|
|
256
|
-
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100
|
|
261
|
+
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100,
|
|
262
|
+
id: index
|
|
257
263
|
};
|
|
258
264
|
}).slice(0, sortedValuesPercent.length - 1);
|
|
259
265
|
}
|
|
@@ -268,9 +274,11 @@ function createSlider(config) {
|
|
|
268
274
|
return 0;
|
|
269
275
|
}
|
|
270
276
|
const sortedValues = sortedValues$();
|
|
271
|
-
const closestBigger = sortedValues.find((sv) => sv > clickedPercent * 100);
|
|
277
|
+
const closestBigger = sortedValues.find((sv) => percentCompute(sv) > clickedPercent * 100);
|
|
272
278
|
const closestBiggerIndex = closestBigger ? sortedValues.indexOf(closestBigger) : sortedValues.length - 1;
|
|
273
|
-
const midPoint =
|
|
279
|
+
const midPoint = percentCompute(
|
|
280
|
+
sortedValues[closestBiggerIndex - 1] + (sortedValues[closestBiggerIndex] - sortedValues[closestBiggerIndex - 1]) / 2
|
|
281
|
+
);
|
|
274
282
|
const closestValue = sortedValues[clickedPercent * 100 <= midPoint ? closestBiggerIndex - 1 : closestBiggerIndex];
|
|
275
283
|
return values.indexOf(closestValue);
|
|
276
284
|
};
|
|
@@ -363,7 +371,6 @@ function createSlider(config) {
|
|
|
363
371
|
return;
|
|
364
372
|
}
|
|
365
373
|
event.preventDefault();
|
|
366
|
-
event.stopPropagation();
|
|
367
374
|
}
|
|
368
375
|
},
|
|
369
376
|
mousedown: (event) => {
|
|
@@ -486,6 +493,7 @@ function createSlider(config) {
|
|
|
486
493
|
"aria-valuenow": computed(() => handleContext$().item.value),
|
|
487
494
|
"aria-valuetext": computed(() => handleContext$().item.ariaValueText),
|
|
488
495
|
"aria-label": computed(() => handleContext$().item.ariaLabel),
|
|
496
|
+
"aria-labelledBy": computed(() => handleContext$().item.ariaLabelledBy),
|
|
489
497
|
"aria-orientation": computed(() => vertical$() ? "vertical" : void 0),
|
|
490
498
|
"aria-disabled": computed(() => disabled$() ? "true" : void 0),
|
|
491
499
|
disabled: disabled$,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { extendWidgetProps } from "./services/extendWidget.js";
|
|
3
|
-
import { d as directiveSubscribe, n as createAttributesDirective } from "./directive-
|
|
3
|
+
import { d as directiveSubscribe, n as createAttributesDirective } from "./directive-DrDJkTS5.js";
|
|
4
4
|
import { c as typeBoolean, b as typeNumberInRangeFactory } from "./writables-DCiBdIBK.js";
|
|
5
5
|
import { g as getCommonAlertDefaultConfig, c as createCommonAlert } from "./common-Banw3FYN.js";
|
|
6
6
|
const toastDefaultConfig = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
3
|
const services_extendWidget = require("./services/extendWidget.cjs");
|
|
4
|
-
const utils_directive = require("./directive-
|
|
4
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
5
5
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
6
6
|
const common = require("./common-DvPjK7SS.cjs");
|
|
7
7
|
const toastDefaultConfig = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const tansu = require("@amadeus-it-group/tansu");
|
|
3
3
|
const services_navManager = require("./services/navManager.cjs");
|
|
4
|
-
const utils_directive = require("./directive-
|
|
4
|
+
const utils_directive = require("./directive-BtOvPrmt.cjs");
|
|
5
5
|
const func = require("./func-Qd3cD9a3.cjs");
|
|
6
6
|
const utils_stores = require("./utils/stores.cjs");
|
|
7
7
|
const utils_writables = require("./writables-BPAJvaL_.cjs");
|
|
@@ -82,7 +82,7 @@ function createTree(config) {
|
|
|
82
82
|
treeMap.clear();
|
|
83
83
|
return nodes$().map((node) => traverseTree(node, 0, void 0));
|
|
84
84
|
});
|
|
85
|
-
const _lastFocusedTreeItem$ = tansu.writable(normalizedNodes$()
|
|
85
|
+
const _lastFocusedTreeItem$ = tansu.writable(normalizedNodes$().find((node) => node.isExpanded !== void 0));
|
|
86
86
|
const getTreeItemInfo = (item) => {
|
|
87
87
|
const treeItem = treeMap.get(item);
|
|
88
88
|
if (!treeItem) {
|
|
@@ -143,6 +143,10 @@ function createTree(config) {
|
|
|
143
143
|
const isExpanded = item.isExpanded;
|
|
144
144
|
refreshElements();
|
|
145
145
|
switch (key) {
|
|
146
|
+
case "Enter":
|
|
147
|
+
case " ":
|
|
148
|
+
toggleExpanded(item);
|
|
149
|
+
break;
|
|
146
150
|
case "ArrowLeft":
|
|
147
151
|
if (isExpanded) {
|
|
148
152
|
toggleExpanded(item);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { writable, computed } from "@amadeus-it-group/tansu";
|
|
2
2
|
import { createNavManager } from "./services/navManager.js";
|
|
3
|
-
import { a as bindDirective, k as mergeDirectives, n as createAttributesDirective, b as browserDirective } from "./directive-
|
|
3
|
+
import { a as bindDirective, k as mergeDirectives, n as createAttributesDirective, b as browserDirective } from "./directive-DrDJkTS5.js";
|
|
4
4
|
import { n as noop } from "./func-DR0n-ShK.js";
|
|
5
5
|
import { writablesForProps, stateStores } from "./utils/stores.js";
|
|
6
6
|
import { e as typeString, h as typeArray, f as typeFunction } from "./writables-DCiBdIBK.js";
|
|
@@ -81,7 +81,7 @@ function createTree(config) {
|
|
|
81
81
|
treeMap.clear();
|
|
82
82
|
return nodes$().map((node) => traverseTree(node, 0, void 0));
|
|
83
83
|
});
|
|
84
|
-
const _lastFocusedTreeItem$ = writable(normalizedNodes$()
|
|
84
|
+
const _lastFocusedTreeItem$ = writable(normalizedNodes$().find((node) => node.isExpanded !== void 0));
|
|
85
85
|
const getTreeItemInfo = (item) => {
|
|
86
86
|
const treeItem = treeMap.get(item);
|
|
87
87
|
if (!treeItem) {
|
|
@@ -142,6 +142,10 @@ function createTree(config) {
|
|
|
142
142
|
const isExpanded = item.isExpanded;
|
|
143
143
|
refreshElements();
|
|
144
144
|
switch (key) {
|
|
145
|
+
case "Enter":
|
|
146
|
+
case " ":
|
|
147
|
+
toggleExpanded(item);
|
|
148
|
+
break;
|
|
145
149
|
case "ArrowLeft":
|
|
146
150
|
if (isExpanded) {
|
|
147
151
|
toggleExpanded(item);
|
package/utils/directive.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("@amadeus-it-group/tansu");
|
|
4
4
|
require("esm-env");
|
|
5
|
-
const utils_directive = require("../directive-
|
|
5
|
+
const utils_directive = require("../directive-BtOvPrmt.cjs");
|
|
6
6
|
require("../func-Qd3cD9a3.cjs");
|
|
7
7
|
require("./stores.cjs");
|
|
8
8
|
exports.attributesData = utils_directive.attributesData;
|
package/utils/directive.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ReadableSignal } from '@amadeus-it-group/tansu';
|
|
2
2
|
import type { AttributeValue, Directive, DirectivesAndOptParam, SSRHTMLElement, StyleKey, StyleValue } from '../types';
|
|
3
|
+
import { type ClassValue } from 'clsx';
|
|
3
4
|
/**
|
|
4
5
|
* On a browser environment, returns true if the given element is an HTMLElement.
|
|
5
6
|
* On a server environment, always returns false.
|
|
@@ -266,9 +267,10 @@ export declare const attributesData: <T extends any[]>(...directives: Directives
|
|
|
266
267
|
style: Partial<Record<StyleKey, StyleValue>>;
|
|
267
268
|
};
|
|
268
269
|
/**
|
|
269
|
-
* Directive that takes as an argument a string containing CSS classes to be put on the HTML element.
|
|
270
|
+
* Directive that takes as an argument a string, array or object containing CSS classes to be put on the HTML element.
|
|
271
|
+
* The class attribute is computed using the clsx library.
|
|
270
272
|
*/
|
|
271
|
-
export declare const classDirective: Directive<
|
|
273
|
+
export declare const classDirective: Directive<ClassValue>;
|
|
272
274
|
/**
|
|
273
275
|
* Combines multiple directives into a single attributes object.
|
|
274
276
|
*
|
package/utils/directive.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "@amadeus-it-group/tansu";
|
|
2
2
|
import "esm-env";
|
|
3
|
-
import { o, a, c, b, p, n, g, j, f, h, q, d, e, i, m, k, l, r, s } from "../directive-
|
|
3
|
+
import { o, a, c, b, p, n, g, j, f, h, q, d, e, i, m, k, l, r, s } from "../directive-DrDJkTS5.js";
|
|
4
4
|
import "../func-DR0n-ShK.js";
|
|
5
5
|
import "./stores.js";
|
|
6
6
|
export {
|