@zendeskgarden/react-loaders 8.57.1 → 8.58.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.esm.js CHANGED
@@ -16,119 +16,22 @@ function _extends() {
16
16
  _extends = Object.assign ? Object.assign.bind() : function (target) {
17
17
  for (var i = 1; i < arguments.length; i++) {
18
18
  var source = arguments[i];
19
-
20
19
  for (var key in source) {
21
20
  if (Object.prototype.hasOwnProperty.call(source, key)) {
22
21
  target[key] = source[key];
23
22
  }
24
23
  }
25
24
  }
26
-
27
25
  return target;
28
26
  };
29
27
  return _extends.apply(this, arguments);
30
28
  }
31
29
 
32
- function _objectWithoutPropertiesLoose(source, excluded) {
33
- if (source == null) return {};
34
- var target = {};
35
- var sourceKeys = Object.keys(source);
36
- var key, i;
37
-
38
- for (i = 0; i < sourceKeys.length; i++) {
39
- key = sourceKeys[i];
40
- if (excluded.indexOf(key) >= 0) continue;
41
- target[key] = source[key];
42
- }
43
-
44
- return target;
45
- }
46
-
47
- function _objectWithoutProperties(source, excluded) {
48
- if (source == null) return {};
49
-
50
- var target = _objectWithoutPropertiesLoose(source, excluded);
51
-
52
- var key, i;
53
-
54
- if (Object.getOwnPropertySymbols) {
55
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
56
-
57
- for (i = 0; i < sourceSymbolKeys.length; i++) {
58
- key = sourceSymbolKeys[i];
59
- if (excluded.indexOf(key) >= 0) continue;
60
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
61
- target[key] = source[key];
62
- }
63
- }
64
-
65
- return target;
66
- }
67
-
68
- function _slicedToArray(arr, i) {
69
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
70
- }
71
-
72
- function _arrayWithHoles(arr) {
73
- if (Array.isArray(arr)) return arr;
74
- }
75
-
76
- function _iterableToArrayLimit(arr, i) {
77
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
78
-
79
- if (_i == null) return;
80
- var _arr = [];
81
- var _n = true;
82
- var _d = false;
83
-
84
- var _s, _e;
85
-
86
- try {
87
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
88
- _arr.push(_s.value);
89
-
90
- if (i && _arr.length === i) break;
91
- }
92
- } catch (err) {
93
- _d = true;
94
- _e = err;
95
- } finally {
96
- try {
97
- if (!_n && _i["return"] != null) _i["return"]();
98
- } finally {
99
- if (_d) throw _e;
100
- }
101
- }
102
-
103
- return _arr;
104
- }
105
-
106
- function _unsupportedIterableToArray(o, minLen) {
107
- if (!o) return;
108
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
109
- var n = Object.prototype.toString.call(o).slice(8, -1);
110
- if (n === "Object" && o.constructor) n = o.constructor.name;
111
- if (n === "Map" || n === "Set") return Array.from(o);
112
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
113
- }
114
-
115
- function _arrayLikeToArray(arr, len) {
116
- if (len == null || len > arr.length) len = arr.length;
117
-
118
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
119
-
120
- return arr2;
121
- }
122
-
123
- function _nonIterableRest() {
124
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
125
- }
126
-
127
- var dotOneKeyframes = keyframes(["0%{transform:translate(0,5px);}3%{transform:translate(1px,-5px);}6%{transform:translate(3px,-15px);}8%{transform:translate(5px,-18px);}9%{transform:translate(7px,-21px);}11%{transform:translate(8px,-22px);}13%{transform:translate(9px,-23px);}16%{transform:translate(12px,-25px);}18%{transform:translate(13px,-26px);}23%{transform:translate(18px,-26px);}24%{transform:translate(19px,-25px);}28%{transform:translate(22px,-23px);}31%{transform:translate(24px,-21px);}33%{transform:translate(26px,-18px);}34%{transform:translate(28px,-14px);}36%{transform:translate(29px,-12px);}38%{transform:translate(30px,-5px);}39%{transform:translate(31px,5px);}54%{transform:translate(31px,3px);}59%{transform:translate(33px);}61%{transform:translate(43px);}63%{transform:translate(48px);}64%{transform:translate(51px);}66%{transform:translate(53px);}68%{transform:translate(55px);}69%{transform:translate(57px);}76%{transform:translate(60px);}81%{transform:translate(61px);}83%,100%{transform:translate(62px);}"]);
128
- var dotTwoKeyframes = keyframes(["4%{transform:translate(0);}6%{transform:translate(-1px);}8%{transform:translate(-2px);}9%{transform:translate(-5px);}11%{transform:translate(-7px);}13%{transform:translate(-12px);}14%{transform:translate(-17px);}16%{transform:translate(-19px);}18%{transform:translate(-22px);}19%{transform:translate(-25px);}21%{transform:translate(-26px);}23%{transform:translate(-27px);}24%{transform:translate(-28px);}26%{transform:translate(-29px);}29%{transform:translate(-30px);}33%,89%{transform:translate(-31px);}91%{transform:translate(-31px,1px);}94%{transform:translate(-31px,2px);}98%{transform:translate(-31px,3px);}99%{transform:translate(-31px,4px);}100%{transform:translate(-31px,5px);}"]);
129
- var dotThreeKeyframes = keyframes(["39%{transform:translate(0);}44%{transform:translate(0,1px);}46%{transform:translate(0,2px);}48%{transform:translate(0,3px);}49%{transform:translate(0,4px);}51%{transform:translate(0,5px);}53%{transform:translate(-1px,-6px);}54%{transform:translate(-2px,-13px);}56%{transform:translate(-3px,-15px);}58%{transform:translate(-5px,-19px);}59%{transform:translate(-7px,-21px);}61%{transform:translate(-8px,-22px);}63%{transform:translate(-9px,-24px);}64%{transform:translate(-11px,-25px);}66%{transform:translate(-12px,-26px);}74%{transform:translate(-19px,-26px);}76%{transform:translate(-20px,-25px);}78%{transform:translate(-22px,-24px);}81%{transform:translate(-24px,-21px);}83%{transform:translate(-26px,-19px);}84%{transform:translate(-28px,-15px);}86%{transform:translate(-29px,-13px);}88%{transform:translate(-30px,-6px);}89%{transform:translate(-31px,5px);}91%{transform:translate(-31px,4px);}93%{transform:translate(-31px,3px);}94%{transform:translate(-31px,2px);}98%{transform:translate(-31px,1px);}100%{transform:translate(-31px);}"]);
30
+ const dotOneKeyframes = keyframes(["0%{transform:translate(0,5px);}3%{transform:translate(1px,-5px);}6%{transform:translate(3px,-15px);}8%{transform:translate(5px,-18px);}9%{transform:translate(7px,-21px);}11%{transform:translate(8px,-22px);}13%{transform:translate(9px,-23px);}16%{transform:translate(12px,-25px);}18%{transform:translate(13px,-26px);}23%{transform:translate(18px,-26px);}24%{transform:translate(19px,-25px);}28%{transform:translate(22px,-23px);}31%{transform:translate(24px,-21px);}33%{transform:translate(26px,-18px);}34%{transform:translate(28px,-14px);}36%{transform:translate(29px,-12px);}38%{transform:translate(30px,-5px);}39%{transform:translate(31px,5px);}54%{transform:translate(31px,3px);}59%{transform:translate(33px);}61%{transform:translate(43px);}63%{transform:translate(48px);}64%{transform:translate(51px);}66%{transform:translate(53px);}68%{transform:translate(55px);}69%{transform:translate(57px);}76%{transform:translate(60px);}81%{transform:translate(61px);}83%,100%{transform:translate(62px);}"]);
31
+ const dotTwoKeyframes = keyframes(["4%{transform:translate(0);}6%{transform:translate(-1px);}8%{transform:translate(-2px);}9%{transform:translate(-5px);}11%{transform:translate(-7px);}13%{transform:translate(-12px);}14%{transform:translate(-17px);}16%{transform:translate(-19px);}18%{transform:translate(-22px);}19%{transform:translate(-25px);}21%{transform:translate(-26px);}23%{transform:translate(-27px);}24%{transform:translate(-28px);}26%{transform:translate(-29px);}29%{transform:translate(-30px);}33%,89%{transform:translate(-31px);}91%{transform:translate(-31px,1px);}94%{transform:translate(-31px,2px);}98%{transform:translate(-31px,3px);}99%{transform:translate(-31px,4px);}100%{transform:translate(-31px,5px);}"]);
32
+ const dotThreeKeyframes = keyframes(["39%{transform:translate(0);}44%{transform:translate(0,1px);}46%{transform:translate(0,2px);}48%{transform:translate(0,3px);}49%{transform:translate(0,4px);}51%{transform:translate(0,5px);}53%{transform:translate(-1px,-6px);}54%{transform:translate(-2px,-13px);}56%{transform:translate(-3px,-15px);}58%{transform:translate(-5px,-19px);}59%{transform:translate(-7px,-21px);}61%{transform:translate(-8px,-22px);}63%{transform:translate(-9px,-24px);}64%{transform:translate(-11px,-25px);}66%{transform:translate(-12px,-26px);}74%{transform:translate(-19px,-26px);}76%{transform:translate(-20px,-25px);}78%{transform:translate(-22px,-24px);}81%{transform:translate(-24px,-21px);}83%{transform:translate(-26px,-19px);}84%{transform:translate(-28px,-15px);}86%{transform:translate(-29px,-13px);}88%{transform:translate(-30px,-6px);}89%{transform:translate(-31px,5px);}91%{transform:translate(-31px,4px);}93%{transform:translate(-31px,3px);}94%{transform:translate(-31px,2px);}98%{transform:translate(-31px,1px);}100%{transform:translate(-31px);}"]);
130
33
 
131
- var StyledDotsCircle = styled.circle.attrs({
34
+ const StyledDotsCircle = styled.circle.attrs({
132
35
  cy: 36,
133
36
  r: 9
134
37
  }).withConfig({
@@ -138,69 +41,63 @@ var StyledDotsCircle = styled.circle.attrs({
138
41
  StyledDotsCircle.defaultProps = {
139
42
  theme: DEFAULT_THEME
140
43
  };
141
- var StyledDotsCircleOne = styled(StyledDotsCircle).attrs({
44
+ const StyledDotsCircleOne = styled(StyledDotsCircle).attrs({
142
45
  cx: 9
143
46
  }).withConfig({
144
47
  displayName: "StyledDots__StyledDotsCircleOne",
145
48
  componentId: "sc-1ltah7e-1"
146
- })(["animation:", ";"], function (_ref) {
147
- var duration = _ref.duration;
49
+ })(["animation:", ";"], _ref => {
50
+ let {
51
+ duration
52
+ } = _ref;
148
53
  return css(["", " ", "ms linear infinite"], dotOneKeyframes, duration);
149
54
  });
150
55
  StyledDotsCircleOne.defaultProps = {
151
56
  theme: DEFAULT_THEME
152
57
  };
153
- var StyledDotsCircleTwo = styled(StyledDotsCircle).attrs(function () {
154
- return {
155
- cx: 40
156
- };
157
- }).withConfig({
58
+ const StyledDotsCircleTwo = styled(StyledDotsCircle).attrs(() => ({
59
+ cx: 40
60
+ })).withConfig({
158
61
  displayName: "StyledDots__StyledDotsCircleTwo",
159
62
  componentId: "sc-1ltah7e-2"
160
- })(["animation:", ";"], function (_ref2) {
161
- var duration = _ref2.duration;
63
+ })(["animation:", ";"], _ref2 => {
64
+ let {
65
+ duration
66
+ } = _ref2;
162
67
  return css(["", " ", "ms linear infinite"], dotTwoKeyframes, duration);
163
68
  });
164
69
  StyledDotsCircleTwo.defaultProps = {
165
70
  theme: DEFAULT_THEME
166
71
  };
167
- var StyledDotsCircleThree = styled(StyledDotsCircle).attrs(function () {
168
- return {
169
- cx: 71
170
- };
171
- }).withConfig({
72
+ const StyledDotsCircleThree = styled(StyledDotsCircle).attrs(() => ({
73
+ cx: 71
74
+ })).withConfig({
172
75
  displayName: "StyledDots__StyledDotsCircleThree",
173
76
  componentId: "sc-1ltah7e-3"
174
- })(["animation:", ";"], function (_ref3) {
175
- var duration = _ref3.duration;
77
+ })(["animation:", ";"], _ref3 => {
78
+ let {
79
+ duration
80
+ } = _ref3;
176
81
  return css(["", " ", "ms linear infinite"], dotThreeKeyframes, duration);
177
82
  });
178
83
  StyledDotsCircleThree.defaultProps = {
179
84
  theme: DEFAULT_THEME
180
85
  };
181
86
 
182
- var COMPONENT_ID$5 = 'loaders.loading_placeholder';
183
- var StyledLoadingPlaceholder = styled.div.attrs({
87
+ const COMPONENT_ID$5 = 'loaders.loading_placeholder';
88
+ const StyledLoadingPlaceholder = styled.div.attrs({
184
89
  'data-garden-id': COMPONENT_ID$5,
185
- 'data-garden-version': '8.57.1',
90
+ 'data-garden-version': '8.58.0',
186
91
  role: 'progressbar'
187
92
  }).withConfig({
188
93
  displayName: "StyledLoadingPlaceholder",
189
94
  componentId: "sc-x3bwsx-0"
190
- })(["display:inline-block;width:", ";height:", ";font-size:", ";", ""], function (props) {
191
- return props.width || '1em';
192
- }, function (props) {
193
- return props.height || '0.9em';
194
- }, function (props) {
195
- return props.fontSize;
196
- }, function (props) {
197
- return retrieveComponentStyles(COMPONENT_ID$5, props);
198
- });
95
+ })(["display:inline-block;width:", ";height:", ";font-size:", ";", ""], props => props.width || '1em', props => props.height || '0.9em', props => props.fontSize, props => retrieveComponentStyles(COMPONENT_ID$5, props));
199
96
  StyledLoadingPlaceholder.defaultProps = {
200
97
  theme: DEFAULT_THEME
201
98
  };
202
99
 
203
- var sizeToHeight = function sizeToHeight(size, theme) {
100
+ const sizeToHeight = (size, theme) => {
204
101
  switch (size) {
205
102
  case 'small':
206
103
  return theme.space.base / 2;
@@ -210,115 +107,85 @@ var sizeToHeight = function sizeToHeight(size, theme) {
210
107
  return theme.space.base * 3;
211
108
  }
212
109
  };
213
- var sizeToBorderRadius = function sizeToBorderRadius(size, theme) {
214
- return sizeToHeight(size, theme) / 2;
215
- };
216
- var PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
217
- var StyledProgressBackground = styled.div.attrs(function (props) {
218
- return {
219
- 'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
220
- 'data-garden-version': '8.57.1',
221
- borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
222
- };
223
- }).withConfig({
110
+ const sizeToBorderRadius = (size, theme) => sizeToHeight(size, theme) / 2;
111
+ const PROGRESS_BACKGROUND_COMPONENT_ID = 'loaders.progress_background';
112
+ const StyledProgressBackground = styled.div.attrs(props => ({
113
+ 'data-garden-id': PROGRESS_BACKGROUND_COMPONENT_ID,
114
+ 'data-garden-version': '8.58.0',
115
+ borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
116
+ })).withConfig({
224
117
  displayName: "StyledProgress__StyledProgressBackground",
225
118
  componentId: "sc-2g8w4s-0"
226
- })(["margin:", "px 0;border-radius:", "px;background-color:", ";color:", ";", ""], function (props) {
227
- return props.theme.space.base * 2;
228
- }, function (props) {
229
- return props.borderRadius;
230
- }, function (props) {
231
- return getColor('neutralHue', 200, props.theme);
232
- }, function (props) {
233
- return props.color || getColor('successHue', 600, props.theme);
234
- }, function (props) {
235
- return retrieveComponentStyles(PROGRESS_BACKGROUND_COMPONENT_ID, props);
236
- });
119
+ })(["margin:", "px 0;border-radius:", "px;background-color:", ";color:", ";", ""], props => props.theme.space.base * 2, props => props.borderRadius, props => getColor('neutralHue', 200, props.theme), props => props.color || getColor('successHue', 600, props.theme), props => retrieveComponentStyles(PROGRESS_BACKGROUND_COMPONENT_ID, props));
237
120
  StyledProgressBackground.defaultProps = {
238
121
  theme: DEFAULT_THEME
239
122
  };
240
- var PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
241
- var StyledProgressIndicator = styled.div.attrs(function (props) {
242
- return {
243
- 'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
244
- 'data-garden-version': '8.57.1',
245
- height: props.height || sizeToHeight(props.size, props.theme),
246
- borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
247
- };
248
- }).withConfig({
123
+ const PROGESS_INDICATOR_COMPONENT_ID = 'loaders.progress_indicator';
124
+ const StyledProgressIndicator = styled.div.attrs(props => ({
125
+ 'data-garden-id': PROGESS_INDICATOR_COMPONENT_ID,
126
+ 'data-garden-version': '8.58.0',
127
+ height: props.height || sizeToHeight(props.size, props.theme),
128
+ borderRadius: props.borderRadius || sizeToBorderRadius(props.size, props.theme)
129
+ })).withConfig({
249
130
  displayName: "StyledProgress__StyledProgressIndicator",
250
131
  componentId: "sc-2g8w4s-1"
251
- })(["transition:width 0.1s ease-in-out;border-radius:", "px;background:currentColor;width:", "%;height:", "px;", ""], function (props) {
252
- return props.borderRadius;
253
- }, function (props) {
254
- return props.value;
255
- }, function (props) {
256
- return props.height;
257
- }, function (props) {
258
- return retrieveComponentStyles(PROGESS_INDICATOR_COMPONENT_ID, props);
259
- });
132
+ })(["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));
260
133
  StyledProgressIndicator.defaultProps = {
261
134
  theme: DEFAULT_THEME
262
135
  };
263
136
 
264
- var COMPONENT_ID$4 = 'loaders.skeleton';
265
- var fadeInAnimation = keyframes(["0%,60%{opacity:0;}100%{opacity:1;}"]);
266
- var skeletonAnimation = keyframes(["100%{left:100%;}"]);
267
- var skeletonRtlAnimation = keyframes(["100%{right:100%;}"]);
268
- var retrieveSkeletonBackgroundColor = function retrieveSkeletonBackgroundColor(_ref) {
269
- var theme = _ref.theme,
270
- isLight = _ref.isLight;
137
+ const COMPONENT_ID$4 = 'loaders.skeleton';
138
+ const fadeInAnimation = keyframes(["0%,60%{opacity:0;}100%{opacity:1;}"]);
139
+ const skeletonAnimation = keyframes(["100%{left:100%;}"]);
140
+ const skeletonRtlAnimation = keyframes(["100%{right:100%;}"]);
141
+ const retrieveSkeletonBackgroundColor = _ref => {
142
+ let {
143
+ theme,
144
+ isLight
145
+ } = _ref;
271
146
  if (isLight) {
272
147
  return css(["background-color:", ";"], rgba(theme.colors.background, 0.2));
273
148
  }
274
149
  return css(["background-color:", ";"], getColor('neutralHue', 800, theme, 0.1));
275
150
  };
276
- var retrieveSkeletonAnimation = function retrieveSkeletonAnimation(_ref2) {
277
- var theme = _ref2.theme;
151
+ const retrieveSkeletonAnimation = _ref2 => {
152
+ let {
153
+ theme
154
+ } = _ref2;
278
155
  if (theme.rtl) {
279
156
  return css(["right:-1800px;animation:", " 1.5s ease-in-out 300ms infinite;"], skeletonRtlAnimation);
280
157
  }
281
158
  return css(["left:-1800px;animation:", " 1.5s ease-in-out 300ms infinite;"], skeletonAnimation);
282
159
  };
283
- var retrieveSkeletonGradient = function retrieveSkeletonGradient(_ref3) {
284
- var theme = _ref3.theme,
285
- isLight = _ref3.isLight;
160
+ const retrieveSkeletonGradient = _ref3 => {
161
+ let {
162
+ theme,
163
+ isLight
164
+ } = _ref3;
286
165
  return css(["background-image:linear-gradient( ", ",transparent,", ",transparent );"], theme.rtl ? '-45deg' : '45deg', isLight ? getColor('chromeHue', 700, theme, 0.4) : rgba(theme.colors.background, 0.6));
287
166
  };
288
- var StyledSkeleton = styled.div.attrs({
167
+ const StyledSkeleton = styled.div.attrs({
289
168
  'data-garden-id': COMPONENT_ID$4,
290
- 'data-garden-version': '8.57.1'
169
+ 'data-garden-version': '8.58.0'
291
170
  }).withConfig({
292
171
  displayName: "StyledSkeleton",
293
172
  componentId: "sc-1raozze-0"
294
- })(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";width:", ";height:", ";overflow:hidden;line-height:", ";", " &::before{position:absolute;top:0;width:1000px;height:100%;content:'';", " ", "}", ";"], fadeInAnimation, function (props) {
295
- return props.theme.borderRadii.md;
296
- }, function (props) {
297
- return props.customWidth;
298
- }, function (props) {
299
- return props.customHeight;
300
- }, function (props) {
301
- return getLineHeight(props.theme.fontSizes.sm, props.theme.space.base * 5);
302
- }, retrieveSkeletonBackgroundColor, retrieveSkeletonAnimation, retrieveSkeletonGradient, function (props) {
303
- return retrieveComponentStyles(COMPONENT_ID$4, props);
304
- });
173
+ })(["display:inline-block;position:relative;animation:", " 750ms linear;border-radius:", ";width:", ";height:", ";overflow:hidden;line-height:", ";", " &::before{position:absolute;top:0;width:1000px;height:100%;content:'';", " ", "}", ";"], fadeInAnimation, props => props.theme.borderRadii.md, props => props.customWidth, props => props.customHeight, props => getLineHeight(props.theme.fontSizes.sm, props.theme.space.base * 5), retrieveSkeletonBackgroundColor, retrieveSkeletonAnimation, retrieveSkeletonGradient, props => retrieveComponentStyles(COMPONENT_ID$4, props));
305
174
  StyledSkeleton.defaultProps = {
306
175
  theme: DEFAULT_THEME
307
176
  };
308
177
 
309
- var StyledSpinnerCircle = styled.circle.attrs(function (props) {
310
- return {
311
- cx: 40,
312
- cy: 40,
313
- r: 34,
314
- fill: 'none',
315
- stroke: 'currentColor',
316
- strokeLinecap: 'round',
317
- strokeWidth: props.strokeWidthValue,
318
- strokeDasharray: "".concat(props.dasharrayValue, " 250"),
319
- transform: props.transform
320
- };
321
- }).withConfig({
178
+ const StyledSpinnerCircle = styled.circle.attrs(props => ({
179
+ cx: 40,
180
+ cy: 40,
181
+ r: 34,
182
+ fill: 'none',
183
+ stroke: 'currentColor',
184
+ strokeLinecap: 'round',
185
+ strokeWidth: props.strokeWidthValue,
186
+ strokeDasharray: `${props.dasharrayValue} 250`,
187
+ transform: props.transform
188
+ })).withConfig({
322
189
  displayName: "StyledSpinnerCircle",
323
190
  componentId: "sc-o4kd70-0"
324
191
  })([""]);
@@ -326,37 +193,25 @@ StyledSpinnerCircle.defaultProps = {
326
193
  theme: DEFAULT_THEME
327
194
  };
328
195
 
329
- var StyledSVG = styled.svg.attrs(function (props) {
330
- return {
331
- 'data-garden-version': '8.57.1',
332
- xmlns: 'http://www.w3.org/2000/svg',
333
- width: props.width,
334
- height: props.height,
335
- focusable: 'false',
336
- viewBox: "0 0 ".concat(props.width, " ").concat(props.height),
337
- role: 'progressbar'
338
- };
339
- }).withConfig({
196
+ const StyledSVG = styled.svg.attrs(props => ({
197
+ 'data-garden-version': '8.58.0',
198
+ xmlns: 'http://www.w3.org/2000/svg',
199
+ width: props.width,
200
+ height: props.height,
201
+ focusable: 'false',
202
+ viewBox: `0 0 ${props.width} ${props.height}`,
203
+ role: 'progressbar'
204
+ })).withConfig({
340
205
  displayName: "StyledSVG",
341
206
  componentId: "sc-1xtc3kx-0"
342
- })(["width:", ";height:", ";color:", ";font-size:", ";", ";"], function (props) {
343
- return props.containerWidth || '1em';
344
- }, function (props) {
345
- return props.containerHeight || '0.9em';
346
- }, function (props) {
347
- return props.color || 'inherit';
348
- }, function (props) {
349
- return props.fontSize || 'inherit';
350
- }, function (props) {
351
- return retrieveComponentStyles(props.dataGardenId, props);
352
- });
207
+ })(["width:", ";height:", ";color:", ";font-size:", ";", ";"], props => props.containerWidth || '1em', props => props.containerHeight || '0.9em', props => props.color || 'inherit', props => props.fontSize || 'inherit', props => retrieveComponentStyles(props.dataGardenId, props));
353
208
  StyledSVG.defaultProps = {
354
209
  theme: DEFAULT_THEME
355
210
  };
356
211
 
357
- var COMPONENT_ID$3 = 'loaders.inline';
358
- var PULSE_ANIMATION = keyframes(["0%,100%{opacity:.2;}50%{opacity:.8;}"]);
359
- var StyledCircle = styled.circle.attrs({
212
+ const COMPONENT_ID$3 = 'loaders.inline';
213
+ const PULSE_ANIMATION = keyframes(["0%,100%{opacity:.2;}50%{opacity:.8;}"]);
214
+ const StyledCircle = styled.circle.attrs({
360
215
  fill: 'currentColor',
361
216
  cy: 2,
362
217
  r: 2
@@ -367,57 +222,49 @@ var StyledCircle = styled.circle.attrs({
367
222
  StyledCircle.defaultProps = {
368
223
  theme: DEFAULT_THEME
369
224
  };
370
- var StyledInline = styled.svg.attrs(function (props) {
371
- return {
372
- 'data-garden-id': COMPONENT_ID$3,
373
- 'data-garden-version': '8.57.1',
374
- viewBox: '0 0 16 4',
375
- width: props.size,
376
- height: props.size * 0.25
377
- };
378
- }).withConfig({
225
+ const StyledInline = styled.svg.attrs(props => ({
226
+ 'data-garden-id': COMPONENT_ID$3,
227
+ 'data-garden-version': '8.58.0',
228
+ viewBox: '0 0 16 4',
229
+ width: props.size,
230
+ height: props.size * 0.25
231
+ })).withConfig({
379
232
  displayName: "StyledInline",
380
233
  componentId: "sc-fxsb9l-1"
381
- })(["color:", ";", "{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:", ";}}", ""], function (props) {
382
- return props.color;
383
- }, StyledCircle, PULSE_ANIMATION, function (props) {
384
- return props.theme.rtl ? 'unset' : '0.4s';
385
- }, PULSE_ANIMATION, PULSE_ANIMATION, function (props) {
386
- return props.theme.rtl ? '0.4s' : 'unset';
387
- }, function (props) {
388
- return retrieveComponentStyles(COMPONENT_ID$3, props);
389
- });
234
+ })(["color:", ";", "{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:", ";}}", ""], props => props.color, StyledCircle, PULSE_ANIMATION, props => props.theme.rtl ? 'unset' : '0.4s', PULSE_ANIMATION, PULSE_ANIMATION, props => props.theme.rtl ? '0.4s' : 'unset', props => retrieveComponentStyles(COMPONENT_ID$3, props));
390
235
  StyledInline.defaultProps = {
391
236
  theme: DEFAULT_THEME
392
237
  };
393
238
 
394
- var _excluded$4 = ["size", "color", "duration", "delayMS"];
395
- var COMPONENT_ID$2 = 'loaders.dots';
396
- var Dots = forwardRef(function (_ref, ref) {
397
- var size = _ref.size,
398
- color = _ref.color,
399
- duration = _ref.duration,
400
- delayMS = _ref.delayMS,
401
- other = _objectWithoutProperties(_ref, _excluded$4);
402
- var theme = useContext(ThemeContext);
403
- var environment = useDocument(theme);
404
- var canTransformSVG = useRef(null);
239
+ const COMPONENT_ID$2 = 'loaders.dots';
240
+ const Dots = forwardRef((_ref, ref) => {
241
+ let {
242
+ size,
243
+ color,
244
+ duration,
245
+ delayMS,
246
+ ...other
247
+ } = _ref;
248
+ const theme = useContext(ThemeContext);
249
+ const environment = useDocument(theme);
250
+ const canTransformSVG = useRef(null);
405
251
  if (environment && canTransformSVG.current === null) {
406
- var svg = environment.createElementNS('http://www.w3.org/2000/svg', 'svg');
252
+ const svg = environment.createElementNS('http://www.w3.org/2000/svg', 'svg');
407
253
  canTransformSVG.current = 'transform' in svg;
408
254
  }
409
- var _useSchedule = useSchedule({
410
- duration: duration,
411
- delayMS: delayMS,
255
+ const {
256
+ delayComplete
257
+ } = useSchedule({
258
+ duration,
259
+ delayMS,
412
260
  loop: true
413
- }),
414
- delayComplete = _useSchedule.delayComplete;
415
- var dotOne = useRef(null);
416
- var dotTwo = useRef(null);
417
- var dotThree = useRef(null);
418
- useEffect(function () {
261
+ });
262
+ const dotOne = useRef(null);
263
+ const dotTwo = useRef(null);
264
+ const dotThree = useRef(null);
265
+ useEffect(() => {
419
266
  if (!canTransformSVG.current && delayComplete) {
420
- var transforms = [window.getComputedStyle(dotOne.current).getPropertyValue('transform'), window.getComputedStyle(dotTwo.current).getPropertyValue('transform'), window.getComputedStyle(dotThree.current).getPropertyValue('transform')];
267
+ const transforms = [window.getComputedStyle(dotOne.current).getPropertyValue('transform'), window.getComputedStyle(dotTwo.current).getPropertyValue('transform'), window.getComputedStyle(dotThree.current).getPropertyValue('transform')];
421
268
  dotOne.current.setAttribute('transform', transforms[0]);
422
269
  dotTwo.current.setAttribute('transform', transforms[1]);
423
270
  dotThree.current.setAttribute('transform', transforms[2]);
@@ -462,24 +309,30 @@ Dots.defaultProps = {
462
309
  delayMS: 750
463
310
  };
464
311
 
465
- var SIZE = ['small', 'medium', 'large'];
466
-
467
- var _excluded$3 = ["value", "size"];
468
- var COMPONENT_ID$1 = 'loaders.progress';
469
- var Progress = React.forwardRef(function (_ref, ref) {
470
- var value = _ref.value,
471
- size = _ref.size,
472
- other = _objectWithoutProperties(_ref, _excluded$3);
473
- var percentage = Math.max(0, Math.min(100, value));
312
+ const SIZE = ['small', 'medium', 'large'];
313
+
314
+ const COMPONENT_ID$1 = 'loaders.progress';
315
+ const Progress = React.forwardRef((_ref, ref) => {
316
+ let {
317
+ value,
318
+ size,
319
+ 'aria-label': label,
320
+ ...other
321
+ } = _ref;
322
+ const percentage = Math.max(0, Math.min(100, value));
323
+ const ariaLabel = useText(Progress, {
324
+ 'aria-label': label
325
+ }, 'aria-label', 'Progress');
474
326
  return React.createElement(StyledProgressBackground, _extends({
475
327
  "data-garden-id": COMPONENT_ID$1,
476
- "data-garden-version": '8.57.1',
328
+ "data-garden-version": '8.58.0',
477
329
  "aria-valuemax": 100,
478
330
  "aria-valuemin": 0,
479
331
  "aria-valuenow": percentage,
480
332
  role: "progressbar",
481
333
  size: size,
482
- ref: ref
334
+ ref: ref,
335
+ "aria-label": ariaLabel
483
336
  }, other), React.createElement(StyledProgressIndicator, {
484
337
  value: percentage,
485
338
  size: size
@@ -496,12 +349,13 @@ Progress.defaultProps = {
496
349
  size: 'medium'
497
350
  };
498
351
 
499
- var _excluded$2 = ["width", "height", "isLight"];
500
- var Skeleton = forwardRef(function (_ref, ref) {
501
- var width = _ref.width,
502
- height = _ref.height,
503
- isLight = _ref.isLight,
504
- other = _objectWithoutProperties(_ref, _excluded$2);
352
+ const Skeleton = forwardRef((_ref, ref) => {
353
+ let {
354
+ width,
355
+ height,
356
+ isLight,
357
+ ...other
358
+ } = _ref;
505
359
  return React.createElement(StyledSkeleton, _extends({
506
360
  ref: ref,
507
361
  isLight: isLight,
@@ -520,7 +374,7 @@ Skeleton.defaultProps = {
520
374
  height: '100%'
521
375
  };
522
376
 
523
- var STROKE_WIDTH_FRAMES = {
377
+ const STROKE_WIDTH_FRAMES = {
524
378
  0: 6,
525
379
  14: 5,
526
380
  26: 4,
@@ -531,7 +385,7 @@ var STROKE_WIDTH_FRAMES = {
531
385
  80: 5,
532
386
  91: 6
533
387
  };
534
- var ROTATION_FRAMES = {
388
+ const ROTATION_FRAMES = {
535
389
  0: -90,
536
390
  8: -81,
537
391
  36: -30,
@@ -558,7 +412,7 @@ var ROTATION_FRAMES = {
558
412
  90: 243,
559
413
  99: 270
560
414
  };
561
- var DASHARRAY_FRAMES = {
415
+ const DASHARRAY_FRAMES = {
562
416
  0: 0,
563
417
  13: 2,
564
418
  26: 13,
@@ -584,24 +438,18 @@ var DASHARRAY_FRAMES = {
584
438
  99: 0
585
439
  };
586
440
 
587
- var _excluded$1 = ["size", "duration", "color", "delayMS"];
588
- var COMPONENT_ID = 'loaders.spinner';
589
- var TOTAL_FRAMES = 100;
590
- var computeFrames = function computeFrames(frames, duration) {
591
- return Object.entries(frames).reduce(function (acc, item, index, arr) {
592
- var _item = _slicedToArray(item, 2),
593
- frame = _item[0],
594
- value = _item[1];
595
- var _ref = arr[index + 1] || [TOTAL_FRAMES, arr[0][1]],
596
- _ref2 = _slicedToArray(_ref, 2),
597
- nextFrame = _ref2[0],
598
- nextValue = _ref2[1];
599
- var diff = parseInt(nextFrame, 10) - parseInt(frame, 10);
600
- var frameHz = 1000 / 60;
601
- var subDuration = duration / (TOTAL_FRAMES - 1) * diff;
602
- var lastValue = value;
441
+ const COMPONENT_ID = 'loaders.spinner';
442
+ const TOTAL_FRAMES = 100;
443
+ const computeFrames = (frames, duration) => {
444
+ return Object.entries(frames).reduce((acc, item, index, arr) => {
445
+ const [frame, value] = item;
446
+ const [nextFrame, nextValue] = arr[index + 1] || [TOTAL_FRAMES, arr[0][1]];
447
+ const diff = parseInt(nextFrame, 10) - parseInt(frame, 10);
448
+ const frameHz = 1000 / 60;
449
+ let subDuration = duration / (TOTAL_FRAMES - 1) * diff;
450
+ let lastValue = value;
603
451
  acc[frame] = value;
604
- for (var idx = 0; idx < diff; idx++) {
452
+ for (let idx = 0; idx < diff; idx++) {
605
453
  lastValue = lastValue + (nextValue - lastValue) * (frameHz / subDuration);
606
454
  subDuration = duration / (TOTAL_FRAMES - 1) * (diff - idx);
607
455
  acc[parseInt(frame, 10) + idx + 1] = lastValue;
@@ -610,27 +458,30 @@ var computeFrames = function computeFrames(frames, duration) {
610
458
  return acc;
611
459
  }, {});
612
460
  };
613
- var Spinner = forwardRef(function (_ref3, ref) {
614
- var size = _ref3.size,
615
- duration = _ref3.duration,
616
- color = _ref3.color,
617
- delayMS = _ref3.delayMS,
618
- other = _objectWithoutProperties(_ref3, _excluded$1);
619
- var strokeWidthValues = computeFrames(STROKE_WIDTH_FRAMES, duration);
620
- var rotationValues = computeFrames(ROTATION_FRAMES, duration);
621
- var dasharrayValues = computeFrames(DASHARRAY_FRAMES, duration);
622
- var _useSchedule = useSchedule({
623
- duration: duration,
624
- delayMS: delayMS
625
- }),
626
- elapsed = _useSchedule.elapsed,
627
- delayComplete = _useSchedule.delayComplete;
628
- var frame = (elapsed * 100).toFixed(0);
629
- var strokeWidthValue = strokeWidthValues[frame];
630
- var rotationValue = rotationValues[frame];
631
- var dasharrayValue = dasharrayValues[frame];
632
- var WIDTH = 80;
633
- var HEIGHT = 80;
461
+ const Spinner = forwardRef((_ref, ref) => {
462
+ let {
463
+ size,
464
+ duration,
465
+ color,
466
+ delayMS,
467
+ ...other
468
+ } = _ref;
469
+ const strokeWidthValues = computeFrames(STROKE_WIDTH_FRAMES, duration);
470
+ const rotationValues = computeFrames(ROTATION_FRAMES, duration);
471
+ const dasharrayValues = computeFrames(DASHARRAY_FRAMES, duration);
472
+ const {
473
+ elapsed,
474
+ delayComplete
475
+ } = useSchedule({
476
+ duration,
477
+ delayMS
478
+ });
479
+ const frame = (elapsed * 100).toFixed(0);
480
+ const strokeWidthValue = strokeWidthValues[frame];
481
+ const rotationValue = rotationValues[frame];
482
+ const dasharrayValue = dasharrayValues[frame];
483
+ const WIDTH = 80;
484
+ const HEIGHT = 80;
634
485
  if (!delayComplete && delayMS !== 0) {
635
486
  return React.createElement(StyledLoadingPlaceholder, {
636
487
  width: "1em",
@@ -650,7 +501,7 @@ var Spinner = forwardRef(function (_ref3, ref) {
650
501
  }, other), React.createElement(StyledSpinnerCircle, {
651
502
  dasharrayValue: dasharrayValue,
652
503
  strokeWidthValue: strokeWidthValue,
653
- transform: "rotate(".concat(rotationValue, ", ").concat(WIDTH / 2, ", ").concat(HEIGHT / 2, ")")
504
+ transform: `rotate(${rotationValue}, ${WIDTH / 2}, ${HEIGHT / 2})`
654
505
  }));
655
506
  });
656
507
  Spinner.displayName = 'Spinner';
@@ -667,12 +518,13 @@ Spinner.defaultProps = {
667
518
  delayMS: 750
668
519
  };
669
520
 
670
- var _excluded = ["size", "color"];
671
- var Inline = forwardRef(function (_ref, ref) {
672
- var size = _ref.size,
673
- color = _ref.color,
674
- other = _objectWithoutProperties(_ref, _excluded);
675
- var ariaLabel = useText(Inline, other, 'aria-label', 'loading');
521
+ const Inline = forwardRef((_ref, ref) => {
522
+ let {
523
+ size,
524
+ color,
525
+ ...other
526
+ } = _ref;
527
+ const ariaLabel = useText(Inline, other, 'aria-label', 'loading');
676
528
  return React.createElement(StyledInline, _extends({
677
529
  ref: ref,
678
530
  size: size,