@vellira-ui/react 2.186.10 → 2.186.12

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.
@@ -10,8 +10,8 @@ export declare const useModalRootState: ({ open, defaultOpen, onOpenChange, anim
10
10
  contentId: string;
11
11
  contentRef: import('react').RefObject<HTMLElement | null>;
12
12
  descriptionId: string;
13
- finalFocus: import('react').RefObject<HTMLElement> | undefined;
14
- initialFocus: import('react').RefObject<HTMLElement> | undefined;
13
+ finalFocus: import('react').RefObject<HTMLElement | null> | undefined;
14
+ initialFocus: import('react').RefObject<HTMLElement | null> | undefined;
15
15
  zIndex: number | undefined;
16
16
  modal: boolean;
17
17
  onCloseAutoFocus: ((event: import('..').ModalAutoFocusEvent) => void) | undefined;
@@ -8,8 +8,8 @@ export type ModalContextValue = {
8
8
  contentId: string;
9
9
  contentRef: MutableRefObject<HTMLElement | null>;
10
10
  descriptionId: string;
11
- finalFocus?: RefObject<HTMLElement>;
12
- initialFocus?: RefObject<HTMLElement>;
11
+ finalFocus?: RefObject<HTMLElement | null>;
12
+ initialFocus?: RefObject<HTMLElement | null>;
13
13
  zIndex?: number;
14
14
  modal: boolean;
15
15
  onCloseAutoFocus?: (event: ModalAutoFocusEvent) => void;
@@ -24,9 +24,9 @@ export interface ModalProps extends BaseModalProps {
24
24
  /** Keeps keyboard focus inside the modal while open. */
25
25
  trapFocus?: boolean;
26
26
  /** Element that should receive focus when the modal opens. */
27
- initialFocus?: RefObject<HTMLElement>;
27
+ initialFocus?: RefObject<HTMLElement | null>;
28
28
  /** Element that should receive focus when the modal closes. */
29
- finalFocus?: RefObject<HTMLElement>;
29
+ finalFocus?: RefObject<HTMLElement | null>;
30
30
  /** Called before focus moves into the modal after opening. */
31
31
  onOpenAutoFocus?: (event: ModalAutoFocusEvent) => void;
32
32
  /** Called before focus is restored after closing. */
@@ -1,3 +1,4 @@
1
+ export declare function WebModalNullableFocusRefsExample(): import('react').JSX.Element;
1
2
  export declare function WebInputValueChangeExample(): import('react').JSX.Element;
2
3
  export declare function WebCheckboxCheckedChangeExample(): import('react').JSX.Element;
3
4
  export declare function WebRadioCheckedChangeExample(): import('react').JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellira-ui/react",
3
- "version": "2.186.10",
3
+ "version": "2.186.12",
4
4
  "description": "Web components for Vellira Design System",
5
5
  "keywords": [
6
6
  "vellira",
@@ -67,10 +67,10 @@
67
67
  "@floating-ui/react": "^0.27.19",
68
68
  "clsx": "^2.1.1",
69
69
  "focus-trap-react": "^12.0.2",
70
- "@vellira-ui/core": "2.186.10",
71
- "@vellira-ui/tokens": "2.186.10",
72
- "@vellira-ui/types": "2.186.10",
73
- "@vellira-ui/icons": "2.186.10"
70
+ "@vellira-ui/core": "2.186.12",
71
+ "@vellira-ui/icons": "2.186.12",
72
+ "@vellira-ui/tokens": "2.186.12",
73
+ "@vellira-ui/types": "2.186.12"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@testing-library/jest-dom": "^6.9.1",