@muraldevkit/ui-toolkit 4.39.1 → 4.40.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/breadcrumb/MrlBreadcrumbItem/MrlBreadcrumbItem.d.ts +44 -0
- package/dist/components/breadcrumb/MrlBreadcrumbItem/index.d.ts +1 -0
- package/dist/components/breadcrumb/MrlBreadcrumbSeparator/MrlBreadcrumbSeparator.d.ts +7 -0
- package/dist/components/breadcrumb/MrlBreadcrumbSeparator/index.d.ts +1 -0
- package/dist/components/breadcrumb/MrlBreadcrumbs/MrlBreadcrumbs.d.ts +29 -0
- package/dist/components/breadcrumb/MrlBreadcrumbs/index.d.ts +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/MrlBreadcrumbItem/module.scss +41 -0
- package/dist/styles/MrlBreadcrumbs/module.scss +7 -0
- package/dist/styles.css +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Link } from 'react-router-dom';
|
|
3
|
+
export type BreadcrumbItemLink = {
|
|
4
|
+
text: string;
|
|
5
|
+
link: string;
|
|
6
|
+
} | {
|
|
7
|
+
text: string;
|
|
8
|
+
link: React.ComponentPropsWithoutRef<typeof Link>;
|
|
9
|
+
};
|
|
10
|
+
export type BreadcrumbItem = {
|
|
11
|
+
isSelected?: boolean;
|
|
12
|
+
hasSeparator?: boolean;
|
|
13
|
+
isTruncated?: boolean;
|
|
14
|
+
} & BreadcrumbItemLink;
|
|
15
|
+
export interface MrlBreadcrumbItemProps extends React.ComponentPropsWithRef<'li'> {
|
|
16
|
+
/**
|
|
17
|
+
* Children to be rendered within the component
|
|
18
|
+
*/
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Determines whether a separator should be displayed after this breadcrumb item.
|
|
22
|
+
*/
|
|
23
|
+
hasSeparator?: BreadcrumbItem['hasSeparator'];
|
|
24
|
+
/**
|
|
25
|
+
* Indicates whether this breadcrumb item represents the currently selected or
|
|
26
|
+
* active page.
|
|
27
|
+
*/
|
|
28
|
+
isSelected?: BreadcrumbItem['isSelected'];
|
|
29
|
+
/**
|
|
30
|
+
* Specifies whether the text content of this breadcrumb item should be truncated
|
|
31
|
+
* if it exceeds a certain width. This is useful for handling long page titles
|
|
32
|
+
* or labels within the breadcrumb.
|
|
33
|
+
*/
|
|
34
|
+
isTruncated?: boolean;
|
|
35
|
+
link?: BreadcrumbItem['link'];
|
|
36
|
+
text?: BreadcrumbItem['text'];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* MrlBreadcrumbItem component.
|
|
40
|
+
*
|
|
41
|
+
* @param props The MrlBreadcrumbItem component properties.
|
|
42
|
+
* @returns The MrlBreadcrumbItem component.
|
|
43
|
+
*/
|
|
44
|
+
export declare function MrlBreadcrumbItem(props: MrlBreadcrumbItemProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlBreadcrumbItem';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlBreadcrumbSeparator';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BreadcrumbItem } from '../MrlBreadcrumbItem';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the MrlBreadcrumbs component.
|
|
5
|
+
*/
|
|
6
|
+
export interface MrlBreadcrumbsProps extends React.ComponentPropsWithRef<'nav'> {
|
|
7
|
+
/**
|
|
8
|
+
* A string value used for data-qa attribute.
|
|
9
|
+
*/
|
|
10
|
+
['data-qa']?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The aria-label of the nav element
|
|
13
|
+
*/
|
|
14
|
+
['aria-label']: string;
|
|
15
|
+
/**
|
|
16
|
+
* This prop accepts an array of objects, where each object represents a single breadcrumb item.
|
|
17
|
+
* It's used to define the structure, content, and behavior of the breadcrumbs displayed in the component.
|
|
18
|
+
* The `link` prop could be either the props of a react-router-dom link or a string. If a string is provided it will
|
|
19
|
+
* render a regular link.
|
|
20
|
+
*/
|
|
21
|
+
items: BreadcrumbItem[];
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MrlBreadcrumbs component.
|
|
25
|
+
*
|
|
26
|
+
* @param props The MrlBreadcrumbs component properties.
|
|
27
|
+
* @returns The MrlBreadcrumbs component.
|
|
28
|
+
*/
|
|
29
|
+
export declare function MrlBreadcrumbs(props: MrlBreadcrumbsProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlBreadcrumbs';
|