svg-loaders-react 3.1.5 → 4.0.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.
@@ -0,0 +1,70 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<Puff /> matches the markup snapshot 1`] = `
4
+ <svg
5
+ class="svg-loaders-svg"
6
+ height="44"
7
+ stroke="#fff"
8
+ viewBox="0 0 44 44"
9
+ width="44"
10
+ >
11
+ <g
12
+ fill="none"
13
+ fill-rule="evenodd"
14
+ stroke-width="2"
15
+ >
16
+ <circle
17
+ cx="22"
18
+ cy="22"
19
+ r="1"
20
+ >
21
+ <animate
22
+ attributeName="r"
23
+ begin="0s"
24
+ calcMode="spline"
25
+ dur="1.8s"
26
+ keySplines="0.165, 0.84, 0.44, 1"
27
+ keyTimes="0; 1"
28
+ repeatCount="indefinite"
29
+ values="1; 20"
30
+ />
31
+ <animate
32
+ attributeName="stroke-opacity"
33
+ begin="0s"
34
+ calcMode="spline"
35
+ dur="1.8s"
36
+ keySplines="0.3, 0.61, 0.355, 1"
37
+ keyTimes="0; 1"
38
+ repeatCount="indefinite"
39
+ values="1; 0"
40
+ />
41
+ </circle>
42
+ <circle
43
+ cx="22"
44
+ cy="22"
45
+ r="1"
46
+ >
47
+ <animate
48
+ attributeName="r"
49
+ begin="-0.9s"
50
+ calcMode="spline"
51
+ dur="1.8s"
52
+ keySplines="0.165, 0.84, 0.44, 1"
53
+ keyTimes="0; 1"
54
+ repeatCount="indefinite"
55
+ values="1; 20"
56
+ />
57
+ <animate
58
+ attributeName="stroke-opacity"
59
+ begin="-0.9s"
60
+ calcMode="spline"
61
+ dur="1.8s"
62
+ keySplines="0.3, 0.61, 0.355, 1"
63
+ keyTimes="0; 1"
64
+ repeatCount="indefinite"
65
+ values="1; 0"
66
+ />
67
+ </circle>
68
+ </g>
69
+ </svg>
70
+ `;
@@ -0,0 +1,95 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<Rings /> matches the markup snapshot 1`] = `
4
+ <svg
5
+ class="svg-loaders-svg"
6
+ height="45"
7
+ stroke="#fff"
8
+ viewBox="0 0 45 45"
9
+ width="45"
10
+ >
11
+ <g
12
+ fill="none"
13
+ fill-rule="evenodd"
14
+ stroke-width="2"
15
+ transform="translate(1 1)"
16
+ >
17
+ <circle
18
+ cx="22"
19
+ cy="22"
20
+ r="6"
21
+ stroke-opacity="0"
22
+ >
23
+ <animate
24
+ attributeName="r"
25
+ begin="1.5s"
26
+ calcMode="linear"
27
+ dur="3s"
28
+ repeatCount="indefinite"
29
+ values="6;22"
30
+ />
31
+ <animate
32
+ attributeName="stroke-opacity"
33
+ begin="1.5s"
34
+ calcMode="linear"
35
+ dur="3s"
36
+ repeatCount="indefinite"
37
+ values="1;0"
38
+ />
39
+ <animate
40
+ attributeName="stroke-width"
41
+ begin="1.5s"
42
+ calcMode="linear"
43
+ dur="3s"
44
+ repeatCount="indefinite"
45
+ values="2;0"
46
+ />
47
+ </circle>
48
+ <circle
49
+ cx="22"
50
+ cy="22"
51
+ r="6"
52
+ stroke-opacity="0"
53
+ >
54
+ <animate
55
+ attributeName="r"
56
+ begin="3s"
57
+ calcMode="linear"
58
+ dur="3s"
59
+ repeatCount="indefinite"
60
+ values="6;22"
61
+ />
62
+ <animate
63
+ attributeName="stroke-opacity"
64
+ begin="3s"
65
+ calcMode="linear"
66
+ dur="3s"
67
+ repeatCount="indefinite"
68
+ values="1;0"
69
+ />
70
+ <animate
71
+ attributeName="stroke-width"
72
+ begin="3s"
73
+ calcMode="linear"
74
+ dur="3s"
75
+ repeatCount="indefinite"
76
+ values="2;0"
77
+ />
78
+ </circle>
79
+ <circle
80
+ cx="22"
81
+ cy="22"
82
+ r="8"
83
+ >
84
+ <animate
85
+ attributeName="r"
86
+ begin="0s"
87
+ calcMode="linear"
88
+ dur="1.5s"
89
+ repeatCount="indefinite"
90
+ values="6;1;2;3;4;5;6"
91
+ />
92
+ </circle>
93
+ </g>
94
+ </svg>
95
+ `;
@@ -0,0 +1,138 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<SpinningCircles /> matches the markup snapshot 1`] = `
4
+ <svg
5
+ class="svg-loaders-svg"
6
+ height="58"
7
+ viewBox="0 0 58 58"
8
+ width="58"
9
+ >
10
+ <g
11
+ fill="#fff"
12
+ fill-rule="evenodd"
13
+ stroke="#FFF"
14
+ stroke-width="1.5"
15
+ transform="translate(2 1)"
16
+ >
17
+ <circle
18
+ cx="42.601"
19
+ cy="11.462"
20
+ r="5"
21
+ >
22
+ <animate
23
+ attributeName="fill-opacity"
24
+ begin="0s"
25
+ calcMode="linear"
26
+ dur="1.3s"
27
+ repeatCount="indefinite"
28
+ values="1;0;0;0;0;0;0;0"
29
+ />
30
+ </circle>
31
+ <circle
32
+ cx="49.063"
33
+ cy="27.063"
34
+ fill-opacity="0"
35
+ r="5"
36
+ >
37
+ <animate
38
+ attributeName="fill-opacity"
39
+ begin="0s"
40
+ calcMode="linear"
41
+ dur="1.3s"
42
+ repeatCount="indefinite"
43
+ values="0;1;0;0;0;0;0;0"
44
+ />
45
+ </circle>
46
+ <circle
47
+ cx="42.601"
48
+ cy="42.663"
49
+ fill-opacity="0"
50
+ r="5"
51
+ >
52
+ <animate
53
+ attributeName="fill-opacity"
54
+ begin="0s"
55
+ calcMode="linear"
56
+ dur="1.3s"
57
+ repeatCount="indefinite"
58
+ values="0;0;1;0;0;0;0;0"
59
+ />
60
+ </circle>
61
+ <circle
62
+ cx="27"
63
+ cy="49.125"
64
+ fill-opacity="0"
65
+ r="5"
66
+ >
67
+ <animate
68
+ attributeName="fill-opacity"
69
+ begin="0s"
70
+ calcMode="linear"
71
+ dur="1.3s"
72
+ repeatCount="indefinite"
73
+ values="0;0;0;1;0;0;0;0"
74
+ />
75
+ </circle>
76
+ <circle
77
+ cx="11.399"
78
+ cy="42.663"
79
+ fill-opacity="0"
80
+ r="5"
81
+ >
82
+ <animate
83
+ attributeName="fill-opacity"
84
+ begin="0s"
85
+ calcMode="linear"
86
+ dur="1.3s"
87
+ repeatCount="indefinite"
88
+ values="0;0;0;0;1;0;0;0"
89
+ />
90
+ </circle>
91
+ <circle
92
+ cx="4.938"
93
+ cy="27.063"
94
+ fill-opacity="0"
95
+ r="5"
96
+ >
97
+ <animate
98
+ attributeName="fill-opacity"
99
+ begin="0s"
100
+ calcMode="linear"
101
+ dur="1.3s"
102
+ repeatCount="indefinite"
103
+ values="0;0;0;0;0;1;0;0"
104
+ />
105
+ </circle>
106
+ <circle
107
+ cx="11.399"
108
+ cy="11.462"
109
+ fill-opacity="0"
110
+ r="5"
111
+ >
112
+ <animate
113
+ attributeName="fill-opacity"
114
+ begin="0s"
115
+ calcMode="linear"
116
+ dur="1.3s"
117
+ repeatCount="indefinite"
118
+ values="0;0;0;0;0;0;1;0"
119
+ />
120
+ </circle>
121
+ <circle
122
+ cx="27"
123
+ cy="5"
124
+ fill-opacity="0"
125
+ r="5"
126
+ >
127
+ <animate
128
+ attributeName="fill-opacity"
129
+ begin="0s"
130
+ calcMode="linear"
131
+ dur="1.3s"
132
+ repeatCount="indefinite"
133
+ values="0;0;0;0;0;0;0;1"
134
+ />
135
+ </circle>
136
+ </g>
137
+ </svg>
138
+ `;
@@ -0,0 +1,70 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<TailSpin /> matches the markup snapshot 1`] = `
4
+ <svg
5
+ class="svg-loaders-svg"
6
+ height="38"
7
+ viewBox="0 0 38 38"
8
+ width="38"
9
+ >
10
+ <defs>
11
+ <lineargradient
12
+ id="prefix__a"
13
+ x1="8.042%"
14
+ x2="65.682%"
15
+ y1="0%"
16
+ y2="23.865%"
17
+ >
18
+ <stop
19
+ offset="0%"
20
+ stop-color="#fff"
21
+ stop-opacity="0"
22
+ />
23
+ <stop
24
+ offset="63.146%"
25
+ stop-color="#fff"
26
+ stop-opacity="0.631"
27
+ />
28
+ <stop
29
+ offset="100%"
30
+ stop-color="#fff"
31
+ />
32
+ </lineargradient>
33
+ </defs>
34
+ <g
35
+ fill="none"
36
+ fill-rule="evenodd"
37
+ transform="translate(1 1)"
38
+ >
39
+ <path
40
+ d="M36 18c0-9.94-8.06-18-18-18"
41
+ stroke="url(#prefix__a)"
42
+ stroke-width="2"
43
+ >
44
+ <animatetransform
45
+ attributeName="transform"
46
+ dur="0.9s"
47
+ from="0 18 18"
48
+ repeatCount="indefinite"
49
+ to="360 18 18"
50
+ type="rotate"
51
+ />
52
+ </path>
53
+ <circle
54
+ cx="36"
55
+ cy="18"
56
+ fill="#fff"
57
+ r="1"
58
+ >
59
+ <animatetransform
60
+ attributeName="transform"
61
+ dur="0.9s"
62
+ from="0 18 18"
63
+ repeatCount="indefinite"
64
+ to="360 18 18"
65
+ type="rotate"
66
+ />
67
+ </circle>
68
+ </g>
69
+ </svg>
70
+ `;
@@ -0,0 +1,91 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`<ThreeDots /> matches the markup snapshot 1`] = `
4
+ <svg
5
+ class="svg-loaders-svg"
6
+ fill="#fff"
7
+ height="30"
8
+ viewBox="0 0 120 30"
9
+ width="120"
10
+ >
11
+ <circle
12
+ cx="15"
13
+ cy="15"
14
+ r="15"
15
+ >
16
+ <animate
17
+ attributeName="r"
18
+ begin="0s"
19
+ calcMode="linear"
20
+ dur="0.8s"
21
+ from="15"
22
+ repeatCount="indefinite"
23
+ to="15"
24
+ values="15;9;15"
25
+ />
26
+ <animate
27
+ attributeName="fill-opacity"
28
+ begin="0s"
29
+ calcMode="linear"
30
+ dur="0.8s"
31
+ from="1"
32
+ repeatCount="indefinite"
33
+ to="1"
34
+ values="1;.5;1"
35
+ />
36
+ </circle>
37
+ <circle
38
+ cx="60"
39
+ cy="15"
40
+ fill-opacity="0.3"
41
+ r="9"
42
+ >
43
+ <animate
44
+ attributeName="r"
45
+ begin="0s"
46
+ calcMode="linear"
47
+ dur="0.8s"
48
+ from="9"
49
+ repeatCount="indefinite"
50
+ to="9"
51
+ values="9;15;9"
52
+ />
53
+ <animate
54
+ attributeName="fill-opacity"
55
+ begin="0s"
56
+ calcMode="linear"
57
+ dur="0.8s"
58
+ from="0.5"
59
+ repeatCount="indefinite"
60
+ to="0.5"
61
+ values=".5;1;.5"
62
+ />
63
+ </circle>
64
+ <circle
65
+ cx="105"
66
+ cy="15"
67
+ r="15"
68
+ >
69
+ <animate
70
+ attributeName="r"
71
+ begin="0s"
72
+ calcMode="linear"
73
+ dur="0.8s"
74
+ from="15"
75
+ repeatCount="indefinite"
76
+ to="15"
77
+ values="15;9;15"
78
+ />
79
+ <animate
80
+ attributeName="fill-opacity"
81
+ begin="0s"
82
+ calcMode="linear"
83
+ dur="0.8s"
84
+ from="1"
85
+ repeatCount="indefinite"
86
+ to="1"
87
+ values="1;.5;1"
88
+ />
89
+ </circle>
90
+ </svg>
91
+ `;
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { Audio } from '../src/svg-loader-components/audio';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <Audio />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<Audio />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const AudioComponent = mount(<Audio />).find('svg');
12
- expect(AudioComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('Audio', Audio, {
5
+ width: '55',
6
+ height: '80',
7
+ fill: '#FFF',
8
+ viewBox: '0 0 55 80',
14
9
  });
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { BallTriangle } from '../src/svg-loader-components/ball-triangle';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <BallTriangle />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<BallTriangle />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const BallTriangleComponent = mount(<BallTriangle />).find('svg');
12
- expect(BallTriangleComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('BallTriangle', BallTriangle, {
5
+ width: '57',
6
+ height: '57',
7
+ stroke: '#fff',
8
+ viewBox: '0 0 57 57',
14
9
  });
package/test/bars.test.js CHANGED
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { Bars } from '../src/svg-loader-components/bars';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <Bars />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<Bars />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const BarsComponent = mount(<Bars />).find('svg');
12
- expect(BarsComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('Bars', Bars, {
5
+ width: '135',
6
+ height: '140',
7
+ fill: '#fff',
8
+ viewBox: '0 0 135 140',
14
9
  });
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { Circles } from '../src/svg-loader-components/circles';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <Circles />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<Circles />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const CirclesComponent = mount(<Circles />).find('svg');
12
- expect(CirclesComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('Circles', Circles, {
5
+ width: '135',
6
+ height: '135',
7
+ fill: '#fff',
8
+ viewBox: '0 0 135 135',
14
9
  });
package/test/grid.test.js CHANGED
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { Grid } from '../src/svg-loader-components/grid';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <Grid />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<Grid />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const GridComponent = mount(<Grid />).find('svg');
12
- expect(GridComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('Grid', Grid, {
5
+ width: '105',
6
+ height: '105',
7
+ fill: '#fff',
8
+ viewBox: '0 0 105 105',
14
9
  });
@@ -1,14 +1,9 @@
1
- import React from 'react';
2
- import { shallow, mount } from 'enzyme';
3
-
4
1
  import { Hearts } from '../src/svg-loader-components/hearts';
2
+ import describeLoader from './helpers/loader-behavior';
5
3
 
6
- describe('Test <Hearts />', () => {
7
- it('renders without crashing', () => {
8
- shallow(<Hearts />);
9
- });
10
- it('viewBox property is defined', () => {
11
- const HeartsComponent = mount(<Hearts />).find('svg');
12
- expect(HeartsComponent.prop('viewBox')).toBeDefined();
13
- });
4
+ describeLoader('Hearts', Hearts, {
5
+ width: '140',
6
+ height: '64',
7
+ fill: '#fff',
8
+ viewBox: '0 0 140 64',
14
9
  });