@xaui/native 0.0.26 → 0.0.28
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.
- package/LICENSE +21 -0
- package/README.md +105 -228
- package/dist/alert/index.cjs +92 -166
- package/dist/alert/index.js +2 -1
- package/dist/app-bar/index.cjs +24 -98
- package/dist/app-bar/index.js +2 -1
- package/dist/autocomplete/index.cjs +192 -281
- package/dist/autocomplete/index.js +36 -48
- package/dist/avatar/index.cjs +59 -133
- package/dist/avatar/index.js +2 -1
- package/dist/badge/index.cjs +26 -99
- package/dist/badge/index.js +2 -1
- package/dist/bottom-sheet/index.cjs +5 -456
- package/dist/bottom-sheet/index.js +4 -363
- package/dist/bottom-tab-bar/index.cjs +93 -167
- package/dist/bottom-tab-bar/index.js +2 -2
- package/dist/button/index.cjs +73 -525
- package/dist/button/index.js +3 -2
- package/dist/card/index.cjs +76 -169
- package/dist/card/index.js +2 -2
- package/dist/carousel/index.cjs +68 -145
- package/dist/carousel/index.js +1 -1
- package/dist/chart/index.cjs +132 -173
- package/dist/checkbox/index.cjs +70 -143
- package/dist/checkbox/index.js +2 -1
- package/dist/chip/index.cjs +89 -164
- package/dist/chip/index.js +2 -1
- package/dist/chunk-BD72HIPR.cjs +75 -0
- package/dist/chunk-DHSTKO3K.cjs +19 -0
- package/dist/{chunk-CZFDZPAS.js → chunk-DXXNBF5P.js} +5 -0
- package/dist/{chunk-UI5L26KD.js → chunk-F7WH4DMG.js} +1 -1
- package/dist/chunk-GBHQCAKW.js +19 -0
- package/dist/chunk-HC2SSHNU.js +368 -0
- package/dist/chunk-HSPTLUFA.cjs +7 -0
- package/dist/chunk-JEGEPGVU.js +287 -0
- package/dist/chunk-KTLGDLCB.cjs +287 -0
- package/dist/{chunk-GHCVNQET.js → chunk-LTKYHG5V.js} +5 -12
- package/dist/{chunk-ULJSCNPE.js → chunk-LUBWRVI2.js} +1 -1
- package/dist/chunk-OQ2BLOOG.cjs +138 -0
- package/dist/chunk-QMYWIWSX.cjs +384 -0
- package/dist/chunk-XFPPR2VB.cjs +368 -0
- package/dist/core/index.cjs +22 -168
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +5 -3
- package/dist/datepicker/index.cjs +239 -320
- package/dist/datepicker/index.js +2 -1
- package/dist/divider/index.cjs +5 -145
- package/dist/divider/index.js +3 -2
- package/dist/drawer/index.cjs +39 -112
- package/dist/drawer/index.js +2 -1
- package/dist/expansion-panel/index.cjs +91 -230
- package/dist/expansion-panel/index.js +3 -2
- package/dist/fab/index.cjs +6 -722
- package/dist/fab/index.js +4 -3
- package/dist/fab-menu/index.cjs +81 -814
- package/dist/fab-menu/index.js +4 -3
- package/dist/feature-discovery/index.cjs +72 -139
- package/dist/feature-discovery/index.js +2 -2
- package/dist/index.cjs +1 -18
- package/dist/indicator/index.cjs +5 -445
- package/dist/indicator/index.js +3 -2
- package/dist/input/index.cjs +214 -282
- package/dist/input/index.js +2 -2
- package/dist/list/index.cjs +71 -146
- package/dist/list/index.js +2 -1
- package/dist/menu/index.cjs +59 -127
- package/dist/menu/index.js +2 -2
- package/dist/menubox/index.cjs +60 -132
- package/dist/menubox/index.js +2 -1
- package/dist/pager/index.cjs +42 -80
- package/dist/progress/index.cjs +43 -114
- package/dist/progress/index.js +2 -1
- package/dist/radio/index.cjs +82 -154
- package/dist/radio/index.js +2 -1
- package/dist/segment-button/index.cjs +60 -147
- package/dist/segment-button/index.js +2 -2
- package/dist/select/index.cjs +149 -224
- package/dist/select/index.js +10 -22
- package/dist/skeleton/index.cjs +23 -94
- package/dist/skeleton/index.js +2 -2
- package/dist/slider/index.cjs +77 -156
- package/dist/slider/index.js +2 -1
- package/dist/snackbar/index.cjs +420 -0
- package/dist/snackbar/index.d.cts +175 -0
- package/dist/snackbar/index.d.ts +175 -0
- package/dist/snackbar/index.js +420 -0
- package/dist/stepper/index.cjs +121 -195
- package/dist/stepper/index.js +2 -1
- package/dist/switch/index.cjs +48 -121
- package/dist/switch/index.js +2 -1
- package/dist/tabs/index.cjs +67 -151
- package/dist/tabs/index.js +2 -1
- package/dist/timepicker/index.cjs +135 -593
- package/dist/timepicker/index.js +24 -383
- package/dist/toolbar/index.cjs +59 -128
- package/dist/toolbar/index.js +2 -1
- package/dist/typography/index.cjs +37 -92
- package/dist/typography/index.d.cts +1 -1
- package/dist/typography/index.d.ts +1 -1
- package/dist/typography/index.js +20 -1
- package/dist/view/index.cjs +178 -223
- package/package.json +7 -1
- package/dist/chunk-3XSXTM3G.js +0 -661
- package/dist/chunk-4KSZLONZ.js +0 -79
- package/dist/chunk-I4V5Y5GD.js +0 -76
- package/dist/chunk-URBEEDFX.js +0 -79
package/dist/datepicker/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import "../chunk-DXXNBF5P.js";
|
|
1
2
|
import {
|
|
2
3
|
Portal,
|
|
3
4
|
useXUITheme
|
|
4
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-LTKYHG5V.js";
|
|
5
6
|
|
|
6
7
|
// src/components/datepicker/datepicker.tsx
|
|
7
8
|
import React7, { useCallback as useCallback5, useMemo as useMemo6, useRef as useRef6 } from "react";
|
package/dist/divider/index.cjs
CHANGED
|
@@ -1,148 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Divider: () => Divider
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(divider_exports);
|
|
3
|
+
var _chunkBD72HIPRcjs = require('../chunk-BD72HIPR.cjs');
|
|
4
|
+
require('../chunk-HSPTLUFA.cjs');
|
|
5
|
+
require('../chunk-OQ2BLOOG.cjs');
|
|
36
6
|
|
|
37
|
-
// src/components/divider/divider.tsx
|
|
38
|
-
var import_react7 = __toESM(require("react"), 1);
|
|
39
|
-
var import_react_native5 = require("react-native");
|
|
40
7
|
|
|
41
|
-
|
|
42
|
-
var import_react_native = require("react-native");
|
|
43
|
-
var styles = import_react_native.StyleSheet.create({
|
|
44
|
-
horizontal: {
|
|
45
|
-
height: 1,
|
|
46
|
-
flexShrink: 1,
|
|
47
|
-
flexBasis: "auto",
|
|
48
|
-
width: "100%"
|
|
49
|
-
},
|
|
50
|
-
vertical: {
|
|
51
|
-
width: 1,
|
|
52
|
-
alignSelf: "stretch"
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
// src/components/divider/divider.hook.ts
|
|
57
|
-
var import_react6 = require("react");
|
|
58
|
-
|
|
59
|
-
// src/core/theme-context.tsx
|
|
60
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
61
|
-
var import_react_native3 = require("react-native");
|
|
62
|
-
var import_theme = require("@xaui/core/theme");
|
|
63
|
-
var import_palette = require("@xaui/core/palette");
|
|
64
|
-
|
|
65
|
-
// src/core/portal/portal.tsx
|
|
66
|
-
var import_react2 = require("react");
|
|
67
|
-
|
|
68
|
-
// src/core/portal/portal-context.ts
|
|
69
|
-
var import_react = require("react");
|
|
70
|
-
var PortalContext = (0, import_react.createContext)(null);
|
|
71
|
-
|
|
72
|
-
// src/core/portal/portal-host.tsx
|
|
73
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
74
|
-
var import_react_native2 = require("react-native");
|
|
75
|
-
var hostStyles = import_react_native2.StyleSheet.create({
|
|
76
|
-
container: {
|
|
77
|
-
flex: 1
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
// src/core/theme-context.tsx
|
|
82
|
-
var XUIThemeContext = (0, import_react4.createContext)(null);
|
|
83
|
-
|
|
84
|
-
// src/core/theme-hooks.ts
|
|
85
|
-
var import_react5 = require("react");
|
|
86
|
-
var import_react_native4 = require("react-native");
|
|
87
|
-
function useXUITheme() {
|
|
88
|
-
const theme = (0, import_react5.useContext)(XUIThemeContext);
|
|
89
|
-
if (!theme) {
|
|
90
|
-
throw new Error("useXUITheme must be used within XUIProvider");
|
|
91
|
-
}
|
|
92
|
-
return theme;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// src/core/index.ts
|
|
96
|
-
var import_theme2 = require("@xaui/core/theme");
|
|
97
|
-
|
|
98
|
-
// src/components/divider/divider.hook.ts
|
|
99
|
-
var import_core2 = require("@xaui/core");
|
|
100
|
-
var useDividerColor = (themeColor, customColor) => {
|
|
101
|
-
const theme = useXUITheme();
|
|
102
|
-
const dividerColor = (0, import_react6.useMemo)(() => {
|
|
103
|
-
if (customColor) {
|
|
104
|
-
return customColor;
|
|
105
|
-
}
|
|
106
|
-
const safeThemeColor = (0, import_core2.getSafeThemeColor)(themeColor);
|
|
107
|
-
return theme.colors[safeThemeColor].main;
|
|
108
|
-
}, [customColor, themeColor, theme]);
|
|
109
|
-
return dividerColor;
|
|
110
|
-
};
|
|
111
|
-
var useDividerSize = (size, orientation) => {
|
|
112
|
-
const sizeStyles = (0, import_react6.useMemo)(() => {
|
|
113
|
-
if (orientation === "horizontal") {
|
|
114
|
-
return {
|
|
115
|
-
height: size
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
width: size
|
|
120
|
-
};
|
|
121
|
-
}, [size, orientation]);
|
|
122
|
-
return sizeStyles;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
// src/components/divider/divider.tsx
|
|
126
|
-
var Divider = ({
|
|
127
|
-
size = 1,
|
|
128
|
-
themeColor = "default",
|
|
129
|
-
color,
|
|
130
|
-
orientation = "horizontal"
|
|
131
|
-
}) => {
|
|
132
|
-
const dividerColor = useDividerColor(themeColor, color);
|
|
133
|
-
const sizeStyles = useDividerSize(size, orientation);
|
|
134
|
-
return /* @__PURE__ */ import_react7.default.createElement(
|
|
135
|
-
import_react_native5.View,
|
|
136
|
-
{
|
|
137
|
-
style: [
|
|
138
|
-
orientation === "horizontal" ? styles.horizontal : styles.vertical,
|
|
139
|
-
sizeStyles,
|
|
140
|
-
{ backgroundColor: dividerColor }
|
|
141
|
-
]
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
};
|
|
145
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
-
0 && (module.exports = {
|
|
147
|
-
Divider
|
|
148
|
-
});
|
|
8
|
+
exports.Divider = _chunkBD72HIPRcjs.Divider;
|
package/dist/divider/index.js
CHANGED
package/dist/drawer/index.cjs
CHANGED
|
@@ -1,91 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }require('../chunk-HSPTLUFA.cjs');
|
|
29
2
|
|
|
30
|
-
|
|
31
|
-
var
|
|
32
|
-
__export(drawer_exports, {
|
|
33
|
-
Drawer: () => Drawer
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(drawer_exports);
|
|
3
|
+
|
|
4
|
+
var _chunkOQ2BLOOGcjs = require('../chunk-OQ2BLOOG.cjs');
|
|
36
5
|
|
|
37
6
|
// src/components/drawer/drawer.tsx
|
|
38
|
-
var
|
|
39
|
-
var
|
|
7
|
+
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
8
|
+
var _reactnative = require('react-native');
|
|
40
9
|
|
|
41
10
|
// src/components/drawer/drawer.hook.ts
|
|
42
|
-
var import_react6 = require("react");
|
|
43
|
-
var import_core = require("@xaui/core");
|
|
44
|
-
|
|
45
|
-
// src/core/theme-context.tsx
|
|
46
|
-
var import_react4 = __toESM(require("react"), 1);
|
|
47
|
-
var import_react_native2 = require("react-native");
|
|
48
|
-
var import_theme = require("@xaui/core/theme");
|
|
49
|
-
var import_palette = require("@xaui/core/palette");
|
|
50
|
-
|
|
51
|
-
// src/core/portal/portal.tsx
|
|
52
|
-
var import_react2 = require("react");
|
|
53
|
-
|
|
54
|
-
// src/core/portal/portal-context.ts
|
|
55
|
-
var import_react = require("react");
|
|
56
|
-
var PortalContext = (0, import_react.createContext)(null);
|
|
57
|
-
|
|
58
|
-
// src/core/portal/portal-host.tsx
|
|
59
|
-
var import_react3 = __toESM(require("react"), 1);
|
|
60
|
-
var import_react_native = require("react-native");
|
|
61
|
-
var hostStyles = import_react_native.StyleSheet.create({
|
|
62
|
-
container: {
|
|
63
|
-
flex: 1
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
// src/core/theme-context.tsx
|
|
68
|
-
var XUIThemeContext = (0, import_react4.createContext)(null);
|
|
69
|
-
|
|
70
|
-
// src/core/theme-hooks.ts
|
|
71
|
-
var import_react5 = require("react");
|
|
72
|
-
var import_react_native3 = require("react-native");
|
|
73
|
-
function useXUITheme() {
|
|
74
|
-
const theme = (0, import_react5.useContext)(XUIThemeContext);
|
|
75
|
-
if (!theme) {
|
|
76
|
-
throw new Error("useXUITheme must be used within XUIProvider");
|
|
77
|
-
}
|
|
78
|
-
return theme;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// src/core/index.ts
|
|
82
|
-
var import_theme2 = require("@xaui/core/theme");
|
|
83
11
|
|
|
84
|
-
|
|
12
|
+
var _core = require('@xaui/core');
|
|
85
13
|
var useDrawerStyles = (themeColor, position, width, height) => {
|
|
86
|
-
const theme = useXUITheme();
|
|
87
|
-
return (0,
|
|
88
|
-
const safeThemeColor = (0,
|
|
14
|
+
const theme = _chunkOQ2BLOOGcjs.useXUITheme.call(void 0, );
|
|
15
|
+
return _react.useMemo.call(void 0, () => {
|
|
16
|
+
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
89
17
|
const colorScheme = theme.colors[safeThemeColor];
|
|
90
18
|
const isDefaultThemeColor = safeThemeColor === "default";
|
|
91
19
|
const defaultBackgroundColor = theme.mode === "dark" ? theme.colors.default.background : "#FFFFFF";
|
|
@@ -113,8 +41,8 @@ var getTranslateValue = (position, size) => {
|
|
|
113
41
|
};
|
|
114
42
|
|
|
115
43
|
// src/components/drawer/drawer.style.ts
|
|
116
|
-
|
|
117
|
-
var styles =
|
|
44
|
+
|
|
45
|
+
var styles = _reactnative.StyleSheet.create({
|
|
118
46
|
overlay: {
|
|
119
47
|
position: "absolute",
|
|
120
48
|
top: 0,
|
|
@@ -163,21 +91,21 @@ var Drawer = ({
|
|
|
163
91
|
disableAnimation = false
|
|
164
92
|
}) => {
|
|
165
93
|
const DRAWER_ANIMATION_DURATION = 250;
|
|
166
|
-
const [isModalMounted, setIsModalMounted] = (0,
|
|
167
|
-
const [isModalVisible, setIsModalVisible] = (0,
|
|
168
|
-
const isModalMountedRef = (0,
|
|
169
|
-
const animationRef = (0,
|
|
94
|
+
const [isModalMounted, setIsModalMounted] = _react.useState.call(void 0, false);
|
|
95
|
+
const [isModalVisible, setIsModalVisible] = _react.useState.call(void 0, false);
|
|
96
|
+
const isModalMountedRef = _react.useRef.call(void 0, false);
|
|
97
|
+
const animationRef = _react.useRef.call(void 0, null);
|
|
170
98
|
const size = position === "left" || position === "right" ? width : height;
|
|
171
|
-
const initialTranslateValues = (0,
|
|
99
|
+
const initialTranslateValues = _react.useMemo.call(void 0,
|
|
172
100
|
() => getTranslateValue(position, size),
|
|
173
101
|
[position, size]
|
|
174
102
|
);
|
|
175
|
-
const translateX = (0,
|
|
176
|
-
const translateY = (0,
|
|
177
|
-
const overlayOpacity = (0,
|
|
103
|
+
const translateX = _react.useRef.call(void 0, new _reactnative.Animated.Value(initialTranslateValues.x)).current;
|
|
104
|
+
const translateY = _react.useRef.call(void 0, new _reactnative.Animated.Value(initialTranslateValues.y)).current;
|
|
105
|
+
const overlayOpacity = _react.useRef.call(void 0, new _reactnative.Animated.Value(0)).current;
|
|
178
106
|
const containerStyle = useDrawerStyles(themeColor, position, width, height);
|
|
179
107
|
const positionStyle = position === "left" ? styles.drawerLeft : position === "right" ? styles.drawerRight : position === "top" ? styles.drawerTop : styles.drawerBottom;
|
|
180
|
-
(0,
|
|
108
|
+
_react.useEffect.call(void 0, () => {
|
|
181
109
|
const translateValues = getTranslateValue(position, size);
|
|
182
110
|
if (animationRef.current) {
|
|
183
111
|
animationRef.current.stop();
|
|
@@ -198,20 +126,20 @@ var Drawer = ({
|
|
|
198
126
|
overlayOpacity.setValue(1);
|
|
199
127
|
return;
|
|
200
128
|
}
|
|
201
|
-
const animation2 =
|
|
202
|
-
|
|
129
|
+
const animation2 = _reactnative.Animated.parallel([
|
|
130
|
+
_reactnative.Animated.timing(translateX, {
|
|
203
131
|
toValue: 0,
|
|
204
132
|
duration: DRAWER_ANIMATION_DURATION,
|
|
205
|
-
easing:
|
|
133
|
+
easing: _reactnative.Easing.out(_reactnative.Easing.cubic),
|
|
206
134
|
useNativeDriver: true
|
|
207
135
|
}),
|
|
208
|
-
|
|
136
|
+
_reactnative.Animated.timing(translateY, {
|
|
209
137
|
toValue: 0,
|
|
210
138
|
duration: DRAWER_ANIMATION_DURATION,
|
|
211
|
-
easing:
|
|
139
|
+
easing: _reactnative.Easing.out(_reactnative.Easing.cubic),
|
|
212
140
|
useNativeDriver: true
|
|
213
141
|
}),
|
|
214
|
-
|
|
142
|
+
_reactnative.Animated.timing(overlayOpacity, {
|
|
215
143
|
toValue: 1,
|
|
216
144
|
duration: DRAWER_ANIMATION_DURATION,
|
|
217
145
|
useNativeDriver: true
|
|
@@ -237,20 +165,20 @@ var Drawer = ({
|
|
|
237
165
|
setIsModalMounted(false);
|
|
238
166
|
return;
|
|
239
167
|
}
|
|
240
|
-
const animation =
|
|
241
|
-
|
|
168
|
+
const animation = _reactnative.Animated.parallel([
|
|
169
|
+
_reactnative.Animated.timing(translateX, {
|
|
242
170
|
toValue: translateValues.x,
|
|
243
171
|
duration: DRAWER_ANIMATION_DURATION,
|
|
244
|
-
easing:
|
|
172
|
+
easing: _reactnative.Easing.in(_reactnative.Easing.cubic),
|
|
245
173
|
useNativeDriver: true
|
|
246
174
|
}),
|
|
247
|
-
|
|
175
|
+
_reactnative.Animated.timing(translateY, {
|
|
248
176
|
toValue: translateValues.y,
|
|
249
177
|
duration: DRAWER_ANIMATION_DURATION,
|
|
250
|
-
easing:
|
|
178
|
+
easing: _reactnative.Easing.in(_reactnative.Easing.cubic),
|
|
251
179
|
useNativeDriver: true
|
|
252
180
|
}),
|
|
253
|
-
|
|
181
|
+
_reactnative.Animated.timing(overlayOpacity, {
|
|
254
182
|
toValue: 0,
|
|
255
183
|
duration: DRAWER_ANIMATION_DURATION,
|
|
256
184
|
useNativeDriver: true
|
|
@@ -279,16 +207,16 @@ var Drawer = ({
|
|
|
279
207
|
if (!isModalMounted) {
|
|
280
208
|
return null;
|
|
281
209
|
}
|
|
282
|
-
return /* @__PURE__ */
|
|
283
|
-
|
|
210
|
+
return /* @__PURE__ */ _react2.default.createElement(
|
|
211
|
+
_reactnative.Modal,
|
|
284
212
|
{
|
|
285
213
|
transparent: true,
|
|
286
214
|
visible: isModalVisible,
|
|
287
215
|
animationType: "none",
|
|
288
216
|
onRequestClose: onClose
|
|
289
217
|
},
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
|
|
218
|
+
/* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: { flex: 1 } }, showOverlay && /* @__PURE__ */ _react2.default.createElement(_reactnative.Pressable, { onPress: onClose, style: { flex: 1 } }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: [styles.overlay, { opacity: overlayOpacity }] })), /* @__PURE__ */ _react2.default.createElement(
|
|
219
|
+
_reactnative.Animated.View,
|
|
292
220
|
{
|
|
293
221
|
style: [
|
|
294
222
|
styles.drawerContainer,
|
|
@@ -304,7 +232,6 @@ var Drawer = ({
|
|
|
304
232
|
))
|
|
305
233
|
);
|
|
306
234
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
});
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
exports.Drawer = Drawer;
|
package/dist/drawer/index.js
CHANGED