@zendeskgarden/react-loaders 8.62.2 → 8.63.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/index.cjs.js
CHANGED
|
@@ -95,7 +95,7 @@ StyledDotsCircleThree.defaultProps = {
|
|
|
95
95
|
const COMPONENT_ID$5 = 'loaders.loading_placeholder';
|
|
96
96
|
const StyledLoadingPlaceholder = styled__default.default.div.attrs({
|
|
97
97
|
'data-garden-id': COMPONENT_ID$5,
|
|
98
|
-
'data-garden-version': '8.
|
|
98
|
+
'data-garden-version': '8.63.0',
|
|
99
99
|
role: 'progressbar'
|
|
100
100
|
}).withConfig({
|
|
101
101
|
displayName: "StyledLoadingPlaceholder",
|
|
@@ -119,7 +119,7 @@ const sizeToBorderRadius = (size, theme) => sizeToHeight(size, theme) / 2;
|
|
|
119
119
|
const PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
|
|
120
120
|
const StyledProgressBackground = styled__default.default.div.attrs(props => ({
|
|
121
121
|
'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
|
|
122
|
-
'data-garden-version': '8.
|
|
122
|
+
'data-garden-version': '8.63.0',
|
|
123
123
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
124
124
|
})).withConfig({
|
|
125
125
|
displayName: "StyledProgress__StyledProgressBackground",
|
|
@@ -131,7 +131,7 @@ StyledProgressBackground.defaultProps = {
|
|
|
131
131
|
const PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
|
|
132
132
|
const StyledProgressIndicator = styled__default.default.div.attrs(props => ({
|
|
133
133
|
'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
|
|
134
|
-
'data-garden-version': '8.
|
|
134
|
+
'data-garden-version': '8.63.0',
|
|
135
135
|
height: props.height || sizeToHeight(props.size, props.theme),
|
|
136
136
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
137
137
|
})).withConfig({
|
|
@@ -174,7 +174,7 @@ const retrieveSkeletonGradient = _ref3 => {
|
|
|
174
174
|
};
|
|
175
175
|
const StyledSkeleton = styled__default.default.div.attrs({
|
|
176
176
|
'data-garden-id': COMPONENT_ID$4,
|
|
177
|
-
'data-garden-version': '8.
|
|
177
|
+
'data-garden-version': '8.63.0'
|
|
178
178
|
}).withConfig({
|
|
179
179
|
displayName: "StyledSkeleton",
|
|
180
180
|
componentId: "sc-1raozze-0"
|
|
@@ -202,7 +202,7 @@ StyledSpinnerCircle.defaultProps = {
|
|
|
202
202
|
};
|
|
203
203
|
|
|
204
204
|
const StyledSVG = styled__default.default.svg.attrs(props => ({
|
|
205
|
-
'data-garden-version': '8.
|
|
205
|
+
'data-garden-version': '8.63.0',
|
|
206
206
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
207
207
|
width: props.width,
|
|
208
208
|
height: props.height,
|
|
@@ -232,7 +232,7 @@ StyledCircle.defaultProps = {
|
|
|
232
232
|
};
|
|
233
233
|
const StyledInline = styled__default.default.svg.attrs(props => ({
|
|
234
234
|
'data-garden-id': COMPONENT_ID$3,
|
|
235
|
-
'data-garden-version': '8.
|
|
235
|
+
'data-garden-version': '8.63.0',
|
|
236
236
|
viewBox: '0 0 16 4',
|
|
237
237
|
width: props.size,
|
|
238
238
|
height: props.size * 0.25
|
|
@@ -331,20 +331,22 @@ const Progress = React__default.default.forwardRef((_ref, ref) => {
|
|
|
331
331
|
const ariaLabel = reactTheming.useText(Progress, {
|
|
332
332
|
'aria-label': label
|
|
333
333
|
}, 'aria-label', 'Progress');
|
|
334
|
-
return
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
334
|
+
return (
|
|
335
|
+
React__default.default.createElement(StyledProgressBackground, _extends({
|
|
336
|
+
"data-garden-id": COMPONENT_ID$1,
|
|
337
|
+
"data-garden-version": '8.63.0',
|
|
338
|
+
"aria-valuemax": 100,
|
|
339
|
+
"aria-valuemin": 0,
|
|
340
|
+
"aria-valuenow": percentage,
|
|
341
|
+
role: "progressbar",
|
|
342
|
+
size: size,
|
|
343
|
+
ref: ref,
|
|
344
|
+
"aria-label": ariaLabel
|
|
345
|
+
}, other), React__default.default.createElement(StyledProgressIndicator, {
|
|
346
|
+
value: percentage,
|
|
347
|
+
size: size
|
|
348
|
+
}))
|
|
349
|
+
);
|
|
348
350
|
});
|
|
349
351
|
Progress.displayName = 'Progress';
|
|
350
352
|
Progress.propTypes = {
|
|
@@ -533,19 +535,21 @@ const Inline = React.forwardRef((_ref, ref) => {
|
|
|
533
535
|
...other
|
|
534
536
|
} = _ref;
|
|
535
537
|
const ariaLabel = reactTheming.useText(Inline, other, 'aria-label', 'loading');
|
|
536
|
-
return
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
538
|
+
return (
|
|
539
|
+
React__default.default.createElement(StyledInline, _extends({
|
|
540
|
+
ref: ref,
|
|
541
|
+
size: size,
|
|
542
|
+
color: color,
|
|
543
|
+
"aria-label": ariaLabel,
|
|
544
|
+
role: "img"
|
|
545
|
+
}, other), React__default.default.createElement(StyledCircle, {
|
|
546
|
+
cx: "14"
|
|
547
|
+
}), React__default.default.createElement(StyledCircle, {
|
|
548
|
+
cx: "8"
|
|
549
|
+
}), React__default.default.createElement(StyledCircle, {
|
|
550
|
+
cx: "2"
|
|
551
|
+
}))
|
|
552
|
+
);
|
|
549
553
|
});
|
|
550
554
|
Inline.displayName = 'Inline';
|
|
551
555
|
Inline.propTypes = {
|
package/dist/index.esm.js
CHANGED
|
@@ -87,7 +87,7 @@ StyledDotsCircleThree.defaultProps = {
|
|
|
87
87
|
const COMPONENT_ID$5 = 'loaders.loading_placeholder';
|
|
88
88
|
const StyledLoadingPlaceholder = styled.div.attrs({
|
|
89
89
|
'data-garden-id': COMPONENT_ID$5,
|
|
90
|
-
'data-garden-version': '8.
|
|
90
|
+
'data-garden-version': '8.63.0',
|
|
91
91
|
role: 'progressbar'
|
|
92
92
|
}).withConfig({
|
|
93
93
|
displayName: "StyledLoadingPlaceholder",
|
|
@@ -111,7 +111,7 @@ const sizeToBorderRadius = (size, theme) => sizeToHeight(size, theme) / 2;
|
|
|
111
111
|
const PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
|
|
112
112
|
const StyledProgressBackground = styled.div.attrs(props => ({
|
|
113
113
|
'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
|
|
114
|
-
'data-garden-version': '8.
|
|
114
|
+
'data-garden-version': '8.63.0',
|
|
115
115
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
116
116
|
})).withConfig({
|
|
117
117
|
displayName: "StyledProgress__StyledProgressBackground",
|
|
@@ -123,7 +123,7 @@ StyledProgressBackground.defaultProps = {
|
|
|
123
123
|
const PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
|
|
124
124
|
const StyledProgressIndicator = styled.div.attrs(props => ({
|
|
125
125
|
'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
|
|
126
|
-
'data-garden-version': '8.
|
|
126
|
+
'data-garden-version': '8.63.0',
|
|
127
127
|
height: props.height || sizeToHeight(props.size, props.theme),
|
|
128
128
|
borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
|
|
129
129
|
})).withConfig({
|
|
@@ -166,7 +166,7 @@ const retrieveSkeletonGradient = _ref3 => {
|
|
|
166
166
|
};
|
|
167
167
|
const StyledSkeleton = styled.div.attrs({
|
|
168
168
|
'data-garden-id': COMPONENT_ID$4,
|
|
169
|
-
'data-garden-version': '8.
|
|
169
|
+
'data-garden-version': '8.63.0'
|
|
170
170
|
}).withConfig({
|
|
171
171
|
displayName: "StyledSkeleton",
|
|
172
172
|
componentId: "sc-1raozze-0"
|
|
@@ -194,7 +194,7 @@ StyledSpinnerCircle.defaultProps = {
|
|
|
194
194
|
};
|
|
195
195
|
|
|
196
196
|
const StyledSVG = styled.svg.attrs(props => ({
|
|
197
|
-
'data-garden-version': '8.
|
|
197
|
+
'data-garden-version': '8.63.0',
|
|
198
198
|
xmlns: 'http://www.w3.org/2000/svg',
|
|
199
199
|
width: props.width,
|
|
200
200
|
height: props.height,
|
|
@@ -224,7 +224,7 @@ StyledCircle.defaultProps = {
|
|
|
224
224
|
};
|
|
225
225
|
const StyledInline = styled.svg.attrs(props => ({
|
|
226
226
|
'data-garden-id': COMPONENT_ID$3,
|
|
227
|
-
'data-garden-version': '8.
|
|
227
|
+
'data-garden-version': '8.63.0',
|
|
228
228
|
viewBox: '0 0 16 4',
|
|
229
229
|
width: props.size,
|
|
230
230
|
height: props.size * 0.25
|
|
@@ -323,20 +323,22 @@ const Progress = React.forwardRef((_ref, ref) => {
|
|
|
323
323
|
const ariaLabel = useText(Progress, {
|
|
324
324
|
'aria-label': label
|
|
325
325
|
}, 'aria-label', 'Progress');
|
|
326
|
-
return
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
326
|
+
return (
|
|
327
|
+
React.createElement(StyledProgressBackground, _extends({
|
|
328
|
+
"data-garden-id": COMPONENT_ID$1,
|
|
329
|
+
"data-garden-version": '8.63.0',
|
|
330
|
+
"aria-valuemax": 100,
|
|
331
|
+
"aria-valuemin": 0,
|
|
332
|
+
"aria-valuenow": percentage,
|
|
333
|
+
role: "progressbar",
|
|
334
|
+
size: size,
|
|
335
|
+
ref: ref,
|
|
336
|
+
"aria-label": ariaLabel
|
|
337
|
+
}, other), React.createElement(StyledProgressIndicator, {
|
|
338
|
+
value: percentage,
|
|
339
|
+
size: size
|
|
340
|
+
}))
|
|
341
|
+
);
|
|
340
342
|
});
|
|
341
343
|
Progress.displayName = 'Progress';
|
|
342
344
|
Progress.propTypes = {
|
|
@@ -525,19 +527,21 @@ const Inline = forwardRef((_ref, ref) => {
|
|
|
525
527
|
...other
|
|
526
528
|
} = _ref;
|
|
527
529
|
const ariaLabel = useText(Inline, other, 'aria-label', 'loading');
|
|
528
|
-
return
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
530
|
+
return (
|
|
531
|
+
React.createElement(StyledInline, _extends({
|
|
532
|
+
ref: ref,
|
|
533
|
+
size: size,
|
|
534
|
+
color: color,
|
|
535
|
+
"aria-label": ariaLabel,
|
|
536
|
+
role: "img"
|
|
537
|
+
}, other), React.createElement(StyledCircle, {
|
|
538
|
+
cx: "14"
|
|
539
|
+
}), React.createElement(StyledCircle, {
|
|
540
|
+
cx: "8"
|
|
541
|
+
}), React.createElement(StyledCircle, {
|
|
542
|
+
cx: "2"
|
|
543
|
+
}))
|
|
544
|
+
);
|
|
541
545
|
});
|
|
542
546
|
Inline.displayName = 'Inline';
|
|
543
547
|
Inline.propTypes = {
|
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IInlineProps } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* 1. role='img' on `svg` is valid WAI-ARIA usage in this context.
|
|
11
|
+
* https://dequeuniversity.com/rules/axe/4.2/svg-img-alt
|
|
12
|
+
*/
|
|
9
13
|
/**
|
|
10
14
|
* @extends SVGAttributes<SVGSVGElement>
|
|
11
15
|
*/
|
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { IProgressProps } from '../types';
|
|
9
|
+
/**
|
|
10
|
+
* 1. Garden progress bar is quite custom, and while using a native
|
|
11
|
+
* `progress` element would be ideal, its inclusion of a shadow
|
|
12
|
+
* root in Safari prevents straightforward restyling/functional overrides.
|
|
13
|
+
*/
|
|
9
14
|
/**
|
|
10
15
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
11
16
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLAttributes, SVGAttributes } from 'react';
|
|
8
8
|
export declare const SIZE: readonly ["small", "medium", "large"];
|
|
9
|
-
export
|
|
9
|
+
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;
|
|
@@ -4,7 +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
|
-
|
|
7
|
+
type AnimationPoints = Record<number, number>;
|
|
8
8
|
export declare const STROKE_WIDTH_FRAMES: AnimationPoints;
|
|
9
9
|
export declare const ROTATION_FRAMES: AnimationPoints;
|
|
10
10
|
export declare const DASHARRAY_FRAMES: AnimationPoints;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-loaders",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.63.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>",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@zendeskgarden/react-theming": "^8.
|
|
35
|
+
"@zendeskgarden/react-theming": "^8.63.0"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"components",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"zendeskgarden:src": "src/index.ts",
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "4b8715305a769881b143c7195c5b31e687422926"
|
|
48
48
|
}
|