@capra/core 1.5.0 → 1.5.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.
package/dist/index.d.cts CHANGED
@@ -867,7 +867,7 @@ type DrawerProps = {
867
867
  isOpen?: boolean;
868
868
  /**
869
869
  * Called when the drawer should close: header dismiss, footer actions you wire up, scrim click (when a scrim is
870
- * shown), Escape, or browser Back.
870
+ * shown), or Escape.
871
871
  */
872
872
  onClose?: (event?: React$2.MouseEvent | React$2.KeyboardEvent) => void; /** Called when the drawer open state changes (after render). */
873
873
  onOpenChange?: (isOpen: boolean) => void;
@@ -1878,6 +1878,12 @@ interface MenuProps extends StylingOverrideProps {
1878
1878
  * @default 0
1879
1879
  */
1880
1880
  popoverOffset?: number;
1881
+ /**
1882
+ * When `true`, focus is contained in the menu panel while it is open (Tab cycles within the panel; focus restores on close).
1883
+ * The popover stays non-modal so outside pointer dismiss still works. Use for patterns that must not move focus to sibling controls until the menu closes (e.g. horizontal TabNav flyouts).
1884
+ * @default false
1885
+ */
1886
+ trapFocus?: boolean;
1881
1887
  }
1882
1888
  /** Inset of the menu panel relative to the popover shell. */
1883
1889
  type MenuPanelPadding = NonNullable<MenuProps['panelPadding']>;
@@ -1893,6 +1899,7 @@ declare const Menu: {
1893
1899
  itemActiveLabelSemibold,
1894
1900
  panelPadding,
1895
1901
  popoverOffset,
1902
+ trapFocus,
1896
1903
  FORCE__className: classNameOverride
1897
1904
  }: MenuProps): React$2.JSX.Element;
1898
1905
  displayName: string;
package/dist/index.d.mts CHANGED
@@ -867,7 +867,7 @@ type DrawerProps = {
867
867
  isOpen?: boolean;
868
868
  /**
869
869
  * Called when the drawer should close: header dismiss, footer actions you wire up, scrim click (when a scrim is
870
- * shown), Escape, or browser Back.
870
+ * shown), or Escape.
871
871
  */
872
872
  onClose?: (event?: React$2.MouseEvent | React$2.KeyboardEvent) => void; /** Called when the drawer open state changes (after render). */
873
873
  onOpenChange?: (isOpen: boolean) => void;
@@ -1878,6 +1878,12 @@ interface MenuProps extends StylingOverrideProps {
1878
1878
  * @default 0
1879
1879
  */
1880
1880
  popoverOffset?: number;
1881
+ /**
1882
+ * When `true`, focus is contained in the menu panel while it is open (Tab cycles within the panel; focus restores on close).
1883
+ * The popover stays non-modal so outside pointer dismiss still works. Use for patterns that must not move focus to sibling controls until the menu closes (e.g. horizontal TabNav flyouts).
1884
+ * @default false
1885
+ */
1886
+ trapFocus?: boolean;
1881
1887
  }
1882
1888
  /** Inset of the menu panel relative to the popover shell. */
1883
1889
  type MenuPanelPadding = NonNullable<MenuProps['panelPadding']>;
@@ -1893,6 +1899,7 @@ declare const Menu: {
1893
1899
  itemActiveLabelSemibold,
1894
1900
  panelPadding,
1895
1901
  popoverOffset,
1902
+ trapFocus,
1896
1903
  FORCE__className: classNameOverride
1897
1904
  }: MenuProps): React$2.JSX.Element;
1898
1905
  displayName: string;