@zendeskgarden/react-modals 8.69.2 → 8.69.4

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.
Files changed (49) hide show
  1. package/dist/index.cjs.js +54 -123
  2. package/dist/index.esm.js +44 -119
  3. package/dist/typings/elements/Body.d.ts +11 -11
  4. package/dist/typings/elements/Close.d.ts +11 -11
  5. package/dist/typings/elements/DrawerModal/Body.d.ts +11 -11
  6. package/dist/typings/elements/DrawerModal/Close.d.ts +11 -11
  7. package/dist/typings/elements/DrawerModal/DrawerModal.d.ts +23 -23
  8. package/dist/typings/elements/DrawerModal/Footer.d.ts +11 -11
  9. package/dist/typings/elements/DrawerModal/FooterItem.d.ts +11 -11
  10. package/dist/typings/elements/DrawerModal/Header.d.ts +12 -12
  11. package/dist/typings/elements/Footer.d.ts +11 -11
  12. package/dist/typings/elements/FooterItem.d.ts +11 -11
  13. package/dist/typings/elements/Header.d.ts +12 -12
  14. package/dist/typings/elements/Modal.d.ts +12 -12
  15. package/dist/typings/elements/TooltipModal/Body.d.ts +11 -11
  16. package/dist/typings/elements/TooltipModal/Close.d.ts +11 -11
  17. package/dist/typings/elements/TooltipModal/Footer.d.ts +11 -11
  18. package/dist/typings/elements/TooltipModal/FooterItem.d.ts +11 -11
  19. package/dist/typings/elements/TooltipModal/Title.d.ts +12 -12
  20. package/dist/typings/elements/TooltipModal/TooltipModal.d.ts +23 -23
  21. package/dist/typings/index.d.ts +15 -16
  22. package/dist/typings/styled/StyledBackdrop.d.ts +14 -14
  23. package/dist/typings/styled/StyledBody.d.ts +10 -10
  24. package/dist/typings/styled/StyledClose.d.ts +19 -19
  25. package/dist/typings/styled/StyledDangerIcon.d.ts +7 -7
  26. package/dist/typings/styled/StyledDrawerModal.d.ts +14 -14
  27. package/dist/typings/styled/StyledDrawerModalBody.d.ts +13 -13
  28. package/dist/typings/styled/StyledDrawerModalClose.d.ts +18 -18
  29. package/dist/typings/styled/StyledDrawerModalFooter.d.ts +10 -10
  30. package/dist/typings/styled/StyledDrawerModalFooterItem.d.ts +10 -10
  31. package/dist/typings/styled/StyledDrawerModalHeader.d.ts +14 -14
  32. package/dist/typings/styled/StyledFooter.d.ts +11 -11
  33. package/dist/typings/styled/StyledFooterItem.d.ts +10 -10
  34. package/dist/typings/styled/StyledHeader.d.ts +15 -15
  35. package/dist/typings/styled/StyledModal.d.ts +16 -16
  36. package/dist/typings/styled/StyledTooltipModal.d.ts +14 -14
  37. package/dist/typings/styled/StyledTooltipModalBackdrop.d.ts +13 -13
  38. package/dist/typings/styled/StyledTooltipModalBody.d.ts +10 -10
  39. package/dist/typings/styled/StyledTooltipModalClose.d.ts +13 -13
  40. package/dist/typings/styled/StyledTooltipModalFooter.d.ts +10 -10
  41. package/dist/typings/styled/StyledTooltipModalFooterItem.d.ts +13 -13
  42. package/dist/typings/styled/StyledTooltipModalTitle.d.ts +11 -11
  43. package/dist/typings/styled/StyledTooltipWrapper.d.ts +13 -13
  44. package/dist/typings/styled/index.d.ts +28 -28
  45. package/dist/typings/types/index.d.ts +96 -96
  46. package/dist/typings/utils/gardenPlacements.d.ts +28 -28
  47. package/dist/typings/utils/useModalContext.d.ts +20 -20
  48. package/dist/typings/utils/useTooltipModalContext.d.ts +17 -17
  49. package/package.json +4 -4
package/dist/index.esm.js CHANGED
@@ -14,8 +14,14 @@ import { getColor, retrieveComponentStyles, DEFAULT_THEME, getLineHeight, focusS
14
14
  import { useModal } from '@zendeskgarden/container-modal';
15
15
  import { useFocusVisible } from '@zendeskgarden/container-focusvisible';
16
16
  import mergeRefs from 'react-merge-refs';
17
+ import isWindow from 'dom-helpers/isWindow';
18
+ import ownerDocument from 'dom-helpers/ownerDocument';
19
+ import ownerWindow from 'dom-helpers/ownerWindow';
20
+ import css$1 from 'dom-helpers/css';
21
+ import getScrollbarSize from 'dom-helpers/scrollbarSize';
17
22
  import { usePopper } from 'react-popper';
18
23
  import { CSSTransition } from 'react-transition-group';
24
+ import activeElement from 'dom-helpers/activeElement';
19
25
 
20
26
  function _extends$2() {
21
27
  _extends$2 = Object.assign ? Object.assign.bind() : function (target) {
@@ -32,95 +38,21 @@ function _extends$2() {
32
38
  return _extends$2.apply(this, arguments);
33
39
  }
34
40
 
35
- function isDocument(element) {
36
- return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;
37
- }
38
-
39
- function isWindow(node) {
40
- if ('window' in node && node.window === node) return node;
41
- if (isDocument(node)) return node.defaultView || false;
42
- return false;
43
- }
44
-
45
- function ownerDocument(node) {
46
- return node && node.ownerDocument || document;
47
- }
48
-
49
- function ownerWindow(node) {
50
- var doc = ownerDocument(node);
51
- return doc && doc.defaultView || window;
52
- }
53
-
54
- function getComputedStyle(node, psuedoElement) {
55
- return ownerWindow(node).getComputedStyle(node, psuedoElement);
56
- }
57
-
58
- var rUpper = /([A-Z])/g;
59
- function hyphenate(string) {
60
- return string.replace(rUpper, '-$1').toLowerCase();
61
- }
62
-
63
- var msPattern = /^ms-/;
64
- function hyphenateStyleName(string) {
65
- return hyphenate(string).replace(msPattern, '-ms-');
66
- }
67
-
68
- var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;
69
- function isTransform(value) {
70
- return !!(value && supportedTransforms.test(value));
71
- }
72
-
73
- function style(node, property) {
74
- var css = '';
75
- var transforms = '';
76
- if (typeof property === 'string') {
77
- return node.style.getPropertyValue(hyphenateStyleName(property)) || getComputedStyle(node).getPropertyValue(hyphenateStyleName(property));
78
- }
79
- Object.keys(property).forEach(function (key) {
80
- var value = property[key];
81
- if (!value && value !== 0) {
82
- node.style.removeProperty(hyphenateStyleName(key));
83
- } else if (isTransform(key)) {
84
- transforms += key + "(" + value + ") ";
85
- } else {
86
- css += hyphenateStyleName(key) + ": " + value + ";";
87
- }
88
- });
89
- if (transforms) {
90
- css += "transform: " + transforms + ";";
91
- }
92
- node.style.cssText += ";" + css;
93
- }
94
-
95
- var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
96
-
97
- var size;
98
- function scrollbarSize(recalc) {
99
- if (!size && size !== 0 || recalc) {
100
- if (canUseDOM) {
101
- var scrollDiv = document.createElement('div');
102
- scrollDiv.style.position = 'absolute';
103
- scrollDiv.style.top = '-9999px';
104
- scrollDiv.style.width = '50px';
105
- scrollDiv.style.height = '50px';
106
- scrollDiv.style.overflow = 'scroll';
107
- document.body.appendChild(scrollDiv);
108
- size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
109
- document.body.removeChild(scrollDiv);
110
- }
111
- }
112
- return size;
113
- }
114
-
115
41
  const COMPONENT_ID$j = 'modals.backdrop';
116
42
  const animationName$1 = keyframes(["0%{opacity:0;}100%{opacity:1;}"]);
43
+ const animationStyles$1 = props => {
44
+ if (props.isAnimated) {
45
+ return css(["animation:", " 0.15s ease-in;"], animationName$1);
46
+ }
47
+ return '';
48
+ };
117
49
  const StyledBackdrop = styled.div.attrs({
118
50
  'data-garden-id': COMPONENT_ID$j,
119
- 'data-garden-version': '8.69.2'
51
+ 'data-garden-version': '8.69.4'
120
52
  }).withConfig({
121
53
  displayName: "StyledBackdrop",
122
54
  componentId: "sc-mzdjpo-0"
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));
55
+ })(["display:flex;position:fixed;inset:0;align-items:", ";justify-content:", ";z-index:400;background-color:", ";overflow:auto;-webkit-overflow-scrolling:touch;font-family:", ";direction:", ";", ";", ";"], 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', animationStyles$1, props => retrieveComponentStyles(COMPONENT_ID$j, props));
124
56
  StyledBackdrop.defaultProps = {
125
57
  theme: DEFAULT_THEME
126
58
  };
@@ -132,7 +64,7 @@ StyledBackdrop.propTypes = {
132
64
  const COMPONENT_ID$i = 'modals.body';
133
65
  const StyledBody = styled.div.attrs({
134
66
  'data-garden-id': COMPONENT_ID$i,
135
- 'data-garden-version': '8.69.2'
67
+ 'data-garden-version': '8.69.4'
136
68
  }).withConfig({
137
69
  displayName: "StyledBody",
138
70
  componentId: "sc-14rzecg-0"
@@ -157,7 +89,7 @@ const BASE_MULTIPLIERS$1 = {
157
89
  };
158
90
  const StyledClose = styled.button.attrs({
159
91
  'data-garden-id': COMPONENT_ID$h,
160
- 'data-garden-version': '8.69.2'
92
+ 'data-garden-version': '8.69.4'
161
93
  }).withConfig({
162
94
  displayName: "StyledClose",
163
95
  componentId: "sc-iseudj-0"
@@ -169,7 +101,7 @@ StyledClose.defaultProps = {
169
101
  const COMPONENT_ID$g = 'modals.footer';
170
102
  const StyledFooter = styled.div.attrs({
171
103
  'data-garden-id': COMPONENT_ID$g,
172
- 'data-garden-version': '8.69.2'
104
+ 'data-garden-version': '8.69.4'
173
105
  }).withConfig({
174
106
  displayName: "StyledFooter",
175
107
  componentId: "sc-d8pfdu-0"
@@ -181,7 +113,7 @@ StyledFooter.defaultProps = {
181
113
  const COMPONENT_ID$f = 'modals.footer_item';
182
114
  const StyledFooterItem = styled.span.attrs({
183
115
  'data-garden-id': COMPONENT_ID$f,
184
- 'data-garden-version': '8.69.2'
116
+ 'data-garden-version': '8.69.4'
185
117
  }).withConfig({
186
118
  displayName: "StyledFooterItem",
187
119
  componentId: "sc-1mb76hl-0"
@@ -193,7 +125,7 @@ StyledFooterItem.defaultProps = {
193
125
  const COMPONENT_ID$e = 'modals.header';
194
126
  const StyledHeader = styled.div.attrs({
195
127
  'data-garden-id': COMPONENT_ID$e,
196
- 'data-garden-version': '8.69.2'
128
+ 'data-garden-version': '8.69.4'
197
129
  }).withConfig({
198
130
  displayName: "StyledHeader",
199
131
  componentId: "sc-1787r9v-0"
@@ -240,6 +172,12 @@ StyledDangerIcon.defaultProps = {
240
172
 
241
173
  const COMPONENT_ID$d = 'modals.modal';
242
174
  const animationName = keyframes(["0%{transform:scale(0);opacity:0;}50%{transform:scale(1.05);}100%{opacity:1;}"]);
175
+ const animationStyles = props => {
176
+ if (props.isAnimated) {
177
+ return css(["animation:", " 0.3s ease-in;"], animationName);
178
+ }
179
+ return '';
180
+ };
243
181
  const boxShadow$1 = props => {
244
182
  const {
245
183
  theme
@@ -258,11 +196,11 @@ const sizeStyles$1 = props => {
258
196
  };
259
197
  const StyledModal = styled.div.attrs({
260
198
  'data-garden-id': COMPONENT_ID$d,
261
- 'data-garden-version': '8.69.2'
199
+ 'data-garden-version': '8.69.4'
262
200
  }).withConfig({
263
201
  displayName: "StyledModal",
264
202
  componentId: "sc-1pe1axu-0"
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));
203
+ })(["display:flex;position:fixed;flex-direction:column;animation-delay:0.01s;margin:", ";border-radius:", ";box-shadow:", ";background-color:", ";min-height:60px;max-height:calc(100vh - ", "px);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.theme.rtl && 'rtl', animationStyles, 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));
266
204
  StyledModal.propTypes = {
267
205
  isLarge: PropTypes.bool,
268
206
  isAnimated: PropTypes.bool
@@ -274,11 +212,11 @@ StyledModal.defaultProps = {
274
212
  const COMPONENT_ID$c = 'modals.tooltip_modal.backdrop';
275
213
  const StyledTooltipModalBackdrop = styled.div.attrs({
276
214
  'data-garden-id': COMPONENT_ID$c,
277
- 'data-garden-version': '8.69.2'
215
+ 'data-garden-version': '8.69.4'
278
216
  }).withConfig({
279
217
  displayName: "StyledTooltipModalBackdrop",
280
218
  componentId: "sc-1yaomgq-0"
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));
219
+ })(["position:fixed;inset: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));
282
220
  StyledTooltipModalBackdrop.defaultProps = {
283
221
  theme: DEFAULT_THEME
284
222
  };
@@ -357,7 +295,7 @@ StyledTooltipWrapper.defaultProps = {
357
295
  const COMPONENT_ID$b = 'modals.tooltip_modal';
358
296
  const StyledTooltipModal = styled.div.attrs(props => ({
359
297
  'data-garden-id': COMPONENT_ID$b,
360
- 'data-garden-version': '8.69.2',
298
+ 'data-garden-version': '8.69.4',
361
299
  className: props.isAnimated && 'is-animated'
362
300
  })).withConfig({
363
301
  displayName: "StyledTooltipModal",
@@ -386,7 +324,7 @@ const sizeStyles = props => `
386
324
  `;
387
325
  const StyledTooltipModalTitle = styled.div.attrs({
388
326
  'data-garden-id': COMPONENT_ID$a,
389
- 'data-garden-version': '8.69.2'
327
+ 'data-garden-version': '8.69.4'
390
328
  }).withConfig({
391
329
  displayName: "StyledTooltipModalTitle",
392
330
  componentId: "sc-11xjgjs-0"
@@ -398,7 +336,7 @@ StyledTooltipModalTitle.defaultProps = {
398
336
  const COMPONENT_ID$9 = 'modals.tooltip_modal.body';
399
337
  const StyledTooltipModalBody = styled.div.attrs({
400
338
  'data-garden-id': COMPONENT_ID$9,
401
- 'data-garden-version': '8.69.2'
339
+ 'data-garden-version': '8.69.4'
402
340
  }).withConfig({
403
341
  displayName: "StyledTooltipModalBody",
404
342
  componentId: "sc-195dkzj-0"
@@ -410,7 +348,7 @@ StyledTooltipModalBody.defaultProps = {
410
348
  const COMPONENT_ID$8 = 'modals.tooltip_modal.footer';
411
349
  const StyledTooltipModalFooter = styled.div.attrs({
412
350
  'data-garden-id': COMPONENT_ID$8,
413
- 'data-garden-version': '8.69.2'
351
+ 'data-garden-version': '8.69.4'
414
352
  }).withConfig({
415
353
  displayName: "StyledTooltipModalFooter",
416
354
  componentId: "sc-fm36a9-0"
@@ -422,7 +360,7 @@ StyledTooltipModalFooter.defaultProps = {
422
360
  const COMPONENT_ID$7 = 'modals.tooltip_modal.footer_item';
423
361
  const StyledTooltipModalFooterItem = styled(StyledFooterItem).attrs({
424
362
  'data-garden-id': COMPONENT_ID$7,
425
- 'data-garden-version': '8.69.2'
363
+ 'data-garden-version': '8.69.4'
426
364
  }).withConfig({
427
365
  displayName: "StyledTooltipModalFooterItem",
428
366
  componentId: "sc-1nahj6p-0"
@@ -434,7 +372,7 @@ StyledTooltipModalFooterItem.defaultProps = {
434
372
  const COMPONENT_ID$6 = 'modals.tooltip_modal.close';
435
373
  const StyledTooltipModalClose = styled(StyledClose).attrs({
436
374
  'data-garden-id': COMPONENT_ID$6,
437
- 'data-garden-version': '8.69.2'
375
+ 'data-garden-version': '8.69.4'
438
376
  }).withConfig({
439
377
  displayName: "StyledTooltipModalClose",
440
378
  componentId: "sc-1h2ke3q-0"
@@ -460,7 +398,7 @@ const boxShadow = props => {
460
398
  };
461
399
  const StyledDrawerModal = styled.div.attrs({
462
400
  'data-garden-id': COMPONENT_ID$5,
463
- 'data-garden-version': '8.69.2'
401
+ 'data-garden-version': '8.69.4'
464
402
  }).withConfig({
465
403
  displayName: "StyledDrawerModal",
466
404
  componentId: "sc-i1sake-0"
@@ -477,7 +415,7 @@ const BASE_MULTIPLIERS = {
477
415
  };
478
416
  const StyledDrawerModalClose = styled(StyledClose).attrs({
479
417
  'data-garden-id': COMPONENT_ID$4,
480
- 'data-garden-version': '8.69.2'
418
+ 'data-garden-version': '8.69.4'
481
419
  }).withConfig({
482
420
  displayName: "StyledDrawerModalClose",
483
421
  componentId: "sc-hrnaom-0"
@@ -489,7 +427,7 @@ StyledDrawerModalClose.defaultProps = {
489
427
  const COMPONENT_ID$3 = 'modals.drawer_modal.header';
490
428
  const StyledDrawerModalHeader = styled(StyledHeader).attrs({
491
429
  'data-garden-id': COMPONENT_ID$3,
492
- 'data-garden-version': '8.69.2'
430
+ 'data-garden-version': '8.69.4'
493
431
  }).withConfig({
494
432
  displayName: "StyledDrawerModalHeader",
495
433
  componentId: "sc-1u04rqw-0"
@@ -501,7 +439,7 @@ StyledDrawerModalHeader.defaultProps = {
501
439
  const COMPONENT_ID$2 = 'modals.drawer_modal.body';
502
440
  const StyledDrawerModalBody = styled(StyledBody).attrs({
503
441
  'data-garden-id': COMPONENT_ID$2,
504
- 'data-garden-version': '8.69.2'
442
+ 'data-garden-version': '8.69.4'
505
443
  }).withConfig({
506
444
  displayName: "StyledDrawerModalBody",
507
445
  componentId: "sc-yafe2y-0"
@@ -513,7 +451,7 @@ StyledDrawerModalBody.defaultProps = {
513
451
  const COMPONENT_ID$1 = 'modals.drawer_modal.footer';
514
452
  const StyledDrawerModalFooter = styled.div.attrs({
515
453
  'data-garden-id': COMPONENT_ID$1,
516
- 'data-garden-version': '8.69.2'
454
+ 'data-garden-version': '8.69.4'
517
455
  }).withConfig({
518
456
  displayName: "StyledDrawerModalFooter",
519
457
  componentId: "sc-17if4ka-0"
@@ -525,7 +463,7 @@ StyledDrawerModalFooter.defaultProps = {
525
463
  const COMPONENT_ID = 'modals.drawer_modal.footer_item';
526
464
  const StyledDrawerModalFooterItem = styled(StyledFooterItem).attrs({
527
465
  'data-garden-id': COMPONENT_ID,
528
- 'data-garden-version': '8.69.2'
466
+ 'data-garden-version': '8.69.4'
529
467
  }).withConfig({
530
468
  displayName: "StyledDrawerModalFooterItem",
531
469
  componentId: "sc-1vbl885-0"
@@ -601,10 +539,10 @@ const Modal = forwardRef((_ref, ref) => {
601
539
  let previousBodyPaddingRight;
602
540
  if (bodyElement) {
603
541
  if (isOverflowing(bodyElement)) {
604
- const scrollbarSize$1 = scrollbarSize();
605
- const bodyPaddingRight = parseInt(style(bodyElement, 'paddingRight') || '0', 10);
542
+ const scrollbarSize = getScrollbarSize();
543
+ const bodyPaddingRight = parseInt(css$1(bodyElement, 'paddingRight') || '0', 10);
606
544
  previousBodyPaddingRight = bodyElement.style.paddingRight;
607
- bodyElement.style.paddingRight = `${bodyPaddingRight + scrollbarSize$1}px`;
545
+ bodyElement.style.paddingRight = `${bodyPaddingRight + scrollbarSize}px`;
608
546
  }
609
547
  if (htmlElement) {
610
548
  previousHtmlOverflow = htmlElement.style.overflow;
@@ -993,19 +931,6 @@ TooltipModal.Footer = Footer$1;
993
931
  TooltipModal.FooterItem = FooterItem$1;
994
932
  TooltipModal.Title = Title;
995
933
 
996
- function activeElement(doc) {
997
- if (doc === void 0) {
998
- doc = ownerDocument();
999
- }
1000
- try {
1001
- var active = doc.activeElement;
1002
- if (!active || !active.nodeName) return null;
1003
- return active;
1004
- } catch (e) {
1005
- return doc.body;
1006
- }
1007
- }
1008
-
1009
934
  const HeaderComponent = forwardRef((_ref, ref) => {
1010
935
  let {
1011
936
  tag,
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLDivElement>
10
- */
11
- export declare const Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLDivElement>
10
+ */
11
+ export declare const Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
- */
11
- export declare const Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
+ */
11
+ export declare const Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLDivElement>
10
- */
11
- export declare const Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLDivElement>
10
+ */
11
+ export declare const Body: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
- */
11
- export declare const Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends ButtonHTMLAttributes<HTMLButtonElement>
10
+ */
11
+ export declare const Close: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
@@ -1,23 +1,23 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- import { IDrawerModalProps } from '../../types';
9
- import { Header } from './Header';
10
- import { Body } from './Body';
11
- import { Close } from './Close';
12
- import { Footer } from './Footer';
13
- import { FooterItem } from './FooterItem';
14
- /**
15
- * @extends HTMLAttributes<HTMLDivElement>
16
- */
17
- export declare const DrawerModal: React.ForwardRefExoticComponent<IDrawerModalProps & React.RefAttributes<HTMLDivElement>> & {
18
- Body: typeof Body;
19
- Close: typeof Close;
20
- Footer: typeof Footer;
21
- FooterItem: typeof FooterItem;
22
- Header: typeof Header;
23
- };
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IDrawerModalProps } from '../../types';
9
+ import { Header } from './Header';
10
+ import { Body } from './Body';
11
+ import { Close } from './Close';
12
+ import { Footer } from './Footer';
13
+ import { FooterItem } from './FooterItem';
14
+ /**
15
+ * @extends HTMLAttributes<HTMLDivElement>
16
+ */
17
+ export declare const DrawerModal: React.ForwardRefExoticComponent<IDrawerModalProps & React.RefAttributes<HTMLDivElement>> & {
18
+ Body: typeof Body;
19
+ Close: typeof Close;
20
+ Footer: typeof Footer;
21
+ FooterItem: typeof FooterItem;
22
+ Header: typeof Header;
23
+ };
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLDivElement>
10
- */
11
- export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLDivElement>
10
+ */
11
+ export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLSpanElement>
10
- */
11
- export declare const FooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLSpanElement>
10
+ */
11
+ export declare const FooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,12 +1,12 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- import { IDrawerModalHeaderProps } from '../../types';
9
- /**
10
- * @extends HTMLAttributes<HTMLDivElement>
11
- */
12
- export declare const Header: React.ForwardRefExoticComponent<IDrawerModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IDrawerModalHeaderProps } from '../../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const Header: React.ForwardRefExoticComponent<IDrawerModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLDivElement>
10
- */
11
- export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLDivElement>
10
+ */
11
+ export declare const Footer: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -1,11 +1,11 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- /**
9
- * @extends HTMLAttributes<HTMLSpanElement>
10
- */
11
- export declare const FooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ /**
9
+ * @extends HTMLAttributes<HTMLSpanElement>
10
+ */
11
+ export declare const FooterItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
@@ -1,12 +1,12 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- import { IHeaderProps } from '../types';
9
- /**
10
- * @extends HTMLAttributes<HTMLDivElement>
11
- */
12
- export declare const Header: React.ForwardRefExoticComponent<IHeaderProps & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IHeaderProps } from '../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const Header: React.ForwardRefExoticComponent<IHeaderProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,12 +1,12 @@
1
- /**
2
- * Copyright Zendesk, Inc.
3
- *
4
- * Use of this source code is governed under the Apache License, Version 2.0
5
- * found at http://www.apache.org/licenses/LICENSE-2.0.
6
- */
7
- import React from 'react';
8
- import { IModalProps } from '../types';
9
- /**
10
- * @extends HTMLAttributes<HTMLDivElement>
11
- */
12
- export declare const Modal: React.ForwardRefExoticComponent<IModalProps & React.RefAttributes<HTMLDivElement>>;
1
+ /**
2
+ * Copyright Zendesk, Inc.
3
+ *
4
+ * Use of this source code is governed under the Apache License, Version 2.0
5
+ * found at http://www.apache.org/licenses/LICENSE-2.0.
6
+ */
7
+ import React from 'react';
8
+ import { IModalProps } from '../types';
9
+ /**
10
+ * @extends HTMLAttributes<HTMLDivElement>
11
+ */
12
+ export declare const Modal: React.ForwardRefExoticComponent<IModalProps & React.RefAttributes<HTMLDivElement>>;