@muraldevkit/ui-toolkit 2.51.0-dev.1 → 2.51.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.
@@ -23,4 +23,3 @@ export * from './navigation-sidebar';
23
23
  export * from './skeleton';
24
24
  export * from './empty';
25
25
  export * from './live-region';
26
- export * from './callout';
@@ -1,29 +1,22 @@
1
1
  import React, { RefObject } from 'react';
2
- import { PortalProps } from '../../';
3
- import { MenuPosition, MenuAlignment, ActionState, CustomMenuPosition } from '../../menu/constants';
2
+ import { MenuPosition, MenuAlignment, ActionState } from '../../menu/constants';
4
3
  export interface MrlPopoverProps {
5
- /**
6
- * Set initial state of menu
7
- *
8
- * @default { actionType: null, isOpen: false }
9
- */
10
- actionState?: ActionState;
11
4
  /** Label for the popover */
12
5
  ariaLabel?: string;
13
6
  /** ID of element to associate a label */
14
7
  ariaLabelledBy?: string;
15
8
  /** Children to be rendered within the menu component*/
16
9
  children: React.ReactNode;
17
- /** Custom class names for the popover */
18
- className?: string;
19
- /** Custom position for the menu */
20
- customPosition?: CustomMenuPosition;
21
10
  /** If the popover should have a close button */
22
11
  hasCloseButton?: boolean;
23
12
  /** If the popover should close when clicking outside of the menu */
24
13
  disableClickOutside?: boolean;
25
- /** If the popover should disable focus trap */
26
- disableFocusTrap?: boolean;
14
+ /**
15
+ * spacing of menu
16
+ * - 'default' has 16px padding
17
+ * - 'compact' has 12px padding
18
+ */
19
+ spacing?: 'default' | 'compact';
27
20
  /** Unique identifier for the menu */
28
21
  id?: string;
29
22
  /** If the menu is a submenu */
@@ -36,6 +29,16 @@ export interface MrlPopoverProps {
36
29
  * @default 'bottom'
37
30
  */
38
31
  position?: MenuPosition;
32
+ /**
33
+ * Set initial state of menu
34
+ *
35
+ * @default { actionType: null, isOpen: false }
36
+ */
37
+ actionState?: ActionState;
38
+ /**
39
+ * Reference to the DOM element that triggers this menu.
40
+ */
41
+ triggerRef?: RefObject<HTMLButtonElement>;
39
42
  /**
40
43
  * Vertical and horizontal alignment of the popover relative to the position with the trigger
41
44
  * - 'left' and 'right' work with position 'top' and 'bottom'
@@ -45,16 +48,6 @@ export interface MrlPopoverProps {
45
48
  * This does not impact submenus
46
49
  */
47
50
  alignment?: MenuAlignment;
48
- /**
49
- * spacing of menu
50
- * - 'default' has 16px padding
51
- * - 'compact' has 12px padding
52
- */
53
- spacing?: 'default' | 'compact';
54
- /**
55
- * Reference to the DOM element that triggers this menu.
56
- */
57
- triggerRef?: RefObject<HTMLElement>;
58
51
  /**
59
52
  * If the menu should be rendered with the inverse theme
60
53
  *
@@ -67,14 +60,6 @@ export interface MrlPopoverProps {
67
60
  * @default false
68
61
  */
69
62
  point?: boolean;
70
- /**
71
- * Props for the portal component
72
- */
73
- portalProps?: Omit<PortalProps, 'children'>;
74
- /**
75
- * Callback to be called when the menu is opened
76
- */
77
- onOpen?: () => void;
78
63
  /**
79
64
  * Callback to be called when the menu is closed
80
65
  *
@@ -90,7 +75,7 @@ export interface MrlPopoverProps {
90
75
  * @param {MrlPopoverProps} props - The props for the MrlPopover component
91
76
  * @returns {Element} - rendered MrlPopover component
92
77
  */
93
- export declare function MrlPopover({ alignment, ariaLabel, ariaLabelledBy, children, className, customPosition, disableClickOutside, disableFocusTrap, hasCloseButton, spacing, id, isSubMenu, actionState, position, point, portalProps, kind, onClose, onOpen, triggerRef, ...rest }: MrlPopoverProps): JSX.Element;
78
+ export declare function MrlPopover({ alignment, ariaLabel, ariaLabelledBy, children, disableClickOutside, hasCloseButton, spacing, id, isSubMenu, actionState, position, point, kind, onClose, triggerRef, ...rest }: MrlPopoverProps): JSX.Element;
94
79
  export declare namespace MrlPopover {
95
80
  var componentType: string;
96
81
  }
@@ -2,17 +2,7 @@ import React from 'react';
2
2
  export interface PortalProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  children: React.ReactNode;
4
4
  className?: string;
5
- dataQa?: string;
6
- /**
7
- * Provide a portalElementRef to create a portal as a sibling of the ref element
8
- * within its parent container.
9
- *
10
- * This can be used to help manage z-indexing and stacking context of the portal
11
- */
12
- portalElementRef?: React.RefObject<HTMLElement>;
13
5
  id?: string;
14
- uniquePortalId?: boolean;
15
- ['data-qa']?: string;
16
6
  }
17
7
  export declare const MRL_PORTAL_ID = "mrl-root-portal";
18
8
  /**
@@ -22,4 +12,4 @@ export declare const MRL_PORTAL_ID = "mrl-root-portal";
22
12
  * @param PortalProps Portal only takes children. Contact the platform team if you need to extend this.
23
13
  * @returns MrlPortal component
24
14
  */
25
- export declare const MrlPortal: ({ children, className, id, portalElementRef, ...props }: PortalProps) => React.ReactElement | null;
15
+ export declare const MrlPortal: ({ children, className, id, ...remainingProps }: PortalProps) => React.ReactElement | null;
@@ -1,12 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AttrsObject } from '../../../utils';
3
3
  import { LevelType, HeadingHierarchies, HeadingSizes, TextSizes, HeadingKinds } from '../constants';
4
- interface MrlTextHeadingProps extends React.ComponentPropsWithRef<'h1'> {
5
- /**
6
- * Applies additional HTML attributes to the text element
7
- *
8
- * @deprecated - use `attrs` instead
9
- */
4
+ interface MrlTextHeadingProps {
5
+ /** Applies additional HTML attributes to the text element */
10
6
  attrs?: AttrsObject;
11
7
  /** Children to be rendered within the text heading component */
12
8
  children?: React.ReactNode;
@@ -34,5 +30,5 @@ interface MrlTextHeadingProps extends React.ComponentPropsWithRef<'h1'> {
34
30
  * @param {MrlTextHeadingProps} props - MrlTextHeading component props
35
31
  * @returns a heading element
36
32
  */
37
- export declare function MrlTextHeading({ attrs, children, className, hierarchy, kind, level, size, text }: MrlTextHeadingProps): JSX.Element;
33
+ export declare function MrlTextHeading({ attrs, children, hierarchy, kind, level, size, text }: MrlTextHeadingProps): JSX.Element;
38
34
  export {};