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