@spaziodati/atoka-design-system 2.1.3 → 2.1.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 (112) hide show
  1. package/AddableItems/index.js +2 -2
  2. package/AddableItems/index.js.map +1 -1
  3. package/Alert/index.js +2 -2
  4. package/Alert/index.js.map +1 -1
  5. package/Badge/index.js +2 -2
  6. package/Badge/index.js.map +1 -1
  7. package/Bs4V3Wrapper/index.js +2 -2
  8. package/Bs4V3Wrapper/index.js.map +1 -1
  9. package/BubbleChart/index.js +2 -2
  10. package/BubbleChart/index.js.map +1 -1
  11. package/Button/index.js +2 -2
  12. package/Button/index.js.map +1 -1
  13. package/ButtonDropdown/index.js +2 -2
  14. package/ButtonDropdown/index.js.map +1 -1
  15. package/CardsPage/index.js +2 -2
  16. package/CardsPage/index.js.map +1 -1
  17. package/CursorPagination/index.js +2 -2
  18. package/CursorPagination/index.js.map +1 -1
  19. package/DatePicker/index.js +2 -2
  20. package/DatePicker/index.js.map +1 -1
  21. package/DetailPage/index.js +581 -555
  22. package/DetailPage/index.js.map +1 -1
  23. package/Dropdown/index.js +2 -2
  24. package/Dropdown/index.js.map +1 -1
  25. package/EditableString/index.js +581 -555
  26. package/EditableString/index.js.map +1 -1
  27. package/EllipsableContent/index.js +2 -2
  28. package/EllipsableContent/index.js.map +1 -1
  29. package/EmptyState/index.js +2 -2
  30. package/EmptyState/index.js.map +1 -1
  31. package/Facet/index.js +2 -2
  32. package/Facet/index.js.map +1 -1
  33. package/FacetSection/index.js +2 -2
  34. package/FacetSection/index.js.map +1 -1
  35. package/FadeAnimation/index.js +581 -555
  36. package/FadeAnimation/index.js.map +1 -1
  37. package/FeedbackButton/index.js +2 -2
  38. package/FeedbackButton/index.js.map +1 -1
  39. package/Form/index.js +2 -2
  40. package/Form/index.js.map +1 -1
  41. package/Funnel/index.js +2 -2
  42. package/Funnel/index.js.map +1 -1
  43. package/GridCard/index.js +2 -2
  44. package/GridCard/index.js.map +1 -1
  45. package/HighlightableText/index.js +2 -2
  46. package/HighlightableText/index.js.map +1 -1
  47. package/Histogram/index.js +2 -2
  48. package/Histogram/index.js.map +1 -1
  49. package/InlineStringEditor/index.js +2 -2
  50. package/InlineStringEditor/index.js.map +1 -1
  51. package/InputGroup/index.js +2 -2
  52. package/InputGroup/index.js.map +1 -1
  53. package/Jumbotron/index.js +2 -2
  54. package/Jumbotron/index.js.map +1 -1
  55. package/Map/index.js +2 -2
  56. package/Map/index.js.map +1 -1
  57. package/Modal/index.js +2 -2
  58. package/Modal/index.js.map +1 -1
  59. package/Navbar/index.js +581 -555
  60. package/Navbar/index.js.map +1 -1
  61. package/Pagination/index.js +2 -2
  62. package/Pagination/index.js.map +1 -1
  63. package/PieChart/index.js +2 -2
  64. package/PieChart/index.js.map +1 -1
  65. package/PublicFooter/index.js +2 -2
  66. package/PublicFooter/index.js.map +1 -1
  67. package/PublicNavbar/index.js +2 -2
  68. package/PublicNavbar/index.js.map +1 -1
  69. package/README.md +5 -2
  70. package/RecordBit/index.js +2 -2
  71. package/RecordBit/index.js.map +1 -1
  72. package/ResultItemCard/index.js +2 -2
  73. package/ResultItemCard/index.js.map +1 -1
  74. package/SelectDropdown/index.js +2 -2
  75. package/SelectDropdown/index.js.map +1 -1
  76. package/Spinner/index.js +2 -2
  77. package/Spinner/index.js.map +1 -1
  78. package/StatisticsItemCard/index.js +2 -2
  79. package/StatisticsItemCard/index.js.map +1 -1
  80. package/StatisticsItemNumeric/index.js +2 -2
  81. package/StatisticsItemNumeric/index.js.map +1 -1
  82. package/StatisticsLegend/index.js +2 -2
  83. package/StatisticsLegend/index.js.map +1 -1
  84. package/StatisticsTooltip/index.js +2 -2
  85. package/StatisticsTooltip/index.js.map +1 -1
  86. package/Suggester/index.js +2 -2
  87. package/Suggester/index.js.map +1 -1
  88. package/SunBurst/index.js +2 -2
  89. package/SunBurst/index.js.map +1 -1
  90. package/TabSwitcher/index.js +2 -2
  91. package/TabSwitcher/index.js.map +1 -1
  92. package/Title/index.js +2 -2
  93. package/Title/index.js.map +1 -1
  94. package/Toasts/Toast.d.ts +41 -0
  95. package/Toasts/ToastContainer.d.ts +4 -0
  96. package/Toasts/ToastHeader.d.ts +7 -0
  97. package/Toasts/index.d.ts +2 -0
  98. package/Toasts/index.js +2236 -0
  99. package/Toasts/index.js.map +1 -0
  100. package/ToggleButtonGroup/index.js +2 -2
  101. package/ToggleButtonGroup/index.js.map +1 -1
  102. package/Tooltip/index.js +2 -2
  103. package/Tooltip/index.js.map +1 -1
  104. package/Utils/index.js +2 -2
  105. package/Utils/index.js.map +1 -1
  106. package/{atoka-design-system-2.1.3.min.css → atoka-design-system-2.1.4.min.css} +1 -1
  107. package/index.d.ts +1 -0
  108. package/index.js +1734 -755
  109. package/index.js.map +1 -1
  110. package/package.json +1 -1
  111. package/styles/atoka-bs.less +1 -1
  112. package/styles/variant-mixins.less +7 -7
@@ -26,8 +26,8 @@ __webpack_require__.d(__webpack_exports__, {
26
26
  // EXTERNAL MODULE: external "react"
27
27
  var external_react_ = __webpack_require__(8156);
28
28
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
29
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 5 modules
30
- var CSSTransition = __webpack_require__(1750);
29
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 3 modules
30
+ var CSSTransition = __webpack_require__(9114);
31
31
  ;// CONCATENATED MODULE: ./src/components/FadeAnimation/FadeAnimation.tsx
32
32
  var __extends = (undefined && undefined.__extends) || (function () {
33
33
  var extendStatics = function (d, b) {
@@ -174,7 +174,7 @@ module.exports = ReactPropTypesSecret;
174
174
 
175
175
  /***/ }),
176
176
 
177
- /***/ 1750:
177
+ /***/ 9114:
178
178
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
179
179
 
180
180
  "use strict";
@@ -220,16 +220,9 @@ function removeClass_removeClass(element, className) {
220
220
  // EXTERNAL MODULE: external "react"
221
221
  var external_react_ = __webpack_require__(8156);
222
222
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
223
- // EXTERNAL MODULE: external "react-dom"
224
- var external_react_dom_ = __webpack_require__(7111);
225
- var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
226
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
227
- /* harmony default export */ const config = ({
228
- disabled: false
229
- });
230
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
231
- var TransitionGroupContext = __webpack_require__(3493);
232
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
223
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/Transition.js + 1 modules
224
+ var Transition = __webpack_require__(6113);
225
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
233
226
 
234
227
 
235
228
 
@@ -238,88 +231,43 @@ var TransitionGroupContext = __webpack_require__(3493);
238
231
 
239
232
 
240
233
 
241
- var UNMOUNTED = 'unmounted';
242
- var EXITED = 'exited';
243
- var ENTERING = 'entering';
244
- var ENTERED = 'entered';
245
- var EXITING = 'exiting';
234
+
235
+
236
+ var _addClass = function addClass(node, classes) {
237
+ return node && classes && classes.split(' ').forEach(function (c) {
238
+ return addClass_addClass(node, c);
239
+ });
240
+ };
241
+
242
+ var removeClass = function removeClass(node, classes) {
243
+ return node && classes && classes.split(' ').forEach(function (c) {
244
+ return removeClass_removeClass(node, c);
245
+ });
246
+ };
246
247
  /**
247
- * The Transition component lets you describe a transition from one component
248
- * state to another _over time_ with a simple declarative API. Most commonly
249
- * it's used to animate the mounting and unmounting of a component, but can also
250
- * be used to describe in-place transition states as well.
251
- *
252
- * ---
253
- *
254
- * **Note**: `Transition` is a platform-agnostic base component. If you're using
255
- * transitions in CSS, you'll probably want to use
256
- * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
257
- * instead. It inherits all the features of `Transition`, but contains
258
- * additional features necessary to play nice with CSS transitions (hence the
259
- * name of the component).
260
- *
261
- * ---
262
- *
263
- * By default the `Transition` component does not alter the behavior of the
264
- * component it renders, it only tracks "enter" and "exit" states for the
265
- * components. It's up to you to give meaning and effect to those states. For
266
- * example we can add styles to a component when it enters or exits:
267
- *
268
- * ```jsx
269
- * import { Transition } from 'react-transition-group';
270
- *
271
- * const duration = 300;
272
- *
273
- * const defaultStyle = {
274
- * transition: `opacity ${duration}ms ease-in-out`,
275
- * opacity: 0,
276
- * }
277
- *
278
- * const transitionStyles = {
279
- * entering: { opacity: 1 },
280
- * entered: { opacity: 1 },
281
- * exiting: { opacity: 0 },
282
- * exited: { opacity: 0 },
283
- * };
284
- *
285
- * const Fade = ({ in: inProp }) => (
286
- * <Transition in={inProp} timeout={duration}>
287
- * {state => (
288
- * <div style={{
289
- * ...defaultStyle,
290
- * ...transitionStyles[state]
291
- * }}>
292
- * I'm a fade Transition!
293
- * </div>
294
- * )}
295
- * </Transition>
296
- * );
297
- * ```
298
- *
299
- * There are 4 main states a Transition can be in:
300
- * - `'entering'`
301
- * - `'entered'`
302
- * - `'exiting'`
303
- * - `'exited'`
248
+ * A transition component inspired by the excellent
249
+ * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
250
+ * use it if you're using CSS transitions or animations. It's built upon the
251
+ * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
252
+ * component, so it inherits all of its props.
304
253
  *
305
- * Transition state is toggled via the `in` prop. When `true` the component
306
- * begins the "Enter" stage. During this stage, the component will shift from
307
- * its current transition state, to `'entering'` for the duration of the
308
- * transition and then to the `'entered'` stage once it's complete. Let's take
309
- * the following example (we'll use the
310
- * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
254
+ * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
255
+ * and `exit` states of the transition. The first class is applied and then a
256
+ * second `*-active` class in order to activate the CSS transition. After the
257
+ * transition, matching `*-done` class names are applied to persist the
258
+ * transition state.
311
259
  *
312
260
  * ```jsx
313
261
  * function App() {
314
262
  * const [inProp, setInProp] = useState(false);
315
263
  * return (
316
264
  * <div>
317
- * <Transition in={inProp} timeout={500}>
318
- * {state => (
319
- * // ...
320
- * )}
321
- * </Transition>
322
- * <button onClick={() => setInProp(true)}>
265
+ * <CSSTransition in={inProp} timeout={200} classNames="my-node">
266
+ * <div>
267
+ * {"I'll receive my-node-* classes"}
268
+ * </div>
269
+ * </CSSTransition>
270
+ * <button type="button" onClick={() => setInProp(true)}>
323
271
  * Click to Enter
324
272
  * </button>
325
273
  * </div>
@@ -327,343 +275,271 @@ var EXITING = 'exiting';
327
275
  * }
328
276
  * ```
329
277
  *
330
- * When the button is clicked the component will shift to the `'entering'` state
331
- * and stay there for 500ms (the value of `timeout`) before it finally switches
332
- * to `'entered'`.
278
+ * When the `in` prop is set to `true`, the child component will first receive
279
+ * the class `example-enter`, then the `example-enter-active` will be added in
280
+ * the next tick. `CSSTransition` [forces a
281
+ * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
282
+ * between before adding the `example-enter-active`. This is an important trick
283
+ * because it allows us to transition between `example-enter` and
284
+ * `example-enter-active` even though they were added immediately one after
285
+ * another. Most notably, this is what makes it possible for us to animate
286
+ * _appearance_.
333
287
  *
334
- * When `in` is `false` the same thing happens except the state moves from
335
- * `'exiting'` to `'exited'`.
288
+ * ```css
289
+ * .my-node-enter {
290
+ * opacity: 0;
291
+ * }
292
+ * .my-node-enter-active {
293
+ * opacity: 1;
294
+ * transition: opacity 200ms;
295
+ * }
296
+ * .my-node-exit {
297
+ * opacity: 1;
298
+ * }
299
+ * .my-node-exit-active {
300
+ * opacity: 0;
301
+ * transition: opacity 200ms;
302
+ * }
303
+ * ```
304
+ *
305
+ * `*-active` classes represent which styles you want to animate **to**, so it's
306
+ * important to add `transition` declaration only to them, otherwise transitions
307
+ * might not behave as intended! This might not be obvious when the transitions
308
+ * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
309
+ * the example above (minus `transition`), but it becomes apparent in more
310
+ * complex transitions.
311
+ *
312
+ * **Note**: If you're using the
313
+ * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
314
+ * prop, make sure to define styles for `.appear-*` classes as well.
336
315
  */
337
316
 
338
- var Transition = /*#__PURE__*/function (_React$Component) {
339
- (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
340
-
341
- function Transition(props, context) {
342
- var _this;
343
317
 
344
- _this = _React$Component.call(this, props, context) || this;
345
- var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
318
+ var CSSTransition = /*#__PURE__*/function (_React$Component) {
319
+ (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
346
320
 
347
- var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
348
- var initialStatus;
349
- _this.appearStatus = null;
321
+ function CSSTransition() {
322
+ var _this;
350
323
 
351
- if (props["in"]) {
352
- if (appear) {
353
- initialStatus = EXITED;
354
- _this.appearStatus = ENTERING;
355
- } else {
356
- initialStatus = ENTERED;
357
- }
358
- } else {
359
- if (props.unmountOnExit || props.mountOnEnter) {
360
- initialStatus = UNMOUNTED;
361
- } else {
362
- initialStatus = EXITED;
363
- }
324
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
325
+ args[_key] = arguments[_key];
364
326
  }
365
327
 
366
- _this.state = {
367
- status: initialStatus
328
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
329
+ _this.appliedClasses = {
330
+ appear: {},
331
+ enter: {},
332
+ exit: {}
368
333
  };
369
- _this.nextCallback = null;
370
- return _this;
371
- }
372
334
 
373
- Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
374
- var nextIn = _ref["in"];
335
+ _this.onEnter = function (maybeNode, maybeAppearing) {
336
+ var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
337
+ node = _this$resolveArgument[0],
338
+ appearing = _this$resolveArgument[1];
375
339
 
376
- if (nextIn && prevState.status === UNMOUNTED) {
377
- return {
378
- status: EXITED
379
- };
380
- }
340
+ _this.removeClasses(node, 'exit');
381
341
 
382
- return null;
383
- } // getSnapshotBeforeUpdate(prevProps) {
384
- // let nextStatus = null
385
- // if (prevProps !== this.props) {
386
- // const { status } = this.state
387
- // if (this.props.in) {
388
- // if (status !== ENTERING && status !== ENTERED) {
389
- // nextStatus = ENTERING
390
- // }
391
- // } else {
392
- // if (status === ENTERING || status === ENTERED) {
393
- // nextStatus = EXITING
394
- // }
395
- // }
396
- // }
397
- // return { nextStatus }
398
- // }
399
- ;
342
+ _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
400
343
 
401
- var _proto = Transition.prototype;
344
+ if (_this.props.onEnter) {
345
+ _this.props.onEnter(maybeNode, maybeAppearing);
346
+ }
347
+ };
402
348
 
403
- _proto.componentDidMount = function componentDidMount() {
404
- this.updateStatus(true, this.appearStatus);
405
- };
349
+ _this.onEntering = function (maybeNode, maybeAppearing) {
350
+ var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
351
+ node = _this$resolveArgument2[0],
352
+ appearing = _this$resolveArgument2[1];
406
353
 
407
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
408
- var nextStatus = null;
354
+ var type = appearing ? 'appear' : 'enter';
409
355
 
410
- if (prevProps !== this.props) {
411
- var status = this.state.status;
356
+ _this.addClass(node, type, 'active');
412
357
 
413
- if (this.props["in"]) {
414
- if (status !== ENTERING && status !== ENTERED) {
415
- nextStatus = ENTERING;
416
- }
417
- } else {
418
- if (status === ENTERING || status === ENTERED) {
419
- nextStatus = EXITING;
420
- }
358
+ if (_this.props.onEntering) {
359
+ _this.props.onEntering(maybeNode, maybeAppearing);
421
360
  }
422
- }
361
+ };
423
362
 
424
- this.updateStatus(false, nextStatus);
425
- };
426
-
427
- _proto.componentWillUnmount = function componentWillUnmount() {
428
- this.cancelNextCallback();
429
- };
363
+ _this.onEntered = function (maybeNode, maybeAppearing) {
364
+ var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
365
+ node = _this$resolveArgument3[0],
366
+ appearing = _this$resolveArgument3[1];
430
367
 
431
- _proto.getTimeouts = function getTimeouts() {
432
- var timeout = this.props.timeout;
433
- var exit, enter, appear;
434
- exit = enter = appear = timeout;
368
+ var type = appearing ? 'appear' : 'enter';
435
369
 
436
- if (timeout != null && typeof timeout !== 'number') {
437
- exit = timeout.exit;
438
- enter = timeout.enter; // TODO: remove fallback for next major
370
+ _this.removeClasses(node, type);
439
371
 
440
- appear = timeout.appear !== undefined ? timeout.appear : enter;
441
- }
372
+ _this.addClass(node, type, 'done');
442
373
 
443
- return {
444
- exit: exit,
445
- enter: enter,
446
- appear: appear
374
+ if (_this.props.onEntered) {
375
+ _this.props.onEntered(maybeNode, maybeAppearing);
376
+ }
447
377
  };
448
- };
449
378
 
450
- _proto.updateStatus = function updateStatus(mounting, nextStatus) {
451
- if (mounting === void 0) {
452
- mounting = false;
453
- }
379
+ _this.onExit = function (maybeNode) {
380
+ var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
381
+ node = _this$resolveArgument4[0];
454
382
 
455
- if (nextStatus !== null) {
456
- // nextStatus will always be ENTERING or EXITING.
457
- this.cancelNextCallback();
383
+ _this.removeClasses(node, 'appear');
458
384
 
459
- if (nextStatus === ENTERING) {
460
- this.performEnter(mounting);
461
- } else {
462
- this.performExit();
463
- }
464
- } else if (this.props.unmountOnExit && this.state.status === EXITED) {
465
- this.setState({
466
- status: UNMOUNTED
467
- });
468
- }
469
- };
385
+ _this.removeClasses(node, 'enter');
470
386
 
471
- _proto.performEnter = function performEnter(mounting) {
472
- var _this2 = this;
387
+ _this.addClass(node, 'exit', 'base');
473
388
 
474
- var enter = this.props.enter;
475
- var appearing = this.context ? this.context.isMounting : mounting;
389
+ if (_this.props.onExit) {
390
+ _this.props.onExit(maybeNode);
391
+ }
392
+ };
476
393
 
477
- var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
478
- maybeNode = _ref2[0],
479
- maybeAppearing = _ref2[1];
394
+ _this.onExiting = function (maybeNode) {
395
+ var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
396
+ node = _this$resolveArgument5[0];
480
397
 
481
- var timeouts = this.getTimeouts();
482
- var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
483
- // if we are mounting and running this it means appear _must_ be set
398
+ _this.addClass(node, 'exit', 'active');
484
399
 
485
- if (!mounting && !enter || config.disabled) {
486
- this.safeSetState({
487
- status: ENTERED
488
- }, function () {
489
- _this2.props.onEntered(maybeNode);
490
- });
491
- return;
492
- }
400
+ if (_this.props.onExiting) {
401
+ _this.props.onExiting(maybeNode);
402
+ }
403
+ };
493
404
 
494
- this.props.onEnter(maybeNode, maybeAppearing);
495
- this.safeSetState({
496
- status: ENTERING
497
- }, function () {
498
- _this2.props.onEntering(maybeNode, maybeAppearing);
405
+ _this.onExited = function (maybeNode) {
406
+ var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
407
+ node = _this$resolveArgument6[0];
499
408
 
500
- _this2.onTransitionEnd(enterTimeout, function () {
501
- _this2.safeSetState({
502
- status: ENTERED
503
- }, function () {
504
- _this2.props.onEntered(maybeNode, maybeAppearing);
505
- });
506
- });
507
- });
508
- };
409
+ _this.removeClasses(node, 'exit');
509
410
 
510
- _proto.performExit = function performExit() {
511
- var _this3 = this;
411
+ _this.addClass(node, 'exit', 'done');
512
412
 
513
- var exit = this.props.exit;
514
- var timeouts = this.getTimeouts();
515
- var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
413
+ if (_this.props.onExited) {
414
+ _this.props.onExited(maybeNode);
415
+ }
416
+ };
516
417
 
517
- if (!exit || config.disabled) {
518
- this.safeSetState({
519
- status: EXITED
520
- }, function () {
521
- _this3.props.onExited(maybeNode);
522
- });
523
- return;
524
- }
418
+ _this.resolveArguments = function (maybeNode, maybeAppearing) {
419
+ return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
420
+ : [maybeNode, maybeAppearing];
421
+ };
525
422
 
526
- this.props.onExit(maybeNode);
527
- this.safeSetState({
528
- status: EXITING
529
- }, function () {
530
- _this3.props.onExiting(maybeNode);
423
+ _this.getClassNames = function (type) {
424
+ var classNames = _this.props.classNames;
425
+ var isStringClassNames = typeof classNames === 'string';
426
+ var prefix = isStringClassNames && classNames ? classNames + "-" : '';
427
+ var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
428
+ var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
429
+ var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
430
+ return {
431
+ baseClassName: baseClassName,
432
+ activeClassName: activeClassName,
433
+ doneClassName: doneClassName
434
+ };
435
+ };
531
436
 
532
- _this3.onTransitionEnd(timeouts.exit, function () {
533
- _this3.safeSetState({
534
- status: EXITED
535
- }, function () {
536
- _this3.props.onExited(maybeNode);
537
- });
538
- });
539
- });
540
- };
437
+ return _this;
438
+ }
541
439
 
542
- _proto.cancelNextCallback = function cancelNextCallback() {
543
- if (this.nextCallback !== null) {
544
- this.nextCallback.cancel();
545
- this.nextCallback = null;
546
- }
547
- };
440
+ var _proto = CSSTransition.prototype;
548
441
 
549
- _proto.safeSetState = function safeSetState(nextState, callback) {
550
- // This shouldn't be necessary, but there are weird race conditions with
551
- // setState callbacks and unmounting in testing, so always make sure that
552
- // we can cancel any pending setState callbacks after we unmount.
553
- callback = this.setNextCallback(callback);
554
- this.setState(nextState, callback);
555
- };
442
+ _proto.addClass = function addClass(node, type, phase) {
443
+ var className = this.getClassNames(type)[phase + "ClassName"];
556
444
 
557
- _proto.setNextCallback = function setNextCallback(callback) {
558
- var _this4 = this;
445
+ var _this$getClassNames = this.getClassNames('enter'),
446
+ doneClassName = _this$getClassNames.doneClassName;
559
447
 
560
- var active = true;
448
+ if (type === 'appear' && phase === 'done' && doneClassName) {
449
+ className += " " + doneClassName;
450
+ } // This is for to force a repaint,
451
+ // which is necessary in order to transition styles when adding a class name.
561
452
 
562
- this.nextCallback = function (event) {
563
- if (active) {
564
- active = false;
565
- _this4.nextCallback = null;
566
- callback(event);
567
- }
568
- };
569
453
 
570
- this.nextCallback.cancel = function () {
571
- active = false;
572
- };
454
+ if (phase === 'active') {
455
+ /* eslint-disable no-unused-expressions */
456
+ node && node.scrollTop;
457
+ }
573
458
 
574
- return this.nextCallback;
459
+ if (className) {
460
+ this.appliedClasses[type][phase] = className;
461
+
462
+ _addClass(node, className);
463
+ }
575
464
  };
576
465
 
577
- _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
578
- this.setNextCallback(handler);
579
- var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
580
- var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
466
+ _proto.removeClasses = function removeClasses(node, type) {
467
+ var _this$appliedClasses$ = this.appliedClasses[type],
468
+ baseClassName = _this$appliedClasses$.base,
469
+ activeClassName = _this$appliedClasses$.active,
470
+ doneClassName = _this$appliedClasses$.done;
471
+ this.appliedClasses[type] = {};
581
472
 
582
- if (!node || doesNotHaveTimeoutOrListener) {
583
- setTimeout(this.nextCallback, 0);
584
- return;
473
+ if (baseClassName) {
474
+ removeClass(node, baseClassName);
585
475
  }
586
476
 
587
- if (this.props.addEndListener) {
588
- var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
589
- maybeNode = _ref3[0],
590
- maybeNextCallback = _ref3[1];
591
-
592
- this.props.addEndListener(maybeNode, maybeNextCallback);
477
+ if (activeClassName) {
478
+ removeClass(node, activeClassName);
593
479
  }
594
480
 
595
- if (timeout != null) {
596
- setTimeout(this.nextCallback, timeout);
481
+ if (doneClassName) {
482
+ removeClass(node, doneClassName);
597
483
  }
598
484
  };
599
485
 
600
486
  _proto.render = function render() {
601
- var status = this.state.status;
602
-
603
- if (status === UNMOUNTED) {
604
- return null;
605
- }
606
-
607
487
  var _this$props = this.props,
608
- children = _this$props.children,
609
- _in = _this$props["in"],
610
- _mountOnEnter = _this$props.mountOnEnter,
611
- _unmountOnExit = _this$props.unmountOnExit,
612
- _appear = _this$props.appear,
613
- _enter = _this$props.enter,
614
- _exit = _this$props.exit,
615
- _timeout = _this$props.timeout,
616
- _addEndListener = _this$props.addEndListener,
617
- _onEnter = _this$props.onEnter,
618
- _onEntering = _this$props.onEntering,
619
- _onEntered = _this$props.onEntered,
620
- _onExit = _this$props.onExit,
621
- _onExiting = _this$props.onExiting,
622
- _onExited = _this$props.onExited,
623
- _nodeRef = _this$props.nodeRef,
624
- childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
488
+ _ = _this$props.classNames,
489
+ props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
625
490
 
626
- return (
627
- /*#__PURE__*/
628
- // allows for nested Transitions
629
- external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
630
- value: null
631
- }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
632
- );
491
+ return /*#__PURE__*/external_react_default().createElement(Transition/* default */.ZP, (0,esm_extends/* default */.Z)({}, props, {
492
+ onEnter: this.onEnter,
493
+ onEntered: this.onEntered,
494
+ onEntering: this.onEntering,
495
+ onExit: this.onExit,
496
+ onExiting: this.onExiting,
497
+ onExited: this.onExited
498
+ }));
633
499
  };
634
500
 
635
- return Transition;
501
+ return CSSTransition;
636
502
  }((external_react_default()).Component);
637
503
 
638
- Transition.contextType = TransitionGroupContext/* default */.Z;
639
- Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
504
+ CSSTransition.defaultProps = {
505
+ classNames: ''
506
+ };
507
+ CSSTransition.propTypes = false ? 0 : {};
508
+ /* harmony default export */ const esm_CSSTransition = (CSSTransition);
640
509
 
641
- function noop() {}
510
+ /***/ }),
642
511
 
643
- Transition.defaultProps = {
644
- "in": false,
645
- mountOnEnter: false,
646
- unmountOnExit: false,
647
- appear: false,
648
- enter: true,
649
- exit: true,
650
- onEnter: noop,
651
- onEntering: noop,
652
- onEntered: noop,
653
- onExit: noop,
654
- onExiting: noop,
655
- onExited: noop
656
- };
657
- Transition.UNMOUNTED = UNMOUNTED;
658
- Transition.EXITED = EXITED;
659
- Transition.ENTERING = ENTERING;
660
- Transition.ENTERED = ENTERED;
661
- Transition.EXITING = EXITING;
662
- /* harmony default export */ const esm_Transition = (Transition);
663
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
512
+ /***/ 6113:
513
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
514
+
515
+ "use strict";
664
516
 
517
+ // EXPORTS
518
+ __webpack_require__.d(__webpack_exports__, {
519
+ "ZP": () => (/* binding */ esm_Transition)
520
+ });
665
521
 
522
+ // UNUSED EXPORTS: ENTERED, ENTERING, EXITED, EXITING, UNMOUNTED
666
523
 
524
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
525
+ var objectWithoutPropertiesLoose = __webpack_require__(7038);
526
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
527
+ var inheritsLoose = __webpack_require__(7581);
528
+ // EXTERNAL MODULE: ./node_modules/prop-types/index.js
529
+ var prop_types = __webpack_require__(8691);
530
+ // EXTERNAL MODULE: external "react"
531
+ var external_react_ = __webpack_require__(8156);
532
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
533
+ // EXTERNAL MODULE: external "react-dom"
534
+ var external_react_dom_ = __webpack_require__(7111);
535
+ var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
536
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
537
+ /* harmony default export */ const config = ({
538
+ disabled: false
539
+ });
540
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
541
+ var TransitionGroupContext = __webpack_require__(3493);
542
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
667
543
 
668
544
 
669
545
 
@@ -671,41 +547,89 @@ Transition.EXITING = EXITING;
671
547
 
672
548
 
673
549
 
674
- var _addClass = function addClass(node, classes) {
675
- return node && classes && classes.split(' ').forEach(function (c) {
676
- return addClass_addClass(node, c);
677
- });
678
- };
679
550
 
680
- var removeClass = function removeClass(node, classes) {
681
- return node && classes && classes.split(' ').forEach(function (c) {
682
- return removeClass_removeClass(node, c);
683
- });
684
- };
551
+ var UNMOUNTED = 'unmounted';
552
+ var EXITED = 'exited';
553
+ var ENTERING = 'entering';
554
+ var ENTERED = 'entered';
555
+ var EXITING = 'exiting';
685
556
  /**
686
- * A transition component inspired by the excellent
687
- * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
688
- * use it if you're using CSS transitions or animations. It's built upon the
689
- * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
690
- * component, so it inherits all of its props.
557
+ * The Transition component lets you describe a transition from one component
558
+ * state to another _over time_ with a simple declarative API. Most commonly
559
+ * it's used to animate the mounting and unmounting of a component, but can also
560
+ * be used to describe in-place transition states as well.
691
561
  *
692
- * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
693
- * and `exit` states of the transition. The first class is applied and then a
694
- * second `*-active` class in order to activate the CSS transition. After the
695
- * transition, matching `*-done` class names are applied to persist the
696
- * transition state.
562
+ * ---
563
+ *
564
+ * **Note**: `Transition` is a platform-agnostic base component. If you're using
565
+ * transitions in CSS, you'll probably want to use
566
+ * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
567
+ * instead. It inherits all the features of `Transition`, but contains
568
+ * additional features necessary to play nice with CSS transitions (hence the
569
+ * name of the component).
570
+ *
571
+ * ---
572
+ *
573
+ * By default the `Transition` component does not alter the behavior of the
574
+ * component it renders, it only tracks "enter" and "exit" states for the
575
+ * components. It's up to you to give meaning and effect to those states. For
576
+ * example we can add styles to a component when it enters or exits:
577
+ *
578
+ * ```jsx
579
+ * import { Transition } from 'react-transition-group';
580
+ *
581
+ * const duration = 300;
582
+ *
583
+ * const defaultStyle = {
584
+ * transition: `opacity ${duration}ms ease-in-out`,
585
+ * opacity: 0,
586
+ * }
587
+ *
588
+ * const transitionStyles = {
589
+ * entering: { opacity: 1 },
590
+ * entered: { opacity: 1 },
591
+ * exiting: { opacity: 0 },
592
+ * exited: { opacity: 0 },
593
+ * };
594
+ *
595
+ * const Fade = ({ in: inProp }) => (
596
+ * <Transition in={inProp} timeout={duration}>
597
+ * {state => (
598
+ * <div style={{
599
+ * ...defaultStyle,
600
+ * ...transitionStyles[state]
601
+ * }}>
602
+ * I'm a fade Transition!
603
+ * </div>
604
+ * )}
605
+ * </Transition>
606
+ * );
607
+ * ```
608
+ *
609
+ * There are 4 main states a Transition can be in:
610
+ * - `'entering'`
611
+ * - `'entered'`
612
+ * - `'exiting'`
613
+ * - `'exited'`
614
+ *
615
+ * Transition state is toggled via the `in` prop. When `true` the component
616
+ * begins the "Enter" stage. During this stage, the component will shift from
617
+ * its current transition state, to `'entering'` for the duration of the
618
+ * transition and then to the `'entered'` stage once it's complete. Let's take
619
+ * the following example (we'll use the
620
+ * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
697
621
  *
698
622
  * ```jsx
699
623
  * function App() {
700
624
  * const [inProp, setInProp] = useState(false);
701
625
  * return (
702
626
  * <div>
703
- * <CSSTransition in={inProp} timeout={200} classNames="my-node">
704
- * <div>
705
- * {"I'll receive my-node-* classes"}
706
- * </div>
707
- * </CSSTransition>
708
- * <button type="button" onClick={() => setInProp(true)}>
627
+ * <Transition in={inProp} timeout={500}>
628
+ * {state => (
629
+ * // ...
630
+ * )}
631
+ * </Transition>
632
+ * <button onClick={() => setInProp(true)}>
709
633
  * Click to Enter
710
634
  * </button>
711
635
  * </div>
@@ -713,237 +637,339 @@ var removeClass = function removeClass(node, classes) {
713
637
  * }
714
638
  * ```
715
639
  *
716
- * When the `in` prop is set to `true`, the child component will first receive
717
- * the class `example-enter`, then the `example-enter-active` will be added in
718
- * the next tick. `CSSTransition` [forces a
719
- * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
720
- * between before adding the `example-enter-active`. This is an important trick
721
- * because it allows us to transition between `example-enter` and
722
- * `example-enter-active` even though they were added immediately one after
723
- * another. Most notably, this is what makes it possible for us to animate
724
- * _appearance_.
725
- *
726
- * ```css
727
- * .my-node-enter {
728
- * opacity: 0;
729
- * }
730
- * .my-node-enter-active {
731
- * opacity: 1;
732
- * transition: opacity 200ms;
733
- * }
734
- * .my-node-exit {
735
- * opacity: 1;
736
- * }
737
- * .my-node-exit-active {
738
- * opacity: 0;
739
- * transition: opacity 200ms;
740
- * }
741
- * ```
742
- *
743
- * `*-active` classes represent which styles you want to animate **to**, so it's
744
- * important to add `transition` declaration only to them, otherwise transitions
745
- * might not behave as intended! This might not be obvious when the transitions
746
- * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
747
- * the example above (minus `transition`), but it becomes apparent in more
748
- * complex transitions.
640
+ * When the button is clicked the component will shift to the `'entering'` state
641
+ * and stay there for 500ms (the value of `timeout`) before it finally switches
642
+ * to `'entered'`.
749
643
  *
750
- * **Note**: If you're using the
751
- * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
752
- * prop, make sure to define styles for `.appear-*` classes as well.
644
+ * When `in` is `false` the same thing happens except the state moves from
645
+ * `'exiting'` to `'exited'`.
753
646
  */
754
647
 
648
+ var Transition = /*#__PURE__*/function (_React$Component) {
649
+ (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
755
650
 
756
- var CSSTransition = /*#__PURE__*/function (_React$Component) {
757
- (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
758
-
759
- function CSSTransition() {
651
+ function Transition(props, context) {
760
652
  var _this;
761
653
 
762
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
763
- args[_key] = arguments[_key];
654
+ _this = _React$Component.call(this, props, context) || this;
655
+ var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
656
+
657
+ var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
658
+ var initialStatus;
659
+ _this.appearStatus = null;
660
+
661
+ if (props["in"]) {
662
+ if (appear) {
663
+ initialStatus = EXITED;
664
+ _this.appearStatus = ENTERING;
665
+ } else {
666
+ initialStatus = ENTERED;
667
+ }
668
+ } else {
669
+ if (props.unmountOnExit || props.mountOnEnter) {
670
+ initialStatus = UNMOUNTED;
671
+ } else {
672
+ initialStatus = EXITED;
673
+ }
764
674
  }
765
675
 
766
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
767
- _this.appliedClasses = {
768
- appear: {},
769
- enter: {},
770
- exit: {}
676
+ _this.state = {
677
+ status: initialStatus
771
678
  };
679
+ _this.nextCallback = null;
680
+ return _this;
681
+ }
772
682
 
773
- _this.onEnter = function (maybeNode, maybeAppearing) {
774
- var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
775
- node = _this$resolveArgument[0],
776
- appearing = _this$resolveArgument[1];
683
+ Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
684
+ var nextIn = _ref["in"];
777
685
 
778
- _this.removeClasses(node, 'exit');
686
+ if (nextIn && prevState.status === UNMOUNTED) {
687
+ return {
688
+ status: EXITED
689
+ };
690
+ }
779
691
 
780
- _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
692
+ return null;
693
+ } // getSnapshotBeforeUpdate(prevProps) {
694
+ // let nextStatus = null
695
+ // if (prevProps !== this.props) {
696
+ // const { status } = this.state
697
+ // if (this.props.in) {
698
+ // if (status !== ENTERING && status !== ENTERED) {
699
+ // nextStatus = ENTERING
700
+ // }
701
+ // } else {
702
+ // if (status === ENTERING || status === ENTERED) {
703
+ // nextStatus = EXITING
704
+ // }
705
+ // }
706
+ // }
707
+ // return { nextStatus }
708
+ // }
709
+ ;
781
710
 
782
- if (_this.props.onEnter) {
783
- _this.props.onEnter(maybeNode, maybeAppearing);
784
- }
785
- };
711
+ var _proto = Transition.prototype;
786
712
 
787
- _this.onEntering = function (maybeNode, maybeAppearing) {
788
- var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
789
- node = _this$resolveArgument2[0],
790
- appearing = _this$resolveArgument2[1];
713
+ _proto.componentDidMount = function componentDidMount() {
714
+ this.updateStatus(true, this.appearStatus);
715
+ };
791
716
 
792
- var type = appearing ? 'appear' : 'enter';
717
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
718
+ var nextStatus = null;
793
719
 
794
- _this.addClass(node, type, 'active');
720
+ if (prevProps !== this.props) {
721
+ var status = this.state.status;
795
722
 
796
- if (_this.props.onEntering) {
797
- _this.props.onEntering(maybeNode, maybeAppearing);
723
+ if (this.props["in"]) {
724
+ if (status !== ENTERING && status !== ENTERED) {
725
+ nextStatus = ENTERING;
726
+ }
727
+ } else {
728
+ if (status === ENTERING || status === ENTERED) {
729
+ nextStatus = EXITING;
730
+ }
798
731
  }
732
+ }
733
+
734
+ this.updateStatus(false, nextStatus);
735
+ };
736
+
737
+ _proto.componentWillUnmount = function componentWillUnmount() {
738
+ this.cancelNextCallback();
739
+ };
740
+
741
+ _proto.getTimeouts = function getTimeouts() {
742
+ var timeout = this.props.timeout;
743
+ var exit, enter, appear;
744
+ exit = enter = appear = timeout;
745
+
746
+ if (timeout != null && typeof timeout !== 'number') {
747
+ exit = timeout.exit;
748
+ enter = timeout.enter; // TODO: remove fallback for next major
749
+
750
+ appear = timeout.appear !== undefined ? timeout.appear : enter;
751
+ }
752
+
753
+ return {
754
+ exit: exit,
755
+ enter: enter,
756
+ appear: appear
799
757
  };
758
+ };
800
759
 
801
- _this.onEntered = function (maybeNode, maybeAppearing) {
802
- var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
803
- node = _this$resolveArgument3[0],
804
- appearing = _this$resolveArgument3[1];
760
+ _proto.updateStatus = function updateStatus(mounting, nextStatus) {
761
+ if (mounting === void 0) {
762
+ mounting = false;
763
+ }
764
+
765
+ if (nextStatus !== null) {
766
+ // nextStatus will always be ENTERING or EXITING.
767
+ this.cancelNextCallback();
768
+
769
+ if (nextStatus === ENTERING) {
770
+ this.performEnter(mounting);
771
+ } else {
772
+ this.performExit();
773
+ }
774
+ } else if (this.props.unmountOnExit && this.state.status === EXITED) {
775
+ this.setState({
776
+ status: UNMOUNTED
777
+ });
778
+ }
779
+ };
805
780
 
806
- var type = appearing ? 'appear' : 'enter';
781
+ _proto.performEnter = function performEnter(mounting) {
782
+ var _this2 = this;
807
783
 
808
- _this.removeClasses(node, type);
784
+ var enter = this.props.enter;
785
+ var appearing = this.context ? this.context.isMounting : mounting;
809
786
 
810
- _this.addClass(node, type, 'done');
787
+ var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
788
+ maybeNode = _ref2[0],
789
+ maybeAppearing = _ref2[1];
811
790
 
812
- if (_this.props.onEntered) {
813
- _this.props.onEntered(maybeNode, maybeAppearing);
814
- }
815
- };
791
+ var timeouts = this.getTimeouts();
792
+ var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
793
+ // if we are mounting and running this it means appear _must_ be set
816
794
 
817
- _this.onExit = function (maybeNode) {
818
- var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
819
- node = _this$resolveArgument4[0];
795
+ if (!mounting && !enter || config.disabled) {
796
+ this.safeSetState({
797
+ status: ENTERED
798
+ }, function () {
799
+ _this2.props.onEntered(maybeNode);
800
+ });
801
+ return;
802
+ }
820
803
 
821
- _this.removeClasses(node, 'appear');
804
+ this.props.onEnter(maybeNode, maybeAppearing);
805
+ this.safeSetState({
806
+ status: ENTERING
807
+ }, function () {
808
+ _this2.props.onEntering(maybeNode, maybeAppearing);
822
809
 
823
- _this.removeClasses(node, 'enter');
810
+ _this2.onTransitionEnd(enterTimeout, function () {
811
+ _this2.safeSetState({
812
+ status: ENTERED
813
+ }, function () {
814
+ _this2.props.onEntered(maybeNode, maybeAppearing);
815
+ });
816
+ });
817
+ });
818
+ };
824
819
 
825
- _this.addClass(node, 'exit', 'base');
820
+ _proto.performExit = function performExit() {
821
+ var _this3 = this;
826
822
 
827
- if (_this.props.onExit) {
828
- _this.props.onExit(maybeNode);
829
- }
830
- };
823
+ var exit = this.props.exit;
824
+ var timeouts = this.getTimeouts();
825
+ var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
831
826
 
832
- _this.onExiting = function (maybeNode) {
833
- var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
834
- node = _this$resolveArgument5[0];
827
+ if (!exit || config.disabled) {
828
+ this.safeSetState({
829
+ status: EXITED
830
+ }, function () {
831
+ _this3.props.onExited(maybeNode);
832
+ });
833
+ return;
834
+ }
835
835
 
836
- _this.addClass(node, 'exit', 'active');
836
+ this.props.onExit(maybeNode);
837
+ this.safeSetState({
838
+ status: EXITING
839
+ }, function () {
840
+ _this3.props.onExiting(maybeNode);
837
841
 
838
- if (_this.props.onExiting) {
839
- _this.props.onExiting(maybeNode);
840
- }
841
- };
842
+ _this3.onTransitionEnd(timeouts.exit, function () {
843
+ _this3.safeSetState({
844
+ status: EXITED
845
+ }, function () {
846
+ _this3.props.onExited(maybeNode);
847
+ });
848
+ });
849
+ });
850
+ };
842
851
 
843
- _this.onExited = function (maybeNode) {
844
- var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
845
- node = _this$resolveArgument6[0];
852
+ _proto.cancelNextCallback = function cancelNextCallback() {
853
+ if (this.nextCallback !== null) {
854
+ this.nextCallback.cancel();
855
+ this.nextCallback = null;
856
+ }
857
+ };
846
858
 
847
- _this.removeClasses(node, 'exit');
859
+ _proto.safeSetState = function safeSetState(nextState, callback) {
860
+ // This shouldn't be necessary, but there are weird race conditions with
861
+ // setState callbacks and unmounting in testing, so always make sure that
862
+ // we can cancel any pending setState callbacks after we unmount.
863
+ callback = this.setNextCallback(callback);
864
+ this.setState(nextState, callback);
865
+ };
848
866
 
849
- _this.addClass(node, 'exit', 'done');
867
+ _proto.setNextCallback = function setNextCallback(callback) {
868
+ var _this4 = this;
850
869
 
851
- if (_this.props.onExited) {
852
- _this.props.onExited(maybeNode);
853
- }
854
- };
870
+ var active = true;
855
871
 
856
- _this.resolveArguments = function (maybeNode, maybeAppearing) {
857
- return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
858
- : [maybeNode, maybeAppearing];
872
+ this.nextCallback = function (event) {
873
+ if (active) {
874
+ active = false;
875
+ _this4.nextCallback = null;
876
+ callback(event);
877
+ }
859
878
  };
860
879
 
861
- _this.getClassNames = function (type) {
862
- var classNames = _this.props.classNames;
863
- var isStringClassNames = typeof classNames === 'string';
864
- var prefix = isStringClassNames && classNames ? classNames + "-" : '';
865
- var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
866
- var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
867
- var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
868
- return {
869
- baseClassName: baseClassName,
870
- activeClassName: activeClassName,
871
- doneClassName: doneClassName
872
- };
880
+ this.nextCallback.cancel = function () {
881
+ active = false;
873
882
  };
874
883
 
875
- return _this;
876
- }
877
-
878
- var _proto = CSSTransition.prototype;
879
-
880
- _proto.addClass = function addClass(node, type, phase) {
881
- var className = this.getClassNames(type)[phase + "ClassName"];
882
-
883
- var _this$getClassNames = this.getClassNames('enter'),
884
- doneClassName = _this$getClassNames.doneClassName;
885
-
886
- if (type === 'appear' && phase === 'done' && doneClassName) {
887
- className += " " + doneClassName;
888
- } // This is for to force a repaint,
889
- // which is necessary in order to transition styles when adding a class name.
884
+ return this.nextCallback;
885
+ };
890
886
 
887
+ _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
888
+ this.setNextCallback(handler);
889
+ var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
890
+ var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
891
891
 
892
- if (phase === 'active') {
893
- /* eslint-disable no-unused-expressions */
894
- node && node.scrollTop;
892
+ if (!node || doesNotHaveTimeoutOrListener) {
893
+ setTimeout(this.nextCallback, 0);
894
+ return;
895
895
  }
896
896
 
897
- if (className) {
898
- this.appliedClasses[type][phase] = className;
897
+ if (this.props.addEndListener) {
898
+ var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
899
+ maybeNode = _ref3[0],
900
+ maybeNextCallback = _ref3[1];
899
901
 
900
- _addClass(node, className);
902
+ this.props.addEndListener(maybeNode, maybeNextCallback);
901
903
  }
902
- };
903
-
904
- _proto.removeClasses = function removeClasses(node, type) {
905
- var _this$appliedClasses$ = this.appliedClasses[type],
906
- baseClassName = _this$appliedClasses$.base,
907
- activeClassName = _this$appliedClasses$.active,
908
- doneClassName = _this$appliedClasses$.done;
909
- this.appliedClasses[type] = {};
910
904
 
911
- if (baseClassName) {
912
- removeClass(node, baseClassName);
905
+ if (timeout != null) {
906
+ setTimeout(this.nextCallback, timeout);
913
907
  }
908
+ };
914
909
 
915
- if (activeClassName) {
916
- removeClass(node, activeClassName);
917
- }
910
+ _proto.render = function render() {
911
+ var status = this.state.status;
918
912
 
919
- if (doneClassName) {
920
- removeClass(node, doneClassName);
913
+ if (status === UNMOUNTED) {
914
+ return null;
921
915
  }
922
- };
923
916
 
924
- _proto.render = function render() {
925
917
  var _this$props = this.props,
926
- _ = _this$props.classNames,
927
- props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
918
+ children = _this$props.children,
919
+ _in = _this$props["in"],
920
+ _mountOnEnter = _this$props.mountOnEnter,
921
+ _unmountOnExit = _this$props.unmountOnExit,
922
+ _appear = _this$props.appear,
923
+ _enter = _this$props.enter,
924
+ _exit = _this$props.exit,
925
+ _timeout = _this$props.timeout,
926
+ _addEndListener = _this$props.addEndListener,
927
+ _onEnter = _this$props.onEnter,
928
+ _onEntering = _this$props.onEntering,
929
+ _onEntered = _this$props.onEntered,
930
+ _onExit = _this$props.onExit,
931
+ _onExiting = _this$props.onExiting,
932
+ _onExited = _this$props.onExited,
933
+ _nodeRef = _this$props.nodeRef,
934
+ childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
928
935
 
929
- return /*#__PURE__*/external_react_default().createElement(esm_Transition, (0,esm_extends/* default */.Z)({}, props, {
930
- onEnter: this.onEnter,
931
- onEntered: this.onEntered,
932
- onEntering: this.onEntering,
933
- onExit: this.onExit,
934
- onExiting: this.onExiting,
935
- onExited: this.onExited
936
- }));
936
+ return (
937
+ /*#__PURE__*/
938
+ // allows for nested Transitions
939
+ external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
940
+ value: null
941
+ }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
942
+ );
937
943
  };
938
944
 
939
- return CSSTransition;
945
+ return Transition;
940
946
  }((external_react_default()).Component);
941
947
 
942
- CSSTransition.defaultProps = {
943
- classNames: ''
948
+ Transition.contextType = TransitionGroupContext/* default */.Z;
949
+ Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
950
+
951
+ function noop() {}
952
+
953
+ Transition.defaultProps = {
954
+ "in": false,
955
+ mountOnEnter: false,
956
+ unmountOnExit: false,
957
+ appear: false,
958
+ enter: true,
959
+ exit: true,
960
+ onEnter: noop,
961
+ onEntering: noop,
962
+ onEntered: noop,
963
+ onExit: noop,
964
+ onExiting: noop,
965
+ onExited: noop
944
966
  };
945
- CSSTransition.propTypes = false ? 0 : {};
946
- /* harmony default export */ const esm_CSSTransition = (CSSTransition);
967
+ Transition.UNMOUNTED = UNMOUNTED;
968
+ Transition.EXITED = EXITED;
969
+ Transition.ENTERING = ENTERING;
970
+ Transition.ENTERED = ENTERED;
971
+ Transition.EXITING = EXITING;
972
+ /* harmony default export */ const esm_Transition = (Transition);
947
973
 
948
974
  /***/ }),
949
975
 
@@ -1168,7 +1194,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
1168
1194
  /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
1169
1195
  /******/ var installedChunks = {
1170
1196
  /******/ 5853: 0,
1171
- /******/ 563: 0
1197
+ /******/ 3813: 0
1172
1198
  /******/ };
1173
1199
  /******/
1174
1200
  /******/ // no chunk on demand loading
@@ -1218,7 +1244,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
1218
1244
  /******/ // startup
1219
1245
  /******/ // Load entry module and return exports
1220
1246
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
1221
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [563], () => (__webpack_require__(1018)))
1247
+ /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [3813], () => (__webpack_require__(1018)))
1222
1248
  /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
1223
1249
  /******/
1224
1250
  /******/ return __webpack_exports__;