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