@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
package/Navbar/index.js CHANGED
@@ -553,8 +553,8 @@ __webpack_require__.d(__webpack_exports__, {
553
553
  // EXTERNAL MODULE: external "react"
554
554
  var external_react_ = __webpack_require__(8156);
555
555
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
556
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 5 modules
557
- var CSSTransition = __webpack_require__(1750);
556
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 3 modules
557
+ var CSSTransition = __webpack_require__(9114);
558
558
  ;// CONCATENATED MODULE: ./src/components/FadeAnimation/FadeAnimation.tsx
559
559
  var __extends = (undefined && undefined.__extends) || (function () {
560
560
  var extendStatics = function (d, b) {
@@ -2242,7 +2242,7 @@ module.exports = ReactPropTypesSecret;
2242
2242
 
2243
2243
  /***/ }),
2244
2244
 
2245
- /***/ 1750:
2245
+ /***/ 9114:
2246
2246
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2247
2247
 
2248
2248
  "use strict";
@@ -2288,16 +2288,9 @@ function removeClass_removeClass(element, className) {
2288
2288
  // EXTERNAL MODULE: external "react"
2289
2289
  var external_react_ = __webpack_require__(8156);
2290
2290
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
2291
- // EXTERNAL MODULE: external "react-dom"
2292
- var external_react_dom_ = __webpack_require__(7111);
2293
- var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
2294
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
2295
- /* harmony default export */ const config = ({
2296
- disabled: false
2297
- });
2298
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
2299
- var TransitionGroupContext = __webpack_require__(3493);
2300
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
2291
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/Transition.js + 1 modules
2292
+ var Transition = __webpack_require__(6113);
2293
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
2301
2294
 
2302
2295
 
2303
2296
 
@@ -2306,88 +2299,43 @@ var TransitionGroupContext = __webpack_require__(3493);
2306
2299
 
2307
2300
 
2308
2301
 
2309
- var UNMOUNTED = 'unmounted';
2310
- var EXITED = 'exited';
2311
- var ENTERING = 'entering';
2312
- var ENTERED = 'entered';
2313
- var EXITING = 'exiting';
2302
+
2303
+
2304
+ var _addClass = function addClass(node, classes) {
2305
+ return node && classes && classes.split(' ').forEach(function (c) {
2306
+ return addClass_addClass(node, c);
2307
+ });
2308
+ };
2309
+
2310
+ var removeClass = function removeClass(node, classes) {
2311
+ return node && classes && classes.split(' ').forEach(function (c) {
2312
+ return removeClass_removeClass(node, c);
2313
+ });
2314
+ };
2314
2315
  /**
2315
- * The Transition component lets you describe a transition from one component
2316
- * state to another _over time_ with a simple declarative API. Most commonly
2317
- * it's used to animate the mounting and unmounting of a component, but can also
2318
- * be used to describe in-place transition states as well.
2319
- *
2320
- * ---
2321
- *
2322
- * **Note**: `Transition` is a platform-agnostic base component. If you're using
2323
- * transitions in CSS, you'll probably want to use
2324
- * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
2325
- * instead. It inherits all the features of `Transition`, but contains
2326
- * additional features necessary to play nice with CSS transitions (hence the
2327
- * name of the component).
2328
- *
2329
- * ---
2330
- *
2331
- * By default the `Transition` component does not alter the behavior of the
2332
- * component it renders, it only tracks "enter" and "exit" states for the
2333
- * components. It's up to you to give meaning and effect to those states. For
2334
- * example we can add styles to a component when it enters or exits:
2335
- *
2336
- * ```jsx
2337
- * import { Transition } from 'react-transition-group';
2338
- *
2339
- * const duration = 300;
2340
- *
2341
- * const defaultStyle = {
2342
- * transition: `opacity ${duration}ms ease-in-out`,
2343
- * opacity: 0,
2344
- * }
2345
- *
2346
- * const transitionStyles = {
2347
- * entering: { opacity: 1 },
2348
- * entered: { opacity: 1 },
2349
- * exiting: { opacity: 0 },
2350
- * exited: { opacity: 0 },
2351
- * };
2352
- *
2353
- * const Fade = ({ in: inProp }) => (
2354
- * <Transition in={inProp} timeout={duration}>
2355
- * {state => (
2356
- * <div style={{
2357
- * ...defaultStyle,
2358
- * ...transitionStyles[state]
2359
- * }}>
2360
- * I'm a fade Transition!
2361
- * </div>
2362
- * )}
2363
- * </Transition>
2364
- * );
2365
- * ```
2366
- *
2367
- * There are 4 main states a Transition can be in:
2368
- * - `'entering'`
2369
- * - `'entered'`
2370
- * - `'exiting'`
2371
- * - `'exited'`
2316
+ * A transition component inspired by the excellent
2317
+ * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
2318
+ * use it if you're using CSS transitions or animations. It's built upon the
2319
+ * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
2320
+ * component, so it inherits all of its props.
2372
2321
  *
2373
- * Transition state is toggled via the `in` prop. When `true` the component
2374
- * begins the "Enter" stage. During this stage, the component will shift from
2375
- * its current transition state, to `'entering'` for the duration of the
2376
- * transition and then to the `'entered'` stage once it's complete. Let's take
2377
- * the following example (we'll use the
2378
- * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
2322
+ * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
2323
+ * and `exit` states of the transition. The first class is applied and then a
2324
+ * second `*-active` class in order to activate the CSS transition. After the
2325
+ * transition, matching `*-done` class names are applied to persist the
2326
+ * transition state.
2379
2327
  *
2380
2328
  * ```jsx
2381
2329
  * function App() {
2382
2330
  * const [inProp, setInProp] = useState(false);
2383
2331
  * return (
2384
2332
  * <div>
2385
- * <Transition in={inProp} timeout={500}>
2386
- * {state => (
2387
- * // ...
2388
- * )}
2389
- * </Transition>
2390
- * <button onClick={() => setInProp(true)}>
2333
+ * <CSSTransition in={inProp} timeout={200} classNames="my-node">
2334
+ * <div>
2335
+ * {"I'll receive my-node-* classes"}
2336
+ * </div>
2337
+ * </CSSTransition>
2338
+ * <button type="button" onClick={() => setInProp(true)}>
2391
2339
  * Click to Enter
2392
2340
  * </button>
2393
2341
  * </div>
@@ -2395,343 +2343,271 @@ var EXITING = 'exiting';
2395
2343
  * }
2396
2344
  * ```
2397
2345
  *
2398
- * When the button is clicked the component will shift to the `'entering'` state
2399
- * and stay there for 500ms (the value of `timeout`) before it finally switches
2400
- * to `'entered'`.
2346
+ * When the `in` prop is set to `true`, the child component will first receive
2347
+ * the class `example-enter`, then the `example-enter-active` will be added in
2348
+ * the next tick. `CSSTransition` [forces a
2349
+ * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
2350
+ * between before adding the `example-enter-active`. This is an important trick
2351
+ * because it allows us to transition between `example-enter` and
2352
+ * `example-enter-active` even though they were added immediately one after
2353
+ * another. Most notably, this is what makes it possible for us to animate
2354
+ * _appearance_.
2401
2355
  *
2402
- * When `in` is `false` the same thing happens except the state moves from
2403
- * `'exiting'` to `'exited'`.
2356
+ * ```css
2357
+ * .my-node-enter {
2358
+ * opacity: 0;
2359
+ * }
2360
+ * .my-node-enter-active {
2361
+ * opacity: 1;
2362
+ * transition: opacity 200ms;
2363
+ * }
2364
+ * .my-node-exit {
2365
+ * opacity: 1;
2366
+ * }
2367
+ * .my-node-exit-active {
2368
+ * opacity: 0;
2369
+ * transition: opacity 200ms;
2370
+ * }
2371
+ * ```
2372
+ *
2373
+ * `*-active` classes represent which styles you want to animate **to**, so it's
2374
+ * important to add `transition` declaration only to them, otherwise transitions
2375
+ * might not behave as intended! This might not be obvious when the transitions
2376
+ * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
2377
+ * the example above (minus `transition`), but it becomes apparent in more
2378
+ * complex transitions.
2379
+ *
2380
+ * **Note**: If you're using the
2381
+ * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
2382
+ * prop, make sure to define styles for `.appear-*` classes as well.
2404
2383
  */
2405
2384
 
2406
- var Transition = /*#__PURE__*/function (_React$Component) {
2407
- (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
2408
-
2409
- function Transition(props, context) {
2410
- var _this;
2411
2385
 
2412
- _this = _React$Component.call(this, props, context) || this;
2413
- var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
2386
+ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2387
+ (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
2414
2388
 
2415
- var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2416
- var initialStatus;
2417
- _this.appearStatus = null;
2389
+ function CSSTransition() {
2390
+ var _this;
2418
2391
 
2419
- if (props["in"]) {
2420
- if (appear) {
2421
- initialStatus = EXITED;
2422
- _this.appearStatus = ENTERING;
2423
- } else {
2424
- initialStatus = ENTERED;
2425
- }
2426
- } else {
2427
- if (props.unmountOnExit || props.mountOnEnter) {
2428
- initialStatus = UNMOUNTED;
2429
- } else {
2430
- initialStatus = EXITED;
2431
- }
2392
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2393
+ args[_key] = arguments[_key];
2432
2394
  }
2433
2395
 
2434
- _this.state = {
2435
- status: initialStatus
2396
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2397
+ _this.appliedClasses = {
2398
+ appear: {},
2399
+ enter: {},
2400
+ exit: {}
2436
2401
  };
2437
- _this.nextCallback = null;
2438
- return _this;
2439
- }
2440
2402
 
2441
- Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2442
- var nextIn = _ref["in"];
2403
+ _this.onEnter = function (maybeNode, maybeAppearing) {
2404
+ var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
2405
+ node = _this$resolveArgument[0],
2406
+ appearing = _this$resolveArgument[1];
2443
2407
 
2444
- if (nextIn && prevState.status === UNMOUNTED) {
2445
- return {
2446
- status: EXITED
2447
- };
2448
- }
2408
+ _this.removeClasses(node, 'exit');
2449
2409
 
2450
- return null;
2451
- } // getSnapshotBeforeUpdate(prevProps) {
2452
- // let nextStatus = null
2453
- // if (prevProps !== this.props) {
2454
- // const { status } = this.state
2455
- // if (this.props.in) {
2456
- // if (status !== ENTERING && status !== ENTERED) {
2457
- // nextStatus = ENTERING
2458
- // }
2459
- // } else {
2460
- // if (status === ENTERING || status === ENTERED) {
2461
- // nextStatus = EXITING
2462
- // }
2463
- // }
2464
- // }
2465
- // return { nextStatus }
2466
- // }
2467
- ;
2410
+ _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
2468
2411
 
2469
- var _proto = Transition.prototype;
2412
+ if (_this.props.onEnter) {
2413
+ _this.props.onEnter(maybeNode, maybeAppearing);
2414
+ }
2415
+ };
2470
2416
 
2471
- _proto.componentDidMount = function componentDidMount() {
2472
- this.updateStatus(true, this.appearStatus);
2473
- };
2417
+ _this.onEntering = function (maybeNode, maybeAppearing) {
2418
+ var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
2419
+ node = _this$resolveArgument2[0],
2420
+ appearing = _this$resolveArgument2[1];
2474
2421
 
2475
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2476
- var nextStatus = null;
2422
+ var type = appearing ? 'appear' : 'enter';
2477
2423
 
2478
- if (prevProps !== this.props) {
2479
- var status = this.state.status;
2424
+ _this.addClass(node, type, 'active');
2480
2425
 
2481
- if (this.props["in"]) {
2482
- if (status !== ENTERING && status !== ENTERED) {
2483
- nextStatus = ENTERING;
2484
- }
2485
- } else {
2486
- if (status === ENTERING || status === ENTERED) {
2487
- nextStatus = EXITING;
2488
- }
2426
+ if (_this.props.onEntering) {
2427
+ _this.props.onEntering(maybeNode, maybeAppearing);
2489
2428
  }
2490
- }
2429
+ };
2491
2430
 
2492
- this.updateStatus(false, nextStatus);
2493
- };
2494
-
2495
- _proto.componentWillUnmount = function componentWillUnmount() {
2496
- this.cancelNextCallback();
2497
- };
2431
+ _this.onEntered = function (maybeNode, maybeAppearing) {
2432
+ var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
2433
+ node = _this$resolveArgument3[0],
2434
+ appearing = _this$resolveArgument3[1];
2498
2435
 
2499
- _proto.getTimeouts = function getTimeouts() {
2500
- var timeout = this.props.timeout;
2501
- var exit, enter, appear;
2502
- exit = enter = appear = timeout;
2436
+ var type = appearing ? 'appear' : 'enter';
2503
2437
 
2504
- if (timeout != null && typeof timeout !== 'number') {
2505
- exit = timeout.exit;
2506
- enter = timeout.enter; // TODO: remove fallback for next major
2438
+ _this.removeClasses(node, type);
2507
2439
 
2508
- appear = timeout.appear !== undefined ? timeout.appear : enter;
2509
- }
2440
+ _this.addClass(node, type, 'done');
2510
2441
 
2511
- return {
2512
- exit: exit,
2513
- enter: enter,
2514
- appear: appear
2442
+ if (_this.props.onEntered) {
2443
+ _this.props.onEntered(maybeNode, maybeAppearing);
2444
+ }
2515
2445
  };
2516
- };
2517
2446
 
2518
- _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2519
- if (mounting === void 0) {
2520
- mounting = false;
2521
- }
2447
+ _this.onExit = function (maybeNode) {
2448
+ var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
2449
+ node = _this$resolveArgument4[0];
2522
2450
 
2523
- if (nextStatus !== null) {
2524
- // nextStatus will always be ENTERING or EXITING.
2525
- this.cancelNextCallback();
2451
+ _this.removeClasses(node, 'appear');
2526
2452
 
2527
- if (nextStatus === ENTERING) {
2528
- this.performEnter(mounting);
2529
- } else {
2530
- this.performExit();
2531
- }
2532
- } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2533
- this.setState({
2534
- status: UNMOUNTED
2535
- });
2536
- }
2537
- };
2453
+ _this.removeClasses(node, 'enter');
2538
2454
 
2539
- _proto.performEnter = function performEnter(mounting) {
2540
- var _this2 = this;
2455
+ _this.addClass(node, 'exit', 'base');
2541
2456
 
2542
- var enter = this.props.enter;
2543
- var appearing = this.context ? this.context.isMounting : mounting;
2457
+ if (_this.props.onExit) {
2458
+ _this.props.onExit(maybeNode);
2459
+ }
2460
+ };
2544
2461
 
2545
- var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
2546
- maybeNode = _ref2[0],
2547
- maybeAppearing = _ref2[1];
2462
+ _this.onExiting = function (maybeNode) {
2463
+ var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
2464
+ node = _this$resolveArgument5[0];
2548
2465
 
2549
- var timeouts = this.getTimeouts();
2550
- var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
2551
- // if we are mounting and running this it means appear _must_ be set
2466
+ _this.addClass(node, 'exit', 'active');
2552
2467
 
2553
- if (!mounting && !enter || config.disabled) {
2554
- this.safeSetState({
2555
- status: ENTERED
2556
- }, function () {
2557
- _this2.props.onEntered(maybeNode);
2558
- });
2559
- return;
2560
- }
2468
+ if (_this.props.onExiting) {
2469
+ _this.props.onExiting(maybeNode);
2470
+ }
2471
+ };
2561
2472
 
2562
- this.props.onEnter(maybeNode, maybeAppearing);
2563
- this.safeSetState({
2564
- status: ENTERING
2565
- }, function () {
2566
- _this2.props.onEntering(maybeNode, maybeAppearing);
2473
+ _this.onExited = function (maybeNode) {
2474
+ var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
2475
+ node = _this$resolveArgument6[0];
2567
2476
 
2568
- _this2.onTransitionEnd(enterTimeout, function () {
2569
- _this2.safeSetState({
2570
- status: ENTERED
2571
- }, function () {
2572
- _this2.props.onEntered(maybeNode, maybeAppearing);
2573
- });
2574
- });
2575
- });
2576
- };
2477
+ _this.removeClasses(node, 'exit');
2577
2478
 
2578
- _proto.performExit = function performExit() {
2579
- var _this3 = this;
2479
+ _this.addClass(node, 'exit', 'done');
2580
2480
 
2581
- var exit = this.props.exit;
2582
- var timeouts = this.getTimeouts();
2583
- var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
2481
+ if (_this.props.onExited) {
2482
+ _this.props.onExited(maybeNode);
2483
+ }
2484
+ };
2584
2485
 
2585
- if (!exit || config.disabled) {
2586
- this.safeSetState({
2587
- status: EXITED
2588
- }, function () {
2589
- _this3.props.onExited(maybeNode);
2590
- });
2591
- return;
2592
- }
2486
+ _this.resolveArguments = function (maybeNode, maybeAppearing) {
2487
+ return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
2488
+ : [maybeNode, maybeAppearing];
2489
+ };
2593
2490
 
2594
- this.props.onExit(maybeNode);
2595
- this.safeSetState({
2596
- status: EXITING
2597
- }, function () {
2598
- _this3.props.onExiting(maybeNode);
2491
+ _this.getClassNames = function (type) {
2492
+ var classNames = _this.props.classNames;
2493
+ var isStringClassNames = typeof classNames === 'string';
2494
+ var prefix = isStringClassNames && classNames ? classNames + "-" : '';
2495
+ var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
2496
+ var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
2497
+ var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
2498
+ return {
2499
+ baseClassName: baseClassName,
2500
+ activeClassName: activeClassName,
2501
+ doneClassName: doneClassName
2502
+ };
2503
+ };
2599
2504
 
2600
- _this3.onTransitionEnd(timeouts.exit, function () {
2601
- _this3.safeSetState({
2602
- status: EXITED
2603
- }, function () {
2604
- _this3.props.onExited(maybeNode);
2605
- });
2606
- });
2607
- });
2608
- };
2505
+ return _this;
2506
+ }
2609
2507
 
2610
- _proto.cancelNextCallback = function cancelNextCallback() {
2611
- if (this.nextCallback !== null) {
2612
- this.nextCallback.cancel();
2613
- this.nextCallback = null;
2614
- }
2615
- };
2508
+ var _proto = CSSTransition.prototype;
2616
2509
 
2617
- _proto.safeSetState = function safeSetState(nextState, callback) {
2618
- // This shouldn't be necessary, but there are weird race conditions with
2619
- // setState callbacks and unmounting in testing, so always make sure that
2620
- // we can cancel any pending setState callbacks after we unmount.
2621
- callback = this.setNextCallback(callback);
2622
- this.setState(nextState, callback);
2623
- };
2510
+ _proto.addClass = function addClass(node, type, phase) {
2511
+ var className = this.getClassNames(type)[phase + "ClassName"];
2624
2512
 
2625
- _proto.setNextCallback = function setNextCallback(callback) {
2626
- var _this4 = this;
2513
+ var _this$getClassNames = this.getClassNames('enter'),
2514
+ doneClassName = _this$getClassNames.doneClassName;
2627
2515
 
2628
- var active = true;
2516
+ if (type === 'appear' && phase === 'done' && doneClassName) {
2517
+ className += " " + doneClassName;
2518
+ } // This is for to force a repaint,
2519
+ // which is necessary in order to transition styles when adding a class name.
2629
2520
 
2630
- this.nextCallback = function (event) {
2631
- if (active) {
2632
- active = false;
2633
- _this4.nextCallback = null;
2634
- callback(event);
2635
- }
2636
- };
2637
2521
 
2638
- this.nextCallback.cancel = function () {
2639
- active = false;
2640
- };
2522
+ if (phase === 'active') {
2523
+ /* eslint-disable no-unused-expressions */
2524
+ node && node.scrollTop;
2525
+ }
2641
2526
 
2642
- return this.nextCallback;
2527
+ if (className) {
2528
+ this.appliedClasses[type][phase] = className;
2529
+
2530
+ _addClass(node, className);
2531
+ }
2643
2532
  };
2644
2533
 
2645
- _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
2646
- this.setNextCallback(handler);
2647
- var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
2648
- var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2534
+ _proto.removeClasses = function removeClasses(node, type) {
2535
+ var _this$appliedClasses$ = this.appliedClasses[type],
2536
+ baseClassName = _this$appliedClasses$.base,
2537
+ activeClassName = _this$appliedClasses$.active,
2538
+ doneClassName = _this$appliedClasses$.done;
2539
+ this.appliedClasses[type] = {};
2649
2540
 
2650
- if (!node || doesNotHaveTimeoutOrListener) {
2651
- setTimeout(this.nextCallback, 0);
2652
- return;
2541
+ if (baseClassName) {
2542
+ removeClass(node, baseClassName);
2653
2543
  }
2654
2544
 
2655
- if (this.props.addEndListener) {
2656
- var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
2657
- maybeNode = _ref3[0],
2658
- maybeNextCallback = _ref3[1];
2659
-
2660
- this.props.addEndListener(maybeNode, maybeNextCallback);
2545
+ if (activeClassName) {
2546
+ removeClass(node, activeClassName);
2661
2547
  }
2662
2548
 
2663
- if (timeout != null) {
2664
- setTimeout(this.nextCallback, timeout);
2549
+ if (doneClassName) {
2550
+ removeClass(node, doneClassName);
2665
2551
  }
2666
2552
  };
2667
2553
 
2668
2554
  _proto.render = function render() {
2669
- var status = this.state.status;
2670
-
2671
- if (status === UNMOUNTED) {
2672
- return null;
2673
- }
2674
-
2675
2555
  var _this$props = this.props,
2676
- children = _this$props.children,
2677
- _in = _this$props["in"],
2678
- _mountOnEnter = _this$props.mountOnEnter,
2679
- _unmountOnExit = _this$props.unmountOnExit,
2680
- _appear = _this$props.appear,
2681
- _enter = _this$props.enter,
2682
- _exit = _this$props.exit,
2683
- _timeout = _this$props.timeout,
2684
- _addEndListener = _this$props.addEndListener,
2685
- _onEnter = _this$props.onEnter,
2686
- _onEntering = _this$props.onEntering,
2687
- _onEntered = _this$props.onEntered,
2688
- _onExit = _this$props.onExit,
2689
- _onExiting = _this$props.onExiting,
2690
- _onExited = _this$props.onExited,
2691
- _nodeRef = _this$props.nodeRef,
2692
- childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2556
+ _ = _this$props.classNames,
2557
+ props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
2693
2558
 
2694
- return (
2695
- /*#__PURE__*/
2696
- // allows for nested Transitions
2697
- external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
2698
- value: null
2699
- }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
2700
- );
2559
+ return /*#__PURE__*/external_react_default().createElement(Transition/* default */.ZP, (0,esm_extends/* default */.Z)({}, props, {
2560
+ onEnter: this.onEnter,
2561
+ onEntered: this.onEntered,
2562
+ onEntering: this.onEntering,
2563
+ onExit: this.onExit,
2564
+ onExiting: this.onExiting,
2565
+ onExited: this.onExited
2566
+ }));
2701
2567
  };
2702
2568
 
2703
- return Transition;
2569
+ return CSSTransition;
2704
2570
  }((external_react_default()).Component);
2705
2571
 
2706
- Transition.contextType = TransitionGroupContext/* default */.Z;
2707
- Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
2572
+ CSSTransition.defaultProps = {
2573
+ classNames: ''
2574
+ };
2575
+ CSSTransition.propTypes = false ? 0 : {};
2576
+ /* harmony default export */ const esm_CSSTransition = (CSSTransition);
2708
2577
 
2709
- function noop() {}
2578
+ /***/ }),
2710
2579
 
2711
- Transition.defaultProps = {
2712
- "in": false,
2713
- mountOnEnter: false,
2714
- unmountOnExit: false,
2715
- appear: false,
2716
- enter: true,
2717
- exit: true,
2718
- onEnter: noop,
2719
- onEntering: noop,
2720
- onEntered: noop,
2721
- onExit: noop,
2722
- onExiting: noop,
2723
- onExited: noop
2724
- };
2725
- Transition.UNMOUNTED = UNMOUNTED;
2726
- Transition.EXITED = EXITED;
2727
- Transition.ENTERING = ENTERING;
2728
- Transition.ENTERED = ENTERED;
2729
- Transition.EXITING = EXITING;
2730
- /* harmony default export */ const esm_Transition = (Transition);
2731
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
2580
+ /***/ 6113:
2581
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2582
+
2583
+ "use strict";
2732
2584
 
2585
+ // EXPORTS
2586
+ __webpack_require__.d(__webpack_exports__, {
2587
+ "ZP": () => (/* binding */ esm_Transition)
2588
+ });
2733
2589
 
2590
+ // UNUSED EXPORTS: ENTERED, ENTERING, EXITED, EXITING, UNMOUNTED
2734
2591
 
2592
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
2593
+ var objectWithoutPropertiesLoose = __webpack_require__(7038);
2594
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
2595
+ var inheritsLoose = __webpack_require__(7581);
2596
+ // EXTERNAL MODULE: ./node_modules/prop-types/index.js
2597
+ var prop_types = __webpack_require__(8691);
2598
+ // EXTERNAL MODULE: external "react"
2599
+ var external_react_ = __webpack_require__(8156);
2600
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
2601
+ // EXTERNAL MODULE: external "react-dom"
2602
+ var external_react_dom_ = __webpack_require__(7111);
2603
+ var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
2604
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
2605
+ /* harmony default export */ const config = ({
2606
+ disabled: false
2607
+ });
2608
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
2609
+ var TransitionGroupContext = __webpack_require__(3493);
2610
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
2735
2611
 
2736
2612
 
2737
2613
 
@@ -2739,41 +2615,89 @@ Transition.EXITING = EXITING;
2739
2615
 
2740
2616
 
2741
2617
 
2742
- var _addClass = function addClass(node, classes) {
2743
- return node && classes && classes.split(' ').forEach(function (c) {
2744
- return addClass_addClass(node, c);
2745
- });
2746
- };
2747
2618
 
2748
- var removeClass = function removeClass(node, classes) {
2749
- return node && classes && classes.split(' ').forEach(function (c) {
2750
- return removeClass_removeClass(node, c);
2751
- });
2752
- };
2619
+ var UNMOUNTED = 'unmounted';
2620
+ var EXITED = 'exited';
2621
+ var ENTERING = 'entering';
2622
+ var ENTERED = 'entered';
2623
+ var EXITING = 'exiting';
2753
2624
  /**
2754
- * A transition component inspired by the excellent
2755
- * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
2756
- * use it if you're using CSS transitions or animations. It's built upon the
2757
- * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
2758
- * component, so it inherits all of its props.
2625
+ * The Transition component lets you describe a transition from one component
2626
+ * state to another _over time_ with a simple declarative API. Most commonly
2627
+ * it's used to animate the mounting and unmounting of a component, but can also
2628
+ * be used to describe in-place transition states as well.
2759
2629
  *
2760
- * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
2761
- * and `exit` states of the transition. The first class is applied and then a
2762
- * second `*-active` class in order to activate the CSS transition. After the
2763
- * transition, matching `*-done` class names are applied to persist the
2764
- * transition state.
2630
+ * ---
2631
+ *
2632
+ * **Note**: `Transition` is a platform-agnostic base component. If you're using
2633
+ * transitions in CSS, you'll probably want to use
2634
+ * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
2635
+ * instead. It inherits all the features of `Transition`, but contains
2636
+ * additional features necessary to play nice with CSS transitions (hence the
2637
+ * name of the component).
2638
+ *
2639
+ * ---
2640
+ *
2641
+ * By default the `Transition` component does not alter the behavior of the
2642
+ * component it renders, it only tracks "enter" and "exit" states for the
2643
+ * components. It's up to you to give meaning and effect to those states. For
2644
+ * example we can add styles to a component when it enters or exits:
2645
+ *
2646
+ * ```jsx
2647
+ * import { Transition } from 'react-transition-group';
2648
+ *
2649
+ * const duration = 300;
2650
+ *
2651
+ * const defaultStyle = {
2652
+ * transition: `opacity ${duration}ms ease-in-out`,
2653
+ * opacity: 0,
2654
+ * }
2655
+ *
2656
+ * const transitionStyles = {
2657
+ * entering: { opacity: 1 },
2658
+ * entered: { opacity: 1 },
2659
+ * exiting: { opacity: 0 },
2660
+ * exited: { opacity: 0 },
2661
+ * };
2662
+ *
2663
+ * const Fade = ({ in: inProp }) => (
2664
+ * <Transition in={inProp} timeout={duration}>
2665
+ * {state => (
2666
+ * <div style={{
2667
+ * ...defaultStyle,
2668
+ * ...transitionStyles[state]
2669
+ * }}>
2670
+ * I'm a fade Transition!
2671
+ * </div>
2672
+ * )}
2673
+ * </Transition>
2674
+ * );
2675
+ * ```
2676
+ *
2677
+ * There are 4 main states a Transition can be in:
2678
+ * - `'entering'`
2679
+ * - `'entered'`
2680
+ * - `'exiting'`
2681
+ * - `'exited'`
2682
+ *
2683
+ * Transition state is toggled via the `in` prop. When `true` the component
2684
+ * begins the "Enter" stage. During this stage, the component will shift from
2685
+ * its current transition state, to `'entering'` for the duration of the
2686
+ * transition and then to the `'entered'` stage once it's complete. Let's take
2687
+ * the following example (we'll use the
2688
+ * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
2765
2689
  *
2766
2690
  * ```jsx
2767
2691
  * function App() {
2768
2692
  * const [inProp, setInProp] = useState(false);
2769
2693
  * return (
2770
2694
  * <div>
2771
- * <CSSTransition in={inProp} timeout={200} classNames="my-node">
2772
- * <div>
2773
- * {"I'll receive my-node-* classes"}
2774
- * </div>
2775
- * </CSSTransition>
2776
- * <button type="button" onClick={() => setInProp(true)}>
2695
+ * <Transition in={inProp} timeout={500}>
2696
+ * {state => (
2697
+ * // ...
2698
+ * )}
2699
+ * </Transition>
2700
+ * <button onClick={() => setInProp(true)}>
2777
2701
  * Click to Enter
2778
2702
  * </button>
2779
2703
  * </div>
@@ -2781,237 +2705,339 @@ var removeClass = function removeClass(node, classes) {
2781
2705
  * }
2782
2706
  * ```
2783
2707
  *
2784
- * When the `in` prop is set to `true`, the child component will first receive
2785
- * the class `example-enter`, then the `example-enter-active` will be added in
2786
- * the next tick. `CSSTransition` [forces a
2787
- * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
2788
- * between before adding the `example-enter-active`. This is an important trick
2789
- * because it allows us to transition between `example-enter` and
2790
- * `example-enter-active` even though they were added immediately one after
2791
- * another. Most notably, this is what makes it possible for us to animate
2792
- * _appearance_.
2793
- *
2794
- * ```css
2795
- * .my-node-enter {
2796
- * opacity: 0;
2797
- * }
2798
- * .my-node-enter-active {
2799
- * opacity: 1;
2800
- * transition: opacity 200ms;
2801
- * }
2802
- * .my-node-exit {
2803
- * opacity: 1;
2804
- * }
2805
- * .my-node-exit-active {
2806
- * opacity: 0;
2807
- * transition: opacity 200ms;
2808
- * }
2809
- * ```
2810
- *
2811
- * `*-active` classes represent which styles you want to animate **to**, so it's
2812
- * important to add `transition` declaration only to them, otherwise transitions
2813
- * might not behave as intended! This might not be obvious when the transitions
2814
- * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
2815
- * the example above (minus `transition`), but it becomes apparent in more
2816
- * complex transitions.
2708
+ * When the button is clicked the component will shift to the `'entering'` state
2709
+ * and stay there for 500ms (the value of `timeout`) before it finally switches
2710
+ * to `'entered'`.
2817
2711
  *
2818
- * **Note**: If you're using the
2819
- * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
2820
- * prop, make sure to define styles for `.appear-*` classes as well.
2712
+ * When `in` is `false` the same thing happens except the state moves from
2713
+ * `'exiting'` to `'exited'`.
2821
2714
  */
2822
2715
 
2716
+ var Transition = /*#__PURE__*/function (_React$Component) {
2717
+ (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
2823
2718
 
2824
- var CSSTransition = /*#__PURE__*/function (_React$Component) {
2825
- (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
2826
-
2827
- function CSSTransition() {
2719
+ function Transition(props, context) {
2828
2720
  var _this;
2829
2721
 
2830
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2831
- args[_key] = arguments[_key];
2722
+ _this = _React$Component.call(this, props, context) || this;
2723
+ var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
2724
+
2725
+ var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2726
+ var initialStatus;
2727
+ _this.appearStatus = null;
2728
+
2729
+ if (props["in"]) {
2730
+ if (appear) {
2731
+ initialStatus = EXITED;
2732
+ _this.appearStatus = ENTERING;
2733
+ } else {
2734
+ initialStatus = ENTERED;
2735
+ }
2736
+ } else {
2737
+ if (props.unmountOnExit || props.mountOnEnter) {
2738
+ initialStatus = UNMOUNTED;
2739
+ } else {
2740
+ initialStatus = EXITED;
2741
+ }
2832
2742
  }
2833
2743
 
2834
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2835
- _this.appliedClasses = {
2836
- appear: {},
2837
- enter: {},
2838
- exit: {}
2744
+ _this.state = {
2745
+ status: initialStatus
2839
2746
  };
2747
+ _this.nextCallback = null;
2748
+ return _this;
2749
+ }
2840
2750
 
2841
- _this.onEnter = function (maybeNode, maybeAppearing) {
2842
- var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
2843
- node = _this$resolveArgument[0],
2844
- appearing = _this$resolveArgument[1];
2751
+ Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2752
+ var nextIn = _ref["in"];
2845
2753
 
2846
- _this.removeClasses(node, 'exit');
2754
+ if (nextIn && prevState.status === UNMOUNTED) {
2755
+ return {
2756
+ status: EXITED
2757
+ };
2758
+ }
2847
2759
 
2848
- _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
2760
+ return null;
2761
+ } // getSnapshotBeforeUpdate(prevProps) {
2762
+ // let nextStatus = null
2763
+ // if (prevProps !== this.props) {
2764
+ // const { status } = this.state
2765
+ // if (this.props.in) {
2766
+ // if (status !== ENTERING && status !== ENTERED) {
2767
+ // nextStatus = ENTERING
2768
+ // }
2769
+ // } else {
2770
+ // if (status === ENTERING || status === ENTERED) {
2771
+ // nextStatus = EXITING
2772
+ // }
2773
+ // }
2774
+ // }
2775
+ // return { nextStatus }
2776
+ // }
2777
+ ;
2849
2778
 
2850
- if (_this.props.onEnter) {
2851
- _this.props.onEnter(maybeNode, maybeAppearing);
2852
- }
2853
- };
2779
+ var _proto = Transition.prototype;
2854
2780
 
2855
- _this.onEntering = function (maybeNode, maybeAppearing) {
2856
- var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
2857
- node = _this$resolveArgument2[0],
2858
- appearing = _this$resolveArgument2[1];
2781
+ _proto.componentDidMount = function componentDidMount() {
2782
+ this.updateStatus(true, this.appearStatus);
2783
+ };
2859
2784
 
2860
- var type = appearing ? 'appear' : 'enter';
2785
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2786
+ var nextStatus = null;
2861
2787
 
2862
- _this.addClass(node, type, 'active');
2788
+ if (prevProps !== this.props) {
2789
+ var status = this.state.status;
2863
2790
 
2864
- if (_this.props.onEntering) {
2865
- _this.props.onEntering(maybeNode, maybeAppearing);
2791
+ if (this.props["in"]) {
2792
+ if (status !== ENTERING && status !== ENTERED) {
2793
+ nextStatus = ENTERING;
2794
+ }
2795
+ } else {
2796
+ if (status === ENTERING || status === ENTERED) {
2797
+ nextStatus = EXITING;
2798
+ }
2866
2799
  }
2800
+ }
2801
+
2802
+ this.updateStatus(false, nextStatus);
2803
+ };
2804
+
2805
+ _proto.componentWillUnmount = function componentWillUnmount() {
2806
+ this.cancelNextCallback();
2807
+ };
2808
+
2809
+ _proto.getTimeouts = function getTimeouts() {
2810
+ var timeout = this.props.timeout;
2811
+ var exit, enter, appear;
2812
+ exit = enter = appear = timeout;
2813
+
2814
+ if (timeout != null && typeof timeout !== 'number') {
2815
+ exit = timeout.exit;
2816
+ enter = timeout.enter; // TODO: remove fallback for next major
2817
+
2818
+ appear = timeout.appear !== undefined ? timeout.appear : enter;
2819
+ }
2820
+
2821
+ return {
2822
+ exit: exit,
2823
+ enter: enter,
2824
+ appear: appear
2867
2825
  };
2826
+ };
2868
2827
 
2869
- _this.onEntered = function (maybeNode, maybeAppearing) {
2870
- var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
2871
- node = _this$resolveArgument3[0],
2872
- appearing = _this$resolveArgument3[1];
2828
+ _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2829
+ if (mounting === void 0) {
2830
+ mounting = false;
2831
+ }
2832
+
2833
+ if (nextStatus !== null) {
2834
+ // nextStatus will always be ENTERING or EXITING.
2835
+ this.cancelNextCallback();
2836
+
2837
+ if (nextStatus === ENTERING) {
2838
+ this.performEnter(mounting);
2839
+ } else {
2840
+ this.performExit();
2841
+ }
2842
+ } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2843
+ this.setState({
2844
+ status: UNMOUNTED
2845
+ });
2846
+ }
2847
+ };
2873
2848
 
2874
- var type = appearing ? 'appear' : 'enter';
2849
+ _proto.performEnter = function performEnter(mounting) {
2850
+ var _this2 = this;
2875
2851
 
2876
- _this.removeClasses(node, type);
2852
+ var enter = this.props.enter;
2853
+ var appearing = this.context ? this.context.isMounting : mounting;
2877
2854
 
2878
- _this.addClass(node, type, 'done');
2855
+ var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
2856
+ maybeNode = _ref2[0],
2857
+ maybeAppearing = _ref2[1];
2879
2858
 
2880
- if (_this.props.onEntered) {
2881
- _this.props.onEntered(maybeNode, maybeAppearing);
2882
- }
2883
- };
2859
+ var timeouts = this.getTimeouts();
2860
+ var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
2861
+ // if we are mounting and running this it means appear _must_ be set
2884
2862
 
2885
- _this.onExit = function (maybeNode) {
2886
- var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
2887
- node = _this$resolveArgument4[0];
2863
+ if (!mounting && !enter || config.disabled) {
2864
+ this.safeSetState({
2865
+ status: ENTERED
2866
+ }, function () {
2867
+ _this2.props.onEntered(maybeNode);
2868
+ });
2869
+ return;
2870
+ }
2888
2871
 
2889
- _this.removeClasses(node, 'appear');
2872
+ this.props.onEnter(maybeNode, maybeAppearing);
2873
+ this.safeSetState({
2874
+ status: ENTERING
2875
+ }, function () {
2876
+ _this2.props.onEntering(maybeNode, maybeAppearing);
2890
2877
 
2891
- _this.removeClasses(node, 'enter');
2878
+ _this2.onTransitionEnd(enterTimeout, function () {
2879
+ _this2.safeSetState({
2880
+ status: ENTERED
2881
+ }, function () {
2882
+ _this2.props.onEntered(maybeNode, maybeAppearing);
2883
+ });
2884
+ });
2885
+ });
2886
+ };
2892
2887
 
2893
- _this.addClass(node, 'exit', 'base');
2888
+ _proto.performExit = function performExit() {
2889
+ var _this3 = this;
2894
2890
 
2895
- if (_this.props.onExit) {
2896
- _this.props.onExit(maybeNode);
2897
- }
2898
- };
2891
+ var exit = this.props.exit;
2892
+ var timeouts = this.getTimeouts();
2893
+ var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
2899
2894
 
2900
- _this.onExiting = function (maybeNode) {
2901
- var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
2902
- node = _this$resolveArgument5[0];
2895
+ if (!exit || config.disabled) {
2896
+ this.safeSetState({
2897
+ status: EXITED
2898
+ }, function () {
2899
+ _this3.props.onExited(maybeNode);
2900
+ });
2901
+ return;
2902
+ }
2903
2903
 
2904
- _this.addClass(node, 'exit', 'active');
2904
+ this.props.onExit(maybeNode);
2905
+ this.safeSetState({
2906
+ status: EXITING
2907
+ }, function () {
2908
+ _this3.props.onExiting(maybeNode);
2905
2909
 
2906
- if (_this.props.onExiting) {
2907
- _this.props.onExiting(maybeNode);
2908
- }
2909
- };
2910
+ _this3.onTransitionEnd(timeouts.exit, function () {
2911
+ _this3.safeSetState({
2912
+ status: EXITED
2913
+ }, function () {
2914
+ _this3.props.onExited(maybeNode);
2915
+ });
2916
+ });
2917
+ });
2918
+ };
2910
2919
 
2911
- _this.onExited = function (maybeNode) {
2912
- var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
2913
- node = _this$resolveArgument6[0];
2920
+ _proto.cancelNextCallback = function cancelNextCallback() {
2921
+ if (this.nextCallback !== null) {
2922
+ this.nextCallback.cancel();
2923
+ this.nextCallback = null;
2924
+ }
2925
+ };
2914
2926
 
2915
- _this.removeClasses(node, 'exit');
2927
+ _proto.safeSetState = function safeSetState(nextState, callback) {
2928
+ // This shouldn't be necessary, but there are weird race conditions with
2929
+ // setState callbacks and unmounting in testing, so always make sure that
2930
+ // we can cancel any pending setState callbacks after we unmount.
2931
+ callback = this.setNextCallback(callback);
2932
+ this.setState(nextState, callback);
2933
+ };
2916
2934
 
2917
- _this.addClass(node, 'exit', 'done');
2935
+ _proto.setNextCallback = function setNextCallback(callback) {
2936
+ var _this4 = this;
2918
2937
 
2919
- if (_this.props.onExited) {
2920
- _this.props.onExited(maybeNode);
2921
- }
2922
- };
2938
+ var active = true;
2923
2939
 
2924
- _this.resolveArguments = function (maybeNode, maybeAppearing) {
2925
- return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
2926
- : [maybeNode, maybeAppearing];
2940
+ this.nextCallback = function (event) {
2941
+ if (active) {
2942
+ active = false;
2943
+ _this4.nextCallback = null;
2944
+ callback(event);
2945
+ }
2927
2946
  };
2928
2947
 
2929
- _this.getClassNames = function (type) {
2930
- var classNames = _this.props.classNames;
2931
- var isStringClassNames = typeof classNames === 'string';
2932
- var prefix = isStringClassNames && classNames ? classNames + "-" : '';
2933
- var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
2934
- var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
2935
- var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
2936
- return {
2937
- baseClassName: baseClassName,
2938
- activeClassName: activeClassName,
2939
- doneClassName: doneClassName
2940
- };
2948
+ this.nextCallback.cancel = function () {
2949
+ active = false;
2941
2950
  };
2942
2951
 
2943
- return _this;
2944
- }
2945
-
2946
- var _proto = CSSTransition.prototype;
2947
-
2948
- _proto.addClass = function addClass(node, type, phase) {
2949
- var className = this.getClassNames(type)[phase + "ClassName"];
2950
-
2951
- var _this$getClassNames = this.getClassNames('enter'),
2952
- doneClassName = _this$getClassNames.doneClassName;
2953
-
2954
- if (type === 'appear' && phase === 'done' && doneClassName) {
2955
- className += " " + doneClassName;
2956
- } // This is for to force a repaint,
2957
- // which is necessary in order to transition styles when adding a class name.
2952
+ return this.nextCallback;
2953
+ };
2958
2954
 
2955
+ _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
2956
+ this.setNextCallback(handler);
2957
+ var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
2958
+ var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2959
2959
 
2960
- if (phase === 'active') {
2961
- /* eslint-disable no-unused-expressions */
2962
- node && node.scrollTop;
2960
+ if (!node || doesNotHaveTimeoutOrListener) {
2961
+ setTimeout(this.nextCallback, 0);
2962
+ return;
2963
2963
  }
2964
2964
 
2965
- if (className) {
2966
- this.appliedClasses[type][phase] = className;
2965
+ if (this.props.addEndListener) {
2966
+ var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
2967
+ maybeNode = _ref3[0],
2968
+ maybeNextCallback = _ref3[1];
2967
2969
 
2968
- _addClass(node, className);
2970
+ this.props.addEndListener(maybeNode, maybeNextCallback);
2969
2971
  }
2970
- };
2971
-
2972
- _proto.removeClasses = function removeClasses(node, type) {
2973
- var _this$appliedClasses$ = this.appliedClasses[type],
2974
- baseClassName = _this$appliedClasses$.base,
2975
- activeClassName = _this$appliedClasses$.active,
2976
- doneClassName = _this$appliedClasses$.done;
2977
- this.appliedClasses[type] = {};
2978
2972
 
2979
- if (baseClassName) {
2980
- removeClass(node, baseClassName);
2973
+ if (timeout != null) {
2974
+ setTimeout(this.nextCallback, timeout);
2981
2975
  }
2976
+ };
2982
2977
 
2983
- if (activeClassName) {
2984
- removeClass(node, activeClassName);
2985
- }
2978
+ _proto.render = function render() {
2979
+ var status = this.state.status;
2986
2980
 
2987
- if (doneClassName) {
2988
- removeClass(node, doneClassName);
2981
+ if (status === UNMOUNTED) {
2982
+ return null;
2989
2983
  }
2990
- };
2991
2984
 
2992
- _proto.render = function render() {
2993
2985
  var _this$props = this.props,
2994
- _ = _this$props.classNames,
2995
- props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
2986
+ children = _this$props.children,
2987
+ _in = _this$props["in"],
2988
+ _mountOnEnter = _this$props.mountOnEnter,
2989
+ _unmountOnExit = _this$props.unmountOnExit,
2990
+ _appear = _this$props.appear,
2991
+ _enter = _this$props.enter,
2992
+ _exit = _this$props.exit,
2993
+ _timeout = _this$props.timeout,
2994
+ _addEndListener = _this$props.addEndListener,
2995
+ _onEnter = _this$props.onEnter,
2996
+ _onEntering = _this$props.onEntering,
2997
+ _onEntered = _this$props.onEntered,
2998
+ _onExit = _this$props.onExit,
2999
+ _onExiting = _this$props.onExiting,
3000
+ _onExited = _this$props.onExited,
3001
+ _nodeRef = _this$props.nodeRef,
3002
+ childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2996
3003
 
2997
- return /*#__PURE__*/external_react_default().createElement(esm_Transition, (0,esm_extends/* default */.Z)({}, props, {
2998
- onEnter: this.onEnter,
2999
- onEntered: this.onEntered,
3000
- onEntering: this.onEntering,
3001
- onExit: this.onExit,
3002
- onExiting: this.onExiting,
3003
- onExited: this.onExited
3004
- }));
3004
+ return (
3005
+ /*#__PURE__*/
3006
+ // allows for nested Transitions
3007
+ external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
3008
+ value: null
3009
+ }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
3010
+ );
3005
3011
  };
3006
3012
 
3007
- return CSSTransition;
3013
+ return Transition;
3008
3014
  }((external_react_default()).Component);
3009
3015
 
3010
- CSSTransition.defaultProps = {
3011
- classNames: ''
3016
+ Transition.contextType = TransitionGroupContext/* default */.Z;
3017
+ Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
3018
+
3019
+ function noop() {}
3020
+
3021
+ Transition.defaultProps = {
3022
+ "in": false,
3023
+ mountOnEnter: false,
3024
+ unmountOnExit: false,
3025
+ appear: false,
3026
+ enter: true,
3027
+ exit: true,
3028
+ onEnter: noop,
3029
+ onEntering: noop,
3030
+ onEntered: noop,
3031
+ onExit: noop,
3032
+ onExiting: noop,
3033
+ onExited: noop
3012
3034
  };
3013
- CSSTransition.propTypes = false ? 0 : {};
3014
- /* harmony default export */ const esm_CSSTransition = (CSSTransition);
3035
+ Transition.UNMOUNTED = UNMOUNTED;
3036
+ Transition.EXITED = EXITED;
3037
+ Transition.ENTERING = ENTERING;
3038
+ Transition.ENTERED = ENTERED;
3039
+ Transition.EXITING = EXITING;
3040
+ /* harmony default export */ const esm_Transition = (Transition);
3015
3041
 
3016
3042
  /***/ }),
3017
3043
 
@@ -3461,7 +3487,7 @@ function _typeof(obj) {
3461
3487
  /******/ 2558: 0,
3462
3488
  /******/ 7564: 0,
3463
3489
  /******/ 2823: 0,
3464
- /******/ 563: 0
3490
+ /******/ 3813: 0
3465
3491
  /******/ };
3466
3492
  /******/
3467
3493
  /******/ // no chunk on demand loading
@@ -3511,7 +3537,7 @@ function _typeof(obj) {
3511
3537
  /******/ // startup
3512
3538
  /******/ // Load entry module and return exports
3513
3539
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
3514
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [563], () => (__webpack_require__(1673)))
3540
+ /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [3813], () => (__webpack_require__(1673)))
3515
3541
  /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
3516
3542
  /******/
3517
3543
  /******/ return __webpack_exports__;