@muraldevkit/ui-toolkit 2.27.1 → 2.28.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/index.d.ts +1 -0
- package/dist/components/pagination/MrlPagination/MrlPagination.d.ts +15 -0
- package/dist/components/pagination/MrlPagination/index.d.ts +1 -0
- package/dist/components/pagination/MrlPaginationButton/MrlPaginationButton.d.ts +30 -0
- package/dist/components/pagination/MrlPaginationButton/index.d.ts +1 -0
- package/dist/components/pagination/MrlPaginationText/MrlPaginationText.d.ts +21 -0
- package/dist/components/pagination/MrlPaginationText/index.d.ts +1 -0
- package/dist/components/pagination/constants.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/styles/MrlPagination/module.scss +29 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MrlPaginationProps extends React.ComponentPropsWithoutRef<'nav'> {
|
|
3
|
+
/** Additional class to add to the nav element */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Pagination heading */
|
|
6
|
+
heading?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Pagination component
|
|
10
|
+
*
|
|
11
|
+
* @param {MrlPaginationProps} props - the component props
|
|
12
|
+
* @returns pagination
|
|
13
|
+
*/
|
|
14
|
+
export declare function MrlPagination({ children, className, heading, style, ...rest }: MrlPaginationProps): JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlPagination';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MrlTooltipAnchor, MrlTooltipPosition } from '../..';
|
|
3
|
+
import { PaginationButtonType } from '../constants';
|
|
4
|
+
interface MrlPaginationButtonProps {
|
|
5
|
+
/** Additional class to add to the button element */
|
|
6
|
+
buttonClass?: string;
|
|
7
|
+
/** Additional class to add to the container element */
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** The type of pagination item */
|
|
11
|
+
kind: PaginationButtonType;
|
|
12
|
+
/**
|
|
13
|
+
* Click event for the button.
|
|
14
|
+
*/
|
|
15
|
+
handleClick?: (e: React.SyntheticEvent<HTMLButtonElement>) => void;
|
|
16
|
+
/** Pagination heading */
|
|
17
|
+
text?: string;
|
|
18
|
+
/** The anchor of the tooltips on the buttons */
|
|
19
|
+
tooltipAnchor?: MrlTooltipAnchor;
|
|
20
|
+
/** The placement of the tooltips on the buttons */
|
|
21
|
+
tooltipPosition?: MrlTooltipPosition;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Pagination button component
|
|
25
|
+
*
|
|
26
|
+
* @param {MrlPaginationButtonProps} props - the component props
|
|
27
|
+
* @returns a pagintaion button
|
|
28
|
+
*/
|
|
29
|
+
export declare function MrlPaginationButton({ buttonClass, className, disabled, kind, handleClick, text, tooltipAnchor, tooltipPosition }: MrlPaginationButtonProps): JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlPaginationButton';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface MrlPaginationTextProps {
|
|
3
|
+
/** Additional class to add to the container element */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** The last visible item */
|
|
6
|
+
rangeEnd: number;
|
|
7
|
+
/** The first visible item */
|
|
8
|
+
rangeStart: number;
|
|
9
|
+
/** Additional class to add to the text */
|
|
10
|
+
textClass?: string;
|
|
11
|
+
/** The total number of items */
|
|
12
|
+
total: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pagination text component
|
|
16
|
+
*
|
|
17
|
+
* @param {MrlPaginationTextProps} props - the component props
|
|
18
|
+
* @returns pagination text
|
|
19
|
+
*/
|
|
20
|
+
export declare function MrlPaginationText({ className, rangeStart, rangeEnd, textClass, total }: MrlPaginationTextProps): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlPaginationText';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type PaginationButtonType = 'first' | 'previous' | 'next' | 'last';
|