@gravity-ui/navigation 2.28.0-beta.0 → 2.29.0

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 (196) hide show
  1. package/build/cjs/{ActionBar-CDm7idll.js → ActionBar-3c6cdf57.js} +12 -8
  2. package/build/cjs/{ActionBar-CDm7idll.js.map → ActionBar-3c6cdf57.js.map} +1 -1
  3. package/build/cjs/AsideFallback.js +16 -10
  4. package/build/cjs/AsideFallback.js.map +1 -1
  5. package/build/cjs/AsideHeader.js +20 -15
  6. package/build/cjs/AsideHeader.js.map +1 -1
  7. package/build/cjs/AsideHeaderContext.js +10 -4
  8. package/build/cjs/AsideHeaderContext.js.map +1 -1
  9. package/build/cjs/Content-64d5738a.js +20 -0
  10. package/build/cjs/{Content-Dy2XkiRi.js.map → Content-64d5738a.js.map} +1 -1
  11. package/build/cjs/Drawer.js +810 -107
  12. package/build/cjs/Drawer.js.map +1 -1
  13. package/build/cjs/{FooterItem-Bm1QrOs3.js → FooterItem-286094ab.js} +54 -50
  14. package/build/cjs/{FooterItem-Bm1QrOs3.js.map → FooterItem-286094ab.js.map} +1 -1
  15. package/build/cjs/FooterItem.js +13 -8
  16. package/build/cjs/FooterItem.js.map +1 -1
  17. package/build/cjs/{HotkeysPanel-DwaMkePp.js → HotkeysPanel-4b97825e.js} +16 -12
  18. package/build/cjs/{HotkeysPanel-DwaMkePp.js.map → HotkeysPanel-4b97825e.js.map} +1 -1
  19. package/build/cjs/{Item-C8T3eOCP.js → Item-122f7db4.js} +40 -36
  20. package/build/{esm/Item-CikAfZzN.js.map → cjs/Item-122f7db4.js.map} +1 -1
  21. package/build/cjs/PageLayout.js +18 -12
  22. package/build/cjs/PageLayout.js.map +1 -1
  23. package/build/cjs/{PageLayoutAside-BmldF8Ej.js → PageLayoutAside-e99bda93.js} +89 -84
  24. package/build/{esm/PageLayoutAside-BeTPkj8s.js.map → cjs/PageLayoutAside-e99bda93.js.map} +1 -1
  25. package/build/cjs/PageLayoutAside.js +10 -9
  26. package/build/cjs/PageLayoutAside.js.map +1 -1
  27. package/build/cjs/{Settings-BJ7TUzxJ.js → Settings-8dc2a8ee.js} +91 -99
  28. package/build/{esm/Settings-CDM4xCRf.js.map → cjs/Settings-8dc2a8ee.js.map} +1 -1
  29. package/build/cjs/{Title-CVR1mn8n.js → Title-54580605.js} +11 -7
  30. package/build/cjs/{Title-CVR1mn8n.js.map → Title-54580605.js.map} +1 -1
  31. package/build/cjs/{TopPanel-9Y0BQELX.js → TopPanel-c6b83157.js} +21 -18
  32. package/build/{esm/TopPanel-C4XpFXiG.js.map → cjs/TopPanel-c6b83157.js.map} +1 -1
  33. package/build/cjs/{cn-DSlPZbcs.js → cn-9933321a.js} +1 -1
  34. package/build/cjs/{cn-DSlPZbcs.js.map → cn-9933321a.js.map} +1 -1
  35. package/build/cjs/components/AsideHeader/types.d.ts +1 -0
  36. package/build/cjs/{constants-B0DLAQY9.js → constants-d81c3867.js} +1 -1
  37. package/build/cjs/{constants-B0DLAQY9.js.map → constants-d81c3867.js.map} +1 -1
  38. package/build/cjs/debounce-8772fd80.js +545 -0
  39. package/build/cjs/{debounce-RFF04eVR.js.map → debounce-8772fd80.js.map} +1 -1
  40. package/build/cjs/{divider-collapsed-BLSp99lJ.js → divider-collapsed-b743122e.js} +9 -7
  41. package/build/cjs/divider-collapsed-b743122e.js.map +1 -0
  42. package/build/cjs/index.js +191 -4
  43. package/build/cjs/index.js.map +1 -1
  44. package/build/cjs/index2.js +6 -7
  45. package/build/cjs/index2.js.map +1 -1
  46. package/build/cjs/index3.js +8 -8
  47. package/build/cjs/index4.js +9 -12
  48. package/build/cjs/index4.js.map +1 -1
  49. package/build/cjs/index5.js +12 -12
  50. package/build/cjs/index6.js +15 -186
  51. package/build/cjs/index6.js.map +1 -1
  52. package/build/cjs/{style-inject.es-XZHJH68X.js → style-inject.es-dcee06b6.js} +1 -1
  53. package/build/cjs/{style-inject.es-XZHJH68X.js.map → style-inject.es-dcee06b6.js.map} +1 -1
  54. package/build/cjs/{tslib.es6-DPGnagUB.js → tslib.es6-705c6589.js} +31 -33
  55. package/build/cjs/tslib.es6-705c6589.js.map +1 -0
  56. package/build/cjs/utils-db3e03c2.js +8 -0
  57. package/build/cjs/{utils-BrRoop7o.js.map → utils-db3e03c2.js.map} +1 -1
  58. package/build/esm/{ActionBar-DXY9YzI9.js → ActionBar-834b178a.js} +3 -3
  59. package/build/esm/{ActionBar-DXY9YzI9.js.map → ActionBar-834b178a.js.map} +1 -1
  60. package/build/esm/AsideFallback.js +5 -5
  61. package/build/esm/AsideFallback.js.map +1 -1
  62. package/build/esm/AsideHeader.js +10 -11
  63. package/build/esm/AsideHeader.js.map +1 -1
  64. package/build/esm/{Content-c3e3OunO.js → Content-f94ba85d.js} +1 -1
  65. package/build/esm/{Content-c3e3OunO.js.map → Content-f94ba85d.js.map} +1 -1
  66. package/build/esm/Drawer.js +770 -74
  67. package/build/esm/Drawer.js.map +1 -1
  68. package/build/esm/{FooterItem-DnunmgeX.js → FooterItem-2552f5a6.js} +4 -4
  69. package/build/esm/{FooterItem-DnunmgeX.js.map → FooterItem-2552f5a6.js.map} +1 -1
  70. package/build/esm/FooterItem.js +6 -7
  71. package/build/esm/FooterItem.js.map +1 -1
  72. package/build/esm/{HotkeysPanel-B8euxFsz.js → HotkeysPanel-cab8d5ab.js} +4 -4
  73. package/build/esm/{HotkeysPanel-B8euxFsz.js.map → HotkeysPanel-cab8d5ab.js.map} +1 -1
  74. package/build/esm/{Item-CikAfZzN.js → Item-e9769642.js} +6 -6
  75. package/build/{cjs/Item-C8T3eOCP.js.map → esm/Item-e9769642.js.map} +1 -1
  76. package/build/esm/PageLayout.js +6 -6
  77. package/build/esm/{PageLayoutAside-BeTPkj8s.js → PageLayoutAside-b12b91cd.js} +17 -16
  78. package/build/{cjs/PageLayoutAside-BmldF8Ej.js.map → esm/PageLayoutAside-b12b91cd.js.map} +1 -1
  79. package/build/esm/PageLayoutAside.js +8 -9
  80. package/build/esm/PageLayoutAside.js.map +1 -1
  81. package/build/esm/{Settings-CDM4xCRf.js → Settings-e660a4c5.js} +11 -23
  82. package/build/{cjs/Settings-BJ7TUzxJ.js.map → esm/Settings-e660a4c5.js.map} +1 -1
  83. package/build/esm/{Title-Ga3UB7On.js → Title-03b4255a.js} +3 -3
  84. package/build/esm/{Title-Ga3UB7On.js.map → Title-03b4255a.js.map} +1 -1
  85. package/build/esm/{TopPanel-C4XpFXiG.js → TopPanel-cd270f27.js} +5 -6
  86. package/build/{cjs/TopPanel-9Y0BQELX.js.map → esm/TopPanel-cd270f27.js.map} +1 -1
  87. package/build/esm/{cn-CgiqTV3v.js → cn-ffe5e9f5.js} +1 -1
  88. package/build/esm/{cn-CgiqTV3v.js.map → cn-ffe5e9f5.js.map} +1 -1
  89. package/build/esm/components/AsideHeader/types.d.ts +1 -0
  90. package/build/esm/{constants-ChYDZ5F2.js → constants-b1604ff5.js} +2 -2
  91. package/build/esm/{constants-ChYDZ5F2.js.map → constants-b1604ff5.js.map} +1 -1
  92. package/build/esm/debounce-64cd2b4c.js +543 -0
  93. package/build/esm/{debounce-DW3XyyUs.js.map → debounce-64cd2b4c.js.map} +1 -1
  94. package/build/esm/{divider-collapsed-BgKmR8h9.js → divider-collapsed-a0ef54c3.js} +5 -4
  95. package/build/esm/{divider-collapsed-BgKmR8h9.js.map → divider-collapsed-a0ef54c3.js.map} +1 -1
  96. package/build/esm/index.js +168 -4
  97. package/build/esm/index.js.map +1 -1
  98. package/build/esm/index2.js +3 -6
  99. package/build/esm/index2.js.map +1 -1
  100. package/build/esm/index3.js +5 -7
  101. package/build/esm/index3.js.map +1 -1
  102. package/build/esm/index4.js +6 -9
  103. package/build/esm/index4.js.map +1 -1
  104. package/build/esm/index5.js +7 -8
  105. package/build/esm/index5.js.map +1 -1
  106. package/build/esm/index6.js +9 -168
  107. package/build/esm/index6.js.map +1 -1
  108. package/build/esm/{style-inject.es-tgCJW-Cu.js → style-inject.es-1f59c1d0.js} +1 -1
  109. package/build/esm/{style-inject.es-tgCJW-Cu.js.map → style-inject.es-1f59c1d0.js.map} +1 -1
  110. package/build/esm/{tslib.es6-DG0QLwmL.js → tslib.es6-3cd4e99f.js} +31 -33
  111. package/build/esm/tslib.es6-3cd4e99f.js.map +1 -0
  112. package/build/esm/utils-117463a5.js +6 -0
  113. package/build/esm/{utils-D0s6YtvW.js.map → utils-117463a5.js.map} +1 -1
  114. package/package.json +6 -6
  115. package/build/cjs/Content-Dy2XkiRi.js +0 -16
  116. package/build/cjs/_commonjsHelpers-BJu3ubxk.js +0 -11
  117. package/build/cjs/_commonjsHelpers-BJu3ubxk.js.map +0 -1
  118. package/build/cjs/components/ActionBar/__stories__/ActionBar.stories.d.ts +0 -20
  119. package/build/cjs/components/ActionBar/__stories__/ActionBarShowcase.d.ts +0 -2
  120. package/build/cjs/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +0 -2
  121. package/build/cjs/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +0 -14
  122. package/build/cjs/components/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +0 -14
  123. package/build/cjs/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +0 -3
  124. package/build/cjs/components/AsideHeader/__stories__/moc.d.ts +0 -5
  125. package/build/cjs/components/Drawer/__stories__/DisablePortal.d.ts +0 -3
  126. package/build/cjs/components/Drawer/__stories__/Drawer.stories.d.ts +0 -6
  127. package/build/cjs/components/Drawer/__stories__/DrawerShowcase.d.ts +0 -3
  128. package/build/cjs/components/Drawer/__stories__/HideVeil.d.ts +0 -3
  129. package/build/cjs/components/Drawer/__stories__/ResizableItem.d.ts +0 -3
  130. package/build/cjs/components/Drawer/__stories__/moc.d.ts +0 -2
  131. package/build/cjs/components/Footer/desktop/__stories__/Footer.stories.d.ts +0 -6
  132. package/build/cjs/components/Footer/desktop/__stories__/FooterShowcase.d.ts +0 -4
  133. package/build/cjs/components/Footer/desktop/__stories__/moc.d.ts +0 -3
  134. package/build/cjs/components/Footer/mobile/__stories__/MobileFooter.stories.d.ts +0 -6
  135. package/build/cjs/components/Footer/mobile/__stories__/MobileFooterShowcase.d.ts +0 -4
  136. package/build/cjs/components/Footer/mobile/__stories__/moc.d.ts +0 -3
  137. package/build/cjs/components/FooterItem/__stories__/FooterItem.stories.d.ts +0 -5
  138. package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +0 -4
  139. package/build/cjs/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +0 -6
  140. package/build/cjs/components/HotkeysPanel/__stories__/moc.d.ts +0 -2
  141. package/build/cjs/components/Logo/__stories__/Logo.stories.d.ts +0 -8
  142. package/build/cjs/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +0 -5
  143. package/build/cjs/components/MobileHeader/BurgerMenu/__stories__/moc.d.ts +0 -2
  144. package/build/cjs/components/MobileHeader/OverlapPanel/__stories__/OverlapPanel.stories.d.ts +0 -5
  145. package/build/cjs/components/MobileHeader/OverlapPanel/__stories__/moc.d.ts +0 -2
  146. package/build/cjs/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +0 -3
  147. package/build/cjs/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +0 -3
  148. package/build/cjs/components/MobileHeader/__stories__/moc.d.ts +0 -1
  149. package/build/cjs/components/MobileLogo/__stories__/MobileLogo.stories.d.ts +0 -4
  150. package/build/cjs/components/Settings/__stories__/Settings.stories.d.ts +0 -4
  151. package/build/cjs/components/Settings/__stories__/SettingsDemo.d.ts +0 -14
  152. package/build/cjs/components/Settings/__stories__/SettingsMobileDemo.d.ts +0 -8
  153. package/build/cjs/debounce-RFF04eVR.js +0 -660
  154. package/build/cjs/divider-collapsed-BLSp99lJ.js.map +0 -1
  155. package/build/cjs/tslib.es6-DPGnagUB.js.map +0 -1
  156. package/build/cjs/utils-BrRoop7o.js +0 -8
  157. package/build/esm/_commonjsHelpers-BFTU3MAI.js +0 -8
  158. package/build/esm/_commonjsHelpers-BFTU3MAI.js.map +0 -1
  159. package/build/esm/components/ActionBar/__stories__/ActionBar.stories.d.ts +0 -20
  160. package/build/esm/components/ActionBar/__stories__/ActionBarShowcase.d.ts +0 -2
  161. package/build/esm/components/ActionBar/__stories__/ActionBarSingleSection.d.ts +0 -2
  162. package/build/esm/components/AsideHeader/__stories__/AsideHeader.stories.d.ts +0 -14
  163. package/build/esm/components/AsideHeader/__stories__/AsideHeaderShowcase.d.ts +0 -14
  164. package/build/esm/components/AsideHeader/__stories__/getAsideHeaderWrapper.d.ts +0 -3
  165. package/build/esm/components/AsideHeader/__stories__/moc.d.ts +0 -5
  166. package/build/esm/components/Drawer/__stories__/DisablePortal.d.ts +0 -3
  167. package/build/esm/components/Drawer/__stories__/Drawer.stories.d.ts +0 -6
  168. package/build/esm/components/Drawer/__stories__/DrawerShowcase.d.ts +0 -3
  169. package/build/esm/components/Drawer/__stories__/HideVeil.d.ts +0 -3
  170. package/build/esm/components/Drawer/__stories__/ResizableItem.d.ts +0 -3
  171. package/build/esm/components/Drawer/__stories__/moc.d.ts +0 -2
  172. package/build/esm/components/Footer/desktop/__stories__/Footer.stories.d.ts +0 -6
  173. package/build/esm/components/Footer/desktop/__stories__/FooterShowcase.d.ts +0 -4
  174. package/build/esm/components/Footer/desktop/__stories__/moc.d.ts +0 -3
  175. package/build/esm/components/Footer/mobile/__stories__/MobileFooter.stories.d.ts +0 -6
  176. package/build/esm/components/Footer/mobile/__stories__/MobileFooterShowcase.d.ts +0 -4
  177. package/build/esm/components/Footer/mobile/__stories__/moc.d.ts +0 -3
  178. package/build/esm/components/FooterItem/__stories__/FooterItem.stories.d.ts +0 -5
  179. package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanel.stories.d.ts +0 -4
  180. package/build/esm/components/HotkeysPanel/__stories__/HotkeysPanelShowcase.d.ts +0 -6
  181. package/build/esm/components/HotkeysPanel/__stories__/moc.d.ts +0 -2
  182. package/build/esm/components/Logo/__stories__/Logo.stories.d.ts +0 -8
  183. package/build/esm/components/MobileHeader/BurgerMenu/__stories__/BurgerMenu.stories.d.ts +0 -5
  184. package/build/esm/components/MobileHeader/BurgerMenu/__stories__/moc.d.ts +0 -2
  185. package/build/esm/components/MobileHeader/OverlapPanel/__stories__/OverlapPanel.stories.d.ts +0 -5
  186. package/build/esm/components/MobileHeader/OverlapPanel/__stories__/moc.d.ts +0 -2
  187. package/build/esm/components/MobileHeader/__stories__/MobileHeader.stories.d.ts +0 -3
  188. package/build/esm/components/MobileHeader/__stories__/MobileHeaderShowcase.d.ts +0 -3
  189. package/build/esm/components/MobileHeader/__stories__/moc.d.ts +0 -1
  190. package/build/esm/components/MobileLogo/__stories__/MobileLogo.stories.d.ts +0 -4
  191. package/build/esm/components/Settings/__stories__/Settings.stories.d.ts +0 -4
  192. package/build/esm/components/Settings/__stories__/SettingsDemo.d.ts +0 -14
  193. package/build/esm/components/Settings/__stories__/SettingsMobileDemo.d.ts +0 -8
  194. package/build/esm/debounce-DW3XyyUs.js +0 -658
  195. package/build/esm/tslib.es6-DG0QLwmL.js.map +0 -1
  196. package/build/esm/utils-D0s6YtvW.js +0 -6
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
- import React__default from 'react';
2
+ import React__default, { Children, isValidElement, cloneElement } from 'react';
3
3
  import { useForkRef, useBodyScrollLock, Portal } from '@gravity-ui/uikit';
4
- import { b as block } from './cn-CgiqTV3v.js';
5
- import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
6
- import { g as getDefaultExportFromCjs } from './_commonjsHelpers-BFTU3MAI.js';
7
4
  import ReactDOM from 'react-dom';
5
+ import { b as block } from './cn-ffe5e9f5.js';
6
+ import { s as styleInject } from './style-inject.es-1f59c1d0.js';
8
7
  import '@bem-react/classname';
9
8
 
10
9
  function _extends() {
@@ -260,12 +259,14 @@ var hasRequiredReactIs;
260
259
  function requireReactIs () {
261
260
  if (hasRequiredReactIs) return reactIs.exports;
262
261
  hasRequiredReactIs = 1;
262
+ (function (module) {
263
263
 
264
- if (process.env.NODE_ENV === 'production') {
265
- reactIs.exports = requireReactIs_production_min();
266
- } else {
267
- reactIs.exports = requireReactIs_development();
268
- }
264
+ if (process.env.NODE_ENV === 'production') {
265
+ module.exports = requireReactIs_production_min();
266
+ } else {
267
+ module.exports = requireReactIs_development();
268
+ }
269
+ } (reactIs));
269
270
  return reactIs.exports;
270
271
  }
271
272
 
@@ -414,9 +415,9 @@ function requireCheckPropTypes () {
414
415
  var printWarning = function() {};
415
416
 
416
417
  if (process.env.NODE_ENV !== 'production') {
417
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
418
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
418
419
  var loggedTypeFailures = {};
419
- var has = /*@__PURE__*/ requireHas();
420
+ var has = requireHas();
420
421
 
421
422
  printWarning = function(text) {
422
423
  var message = 'Warning: ' + text;
@@ -525,9 +526,9 @@ function requireFactoryWithTypeCheckers () {
525
526
  var ReactIs = requireReactIs();
526
527
  var assign = requireObjectAssign();
527
528
 
528
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
529
- var has = /*@__PURE__*/ requireHas();
530
- var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes();
529
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
530
+ var has = requireHas();
531
+ var checkPropTypes = requireCheckPropTypes();
531
532
 
532
533
  var printWarning = function() {};
533
534
 
@@ -1140,7 +1141,7 @@ function requireFactoryWithThrowingShims () {
1140
1141
  if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1141
1142
  hasRequiredFactoryWithThrowingShims = 1;
1142
1143
 
1143
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret();
1144
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1144
1145
 
1145
1146
  function emptyFunction() {}
1146
1147
  function emptyFunctionWithReset() {}
@@ -1204,29 +1205,19 @@ function requireFactoryWithThrowingShims () {
1204
1205
  * LICENSE file in the root directory of this source tree.
1205
1206
  */
1206
1207
 
1207
- var hasRequiredPropTypes;
1208
-
1209
- function requirePropTypes () {
1210
- if (hasRequiredPropTypes) return propTypes.exports;
1211
- hasRequiredPropTypes = 1;
1212
- if (process.env.NODE_ENV !== 'production') {
1213
- var ReactIs = requireReactIs();
1214
-
1215
- // By explicitly using `prop-types` you are opting into new development behavior.
1216
- // http://fb.me/prop-types-in-prod
1217
- var throwOnDirectAccess = true;
1218
- propTypes.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1219
- } else {
1220
- // By explicitly using `prop-types` you are opting into new production behavior.
1221
- // http://fb.me/prop-types-in-prod
1222
- propTypes.exports = /*@__PURE__*/ requireFactoryWithThrowingShims()();
1223
- }
1224
- return propTypes.exports;
1208
+ if (process.env.NODE_ENV !== 'production') {
1209
+ var ReactIs = requireReactIs();
1210
+
1211
+ // By explicitly using `prop-types` you are opting into new development behavior.
1212
+ // http://fb.me/prop-types-in-prod
1213
+ var throwOnDirectAccess = true;
1214
+ propTypes.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1215
+ } else {
1216
+ // By explicitly using `prop-types` you are opting into new production behavior.
1217
+ // http://fb.me/prop-types-in-prod
1218
+ propTypes.exports = requireFactoryWithThrowingShims()();
1225
1219
  }
1226
1220
 
1227
- var propTypesExports = /*@__PURE__*/ requirePropTypes();
1228
- var PropTypes = /*@__PURE__*/getDefaultExportFromCjs(propTypesExports);
1229
-
1230
1221
  /**
1231
1222
  * Checks if a given element has a CSS class.
1232
1223
  *
@@ -1274,22 +1265,22 @@ var config = {
1274
1265
  disabled: false
1275
1266
  };
1276
1267
 
1277
- var timeoutsShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
1278
- enter: PropTypes.number,
1279
- exit: PropTypes.number,
1280
- appear: PropTypes.number
1268
+ var timeoutsShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.number, propTypes.exports.shape({
1269
+ enter: propTypes.exports.number,
1270
+ exit: propTypes.exports.number,
1271
+ appear: propTypes.exports.number
1281
1272
  }).isRequired]) : null;
1282
- var classNamesShape = process.env.NODE_ENV !== 'production' ? PropTypes.oneOfType([PropTypes.string, PropTypes.shape({
1283
- enter: PropTypes.string,
1284
- exit: PropTypes.string,
1285
- active: PropTypes.string
1286
- }), PropTypes.shape({
1287
- enter: PropTypes.string,
1288
- enterDone: PropTypes.string,
1289
- enterActive: PropTypes.string,
1290
- exit: PropTypes.string,
1291
- exitDone: PropTypes.string,
1292
- exitActive: PropTypes.string
1273
+ var classNamesShape = process.env.NODE_ENV !== 'production' ? propTypes.exports.oneOfType([propTypes.exports.string, propTypes.exports.shape({
1274
+ enter: propTypes.exports.string,
1275
+ exit: propTypes.exports.string,
1276
+ active: propTypes.exports.string
1277
+ }), propTypes.exports.shape({
1278
+ enter: propTypes.exports.string,
1279
+ enterDone: propTypes.exports.string,
1280
+ enterActive: propTypes.exports.string,
1281
+ exit: propTypes.exports.string,
1282
+ exitDone: propTypes.exports.string,
1283
+ exitActive: propTypes.exports.string
1293
1284
  })]) : null;
1294
1285
 
1295
1286
  var TransitionGroupContext = React__default.createContext(null);
@@ -1716,10 +1707,10 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1716
1707
  * (see
1717
1708
  * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
1718
1709
  */
1719
- nodeRef: PropTypes.shape({
1720
- current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {
1710
+ nodeRef: propTypes.exports.shape({
1711
+ current: typeof Element === 'undefined' ? propTypes.exports.any : function (propValue, key, componentName, location, propFullName, secret) {
1721
1712
  var value = propValue[key];
1722
- return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
1713
+ return propTypes.exports.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);
1723
1714
  }
1724
1715
  }),
1725
1716
 
@@ -1737,12 +1728,12 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1737
1728
  * </Transition>
1738
1729
  * ```
1739
1730
  */
1740
- children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,
1731
+ children: propTypes.exports.oneOfType([propTypes.exports.func.isRequired, propTypes.exports.element.isRequired]).isRequired,
1741
1732
 
1742
1733
  /**
1743
1734
  * Show the component; triggers the enter or exit states
1744
1735
  */
1745
- in: PropTypes.bool,
1736
+ in: propTypes.exports.bool,
1746
1737
 
1747
1738
  /**
1748
1739
  * By default the child component is mounted immediately along with
@@ -1750,13 +1741,13 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1750
1741
  * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
1751
1742
  * mounted, even on "exited", unless you also specify `unmountOnExit`.
1752
1743
  */
1753
- mountOnEnter: PropTypes.bool,
1744
+ mountOnEnter: propTypes.exports.bool,
1754
1745
 
1755
1746
  /**
1756
1747
  * By default the child component stays mounted after it reaches the `'exited'` state.
1757
1748
  * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
1758
1749
  */
1759
- unmountOnExit: PropTypes.bool,
1750
+ unmountOnExit: propTypes.exports.bool,
1760
1751
 
1761
1752
  /**
1762
1753
  * By default the child component does not perform the enter transition when
@@ -1769,17 +1760,17 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1769
1760
  * > additional `.appear-*` classes, that way you can choose to style it
1770
1761
  * > differently.
1771
1762
  */
1772
- appear: PropTypes.bool,
1763
+ appear: propTypes.exports.bool,
1773
1764
 
1774
1765
  /**
1775
1766
  * Enable or disable enter transitions.
1776
1767
  */
1777
- enter: PropTypes.bool,
1768
+ enter: propTypes.exports.bool,
1778
1769
 
1779
1770
  /**
1780
1771
  * Enable or disable exit transitions.
1781
1772
  */
1782
- exit: PropTypes.bool,
1773
+ exit: propTypes.exports.bool,
1783
1774
 
1784
1775
  /**
1785
1776
  * The duration of the transition, in milliseconds.
@@ -1832,7 +1823,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1832
1823
  * }}
1833
1824
  * ```
1834
1825
  */
1835
- addEndListener: PropTypes.func,
1826
+ addEndListener: propTypes.exports.func,
1836
1827
 
1837
1828
  /**
1838
1829
  * Callback fired before the "entering" status is applied. An extra parameter
@@ -1842,7 +1833,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1842
1833
  *
1843
1834
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
1844
1835
  */
1845
- onEnter: PropTypes.func,
1836
+ onEnter: propTypes.exports.func,
1846
1837
 
1847
1838
  /**
1848
1839
  * Callback fired after the "entering" status is applied. An extra parameter
@@ -1852,7 +1843,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1852
1843
  *
1853
1844
  * @type Function(node: HtmlElement, isAppearing: bool)
1854
1845
  */
1855
- onEntering: PropTypes.func,
1846
+ onEntering: propTypes.exports.func,
1856
1847
 
1857
1848
  /**
1858
1849
  * Callback fired after the "entered" status is applied. An extra parameter
@@ -1862,7 +1853,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1862
1853
  *
1863
1854
  * @type Function(node: HtmlElement, isAppearing: bool) -> void
1864
1855
  */
1865
- onEntered: PropTypes.func,
1856
+ onEntered: propTypes.exports.func,
1866
1857
 
1867
1858
  /**
1868
1859
  * Callback fired before the "exiting" status is applied.
@@ -1871,7 +1862,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1871
1862
  *
1872
1863
  * @type Function(node: HtmlElement) -> void
1873
1864
  */
1874
- onExit: PropTypes.func,
1865
+ onExit: propTypes.exports.func,
1875
1866
 
1876
1867
  /**
1877
1868
  * Callback fired after the "exiting" status is applied.
@@ -1880,7 +1871,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1880
1871
  *
1881
1872
  * @type Function(node: HtmlElement) -> void
1882
1873
  */
1883
- onExiting: PropTypes.func,
1874
+ onExiting: propTypes.exports.func,
1884
1875
 
1885
1876
  /**
1886
1877
  * Callback fired after the "exited" status is applied.
@@ -1889,7 +1880,7 @@ Transition.propTypes = process.env.NODE_ENV !== "production" ? {
1889
1880
  *
1890
1881
  * @type Function(node: HtmlElement) -> void
1891
1882
  */
1892
- onExited: PropTypes.func
1883
+ onExited: propTypes.exports.func
1893
1884
  } : {}; // Name the function so it is clearer in the documentation
1894
1885
 
1895
1886
  function noop() {}
@@ -2263,7 +2254,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2263
2254
  *
2264
2255
  * @type Function(node: HtmlElement, isAppearing: bool)
2265
2256
  */
2266
- onEnter: PropTypes.func,
2257
+ onEnter: propTypes.exports.func,
2267
2258
 
2268
2259
  /**
2269
2260
  * A `<Transition>` callback fired immediately after the 'enter-active' or
@@ -2273,7 +2264,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2273
2264
  *
2274
2265
  * @type Function(node: HtmlElement, isAppearing: bool)
2275
2266
  */
2276
- onEntering: PropTypes.func,
2267
+ onEntering: propTypes.exports.func,
2277
2268
 
2278
2269
  /**
2279
2270
  * A `<Transition>` callback fired immediately after the 'enter' or
@@ -2283,7 +2274,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2283
2274
  *
2284
2275
  * @type Function(node: HtmlElement, isAppearing: bool)
2285
2276
  */
2286
- onEntered: PropTypes.func,
2277
+ onEntered: propTypes.exports.func,
2287
2278
 
2288
2279
  /**
2289
2280
  * A `<Transition>` callback fired immediately after the 'exit' class is
@@ -2293,7 +2284,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2293
2284
  *
2294
2285
  * @type Function(node: HtmlElement)
2295
2286
  */
2296
- onExit: PropTypes.func,
2287
+ onExit: propTypes.exports.func,
2297
2288
 
2298
2289
  /**
2299
2290
  * A `<Transition>` callback fired immediately after the 'exit-active' is applied.
@@ -2302,7 +2293,7 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2302
2293
  *
2303
2294
  * @type Function(node: HtmlElement)
2304
2295
  */
2305
- onExiting: PropTypes.func,
2296
+ onExiting: propTypes.exports.func,
2306
2297
 
2307
2298
  /**
2308
2299
  * A `<Transition>` callback fired immediately after the 'exit' classes
@@ -2312,9 +2303,714 @@ CSSTransition.propTypes = process.env.NODE_ENV !== "production" ? _extends({}, T
2312
2303
  *
2313
2304
  * @type Function(node: HtmlElement)
2314
2305
  */
2315
- onExited: PropTypes.func
2306
+ onExited: propTypes.exports.func
2316
2307
  }) : {};
2317
2308
 
2309
+ function _assertThisInitialized(e) {
2310
+ if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
2311
+ return e;
2312
+ }
2313
+
2314
+ /**
2315
+ * Given `this.props.children`, return an object mapping key to child.
2316
+ *
2317
+ * @param {*} children `this.props.children`
2318
+ * @return {object} Mapping of key to child
2319
+ */
2320
+
2321
+ function getChildMapping(children, mapFn) {
2322
+ var mapper = function mapper(child) {
2323
+ return mapFn && isValidElement(child) ? mapFn(child) : child;
2324
+ };
2325
+
2326
+ var result = Object.create(null);
2327
+ if (children) Children.map(children, function (c) {
2328
+ return c;
2329
+ }).forEach(function (child) {
2330
+ // run the map function here instead so that the key is the computed one
2331
+ result[child.key] = mapper(child);
2332
+ });
2333
+ return result;
2334
+ }
2335
+ /**
2336
+ * When you're adding or removing children some may be added or removed in the
2337
+ * same render pass. We want to show *both* since we want to simultaneously
2338
+ * animate elements in and out. This function takes a previous set of keys
2339
+ * and a new set of keys and merges them with its best guess of the correct
2340
+ * ordering. In the future we may expose some of the utilities in
2341
+ * ReactMultiChild to make this easy, but for now React itself does not
2342
+ * directly have this concept of the union of prevChildren and nextChildren
2343
+ * so we implement it here.
2344
+ *
2345
+ * @param {object} prev prev children as returned from
2346
+ * `ReactTransitionChildMapping.getChildMapping()`.
2347
+ * @param {object} next next children as returned from
2348
+ * `ReactTransitionChildMapping.getChildMapping()`.
2349
+ * @return {object} a key set that contains all keys in `prev` and all keys
2350
+ * in `next` in a reasonable order.
2351
+ */
2352
+
2353
+ function mergeChildMappings(prev, next) {
2354
+ prev = prev || {};
2355
+ next = next || {};
2356
+
2357
+ function getValueForKey(key) {
2358
+ return key in next ? next[key] : prev[key];
2359
+ } // For each key of `next`, the list of keys to insert before that key in
2360
+ // the combined list
2361
+
2362
+
2363
+ var nextKeysPending = Object.create(null);
2364
+ var pendingKeys = [];
2365
+
2366
+ for (var prevKey in prev) {
2367
+ if (prevKey in next) {
2368
+ if (pendingKeys.length) {
2369
+ nextKeysPending[prevKey] = pendingKeys;
2370
+ pendingKeys = [];
2371
+ }
2372
+ } else {
2373
+ pendingKeys.push(prevKey);
2374
+ }
2375
+ }
2376
+
2377
+ var i;
2378
+ var childMapping = {};
2379
+
2380
+ for (var nextKey in next) {
2381
+ if (nextKeysPending[nextKey]) {
2382
+ for (i = 0; i < nextKeysPending[nextKey].length; i++) {
2383
+ var pendingNextKey = nextKeysPending[nextKey][i];
2384
+ childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
2385
+ }
2386
+ }
2387
+
2388
+ childMapping[nextKey] = getValueForKey(nextKey);
2389
+ } // Finally, add the keys which didn't appear before any key in `next`
2390
+
2391
+
2392
+ for (i = 0; i < pendingKeys.length; i++) {
2393
+ childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
2394
+ }
2395
+
2396
+ return childMapping;
2397
+ }
2398
+
2399
+ function getProp(child, prop, props) {
2400
+ return props[prop] != null ? props[prop] : child.props[prop];
2401
+ }
2402
+
2403
+ function getInitialChildMapping(props, onExited) {
2404
+ return getChildMapping(props.children, function (child) {
2405
+ return cloneElement(child, {
2406
+ onExited: onExited.bind(null, child),
2407
+ in: true,
2408
+ appear: getProp(child, 'appear', props),
2409
+ enter: getProp(child, 'enter', props),
2410
+ exit: getProp(child, 'exit', props)
2411
+ });
2412
+ });
2413
+ }
2414
+ function getNextChildMapping(nextProps, prevChildMapping, onExited) {
2415
+ var nextChildMapping = getChildMapping(nextProps.children);
2416
+ var children = mergeChildMappings(prevChildMapping, nextChildMapping);
2417
+ Object.keys(children).forEach(function (key) {
2418
+ var child = children[key];
2419
+ if (!isValidElement(child)) return;
2420
+ var hasPrev = (key in prevChildMapping);
2421
+ var hasNext = (key in nextChildMapping);
2422
+ var prevChild = prevChildMapping[key];
2423
+ var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)
2424
+
2425
+ if (hasNext && (!hasPrev || isLeaving)) {
2426
+ // console.log('entering', key)
2427
+ children[key] = cloneElement(child, {
2428
+ onExited: onExited.bind(null, child),
2429
+ in: true,
2430
+ exit: getProp(child, 'exit', nextProps),
2431
+ enter: getProp(child, 'enter', nextProps)
2432
+ });
2433
+ } else if (!hasNext && hasPrev && !isLeaving) {
2434
+ // item is old (exiting)
2435
+ // console.log('leaving', key)
2436
+ children[key] = cloneElement(child, {
2437
+ in: false
2438
+ });
2439
+ } else if (hasNext && hasPrev && isValidElement(prevChild)) {
2440
+ // item hasn't changed transition states
2441
+ // copy over the last transition props;
2442
+ // console.log('unchanged', key)
2443
+ children[key] = cloneElement(child, {
2444
+ onExited: onExited.bind(null, child),
2445
+ in: prevChild.props.in,
2446
+ exit: getProp(child, 'exit', nextProps),
2447
+ enter: getProp(child, 'enter', nextProps)
2448
+ });
2449
+ }
2450
+ });
2451
+ return children;
2452
+ }
2453
+
2454
+ var values = Object.values || function (obj) {
2455
+ return Object.keys(obj).map(function (k) {
2456
+ return obj[k];
2457
+ });
2458
+ };
2459
+
2460
+ var defaultProps = {
2461
+ component: 'div',
2462
+ childFactory: function childFactory(child) {
2463
+ return child;
2464
+ }
2465
+ };
2466
+ /**
2467
+ * The `<TransitionGroup>` component manages a set of transition components
2468
+ * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition
2469
+ * components, `<TransitionGroup>` is a state machine for managing the mounting
2470
+ * and unmounting of components over time.
2471
+ *
2472
+ * Consider the example below. As items are removed or added to the TodoList the
2473
+ * `in` prop is toggled automatically by the `<TransitionGroup>`.
2474
+ *
2475
+ * Note that `<TransitionGroup>` does not define any animation behavior!
2476
+ * Exactly _how_ a list item animates is up to the individual transition
2477
+ * component. This means you can mix and match animations across different list
2478
+ * items.
2479
+ */
2480
+
2481
+ var TransitionGroup = /*#__PURE__*/function (_React$Component) {
2482
+ _inheritsLoose(TransitionGroup, _React$Component);
2483
+
2484
+ function TransitionGroup(props, context) {
2485
+ var _this;
2486
+
2487
+ _this = _React$Component.call(this, props, context) || this;
2488
+
2489
+ var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear
2490
+
2491
+
2492
+ _this.state = {
2493
+ contextValue: {
2494
+ isMounting: true
2495
+ },
2496
+ handleExited: handleExited,
2497
+ firstRender: true
2498
+ };
2499
+ return _this;
2500
+ }
2501
+
2502
+ var _proto = TransitionGroup.prototype;
2503
+
2504
+ _proto.componentDidMount = function componentDidMount() {
2505
+ this.mounted = true;
2506
+ this.setState({
2507
+ contextValue: {
2508
+ isMounting: false
2509
+ }
2510
+ });
2511
+ };
2512
+
2513
+ _proto.componentWillUnmount = function componentWillUnmount() {
2514
+ this.mounted = false;
2515
+ };
2516
+
2517
+ TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
2518
+ var prevChildMapping = _ref.children,
2519
+ handleExited = _ref.handleExited,
2520
+ firstRender = _ref.firstRender;
2521
+ return {
2522
+ children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
2523
+ firstRender: false
2524
+ };
2525
+ } // node is `undefined` when user provided `nodeRef` prop
2526
+ ;
2527
+
2528
+ _proto.handleExited = function handleExited(child, node) {
2529
+ var currentChildMapping = getChildMapping(this.props.children);
2530
+ if (child.key in currentChildMapping) return;
2531
+
2532
+ if (child.props.onExited) {
2533
+ child.props.onExited(node);
2534
+ }
2535
+
2536
+ if (this.mounted) {
2537
+ this.setState(function (state) {
2538
+ var children = _extends({}, state.children);
2539
+
2540
+ delete children[child.key];
2541
+ return {
2542
+ children: children
2543
+ };
2544
+ });
2545
+ }
2546
+ };
2547
+
2548
+ _proto.render = function render() {
2549
+ var _this$props = this.props,
2550
+ Component = _this$props.component,
2551
+ childFactory = _this$props.childFactory,
2552
+ props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
2553
+
2554
+ var contextValue = this.state.contextValue;
2555
+ var children = values(this.state.children).map(childFactory);
2556
+ delete props.appear;
2557
+ delete props.enter;
2558
+ delete props.exit;
2559
+
2560
+ if (Component === null) {
2561
+ return /*#__PURE__*/React__default.createElement(TransitionGroupContext.Provider, {
2562
+ value: contextValue
2563
+ }, children);
2564
+ }
2565
+
2566
+ return /*#__PURE__*/React__default.createElement(TransitionGroupContext.Provider, {
2567
+ value: contextValue
2568
+ }, /*#__PURE__*/React__default.createElement(Component, props, children));
2569
+ };
2570
+
2571
+ return TransitionGroup;
2572
+ }(React__default.Component);
2573
+
2574
+ TransitionGroup.propTypes = process.env.NODE_ENV !== "production" ? {
2575
+ /**
2576
+ * `<TransitionGroup>` renders a `<div>` by default. You can change this
2577
+ * behavior by providing a `component` prop.
2578
+ * If you use React v16+ and would like to avoid a wrapping `<div>` element
2579
+ * you can pass in `component={null}`. This is useful if the wrapping div
2580
+ * borks your css styles.
2581
+ */
2582
+ component: propTypes.exports.any,
2583
+
2584
+ /**
2585
+ * A set of `<Transition>` components, that are toggled `in` and out as they
2586
+ * leave. the `<TransitionGroup>` will inject specific transition props, so
2587
+ * remember to spread them through if you are wrapping the `<Transition>` as
2588
+ * with our `<Fade>` example.
2589
+ *
2590
+ * While this component is meant for multiple `Transition` or `CSSTransition`
2591
+ * children, sometimes you may want to have a single transition child with
2592
+ * content that you want to be transitioned out and in when you change it
2593
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
2594
+ * the transition child as you change its content, this will cause
2595
+ * `TransitionGroup` to transition the child out and back in.
2596
+ */
2597
+ children: propTypes.exports.node,
2598
+
2599
+ /**
2600
+ * A convenience prop that enables or disables appear animations
2601
+ * for all children. Note that specifying this will override any defaults set
2602
+ * on individual children Transitions.
2603
+ */
2604
+ appear: propTypes.exports.bool,
2605
+
2606
+ /**
2607
+ * A convenience prop that enables or disables enter animations
2608
+ * for all children. Note that specifying this will override any defaults set
2609
+ * on individual children Transitions.
2610
+ */
2611
+ enter: propTypes.exports.bool,
2612
+
2613
+ /**
2614
+ * A convenience prop that enables or disables exit animations
2615
+ * for all children. Note that specifying this will override any defaults set
2616
+ * on individual children Transitions.
2617
+ */
2618
+ exit: propTypes.exports.bool,
2619
+
2620
+ /**
2621
+ * You may need to apply reactive updates to a child as it is exiting.
2622
+ * This is generally done by using `cloneElement` however in the case of an exiting
2623
+ * child the element has already been removed and not accessible to the consumer.
2624
+ *
2625
+ * If you do need to update a child as it leaves you can provide a `childFactory`
2626
+ * to wrap every child, even the ones that are leaving.
2627
+ *
2628
+ * @type Function(child: ReactElement) -> ReactElement
2629
+ */
2630
+ childFactory: propTypes.exports.func
2631
+ } : {};
2632
+ TransitionGroup.defaultProps = defaultProps;
2633
+
2634
+ /**
2635
+ * The `<ReplaceTransition>` component is a specialized `Transition` component
2636
+ * that animates between two children.
2637
+ *
2638
+ * ```jsx
2639
+ * <ReplaceTransition in>
2640
+ * <Fade><div>I appear first</div></Fade>
2641
+ * <Fade><div>I replace the above</div></Fade>
2642
+ * </ReplaceTransition>
2643
+ * ```
2644
+ */
2645
+
2646
+ var ReplaceTransition = /*#__PURE__*/function (_React$Component) {
2647
+ _inheritsLoose(ReplaceTransition, _React$Component);
2648
+
2649
+ function ReplaceTransition() {
2650
+ var _this;
2651
+
2652
+ for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
2653
+ _args[_key] = arguments[_key];
2654
+ }
2655
+
2656
+ _this = _React$Component.call.apply(_React$Component, [this].concat(_args)) || this;
2657
+
2658
+ _this.handleEnter = function () {
2659
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2660
+ args[_key2] = arguments[_key2];
2661
+ }
2662
+
2663
+ return _this.handleLifecycle('onEnter', 0, args);
2664
+ };
2665
+
2666
+ _this.handleEntering = function () {
2667
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2668
+ args[_key3] = arguments[_key3];
2669
+ }
2670
+
2671
+ return _this.handleLifecycle('onEntering', 0, args);
2672
+ };
2673
+
2674
+ _this.handleEntered = function () {
2675
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2676
+ args[_key4] = arguments[_key4];
2677
+ }
2678
+
2679
+ return _this.handleLifecycle('onEntered', 0, args);
2680
+ };
2681
+
2682
+ _this.handleExit = function () {
2683
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
2684
+ args[_key5] = arguments[_key5];
2685
+ }
2686
+
2687
+ return _this.handleLifecycle('onExit', 1, args);
2688
+ };
2689
+
2690
+ _this.handleExiting = function () {
2691
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
2692
+ args[_key6] = arguments[_key6];
2693
+ }
2694
+
2695
+ return _this.handleLifecycle('onExiting', 1, args);
2696
+ };
2697
+
2698
+ _this.handleExited = function () {
2699
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
2700
+ args[_key7] = arguments[_key7];
2701
+ }
2702
+
2703
+ return _this.handleLifecycle('onExited', 1, args);
2704
+ };
2705
+
2706
+ return _this;
2707
+ }
2708
+
2709
+ var _proto = ReplaceTransition.prototype;
2710
+
2711
+ _proto.handleLifecycle = function handleLifecycle(handler, idx, originalArgs) {
2712
+ var _child$props;
2713
+
2714
+ var children = this.props.children;
2715
+ var child = React__default.Children.toArray(children)[idx];
2716
+ if (child.props[handler]) (_child$props = child.props)[handler].apply(_child$props, originalArgs);
2717
+
2718
+ if (this.props[handler]) {
2719
+ var maybeNode = child.props.nodeRef ? undefined : ReactDOM.findDOMNode(this);
2720
+ this.props[handler](maybeNode);
2721
+ }
2722
+ };
2723
+
2724
+ _proto.render = function render() {
2725
+ var _this$props = this.props,
2726
+ children = _this$props.children,
2727
+ inProp = _this$props.in,
2728
+ props = _objectWithoutPropertiesLoose(_this$props, ["children", "in"]);
2729
+
2730
+ var _React$Children$toArr = React__default.Children.toArray(children),
2731
+ first = _React$Children$toArr[0],
2732
+ second = _React$Children$toArr[1];
2733
+
2734
+ delete props.onEnter;
2735
+ delete props.onEntering;
2736
+ delete props.onEntered;
2737
+ delete props.onExit;
2738
+ delete props.onExiting;
2739
+ delete props.onExited;
2740
+ return /*#__PURE__*/React__default.createElement(TransitionGroup, props, inProp ? React__default.cloneElement(first, {
2741
+ key: 'first',
2742
+ onEnter: this.handleEnter,
2743
+ onEntering: this.handleEntering,
2744
+ onEntered: this.handleEntered
2745
+ }) : React__default.cloneElement(second, {
2746
+ key: 'second',
2747
+ onEnter: this.handleExit,
2748
+ onEntering: this.handleExiting,
2749
+ onEntered: this.handleExited
2750
+ }));
2751
+ };
2752
+
2753
+ return ReplaceTransition;
2754
+ }(React__default.Component);
2755
+
2756
+ ReplaceTransition.propTypes = process.env.NODE_ENV !== "production" ? {
2757
+ in: propTypes.exports.bool.isRequired,
2758
+ children: function children(props, propName) {
2759
+ if (React__default.Children.count(props[propName]) !== 2) return new Error("\"" + propName + "\" must be exactly two transition components.");
2760
+ return null;
2761
+ }
2762
+ } : {};
2763
+
2764
+ var _leaveRenders, _enterRenders;
2765
+
2766
+ function areChildrenDifferent(oldChildren, newChildren) {
2767
+ if (oldChildren === newChildren) return false;
2768
+
2769
+ if (React__default.isValidElement(oldChildren) && React__default.isValidElement(newChildren) && oldChildren.key != null && oldChildren.key === newChildren.key) {
2770
+ return false;
2771
+ }
2772
+
2773
+ return true;
2774
+ }
2775
+ /**
2776
+ * Enum of modes for SwitchTransition component
2777
+ * @enum { string }
2778
+ */
2779
+
2780
+
2781
+ var modes = {
2782
+ out: 'out-in',
2783
+ in: 'in-out'
2784
+ };
2785
+
2786
+ var callHook = function callHook(element, name, cb) {
2787
+ return function () {
2788
+ var _element$props;
2789
+
2790
+ element.props[name] && (_element$props = element.props)[name].apply(_element$props, arguments);
2791
+ cb();
2792
+ };
2793
+ };
2794
+
2795
+ var leaveRenders = (_leaveRenders = {}, _leaveRenders[modes.out] = function (_ref) {
2796
+ var current = _ref.current,
2797
+ changeState = _ref.changeState;
2798
+ return React__default.cloneElement(current, {
2799
+ in: false,
2800
+ onExited: callHook(current, 'onExited', function () {
2801
+ changeState(ENTERING, null);
2802
+ })
2803
+ });
2804
+ }, _leaveRenders[modes.in] = function (_ref2) {
2805
+ var current = _ref2.current,
2806
+ changeState = _ref2.changeState,
2807
+ children = _ref2.children;
2808
+ return [current, React__default.cloneElement(children, {
2809
+ in: true,
2810
+ onEntered: callHook(children, 'onEntered', function () {
2811
+ changeState(ENTERING);
2812
+ })
2813
+ })];
2814
+ }, _leaveRenders);
2815
+ var enterRenders = (_enterRenders = {}, _enterRenders[modes.out] = function (_ref3) {
2816
+ var children = _ref3.children,
2817
+ changeState = _ref3.changeState;
2818
+ return React__default.cloneElement(children, {
2819
+ in: true,
2820
+ onEntered: callHook(children, 'onEntered', function () {
2821
+ changeState(ENTERED, React__default.cloneElement(children, {
2822
+ in: true
2823
+ }));
2824
+ })
2825
+ });
2826
+ }, _enterRenders[modes.in] = function (_ref4) {
2827
+ var current = _ref4.current,
2828
+ children = _ref4.children,
2829
+ changeState = _ref4.changeState;
2830
+ return [React__default.cloneElement(current, {
2831
+ in: false,
2832
+ onExited: callHook(current, 'onExited', function () {
2833
+ changeState(ENTERED, React__default.cloneElement(children, {
2834
+ in: true
2835
+ }));
2836
+ })
2837
+ }), React__default.cloneElement(children, {
2838
+ in: true
2839
+ })];
2840
+ }, _enterRenders);
2841
+ /**
2842
+ * A transition component inspired by the [vue transition modes](https://vuejs.org/v2/guide/transitions.html#Transition-Modes).
2843
+ * You can use it when you want to control the render between state transitions.
2844
+ * Based on the selected mode and the child's key which is the `Transition` or `CSSTransition` component, the `SwitchTransition` makes a consistent transition between them.
2845
+ *
2846
+ * If the `out-in` mode is selected, the `SwitchTransition` waits until the old child leaves and then inserts a new child.
2847
+ * If the `in-out` mode is selected, the `SwitchTransition` inserts a new child first, waits for the new child to enter and then removes the old child.
2848
+ *
2849
+ * **Note**: If you want the animation to happen simultaneously
2850
+ * (that is, to have the old child removed and a new child inserted **at the same time**),
2851
+ * you should use
2852
+ * [`TransitionGroup`](https://reactcommunity.org/react-transition-group/transition-group)
2853
+ * instead.
2854
+ *
2855
+ * ```jsx
2856
+ * function App() {
2857
+ * const [state, setState] = useState(false);
2858
+ * return (
2859
+ * <SwitchTransition>
2860
+ * <CSSTransition
2861
+ * key={state ? "Goodbye, world!" : "Hello, world!"}
2862
+ * addEndListener={(node, done) => node.addEventListener("transitionend", done, false)}
2863
+ * classNames='fade'
2864
+ * >
2865
+ * <button onClick={() => setState(state => !state)}>
2866
+ * {state ? "Goodbye, world!" : "Hello, world!"}
2867
+ * </button>
2868
+ * </CSSTransition>
2869
+ * </SwitchTransition>
2870
+ * );
2871
+ * }
2872
+ * ```
2873
+ *
2874
+ * ```css
2875
+ * .fade-enter{
2876
+ * opacity: 0;
2877
+ * }
2878
+ * .fade-exit{
2879
+ * opacity: 1;
2880
+ * }
2881
+ * .fade-enter-active{
2882
+ * opacity: 1;
2883
+ * }
2884
+ * .fade-exit-active{
2885
+ * opacity: 0;
2886
+ * }
2887
+ * .fade-enter-active,
2888
+ * .fade-exit-active{
2889
+ * transition: opacity 500ms;
2890
+ * }
2891
+ * ```
2892
+ */
2893
+
2894
+ var SwitchTransition = /*#__PURE__*/function (_React$Component) {
2895
+ _inheritsLoose(SwitchTransition, _React$Component);
2896
+
2897
+ function SwitchTransition() {
2898
+ var _this;
2899
+
2900
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2901
+ args[_key] = arguments[_key];
2902
+ }
2903
+
2904
+ _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
2905
+ _this.state = {
2906
+ status: ENTERED,
2907
+ current: null
2908
+ };
2909
+ _this.appeared = false;
2910
+
2911
+ _this.changeState = function (status, current) {
2912
+ if (current === void 0) {
2913
+ current = _this.state.current;
2914
+ }
2915
+
2916
+ _this.setState({
2917
+ status: status,
2918
+ current: current
2919
+ });
2920
+ };
2921
+
2922
+ return _this;
2923
+ }
2924
+
2925
+ var _proto = SwitchTransition.prototype;
2926
+
2927
+ _proto.componentDidMount = function componentDidMount() {
2928
+ this.appeared = true;
2929
+ };
2930
+
2931
+ SwitchTransition.getDerivedStateFromProps = function getDerivedStateFromProps(props, state) {
2932
+ if (props.children == null) {
2933
+ return {
2934
+ current: null
2935
+ };
2936
+ }
2937
+
2938
+ if (state.status === ENTERING && props.mode === modes.in) {
2939
+ return {
2940
+ status: ENTERING
2941
+ };
2942
+ }
2943
+
2944
+ if (state.current && areChildrenDifferent(state.current, props.children)) {
2945
+ return {
2946
+ status: EXITING
2947
+ };
2948
+ }
2949
+
2950
+ return {
2951
+ current: React__default.cloneElement(props.children, {
2952
+ in: true
2953
+ })
2954
+ };
2955
+ };
2956
+
2957
+ _proto.render = function render() {
2958
+ var _this$props = this.props,
2959
+ children = _this$props.children,
2960
+ mode = _this$props.mode,
2961
+ _this$state = this.state,
2962
+ status = _this$state.status,
2963
+ current = _this$state.current;
2964
+ var data = {
2965
+ children: children,
2966
+ current: current,
2967
+ changeState: this.changeState,
2968
+ status: status
2969
+ };
2970
+ var component;
2971
+
2972
+ switch (status) {
2973
+ case ENTERING:
2974
+ component = enterRenders[mode](data);
2975
+ break;
2976
+
2977
+ case EXITING:
2978
+ component = leaveRenders[mode](data);
2979
+ break;
2980
+
2981
+ case ENTERED:
2982
+ component = current;
2983
+ }
2984
+
2985
+ return /*#__PURE__*/React__default.createElement(TransitionGroupContext.Provider, {
2986
+ value: {
2987
+ isMounting: !this.appeared
2988
+ }
2989
+ }, component);
2990
+ };
2991
+
2992
+ return SwitchTransition;
2993
+ }(React__default.Component);
2994
+
2995
+ SwitchTransition.propTypes = process.env.NODE_ENV !== "production" ? {
2996
+ /**
2997
+ * Transition modes.
2998
+ * `out-in`: Current element transitions out first, then when complete, the new element transitions in.
2999
+ * `in-out`: New element transitions in first, then when complete, the current element transitions out.
3000
+ *
3001
+ * @type {'out-in'|'in-out'}
3002
+ */
3003
+ mode: propTypes.exports.oneOf([modes.in, modes.out]),
3004
+
3005
+ /**
3006
+ * Any `Transition` or `CSSTransition` component.
3007
+ */
3008
+ children: propTypes.exports.oneOfType([propTypes.exports.element.isRequired])
3009
+ } : {};
3010
+ SwitchTransition.defaultProps = {
3011
+ mode: modes.out
3012
+ };
3013
+
2318
3014
  const DRAWER_ITEM_MIN_RESIZE_WIDTH = 200;
2319
3015
  const DRAWER_ITEM_MAX_RESIZE_WIDTH = 800;
2320
3016
  const DRAWER_ITEM_INITIAL_RESIZE_WIDTH = 400;