@linzjs/step-ag-grid 19.1.1 → 21.0.0
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/GridTheme.scss +19 -23
- package/dist/src/components/ComponentLoadingWrapper.d.ts +9 -9
- package/dist/src/components/Grid.d.ts +80 -80
- package/dist/src/components/GridCell.d.ts +63 -27
- package/dist/src/components/GridCell.test.d.ts +1 -1
- package/dist/src/components/GridCellFiller.d.ts +5 -4
- package/dist/src/components/GridCellMultiEditor.d.ts +18 -18
- package/dist/src/components/GridCellMultiSelectClassRules.d.ts +2 -2
- package/dist/src/components/GridIcon.d.ts +9 -9
- package/dist/src/components/GridLoadableCell.d.ts +1 -1
- package/dist/src/components/GridNoRowsOverlay.d.ts +9 -9
- package/dist/src/components/GridPopoverHook.d.ts +12 -12
- package/dist/src/components/GridWrapper.d.ts +5 -5
- package/dist/src/components/PostSortRowsHook.d.ts +11 -11
- package/dist/src/components/gridFilter/GridFilterButtons.d.ts +16 -16
- package/dist/src/components/gridFilter/GridFilterColumnsToggle.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilterDownloadCsvButton.d.ts +2 -2
- package/dist/src/components/gridFilter/GridFilterHeaderIconButton.d.ts +11 -11
- package/dist/src/components/gridFilter/GridFilterQuick.d.ts +5 -5
- package/dist/src/components/gridFilter/GridFilters.d.ts +2 -2
- package/dist/src/components/gridFilter/index.d.ts +7 -7
- package/dist/src/components/gridFilter/useGridFilter.d.ts +3 -3
- package/dist/src/components/gridForm/GridFormDropDown.d.ts +37 -37
- package/dist/src/components/gridForm/GridFormEditBearing.d.ts +12 -12
- package/dist/src/components/gridForm/GridFormMessage.d.ts +7 -7
- package/dist/src/components/gridForm/GridFormMultiSelect.d.ts +36 -36
- package/dist/src/components/gridForm/GridFormMultiSelectGrid.d.ts +24 -24
- package/dist/src/components/gridForm/GridFormPopoverMenu.d.ts +36 -36
- package/dist/src/components/gridForm/GridFormSubComponentTextArea.d.ts +12 -12
- package/dist/src/components/gridForm/GridFormSubComponentTextInput.d.ts +11 -11
- package/dist/src/components/gridForm/GridFormTextArea.d.ts +14 -14
- package/dist/src/components/gridForm/GridFormTextInput.d.ts +14 -14
- package/dist/src/components/gridForm/index.d.ts +10 -10
- package/dist/src/components/gridHeader/GridHeaderSelect.d.ts +7 -7
- package/dist/src/components/gridHeader/index.d.ts +1 -1
- package/dist/src/components/gridHook/index.d.ts +1 -1
- package/dist/src/components/gridHook/useGridContextMenu.d.ts +19 -19
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverEditBearing.d.ts +16 -16
- package/dist/src/components/gridPopoverEdit/GridPopoverEditDropDown.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverMenu.d.ts +8 -8
- package/dist/src/components/gridPopoverEdit/GridPopoverMessage.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverTextArea.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/GridPopoverTextInput.d.ts +5 -5
- package/dist/src/components/gridPopoverEdit/index.d.ts +9 -9
- package/dist/src/components/gridRender/GridRenderGenericCell.d.ts +16 -37
- package/dist/src/components/gridRender/GridRenderPopoutMenuCell.d.ts +2 -2
- package/dist/src/components/gridRender/index.d.ts +2 -2
- package/dist/src/components/gridUtil.d.ts +3 -3
- package/dist/src/components/index.d.ts +18 -18
- package/dist/src/contexts/GridContext.d.ts +67 -67
- package/dist/src/contexts/GridContextProvider.d.ts +15 -15
- package/dist/src/contexts/GridContextProvider.test.d.ts +1 -1
- package/dist/src/contexts/GridPopoverContext.d.ts +15 -15
- package/dist/src/contexts/GridPopoverContextProvider.d.ts +7 -7
- package/dist/src/contexts/GridSubComponentContext.d.ts +10 -10
- package/dist/src/contexts/GridUpdatingContext.d.ts +8 -8
- package/dist/src/contexts/GridUpdatingContextProvider.d.ts +3 -3
- package/dist/src/index.d.ts +17 -17
- package/dist/src/lui/ActionButton.d.ts +20 -20
- package/dist/src/lui/FormError.d.ts +7 -7
- package/dist/src/lui/TextAreaInput.d.ts +11 -11
- package/dist/src/lui/TextInputFormatted.d.ts +10 -10
- package/dist/src/lui/reactUtils.d.ts +6 -6
- package/dist/src/lui/reactUtils.test.d.ts +1 -1
- package/dist/src/lui/stateDeferredHook.d.ts +4 -4
- package/dist/src/lui/timeoutHook.d.ts +14 -14
- package/dist/src/lui/timeoutHook.test.d.ts +1 -1
- package/dist/src/react-menu3/components/ControlledMenu.d.ts +8 -8
- package/dist/src/react-menu3/components/FocusableItem.d.ts +9 -9
- package/dist/src/react-menu3/components/Menu.d.ts +16 -16
- package/dist/src/react-menu3/components/MenuButton.d.ts +8 -8
- package/dist/src/react-menu3/components/MenuDivider.d.ts +3 -3
- package/dist/src/react-menu3/components/MenuGroup.d.ts +12 -12
- package/dist/src/react-menu3/components/MenuHeader.d.ts +4 -4
- package/dist/src/react-menu3/components/MenuItem.d.ts +59 -59
- package/dist/src/react-menu3/components/MenuList.d.ts +2 -2
- package/dist/src/react-menu3/components/MenuRadioGroup.d.ts +25 -25
- package/dist/src/react-menu3/components/SubMenu.d.ts +110 -110
- package/dist/src/react-menu3/contexts/EventHandlersContext.d.ts +7 -7
- package/dist/src/react-menu3/contexts/HoverItemContext.d.ts +2 -2
- package/dist/src/react-menu3/contexts/ItemSettingsContext.d.ts +5 -5
- package/dist/src/react-menu3/contexts/MenuListContext.d.ts +9 -9
- package/dist/src/react-menu3/contexts/MenuListItemContext.d.ts +11 -11
- package/dist/src/react-menu3/contexts/RadioGroupContext.d.ts +7 -7
- package/dist/src/react-menu3/contexts/SettingsContext.d.ts +20 -20
- package/dist/src/react-menu3/hooks/index.d.ts +9 -9
- package/dist/src/react-menu3/hooks/useBEM.d.ts +10 -10
- package/dist/src/react-menu3/hooks/useCombinedRef.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useIsomorphicLayoutEffect.d.ts +3 -3
- package/dist/src/react-menu3/hooks/useItemEffect.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useItemState.d.ts +7 -7
- package/dist/src/react-menu3/hooks/useItems.d.ts +7 -7
- package/dist/src/react-menu3/hooks/useMenuChange.d.ts +2 -2
- package/dist/src/react-menu3/hooks/useMenuState.d.ts +23 -14
- package/dist/src/react-menu3/hooks/useMenuStateAndFocus.d.ts +2 -2
- package/dist/src/react-menu3/index.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/getPositionHelpers.d.ts +11 -11
- package/dist/src/react-menu3/positionUtils/index.d.ts +3 -3
- package/dist/src/react-menu3/positionUtils/placeArrowHorizontal.d.ts +8 -8
- package/dist/src/react-menu3/positionUtils/placeArrowVertical.d.ts +8 -8
- package/dist/src/react-menu3/positionUtils/placeLeftorRight.d.ts +19 -19
- package/dist/src/react-menu3/positionUtils/placeToporBottom.d.ts +19 -19
- package/dist/src/react-menu3/positionUtils/positionContextMenu.d.ts +13 -13
- package/dist/src/react-menu3/positionUtils/positionMenu.d.ts +26 -26
- package/dist/src/react-menu3/style-utils/index.d.ts +11 -11
- package/dist/src/react-menu3/types.d.ts +401 -401
- package/dist/src/react-menu3/utils/constants.d.ts +54 -54
- package/dist/src/react-menu3/utils/index.d.ts +3 -3
- package/dist/src/react-menu3/utils/propTypes2.d.ts +56 -56
- package/dist/src/react-menu3/utils/utils.d.ts +37 -37
- package/dist/src/react-menu3/utils/withHovering.d.ts +7 -7
- package/dist/src/utils/bearing.d.ts +19 -19
- package/dist/src/utils/bearing.test.d.ts +1 -1
- package/dist/src/utils/deferredPromise.d.ts +5 -5
- package/dist/src/utils/storybookTestUtil.d.ts +3 -3
- package/dist/src/utils/testQuick.d.ts +62 -62
- package/dist/src/utils/testUtil.d.ts +46 -45
- package/dist/src/utils/textMatcher.d.ts +13 -13
- package/dist/src/utils/textMatcher.test.d.ts +1 -1
- package/dist/src/utils/textValidator.d.ts +18 -18
- package/dist/src/utils/textValidator.test.d.ts +1 -1
- package/dist/src/utils/util.d.ts +8 -8
- package/dist/src/utils/util.test.d.ts +1 -1
- package/dist/step-ag-grid.cjs.js +4691 -55913
- package/dist/step-ag-grid.cjs.js.map +1 -1
- package/dist/step-ag-grid.esm.js +4692 -55914
- package/dist/step-ag-grid.esm.js.map +1 -1
- package/dist/vite.config.d.ts +2 -0
- package/package.json +21 -21
- package/src/components/Grid.tsx +4 -4
- package/src/components/GridCell.test.tsx +2 -3
- package/src/components/GridCell.tsx +76 -24
- package/src/components/GridCellFiller.tsx +2 -1
- package/src/components/GridCellMultiEditor.tsx +9 -9
- package/src/components/GridCellMultiSelectClassRules.tsx +4 -4
- package/src/components/GridPopoverHook.tsx +4 -4
- package/src/components/PostSortRowsHook.ts +2 -2
- package/src/components/gridFilter/GridFilterButtons.tsx +6 -6
- package/src/components/gridFilter/GridFilterColumnsToggle.tsx +2 -5
- package/src/components/gridFilter/GridFilterDownloadCsvButton.tsx +1 -1
- package/src/components/gridFilter/useGridFilter.ts +1 -1
- package/src/components/gridForm/GridFormDropDown.tsx +9 -9
- package/src/components/gridForm/GridFormEditBearing.tsx +5 -5
- package/src/components/gridForm/GridFormMessage.tsx +4 -4
- package/src/components/gridForm/GridFormMultiSelect.tsx +9 -9
- package/src/components/gridForm/GridFormMultiSelectGrid.tsx +11 -11
- package/src/components/gridForm/GridFormPopoverMenu.tsx +13 -13
- package/src/components/gridForm/GridFormSubComponentTextArea.tsx +4 -4
- package/src/components/gridForm/GridFormSubComponentTextInput.tsx +4 -4
- package/src/components/gridForm/GridFormTextArea.tsx +6 -6
- package/src/components/gridForm/GridFormTextInput.tsx +7 -7
- package/src/components/gridHook/useGridContextMenu.tsx +8 -8
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelect.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoutEditMultiSelectGrid.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoverEditBearing.ts +16 -16
- package/src/components/gridPopoverEdit/GridPopoverEditDropDown.ts +6 -6
- package/src/components/gridPopoverEdit/GridPopoverMenu.tsx +5 -5
- package/src/components/gridPopoverEdit/GridPopoverMessage.ts +5 -5
- package/src/components/gridPopoverEdit/GridPopoverTextArea.ts +5 -4
- package/src/components/gridPopoverEdit/GridPopoverTextInput.ts +5 -5
- package/src/components/gridRender/GridRenderGenericCell.tsx +6 -36
- package/src/contexts/GridContext.tsx +7 -7
- package/src/contexts/GridContextProvider.test.tsx +1 -1
- package/src/contexts/GridContextProvider.tsx +10 -10
- package/src/contexts/GridPopoverContext.tsx +6 -6
- package/src/stories/grid/GridDragRow.stories.tsx +4 -4
- package/src/stories/grid/GridNonEditableRow.stories.tsx +2 -3
- package/src/stories/grid/GridPopoutContextMenu.stories.tsx +2 -2
- package/src/stories/grid/GridPopoutEditGenericTextArea.stories.tsx +1 -1
- package/src/stories/grid/GridPopoverEditBearing.stories.tsx +2 -2
- package/src/stories/grid/GridPopoverEditDropDown.stories.tsx +3 -3
- package/src/stories/grid/GridPopoverEditMultiSelect.stories.tsx +2 -2
- package/src/stories/grid/GridPopoverEditMultiSelectGrid.stories.tsx +2 -2
- package/src/stories/grid/GridReadOnly.stories.tsx +6 -6
- package/src/stories/grid/GridViewList.stories.tsx +5 -7
- package/src/stories/grid/interactions/GridKeyboardInteractions.stories.tsx +8 -6
- package/src/styles/GridTheme.scss +19 -23
- package/src/utils/testUtil.ts +49 -7
- package/src/utils/textValidator.ts +5 -5
- package/src/utils/util.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ForwardedRef, MutableRefObject } 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
|
|
5
|
-
}, externalRef: ForwardedRef<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
-
export declare const ControlledMenu: import("react").ForwardRefExoticComponent<Omit<ControlledMenuProps & {
|
|
7
|
-
saveButtonRef?: MutableRefObject<HTMLButtonElement | null> | undefined;
|
|
8
|
-
}, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
1
|
+
import { ForwardedRef, MutableRefObject } 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>;
|
|
5
|
+
}, externalRef: ForwardedRef<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
|
+
export declare const ControlledMenu: import("react").ForwardRefExoticComponent<Omit<ControlledMenuProps & {
|
|
7
|
+
saveButtonRef?: MutableRefObject<HTMLButtonElement | null> | undefined;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { LegacyRef, ReactElement } from "react";
|
|
2
|
-
import { BaseProps } from "../types";
|
|
3
|
-
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
-
export interface FocusableItemProps extends BaseProps, withHoveringResultProps {
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
children: (ref: LegacyRef<any>) => ReactElement;
|
|
7
|
-
}
|
|
8
|
-
export declare const FocusableItemFr: ({ className, disabled, children, isHovering, menuItemRef, externalRef, ...restProps }: FocusableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const FocusableItem: import("react").ForwardRefExoticComponent<Omit<FocusableItemProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
import { LegacyRef, ReactElement } from "react";
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
|
+
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
+
export interface FocusableItemProps extends BaseProps, withHoveringResultProps {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
children: (ref: LegacyRef<any>) => ReactElement;
|
|
7
|
+
}
|
|
8
|
+
export declare const FocusableItemFr: ({ className, disabled, children, isHovering, menuItemRef, externalRef, ...restProps }: FocusableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const FocusableItem: import("react").ForwardRefExoticComponent<Omit<FocusableItemProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ForwardedRef, ReactElement } from "react";
|
|
2
|
-
import { MenuButtonModifiers, RenderProp, RootMenuProps, UncontrolledMenuProps } from "../types";
|
|
3
|
-
export interface MenuProps extends RootMenuProps, UncontrolledMenuProps {
|
|
4
|
-
/**
|
|
5
|
-
* Can be a `MenuButton`, a `button` element, or a React component.
|
|
6
|
-
* It also can be a render function that returns one.
|
|
7
|
-
*
|
|
8
|
-
* If a React component is provided, it needs to implement the following contracts:
|
|
9
|
-
* - Accepts a `ref` prop that is forwarded to an element to which menu will be positioned.
|
|
10
|
-
* The element should be able to receive focus.
|
|
11
|
-
* - Accepts `onClick` and `onKeyDown` event props.
|
|
12
|
-
*/
|
|
13
|
-
menuButton: RenderProp<MenuButtonModifiers, ReactElement>;
|
|
14
|
-
}
|
|
15
|
-
export declare function MenuFr({ "aria-label": ariaLabel, menuButton, instanceRef, onMenuChange, ...restProps }: MenuProps, externalRef: ForwardedRef<ReactElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare const Menu: import("react").ForwardRefExoticComponent<Omit<MenuProps, "ref"> & import("react").RefAttributes<ReactElement<any, string | import("react").JSXElementConstructor<any>>>>;
|
|
1
|
+
import { ForwardedRef, ReactElement } from "react";
|
|
2
|
+
import { MenuButtonModifiers, RenderProp, RootMenuProps, UncontrolledMenuProps } from "../types";
|
|
3
|
+
export interface MenuProps extends RootMenuProps, UncontrolledMenuProps {
|
|
4
|
+
/**
|
|
5
|
+
* Can be a `MenuButton`, a `button` element, or a React component.
|
|
6
|
+
* It also can be a render function that returns one.
|
|
7
|
+
*
|
|
8
|
+
* If a React component is provided, it needs to implement the following contracts:
|
|
9
|
+
* - Accepts a `ref` prop that is forwarded to an element to which menu will be positioned.
|
|
10
|
+
* The element should be able to receive focus.
|
|
11
|
+
* - Accepts `onClick` and `onKeyDown` event props.
|
|
12
|
+
*/
|
|
13
|
+
menuButton: RenderProp<MenuButtonModifiers, ReactElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare function MenuFr({ "aria-label": ariaLabel, menuButton, instanceRef, onMenuChange, ...restProps }: MenuProps, externalRef: ForwardedRef<ReactElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const Menu: import("react").ForwardRefExoticComponent<Omit<MenuProps, "ref"> & import("react").RefAttributes<ReactElement<any, string | import("react").JSXElementConstructor<any>>>>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { BaseProps, MenuButtonModifiers } from "../types";
|
|
3
|
-
export interface MenuButtonProps extends BaseProps<MenuButtonModifiers> {
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
isOpen?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const MenuButton: import("react").ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { BaseProps, MenuButtonModifiers } from "../types";
|
|
3
|
+
export interface MenuButtonProps extends BaseProps<MenuButtonModifiers> {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
isOpen?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const MenuButton: import("react").ForwardRefExoticComponent<Omit<MenuButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseProps } from "../types";
|
|
3
|
-
export declare const MenuDivider: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<BaseProps<undefined>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
|
+
export declare const MenuDivider: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<BaseProps<undefined>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ForwardedRef, ReactNode } from "react";
|
|
2
|
-
import { BaseProps } from "../types";
|
|
3
|
-
export interface MenuGroupProps extends BaseProps {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* Set `true` to apply overflow of the parent menu to the group.
|
|
7
|
-
* Only one `MenuGroup` in a menu should set this prop as `true`.
|
|
8
|
-
*/
|
|
9
|
-
takeOverflow?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const MenuGroupFr: ({ className, style, takeOverflow, ...restProps }: MenuGroupProps, externalRef: ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export declare const MenuGroup: import("react").ForwardRefExoticComponent<Omit<MenuGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { ForwardedRef, ReactNode } from "react";
|
|
2
|
+
import { BaseProps } from "../types";
|
|
3
|
+
export interface MenuGroupProps extends BaseProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* Set `true` to apply overflow of the parent menu to the group.
|
|
7
|
+
* Only one `MenuGroup` in a menu should set this prop as `true`.
|
|
8
|
+
*/
|
|
9
|
+
takeOverflow?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const MenuGroupFr: ({ className, style, takeOverflow, ...restProps }: MenuGroupProps, externalRef: ForwardedRef<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const MenuGroup: import("react").ForwardRefExoticComponent<Omit<MenuGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ForwardedRef } from "react";
|
|
2
|
-
import { BasePropsWithChildren } from "../types";
|
|
3
|
-
export declare const MenuHeaderFr: ({ className, ...restProps }: BasePropsWithChildren, externalRef: ForwardedRef<HTMLLIElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare const MenuHeader: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<BasePropsWithChildren<undefined>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
1
|
+
import { ForwardedRef } from "react";
|
|
2
|
+
import { BasePropsWithChildren } from "../types";
|
|
3
|
+
export declare const MenuHeaderFr: ({ className, ...restProps }: BasePropsWithChildren, externalRef: ForwardedRef<HTMLLIElement>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const MenuHeader: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<Omit<BasePropsWithChildren<undefined>, "ref"> & import("react").RefAttributes<HTMLLIElement>>>;
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { BaseProps, ClickEvent, EventHandler, Hoverable, MenuItemTypeProp, RenderProp } from "../types";
|
|
3
|
-
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
-
export type MenuItemModifiers = Readonly<{
|
|
5
|
-
/**
|
|
6
|
-
* 'radio' for radio item, 'checkbox' for checkbox item, or `undefined` for other items.
|
|
7
|
-
*/
|
|
8
|
-
type?: MenuItemTypeProp;
|
|
9
|
-
/**
|
|
10
|
-
* Indicates if the menu item is disabled.
|
|
11
|
-
*/
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Indicates if the menu item is being hovered and has focus.
|
|
15
|
-
*/
|
|
16
|
-
hover: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Indicates if the menu item is checked when it's a radio or checkbox item.
|
|
19
|
-
*/
|
|
20
|
-
checked: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Indicates if the menu item has a URL link.
|
|
23
|
-
*/
|
|
24
|
-
anchor: boolean;
|
|
25
|
-
}>;
|
|
26
|
-
export interface MenuItemProps extends Omit<BaseProps<MenuItemModifiers>, "onClick">, Hoverable {
|
|
27
|
-
/**
|
|
28
|
-
* Any value provided to this prop will be available in the event object of click events.
|
|
29
|
-
*
|
|
30
|
-
* It's useful for helping identify which menu item is clicked when you
|
|
31
|
-
* listen on `onItemClick` event on root menu component.
|
|
32
|
-
*/
|
|
33
|
-
value?: any;
|
|
34
|
-
/**
|
|
35
|
-
* If provided, menu item renders an HTML `<a>` element with this `href` attribute.
|
|
36
|
-
*/
|
|
37
|
-
href?: string;
|
|
38
|
-
rel?: string;
|
|
39
|
-
target?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Set this prop to make the item a checkbox or radio menu item.
|
|
42
|
-
*/
|
|
43
|
-
type?: MenuItemTypeProp;
|
|
44
|
-
/**
|
|
45
|
-
* Set `true` if a checkbox menu item is checked.
|
|
46
|
-
*
|
|
47
|
-
* *Please note radio menu item doesn't use this prop.*
|
|
48
|
-
*/
|
|
49
|
-
checked?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Event fired when the menu item is clicked.
|
|
52
|
-
*/
|
|
53
|
-
onClick?: EventHandler<ClickEvent>;
|
|
54
|
-
/**
|
|
55
|
-
* Any valid React node or a render function that returns one.
|
|
56
|
-
*/
|
|
57
|
-
children?: RenderProp<MenuItemModifiers>;
|
|
58
|
-
}
|
|
59
|
-
export declare const MenuItem: import("react").ForwardRefExoticComponent<Omit<MenuItemProps & withHoveringResultProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BaseProps, ClickEvent, EventHandler, Hoverable, MenuItemTypeProp, RenderProp } from "../types";
|
|
3
|
+
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
+
export type MenuItemModifiers = Readonly<{
|
|
5
|
+
/**
|
|
6
|
+
* 'radio' for radio item, 'checkbox' for checkbox item, or `undefined` for other items.
|
|
7
|
+
*/
|
|
8
|
+
type?: MenuItemTypeProp;
|
|
9
|
+
/**
|
|
10
|
+
* Indicates if the menu item is disabled.
|
|
11
|
+
*/
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the menu item is being hovered and has focus.
|
|
15
|
+
*/
|
|
16
|
+
hover: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates if the menu item is checked when it's a radio or checkbox item.
|
|
19
|
+
*/
|
|
20
|
+
checked: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Indicates if the menu item has a URL link.
|
|
23
|
+
*/
|
|
24
|
+
anchor: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
export interface MenuItemProps extends Omit<BaseProps<MenuItemModifiers>, "onClick">, Hoverable {
|
|
27
|
+
/**
|
|
28
|
+
* Any value provided to this prop will be available in the event object of click events.
|
|
29
|
+
*
|
|
30
|
+
* It's useful for helping identify which menu item is clicked when you
|
|
31
|
+
* listen on `onItemClick` event on root menu component.
|
|
32
|
+
*/
|
|
33
|
+
value?: any;
|
|
34
|
+
/**
|
|
35
|
+
* If provided, menu item renders an HTML `<a>` element with this `href` attribute.
|
|
36
|
+
*/
|
|
37
|
+
href?: string;
|
|
38
|
+
rel?: string;
|
|
39
|
+
target?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Set this prop to make the item a checkbox or radio menu item.
|
|
42
|
+
*/
|
|
43
|
+
type?: MenuItemTypeProp;
|
|
44
|
+
/**
|
|
45
|
+
* Set `true` if a checkbox menu item is checked.
|
|
46
|
+
*
|
|
47
|
+
* *Please note radio menu item doesn't use this prop.*
|
|
48
|
+
*/
|
|
49
|
+
checked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Event fired when the menu item is clicked.
|
|
52
|
+
*/
|
|
53
|
+
onClick?: EventHandler<ClickEvent>;
|
|
54
|
+
/**
|
|
55
|
+
* Any valid React node or a render function that returns one.
|
|
56
|
+
*/
|
|
57
|
+
children?: RenderProp<MenuItemModifiers>;
|
|
58
|
+
}
|
|
59
|
+
export declare const MenuItem: import("react").ForwardRefExoticComponent<Omit<MenuItemProps & withHoveringResultProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ControlledMenuProps } from "../types";
|
|
2
|
-
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, dontShrinkIfDirectionIsTop, offsetX, offsetY, children, onClose, ...restProps }: ControlledMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import { ControlledMenuProps } from "../types";
|
|
2
|
+
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, dontShrinkIfDirectionIsTop, offsetX, offsetY, children, onClose, ...restProps }: ControlledMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ForwardedRef, ReactNode } from "react";
|
|
2
|
-
import { BaseProps, EventHandler, RadioChangeEvent } from "../types";
|
|
3
|
-
export interface MenuRadioGroupProps extends BaseProps {
|
|
4
|
-
/**
|
|
5
|
-
* Optionally set the radio group name.
|
|
6
|
-
*
|
|
7
|
-
* The name will be passed to the `onRadioChange` event.
|
|
8
|
-
* It's useful for identifying radio groups if you attach the same event handler to multiple groups.
|
|
9
|
-
*/
|
|
10
|
-
name?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Set value of the radio group.
|
|
13
|
-
*
|
|
14
|
-
* The child menu item which has the same value (strict equality ===) as the
|
|
15
|
-
* radio group is marked as checked.
|
|
16
|
-
*/
|
|
17
|
-
value?: any;
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Event fired when a child menu item is clicked (selected).
|
|
21
|
-
*/
|
|
22
|
-
onRadioChange?: EventHandler<RadioChangeEvent>;
|
|
23
|
-
}
|
|
24
|
-
export declare const MenuRadioGroupFr: ({ "aria-label": ariaLabel, className, name, value, onRadioChange, ...restProps }: MenuRadioGroupProps, externalRef: ForwardedRef<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare const MenuRadioGroup: import("react").ForwardRefExoticComponent<Omit<MenuRadioGroupProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
1
|
+
import { ForwardedRef, ReactNode } from "react";
|
|
2
|
+
import { BaseProps, EventHandler, RadioChangeEvent } from "../types";
|
|
3
|
+
export interface MenuRadioGroupProps extends BaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optionally set the radio group name.
|
|
6
|
+
*
|
|
7
|
+
* The name will be passed to the `onRadioChange` event.
|
|
8
|
+
* It's useful for identifying radio groups if you attach the same event handler to multiple groups.
|
|
9
|
+
*/
|
|
10
|
+
name?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Set value of the radio group.
|
|
13
|
+
*
|
|
14
|
+
* The child menu item which has the same value (strict equality ===) as the
|
|
15
|
+
* radio group is marked as checked.
|
|
16
|
+
*/
|
|
17
|
+
value?: any;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Event fired when a child menu item is clicked (selected).
|
|
21
|
+
*/
|
|
22
|
+
onRadioChange?: EventHandler<RadioChangeEvent>;
|
|
23
|
+
}
|
|
24
|
+
export declare const MenuRadioGroupFr: ({ "aria-label": ariaLabel, className, name, value, onRadioChange, ...restProps }: MenuRadioGroupProps, externalRef: ForwardedRef<HTMLUListElement>) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const MenuRadioGroup: import("react").ForwardRefExoticComponent<Omit<MenuRadioGroupProps, "ref"> & import("react").RefAttributes<HTMLUListElement>>;
|
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from "react";
|
|
2
|
-
import { BaseProps, ClassNameProp, Hoverable, MenuAlign, MenuArrowModifiers, MenuDirection, MenuModifiers, MenuOverflow, MenuPosition, RenderProp, UncontrolledMenuProps } from "../types";
|
|
3
|
-
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
-
export type SubMenuItemModifiers = Readonly<{
|
|
5
|
-
/**
|
|
6
|
-
* Indicates if the submenu is open.
|
|
7
|
-
*/
|
|
8
|
-
open: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Indicates if the submenu item is being hovered and has focus.
|
|
11
|
-
*/
|
|
12
|
-
hover: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Indicates if the submenu and item are disabled.
|
|
15
|
-
*/
|
|
16
|
-
disabled: boolean;
|
|
17
|
-
}>;
|
|
18
|
-
/**
|
|
19
|
-
* Common props for `Menu`, `SubMenu` and `ControlledMenu`
|
|
20
|
-
*/
|
|
21
|
-
interface BaseMenuProps extends Omit<BaseProps, "style"> {
|
|
22
|
-
/**
|
|
23
|
-
* Can be a string or a function which receives a modifier object and returns a CSS `class` string.
|
|
24
|
-
*/
|
|
25
|
-
menuClassName?: ClassNameProp<MenuModifiers>;
|
|
26
|
-
/**
|
|
27
|
-
* This prop is forwarded to the `style` prop of menu DOM element.
|
|
28
|
-
*/
|
|
29
|
-
menuStyle?: CSSProperties;
|
|
30
|
-
/**
|
|
31
|
-
* Can be a string or a function which receives a modifier object and returns a CSS `class` string.
|
|
32
|
-
*/
|
|
33
|
-
arrowClassName?: ClassNameProp<MenuArrowModifiers>;
|
|
34
|
-
/**
|
|
35
|
-
* This prop is forwarded to the `style` prop of menu arrow DOM element.
|
|
36
|
-
*/
|
|
37
|
-
arrowStyle?: CSSProperties;
|
|
38
|
-
/**
|
|
39
|
-
* Set `true` to display an arrow pointing to its anchor element.
|
|
40
|
-
*/
|
|
41
|
-
arrow?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Set the horizontal distance (in pixels) between menu and its anchor element.
|
|
44
|
-
* The value can be negative.
|
|
45
|
-
* @default 0
|
|
46
|
-
*/
|
|
47
|
-
offsetX?: number;
|
|
48
|
-
/**
|
|
49
|
-
* Set the vertical distance (in pixels) between menu and its anchor element.
|
|
50
|
-
* The value can be negative.
|
|
51
|
-
* @default 0
|
|
52
|
-
*/
|
|
53
|
-
offsetY?: number;
|
|
54
|
-
/**
|
|
55
|
-
* Set alignment of menu with anchor element.
|
|
56
|
-
* @default 'start'
|
|
57
|
-
*/
|
|
58
|
-
align?: MenuAlign;
|
|
59
|
-
/**
|
|
60
|
-
* Set direction in which menu expands against anchor element.
|
|
61
|
-
* @default 'bottom'
|
|
62
|
-
*/
|
|
63
|
-
direction?: MenuDirection;
|
|
64
|
-
/**
|
|
65
|
-
* Set the position of menu related to its anchor element:
|
|
66
|
-
*
|
|
67
|
-
* - 'auto' menu position is adjusted to have it contained within the viewport,
|
|
68
|
-
* even if it will be detached from the anchor element.
|
|
69
|
-
* This option allows to display menu in the viewport as much as possible.
|
|
70
|
-
*
|
|
71
|
-
* - 'anchor' menu position is adjusted to have it contained within the viewport,
|
|
72
|
-
* but it will be kept attached to the edges of anchor element.
|
|
73
|
-
*
|
|
74
|
-
* - 'initial' menu always stays at its initial position.
|
|
75
|
-
* @default 'auto'
|
|
76
|
-
*/
|
|
77
|
-
position?: MenuPosition;
|
|
78
|
-
/**
|
|
79
|
-
* Make the menu list scrollable or hidden when there is not enough viewport space to
|
|
80
|
-
* display all menu items. The prop is similar to the CSS `overflow` property.
|
|
81
|
-
* @default 'visible'
|
|
82
|
-
*/
|
|
83
|
-
overflow?: MenuOverflow;
|
|
84
|
-
/**
|
|
85
|
-
* Set computed overflow amount down to a child `MenuGroup`.
|
|
86
|
-
* The `MenuGroup` should have `takeOverflow` prop set as `true` accordingly.
|
|
87
|
-
*/
|
|
88
|
-
setDownOverflow?: boolean;
|
|
89
|
-
children?: ReactNode;
|
|
90
|
-
}
|
|
91
|
-
export interface SubMenuProps extends BaseMenuProps, Hoverable, UncontrolledMenuProps, withHoveringResultProps {
|
|
92
|
-
/**
|
|
93
|
-
* Properties of this object are spread to the submenu item DOM element.
|
|
94
|
-
*/
|
|
95
|
-
itemProps?: BaseProps<SubMenuItemModifiers>;
|
|
96
|
-
/**
|
|
97
|
-
* The submenu `label` can be a `string` or JSX element, or a render function that returns one.
|
|
98
|
-
*/
|
|
99
|
-
label?: RenderProp<SubMenuItemModifiers>;
|
|
100
|
-
/**
|
|
101
|
-
* - `undefined` submenu opens when the label item is hovered or clicked. This is the default behaviour.
|
|
102
|
-
* - 'clickOnly' submenu opens when the label item is clicked.
|
|
103
|
-
* - 'none' submenu doesn't open with mouse or keyboard events;
|
|
104
|
-
* you can call the `openMenu` function on `instanceRef` to open submenu programmatically.
|
|
105
|
-
*/
|
|
106
|
-
openTrigger?: "none" | "clickOnly";
|
|
107
|
-
}
|
|
108
|
-
export declare const SubMenuFr: ({ "aria-label": ariaLabel, className, disabled, direction, label, openTrigger, onMenuChange, isHovering, instanceRef, menuItemRef, itemProps, ...restProps }: SubMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
109
|
-
export declare const SubMenu: import("react").ForwardRefExoticComponent<Omit<SubMenuProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
110
|
-
export {};
|
|
1
|
+
import { CSSProperties, ReactNode } from "react";
|
|
2
|
+
import { BaseProps, ClassNameProp, Hoverable, MenuAlign, MenuArrowModifiers, MenuDirection, MenuModifiers, MenuOverflow, MenuPosition, RenderProp, UncontrolledMenuProps } from "../types";
|
|
3
|
+
import { withHoveringResultProps } from "../utils/withHovering";
|
|
4
|
+
export type SubMenuItemModifiers = Readonly<{
|
|
5
|
+
/**
|
|
6
|
+
* Indicates if the submenu is open.
|
|
7
|
+
*/
|
|
8
|
+
open: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Indicates if the submenu item is being hovered and has focus.
|
|
11
|
+
*/
|
|
12
|
+
hover: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the submenu and item are disabled.
|
|
15
|
+
*/
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Common props for `Menu`, `SubMenu` and `ControlledMenu`
|
|
20
|
+
*/
|
|
21
|
+
interface BaseMenuProps extends Omit<BaseProps, "style"> {
|
|
22
|
+
/**
|
|
23
|
+
* Can be a string or a function which receives a modifier object and returns a CSS `class` string.
|
|
24
|
+
*/
|
|
25
|
+
menuClassName?: ClassNameProp<MenuModifiers>;
|
|
26
|
+
/**
|
|
27
|
+
* This prop is forwarded to the `style` prop of menu DOM element.
|
|
28
|
+
*/
|
|
29
|
+
menuStyle?: CSSProperties;
|
|
30
|
+
/**
|
|
31
|
+
* Can be a string or a function which receives a modifier object and returns a CSS `class` string.
|
|
32
|
+
*/
|
|
33
|
+
arrowClassName?: ClassNameProp<MenuArrowModifiers>;
|
|
34
|
+
/**
|
|
35
|
+
* This prop is forwarded to the `style` prop of menu arrow DOM element.
|
|
36
|
+
*/
|
|
37
|
+
arrowStyle?: CSSProperties;
|
|
38
|
+
/**
|
|
39
|
+
* Set `true` to display an arrow pointing to its anchor element.
|
|
40
|
+
*/
|
|
41
|
+
arrow?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Set the horizontal distance (in pixels) between menu and its anchor element.
|
|
44
|
+
* The value can be negative.
|
|
45
|
+
* @default 0
|
|
46
|
+
*/
|
|
47
|
+
offsetX?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Set the vertical distance (in pixels) between menu and its anchor element.
|
|
50
|
+
* The value can be negative.
|
|
51
|
+
* @default 0
|
|
52
|
+
*/
|
|
53
|
+
offsetY?: number;
|
|
54
|
+
/**
|
|
55
|
+
* Set alignment of menu with anchor element.
|
|
56
|
+
* @default 'start'
|
|
57
|
+
*/
|
|
58
|
+
align?: MenuAlign;
|
|
59
|
+
/**
|
|
60
|
+
* Set direction in which menu expands against anchor element.
|
|
61
|
+
* @default 'bottom'
|
|
62
|
+
*/
|
|
63
|
+
direction?: MenuDirection;
|
|
64
|
+
/**
|
|
65
|
+
* Set the position of menu related to its anchor element:
|
|
66
|
+
*
|
|
67
|
+
* - 'auto' menu position is adjusted to have it contained within the viewport,
|
|
68
|
+
* even if it will be detached from the anchor element.
|
|
69
|
+
* This option allows to display menu in the viewport as much as possible.
|
|
70
|
+
*
|
|
71
|
+
* - 'anchor' menu position is adjusted to have it contained within the viewport,
|
|
72
|
+
* but it will be kept attached to the edges of anchor element.
|
|
73
|
+
*
|
|
74
|
+
* - 'initial' menu always stays at its initial position.
|
|
75
|
+
* @default 'auto'
|
|
76
|
+
*/
|
|
77
|
+
position?: MenuPosition;
|
|
78
|
+
/**
|
|
79
|
+
* Make the menu list scrollable or hidden when there is not enough viewport space to
|
|
80
|
+
* display all menu items. The prop is similar to the CSS `overflow` property.
|
|
81
|
+
* @default 'visible'
|
|
82
|
+
*/
|
|
83
|
+
overflow?: MenuOverflow;
|
|
84
|
+
/**
|
|
85
|
+
* Set computed overflow amount down to a child `MenuGroup`.
|
|
86
|
+
* The `MenuGroup` should have `takeOverflow` prop set as `true` accordingly.
|
|
87
|
+
*/
|
|
88
|
+
setDownOverflow?: boolean;
|
|
89
|
+
children?: ReactNode;
|
|
90
|
+
}
|
|
91
|
+
export interface SubMenuProps extends BaseMenuProps, Hoverable, UncontrolledMenuProps, withHoveringResultProps {
|
|
92
|
+
/**
|
|
93
|
+
* Properties of this object are spread to the submenu item DOM element.
|
|
94
|
+
*/
|
|
95
|
+
itemProps?: BaseProps<SubMenuItemModifiers>;
|
|
96
|
+
/**
|
|
97
|
+
* The submenu `label` can be a `string` or JSX element, or a render function that returns one.
|
|
98
|
+
*/
|
|
99
|
+
label?: RenderProp<SubMenuItemModifiers>;
|
|
100
|
+
/**
|
|
101
|
+
* - `undefined` submenu opens when the label item is hovered or clicked. This is the default behaviour.
|
|
102
|
+
* - 'clickOnly' submenu opens when the label item is clicked.
|
|
103
|
+
* - 'none' submenu doesn't open with mouse or keyboard events;
|
|
104
|
+
* you can call the `openMenu` function on `instanceRef` to open submenu programmatically.
|
|
105
|
+
*/
|
|
106
|
+
openTrigger?: "none" | "clickOnly";
|
|
107
|
+
}
|
|
108
|
+
export declare const SubMenuFr: ({ "aria-label": ariaLabel, className, disabled, direction, label, openTrigger, onMenuChange, isHovering, instanceRef, menuItemRef, itemProps, ...restProps }: SubMenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
109
|
+
export declare const SubMenu: import("react").ForwardRefExoticComponent<Omit<SubMenuProps, "ref"> & import("react").RefAttributes<unknown>>;
|
|
110
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { RMEvent } from "../utils";
|
|
3
|
-
export interface EventHandlersContextType {
|
|
4
|
-
handleClose?: () => void;
|
|
5
|
-
handleClick: (event: RMEvent, checked: boolean) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const EventHandlersContext: import("react").Context<EventHandlersContextType>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RMEvent } from "../utils";
|
|
3
|
+
export interface EventHandlersContextType {
|
|
4
|
+
handleClose?: () => void;
|
|
5
|
+
handleClick: (event: RMEvent, checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const EventHandlersContext: import("react").Context<EventHandlersContextType>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const HoverItemContext: import("react").Context<HTMLDivElement | HTMLLIElement | ((prevItem: HTMLDivElement | HTMLLIElement) => HTMLDivElement | HTMLLIElement | undefined) | undefined>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const HoverItemContext: import("react").Context<HTMLDivElement | HTMLLIElement | ((prevItem: HTMLDivElement | HTMLLIElement) => HTMLDivElement | HTMLLIElement | undefined) | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const ItemSettingsContext: import("react").Context<{
|
|
3
|
-
submenuCloseDelay: number;
|
|
4
|
-
submenuOpenDelay: number;
|
|
5
|
-
}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const ItemSettingsContext: import("react").Context<{
|
|
3
|
+
submenuCloseDelay: number;
|
|
4
|
+
submenuOpenDelay: number;
|
|
5
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MutableRefObject } from "react";
|
|
2
|
-
import { MenuDirection, MenuOverflow } from "../types";
|
|
3
|
-
export declare const MenuListContext: import("react").Context<{
|
|
4
|
-
overflow?: MenuOverflow | undefined;
|
|
5
|
-
overflowAmt?: number | undefined;
|
|
6
|
-
parentMenuRef?: MutableRefObject<any> | undefined;
|
|
7
|
-
parentDir?: MenuDirection | undefined;
|
|
8
|
-
reposSubmenu?: boolean | undefined;
|
|
9
|
-
}>;
|
|
1
|
+
import { MutableRefObject } from "react";
|
|
2
|
+
import { MenuDirection, MenuOverflow } from "../types";
|
|
3
|
+
export declare const MenuListContext: import("react").Context<{
|
|
4
|
+
overflow?: MenuOverflow | undefined;
|
|
5
|
+
overflowAmt?: number | undefined;
|
|
6
|
+
parentMenuRef?: MutableRefObject<any> | undefined;
|
|
7
|
+
parentDir?: MenuDirection | undefined;
|
|
8
|
+
reposSubmenu?: boolean | undefined;
|
|
9
|
+
}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { FocusPosition } from "../types";
|
|
3
|
-
interface MenuListItemContextType {
|
|
4
|
-
isParentOpen?: boolean;
|
|
5
|
-
isSubmenuOpen?: boolean;
|
|
6
|
-
dispatch: (actionType: number, item: any, nextIndex: FocusPosition) => void;
|
|
7
|
-
updateItems: (item: any, isMounted?: boolean) => void;
|
|
8
|
-
setOpenSubmenuCount: (fn: (count: number) => number) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare const MenuListItemContext: import("react").Context<MenuListItemContextType>;
|
|
11
|
-
export {};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FocusPosition } from "../types";
|
|
3
|
+
interface MenuListItemContextType {
|
|
4
|
+
isParentOpen?: boolean;
|
|
5
|
+
isSubmenuOpen?: boolean;
|
|
6
|
+
dispatch: (actionType: number, item: any, nextIndex: FocusPosition) => void;
|
|
7
|
+
updateItems: (item: any, isMounted?: boolean) => void;
|
|
8
|
+
setOpenSubmenuCount: (fn: (count: number) => number) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const MenuListItemContext: import("react").Context<MenuListItemContextType>;
|
|
11
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { EventHandler, RadioChangeEvent } from "../types";
|
|
3
|
-
export declare const RadioGroupContext: import("react").Context<{
|
|
4
|
-
value?: any;
|
|
5
|
-
name?: string | undefined;
|
|
6
|
-
onRadioChange?: EventHandler<RadioChangeEvent> | undefined;
|
|
7
|
-
}>;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { EventHandler, RadioChangeEvent } from "../types";
|
|
3
|
+
export declare const RadioGroupContext: import("react").Context<{
|
|
4
|
+
value?: any;
|
|
5
|
+
name?: string | undefined;
|
|
6
|
+
onRadioChange?: EventHandler<RadioChangeEvent> | undefined;
|
|
7
|
+
}>;
|