@botonic/webviews 2.37.0 → 2.38.1

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.
@@ -1,3 +1,5 @@
1
1
  export { WebviewBody, type WebviewBodyProps } from './webview-body';
2
+ export { WebviewDialog, type WebviewDialogProps } from './webview-dialog';
3
+ export { WebviewFooter, type WebviewFooterProps } from './webview-footer';
2
4
  export { WebviewFrame, type WebviewFrameProps } from './webview-frame';
3
5
  export { WebviewHeader, type WebviewHeaderProps } from './webview-header';
@@ -3,5 +3,11 @@ export interface WebviewBodyProps {
3
3
  children: ReactNode;
4
4
  className?: string;
5
5
  variant?: 'default' | 'padded' | 'scrollable';
6
+ /**
7
+ * When true, marks the body inert — removed from the interaction and
8
+ * accessibility tree. Used by templates to isolate background content while
9
+ * a modal dialog is open (e.g. a submission confirmation overlay).
10
+ */
11
+ inert?: boolean;
6
12
  }
7
- export declare function WebviewBody({ children, className, variant, }: WebviewBodyProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function WebviewBody({ children, className, variant, inert, }: WebviewBodyProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export { WebviewDialog, type WebviewDialogProps } from './webview-dialog';
@@ -0,0 +1,27 @@
1
+ import { ReactNode } from 'react';
2
+ export interface WebviewDialogProps {
3
+ open: boolean;
4
+ variant?: 'default' | 'success';
5
+ /** Accessible name for the dialog. */
6
+ label: string;
7
+ /** Content rendered inside the dialog card. */
8
+ children?: ReactNode;
9
+ className?: string;
10
+ /**
11
+ * Called when the user attempts to dismiss the dialog via Escape.
12
+ * When omitted, Escape is suppressed (the dialog cannot be dismissed
13
+ * by keyboard — appropriate for auto-dismissing success dialogs).
14
+ */
15
+ onEscape?: () => void;
16
+ }
17
+ /**
18
+ * Reusable webview-level dialog overlay.
19
+ *
20
+ * Renders a backdrop, an accessible `role="dialog"` with `aria-modal`,
21
+ * moves focus into the dialog on open, traps Tab while open, and
22
+ * restores focus to the previously focused element on close.
23
+ *
24
+ * Visual appearance is driven by `--webview-dialog-*` tokens so
25
+ * templates can override the look without touching the component.
26
+ */
27
+ export declare function WebviewDialog({ open, variant, label, children, className, onEscape, }: WebviewDialogProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export { WebviewFooter, type WebviewFooterProps } from './webview-footer';
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface WebviewFooterProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ /**
6
+ * When true, marks the footer inert — removed from the interaction and
7
+ * accessibility tree. Used by templates to isolate background controls while
8
+ * a modal dialog is open (e.g. a submission confirmation overlay).
9
+ */
10
+ inert?: boolean;
11
+ }
12
+ export declare function WebviewFooter({ children, className, inert, }: WebviewFooterProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- export { WebviewBody, type WebviewBodyProps, WebviewFrame, type WebviewFrameProps, WebviewHeader, type WebviewHeaderProps, } from './content';
1
+ export { WebviewBody, type WebviewBodyProps, WebviewDialog, type WebviewDialogProps, WebviewFooter, type WebviewFooterProps, WebviewFrame, type WebviewFrameProps, WebviewHeader, type WebviewHeaderProps, } from './content';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/webviews",
3
- "version": "2.37.0",
3
+ "version": "2.38.1",
4
4
  "type": "module",
5
5
  "types": "./index.d.ts",
6
6
  "module": "./index.js",
@@ -12,10 +12,10 @@
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "@botonic/core": "2.37.0",
16
- "@botonic/shared": "2.37.0",
17
- "@botonic/webchat-core": "2.37.0",
18
- "@lilara/foundations": ">=0.11.2",
15
+ "@botonic/core": "2.38.1",
16
+ "@botonic/shared": "2.38.1",
17
+ "@botonic/webchat-core": "2.38.1",
18
+ "@lilara/foundations": ">=0.11.8",
19
19
  "class-variance-authority": "^0.7.0",
20
20
  "react": "18.3.1"
21
21
  },