@zendeskgarden/react-modals 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
@@ -17,175 +17,21 @@ import mergeRefs from 'react-merge-refs';
17
17
  import { usePopper } from 'react-popper';
18
18
  import { CSSTransition } from 'react-transition-group';
19
19
 
20
- function ownKeys(object, enumerableOnly) {
21
- var keys = Object.keys(object);
22
-
23
- if (Object.getOwnPropertySymbols) {
24
- var symbols = Object.getOwnPropertySymbols(object);
25
- enumerableOnly && (symbols = symbols.filter(function (sym) {
26
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
27
- })), keys.push.apply(keys, symbols);
28
- }
29
-
30
- return keys;
31
- }
32
-
33
- function _objectSpread2(target) {
34
- for (var i = 1; i < arguments.length; i++) {
35
- var source = null != arguments[i] ? arguments[i] : {};
36
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
37
- _defineProperty(target, key, source[key]);
38
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
39
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
40
- });
41
- }
42
-
43
- return target;
44
- }
45
-
46
- function _defineProperty(obj, key, value) {
47
- if (key in obj) {
48
- Object.defineProperty(obj, key, {
49
- value: value,
50
- enumerable: true,
51
- configurable: true,
52
- writable: true
53
- });
54
- } else {
55
- obj[key] = value;
56
- }
57
-
58
- return obj;
59
- }
60
-
61
20
  function _extends$2() {
62
21
  _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
63
22
  for (var i = 1; i < arguments.length; i++) {
64
23
  var source = arguments[i];
65
-
66
24
  for (var key in source) {
67
25
  if (Object.prototype.hasOwnProperty.call(source, key)) {
68
26
  target[key] = source[key];
69
27
  }
70
28
  }
71
29
  }
72
-
73
30
  return target;
74
31
  };
75
32
  return _extends$2.apply(this, arguments);
76
33
  }
77
34
 
78
- function _objectWithoutPropertiesLoose(source, excluded) {
79
- if (source == null) return {};
80
- var target = {};
81
- var sourceKeys = Object.keys(source);
82
- var key, i;
83
-
84
- for (i = 0; i < sourceKeys.length; i++) {
85
- key = sourceKeys[i];
86
- if (excluded.indexOf(key) >= 0) continue;
87
- target[key] = source[key];
88
- }
89
-
90
- return target;
91
- }
92
-
93
- function _objectWithoutProperties(source, excluded) {
94
- if (source == null) return {};
95
-
96
- var target = _objectWithoutPropertiesLoose(source, excluded);
97
-
98
- var key, i;
99
-
100
- if (Object.getOwnPropertySymbols) {
101
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
102
-
103
- for (i = 0; i < sourceSymbolKeys.length; i++) {
104
- key = sourceSymbolKeys[i];
105
- if (excluded.indexOf(key) >= 0) continue;
106
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
107
- target[key] = source[key];
108
- }
109
- }
110
-
111
- return target;
112
- }
113
-
114
- function _slicedToArray(arr, i) {
115
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
116
- }
117
-
118
- function _toConsumableArray(arr) {
119
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
120
- }
121
-
122
- function _arrayWithoutHoles(arr) {
123
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
124
- }
125
-
126
- function _arrayWithHoles(arr) {
127
- if (Array.isArray(arr)) return arr;
128
- }
129
-
130
- function _iterableToArray(iter) {
131
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
132
- }
133
-
134
- function _iterableToArrayLimit(arr, i) {
135
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
136
-
137
- if (_i == null) return;
138
- var _arr = [];
139
- var _n = true;
140
- var _d = false;
141
-
142
- var _s, _e;
143
-
144
- try {
145
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
146
- _arr.push(_s.value);
147
-
148
- if (i && _arr.length === i) break;
149
- }
150
- } catch (err) {
151
- _d = true;
152
- _e = err;
153
- } finally {
154
- try {
155
- if (!_n && _i["return"] != null) _i["return"]();
156
- } finally {
157
- if (_d) throw _e;
158
- }
159
- }
160
-
161
- return _arr;
162
- }
163
-
164
- function _unsupportedIterableToArray(o, minLen) {
165
- if (!o) return;
166
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
167
- var n = Object.prototype.toString.call(o).slice(8, -1);
168
- if (n === "Object" && o.constructor) n = o.constructor.name;
169
- if (n === "Map" || n === "Set") return Array.from(o);
170
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
171
- }
172
-
173
- function _arrayLikeToArray(arr, len) {
174
- if (len == null || len > arr.length) len = arr.length;
175
-
176
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
177
-
178
- return arr2;
179
- }
180
-
181
- function _nonIterableSpread() {
182
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
183
- }
184
-
185
- function _nonIterableRest() {
186
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
187
- }
188
-
189
35
  function isDocument(element) {
190
36
  return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;
191
37
  }
@@ -266,29 +112,15 @@ function scrollbarSize(recalc) {
266
112
  return size;
267
113
  }
268
114
 
269
- var COMPONENT_ID$j = 'modals.backdrop';
270
- var animationName$1 = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
271
- var StyledBackdrop = styled.div.attrs({
115
+ const COMPONENT_ID$j = 'modals.backdrop';
116
+ const animationName$1 = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
117
+ const StyledBackdrop = styled.div.attrs({
272
118
  'data-garden-id': COMPONENT_ID$j,
273
- 'data-garden-version': '8.57.1'
119
+ 'data-garden-version': '8.58.0'
274
120
  }).withConfig({
275
121
  displayName: "StyledBackdrop",
276
122
  componentId: "sc-mzdjpo-0"
277
- })(["display:flex;position:fixed;top:0;right:0;bottom:0;left:0;align-items:", ";justify-content:", ";z-index:400;background-color:", ";overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";animation:", ";", ";"], function (props) {
278
- return props.isCentered && 'center';
279
- }, function (props) {
280
- return props.isCentered && 'center';
281
- }, function (props) {
282
- return getColor('neutralHue', 800, props.theme, 0.85);
283
- }, function (props) {
284
- return props.theme.fonts.system;
285
- }, function (props) {
286
- return props.theme.rtl && 'rtl';
287
- }, function (props) {
288
- return props.isAnimated && css(["", " 0.15s ease-in"], animationName$1);
289
- }, function (props) {
290
- return retrieveComponentStyles(COMPONENT_ID$j, props);
291
- });
123
+ })(["display:flex;position:fixed;top:0;right:0;bottom:0;left:0;align-items:", ";justify-content:", ";z-index:400;background-color:", ";overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";animation:", ";", ";"], props => props.isCentered && 'center', props => props.isCentered && 'center', props => getColor('neutralHue', 800, props.theme, 0.85), props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', props => props.isAnimated && css(["", " 0.15s ease-in"], animationName$1), props => retrieveComponentStyles(COMPONENT_ID$j, props));
292
124
  StyledBackdrop.defaultProps = {
293
125
  theme: DEFAULT_THEME
294
126
  };
@@ -297,128 +129,72 @@ StyledBackdrop.propTypes = {
297
129
  isAnimated: PropTypes.bool
298
130
  };
299
131
 
300
- var COMPONENT_ID$i = 'modals.body';
301
- var StyledBody = styled.div.attrs({
132
+ const COMPONENT_ID$i = 'modals.body';
133
+ const StyledBody = styled.div.attrs({
302
134
  'data-garden-id': COMPONENT_ID$i,
303
- 'data-garden-version': '8.57.1'
135
+ 'data-garden-version': '8.58.0'
304
136
  }).withConfig({
305
137
  displayName: "StyledBody",
306
138
  componentId: "sc-14rzecg-0"
307
- })(["display:block;margin:0;padding:", ";height:100%;overflow:auto;line-height:", ";color:", ";font-size:", ";", ";"], function (props) {
308
- return "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base * 10, "px");
309
- }, function (props) {
310
- return getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md);
311
- }, function (props) {
312
- return props.theme.colors.foreground;
313
- }, function (props) {
314
- return props.theme.fontSizes.md;
315
- }, function (props) {
316
- return retrieveComponentStyles(COMPONENT_ID$i, props);
317
- });
139
+ })(["display:block;margin:0;padding:", ";height:100%;overflow:auto;line-height:", ";color:", ";font-size:", ";", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID$i, props));
318
140
  StyledBody.defaultProps = {
319
141
  theme: DEFAULT_THEME
320
142
  };
321
143
 
322
- var COMPONENT_ID$h = 'modals.close';
323
- var colorStyles = function colorStyles(props) {
324
- var backgroundColor = 'primaryHue';
325
- var foregroundColor = 'neutralHue';
144
+ const COMPONENT_ID$h = 'modals.close';
145
+ const colorStyles = props => {
146
+ const backgroundColor = 'primaryHue';
147
+ const foregroundColor = 'neutralHue';
326
148
  return css(["background-color:transparent;color:", ";&:hover{background-color:", ";color:", ";}&[data-garden-focus-visible]{box-shadow:", ";}&:active{transition:background-color 0.1s ease-in-out,color 0.1s ease-in-out;background-color:", ";color:", ";}"], getColor(foregroundColor, 600, props.theme), getColor(backgroundColor, 600, props.theme, 0.08), getColor(foregroundColor, 700, props.theme), props.theme.shadows.md(getColor(backgroundColor, 600, props.theme, 0.35)), getColor(backgroundColor, 600, props.theme, 0.2), getColor(foregroundColor, 800, props.theme));
327
149
  };
328
- var BASE_MULTIPLIERS$1 = {
150
+ const BASE_MULTIPLIERS$1 = {
329
151
  top: 2.5,
330
152
  side: 6.5,
331
153
  size: 10
332
154
  };
333
- var StyledClose = styled.button.attrs({
155
+ const StyledClose = styled.button.attrs({
334
156
  'data-garden-id': COMPONENT_ID$h,
335
- 'data-garden-version': '8.57.1'
157
+ 'data-garden-version': '8.58.0'
336
158
  }).withConfig({
337
159
  displayName: "StyledClose",
338
160
  componentId: "sc-iseudj-0"
339
- })(["display:block;position:absolute;top:", "px;", ":", ";transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:none;border-radius:50%;background-color:transparent;cursor:pointer;padding:0;width:", "px;height:", "px;overflow:hidden;text-decoration:none;font-size:0;user-select:none;&::-moz-focus-inner{border:0;}&:focus{outline:none;}", " & > svg{vertical-align:middle;}", ";"], function (props) {
340
- return props.theme.space.base * BASE_MULTIPLIERS$1.top;
341
- }, function (props) {
342
- return props.theme.rtl ? 'left' : 'right';
343
- }, function (props) {
344
- return "".concat(props.theme.space.base * BASE_MULTIPLIERS$1.side, "px");
345
- }, function (props) {
346
- return props.theme.space.base * BASE_MULTIPLIERS$1.size;
347
- }, function (props) {
348
- return props.theme.space.base * BASE_MULTIPLIERS$1.size;
349
- }, function (props) {
350
- return colorStyles(props);
351
- }, function (props) {
352
- return retrieveComponentStyles(COMPONENT_ID$h, props);
353
- });
161
+ })(["display:block;position:absolute;top:", "px;", ":", ";transition:box-shadow 0.1s ease-in-out,background-color 0.25s ease-in-out,color 0.25s ease-in-out;border:none;border-radius:50%;background-color:transparent;cursor:pointer;padding:0;width:", "px;height:", "px;overflow:hidden;text-decoration:none;font-size:0;user-select:none;&::-moz-focus-inner{border:0;}&:focus{outline:none;}", " & > svg{vertical-align:middle;}", ";"], props => props.theme.space.base * BASE_MULTIPLIERS$1.top, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * BASE_MULTIPLIERS$1.side}px`, props => props.theme.space.base * BASE_MULTIPLIERS$1.size, props => props.theme.space.base * BASE_MULTIPLIERS$1.size, props => colorStyles(props), props => retrieveComponentStyles(COMPONENT_ID$h, props));
354
162
  StyledClose.defaultProps = {
355
163
  theme: DEFAULT_THEME
356
164
  };
357
165
 
358
- var COMPONENT_ID$g = 'modals.footer';
359
- var StyledFooter = styled.div.attrs({
166
+ const COMPONENT_ID$g = 'modals.footer';
167
+ const StyledFooter = styled.div.attrs({
360
168
  'data-garden-id': COMPONENT_ID$g,
361
- 'data-garden-version': '8.57.1'
169
+ 'data-garden-version': '8.58.0'
362
170
  }).withConfig({
363
171
  displayName: "StyledFooter",
364
172
  componentId: "sc-d8pfdu-0"
365
- })(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], function (props) {
366
- return props.isLarge && "".concat(props.theme.borders.sm, " ").concat(getColor('neutralHue', 200, props.theme));
367
- }, function (props) {
368
- return props.isLarge ? "".concat(props.theme.space.base * 8, "px ").concat(props.theme.space.base * 10, "px") : "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base * 10, "px ").concat(props.theme.space.base * 8, "px");
369
- }, function (props) {
370
- return retrieveComponentStyles(COMPONENT_ID$g, props);
371
- });
173
+ })(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:", ";padding:", ";", ";"], props => props.isLarge && `${props.theme.borders.sm} ${getColor('neutralHue', 200, props.theme)}`, props => props.isLarge ? `${props.theme.space.base * 8}px ${props.theme.space.base * 10}px` : `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px ${props.theme.space.base * 8}px`, props => retrieveComponentStyles(COMPONENT_ID$g, props));
372
174
  StyledFooter.defaultProps = {
373
175
  theme: DEFAULT_THEME
374
176
  };
375
177
 
376
- var COMPONENT_ID$f = 'modals.footer_item';
377
- var StyledFooterItem = styled.span.attrs({
178
+ const COMPONENT_ID$f = 'modals.footer_item';
179
+ const StyledFooterItem = styled.span.attrs({
378
180
  'data-garden-id': COMPONENT_ID$f,
379
- 'data-garden-version': '8.57.1'
181
+ 'data-garden-version': '8.58.0'
380
182
  }).withConfig({
381
183
  displayName: "StyledFooterItem",
382
184
  componentId: "sc-1mb76hl-0"
383
- })(["display:flex;margin-", ":", "px;min-width:0;&:first-child{margin-", ":0;}", ";"], function (props) {
384
- return props.theme.rtl ? 'right' : 'left';
385
- }, function (props) {
386
- return props.theme.space.base * 5;
387
- }, function (props) {
388
- return props.theme.rtl ? 'right' : 'left';
389
- }, function (props) {
390
- return retrieveComponentStyles(COMPONENT_ID$f, props);
391
- });
185
+ })(["display:flex;margin-", ":", "px;min-width:0;&:first-child{margin-", ":0;}", ";"], props => props.theme.rtl ? 'right' : 'left', props => props.theme.space.base * 5, props => props.theme.rtl ? 'right' : 'left', props => retrieveComponentStyles(COMPONENT_ID$f, props));
392
186
  StyledFooterItem.defaultProps = {
393
187
  theme: DEFAULT_THEME
394
188
  };
395
189
 
396
- var COMPONENT_ID$e = 'modals.header';
397
- var StyledHeader = styled.div.attrs({
190
+ const COMPONENT_ID$e = 'modals.header';
191
+ const StyledHeader = styled.div.attrs({
398
192
  'data-garden-id': COMPONENT_ID$e,
399
- 'data-garden-version': '8.57.1'
193
+ 'data-garden-version': '8.58.0'
400
194
  }).withConfig({
401
195
  displayName: "StyledHeader",
402
196
  componentId: "sc-1787r9v-0"
403
- })(["display:block;position:", ";margin:0;border-bottom:", " ", ";padding:", ";", " line-height:", ";color:", ";font-size:", ";font-weight:", ";", ";"], function (props) {
404
- return props.isDanger && 'relative';
405
- }, function (props) {
406
- return props.theme.borders.sm;
407
- }, getColor('neutralHue', 200), function (props) {
408
- return "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base * 10, "px");
409
- }, function (props) {
410
- return props.isCloseButtonPresent && "padding-".concat(props.theme.rtl ? 'left' : 'right', ": ").concat(props.theme.space.base * (BASE_MULTIPLIERS$1.size + BASE_MULTIPLIERS$1.side + 2), "px;");
411
- }, function (props) {
412
- return getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md);
413
- }, function (props) {
414
- return props.isDanger ? getColor('dangerHue', 600, props.theme) : props.theme.colors.foreground;
415
- }, function (props) {
416
- return props.theme.fontSizes.md;
417
- }, function (props) {
418
- return props.theme.fontWeights.semibold;
419
- }, function (props) {
420
- return retrieveComponentStyles(COMPONENT_ID$e, props);
421
- });
197
+ })(["display:block;position:", ";margin:0;border-bottom:", " ", ";padding:", ";", " line-height:", ";color:", ";font-size:", ";font-weight:", ";", ";"], props => props.isDanger && 'relative', props => props.theme.borders.sm, getColor('neutralHue', 200), props => `${props.theme.space.base * 5}px ${props.theme.space.base * 10}px`, props => props.isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS$1.size + BASE_MULTIPLIERS$1.side + 2)}px;`, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => props.isDanger ? getColor('dangerHue', 600, props.theme) : props.theme.colors.foreground, props => props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, props => retrieveComponentStyles(COMPONENT_ID$e, props));
422
198
  StyledHeader.defaultProps = {
423
199
  theme: DEFAULT_THEME
424
200
  };
@@ -434,7 +210,8 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
434
210
  height: 16,
435
211
  focusable: "false",
436
212
  viewBox: "0 0 16 16",
437
- "aria-hidden": "true"
213
+ "aria-hidden": "true",
214
+ role: "img"
438
215
  }, props), _g || (_g = /*#__PURE__*/React.createElement("g", {
439
216
  fill: "none",
440
217
  stroke: "currentColor"
@@ -453,65 +230,39 @@ var SvgAlertErrorStroke = function SvgAlertErrorStroke(props) {
453
230
  })));
454
231
  };
455
232
 
456
- var StyledDangerIcon = styled(SvgAlertErrorStroke).withConfig({
233
+ const StyledDangerIcon = styled(SvgAlertErrorStroke).withConfig({
457
234
  displayName: "StyledDangerIcon",
458
235
  componentId: "sc-1kwbb39-0"
459
- })(["position:absolute;top:", "px;", ":", ";"], function (props) {
460
- return props.theme.space.base * 5.5;
461
- }, function (props) {
462
- return props.theme.rtl ? 'right' : 'left';
463
- }, function (props) {
464
- return "".concat(props.theme.space.base * 4, "px");
465
- });
236
+ })(["position:absolute;top:", "px;", ":", ";"], props => props.theme.space.base * 5.5, props => props.theme.rtl ? 'right' : 'left', props => `${props.theme.space.base * 4}px`);
466
237
  StyledDangerIcon.defaultProps = {
467
238
  theme: DEFAULT_THEME
468
239
  };
469
240
 
470
- var COMPONENT_ID$d = 'modals.modal';
471
- var animationName = keyframes(["0%{transform:scale(0);opacity:0;}50%{transform:scale(1.05);}100%{opacity:1;}"]);
472
- var boxShadow$1 = function boxShadow(props) {
473
- var theme = props.theme;
474
- var space = theme.space,
475
- shadows = theme.shadows;
476
- var offsetY = "".concat(space.base * 5, "px");
477
- var blurRadius = "".concat(space.base * 7, "px");
478
- var color = getColor('neutralHue', 800, theme, 0.35);
241
+ const COMPONENT_ID$d = 'modals.modal';
242
+ const animationName = keyframes(["0%{transform:scale(0);opacity:0;}50%{transform:scale(1.05);}100%{opacity:1;}"]);
243
+ const boxShadow$1 = props => {
244
+ const {
245
+ theme
246
+ } = props;
247
+ const {
248
+ space,
249
+ shadows
250
+ } = theme;
251
+ const offsetY = `${space.base * 5}px`;
252
+ const blurRadius = `${space.base * 7}px`;
253
+ const color = getColor('neutralHue', 800, theme, 0.35);
479
254
  return shadows.lg(offsetY, blurRadius, color);
480
255
  };
481
- var sizeStyles$1 = function sizeStyles(props) {
256
+ const sizeStyles$1 = props => {
482
257
  return css(["", "{width:", ";}"], mediaQuery('up', props.isLarge ? 'md' : 'sm', props.theme), props.isLarge ? props.theme.breakpoints.md : props.theme.breakpoints.sm);
483
258
  };
484
- var StyledModal = styled.div.attrs({
259
+ const StyledModal = styled.div.attrs({
485
260
  'data-garden-id': COMPONENT_ID$d,
486
- 'data-garden-version': '8.57.1'
261
+ 'data-garden-version': '8.58.0'
487
262
  }).withConfig({
488
263
  displayName: "StyledModal",
489
264
  componentId: "sc-1pe1axu-0"
490
- })(["display:flex;position:fixed;flex-direction:column;margin:", ";border-radius:", ";box-shadow:", ";background-color:", ";min-height:60px;max-height:calc(100vh - ", "px);animation:", ";animation-delay:0.01s;overflow:auto;direction:", ";", " &:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], function (props) {
491
- return props.isCentered ? '0' : "".concat(props.theme.space.base * 12, "px");
492
- }, function (props) {
493
- return props.theme.borderRadii.md;
494
- }, boxShadow$1, function (props) {
495
- return props.theme.colors.background;
496
- }, function (props) {
497
- return props.theme.space.base * 24;
498
- }, function (props) {
499
- return props.isAnimated && css(["", " 0.3s ease-in-out"], animationName);
500
- }, function (props) {
501
- return props.theme.rtl && 'rtl';
502
- }, sizeStyles$1, function (props) {
503
- return props.theme.space.base * 6;
504
- }, function (props) {
505
- return props.theme.space.base * 6;
506
- }, function (props) {
507
- return props.isCentered && '50%';
508
- }, function (props) {
509
- return props.isCentered && '50%';
510
- }, function (props) {
511
- return props.isCentered && 'translate(50%, 50%)';
512
- }, function (props) {
513
- return retrieveComponentStyles(COMPONENT_ID$d, props);
514
- });
265
+ })(["display:flex;position:fixed;flex-direction:column;margin:", ";border-radius:", ";box-shadow:", ";background-color:", ";min-height:60px;max-height:calc(100vh - ", "px);animation:", ";animation-delay:0.01s;overflow:auto;direction:", ";", " &:focus{outline:none;}@media (max-height:399px){top:", "px;bottom:auto;margin-bottom:", "px;max-height:none;}@media screen and (-ms-high-contrast:active),screen and (-ms-high-contrast:none){right:", ";bottom:", ";transform:", ";}", ";"], props => props.isCentered ? '0' : `${props.theme.space.base * 12}px`, props => props.theme.borderRadii.md, boxShadow$1, props => props.theme.colors.background, props => props.theme.space.base * 24, props => props.isAnimated && css(["", " 0.3s ease-in-out"], animationName), props => props.theme.rtl && 'rtl', sizeStyles$1, props => props.theme.space.base * 6, props => props.theme.space.base * 6, props => props.isCentered && '50%', props => props.isCentered && '50%', props => props.isCentered && 'translate(50%, 50%)', props => retrieveComponentStyles(COMPONENT_ID$d, props));
515
266
  StyledModal.propTypes = {
516
267
  isLarge: PropTypes.bool,
517
268
  isAnimated: PropTypes.bool
@@ -520,26 +271,20 @@ StyledModal.defaultProps = {
520
271
  theme: DEFAULT_THEME
521
272
  };
522
273
 
523
- var COMPONENT_ID$c = 'modals.tooltip_modal.backdrop';
524
- var StyledTooltipModalBackdrop = styled.div.attrs({
274
+ const COMPONENT_ID$c = 'modals.tooltip_modal.backdrop';
275
+ const StyledTooltipModalBackdrop = styled.div.attrs({
525
276
  'data-garden-id': COMPONENT_ID$c,
526
- 'data-garden-version': '8.57.1'
277
+ 'data-garden-version': '8.58.0'
527
278
  }).withConfig({
528
279
  displayName: "StyledTooltipModalBackdrop",
529
280
  componentId: "sc-1yaomgq-0"
530
- })(["position:fixed;top:0;right:0;bottom:0;left:0;z-index:400;overflow:hidden;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";&.garden-tooltip-modal-transition-exit-active{pointer-events:none;}&.garden-tooltip-modal-transition-exit-active div{transition:opacity 200ms;opacity:0;}", ";"], function (props) {
531
- return props.theme.fonts.system;
532
- }, function (props) {
533
- return props.theme.rtl && 'rtl';
534
- }, function (props) {
535
- return retrieveComponentStyles(COMPONENT_ID$c, props);
536
- });
281
+ })(["position:fixed;top:0;right:0;bottom:0;left:0;z-index:400;overflow:hidden;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";&.garden-tooltip-modal-transition-exit-active{pointer-events:none;}&.garden-tooltip-modal-transition-exit-active div{transition:opacity 200ms;opacity:0;}", ";"], props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', props => retrieveComponentStyles(COMPONENT_ID$c, props));
537
282
  StyledTooltipModalBackdrop.defaultProps = {
538
283
  theme: DEFAULT_THEME
539
284
  };
540
285
 
541
286
  function getPopperPlacement(gardenPlacement) {
542
- var gardenToPopperMapping = {
287
+ const gardenToPopperMapping = {
543
288
  auto: 'auto',
544
289
  top: 'top',
545
290
  'top-start': 'top-start',
@@ -557,7 +302,7 @@ function getPopperPlacement(gardenPlacement) {
557
302
  return gardenToPopperMapping[gardenPlacement];
558
303
  }
559
304
  function getRtlPopperPlacement(gardenPlacement) {
560
- var rtlPlacementMappings = {
305
+ const rtlPlacementMappings = {
561
306
  left: 'right',
562
307
  'left-start': 'right-start',
563
308
  'left-end': 'right-end',
@@ -569,11 +314,11 @@ function getRtlPopperPlacement(gardenPlacement) {
569
314
  'bottom-start': 'bottom-end',
570
315
  'bottom-end': 'bottom-start'
571
316
  };
572
- var popperPlacement = getPopperPlacement(gardenPlacement);
317
+ const popperPlacement = getPopperPlacement(gardenPlacement);
573
318
  return rtlPlacementMappings[popperPlacement] || popperPlacement;
574
319
  }
575
320
  function getArrowPosition(popperPlacement) {
576
- var arrowPositionMappings = {
321
+ const arrowPositionMappings = {
577
322
  top: 'bottom',
578
323
  'top-start': 'bottom-left',
579
324
  'top-end': 'bottom-right',
@@ -593,41 +338,33 @@ function getMenuPosition(popperPlacement) {
593
338
  return popperPlacement ? popperPlacement.split('-')[0] : 'bottom';
594
339
  }
595
340
 
596
- var StyledTooltipWrapper = styled.div.attrs(function (props) {
597
- return {
598
- className: props.isAnimated && 'is-animated'
599
- };
600
- }).withConfig({
341
+ const StyledTooltipWrapper = styled.div.attrs(props => ({
342
+ className: props.isAnimated && 'is-animated'
343
+ })).withConfig({
601
344
  displayName: "StyledTooltipWrapper",
602
345
  componentId: "sc-1xk05kf-0"
603
- })(["", ";"], function (props) {
604
- return menuStyles(getMenuPosition(props.placement), {
605
- theme: props.theme,
606
- hidden: false,
607
- margin: '0',
608
- zIndex: props.zIndex,
609
- animationModifier: '.is-animated'
610
- });
611
- });
346
+ })(["", ";"], props => menuStyles(getMenuPosition(props.placement), {
347
+ theme: props.theme,
348
+ hidden: false,
349
+ margin: '0',
350
+ zIndex: props.zIndex,
351
+ animationModifier: '.is-animated'
352
+ }));
612
353
  StyledTooltipWrapper.defaultProps = {
613
354
  theme: DEFAULT_THEME
614
355
  };
615
356
 
616
- var COMPONENT_ID$b = 'modals.tooltip_modal';
617
- var StyledTooltipModal = styled.div.attrs(function (props) {
618
- return {
619
- 'data-garden-id': COMPONENT_ID$b,
620
- 'data-garden-version': '8.57.1',
621
- className: props.isAnimated && 'is-animated'
622
- };
623
- }).withConfig({
357
+ const COMPONENT_ID$b = 'modals.tooltip_modal';
358
+ const StyledTooltipModal = styled.div.attrs(props => ({
359
+ 'data-garden-id': COMPONENT_ID$b,
360
+ 'data-garden-version': '8.58.0',
361
+ className: props.isAnimated && 'is-animated'
362
+ })).withConfig({
624
363
  displayName: "StyledTooltipModal",
625
364
  componentId: "sc-42ubfr-0"
626
- })(["padding:", "px;width:400px;", ";", ";"], function (props) {
627
- return props.theme.space.base * 5;
628
- }, function (props) {
629
- var computedArrowStyles = arrowStyles(getArrowPosition(props.placement), {
630
- size: "".concat(props.theme.space.base * 2, "px"),
365
+ })(["padding:", "px;width:400px;", ";", ";"], props => props.theme.space.base * 5, props => {
366
+ const computedArrowStyles = arrowStyles(getArrowPosition(props.placement), {
367
+ size: `${props.theme.space.base * 2}px`,
631
368
  inset: '1px',
632
369
  animationModifier: '.is-animated'
633
370
  });
@@ -635,314 +372,244 @@ var StyledTooltipModal = styled.div.attrs(function (props) {
635
372
  return props.hasArrow && props.transitionState === 'entered' && computedArrowStyles;
636
373
  }
637
374
  return props.hasArrow && computedArrowStyles;
638
- }, function (props) {
639
- return retrieveComponentStyles(COMPONENT_ID$b, props);
640
- });
375
+ }, props => retrieveComponentStyles(COMPONENT_ID$b, props));
641
376
  StyledTooltipModal.defaultProps = {
642
377
  theme: DEFAULT_THEME
643
378
  };
644
379
 
645
- var COMPONENT_ID$a = 'modals.tooltip_modal.title';
646
- var sizeStyles = function sizeStyles(props) {
647
- return "\n /* stylelint-disable-next-line property-no-unknown */\n padding-".concat(props.theme.rtl ? 'left' : 'right', ": ").concat(props.theme.space.base * 8, "px;\n line-height: ").concat(getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), ";\n font-size: ").concat(props.theme.fontSizes.md, ";\n");
648
- };
649
- var StyledTooltipModalTitle = styled.div.attrs({
380
+ const COMPONENT_ID$a = 'modals.tooltip_modal.title';
381
+ const sizeStyles = props => `
382
+ /* stylelint-disable-next-line property-no-unknown */
383
+ padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * 8}px;
384
+ line-height: ${getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md)};
385
+ font-size: ${props.theme.fontSizes.md};
386
+ `;
387
+ const StyledTooltipModalTitle = styled.div.attrs({
650
388
  'data-garden-id': COMPONENT_ID$a,
651
- 'data-garden-version': '8.57.1'
389
+ 'data-garden-version': '8.58.0'
652
390
  }).withConfig({
653
391
  displayName: "StyledTooltipModalTitle",
654
392
  componentId: "sc-11xjgjs-0"
655
- })(["margin:0;color:", ";font-weight:", ";", ";", ";"], function (props) {
656
- return props.theme.colors.foreground;
657
- }, function (props) {
658
- return props.theme.fontWeights.semibold;
659
- }, function (props) {
660
- return sizeStyles(props);
661
- }, function (props) {
662
- return retrieveComponentStyles(COMPONENT_ID$a, props);
663
- });
393
+ })(["margin:0;color:", ";font-weight:", ";", ";", ";"], props => props.theme.colors.foreground, props => props.theme.fontWeights.semibold, props => sizeStyles(props), props => retrieveComponentStyles(COMPONENT_ID$a, props));
664
394
  StyledTooltipModalTitle.defaultProps = {
665
395
  theme: DEFAULT_THEME
666
396
  };
667
397
 
668
- var COMPONENT_ID$9 = 'modals.tooltip_modal.body';
669
- var StyledTooltipModalBody = styled.div.attrs({
398
+ const COMPONENT_ID$9 = 'modals.tooltip_modal.body';
399
+ const StyledTooltipModalBody = styled.div.attrs({
670
400
  'data-garden-id': COMPONENT_ID$9,
671
- 'data-garden-version': '8.57.1'
401
+ 'data-garden-version': '8.58.0'
672
402
  }).withConfig({
673
403
  displayName: "StyledTooltipModalBody",
674
404
  componentId: "sc-195dkzj-0"
675
- })(["display:block;margin:0;padding-top:", "px;line-height:", ";color:", ";font-size:", ";", ";"], function (props) {
676
- return props.theme.space.base * 1.5;
677
- }, function (props) {
678
- return getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md);
679
- }, function (props) {
680
- return props.theme.colors.foreground;
681
- }, function (props) {
682
- return props.theme.fontSizes.md;
683
- }, function (props) {
684
- return retrieveComponentStyles(COMPONENT_ID$9, props);
685
- });
405
+ })(["display:block;margin:0;padding-top:", "px;line-height:", ";color:", ";font-size:", ";", ";"], props => props.theme.space.base * 1.5, props => getLineHeight(props.theme.lineHeights.md, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, props => retrieveComponentStyles(COMPONENT_ID$9, props));
686
406
  StyledTooltipModalBody.defaultProps = {
687
407
  theme: DEFAULT_THEME
688
408
  };
689
409
 
690
- var COMPONENT_ID$8 = 'modals.tooltip_modal.footer';
691
- var StyledTooltipModalFooter = styled.div.attrs({
410
+ const COMPONENT_ID$8 = 'modals.tooltip_modal.footer';
411
+ const StyledTooltipModalFooter = styled.div.attrs({
692
412
  'data-garden-id': COMPONENT_ID$8,
693
- 'data-garden-version': '8.57.1'
413
+ 'data-garden-version': '8.58.0'
694
414
  }).withConfig({
695
415
  displayName: "StyledTooltipModalFooter",
696
416
  componentId: "sc-fm36a9-0"
697
- })(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;padding-top:", "px;", ";"], function (p) {
698
- return p.theme.space.base * 5;
699
- }, function (props) {
700
- return retrieveComponentStyles(COMPONENT_ID$8, props);
701
- });
417
+ })(["display:flex;flex-shrink:0;align-items:center;justify-content:flex-end;padding-top:", "px;", ";"], p => p.theme.space.base * 5, props => retrieveComponentStyles(COMPONENT_ID$8, props));
702
418
  StyledTooltipModalFooter.defaultProps = {
703
419
  theme: DEFAULT_THEME
704
420
  };
705
421
 
706
- var COMPONENT_ID$7 = 'modals.tooltip_modal.footer_item';
707
- var StyledTooltipModalFooterItem = styled(StyledFooterItem).attrs({
422
+ const COMPONENT_ID$7 = 'modals.tooltip_modal.footer_item';
423
+ const StyledTooltipModalFooterItem = styled(StyledFooterItem).attrs({
708
424
  'data-garden-id': COMPONENT_ID$7,
709
- 'data-garden-version': '8.57.1'
425
+ 'data-garden-version': '8.58.0'
710
426
  }).withConfig({
711
427
  displayName: "StyledTooltipModalFooterItem",
712
428
  componentId: "sc-1nahj6p-0"
713
- })(["", ";"], function (props) {
714
- return retrieveComponentStyles(COMPONENT_ID$7, props);
715
- });
429
+ })(["", ";"], props => retrieveComponentStyles(COMPONENT_ID$7, props));
716
430
  StyledTooltipModalFooterItem.defaultProps = {
717
431
  theme: DEFAULT_THEME
718
432
  };
719
433
 
720
- var COMPONENT_ID$6 = 'modals.tooltip_modal.close';
721
- var StyledTooltipModalClose = styled(StyledClose).attrs({
434
+ const COMPONENT_ID$6 = 'modals.tooltip_modal.close';
435
+ const StyledTooltipModalClose = styled(StyledClose).attrs({
722
436
  'data-garden-id': COMPONENT_ID$6,
723
- 'data-garden-version': '8.57.1'
437
+ 'data-garden-version': '8.58.0'
724
438
  }).withConfig({
725
439
  displayName: "StyledTooltipModalClose",
726
440
  componentId: "sc-1h2ke3q-0"
727
- })(["top:", "px;", ":", ";width:", "px;height:", "px;", ";"], function (props) {
728
- return props.theme.space.base * 3.5;
729
- }, function (props) {
730
- return props.theme.rtl ? 'left' : 'right';
731
- }, function (props) {
732
- return "".concat(props.theme.space.base * 3, "px");
733
- }, function (props) {
734
- return props.theme.space.base * 8;
735
- }, function (props) {
736
- return props.theme.space.base * 8;
737
- }, function (props) {
738
- return retrieveComponentStyles(COMPONENT_ID$6, props);
739
- });
441
+ })(["top:", "px;", ":", ";width:", "px;height:", "px;", ";"], props => props.theme.space.base * 3.5, props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * 3}px`, props => props.theme.space.base * 8, props => props.theme.space.base * 8, props => retrieveComponentStyles(COMPONENT_ID$6, props));
740
442
  StyledTooltipModalClose.defaultProps = {
741
443
  theme: DEFAULT_THEME
742
444
  };
743
445
 
744
- var COMPONENT_ID$5 = 'modals.drawer_modal';
745
- var DRAWER_WIDTH = 380;
746
- var boxShadow = function boxShadow(props) {
747
- var theme = props.theme;
748
- var space = theme.space,
749
- shadows = theme.shadows;
750
- var offsetY = "".concat(space.base * 5, "px");
751
- var blurRadius = "".concat(space.base * 7, "px");
752
- var color = getColor('neutralHue', 800, theme, 0.35);
446
+ const COMPONENT_ID$5 = 'modals.drawer_modal';
447
+ const DRAWER_WIDTH = 380;
448
+ const boxShadow = props => {
449
+ const {
450
+ theme
451
+ } = props;
452
+ const {
453
+ space,
454
+ shadows
455
+ } = theme;
456
+ const offsetY = `${space.base * 5}px`;
457
+ const blurRadius = `${space.base * 7}px`;
458
+ const color = getColor('neutralHue', 800, theme, 0.35);
753
459
  return shadows.lg(offsetY, blurRadius, color);
754
460
  };
755
- var StyledDrawerModal = styled.div.attrs({
461
+ const StyledDrawerModal = styled.div.attrs({
756
462
  'data-garden-id': COMPONENT_ID$5,
757
- 'data-garden-version': '8.57.1'
463
+ 'data-garden-version': '8.58.0'
758
464
  }).withConfig({
759
465
  displayName: "StyledDrawerModal",
760
466
  componentId: "sc-i1sake-0"
761
- })(["display:flex;position:fixed;top:0;", ":0;flex-direction:column;z-index:500;box-shadow:", ";background:", ";width:", "px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";&.garden-drawer-transition-enter{transform:translateX(", "px);}&.garden-drawer-transition-enter-active{transform:translateX(0);transition:transform 0.25s ease-in-out;}&.garden-drawer-transition-exit-active{transform:translateX(", "px);transition:transform 0.25s ease-in-out;}&:focus{outline:none;}", ";"], function (props) {
762
- return props.theme.rtl ? 'left' : 'right';
763
- }, boxShadow, function (props) {
764
- return props.theme.colors.background;
765
- }, DRAWER_WIDTH, function (props) {
766
- return props.theme.fonts.system;
767
- }, function (props) {
768
- return props.theme.rtl && 'rtl';
769
- }, function (props) {
770
- return props.theme.rtl ? -DRAWER_WIDTH : DRAWER_WIDTH;
771
- }, function (props) {
772
- return props.theme.rtl ? -DRAWER_WIDTH : DRAWER_WIDTH;
773
- }, function (props) {
774
- return retrieveComponentStyles(COMPONENT_ID$5, props);
775
- });
467
+ })(["display:flex;position:fixed;top:0;", ":0;flex-direction:column;z-index:500;box-shadow:", ";background:", ";width:", "px;height:100%;overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";&.garden-drawer-transition-enter{transform:translateX(", "px);}&.garden-drawer-transition-enter-active{transform:translateX(0);transition:transform 0.25s ease-in-out;}&.garden-drawer-transition-exit-active{transform:translateX(", "px);transition:transform 0.25s ease-in-out;}&:focus{outline:none;}", ";"], props => props.theme.rtl ? 'left' : 'right', boxShadow, props => props.theme.colors.background, DRAWER_WIDTH, props => props.theme.fonts.system, props => props.theme.rtl && 'rtl', props => props.theme.rtl ? -DRAWER_WIDTH : DRAWER_WIDTH, props => props.theme.rtl ? -DRAWER_WIDTH : DRAWER_WIDTH, props => retrieveComponentStyles(COMPONENT_ID$5, props));
776
468
  StyledDrawerModal.defaultProps = {
777
469
  theme: DEFAULT_THEME
778
470
  };
779
471
 
780
- var COMPONENT_ID$4 = 'modals.drawer_modal.close';
781
- var BASE_MULTIPLIERS = {
472
+ const COMPONENT_ID$4 = 'modals.drawer_modal.close';
473
+ const BASE_MULTIPLIERS = {
782
474
  top: BASE_MULTIPLIERS$1.top,
783
475
  side: 2,
784
476
  size: BASE_MULTIPLIERS$1.size
785
477
  };
786
- var StyledDrawerModalClose = styled(StyledClose).attrs({
478
+ const StyledDrawerModalClose = styled(StyledClose).attrs({
787
479
  'data-garden-id': COMPONENT_ID$4,
788
- 'data-garden-version': '8.57.1'
480
+ 'data-garden-version': '8.58.0'
789
481
  }).withConfig({
790
482
  displayName: "StyledDrawerModalClose",
791
483
  componentId: "sc-hrnaom-0"
792
- })(["", ":", ";", ";"], function (props) {
793
- return props.theme.rtl ? 'left' : 'right';
794
- }, function (props) {
795
- return "".concat(props.theme.space.base * BASE_MULTIPLIERS.side, "px");
796
- }, function (props) {
797
- return retrieveComponentStyles(COMPONENT_ID$4, props);
798
- });
484
+ })(["", ":", ";", ";"], props => props.theme.rtl ? 'left' : 'right', props => `${props.theme.space.base * BASE_MULTIPLIERS.side}px`, props => retrieveComponentStyles(COMPONENT_ID$4, props));
799
485
  StyledDrawerModalClose.defaultProps = {
800
486
  theme: DEFAULT_THEME
801
487
  };
802
488
 
803
- var COMPONENT_ID$3 = 'modals.drawer_modal.header';
804
- var StyledDrawerModalHeader = styled(StyledHeader).attrs({
489
+ const COMPONENT_ID$3 = 'modals.drawer_modal.header';
490
+ const StyledDrawerModalHeader = styled(StyledHeader).attrs({
805
491
  'data-garden-id': COMPONENT_ID$3,
806
- 'data-garden-version': '8.57.1'
492
+ 'data-garden-version': '8.58.0'
807
493
  }).withConfig({
808
494
  displayName: "StyledDrawerModalHeader",
809
495
  componentId: "sc-1u04rqw-0"
810
- })(["padding:", "px;", " ", ";"], function (props) {
811
- return props.theme.space.base * 5;
812
- }, function (props) {
813
- return props.isCloseButtonPresent && "padding-".concat(props.theme.rtl ? 'left' : 'right', ": ").concat(props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2), "px;");
814
- }, function (props) {
815
- return retrieveComponentStyles(COMPONENT_ID$3, props);
816
- });
496
+ })(["padding:", "px;", " ", ";"], props => props.theme.space.base * 5, props => props.isCloseButtonPresent && `padding-${props.theme.rtl ? 'left' : 'right'}: ${props.theme.space.base * (BASE_MULTIPLIERS.size + BASE_MULTIPLIERS.side + 2)}px;`, props => retrieveComponentStyles(COMPONENT_ID$3, props));
817
497
  StyledDrawerModalHeader.defaultProps = {
818
498
  theme: DEFAULT_THEME
819
499
  };
820
500
 
821
- var COMPONENT_ID$2 = 'modals.drawer_modal.body';
822
- var StyledDrawerModalBody = styled(StyledBody).attrs({
501
+ const COMPONENT_ID$2 = 'modals.drawer_modal.body';
502
+ const StyledDrawerModalBody = styled(StyledBody).attrs({
823
503
  'data-garden-id': COMPONENT_ID$2,
824
- 'data-garden-version': '8.57.1'
504
+ 'data-garden-version': '8.58.0'
825
505
  }).withConfig({
826
506
  displayName: "StyledDrawerModalBody",
827
507
  componentId: "sc-yafe2y-0"
828
- })(["padding:", "px;", ";"], function (props) {
829
- return props.theme.space.base * 5;
830
- }, function (props) {
831
- return retrieveComponentStyles(COMPONENT_ID$2, props);
832
- });
508
+ })(["padding:", "px;", ";"], props => props.theme.space.base * 5, props => retrieveComponentStyles(COMPONENT_ID$2, props));
833
509
  StyledDrawerModalBody.defaultProps = {
834
510
  theme: DEFAULT_THEME
835
511
  };
836
512
 
837
- var COMPONENT_ID$1 = 'modals.drawer_modal.footer';
838
- var StyledDrawerModalFooter = styled.div.attrs({
513
+ const COMPONENT_ID$1 = 'modals.drawer_modal.footer';
514
+ const StyledDrawerModalFooter = styled.div.attrs({
839
515
  'data-garden-id': COMPONENT_ID$1,
840
- 'data-garden-version': '8.57.1'
516
+ 'data-garden-version': '8.58.0'
841
517
  }).withConfig({
842
518
  displayName: "StyledDrawerModalFooter",
843
519
  componentId: "sc-17if4ka-0"
844
- })(["display:flex;flex-shrink:0;justify-content:flex-end;border-top:", ";padding:", "px;", ";"], function (props) {
845
- return "".concat(props.theme.borders.sm, " ").concat(getColor('neutralHue', 200, props.theme));
846
- }, function (props) {
847
- return props.theme.space.base * 5;
848
- }, function (props) {
849
- return retrieveComponentStyles(COMPONENT_ID$1, props);
850
- });
520
+ })(["display:flex;flex-shrink:0;justify-content:flex-end;border-top:", ";padding:", "px;", ";"], props => `${props.theme.borders.sm} ${getColor('neutralHue', 200, props.theme)}`, props => props.theme.space.base * 5, props => retrieveComponentStyles(COMPONENT_ID$1, props));
851
521
  StyledDrawerModalFooter.defaultProps = {
852
522
  theme: DEFAULT_THEME
853
523
  };
854
524
 
855
- var COMPONENT_ID = 'modals.drawer_modal.footer_item';
856
- var StyledDrawerModalFooterItem = styled(StyledFooterItem).attrs({
525
+ const COMPONENT_ID = 'modals.drawer_modal.footer_item';
526
+ const StyledDrawerModalFooterItem = styled(StyledFooterItem).attrs({
857
527
  'data-garden-id': COMPONENT_ID,
858
- 'data-garden-version': '8.57.1'
528
+ 'data-garden-version': '8.58.0'
859
529
  }).withConfig({
860
530
  displayName: "StyledDrawerModalFooterItem",
861
531
  componentId: "sc-1vbl885-0"
862
- })(["", ";"], function (props) {
863
- return retrieveComponentStyles(COMPONENT_ID, props);
864
- });
532
+ })(["", ";"], props => retrieveComponentStyles(COMPONENT_ID, props));
865
533
  StyledDrawerModalFooterItem.defaultProps = {
866
534
  theme: DEFAULT_THEME
867
535
  };
868
536
 
869
- var ModalsContext = createContext(undefined);
870
- var useModalContext = function useModalContext() {
871
- var context = useContext(ModalsContext);
537
+ const ModalsContext = createContext(undefined);
538
+ const useModalContext = () => {
539
+ const context = useContext(ModalsContext);
872
540
  if (context === undefined) {
873
541
  throw new Error('useModalContext must be used within a ModalsContext.Provider');
874
542
  }
875
543
  return context;
876
544
  };
877
545
 
878
- var _excluded$2 = ["backdropProps", "children", "onClose", "isLarge", "isCentered", "isAnimated", "id", "appendToNode", "focusOnMount", "restoreFocus"];
879
- var isOverflowing = function isOverflowing(element) {
880
- var doc = ownerDocument(element);
881
- var win = ownerWindow(doc);
882
- var isBody = element && element.tagName.toLowerCase() === 'body';
546
+ const isOverflowing = element => {
547
+ const doc = ownerDocument(element);
548
+ const win = ownerWindow(doc);
549
+ const isBody = element && element.tagName.toLowerCase() === 'body';
883
550
  if (!isWindow(doc) && !isBody) {
884
551
  return element.scrollHeight > element.clientHeight;
885
552
  }
886
- var style = win.getComputedStyle(doc.body);
887
- var marginLeft = parseInt(style.getPropertyValue('margin-left'), 10);
888
- var marginRight = parseInt(style.getPropertyValue('margin-right'), 10);
553
+ const style = win.getComputedStyle(doc.body);
554
+ const marginLeft = parseInt(style.getPropertyValue('margin-left'), 10);
555
+ const marginRight = parseInt(style.getPropertyValue('margin-right'), 10);
889
556
  return marginLeft + doc.body.clientWidth + marginRight < win.innerWidth;
890
557
  };
891
- var Modal = forwardRef(function (_ref, ref) {
892
- var backdropProps = _ref.backdropProps,
893
- children = _ref.children,
894
- onClose = _ref.onClose,
895
- isLarge = _ref.isLarge,
896
- isCentered = _ref.isCentered,
897
- isAnimated = _ref.isAnimated,
898
- id = _ref.id,
899
- appendToNode = _ref.appendToNode,
900
- focusOnMount = _ref.focusOnMount,
901
- restoreFocus = _ref.restoreFocus,
902
- modalProps = _objectWithoutProperties(_ref, _excluded$2);
903
- var theme = useContext(ThemeContext);
904
- var modalRef = useRef(null);
905
- var environment = useDocument(theme);
906
- var _useState = useState(false),
907
- _useState2 = _slicedToArray(_useState, 2),
908
- isCloseButtonPresent = _useState2[0],
909
- setIsCloseButtonPresent = _useState2[1];
910
- var _useModal = useModal({
558
+ const Modal = forwardRef((_ref, ref) => {
559
+ let {
560
+ backdropProps,
561
+ children,
562
+ onClose,
563
+ isLarge,
564
+ isCentered,
565
+ isAnimated,
566
+ id,
567
+ appendToNode,
568
+ focusOnMount,
569
+ restoreFocus,
570
+ ...modalProps
571
+ } = _ref;
572
+ const theme = useContext(ThemeContext);
573
+ const modalRef = useRef(null);
574
+ const environment = useDocument(theme);
575
+ const [isCloseButtonPresent, setIsCloseButtonPresent] = useState(false);
576
+ const {
577
+ getBackdropProps,
578
+ getModalProps,
579
+ getTitleProps,
580
+ getContentProps,
581
+ getCloseProps
582
+ } = useModal({
911
583
  idPrefix: id,
912
- onClose: onClose,
913
- modalRef: modalRef,
914
- focusOnMount: focusOnMount,
915
- restoreFocus: restoreFocus
916
- }),
917
- getBackdropProps = _useModal.getBackdropProps,
918
- getModalProps = _useModal.getModalProps,
919
- getTitleProps = _useModal.getTitleProps,
920
- getContentProps = _useModal.getContentProps,
921
- getCloseProps = _useModal.getCloseProps;
584
+ onClose,
585
+ modalRef,
586
+ focusOnMount,
587
+ restoreFocus
588
+ });
922
589
  useFocusVisible({
923
590
  scope: modalRef,
924
591
  relativeDocument: environment
925
592
  });
926
- useEffect(function () {
593
+ useEffect(() => {
927
594
  if (!environment) {
928
595
  return undefined;
929
596
  }
930
- var htmlElement = environment.querySelector('html');
931
- var bodyElement = environment.querySelector('body');
932
- var previousHtmlOverflow;
933
- var previousBodyPaddingRight;
597
+ const htmlElement = environment.querySelector('html');
598
+ const bodyElement = environment.querySelector('body');
599
+ let previousHtmlOverflow;
600
+ let previousBodyPaddingRight;
934
601
  if (bodyElement) {
935
602
  if (isOverflowing(bodyElement)) {
936
- var scrollbarSize$1 = scrollbarSize();
937
- var bodyPaddingRight = parseInt(style(bodyElement, 'paddingRight') || '0', 10);
603
+ const scrollbarSize$1 = scrollbarSize();
604
+ const bodyPaddingRight = parseInt(style(bodyElement, 'paddingRight') || '0', 10);
938
605
  previousBodyPaddingRight = bodyElement.style.paddingRight;
939
- bodyElement.style.paddingRight = "".concat(bodyPaddingRight + scrollbarSize$1, "px");
606
+ bodyElement.style.paddingRight = `${bodyPaddingRight + scrollbarSize$1}px`;
940
607
  }
941
608
  if (htmlElement) {
942
609
  previousHtmlOverflow = htmlElement.style.overflow;
943
610
  htmlElement.style.overflow = 'hidden';
944
611
  }
945
- return function () {
612
+ return () => {
946
613
  if (htmlElement) {
947
614
  htmlElement.style.overflow = previousHtmlOverflow;
948
615
  }
@@ -951,7 +618,7 @@ var Modal = forwardRef(function (_ref, ref) {
951
618
  }
952
619
  return undefined;
953
620
  }, [environment]);
954
- var rootNode = useMemo(function () {
621
+ const rootNode = useMemo(() => {
955
622
  if (appendToNode) {
956
623
  return appendToNode;
957
624
  }
@@ -960,16 +627,14 @@ var Modal = forwardRef(function (_ref, ref) {
960
627
  }
961
628
  return undefined;
962
629
  }, [appendToNode, environment]);
963
- var value = useMemo(function () {
964
- return {
965
- isLarge: isLarge,
966
- isCloseButtonPresent: isCloseButtonPresent,
967
- getTitleProps: getTitleProps,
968
- getContentProps: getContentProps,
969
- getCloseProps: getCloseProps,
970
- setIsCloseButtonPresent: setIsCloseButtonPresent
971
- };
972
- }, [isLarge, isCloseButtonPresent, getTitleProps, getContentProps, getCloseProps]);
630
+ const value = useMemo(() => ({
631
+ isLarge,
632
+ isCloseButtonPresent,
633
+ getTitleProps,
634
+ getContentProps,
635
+ getCloseProps,
636
+ setIsCloseButtonPresent
637
+ }), [isLarge, isCloseButtonPresent, getTitleProps, getContentProps, getCloseProps]);
973
638
  if (!rootNode) {
974
639
  return null;
975
640
  }
@@ -1002,9 +667,10 @@ Modal.defaultProps = {
1002
667
  isCentered: true
1003
668
  };
1004
669
 
1005
- var Body$2 = forwardRef(function (props, ref) {
1006
- var _useModalContext = useModalContext(),
1007
- getContentProps = _useModalContext.getContentProps;
670
+ const Body$2 = forwardRef((props, ref) => {
671
+ const {
672
+ getContentProps
673
+ } = useModalContext();
1008
674
  return React__default.createElement(StyledBody, _extends$2({}, getContentProps(props), {
1009
675
  ref: ref
1010
676
  }));
@@ -1022,7 +688,8 @@ var SvgXStroke = function SvgXStroke(props) {
1022
688
  height: 16,
1023
689
  focusable: "false",
1024
690
  viewBox: "0 0 16 16",
1025
- "aria-hidden": "true"
691
+ "aria-hidden": "true",
692
+ role: "img"
1026
693
  }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
1027
694
  stroke: "currentColor",
1028
695
  strokeLinecap: "round",
@@ -1030,28 +697,29 @@ var SvgXStroke = function SvgXStroke(props) {
1030
697
  })));
1031
698
  };
1032
699
 
1033
- var Close$2 = forwardRef(function (props, ref) {
1034
- var _useModalContext = useModalContext(),
1035
- getCloseProps = _useModalContext.getCloseProps,
1036
- setIsCloseButtonPresent = _useModalContext.setIsCloseButtonPresent;
1037
- useEffect(function () {
700
+ const Close$2 = forwardRef((props, ref) => {
701
+ const {
702
+ getCloseProps,
703
+ setIsCloseButtonPresent
704
+ } = useModalContext();
705
+ useEffect(() => {
1038
706
  setIsCloseButtonPresent(true);
1039
- return function () {
1040
- return setIsCloseButtonPresent(false);
1041
- };
707
+ return () => setIsCloseButtonPresent(false);
1042
708
  });
1043
- var ariaLabel = useText(Close$2, props, 'aria-label', 'Close modal');
1044
- return React__default.createElement(StyledClose, _extends$2({}, getCloseProps(_objectSpread2(_objectSpread2({}, props), {}, {
709
+ const ariaLabel = useText(Close$2, props, 'aria-label', 'Close modal');
710
+ return React__default.createElement(StyledClose, _extends$2({}, getCloseProps({
711
+ ...props,
1045
712
  'aria-label': ariaLabel
1046
- })), {
713
+ }), {
1047
714
  ref: ref
1048
715
  }), React__default.createElement(SvgXStroke, null));
1049
716
  });
1050
717
  Close$2.displayName = 'Close';
1051
718
 
1052
- var Footer$2 = React__default.forwardRef(function (props, ref) {
1053
- var _useModalContext = useModalContext(),
1054
- isLarge = _useModalContext.isLarge;
719
+ const Footer$2 = React__default.forwardRef((props, ref) => {
720
+ const {
721
+ isLarge
722
+ } = useModalContext();
1055
723
  return React__default.createElement(StyledFooter, _extends$2({
1056
724
  ref: ref,
1057
725
  isLarge: isLarge
@@ -1059,17 +727,16 @@ var Footer$2 = React__default.forwardRef(function (props, ref) {
1059
727
  });
1060
728
  Footer$2.displayName = 'Footer';
1061
729
 
1062
- var FooterItem$2 = React__default.forwardRef(function (props, ref) {
1063
- return React__default.createElement(StyledFooterItem, _extends$2({
1064
- ref: ref
1065
- }, props));
1066
- });
730
+ const FooterItem$2 = React__default.forwardRef((props, ref) => React__default.createElement(StyledFooterItem, _extends$2({
731
+ ref: ref
732
+ }, props)));
1067
733
  FooterItem$2.displayName = 'FooterItem';
1068
734
 
1069
- var Header$1 = forwardRef(function (props, ref) {
1070
- var _useModalContext = useModalContext(),
1071
- isCloseButtonPresent = _useModalContext.isCloseButtonPresent,
1072
- getTitleProps = _useModalContext.getTitleProps;
735
+ const Header$1 = forwardRef((props, ref) => {
736
+ const {
737
+ isCloseButtonPresent,
738
+ getTitleProps
739
+ } = useModalContext();
1073
740
  return React__default.createElement(StyledHeader, _extends$2({}, getTitleProps(props), {
1074
741
  isCloseButtonPresent: isCloseButtonPresent,
1075
742
  ref: ref
@@ -1077,123 +744,121 @@ var Header$1 = forwardRef(function (props, ref) {
1077
744
  });
1078
745
  Header$1.displayName = 'Header';
1079
746
 
1080
- var TooltipModalContext = createContext(undefined);
1081
- var useTooltipModalContext = function useTooltipModalContext() {
1082
- var context = useContext(TooltipModalContext);
747
+ const TooltipModalContext = createContext(undefined);
748
+ const useTooltipModalContext = () => {
749
+ const context = useContext(TooltipModalContext);
1083
750
  if (context === undefined) {
1084
751
  throw new Error('Element must be used within a TooltipModal component.');
1085
752
  }
1086
753
  return context;
1087
754
  };
1088
755
 
1089
- var TitleComponent = forwardRef(function (props, ref) {
1090
- var _useTooltipModalConte = useTooltipModalContext(),
1091
- getTitleProps = _useTooltipModalConte.getTitleProps;
756
+ const TitleComponent = forwardRef((props, ref) => {
757
+ const {
758
+ getTitleProps
759
+ } = useTooltipModalContext();
1092
760
  return React__default.createElement(StyledTooltipModalTitle, _extends$2({}, getTitleProps(props), {
1093
761
  ref: ref
1094
762
  }), props.children);
1095
763
  });
1096
764
  TitleComponent.displayName = 'TooltipModal.Title';
1097
- var Title = TitleComponent;
765
+ const Title = TitleComponent;
1098
766
 
1099
- var BodyComponent$1 = forwardRef(function (props, ref) {
1100
- var _useTooltipModalConte = useTooltipModalContext(),
1101
- getContentProps = _useTooltipModalConte.getContentProps;
767
+ const BodyComponent$1 = forwardRef((props, ref) => {
768
+ const {
769
+ getContentProps
770
+ } = useTooltipModalContext();
1102
771
  return React__default.createElement(StyledTooltipModalBody, _extends$2({}, getContentProps(props), {
1103
772
  ref: ref
1104
773
  }));
1105
774
  });
1106
775
  BodyComponent$1.displayName = 'TooltipModal.Body';
1107
- var Body$1 = BodyComponent$1;
1108
-
1109
- var CloseComponent$1 = forwardRef(function (props, ref) {
1110
- var _useTooltipModalConte = useTooltipModalContext(),
1111
- getCloseProps = _useTooltipModalConte.getCloseProps;
1112
- var ariaLabel = useText(CloseComponent$1, props, 'aria-label', 'Close tooltip');
1113
- return React__default.createElement(StyledTooltipModalClose, _extends$2({}, getCloseProps(_objectSpread2(_objectSpread2({}, props), {}, {
776
+ const Body$1 = BodyComponent$1;
777
+
778
+ const CloseComponent$1 = forwardRef((props, ref) => {
779
+ const {
780
+ getCloseProps
781
+ } = useTooltipModalContext();
782
+ const ariaLabel = useText(CloseComponent$1, props, 'aria-label', 'Close tooltip');
783
+ return React__default.createElement(StyledTooltipModalClose, _extends$2({}, getCloseProps({
784
+ ...props,
1114
785
  'aria-label': ariaLabel
1115
- })), {
786
+ }), {
1116
787
  ref: ref
1117
788
  }), React__default.createElement(SvgXStroke, null));
1118
789
  });
1119
790
  CloseComponent$1.displayName = 'TooltipModal.Close';
1120
- var Close$1 = CloseComponent$1;
791
+ const Close$1 = CloseComponent$1;
1121
792
 
1122
- var FooterComponent$1 = forwardRef(function (props, ref) {
1123
- return React__default.createElement(StyledTooltipModalFooter, _extends$2({
1124
- ref: ref
1125
- }, props));
1126
- });
793
+ const FooterComponent$1 = forwardRef((props, ref) => React__default.createElement(StyledTooltipModalFooter, _extends$2({
794
+ ref: ref
795
+ }, props)));
1127
796
  FooterComponent$1.displayName = 'TooltipModal.Footer';
1128
- var Footer$1 = FooterComponent$1;
797
+ const Footer$1 = FooterComponent$1;
1129
798
 
1130
- var FooterItemComponent$1 = forwardRef(function (props, ref) {
1131
- return React__default.createElement(StyledTooltipModalFooterItem, _extends$2({
1132
- ref: ref
1133
- }, props));
1134
- });
799
+ const FooterItemComponent$1 = forwardRef((props, ref) => React__default.createElement(StyledTooltipModalFooterItem, _extends$2({
800
+ ref: ref
801
+ }, props)));
1135
802
  FooterItemComponent$1.displayName = 'TooltipModal.FooterItem';
1136
- var FooterItem$1 = FooterItemComponent$1;
1137
-
1138
- var _excluded$1 = ["referenceElement", "popperModifiers", "placement", "onClose", "hasArrow", "isAnimated", "zIndex", "backdropProps", "focusOnMount", "restoreFocus", "id"];
1139
- var TooltipModalComponent = React__default.forwardRef(function (_ref, ref) {
1140
- var referenceElement = _ref.referenceElement,
1141
- popperModifiers = _ref.popperModifiers,
1142
- placement = _ref.placement,
1143
- onClose = _ref.onClose,
1144
- hasArrow = _ref.hasArrow,
1145
- isAnimated = _ref.isAnimated,
1146
- zIndex = _ref.zIndex,
1147
- backdropProps = _ref.backdropProps,
1148
- focusOnMount = _ref.focusOnMount,
1149
- restoreFocus = _ref.restoreFocus,
1150
- id = _ref.id,
1151
- props = _objectWithoutProperties(_ref, _excluded$1);
1152
- var theme = useContext(ThemeContext);
1153
- var previousReferenceElementRef = useRef();
1154
- var modalRef = useRef(null);
1155
- var transitionRef = useRef(null);
1156
- var _useState = useState(),
1157
- _useState2 = _slicedToArray(_useState, 2),
1158
- popperElement = _useState2[0],
1159
- setPopperElement = _useState2[1];
1160
- var _useModal = useModal({
803
+ const FooterItem$1 = FooterItemComponent$1;
804
+
805
+ const TooltipModalComponent = React__default.forwardRef((_ref, ref) => {
806
+ let {
807
+ referenceElement,
808
+ popperModifiers,
809
+ placement,
810
+ onClose,
811
+ hasArrow,
812
+ isAnimated,
813
+ zIndex,
814
+ backdropProps,
815
+ focusOnMount,
816
+ restoreFocus,
817
+ id,
818
+ ...props
819
+ } = _ref;
820
+ const theme = useContext(ThemeContext);
821
+ const previousReferenceElementRef = useRef();
822
+ const modalRef = useRef(null);
823
+ const transitionRef = useRef(null);
824
+ const [popperElement, setPopperElement] = useState();
825
+ const {
826
+ getTitleProps,
827
+ getCloseProps,
828
+ getContentProps,
829
+ getBackdropProps,
830
+ getModalProps
831
+ } = useModal({
1161
832
  idPrefix: id,
1162
- onClose: onClose,
1163
- modalRef: modalRef,
1164
- focusOnMount: focusOnMount,
833
+ onClose,
834
+ modalRef,
835
+ focusOnMount,
1165
836
  restoreFocus: false
1166
- }),
1167
- getTitleProps = _useModal.getTitleProps,
1168
- getCloseProps = _useModal.getCloseProps,
1169
- getContentProps = _useModal.getContentProps,
1170
- getBackdropProps = _useModal.getBackdropProps,
1171
- getModalProps = _useModal.getModalProps;
1172
- useEffect(function () {
837
+ });
838
+ useEffect(() => {
1173
839
  if (!referenceElement && previousReferenceElementRef.current && restoreFocus) {
1174
840
  previousReferenceElementRef.current.focus();
1175
841
  }
1176
842
  previousReferenceElementRef.current = referenceElement;
1177
843
  }, [referenceElement, restoreFocus]);
1178
- var popperPlacement = useMemo(function () {
1179
- return theme.rtl ? getRtlPopperPlacement(placement) : getPopperPlacement(placement);
1180
- }, [placement, theme.rtl]);
1181
- var _usePopper = usePopper(referenceElement, popperElement, {
844
+ const popperPlacement = useMemo(() => theme.rtl ? getRtlPopperPlacement(placement) : getPopperPlacement(placement), [placement, theme.rtl]);
845
+ const {
846
+ styles,
847
+ attributes,
848
+ state
849
+ } = usePopper(referenceElement, popperElement, {
1182
850
  placement: popperPlacement,
1183
851
  modifiers: [{
1184
852
  name: 'offset',
1185
853
  options: {
1186
854
  offset: [0, theme.space.base * 3]
1187
855
  }
1188
- }].concat(_toConsumableArray(popperModifiers || []))
1189
- }),
1190
- styles = _usePopper.styles,
1191
- attributes = _usePopper.attributes,
1192
- state = _usePopper.state;
1193
- var value = {
1194
- getTitleProps: getTitleProps,
1195
- getContentProps: getContentProps,
1196
- getCloseProps: getCloseProps
856
+ }, ...(popperModifiers || [])]
857
+ });
858
+ const value = {
859
+ getTitleProps,
860
+ getContentProps,
861
+ getCloseProps
1197
862
  };
1198
863
  return React__default.createElement(CSSTransition, {
1199
864
  unmountOnExit: true,
@@ -1201,7 +866,7 @@ var TooltipModalComponent = React__default.forwardRef(function (_ref, ref) {
1201
866
  in: Boolean(referenceElement),
1202
867
  classNames: isAnimated ? 'garden-tooltip-modal-transition' : '',
1203
868
  nodeRef: transitionRef
1204
- }, function (transitionState) {
869
+ }, transitionState => {
1205
870
  return React__default.createElement(TooltipModalContext.Provider, {
1206
871
  value: value
1207
872
  }, React__default.createElement(StyledTooltipModalBackdrop, _extends$2({}, getBackdropProps(), backdropProps, {
@@ -1242,123 +907,120 @@ TooltipModalComponent.propTypes = {
1242
907
  focusOnMount: PropTypes.bool,
1243
908
  restoreFocus: PropTypes.bool
1244
909
  };
1245
- var TooltipModal = TooltipModalComponent;
910
+ const TooltipModal = TooltipModalComponent;
1246
911
  TooltipModal.Body = Body$1;
1247
912
  TooltipModal.Close = Close$1;
1248
913
  TooltipModal.Footer = Footer$1;
1249
914
  TooltipModal.FooterItem = FooterItem$1;
1250
915
  TooltipModal.Title = Title;
1251
916
 
1252
- var HeaderComponent = forwardRef(function (props, ref) {
1253
- var _useModalContext = useModalContext(),
1254
- isCloseButtonPresent = _useModalContext.isCloseButtonPresent,
1255
- getTitleProps = _useModalContext.getTitleProps;
917
+ const HeaderComponent = forwardRef((props, ref) => {
918
+ const {
919
+ isCloseButtonPresent,
920
+ getTitleProps
921
+ } = useModalContext();
1256
922
  return React__default.createElement(StyledDrawerModalHeader, _extends$2({}, getTitleProps(props), {
1257
923
  isCloseButtonPresent: isCloseButtonPresent,
1258
924
  ref: ref
1259
925
  }));
1260
926
  });
1261
927
  HeaderComponent.displayName = 'DrawerModal.Header';
1262
- var Header = HeaderComponent;
928
+ const Header = HeaderComponent;
1263
929
 
1264
- var BodyComponent = forwardRef(function (props, ref) {
1265
- var _useModalContext = useModalContext(),
1266
- getContentProps = _useModalContext.getContentProps;
930
+ const BodyComponent = forwardRef((props, ref) => {
931
+ const {
932
+ getContentProps
933
+ } = useModalContext();
1267
934
  return React__default.createElement(StyledDrawerModalBody, _extends$2({}, getContentProps(props), {
1268
935
  ref: ref
1269
936
  }), props.children);
1270
937
  });
1271
938
  BodyComponent.displayName = 'DrawerModal.Body';
1272
- var Body = BodyComponent;
1273
-
1274
- var CloseComponent = forwardRef(function (props, ref) {
1275
- var _useModalContext = useModalContext(),
1276
- getCloseProps = _useModalContext.getCloseProps,
1277
- setIsCloseButtonPresent = _useModalContext.setIsCloseButtonPresent;
1278
- useEffect(function () {
939
+ const Body = BodyComponent;
940
+
941
+ const CloseComponent = forwardRef((props, ref) => {
942
+ const {
943
+ getCloseProps,
944
+ setIsCloseButtonPresent
945
+ } = useModalContext();
946
+ useEffect(() => {
1279
947
  setIsCloseButtonPresent(true);
1280
- return function () {
1281
- return setIsCloseButtonPresent(false);
1282
- };
948
+ return () => setIsCloseButtonPresent(false);
1283
949
  });
1284
- var ariaLabel = useText(CloseComponent, props, 'aria-label', 'Close drawer');
1285
- return React__default.createElement(StyledDrawerModalClose, _extends$2({}, getCloseProps(_objectSpread2(_objectSpread2({}, props), {}, {
950
+ const ariaLabel = useText(CloseComponent, props, 'aria-label', 'Close drawer');
951
+ return React__default.createElement(StyledDrawerModalClose, _extends$2({}, getCloseProps({
952
+ ...props,
1286
953
  'aria-label': ariaLabel
1287
- })), {
954
+ }), {
1288
955
  ref: ref
1289
956
  }), React__default.createElement(SvgXStroke, null));
1290
957
  });
1291
958
  CloseComponent.displayName = 'DrawerModal.Close';
1292
- var Close = CloseComponent;
959
+ const Close = CloseComponent;
1293
960
 
1294
- var FooterComponent = forwardRef(function (props, ref) {
1295
- return React__default.createElement(StyledDrawerModalFooter, _extends$2({
1296
- ref: ref
1297
- }, props));
1298
- });
961
+ const FooterComponent = forwardRef((props, ref) => React__default.createElement(StyledDrawerModalFooter, _extends$2({
962
+ ref: ref
963
+ }, props)));
1299
964
  FooterComponent.displayName = 'DrawerModal.Footer';
1300
- var Footer = FooterComponent;
965
+ const Footer = FooterComponent;
1301
966
 
1302
- var FooterItemComponent = forwardRef(function (props, ref) {
1303
- return React__default.createElement(StyledDrawerModalFooterItem, _extends$2({
1304
- ref: ref
1305
- }, props));
1306
- });
967
+ const FooterItemComponent = forwardRef((props, ref) => React__default.createElement(StyledDrawerModalFooterItem, _extends$2({
968
+ ref: ref
969
+ }, props)));
1307
970
  FooterItemComponent.displayName = 'DrawerModal.FooterItem';
1308
- var FooterItem = FooterItemComponent;
1309
-
1310
- var _excluded = ["id", "isOpen", "onClose", "backdropProps", "appendToNode", "focusOnMount", "restoreFocus"];
1311
- var DrawerModalComponent = forwardRef(function (_ref, ref) {
1312
- var id = _ref.id,
1313
- isOpen = _ref.isOpen,
1314
- onClose = _ref.onClose,
1315
- backdropProps = _ref.backdropProps,
1316
- appendToNode = _ref.appendToNode,
1317
- focusOnMount = _ref.focusOnMount,
1318
- restoreFocus = _ref.restoreFocus,
1319
- props = _objectWithoutProperties(_ref, _excluded);
1320
- var modalRef = useRef(null);
1321
- var transitionRef = useRef(null);
1322
- var theme = useContext(ThemeContext);
1323
- var environment = useDocument(theme);
1324
- var _useState = useState(false),
1325
- _useState2 = _slicedToArray(_useState, 2),
1326
- isCloseButtonPresent = _useState2[0],
1327
- setIsCloseButtonPresent = _useState2[1];
971
+ const FooterItem = FooterItemComponent;
972
+
973
+ const DrawerModalComponent = forwardRef((_ref, ref) => {
974
+ let {
975
+ id,
976
+ isOpen,
977
+ onClose,
978
+ backdropProps,
979
+ appendToNode,
980
+ focusOnMount,
981
+ restoreFocus,
982
+ ...props
983
+ } = _ref;
984
+ const modalRef = useRef(null);
985
+ const transitionRef = useRef(null);
986
+ const theme = useContext(ThemeContext);
987
+ const environment = useDocument(theme);
988
+ const [isCloseButtonPresent, setIsCloseButtonPresent] = useState(false);
1328
989
  useFocusVisible({
1329
990
  scope: modalRef,
1330
991
  relativeDocument: modalRef.current
1331
992
  });
1332
- var _useModal = useModal({
993
+ const {
994
+ getTitleProps,
995
+ getCloseProps,
996
+ getContentProps,
997
+ getBackdropProps,
998
+ getModalProps
999
+ } = useModal({
1333
1000
  idPrefix: id,
1334
- modalRef: modalRef,
1335
- focusOnMount: focusOnMount,
1336
- restoreFocus: restoreFocus,
1337
- environment: environment,
1338
- onClose: onClose
1339
- }),
1340
- getTitleProps = _useModal.getTitleProps,
1341
- getCloseProps = _useModal.getCloseProps,
1342
- getContentProps = _useModal.getContentProps,
1343
- getBackdropProps = _useModal.getBackdropProps,
1344
- getModalProps = _useModal.getModalProps;
1345
- useEffect(function () {
1001
+ modalRef,
1002
+ focusOnMount,
1003
+ restoreFocus,
1004
+ environment,
1005
+ onClose
1006
+ });
1007
+ useEffect(() => {
1346
1008
  if (!environment) {
1347
1009
  return undefined;
1348
1010
  }
1349
- var htmlElement = environment.querySelector('html');
1350
- var previousHtmlOverflow;
1011
+ const htmlElement = environment.querySelector('html');
1012
+ let previousHtmlOverflow;
1351
1013
  if (htmlElement && isOpen) {
1352
1014
  previousHtmlOverflow = htmlElement.style.overflow;
1353
1015
  htmlElement.style.overflow = 'hidden';
1354
1016
  }
1355
- return function () {
1017
+ return () => {
1356
1018
  if (htmlElement && isOpen) {
1357
1019
  htmlElement.style.overflow = previousHtmlOverflow;
1358
1020
  }
1359
1021
  };
1360
1022
  }, [environment, isOpen]);
1361
- var rootNode = useMemo(function () {
1023
+ const rootNode = useMemo(() => {
1362
1024
  if (appendToNode) {
1363
1025
  return appendToNode;
1364
1026
  }
@@ -1367,15 +1029,13 @@ var DrawerModalComponent = forwardRef(function (_ref, ref) {
1367
1029
  }
1368
1030
  return undefined;
1369
1031
  }, [appendToNode, environment]);
1370
- var value = useMemo(function () {
1371
- return {
1372
- isCloseButtonPresent: isCloseButtonPresent,
1373
- getTitleProps: getTitleProps,
1374
- getContentProps: getContentProps,
1375
- getCloseProps: getCloseProps,
1376
- setIsCloseButtonPresent: setIsCloseButtonPresent
1377
- };
1378
- }, [isCloseButtonPresent, getTitleProps, getContentProps, getCloseProps]);
1032
+ const value = useMemo(() => ({
1033
+ isCloseButtonPresent,
1034
+ getTitleProps,
1035
+ getContentProps,
1036
+ getCloseProps,
1037
+ setIsCloseButtonPresent
1038
+ }), [isCloseButtonPresent, getTitleProps, getContentProps, getCloseProps]);
1379
1039
  if (!rootNode) {
1380
1040
  return null;
1381
1041
  }
@@ -1402,13 +1062,13 @@ DrawerModalComponent.propTypes = {
1402
1062
  appendToNode: PropTypes.any,
1403
1063
  isOpen: PropTypes.bool
1404
1064
  };
1405
- var DrawerModal = DrawerModalComponent;
1065
+ const DrawerModal = DrawerModalComponent;
1406
1066
  DrawerModal.Body = Body;
1407
1067
  DrawerModal.Close = Close;
1408
1068
  DrawerModal.Footer = Footer;
1409
1069
  DrawerModal.FooterItem = FooterItem;
1410
1070
  DrawerModal.Header = Header;
1411
1071
 
1412
- var PLACEMENT = ['auto', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'end', 'end-top', 'end-bottom', 'start', 'start-top', 'start-bottom'];
1072
+ const PLACEMENT = ['auto', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'end', 'end-top', 'end-bottom', 'start', 'start-top', 'start-bottom'];
1413
1073
 
1414
1074
  export { Body$2 as Body, Close$2 as Close, DrawerModal, Footer$2 as Footer, FooterItem$2 as FooterItem, Header$1 as Header, Modal, PLACEMENT, TooltipModal };