@zendeskgarden/react-loaders 9.0.0-next.8 → 9.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.
- package/dist/esm/elements/Progress.js +1 -1
- package/dist/esm/elements/Skeleton.js +3 -3
- package/dist/esm/styled/StyledDots.js +0 -13
- package/dist/esm/styled/StyledInline.js +24 -11
- package/dist/esm/styled/StyledLoadingPlaceholder.js +2 -5
- package/dist/esm/styled/StyledProgress.js +39 -11
- package/dist/esm/styled/StyledSVG.js +18 -7
- package/dist/esm/styled/StyledSkeleton.js +28 -19
- package/dist/esm/styled/StyledSpinnerCircle.js +0 -4
- package/dist/index.cjs.js +111 -68
- package/dist/typings/styled/StyledInline.d.ts +7 -6
- package/dist/typings/styled/StyledSVG.d.ts +2 -1
- package/dist/typings/styled/StyledSkeleton.d.ts +3 -5
- package/dist/typings/types/index.d.ts +22 -6
- package/package.json +7 -8
- package/LICENSE.md +0 -176
|
@@ -31,7 +31,7 @@ const Progress = React.forwardRef((_ref, ref) => {
|
|
|
31
31
|
return (
|
|
32
32
|
React.createElement(StyledProgressBackground, Object.assign({
|
|
33
33
|
"data-garden-id": COMPONENT_ID,
|
|
34
|
-
"data-garden-version": '9.0.0
|
|
34
|
+
"data-garden-version": '9.0.0',
|
|
35
35
|
"aria-valuemax": 100,
|
|
36
36
|
"aria-valuemin": 0,
|
|
37
37
|
"aria-valuenow": percentage,
|
|
@@ -23,9 +23,9 @@ const Skeleton = forwardRef((_ref, ref) => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
return React.createElement(StyledSkeleton, Object.assign({
|
|
25
25
|
ref: ref,
|
|
26
|
-
isLight: isLight,
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
$isLight: isLight,
|
|
27
|
+
$width: width,
|
|
28
|
+
$height: height
|
|
29
29
|
}, other), "\xA0");
|
|
30
30
|
});
|
|
31
31
|
Skeleton.displayName = 'Skeleton';
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
import { dotOneKeyframes, dotTwoKeyframes, dotThreeKeyframes } from '../utils/animations.js';
|
|
9
|
-
import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
10
9
|
|
|
11
10
|
const StyledDotsCircle = styled.circle.attrs({
|
|
12
11
|
cy: 36,
|
|
@@ -15,9 +14,6 @@ const StyledDotsCircle = styled.circle.attrs({
|
|
|
15
14
|
displayName: "StyledDots__StyledDotsCircle",
|
|
16
15
|
componentId: "sc-1ltah7e-0"
|
|
17
16
|
})([""]);
|
|
18
|
-
StyledDotsCircle.defaultProps = {
|
|
19
|
-
theme: DEFAULT_THEME
|
|
20
|
-
};
|
|
21
17
|
const animationStyles = (animationName, props) => {
|
|
22
18
|
return css(["animation:", " ", "ms linear infinite;"], animationName, props.duration);
|
|
23
19
|
};
|
|
@@ -27,26 +23,17 @@ const StyledDotsCircleOne = styled(StyledDotsCircle).attrs({
|
|
|
27
23
|
displayName: "StyledDots__StyledDotsCircleOne",
|
|
28
24
|
componentId: "sc-1ltah7e-1"
|
|
29
25
|
})(["", ";"], props => animationStyles(dotOneKeyframes, props));
|
|
30
|
-
StyledDotsCircleOne.defaultProps = {
|
|
31
|
-
theme: DEFAULT_THEME
|
|
32
|
-
};
|
|
33
26
|
const StyledDotsCircleTwo = styled(StyledDotsCircle).attrs(() => ({
|
|
34
27
|
cx: 40
|
|
35
28
|
})).withConfig({
|
|
36
29
|
displayName: "StyledDots__StyledDotsCircleTwo",
|
|
37
30
|
componentId: "sc-1ltah7e-2"
|
|
38
31
|
})(["", ";"], props => animationStyles(dotTwoKeyframes, props));
|
|
39
|
-
StyledDotsCircleTwo.defaultProps = {
|
|
40
|
-
theme: DEFAULT_THEME
|
|
41
|
-
};
|
|
42
32
|
const StyledDotsCircleThree = styled(StyledDotsCircle).attrs(() => ({
|
|
43
33
|
cx: 71
|
|
44
34
|
})).withConfig({
|
|
45
35
|
displayName: "StyledDots__StyledDotsCircleThree",
|
|
46
36
|
componentId: "sc-1ltah7e-3"
|
|
47
37
|
})(["", ";"], props => animationStyles(dotThreeKeyframes, props));
|
|
48
|
-
StyledDotsCircleThree.defaultProps = {
|
|
49
|
-
theme: DEFAULT_THEME
|
|
50
|
-
};
|
|
51
38
|
|
|
52
39
|
export { StyledDotsCircleOne, StyledDotsCircleThree, StyledDotsCircleTwo };
|
|
@@ -4,11 +4,30 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import styled, { keyframes } from 'styled-components';
|
|
8
|
-
import {
|
|
7
|
+
import styled, { css, keyframes } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const COMPONENT_ID = 'loaders.inline';
|
|
11
|
-
const
|
|
11
|
+
const colorStyles = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
theme,
|
|
14
|
+
color
|
|
15
|
+
} = _ref;
|
|
16
|
+
const options = color.includes('.') ? {
|
|
17
|
+
variable: color,
|
|
18
|
+
theme
|
|
19
|
+
} : {
|
|
20
|
+
hue: color,
|
|
21
|
+
theme
|
|
22
|
+
};
|
|
23
|
+
return css(["color:", ";"], getColor(options));
|
|
24
|
+
};
|
|
25
|
+
const retrieveAnimation = _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return keyframes(["0%,100%{opacity:", ";}50%{opacity:", ";}"], theme.opacity[200], theme.opacity[600]);
|
|
30
|
+
};
|
|
12
31
|
const StyledCircle = styled.circle.attrs({
|
|
13
32
|
fill: 'currentColor',
|
|
14
33
|
cy: 2,
|
|
@@ -17,21 +36,15 @@ const StyledCircle = styled.circle.attrs({
|
|
|
17
36
|
displayName: "StyledInline__StyledCircle",
|
|
18
37
|
componentId: "sc-fxsb9l-0"
|
|
19
38
|
})([""]);
|
|
20
|
-
StyledCircle.defaultProps = {
|
|
21
|
-
theme: DEFAULT_THEME
|
|
22
|
-
};
|
|
23
39
|
const StyledInline = styled.svg.attrs(props => ({
|
|
24
40
|
'data-garden-id': COMPONENT_ID,
|
|
25
|
-
'data-garden-version': '9.0.0
|
|
41
|
+
'data-garden-version': '9.0.0',
|
|
26
42
|
viewBox: '0 0 16 4',
|
|
27
43
|
width: props.size,
|
|
28
44
|
height: props.size * 0.25
|
|
29
45
|
})).withConfig({
|
|
30
46
|
displayName: "StyledInline",
|
|
31
47
|
componentId: "sc-fxsb9l-1"
|
|
32
|
-
})(["
|
|
33
|
-
StyledInline.defaultProps = {
|
|
34
|
-
theme: DEFAULT_THEME
|
|
35
|
-
};
|
|
48
|
+
})(["", ";", "{opacity:0.2;&:nth-child(1){animation:", " 1s infinite;animation-delay:", ";}&:nth-child(2){animation:", " 1s infinite;animation-delay:0.2s;}&:nth-child(3){animation:", " 1s infinite;animation-delay:", ";}}", ""], colorStyles, StyledCircle, retrieveAnimation, props => props.theme.rtl ? 'unset' : '0.4s', retrieveAnimation, retrieveAnimation, props => props.theme.rtl ? '0.4s' : 'unset', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
36
49
|
|
|
37
50
|
export { StyledCircle, StyledInline };
|
|
@@ -5,19 +5,16 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles
|
|
8
|
+
import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const COMPONENT_ID = 'loaders.loading_placeholder';
|
|
11
11
|
const StyledLoadingPlaceholder = styled.div.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.0.0
|
|
13
|
+
'data-garden-version': '9.0.0',
|
|
14
14
|
role: 'progressbar'
|
|
15
15
|
}).withConfig({
|
|
16
16
|
displayName: "StyledLoadingPlaceholder",
|
|
17
17
|
componentId: "sc-x3bwsx-0"
|
|
18
18
|
})(["display:inline-block;width:", ";height:", ";font-size:", ";", ""], props => props.width || '1em', props => props.height || '0.9em', props => props.fontSize, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
19
|
-
StyledLoadingPlaceholder.defaultProps = {
|
|
20
|
-
theme: DEFAULT_THEME
|
|
21
|
-
};
|
|
22
19
|
|
|
23
20
|
export { StyledLoadingPlaceholder };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import styled from 'styled-components';
|
|
8
|
-
import {
|
|
7
|
+
import styled, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
10
|
const sizeToHeight = (size, theme) => {
|
|
11
11
|
switch (size) {
|
|
@@ -19,29 +19,57 @@ const sizeToHeight = (size, theme) => {
|
|
|
19
19
|
};
|
|
20
20
|
const sizeToBorderRadius = (size, theme) => sizeToHeight(size, theme) / 2;
|
|
21
21
|
const PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
|
|
22
|
+
const colorStyles = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
theme,
|
|
25
|
+
color
|
|
26
|
+
} = _ref;
|
|
27
|
+
const backgroundColor = getColor({
|
|
28
|
+
theme,
|
|
29
|
+
hue: 'neutralHue',
|
|
30
|
+
transparency: theme.opacity[200],
|
|
31
|
+
light: {
|
|
32
|
+
shade: 700
|
|
33
|
+
},
|
|
34
|
+
dark: {
|
|
35
|
+
shade: 500
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
let options;
|
|
39
|
+
if (color) {
|
|
40
|
+
options = color.includes('.') ? {
|
|
41
|
+
variable: color,
|
|
42
|
+
theme
|
|
43
|
+
} : {
|
|
44
|
+
hue: color,
|
|
45
|
+
theme
|
|
46
|
+
};
|
|
47
|
+
} else {
|
|
48
|
+
options = {
|
|
49
|
+
variable: 'border.successEmphasis',
|
|
50
|
+
theme
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const foregroundColor = getColor(options);
|
|
54
|
+
return css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
55
|
+
};
|
|
22
56
|
const StyledProgressBackground = styled.div.attrs(props => ({
|
|
23
57
|
'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
|
|
24
|
-
'data-garden-version': '9.0.0
|
|
58
|
+
'data-garden-version': '9.0.0',
|
|
25
59
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
26
60
|
})).withConfig({
|
|
27
61
|
displayName: "StyledProgress__StyledProgressBackground",
|
|
28
62
|
componentId: "sc-2g8w4s-0"
|
|
29
|
-
})(["margin:", "px 0;border-radius:", "px;
|
|
30
|
-
StyledProgressBackground.defaultProps = {
|
|
31
|
-
theme: DEFAULT_THEME
|
|
32
|
-
};
|
|
63
|
+
})(["margin:", "px 0;border-radius:", "px;", ";", ""], props => props.theme.space.base * 2, props => props.borderRadius, colorStyles, props => retrieveComponentStyles(PROGRESS_BACKGROUND_COMPONENT_ID, props));
|
|
33
64
|
const PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
|
|
34
65
|
const StyledProgressIndicator = styled.div.attrs(props => ({
|
|
35
66
|
'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
|
|
36
|
-
'data-garden-version': '9.0.0
|
|
67
|
+
'data-garden-version': '9.0.0',
|
|
37
68
|
height: props.height || sizeToHeight(props.size, props.theme),
|
|
38
69
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
39
70
|
})).withConfig({
|
|
40
71
|
displayName: "StyledProgress__StyledProgressIndicator",
|
|
41
72
|
componentId: "sc-2g8w4s-1"
|
|
42
73
|
})(["transition:width 0.1s ease-in-out;border-radius:", "px;background:currentcolor;width:", "%;height:", "px;", ""], props => props.borderRadius, props => props.value, props => props.height, props => retrieveComponentStyles(PROGESS_INDICATOR_COMPONENT_ID, props));
|
|
43
|
-
StyledProgressIndicator.defaultProps = {
|
|
44
|
-
theme: DEFAULT_THEME
|
|
45
|
-
};
|
|
46
74
|
|
|
47
75
|
export { StyledProgressBackground, StyledProgressIndicator };
|
|
@@ -4,11 +4,25 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import styled from 'styled-components';
|
|
8
|
-
import { retrieveComponentStyles,
|
|
7
|
+
import styled, { css } from 'styled-components';
|
|
8
|
+
import { retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
9
9
|
|
|
10
|
+
const colorStyles = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
theme,
|
|
13
|
+
color = 'inherit'
|
|
14
|
+
} = _ref;
|
|
15
|
+
const options = color.includes('.') ? {
|
|
16
|
+
variable: color,
|
|
17
|
+
theme
|
|
18
|
+
} : {
|
|
19
|
+
hue: color,
|
|
20
|
+
theme
|
|
21
|
+
};
|
|
22
|
+
return css(["color:", ";"], getColor(options));
|
|
23
|
+
};
|
|
10
24
|
const StyledSVG = styled.svg.attrs(props => ({
|
|
11
|
-
'data-garden-version': '9.0.0
|
|
25
|
+
'data-garden-version': '9.0.0',
|
|
12
26
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
13
27
|
width: props.width,
|
|
14
28
|
height: props.height,
|
|
@@ -18,9 +32,6 @@ const StyledSVG = styled.svg.attrs(props => ({
|
|
|
18
32
|
})).withConfig({
|
|
19
33
|
displayName: "StyledSVG",
|
|
20
34
|
componentId: "sc-1xtc3kx-0"
|
|
21
|
-
})(["width:", ";height:", ";
|
|
22
|
-
StyledSVG.defaultProps = {
|
|
23
|
-
theme: DEFAULT_THEME
|
|
24
|
-
};
|
|
35
|
+
})(["width:", ";height:", ";font-size:", ";", ";", ";"], props => props.containerWidth || '1em', props => props.containerHeight || '0.9em', props => props.fontSize || 'inherit', colorStyles, props => retrieveComponentStyles(props.dataGardenId, props));
|
|
25
36
|
|
|
26
37
|
export { StyledSVG };
|
|
@@ -5,24 +5,40 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled, { keyframes, css } from 'styled-components';
|
|
8
|
-
import {
|
|
9
|
-
import { getLineHeight, retrieveComponentStyles, DEFAULT_THEME, getColorV8 } from '@zendeskgarden/react-theming';
|
|
8
|
+
import { getLineHeight, retrieveComponentStyles, getColor } from '@zendeskgarden/react-theming';
|
|
10
9
|
|
|
11
10
|
const COMPONENT_ID = 'loaders.skeleton';
|
|
12
11
|
const fadeInAnimation = keyframes(["0%,60%{opacity:0;}100%{opacity:1;}"]);
|
|
13
12
|
const skeletonAnimation = keyframes(["0%{transform:translateX(-100%);}100%{transform:translateX(100%);}"]);
|
|
14
13
|
const skeletonRtlAnimation = keyframes(["0%{transform:translateX(100%);}100%{transform:translateX(-100%)}"]);
|
|
15
|
-
const
|
|
14
|
+
const getBackgroundColor = _ref => {
|
|
16
15
|
let {
|
|
17
16
|
theme,
|
|
18
|
-
isLight
|
|
17
|
+
$isLight
|
|
19
18
|
} = _ref;
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
let backgroundColor;
|
|
20
|
+
if ($isLight) {
|
|
21
|
+
backgroundColor = getColor({
|
|
22
|
+
theme,
|
|
23
|
+
hue: 'white',
|
|
24
|
+
transparency: theme.opacity[200]
|
|
25
|
+
});
|
|
26
|
+
} else {
|
|
27
|
+
backgroundColor = getColor({
|
|
28
|
+
theme,
|
|
29
|
+
hue: 'neutralHue',
|
|
30
|
+
transparency: theme.opacity[200],
|
|
31
|
+
light: {
|
|
32
|
+
shade: 700
|
|
33
|
+
},
|
|
34
|
+
dark: {
|
|
35
|
+
shade: 500
|
|
36
|
+
}
|
|
37
|
+
});
|
|
22
38
|
}
|
|
23
|
-
return
|
|
39
|
+
return backgroundColor;
|
|
24
40
|
};
|
|
25
|
-
const
|
|
41
|
+
const animationStyles = _ref2 => {
|
|
26
42
|
let {
|
|
27
43
|
theme
|
|
28
44
|
} = _ref2;
|
|
@@ -31,22 +47,15 @@ const retrieveSkeletonAnimation = _ref2 => {
|
|
|
31
47
|
}
|
|
32
48
|
return css(["animation:", " 1.5s ease-in-out 300ms infinite;"], skeletonAnimation);
|
|
33
49
|
};
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
theme,
|
|
37
|
-
isLight
|
|
38
|
-
} = _ref3;
|
|
39
|
-
return css(["background-image:linear-gradient( ", ",transparent,", ",transparent );"], theme.rtl ? '-45deg' : '45deg', isLight ? getColorV8('chromeHue', 700, theme, 0.4) : rgba(getColorV8('background', 600 , theme), 0.6));
|
|
50
|
+
const gradientStyles = props => {
|
|
51
|
+
return css(["background-image:linear-gradient( ", ",transparent,", ",transparent );"], props.theme.rtl ? '-45deg' : '45deg', getBackgroundColor);
|
|
40
52
|
};
|
|
41
53
|
const StyledSkeleton = styled.div.attrs({
|
|
42
54
|
'data-garden-id': COMPONENT_ID,
|
|
43
|
-
'data-garden-version': '9.0.0
|
|
55
|
+
'data-garden-version': '9.0.0'
|
|
44
56
|
}).withConfig({
|
|
45
57
|
displayName: "StyledSkeleton",
|
|
46
58
|
componentId: "sc-1raozze-0"
|
|
47
|
-
})(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";width:", ";height:", ";overflow:hidden;line-height:", "
|
|
48
|
-
StyledSkeleton.defaultProps = {
|
|
49
|
-
theme: DEFAULT_THEME
|
|
50
|
-
};
|
|
59
|
+
})(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";background-color:", ";width:", ";height:", ";overflow:hidden;line-height:", ";&::before{position:absolute;top:0;width:1000px;height:100%;content:'';", " ", "}", ";"], fadeInAnimation, props => props.theme.borderRadii.md, getBackgroundColor, props => props.$width, props => props.$height, props => getLineHeight(props.theme.fontSizes.sm, props.theme.space.base * 5), animationStyles, gradientStyles, props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
51
60
|
|
|
52
61
|
export { StyledSkeleton };
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
7
|
import styled from 'styled-components';
|
|
8
|
-
import { DEFAULT_THEME } from '@zendeskgarden/react-theming';
|
|
9
8
|
|
|
10
9
|
const StyledSpinnerCircle = styled.circle.attrs(props => ({
|
|
11
10
|
cx: 40,
|
|
@@ -21,8 +20,5 @@ const StyledSpinnerCircle = styled.circle.attrs(props => ({
|
|
|
21
20
|
displayName: "StyledSpinnerCircle",
|
|
22
21
|
componentId: "sc-o4kd70-0"
|
|
23
22
|
})([""]);
|
|
24
|
-
StyledSpinnerCircle.defaultProps = {
|
|
25
|
-
theme: DEFAULT_THEME
|
|
26
|
-
};
|
|
27
23
|
|
|
28
24
|
export { StyledSpinnerCircle };
|
package/dist/index.cjs.js
CHANGED
|
@@ -11,7 +11,6 @@ var PropTypes = require('prop-types');
|
|
|
11
11
|
var styled = require('styled-components');
|
|
12
12
|
var containerSchedule = require('@zendeskgarden/container-schedule');
|
|
13
13
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
14
|
-
var polished = require('polished');
|
|
15
14
|
|
|
16
15
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
16
|
|
|
@@ -30,10 +29,7 @@ const StyledDotsCircle = styled__default.default.circle.attrs({
|
|
|
30
29
|
displayName: "StyledDots__StyledDotsCircle",
|
|
31
30
|
componentId: "sc-1ltah7e-0"
|
|
32
31
|
})([""]);
|
|
33
|
-
|
|
34
|
-
theme: reactTheming.DEFAULT_THEME
|
|
35
|
-
};
|
|
36
|
-
const animationStyles = (animationName, props) => {
|
|
32
|
+
const animationStyles$1 = (animationName, props) => {
|
|
37
33
|
return styled.css(["animation:", " ", "ms linear infinite;"], animationName, props.duration);
|
|
38
34
|
};
|
|
39
35
|
const StyledDotsCircleOne = styled__default.default(StyledDotsCircle).attrs({
|
|
@@ -41,41 +37,29 @@ const StyledDotsCircleOne = styled__default.default(StyledDotsCircle).attrs({
|
|
|
41
37
|
}).withConfig({
|
|
42
38
|
displayName: "StyledDots__StyledDotsCircleOne",
|
|
43
39
|
componentId: "sc-1ltah7e-1"
|
|
44
|
-
})(["", ";"], props => animationStyles(dotOneKeyframes, props));
|
|
45
|
-
StyledDotsCircleOne.defaultProps = {
|
|
46
|
-
theme: reactTheming.DEFAULT_THEME
|
|
47
|
-
};
|
|
40
|
+
})(["", ";"], props => animationStyles$1(dotOneKeyframes, props));
|
|
48
41
|
const StyledDotsCircleTwo = styled__default.default(StyledDotsCircle).attrs(() => ({
|
|
49
42
|
cx: 40
|
|
50
43
|
})).withConfig({
|
|
51
44
|
displayName: "StyledDots__StyledDotsCircleTwo",
|
|
52
45
|
componentId: "sc-1ltah7e-2"
|
|
53
|
-
})(["", ";"], props => animationStyles(dotTwoKeyframes, props));
|
|
54
|
-
StyledDotsCircleTwo.defaultProps = {
|
|
55
|
-
theme: reactTheming.DEFAULT_THEME
|
|
56
|
-
};
|
|
46
|
+
})(["", ";"], props => animationStyles$1(dotTwoKeyframes, props));
|
|
57
47
|
const StyledDotsCircleThree = styled__default.default(StyledDotsCircle).attrs(() => ({
|
|
58
48
|
cx: 71
|
|
59
49
|
})).withConfig({
|
|
60
50
|
displayName: "StyledDots__StyledDotsCircleThree",
|
|
61
51
|
componentId: "sc-1ltah7e-3"
|
|
62
|
-
})(["", ";"], props => animationStyles(dotThreeKeyframes, props));
|
|
63
|
-
StyledDotsCircleThree.defaultProps = {
|
|
64
|
-
theme: reactTheming.DEFAULT_THEME
|
|
65
|
-
};
|
|
52
|
+
})(["", ";"], props => animationStyles$1(dotThreeKeyframes, props));
|
|
66
53
|
|
|
67
54
|
const COMPONENT_ID$5 = 'loaders.loading_placeholder';
|
|
68
55
|
const StyledLoadingPlaceholder = styled__default.default.div.attrs({
|
|
69
56
|
'data-garden-id': COMPONENT_ID$5,
|
|
70
|
-
'data-garden-version': '9.0.0
|
|
57
|
+
'data-garden-version': '9.0.0',
|
|
71
58
|
role: 'progressbar'
|
|
72
59
|
}).withConfig({
|
|
73
60
|
displayName: "StyledLoadingPlaceholder",
|
|
74
61
|
componentId: "sc-x3bwsx-0"
|
|
75
62
|
})(["display:inline-block;width:", ";height:", ";font-size:", ";", ""], props => props.width || '1em', props => props.height || '0.9em', props => props.fontSize, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
76
|
-
StyledLoadingPlaceholder.defaultProps = {
|
|
77
|
-
theme: reactTheming.DEFAULT_THEME
|
|
78
|
-
};
|
|
79
63
|
|
|
80
64
|
const sizeToHeight = (size, theme) => {
|
|
81
65
|
switch (size) {
|
|
@@ -89,46 +73,91 @@ const sizeToHeight = (size, theme) => {
|
|
|
89
73
|
};
|
|
90
74
|
const sizeToBorderRadius = (size, theme) => sizeToHeight(size, theme) / 2;
|
|
91
75
|
const PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
|
|
76
|
+
const colorStyles$2 = _ref => {
|
|
77
|
+
let {
|
|
78
|
+
theme,
|
|
79
|
+
color
|
|
80
|
+
} = _ref;
|
|
81
|
+
const backgroundColor = reactTheming.getColor({
|
|
82
|
+
theme,
|
|
83
|
+
hue: 'neutralHue',
|
|
84
|
+
transparency: theme.opacity[200],
|
|
85
|
+
light: {
|
|
86
|
+
shade: 700
|
|
87
|
+
},
|
|
88
|
+
dark: {
|
|
89
|
+
shade: 500
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
let options;
|
|
93
|
+
if (color) {
|
|
94
|
+
options = color.includes('.') ? {
|
|
95
|
+
variable: color,
|
|
96
|
+
theme
|
|
97
|
+
} : {
|
|
98
|
+
hue: color,
|
|
99
|
+
theme
|
|
100
|
+
};
|
|
101
|
+
} else {
|
|
102
|
+
options = {
|
|
103
|
+
variable: 'border.successEmphasis',
|
|
104
|
+
theme
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
const foregroundColor = reactTheming.getColor(options);
|
|
108
|
+
return styled.css(["background-color:", ";color:", ";"], backgroundColor, foregroundColor);
|
|
109
|
+
};
|
|
92
110
|
const StyledProgressBackground = styled__default.default.div.attrs(props => ({
|
|
93
111
|
'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
|
|
94
|
-
'data-garden-version': '9.0.0
|
|
112
|
+
'data-garden-version': '9.0.0',
|
|
95
113
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
96
114
|
})).withConfig({
|
|
97
115
|
displayName: "StyledProgress__StyledProgressBackground",
|
|
98
116
|
componentId: "sc-2g8w4s-0"
|
|
99
|
-
})(["margin:", "px 0;border-radius:", "px;
|
|
100
|
-
StyledProgressBackground.defaultProps = {
|
|
101
|
-
theme: reactTheming.DEFAULT_THEME
|
|
102
|
-
};
|
|
117
|
+
})(["margin:", "px 0;border-radius:", "px;", ";", ""], props => props.theme.space.base * 2, props => props.borderRadius, colorStyles$2, props => reactTheming.retrieveComponentStyles(PROGRESS_BACKGROUND_COMPONENT_ID, props));
|
|
103
118
|
const PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
|
|
104
119
|
const StyledProgressIndicator = styled__default.default.div.attrs(props => ({
|
|
105
120
|
'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
|
|
106
|
-
'data-garden-version': '9.0.0
|
|
121
|
+
'data-garden-version': '9.0.0',
|
|
107
122
|
height: props.height || sizeToHeight(props.size, props.theme),
|
|
108
123
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
109
124
|
})).withConfig({
|
|
110
125
|
displayName: "StyledProgress__StyledProgressIndicator",
|
|
111
126
|
componentId: "sc-2g8w4s-1"
|
|
112
127
|
})(["transition:width 0.1s ease-in-out;border-radius:", "px;background:currentcolor;width:", "%;height:", "px;", ""], props => props.borderRadius, props => props.value, props => props.height, props => reactTheming.retrieveComponentStyles(PROGESS_INDICATOR_COMPONENT_ID, props));
|
|
113
|
-
StyledProgressIndicator.defaultProps = {
|
|
114
|
-
theme: reactTheming.DEFAULT_THEME
|
|
115
|
-
};
|
|
116
128
|
|
|
117
129
|
const COMPONENT_ID$4 = 'loaders.skeleton';
|
|
118
130
|
const fadeInAnimation = styled.keyframes(["0%,60%{opacity:0;}100%{opacity:1;}"]);
|
|
119
131
|
const skeletonAnimation = styled.keyframes(["0%{transform:translateX(-100%);}100%{transform:translateX(100%);}"]);
|
|
120
132
|
const skeletonRtlAnimation = styled.keyframes(["0%{transform:translateX(100%);}100%{transform:translateX(-100%)}"]);
|
|
121
|
-
const
|
|
133
|
+
const getBackgroundColor = _ref => {
|
|
122
134
|
let {
|
|
123
135
|
theme,
|
|
124
|
-
isLight
|
|
136
|
+
$isLight
|
|
125
137
|
} = _ref;
|
|
126
|
-
|
|
127
|
-
|
|
138
|
+
let backgroundColor;
|
|
139
|
+
if ($isLight) {
|
|
140
|
+
backgroundColor = reactTheming.getColor({
|
|
141
|
+
theme,
|
|
142
|
+
hue: 'white',
|
|
143
|
+
transparency: theme.opacity[200]
|
|
144
|
+
});
|
|
145
|
+
} else {
|
|
146
|
+
backgroundColor = reactTheming.getColor({
|
|
147
|
+
theme,
|
|
148
|
+
hue: 'neutralHue',
|
|
149
|
+
transparency: theme.opacity[200],
|
|
150
|
+
light: {
|
|
151
|
+
shade: 700
|
|
152
|
+
},
|
|
153
|
+
dark: {
|
|
154
|
+
shade: 500
|
|
155
|
+
}
|
|
156
|
+
});
|
|
128
157
|
}
|
|
129
|
-
return
|
|
158
|
+
return backgroundColor;
|
|
130
159
|
};
|
|
131
|
-
const
|
|
160
|
+
const animationStyles = _ref2 => {
|
|
132
161
|
let {
|
|
133
162
|
theme
|
|
134
163
|
} = _ref2;
|
|
@@ -137,23 +166,16 @@ const retrieveSkeletonAnimation = _ref2 => {
|
|
|
137
166
|
}
|
|
138
167
|
return styled.css(["animation:", " 1.5s ease-in-out 300ms infinite;"], skeletonAnimation);
|
|
139
168
|
};
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
theme,
|
|
143
|
-
isLight
|
|
144
|
-
} = _ref3;
|
|
145
|
-
return styled.css(["background-image:linear-gradient( ", ",transparent,", ",transparent );"], theme.rtl ? '-45deg' : '45deg', isLight ? reactTheming.getColorV8('chromeHue', 700, theme, 0.4) : polished.rgba(reactTheming.getColorV8('background', 600 , theme), 0.6));
|
|
169
|
+
const gradientStyles = props => {
|
|
170
|
+
return styled.css(["background-image:linear-gradient( ", ",transparent,", ",transparent );"], props.theme.rtl ? '-45deg' : '45deg', getBackgroundColor);
|
|
146
171
|
};
|
|
147
172
|
const StyledSkeleton = styled__default.default.div.attrs({
|
|
148
173
|
'data-garden-id': COMPONENT_ID$4,
|
|
149
|
-
'data-garden-version': '9.0.0
|
|
174
|
+
'data-garden-version': '9.0.0'
|
|
150
175
|
}).withConfig({
|
|
151
176
|
displayName: "StyledSkeleton",
|
|
152
177
|
componentId: "sc-1raozze-0"
|
|
153
|
-
})(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";width:", ";height:", ";overflow:hidden;line-height:", "
|
|
154
|
-
StyledSkeleton.defaultProps = {
|
|
155
|
-
theme: reactTheming.DEFAULT_THEME
|
|
156
|
-
};
|
|
178
|
+
})(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";background-color:", ";width:", ";height:", ";overflow:hidden;line-height:", ";&::before{position:absolute;top:0;width:1000px;height:100%;content:'';", " ", "}", ";"], fadeInAnimation, props => props.theme.borderRadii.md, getBackgroundColor, props => props.$width, props => props.$height, props => reactTheming.getLineHeight(props.theme.fontSizes.sm, props.theme.space.base * 5), animationStyles, gradientStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
157
179
|
|
|
158
180
|
const StyledSpinnerCircle = styled__default.default.circle.attrs(props => ({
|
|
159
181
|
cx: 40,
|
|
@@ -169,12 +191,23 @@ const StyledSpinnerCircle = styled__default.default.circle.attrs(props => ({
|
|
|
169
191
|
displayName: "StyledSpinnerCircle",
|
|
170
192
|
componentId: "sc-o4kd70-0"
|
|
171
193
|
})([""]);
|
|
172
|
-
StyledSpinnerCircle.defaultProps = {
|
|
173
|
-
theme: reactTheming.DEFAULT_THEME
|
|
174
|
-
};
|
|
175
194
|
|
|
195
|
+
const colorStyles$1 = _ref => {
|
|
196
|
+
let {
|
|
197
|
+
theme,
|
|
198
|
+
color = 'inherit'
|
|
199
|
+
} = _ref;
|
|
200
|
+
const options = color.includes('.') ? {
|
|
201
|
+
variable: color,
|
|
202
|
+
theme
|
|
203
|
+
} : {
|
|
204
|
+
hue: color,
|
|
205
|
+
theme
|
|
206
|
+
};
|
|
207
|
+
return styled.css(["color:", ";"], reactTheming.getColor(options));
|
|
208
|
+
};
|
|
176
209
|
const StyledSVG = styled__default.default.svg.attrs(props => ({
|
|
177
|
-
'data-garden-version': '9.0.0
|
|
210
|
+
'data-garden-version': '9.0.0',
|
|
178
211
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
179
212
|
width: props.width,
|
|
180
213
|
height: props.height,
|
|
@@ -184,13 +217,29 @@ const StyledSVG = styled__default.default.svg.attrs(props => ({
|
|
|
184
217
|
})).withConfig({
|
|
185
218
|
displayName: "StyledSVG",
|
|
186
219
|
componentId: "sc-1xtc3kx-0"
|
|
187
|
-
})(["width:", ";height:", ";
|
|
188
|
-
StyledSVG.defaultProps = {
|
|
189
|
-
theme: reactTheming.DEFAULT_THEME
|
|
190
|
-
};
|
|
220
|
+
})(["width:", ";height:", ";font-size:", ";", ";", ";"], props => props.containerWidth || '1em', props => props.containerHeight || '0.9em', props => props.fontSize || 'inherit', colorStyles$1, props => reactTheming.retrieveComponentStyles(props.dataGardenId, props));
|
|
191
221
|
|
|
192
222
|
const COMPONENT_ID$3 = 'loaders.inline';
|
|
193
|
-
const
|
|
223
|
+
const colorStyles = _ref => {
|
|
224
|
+
let {
|
|
225
|
+
theme,
|
|
226
|
+
color
|
|
227
|
+
} = _ref;
|
|
228
|
+
const options = color.includes('.') ? {
|
|
229
|
+
variable: color,
|
|
230
|
+
theme
|
|
231
|
+
} : {
|
|
232
|
+
hue: color,
|
|
233
|
+
theme
|
|
234
|
+
};
|
|
235
|
+
return styled.css(["color:", ";"], reactTheming.getColor(options));
|
|
236
|
+
};
|
|
237
|
+
const retrieveAnimation = _ref2 => {
|
|
238
|
+
let {
|
|
239
|
+
theme
|
|
240
|
+
} = _ref2;
|
|
241
|
+
return styled.keyframes(["0%,100%{opacity:", ";}50%{opacity:", ";}"], theme.opacity[200], theme.opacity[600]);
|
|
242
|
+
};
|
|
194
243
|
const StyledCircle = styled__default.default.circle.attrs({
|
|
195
244
|
fill: 'currentColor',
|
|
196
245
|
cy: 2,
|
|
@@ -199,22 +248,16 @@ const StyledCircle = styled__default.default.circle.attrs({
|
|
|
199
248
|
displayName: "StyledInline__StyledCircle",
|
|
200
249
|
componentId: "sc-fxsb9l-0"
|
|
201
250
|
})([""]);
|
|
202
|
-
StyledCircle.defaultProps = {
|
|
203
|
-
theme: reactTheming.DEFAULT_THEME
|
|
204
|
-
};
|
|
205
251
|
const StyledInline = styled__default.default.svg.attrs(props => ({
|
|
206
252
|
'data-garden-id': COMPONENT_ID$3,
|
|
207
|
-
'data-garden-version': '9.0.0
|
|
253
|
+
'data-garden-version': '9.0.0',
|
|
208
254
|
viewBox: '0 0 16 4',
|
|
209
255
|
width: props.size,
|
|
210
256
|
height: props.size * 0.25
|
|
211
257
|
})).withConfig({
|
|
212
258
|
displayName: "StyledInline",
|
|
213
259
|
componentId: "sc-fxsb9l-1"
|
|
214
|
-
})(["
|
|
215
|
-
StyledInline.defaultProps = {
|
|
216
|
-
theme: reactTheming.DEFAULT_THEME
|
|
217
|
-
};
|
|
260
|
+
})(["", ";", "{opacity:0.2;&:nth-child(1){animation:", " 1s infinite;animation-delay:", ";}&:nth-child(2){animation:", " 1s infinite;animation-delay:0.2s;}&:nth-child(3){animation:", " 1s infinite;animation-delay:", ";}}", ""], colorStyles, StyledCircle, retrieveAnimation, props => props.theme.rtl ? 'unset' : '0.4s', retrieveAnimation, retrieveAnimation, props => props.theme.rtl ? '0.4s' : 'unset', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
218
261
|
|
|
219
262
|
const COMPONENT_ID$2 = 'loaders.dots';
|
|
220
263
|
const Dots = React.forwardRef((_ref, ref) => {
|
|
@@ -306,7 +349,7 @@ const Progress = React__default.default.forwardRef((_ref, ref) => {
|
|
|
306
349
|
return (
|
|
307
350
|
React__default.default.createElement(StyledProgressBackground, Object.assign({
|
|
308
351
|
"data-garden-id": COMPONENT_ID$1,
|
|
309
|
-
"data-garden-version": '9.0.0
|
|
352
|
+
"data-garden-version": '9.0.0',
|
|
310
353
|
"aria-valuemax": 100,
|
|
311
354
|
"aria-valuemin": 0,
|
|
312
355
|
"aria-valuenow": percentage,
|
|
@@ -340,9 +383,9 @@ const Skeleton = React.forwardRef((_ref, ref) => {
|
|
|
340
383
|
} = _ref;
|
|
341
384
|
return React__default.default.createElement(StyledSkeleton, Object.assign({
|
|
342
385
|
ref: ref,
|
|
343
|
-
isLight: isLight,
|
|
344
|
-
|
|
345
|
-
|
|
386
|
+
$isLight: isLight,
|
|
387
|
+
$width: width,
|
|
388
|
+
$height: height
|
|
346
389
|
}, other), "\xA0");
|
|
347
390
|
});
|
|
348
391
|
Skeleton.displayName = 'Skeleton';
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
fill: "currentColor";
|
|
9
|
-
cy: 2;
|
|
10
|
-
r: 2;
|
|
11
|
-
}, "cy" | "fill" | "r">;
|
|
7
|
+
import { DefaultTheme } from 'styled-components';
|
|
12
8
|
interface IStyledInlineProps {
|
|
13
9
|
size: number;
|
|
14
10
|
color: string;
|
|
15
11
|
}
|
|
16
|
-
export declare const
|
|
12
|
+
export declare const StyledCircle: import("styled-components").StyledComponent<"circle", DefaultTheme, {
|
|
13
|
+
fill: "currentColor";
|
|
14
|
+
cy: 2;
|
|
15
|
+
r: 2;
|
|
16
|
+
}, "cy" | "fill" | "r">;
|
|
17
|
+
export declare const StyledInline: import("styled-components").StyledComponent<"svg", DefaultTheme, IStyledInlineProps, never>;
|
|
17
18
|
export {};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
+
import { DefaultTheme } from 'styled-components';
|
|
7
8
|
interface IStyledSVGProps {
|
|
8
9
|
dataGardenId: string;
|
|
9
10
|
color?: string;
|
|
@@ -13,5 +14,5 @@ interface IStyledSVGProps {
|
|
|
13
14
|
containerWidth?: string;
|
|
14
15
|
containerHeight?: string;
|
|
15
16
|
}
|
|
16
|
-
export declare const StyledSVG: import("styled-components").StyledComponent<"svg",
|
|
17
|
+
export declare const StyledSVG: import("styled-components").StyledComponent<"svg", DefaultTheme, IStyledSVGProps, never>;
|
|
17
18
|
export {};
|
|
@@ -6,11 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { DefaultTheme } from 'styled-components';
|
|
8
8
|
interface IStyledSkeletonProps {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
isLight?: boolean;
|
|
12
|
-
customWidth?: string;
|
|
13
|
-
customHeight?: string;
|
|
9
|
+
$height?: string;
|
|
10
|
+
$width?: string;
|
|
11
|
+
$isLight?: boolean;
|
|
14
12
|
}
|
|
15
13
|
export declare const StyledSkeleton: import("styled-components").StyledComponent<"div", DefaultTheme, {
|
|
16
14
|
'data-garden-id': string;
|
|
@@ -10,7 +10,12 @@ export type Size = (typeof SIZE)[number];
|
|
|
10
10
|
export interface IDotsProps extends SVGAttributes<SVGSVGElement> {
|
|
11
11
|
/** Sets the height and width in pixels. Inherits the parent's font size by default. */
|
|
12
12
|
size?: string | number;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Sets the fill color. Accepts a [color
|
|
15
|
+
* variable](/components/theme-object#colors) key (i.e. `foreground.primary`)
|
|
16
|
+
* to render based on light/dark mode, or any hex value. Inherits the parent's
|
|
17
|
+
* `color` by default.
|
|
18
|
+
*/
|
|
14
19
|
color?: string;
|
|
15
20
|
/** Sets the length of the animation cycle in milliseconds **/
|
|
16
21
|
duration?: number;
|
|
@@ -20,15 +25,23 @@ export interface IDotsProps extends SVGAttributes<SVGSVGElement> {
|
|
|
20
25
|
export interface IInlineProps extends SVGAttributes<SVGSVGElement> {
|
|
21
26
|
/** Sets the width in pixels and scales the loader proportionally */
|
|
22
27
|
size?: number;
|
|
23
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Sets the fill color. Accepts a [color
|
|
30
|
+
* variable](/components/theme-object#colors) key (i.e. `foreground.primary`)
|
|
31
|
+
* to render based on light/dark mode, or any hex value. Inherits the parent's
|
|
32
|
+
* `color` by default.
|
|
33
|
+
*/
|
|
24
34
|
color?: string;
|
|
25
35
|
}
|
|
26
36
|
export interface IProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
27
37
|
/** Sets the progress as a value between 0 and 100 */
|
|
28
38
|
value?: number;
|
|
29
39
|
/**
|
|
30
|
-
* Sets the foreground bar's fill color.
|
|
31
|
-
*
|
|
40
|
+
* Sets the foreground bar's fill color. Accepts a [color
|
|
41
|
+
* variable](/components/theme-object#colors) key (i.e.
|
|
42
|
+
* `border.primaryEmphasis`) to render based on light/dark mode, or any hex
|
|
43
|
+
* value. Defaults to the `border.successEmphasis`
|
|
44
|
+
* [theme](/components/theme-object#variables) value.
|
|
32
45
|
*/
|
|
33
46
|
color?: string;
|
|
34
47
|
/** Adjusts the height */
|
|
@@ -52,8 +65,11 @@ export interface ISpinnerProps extends SVGAttributes<SVGSVGElement> {
|
|
|
52
65
|
**/
|
|
53
66
|
duration?: number;
|
|
54
67
|
/**
|
|
55
|
-
* Sets the fill color.
|
|
56
|
-
|
|
68
|
+
* Sets the fill color. Accepts a [color
|
|
69
|
+
* variable](/components/theme-object#colors) key (i.e. `foreground.primary`)
|
|
70
|
+
* to render based on light/dark mode, or any hex value. Inherits the parent's
|
|
71
|
+
* `color` by default.
|
|
72
|
+
*/
|
|
57
73
|
color?: string;
|
|
58
74
|
/**
|
|
59
75
|
* Delays displaying the loader to prevent a render flash during normal loading times
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-loaders",
|
|
3
|
-
"version": "9.0.0
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Components relating to loaders in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"sideEffects": false,
|
|
22
22
|
"types": "dist/typings/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zendeskgarden/container-schedule": "^2.0.
|
|
25
|
-
"polished": "^4.
|
|
24
|
+
"@zendeskgarden/container-schedule": "^2.0.9",
|
|
25
|
+
"polished": "^4.3.1",
|
|
26
26
|
"prop-types": "^15.5.7"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@zendeskgarden/react-theming": ">=9.0.0-next",
|
|
30
|
-
"react": "
|
|
31
|
-
"react-dom": "
|
|
30
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
31
|
+
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
32
32
|
"styled-components": "^5.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@zendeskgarden/react-theming": "^9.0.0
|
|
35
|
+
"@zendeskgarden/react-theming": "^9.0.0"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"components",
|
|
@@ -43,6 +43,5 @@
|
|
|
43
43
|
"publishConfig": {
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
|
-
"zendeskgarden:src": "src/index.ts"
|
|
47
|
-
"gitHead": "a3d6534843d5a4f5cb60b52bc67264f3230f2da0"
|
|
46
|
+
"zendeskgarden:src": "src/index.ts"
|
|
48
47
|
}
|
package/LICENSE.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|