@linzjs/step-ag-grid 1.4.5 → 1.4.6
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.js +195 -163
- package/dist/index.js.map +1 -1
- package/dist/src/react-menu3/components/FocusableItem.d.ts +9 -1
- package/dist/src/react-menu3/components/Menu.d.ts +16 -2
- package/dist/src/react-menu3/components/MenuButton.d.ts +8 -1
- package/dist/src/react-menu3/components/MenuDivider.d.ts +3 -2
- package/dist/src/react-menu3/components/MenuGroup.d.ts +12 -2
- package/dist/src/react-menu3/components/MenuHeader.d.ts +4 -2
- package/dist/src/react-menu3/components/MenuItem.d.ts +59 -1
- package/dist/src/react-menu3/components/MenuList.d.ts +57 -30
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +44 -2
- package/dist/src/react-menu3/components/SubMenu.d.ts +110 -1
- package/dist/src/react-menu3/hooks/useBEM.d.ts +4 -3
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useItemEffect.d.ts +1 -1
- package/dist/src/react-menu3/hooks/useItemState.d.ts +4 -3
- package/dist/src/react-menu3/hooks/useItems.d.ts +6 -4
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +2 -1
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +13 -10
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +2 -10
- package/dist/src/react-menu3/index.d.ts +391 -0
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +10 -9
- package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +7 -6
- package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +7 -6
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +17 -19
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +18 -20
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +11 -6
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +23 -18
- package/dist/src/react-menu3/utils/constants.d.ts +51 -9
- package/dist/src/react-menu3/utils/propTypes.d.ts +1 -0
- package/dist/src/react-menu3/utils/utils.d.ts +19 -10
- package/dist/src/react-menu3/utils/withHovering.d.ts +7 -1
- package/dist/src/stories/components/ReactMenu.stories.d.ts +8 -0
- package/dist/step-ag-grid.esm.js +197 -165
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/package.json +11 -11
- package/src/components/gridForm/GridFormDropDown.tsx +1 -1
- package/src/components/gridForm/GridFormMultiSelect.tsx +10 -4
- package/src/react-menu3/components/ControlledMenu.tsx +2 -1
- package/src/react-menu3/components/FocusableItem.tsx +58 -53
- package/src/react-menu3/components/Menu.tsx +40 -28
- package/src/react-menu3/components/MenuButton.tsx +30 -29
- package/src/react-menu3/components/MenuDivider.tsx +14 -18
- package/src/react-menu3/components/MenuGroup.tsx +25 -16
- package/src/react-menu3/components/MenuHeader.tsx +14 -18
- package/src/react-menu3/components/MenuItem.tsx +159 -106
- package/src/react-menu3/components/MenuList.tsx +104 -36
- package/src/react-menu3/components/MenuRadioGroup.tsx +54 -15
- package/src/react-menu3/components/SubMenu.tsx +307 -201
- package/src/react-menu3/hooks/useBEM.ts +4 -3
- package/src/react-menu3/hooks/useCombinedRef.ts +6 -12
- package/src/react-menu3/hooks/useItemEffect.ts +6 -5
- package/src/react-menu3/hooks/useItemState.ts +16 -12
- package/src/react-menu3/hooks/useItems.ts +11 -10
- package/src/react-menu3/hooks/useMenuChange.ts +3 -3
- package/src/react-menu3/hooks/useMenuState.ts +25 -7
- package/src/react-menu3/hooks/useMenuStateAndFocus.ts +6 -4
- package/src/react-menu3/index.d.ts +1 -0
- package/src/react-menu3/index.ts +431 -0
- package/src/react-menu3/positionUtils/getPositionHelpers.ts +18 -11
- package/src/react-menu3/positionUtils/placeArrowHorizontal.ts +12 -5
- package/src/react-menu3/positionUtils/placeArrowVertical.ts +12 -5
- package/src/react-menu3/positionUtils/placeLeftorRight.ts +33 -17
- package/src/react-menu3/positionUtils/placeToporBottom.ts +34 -18
- package/src/react-menu3/positionUtils/positionContextMenu.ts +15 -3
- package/src/react-menu3/positionUtils/positionMenu.ts +21 -14
- package/src/react-menu3/style-utils/index.ts +10 -7
- package/src/react-menu3/utils/constants.ts +63 -10
- package/src/react-menu3/utils/propTypes.ts +3 -1
- package/src/react-menu3/utils/utils.ts +40 -23
- package/src/react-menu3/utils/withHovering.tsx +11 -6
- package/src/stories/components/ReactMenu.stories.tsx +37 -0
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const stylePropTypes: (name?: string) => {
|
|
2
2
|
[x: string]: import("prop-types").Requireable<NonNullable<string | ((...args: any[]) => any) | null | undefined>>;
|
|
3
3
|
};
|
|
4
|
+
export declare const Direction: import("prop-types").Requireable<string>;
|
|
4
5
|
export declare const menuPropTypes: {
|
|
5
6
|
menuStyle: import("prop-types").Requireable<object>;
|
|
6
7
|
arrowStyle: import("prop-types").Requireable<object>;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { unstable_batchedUpdates } from "react-dom";
|
|
2
|
-
|
|
3
|
+
import { MenuState, MenuStateOptions } from "../index";
|
|
4
|
+
import { MenuButtonProps } from "../components/MenuButton";
|
|
5
|
+
export declare const isMenuOpen: (state?: MenuState) => boolean;
|
|
3
6
|
export declare const batchedUpdates: typeof unstable_batchedUpdates;
|
|
4
7
|
export declare const values: {
|
|
5
8
|
<T>(o: {
|
|
@@ -8,20 +11,26 @@ export declare const values: {
|
|
|
8
11
|
(o: {}): any[];
|
|
9
12
|
};
|
|
10
13
|
export declare const floatEqual: (a: number, b: number, diff?: number) => boolean;
|
|
11
|
-
export declare
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
export declare type TransitionMap = {
|
|
15
|
+
open?: boolean;
|
|
16
|
+
close?: boolean;
|
|
17
|
+
item?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const getTransition: (transition: MenuStateOptions["transition"], name: keyof TransitionMap) => boolean;
|
|
20
|
+
export declare function safeCall<T, R>(fn: (arg?: T) => R, arg?: T): R;
|
|
21
|
+
export declare function safeCall<T, R>(fn: T, arg: R): T;
|
|
22
|
+
export declare const getName: (component: Record<string, any | undefined>) => any;
|
|
23
|
+
export declare const defineName: (name: string, component: React.ForwardRefExoticComponent<React.PropsWithoutRef<MenuButtonProps> & React.RefAttributes<unknown>>) => import("react").ForwardRefExoticComponent<Pick<MenuButtonProps, "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" | "disabled" | "isOpen"> & import("react").RefAttributes<unknown>>;
|
|
15
24
|
export declare const mergeProps: (target: Record<string, any>, source: Record<string, any>) => Record<string, any>;
|
|
16
|
-
export declare const parsePadding: (paddingStr:
|
|
25
|
+
export declare const parsePadding: (paddingStr: string | undefined) => {
|
|
17
26
|
top: number;
|
|
18
27
|
right: number;
|
|
19
28
|
bottom: number;
|
|
20
29
|
left: number;
|
|
21
30
|
};
|
|
22
|
-
export declare const getScrollAncestor: (node:
|
|
23
|
-
export declare function commonProps(isDisabled
|
|
24
|
-
"aria-disabled":
|
|
31
|
+
export declare const getScrollAncestor: (node: Node | null) => Element | null;
|
|
32
|
+
export declare function commonProps(isDisabled?: boolean, isHovering?: boolean): {
|
|
33
|
+
"aria-disabled": true | undefined;
|
|
25
34
|
tabIndex: number;
|
|
26
35
|
};
|
|
27
|
-
export declare
|
|
36
|
+
export declare const indexOfNode: (nodeList: NodeListOf<Node>, node: Node) => number;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { MutableRefObject } from "react";
|
|
2
|
+
export interface withHoveringResultProps {
|
|
3
|
+
isHovering?: boolean;
|
|
4
|
+
externalRef?: MutableRefObject<any>;
|
|
5
|
+
menuItemRef?: MutableRefObject<any>;
|
|
6
|
+
}
|
|
7
|
+
export declare const withHovering: (name: string, WrappedComponent: (...args: any) => JSX.Element) => any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "@linzjs/lui/dist/scss/base.scss";
|
|
3
|
+
import "@linzjs/lui/dist/fonts";
|
|
4
|
+
import "../../lui-overrides.scss";
|
|
5
|
+
import { ComponentMeta, ComponentStory } from "@storybook/react/dist/ts3.9/client/preview/types-6-3";
|
|
6
|
+
declare const _default: ComponentMeta<(params: import("@components/Grid").GridProps) => JSX.Element>;
|
|
7
|
+
export default _default;
|
|
8
|
+
export declare const ReactMenuControlled: ComponentStory<(params: import("@components/Grid").GridProps) => JSX.Element>;
|