fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

28
node_modules/reakit/ts/Menu/Menu.d.ts generated vendored Normal file
View File

@@ -0,0 +1,28 @@
import * as React from "react";
import { PopoverOptions, PopoverHTMLProps } from "../Popover/Popover";
import { MenuBarOptions, MenuBarHTMLProps } from "./MenuBar";
import { MenuStateReturn } from "./MenuState";
export declare type MenuOptions = Omit<PopoverOptions, "hideOnEsc"> & Pick<MenuStateReturn, "placement"> & MenuBarOptions;
export declare type MenuHTMLProps = PopoverHTMLProps & MenuBarHTMLProps;
export declare type MenuProps = MenuOptions & MenuHTMLProps;
export declare const useMenu: {
(options?: MenuOptions | undefined, htmlProps?: import("..").TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").TabbableHTMLProps;
unstable_propsAreEqual: (prev: Pick<PopoverOptions, "hide" | "visible" | "unstable_system" | "baseId" | "animated" | "animating" | "modal" | "unstable_disclosureRef" | "unstable_popoverRef" | "unstable_popoverStyles" | "stopAnimation" | "hideOnClickOutside" | "preventBodyScroll" | "unstable_initialFocusRef" | "unstable_finalFocusRef" | "unstable_orphan" | "unstable_autoFocusOnShow" | "unstable_autoFocusOnHide"> & Pick<MenuStateReturn, "placement"> & import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "orientation"> & Pick<MenuStateReturn, "next" | "move" | "items" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: Pick<PopoverOptions, "hide" | "visible" | "unstable_system" | "baseId" | "animated" | "animating" | "modal" | "unstable_disclosureRef" | "unstable_popoverRef" | "unstable_popoverStyles" | "stopAnimation" | "hideOnClickOutside" | "preventBodyScroll" | "unstable_initialFocusRef" | "unstable_finalFocusRef" | "unstable_orphan" | "unstable_autoFocusOnShow" | "unstable_autoFocusOnHide"> & Pick<MenuStateReturn, "placement"> & import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "orientation"> & Pick<MenuStateReturn, "next" | "move" | "items" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuOptions, htmlProps: import("..").TabbableHTMLProps) => MenuOptions;
};
export declare const Menu: import("reakit-system/ts/createComponent").Component<"div", MenuOptions>;

20
node_modules/reakit/ts/Menu/MenuArrow.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/// <reference types="react" />
import { PopoverArrowOptions, PopoverArrowHTMLProps } from "../Popover/PopoverArrow";
export declare type MenuArrowOptions = PopoverArrowOptions;
export declare type MenuArrowHTMLProps = PopoverArrowHTMLProps;
export declare type MenuArrowProps = MenuArrowOptions & MenuArrowHTMLProps;
export declare const useMenuArrow: {
(options?: PopoverArrowOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").PopoverStateReturn>, "unstable_arrowRef" | "unstable_arrowStyles"> & Pick<import("..").PopoverStateReturn, "placement"> & {
size?: string | number | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").PopoverStateReturn>, "unstable_arrowRef" | "unstable_arrowStyles"> & Pick<import("..").PopoverStateReturn, "placement"> & {
size?: string | number | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: PopoverArrowOptions, htmlProps: import("..").RoleHTMLProps) => PopoverArrowOptions;
};
export declare const MenuArrow: import("reakit-system/ts/createComponent").Component<"div", PopoverArrowOptions>;

27
node_modules/reakit/ts/Menu/MenuBar.d.ts generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import * as React from "react";
import { CompositeOptions, CompositeHTMLProps } from "../Composite/Composite";
import { MenuStateReturn } from "./MenuState";
export declare type MenuBarOptions = CompositeOptions & Pick<Partial<MenuStateReturn>, "orientation"> & Pick<MenuStateReturn, "items" | "move" | "next" | "previous">;
export declare type MenuBarHTMLProps = CompositeHTMLProps;
export declare type MenuBarProps = MenuBarOptions & MenuBarHTMLProps;
export declare const useMenuBar: {
(options?: MenuBarOptions | undefined, htmlProps?: import("..").TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").TabbableHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "orientation"> & Pick<MenuStateReturn, "next" | "move" | "items" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "orientation"> & Pick<MenuStateReturn, "next" | "move" | "items" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuBarOptions, htmlProps: import("..").TabbableHTMLProps) => MenuBarOptions;
};
export declare const MenuBar: import("reakit-system/ts/createComponent").Component<"div", MenuBarOptions>;

17
node_modules/reakit/ts/Menu/MenuBarState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { CompositeState, CompositeActions, CompositeInitialState } from "../Composite";
export declare type MenuBarState = CompositeState & {
/**
* Stores the values of radios and checkboxes within the menu.
*/
unstable_values: Record<string, any>;
};
export declare type MenuBarActions = CompositeActions & {
/**
* Updates checkboxes and radios values within the menu.
*/
unstable_setValue: (name: string, value?: any) => void;
};
export declare type MenuBarInitialState = CompositeInitialState & Partial<Pick<MenuBarState, "unstable_values">>;
export declare type MenuBarStateReturn = MenuBarState & MenuBarActions;
export declare function useMenuBarState(initialState?: SealedInitialState<MenuBarInitialState>): MenuBarStateReturn;

33
node_modules/reakit/ts/Menu/MenuButton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
import * as React from "react";
import { PopoverDisclosureOptions, PopoverDisclosureHTMLProps } from "../Popover/PopoverDisclosure";
import { MenuStateReturn } from "./MenuState";
export declare type MenuButtonOptions = PopoverDisclosureOptions & Pick<Partial<MenuStateReturn>, "hide" | "unstable_popoverStyles" | "unstable_arrowStyles" | "currentId" | "unstable_moves" | "move"> & Pick<MenuStateReturn, "show" | "placement" | "first" | "last">;
export declare type MenuButtonHTMLProps = PopoverDisclosureHTMLProps;
export declare type MenuButtonProps = MenuButtonOptions & MenuButtonHTMLProps;
export declare const useMenuButton: {
(options?: MenuButtonOptions | undefined, htmlProps?: import("..").ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<MenuStateReturn, "show" | "first" | "last" | "placement"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<MenuStateReturn, "show" | "first" | "last" | "placement"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.ButtonHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuButtonOptions, htmlProps: import("..").ButtonHTMLProps) => MenuButtonOptions;
};
export declare const MenuButton: import("reakit-system/ts/createComponent").Component<"button", MenuButtonOptions>;

32
node_modules/reakit/ts/Menu/MenuDisclosure.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
/// <reference types="react" />
import { MenuButtonOptions, MenuButtonHTMLProps } from "./MenuButton";
export declare type MenuDisclosureOptions = MenuButtonOptions;
export declare type MenuDisclosureHTMLProps = MenuButtonHTMLProps;
export declare type MenuDisclosureProps = MenuDisclosureOptions & MenuDisclosureHTMLProps;
export declare const useMenuDisclosure: {
(options?: MenuButtonOptions | undefined, htmlProps?: import("..").ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<import("./MenuState").MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<import("./MenuState").MenuStateReturn, "show" | "first" | "last" | "placement"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").ButtonHTMLAttributes<any>, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").DisclosureStateReturn>, "visible"> & Pick<import("..").DisclosureStateReturn, "toggle" | "baseId"> & Pick<Partial<import("..").DialogStateReturn>, "unstable_disclosureRef"> & Pick<import("..").DialogStateReturn, "toggle"> & Pick<Partial<import("..").PopoverStateReturn>, "unstable_referenceRef"> & Pick<Partial<import("./MenuState").MenuStateReturn>, "hide" | "move" | "currentId" | "unstable_moves" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<import("./MenuState").MenuStateReturn, "show" | "first" | "last" | "placement"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").ButtonHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuButtonOptions, htmlProps: import("..").ButtonHTMLProps) => MenuButtonOptions;
};
export declare const MenuDisclosure: import("reakit-system/ts/createComponent").Component<"button", MenuButtonOptions>;

16
node_modules/reakit/ts/Menu/MenuGroup.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/// <reference types="react" />
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
export declare type MenuGroupOptions = RoleOptions;
export declare type MenuGroupHTMLProps = RoleHTMLProps;
export declare type MenuGroupProps = MenuGroupOptions & MenuGroupHTMLProps;
export declare const useMenuGroup: {
(options?: RoleOptions | undefined, htmlProps?: RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RoleHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: RoleOptions & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: RoleOptions, htmlProps: RoleHTMLProps) => RoleOptions;
};
export declare const MenuGroup: import("reakit-system/ts/createComponent").Component<"div", RoleOptions>;

37
node_modules/reakit/ts/Menu/MenuItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,37 @@
import * as React from "react";
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
import { MenuStateReturn } from "./MenuState";
export declare type MenuItemOptions = CompositeItemOptions & Pick<Partial<MenuStateReturn>, "visible" | "hide" | "placement" | "unstable_popoverStyles" | "unstable_arrowStyles"> & Pick<MenuStateReturn, "next" | "previous" | "move">;
export declare type MenuItemHTMLProps = CompositeItemHTMLProps;
export declare type MenuItemProps = MenuItemOptions & MenuItemHTMLProps;
export declare const useMenuItem: {
(options?: MenuItemOptions | undefined, htmlProps?: import("..").TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").TabbableHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuItemOptions, htmlProps: import("..").TabbableHTMLProps) => MenuItemOptions;
};
export declare const MenuItem: import("reakit-system/ts/createComponent").Component<"button", MenuItemOptions>;

63
node_modules/reakit/ts/Menu/MenuItemCheckbox.d.ts generated vendored Normal file
View File

@@ -0,0 +1,63 @@
import * as React from "react";
import { CheckboxOptions, CheckboxHTMLProps } from "../Checkbox/Checkbox";
import { MenuItemOptions, MenuItemHTMLProps } from "./MenuItem";
import { MenuStateReturn } from "./MenuState";
export declare type MenuItemCheckboxOptions = CheckboxOptions & MenuItemOptions & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
};
export declare type MenuItemCheckboxHTMLProps = CheckboxHTMLProps & MenuItemHTMLProps;
export declare type MenuItemCheckboxProps = MenuItemCheckboxOptions & MenuItemCheckboxHTMLProps;
export declare const useMenuItemCheckbox: {
(options?: MenuItemCheckboxOptions | undefined, htmlProps?: CheckboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): CheckboxHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").CheckboxStateReturn>, "state" | "setState"> & {
value?: string | number | undefined;
checked?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any> & {
value?: string | number | undefined;
}, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").CheckboxStateReturn>, "state" | "setState"> & {
value?: string | number | undefined;
checked?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemCheckbox's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any> & {
value?: string | number | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuItemCheckboxOptions, htmlProps: CheckboxHTMLProps) => MenuItemCheckboxOptions;
};
export declare const MenuItemCheckbox: import("reakit-system/ts/createComponent").Component<"button", MenuItemCheckboxOptions>;

61
node_modules/reakit/ts/Menu/MenuItemRadio.d.ts generated vendored Normal file
View File

@@ -0,0 +1,61 @@
import * as React from "react";
import { RadioOptions, RadioHTMLProps } from "../Radio/Radio";
import { MenuStateReturn } from "./MenuState";
import { MenuItemOptions, MenuItemHTMLProps } from "./MenuItem";
export declare type MenuItemRadioOptions = RadioOptions & MenuItemOptions & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemRadio's name as in `menu.values`.
*/
name: string;
};
export declare type MenuItemRadioHTMLProps = RadioHTMLProps & MenuItemHTMLProps;
export declare type MenuItemRadioProps = MenuItemRadioOptions & MenuItemRadioHTMLProps;
export declare const useMenuItemRadio: {
(options?: MenuItemRadioOptions | undefined, htmlProps?: import("..").unstable_ComboboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").unstable_ComboboxHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<import("..").RadioStateReturn>, "state" | "setState"> & {
value: string | number;
checked?: boolean | undefined;
unstable_checkOnFocus?: boolean | undefined;
} & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemRadio's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any>, next: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<Partial<import("..").CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<import("..").CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & Pick<Partial<import("..").RadioStateReturn>, "state" | "setState"> & {
value: string | number;
checked?: boolean | undefined;
unstable_checkOnFocus?: boolean | undefined;
} & Pick<Partial<MenuStateReturn>, "hide" | "visible" | "unstable_popoverStyles" | "unstable_arrowStyles" | "placement"> & Pick<MenuStateReturn, "next" | "move" | "previous"> & Pick<MenuStateReturn, "unstable_values" | "unstable_setValue"> & {
/**
* MenuItemRadio's name as in `menu.values`.
*/
name: string;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & React.InputHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: MenuItemRadioOptions, htmlProps: import("..").unstable_ComboboxHTMLProps) => MenuItemRadioOptions;
};
export declare const MenuItemRadio: import("reakit-system/ts/createComponent").Component<"button", MenuItemRadioOptions>;

20
node_modules/reakit/ts/Menu/MenuSeparator.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/// <reference types="react" />
import { SeparatorOptions, SeparatorHTMLProps } from "../Separator/Separator";
export declare type MenuSeparatorOptions = SeparatorOptions;
export declare type MenuSeparatorHTMLProps = SeparatorHTMLProps;
export declare type MenuSeparatorProps = MenuSeparatorOptions & MenuSeparatorHTMLProps;
export declare const useMenuSeparator: {
(options?: SeparatorOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
orientation?: "horizontal" | "vertical" | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & {
orientation?: "horizontal" | "vertical" | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: SeparatorOptions, htmlProps: import("..").RoleHTMLProps) => SeparatorOptions;
};
export declare const MenuSeparator: import("reakit-system/ts/createComponent").Component<"hr", SeparatorOptions>;

8
node_modules/reakit/ts/Menu/MenuState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { PopoverState, PopoverActions, PopoverInitialState, PopoverStateReturn } from "../Popover/PopoverState";
import { MenuBarState, MenuBarActions, MenuBarInitialState, MenuBarStateReturn } from "./MenuBarState";
export declare type MenuState = MenuBarState & PopoverState;
export declare type MenuActions = MenuBarActions & PopoverActions;
export declare type MenuInitialState = MenuBarInitialState & PopoverInitialState;
export declare type MenuStateReturn = MenuBarStateReturn & PopoverStateReturn & MenuState & MenuActions;
export declare function useMenuState(initialState?: SealedInitialState<MenuInitialState>): MenuStateReturn;

10
node_modules/reakit/ts/Menu/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,10 @@
export declare const MENU_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_ARROW_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_BAR_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_BUTTON_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_DISCLOSURE_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_GROUP_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_ITEM_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];
export declare const MENU_ITEM_CHECKBOX_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place", "name"];
export declare const MENU_ITEM_RADIO_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place", "name"];
export declare const MENU_SEPARATOR_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "unstable_values", "setBaseId", "registerItem", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "unstable_setValue", "visible", "animated", "animating", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "place"];

15
node_modules/reakit/ts/Menu/__utils/MenuContext.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from "react";
import { MenuBarOptions } from "../MenuBar";
import { MenuOptions } from "../Menu";
declare type Ref = React.RefObject<HTMLElement>;
export declare type MenuContextType = Pick<MenuBarOptions, "orientation" | "next" | "previous"> & {
ref: Ref;
role: string;
parent?: MenuContextType | null;
children: Array<Ref>;
addChild: (ref: Ref) => void;
removeChild: (ref: Ref) => void;
};
export declare const MenuContext: React.Context<MenuContextType | null>;
export declare function useMenuContext(menuRef: Ref, role: string, options: MenuBarOptions | MenuOptions): (element: React.ReactNode) => JSX.Element;
export {};

View File

@@ -0,0 +1,2 @@
/// <reference types="react" />
export declare function findVisibleSubmenu(submenus?: Array<React.RefObject<HTMLElement>>): HTMLElement | null | undefined;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { MenuStateReturn } from "../MenuState";
export declare function useShortcuts(menuRef: React.RefObject<HTMLElement>, { items, move }: Pick<MenuStateReturn, "items" | "move">, timeout?: number): void;

View File

@@ -0,0 +1,6 @@
import * as React from "react";
import { MenuContextType } from "./MenuContext";
export declare function useTransitToSubmenu(menu: MenuContextType | null, htmlOnMouseEnter?: React.MouseEventHandler): {
onMouseEnter: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
isMouseInTransitToSubmenu: (event: React.MouseEvent) => boolean | 0 | null;
};

12
node_modules/reakit/ts/Menu/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
export * from "./Menu";
export * from "./MenuArrow";
export * from "./MenuBar";
export * from "./MenuBarState";
export * from "./MenuButton";
export * from "./MenuDisclosure";
export * from "./MenuGroup";
export * from "./MenuItem";
export * from "./MenuItemCheckbox";
export * from "./MenuItemRadio";
export * from "./MenuSeparator";
export * from "./MenuState";