@react-navigation/drawer 7.0.0-rc.9 → 7.0.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 (149) hide show
  1. package/lib/commonjs/index.js +10 -10
  2. package/lib/commonjs/navigators/createDrawerNavigator.js +11 -11
  3. package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
  4. package/lib/commonjs/package.json +1 -0
  5. package/lib/commonjs/utils/useDrawerStatus.js +1 -1
  6. package/lib/commonjs/views/DrawerContent.js +12 -12
  7. package/lib/commonjs/views/DrawerContent.js.map +1 -1
  8. package/lib/commonjs/views/DrawerContentScrollView.js +7 -5
  9. package/lib/commonjs/views/DrawerContentScrollView.js.map +1 -1
  10. package/lib/commonjs/views/DrawerItem.js +45 -37
  11. package/lib/commonjs/views/DrawerItem.js.map +1 -1
  12. package/lib/commonjs/views/DrawerItemList.js +4 -4
  13. package/lib/commonjs/views/DrawerItemList.js.map +1 -1
  14. package/lib/commonjs/views/DrawerToggleButton.js +14 -13
  15. package/lib/commonjs/views/DrawerToggleButton.js.map +1 -1
  16. package/lib/commonjs/views/DrawerView.js +127 -113
  17. package/lib/commonjs/views/DrawerView.js.map +1 -1
  18. package/lib/commonjs/views/ScreenFallback.js +18 -11
  19. package/lib/commonjs/views/ScreenFallback.js.map +1 -1
  20. package/lib/module/index.js +12 -10
  21. package/lib/module/index.js.map +1 -1
  22. package/lib/module/navigators/createDrawerNavigator.js +13 -9
  23. package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
  24. package/lib/module/package.json +1 -0
  25. package/lib/module/types.js +2 -0
  26. package/lib/module/utils/DrawerPositionContext.js +2 -0
  27. package/lib/module/utils/DrawerPositionContext.js.map +1 -1
  28. package/lib/module/utils/DrawerStatusContext.js +2 -0
  29. package/lib/module/utils/DrawerStatusContext.js.map +1 -1
  30. package/lib/module/utils/addCancelListener.js +2 -0
  31. package/lib/module/utils/addCancelListener.js.map +1 -1
  32. package/lib/module/utils/addCancelListener.native.js +2 -0
  33. package/lib/module/utils/addCancelListener.native.js.map +1 -1
  34. package/lib/module/utils/getDrawerStatusFromState.js +2 -0
  35. package/lib/module/utils/getDrawerStatusFromState.js.map +1 -1
  36. package/lib/module/utils/useDrawerStatus.js +3 -1
  37. package/lib/module/utils/useDrawerStatus.js.map +1 -1
  38. package/lib/module/views/DrawerContent.js +14 -10
  39. package/lib/module/views/DrawerContent.js.map +1 -1
  40. package/lib/module/views/DrawerContentScrollView.js +9 -5
  41. package/lib/module/views/DrawerContentScrollView.js.map +1 -1
  42. package/lib/module/views/DrawerItem.js +47 -37
  43. package/lib/module/views/DrawerItem.js.map +1 -1
  44. package/lib/module/views/DrawerItemList.js +6 -4
  45. package/lib/module/views/DrawerItemList.js.map +1 -1
  46. package/lib/module/views/DrawerToggleButton.js +15 -11
  47. package/lib/module/views/DrawerToggleButton.js.map +1 -1
  48. package/lib/module/views/DrawerView.js +129 -113
  49. package/lib/module/views/DrawerView.js.map +1 -1
  50. package/lib/module/views/ScreenFallback.js +20 -11
  51. package/lib/module/views/ScreenFallback.js.map +1 -1
  52. package/lib/typescript/commonjs/package.json +1 -0
  53. package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
  54. package/lib/typescript/{src → commonjs/src}/navigators/createDrawerNavigator.d.ts +3 -4
  55. package/lib/typescript/commonjs/src/navigators/createDrawerNavigator.d.ts.map +1 -0
  56. package/lib/typescript/{src → commonjs/src}/types.d.ts +1 -1
  57. package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
  58. package/lib/typescript/commonjs/src/utils/DrawerPositionContext.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/src/utils/DrawerStatusContext.d.ts.map +1 -0
  60. package/lib/typescript/commonjs/src/utils/addCancelListener.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/src/utils/addCancelListener.native.d.ts.map +1 -0
  62. package/lib/typescript/commonjs/src/utils/getDrawerStatusFromState.d.ts.map +1 -0
  63. package/lib/typescript/commonjs/src/utils/useDrawerStatus.d.ts.map +1 -0
  64. package/lib/typescript/commonjs/src/views/DrawerContent.d.ts +3 -0
  65. package/lib/typescript/commonjs/src/views/DrawerContent.d.ts.map +1 -0
  66. package/lib/typescript/commonjs/src/views/DrawerContentScrollView.d.ts.map +1 -0
  67. package/lib/typescript/{src → commonjs/src}/views/DrawerItem.d.ts +1 -1
  68. package/lib/typescript/commonjs/src/views/DrawerItem.d.ts.map +1 -0
  69. package/lib/typescript/commonjs/src/views/DrawerItemList.d.ts.map +1 -0
  70. package/lib/typescript/{src → commonjs/src}/views/DrawerToggleButton.d.ts +1 -2
  71. package/lib/typescript/commonjs/src/views/DrawerToggleButton.d.ts.map +1 -0
  72. package/lib/typescript/{src → commonjs/src}/views/DrawerView.d.ts +1 -2
  73. package/lib/typescript/commonjs/src/views/DrawerView.d.ts.map +1 -0
  74. package/lib/typescript/{src → commonjs/src}/views/ScreenFallback.d.ts +2 -2
  75. package/lib/typescript/commonjs/src/views/ScreenFallback.d.ts.map +1 -0
  76. package/lib/typescript/commonjs/tsconfig.build.tsbuildinfo +1 -0
  77. package/lib/typescript/module/package.json +1 -0
  78. package/lib/typescript/module/src/index.d.ts +25 -0
  79. package/lib/typescript/module/src/index.d.ts.map +1 -0
  80. package/lib/typescript/module/src/navigators/createDrawerNavigator.d.ts +17 -0
  81. package/lib/typescript/module/src/navigators/createDrawerNavigator.d.ts.map +1 -0
  82. package/lib/typescript/module/src/types.d.ts +279 -0
  83. package/lib/typescript/module/src/types.d.ts.map +1 -0
  84. package/lib/typescript/module/src/utils/DrawerPositionContext.d.ts +3 -0
  85. package/lib/typescript/module/src/utils/DrawerPositionContext.d.ts.map +1 -0
  86. package/lib/typescript/module/src/utils/DrawerStatusContext.d.ts +4 -0
  87. package/lib/typescript/module/src/utils/DrawerStatusContext.d.ts.map +1 -0
  88. package/lib/typescript/module/src/utils/addCancelListener.d.ts +2 -0
  89. package/lib/typescript/module/src/utils/addCancelListener.d.ts.map +1 -0
  90. package/lib/typescript/module/src/utils/addCancelListener.native.d.ts +2 -0
  91. package/lib/typescript/module/src/utils/addCancelListener.native.d.ts.map +1 -0
  92. package/lib/typescript/module/src/utils/getDrawerStatusFromState.d.ts +3 -0
  93. package/lib/typescript/module/src/utils/getDrawerStatusFromState.d.ts.map +1 -0
  94. package/lib/typescript/module/src/utils/useDrawerStatus.d.ts +7 -0
  95. package/lib/typescript/module/src/utils/useDrawerStatus.d.ts.map +1 -0
  96. package/lib/typescript/module/src/views/DrawerContent.d.ts +3 -0
  97. package/lib/typescript/module/src/views/DrawerContent.d.ts.map +1 -0
  98. package/lib/typescript/module/src/views/DrawerContentScrollView.d.ts +6 -0
  99. package/lib/typescript/module/src/views/DrawerContentScrollView.d.ts.map +1 -0
  100. package/lib/typescript/module/src/views/DrawerItem.d.ts +92 -0
  101. package/lib/typescript/module/src/views/DrawerItem.d.ts.map +1 -0
  102. package/lib/typescript/module/src/views/DrawerItemList.d.ts +14 -0
  103. package/lib/typescript/module/src/views/DrawerItemList.d.ts.map +1 -0
  104. package/lib/typescript/module/src/views/DrawerToggleButton.d.ts +9 -0
  105. package/lib/typescript/module/src/views/DrawerToggleButton.d.ts.map +1 -0
  106. package/lib/typescript/module/src/views/DrawerView.d.ts +11 -0
  107. package/lib/typescript/module/src/views/DrawerView.d.ts.map +1 -0
  108. package/lib/typescript/module/src/views/ScreenFallback.d.ts +17 -0
  109. package/lib/typescript/module/src/views/ScreenFallback.d.ts.map +1 -0
  110. package/lib/typescript/module/tsconfig.build.tsbuildinfo +1 -0
  111. package/package.json +43 -19
  112. package/src/navigators/createDrawerNavigator.tsx +4 -5
  113. package/src/types.tsx +1 -1
  114. package/src/views/DrawerContent.tsx +0 -2
  115. package/src/views/DrawerItem.tsx +3 -0
  116. package/src/views/DrawerToggleButton.tsx +2 -2
  117. package/src/views/DrawerView.tsx +7 -5
  118. package/lib/commonjs/views/assets/toggle-drawer-icon@1.5x.android.png +0 -0
  119. package/lib/commonjs/views/assets/toggle-drawer-icon@1.5x.ios.png +0 -0
  120. package/lib/module/views/assets/toggle-drawer-icon@1.5x.android.png +0 -0
  121. package/lib/module/views/assets/toggle-drawer-icon@1.5x.ios.png +0 -0
  122. package/lib/typescript/src/index.d.ts.map +0 -1
  123. package/lib/typescript/src/navigators/createDrawerNavigator.d.ts.map +0 -1
  124. package/lib/typescript/src/types.d.ts.map +0 -1
  125. package/lib/typescript/src/utils/DrawerPositionContext.d.ts.map +0 -1
  126. package/lib/typescript/src/utils/DrawerStatusContext.d.ts.map +0 -1
  127. package/lib/typescript/src/utils/addCancelListener.d.ts.map +0 -1
  128. package/lib/typescript/src/utils/addCancelListener.native.d.ts.map +0 -1
  129. package/lib/typescript/src/utils/getDrawerStatusFromState.d.ts.map +0 -1
  130. package/lib/typescript/src/utils/useDrawerStatus.d.ts.map +0 -1
  131. package/lib/typescript/src/views/DrawerContent.d.ts +0 -4
  132. package/lib/typescript/src/views/DrawerContent.d.ts.map +0 -1
  133. package/lib/typescript/src/views/DrawerContentScrollView.d.ts.map +0 -1
  134. package/lib/typescript/src/views/DrawerItem.d.ts.map +0 -1
  135. package/lib/typescript/src/views/DrawerItemList.d.ts.map +0 -1
  136. package/lib/typescript/src/views/DrawerToggleButton.d.ts.map +0 -1
  137. package/lib/typescript/src/views/DrawerView.d.ts.map +0 -1
  138. package/lib/typescript/src/views/ScreenFallback.d.ts.map +0 -1
  139. package/src/views/assets/toggle-drawer-icon@1.5x.android.png +0 -0
  140. package/src/views/assets/toggle-drawer-icon@1.5x.ios.png +0 -0
  141. /package/lib/typescript/{src → commonjs/src}/index.d.ts +0 -0
  142. /package/lib/typescript/{src → commonjs/src}/utils/DrawerPositionContext.d.ts +0 -0
  143. /package/lib/typescript/{src → commonjs/src}/utils/DrawerStatusContext.d.ts +0 -0
  144. /package/lib/typescript/{src → commonjs/src}/utils/addCancelListener.d.ts +0 -0
  145. /package/lib/typescript/{src → commonjs/src}/utils/addCancelListener.native.d.ts +0 -0
  146. /package/lib/typescript/{src → commonjs/src}/utils/getDrawerStatusFromState.d.ts +0 -0
  147. /package/lib/typescript/{src → commonjs/src}/utils/useDrawerStatus.d.ts +0 -0
  148. /package/lib/typescript/{src → commonjs/src}/views/DrawerContentScrollView.d.ts +0 -0
  149. /package/lib/typescript/{src → commonjs/src}/views/DrawerItemList.d.ts +0 -0
@@ -1,7 +1,8 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import * as React from 'react';
3
- import { DrawerContentScrollView } from './DrawerContentScrollView';
4
- import { DrawerItemList } from './DrawerItemList';
1
+ "use strict";
2
+
3
+ import { DrawerContentScrollView } from "./DrawerContentScrollView.js";
4
+ import { DrawerItemList } from "./DrawerItemList.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
5
6
  export function DrawerContent({
6
7
  descriptors,
7
8
  state,
@@ -14,12 +15,15 @@ export function DrawerContent({
14
15
  drawerContentStyle,
15
16
  drawerContentContainerStyle
16
17
  } = focusedOptions;
17
- return /*#__PURE__*/React.createElement(DrawerContentScrollView, _extends({}, rest, {
18
+ return /*#__PURE__*/_jsx(DrawerContentScrollView, {
19
+ ...rest,
18
20
  contentContainerStyle: drawerContentContainerStyle,
19
- style: drawerContentStyle
20
- }), /*#__PURE__*/React.createElement(DrawerItemList, _extends({
21
- descriptors: descriptors,
22
- state: state
23
- }, rest)));
21
+ style: drawerContentStyle,
22
+ children: /*#__PURE__*/_jsx(DrawerItemList, {
23
+ descriptors: descriptors,
24
+ state: state,
25
+ ...rest
26
+ })
27
+ });
24
28
  }
25
29
  //# sourceMappingURL=DrawerContent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","DrawerContentScrollView","DrawerItemList","DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle","createElement","_extends","contentContainerStyle","style"],"sourceRoot":"../../../src","sources":["views/DrawerContent.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAG9B,SAASC,uBAAuB,QAAQ,2BAA2B;AACnE,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,OAAO,SAASC,aAAaA,CAAC;EAC5BC,WAAW;EACXC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACI,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IAAEC,kBAAkB;IAAEC;EAA4B,CAAC,GAAGH,cAAc;EAE1E,oBACEZ,KAAA,CAAAgB,aAAA,CAACf,uBAAuB,EAAAgB,QAAA,KAClBX,IAAI;IACRY,qBAAqB,EAAEH,2BAA4B;IACnDI,KAAK,EAAEL;EAAmB,iBAE1Bd,KAAA,CAAAgB,aAAA,CAACd,cAAc,EAAAe,QAAA;IAACb,WAAW,EAAEA,WAAY;IAACC,KAAK,EAAEA;EAAM,GAAKC,IAAI,CAAG,CAC5C,CAAC;AAE9B","ignoreList":[]}
1
+ {"version":3,"names":["DrawerContentScrollView","DrawerItemList","jsx","_jsx","DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle","contentContainerStyle","style","children"],"sourceRoot":"../../../src","sources":["views/DrawerContent.tsx"],"mappings":";;AACA,SAASA,uBAAuB,QAAQ,8BAA2B;AACnE,SAASC,cAAc,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElD,OAAO,SAASC,aAAaA,CAAC;EAC5BC,WAAW;EACXC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAM,CAACH,KAAK,CAACI,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IAAEC,kBAAkB;IAAEC;EAA4B,CAAC,GAAGH,cAAc;EAE1E,oBACEV,IAAA,CAACH,uBAAuB;IAAA,GAClBO,IAAI;IACRU,qBAAqB,EAAED,2BAA4B;IACnDE,KAAK,EAAEH,kBAAmB;IAAAI,QAAA,eAE1BhB,IAAA,CAACF,cAAc;MAACI,WAAW,EAAEA,WAAY;MAACC,KAAK,EAAEA,KAAM;MAAA,GAAKC;IAAI,CAAG;EAAC,CAC7C,CAAC;AAE9B","ignoreList":[]}
@@ -1,9 +1,11 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ "use strict";
2
+
2
3
  import { useLocale } from '@react-navigation/native';
3
4
  import * as React from 'react';
4
5
  import { ScrollView, StyleSheet } from 'react-native';
5
6
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
- import { DrawerPositionContext } from '../utils/DrawerPositionContext';
7
+ import { DrawerPositionContext } from "../utils/DrawerPositionContext.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
7
9
  const SPACING = 12;
8
10
  function DrawerContentScrollViewInner({
9
11
  contentContainerStyle,
@@ -17,7 +19,8 @@ function DrawerContentScrollViewInner({
17
19
  direction
18
20
  } = useLocale();
19
21
  const isRight = direction === 'rtl' ? drawerPosition === 'left' : drawerPosition === 'right';
20
- return /*#__PURE__*/React.createElement(ScrollView, _extends({}, rest, {
22
+ return /*#__PURE__*/_jsx(ScrollView, {
23
+ ...rest,
21
24
  ref: ref,
22
25
  contentContainerStyle: [{
23
26
  paddingTop: SPACING + insets.top,
@@ -25,8 +28,9 @@ function DrawerContentScrollViewInner({
25
28
  paddingStart: SPACING + (!isRight ? insets.left : 0),
26
29
  paddingEnd: SPACING + (isRight ? insets.right : 0)
27
30
  }, contentContainerStyle],
28
- style: [styles.container, style]
29
- }), children);
31
+ style: [styles.container, style],
32
+ children: children
33
+ });
30
34
  }
31
35
  export const DrawerContentScrollView = /*#__PURE__*/React.forwardRef(DrawerContentScrollViewInner);
32
36
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"names":["useLocale","React","ScrollView","StyleSheet","useSafeAreaInsets","DrawerPositionContext","SPACING","DrawerContentScrollViewInner","contentContainerStyle","style","children","rest","ref","drawerPosition","useContext","insets","direction","isRight","createElement","_extends","paddingTop","top","paddingBottom","bottom","paddingStart","left","paddingEnd","right","styles","container","DrawerContentScrollView","forwardRef","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerContentScrollView.tsx"],"mappings":";AAAA,SAASA,SAAS,QAAQ,0BAA0B;AACpD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAwBC,UAAU,QAAQ,cAAc;AAC3E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,qBAAqB,QAAQ,gCAAgC;AAMtE,MAAMC,OAAO,GAAG,EAAE;AAElB,SAASC,4BAA4BA,CACnC;EAAEC,qBAAqB;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAY,CAAC,EAC1DC,GAA2B,EAC3B;EACA,MAAMC,cAAc,GAAGZ,KAAK,CAACa,UAAU,CAACT,qBAAqB,CAAC;EAC9D,MAAMU,MAAM,GAAGX,iBAAiB,CAAC,CAAC;EAClC,MAAM;IAAEY;EAAU,CAAC,GAAGhB,SAAS,CAAC,CAAC;EAEjC,MAAMiB,OAAO,GACXD,SAAS,KAAK,KAAK,GACfH,cAAc,KAAK,MAAM,GACzBA,cAAc,KAAK,OAAO;EAEhC,oBACEZ,KAAA,CAAAiB,aAAA,CAAChB,UAAU,EAAAiB,QAAA,KACLR,IAAI;IACRC,GAAG,EAAEA,GAAI;IACTJ,qBAAqB,EAAE,CACrB;MACEY,UAAU,EAAEd,OAAO,GAAGS,MAAM,CAACM,GAAG;MAChCC,aAAa,EAAEhB,OAAO,GAAGS,MAAM,CAACQ,MAAM;MACtCC,YAAY,EAAElB,OAAO,IAAI,CAACW,OAAO,GAAGF,MAAM,CAACU,IAAI,GAAG,CAAC,CAAC;MACpDC,UAAU,EAAEpB,OAAO,IAAIW,OAAO,GAAGF,MAAM,CAACY,KAAK,GAAG,CAAC;IACnD,CAAC,EACDnB,qBAAqB,CACrB;IACFC,KAAK,EAAE,CAACmB,MAAM,CAACC,SAAS,EAAEpB,KAAK;EAAE,IAEhCC,QACS,CAAC;AAEjB;AAEA,OAAO,MAAMoB,uBAAuB,gBAAG7B,KAAK,CAAC8B,UAAU,CACrDxB,4BACF,CAAC;AAED,MAAMqB,MAAM,GAAGzB,UAAU,CAAC6B,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useLocale","React","ScrollView","StyleSheet","useSafeAreaInsets","DrawerPositionContext","jsx","_jsx","SPACING","DrawerContentScrollViewInner","contentContainerStyle","style","children","rest","ref","drawerPosition","useContext","insets","direction","isRight","paddingTop","top","paddingBottom","bottom","paddingStart","left","paddingEnd","right","styles","container","DrawerContentScrollView","forwardRef","create","flex"],"sourceRoot":"../../../src","sources":["views/DrawerContentScrollView.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,0BAA0B;AACpD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,EAAwBC,UAAU,QAAQ,cAAc;AAC3E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,qBAAqB,QAAQ,mCAAgC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMvE,MAAMC,OAAO,GAAG,EAAE;AAElB,SAASC,4BAA4BA,CACnC;EAAEC,qBAAqB;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAY,CAAC,EAC1DC,GAA2B,EAC3B;EACA,MAAMC,cAAc,GAAGd,KAAK,CAACe,UAAU,CAACX,qBAAqB,CAAC;EAC9D,MAAMY,MAAM,GAAGb,iBAAiB,CAAC,CAAC;EAClC,MAAM;IAAEc;EAAU,CAAC,GAAGlB,SAAS,CAAC,CAAC;EAEjC,MAAMmB,OAAO,GACXD,SAAS,KAAK,KAAK,GACfH,cAAc,KAAK,MAAM,GACzBA,cAAc,KAAK,OAAO;EAEhC,oBACER,IAAA,CAACL,UAAU;IAAA,GACLW,IAAI;IACRC,GAAG,EAAEA,GAAI;IACTJ,qBAAqB,EAAE,CACrB;MACEU,UAAU,EAAEZ,OAAO,GAAGS,MAAM,CAACI,GAAG;MAChCC,aAAa,EAAEd,OAAO,GAAGS,MAAM,CAACM,MAAM;MACtCC,YAAY,EAAEhB,OAAO,IAAI,CAACW,OAAO,GAAGF,MAAM,CAACQ,IAAI,GAAG,CAAC,CAAC;MACpDC,UAAU,EAAElB,OAAO,IAAIW,OAAO,GAAGF,MAAM,CAACU,KAAK,GAAG,CAAC;IACnD,CAAC,EACDjB,qBAAqB,CACrB;IACFC,KAAK,EAAE,CAACiB,MAAM,CAACC,SAAS,EAAElB,KAAK,CAAE;IAAAC,QAAA,EAEhCA;EAAQ,CACC,CAAC;AAEjB;AAEA,OAAO,MAAMkB,uBAAuB,gBAAG7B,KAAK,CAAC8B,UAAU,CACrDtB,4BACF,CAAC;AAED,MAAMmB,MAAM,GAAGzB,UAAU,CAAC6B,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,9 +1,11 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ "use strict";
2
+
2
3
  import { PlatformPressable, Text } from '@react-navigation/elements';
3
4
  import { useTheme } from '@react-navigation/native';
4
5
  import Color from 'color';
5
6
  import * as React from 'react';
6
7
  import { StyleSheet, View } from 'react-native';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
9
  /**
8
10
  * A component used to show an action item with an icon and a label in a navigation drawer.
9
11
  */
@@ -19,8 +21,11 @@ export function DrawerItem(props) {
19
21
  labelStyle,
20
22
  focused = false,
21
23
  allowFontScaling,
24
+ // eslint-disable-next-line @eslint-react/no-unstable-default-props
22
25
  activeTintColor = colors.primary,
26
+ // eslint-disable-next-line @eslint-react/no-unstable-default-props
23
27
  inactiveTintColor = Color(colors.text).alpha(0.68).rgb().string(),
28
+ // eslint-disable-next-line @eslint-react/no-unstable-default-props
24
29
  activeBackgroundColor = Color(activeTintColor).alpha(0.12).rgb().string(),
25
30
  inactiveBackgroundColor = 'transparent',
26
31
  style,
@@ -41,45 +46,50 @@ export function DrawerItem(props) {
41
46
  focused,
42
47
  color
43
48
  }) : null;
44
- return /*#__PURE__*/React.createElement(View, _extends({
45
- collapsable: false
46
- }, rest, {
49
+ return /*#__PURE__*/_jsx(View, {
50
+ collapsable: false,
51
+ ...rest,
47
52
  style: [styles.container, {
48
53
  borderRadius,
49
54
  backgroundColor
50
- }, style]
51
- }), /*#__PURE__*/React.createElement(PlatformPressable, {
52
- testID: testID,
53
- onPress: onPress,
54
- accessibilityLabel: accessibilityLabel,
55
- accessibilityRole: "button",
56
- accessibilityState: {
57
- selected: focused
58
- },
59
- pressColor: pressColor,
60
- pressOpacity: pressOpacity,
61
- hoverEffect: {
62
- color
63
- },
64
- href: href
65
- }, /*#__PURE__*/React.createElement(View, {
66
- style: [styles.wrapper, {
67
- borderRadius
68
- }]
69
- }, iconNode, /*#__PURE__*/React.createElement(View, {
70
- style: [styles.label, {
71
- marginStart: iconNode ? 12 : 0
72
- }]
73
- }, typeof label === 'string' ? /*#__PURE__*/React.createElement(Text, {
74
- numberOfLines: 1,
75
- allowFontScaling: allowFontScaling,
76
- style: [styles.labelText, {
77
- color
78
- }, fonts.medium, labelStyle]
79
- }, label) : label({
80
- color,
81
- focused
82
- })))));
55
+ }, style],
56
+ children: /*#__PURE__*/_jsx(PlatformPressable, {
57
+ testID: testID,
58
+ onPress: onPress,
59
+ accessibilityLabel: accessibilityLabel,
60
+ accessibilityRole: "button",
61
+ accessibilityState: {
62
+ selected: focused
63
+ },
64
+ pressColor: pressColor,
65
+ pressOpacity: pressOpacity,
66
+ hoverEffect: {
67
+ color
68
+ },
69
+ href: href,
70
+ children: /*#__PURE__*/_jsxs(View, {
71
+ style: [styles.wrapper, {
72
+ borderRadius
73
+ }],
74
+ children: [iconNode, /*#__PURE__*/_jsx(View, {
75
+ style: [styles.label, {
76
+ marginStart: iconNode ? 12 : 0
77
+ }],
78
+ children: typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
79
+ numberOfLines: 1,
80
+ allowFontScaling: allowFontScaling,
81
+ style: [styles.labelText, {
82
+ color
83
+ }, fonts.medium, labelStyle],
84
+ children: label
85
+ }) : label({
86
+ color,
87
+ focused
88
+ })
89
+ })]
90
+ })
91
+ })
92
+ });
83
93
  }
84
94
  const styles = StyleSheet.create({
85
95
  container: {
@@ -1 +1 @@
1
- {"version":3,"names":["PlatformPressable","Text","useTheme","Color","React","StyleSheet","View","DrawerItem","props","colors","fonts","href","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","style","onPress","pressColor","pressOpacity","testID","accessibilityLabel","rest","borderRadius","flatten","color","backgroundColor","iconNode","size","createElement","_extends","collapsable","styles","container","accessibilityRole","accessibilityState","selected","hoverEffect","wrapper","marginStart","numberOfLines","labelText","medium","create","overflow","flexDirection","alignItems","paddingVertical","paddingStart","paddingEnd","marginEnd","marginVertical","flex","lineHeight","textAlignVertical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IAAEpB;EAAQ,CAAC,CAEtB,CACF,CACW,CACf,CAAC;AAEX;AAEA,MAAM2B,MAAM,GAAGrC,UAAU,CAACgD,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,QAAQ,EAAE;EACZ,CAAC;EACDN,OAAO,EAAE;IACPO,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE,EAAE;IACnBC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC;EACD9C,KAAK,EAAE;IACL+C,SAAS,EAAE,EAAE;IACbC,cAAc,EAAE,CAAC;IACjBC,IAAI,EAAE;EACR,CAAC;EACDX,SAAS,EAAE;IACTY,UAAU,EAAE,EAAE;IACdC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PlatformPressable","Text","useTheme","Color","React","StyleSheet","View","jsx","_jsx","jsxs","_jsxs","DrawerItem","props","colors","fonts","href","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","style","onPress","pressColor","pressOpacity","testID","accessibilityLabel","rest","borderRadius","flatten","color","backgroundColor","iconNode","size","collapsable","styles","container","children","accessibilityRole","accessibilityState","selected","hoverEffect","wrapper","marginStart","numberOfLines","labelText","medium","create","overflow","flexDirection","alignItems","paddingVertical","paddingStart","paddingEnd","marginEnd","marginVertical","flex","lineHeight","textAlignVertical"],"sourceRoot":"../../../src","sources":["views/DrawerItem.tsx"],"mappings":";;AAAA,SAASA,iBAAiB,EAAEC,IAAI,QAAQ,4BAA4B;AACpE,SAAqBC,QAAQ,QAAQ,0BAA0B;AAC/D,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAEEC,UAAU,EAEVC,IAAI,QAEC,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAs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IACpBC,eAAe,EAAE,EAAE;IACnBC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE;EACd,CAAC;EACD7C,KAAK,EAAE;IACL8C,SAAS,EAAE,EAAE;IACbC,cAAc,EAAE,CAAC;IACjBC,IAAI,EAAE;EACR,CAAC;EACDX,SAAS,EAAE;IACTY,UAAU,EAAE,EAAE;IACdC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,6 +1,9 @@
1
+ "use strict";
2
+
1
3
  import { CommonActions, DrawerActions, useLinkBuilder } from '@react-navigation/native';
2
4
  import * as React from 'react';
3
- import { DrawerItem } from './DrawerItem';
5
+ import { DrawerItem } from "./DrawerItem.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
4
7
  /**
5
8
  * Component that renders the navigation list in the drawer.
6
9
  */
@@ -44,8 +47,7 @@ export function DrawerItemList({
44
47
  drawerItemStyle,
45
48
  drawerAllowFontScaling
46
49
  } = descriptors[route.key].options;
47
- return /*#__PURE__*/React.createElement(DrawerItem, {
48
- key: route.key,
50
+ return /*#__PURE__*/_jsx(DrawerItem, {
49
51
  route: route,
50
52
  href: buildHref(route.name, route.params),
51
53
  label: drawerLabel !== undefined ? drawerLabel : title !== undefined ? title : route.name,
@@ -59,7 +61,7 @@ export function DrawerItemList({
59
61
  labelStyle: drawerLabelStyle,
60
62
  style: drawerItemStyle,
61
63
  onPress: onPress
62
- });
64
+ }, route.key);
63
65
  });
64
66
  }
65
67
  //# sourceMappingURL=DrawerItemList.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["CommonActions","DrawerActions","useLinkBuilder","React","DrawerItem","DrawerItemList","state","navigation","descriptors","buildHref","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerActiveTintColor","drawerInactiveTintColor","drawerActiveBackgroundColor","drawerInactiveBackgroundColor","map","route","i","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","closeDrawer","navigate","title","drawerLabel","drawerIcon","drawerLabelStyle","drawerItemStyle","drawerAllowFontScaling","createElement","href","name","params","label","undefined","icon","activeTintColor","inactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","allowFontScaling","labelStyle","style"],"sourceRoot":"../../../src","sources":["views/DrawerItemList.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,aAAa,EAGbC,cAAc,QACT,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAG9B,SAASC,UAAU,QAAQ,cAAc;AAQzC;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAC;EAAEC,KAAK;EAAEC,UAAU;EAAEC;AAAmB,CAAC,EAAE;EACxE,MAAM;IAAEC;EAAU,CAAC,GAAGP,cAAc,CAAC,CAAC;EAEtC,MAAMQ,YAAY,GAAGJ,KAAK,CAACK,MAAM,CAACL,KAAK,CAACM,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGL,WAAW,CAACE,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IACJC,qBAAqB;IACrBC,uBAAuB;IACvBC,2BAA2B;IAC3BC;EACF,CAAC,GAAGL,cAAc;EAElB,OAAOT,KAAK,CAACK,MAAM,CAACU,GAAG,CAAC,CAACC,KAAK,EAAEC,CAAC,KAAK;IACpC,MAAMC,OAAO,GAAGD,CAAC,KAAKjB,KAAK,CAACM,KAAK;IAEjC,MAAMa,OAAO,GAAGA,CAAA,KAAM;MACpB,MAAMC,KAAK,GAAGnB,UAAU,CAACoB,IAAI,CAAC;QAC5BC,IAAI,EAAE,iBAAiB;QACvBC,MAAM,EAAEP,KAAK,CAACR,GAAG;QACjBgB,iBAAiB,EAAE;MACrB,CAAC,CAAC;MAEF,IAAI,CAACJ,KAAK,CAACK,gBAAgB,EAAE;QAC3BxB,UAAU,CAACyB,QAAQ,CAAC;UAClB,IAAIR,OAAO,GACPvB,aAAa,CAACgC,WAAW,CAAC,CAAC,GAC3BjC,aAAa,CAACkC,QAAQ,CAACZ,KAAK,CAAC,CAAC;UAClCO,MAAM,EAAEvB,KAAK,CAACQ;QAChB,CAAC,CAAC;MACJ;IACF,CAAC;IAED,MAAM;MACJqB,KAAK;MACLC,WAAW;MACXC,UAAU;MACVC,gBAAgB;MAChBC,eAAe;MACfC;IACF,CAAC,GAAGhC,WAAW,CAACc,KAAK,CAACR,GAAG,CAAC,CAACE,OAAO;IAElC,oBACEb,KAAA,CAAAsC,aAAA,CAACrC,UAAU;MACTU,GAAG,EAAEQ,KAAK,CAACR,GAAI;MACfQ,KAAK,EAAEA,KAAM;MACboB,IAAI,EAAEjC,SAAS,CAACa,KAAK,CAACqB,IAAI,EAAErB,KAAK,CAACsB,MAAM,CAAE;MAC1CC,KAAK,EACHT,WAAW,KAAKU,SAAS,GACrBV,WAAW,GACXD,KAAK,KAAKW,SAAS,GACjBX,KAAK,GACLb,KAAK,CAACqB,IACb;MACDI,IAAI,EAAEV,UAAW;MACjBb,OAAO,EAAEA,OAAQ;MACjBwB,eAAe,EAAE/B,qBAAsB;MACvCgC,iBAAiB,EAAE/B,uBAAwB;MAC3CgC,qBAAqB,EAAE/B,2BAA4B;MACnDgC,uBAAuB,EAAE/B,6BAA8B;MACvDgC,gBAAgB,EAAEZ,sBAAuB;MACzCa,UAAU,EAAEf,gBAAiB;MAC7BgB,KAAK,EAAEf,eAAgB;MACvBd,OAAO,EAAEA;IAAQ,CAClB,CAAC;EAEN,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"names":["CommonActions","DrawerActions","useLinkBuilder","React","DrawerItem","jsx","_jsx","DrawerItemList","state","navigation","descriptors","buildHref","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerActiveTintColor","drawerInactiveTintColor","drawerActiveBackgroundColor","drawerInactiveBackgroundColor","map","route","i","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","closeDrawer","navigate","title","drawerLabel","drawerIcon","drawerLabelStyle","drawerItemStyle","drawerAllowFontScaling","href","name","params","label","undefined","icon","activeTintColor","inactiveTintColor","activeBackgroundColor","inactiveBackgroundColor","allowFontScaling","labelStyle","style"],"sourceRoot":"../../../src","sources":["views/DrawerItemList.tsx"],"mappings":";;AAAA,SACEA,aAAa,EACbC,aAAa,EAGbC,cAAc,QACT,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAG9B,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAQ1C;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAC;EAAEC,KAAK;EAAEC,UAAU;EAAEC;AAAmB,CAAC,EAAE;EACxE,MAAM;IAAEC;EAAU,CAAC,GAAGT,cAAc,CAAC,CAAC;EAEtC,MAAMU,YAAY,GAAGJ,KAAK,CAACK,MAAM,CAACL,KAAK,CAACM,KAAK,CAAC;EAC9C,MAAMC,iBAAiB,GAAGL,WAAW,CAACE,YAAY,CAACI,GAAG,CAAC;EACvD,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAO;EAEhD,MAAM;IACJC,qBAAqB;IACrBC,uBAAuB;IACvBC,2BAA2B;IAC3BC;EACF,CAAC,GAAGL,cAAc;EAElB,OAAOT,KAAK,CAACK,MAAM,CAACU,GAAG,CAAC,CAACC,KAAK,EAAEC,CAAC,KAAK;IACpC,MAAMC,OAAO,GAAGD,CAAC,KAAKjB,KAAK,CAACM,KAAK;IAEjC,MAAMa,OAAO,GAAGA,CAAA,KAAM;MACpB,MAAMC,KAAK,GAAGnB,UAAU,CAACoB,IAAI,CAAC;QAC5BC,IAAI,EAAE,iBAAiB;QACvBC,MAAM,EAAEP,KAAK,CAACR,GAAG;QACjBgB,iBAAiB,EAAE;MACrB,CAAC,CAAC;MAEF,IAAI,CAACJ,KAAK,CAACK,gBAAgB,EAAE;QAC3BxB,UAAU,CAACyB,QAAQ,CAAC;UAClB,IAAIR,OAAO,GACPzB,aAAa,CAACkC,WAAW,CAAC,CAAC,GAC3BnC,aAAa,CAACoC,QAAQ,CAACZ,KAAK,CAAC,CAAC;UAClCO,MAAM,EAAEvB,KAAK,CAACQ;QAChB,CAAC,CAAC;MACJ;IACF,CAAC;IAED,MAAM;MACJqB,KAAK;MACLC,WAAW;MACXC,UAAU;MACVC,gBAAgB;MAChBC,eAAe;MACfC;IACF,CAAC,GAAGhC,WAAW,CAACc,KAAK,CAACR,GAAG,CAAC,CAACE,OAAO;IAElC,oBACEZ,IAAA,CAACF,UAAU;MAEToB,KAAK,EAAEA,KAAM;MACbmB,IAAI,EAAEhC,SAAS,CAACa,KAAK,CAACoB,IAAI,EAAEpB,KAAK,CAACqB,MAAM,CAAE;MAC1CC,KAAK,EACHR,WAAW,KAAKS,SAAS,GACrBT,WAAW,GACXD,KAAK,KAAKU,SAAS,GACjBV,KAAK,GACLb,KAAK,CAACoB,IACb;MACDI,IAAI,EAAET,UAAW;MACjBb,OAAO,EAAEA,OAAQ;MACjBuB,eAAe,EAAE9B,qBAAsB;MACvC+B,iBAAiB,EAAE9B,uBAAwB;MAC3C+B,qBAAqB,EAAE9B,2BAA4B;MACnD+B,uBAAuB,EAAE9B,6BAA8B;MACvD+B,gBAAgB,EAAEX,sBAAuB;MACzCY,UAAU,EAAEd,gBAAiB;MAC7Be,KAAK,EAAEd,eAAgB;MACvBd,OAAO,EAAEA;IAAQ,GAnBZH,KAAK,CAACR,GAoBZ,CAAC;EAEN,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1,14 +1,17 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ "use strict";
2
+
2
3
  import { PlatformPressable } from '@react-navigation/elements';
3
4
  import { DrawerActions, useNavigation } from '@react-navigation/native';
4
- import * as React from 'react';
5
5
  import { Image, Platform, StyleSheet } from 'react-native';
6
+ import toggleDrawerIcon from './assets/toggle-drawer-icon.png';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
6
8
  export function DrawerToggleButton({
7
9
  tintColor,
8
10
  ...rest
9
11
  }) {
10
12
  const navigation = useNavigation();
11
- return /*#__PURE__*/React.createElement(PlatformPressable, _extends({}, rest, {
13
+ return /*#__PURE__*/_jsx(PlatformPressable, {
14
+ ...rest,
12
15
  android_ripple: {
13
16
  borderless: true
14
17
  },
@@ -22,15 +25,16 @@ export function DrawerToggleButton({
22
25
  bottom: 16,
23
26
  left: 16
24
27
  }
28
+ }),
29
+ children: /*#__PURE__*/_jsx(Image, {
30
+ style: [styles.icon, tintColor ? {
31
+ tintColor
32
+ } : null],
33
+ resizeMode: "contain",
34
+ source: toggleDrawerIcon,
35
+ fadeDuration: 0
25
36
  })
26
- }), /*#__PURE__*/React.createElement(Image, {
27
- style: [styles.icon, tintColor ? {
28
- tintColor
29
- } : null],
30
- resizeMode: "contain",
31
- source: require('./assets/toggle-drawer-icon.png'),
32
- fadeDuration: 0
33
- }));
37
+ });
34
38
  }
35
39
  const styles = StyleSheet.create({
36
40
  icon: {
@@ -1 +1 @@
1
- {"version":3,"names":["PlatformPressable","DrawerActions","useNavigation","React","Image","Platform","StyleSheet","DrawerToggleButton","tintColor","rest","navigation","createElement","_extends","android_ripple","borderless","onPress","dispatch","toggleDrawer","style","styles","touchable","hitSlop","select","ios","undefined","default","top","right","bottom","left","icon","resizeMode","source","require","fadeDuration","create","height","width","marginVertical","marginHorizontal","borderRadius"],"sourceRoot":"../../../src","sources":["views/DrawerToggleButton.tsx"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,4BAA4B;AAC9D,SACEC,aAAa,EAEbC,aAAa,QACR,0BAA0B;AACjC,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAW1D,OAAO,SAASC,kBAAkBA,CAAC;EAAEC,SAAS;EAAE,GAAGC;AAAY,CAAC,EAAE;EAChE,MAAMC,UAAU,GAAGR,aAAa,CAAsC,CAAC;EAEvE,oBACEC,KAAA,CAAAQ,aAAA,CAACX,iBAAiB,EAAAY,QAAA,KACZH,IAAI;IACRI,cAAc,EAAE;MAAEC,UAAU,EAAE;IAAK,CAAE;IACrCC,OAAO,EAAEA,CAAA,KAAML,UAAU,CAACM,QAAQ,CAACf,aAAa,CAACgB,YAAY,CAAC,CAAC,CAAE;IACjEC,KAAK,EAAEC,MAAM,CAACC,SAAU;IACxBC,OAAO,EAAEhB,QAAQ,CAACiB,MAAM,CAAC;MACvBC,GAAG,EAAEC,SAAS;MACdC,OAAO,EAAE;QAAEC,GAAG,EAAE,EAAE;QAAEC,KAAK,EAAE,EAAE;QAAEC,MAAM,EAAE,EAAE;QAAEC,IAAI,EAAE;MAAG;IACtD,CAAC;EAAE,iBAEH1B,KAAA,CAAAQ,aAAA,CAACP,KAAK;IACJc,KAAK,EAAE,CAACC,MAAM,CAACW,IAAI,EAAEtB,SAAS,GAAG;MAAEA;IAAU,CAAC,GAAG,IAAI,CAAE;IACvDuB,UAAU,EAAC,SAAS;IACpBC,MAAM,EAAEC,OAAO,CAAC,iCAAiC,CAAE;IACnDC,YAAY,EAAE;EAAE,CACjB,CACgB,CAAC;AAExB;AAEA,MAAMf,MAAM,GAAGb,UAAU,CAAC6B,MAAM,CAAC;EAC/BL,IAAI,EAAE;IACJM,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB,CAAC;EACDnB,SAAS,EAAE;IACT;IACAoB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PlatformPressable","DrawerActions","useNavigation","Image","Platform","StyleSheet","toggleDrawerIcon","jsx","_jsx","DrawerToggleButton","tintColor","rest","navigation","android_ripple","borderless","onPress","dispatch","toggleDrawer","style","styles","touchable","hitSlop","select","ios","undefined","default","top","right","bottom","left","children","icon","resizeMode","source","fadeDuration","create","height","width","marginVertical","marginHorizontal","borderRadius"],"sourceRoot":"../../../src","sources":["views/DrawerToggleButton.tsx"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,4BAA4B;AAC9D,SACEC,aAAa,EAEbC,aAAa,QACR,0BAA0B;AACjC,SAASC,KAAK,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAG1D,OAAOC,gBAAgB,MAAM,iCAAiC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS/D,OAAO,SAASC,kBAAkBA,CAAC;EAAEC,SAAS;EAAE,GAAGC;AAAY,CAAC,EAAE;EAChE,MAAMC,UAAU,GAAGV,aAAa,CAAsC,CAAC;EAEvE,oBACEM,IAAA,CAACR,iBAAiB;IAAA,GACZW,IAAI;IACRE,cAAc,EAAE;MAAEC,UAAU,EAAE;IAAK,CAAE;IACrCC,OAAO,EAAEA,CAAA,KAAMH,UAAU,CAACI,QAAQ,CAACf,aAAa,CAACgB,YAAY,CAAC,CAAC,CAAE;IACjEC,KAAK,EAAEC,MAAM,CAACC,SAAU;IACxBC,OAAO,EAAEjB,QAAQ,CAACkB,MAAM,CAAC;MACvBC,GAAG,EAAEC,SAAS;MACdC,OAAO,EAAE;QAAEC,GAAG,EAAE,EAAE;QAAEC,KAAK,EAAE,EAAE;QAAEC,MAAM,EAAE,EAAE;QAAEC,IAAI,EAAE;MAAG;IACtD,CAAC,CAAE;IAAAC,QAAA,eAEHtB,IAAA,CAACL,KAAK;MACJe,KAAK,EAAE,CAACC,MAAM,CAACY,IAAI,EAAErB,SAAS,GAAG;QAAEA;MAAU,CAAC,GAAG,IAAI,CAAE;MACvDsB,UAAU,EAAC,SAAS;MACpBC,MAAM,EAAE3B,gBAAiB;MACzB4B,YAAY,EAAE;IAAE,CACjB;EAAC,CACe,CAAC;AAExB;AAEA,MAAMf,MAAM,GAAGd,UAAU,CAAC8B,MAAM,CAAC;EAC/BJ,IAAI,EAAE;IACJK,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE,CAAC;IACjBC,gBAAgB,EAAE;EACpB,CAAC;EACDnB,SAAS,EAAE;IACT;IACAoB,YAAY,EAAE;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ "use strict";
2
+
2
3
  import { getDefaultSidebarWidth, getHeaderTitle, Header, SafeAreaProviderCompat, Screen } from '@react-navigation/elements';
3
4
  import { DrawerActions, StackActions, useLocale, useTheme } from '@react-navigation/native';
4
5
  import * as React from 'react';
@@ -7,19 +8,23 @@ import { Drawer } from 'react-native-drawer-layout';
7
8
  import { useSafeAreaFrame } from 'react-native-safe-area-context';
8
9
  import useLatestCallback from 'use-latest-callback';
9
10
  import { addCancelListener } from '../utils/addCancelListener';
10
- import { DrawerPositionContext } from '../utils/DrawerPositionContext';
11
- import { DrawerStatusContext } from '../utils/DrawerStatusContext';
12
- import { getDrawerStatusFromState } from '../utils/getDrawerStatusFromState';
13
- import { DrawerContent } from './DrawerContent';
14
- import { DrawerToggleButton } from './DrawerToggleButton';
15
- import { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';
11
+ import { DrawerPositionContext } from "../utils/DrawerPositionContext.js";
12
+ import { DrawerStatusContext } from "../utils/DrawerStatusContext.js";
13
+ import { getDrawerStatusFromState } from "../utils/getDrawerStatusFromState.js";
14
+ import { DrawerContent } from "./DrawerContent.js";
15
+ import { DrawerToggleButton } from "./DrawerToggleButton.js";
16
+ import { MaybeScreen, MaybeScreenContainer } from "./ScreenFallback.js";
17
+ import { jsx as _jsx } from "react/jsx-runtime";
16
18
  const DRAWER_BORDER_RADIUS = 16;
19
+ const renderDrawerContentDefault = props => /*#__PURE__*/_jsx(DrawerContent, {
20
+ ...props
21
+ });
17
22
  function DrawerViewBase({
18
23
  state,
19
24
  navigation,
20
25
  descriptors,
21
26
  defaultStatus,
22
- drawerContent = props => /*#__PURE__*/React.createElement(DrawerContent, props),
27
+ drawerContent = renderDrawerContentDefault,
23
28
  detachInactiveScreens = Platform.OS === 'web' || Platform.OS === 'android' || Platform.OS === 'ios'
24
29
  }) {
25
30
  const {
@@ -138,121 +143,132 @@ function DrawerViewBase({
138
143
  return addCancelListener(handleHardwareBack);
139
144
  }, [defaultStatus, drawerStatus, drawerType, handleDrawerClose, handleDrawerOpen, navigation]);
140
145
  const renderDrawerContent = () => {
141
- return /*#__PURE__*/React.createElement(DrawerPositionContext.Provider, {
142
- value: drawerPosition
143
- }, drawerContent({
144
- state: state,
145
- navigation: navigation,
146
- descriptors: descriptors
147
- }));
146
+ return /*#__PURE__*/_jsx(DrawerPositionContext.Provider, {
147
+ value: drawerPosition,
148
+ children: drawerContent({
149
+ state: state,
150
+ navigation: navigation,
151
+ descriptors: descriptors
152
+ })
153
+ });
148
154
  };
149
155
  const renderSceneContent = () => {
150
- return /*#__PURE__*/React.createElement(MaybeScreenContainer, {
156
+ return /*#__PURE__*/_jsx(MaybeScreenContainer, {
151
157
  enabled: detachInactiveScreens,
152
158
  hasTwoStates: true,
153
- style: styles.content
154
- }, state.routes.map((route, index) => {
155
- const descriptor = descriptors[route.key];
156
- const {
157
- lazy = true
158
- } = descriptor.options;
159
- const isFocused = state.index === index;
160
- if (lazy && !loaded.includes(route.key) && !isFocused && !state.preloadedRouteKeys.includes(route.key)) {
161
- // Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
162
- return null;
163
- }
164
- const {
165
- freezeOnBlur,
166
- header = ({
167
- layout,
168
- options
169
- }) => /*#__PURE__*/React.createElement(Header, _extends({}, options, {
170
- layout: layout,
171
- title: getHeaderTitle(options, route.name),
172
- headerLeft: options.headerLeft ?? (props => /*#__PURE__*/React.createElement(DrawerToggleButton, props))
173
- })),
174
- headerShown,
175
- headerStatusBarHeight,
176
- headerTransparent,
177
- sceneContainerStyle
178
- } = descriptor.options;
179
- return /*#__PURE__*/React.createElement(MaybeScreen, {
180
- key: route.key,
181
- style: [StyleSheet.absoluteFill, {
182
- zIndex: isFocused ? 0 : -1
183
- }],
184
- visible: isFocused,
185
- enabled: detachInactiveScreens,
186
- freezeOnBlur: freezeOnBlur
187
- }, /*#__PURE__*/React.createElement(Screen, {
188
- focused: isFocused,
189
- route: descriptor.route,
190
- navigation: descriptor.navigation,
191
- headerShown: headerShown,
192
- headerStatusBarHeight: headerStatusBarHeight,
193
- headerTransparent: headerTransparent,
194
- header: header({
195
- layout: dimensions,
196
- route: descriptor.route,
197
- navigation: descriptor.navigation,
198
- options: descriptor.options
199
- }),
200
- style: sceneContainerStyle
201
- }, descriptor.render()));
202
- }));
159
+ style: styles.content,
160
+ children: state.routes.map((route, index) => {
161
+ const descriptor = descriptors[route.key];
162
+ const {
163
+ lazy = true
164
+ } = descriptor.options;
165
+ const isFocused = state.index === index;
166
+ if (lazy && !loaded.includes(route.key) && !isFocused && !state.preloadedRouteKeys.includes(route.key)) {
167
+ // Don't render a lazy screen if we've never navigated to it or it wasn't preloaded
168
+ return null;
169
+ }
170
+ const {
171
+ freezeOnBlur,
172
+ header = ({
173
+ layout,
174
+ options
175
+ }) => /*#__PURE__*/_jsx(Header, {
176
+ ...options,
177
+ layout: layout,
178
+ title: getHeaderTitle(options, route.name),
179
+ headerLeft: options.headerLeft ?? (props => /*#__PURE__*/_jsx(DrawerToggleButton, {
180
+ ...props
181
+ }))
182
+ }),
183
+ headerShown,
184
+ headerStatusBarHeight,
185
+ headerTransparent,
186
+ sceneStyle
187
+ } = descriptor.options;
188
+ return /*#__PURE__*/_jsx(MaybeScreen, {
189
+ style: [StyleSheet.absoluteFill, {
190
+ zIndex: isFocused ? 0 : -1
191
+ }],
192
+ visible: isFocused,
193
+ enabled: detachInactiveScreens,
194
+ freezeOnBlur: freezeOnBlur,
195
+ children: /*#__PURE__*/_jsx(Screen, {
196
+ focused: isFocused,
197
+ route: descriptor.route,
198
+ navigation: descriptor.navigation,
199
+ headerShown: headerShown,
200
+ headerStatusBarHeight: headerStatusBarHeight,
201
+ headerTransparent: headerTransparent,
202
+ header: header({
203
+ layout: dimensions,
204
+ route: descriptor.route,
205
+ navigation: descriptor.navigation,
206
+ options: descriptor.options
207
+ }),
208
+ style: sceneStyle,
209
+ children: descriptor.render()
210
+ })
211
+ }, route.key);
212
+ })
213
+ });
203
214
  };
204
- return /*#__PURE__*/React.createElement(DrawerStatusContext.Provider, {
205
- value: drawerStatus
206
- }, /*#__PURE__*/React.createElement(Drawer, {
207
- open: drawerStatus !== 'closed',
208
- onOpen: handleDrawerOpen,
209
- onClose: handleDrawerClose,
210
- onGestureStart: handleGestureStart,
211
- onGestureEnd: handleGestureEnd,
212
- onGestureCancel: handleGestureCancel,
213
- onTransitionStart: handleTransitionStart,
214
- onTransitionEnd: handleTransitionEnd,
215
- layout: dimensions,
216
- direction: direction,
217
- configureGestureHandler: configureGestureHandler,
218
- swipeEnabled: swipeEnabled,
219
- swipeEdgeWidth: swipeEdgeWidth,
220
- swipeMinDistance: swipeMinDistance,
221
- hideStatusBarOnOpen: drawerHideStatusBarOnOpen,
222
- statusBarAnimation: drawerStatusBarAnimation,
223
- keyboardDismissMode: keyboardDismissMode,
224
- drawerType: drawerType,
225
- overlayAccessibilityLabel: overlayAccessibilityLabel,
226
- drawerPosition: drawerPosition,
227
- drawerStyle: [{
228
- backgroundColor: colors.card,
229
- width: getDefaultSidebarWidth(dimensions)
230
- }, drawerType === 'permanent' && ((Platform.OS === 'web' ? drawerPosition === 'right' : direction === 'rtl' && drawerPosition !== 'right' || direction !== 'rtl' && drawerPosition === 'right') ? {
231
- borderLeftColor: colors.border,
232
- borderLeftWidth: StyleSheet.hairlineWidth
233
- } : {
234
- borderRightColor: colors.border,
235
- borderRightWidth: StyleSheet.hairlineWidth
236
- }), drawerType === 'front' && (drawerPosition === 'left' ? {
237
- borderTopRightRadius: DRAWER_BORDER_RADIUS,
238
- borderBottomRightRadius: DRAWER_BORDER_RADIUS
239
- } : {
240
- borderTopLeftRadius: DRAWER_BORDER_RADIUS,
241
- borderBottomLeftRadius: DRAWER_BORDER_RADIUS
242
- }), drawerStyle],
243
- overlayStyle: {
244
- backgroundColor: overlayColor
245
- },
246
- renderDrawerContent: renderDrawerContent
247
- }, renderSceneContent()));
215
+ return /*#__PURE__*/_jsx(DrawerStatusContext.Provider, {
216
+ value: drawerStatus,
217
+ children: /*#__PURE__*/_jsx(Drawer, {
218
+ open: drawerStatus !== 'closed',
219
+ onOpen: handleDrawerOpen,
220
+ onClose: handleDrawerClose,
221
+ onGestureStart: handleGestureStart,
222
+ onGestureEnd: handleGestureEnd,
223
+ onGestureCancel: handleGestureCancel,
224
+ onTransitionStart: handleTransitionStart,
225
+ onTransitionEnd: handleTransitionEnd,
226
+ layout: dimensions,
227
+ direction: direction,
228
+ configureGestureHandler: configureGestureHandler,
229
+ swipeEnabled: swipeEnabled,
230
+ swipeEdgeWidth: swipeEdgeWidth,
231
+ swipeMinDistance: swipeMinDistance,
232
+ hideStatusBarOnOpen: drawerHideStatusBarOnOpen,
233
+ statusBarAnimation: drawerStatusBarAnimation,
234
+ keyboardDismissMode: keyboardDismissMode,
235
+ drawerType: drawerType,
236
+ overlayAccessibilityLabel: overlayAccessibilityLabel,
237
+ drawerPosition: drawerPosition,
238
+ drawerStyle: [{
239
+ backgroundColor: colors.card,
240
+ width: getDefaultSidebarWidth(dimensions)
241
+ }, drawerType === 'permanent' && ((Platform.OS === 'web' ? drawerPosition === 'right' : direction === 'rtl' && drawerPosition !== 'right' || direction !== 'rtl' && drawerPosition === 'right') ? {
242
+ borderLeftColor: colors.border,
243
+ borderLeftWidth: StyleSheet.hairlineWidth
244
+ } : {
245
+ borderRightColor: colors.border,
246
+ borderRightWidth: StyleSheet.hairlineWidth
247
+ }), drawerType === 'front' && (drawerPosition === 'left' ? {
248
+ borderTopRightRadius: DRAWER_BORDER_RADIUS,
249
+ borderBottomRightRadius: DRAWER_BORDER_RADIUS
250
+ } : {
251
+ borderTopLeftRadius: DRAWER_BORDER_RADIUS,
252
+ borderBottomLeftRadius: DRAWER_BORDER_RADIUS
253
+ }), drawerStyle],
254
+ overlayStyle: {
255
+ backgroundColor: overlayColor
256
+ },
257
+ renderDrawerContent: renderDrawerContent,
258
+ children: renderSceneContent()
259
+ })
260
+ });
248
261
  }
249
262
  export function DrawerView({
250
263
  navigation,
251
264
  ...rest
252
265
  }) {
253
- return /*#__PURE__*/React.createElement(SafeAreaProviderCompat, null, /*#__PURE__*/React.createElement(DrawerViewBase, _extends({
254
- navigation: navigation
255
- }, rest)));
266
+ return /*#__PURE__*/_jsx(SafeAreaProviderCompat, {
267
+ children: /*#__PURE__*/_jsx(DrawerViewBase, {
268
+ navigation: navigation,
269
+ ...rest
270
+ })
271
+ });
256
272
  }
257
273
  const styles = StyleSheet.create({
258
274
  content: {