@foris/avocado-suite 1.14.2 → 1.16.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/dist/avocado-suite.es.js +10340 -10146
- package/dist/avocado-suite.umd.js +154 -154
- package/dist/components/Pill/Pill.d.ts +15 -6
- package/dist/components/checkbox/Checkbox.d.ts +4 -0
- package/dist/components/header-navigation/HeaderNavigation.d.ts +23 -6
- package/dist/components/header-navigation/headerNavigation.util.d.ts +3 -0
- package/dist/components/header-navigation/headerNavigation.util.test.d.ts +1 -0
- package/dist/components/header-navigation/index.d.ts +1 -1
- package/dist/components/link/Link.d.ts +3 -3
- package/dist/components/modal/Modal.d.ts +18 -1
- package/dist/components/modal/modal.locale.d.ts +8 -0
- package/dist/components/select/Select.d.ts +2 -0
- package/dist/components/select/components/SelectIndicators.d.ts +1 -0
- package/dist/components/select/components/SelectInput.d.ts +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/aria/mergeIds.d.ts +2 -0
- package/dist/utils/aria/mergeIds.test.d.ts +1 -0
- package/dist/utils/focus/containTab.d.ts +5 -0
- package/dist/utils/focus/useDialogFocus.d.ts +13 -0
- package/dist/utils/focus/useDialogFocus.test.d.ts +1 -0
- package/package.json +3 -3
- package/dist/components/drawer/utils/drawerKeyboard.d.ts +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { KeyboardEvent } from 'react';
|
|
2
|
+
/** Resolves the current tab order so conditional controls cannot leave stale boundaries. */
|
|
3
|
+
export declare function getTabStops(panel: HTMLElement): HTMLElement[];
|
|
4
|
+
/** Wraps Tab at the panel boundaries without moving focus on mount or mode changes. */
|
|
5
|
+
export declare function containTab(event: KeyboardEvent<HTMLDivElement>): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
/** The element to focus, as a ref or as a function read when the dialog opens. */
|
|
3
|
+
export type FocusTarget = RefObject<HTMLElement> | (() => HTMLElement | null);
|
|
4
|
+
interface DialogFocusOptions {
|
|
5
|
+
active: boolean;
|
|
6
|
+
containerRef: RefObject<HTMLElement>;
|
|
7
|
+
initialFocus?: FocusTarget;
|
|
8
|
+
/** Focus target on close when the opener is no longer in the document. */
|
|
9
|
+
finalFocus?: () => HTMLElement | null;
|
|
10
|
+
}
|
|
11
|
+
/** Moves focus into a dialog when it opens and back to its opener when it closes. */
|
|
12
|
+
export declare function useDialogFocus({ active, containerRef, initialFocus, finalFocus, }: DialogFocusOptions): void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foris/avocado-suite",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"react-toastify": "9.0.3",
|
|
40
40
|
"remark-gfm": "4.0.1",
|
|
41
41
|
"zustand": "4.5.4",
|
|
42
|
-
"@foris/avocado-
|
|
43
|
-
"@foris/avocado-
|
|
42
|
+
"@foris/avocado-icons": "1.20.0",
|
|
43
|
+
"@foris/avocado-core": "1.3.4"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@testing-library/jest-dom": "6.4.0",
|