@agnos-ui/core 0.0.1-alpha.1 → 0.0.1-alpha.10
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.d.ts → components/accordion/accordion.d.ts} +27 -18
- package/{accordion.js → components/accordion/accordion.js} +80 -76
- package/components/accordion/index.d.ts +1 -0
- package/components/accordion/index.js +1 -0
- package/components/alert/alert.d.ts +31 -0
- package/components/alert/alert.js +22 -0
- package/{alert.d.ts → components/alert/common.d.ts} +17 -21
- package/{alert.js → components/alert/common.js} +21 -19
- package/components/alert/index.d.ts +2 -0
- package/components/alert/index.js +2 -0
- package/components/modal/index.d.ts +1 -0
- package/components/modal/index.js +1 -0
- package/{modal → components/modal}/modal.d.ts +28 -21
- package/{modal → components/modal}/modal.js +58 -28
- package/components/pagination/index.d.ts +2 -0
- package/components/pagination/index.js +2 -0
- package/{pagination.d.ts → components/pagination/pagination.d.ts} +2 -3
- package/{pagination.js → components/pagination/pagination.js} +5 -4
- package/components/progressbar/index.d.ts +1 -0
- package/components/progressbar/index.js +1 -0
- package/components/progressbar/progressbar.d.ts +86 -0
- package/components/progressbar/progressbar.js +78 -0
- package/components/rating/index.d.ts +1 -0
- package/components/rating/index.js +1 -0
- package/{rating.d.ts → components/rating/rating.d.ts} +4 -5
- package/{rating.js → components/rating/rating.js} +6 -9
- package/components/select/index.d.ts +1 -0
- package/components/select/index.js +1 -0
- package/components/select/select.d.ts +337 -0
- package/components/select/select.js +266 -0
- package/components/slider/index.d.ts +1 -0
- package/components/slider/index.js +1 -0
- package/components/slider/slider.d.ts +245 -0
- package/components/slider/slider.js +413 -0
- package/config.d.ts +17 -7
- package/config.js +3 -3
- package/index.d.ts +23 -10
- package/index.js +29 -10
- package/package.json +32 -4
- package/services/extendWidget.d.ts +23 -0
- package/services/extendWidget.js +35 -0
- package/services/floatingUI.d.ts +56 -0
- package/services/floatingUI.js +105 -0
- package/services/focustrack.js +5 -5
- package/services/intersection.d.ts +9 -1
- package/services/intersection.js +10 -2
- package/services/navManager.d.ts +93 -0
- package/services/navManager.js +172 -0
- package/services/portal.d.ts +7 -0
- package/services/portal.js +15 -4
- package/services/siblingsInert.d.ts +2 -1
- package/services/siblingsInert.js +2 -2
- package/{transitions → services/transitions}/baseTransitions.d.ts +15 -2
- package/{transitions → services/transitions}/baseTransitions.js +21 -10
- package/services/transitions/bootstrap/collapse.d.ts +2 -0
- package/services/transitions/bootstrap/fade.d.ts +1 -0
- package/services/transitions/bootstrap.d.ts +2 -0
- package/services/transitions/bootstrap.js +2 -0
- package/services/transitions/collapse.d.ts +43 -0
- package/{transitions → services/transitions}/collapse.js +15 -2
- package/{transitions → services/transitions}/cssTransitions.d.ts +6 -0
- package/{transitions → services/transitions}/cssTransitions.js +8 -4
- package/{transitions → services/transitions}/simpleClassTransition.d.ts +12 -1
- package/services/transitions/simpleClassTransition.js +42 -0
- package/types.d.ts +43 -4
- package/types.js +7 -0
- package/{services/directiveUtils.js → utils/directive.js} +1 -1
- package/utils/internal/checks.d.ts +49 -0
- package/utils/internal/checks.js +60 -0
- package/utils/internal/dom.d.ts +25 -0
- package/utils/internal/dom.js +61 -0
- package/utils/internal/func.d.ts +11 -0
- package/utils/internal/func.js +11 -0
- package/utils/internal/isFocusable.d.ts +9 -0
- package/utils/internal/isFocusable.js +35 -0
- package/utils/internal/math.d.ts +5 -0
- package/utils/internal/math.js +13 -0
- package/utils/internal/promise.d.ts +87 -0
- package/utils/internal/promise.js +169 -0
- package/utils/internal/scrollbars.d.ts +8 -0
- package/{modal → utils/internal}/scrollbars.js +7 -1
- package/utils/internal/sort.d.ts +16 -0
- package/utils/internal/sort.js +28 -0
- package/utils/internal/textDirection.d.ts +7 -0
- package/utils/internal/textDirection.js +7 -0
- package/utils/internal/traversal.d.ts +54 -0
- package/utils/internal/traversal.js +105 -0
- package/{services → utils}/stores.d.ts +67 -33
- package/{services → utils}/stores.js +121 -59
- package/utils/writables.d.ts +32 -0
- package/utils/writables.js +72 -0
- package/modal/scrollbars.d.ts +0 -2
- package/select.d.ts +0 -196
- package/select.js +0 -240
- package/services/checks.d.ts +0 -32
- package/services/checks.js +0 -43
- package/services/index.d.ts +0 -7
- package/services/index.js +0 -7
- package/services/writables.d.ts +0 -7
- package/services/writables.js +0 -16
- package/transitions/bootstrap/collapse.d.ts +0 -2
- package/transitions/bootstrap/fade.d.ts +0 -1
- package/transitions/bootstrap/index.d.ts +0 -2
- package/transitions/bootstrap/index.js +0 -2
- package/transitions/collapse.d.ts +0 -29
- package/transitions/index.d.ts +0 -5
- package/transitions/index.js +0 -5
- package/transitions/simpleClassTransition.js +0 -28
- package/transitions/utils.d.ts +0 -20
- package/transitions/utils.js +0 -83
- package/utils.d.ts +0 -2
- package/utils.js +0 -2
- /package/{commonProps.d.ts → components/commonProps.d.ts} +0 -0
- /package/{commonProps.js → components/commonProps.js} +0 -0
- /package/{pagination.utils.d.ts → components/pagination/bootstrap.d.ts} +0 -0
- /package/{pagination.utils.js → components/pagination/bootstrap.js} +0 -0
- /package/{transitions → services/transitions}/bootstrap/collapse.js +0 -0
- /package/{transitions → services/transitions}/bootstrap/fade.js +0 -0
- /package/{services/directiveUtils.d.ts → utils/directive.d.ts} +0 -0
package/transitions/utils.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
const noop = () => {
|
|
2
|
-
/* nothing to do*/
|
|
3
|
-
};
|
|
4
|
-
const truthyValue = (value) => !!value;
|
|
5
|
-
export const promiseFromStore = (store, condition = truthyValue) => {
|
|
6
|
-
let resolve;
|
|
7
|
-
const promise = new Promise((r) => (resolve = r));
|
|
8
|
-
let unsubscribe = () => {
|
|
9
|
-
storeUnsubscribe();
|
|
10
|
-
unsubscribe = noop;
|
|
11
|
-
};
|
|
12
|
-
let storeUnsubscribe = noop;
|
|
13
|
-
storeUnsubscribe = store.subscribe((value) => {
|
|
14
|
-
if (condition(value)) {
|
|
15
|
-
resolve(value);
|
|
16
|
-
unsubscribe();
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
if (unsubscribe === noop) {
|
|
20
|
-
storeUnsubscribe();
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
promise,
|
|
24
|
-
unsubscribe() {
|
|
25
|
-
unsubscribe();
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export const promiseFromEvent = (element, event) => {
|
|
30
|
-
let resolve;
|
|
31
|
-
const promise = new Promise((r) => (resolve = r));
|
|
32
|
-
let unsubscribe = () => {
|
|
33
|
-
element.removeEventListener(event, eventListener);
|
|
34
|
-
unsubscribe = noop;
|
|
35
|
-
};
|
|
36
|
-
const eventListener = (event) => {
|
|
37
|
-
if (event.target === element) {
|
|
38
|
-
resolve(event);
|
|
39
|
-
unsubscribe();
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
element.addEventListener(event, eventListener);
|
|
43
|
-
return {
|
|
44
|
-
promise,
|
|
45
|
-
unsubscribe() {
|
|
46
|
-
unsubscribe();
|
|
47
|
-
},
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export const promiseFromTimeout = (delay) => {
|
|
51
|
-
let timeout;
|
|
52
|
-
return {
|
|
53
|
-
promise: new Promise((r) => {
|
|
54
|
-
timeout = setTimeout(() => {
|
|
55
|
-
timeout = undefined;
|
|
56
|
-
r();
|
|
57
|
-
}, delay);
|
|
58
|
-
}),
|
|
59
|
-
unsubscribe() {
|
|
60
|
-
if (timeout) {
|
|
61
|
-
clearTimeout(timeout);
|
|
62
|
-
timeout = undefined;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Launch a reflow using a call to the provided html element getBoudingClientRect
|
|
69
|
-
* @param element the html element
|
|
70
|
-
*/
|
|
71
|
-
export function reflow(element = document.body) {
|
|
72
|
-
element.getBoundingClientRect();
|
|
73
|
-
}
|
|
74
|
-
export const addClasses = (element, classes) => {
|
|
75
|
-
if (classes && classes.length > 0) {
|
|
76
|
-
element.classList.add(...classes);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
export const removeClasses = (element, classes) => {
|
|
80
|
-
if (classes && classes.length > 0) {
|
|
81
|
-
element.classList.remove(...classes);
|
|
82
|
-
}
|
|
83
|
-
};
|
package/utils.d.ts
DELETED
package/utils.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|