@telia-ace/widget-types-grid 1.3.58-rc.0 → 1.3.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-types-grid",
3
- "version": "1.3.58-rc.0",
3
+ "version": "1.3.58",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -10,11 +10,11 @@
10
10
  }
11
11
  },
12
12
  "dependencies": {
13
- "@telia-ace/widget-core": "^1.3.58-rc.0",
14
- "@telia-ace/widget-routing": "^1.3.58-rc.0",
15
- "@telia-ace/widget-services": "^1.3.58-rc.0",
16
- "@telia-ace/widget-ui": "^1.3.58-rc.0",
17
- "@telia-ace/widget-utilities": "^1.3.58-rc.0",
13
+ "@telia-ace/widget-core": "^1.3.58",
14
+ "@telia-ace/widget-routing": "^1.3.58",
15
+ "@telia-ace/widget-services": "^1.3.58",
16
+ "@telia-ace/widget-ui": "^1.3.58",
17
+ "@telia-ace/widget-utilities": "^1.3.58",
18
18
  "@webprovisions/bootstrapping": "^1.0.14",
19
19
  "@webprovisions/platform": "^1.1.4"
20
20
  },
@@ -24,7 +24,6 @@
24
24
  "@emotion/styled": "11.11.0",
25
25
  "react": "^18.2.0",
26
26
  "react-dom": "^18.2.0",
27
- "react-router": "^5.3.4",
28
27
  "react-router-dom": "5.3.4",
29
28
  "react-transition-group": "4.4.5"
30
29
  }
@@ -0,0 +1,29 @@
1
+ import { Widget } from '@webprovisions/platform';
2
+
3
+ export type IsVisible = (element: HTMLElement) => boolean;
4
+ export declare const isVisible: IsVisible;
5
+ export declare const getFocusable: (root: HTMLElement, visible?: IsVisible) => HTMLElement[];
6
+ /** Areas with `modal: true` are handled by ModalPlugin. */
7
+ export declare const isModalActive: (root: HTMLElement) => boolean;
8
+ /** Lets Enter and Space activate triggers that are not native buttons or links. */
9
+ export declare const activateOnKeyboard: (element: HTMLElement) => () => void;
10
+ /**
11
+ * Keeps Tab focus within `root`. At the edges focus moves to `trigger`
12
+ * (when focusable) so the widget can always be closed, otherwise it wraps.
13
+ */
14
+ export declare const trapTab: (event: KeyboardEvent, root: HTMLElement, trigger?: HTMLElement, visible?: IsVisible) => void;
15
+ /**
16
+ * Focuses the first visible h1 in `root`, retrying until it is rendered.
17
+ * Falls back to the root area after `timeout` ms. Returns a cancel function.
18
+ */
19
+ export declare const focusHeadingWhenVisible: (root: HTMLElement, { timeout, interval, visible }?: {
20
+ timeout?: number | undefined;
21
+ interval?: number | undefined;
22
+ visible?: IsVisible | undefined;
23
+ }) => () => void;
24
+ /**
25
+ * Modal-like keyboard behaviour for widgets opened by a trigger (floating/bot):
26
+ * focus the heading on open, keep Tab within the widget and its trigger,
27
+ * and close on Escape unless an inner layer (drawer, dropdown etc.) handled it.
28
+ */
29
+ export declare const setupOverlayFocus: (widget: Widget, root: HTMLElement, trigger: HTMLElement, visible?: IsVisible) => () => void;