react-responsive-modal 4.0.1 → 5.0.3

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/lib/index.js DELETED
@@ -1,634 +0,0 @@
1
- 'use strict';
2
-
3
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
-
5
- var React = require('react');
6
- var React__default = _interopDefault(React);
7
- var ReactDom = _interopDefault(require('react-dom'));
8
- var PropTypes = _interopDefault(require('prop-types'));
9
- var CSSTransition = _interopDefault(require('react-transition-group/CSSTransition'));
10
- var cx = _interopDefault(require('classnames'));
11
- var noScroll = _interopDefault(require('no-scroll'));
12
- var FocusTrap = _interopDefault(require('focus-trap-react'));
13
-
14
- function _classCallCheck(instance, Constructor) {
15
- if (!(instance instanceof Constructor)) {
16
- throw new TypeError("Cannot call a class as a function");
17
- }
18
- }
19
-
20
- function _defineProperties(target, props) {
21
- for (var i = 0; i < props.length; i++) {
22
- var descriptor = props[i];
23
- descriptor.enumerable = descriptor.enumerable || false;
24
- descriptor.configurable = true;
25
- if ("value" in descriptor) descriptor.writable = true;
26
- Object.defineProperty(target, descriptor.key, descriptor);
27
- }
28
- }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) {
31
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
32
- if (staticProps) _defineProperties(Constructor, staticProps);
33
- return Constructor;
34
- }
35
-
36
- function _defineProperty(obj, key, value) {
37
- if (key in obj) {
38
- Object.defineProperty(obj, key, {
39
- value: value,
40
- enumerable: true,
41
- configurable: true,
42
- writable: true
43
- });
44
- } else {
45
- obj[key] = value;
46
- }
47
-
48
- return obj;
49
- }
50
-
51
- function _objectSpread(target) {
52
- for (var i = 1; i < arguments.length; i++) {
53
- var source = arguments[i] != null ? arguments[i] : {};
54
- var ownKeys = Object.keys(source);
55
-
56
- if (typeof Object.getOwnPropertySymbols === 'function') {
57
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
58
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
59
- }));
60
- }
61
-
62
- ownKeys.forEach(function (key) {
63
- _defineProperty(target, key, source[key]);
64
- });
65
- }
66
-
67
- return target;
68
- }
69
-
70
- function _inherits(subClass, superClass) {
71
- if (typeof superClass !== "function" && superClass !== null) {
72
- throw new TypeError("Super expression must either be null or a function");
73
- }
74
-
75
- subClass.prototype = Object.create(superClass && superClass.prototype, {
76
- constructor: {
77
- value: subClass,
78
- writable: true,
79
- configurable: true
80
- }
81
- });
82
- if (superClass) _setPrototypeOf(subClass, superClass);
83
- }
84
-
85
- function _getPrototypeOf(o) {
86
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
87
- return o.__proto__ || Object.getPrototypeOf(o);
88
- };
89
- return _getPrototypeOf(o);
90
- }
91
-
92
- function _setPrototypeOf(o, p) {
93
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
94
- o.__proto__ = p;
95
- return o;
96
- };
97
-
98
- return _setPrototypeOf(o, p);
99
- }
100
-
101
- function _assertThisInitialized(self) {
102
- if (self === void 0) {
103
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
104
- }
105
-
106
- return self;
107
- }
108
-
109
- function _possibleConstructorReturn(self, call) {
110
- if (call && (typeof call === "object" || typeof call === "function")) {
111
- return call;
112
- }
113
-
114
- return _assertThisInitialized(self);
115
- }
116
-
117
- var CloseIcon = function CloseIcon(_ref) {
118
- var classes = _ref.classes,
119
- classNames = _ref.classNames,
120
- styles = _ref.styles,
121
- closeIconSize = _ref.closeIconSize,
122
- closeIconSvgPath = _ref.closeIconSvgPath,
123
- onClickCloseIcon = _ref.onClickCloseIcon,
124
- id = _ref.id;
125
- return React__default.createElement("button", {
126
- className: cx(classes.closeButton, classNames.closeButton),
127
- style: styles.closeButton,
128
- onClick: onClickCloseIcon,
129
- id: id
130
- }, React__default.createElement("svg", {
131
- className: cx(classes.closeIcon, classNames.closeIcon),
132
- style: styles.closeIcon,
133
- xmlns: "http://www.w3.org/2000/svg",
134
- width: closeIconSize,
135
- height: closeIconSize,
136
- viewBox: "0 0 36 36"
137
- }, closeIconSvgPath));
138
- };
139
-
140
- CloseIcon.propTypes = {
141
- classNames: PropTypes.object.isRequired,
142
- styles: PropTypes.object.isRequired,
143
- classes: PropTypes.object.isRequired,
144
- closeIconSize: PropTypes.number.isRequired,
145
- closeIconSvgPath: PropTypes.node.isRequired,
146
- onClickCloseIcon: PropTypes.func.isRequired,
147
- id: PropTypes.string
148
- };
149
- CloseIcon.defaultProps = {
150
- id: null
151
- };
152
-
153
- var _modals = [];
154
- /**
155
- * Handle the order of the modals.
156
- * Inspired by the material-ui implementation.
157
- */
158
-
159
- var modalManager = {
160
- /**
161
- * Return the modals array
162
- */
163
- modals: function modals() {
164
- return _modals;
165
- },
166
-
167
- /**
168
- * Register a new modal
169
- */
170
- add: function add(modal) {
171
- if (_modals.indexOf(modal) === -1) {
172
- _modals.push(modal);
173
- }
174
- },
175
-
176
- /**
177
- * Remove a modal
178
- */
179
- remove: function remove(modal) {
180
- var index = _modals.indexOf(modal);
181
-
182
- if (index !== -1) {
183
- _modals.splice(index, 1);
184
- }
185
- },
186
-
187
- /**
188
- * Check if the modal is the first one on the screen
189
- */
190
- isTopModal: function isTopModal(modal) {
191
- return !!_modals.length && _modals[_modals.length - 1] === modal;
192
- }
193
- };
194
-
195
- function styleInject(css, ref) {
196
- if ( ref === void 0 ) ref = {};
197
- var insertAt = ref.insertAt;
198
-
199
- if (!css || typeof document === 'undefined') { return; }
200
-
201
- var head = document.head || document.getElementsByTagName('head')[0];
202
- var style = document.createElement('style');
203
- style.type = 'text/css';
204
-
205
- if (insertAt === 'top') {
206
- if (head.firstChild) {
207
- head.insertBefore(style, head.firstChild);
208
- } else {
209
- head.appendChild(style);
210
- }
211
- } else {
212
- head.appendChild(style);
213
- }
214
-
215
- if (style.styleSheet) {
216
- style.styleSheet.cssText = css;
217
- } else {
218
- style.appendChild(document.createTextNode(css));
219
- }
220
- }
221
-
222
- var css = ".styles_overlay__CLSq- {\n background: rgba(0, 0, 0, 0.75);\n display: flex;\n align-items: flex-start;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow-y: auto;\n overflow-x: hidden;\n z-index: 1000;\n padding: 1.2rem;\n}\n.styles_modal__gNwvD {\n max-width: 800px;\n position: relative;\n padding: 1.2rem;\n background: #ffffff;\n background-clip: padding-box;\n box-shadow: 0 12px 15px 0 rgba(0, 0, 0, 0.25);\n margin: 0 auto;\n}\n.styles_modalCenter__L9F2w {\n margin: auto;\n}\n.styles_closeButton__20ID4 {\n position: absolute;\n top: 14px;\n right: 14px;\n border: none;\n padding: 0;\n background-color: transparent;\n display: flex;\n}\n.styles_closeIcon__1QwbI {\n}\n.styles_transitionEnter__3j_-a {\n opacity: 0.01;\n}\n.styles_transitionEnterActive___eQs7 {\n opacity: 1;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n.styles_transitionExit__1KmEf {\n opacity: 1;\n}\n.styles_transitionExitActive__1nQXw {\n opacity: 0.01;\n transition: opacity 500ms cubic-bezier(0.23, 1, 0.32, 1);\n}\n";
223
- var cssClasses = {"overlay":"styles_overlay__CLSq-","modal":"styles_modal__gNwvD","modalCenter":"styles_modalCenter__L9F2w","closeButton":"styles_closeButton__20ID4","closeIcon":"styles_closeIcon__1QwbI","transitionEnter":"styles_transitionEnter__3j_-a","transitionEnterActive":"styles_transitionEnterActive___eQs7","transitionExit":"styles_transitionExit__1KmEf","transitionExitActive":"styles_transitionExitActive__1nQXw"};
224
- styleInject(css,{"insertAt":"top"});
225
-
226
- var isBrowser = typeof window !== 'undefined';
227
-
228
- var Modal =
229
- /*#__PURE__*/
230
- function (_Component) {
231
- _inherits(Modal, _Component);
232
-
233
- _createClass(Modal, null, [{
234
- key: "blockScroll",
235
- value: function blockScroll() {
236
- noScroll.on();
237
- }
238
- }]);
239
-
240
- function Modal(props) {
241
- var _this;
242
-
243
- _classCallCheck(this, Modal);
244
-
245
- _this = _possibleConstructorReturn(this, _getPrototypeOf(Modal).call(this, props));
246
-
247
- _defineProperty(_assertThisInitialized(_this), "shouldClose", null);
248
-
249
- _defineProperty(_assertThisInitialized(_this), "handleOpen", function () {
250
- modalManager.add(_assertThisInitialized(_this));
251
-
252
- if (isBrowser && !_this.props.container) {
253
- document.body.appendChild(_this.container);
254
- }
255
-
256
- if (_this.props.blockScroll) {
257
- Modal.blockScroll();
258
- }
259
-
260
- document.addEventListener('keydown', _this.handleKeydown);
261
- });
262
-
263
- _defineProperty(_assertThisInitialized(_this), "handleClose", function () {
264
- modalManager.remove(_assertThisInitialized(_this));
265
-
266
- if (_this.props.blockScroll) {
267
- Modal.unblockScroll();
268
- }
269
-
270
- if (isBrowser && !_this.props.container) {
271
- document.body.removeChild(_this.container);
272
- }
273
-
274
- document.removeEventListener('keydown', _this.handleKeydown);
275
- });
276
-
277
- _defineProperty(_assertThisInitialized(_this), "handleClickOverlay", function (event) {
278
- if (_this.shouldClose === null) {
279
- _this.shouldClose = true;
280
- }
281
-
282
- if (!_this.shouldClose) {
283
- _this.shouldClose = null;
284
- return;
285
- }
286
-
287
- if (_this.props.onOverlayClick) {
288
- _this.props.onOverlayClick(event);
289
- }
290
-
291
- if (_this.props.closeOnOverlayClick) {
292
- _this.props.onClose(event);
293
- }
294
-
295
- _this.shouldClose = null;
296
- });
297
-
298
- _defineProperty(_assertThisInitialized(_this), "handleClickCloseIcon", function (event) {
299
- _this.props.onClose(event);
300
- });
301
-
302
- _defineProperty(_assertThisInitialized(_this), "handleKeydown", function (event) {
303
- // Only the last modal need to be escaped when pressing the esc key
304
- if (event.keyCode !== 27 || !modalManager.isTopModal(_assertThisInitialized(_this))) {
305
- return;
306
- }
307
-
308
- if (_this.props.onEscKeyDown) {
309
- _this.props.onEscKeyDown(event);
310
- }
311
-
312
- if (_this.props.closeOnEsc) {
313
- _this.props.onClose(event);
314
- }
315
- });
316
-
317
- _defineProperty(_assertThisInitialized(_this), "handleModalEvent", function () {
318
- _this.shouldClose = false;
319
- });
320
-
321
- _defineProperty(_assertThisInitialized(_this), "handleEntered", function () {
322
- if (_this.props.onEntered) {
323
- _this.props.onEntered();
324
- }
325
- });
326
-
327
- _defineProperty(_assertThisInitialized(_this), "handleExited", function () {
328
- if (_this.props.onExited) {
329
- _this.props.onExited();
330
- }
331
-
332
- _this.setState({
333
- showPortal: false
334
- });
335
-
336
- if (_this.props.blockScroll) {
337
- Modal.unblockScroll();
338
- }
339
- });
340
-
341
- _this.container = isBrowser && document.createElement('div');
342
- _this.state = {
343
- showPortal: _this.props.open
344
- };
345
- return _this;
346
- }
347
-
348
- _createClass(Modal, [{
349
- key: "componentDidMount",
350
- value: function componentDidMount() {
351
- // Block scroll when initial prop is open
352
- if (this.props.open) {
353
- this.handleOpen();
354
- }
355
- }
356
- }, {
357
- key: "componentDidUpdate",
358
- value: function componentDidUpdate(prevProps, prevState) {
359
- if (prevState.showPortal && !this.state.showPortal) {
360
- this.handleClose();
361
- } else if (!prevProps.open && this.props.open) {
362
- this.handleOpen();
363
- }
364
- }
365
- }, {
366
- key: "componentWillUnmount",
367
- value: function componentWillUnmount() {
368
- if (this.state.showPortal) {
369
- this.handleClose();
370
- }
371
- }
372
- }, {
373
- key: "render",
374
- value: function render() {
375
- var _this$props = this.props,
376
- open = _this$props.open,
377
- center = _this$props.center,
378
- classes = _this$props.classes,
379
- classNames = _this$props.classNames,
380
- styles = _this$props.styles,
381
- showCloseIcon = _this$props.showCloseIcon,
382
- closeIconSize = _this$props.closeIconSize,
383
- closeIconSvgPath = _this$props.closeIconSvgPath,
384
- animationDuration = _this$props.animationDuration,
385
- focusTrapped = _this$props.focusTrapped,
386
- focusTrapOptions = _this$props.focusTrapOptions,
387
- overlayId = _this$props.overlayId,
388
- modalId = _this$props.modalId,
389
- closeIconId = _this$props.closeIconId,
390
- role = _this$props.role,
391
- ariaLabelledby = _this$props.ariaLabelledby,
392
- ariaDescribedby = _this$props.ariaDescribedby;
393
- var showPortal = this.state.showPortal;
394
-
395
- if (!showPortal) {
396
- return null;
397
- }
398
-
399
- var content = React__default.createElement(React__default.Fragment, null, this.props.children, showCloseIcon && React__default.createElement(CloseIcon, {
400
- classes: classes,
401
- classNames: classNames,
402
- styles: styles,
403
- closeIconSize: closeIconSize,
404
- closeIconSvgPath: closeIconSvgPath,
405
- onClickCloseIcon: this.handleClickCloseIcon,
406
- id: closeIconId
407
- }));
408
- return ReactDom.createPortal(React__default.createElement(CSSTransition, {
409
- "in": open,
410
- appear: true,
411
- classNames: {
412
- appear: classNames.transitionEnter || classes.transitionEnter,
413
- appearActive: classNames.transitionEnterActive || classes.transitionEnterActive,
414
- enter: classNames.transitionEnter || classes.transitionEnter,
415
- enterActive: classNames.transitionEnterActive || classes.transitionEnterActive,
416
- exit: classNames.transitionExit || classes.transitionExit,
417
- exitActive: classNames.transitionExitActive || classes.transitionExitActive
418
- },
419
- timeout: animationDuration,
420
- onEntered: this.handleEntered,
421
- onExited: this.handleExited
422
- }, React__default.createElement("div", {
423
- className: cx(classes.overlay, classNames.overlay),
424
- onClick: this.handleClickOverlay,
425
- style: styles.overlay,
426
- id: overlayId
427
- }, React__default.createElement("div", {
428
- className: cx(classes.modal, center && classes.modalCenter, classNames.modal),
429
- style: styles.modal,
430
- onMouseDown: this.handleModalEvent,
431
- onMouseUp: this.handleModalEvent,
432
- onClick: this.handleModalEvent,
433
- id: modalId,
434
- role: role,
435
- "aria-modal": "true",
436
- "aria-labelledby": ariaLabelledby,
437
- "aria-describedby": ariaDescribedby
438
- }, focusTrapped ? React__default.createElement(FocusTrap, {
439
- focusTrapOptions: _objectSpread({}, {
440
- clickOutsideDeactivates: true
441
- }, focusTrapOptions)
442
- }, content) : content))), this.props.container || this.container);
443
- }
444
- }], [{
445
- key: "getDerivedStateFromProps",
446
- value: function getDerivedStateFromProps(nextProps, prevState) {
447
- if (!prevState.showPortal && nextProps.open) {
448
- return {
449
- showPortal: true
450
- };
451
- }
452
-
453
- return null;
454
- }
455
- }]);
456
-
457
- return Modal;
458
- }(React.Component);
459
-
460
- _defineProperty(Modal, "unblockScroll", function () {
461
- // Restore the scroll only if there is no modal on the screen
462
- if (modalManager.modals().length === 0) {
463
- noScroll.off();
464
- }
465
- });
466
-
467
- Modal.propTypes = {
468
- /**
469
- * Is the modal closable when user press esc key.
470
- */
471
- closeOnEsc: PropTypes.bool,
472
-
473
- /**
474
- * Is the modal closable when user click on overlay.
475
- */
476
- closeOnOverlayClick: PropTypes.bool,
477
-
478
- /**
479
- * Callback fired when the Modal is open and the animation is finished.
480
- */
481
- onEntered: PropTypes.func,
482
-
483
- /**
484
- * Callback fired when the Modal has exited and the animation is finished.
485
- */
486
- onExited: PropTypes.func,
487
-
488
- /**
489
- * Callback fired when the Modal is requested to be closed by a click on the overlay or when user press esc key.
490
- */
491
- onClose: PropTypes.func.isRequired,
492
-
493
- /**
494
- * Callback fired when the escape key is pressed.
495
- */
496
- onEscKeyDown: PropTypes.func,
497
-
498
- /**
499
- * Callback fired when the overlay is clicked.
500
- */
501
- onOverlayClick: PropTypes.func,
502
-
503
- /**
504
- * Control if the modal is open or not.
505
- */
506
- open: PropTypes.bool.isRequired,
507
-
508
- /**
509
- * An object containing classNames to style the modal, can have properties 'overlay' (classname for overlay div), 'modal' (classname for modal content div), 'closeButton' (classname for the button that contain the close icon), 'closeIcon' (classname for close icon svg). You can customize the transition with 'transitionEnter', 'transitionEnterActive', 'transitionExit', 'transitionExitActive'
510
- */
511
- classNames: PropTypes.object,
512
-
513
- /**
514
- * An object containing the styles objects to style the modal, can have properties 'overlay', 'modal', 'closeButton', 'closeIcon'.
515
- */
516
- styles: PropTypes.object,
517
-
518
- /**
519
- * The content of the modal.
520
- */
521
- children: PropTypes.node,
522
-
523
- /**
524
- * @internal
525
- */
526
- classes: PropTypes.object,
527
-
528
- /**
529
- * Should the dialog be centered.
530
- */
531
- center: PropTypes.bool,
532
-
533
- /**
534
- * Show the close icon.
535
- */
536
- showCloseIcon: PropTypes.bool,
537
-
538
- /**
539
- * Close icon size.
540
- */
541
- closeIconSize: PropTypes.number,
542
-
543
- /**
544
- * A valid svg path to show as icon.
545
- */
546
- closeIconSvgPath: PropTypes.node,
547
-
548
- /**
549
- * Animation duration in milliseconds.
550
- */
551
- animationDuration: PropTypes.number,
552
-
553
- /**
554
- * You can specify a container prop which should be of type `Element`. The portal will be rendered inside that element. The default behavior will create a div node and render it at the at the end of document.body.
555
- */
556
- container: PropTypes.object,
557
- // eslint-disable-line
558
-
559
- /**
560
- * Whether to block scrolling when dialog is open
561
- */
562
- blockScroll: PropTypes.bool,
563
-
564
- /**
565
- * When the modal is open, trap focus within it
566
- */
567
- focusTrapped: PropTypes.bool,
568
-
569
- /**
570
- * Options to be passed to the focus trap, details available at https://github.com/davidtheclark/focus-trap#focustrap--createfocustrapelement-createoptions
571
- */
572
- focusTrapOptions: PropTypes.object,
573
-
574
- /**
575
- * id attribute for overlay
576
- */
577
- overlayId: PropTypes.string,
578
-
579
- /**
580
- * id attribute for modal
581
- */
582
- modalId: PropTypes.string,
583
-
584
- /**
585
- * id attribute for close icon
586
- */
587
- closeIconId: PropTypes.string,
588
-
589
- /**
590
- * ARIA role for modal
591
- */
592
- role: PropTypes.string,
593
-
594
- /**
595
- * ARIA label for modal
596
- */
597
- ariaLabelledby: PropTypes.string,
598
-
599
- /**
600
- * ARIA description for modal
601
- */
602
- ariaDescribedby: PropTypes.string
603
- };
604
- Modal.defaultProps = {
605
- classes: cssClasses,
606
- closeOnEsc: true,
607
- closeOnOverlayClick: true,
608
- onEntered: undefined,
609
- onExited: undefined,
610
- onEscKeyDown: undefined,
611
- onOverlayClick: undefined,
612
- showCloseIcon: true,
613
- closeIconSize: 28,
614
- closeIconSvgPath: React__default.createElement("path", {
615
- d: "M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z"
616
- }),
617
- classNames: {},
618
- styles: {},
619
- children: null,
620
- center: false,
621
- animationDuration: 500,
622
- blockScroll: true,
623
- focusTrapped: true,
624
- focusTrapOptions: {},
625
- overlayId: undefined,
626
- modalId: undefined,
627
- closeIconId: undefined,
628
- role: 'dialog',
629
- ariaLabelledby: undefined,
630
- ariaDescribedby: undefined
631
- };
632
-
633
- module.exports = Modal;
634
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/close-icon.js","../src/modal-manager.js","../node_modules/style-inject/dist/style-inject.es.js","../src/modal.js"],"sourcesContent":["import React from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\n\nconst CloseIcon = ({\n classes,\n classNames,\n styles,\n closeIconSize,\n closeIconSvgPath,\n onClickCloseIcon,\n id,\n}) => (\n <button\n className={cx(classes.closeButton, classNames.closeButton)}\n style={styles.closeButton}\n onClick={onClickCloseIcon}\n id={id}\n >\n <svg\n className={cx(classes.closeIcon, classNames.closeIcon)}\n style={styles.closeIcon}\n xmlns=\"http://www.w3.org/2000/svg\"\n width={closeIconSize}\n height={closeIconSize}\n viewBox=\"0 0 36 36\"\n >\n {closeIconSvgPath}\n </svg>\n </button>\n);\n\nCloseIcon.propTypes = {\n classNames: PropTypes.object.isRequired,\n styles: PropTypes.object.isRequired,\n classes: PropTypes.object.isRequired,\n closeIconSize: PropTypes.number.isRequired,\n closeIconSvgPath: PropTypes.node.isRequired,\n onClickCloseIcon: PropTypes.func.isRequired,\n id: PropTypes.string,\n};\n\nCloseIcon.defaultProps = {\n id: null,\n};\n\nexport default CloseIcon;\n","const modals = [];\n\n/**\n * Handle the order of the modals.\n * Inspired by the material-ui implementation.\n */\nexport default {\n /**\n * Return the modals array\n */\n modals: () => modals,\n\n /**\n * Register a new modal\n */\n add: modal => {\n if (modals.indexOf(modal) === -1) {\n modals.push(modal);\n }\n },\n\n /**\n * Remove a modal\n */\n remove: modal => {\n const index = modals.indexOf(modal);\n if (index !== -1) {\n modals.splice(index, 1);\n }\n },\n\n /**\n * Check if the modal is the first one on the screen\n */\n isTopModal: modal => !!modals.length && modals[modals.length - 1] === modal,\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { Component } from 'react';\nimport ReactDom from 'react-dom';\nimport PropTypes from 'prop-types';\nimport CSSTransition from 'react-transition-group/CSSTransition';\nimport cx from 'classnames';\nimport noScroll from 'no-scroll';\nimport FocusTrap from 'focus-trap-react';\nimport CloseIcon from './close-icon';\nimport modalManager from './modal-manager';\nimport cssClasses from './styles.css';\n\nconst isBrowser = typeof window !== 'undefined';\n\nclass Modal extends Component {\n static blockScroll() {\n noScroll.on();\n }\n\n static unblockScroll = () => {\n // Restore the scroll only if there is no modal on the screen\n if (modalManager.modals().length === 0) {\n noScroll.off();\n }\n };\n\n shouldClose = null;\n\n constructor(props) {\n super(props);\n this.container = isBrowser && document.createElement('div');\n this.state = {\n showPortal: this.props.open,\n };\n }\n\n componentDidMount() {\n // Block scroll when initial prop is open\n if (this.props.open) {\n this.handleOpen();\n }\n }\n\n componentDidUpdate(prevProps, prevState) {\n if (prevState.showPortal && !this.state.showPortal) {\n this.handleClose();\n } else if (!prevProps.open && this.props.open) {\n this.handleOpen();\n }\n }\n\n componentWillUnmount() {\n if (this.state.showPortal) {\n this.handleClose();\n }\n }\n\n static getDerivedStateFromProps(nextProps, prevState) {\n if (!prevState.showPortal && nextProps.open) {\n return {\n showPortal: true,\n };\n }\n return null;\n }\n\n handleOpen = () => {\n modalManager.add(this);\n if (isBrowser && !this.props.container) {\n document.body.appendChild(this.container);\n }\n if (this.props.blockScroll) {\n Modal.blockScroll();\n }\n document.addEventListener('keydown', this.handleKeydown);\n };\n\n handleClose = () => {\n modalManager.remove(this);\n if (this.props.blockScroll) {\n Modal.unblockScroll();\n }\n if (isBrowser && !this.props.container) {\n document.body.removeChild(this.container);\n }\n document.removeEventListener('keydown', this.handleKeydown);\n };\n\n handleClickOverlay = event => {\n if (this.shouldClose === null) {\n this.shouldClose = true;\n }\n\n if (!this.shouldClose) {\n this.shouldClose = null;\n return;\n }\n\n if (this.props.onOverlayClick) {\n this.props.onOverlayClick(event);\n }\n\n if (this.props.closeOnOverlayClick) {\n this.props.onClose(event);\n }\n\n this.shouldClose = null;\n };\n\n handleClickCloseIcon = event => {\n this.props.onClose(event);\n };\n\n handleKeydown = event => {\n // Only the last modal need to be escaped when pressing the esc key\n if (event.keyCode !== 27 || !modalManager.isTopModal(this)) {\n return;\n }\n\n if (this.props.onEscKeyDown) {\n this.props.onEscKeyDown(event);\n }\n\n if (this.props.closeOnEsc) {\n this.props.onClose(event);\n }\n };\n\n handleModalEvent = () => {\n this.shouldClose = false;\n };\n\n handleEntered = () => {\n if (this.props.onEntered) {\n this.props.onEntered();\n }\n };\n\n handleExited = () => {\n if (this.props.onExited) {\n this.props.onExited();\n }\n\n this.setState({ showPortal: false });\n\n if (this.props.blockScroll) {\n Modal.unblockScroll();\n }\n };\n\n render() {\n const {\n open,\n center,\n classes,\n classNames,\n styles,\n showCloseIcon,\n closeIconSize,\n closeIconSvgPath,\n animationDuration,\n focusTrapped,\n focusTrapOptions,\n overlayId,\n modalId,\n closeIconId,\n role,\n ariaLabelledby,\n ariaDescribedby,\n } = this.props;\n const { showPortal } = this.state;\n\n if (!showPortal) {\n return null;\n }\n\n const content = (\n <React.Fragment>\n {this.props.children}\n {showCloseIcon && (\n <CloseIcon\n classes={classes}\n classNames={classNames}\n styles={styles}\n closeIconSize={closeIconSize}\n closeIconSvgPath={closeIconSvgPath}\n onClickCloseIcon={this.handleClickCloseIcon}\n id={closeIconId}\n />\n )}\n </React.Fragment>\n );\n\n return ReactDom.createPortal(\n <CSSTransition\n in={open}\n appear\n classNames={{\n appear: classNames.transitionEnter || classes.transitionEnter,\n appearActive:\n classNames.transitionEnterActive || classes.transitionEnterActive,\n enter: classNames.transitionEnter || classes.transitionEnter,\n enterActive:\n classNames.transitionEnterActive || classes.transitionEnterActive,\n exit: classNames.transitionExit || classes.transitionExit,\n exitActive:\n classNames.transitionExitActive || classes.transitionExitActive,\n }}\n timeout={animationDuration}\n onEntered={this.handleEntered}\n onExited={this.handleExited}\n >\n <div\n className={cx(classes.overlay, classNames.overlay)}\n onClick={this.handleClickOverlay}\n style={styles.overlay}\n id={overlayId}\n >\n <div\n className={cx(\n classes.modal,\n center && classes.modalCenter,\n classNames.modal\n )}\n style={styles.modal}\n onMouseDown={this.handleModalEvent}\n onMouseUp={this.handleModalEvent}\n onClick={this.handleModalEvent}\n id={modalId}\n role={role}\n aria-modal=\"true\"\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n >\n {focusTrapped ? (\n <FocusTrap\n focusTrapOptions={{\n ...{ clickOutsideDeactivates: true },\n ...focusTrapOptions,\n }}\n >\n {content}\n </FocusTrap>\n ) : (\n content\n )}\n </div>\n </div>\n </CSSTransition>,\n this.props.container || this.container\n );\n }\n}\n\nModal.propTypes = {\n /**\n * Is the modal closable when user press esc key.\n */\n closeOnEsc: PropTypes.bool,\n /**\n * Is the modal closable when user click on overlay.\n */\n closeOnOverlayClick: PropTypes.bool,\n /**\n * Callback fired when the Modal is open and the animation is finished.\n */\n onEntered: PropTypes.func,\n /**\n * Callback fired when the Modal has exited and the animation is finished.\n */\n onExited: PropTypes.func,\n /**\n * Callback fired when the Modal is requested to be closed by a click on the overlay or when user press esc key.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Callback fired when the escape key is pressed.\n */\n onEscKeyDown: PropTypes.func,\n /**\n * Callback fired when the overlay is clicked.\n */\n onOverlayClick: PropTypes.func,\n /**\n * Control if the modal is open or not.\n */\n open: PropTypes.bool.isRequired,\n /**\n * An object containing classNames to style the modal, can have properties 'overlay' (classname for overlay div), 'modal' (classname for modal content div), 'closeButton' (classname for the button that contain the close icon), 'closeIcon' (classname for close icon svg). You can customize the transition with 'transitionEnter', 'transitionEnterActive', 'transitionExit', 'transitionExitActive'\n */\n classNames: PropTypes.object,\n /**\n * An object containing the styles objects to style the modal, can have properties 'overlay', 'modal', 'closeButton', 'closeIcon'.\n */\n styles: PropTypes.object,\n /**\n * The content of the modal.\n */\n children: PropTypes.node,\n /**\n * @internal\n */\n classes: PropTypes.object,\n /**\n * Should the dialog be centered.\n */\n center: PropTypes.bool,\n /**\n * Show the close icon.\n */\n showCloseIcon: PropTypes.bool,\n /**\n * Close icon size.\n */\n closeIconSize: PropTypes.number,\n /**\n * A valid svg path to show as icon.\n */\n closeIconSvgPath: PropTypes.node,\n /**\n * Animation duration in milliseconds.\n */\n animationDuration: PropTypes.number,\n /**\n * You can specify a container prop which should be of type `Element`. The portal will be rendered inside that element. The default behavior will create a div node and render it at the at the end of document.body.\n */\n container: PropTypes.object, // eslint-disable-line\n /**\n * Whether to block scrolling when dialog is open\n */\n blockScroll: PropTypes.bool,\n /**\n * When the modal is open, trap focus within it\n */\n focusTrapped: PropTypes.bool,\n /**\n * Options to be passed to the focus trap, details available at https://github.com/davidtheclark/focus-trap#focustrap--createfocustrapelement-createoptions\n */\n focusTrapOptions: PropTypes.object,\n /**\n * id attribute for overlay\n */\n overlayId: PropTypes.string,\n /**\n * id attribute for modal\n */\n modalId: PropTypes.string,\n /**\n * id attribute for close icon\n */\n closeIconId: PropTypes.string,\n /**\n * ARIA role for modal\n */\n role: PropTypes.string,\n /**\n * ARIA label for modal\n */\n ariaLabelledby: PropTypes.string,\n /**\n * ARIA description for modal\n */\n ariaDescribedby: PropTypes.string,\n};\n\nModal.defaultProps = {\n classes: cssClasses,\n closeOnEsc: true,\n closeOnOverlayClick: true,\n onEntered: undefined,\n onExited: undefined,\n onEscKeyDown: undefined,\n onOverlayClick: undefined,\n showCloseIcon: true,\n closeIconSize: 28,\n closeIconSvgPath: (\n <path d=\"M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z\" />\n ),\n classNames: {},\n styles: {},\n children: null,\n center: false,\n animationDuration: 500,\n blockScroll: true,\n focusTrapped: true,\n focusTrapOptions: {},\n overlayId: undefined,\n modalId: undefined,\n closeIconId: undefined,\n role: 'dialog',\n ariaLabelledby: undefined,\n ariaDescribedby: undefined,\n};\n\nexport default Modal;\n"],"names":["CloseIcon","classes","classNames","styles","closeIconSize","closeIconSvgPath","onClickCloseIcon","id","React","cx","closeButton","closeIcon","propTypes","PropTypes","object","isRequired","number","node","func","string","defaultProps","modals","add","modal","indexOf","push","remove","index","splice","isTopModal","length","isBrowser","window","Modal","noScroll","on","props","modalManager","container","document","body","appendChild","blockScroll","addEventListener","handleKeydown","unblockScroll","removeChild","removeEventListener","event","shouldClose","onOverlayClick","closeOnOverlayClick","onClose","keyCode","onEscKeyDown","closeOnEsc","onEntered","onExited","setState","showPortal","createElement","state","open","handleOpen","prevProps","prevState","handleClose","center","showCloseIcon","animationDuration","focusTrapped","focusTrapOptions","overlayId","modalId","closeIconId","role","ariaLabelledby","ariaDescribedby","content","children","handleClickCloseIcon","ReactDom","createPortal","appear","transitionEnter","appearActive","transitionEnterActive","enter","enterActive","exit","transitionExit","exitActive","transitionExitActive","handleEntered","handleExited","overlay","handleClickOverlay","modalCenter","handleModalEvent","clickOutsideDeactivates","nextProps","Component","off","bool","cssClasses","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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