@am92/react-design-system 2.7.2 → 2.7.3
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/DsLoader/DsLoader.Component.d.ts +2 -5
- package/dist/Components/DsLoader/DsLoader.Component.js +15 -23
- package/dist/Components/DsLoader/DsLoader.Types.d.ts +6 -6
- package/dist/Components/DsLoader/DsLoader.Types.js +4 -9
- package/dist/Components/DsLoader/SingleDotLoader.d.ts +1 -0
- package/dist/Components/DsLoader/SingleDotLoader.js +179 -0
- package/dist/Components/DsLoader/ThreeDotLoader.d.ts +1 -0
- package/dist/Components/DsLoader/ThreeDotLoader.js +910 -0
- package/package.json +1 -2
- package/dist/Components/DsLoader/assets/singleDotLoader.json +0 -252
- package/dist/Components/DsLoader/assets/threeDotLoader.json +0 -5417
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { DsLoaderProps } from './DsLoader.Types';
|
|
3
|
-
export declare
|
|
4
|
-
static defaultProps: DsLoaderProps;
|
|
5
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
}
|
|
3
|
+
export declare const DsLoader: FC<DsLoaderProps>;
|
|
@@ -1,33 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import Lottie from 'lottie-react';
|
|
4
|
-
import { DATA_MAP, DS_LOADER_DEFAULT_PROPS } from './DsLoader.Types';
|
|
2
|
+
import { DS_LOADER_DEFAULT_PROPS, LOADER_MAP } from './DsLoader.Types';
|
|
5
3
|
import { DsBackdrop } from '../DsBackdrop';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
import { DsBox } from '../DsBox';
|
|
5
|
+
export const DsLoader = inProps => {
|
|
6
|
+
const props = { ...DS_LOADER_DEFAULT_PROPS, ...inProps };
|
|
7
|
+
const { 'ds-variant': loaderVariant = 'threeDot', color, position, backdrop, BackdropProps, ...boxProps } = props;
|
|
8
|
+
const LoaderElement = LOADER_MAP[loaderVariant];
|
|
9
|
+
const { sx: wrapperStyleProps, ...restBoxProps } = boxProps;
|
|
10
|
+
return (_jsx(DsBackdrop, { ...BackdropProps, open: true, invisible: !backdrop, children: _jsx(DsBox, { sx: [
|
|
12
11
|
{
|
|
13
|
-
'.dot-class': {
|
|
14
|
-
fill: `var(--ds-colour-${color}, var(--ds-colour-dotLoader))`
|
|
15
|
-
},
|
|
16
12
|
position,
|
|
17
|
-
color:
|
|
13
|
+
color: `var(--ds-colour-${color}, var(--ds-colour-dotLoader))`
|
|
18
14
|
},
|
|
19
15
|
backdrop
|
|
20
16
|
? {
|
|
21
|
-
|
|
22
|
-
fill: `var(--ds-colour-${color}, var(--palette-common-white))`
|
|
23
|
-
}
|
|
17
|
+
color: `var(--ds-colour-${color}, var(--palette-common-white))`
|
|
24
18
|
}
|
|
25
19
|
: {},
|
|
26
20
|
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
21
|
+
color: color
|
|
22
|
+
},
|
|
23
|
+
wrapperStyleProps || {}
|
|
24
|
+
], ...restBoxProps, children: _jsx(LoaderElement, {}) }) }));
|
|
25
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { DsColorTokens } from '../../Types';
|
|
3
|
+
import type { DsBackdropProps } from '../DsBackdrop';
|
|
4
|
+
import type { DsBoxProps } from '../DsBox';
|
|
5
5
|
type TVariant = 'threeDot' | 'singleDot';
|
|
6
6
|
type TPosition = 'absolute' | 'fixed';
|
|
7
|
-
export interface DsLoaderProps extends
|
|
7
|
+
export interface DsLoaderProps extends DsBoxProps {
|
|
8
8
|
'ds-variant'?: TVariant;
|
|
9
9
|
position?: TPosition;
|
|
10
10
|
backdrop?: boolean;
|
|
@@ -12,5 +12,5 @@ export interface DsLoaderProps extends Omit<LottieComponentProps, 'animationData
|
|
|
12
12
|
color?: DsColorTokens | CSSProperties['color'];
|
|
13
13
|
}
|
|
14
14
|
export declare const DS_LOADER_DEFAULT_PROPS: DsLoaderProps;
|
|
15
|
-
export declare const
|
|
15
|
+
export declare const LOADER_MAP: Record<TVariant, React.ElementType>;
|
|
16
16
|
export {};
|
|
@@ -1,17 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { ThreeDotLoader } from './ThreeDotLoader';
|
|
2
|
+
import { SingleDotLoader } from './SingleDotLoader';
|
|
3
3
|
export const DS_LOADER_DEFAULT_PROPS = {
|
|
4
4
|
'ds-variant': 'threeDot',
|
|
5
5
|
position: 'fixed',
|
|
6
6
|
backdrop: true,
|
|
7
|
-
|
|
8
|
-
rendererSettings: {
|
|
9
|
-
preserveAspectRatio: 'xMidYMid slice',
|
|
10
|
-
progressiveLoad: true
|
|
11
|
-
},
|
|
12
|
-
style: { height: '100px', width: '100px' }
|
|
7
|
+
sx: { maxheight: '100px', maxWidth: '100px' }
|
|
13
8
|
};
|
|
14
|
-
export const
|
|
9
|
+
export const LOADER_MAP = {
|
|
15
10
|
singleDot: SingleDotLoader,
|
|
16
11
|
threeDot: ThreeDotLoader
|
|
17
12
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SingleDotLoader(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export function SingleDotLoader() {
|
|
3
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1000 1000", preserveAspectRatio: "xMidYMid slice", style: {
|
|
4
|
+
width: '100%',
|
|
5
|
+
height: '100%',
|
|
6
|
+
transform: 'translate3d(0px, 0px, 0px)',
|
|
7
|
+
contentVisibility: 'visible'
|
|
8
|
+
}, children: [_jsxs("defs", { children: [_jsx("clipPath", { id: "__loader_element_11", children: _jsx("rect", { width: "1000", height: "1000", x: "0", y: "0" }) }), _jsx("style", { children: `@keyframes ball {
|
|
9
|
+
0%{
|
|
10
|
+
transform: matrix(2.428800106048584,0,0,2.428800106048584,491.30035400390625,444.7691650390625)
|
|
11
|
+
}
|
|
12
|
+
4%{
|
|
13
|
+
transform: matrix(2.4268264770507812,0,0,2.428800106048584,491.308349609375,446.03826904296875)
|
|
14
|
+
}
|
|
15
|
+
8%{
|
|
16
|
+
transform: matrix(2.420640230178833,0,0,2.428800106048584,491.3333435058594,450.0011901855469)
|
|
17
|
+
}
|
|
18
|
+
12%{
|
|
19
|
+
transform: matrix(2.4097819328308105,0,0,2.428800106048584,491.37725830078125,456.9241638183594)
|
|
20
|
+
}
|
|
21
|
+
16%{
|
|
22
|
+
transform: matrix(2.3936853408813477,0,0,2.428800106048584,491.44232177734375,467.1278991699219)
|
|
23
|
+
}
|
|
24
|
+
20%{
|
|
25
|
+
transform: matrix(2.371640682220459,0,0,2.428800106048584,491.5314636230469,481.006103515625)
|
|
26
|
+
}
|
|
27
|
+
24%{
|
|
28
|
+
transform: matrix(2.3427276611328125,0,0,2.428800106048584,491.6483459472656,499.0533142089844)
|
|
29
|
+
}
|
|
30
|
+
28%{
|
|
31
|
+
transform: matrix(2.305706262588501,0,0,2.428800106048584,491.79803466796875,521.9090576171875)
|
|
32
|
+
}
|
|
33
|
+
32%{
|
|
34
|
+
transform: matrix(2.2588188648223877,0,0,2.428800106048584,491.9875793457031,550.4329833984375)
|
|
35
|
+
}
|
|
36
|
+
36%{
|
|
37
|
+
transform: matrix(2.199368715286255,0,0,2.428800106048584,492.2279357910156,585.8424682617188)
|
|
38
|
+
}
|
|
39
|
+
40%{
|
|
40
|
+
transform: matrix(2.1226511001586914,0,0,2.428800106048584,492.5381164550781,630.0007934570312)
|
|
41
|
+
}
|
|
42
|
+
44%{
|
|
43
|
+
transform: matrix(2.0179288387298584,0,0,2.428800106048584,492.9615173339844,686.14697265625)
|
|
44
|
+
}
|
|
45
|
+
48%{
|
|
46
|
+
transform: matrix(2.185920238494873,0,0,2.185920238494873,492.2823181152344,762.3750610351562)
|
|
47
|
+
}
|
|
48
|
+
52%{
|
|
49
|
+
transform: matrix(2.185920238494873,0,0,2.185920238494873,492.2823181152344,762.3750610351562)
|
|
50
|
+
}
|
|
51
|
+
56%{
|
|
52
|
+
transform: matrix(2.0179288387298584,0,0,2.428800106048584,492.9615173339844,686.14697265625)
|
|
53
|
+
}
|
|
54
|
+
60%{
|
|
55
|
+
transform: matrix(2.1226511001586914,0,0,2.428800106048584,492.5381164550781,630.0007934570312)
|
|
56
|
+
}
|
|
57
|
+
64%{
|
|
58
|
+
transform: matrix(2.199368715286255,0,0,2.428800106048584,492.2279357910156,585.8424682617188)
|
|
59
|
+
}
|
|
60
|
+
68%{
|
|
61
|
+
transform: matrix(2.2588188648223877,0,0,2.428800106048584,491.9875793457031,550.4329833984375)
|
|
62
|
+
}
|
|
63
|
+
72%{
|
|
64
|
+
transform: matrix(2.305706262588501,0,0,2.428800106048584,491.79803466796875,521.9090576171875)
|
|
65
|
+
}
|
|
66
|
+
76%{
|
|
67
|
+
transform: matrix(2.3427276611328125,0,0,2.428800106048584,491.6483459472656,499.0533142089844)
|
|
68
|
+
}
|
|
69
|
+
80%{
|
|
70
|
+
transform: matrix(2.371640682220459,0,0,2.428800106048584,491.5314636230469,481.006103515625)
|
|
71
|
+
}
|
|
72
|
+
84%{
|
|
73
|
+
transform: matrix(2.3936853408813477,0,0,2.428800106048584,491.44232177734375,467.1278991699219)
|
|
74
|
+
}
|
|
75
|
+
88%{
|
|
76
|
+
transform: matrix(2.4097819328308105,0,0,2.428800106048584,491.37725830078125,456.9241638183594)
|
|
77
|
+
}
|
|
78
|
+
92%{
|
|
79
|
+
transform: matrix(2.420640230178833,0,0,2.428800106048584,491.3333435058594,450.0011901855469)
|
|
80
|
+
}
|
|
81
|
+
96%{
|
|
82
|
+
transform: matrix(2.4268264770507812,0,0,2.428800106048584,491.308349609375,446.03826904296875)
|
|
83
|
+
}
|
|
84
|
+
100%{
|
|
85
|
+
transform: matrix(2.428800106048584,0,0,2.428800106048584,491.30035400390625,444.7691650390625)
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
@keyframes shadow {
|
|
89
|
+
0%{
|
|
90
|
+
transform: matrix(2.3200900554656982,0,0,1.152750015258789,491.7398681640625,911.4684448242188)
|
|
91
|
+
}
|
|
92
|
+
4%{
|
|
93
|
+
transform: matrix(2.312131881713867,0,0,1.1487959623336792,491.77203369140625,911.1839599609375)
|
|
94
|
+
}
|
|
95
|
+
8%{
|
|
96
|
+
transform: matrix(2.2872824668884277,0,0,1.1364493370056152,491.87249755859375,910.2955322265625)
|
|
97
|
+
}
|
|
98
|
+
12%{
|
|
99
|
+
transform: matrix(2.2438719272613525,0,0,1.1148805618286133,492.04803466796875,908.7434692382812)
|
|
100
|
+
}
|
|
101
|
+
16%{
|
|
102
|
+
transform: matrix(2.17988920211792,0,0,1.0830904245376587,492.30670166015625,906.4559326171875)
|
|
103
|
+
}
|
|
104
|
+
20%{
|
|
105
|
+
transform: matrix(2.0928657054901123,0,0,1.039852261543274,492.6585388183594,903.3446655273438)
|
|
106
|
+
}
|
|
107
|
+
24%{
|
|
108
|
+
transform: matrix(1.9797005653381348,0,0,0.983625590801239,493.1160583496094,899.2987670898438)
|
|
109
|
+
}
|
|
110
|
+
28%{
|
|
111
|
+
transform: matrix(1.8363832235336304,0,0,0.9124175310134888,493.69549560546875,894.1748657226562)
|
|
112
|
+
}
|
|
113
|
+
32%{
|
|
114
|
+
transform: matrix(1.65752375125885,0,0,0.8235501646995544,494.41864013671875,887.7802124023438)
|
|
115
|
+
}
|
|
116
|
+
36%{
|
|
117
|
+
transform: matrix(1.4354881048202515,0,0,0.7132304906845093,495.3163146972656,879.8419189453125)
|
|
118
|
+
}
|
|
119
|
+
40%{
|
|
120
|
+
transform: matrix(1.158592939376831,0,0,0.5756535530090332,496.435791015625,869.9423217773438)
|
|
121
|
+
}
|
|
122
|
+
44%{
|
|
123
|
+
transform: matrix(0.8065273761749268,0,0,0.400727778673172,497.85919189453125,857.3551635742188)
|
|
124
|
+
}
|
|
125
|
+
48%{
|
|
126
|
+
transform: matrix(0.33317291736602783,0,0,0.16553886234760284,499.7729797363281,840.4317016601562)
|
|
127
|
+
}
|
|
128
|
+
52%{
|
|
129
|
+
transform: matrix(0.33317291736602783,0,0,0.16553886234760284,499.7729797363281,840.4317016601562)
|
|
130
|
+
}
|
|
131
|
+
56%{
|
|
132
|
+
transform: matrix(0.8065273761749268,0,0,0.400727778673172,497.85919189453125,857.3551635742188)
|
|
133
|
+
}
|
|
134
|
+
60%{
|
|
135
|
+
transform: matrix(1.158592939376831,0,0,0.5756535530090332,496.435791015625,869.9423217773438)
|
|
136
|
+
}
|
|
137
|
+
64%{
|
|
138
|
+
transform: matrix(1.4354881048202515,0,0,0.7132304906845093,495.3163146972656,879.8419189453125)
|
|
139
|
+
}
|
|
140
|
+
68%{
|
|
141
|
+
transform: matrix(1.65752375125885,0,0,0.8235501646995544,494.41864013671875,887.7802124023438)
|
|
142
|
+
}
|
|
143
|
+
72%{
|
|
144
|
+
transform: matrix(1.8363832235336304,0,0,0.9124175310134888,493.69549560546875,894.1748657226562)
|
|
145
|
+
}
|
|
146
|
+
76%{
|
|
147
|
+
transform: matrix(1.9797005653381348,0,0,0.983625590801239,493.1160583496094,899.2987670898438)
|
|
148
|
+
}
|
|
149
|
+
80%{
|
|
150
|
+
transform: matrix(2.0928657054901123,0,0,1.039852261543274,492.6585388183594,903.3446655273438)
|
|
151
|
+
}
|
|
152
|
+
84%{
|
|
153
|
+
transform: matrix(2.17988920211792,0,0,1.0830904245376587,492.30670166015625,906.4559326171875)
|
|
154
|
+
}
|
|
155
|
+
88%{
|
|
156
|
+
transform: matrix(2.2438719272613525,0,0,1.1148805618286133,492.04803466796875,908.7434692382812)
|
|
157
|
+
}
|
|
158
|
+
92%{
|
|
159
|
+
transform: matrix(2.2872824668884277,0,0,1.1364493370056152,491.87249755859375,910.2955322265625)
|
|
160
|
+
}
|
|
161
|
+
96%{
|
|
162
|
+
transform: matrix(2.312131881713867,0,0,1.1487959623336792,491.77203369140625,911.1839599609375)
|
|
163
|
+
}
|
|
164
|
+
100%{
|
|
165
|
+
transform: matrix(
|
|
166
|
+
2.3200900554656982,
|
|
167
|
+
0,
|
|
168
|
+
0,
|
|
169
|
+
1.152750015258789,
|
|
170
|
+
491.7398681640625,
|
|
171
|
+
911.4684448242188
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
}` })] }), _jsxs("g", { "clip-path": "url(#__loader_element_11)", children: [_jsx("g", { transform: "matrix(2.3200900554656982,0,0,1.152750015258789,491.7398681640625,911.4684448242188)", opacity: "0.2", style: {
|
|
175
|
+
animation: 'shadow 834ms cubic-bezier(0.0, 0.0, 0.2, 1.0) infinite'
|
|
176
|
+
}, children: _jsx("g", { opacity: "1", transform: "matrix(1,0,0,1,4.043000221252441,-71.95700073242188)", children: _jsx("path", { fill: "currentColor", "fill-opacity": "1", d: " M75,0 C75,0 75,0 75,0 C75,41.39250183105469 41.39250183105469,75 0,75 C0,75 0,75 0,75 C-41.39250183105469,75 -75,41.39250183105469 -75,0 C-75,0 -75,0 -75,0 C-75,-41.39250183105469 -41.39250183105469,-75 0,-75 C0,-75 0,-75 0,-75 C41.39250183105469,-75 75,-41.39250183105469 75,0z" }) }) }), _jsx("g", { transform: "matrix(2.428800106048584,0,0,2.428800106048584,491.30035400390625,444.7691650390625)", opacity: "1", style: {
|
|
177
|
+
animation: 'ball 834ms cubic-bezier(0.0, 0.0, 0.2, 1.0) infinite'
|
|
178
|
+
}, children: _jsx("g", { opacity: "1", transform: "matrix(1,0,0,1,4.043000221252441,-71.95700073242188)", children: _jsx("path", { fill: "currentColor", "fill-opacity": "1", d: " M75,0 C75,0 75,0 75,0 C75,41.39250183105469 41.39250183105469,75 0,75 C0,75 0,75 0,75 C-41.39250183105469,75 -75,41.39250183105469 -75,0 C-75,0 -75,0 -75,0 C-75,-41.39250183105469 -41.39250183105469,-75 0,-75 C0,-75 0,-75 0,-75 C41.39250183105469,-75 75,-41.39250183105469 75,0z" }) }) })] })] }));
|
|
179
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ThreeDotLoader(): import("react/jsx-runtime").JSX.Element;
|