@linzjs/step-ag-grid 1.4.6 → 1.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +108 -88
- package/dist/index.js.map +1 -1
- package/dist/src/components/GridCell.d.ts +4 -3
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +8 -5
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +8 -2
- package/dist/src/react-menu3/components/FocusableItem.d.ts +2 -2
- package/dist/src/react-menu3/components/Menu.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuButton.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuDivider.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuGroup.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuHeader.d.ts +1 -1
- package/dist/src/react-menu3/components/MenuItem.d.ts +2 -4
- package/dist/src/react-menu3/components/MenuList.d.ts +2 -56
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +2 -2
- package/dist/src/react-menu3/components/SubMenu.d.ts +6 -6
- package/dist/src/react-menu3/hooks/useBEM.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItems.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +1 -1
- package/dist/src/react-menu3/index.d.ts +1 -391
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +1 -1
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +1 -1
- package/dist/src/react-menu3/types.d.ts +389 -0
- package/dist/src/react-menu3/utils/constants.d.ts +12 -5
- package/dist/src/react-menu3/utils/index.d.ts +0 -1
- package/dist/src/react-menu3/utils/{propTypes.d.ts → propTypes2.d.ts} +0 -0
- package/dist/src/react-menu3/utils/utils.d.ts +2 -2
- package/dist/step-ag-grid.esm.js +99 -90
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/GridCell.tsx +6 -3
- package/src/components/GridPopoverHook.tsx +1 -1
- package/src/components/gridForm/GridFormMultiSelect.tsx +32 -19
- package/src/components/gridRender/GridRenderGenericCell.tsx +11 -7
- package/src/components/gridRender/GridRenderPopoutMenuCell.tsx +14 -2
- package/src/contexts/GridContextProvider.tsx +3 -2
- package/src/react-menu3/components/ControlledMenu.tsx +40 -46
- package/src/react-menu3/components/FocusableItem.tsx +2 -2
- package/src/react-menu3/components/Menu.tsx +1 -1
- package/src/react-menu3/components/MenuButton.tsx +1 -1
- package/src/react-menu3/components/MenuDivider.tsx +2 -2
- package/src/react-menu3/components/MenuGroup.tsx +1 -1
- package/src/react-menu3/components/MenuHeader.tsx +1 -1
- package/src/react-menu3/components/MenuItem.tsx +2 -3
- package/src/react-menu3/components/MenuList.tsx +19 -62
- package/src/react-menu3/components/MenuRadioGroup.tsx +2 -2
- package/src/react-menu3/components/SubMenu.tsx +17 -8
- package/src/react-menu3/hooks/useBEM.ts +1 -1
- package/src/react-menu3/hooks/useItems.ts +1 -1
- package/src/react-menu3/hooks/useMenuChange.ts +1 -1
- package/src/react-menu3/hooks/useMenuState.ts +1 -1
- package/src/react-menu3/hooks/useMenuStateAndFocus.ts +1 -1
- package/src/react-menu3/index.ts +1 -431
- package/src/react-menu3/positionUtils/getPositionHelpers.ts +3 -3
- package/src/react-menu3/positionUtils/placeLeftorRight.ts +1 -1
- package/src/react-menu3/positionUtils/placeToporBottom.ts +1 -1
- package/src/react-menu3/positionUtils/positionContextMenu.ts +1 -1
- package/src/react-menu3/positionUtils/positionMenu.ts +1 -1
- package/src/react-menu3/{index.d.ts → types.ts} +106 -359
- package/src/react-menu3/utils/constants.ts +24 -5
- package/src/react-menu3/utils/index.ts +1 -1
- package/src/react-menu3/utils/{propTypes.ts → propTypes2.ts} +0 -0
- package/src/react-menu3/utils/utils.ts +2 -2
- package/src/stories/components/GridReadOnly.stories.tsx +3 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ForwardedRef } from "react";
|
|
2
2
|
import { GridBaseRow } from "./Grid";
|
|
3
3
|
import { GenericCellRendererParams } from "./gridRender/GridRenderGenericCell";
|
|
4
4
|
import { ColDef, ICellEditorParams, ICellRendererParams } from "ag-grid-community";
|
|
@@ -17,7 +17,7 @@ export interface GenericCellEditorParams<RowType extends GridBaseRow> {
|
|
|
17
17
|
}
|
|
18
18
|
export interface GenericCellEditorColDef<RowType extends GridBaseRow, FormProps extends GenericCellEditorParams<RowType>> extends ColDef {
|
|
19
19
|
cellEditorParams?: FormProps;
|
|
20
|
-
cellRendererParams?: GenericCellRendererParams
|
|
20
|
+
cellRendererParams?: GenericCellRendererParams<RowType>;
|
|
21
21
|
}
|
|
22
22
|
export declare const GridCellRenderer: (cellRendererParams: ICellRendererParams) => JSX.Element;
|
|
23
23
|
/**
|
|
@@ -28,5 +28,6 @@ interface GenericCellEditorICellEditorParams<RowType extends GridBaseRow, FormPr
|
|
|
28
28
|
data: RowType;
|
|
29
29
|
colDef: GenericCellEditorColDef<RowType, FormProps>;
|
|
30
30
|
}
|
|
31
|
-
export declare const
|
|
31
|
+
export declare const GenericCellEditorComponentFr: <RowType extends GridBaseRow, FormProps extends Record<string, any>>(props: GenericCellEditorICellEditorParams<RowType, FormProps>, _: ForwardedRef<any>) => JSX.Element;
|
|
32
|
+
export declare const GenericCellEditorComponent: import("react").ForwardRefExoticComponent<GenericCellEditorICellEditorParams<GridBaseRow, Record<string, any>> & import("react").RefAttributes<any>>;
|
|
32
33
|
export {};
|
|
@@ -3,13 +3,16 @@ import "./GridRenderGenericCell.scss";
|
|
|
3
3
|
import { ColDef, ICellRendererParams } from "ag-grid-community";
|
|
4
4
|
import { GenericCellEditorParams } from "../GridCell";
|
|
5
5
|
import { GridBaseRow } from "../Grid";
|
|
6
|
+
export interface RowICellRendererParams<RowType extends GridBaseRow> extends ICellRendererParams {
|
|
7
|
+
data: RowType;
|
|
8
|
+
}
|
|
6
9
|
export interface GenericCellColDef<RowType extends GridBaseRow, FormProps extends Record<string, any>> extends ColDef {
|
|
7
|
-
cellRendererParams?: GenericCellRendererParams
|
|
10
|
+
cellRendererParams?: GenericCellRendererParams<RowType>;
|
|
8
11
|
cellEditorParams?: GenericCellEditorParams<RowType> & FormProps;
|
|
9
12
|
}
|
|
10
|
-
export interface GenericCellRendererParams {
|
|
13
|
+
export interface GenericCellRendererParams<RowType extends GridBaseRow> {
|
|
11
14
|
singleClickEdit?: boolean;
|
|
12
|
-
warning?: (props:
|
|
13
|
-
info?: (props:
|
|
15
|
+
warning?: (props: RowICellRendererParams<RowType>) => string | boolean | undefined;
|
|
16
|
+
info?: (props: RowICellRendererParams<RowType>) => string | boolean | undefined;
|
|
14
17
|
}
|
|
15
|
-
export declare const GridRendererGenericCell: (props: ICellRendererParams) => JSX.Element;
|
|
18
|
+
export declare const GridRendererGenericCell: <RowType extends GridBaseRow>(props: ICellRendererParams) => JSX.Element;
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { MutableRefObject, ForwardedRef } from "react";
|
|
2
|
+
import { ControlledMenuProps } from "../types";
|
|
3
|
+
export declare const ControlledMenuFr: ({ "aria-label": ariaLabel, className, containerProps, initialMounted, unmountOnClose, transition, transitionTimeout, boundingBoxRef, boundingBoxPadding, reposition, submenuOpenDelay, submenuCloseDelay, skipOpen, viewScroll, portal, theming, onItemClick, onClose, saveButtonRef, ...restProps }: ControlledMenuProps & {
|
|
4
|
+
saveButtonRef?: MutableRefObject<HTMLButtonElement | null> | undefined;
|
|
5
|
+
}, externalRef: ForwardedRef<HTMLUListElement>) => JSX.Element | null;
|
|
6
|
+
export declare const ControlledMenu: import("react").ForwardRefExoticComponent<Pick<ControlledMenuProps & {
|
|
7
|
+
saveButtonRef?: MutableRefObject<HTMLButtonElement | null> | undefined;
|
|
8
|
+
}, "aria-label" | "className" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "containerProps" | "initialMounted" | "unmountOnClose" | "transition" | "transitionTimeout" | "boundingBoxRef" | "boundingBoxPadding" | "reposition" | "submenuOpenDelay" | "submenuCloseDelay" | "skipOpen" | "viewScroll" | "portal" | "theming" | "onItemClick" | "onClose" | "saveButtonRef" | "anchorPoint" | "anchorRef" | "captureFocus" | "state" | "menuItemFocus" | "endTransition" | "repositionFlag" | "menuClassName" | "menuStyle" | "arrowClassName" | "arrowStyle" | "arrow" | "offsetX" | "offsetY" | "align" | "direction" | "position" | "overflow" | "setDownOverflow" | "isDisabled" | "ariaLabel" | "containerRef" | "externalRef" | "parentScrollingRef"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LegacyRef } from "react";
|
|
2
|
-
import { BaseProps } from "../
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
3
|
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
4
|
export interface FocusableItemProps extends BaseProps, withHoveringResultProps {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
children: (ref: LegacyRef<any>) => JSX.Element;
|
|
7
7
|
}
|
|
8
8
|
export declare const FocusableItemFr: ({ className, disabled, children, isHovering, menuItemRef, externalRef, ...restProps }: FocusableItemProps) => JSX.Element;
|
|
9
|
-
export declare const FocusableItem:
|
|
9
|
+
export declare const FocusableItem: any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ForwardedRef } from "react";
|
|
2
|
-
import { MenuButtonModifiers, RenderProp, RootMenuProps, UncontrolledMenuProps } from "../
|
|
2
|
+
import { MenuButtonModifiers, RenderProp, RootMenuProps, UncontrolledMenuProps } from "../types";
|
|
3
3
|
export interface MenuProps extends RootMenuProps, UncontrolledMenuProps {
|
|
4
4
|
/**
|
|
5
5
|
* Can be a `MenuButton`, a `button` element, or a React component.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { BaseProps, MenuButtonModifiers } from "../
|
|
2
|
+
import { BaseProps, MenuButtonModifiers } from "../types";
|
|
3
3
|
export interface MenuButtonProps extends BaseProps<MenuButtonModifiers> {
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
children?: ReactNode;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseProps } from "../
|
|
3
|
-
export declare const MenuDivider: (
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
|
+
export declare const MenuDivider: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<BaseProps<undefined>, "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ForwardedRef } from "react";
|
|
2
|
-
import { BaseProps } from "../
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
3
|
export declare const MenuHeaderFr: ({ className, ...restProps }: BaseProps, externalRef: ForwardedRef<HTMLLIElement>) => JSX.Element;
|
|
4
4
|
export declare const MenuHeader: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Pick<BaseProps<undefined>, "className" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseProps, ClickEvent, EventHandler, Hoverable, MenuItemTypeProp, RenderProp } from "../index";
|
|
3
|
-
import { withHoveringResultProps } from "../utils/withHovering";
|
|
1
|
+
import { BaseProps, ClickEvent, EventHandler, Hoverable, MenuItemTypeProp, RenderProp } from "../types";
|
|
4
2
|
export declare type MenuItemModifiers = Readonly<{
|
|
5
3
|
/**
|
|
6
4
|
* 'radio' for radio item, 'checkbox' for checkbox item, or `undefined` for other items.
|
|
@@ -56,4 +54,4 @@ export interface MenuItemProps extends Omit<BaseProps<MenuItemModifiers>, "onCli
|
|
|
56
54
|
*/
|
|
57
55
|
children?: RenderProp<MenuItemModifiers>;
|
|
58
56
|
}
|
|
59
|
-
export declare const MenuItem:
|
|
57
|
+
export declare const MenuItem: any;
|
|
@@ -1,57 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
interface ExtraMenuProps {
|
|
4
|
-
isDisabled?: boolean;
|
|
5
|
-
ariaLabel?: string;
|
|
6
|
-
containerRef: MutableRefObject<HTMLElement>;
|
|
7
|
-
externalRef: MutableRefObject<HTMLUListElement>;
|
|
8
|
-
parentScrollingRef: MutableRefObject<any>;
|
|
9
|
-
}
|
|
10
|
-
export interface ControlledMenuProps extends RootMenuProps, ExtraMenuProps {
|
|
11
|
-
/**
|
|
12
|
-
* Viewport coordinates to which context menu will be positioned.
|
|
13
|
-
*
|
|
14
|
-
* *Use this prop only for context menu*
|
|
15
|
-
*/
|
|
16
|
-
anchorPoint?: {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* A ref object attached to a DOM element to which menu will be positioned.
|
|
22
|
-
*
|
|
23
|
-
* *Don't set this prop for context menu*
|
|
24
|
-
*/
|
|
25
|
-
anchorRef?: React.MutableRefObject<HTMLElement>;
|
|
26
|
-
skipOpen?: React.RefObject<boolean>;
|
|
27
|
-
/**
|
|
28
|
-
* If `true`, the menu list element will gain focus after menu is open.
|
|
29
|
-
* @default true
|
|
30
|
-
*/
|
|
31
|
-
captureFocus?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Controls the state of menu. When the prop is `undefined`, menu will be unmounted from DOM.
|
|
34
|
-
*/
|
|
35
|
-
state?: MenuState;
|
|
36
|
-
/**
|
|
37
|
-
* Sets which menu item receives focus (hover) when menu opens.
|
|
38
|
-
* You will usually set this prop when the menu is opened by keyboard events.
|
|
39
|
-
*
|
|
40
|
-
* *Note: If you don't intend to update focus (hover) position,
|
|
41
|
-
* it's important to keep this prop's identity stable when your component re-renders.*
|
|
42
|
-
*/
|
|
43
|
-
menuItemFocus?: {
|
|
44
|
-
position?: FocusPosition;
|
|
45
|
-
alwaysUpdate?: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Set the return value of `useMenuState` to this prop.
|
|
49
|
-
*/
|
|
50
|
-
endTransition?: () => void;
|
|
51
|
-
/**
|
|
52
|
-
* Event fired when menu is about to close.
|
|
53
|
-
*/
|
|
54
|
-
onClose?: EventHandler<MenuCloseEvent>;
|
|
55
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ControlledMenuProps } from "../types";
|
|
56
3
|
export declare const MenuList: ({ ariaLabel, menuClassName, menuStyle, arrowClassName, arrowStyle, anchorPoint, anchorRef, containerRef, externalRef, parentScrollingRef, arrow, align, direction, position, overflow, setDownOverflow, repositionFlag, captureFocus, state, endTransition, isDisabled, menuItemFocus, offsetX, offsetY, children, onClose, ...restProps }: ControlledMenuProps) => JSX.Element;
|
|
57
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ForwardedRef, ReactNode } from "react";
|
|
2
|
-
import { BaseProps, Event, EventHandler } from "../
|
|
2
|
+
import { BaseProps, Event, EventHandler } from "../types";
|
|
3
3
|
export interface RadioChangeEvent extends Event {
|
|
4
4
|
/**
|
|
5
5
|
* The `name` prop passed to the `MenuRadioGroup` when the menu item is in a radio group.
|
|
@@ -41,4 +41,4 @@ export interface MenuRadioGroupProps extends BaseProps {
|
|
|
41
41
|
onRadioChange?: EventHandler<RadioChangeEvent>;
|
|
42
42
|
}
|
|
43
43
|
export declare const MenuRadioGroupFr: ({ "aria-label": ariaLabel, className, name, value, onRadioChange, ...restProps }: MenuRadioGroupProps, externalRef: ForwardedRef<HTMLUListElement>) => JSX.Element;
|
|
44
|
-
export declare const MenuRadioGroup: (
|
|
44
|
+
export declare const MenuRadioGroup: import("react").ForwardRefExoticComponent<Pick<MenuRadioGroupProps, "name" | "className" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "value" | "onRadioChange"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { BaseProps, ClassNameProp, Hoverable, MenuAlign, MenuArrowModifiers, MenuDirection, MenuModifiers, MenuOverflow, MenuPosition, RenderProp, UncontrolledMenuProps } from "../
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { BaseProps, ClassNameProp, Hoverable, MenuAlign, MenuArrowModifiers, MenuDirection, MenuModifiers, MenuOverflow, MenuPosition, RenderProp, UncontrolledMenuProps } from "../types";
|
|
3
3
|
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
4
|
export declare type SubMenuItemModifiers = Readonly<{
|
|
5
5
|
/**
|
|
@@ -26,7 +26,7 @@ interface BaseMenuProps extends Omit<BaseProps, "style"> {
|
|
|
26
26
|
/**
|
|
27
27
|
* This prop is forwarded to the `style` prop of menu DOM element.
|
|
28
28
|
*/
|
|
29
|
-
menuStyle?:
|
|
29
|
+
menuStyle?: CSSProperties;
|
|
30
30
|
/**
|
|
31
31
|
* Can be a string or a function which receives a modifier object and returns a CSS `class` string.
|
|
32
32
|
*/
|
|
@@ -34,7 +34,7 @@ interface BaseMenuProps extends Omit<BaseProps, "style"> {
|
|
|
34
34
|
/**
|
|
35
35
|
* This prop is forwarded to the `style` prop of menu arrow DOM element.
|
|
36
36
|
*/
|
|
37
|
-
arrowStyle?:
|
|
37
|
+
arrowStyle?: CSSProperties;
|
|
38
38
|
/**
|
|
39
39
|
* Set `true` to display an arrow pointing to its anchor element.
|
|
40
40
|
*/
|
|
@@ -86,7 +86,7 @@ interface BaseMenuProps extends Omit<BaseProps, "style"> {
|
|
|
86
86
|
* The `MenuGroup` should have `takeOverflow` prop set as `true` accordingly.
|
|
87
87
|
*/
|
|
88
88
|
setDownOverflow?: boolean;
|
|
89
|
-
children?:
|
|
89
|
+
children?: ReactNode;
|
|
90
90
|
}
|
|
91
91
|
export interface SubMenuProps extends BaseMenuProps, Hoverable, UncontrolledMenuProps, withHoveringResultProps {
|
|
92
92
|
/**
|
|
@@ -106,5 +106,5 @@ export interface SubMenuProps extends BaseMenuProps, Hoverable, UncontrolledMenu
|
|
|
106
106
|
openTrigger?: "none" | "clickOnly";
|
|
107
107
|
}
|
|
108
108
|
export declare const SubMenuFr: ({ "aria-label": ariaLabel, className, disabled, direction, label, openTrigger, onMenuChange, isHovering, instanceRef, menuItemRef, itemProps, ...restProps }: SubMenuProps) => JSX.Element;
|
|
109
|
-
export declare const SubMenu:
|
|
109
|
+
export declare const SubMenu: any;
|
|
110
110
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MutableRefObject } from "react";
|
|
2
|
-
import { FocusPosition } from "../
|
|
2
|
+
import { FocusPosition } from "../types";
|
|
3
3
|
export declare const useItems: (menuRef: MutableRefObject<any>, focusRef: MutableRefObject<any> | undefined) => {
|
|
4
4
|
hoverItem: any;
|
|
5
5
|
dispatch: (actionType: number, item: any, nextIndex: FocusPosition) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EventHandler, MenuChangeEvent } from "../
|
|
1
|
+
import { EventHandler, MenuChangeEvent } from "../types";
|
|
2
2
|
export declare const useMenuChange: (onMenuChange?: EventHandler<MenuChangeEvent>, isOpen?: boolean) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FocusPosition, MenuStateOptions } from "../
|
|
1
|
+
import { FocusPosition, MenuStateOptions } from "../types";
|
|
2
2
|
export declare const useMenuStateAndFocus: (options: MenuStateOptions) => [any, (open?: boolean) => void, (position?: FocusPosition, alwaysUpdate?: boolean) => void];
|