@agnos-ui/core 0.0.1-alpha.7 → 0.0.1-alpha.9

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.
@@ -24,12 +24,12 @@ const defaultConfig = {
24
24
  ariaCloseButtonLabel: 'Close',
25
25
  backdrop: true,
26
26
  backdropClass: '',
27
- backdropTransition: fadeTransition,
27
+ backdropTransition: fadeTransition, // TODO: is it ok to depend on bootstrap transition?
28
28
  closeButton: true,
29
29
  closeOnOutsideClick: true,
30
30
  container: typeof window !== 'undefined' ? document.body : null,
31
31
  className: '',
32
- modalTransition: fadeTransition,
32
+ modalTransition: fadeTransition, // TODO: is it ok to depend on bootstrap transition?
33
33
  onBeforeClose: noop,
34
34
  onVisibleChange: noop,
35
35
  onHidden: noop,
package/package.json CHANGED
@@ -54,7 +54,7 @@
54
54
  "@floating-ui/dom": "*"
55
55
  },
56
56
  "sideEffects": false,
57
- "version": "0.0.1-alpha.7",
57
+ "version": "0.0.1-alpha.9",
58
58
  "homepage": "https://amadeusitgroup.github.io/AgnosUI/latest/",
59
59
  "bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
60
60
  "license": "MIT",
@@ -12,11 +12,11 @@ export const activeElement$ = readable(null, {
12
12
  function onFocusOut() {
13
13
  setTimeout(setActiveElement);
14
14
  }
15
- container.addEventListener(evtFocusIn, setActiveElement);
16
- container.addEventListener(evtFocusOut, onFocusOut);
15
+ container.addEventListener(evtFocusIn, setActiveElement, { capture: true });
16
+ container.addEventListener(evtFocusOut, onFocusOut, { capture: true });
17
17
  return () => {
18
- container.removeEventListener(evtFocusIn, setActiveElement);
19
- container.removeEventListener(evtFocusOut, onFocusOut);
18
+ container.removeEventListener(evtFocusIn, setActiveElement, { capture: true });
19
+ container.removeEventListener(evtFocusOut, onFocusOut, { capture: true });
20
20
  };
21
21
  },
22
22
  equal: Object.is,
@@ -72,6 +72,12 @@ export declare const createNavManager: () => {
72
72
  focusFirst: ({ event }?: {
73
73
  event?: KeyboardEvent | undefined;
74
74
  }) => HTMLElement | null;
75
+ focusFirstLeft: (args_0?: {
76
+ event?: KeyboardEvent | undefined;
77
+ } | undefined) => HTMLElement | null;
78
+ focusFirstRight: (args_0?: {
79
+ event?: KeyboardEvent | undefined;
80
+ } | undefined) => HTMLElement | null;
75
81
  focusLast: ({ event }?: {
76
82
  event?: KeyboardEvent | undefined;
77
83
  }) => HTMLElement | null;
@@ -152,6 +152,8 @@ export const createNavManager = () => {
152
152
  const focusLast = ({ event } = {}) => preventDefaultIfRelevant(focusIndex(elementsInDomOrder$().length - 1, -1), event);
153
153
  const focusLeft = (...args) => (ancestorDirection() === 'rtl' ? focusNext : focusPrevious)(...args);
154
154
  const focusRight = (...args) => (ancestorDirection() === 'rtl' ? focusPrevious : focusNext)(...args);
155
+ const focusFirstLeft = (...args) => (ancestorDirection() === 'rtl' ? focusLast : focusFirst)(...args);
156
+ const focusFirstRight = (...args) => (ancestorDirection() === 'rtl' ? focusFirst : focusLast)(...args);
155
157
  const navManager = {
156
158
  elementsInDomOrder$,
157
159
  directive,
@@ -159,6 +161,8 @@ export const createNavManager = () => {
159
161
  focusPrevious,
160
162
  focusNext,
161
163
  focusFirst,
164
+ focusFirstLeft,
165
+ focusFirstRight,
162
166
  focusLast,
163
167
  focusLeft,
164
168
  focusRight,