@agnos-ui/core 0.0.1-alpha.1 → 0.0.1-alpha.11

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.
Files changed (119) hide show
  1. package/{accordion.d.ts → components/accordion/accordion.d.ts} +27 -18
  2. package/{accordion.js → components/accordion/accordion.js} +80 -76
  3. package/components/accordion/index.d.ts +1 -0
  4. package/components/accordion/index.js +1 -0
  5. package/components/alert/alert.d.ts +31 -0
  6. package/components/alert/alert.js +22 -0
  7. package/{alert.d.ts → components/alert/common.d.ts} +17 -21
  8. package/{alert.js → components/alert/common.js} +21 -19
  9. package/components/alert/index.d.ts +2 -0
  10. package/components/alert/index.js +2 -0
  11. package/components/modal/index.d.ts +1 -0
  12. package/components/modal/index.js +1 -0
  13. package/{modal → components/modal}/modal.d.ts +28 -21
  14. package/{modal → components/modal}/modal.js +58 -28
  15. package/components/pagination/index.d.ts +2 -0
  16. package/components/pagination/index.js +2 -0
  17. package/{pagination.d.ts → components/pagination/pagination.d.ts} +2 -3
  18. package/{pagination.js → components/pagination/pagination.js} +5 -4
  19. package/components/progressbar/index.d.ts +1 -0
  20. package/components/progressbar/index.js +1 -0
  21. package/components/progressbar/progressbar.d.ts +86 -0
  22. package/components/progressbar/progressbar.js +78 -0
  23. package/components/rating/index.d.ts +1 -0
  24. package/components/rating/index.js +1 -0
  25. package/{rating.d.ts → components/rating/rating.d.ts} +4 -5
  26. package/{rating.js → components/rating/rating.js} +6 -9
  27. package/components/select/index.d.ts +1 -0
  28. package/components/select/index.js +1 -0
  29. package/components/select/select.d.ts +337 -0
  30. package/components/select/select.js +266 -0
  31. package/components/slider/index.d.ts +1 -0
  32. package/components/slider/index.js +1 -0
  33. package/components/slider/slider.d.ts +245 -0
  34. package/components/slider/slider.js +415 -0
  35. package/config.d.ts +17 -7
  36. package/config.js +3 -3
  37. package/index.d.ts +23 -10
  38. package/index.js +29 -10
  39. package/package.json +32 -4
  40. package/services/extendWidget.d.ts +23 -0
  41. package/services/extendWidget.js +35 -0
  42. package/services/floatingUI.d.ts +56 -0
  43. package/services/floatingUI.js +105 -0
  44. package/services/focustrack.js +5 -5
  45. package/services/intersection.d.ts +9 -1
  46. package/services/intersection.js +10 -2
  47. package/services/navManager.d.ts +93 -0
  48. package/services/navManager.js +172 -0
  49. package/services/portal.d.ts +7 -0
  50. package/services/portal.js +15 -4
  51. package/services/siblingsInert.d.ts +2 -1
  52. package/services/siblingsInert.js +2 -2
  53. package/{transitions → services/transitions}/baseTransitions.d.ts +15 -2
  54. package/{transitions → services/transitions}/baseTransitions.js +21 -10
  55. package/services/transitions/bootstrap/collapse.d.ts +2 -0
  56. package/services/transitions/bootstrap/fade.d.ts +1 -0
  57. package/services/transitions/bootstrap.d.ts +2 -0
  58. package/services/transitions/bootstrap.js +2 -0
  59. package/services/transitions/collapse.d.ts +43 -0
  60. package/{transitions → services/transitions}/collapse.js +15 -2
  61. package/{transitions → services/transitions}/cssTransitions.d.ts +6 -0
  62. package/{transitions → services/transitions}/cssTransitions.js +8 -4
  63. package/{transitions → services/transitions}/simpleClassTransition.d.ts +12 -1
  64. package/services/transitions/simpleClassTransition.js +42 -0
  65. package/types.d.ts +43 -4
  66. package/types.js +7 -0
  67. package/{services/directiveUtils.js → utils/directive.js} +1 -1
  68. package/utils/internal/checks.d.ts +49 -0
  69. package/utils/internal/checks.js +60 -0
  70. package/utils/internal/dom.d.ts +25 -0
  71. package/utils/internal/dom.js +61 -0
  72. package/utils/internal/func.d.ts +11 -0
  73. package/utils/internal/func.js +11 -0
  74. package/utils/internal/isFocusable.d.ts +9 -0
  75. package/utils/internal/isFocusable.js +35 -0
  76. package/utils/internal/math.d.ts +5 -0
  77. package/utils/internal/math.js +13 -0
  78. package/utils/internal/promise.d.ts +87 -0
  79. package/utils/internal/promise.js +169 -0
  80. package/utils/internal/scrollbars.d.ts +8 -0
  81. package/{modal → utils/internal}/scrollbars.js +7 -1
  82. package/utils/internal/sort.d.ts +16 -0
  83. package/utils/internal/sort.js +28 -0
  84. package/utils/internal/textDirection.d.ts +7 -0
  85. package/utils/internal/textDirection.js +7 -0
  86. package/utils/internal/traversal.d.ts +54 -0
  87. package/utils/internal/traversal.js +105 -0
  88. package/{services → utils}/stores.d.ts +67 -33
  89. package/{services → utils}/stores.js +121 -59
  90. package/utils/writables.d.ts +32 -0
  91. package/utils/writables.js +72 -0
  92. package/modal/scrollbars.d.ts +0 -2
  93. package/select.d.ts +0 -196
  94. package/select.js +0 -240
  95. package/services/checks.d.ts +0 -32
  96. package/services/checks.js +0 -43
  97. package/services/index.d.ts +0 -7
  98. package/services/index.js +0 -7
  99. package/services/writables.d.ts +0 -7
  100. package/services/writables.js +0 -16
  101. package/transitions/bootstrap/collapse.d.ts +0 -2
  102. package/transitions/bootstrap/fade.d.ts +0 -1
  103. package/transitions/bootstrap/index.d.ts +0 -2
  104. package/transitions/bootstrap/index.js +0 -2
  105. package/transitions/collapse.d.ts +0 -29
  106. package/transitions/index.d.ts +0 -5
  107. package/transitions/index.js +0 -5
  108. package/transitions/simpleClassTransition.js +0 -28
  109. package/transitions/utils.d.ts +0 -20
  110. package/transitions/utils.js +0 -83
  111. package/utils.d.ts +0 -2
  112. package/utils.js +0 -2
  113. /package/{commonProps.d.ts → components/commonProps.d.ts} +0 -0
  114. /package/{commonProps.js → components/commonProps.js} +0 -0
  115. /package/{pagination.utils.d.ts → components/pagination/bootstrap.d.ts} +0 -0
  116. /package/{pagination.utils.js → components/pagination/bootstrap.js} +0 -0
  117. /package/{transitions → services/transitions}/bootstrap/collapse.js +0 -0
  118. /package/{transitions → services/transitions}/bootstrap/fade.js +0 -0
  119. /package/{services/directiveUtils.d.ts → utils/directive.d.ts} +0 -0
@@ -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
@@ -1,2 +0,0 @@
1
- export declare const noop: () => void;
2
- export declare const identity: <T>(x: T) => T;
package/utils.js DELETED
@@ -1,2 +0,0 @@
1
- export const noop = () => { };
2
- export const identity = (x) => x;
File without changes