@muraldevkit/ui-toolkit 2.31.4 → 2.33.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/components/empty/default/MrlEmpty.d.ts +15 -0
- package/dist/components/empty/default/index.d.ts +1 -0
- package/dist/components/empty/index.d.ts +2 -0
- package/dist/components/empty/large/MrlEmptyLarge.d.ts +15 -0
- package/dist/components/empty/large/index.d.ts +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/menu/MrlMenu/utilities.d.ts +0 -14
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/components/tabs/MrlTab/MrlTab.d.ts +21 -0
- package/dist/components/tabs/MrlTab/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabContent/MrlTabContent.d.ts +9 -0
- package/dist/components/tabs/MrlTabContent/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabGroup/MrlTabGroup.d.ts +10 -0
- package/dist/components/tabs/MrlTabGroup/index.d.ts +1 -0
- package/dist/components/tabs/MrlTabs/MrlTabs.d.ts +19 -0
- package/dist/components/tabs/MrlTabs/index.d.ts +1 -0
- package/dist/components/tabs/constants.d.ts +1 -0
- package/dist/components/tabs/index.d.ts +4 -0
- package/dist/contexts/MrlTabContext/MrlTabContext.d.ts +6 -0
- package/dist/contexts/MrlTabContext/index.d.ts +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlTab/module.scss +115 -0
- package/dist/styles/MrlTabContent/module.scss +7 -0
- package/dist/styles/MrlTabGroup/module.scss +68 -0
- package/dist/styles/empty/module.scss +18 -0
- package/dist/utils/findInteractiveElement/findInteractiveElement.d.ts +8 -0
- package/dist/utils/findInteractiveElement/index.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/preventDefault/index.d.ts +1 -0
- package/dist/utils/preventDefault/preventDefault.d.ts +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface MrlEmptyProps {
|
|
3
|
+
graphic?: JSX.Element;
|
|
4
|
+
heading: string;
|
|
5
|
+
description: string;
|
|
6
|
+
action?: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* MrlEmpty for when there is no data to display for a single component.
|
|
10
|
+
*
|
|
11
|
+
* @param MrlEmptyProps props
|
|
12
|
+
* @returns MrlEmpty component
|
|
13
|
+
*/
|
|
14
|
+
export declare const MrlEmpty: ({ graphic, description, action, heading }: MrlEmptyProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlEmpty';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface MrlEmptyLargeProps {
|
|
3
|
+
graphic?: JSX.Element;
|
|
4
|
+
heading: string;
|
|
5
|
+
description: string;
|
|
6
|
+
action?: JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* MrlEmptyLarge for when there is no data to display for an entire page.
|
|
10
|
+
*
|
|
11
|
+
* @param MrlEmptyProps props
|
|
12
|
+
* @returns MrlEmptyLarge
|
|
13
|
+
*/
|
|
14
|
+
export declare const MrlEmptyLarge: ({ graphic, heading, description, action }: MrlEmptyLargeProps) => JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlEmptyLarge';
|
|
@@ -15,8 +15,10 @@ export * from './pagination';
|
|
|
15
15
|
export * from './popover';
|
|
16
16
|
export * from './svg';
|
|
17
17
|
export * from './table';
|
|
18
|
+
export * from './tabs';
|
|
18
19
|
export * from './text';
|
|
19
20
|
export * from './tooltip';
|
|
20
21
|
export * from './portal';
|
|
21
22
|
export * from './navigation-sidebar';
|
|
22
23
|
export * from './skeleton';
|
|
24
|
+
export * from './empty';
|
|
@@ -5,14 +5,6 @@
|
|
|
5
5
|
* @returns The closest menu parent or null if none is found
|
|
6
6
|
*/
|
|
7
7
|
export declare const findClosestMenuParent: (el: HTMLElement | null) => HTMLElement | null | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Find the interactive element immediately before or after a reference element
|
|
10
|
-
*
|
|
11
|
-
* @param ref - The reference element
|
|
12
|
-
* @param direction - The direction to search in
|
|
13
|
-
* @returns The interactive element or null if none is found
|
|
14
|
-
*/
|
|
15
|
-
export declare const findInteractiveElement: (ref: React.RefObject<HTMLElement> | undefined, direction?: 'next' | 'previous') => HTMLElement | null;
|
|
16
8
|
/**
|
|
17
9
|
* Calculate the horizontal positioning of the submenu
|
|
18
10
|
*
|
|
@@ -35,9 +27,3 @@ export declare const calculateLeftPosition: (overlapsRight: boolean, overlapsLef
|
|
|
35
27
|
* @returns The top position of the menu
|
|
36
28
|
*/
|
|
37
29
|
export declare const calculateTopPosition: (overlapsRight: boolean, overlapsLeft: boolean, triggerRef: React.RefObject<HTMLElement>, menuRect: DOMRect, parentMenu: HTMLElement, triggerRect: DOMRect) => string;
|
|
38
|
-
/**
|
|
39
|
-
* Prevent default on event
|
|
40
|
-
*
|
|
41
|
-
* @param e - The event
|
|
42
|
-
*/
|
|
43
|
-
export declare const preventDefault: (e: React.MouseEvent | React.KeyboardEvent | MouseEvent | KeyboardEvent) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MrlTabProps extends React.ComponentProps<'button'> {
|
|
3
|
+
/** Class to be applied to the button element of the MrlTab */
|
|
4
|
+
className?: string;
|
|
5
|
+
icon?: React.ReactElement;
|
|
6
|
+
/**
|
|
7
|
+
* The id that will be passed to the MrlTabContext to set the active state.
|
|
8
|
+
* NOTE: This must match the `tabId` set on `MrlTabContent`!
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/** An addition function to call when clicking on a tab */
|
|
12
|
+
hookClick?: () => void;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders a tab component
|
|
17
|
+
*
|
|
18
|
+
* @param {MrlTabProps} props the props for your MrlTab
|
|
19
|
+
* @returns {React.ReactElement} an a element containing the text you pass
|
|
20
|
+
*/
|
|
21
|
+
export declare const MrlTab: ({ className, icon, id, hookClick, text }: MrlTabProps) => React.ReactElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTab';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MrlTabContentPropTypes {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** Class to be applied to the container element of the MrlTabContent */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The id of the tab button associated to this content */
|
|
7
|
+
tabId: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const MrlTabContent: React.FC<MrlTabContentPropTypes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTabContent';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface MrlTabGroupPropTypes {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/** Class to be applied to the container element of the MrlTabGroup */
|
|
5
|
+
className?: string;
|
|
6
|
+
disablePageControls?: boolean;
|
|
7
|
+
/** A hidden label for the tab group for accessiblity purposes */
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MrlTabGroup: React.FC<MrlTabGroupPropTypes>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTabGroup';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MrlTabContextProps } from '../../../';
|
|
3
|
+
export type MrlTabSize = 'small' | 'large';
|
|
4
|
+
export interface MrlTabsPropTypes {
|
|
5
|
+
/** Sets the tabs to be styled with capital case */
|
|
6
|
+
capitalizeTabTitles?: boolean;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** Class to be applied to the container element of the MrlTabs */
|
|
9
|
+
className?: string;
|
|
10
|
+
size?: MrlTabSize;
|
|
11
|
+
spaceTabsEvenly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const MrlTabs: React.FC<MrlTabsPropTypes>;
|
|
14
|
+
/**
|
|
15
|
+
* Tab context to prevent us from having to do any prop drilling.
|
|
16
|
+
*
|
|
17
|
+
* @returns {MrlTabContextProps} the context of the tabs
|
|
18
|
+
*/
|
|
19
|
+
export declare function useMrlTabContext(): MrlTabContextProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTabs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TabActionType = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'Home' | 'End' | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlTabContext';
|
package/dist/contexts/index.d.ts
CHANGED