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

35
node_modules/reakit/ts/Box/Box.d.ts generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import * as React from "react";
export declare type BoxOptions = {
/**
* Options passed to `reakit-system-*`
* @private
*/
unstable_system?: any;
};
export declare type BoxHTMLProps = React.HTMLAttributes<any> & React.RefAttributes<any> & {
/**
* Function returned by the hook to wrap the element to which html props
* will be passed.
*/
wrapElement?: (element: React.ReactNode) => React.ReactNode;
};
export declare type BoxProps = BoxOptions & BoxHTMLProps;
export declare const useBox: {
(options?: BoxOptions | undefined, htmlProps?: BoxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): BoxHTMLProps;
unstable_propsAreEqual: (prev: BoxOptions & React.HTMLAttributes<any> & React.RefAttributes<any> & {
/**
* Function returned by the hook to wrap the element to which html props
* will be passed.
*/
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: BoxOptions & React.HTMLAttributes<any> & React.RefAttributes<any> & {
/**
* Function returned by the hook to wrap the element to which html props
* will be passed.
*/
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: BoxOptions, htmlProps: BoxHTMLProps) => BoxOptions;
};
export declare const Box: import("reakit-system/ts/createComponent").Component<"div", BoxOptions>;

1
node_modules/reakit/ts/Box/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const BOX_KEYS: readonly ["unstable_system"];

1
node_modules/reakit/ts/Box/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./Box";

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

@@ -0,0 +1,32 @@
import * as React from "react";
import { ClickableOptions, ClickableHTMLProps } from "../Clickable/Clickable";
export declare const useButton: {
(options?: ClickableOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & 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;
} & 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: ClickableOptions, htmlProps: ButtonHTMLProps) => ClickableOptions;
};
export declare const Button: import("reakit-system/ts/createComponent").Component<"button", ClickableOptions>;
export declare type ButtonOptions = ClickableOptions;
export declare type ButtonHTMLProps = ClickableHTMLProps & React.ButtonHTMLAttributes<any>;
export declare type ButtonProps = ButtonOptions & ButtonHTMLProps;

1
node_modules/reakit/ts/Button/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const BUTTON_KEYS: readonly [];

1
node_modules/reakit/ts/Button/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./Button";

72
node_modules/reakit/ts/Checkbox/Checkbox.d.ts generated vendored Normal file
View File

@@ -0,0 +1,72 @@
import * as React from "react";
import { ClickableOptions, ClickableHTMLProps } from "../Clickable/Clickable";
import { CheckboxStateReturn } from "./CheckboxState";
export declare type CheckboxOptions = ClickableOptions & Pick<Partial<CheckboxStateReturn>, "state" | "setState"> & {
/**
* Checkbox's value is going to be used when multiple checkboxes share the
* same state. Checking a checkbox with value will add it to the state
* array.
*/
value?: string | number;
/**
* Checkbox's checked state. If present, it's used instead of `state`.
*/
checked?: boolean;
};
export declare type CheckboxHTMLProps = ClickableHTMLProps & React.InputHTMLAttributes<any> & {
value?: string | number;
};
export declare type CheckboxProps = CheckboxOptions & CheckboxHTMLProps;
export declare const useCheckbox: {
(options?: CheckboxOptions | 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<CheckboxStateReturn>, "state" | "setState"> & {
/**
* Checkbox's value is going to be used when multiple checkboxes share the
* same state. Checking a checkbox with value will add it to the state
* array.
*/
value?: string | number | undefined;
/**
* Checkbox's checked state. If present, it's used instead of `state`.
*/
checked?: boolean | undefined;
} & 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<CheckboxStateReturn>, "state" | "setState"> & {
/**
* Checkbox's value is going to be used when multiple checkboxes share the
* same state. Checking a checkbox with value will add it to the state
* array.
*/
value?: string | number | undefined;
/**
* Checkbox's checked state. If present, it's used instead of `state`.
*/
checked?: boolean | undefined;
} & 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: CheckboxOptions, htmlProps: CheckboxHTMLProps) => CheckboxOptions;
};
export declare const Checkbox: import("reakit-system/ts/createComponent").Component<"input", CheckboxOptions>;

22
node_modules/reakit/ts/Checkbox/CheckboxState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
export declare type CheckboxState = {
/**
* Stores the state of the checkbox.
* If checkboxes that share this state have defined a `value` prop, it's
* going to be an array.
*/
state: boolean | "indeterminate" | Array<number | string>;
};
export declare type CheckboxActions = {
/**
* Sets `state`.
*/
setState: React.Dispatch<React.SetStateAction<CheckboxState["state"]>>;
};
export declare type CheckboxInitialState = Partial<Pick<CheckboxState, "state">>;
export declare type CheckboxStateReturn = CheckboxState & CheckboxActions;
/**
* As simple as `React.useState(false)`
*/
export declare function useCheckboxState(initialState?: SealedInitialState<CheckboxInitialState>): CheckboxStateReturn;

1
node_modules/reakit/ts/Checkbox/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const CHECKBOX_KEYS: readonly ["state", "setState", "value", "checked"];

2
node_modules/reakit/ts/Checkbox/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export * from "./Checkbox";
export * from "./CheckboxState";

59
node_modules/reakit/ts/Clickable/Clickable.d.ts generated vendored Normal file
View File

@@ -0,0 +1,59 @@
import * as React from "react";
import { TabbableOptions, TabbableHTMLProps } from "../Tabbable/Tabbable";
export declare type ClickableOptions = TabbableOptions & {
/**
* Whether or not trigger click on pressing <kbd>Enter</kbd>.
* @private
*/
unstable_clickOnEnter?: boolean;
/**
* Whether or not trigger click on pressing <kbd>Space</kbd>.
* @private
*/
unstable_clickOnSpace?: boolean;
};
export declare type ClickableHTMLProps = TabbableHTMLProps;
export declare type ClickableProps = ClickableOptions & ClickableHTMLProps;
export declare const useClickable: {
(options?: ClickableOptions | undefined, htmlProps?: TabbableHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): TabbableHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
/**
* Whether or not trigger click on pressing <kbd>Enter</kbd>.
* @private
*/
unstable_clickOnEnter?: boolean | undefined;
/**
* Whether or not trigger click on pressing <kbd>Space</kbd>.
* @private
*/
unstable_clickOnSpace?: boolean | undefined;
} & 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;
} & {
/**
* Whether or not trigger click on pressing <kbd>Enter</kbd>.
* @private
*/
unstable_clickOnEnter?: boolean | undefined;
/**
* Whether or not trigger click on pressing <kbd>Space</kbd>.
* @private
*/
unstable_clickOnSpace?: boolean | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: ClickableOptions, htmlProps: TabbableHTMLProps) => ClickableOptions;
};
export declare const Clickable: import("reakit-system/ts/createComponent").Component<"button", ClickableOptions>;

1
node_modules/reakit/ts/Clickable/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare const CLICKABLE_KEYS: readonly ["unstable_clickOnEnter", "unstable_clickOnSpace"];

1
node_modules/reakit/ts/Clickable/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export * from "./Clickable";

48
node_modules/reakit/ts/Combobox/Combobox.d.ts generated vendored Normal file
View File

@@ -0,0 +1,48 @@
import * as React from "react";
import { CompositeOptions, CompositeHTMLProps } from "../Composite/Composite";
import { unstable_ComboboxStateReturn } from "./ComboboxState";
export declare const unstable_useCombobox: {
(options?: unstable_ComboboxOptions | undefined, htmlProps?: unstable_ComboboxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_ComboboxHTMLProps;
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<unstable_ComboboxStateReturn>, "hide" | "show" | "visible" | "inline" | "list" | "menuRole" | "minValueLength" | "currentValue" | "autoSelect" | "unstable_referenceRef"> & Pick<unstable_ComboboxStateReturn, "baseId" | "inputValue" | "setInputValue"> & {
/**
* When enabled, user can hide the combobox popover by pressing
* <kbd>Esc</kbd> while focusing on the combobox input.
* @default true
*/
hideOnEsc?: boolean | undefined;
} & 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;
} & Pick<Partial<import("..").CompositeStateReturn>, "wrap" | "orientation" | "baseId" | "currentId" | "unstable_virtual" | "groups" | "unstable_moves"> & Pick<import("..").CompositeStateReturn, "move" | "first" | "last" | "items" | "setCurrentId"> & Pick<Partial<unstable_ComboboxStateReturn>, "hide" | "show" | "visible" | "inline" | "list" | "menuRole" | "minValueLength" | "currentValue" | "autoSelect" | "unstable_referenceRef"> & Pick<unstable_ComboboxStateReturn, "baseId" | "inputValue" | "setInputValue"> & {
/**
* When enabled, user can hide the combobox popover by pressing
* <kbd>Esc</kbd> while focusing on the combobox input.
* @default true
*/
hideOnEsc?: boolean | undefined;
} & 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: unstable_ComboboxOptions, htmlProps: unstable_ComboboxHTMLProps) => unstable_ComboboxOptions;
};
export declare const unstable_Combobox: import("reakit-system/ts/createComponent").Component<"input", unstable_ComboboxOptions>;
export declare type unstable_ComboboxOptions = CompositeOptions & Pick<Partial<unstable_ComboboxStateReturn>, "currentValue" | "menuRole" | "list" | "inline" | "autoSelect" | "visible" | "show" | "hide" | "unstable_referenceRef" | "minValueLength"> & Pick<unstable_ComboboxStateReturn, "baseId" | "inputValue" | "setInputValue"> & {
/**
* When enabled, user can hide the combobox popover by pressing
* <kbd>Esc</kbd> while focusing on the combobox input.
* @default true
*/
hideOnEsc?: boolean;
};
export declare type unstable_ComboboxHTMLProps = CompositeHTMLProps & React.InputHTMLAttributes<any>;
export declare type unstable_ComboboxProps = unstable_ComboboxOptions & unstable_ComboboxHTMLProps;

45
node_modules/reakit/ts/Combobox/ComboboxGridCell.d.ts generated vendored Normal file
View File

@@ -0,0 +1,45 @@
/// <reference types="react" />
import { unstable_GridCellOptions as GridCellOptions, unstable_GridCellHTMLProps as GridCellHTMLProps } from "../Grid/GridCell";
import { unstable_ComboboxItemOptions as ComboboxItemOptions, unstable_ComboboxItemHTMLProps as ComboboxItemHTMLProps } from "./ComboboxItem";
export declare const unstable_useComboboxGridCell: {
(options?: unstable_ComboboxGridCellOptions | undefined, htmlProps?: unstable_ComboboxGridCellHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_ComboboxGridCellHTMLProps;
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"> & import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
value?: string | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").TdHTMLAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | 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"> & import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
value?: string | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & import("react").TdHTMLAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_ComboboxGridCellOptions, htmlProps: unstable_ComboboxGridCellHTMLProps) => unstable_ComboboxGridCellOptions;
};
export declare const unstable_ComboboxGridCell: import("reakit-system/ts/createComponent").Component<"span", unstable_ComboboxGridCellOptions>;
export declare type unstable_ComboboxGridCellOptions = GridCellOptions & ComboboxItemOptions;
export declare type unstable_ComboboxGridCellHTMLProps = GridCellHTMLProps & ComboboxItemHTMLProps;
export declare type unstable_ComboboxGridCellProps = unstable_ComboboxGridCellOptions & unstable_ComboboxGridCellHTMLProps;

20
node_modules/reakit/ts/Combobox/ComboboxGridRow.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/// <reference types="react" />
import { unstable_GridRowOptions as GridRowOptions, unstable_GridRowHTMLProps as GridRowHTMLProps } from "../Grid/GridRow";
export declare const unstable_useComboboxGridRow: {
(options?: import("..").CompositeGroupOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<import("..").CompositeStateReturn, "registerGroup" | "unregisterGroup"> & Pick<Partial<import("..").CompositeStateReturn>, "currentId" | "items" | "unstable_moves"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<import("..").CompositeStateReturn, "registerGroup" | "unregisterGroup"> & Pick<Partial<import("..").CompositeStateReturn>, "currentId" | "items" | "unstable_moves"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: import("..").CompositeGroupOptions, htmlProps: import("..").RoleHTMLProps) => import("..").CompositeGroupOptions;
};
export declare const unstable_ComboboxGridRow: import("reakit-system/ts/createComponent").Component<"div", import("..").CompositeGroupOptions>;
export declare type unstable_ComboboxGridRowOptions = GridRowOptions;
export declare type unstable_ComboboxGridRowHTMLProps = GridRowHTMLProps;
export declare type unstable_ComboboxGridRowProps = unstable_ComboboxGridRowOptions & unstable_ComboboxGridRowHTMLProps;

View File

@@ -0,0 +1,8 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { unstable_ComboboxListGridState as ComboboxListGridState, unstable_ComboboxListGridActions as ComboboxListGridActions, unstable_ComboboxListGridInitialState as ComboboxListGridInitialState } from "./ComboboxListGridState";
import { ComboboxPopoverState, ComboboxPopoverActions, ComboboxPopoverInitialState } from "./__utils/ComboboxPopoverState";
export declare function unstable_useComboboxGridState(initialState?: SealedInitialState<unstable_ComboboxGridInitialState>): unstable_ComboboxGridStateReturn;
export declare type unstable_ComboboxGridState = ComboboxPopoverState & ComboboxListGridState;
export declare type unstable_ComboboxGridActions = ComboboxPopoverActions & ComboboxListGridActions;
export declare type unstable_ComboboxGridInitialState = ComboboxPopoverInitialState & ComboboxListGridInitialState;
export declare type unstable_ComboboxGridStateReturn = unstable_ComboboxGridState & unstable_ComboboxGridActions;

63
node_modules/reakit/ts/Combobox/ComboboxItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,63 @@
import * as React from "react";
import { BoxOptions, BoxHTMLProps } from "../Box/Box";
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
import { unstable_ComboboxStateReturn } from "./ComboboxState";
export declare const unstable_useComboboxItem: {
(options?: unstable_ComboboxItemOptions | undefined, htmlProps?: unstable_ComboboxItemHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_ComboboxItemHTMLProps;
unstable_propsAreEqual: (prev: BoxOptions & 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<unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
/**
* Item's value that will be used to fill input value and filter `matches`
* based on the input value. You can omit this for items that perform
* actions other than filling a form. For example, items may open a dialog.
*/
value?: string | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}, next: BoxOptions & 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<unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
/**
* Item's value that will be used to fill input value and filter `matches`
* based on the input value. You can omit this for items that perform
* actions other than filling a form. For example, items may open a dialog.
*/
value?: string | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_ComboboxItemOptions, htmlProps: unstable_ComboboxItemHTMLProps) => unstable_ComboboxItemOptions;
};
export declare const unstable_ComboboxItem: import("reakit-system/ts/createComponent").Component<"span", unstable_ComboboxItemOptions>;
export declare type unstable_ComboboxItemOptions = BoxOptions & CompositeItemOptions & Pick<Partial<unstable_ComboboxStateReturn>, "currentValue" | "inputValue" | "hide" | "visible"> & Pick<unstable_ComboboxStateReturn, "setInputValue" | "registerItem"> & {
/**
* Item's value that will be used to fill input value and filter `matches`
* based on the input value. You can omit this for items that perform
* actions other than filling a form. For example, items may open a dialog.
*/
value?: string;
};
export declare type unstable_ComboboxItemHTMLProps = BoxHTMLProps & CompositeItemHTMLProps;
export declare type unstable_ComboboxItemProps = unstable_ComboboxItemOptions & unstable_ComboboxItemHTMLProps;

17
node_modules/reakit/ts/Combobox/ComboboxList.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
/// <reference types="react" />
import { BoxOptions, BoxHTMLProps } from "../Box/Box";
import { unstable_ComboboxStateReturn } from "./ComboboxState";
export declare const unstable_useComboboxList: {
(options?: unstable_ComboboxListOptions | undefined, htmlProps?: BoxHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): BoxHTMLProps;
unstable_propsAreEqual: (prev: BoxOptions & Pick<Partial<unstable_ComboboxStateReturn>, "menuRole"> & Pick<unstable_ComboboxStateReturn, "baseId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: BoxOptions & Pick<Partial<unstable_ComboboxStateReturn>, "menuRole"> & Pick<unstable_ComboboxStateReturn, "baseId"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_ComboboxListOptions, htmlProps: BoxHTMLProps) => unstable_ComboboxListOptions;
};
export declare const unstable_ComboboxList: import("reakit-system/ts/createComponent").Component<"div", unstable_ComboboxListOptions>;
export declare type unstable_ComboboxListOptions = BoxOptions & Pick<Partial<unstable_ComboboxStateReturn>, "menuRole"> & Pick<unstable_ComboboxStateReturn, "baseId">;
export declare type unstable_ComboboxListHTMLProps = BoxHTMLProps;
export declare type unstable_ComboboxListProps = unstable_ComboboxListOptions & unstable_ComboboxListHTMLProps;

View File

@@ -0,0 +1,34 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { SetState } from "reakit-utils/types";
import { unstable_GridState as GridState, unstable_GridActions as GridActions, unstable_GridInitialState as GridInitialState } from "../Grid/GridState";
import { ComboboxBaseState, ComboboxBaseActions, ComboboxBaseInitialState } from "./__utils/ComboboxBaseState";
export declare function unstable_useComboboxListGridState(initialState?: SealedInitialState<unstable_ComboboxListGridInitialState>): unstable_ComboboxListGridStateReturn;
export declare type unstable_ComboboxListGridState = Omit<ComboboxBaseState<GridState>, "matches"> & {
/**
* Number of columns by which `values` will be splitted to generate the
* `matches` 2D array.
*/
columns: number;
/**
* Result of filtering `values` based on `inputValue`.
* @default []
* @example
* const combobox = useComboboxState({
* values: ["Red", "Green", "Blue"],
* columns: 2,
* });
* combobox.matches; // [["Red", "Green"], ["Blue"]]
* combobox.setInputValue("g");
* // On next render
* combobox.matches; // [["Green"]]
*/
matches: string[][];
};
export declare type unstable_ComboboxListGridActions = ComboboxBaseActions<GridActions> & {
/**
* Sets `columns`.
*/
setColumns: SetState<unstable_ComboboxListGridState["columns"]>;
};
export declare type unstable_ComboboxListGridInitialState = Omit<GridInitialState, "unstable_virtual" | "unstable_includesBaseElement"> & ComboboxBaseInitialState & Pick<Partial<unstable_ComboboxListGridState>, "columns">;
export declare type unstable_ComboboxListGridStateReturn = unstable_ComboboxListGridState & unstable_ComboboxListGridActions;

View File

@@ -0,0 +1,8 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { CompositeState, CompositeActions, CompositeInitialState } from "../Composite/CompositeState";
import { ComboboxBaseState, ComboboxBaseActions, ComboboxBaseInitialState } from "./__utils/ComboboxBaseState";
export declare function unstable_useComboboxListState(initialState?: SealedInitialState<unstable_ComboboxListInitialState>): unstable_ComboboxListStateReturn;
export declare type unstable_ComboboxListState = ComboboxBaseState<CompositeState>;
export declare type unstable_ComboboxListActions = ComboboxBaseActions<CompositeActions>;
export declare type unstable_ComboboxListInitialState = Omit<CompositeInitialState, "unstable_virtual" | "unstable_includesBaseElement"> & ComboboxBaseInitialState;
export declare type unstable_ComboboxListStateReturn = unstable_ComboboxListState & unstable_ComboboxListActions;

45
node_modules/reakit/ts/Combobox/ComboboxOption.d.ts generated vendored Normal file
View File

@@ -0,0 +1,45 @@
/// <reference types="react" />
import { CompositeItemOptions, CompositeItemHTMLProps } from "../Composite/CompositeItem";
import { unstable_ComboboxItemOptions as ComboboxItemOptions, unstable_ComboboxItemHTMLProps as ComboboxItemHTMLProps } from "./ComboboxItem";
export declare const unstable_useComboboxOption: {
(options?: import("./ComboboxGridCell").unstable_ComboboxGridCellOptions | undefined, htmlProps?: unstable_ComboboxOptionHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_ComboboxOptionHTMLProps;
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"> & import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
value?: string | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | 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"> & import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "hide" | "visible" | "inputValue" | "currentValue"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "registerItem" | "setInputValue"> & {
value?: string | undefined;
} & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
} & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: import("./ComboboxGridCell").unstable_ComboboxGridCellOptions, htmlProps: unstable_ComboboxOptionHTMLProps) => import("./ComboboxGridCell").unstable_ComboboxGridCellOptions;
};
export declare const unstable_ComboboxOption: import("reakit-system/ts/createComponent").Component<"div", import("./ComboboxGridCell").unstable_ComboboxGridCellOptions>;
export declare type unstable_ComboboxOptionOptions = CompositeItemOptions & ComboboxItemOptions;
export declare type unstable_ComboboxOptionHTMLProps = CompositeItemHTMLProps & ComboboxItemHTMLProps;
export declare type unstable_ComboboxOptionProps = unstable_ComboboxOptionOptions & unstable_ComboboxOptionHTMLProps;

22
node_modules/reakit/ts/Combobox/ComboboxPopover.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
/// <reference types="react" />
import { PopoverOptions, PopoverHTMLProps } from "../Popover/Popover";
import { unstable_ComboboxListOptions as ComboboxListOptions, unstable_ComboboxListHTMLProps as ComboboxListHTMLProps } from "./ComboboxList";
import { ComboboxPopoverStateReturn } from "./__utils/ComboboxPopoverState";
export declare const unstable_useComboboxPopover: {
(options?: unstable_ComboboxPopoverOptions | undefined, htmlProps?: unstable_ComboboxPopoverHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_ComboboxPopoverHTMLProps;
unstable_propsAreEqual: (prev: import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "menuRole"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "baseId"> & Pick<PopoverOptions, "hide" | "visible" | "unstable_system" | "baseId" | "animated" | "animating" | "modal" | "unstable_popoverRef" | "unstable_popoverStyles" | "stopAnimation" | "hideOnEsc" | "hideOnClickOutside" | "preventBodyScroll" | "unstable_initialFocusRef" | "unstable_finalFocusRef" | "unstable_orphan"> & Pick<Partial<ComboboxPopoverStateReturn>, "unstable_referenceRef"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}, next: import("..").BoxOptions & Pick<Partial<import("./ComboboxState").unstable_ComboboxStateReturn>, "menuRole"> & Pick<import("./ComboboxState").unstable_ComboboxStateReturn, "baseId"> & Pick<PopoverOptions, "hide" | "visible" | "unstable_system" | "baseId" | "animated" | "animating" | "modal" | "unstable_popoverRef" | "unstable_popoverStyles" | "stopAnimation" | "hideOnEsc" | "hideOnClickOutside" | "preventBodyScroll" | "unstable_initialFocusRef" | "unstable_finalFocusRef" | "unstable_orphan"> & Pick<Partial<ComboboxPopoverStateReturn>, "unstable_referenceRef"> & import("react").HTMLAttributes<any> & import("react").RefAttributes<any> & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
} & {
wrapElement?: ((element: import("react").ReactNode) => import("react").ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_ComboboxPopoverOptions, htmlProps: unstable_ComboboxPopoverHTMLProps) => unstable_ComboboxPopoverOptions;
};
export declare const unstable_ComboboxPopover: import("reakit-system/ts/createComponent").Component<"div", unstable_ComboboxPopoverOptions>;
export declare type unstable_ComboboxPopoverOptions = ComboboxListOptions & Omit<PopoverOptions, "unstable_disclosureRef" | "unstable_autoFocusOnHide" | "unstable_autoFocusOnShow"> & Pick<Partial<ComboboxPopoverStateReturn>, "unstable_referenceRef">;
export declare type unstable_ComboboxPopoverHTMLProps = PopoverHTMLProps & ComboboxListHTMLProps;
export declare type unstable_ComboboxPopoverProps = unstable_ComboboxPopoverOptions & unstable_ComboboxPopoverHTMLProps;

8
node_modules/reakit/ts/Combobox/ComboboxState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
import { SealedInitialState } from "reakit-utils/useSealedState";
import { unstable_ComboboxListState as ComboboxListState, unstable_ComboboxListActions as ComboboxListActions, unstable_ComboboxListInitialState as ComboboxListInitialState } from "./ComboboxListState";
import { ComboboxPopoverState, ComboboxPopoverActions, ComboboxPopoverInitialState } from "./__utils/ComboboxPopoverState";
export declare function unstable_useComboboxState(initialState?: SealedInitialState<unstable_ComboboxInitialState>): unstable_ComboboxStateReturn;
export declare type unstable_ComboboxState = ComboboxPopoverState & ComboboxListState;
export declare type unstable_ComboboxActions = ComboboxPopoverActions & ComboboxListActions;
export declare type unstable_ComboboxInitialState = ComboboxPopoverInitialState & ComboboxListInitialState;
export declare type unstable_ComboboxStateReturn = unstable_ComboboxState & unstable_ComboboxActions;

7
node_modules/reakit/ts/Combobox/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export declare const COMBOBOX_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place", "hideOnEsc"];
export declare const COMBOBOX_GRID_CELL_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place"];
export declare const COMBOBOX_GRID_ROW_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place"];
export declare const COMBOBOX_ITEM_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place", "value"];
export declare const COMBOBOX_LIST_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place"];
export declare const COMBOBOX_OPTION_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place"];
export declare const COMBOBOX_POPOVER_KEYS: readonly ["baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "columns", "setColumns", "baseId", "unstable_idCountRef", "unstable_virtual", "rtl", "orientation", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "items", "menuRole", "inputValue", "minValueLength", "currentValue", "values", "limit", "matches", "list", "inline", "autoSelect", "visible", "setBaseId", "unregisterItem", "registerGroup", "unregisterGroup", "move", "next", "previous", "up", "down", "first", "last", "sort", "unstable_setVirtual", "setRTL", "setOrientation", "setCurrentId", "setLoop", "setWrap", "setShift", "reset", "unstable_setIncludesBaseElement", "unstable_setHasActiveWidget", "registerItem", "setInputValue", "setMinValueLength", "setValues", "setLimit", "setList", "setInline", "setAutoSelect", "animated", "animating", "modal", "unstable_disclosureRef", "unstable_referenceRef", "unstable_popoverRef", "unstable_arrowRef", "unstable_popoverStyles", "unstable_arrowStyles", "unstable_originalPlacement", "unstable_update", "placement", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "setModal", "place"];

View File

@@ -0,0 +1,169 @@
import { SetState } from "reakit-utils/types";
import { CompositeStateReturn, CompositeState, CompositeActions } from "../../Composite/CompositeState";
import { Item } from "./types";
export declare function useComboboxBaseState<T extends CompositeStateReturn>(composite: T, { inputValue: initialInputValue, minValueLength: initialMinValueLength, values: initialValues, limit: initialLimit, list: initialList, inline: initialInline, autoSelect: initialAutoSelect, }?: ComboboxBaseInitialState): ComboboxBaseStateReturn<T>;
export declare type ComboboxBaseState<T extends CompositeState = CompositeState> = Omit<T, "items"> & {
/**
* Lists all the combobox items with their `id`, DOM `ref`, `disabled` state,
* `value` and `groupId` if any. This state is automatically updated when
* `registerItem` and `unregisterItem` are called.
* @example
* const combobox = useComboboxState();
* combobox.items.forEach((item) => {
* console.log(item.value);
* });
*/
items: Item[];
/**
* Indicates the type of the suggestions popup.
*/
menuRole: "listbox" | "tree" | "grid" | "dialog";
/**
* Combobox input value that will be used to filter `values` and populate
* the `matches` property.
*/
inputValue: string;
/**
* How many characters are needed for opening the combobox popover and
* populating `matches` with filtered values.
* @default 0
* @example
* const combobox = useComboboxState({
* values: ["Red", "Green"],
* minValueLength: 2,
* });
* combobox.matches; // []
* combobox.setInputValue("g");
* // On next render
* combobox.matches; // []
* combobox.setInputValue("gr");
* // On next render
* combobox.matches; // ["Green"]
*/
minValueLength: number;
/**
* Value of the item that is currently selected.
*/
currentValue?: string;
/**
* Values that will be used to produce `matches`.
* @default []
* @example
* const combobox = useComboboxState({ values: ["Red", "Green"] });
* combobox.matches; // ["Red", "Green"]
* combobox.setInputValue("g");
* // On next render
* combobox.matches; // ["Green"]
*/
values: string[];
/**
* Maximum number of `matches`. If it's set to `false`, there will be no
* limit.
* @default 10
*/
limit: number | false;
/**
* Result of filtering `values` based on `inputValue`.
* @default []
* @example
* const combobox = useComboboxState({ values: ["Red", "Green"] });
* combobox.matches; // ["Red", "Green"]
* combobox.setInputValue("g");
* // On next render
* combobox.matches; // ["Green"]
*/
matches: string[];
/**
* Determines how the combobox options behave: dynamically or statically.
* By default, it's `true` if `values` are provided. Otherwise, it's `false`:
* - If it's `true` and `values` are provided, then they will be
* automatically filtered based on `inputValue` and will populate `matches`.
* - If it's `true` and `values` aren't provided, this means that you'll
* provide and filter values by yourself. `matches` will be empty.
* - If it's `false` and `values` are provided, then they won't be
* automatically filtered and `matches` will be the same as `values`.
* @example
* const withoutValues = useComboboxState();
* withValues.list; // false;
* const withValues = useComboboxState({ values: ["Red", "Green"] });
* withValues.list; // true;
* const withList = useComboboxState({ list: true });
* withValues.list; // true;
* <Combobox list={true} /> // <input aria-autocomplete="list">
*/
list: boolean;
/**
* Determines whether focusing on an option will temporarily change the value
* of the combobox. If it's `true`, focusing on an option will temporarily
* change the combobox value to the option's value.
* @default false
*/
inline: boolean;
/**
* Determines whether the first option will be automatically selected. When
* it's set to `true`, the exact behavior will depend on the value of
* `inline`:
* - If `inline` is `true`, the first option is automatically focused when
* the combobox popover opens and the input value changes to reflect this.
* The inline completion string will be highlighted and will have a selected
* state.
* - If `inline` is `false`, the first option is automatically focused when
* the combobox popover opens, but the input value remains the same.
* @default false
*/
autoSelect: boolean;
/**
* Whether the suggestions popup is visible or not.
*/
visible: boolean;
};
export declare type ComboboxBaseActions<T extends CompositeActions = CompositeActions> = Omit<T, "registerItem"> & {
/**
* Registers a combobox item.
* @example
* const ref = React.useRef();
* const combobox = useComboboxState();
* React.useEffect(() => {
* combobox.registerItem({ ref, id: "id" });
* return () => combobox.unregisterItem("id");
* });
*/
registerItem: (item: Item) => void;
/**
* Sets `inputValue`.
* @example
* const combobox = useComboboxState();
* combobox.setInputValue("new value");
*/
setInputValue: SetState<ComboboxBaseState["inputValue"]>;
/**
* Sets `minValueLength`.
*/
setMinValueLength: SetState<ComboboxBaseState["minValueLength"]>;
/**
* Sets `values`.
* @example
* const combobox = useComboboxState();
* combobox.setValues(["Red", "Green"]);
* combobox.setValues((prevValues) => [...prevValues, "Blue"]);
*/
setValues: SetState<ComboboxBaseState["values"]>;
/**
* Sets `limit`.
*/
setLimit: SetState<ComboboxBaseState["limit"]>;
/**
* Sets `list`.
*/
setList: SetState<ComboboxBaseState["list"]>;
/**
* Sets `inline`.
*/
setInline: SetState<ComboboxBaseState["inline"]>;
/**
* Sets `autoSelect`.
*/
setAutoSelect: SetState<ComboboxBaseState["autoSelect"]>;
};
export declare type ComboboxBaseInitialState = Pick<Partial<ComboboxBaseState>, "inputValue" | "minValueLength" | "values" | "limit" | "list" | "inline" | "autoSelect">;
export declare type ComboboxBaseStateReturn<T extends CompositeStateReturn> = ComboboxBaseState<T> & ComboboxBaseActions<T>;

View File

@@ -0,0 +1,37 @@
import * as React from "react";
import { PopoverState, PopoverActions, PopoverInitialState } from "../../Popover/PopoverState";
import { unstable_ComboboxListStateReturn as ComboboxListStateReturn } from "../ComboboxListState";
import { unstable_ComboboxListGridStateReturn as ComboboxListGridStateReturn } from "../ComboboxListGridState";
export declare function useComboboxPopoverState<T extends ComboboxListStateReturn | ComboboxListGridStateReturn>(combobox: T, { gutter, placement, ...initialState }?: ComboboxPopoverInitialState): T & import("../..").unstable_IdState & {
visible: boolean;
animated: number | boolean;
animating: boolean;
} & import("../..").unstable_IdActions & {
show: () => void;
hide: () => void;
toggle: () => void;
setVisible: React.Dispatch<React.SetStateAction<boolean>>;
setAnimated: React.Dispatch<React.SetStateAction<number | boolean>>;
stopAnimation: () => void;
} & {
modal: boolean;
unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>;
} & {
setModal: React.Dispatch<React.SetStateAction<boolean>>;
} & {
unstable_referenceRef: React.RefObject<HTMLElement | null>;
unstable_popoverRef: React.RefObject<HTMLElement | null>;
unstable_arrowRef: React.RefObject<HTMLElement | null>;
unstable_popoverStyles: React.CSSProperties;
unstable_arrowStyles: React.CSSProperties;
unstable_originalPlacement: import("@popperjs/core").Placement;
unstable_update: () => boolean;
placement: import("@popperjs/core").Placement;
} & {
visible: boolean;
place: React.Dispatch<React.SetStateAction<import("@popperjs/core").Placement>>;
};
export declare type ComboboxPopoverState = PopoverState;
export declare type ComboboxPopoverActions = PopoverActions;
export declare type ComboboxPopoverInitialState = PopoverInitialState;
export declare type ComboboxPopoverStateReturn = ComboboxPopoverState & ComboboxPopoverActions;

View File

@@ -0,0 +1 @@
export declare function getItemId(baseId: string, value: string, id?: string): string;

View File

@@ -0,0 +1 @@
export declare function getMenuId(baseId: string): string;

12
node_modules/reakit/ts/Combobox/__utils/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/// <reference types="react" />
export declare type Group = {
id: string;
ref: React.RefObject<HTMLElement>;
};
export declare type Item = {
id: string | null;
ref: React.RefObject<HTMLElement>;
groupId?: Group["id"];
disabled?: boolean;
value?: string;
};

11
node_modules/reakit/ts/Combobox/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export * from "./Combobox";
export * from "./ComboboxGridCell";
export * from "./ComboboxGridRow";
export * from "./ComboboxGridState";
export * from "./ComboboxItem";
export * from "./ComboboxList";
export * from "./ComboboxListGridState";
export * from "./ComboboxListState";
export * from "./ComboboxOption";
export * from "./ComboboxPopover";
export * from "./ComboboxState";

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

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

22
node_modules/reakit/ts/Composite/CompositeGroup.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
import * as React from "react";
import { GroupOptions, GroupHTMLProps } from "../Group/Group";
import { unstable_IdOptions, unstable_IdHTMLProps } from "../Id/Id";
import { CompositeStateReturn } from "./CompositeState";
export declare type CompositeGroupOptions = GroupOptions & unstable_IdOptions & Pick<CompositeStateReturn, "registerGroup" | "unregisterGroup"> & Pick<Partial<CompositeStateReturn>, "currentId" | "unstable_moves" | "items">;
export declare type CompositeGroupHTMLProps = GroupHTMLProps & unstable_IdHTMLProps;
export declare type CompositeGroupProps = CompositeGroupOptions & CompositeGroupHTMLProps;
export declare const useCompositeGroup: {
(options?: CompositeGroupOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<CompositeStateReturn, "registerGroup" | "unregisterGroup"> & Pick<Partial<CompositeStateReturn>, "currentId" | "items" | "unstable_moves"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").unstable_IdStateReturn>, "baseId" | "unstable_idCountRef"> & {
id?: string | undefined;
} & Pick<CompositeStateReturn, "registerGroup" | "unregisterGroup"> & Pick<Partial<CompositeStateReturn>, "currentId" | "items" | "unstable_moves"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: CompositeGroupOptions, htmlProps: import("..").RoleHTMLProps) => CompositeGroupOptions;
};
export declare const CompositeGroup: import("reakit-system/ts/createComponent").Component<"div", CompositeGroupOptions>;

38
node_modules/reakit/ts/Composite/CompositeItem.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
import * as React from "react";
import { ClickableOptions, ClickableHTMLProps } from "../Clickable/Clickable";
import { unstable_IdOptions, unstable_IdHTMLProps } from "../Id/Id";
import { CompositeStateReturn } from "./CompositeState";
export declare type CompositeItemOptions = ClickableOptions & unstable_IdOptions & Pick<Partial<CompositeStateReturn>, "unstable_virtual" | "baseId" | "orientation" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<CompositeStateReturn, "items" | "currentId" | "registerItem" | "unregisterItem" | "setCurrentId" | "next" | "previous" | "up" | "down" | "first" | "last">;
export declare type CompositeItemHTMLProps = ClickableHTMLProps & unstable_IdHTMLProps;
export declare type CompositeItemProps = CompositeItemOptions & CompositeItemHTMLProps;
export declare const useCompositeItem: {
(options?: CompositeItemOptions | 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<CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & 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<CompositeStateReturn>, "orientation" | "baseId" | "unstable_virtual" | "unstable_moves" | "unstable_hasActiveWidget"> & Pick<CompositeStateReturn, "down" | "up" | "next" | "first" | "last" | "currentId" | "items" | "registerItem" | "unregisterItem" | "previous" | "setCurrentId"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & {
disabled?: boolean | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: CompositeItemOptions, htmlProps: import("..").TabbableHTMLProps) => CompositeItemOptions;
};
export declare const CompositeItem: import("reakit-system/ts/createComponent").Component<"button", CompositeItemOptions>;

View File

@@ -0,0 +1,17 @@
import * as React from "react";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { CompositeStateReturn } from "./CompositeState";
export declare type unstable_CompositeItemWidgetOptions = RoleOptions & Pick<Partial<CompositeStateReturn>, "wrap"> & Pick<CompositeStateReturn, "unstable_hasActiveWidget" | "unstable_setHasActiveWidget" | "currentId">;
export declare type unstable_CompositeItemWidgetHTMLProps = RoleHTMLProps;
export declare type unstable_CompositeItemWidgetProps = unstable_CompositeItemWidgetOptions & unstable_CompositeItemWidgetHTMLProps;
export declare const unstable_useCompositeItemWidget: {
(options?: unstable_CompositeItemWidgetOptions | undefined, htmlProps?: RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RoleHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & Pick<Partial<CompositeStateReturn>, "wrap"> & Pick<CompositeStateReturn, "currentId" | "unstable_hasActiveWidget" | "unstable_setHasActiveWidget"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: RoleOptions & Pick<Partial<CompositeStateReturn>, "wrap"> & Pick<CompositeStateReturn, "currentId" | "unstable_hasActiveWidget" | "unstable_setHasActiveWidget"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_CompositeItemWidgetOptions, htmlProps: RoleHTMLProps) => unstable_CompositeItemWidgetOptions;
};
export declare const unstable_CompositeItemWidget: import("reakit-system/ts/createComponent").Component<"div", unstable_CompositeItemWidgetOptions>;

287
node_modules/reakit/ts/Composite/CompositeState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,287 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { unstable_IdState, unstable_IdActions, unstable_IdInitialState, unstable_IdStateReturn } from "../Id/IdState";
import { Item, Group, Orientation } from "./__utils/types";
export declare function useCompositeState(initialState?: SealedInitialState<CompositeInitialState>): CompositeStateReturn;
export declare type CompositeState = unstable_IdState & {
/**
* If enabled, the composite element will act as an
* [aria-activedescendant](https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_focus_activedescendant)
* container instead of
* [roving tabindex](https://www.w3.org/TR/wai-aria-practices/#kbd_roving_tabindex).
* DOM focus will remain on the composite while its items receive virtual focus.
* @default false
*/
unstable_virtual: boolean;
/**
* Determines how `next` and `previous` functions will behave. If `rtl` is
* set to `true`, they will be inverted. This only affects the composite
* widget behavior. You still need to set `dir="rtl"` on HTML/CSS.
* @default false
*/
rtl: boolean;
/**
* Defines the orientation of the composite widget. If the composite has a
* single row or column (one-dimensional), the `orientation` value determines
* which arrow keys can be used to move focus:
* - `undefined`: all arrow keys work.
* - `horizontal`: only left and right arrow keys work.
* - `vertical`: only up and down arrow keys work.
*
* It doesn't have any effect on two-dimensional composites.
* @default undefined
*/
orientation?: Orientation;
/**
* Lists all the composite items with their `id`, DOM `ref`, `disabled` state
* and `groupId` if any. This state is automatically updated when
* `registerItem` and `unregisterItem` are called.
* @example
* const composite = useCompositeState();
* composite.items.forEach((item) => {
* const { id, ref, disabled, groupId } = item;
* ...
* });
*/
items: Item[];
/**
* Lists all the composite groups with their `id` and DOM `ref`. This state
* is automatically updated when `registerGroup` and `unregisterGroup` are
* called.
* @example
* const composite = useCompositeState();
* composite.groups.forEach((group) => {
* const { id, ref } = group;
* ...
* });
*/
groups: Group[];
/**
* The current focused item `id`.
* - `undefined` will automatically focus the first enabled composite item.
* - `null` will focus the base composite element and users will be able to
* navigate out of it using arrow keys.
* - If `currentId` is initially set to `null`, the base composite element
* itself will have focus and users will be able to navigate to it using
* arrow keys.
* @default undefined
* @example
* // First enabled item has initial focus
* useCompositeState();
* // Base composite element has initial focus
* useCompositeState({ currentId: null });
* // Specific composite item element has initial focus
* useCompositeState({ currentId: "item-id" });
*/
currentId?: string | null;
/**
* On one-dimensional composites:
* - `true` loops from the last item to the first item and vice-versa.
* - `horizontal` loops only if `orientation` is `horizontal` or not set.
* - `vertical` loops only if `orientation` is `vertical` or not set.
* - If `currentId` is initially set to `null`, the composite element will
* be focused in between the last and first items.
*
* On two-dimensional composites:
* - `true` loops from the last row/column item to the first item in the
* same row/column and vice-versa. If it's the last item in the last row, it
* moves to the first item in the first row and vice-versa.
* - `horizontal` loops only from the last row item to the first item in
* the same row.
* - `vertical` loops only from the last column item to the first item in
* the column row.
* - If `currentId` is initially set to `null`, vertical loop will have no
* effect as moving down from the last row or up from the first row will
* focus the composite element.
* - If `wrap` matches the value of `loop`, it'll wrap between the last
* item in the last row or column and the first item in the first row or
* column and vice-versa.
* @default false
*/
loop: boolean | Orientation;
/**
* **Has effect only on two-dimensional composites**. If enabled, moving to
* the next item from the last one in a row or column will focus the first
* item in the next row or column and vice-versa.
* - `true` wraps between rows and columns.
* - `horizontal` wraps only between rows.
* - `vertical` wraps only between columns.
* - If `loop` matches the value of `wrap`, it'll wrap between the last
* item in the last row or column and the first item in the first row or
* column and vice-versa.
* @default false
*/
wrap: boolean | Orientation;
/**
* **Has effect only on two-dimensional composites**. If enabled, moving up
* or down when there's no next item or the next item is disabled will shift
* to the item right before it.
* @default false
*/
shift: boolean;
/**
* Stores the number of moves that have been performed by calling `move`,
* `next`, `previous`, `up`, `down`, `first` or `last`.
* @default 0
*/
unstable_moves: number;
/**
* @default false
* @private
*/
unstable_hasActiveWidget: boolean;
/**
* @default false
* @private
*/
unstable_includesBaseElement: boolean;
};
export declare type CompositeActions = unstable_IdActions & {
/**
* Registers a composite item.
* @example
* const ref = React.useRef();
* const composite = useCompositeState();
* React.useEffect(() => {
* composite.registerItem({ ref, id: "id" });
* return () => composite.unregisterItem("id");
* }, []);
*/
registerItem: (item: Item) => void;
/**
* Unregisters a composite item.
* @example
* const ref = React.useRef();
* const composite = useCompositeState();
* React.useEffect(() => {
* composite.registerItem({ ref, id: "id" });
* return () => composite.unregisterItem("id");
* }, []);
*/
unregisterItem: (id: string) => void;
/**
* Registers a composite group.
* @example
* const ref = React.useRef();
* const composite = useCompositeState();
* React.useEffect(() => {
* composite.registerGroup({ ref, id: "id" });
* return () => composite.unregisterGroup("id");
* }, []);
*/
registerGroup: (group: Group) => void;
/**
* Unregisters a composite group.
* @example
* const ref = React.useRef();
* const composite = useCompositeState();
* React.useEffect(() => {
* composite.registerGroup({ ref, id: "id" });
* return () => composite.unregisterGroup("id");
* }, []);
*/
unregisterGroup: (id: string) => void;
/**
* Moves focus to a given item ID.
* @example
* const composite = useCompositeState();
* composite.move("item-2"); // focus item 2
*/
move: (id: string | null) => void;
/**
* Moves focus to the next item.
*/
next: (unstable_allTheWay?: boolean) => void;
/**
* Moves focus to the previous item.
*/
previous: (unstable_allTheWay?: boolean) => void;
/**
* Moves focus to the item above.
*/
up: (unstable_allTheWay?: boolean) => void;
/**
* Moves focus to the item below.
*/
down: (unstable_allTheWay?: boolean) => void;
/**
* Moves focus to the first item.
*/
first: () => void;
/**
* Moves focus to the last item.
*/
last: () => void;
/**
* Sorts the `composite.items` based on the items position in the DOM. This
* is especially useful after modifying the composite items order in the DOM.
* Most of the time, though, you don't need to manually call this function as
* the re-ordering happens automatically.
*/
sort: () => void;
/**
* Sets `virtual`.
*/
unstable_setVirtual: React.Dispatch<React.SetStateAction<CompositeState["unstable_virtual"]>>;
/**
* Sets `rtl`.
* @example
* const composite = useCompositeState({ rtl: true });
* composite.setRTL(false);
*/
setRTL: React.Dispatch<React.SetStateAction<CompositeState["rtl"]>>;
/**
* Sets `orientation`.
*/
setOrientation: React.Dispatch<React.SetStateAction<CompositeState["orientation"]>>;
/**
* Sets `currentId`. This is different from `composite.move` as this only
* updates the `currentId` state without moving focus. When the composite
* widget gets focused by the user, the item referred by the `currentId`
* state will get focus.
* @example
* const composite = useCompositeState({ currentId: "item-1" });
* // Updates `composite.currentId` to `item-2`
* composite.setCurrentId("item-2");
*/
setCurrentId: React.Dispatch<React.SetStateAction<CompositeState["currentId"]>>;
/**
* Sets `loop`.
*/
setLoop: React.Dispatch<React.SetStateAction<CompositeState["loop"]>>;
/**
* Sets `wrap`.
*/
setWrap: React.Dispatch<React.SetStateAction<CompositeState["wrap"]>>;
/**
* Sets `shift`.
*/
setShift: React.Dispatch<React.SetStateAction<CompositeState["shift"]>>;
/**
* Resets to initial state.
* @example
* // On initial render, currentId will be item-1 and loop will be true
* const composite = useCompositeState({
* currentId: "item-1",
* loop: true,
* });
* // On next render, currentId will be item-2 and loop will be false
* composite.setCurrentId("item-2");
* composite.setLoop(false);
* // On next render, currentId will be item-1 and loop will be true
* composite.reset();
*/
reset: () => void;
/**
* Sets `includesBaseElement`.
* @private
*/
unstable_setIncludesBaseElement: React.Dispatch<React.SetStateAction<CompositeState["unstable_includesBaseElement"]>>;
/**
* Sets `hasActiveWidget`.
* @private
*/
unstable_setHasActiveWidget: React.Dispatch<React.SetStateAction<CompositeState["unstable_hasActiveWidget"]>>;
};
export declare type CompositeInitialState = unstable_IdInitialState & Partial<Pick<CompositeState, "unstable_virtual" | "rtl" | "orientation" | "currentId" | "loop" | "wrap" | "shift" | "unstable_includesBaseElement">>;
export declare type CompositeStateReturn = unstable_IdStateReturn & CompositeState & CompositeActions;

4
node_modules/reakit/ts/Composite/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export declare const COMPOSITE_KEYS: readonly ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "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"];
export declare const COMPOSITE_GROUP_KEYS: readonly ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "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"];
export declare const COMPOSITE_ITEM_KEYS: readonly ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "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"];
export declare const COMPOSITE_ITEM_WIDGET_KEYS: readonly ["baseId", "unstable_idCountRef", "setBaseId", "unstable_virtual", "rtl", "orientation", "items", "groups", "currentId", "loop", "wrap", "shift", "unstable_moves", "unstable_hasActiveWidget", "unstable_includesBaseElement", "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"];

View File

@@ -0,0 +1 @@
export declare function addItemAtIndex<T extends any[]>(array: T, item: T[number], index: number): any[];

View File

@@ -0,0 +1,5 @@
import { Item } from "./types";
/**
* Turns [[row1, row1], [row2]] into [[row1, row1], [row2, row2]]
*/
export declare function fillGroups(groups: Item[][], currentId?: string | null, shift?: boolean): Item[][];

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findDOMIndex(items: Item[], item: Item): number;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findEnabledItemById(items: Item[], id?: string | null): Item | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function findFirstEnabledItem(items: Item[], excludeId?: string): Item | undefined;

View File

@@ -0,0 +1 @@
export declare function flatten<T>(grid: T[][]): T[];

View File

@@ -0,0 +1,2 @@
import { CompositeState } from "../CompositeState";
export declare function getCurrentId(options: Pick<CompositeState, "currentId" | "items">, passedId?: CompositeState["currentId"]): string | null | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function getItemsInGroup(items: Item[], groupId?: string): Item[];

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function getMaxLength(rows: Item[][]): number;

View File

@@ -0,0 +1,2 @@
import { Orientation } from "./types";
export declare function getOppositeOrientation(orientation?: Orientation): "horizontal" | "vertical" | undefined;

View File

@@ -0,0 +1,2 @@
import { Item } from "./types";
export declare function groupItems(items: Item[]): Item[][];

View File

@@ -0,0 +1 @@
export declare function isElementPreceding(element1: Element, element2: Element): boolean;

View File

@@ -0,0 +1,7 @@
import { Item } from "./types";
export declare function placeItemsAfter(items: Item[], id: string, shouldInsertNullItem?: boolean): (Item | {
id: null;
ref: {
current: null;
};
})[];

View File

@@ -0,0 +1 @@
export declare function reverse<T>(array: T[]): T[];

View File

@@ -0,0 +1 @@
export declare function setTextFieldValue(element: HTMLElement, value: string): void;

View File

@@ -0,0 +1,6 @@
import * as React from "react";
declare type Item = {
ref: React.RefObject<HTMLElement | null>;
};
export declare function sortBasedOnDOMPosition<T extends Item>(items: T[]): T[];
export {};

12
node_modules/reakit/ts/Composite/__utils/types.d.ts generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/// <reference types="react" />
export declare type Group = {
id: string;
ref: React.RefObject<HTMLElement>;
};
export declare type Item = {
id: string | null;
ref: React.RefObject<HTMLElement>;
groupId?: Group["id"];
disabled?: boolean;
};
export declare type Orientation = "horizontal" | "vertical";

View File

@@ -0,0 +1,4 @@
import { Item } from "./types";
declare type SetItems = (items: Item[]) => void;
export declare function useSortBasedOnDOMPosition(items: Item[], setItems: SetItems): void;
export {};

View File

@@ -0,0 +1,7 @@
declare type UserFocusElement = HTMLElement & {
userFocus?: boolean;
};
export declare function userFocus(element: UserFocusElement): void;
export declare function hasUserFocus(element: UserFocusElement): boolean;
export declare function setUserFocus(element: UserFocusElement, value: boolean): void;
export {};

View File

@@ -0,0 +1,5 @@
import { Item } from "./types";
/**
* Turns [row1, row1, row2, row2] into [row1, row2, row1, row2]
*/
export declare function verticalizeItems(items: Item[]): Item[];

9
node_modules/reakit/ts/Composite/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
export * from "./Composite";
export * from "./CompositeGroup";
export * from "./CompositeItem";
export * from "./CompositeItemWidget";
export * from "./CompositeState";
export { useCompositeState as unstable_useCompositeState } from "./CompositeState";
export { Composite as unstable_Composite } from "./Composite";
export { CompositeGroup as unstable_CompositeGroup } from "./CompositeGroup";
export { CompositeItem as unstable_CompositeItem } from "./CompositeItem";

140
node_modules/reakit/ts/Dialog/Dialog.d.ts generated vendored Normal file
View File

@@ -0,0 +1,140 @@
import * as React from "react";
import { DisclosureContentOptions, DisclosureContentHTMLProps } from "../Disclosure/DisclosureContent";
import { DialogStateReturn } from "./DialogState";
export declare type DialogOptions = DisclosureContentOptions & Pick<Partial<DialogStateReturn>, "modal" | "hide" | "unstable_disclosureRef"> & Pick<DialogStateReturn, "baseId"> & {
/**
* When enabled, user can hide the dialog by pressing `Escape`.
*/
hideOnEsc?: boolean;
/**
* When enabled, user can hide the dialog by clicking outside it.
*/
hideOnClickOutside?: boolean;
/**
* When enabled, user can't scroll on body when the dialog is visible.
* This option doesn't work if the dialog isn't modal.
*/
preventBodyScroll?: boolean;
/**
* The element that will be focused when the dialog shows.
* When not set, the first tabbable element within the dialog will be used.
*/
unstable_initialFocusRef?: React.RefObject<HTMLElement>;
/**
* The element that will be focused when the dialog hides.
* When not set, the disclosure component will be used.
*/
unstable_finalFocusRef?: React.RefObject<HTMLElement>;
/**
* Whether or not the dialog should be a child of its parent.
* Opening a nested orphan dialog will close its parent dialog if
* `hideOnClickOutside` is set to `true` on the parent.
* It will be set to `false` if `modal` is `false`.
*/
unstable_orphan?: boolean;
/**
* Whether or not to move focus when the dialog shows.
* @private
*/
unstable_autoFocusOnShow?: boolean;
/**
* Whether or not to move focus when the dialog hides.
* @private
*/
unstable_autoFocusOnHide?: boolean;
};
export declare type DialogHTMLProps = DisclosureContentHTMLProps;
export declare type DialogProps = DialogOptions & DialogHTMLProps;
export declare const useDialog: {
(options?: DialogOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<DialogStateReturn, "baseId"> & {
/**
* When enabled, user can hide the dialog by pressing `Escape`.
*/
hideOnEsc?: boolean | undefined;
/**
* When enabled, user can hide the dialog by clicking outside it.
*/
hideOnClickOutside?: boolean | undefined;
/**
* When enabled, user can't scroll on body when the dialog is visible.
* This option doesn't work if the dialog isn't modal.
*/
preventBodyScroll?: boolean | undefined;
/**
* The element that will be focused when the dialog shows.
* When not set, the first tabbable element within the dialog will be used.
*/
unstable_initialFocusRef?: React.RefObject<HTMLElement> | undefined;
/**
* The element that will be focused when the dialog hides.
* When not set, the disclosure component will be used.
*/
unstable_finalFocusRef?: React.RefObject<HTMLElement> | undefined;
/**
* Whether or not the dialog should be a child of its parent.
* Opening a nested orphan dialog will close its parent dialog if
* `hideOnClickOutside` is set to `true` on the parent.
* It will be set to `false` if `modal` is `false`.
*/
unstable_orphan?: boolean | undefined;
/**
* Whether or not to move focus when the dialog shows.
* @private
*/
unstable_autoFocusOnShow?: boolean | undefined;
/**
* Whether or not to move focus when the dialog hides.
* @private
*/
unstable_autoFocusOnHide?: boolean | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<DialogStateReturn>, "hide" | "modal" | "unstable_disclosureRef"> & Pick<DialogStateReturn, "baseId"> & {
/**
* When enabled, user can hide the dialog by pressing `Escape`.
*/
hideOnEsc?: boolean | undefined;
/**
* When enabled, user can hide the dialog by clicking outside it.
*/
hideOnClickOutside?: boolean | undefined;
/**
* When enabled, user can't scroll on body when the dialog is visible.
* This option doesn't work if the dialog isn't modal.
*/
preventBodyScroll?: boolean | undefined;
/**
* The element that will be focused when the dialog shows.
* When not set, the first tabbable element within the dialog will be used.
*/
unstable_initialFocusRef?: React.RefObject<HTMLElement> | undefined;
/**
* The element that will be focused when the dialog hides.
* When not set, the disclosure component will be used.
*/
unstable_finalFocusRef?: React.RefObject<HTMLElement> | undefined;
/**
* Whether or not the dialog should be a child of its parent.
* Opening a nested orphan dialog will close its parent dialog if
* `hideOnClickOutside` is set to `true` on the parent.
* It will be set to `false` if `modal` is `false`.
*/
unstable_orphan?: boolean | undefined;
/**
* Whether or not to move focus when the dialog shows.
* @private
*/
unstable_autoFocusOnShow?: boolean | undefined;
/**
* Whether or not to move focus when the dialog hides.
* @private
*/
unstable_autoFocusOnHide?: boolean | undefined;
} & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: DialogOptions, htmlProps: import("..").RoleHTMLProps) => DialogOptions;
};
export declare const Dialog: import("reakit-system/ts/createComponent").Component<"div", DialogOptions>;

17
node_modules/reakit/ts/Dialog/DialogBackdrop.d.ts generated vendored Normal file
View File

@@ -0,0 +1,17 @@
import * as React from "react";
import { DisclosureContentOptions, DisclosureContentHTMLProps } from "../Disclosure/DisclosureContent";
import { DialogStateReturn } from "./DialogState";
export declare type DialogBackdropOptions = DisclosureContentOptions & Pick<Partial<DialogStateReturn>, "modal">;
export declare type DialogBackdropHTMLProps = DisclosureContentHTMLProps;
export declare type DialogBackdropProps = DialogBackdropOptions & DialogBackdropHTMLProps;
export declare const useDialogBackdrop: {
(options?: DialogBackdropOptions | undefined, htmlProps?: import("..").RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): import("..").RoleHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<DialogStateReturn>, "modal"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: import("..").RoleOptions & Pick<Partial<import("..").DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & Pick<Partial<DialogStateReturn>, "modal"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: DialogBackdropOptions, htmlProps: import("..").RoleHTMLProps) => DialogBackdropOptions;
};
export declare const DialogBackdrop: import("reakit-system/ts/createComponent").Component<"div", DialogBackdropOptions>;

33
node_modules/reakit/ts/Dialog/DialogDisclosure.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
import * as React from "react";
import { DisclosureOptions, DisclosureHTMLProps } from "../Disclosure/Disclosure";
import { DialogStateReturn } from "./DialogState";
export declare type DialogDisclosureOptions = DisclosureOptions & Pick<Partial<DialogStateReturn>, "unstable_disclosureRef"> & Pick<DialogStateReturn, "toggle">;
export declare type DialogDisclosureHTMLProps = DisclosureHTMLProps;
export declare type DialogDisclosureProps = DialogDisclosureOptions & DialogDisclosureHTMLProps;
export declare const useDialogDisclosure: {
(options?: DialogDisclosureOptions | 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<DialogStateReturn>, "unstable_disclosureRef"> & Pick<DialogStateReturn, "toggle"> & 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<DialogStateReturn>, "unstable_disclosureRef"> & Pick<DialogStateReturn, "toggle"> & 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: DialogDisclosureOptions, htmlProps: import("..").ButtonHTMLProps) => DialogDisclosureOptions;
};
export declare const DialogDisclosure: import("reakit-system/ts/createComponent").Component<"button", DialogDisclosureOptions>;

26
node_modules/reakit/ts/Dialog/DialogState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { DisclosureState, DisclosureActions, DisclosureInitialState, DisclosureStateReturn } from "../Disclosure/DisclosureState";
export declare type DialogState = DisclosureState & {
/**
* Toggles Dialog's `modal` state.
* - Non-modal: `preventBodyScroll` doesn't work and focus is free.
* - Modal: `preventBodyScroll` is automatically enabled, focus is
* trapped within the dialog and the dialog is rendered within a `Portal`
* by default.
*/
modal: boolean;
/**
* @private
*/
unstable_disclosureRef: React.MutableRefObject<HTMLElement | null>;
};
export declare type DialogActions = DisclosureActions & {
/**
* Sets `modal`.
*/
setModal: React.Dispatch<React.SetStateAction<DialogState["modal"]>>;
};
export declare type DialogInitialState = DisclosureInitialState & Partial<Pick<DialogState, "modal">>;
export declare type DialogStateReturn = DisclosureStateReturn & DialogState & DialogActions;
export declare function useDialogState(initialState?: SealedInitialState<DialogInitialState>): DialogStateReturn;

3
node_modules/reakit/ts/Dialog/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export declare const DIALOG_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal", "hideOnEsc", "hideOnClickOutside", "preventBodyScroll", "unstable_initialFocusRef", "unstable_finalFocusRef", "unstable_orphan", "unstable_autoFocusOnShow", "unstable_autoFocusOnHide"];
export declare const DIALOG_BACKDROP_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal"];
export declare const DIALOG_DISCLOSURE_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation", "modal", "unstable_disclosureRef", "setModal"];

View File

@@ -0,0 +1,2 @@
import * as React from "react";
export declare const DialogBackdropContext: React.Context<string | undefined>;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useDisableHoverOutside(portalRef: React.RefObject<HTMLElement>, nestedDialogs: Array<React.RefObject<HTMLElement>>, options: DialogOptions): void;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useDisclosureRef(dialogRef: React.RefObject<HTMLElement>, options: DialogOptions): React.MutableRefObject<HTMLElement | null>;

View File

@@ -0,0 +1,2 @@
import * as React from "react";
export declare function useEventListenerOutside(containerRef: React.RefObject<HTMLElement>, disclosureRef: React.RefObject<HTMLElement>, nestedDialogs: Array<React.RefObject<HTMLElement>>, eventType: string, listener?: (e: Event) => void, shouldListen?: boolean, capture?: boolean): void;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useFocusOnBlur(dialogRef: React.RefObject<HTMLElement>, options: DialogOptions): (event: React.FocusEvent<HTMLElement>) => void;

View File

@@ -0,0 +1,7 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
/**
* When the focused child gets removed from the DOM, we make sure to move focus
* to the dialog.
*/
export declare function useFocusOnChildUnmount(dialogRef: React.RefObject<HTMLElement>, options: DialogOptions): void;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useFocusOnHide(dialogRef: React.RefObject<HTMLElement>, disclosureRef: React.RefObject<HTMLElement>, options: DialogOptions): void;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useFocusOnShow(dialogRef: React.RefObject<HTMLElement>, nestedDialogs: Array<React.RefObject<HTMLElement>>, options: DialogOptions): void;

View File

@@ -0,0 +1,4 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function isFocusTrap(element: Element): boolean;
export declare function useFocusTrap(dialogRef: React.RefObject<HTMLElement>, visibleModals: Array<React.RefObject<HTMLElement>>, options: DialogOptions): void;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function useHideOnClickOutside(dialogRef: React.RefObject<HTMLElement>, disclosureRef: React.RefObject<HTMLElement>, nestedDialogs: Array<React.RefObject<HTMLElement>>, options: DialogOptions): void;

View File

@@ -0,0 +1,9 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
declare type DialogRef = React.RefObject<HTMLElement>;
export declare function useNestedDialogs(dialogRef: DialogRef, options: DialogOptions): {
dialogs: DialogRef[];
visibleModals: DialogRef[];
wrap: (element: React.ReactNode) => JSX.Element;
};
export {};

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function usePortalRef(dialogRef: React.RefObject<HTMLElement>, options: DialogOptions): React.MutableRefObject<HTMLElement | null>;

View File

@@ -0,0 +1,3 @@
import * as React from "react";
import { DialogOptions } from "../Dialog";
export declare function usePreventBodyScroll(targetRef: React.RefObject<HTMLElement>, options: DialogOptions): void;

4
node_modules/reakit/ts/Dialog/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,4 @@
export * from "./Dialog";
export * from "./DialogBackdrop";
export * from "./DialogDisclosure";
export * from "./DialogState";

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

@@ -0,0 +1,33 @@
import * as React from "react";
import { ButtonOptions, ButtonHTMLProps } from "../Button/Button";
import { DisclosureStateReturn } from "./DisclosureState";
export declare type DisclosureOptions = ButtonOptions & Pick<Partial<DisclosureStateReturn>, "visible"> & Pick<DisclosureStateReturn, "toggle" | "baseId">;
export declare type DisclosureHTMLProps = ButtonHTMLProps;
export declare type DisclosureProps = DisclosureOptions & DisclosureHTMLProps;
export declare const useDisclosure: {
(options?: DisclosureOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<DisclosureStateReturn>, "visible"> & Pick<DisclosureStateReturn, "toggle" | "baseId"> & 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<DisclosureStateReturn>, "visible"> & Pick<DisclosureStateReturn, "toggle" | "baseId"> & 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: DisclosureOptions, htmlProps: ButtonHTMLProps) => DisclosureOptions;
};
export declare const Disclosure: import("reakit-system/ts/createComponent").Component<"button", DisclosureOptions>;

View File

@@ -0,0 +1,17 @@
import * as React from "react";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { DisclosureStateReturn } from "./DisclosureState";
export declare type DisclosureContentOptions = RoleOptions & Pick<Partial<DisclosureStateReturn>, "baseId" | "visible" | "animating" | "animated" | "stopAnimation">;
export declare type DisclosureContentHTMLProps = RoleHTMLProps;
export declare type DisclosureContentProps = DisclosureContentOptions & DisclosureContentHTMLProps;
export declare const useDisclosureContent: {
(options?: DisclosureContentOptions | undefined, htmlProps?: RoleHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): RoleHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & Pick<Partial<DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}, next: RoleOptions & Pick<Partial<DisclosureStateReturn>, "visible" | "baseId" | "animated" | "animating" | "stopAnimation"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
}) => boolean;
__keys: readonly any[];
__useOptions: (options: DisclosureContentOptions, htmlProps: RoleHTMLProps) => DisclosureContentOptions;
};
export declare const DisclosureContent: import("reakit-system/ts/createComponent").Component<"div", DisclosureContentOptions>;

49
node_modules/reakit/ts/Disclosure/DisclosureState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,49 @@
import * as React from "react";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { unstable_IdState, unstable_IdActions, unstable_IdInitialState } from "../Id/IdState";
export declare type DisclosureState = unstable_IdState & {
/**
* Whether it's visible or not.
*/
visible: boolean;
/**
* If `true`, `animating` will be set to `true` when `visible` is updated.
* It'll wait for `stopAnimation` to be called or a CSS transition ends.
* If `animated` is set to a `number`, `stopAnimation` will be called only
* after the same number of milliseconds have passed.
*/
animated: boolean | number;
/**
* Whether it's animating or not.
*/
animating: boolean;
};
export declare type DisclosureActions = unstable_IdActions & {
/**
* Changes the `visible` state to `true`
*/
show: () => void;
/**
* Changes the `visible` state to `false`
*/
hide: () => void;
/**
* Toggles the `visible` state
*/
toggle: () => void;
/**
* Sets `visible`.
*/
setVisible: React.Dispatch<React.SetStateAction<DisclosureState["visible"]>>;
/**
* Sets `animated`.
*/
setAnimated: React.Dispatch<React.SetStateAction<DisclosureState["animated"]>>;
/**
* Stops animation. It's called automatically if there's a CSS transition.
*/
stopAnimation: () => void;
};
export declare type DisclosureInitialState = unstable_IdInitialState & Partial<Pick<DisclosureState, "visible" | "animated">>;
export declare type DisclosureStateReturn = DisclosureState & DisclosureActions;
export declare function useDisclosureState(initialState?: SealedInitialState<DisclosureInitialState>): DisclosureStateReturn;

2
node_modules/reakit/ts/Disclosure/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,2 @@
export declare const DISCLOSURE_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation"];
export declare const DISCLOSURE_CONTENT_KEYS: readonly ["baseId", "unstable_idCountRef", "visible", "animated", "animating", "setBaseId", "show", "hide", "toggle", "setVisible", "setAnimated", "stopAnimation"];

3
node_modules/reakit/ts/Disclosure/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from "./Disclosure";
export * from "./DisclosureContent";
export * from "./DisclosureState";

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

@@ -0,0 +1,17 @@
import * as React from "react";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormOptions = RoleOptions & Pick<unstable_FormStateReturn<any>, "submit">;
export declare type unstable_FormHTMLProps = RoleHTMLProps & React.FormHTMLAttributes<any>;
export declare type unstable_FormProps = unstable_FormOptions & unstable_FormHTMLProps;
export declare const unstable_useForm: {
(options?: unstable_FormOptions | undefined, htmlProps?: unstable_FormHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): unstable_FormHTMLProps;
unstable_propsAreEqual: (prev: RoleOptions & Pick<unstable_FormStateReturn<any>, "submit"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & React.FormHTMLAttributes<any>, next: RoleOptions & Pick<unstable_FormStateReturn<any>, "submit"> & React.HTMLAttributes<any> & React.RefAttributes<any> & {
wrapElement?: ((element: React.ReactNode) => React.ReactNode) | undefined;
} & React.FormHTMLAttributes<any>) => boolean;
__keys: readonly any[];
__useOptions: (options: unstable_FormOptions, htmlProps: unstable_FormHTMLProps) => unstable_FormOptions;
};
export declare const unstable_Form: import("reakit-system/ts/createComponent").Component<"form", unstable_FormOptions>;

21
node_modules/reakit/ts/Form/FormCheckbox.d.ts generated vendored Normal file
View File

@@ -0,0 +1,21 @@
import * as React from "react";
import { PropsWithAs, ArrayValue } from "reakit-utils/types";
import { CheckboxOptions, CheckboxHTMLProps } from "../Checkbox/Checkbox";
import { DeepPath, DeepPathValue } from "./__utils/types";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormCheckboxOptions<V, P extends DeepPath<V, P>> = Omit<CheckboxOptions, "value" | "state" | "setState"> & Pick<unstable_FormStateReturn<V>, "baseId" | "values" | "update" | "blur" | "touched" | "errors"> & {
/**
* Checkbox's name as in form values.
*/
name: P;
/**
* Checkbox's value is going to be used when multiple checkboxes share the
* same state. Checking a checkbox with value will add it to the state
* array.
*/
value?: ArrayValue<DeepPathValue<V, P>>;
};
export declare type unstable_FormCheckboxHTMLProps = CheckboxHTMLProps & React.InputHTMLAttributes<any>;
export declare type unstable_FormCheckboxProps<V, P extends DeepPath<V, P>> = unstable_FormCheckboxOptions<V, P> & unstable_FormCheckboxHTMLProps;
export declare const unstable_useFormCheckbox: <V, P extends DeepPath<V, P>>(options: unstable_FormCheckboxOptions<V, P>, htmlProps?: CheckboxHTMLProps | undefined) => unstable_FormCheckboxHTMLProps;
export declare const unstable_FormCheckbox: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "input">(props: PropsWithAs<unstable_FormCheckboxOptions<V, P>, T>) => JSX.Element;

15
node_modules/reakit/ts/Form/FormGroup.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { GroupOptions, GroupHTMLProps } from "../Group/Group";
import { DeepPath } from "./__utils/types";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormGroupOptions<V, P extends DeepPath<V, P>> = GroupOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "touched" | "errors"> & {
/**
* FormGroup's name as in form values.
*/
name: P;
};
export declare type unstable_FormGroupHTMLProps = GroupHTMLProps & React.FieldsetHTMLAttributes<any>;
export declare type unstable_FormGroupProps<V, P extends DeepPath<V, P>> = unstable_FormGroupOptions<V, P> & unstable_FormGroupHTMLProps;
export declare const unstable_useFormGroup: <V, P extends DeepPath<V, P>>(options: unstable_FormGroupOptions<V, P>, htmlProps?: unstable_FormGroupHTMLProps | undefined) => unstable_FormGroupHTMLProps;
export declare const unstable_FormGroup: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "fieldset">(props: PropsWithAs<unstable_FormGroupOptions<V, P>, T>) => JSX.Element;

15
node_modules/reakit/ts/Form/FormInput.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { InputOptions, InputHTMLProps } from "../Input/Input";
import { DeepPath } from "./__utils/types";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormInputOptions<V, P extends DeepPath<V, P>> = InputOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "values" | "touched" | "errors" | "update" | "blur"> & {
/**
* FormInput's name as in form values.
*/
name: P;
};
export declare type unstable_FormInputHTMLProps = InputHTMLProps & React.InputHTMLAttributes<any>;
export declare type unstable_FormInputProps<V, P extends DeepPath<V, P>> = unstable_FormInputOptions<V, P> & unstable_FormInputHTMLProps;
export declare const unstable_useFormInput: <V, P extends DeepPath<V, P>>(options: unstable_FormInputOptions<V, P>, htmlProps?: import("..").unstable_ComboboxHTMLProps | undefined) => unstable_FormInputHTMLProps;
export declare const unstable_FormInput: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "input">(props: PropsWithAs<unstable_FormInputOptions<V, P>, T>) => JSX.Element;

19
node_modules/reakit/ts/Form/FormLabel.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { DeepPath } from "./__utils/types";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormLabelOptions<V, P extends DeepPath<V, P>> = RoleOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "values"> & {
/**
* FormInput's name as in form values.
*/
name: P;
/**
* Label can be passed as the `label` prop or `children`.
*/
label?: any;
};
export declare type unstable_FormLabelHTMLProps = RoleHTMLProps & React.LabelHTMLAttributes<any>;
export declare type unstable_FormLabelProps<V, P extends DeepPath<V, P>> = unstable_FormLabelOptions<V, P> & unstable_FormLabelHTMLProps;
export declare const unstable_useFormLabel: <V, P extends DeepPath<V, P>>(options: unstable_FormLabelOptions<V, P>, htmlProps?: unstable_FormLabelHTMLProps | undefined) => unstable_FormLabelHTMLProps;
export declare const unstable_FormLabel: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "label">(props: PropsWithAs<unstable_FormLabelOptions<V, P>, T>) => JSX.Element;

15
node_modules/reakit/ts/Form/FormMessage.d.ts generated vendored Normal file
View File

@@ -0,0 +1,15 @@
/// <reference types="react" />
import { PropsWithAs } from "reakit-utils/types";
import { RoleOptions, RoleHTMLProps } from "../Role/Role";
import { unstable_FormStateReturn } from "./FormState";
import { DeepPath } from "./__utils/types";
export declare type unstable_FormMessageOptions<V, P extends DeepPath<V, P>> = RoleOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "touched" | "errors" | "messages"> & {
/**
* FormInput's name as in form values.
*/
name: P;
};
export declare type unstable_FormMessageHTMLProps = RoleHTMLProps;
export declare type unstable_FormMessageProps<V, P extends DeepPath<V, P>> = unstable_FormMessageOptions<V, P> & unstable_FormMessageHTMLProps;
export declare const unstable_useFormMessage: <V, P extends DeepPath<V, P>>(options: unstable_FormMessageOptions<V, P>, htmlProps?: RoleHTMLProps | undefined) => unstable_FormMessageHTMLProps;
export declare const unstable_FormMessage: <V, P extends DeepPath<V, P>, T extends import("react").ElementType<any> = "div">(props: PropsWithAs<unstable_FormMessageOptions<V, P>, T>) => JSX.Element;

19
node_modules/reakit/ts/Form/FormPushButton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import * as React from "react";
import { ArrayValue, PropsWithAs } from "reakit-utils/types";
import { ButtonOptions, ButtonHTMLProps } from "../Button/Button";
import { unstable_FormStateReturn } from "./FormState";
import { DeepPath, DeepPathValue } from "./__utils/types";
export declare type unstable_FormPushButtonOptions<V, P extends DeepPath<V, P>> = ButtonOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "values" | "push"> & {
/**
* FormInput's name as in form values. This should point to array value.
*/
name: P;
/**
* The value that is going to be pushed to `form.values[name]`.
*/
value: ArrayValue<DeepPathValue<V, P>>;
};
export declare type unstable_FormPushButtonHTMLProps = ButtonHTMLProps;
export declare type unstable_FormPushButtonProps<V, P extends DeepPath<V, P>> = unstable_FormPushButtonOptions<V, P> & unstable_FormPushButtonHTMLProps;
export declare const unstable_useFormPushButton: <V, P extends DeepPath<V, P>>(options: unstable_FormPushButtonOptions<V, P>, htmlProps?: ButtonHTMLProps | undefined) => unstable_FormPushButtonHTMLProps;
export declare const unstable_FormPushButton: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "button">(props: PropsWithAs<unstable_FormPushButtonOptions<V, P>, T>) => JSX.Element;

20
node_modules/reakit/ts/Form/FormRadio.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { RadioHTMLProps } from "../Radio/Radio";
import { RoleOptions } from "../Role";
import { unstable_FormStateReturn } from "./FormState";
import { DeepPath, DeepPathValue } from "./__utils/types";
export declare type unstable_FormRadioOptions<V, P extends DeepPath<V, P>> = RoleOptions & Pick<unstable_FormStateReturn<V>, "values" | "update" | "blur"> & {
/**
* FormRadio's name as in form values.
*/
name: P;
/**
* FormRadio's value.
*/
value: DeepPathValue<V, P>;
};
export declare type unstable_FormRadioHTMLProps = RadioHTMLProps;
export declare type unstable_FormRadioProps<V, P extends DeepPath<V, P>> = unstable_FormRadioOptions<V, P> & unstable_FormRadioHTMLProps;
export declare const unstable_useFormRadio: <V, P extends DeepPath<V, P>>(options: unstable_FormRadioOptions<V, P>, htmlProps?: import("..").unstable_ComboboxHTMLProps | undefined) => unstable_FormRadioHTMLProps;
export declare const unstable_FormRadio: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "input">(props: PropsWithAs<unstable_FormRadioOptions<V, P>, T>) => JSX.Element;

16
node_modules/reakit/ts/Form/FormRadioGroup.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { CompositeStateReturn } from "../Composite/CompositeState";
import { unstable_FormGroupOptions, unstable_FormGroupHTMLProps } from "./FormGroup";
import { DeepPath } from "./__utils/types";
export declare type unstable_FormRadioGroupOptions<V, P extends DeepPath<V, P>> = unstable_FormGroupOptions<V, P> & {
/**
* FormRadioGroup's name as in form values.
*/
name: P;
};
export declare type unstable_FormRadioGroupHTMLProps = unstable_FormGroupHTMLProps & React.FieldsetHTMLAttributes<any>;
export declare type unstable_FormRadioGroupProps<V, P extends DeepPath<V, P>> = unstable_FormRadioGroupOptions<V, P> & unstable_FormRadioGroupHTMLProps;
export declare const FormRadioGroupContext: React.Context<CompositeStateReturn | null>;
export declare const unstable_useFormRadioGroup: <V, P extends DeepPath<V, P>>(options: unstable_FormRadioGroupOptions<V, P>, htmlProps?: unstable_FormGroupHTMLProps | undefined) => unstable_FormRadioGroupHTMLProps;
export declare const unstable_FormRadioGroup: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "fieldset">(props: PropsWithAs<unstable_FormRadioGroupOptions<V, P>, T>) => JSX.Element;

19
node_modules/reakit/ts/Form/FormRemoveButton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,19 @@
import * as React from "react";
import { PropsWithAs } from "reakit-utils/types";
import { ButtonOptions, ButtonHTMLProps } from "../Button/Button";
import { unstable_FormStateReturn } from "./FormState";
import { DeepPath } from "./__utils/types";
export declare type unstable_FormRemoveButtonOptions<V, P extends DeepPath<V, P>> = ButtonOptions & Pick<unstable_FormStateReturn<V>, "baseId" | "values" | "remove"> & {
/**
* FormInput's name as in form values. This should point to array value.
*/
name: P;
/**
* The index in `form.values[name]` that will be removed.
*/
index: number;
};
export declare type unstable_FormRemoveButtonHTMLProps = ButtonHTMLProps;
export declare type unstable_FormRemoveButtonProps<V, P extends DeepPath<V, P>> = unstable_FormRemoveButtonOptions<V, P> & unstable_FormRemoveButtonHTMLProps;
export declare const unstable_useFormRemoveButton: <V, P extends DeepPath<V, P>>(options: unstable_FormRemoveButtonOptions<V, P>, htmlProps?: ButtonHTMLProps | undefined) => unstable_FormRemoveButtonHTMLProps;
export declare const unstable_FormRemoveButton: <V, P extends DeepPath<V, P>, T extends React.ElementType<any> = "button">(props: PropsWithAs<unstable_FormRemoveButtonOptions<V, P>, T>) => JSX.Element;

122
node_modules/reakit/ts/Form/FormState.d.ts generated vendored Normal file
View File

@@ -0,0 +1,122 @@
import { ArrayValue } from "reakit-utils/types";
import { SealedInitialState } from "reakit-utils/useSealedState";
import { unstable_IdState, unstable_IdActions, unstable_IdInitialState } from "../Id/IdState";
import { DeepPartial, DeepMap, DeepPath, DeepPathValue } from "./__utils/types";
declare type Messages<V> = DeepPartial<DeepMap<V, string | null | void>>;
declare type ValidateOutput<V> = Messages<V> | null | void;
declare type ValidateReturn<V> = Promise<ValidateOutput<V>> | ValidateOutput<V>;
interface Update<V> {
<P extends DeepPath<V, P>>(name: P, value: DeepPathValue<V, P>): void;
<P extends DeepPath<V, P>>(name: P, value: (value: DeepPathValue<V, P>) => DeepPathValue<V, P>): void;
}
export declare type unstable_FormState<V> = unstable_IdState & {
/**
* Form values.
*/
values: V;
/**
* An object with the same shape as `form.values` with `boolean` values.
* This keeps the touched state of each field. That is, whether a field has
* been blurred.
*/
touched: DeepPartial<DeepMap<V, boolean>>;
/**
* An object with the same shape as `form.values` with string messages.
* This stores the messages returned by `onValidate` and `onSubmit`.
*/
messages: Messages<V>;
/**
* An object with the same shape as `form.values` with string error messages.
* This stores the error messages throwed by `onValidate` and `onSubmit`.
*/
errors: Messages<V>;
/**
* Whether form is validating or not.
*/
validating: boolean;
/**
* Whether `form.errors` is empty or not.
*/
valid: boolean;
/**
* Whether form is submitting or not.
*/
submitting: boolean;
/**
* Stores the number of times that the form has been successfully submitted.
*/
submitSucceed: number;
/**
* Stores the number of times that the form submission has failed.
*/
submitFailed: number;
};
export declare type unstable_FormActions<V> = unstable_IdActions & {
/**
* Resets the form state.
*/
reset: () => void;
/**
* Triggers form validation (calling `onValidate` underneath).
* Optionally, new `values` can be passed in.
*/
validate: (values?: V) => ValidateReturn<V>;
/**
* Triggers form submission (calling `onValidate` and `onSubmit` underneath).
*/
submit: () => void;
/**
* Updates a form value.
*/
update: Update<V>;
/**
* Sets field's touched state to `true`.
*/
blur: <P extends DeepPath<V, P>>(name: P) => void;
/**
* Pushes a new item into `form.values[name]`, which should be an array.
*/
push: <P extends DeepPath<V, P>>(name: P, value?: ArrayValue<DeepPathValue<V, P>>) => void;
/**
* Removes `form.values[name][index]`.
*/
remove: <P extends DeepPath<V, P>>(name: P, index: number) => void;
};
export declare type unstable_FormInitialState<V> = unstable_IdInitialState & Partial<Pick<unstable_FormState<V>, "values">> & {
/**
* Whether the form should trigger `onValidate` on blur.
*/
validateOnBlur?: boolean;
/**
* Whether the form should trigger `onValidate` on change.
*/
validateOnChange?: boolean;
/**
* Whether the form should reset when it has been successfully submitted.
*/
resetOnSubmitSucceed?: boolean;
/**
* Whether the form should reset when the component (which called
* `useFormState`) has been unmounted.
*/
resetOnUnmount?: boolean;
/**
* A function that receives `form.values` and return or throw messages.
* If it returns, messages will be interpreted as successful messages.
* If it throws, they will be interpreted as errors.
* It can also return a promise for asynchronous validation.
*/
onValidate?: (values: V) => ValidateReturn<V>;
/**
* A function that receives `form.values` and performs form submission.
* If it's triggered by `form.submit()`, `onValidate` will be called before.
* If `onValidate` throws, `onSubmit` will not be called.
* `onSubmit` can also return promises, messages and throw error messages
* just like `onValidate`. The only difference is that this validation will
* only occur on submit.
*/
onSubmit?: (values: V) => ValidateReturn<V>;
};
export declare type unstable_FormStateReturn<V> = unstable_FormState<V> & unstable_FormActions<V>;
export declare function unstable_useFormState<V = Record<any, any>>(initialState?: SealedInitialState<unstable_FormInitialState<V>>): unstable_FormStateReturn<V>;
export {};

33
node_modules/reakit/ts/Form/FormSubmitButton.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
import * as React from "react";
import { ButtonOptions, ButtonHTMLProps } from "../Button/Button";
import { unstable_FormStateReturn } from "./FormState";
export declare type unstable_FormSubmitButtonOptions = ButtonOptions & Pick<Partial<unstable_FormStateReturn<any>>, "submitting"> & Pick<unstable_FormStateReturn<any>, "baseId" | "submit">;
export declare type unstable_FormSubmitButtonHTMLProps = ButtonHTMLProps;
export declare type unstable_FormSubmitButtonProps = unstable_FormSubmitButtonOptions & unstable_FormSubmitButtonHTMLProps;
export declare const unstable_useFormSubmitButton: {
(options?: unstable_FormSubmitButtonOptions | undefined, htmlProps?: ButtonHTMLProps | undefined, unstable_ignoreUseOptions?: boolean | undefined): ButtonHTMLProps;
unstable_propsAreEqual: (prev: import("..").RoleOptions & {
disabled?: boolean | undefined;
focusable?: boolean | undefined;
} & {
unstable_clickOnEnter?: boolean | undefined;
unstable_clickOnSpace?: boolean | undefined;
} & Pick<Partial<unstable_FormStateReturn<any>>, "submitting"> & Pick<unstable_FormStateReturn<any>, "submit" | "baseId"> & 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<unstable_FormStateReturn<any>>, "submitting"> & Pick<unstable_FormStateReturn<any>, "submit" | "baseId"> & 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: unstable_FormSubmitButtonOptions, htmlProps: ButtonHTMLProps) => unstable_FormSubmitButtonOptions;
};
export declare const unstable_FormSubmitButton: import("reakit-system/ts/createComponent").Component<"button", unstable_FormSubmitButtonOptions>;

11
node_modules/reakit/ts/Form/__keys.d.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
export declare const FORM_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove"];
export declare const FORM_CHECKBOX_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "value"];
export declare const FORM_GROUP_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name"];
export declare const FORM_INPUT_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name"];
export declare const FORM_LABEL_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "label"];
export declare const FORM_MESSAGE_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name"];
export declare const FORM_PUSH_BUTTON_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "value"];
export declare const FORM_RADIO_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "value"];
export declare const FORM_RADIO_GROUP_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name"];
export declare const FORM_REMOVE_BUTTON_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove", "name", "index"];
export declare const FORM_SUBMIT_BUTTON_KEYS: readonly ["baseId", "unstable_idCountRef", "values", "touched", "messages", "errors", "validating", "valid", "submitting", "submitSucceed", "submitFailed", "setBaseId", "reset", "validate", "submit", "update", "blur", "push", "remove"];

View File

@@ -0,0 +1 @@
export declare function filterAllEmpty<T extends Record<any, any> | Array<any>>(object: T): T;

View File

@@ -0,0 +1 @@
export declare function formatInputName(name: any, separator?: string): any;

View File

@@ -0,0 +1 @@
export declare function getFirstInvalidInput(baseId: string, target?: Element | null): HTMLFieldSetElement | HTMLInputElement | null;

1
node_modules/reakit/ts/Form/__utils/getInputId.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function getInputId(name: any, baseId: string | undefined, suffix?: string): string | undefined;

1
node_modules/reakit/ts/Form/__utils/getLabelId.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export declare function getLabelId(name: any, baseId: string | undefined): string | undefined;

Some files were not shown because too many files have changed in this diff Show More