@capra/core 1.5.0 → 1.5.2
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/README.md +6 -0
- package/dist/index.cjs +326 -109
- package/dist/index.d.cts +20 -12
- package/dist/index.d.mts +20 -12
- package/dist/index.mjs +326 -109
- package/dist/style.css +93 -67
- package/package.json +8 -7
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$2 from "react";
|
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
3
|
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
4
4
|
import { SvgIcon } from "@capra/icons";
|
|
5
|
+
import { SvgLogo } from "@capra/icons/logos";
|
|
5
6
|
|
|
6
7
|
//#region src/utils/stylingOverride.d.ts
|
|
7
8
|
interface StylingOverrideProps {
|
|
@@ -124,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
124
125
|
*/
|
|
125
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
126
127
|
trailingSlot?: React$2.ReactNode;
|
|
127
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
128
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
128
129
|
//#endregion
|
|
129
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
130
131
|
type FieldLayoutProps = {
|
|
@@ -171,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
171
172
|
leadingSlot?: React$1.ReactNode;
|
|
172
173
|
size?: Size$3;
|
|
173
174
|
trailingSlot?: React$1.ReactNode;
|
|
174
|
-
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
175
|
+
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$1.RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & React$1.RefAttributes<HTMLInputElement>) => React$1.ReactElement) & {
|
|
175
176
|
Item: typeof AutocompleteItem;
|
|
176
177
|
};
|
|
177
178
|
//#endregion
|
|
@@ -428,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
428
429
|
/**
|
|
429
430
|
* A control wrapper for a group of radio buttons.
|
|
430
431
|
*/
|
|
431
|
-
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "
|
|
432
|
+
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "onChange" | "className"> & React$2.RefAttributes<HTMLFieldSetElement>) => React$2.ReactElement;
|
|
432
433
|
//#endregion
|
|
433
434
|
//#region src/components/Radio/Radio.d.ts
|
|
434
435
|
type ChildrenLabel = {
|
|
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
|
|
|
510
511
|
*/
|
|
511
512
|
color?: TagColor;
|
|
512
513
|
/**
|
|
513
|
-
* The icon to display in the tag.
|
|
514
|
+
* The icon or logo to display in the tag.
|
|
514
515
|
*/
|
|
515
|
-
icon?: SvgIcon;
|
|
516
|
+
icon?: SvgIcon | SvgLogo;
|
|
516
517
|
/**
|
|
517
518
|
* The label text to display in the tag.
|
|
518
519
|
*/
|
|
@@ -561,7 +562,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
561
562
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
562
563
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
563
564
|
children?: string | React$2.ReactNode;
|
|
564
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
565
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
565
566
|
//#endregion
|
|
566
567
|
//#region src/components/Collapse/Collapse.d.ts
|
|
567
568
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -635,7 +636,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
635
636
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
636
637
|
showCount?: boolean;
|
|
637
638
|
value?: string | number | undefined;
|
|
638
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
639
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
639
640
|
//#endregion
|
|
640
641
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
641
642
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -659,7 +660,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
659
660
|
/**
|
|
660
661
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
661
662
|
*/
|
|
662
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
663
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
663
664
|
/** Called with the unformatted number value when the number changes. */onChange?: (value: number) => void; /** Locale-aware display and parsing for the displayed value (see https://react-aria.adobe.com/NumberField#format-options) */
|
|
664
665
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
665
666
|
min?: number; /** Maximum value */
|
|
@@ -681,7 +682,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
681
682
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
682
683
|
isInvalid?: boolean;
|
|
683
684
|
};
|
|
684
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
685
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
685
686
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
686
687
|
} & StylingOverrideProps & {
|
|
687
688
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -709,7 +710,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
709
710
|
};
|
|
710
711
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
711
712
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
712
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
713
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
713
714
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
714
715
|
} & StylingOverrideProps & {
|
|
715
716
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -769,7 +770,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
769
770
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
770
771
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
771
772
|
onChange?: (value: string) => void;
|
|
772
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
773
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region src/components/Modal/Modal.d.ts
|
|
775
776
|
type ModalSize = 'sm' | 'md' | 'lg';
|
|
@@ -867,7 +868,7 @@ type DrawerProps = {
|
|
|
867
868
|
isOpen?: boolean;
|
|
868
869
|
/**
|
|
869
870
|
* Called when the drawer should close: header dismiss, footer actions you wire up, scrim click (when a scrim is
|
|
870
|
-
* shown),
|
|
871
|
+
* shown), or Escape.
|
|
871
872
|
*/
|
|
872
873
|
onClose?: (event?: React$2.MouseEvent | React$2.KeyboardEvent) => void; /** Called when the drawer open state changes (after render). */
|
|
873
874
|
onOpenChange?: (isOpen: boolean) => void;
|
|
@@ -1878,6 +1879,12 @@ interface MenuProps extends StylingOverrideProps {
|
|
|
1878
1879
|
* @default 0
|
|
1879
1880
|
*/
|
|
1880
1881
|
popoverOffset?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* When `true`, focus is contained in the menu panel while it is open (Tab cycles within the panel; focus restores on close).
|
|
1884
|
+
* 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).
|
|
1885
|
+
* @default false
|
|
1886
|
+
*/
|
|
1887
|
+
trapFocus?: boolean;
|
|
1881
1888
|
}
|
|
1882
1889
|
/** Inset of the menu panel relative to the popover shell. */
|
|
1883
1890
|
type MenuPanelPadding = NonNullable<MenuProps['panelPadding']>;
|
|
@@ -1893,6 +1900,7 @@ declare const Menu: {
|
|
|
1893
1900
|
itemActiveLabelSemibold,
|
|
1894
1901
|
panelPadding,
|
|
1895
1902
|
popoverOffset,
|
|
1903
|
+
trapFocus,
|
|
1896
1904
|
FORCE__className: classNameOverride
|
|
1897
1905
|
}: MenuProps): React$2.JSX.Element;
|
|
1898
1906
|
displayName: string;
|
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$2 from "react";
|
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
3
|
import { SvgIcon } from "@capra/icons";
|
|
4
4
|
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
5
|
+
import { SvgLogo } from "@capra/icons/logos";
|
|
5
6
|
|
|
6
7
|
//#region src/utils/stylingOverride.d.ts
|
|
7
8
|
interface StylingOverrideProps {
|
|
@@ -124,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
124
125
|
*/
|
|
125
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
126
127
|
trailingSlot?: React$2.ReactNode;
|
|
127
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
128
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
128
129
|
//#endregion
|
|
129
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
130
131
|
type FieldLayoutProps = {
|
|
@@ -171,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
171
172
|
leadingSlot?: React$1.ReactNode;
|
|
172
173
|
size?: Size$3;
|
|
173
174
|
trailingSlot?: React$1.ReactNode;
|
|
174
|
-
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
175
|
+
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$1.RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & React$1.RefAttributes<HTMLInputElement>) => React$1.ReactElement) & {
|
|
175
176
|
Item: typeof AutocompleteItem;
|
|
176
177
|
};
|
|
177
178
|
//#endregion
|
|
@@ -428,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
428
429
|
/**
|
|
429
430
|
* A control wrapper for a group of radio buttons.
|
|
430
431
|
*/
|
|
431
|
-
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "
|
|
432
|
+
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "onChange" | "className"> & React$2.RefAttributes<HTMLFieldSetElement>) => React$2.ReactElement;
|
|
432
433
|
//#endregion
|
|
433
434
|
//#region src/components/Radio/Radio.d.ts
|
|
434
435
|
type ChildrenLabel = {
|
|
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
|
|
|
510
511
|
*/
|
|
511
512
|
color?: TagColor;
|
|
512
513
|
/**
|
|
513
|
-
* The icon to display in the tag.
|
|
514
|
+
* The icon or logo to display in the tag.
|
|
514
515
|
*/
|
|
515
|
-
icon?: SvgIcon;
|
|
516
|
+
icon?: SvgIcon | SvgLogo;
|
|
516
517
|
/**
|
|
517
518
|
* The label text to display in the tag.
|
|
518
519
|
*/
|
|
@@ -561,7 +562,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
561
562
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
562
563
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
563
564
|
children?: string | React$2.ReactNode;
|
|
564
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
565
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
565
566
|
//#endregion
|
|
566
567
|
//#region src/components/Collapse/Collapse.d.ts
|
|
567
568
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -635,7 +636,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
635
636
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
636
637
|
showCount?: boolean;
|
|
637
638
|
value?: string | number | undefined;
|
|
638
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
639
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
639
640
|
//#endregion
|
|
640
641
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
641
642
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -659,7 +660,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
659
660
|
/**
|
|
660
661
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
661
662
|
*/
|
|
662
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
663
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
663
664
|
/** Called with the unformatted number value when the number changes. */onChange?: (value: number) => void; /** Locale-aware display and parsing for the displayed value (see https://react-aria.adobe.com/NumberField#format-options) */
|
|
664
665
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
665
666
|
min?: number; /** Maximum value */
|
|
@@ -681,7 +682,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
681
682
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
682
683
|
isInvalid?: boolean;
|
|
683
684
|
};
|
|
684
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
685
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
685
686
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
686
687
|
} & StylingOverrideProps & {
|
|
687
688
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -709,7 +710,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
709
710
|
};
|
|
710
711
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
711
712
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
712
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
713
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
713
714
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
714
715
|
} & StylingOverrideProps & {
|
|
715
716
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -769,7 +770,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
769
770
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
770
771
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
771
772
|
onChange?: (value: string) => void;
|
|
772
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
773
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region src/components/Modal/Modal.d.ts
|
|
775
776
|
type ModalSize = 'sm' | 'md' | 'lg';
|
|
@@ -867,7 +868,7 @@ type DrawerProps = {
|
|
|
867
868
|
isOpen?: boolean;
|
|
868
869
|
/**
|
|
869
870
|
* Called when the drawer should close: header dismiss, footer actions you wire up, scrim click (when a scrim is
|
|
870
|
-
* shown),
|
|
871
|
+
* shown), or Escape.
|
|
871
872
|
*/
|
|
872
873
|
onClose?: (event?: React$2.MouseEvent | React$2.KeyboardEvent) => void; /** Called when the drawer open state changes (after render). */
|
|
873
874
|
onOpenChange?: (isOpen: boolean) => void;
|
|
@@ -1878,6 +1879,12 @@ interface MenuProps extends StylingOverrideProps {
|
|
|
1878
1879
|
* @default 0
|
|
1879
1880
|
*/
|
|
1880
1881
|
popoverOffset?: number;
|
|
1882
|
+
/**
|
|
1883
|
+
* When `true`, focus is contained in the menu panel while it is open (Tab cycles within the panel; focus restores on close).
|
|
1884
|
+
* 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).
|
|
1885
|
+
* @default false
|
|
1886
|
+
*/
|
|
1887
|
+
trapFocus?: boolean;
|
|
1881
1888
|
}
|
|
1882
1889
|
/** Inset of the menu panel relative to the popover shell. */
|
|
1883
1890
|
type MenuPanelPadding = NonNullable<MenuProps['panelPadding']>;
|
|
@@ -1893,6 +1900,7 @@ declare const Menu: {
|
|
|
1893
1900
|
itemActiveLabelSemibold,
|
|
1894
1901
|
panelPadding,
|
|
1895
1902
|
popoverOffset,
|
|
1903
|
+
trapFocus,
|
|
1896
1904
|
FORCE__className: classNameOverride
|
|
1897
1905
|
}: MenuProps): React$2.JSX.Element;
|
|
1898
1906
|
displayName: string;
|