@agnos-ui/core 0.7.0-next.0 → 0.7.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/components/slider/index.cjs +1 -1
- package/components/slider/index.js +1 -1
- package/components/slider/slider.d.ts +5 -1
- package/components/tree/index.cjs +1 -1
- package/components/tree/index.js +1 -1
- package/components/tree/tree.d.ts +1 -1
- package/index.cjs +2 -2
- package/index.js +2 -2
- package/package.json +1 -1
- package/services/navManager.d.ts +4 -4
- package/{slider-DlOAawbZ.cjs → slider-1OSwok7u.cjs} +4 -2
- package/{slider-DYrwS7Mv.js → slider-6LI4-f5s.js} +4 -2
- package/{tree-C4v9rTQl.js → tree-B2Mr8b31.js} +5 -1
- package/{tree-Bh1WO63V.cjs → tree-Bb5KFqXp.cjs} +5 -1
|
@@ -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-1OSwok7u.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.
|
|
@@ -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-Bb5KFqXp.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
|
package/index.cjs
CHANGED
|
@@ -8,9 +8,9 @@ const pagination = require("./pagination-CBysiPUs.cjs");
|
|
|
8
8
|
const progressbar = require("./progressbar-DghzCJ6_.cjs");
|
|
9
9
|
const rating = require("./rating-DlfOuwuX.cjs");
|
|
10
10
|
const select = require("./select-LBVhNdrd.cjs");
|
|
11
|
-
const slider = require("./slider-
|
|
11
|
+
const slider = require("./slider-1OSwok7u.cjs");
|
|
12
12
|
const toast = require("./toast-D_uSrRZL.cjs");
|
|
13
|
-
const tree = require("./tree-
|
|
13
|
+
const tree = require("./tree-Bb5KFqXp.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");
|
package/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import { c as c4, g as g4 } from "./pagination-DwDRot6q.js";
|
|
|
6
6
|
import { c as c5, g as g5 } from "./progressbar-CGmNq0cS.js";
|
|
7
7
|
import { c as c6, g as g6 } from "./rating-Da38uaZz.js";
|
|
8
8
|
import { c as c7, g as g7 } from "./select-CAEPqdz1.js";
|
|
9
|
-
import { c as c8, g as g8 } from "./slider-
|
|
9
|
+
import { c as c8, g as g8 } from "./slider-6LI4-f5s.js";
|
|
10
10
|
import { c as c9, g as g9 } from "./toast-CpvsibAI.js";
|
|
11
|
-
import { c as c10, g as g10 } from "./tree-
|
|
11
|
+
import { c as c10, g as g10 } from "./tree-B2Mr8b31.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";
|
package/package.json
CHANGED
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
|
/**
|
|
@@ -243,7 +243,8 @@ function createSlider(config) {
|
|
|
243
243
|
bottom: vertical ? rtl ? null : 0 : null,
|
|
244
244
|
top: vertical ? rtl ? 0 : null : null,
|
|
245
245
|
width: vertical ? 100 : sortedValuesPercent[0],
|
|
246
|
-
height: vertical ? sortedValuesPercent[0] : 100
|
|
246
|
+
height: vertical ? sortedValuesPercent[0] : 100,
|
|
247
|
+
id: 0
|
|
247
248
|
}
|
|
248
249
|
];
|
|
249
250
|
} else {
|
|
@@ -254,7 +255,8 @@ function createSlider(config) {
|
|
|
254
255
|
bottom: vertical ? rtl ? null : svp : null,
|
|
255
256
|
top: vertical ? rtl ? array[index] : null : null,
|
|
256
257
|
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
|
|
258
|
+
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100,
|
|
259
|
+
id: index
|
|
258
260
|
};
|
|
259
261
|
}).slice(0, sortedValuesPercent.length - 1);
|
|
260
262
|
}
|
|
@@ -242,7 +242,8 @@ function createSlider(config) {
|
|
|
242
242
|
bottom: vertical ? rtl ? null : 0 : null,
|
|
243
243
|
top: vertical ? rtl ? 0 : null : null,
|
|
244
244
|
width: vertical ? 100 : sortedValuesPercent[0],
|
|
245
|
-
height: vertical ? sortedValuesPercent[0] : 100
|
|
245
|
+
height: vertical ? sortedValuesPercent[0] : 100,
|
|
246
|
+
id: 0
|
|
246
247
|
}
|
|
247
248
|
];
|
|
248
249
|
} else {
|
|
@@ -253,7 +254,8 @@ function createSlider(config) {
|
|
|
253
254
|
bottom: vertical ? rtl ? null : svp : null,
|
|
254
255
|
top: vertical ? rtl ? array[index] : null : null,
|
|
255
256
|
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
|
|
257
|
+
height: vertical ? index === array.length - 1 ? svp : array[index + 1] - svp : 100,
|
|
258
|
+
id: index
|
|
257
259
|
};
|
|
258
260
|
}).slice(0, sortedValuesPercent.length - 1);
|
|
259
261
|
}
|
|
@@ -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);
|
|
@@ -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);
|