@muraldevkit/ui-toolkit 2.29.4 → 2.29.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/components/menu/MrlMenuItem/MrlMenuItem.d.ts +3 -1
- package/dist/components/menu/demo/MenuWithActionState.d.ts +19 -0
- package/dist/components/menu/hooks/useBrowserEdgeScroll.d.ts +1 -1
- package/dist/components/menu/hooks/useSubMenuElementPosition.d.ts +2 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,8 @@ interface MrlMenuItemProps {
|
|
|
6
6
|
Children to be rendered within the menu component
|
|
7
7
|
*/
|
|
8
8
|
children: React.ReactNode | string;
|
|
9
|
+
/** Classname for the menu item */
|
|
10
|
+
className?: string;
|
|
9
11
|
/** If the menu item is disabled */
|
|
10
12
|
disabled?: boolean;
|
|
11
13
|
/** Icon for menu item */
|
|
@@ -27,5 +29,5 @@ interface MrlMenuItemProps {
|
|
|
27
29
|
* @param {MrlMenuItemProps} props - The props for the MrlMenuItem component
|
|
28
30
|
* @returns {Element} - rendered MrlMenuItem component
|
|
29
31
|
*/
|
|
30
|
-
export declare function MrlMenuItem({ ariaDescribedBy, children, dataQa, disabled, icon, id, onClick, selected }: MrlMenuItemProps): JSX.Element;
|
|
32
|
+
export declare function MrlMenuItem({ ariaDescribedBy, children, className, dataQa, disabled, icon, id, onClick, selected }: MrlMenuItemProps): JSX.Element;
|
|
31
33
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CustomMenuPosition } from '..';
|
|
3
|
+
import { MenuPosition, MenuAlignment } from '../constants';
|
|
4
|
+
interface MenuWithTriggerProps {
|
|
5
|
+
position?: MenuPosition;
|
|
6
|
+
spacing?: 'default' | 'compact';
|
|
7
|
+
alignment?: MenuAlignment;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
customPosition?: CustomMenuPosition;
|
|
10
|
+
triggerAlignment?: 'left' | 'right' | 'center';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Demo of a menu that is manually opened by setting the action state.
|
|
14
|
+
*
|
|
15
|
+
* @param {MenuWithTriggerProps} props - The props for the menu with trigger
|
|
16
|
+
* @returns {Element} The menu with trigger demo
|
|
17
|
+
*/
|
|
18
|
+
export declare const MenuWithActionState: ({ alignment, position, spacing, customPosition, onClose, triggerAlignment }: MenuWithTriggerProps) => JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -16,5 +16,5 @@ interface AdjustedElementStyle {
|
|
|
16
16
|
* @param elementAlign - the alignment of the menu
|
|
17
17
|
* @returns AdjustedElementStyle - returns the new updated style for scrolling the menu
|
|
18
18
|
*/
|
|
19
|
-
export declare const useBrowserEdgeScroll: (elementRef: React.RefObject<HTMLElement>, elementAlign?: MenuPosition) => ElementScrollStyles;
|
|
19
|
+
export declare const useBrowserEdgeScroll: (elementRef: React.RefObject<HTMLElement>, elementAlign?: MenuPosition) => ElementScrollStyles | null;
|
|
20
20
|
export {};
|
|
@@ -11,7 +11,8 @@ interface SubMenuPosition {
|
|
|
11
11
|
* @param isSubMenu - Is the menu a sub menu
|
|
12
12
|
* @param isOpen - Is the element visible
|
|
13
13
|
* @param originalMenuRect - The menu element rect
|
|
14
|
+
* @param disable - Should the menu be disabled
|
|
14
15
|
* @returns The sub menu position
|
|
15
16
|
*/
|
|
16
|
-
export declare const useSubMenuElementPosition: (triggerRef: RefObject<HTMLElement> | undefined, menuRef: RefObject<HTMLDivElement>, isSubMenu: boolean, isOpen: boolean, originalMenuRect: DOMRect | null) => SubMenuPosition;
|
|
17
|
+
export declare const useSubMenuElementPosition: (triggerRef: RefObject<HTMLElement> | undefined, menuRef: RefObject<HTMLDivElement>, isSubMenu: boolean, isOpen: boolean, originalMenuRect: DOMRect | null, disable?: boolean) => SubMenuPosition;
|
|
17
18
|
export {};
|