@muraldevkit/ui-toolkit 1.3.3 → 1.5.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/button/MrlButton/MrlButton.d.ts +1 -1
- package/dist/components/svg/MrlSvgAnimate/MrlSvgAnimate.d.ts +49 -0
- package/dist/components/svg/config.d.ts +33 -0
- package/dist/components/svg/constants.d.ts +15 -0
- package/dist/components/svg/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/src/components/svg/MrlSvg/MrlSvg.module.scss +26 -0
- package/dist/src/components/svg/MrlSvgAnimate/MrlSvgAnimate.module.scss +22 -0
- package/dist/src/components/tooltip/MrlTooltip/MrlTooltip.module.scss +4 -0
- package/dist/src/components/tooltip/MrlTooltipContent/MrlTooltipContent.module.scss +142 -0
- package/dist/styles/MrlButton/global.scss +55 -0
- package/dist/styles/button/global.scss +67 -0
- package/dist/styles/button/mixins.scss +75 -0
- package/dist/styles/button/variables.scss +194 -0
- package/dist/styles/svg/variables.scss +21 -0
- package/dist/styles/tooltip/mixins.scss +19 -0
- package/package.json +4 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MrlButtonKind, MrlButtonSize, MrlButtonState, ToggleAria, ToggleStyle, IconPosition } from '../constants';
|
|
3
3
|
import { AttrsObject } from '../../../utils';
|
|
4
|
-
import './MrlButton.scss';
|
|
4
|
+
import './MrlButton.global.scss';
|
|
5
5
|
interface MrlButtonProps {
|
|
6
6
|
/**
|
|
7
7
|
* Allow developers to add badge to buttons.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AnimatedState } from '../constants';
|
|
3
|
+
/**
|
|
4
|
+
* Props for MrlSvgAnimate component
|
|
5
|
+
*/
|
|
6
|
+
export interface MrlSvgAnimateProps {
|
|
7
|
+
/**
|
|
8
|
+
* JSON file contents used by Lottie to generate an animated SVG to render.
|
|
9
|
+
* This attribute is mutually exclusive with fullPath and cdnFile.
|
|
10
|
+
* Note: When dynamically changing the svgData, if a configuration change
|
|
11
|
+
* is required be sure to set any new values before changing the svgData.
|
|
12
|
+
*/
|
|
13
|
+
svgData?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Path to a JSON file used by Lottie to generate an animated SVG to render.
|
|
16
|
+
* This attribute is mutually exclusive with svgData and cdnFile.
|
|
17
|
+
* Note: When dynamically changing the fullPath, if a configuration change
|
|
18
|
+
* is required be sure to set any new values before changing the fullPath.
|
|
19
|
+
*/
|
|
20
|
+
fullPath?: string;
|
|
21
|
+
/**
|
|
22
|
+
* File name of an animation hosted on Mural's CDN used by Lottie to generate
|
|
23
|
+
* an animated SVG to render. This is the preferred usage of this component
|
|
24
|
+
* in terms of performance. It supports any file located at `static/animations`.
|
|
25
|
+
* This attribute is mutually exclusive with fullPath and svgData.
|
|
26
|
+
* Note: When dynamically changing the cdnFile, if a configuration change
|
|
27
|
+
* is required be sure to set any new values before changing the cdnFile.
|
|
28
|
+
*/
|
|
29
|
+
cdnFile?: string;
|
|
30
|
+
/** Icon animation state. */
|
|
31
|
+
state?: AnimatedState;
|
|
32
|
+
/** Delay (in ms) before animation begins. */
|
|
33
|
+
delay?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Optional [Lottie configuration object](http://airbnb.io/lottie/#/web) for the
|
|
36
|
+
* loadAnimation method
|
|
37
|
+
*/
|
|
38
|
+
config?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* MrlSvgAnimate
|
|
42
|
+
*
|
|
43
|
+
* This is a React functional component used for SVGs with robust After Effects animations.
|
|
44
|
+
*
|
|
45
|
+
* @param {MrlSvgAnimateProps} props - The properties for the MrlSvgAnimate component.
|
|
46
|
+
* @returns {React.ReactElement} - The rendered MrlSvgAnimate component.
|
|
47
|
+
*/
|
|
48
|
+
export declare const MrlSvgAnimate: React.FC<MrlSvgAnimateProps>;
|
|
49
|
+
export default MrlSvgAnimate;
|
|
@@ -112,3 +112,36 @@ export declare const colorPictoStoryData: {
|
|
|
112
112
|
name: string;
|
|
113
113
|
title: string;
|
|
114
114
|
};
|
|
115
|
+
export declare const animateStoryData: {
|
|
116
|
+
args: {
|
|
117
|
+
delay: number;
|
|
118
|
+
state: "stop" | "play";
|
|
119
|
+
};
|
|
120
|
+
argTypes: {
|
|
121
|
+
delay: {
|
|
122
|
+
max: number;
|
|
123
|
+
min: number;
|
|
124
|
+
name: string;
|
|
125
|
+
step: number;
|
|
126
|
+
type: string;
|
|
127
|
+
};
|
|
128
|
+
state: {
|
|
129
|
+
control: {
|
|
130
|
+
options: readonly ["stop", "play"];
|
|
131
|
+
type: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
manifest: {
|
|
136
|
+
exclude: {
|
|
137
|
+
default: string[];
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
name: string;
|
|
141
|
+
title: string;
|
|
142
|
+
};
|
|
143
|
+
export declare const animateContainerStyles: {
|
|
144
|
+
backgroundColor: string;
|
|
145
|
+
height: string;
|
|
146
|
+
width: string;
|
|
147
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AttrsObject } from '../../utils';
|
|
2
|
+
import { AnimationConfigWithData } from 'lottie-web';
|
|
2
3
|
export type SVGSize = 'small' | 'medium' | 'large' | 'auto';
|
|
3
4
|
export interface SVGDefaults {
|
|
4
5
|
attrs: AttrsObject;
|
|
@@ -20,4 +21,18 @@ export declare const allowedSvgValues: AllowedValues;
|
|
|
20
21
|
*/
|
|
21
22
|
export declare const svgDefaults: SVGDefaults;
|
|
22
23
|
export type SVGObject = Record<string, any>;
|
|
24
|
+
export type LottieConfig = Omit<AnimationConfigWithPath, 'container'>;
|
|
25
|
+
export declare const baseLottieConfig: LottieConfig;
|
|
26
|
+
interface AnimationConfigWithPath extends AnimationConfigWithData<'svg'> {
|
|
27
|
+
path?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const allowedAnimatedValues: {
|
|
30
|
+
states: readonly ["stop", "play"];
|
|
31
|
+
};
|
|
32
|
+
export type AnimatedState = typeof allowedAnimatedValues.states[number];
|
|
33
|
+
export interface AnimatedDefaults {
|
|
34
|
+
delay: number;
|
|
35
|
+
state: AnimatedState;
|
|
36
|
+
}
|
|
37
|
+
export declare const animatedDefaults: AnimatedDefaults;
|
|
23
38
|
export {};
|