@muraldevkit/ui-toolkit 2.17.2 → 2.18.1
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/loader/MrlProgressBar/MrlProgressBar.d.ts +10 -0
- package/dist/components/loader/MrlProgressBar/index.d.ts +1 -0
- package/dist/components/loader/constants.d.ts +49 -0
- package/dist/components/loader/index.d.ts +1 -0
- package/dist/components/svg/config.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/styles/MrlProgressBar/module.scss +57 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ProgressBarComponent } from '../constants';
|
|
3
|
+
import '../../../styles/shared/a11y-helpers/a11y.global.scss';
|
|
4
|
+
/**
|
|
5
|
+
* MrlProgressBar React component.
|
|
6
|
+
*
|
|
7
|
+
* @param props - component props
|
|
8
|
+
* @returns a MrlProgressBar React component.
|
|
9
|
+
*/
|
|
10
|
+
export declare function MrlProgressBar({ children, className, indeterminate, percent, showText, text, time }: ProgressBarComponent): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MrlProgressBar';
|
|
@@ -1,3 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type CreateArrayWithLengthX<LENGTH extends number, ACC extends unknown[] = []> = ACC['length'] extends LENGTH ? ACC : CreateArrayWithLengthX<LENGTH, [...ACC, 1]>;
|
|
3
|
+
type NumericRange<START_ARR extends number[], END extends number, ACC extends number = never> = START_ARR['length'] extends END ? ACC | END : NumericRange<[...START_ARR, 1], END, ACC | START_ARR['length']>;
|
|
4
|
+
export type ProgressRange = NumericRange<CreateArrayWithLengthX<0>, 100>;
|
|
5
|
+
/**
|
|
6
|
+
* Default values for props on the MrlProgressBar component;
|
|
7
|
+
* Shared between the component and Storybook
|
|
8
|
+
*/
|
|
9
|
+
export declare const progressBarDefaults: ProgressBarComponent;
|
|
10
|
+
export interface ProgressBarComponent {
|
|
11
|
+
/**
|
|
12
|
+
* Custom content that lives below the progress bar.
|
|
13
|
+
*
|
|
14
|
+
* Note: This should be limited to descriptive text regarding
|
|
15
|
+
* what is in progress.
|
|
16
|
+
*/
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Custom class to be applied to the component.
|
|
20
|
+
*/
|
|
21
|
+
className?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Display an infinite loading indicator until completion
|
|
24
|
+
*
|
|
25
|
+
* Note: do not use with `time`.
|
|
26
|
+
*/
|
|
27
|
+
indeterminate?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* The percent complete.
|
|
30
|
+
*
|
|
31
|
+
* Note: This should be a whole number between 0 and 100.
|
|
32
|
+
*/
|
|
33
|
+
percent?: ProgressRange;
|
|
34
|
+
/**
|
|
35
|
+
* Display the percent complete text
|
|
36
|
+
*/
|
|
37
|
+
showText?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Custom text to use under the progress bar.
|
|
40
|
+
*/
|
|
41
|
+
text?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The length of time to reach 100% in milliseconds.
|
|
44
|
+
*
|
|
45
|
+
* Note: do not use with `indeterminate`.
|
|
46
|
+
*/
|
|
47
|
+
time?: number;
|
|
48
|
+
}
|
|
1
49
|
export type SpinnerSize = 'large' | 'medium' | 'small';
|
|
2
50
|
export type SpinnerStyle = 'default' | 'inverse';
|
|
3
51
|
/**
|
|
@@ -29,3 +77,4 @@ export interface SpinnerComponent {
|
|
|
29
77
|
*/
|
|
30
78
|
text?: string;
|
|
31
79
|
}
|
|
80
|
+
export {};
|