@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
@@ -386,8 +386,8 @@ var external_classnames_default = /*#__PURE__*/__webpack_require__.n(external_cl
386
386
  // EXTERNAL MODULE: external "react"
387
387
  var external_react_ = __webpack_require__(8156);
388
388
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
389
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 5 modules
390
- var CSSTransition = __webpack_require__(1750);
389
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js + 3 modules
390
+ var CSSTransition = __webpack_require__(9114);
391
391
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
392
392
  var objectWithoutPropertiesLoose = __webpack_require__(7038);
393
393
  // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
@@ -2118,7 +2118,7 @@ module.exports = ReactPropTypesSecret;
2118
2118
 
2119
2119
  /***/ }),
2120
2120
 
2121
- /***/ 1750:
2121
+ /***/ 9114:
2122
2122
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2123
2123
 
2124
2124
  "use strict";
@@ -2164,16 +2164,9 @@ function removeClass_removeClass(element, className) {
2164
2164
  // EXTERNAL MODULE: external "react"
2165
2165
  var external_react_ = __webpack_require__(8156);
2166
2166
  var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
2167
- // EXTERNAL MODULE: external "react-dom"
2168
- var external_react_dom_ = __webpack_require__(7111);
2169
- var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
2170
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
2171
- /* harmony default export */ const config = ({
2172
- disabled: false
2173
- });
2174
- // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
2175
- var TransitionGroupContext = __webpack_require__(3493);
2176
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
2167
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/Transition.js + 1 modules
2168
+ var Transition = __webpack_require__(6113);
2169
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
2177
2170
 
2178
2171
 
2179
2172
 
@@ -2182,88 +2175,43 @@ var TransitionGroupContext = __webpack_require__(3493);
2182
2175
 
2183
2176
 
2184
2177
 
2185
- var UNMOUNTED = 'unmounted';
2186
- var EXITED = 'exited';
2187
- var ENTERING = 'entering';
2188
- var ENTERED = 'entered';
2189
- var EXITING = 'exiting';
2178
+
2179
+
2180
+ var _addClass = function addClass(node, classes) {
2181
+ return node && classes && classes.split(' ').forEach(function (c) {
2182
+ return addClass_addClass(node, c);
2183
+ });
2184
+ };
2185
+
2186
+ var removeClass = function removeClass(node, classes) {
2187
+ return node && classes && classes.split(' ').forEach(function (c) {
2188
+ return removeClass_removeClass(node, c);
2189
+ });
2190
+ };
2190
2191
  /**
2191
- * The Transition component lets you describe a transition from one component
2192
- * state to another _over time_ with a simple declarative API. Most commonly
2193
- * it's used to animate the mounting and unmounting of a component, but can also
2194
- * be used to describe in-place transition states as well.
2195
- *
2196
- * ---
2197
- *
2198
- * **Note**: `Transition` is a platform-agnostic base component. If you're using
2199
- * transitions in CSS, you'll probably want to use
2200
- * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
2201
- * instead. It inherits all the features of `Transition`, but contains
2202
- * additional features necessary to play nice with CSS transitions (hence the
2203
- * name of the component).
2204
- *
2205
- * ---
2206
- *
2207
- * By default the `Transition` component does not alter the behavior of the
2208
- * component it renders, it only tracks "enter" and "exit" states for the
2209
- * components. It's up to you to give meaning and effect to those states. For
2210
- * example we can add styles to a component when it enters or exits:
2211
- *
2212
- * ```jsx
2213
- * import { Transition } from 'react-transition-group';
2214
- *
2215
- * const duration = 300;
2216
- *
2217
- * const defaultStyle = {
2218
- * transition: `opacity ${duration}ms ease-in-out`,
2219
- * opacity: 0,
2220
- * }
2221
- *
2222
- * const transitionStyles = {
2223
- * entering: { opacity: 1 },
2224
- * entered: { opacity: 1 },
2225
- * exiting: { opacity: 0 },
2226
- * exited: { opacity: 0 },
2227
- * };
2228
- *
2229
- * const Fade = ({ in: inProp }) => (
2230
- * <Transition in={inProp} timeout={duration}>
2231
- * {state => (
2232
- * <div style={{
2233
- * ...defaultStyle,
2234
- * ...transitionStyles[state]
2235
- * }}>
2236
- * I'm a fade Transition!
2237
- * </div>
2238
- * )}
2239
- * </Transition>
2240
- * );
2241
- * ```
2242
- *
2243
- * There are 4 main states a Transition can be in:
2244
- * - `'entering'`
2245
- * - `'entered'`
2246
- * - `'exiting'`
2247
- * - `'exited'`
2192
+ * A transition component inspired by the excellent
2193
+ * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
2194
+ * use it if you're using CSS transitions or animations. It's built upon the
2195
+ * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
2196
+ * component, so it inherits all of its props.
2248
2197
  *
2249
- * Transition state is toggled via the `in` prop. When `true` the component
2250
- * begins the "Enter" stage. During this stage, the component will shift from
2251
- * its current transition state, to `'entering'` for the duration of the
2252
- * transition and then to the `'entered'` stage once it's complete. Let's take
2253
- * the following example (we'll use the
2254
- * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
2198
+ * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
2199
+ * and `exit` states of the transition. The first class is applied and then a
2200
+ * second `*-active` class in order to activate the CSS transition. After the
2201
+ * transition, matching `*-done` class names are applied to persist the
2202
+ * transition state.
2255
2203
  *
2256
2204
  * ```jsx
2257
2205
  * function App() {
2258
2206
  * const [inProp, setInProp] = useState(false);
2259
2207
  * return (
2260
2208
  * <div>
2261
- * <Transition in={inProp} timeout={500}>
2262
- * {state => (
2263
- * // ...
2264
- * )}
2265
- * </Transition>
2266
- * <button onClick={() => setInProp(true)}>
2209
+ * <CSSTransition in={inProp} timeout={200} classNames="my-node">
2210
+ * <div>
2211
+ * {"I'll receive my-node-* classes"}
2212
+ * </div>
2213
+ * </CSSTransition>
2214
+ * <button type="button" onClick={() => setInProp(true)}>
2267
2215
  * Click to Enter
2268
2216
  * </button>
2269
2217
  * </div>
@@ -2271,343 +2219,271 @@ var EXITING = 'exiting';
2271
2219
  * }
2272
2220
  * ```
2273
2221
  *
2274
- * When the button is clicked the component will shift to the `'entering'` state
2275
- * and stay there for 500ms (the value of `timeout`) before it finally switches
2276
- * to `'entered'`.
2222
+ * When the `in` prop is set to `true`, the child component will first receive
2223
+ * the class `example-enter`, then the `example-enter-active` will be added in
2224
+ * the next tick. `CSSTransition` [forces a
2225
+ * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
2226
+ * between before adding the `example-enter-active`. This is an important trick
2227
+ * because it allows us to transition between `example-enter` and
2228
+ * `example-enter-active` even though they were added immediately one after
2229
+ * another. Most notably, this is what makes it possible for us to animate
2230
+ * _appearance_.
2277
2231
  *
2278
- * When `in` is `false` the same thing happens except the state moves from
2279
- * `'exiting'` to `'exited'`.
2232
+ * ```css
2233
+ * .my-node-enter {
2234
+ * opacity: 0;
2235
+ * }
2236
+ * .my-node-enter-active {
2237
+ * opacity: 1;
2238
+ * transition: opacity 200ms;
2239
+ * }
2240
+ * .my-node-exit {
2241
+ * opacity: 1;
2242
+ * }
2243
+ * .my-node-exit-active {
2244
+ * opacity: 0;
2245
+ * transition: opacity 200ms;
2246
+ * }
2247
+ * ```
2248
+ *
2249
+ * `*-active` classes represent which styles you want to animate **to**, so it's
2250
+ * important to add `transition` declaration only to them, otherwise transitions
2251
+ * might not behave as intended! This might not be obvious when the transitions
2252
+ * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
2253
+ * the example above (minus `transition`), but it becomes apparent in more
2254
+ * complex transitions.
2255
+ *
2256
+ * **Note**: If you're using the
2257
+ * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
2258
+ * prop, make sure to define styles for `.appear-*` classes as well.
2280
2259
  */
2281
2260
 
2282
- var Transition = /*#__PURE__*/function (_React$Component) {
2283
- (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
2284
-
2285
- function Transition(props, context) {
2286
- var _this;
2287
2261
 
2288
- _this = _React$Component.call(this, props, context) || this;
2289
- var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
2262
+ var CSSTransition = /*#__PURE__*/function (_React$Component) {
2263
+ (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
2290
2264
 
2291
- var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2292
- var initialStatus;
2293
- _this.appearStatus = null;
2265
+ function CSSTransition() {
2266
+ var _this;
2294
2267
 
2295
- if (props["in"]) {
2296
- if (appear) {
2297
- initialStatus = EXITED;
2298
- _this.appearStatus = ENTERING;
2299
- } else {
2300
- initialStatus = ENTERED;
2301
- }
2302
- } else {
2303
- if (props.unmountOnExit || props.mountOnEnter) {
2304
- initialStatus = UNMOUNTED;
2305
- } else {
2306
- initialStatus = EXITED;
2307
- }
2268
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2269
+ args[_key] = arguments[_key];
2308
2270
  }
2309
2271
 
2310
- _this.state = {
2311
- status: initialStatus
2272
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2273
+ _this.appliedClasses = {
2274
+ appear: {},
2275
+ enter: {},
2276
+ exit: {}
2312
2277
  };
2313
- _this.nextCallback = null;
2314
- return _this;
2315
- }
2316
2278
 
2317
- Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2318
- var nextIn = _ref["in"];
2279
+ _this.onEnter = function (maybeNode, maybeAppearing) {
2280
+ var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
2281
+ node = _this$resolveArgument[0],
2282
+ appearing = _this$resolveArgument[1];
2319
2283
 
2320
- if (nextIn && prevState.status === UNMOUNTED) {
2321
- return {
2322
- status: EXITED
2323
- };
2324
- }
2284
+ _this.removeClasses(node, 'exit');
2325
2285
 
2326
- return null;
2327
- } // getSnapshotBeforeUpdate(prevProps) {
2328
- // let nextStatus = null
2329
- // if (prevProps !== this.props) {
2330
- // const { status } = this.state
2331
- // if (this.props.in) {
2332
- // if (status !== ENTERING && status !== ENTERED) {
2333
- // nextStatus = ENTERING
2334
- // }
2335
- // } else {
2336
- // if (status === ENTERING || status === ENTERED) {
2337
- // nextStatus = EXITING
2338
- // }
2339
- // }
2340
- // }
2341
- // return { nextStatus }
2342
- // }
2343
- ;
2286
+ _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
2344
2287
 
2345
- var _proto = Transition.prototype;
2288
+ if (_this.props.onEnter) {
2289
+ _this.props.onEnter(maybeNode, maybeAppearing);
2290
+ }
2291
+ };
2346
2292
 
2347
- _proto.componentDidMount = function componentDidMount() {
2348
- this.updateStatus(true, this.appearStatus);
2349
- };
2293
+ _this.onEntering = function (maybeNode, maybeAppearing) {
2294
+ var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
2295
+ node = _this$resolveArgument2[0],
2296
+ appearing = _this$resolveArgument2[1];
2350
2297
 
2351
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2352
- var nextStatus = null;
2298
+ var type = appearing ? 'appear' : 'enter';
2353
2299
 
2354
- if (prevProps !== this.props) {
2355
- var status = this.state.status;
2300
+ _this.addClass(node, type, 'active');
2356
2301
 
2357
- if (this.props["in"]) {
2358
- if (status !== ENTERING && status !== ENTERED) {
2359
- nextStatus = ENTERING;
2360
- }
2361
- } else {
2362
- if (status === ENTERING || status === ENTERED) {
2363
- nextStatus = EXITING;
2364
- }
2302
+ if (_this.props.onEntering) {
2303
+ _this.props.onEntering(maybeNode, maybeAppearing);
2365
2304
  }
2366
- }
2305
+ };
2367
2306
 
2368
- this.updateStatus(false, nextStatus);
2369
- };
2370
-
2371
- _proto.componentWillUnmount = function componentWillUnmount() {
2372
- this.cancelNextCallback();
2373
- };
2307
+ _this.onEntered = function (maybeNode, maybeAppearing) {
2308
+ var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
2309
+ node = _this$resolveArgument3[0],
2310
+ appearing = _this$resolveArgument3[1];
2374
2311
 
2375
- _proto.getTimeouts = function getTimeouts() {
2376
- var timeout = this.props.timeout;
2377
- var exit, enter, appear;
2378
- exit = enter = appear = timeout;
2312
+ var type = appearing ? 'appear' : 'enter';
2379
2313
 
2380
- if (timeout != null && typeof timeout !== 'number') {
2381
- exit = timeout.exit;
2382
- enter = timeout.enter; // TODO: remove fallback for next major
2314
+ _this.removeClasses(node, type);
2383
2315
 
2384
- appear = timeout.appear !== undefined ? timeout.appear : enter;
2385
- }
2316
+ _this.addClass(node, type, 'done');
2386
2317
 
2387
- return {
2388
- exit: exit,
2389
- enter: enter,
2390
- appear: appear
2318
+ if (_this.props.onEntered) {
2319
+ _this.props.onEntered(maybeNode, maybeAppearing);
2320
+ }
2391
2321
  };
2392
- };
2393
2322
 
2394
- _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2395
- if (mounting === void 0) {
2396
- mounting = false;
2397
- }
2323
+ _this.onExit = function (maybeNode) {
2324
+ var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
2325
+ node = _this$resolveArgument4[0];
2398
2326
 
2399
- if (nextStatus !== null) {
2400
- // nextStatus will always be ENTERING or EXITING.
2401
- this.cancelNextCallback();
2327
+ _this.removeClasses(node, 'appear');
2402
2328
 
2403
- if (nextStatus === ENTERING) {
2404
- this.performEnter(mounting);
2405
- } else {
2406
- this.performExit();
2407
- }
2408
- } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2409
- this.setState({
2410
- status: UNMOUNTED
2411
- });
2412
- }
2413
- };
2329
+ _this.removeClasses(node, 'enter');
2414
2330
 
2415
- _proto.performEnter = function performEnter(mounting) {
2416
- var _this2 = this;
2331
+ _this.addClass(node, 'exit', 'base');
2417
2332
 
2418
- var enter = this.props.enter;
2419
- var appearing = this.context ? this.context.isMounting : mounting;
2333
+ if (_this.props.onExit) {
2334
+ _this.props.onExit(maybeNode);
2335
+ }
2336
+ };
2420
2337
 
2421
- var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
2422
- maybeNode = _ref2[0],
2423
- maybeAppearing = _ref2[1];
2338
+ _this.onExiting = function (maybeNode) {
2339
+ var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
2340
+ node = _this$resolveArgument5[0];
2424
2341
 
2425
- var timeouts = this.getTimeouts();
2426
- var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
2427
- // if we are mounting and running this it means appear _must_ be set
2342
+ _this.addClass(node, 'exit', 'active');
2428
2343
 
2429
- if (!mounting && !enter || config.disabled) {
2430
- this.safeSetState({
2431
- status: ENTERED
2432
- }, function () {
2433
- _this2.props.onEntered(maybeNode);
2434
- });
2435
- return;
2436
- }
2344
+ if (_this.props.onExiting) {
2345
+ _this.props.onExiting(maybeNode);
2346
+ }
2347
+ };
2437
2348
 
2438
- this.props.onEnter(maybeNode, maybeAppearing);
2439
- this.safeSetState({
2440
- status: ENTERING
2441
- }, function () {
2442
- _this2.props.onEntering(maybeNode, maybeAppearing);
2349
+ _this.onExited = function (maybeNode) {
2350
+ var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
2351
+ node = _this$resolveArgument6[0];
2443
2352
 
2444
- _this2.onTransitionEnd(enterTimeout, function () {
2445
- _this2.safeSetState({
2446
- status: ENTERED
2447
- }, function () {
2448
- _this2.props.onEntered(maybeNode, maybeAppearing);
2449
- });
2450
- });
2451
- });
2452
- };
2353
+ _this.removeClasses(node, 'exit');
2453
2354
 
2454
- _proto.performExit = function performExit() {
2455
- var _this3 = this;
2355
+ _this.addClass(node, 'exit', 'done');
2456
2356
 
2457
- var exit = this.props.exit;
2458
- var timeouts = this.getTimeouts();
2459
- var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
2357
+ if (_this.props.onExited) {
2358
+ _this.props.onExited(maybeNode);
2359
+ }
2360
+ };
2460
2361
 
2461
- if (!exit || config.disabled) {
2462
- this.safeSetState({
2463
- status: EXITED
2464
- }, function () {
2465
- _this3.props.onExited(maybeNode);
2466
- });
2467
- return;
2468
- }
2362
+ _this.resolveArguments = function (maybeNode, maybeAppearing) {
2363
+ return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
2364
+ : [maybeNode, maybeAppearing];
2365
+ };
2469
2366
 
2470
- this.props.onExit(maybeNode);
2471
- this.safeSetState({
2472
- status: EXITING
2473
- }, function () {
2474
- _this3.props.onExiting(maybeNode);
2367
+ _this.getClassNames = function (type) {
2368
+ var classNames = _this.props.classNames;
2369
+ var isStringClassNames = typeof classNames === 'string';
2370
+ var prefix = isStringClassNames && classNames ? classNames + "-" : '';
2371
+ var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
2372
+ var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
2373
+ var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
2374
+ return {
2375
+ baseClassName: baseClassName,
2376
+ activeClassName: activeClassName,
2377
+ doneClassName: doneClassName
2378
+ };
2379
+ };
2475
2380
 
2476
- _this3.onTransitionEnd(timeouts.exit, function () {
2477
- _this3.safeSetState({
2478
- status: EXITED
2479
- }, function () {
2480
- _this3.props.onExited(maybeNode);
2481
- });
2482
- });
2483
- });
2484
- };
2381
+ return _this;
2382
+ }
2485
2383
 
2486
- _proto.cancelNextCallback = function cancelNextCallback() {
2487
- if (this.nextCallback !== null) {
2488
- this.nextCallback.cancel();
2489
- this.nextCallback = null;
2490
- }
2491
- };
2384
+ var _proto = CSSTransition.prototype;
2492
2385
 
2493
- _proto.safeSetState = function safeSetState(nextState, callback) {
2494
- // This shouldn't be necessary, but there are weird race conditions with
2495
- // setState callbacks and unmounting in testing, so always make sure that
2496
- // we can cancel any pending setState callbacks after we unmount.
2497
- callback = this.setNextCallback(callback);
2498
- this.setState(nextState, callback);
2499
- };
2386
+ _proto.addClass = function addClass(node, type, phase) {
2387
+ var className = this.getClassNames(type)[phase + "ClassName"];
2500
2388
 
2501
- _proto.setNextCallback = function setNextCallback(callback) {
2502
- var _this4 = this;
2389
+ var _this$getClassNames = this.getClassNames('enter'),
2390
+ doneClassName = _this$getClassNames.doneClassName;
2503
2391
 
2504
- var active = true;
2392
+ if (type === 'appear' && phase === 'done' && doneClassName) {
2393
+ className += " " + doneClassName;
2394
+ } // This is for to force a repaint,
2395
+ // which is necessary in order to transition styles when adding a class name.
2505
2396
 
2506
- this.nextCallback = function (event) {
2507
- if (active) {
2508
- active = false;
2509
- _this4.nextCallback = null;
2510
- callback(event);
2511
- }
2512
- };
2513
2397
 
2514
- this.nextCallback.cancel = function () {
2515
- active = false;
2516
- };
2398
+ if (phase === 'active') {
2399
+ /* eslint-disable no-unused-expressions */
2400
+ node && node.scrollTop;
2401
+ }
2517
2402
 
2518
- return this.nextCallback;
2403
+ if (className) {
2404
+ this.appliedClasses[type][phase] = className;
2405
+
2406
+ _addClass(node, className);
2407
+ }
2519
2408
  };
2520
2409
 
2521
- _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
2522
- this.setNextCallback(handler);
2523
- var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
2524
- var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2410
+ _proto.removeClasses = function removeClasses(node, type) {
2411
+ var _this$appliedClasses$ = this.appliedClasses[type],
2412
+ baseClassName = _this$appliedClasses$.base,
2413
+ activeClassName = _this$appliedClasses$.active,
2414
+ doneClassName = _this$appliedClasses$.done;
2415
+ this.appliedClasses[type] = {};
2525
2416
 
2526
- if (!node || doesNotHaveTimeoutOrListener) {
2527
- setTimeout(this.nextCallback, 0);
2528
- return;
2417
+ if (baseClassName) {
2418
+ removeClass(node, baseClassName);
2529
2419
  }
2530
2420
 
2531
- if (this.props.addEndListener) {
2532
- var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
2533
- maybeNode = _ref3[0],
2534
- maybeNextCallback = _ref3[1];
2535
-
2536
- this.props.addEndListener(maybeNode, maybeNextCallback);
2421
+ if (activeClassName) {
2422
+ removeClass(node, activeClassName);
2537
2423
  }
2538
2424
 
2539
- if (timeout != null) {
2540
- setTimeout(this.nextCallback, timeout);
2425
+ if (doneClassName) {
2426
+ removeClass(node, doneClassName);
2541
2427
  }
2542
2428
  };
2543
2429
 
2544
2430
  _proto.render = function render() {
2545
- var status = this.state.status;
2546
-
2547
- if (status === UNMOUNTED) {
2548
- return null;
2549
- }
2550
-
2551
2431
  var _this$props = this.props,
2552
- children = _this$props.children,
2553
- _in = _this$props["in"],
2554
- _mountOnEnter = _this$props.mountOnEnter,
2555
- _unmountOnExit = _this$props.unmountOnExit,
2556
- _appear = _this$props.appear,
2557
- _enter = _this$props.enter,
2558
- _exit = _this$props.exit,
2559
- _timeout = _this$props.timeout,
2560
- _addEndListener = _this$props.addEndListener,
2561
- _onEnter = _this$props.onEnter,
2562
- _onEntering = _this$props.onEntering,
2563
- _onEntered = _this$props.onEntered,
2564
- _onExit = _this$props.onExit,
2565
- _onExiting = _this$props.onExiting,
2566
- _onExited = _this$props.onExited,
2567
- _nodeRef = _this$props.nodeRef,
2568
- childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2432
+ _ = _this$props.classNames,
2433
+ props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
2569
2434
 
2570
- return (
2571
- /*#__PURE__*/
2572
- // allows for nested Transitions
2573
- external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
2574
- value: null
2575
- }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
2576
- );
2435
+ return /*#__PURE__*/external_react_default().createElement(Transition/* default */.ZP, (0,esm_extends/* default */.Z)({}, props, {
2436
+ onEnter: this.onEnter,
2437
+ onEntered: this.onEntered,
2438
+ onEntering: this.onEntering,
2439
+ onExit: this.onExit,
2440
+ onExiting: this.onExiting,
2441
+ onExited: this.onExited
2442
+ }));
2577
2443
  };
2578
2444
 
2579
- return Transition;
2445
+ return CSSTransition;
2580
2446
  }((external_react_default()).Component);
2581
2447
 
2582
- Transition.contextType = TransitionGroupContext/* default */.Z;
2583
- Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
2448
+ CSSTransition.defaultProps = {
2449
+ classNames: ''
2450
+ };
2451
+ CSSTransition.propTypes = false ? 0 : {};
2452
+ /* harmony default export */ const esm_CSSTransition = (CSSTransition);
2584
2453
 
2585
- function noop() {}
2454
+ /***/ }),
2586
2455
 
2587
- Transition.defaultProps = {
2588
- "in": false,
2589
- mountOnEnter: false,
2590
- unmountOnExit: false,
2591
- appear: false,
2592
- enter: true,
2593
- exit: true,
2594
- onEnter: noop,
2595
- onEntering: noop,
2596
- onEntered: noop,
2597
- onExit: noop,
2598
- onExiting: noop,
2599
- onExited: noop
2600
- };
2601
- Transition.UNMOUNTED = UNMOUNTED;
2602
- Transition.EXITED = EXITED;
2603
- Transition.ENTERING = ENTERING;
2604
- Transition.ENTERED = ENTERED;
2605
- Transition.EXITING = EXITING;
2606
- /* harmony default export */ const esm_Transition = (Transition);
2607
- ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/CSSTransition.js
2456
+ /***/ 6113:
2457
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2458
+
2459
+ "use strict";
2608
2460
 
2461
+ // EXPORTS
2462
+ __webpack_require__.d(__webpack_exports__, {
2463
+ "ZP": () => (/* binding */ esm_Transition)
2464
+ });
2609
2465
 
2466
+ // UNUSED EXPORTS: ENTERED, ENTERING, EXITED, EXITING, UNMOUNTED
2610
2467
 
2468
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
2469
+ var objectWithoutPropertiesLoose = __webpack_require__(7038);
2470
+ // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js + 1 modules
2471
+ var inheritsLoose = __webpack_require__(7581);
2472
+ // EXTERNAL MODULE: ./node_modules/prop-types/index.js
2473
+ var prop_types = __webpack_require__(8691);
2474
+ // EXTERNAL MODULE: external "react"
2475
+ var external_react_ = __webpack_require__(8156);
2476
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
2477
+ // EXTERNAL MODULE: external "react-dom"
2478
+ var external_react_dom_ = __webpack_require__(7111);
2479
+ var external_react_dom_default = /*#__PURE__*/__webpack_require__.n(external_react_dom_);
2480
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/config.js
2481
+ /* harmony default export */ const config = ({
2482
+ disabled: false
2483
+ });
2484
+ // EXTERNAL MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
2485
+ var TransitionGroupContext = __webpack_require__(3493);
2486
+ ;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
2611
2487
 
2612
2488
 
2613
2489
 
@@ -2615,41 +2491,89 @@ Transition.EXITING = EXITING;
2615
2491
 
2616
2492
 
2617
2493
 
2618
- var _addClass = function addClass(node, classes) {
2619
- return node && classes && classes.split(' ').forEach(function (c) {
2620
- return addClass_addClass(node, c);
2621
- });
2622
- };
2623
2494
 
2624
- var removeClass = function removeClass(node, classes) {
2625
- return node && classes && classes.split(' ').forEach(function (c) {
2626
- return removeClass_removeClass(node, c);
2627
- });
2628
- };
2495
+ var UNMOUNTED = 'unmounted';
2496
+ var EXITED = 'exited';
2497
+ var ENTERING = 'entering';
2498
+ var ENTERED = 'entered';
2499
+ var EXITING = 'exiting';
2629
2500
  /**
2630
- * A transition component inspired by the excellent
2631
- * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should
2632
- * use it if you're using CSS transitions or animations. It's built upon the
2633
- * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
2634
- * component, so it inherits all of its props.
2501
+ * The Transition component lets you describe a transition from one component
2502
+ * state to another _over time_ with a simple declarative API. Most commonly
2503
+ * it's used to animate the mounting and unmounting of a component, but can also
2504
+ * be used to describe in-place transition states as well.
2635
2505
  *
2636
- * `CSSTransition` applies a pair of class names during the `appear`, `enter`,
2637
- * and `exit` states of the transition. The first class is applied and then a
2638
- * second `*-active` class in order to activate the CSS transition. After the
2639
- * transition, matching `*-done` class names are applied to persist the
2640
- * transition state.
2506
+ * ---
2507
+ *
2508
+ * **Note**: `Transition` is a platform-agnostic base component. If you're using
2509
+ * transitions in CSS, you'll probably want to use
2510
+ * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
2511
+ * instead. It inherits all the features of `Transition`, but contains
2512
+ * additional features necessary to play nice with CSS transitions (hence the
2513
+ * name of the component).
2514
+ *
2515
+ * ---
2516
+ *
2517
+ * By default the `Transition` component does not alter the behavior of the
2518
+ * component it renders, it only tracks "enter" and "exit" states for the
2519
+ * components. It's up to you to give meaning and effect to those states. For
2520
+ * example we can add styles to a component when it enters or exits:
2521
+ *
2522
+ * ```jsx
2523
+ * import { Transition } from 'react-transition-group';
2524
+ *
2525
+ * const duration = 300;
2526
+ *
2527
+ * const defaultStyle = {
2528
+ * transition: `opacity ${duration}ms ease-in-out`,
2529
+ * opacity: 0,
2530
+ * }
2531
+ *
2532
+ * const transitionStyles = {
2533
+ * entering: { opacity: 1 },
2534
+ * entered: { opacity: 1 },
2535
+ * exiting: { opacity: 0 },
2536
+ * exited: { opacity: 0 },
2537
+ * };
2538
+ *
2539
+ * const Fade = ({ in: inProp }) => (
2540
+ * <Transition in={inProp} timeout={duration}>
2541
+ * {state => (
2542
+ * <div style={{
2543
+ * ...defaultStyle,
2544
+ * ...transitionStyles[state]
2545
+ * }}>
2546
+ * I'm a fade Transition!
2547
+ * </div>
2548
+ * )}
2549
+ * </Transition>
2550
+ * );
2551
+ * ```
2552
+ *
2553
+ * There are 4 main states a Transition can be in:
2554
+ * - `'entering'`
2555
+ * - `'entered'`
2556
+ * - `'exiting'`
2557
+ * - `'exited'`
2558
+ *
2559
+ * Transition state is toggled via the `in` prop. When `true` the component
2560
+ * begins the "Enter" stage. During this stage, the component will shift from
2561
+ * its current transition state, to `'entering'` for the duration of the
2562
+ * transition and then to the `'entered'` stage once it's complete. Let's take
2563
+ * the following example (we'll use the
2564
+ * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):
2641
2565
  *
2642
2566
  * ```jsx
2643
2567
  * function App() {
2644
2568
  * const [inProp, setInProp] = useState(false);
2645
2569
  * return (
2646
2570
  * <div>
2647
- * <CSSTransition in={inProp} timeout={200} classNames="my-node">
2648
- * <div>
2649
- * {"I'll receive my-node-* classes"}
2650
- * </div>
2651
- * </CSSTransition>
2652
- * <button type="button" onClick={() => setInProp(true)}>
2571
+ * <Transition in={inProp} timeout={500}>
2572
+ * {state => (
2573
+ * // ...
2574
+ * )}
2575
+ * </Transition>
2576
+ * <button onClick={() => setInProp(true)}>
2653
2577
  * Click to Enter
2654
2578
  * </button>
2655
2579
  * </div>
@@ -2657,237 +2581,339 @@ var removeClass = function removeClass(node, classes) {
2657
2581
  * }
2658
2582
  * ```
2659
2583
  *
2660
- * When the `in` prop is set to `true`, the child component will first receive
2661
- * the class `example-enter`, then the `example-enter-active` will be added in
2662
- * the next tick. `CSSTransition` [forces a
2663
- * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
2664
- * between before adding the `example-enter-active`. This is an important trick
2665
- * because it allows us to transition between `example-enter` and
2666
- * `example-enter-active` even though they were added immediately one after
2667
- * another. Most notably, this is what makes it possible for us to animate
2668
- * _appearance_.
2669
- *
2670
- * ```css
2671
- * .my-node-enter {
2672
- * opacity: 0;
2673
- * }
2674
- * .my-node-enter-active {
2675
- * opacity: 1;
2676
- * transition: opacity 200ms;
2677
- * }
2678
- * .my-node-exit {
2679
- * opacity: 1;
2680
- * }
2681
- * .my-node-exit-active {
2682
- * opacity: 0;
2683
- * transition: opacity 200ms;
2684
- * }
2685
- * ```
2686
- *
2687
- * `*-active` classes represent which styles you want to animate **to**, so it's
2688
- * important to add `transition` declaration only to them, otherwise transitions
2689
- * might not behave as intended! This might not be obvious when the transitions
2690
- * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in
2691
- * the example above (minus `transition`), but it becomes apparent in more
2692
- * complex transitions.
2584
+ * When the button is clicked the component will shift to the `'entering'` state
2585
+ * and stay there for 500ms (the value of `timeout`) before it finally switches
2586
+ * to `'entered'`.
2693
2587
  *
2694
- * **Note**: If you're using the
2695
- * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)
2696
- * prop, make sure to define styles for `.appear-*` classes as well.
2588
+ * When `in` is `false` the same thing happens except the state moves from
2589
+ * `'exiting'` to `'exited'`.
2697
2590
  */
2698
2591
 
2592
+ var Transition = /*#__PURE__*/function (_React$Component) {
2593
+ (0,inheritsLoose/* default */.Z)(Transition, _React$Component);
2699
2594
 
2700
- var CSSTransition = /*#__PURE__*/function (_React$Component) {
2701
- (0,inheritsLoose/* default */.Z)(CSSTransition, _React$Component);
2702
-
2703
- function CSSTransition() {
2595
+ function Transition(props, context) {
2704
2596
  var _this;
2705
2597
 
2706
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2707
- args[_key] = arguments[_key];
2598
+ _this = _React$Component.call(this, props, context) || this;
2599
+ var parentGroup = context; // In the context of a TransitionGroup all enters are really appears
2600
+
2601
+ var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
2602
+ var initialStatus;
2603
+ _this.appearStatus = null;
2604
+
2605
+ if (props["in"]) {
2606
+ if (appear) {
2607
+ initialStatus = EXITED;
2608
+ _this.appearStatus = ENTERING;
2609
+ } else {
2610
+ initialStatus = ENTERED;
2611
+ }
2612
+ } else {
2613
+ if (props.unmountOnExit || props.mountOnEnter) {
2614
+ initialStatus = UNMOUNTED;
2615
+ } else {
2616
+ initialStatus = EXITED;
2617
+ }
2708
2618
  }
2709
2619
 
2710
- _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2711
- _this.appliedClasses = {
2712
- appear: {},
2713
- enter: {},
2714
- exit: {}
2620
+ _this.state = {
2621
+ status: initialStatus
2715
2622
  };
2623
+ _this.nextCallback = null;
2624
+ return _this;
2625
+ }
2716
2626
 
2717
- _this.onEnter = function (maybeNode, maybeAppearing) {
2718
- var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),
2719
- node = _this$resolveArgument[0],
2720
- appearing = _this$resolveArgument[1];
2627
+ Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
2628
+ var nextIn = _ref["in"];
2721
2629
 
2722
- _this.removeClasses(node, 'exit');
2630
+ if (nextIn && prevState.status === UNMOUNTED) {
2631
+ return {
2632
+ status: EXITED
2633
+ };
2634
+ }
2723
2635
 
2724
- _this.addClass(node, appearing ? 'appear' : 'enter', 'base');
2636
+ return null;
2637
+ } // getSnapshotBeforeUpdate(prevProps) {
2638
+ // let nextStatus = null
2639
+ // if (prevProps !== this.props) {
2640
+ // const { status } = this.state
2641
+ // if (this.props.in) {
2642
+ // if (status !== ENTERING && status !== ENTERED) {
2643
+ // nextStatus = ENTERING
2644
+ // }
2645
+ // } else {
2646
+ // if (status === ENTERING || status === ENTERED) {
2647
+ // nextStatus = EXITING
2648
+ // }
2649
+ // }
2650
+ // }
2651
+ // return { nextStatus }
2652
+ // }
2653
+ ;
2725
2654
 
2726
- if (_this.props.onEnter) {
2727
- _this.props.onEnter(maybeNode, maybeAppearing);
2728
- }
2729
- };
2655
+ var _proto = Transition.prototype;
2730
2656
 
2731
- _this.onEntering = function (maybeNode, maybeAppearing) {
2732
- var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),
2733
- node = _this$resolveArgument2[0],
2734
- appearing = _this$resolveArgument2[1];
2657
+ _proto.componentDidMount = function componentDidMount() {
2658
+ this.updateStatus(true, this.appearStatus);
2659
+ };
2735
2660
 
2736
- var type = appearing ? 'appear' : 'enter';
2661
+ _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
2662
+ var nextStatus = null;
2737
2663
 
2738
- _this.addClass(node, type, 'active');
2664
+ if (prevProps !== this.props) {
2665
+ var status = this.state.status;
2739
2666
 
2740
- if (_this.props.onEntering) {
2741
- _this.props.onEntering(maybeNode, maybeAppearing);
2667
+ if (this.props["in"]) {
2668
+ if (status !== ENTERING && status !== ENTERED) {
2669
+ nextStatus = ENTERING;
2670
+ }
2671
+ } else {
2672
+ if (status === ENTERING || status === ENTERED) {
2673
+ nextStatus = EXITING;
2674
+ }
2742
2675
  }
2676
+ }
2677
+
2678
+ this.updateStatus(false, nextStatus);
2679
+ };
2680
+
2681
+ _proto.componentWillUnmount = function componentWillUnmount() {
2682
+ this.cancelNextCallback();
2683
+ };
2684
+
2685
+ _proto.getTimeouts = function getTimeouts() {
2686
+ var timeout = this.props.timeout;
2687
+ var exit, enter, appear;
2688
+ exit = enter = appear = timeout;
2689
+
2690
+ if (timeout != null && typeof timeout !== 'number') {
2691
+ exit = timeout.exit;
2692
+ enter = timeout.enter; // TODO: remove fallback for next major
2693
+
2694
+ appear = timeout.appear !== undefined ? timeout.appear : enter;
2695
+ }
2696
+
2697
+ return {
2698
+ exit: exit,
2699
+ enter: enter,
2700
+ appear: appear
2743
2701
  };
2702
+ };
2744
2703
 
2745
- _this.onEntered = function (maybeNode, maybeAppearing) {
2746
- var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),
2747
- node = _this$resolveArgument3[0],
2748
- appearing = _this$resolveArgument3[1];
2704
+ _proto.updateStatus = function updateStatus(mounting, nextStatus) {
2705
+ if (mounting === void 0) {
2706
+ mounting = false;
2707
+ }
2708
+
2709
+ if (nextStatus !== null) {
2710
+ // nextStatus will always be ENTERING or EXITING.
2711
+ this.cancelNextCallback();
2712
+
2713
+ if (nextStatus === ENTERING) {
2714
+ this.performEnter(mounting);
2715
+ } else {
2716
+ this.performExit();
2717
+ }
2718
+ } else if (this.props.unmountOnExit && this.state.status === EXITED) {
2719
+ this.setState({
2720
+ status: UNMOUNTED
2721
+ });
2722
+ }
2723
+ };
2749
2724
 
2750
- var type = appearing ? 'appear' : 'enter';
2725
+ _proto.performEnter = function performEnter(mounting) {
2726
+ var _this2 = this;
2751
2727
 
2752
- _this.removeClasses(node, type);
2728
+ var enter = this.props.enter;
2729
+ var appearing = this.context ? this.context.isMounting : mounting;
2753
2730
 
2754
- _this.addClass(node, type, 'done');
2731
+ var _ref2 = this.props.nodeRef ? [appearing] : [external_react_dom_default().findDOMNode(this), appearing],
2732
+ maybeNode = _ref2[0],
2733
+ maybeAppearing = _ref2[1];
2755
2734
 
2756
- if (_this.props.onEntered) {
2757
- _this.props.onEntered(maybeNode, maybeAppearing);
2758
- }
2759
- };
2735
+ var timeouts = this.getTimeouts();
2736
+ var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED
2737
+ // if we are mounting and running this it means appear _must_ be set
2760
2738
 
2761
- _this.onExit = function (maybeNode) {
2762
- var _this$resolveArgument4 = _this.resolveArguments(maybeNode),
2763
- node = _this$resolveArgument4[0];
2739
+ if (!mounting && !enter || config.disabled) {
2740
+ this.safeSetState({
2741
+ status: ENTERED
2742
+ }, function () {
2743
+ _this2.props.onEntered(maybeNode);
2744
+ });
2745
+ return;
2746
+ }
2764
2747
 
2765
- _this.removeClasses(node, 'appear');
2748
+ this.props.onEnter(maybeNode, maybeAppearing);
2749
+ this.safeSetState({
2750
+ status: ENTERING
2751
+ }, function () {
2752
+ _this2.props.onEntering(maybeNode, maybeAppearing);
2766
2753
 
2767
- _this.removeClasses(node, 'enter');
2754
+ _this2.onTransitionEnd(enterTimeout, function () {
2755
+ _this2.safeSetState({
2756
+ status: ENTERED
2757
+ }, function () {
2758
+ _this2.props.onEntered(maybeNode, maybeAppearing);
2759
+ });
2760
+ });
2761
+ });
2762
+ };
2768
2763
 
2769
- _this.addClass(node, 'exit', 'base');
2764
+ _proto.performExit = function performExit() {
2765
+ var _this3 = this;
2770
2766
 
2771
- if (_this.props.onExit) {
2772
- _this.props.onExit(maybeNode);
2773
- }
2774
- };
2767
+ var exit = this.props.exit;
2768
+ var timeouts = this.getTimeouts();
2769
+ var maybeNode = this.props.nodeRef ? undefined : external_react_dom_default().findDOMNode(this); // no exit animation skip right to EXITED
2775
2770
 
2776
- _this.onExiting = function (maybeNode) {
2777
- var _this$resolveArgument5 = _this.resolveArguments(maybeNode),
2778
- node = _this$resolveArgument5[0];
2771
+ if (!exit || config.disabled) {
2772
+ this.safeSetState({
2773
+ status: EXITED
2774
+ }, function () {
2775
+ _this3.props.onExited(maybeNode);
2776
+ });
2777
+ return;
2778
+ }
2779
2779
 
2780
- _this.addClass(node, 'exit', 'active');
2780
+ this.props.onExit(maybeNode);
2781
+ this.safeSetState({
2782
+ status: EXITING
2783
+ }, function () {
2784
+ _this3.props.onExiting(maybeNode);
2781
2785
 
2782
- if (_this.props.onExiting) {
2783
- _this.props.onExiting(maybeNode);
2784
- }
2785
- };
2786
+ _this3.onTransitionEnd(timeouts.exit, function () {
2787
+ _this3.safeSetState({
2788
+ status: EXITED
2789
+ }, function () {
2790
+ _this3.props.onExited(maybeNode);
2791
+ });
2792
+ });
2793
+ });
2794
+ };
2786
2795
 
2787
- _this.onExited = function (maybeNode) {
2788
- var _this$resolveArgument6 = _this.resolveArguments(maybeNode),
2789
- node = _this$resolveArgument6[0];
2796
+ _proto.cancelNextCallback = function cancelNextCallback() {
2797
+ if (this.nextCallback !== null) {
2798
+ this.nextCallback.cancel();
2799
+ this.nextCallback = null;
2800
+ }
2801
+ };
2790
2802
 
2791
- _this.removeClasses(node, 'exit');
2803
+ _proto.safeSetState = function safeSetState(nextState, callback) {
2804
+ // This shouldn't be necessary, but there are weird race conditions with
2805
+ // setState callbacks and unmounting in testing, so always make sure that
2806
+ // we can cancel any pending setState callbacks after we unmount.
2807
+ callback = this.setNextCallback(callback);
2808
+ this.setState(nextState, callback);
2809
+ };
2792
2810
 
2793
- _this.addClass(node, 'exit', 'done');
2811
+ _proto.setNextCallback = function setNextCallback(callback) {
2812
+ var _this4 = this;
2794
2813
 
2795
- if (_this.props.onExited) {
2796
- _this.props.onExited(maybeNode);
2797
- }
2798
- };
2814
+ var active = true;
2799
2815
 
2800
- _this.resolveArguments = function (maybeNode, maybeAppearing) {
2801
- return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`
2802
- : [maybeNode, maybeAppearing];
2816
+ this.nextCallback = function (event) {
2817
+ if (active) {
2818
+ active = false;
2819
+ _this4.nextCallback = null;
2820
+ callback(event);
2821
+ }
2803
2822
  };
2804
2823
 
2805
- _this.getClassNames = function (type) {
2806
- var classNames = _this.props.classNames;
2807
- var isStringClassNames = typeof classNames === 'string';
2808
- var prefix = isStringClassNames && classNames ? classNames + "-" : '';
2809
- var baseClassName = isStringClassNames ? "" + prefix + type : classNames[type];
2810
- var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type + "Active"];
2811
- var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type + "Done"];
2812
- return {
2813
- baseClassName: baseClassName,
2814
- activeClassName: activeClassName,
2815
- doneClassName: doneClassName
2816
- };
2824
+ this.nextCallback.cancel = function () {
2825
+ active = false;
2817
2826
  };
2818
2827
 
2819
- return _this;
2820
- }
2821
-
2822
- var _proto = CSSTransition.prototype;
2823
-
2824
- _proto.addClass = function addClass(node, type, phase) {
2825
- var className = this.getClassNames(type)[phase + "ClassName"];
2826
-
2827
- var _this$getClassNames = this.getClassNames('enter'),
2828
- doneClassName = _this$getClassNames.doneClassName;
2829
-
2830
- if (type === 'appear' && phase === 'done' && doneClassName) {
2831
- className += " " + doneClassName;
2832
- } // This is for to force a repaint,
2833
- // which is necessary in order to transition styles when adding a class name.
2828
+ return this.nextCallback;
2829
+ };
2834
2830
 
2831
+ _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {
2832
+ this.setNextCallback(handler);
2833
+ var node = this.props.nodeRef ? this.props.nodeRef.current : external_react_dom_default().findDOMNode(this);
2834
+ var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;
2835
2835
 
2836
- if (phase === 'active') {
2837
- /* eslint-disable no-unused-expressions */
2838
- node && node.scrollTop;
2836
+ if (!node || doesNotHaveTimeoutOrListener) {
2837
+ setTimeout(this.nextCallback, 0);
2838
+ return;
2839
2839
  }
2840
2840
 
2841
- if (className) {
2842
- this.appliedClasses[type][phase] = className;
2841
+ if (this.props.addEndListener) {
2842
+ var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],
2843
+ maybeNode = _ref3[0],
2844
+ maybeNextCallback = _ref3[1];
2843
2845
 
2844
- _addClass(node, className);
2846
+ this.props.addEndListener(maybeNode, maybeNextCallback);
2845
2847
  }
2846
- };
2847
-
2848
- _proto.removeClasses = function removeClasses(node, type) {
2849
- var _this$appliedClasses$ = this.appliedClasses[type],
2850
- baseClassName = _this$appliedClasses$.base,
2851
- activeClassName = _this$appliedClasses$.active,
2852
- doneClassName = _this$appliedClasses$.done;
2853
- this.appliedClasses[type] = {};
2854
2848
 
2855
- if (baseClassName) {
2856
- removeClass(node, baseClassName);
2849
+ if (timeout != null) {
2850
+ setTimeout(this.nextCallback, timeout);
2857
2851
  }
2852
+ };
2858
2853
 
2859
- if (activeClassName) {
2860
- removeClass(node, activeClassName);
2861
- }
2854
+ _proto.render = function render() {
2855
+ var status = this.state.status;
2862
2856
 
2863
- if (doneClassName) {
2864
- removeClass(node, doneClassName);
2857
+ if (status === UNMOUNTED) {
2858
+ return null;
2865
2859
  }
2866
- };
2867
2860
 
2868
- _proto.render = function render() {
2869
2861
  var _this$props = this.props,
2870
- _ = _this$props.classNames,
2871
- props = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["classNames"]);
2862
+ children = _this$props.children,
2863
+ _in = _this$props["in"],
2864
+ _mountOnEnter = _this$props.mountOnEnter,
2865
+ _unmountOnExit = _this$props.unmountOnExit,
2866
+ _appear = _this$props.appear,
2867
+ _enter = _this$props.enter,
2868
+ _exit = _this$props.exit,
2869
+ _timeout = _this$props.timeout,
2870
+ _addEndListener = _this$props.addEndListener,
2871
+ _onEnter = _this$props.onEnter,
2872
+ _onEntering = _this$props.onEntering,
2873
+ _onEntered = _this$props.onEntered,
2874
+ _onExit = _this$props.onExit,
2875
+ _onExiting = _this$props.onExiting,
2876
+ _onExited = _this$props.onExited,
2877
+ _nodeRef = _this$props.nodeRef,
2878
+ childProps = (0,objectWithoutPropertiesLoose/* default */.Z)(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
2872
2879
 
2873
- return /*#__PURE__*/external_react_default().createElement(esm_Transition, (0,esm_extends/* default */.Z)({}, props, {
2874
- onEnter: this.onEnter,
2875
- onEntered: this.onEntered,
2876
- onEntering: this.onEntering,
2877
- onExit: this.onExit,
2878
- onExiting: this.onExiting,
2879
- onExited: this.onExited
2880
- }));
2880
+ return (
2881
+ /*#__PURE__*/
2882
+ // allows for nested Transitions
2883
+ external_react_default().createElement(TransitionGroupContext/* default.Provider */.Z.Provider, {
2884
+ value: null
2885
+ }, typeof children === 'function' ? children(status, childProps) : external_react_default().cloneElement(external_react_default().Children.only(children), childProps))
2886
+ );
2881
2887
  };
2882
2888
 
2883
- return CSSTransition;
2889
+ return Transition;
2884
2890
  }((external_react_default()).Component);
2885
2891
 
2886
- CSSTransition.defaultProps = {
2887
- classNames: ''
2892
+ Transition.contextType = TransitionGroupContext/* default */.Z;
2893
+ Transition.propTypes = false ? 0 : {}; // Name the function so it is clearer in the documentation
2894
+
2895
+ function noop() {}
2896
+
2897
+ Transition.defaultProps = {
2898
+ "in": false,
2899
+ mountOnEnter: false,
2900
+ unmountOnExit: false,
2901
+ appear: false,
2902
+ enter: true,
2903
+ exit: true,
2904
+ onEnter: noop,
2905
+ onEntering: noop,
2906
+ onEntered: noop,
2907
+ onExit: noop,
2908
+ onExiting: noop,
2909
+ onExited: noop
2888
2910
  };
2889
- CSSTransition.propTypes = false ? 0 : {};
2890
- /* harmony default export */ const esm_CSSTransition = (CSSTransition);
2911
+ Transition.UNMOUNTED = UNMOUNTED;
2912
+ Transition.EXITED = EXITED;
2913
+ Transition.ENTERING = ENTERING;
2914
+ Transition.ENTERED = ENTERED;
2915
+ Transition.EXITING = EXITING;
2916
+ /* harmony default export */ const esm_Transition = (Transition);
2891
2917
 
2892
2918
  /***/ }),
2893
2919
 
@@ -3261,7 +3287,7 @@ function _typeof(obj) {
3261
3287
  /******/ 8621: 0,
3262
3288
  /******/ 6419: 0,
3263
3289
  /******/ 6740: 0,
3264
- /******/ 563: 0
3290
+ /******/ 3813: 0
3265
3291
  /******/ };
3266
3292
  /******/
3267
3293
  /******/ // no chunk on demand loading
@@ -3311,7 +3337,7 @@ function _typeof(obj) {
3311
3337
  /******/ // startup
3312
3338
  /******/ // Load entry module and return exports
3313
3339
  /******/ // This entry module depends on other loaded chunks and execution need to be delayed
3314
- /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [563], () => (__webpack_require__(2434)))
3340
+ /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [3813], () => (__webpack_require__(2434)))
3315
3341
  /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
3316
3342
  /******/
3317
3343
  /******/ return __webpack_exports__;