@xaui/native 0.2.8 → 0.9.1-alpha.1
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/dist/chunk-KFCORXWW.cjs +150 -0
- package/dist/chunk-M7P46XKI.cjs +100 -0
- package/dist/chunk-N357EQCZ.js +150 -0
- package/dist/chunk-NHPQQQ7P.cjs +734 -0
- package/dist/chunk-PBVPOX7D.js +734 -0
- package/dist/chunk-RBNCR5KB.js +100 -0
- package/dist/index.cjs +40 -1
- package/dist/index.d.cts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +40 -0
- package/dist/system/index.cjs +7 -0
- package/dist/system/index.d.cts +83 -0
- package/dist/system/index.d.ts +83 -0
- package/dist/system/index.js +7 -0
- package/dist/theme/index.cjs +36 -0
- package/dist/theme/index.d.cts +539 -0
- package/dist/theme/index.d.ts +539 -0
- package/dist/theme/index.js +36 -0
- package/dist/theme.type-B3ODSLbB.d.cts +153 -0
- package/dist/theme.type-B3ODSLbB.d.ts +153 -0
- package/package.json +30 -248
- package/README.md +0 -178
- package/dist/alert/index.cjs +0 -340
- package/dist/alert/index.d.cts +0 -46
- package/dist/alert/index.d.ts +0 -46
- package/dist/alert/index.js +0 -340
- package/dist/app-bar/index.cjs +0 -148
- package/dist/app-bar/index.d.cts +0 -59
- package/dist/app-bar/index.d.ts +0 -59
- package/dist/app-bar/index.js +0 -148
- package/dist/autocomplete/index.cjs +0 -1122
- package/dist/autocomplete/index.d.cts +0 -88
- package/dist/autocomplete/index.d.ts +0 -88
- package/dist/autocomplete/index.js +0 -1122
- package/dist/avatar/index.cjs +0 -281
- package/dist/avatar/index.d.cts +0 -123
- package/dist/avatar/index.d.ts +0 -123
- package/dist/avatar/index.js +0 -281
- package/dist/badge/index.cjs +0 -197
- package/dist/badge/index.d.cts +0 -94
- package/dist/badge/index.d.ts +0 -94
- package/dist/badge/index.js +0 -197
- package/dist/bottom-sheet/index.cjs +0 -9
- package/dist/bottom-sheet/index.d.cts +0 -84
- package/dist/bottom-sheet/index.d.ts +0 -84
- package/dist/bottom-sheet/index.js +0 -9
- package/dist/bottom-tab-bar/index.cjs +0 -497
- package/dist/bottom-tab-bar/index.d.cts +0 -211
- package/dist/bottom-tab-bar/index.d.ts +0 -211
- package/dist/bottom-tab-bar/index.js +0 -497
- package/dist/button/index.cjs +0 -392
- package/dist/button/index.d.cts +0 -174
- package/dist/button/index.d.ts +0 -174
- package/dist/button/index.js +0 -392
- package/dist/button.type-j1ZdkkSl.d.cts +0 -4
- package/dist/button.type-j1ZdkkSl.d.ts +0 -4
- package/dist/card/index.cjs +0 -338
- package/dist/card/index.d.cts +0 -191
- package/dist/card/index.d.ts +0 -191
- package/dist/card/index.js +0 -338
- package/dist/carousel/index.cjs +0 -381
- package/dist/carousel/index.d.cts +0 -147
- package/dist/carousel/index.d.ts +0 -147
- package/dist/carousel/index.js +0 -381
- package/dist/chart/index.cjs +0 -1026
- package/dist/chart/index.d.cts +0 -218
- package/dist/chart/index.d.ts +0 -218
- package/dist/chart/index.js +0 -1026
- package/dist/checkbox/index.cjs +0 -443
- package/dist/checkbox/index.d.cts +0 -73
- package/dist/checkbox/index.d.ts +0 -73
- package/dist/checkbox/index.js +0 -443
- package/dist/chip/index.cjs +0 -503
- package/dist/chip/index.d.cts +0 -195
- package/dist/chip/index.d.ts +0 -195
- package/dist/chip/index.js +0 -503
- package/dist/chunk-4JFWQ5XT.js +0 -368
- package/dist/chunk-56RPWZD2.cjs +0 -9
- package/dist/chunk-7UFBLUMV.cjs +0 -136
- package/dist/chunk-A45TVXU5.js +0 -337
- package/dist/chunk-BYWUAPC4.cjs +0 -368
- package/dist/chunk-DECMUMCI.js +0 -0
- package/dist/chunk-DHSTKO3K.cjs +0 -19
- package/dist/chunk-DJ4Q37UT.cjs +0 -75
- package/dist/chunk-EUQDGTST.cjs +0 -1
- package/dist/chunk-GBHQCAKW.js +0 -19
- package/dist/chunk-RBSA4NH4.js +0 -136
- package/dist/chunk-SHBDANQN.js +0 -9
- package/dist/chunk-UGEINZM7.cjs +0 -290
- package/dist/chunk-UU4HHBDN.js +0 -290
- package/dist/chunk-VSZEXOUN.js +0 -384
- package/dist/chunk-YIEUN3G5.cjs +0 -384
- package/dist/chunk-ZH6ZSV2Q.cjs +0 -337
- package/dist/chunk-ZY7IUTAT.js +0 -75
- package/dist/color-picker/index.cjs +0 -457
- package/dist/color-picker/index.d.cts +0 -124
- package/dist/color-picker/index.d.ts +0 -124
- package/dist/color-picker/index.js +0 -457
- package/dist/core/index.cjs +0 -24
- package/dist/core/index.d.cts +0 -28
- package/dist/core/index.d.ts +0 -28
- package/dist/core/index.js +0 -24
- package/dist/datepicker/index.cjs +0 -1625
- package/dist/datepicker/index.d.cts +0 -45
- package/dist/datepicker/index.d.ts +0 -45
- package/dist/datepicker/index.js +0 -1625
- package/dist/dialog/index.cjs +0 -372
- package/dist/dialog/index.d.cts +0 -151
- package/dist/dialog/index.d.ts +0 -151
- package/dist/dialog/index.js +0 -372
- package/dist/divider/index.cjs +0 -8
- package/dist/divider/index.d.cts +0 -30
- package/dist/divider/index.d.ts +0 -30
- package/dist/divider/index.js +0 -8
- package/dist/drawer/index.cjs +0 -237
- package/dist/drawer/index.d.cts +0 -58
- package/dist/drawer/index.d.ts +0 -58
- package/dist/drawer/index.js +0 -237
- package/dist/expansion-panel/index.cjs +0 -441
- package/dist/expansion-panel/index.d.cts +0 -153
- package/dist/expansion-panel/index.d.ts +0 -153
- package/dist/expansion-panel/index.js +0 -441
- package/dist/fab/index.cjs +0 -9
- package/dist/fab/index.d.cts +0 -10
- package/dist/fab/index.d.ts +0 -10
- package/dist/fab/index.js +0 -9
- package/dist/fab-menu/index.cjs +0 -330
- package/dist/fab-menu/index.d.cts +0 -125
- package/dist/fab-menu/index.d.ts +0 -125
- package/dist/fab-menu/index.js +0 -330
- package/dist/fab.type-CkUHmXU_.d.ts +0 -86
- package/dist/fab.type-DN0vtAh6.d.cts +0 -86
- package/dist/feature-discovery/index.cjs +0 -464
- package/dist/feature-discovery/index.d.cts +0 -82
- package/dist/feature-discovery/index.d.ts +0 -82
- package/dist/feature-discovery/index.js +0 -464
- package/dist/indicator/index.cjs +0 -8
- package/dist/indicator/index.d.cts +0 -47
- package/dist/indicator/index.d.ts +0 -47
- package/dist/indicator/index.js +0 -8
- package/dist/input/index.cjs +0 -1462
- package/dist/input/index.d.cts +0 -522
- package/dist/input/index.d.ts +0 -522
- package/dist/input/index.js +0 -1462
- package/dist/input-trigger/index.cjs +0 -197
- package/dist/input-trigger/index.d.cts +0 -11
- package/dist/input-trigger/index.d.ts +0 -11
- package/dist/input-trigger/index.js +0 -197
- package/dist/input-trigger.type-Ba4bM3Qp.d.cts +0 -180
- package/dist/input-trigger.type-Ba4bM3Qp.d.ts +0 -180
- package/dist/list/index.cjs +0 -395
- package/dist/list/index.d.cts +0 -188
- package/dist/list/index.d.ts +0 -188
- package/dist/list/index.js +0 -395
- package/dist/menu/index.cjs +0 -316
- package/dist/menu/index.d.cts +0 -115
- package/dist/menu/index.d.ts +0 -115
- package/dist/menu/index.js +0 -316
- package/dist/menubox/index.cjs +0 -297
- package/dist/menubox/index.d.cts +0 -98
- package/dist/menubox/index.d.ts +0 -98
- package/dist/menubox/index.js +0 -297
- package/dist/pager/index.cjs +0 -205
- package/dist/pager/index.d.cts +0 -93
- package/dist/pager/index.d.ts +0 -93
- package/dist/pager/index.js +0 -205
- package/dist/picker/index.cjs +0 -244
- package/dist/picker/index.d.cts +0 -121
- package/dist/picker/index.d.ts +0 -121
- package/dist/picker/index.js +0 -244
- package/dist/progress/index.cjs +0 -219
- package/dist/progress/index.d.cts +0 -47
- package/dist/progress/index.d.ts +0 -47
- package/dist/progress/index.js +0 -219
- package/dist/radio/index.cjs +0 -465
- package/dist/radio/index.d.cts +0 -145
- package/dist/radio/index.d.ts +0 -145
- package/dist/radio/index.js +0 -465
- package/dist/refresh-control/index.cjs +0 -45
- package/dist/refresh-control/index.d.cts +0 -55
- package/dist/refresh-control/index.d.ts +0 -55
- package/dist/refresh-control/index.js +0 -45
- package/dist/segment-button/index.cjs +0 -405
- package/dist/segment-button/index.d.cts +0 -141
- package/dist/segment-button/index.d.ts +0 -141
- package/dist/segment-button/index.js +0 -405
- package/dist/select/index.cjs +0 -878
- package/dist/select/index.d.cts +0 -192
- package/dist/select/index.d.ts +0 -192
- package/dist/select/index.js +0 -878
- package/dist/skeleton/index.cjs +0 -89
- package/dist/skeleton/index.d.cts +0 -45
- package/dist/skeleton/index.d.ts +0 -45
- package/dist/skeleton/index.js +0 -89
- package/dist/slider/index.cjs +0 -576
- package/dist/slider/index.d.cts +0 -171
- package/dist/slider/index.d.ts +0 -171
- package/dist/slider/index.js +0 -576
- package/dist/snackbar/index.cjs +0 -436
- package/dist/snackbar/index.d.cts +0 -174
- package/dist/snackbar/index.d.ts +0 -174
- package/dist/snackbar/index.js +0 -436
- package/dist/snippet/index.cjs +0 -314
- package/dist/snippet/index.d.cts +0 -95
- package/dist/snippet/index.d.ts +0 -95
- package/dist/snippet/index.js +0 -314
- package/dist/stepper/index.cjs +0 -550
- package/dist/stepper/index.d.cts +0 -137
- package/dist/stepper/index.d.ts +0 -137
- package/dist/stepper/index.js +0 -550
- package/dist/switch/index.cjs +0 -358
- package/dist/switch/index.d.cts +0 -28
- package/dist/switch/index.d.ts +0 -28
- package/dist/switch/index.js +0 -358
- package/dist/tabs/index.cjs +0 -440
- package/dist/tabs/index.d.cts +0 -180
- package/dist/tabs/index.d.ts +0 -180
- package/dist/tabs/index.js +0 -440
- package/dist/timepicker/index.cjs +0 -823
- package/dist/timepicker/index.d.cts +0 -215
- package/dist/timepicker/index.d.ts +0 -215
- package/dist/timepicker/index.js +0 -823
- package/dist/toolbar/index.cjs +0 -333
- package/dist/toolbar/index.d.cts +0 -100
- package/dist/toolbar/index.d.ts +0 -100
- package/dist/toolbar/index.js +0 -333
- package/dist/typography/index.cjs +0 -238
- package/dist/typography/index.d.cts +0 -113
- package/dist/typography/index.d.ts +0 -113
- package/dist/typography/index.js +0 -238
- package/dist/view/index.cjs +0 -1361
- package/dist/view/index.d.cts +0 -833
- package/dist/view/index.d.ts +0 -833
- package/dist/view/index.js +0 -1361
package/dist/chunk-YIEUN3G5.cjs
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
|
-
|
|
3
|
-
var _chunk7UFBLUMVcjs = require('./chunk-7UFBLUMV.cjs');
|
|
4
|
-
|
|
5
|
-
// src/components/indicator/indicator.tsx
|
|
6
|
-
var _react = require('react'); var _react2 = _interopRequireDefault(_react);
|
|
7
|
-
var _reactnative = require('react-native');
|
|
8
|
-
|
|
9
|
-
// src/components/indicator/circular-activity-indicator.tsx
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
// src/components/indicator/indicator.style.ts
|
|
14
|
-
|
|
15
|
-
var styles = _reactnative.StyleSheet.create({
|
|
16
|
-
container: {
|
|
17
|
-
flexShrink: 1,
|
|
18
|
-
flexBasis: "auto",
|
|
19
|
-
width: "100%",
|
|
20
|
-
justifyContent: "center"
|
|
21
|
-
},
|
|
22
|
-
layer: {
|
|
23
|
-
..._reactnative.StyleSheet.absoluteFillObject,
|
|
24
|
-
justifyContent: "center",
|
|
25
|
-
alignItems: "center"
|
|
26
|
-
},
|
|
27
|
-
track: {
|
|
28
|
-
width: "100%",
|
|
29
|
-
overflow: "hidden"
|
|
30
|
-
},
|
|
31
|
-
progress: {
|
|
32
|
-
height: "100%"
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
// src/components/indicator/circular-activity-indicator.tsx
|
|
37
|
-
var _core = require('@xaui/core');
|
|
38
|
-
var DURATION = 1800;
|
|
39
|
-
var CircularActivityIndicator = ({
|
|
40
|
-
size = 40,
|
|
41
|
-
themeColor = "primary",
|
|
42
|
-
color,
|
|
43
|
-
backgroundColor,
|
|
44
|
-
disableAnimation = false,
|
|
45
|
-
showTrack = true
|
|
46
|
-
}) => {
|
|
47
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
48
|
-
const { current: timer } = _react.useRef.call(void 0, new _reactnative.Animated.Value(0));
|
|
49
|
-
const rotation = _react.useRef.call(void 0, void 0);
|
|
50
|
-
const startRotation = _react2.default.useCallback(() => {
|
|
51
|
-
if (rotation.current) {
|
|
52
|
-
timer.setValue(0);
|
|
53
|
-
_reactnative.Animated.loop(rotation.current).start();
|
|
54
|
-
}
|
|
55
|
-
}, [timer]);
|
|
56
|
-
const stopRotation = () => {
|
|
57
|
-
if (rotation.current) rotation.current.stop();
|
|
58
|
-
};
|
|
59
|
-
_react.useEffect.call(void 0, () => {
|
|
60
|
-
if (rotation.current === void 0) {
|
|
61
|
-
rotation.current = _reactnative.Animated.timing(timer, {
|
|
62
|
-
duration: DURATION,
|
|
63
|
-
easing: _reactnative.Easing.linear,
|
|
64
|
-
useNativeDriver: _reactnative.Platform.OS !== "web",
|
|
65
|
-
toValue: 1
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
if (!disableAnimation) startRotation();
|
|
69
|
-
else stopRotation();
|
|
70
|
-
}, [disableAnimation, startRotation, timer]);
|
|
71
|
-
const safeThemeColor = _core.getSafeThemeColor.call(void 0, themeColor);
|
|
72
|
-
const colorScheme = theme.colors[safeThemeColor];
|
|
73
|
-
const mainColor = color || colorScheme.main;
|
|
74
|
-
const trackColor = showTrack ? _nullishCoalesce(backgroundColor, () => ( colorScheme.container)) : "transparent";
|
|
75
|
-
const strokeWidth = size * 0.1;
|
|
76
|
-
const frames = 60 * DURATION / 1e3;
|
|
77
|
-
const easing = _reactnative.Easing.bezier(0.4, 0, 0.7, 1);
|
|
78
|
-
const containerStyle = {
|
|
79
|
-
width: size,
|
|
80
|
-
height: size / 2,
|
|
81
|
-
overflow: "hidden"
|
|
82
|
-
};
|
|
83
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.View, { style: [styles.container, { width: size, height: size }] }, /* @__PURE__ */ _react2.default.createElement(
|
|
84
|
-
_reactnative.View,
|
|
85
|
-
{
|
|
86
|
-
style: {
|
|
87
|
-
width: size,
|
|
88
|
-
height: size,
|
|
89
|
-
borderRadius: size / 2,
|
|
90
|
-
borderWidth: strokeWidth,
|
|
91
|
-
borderColor: trackColor
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
), /* @__PURE__ */ _react2.default.createElement(
|
|
95
|
-
_reactnative.View,
|
|
96
|
-
{
|
|
97
|
-
style: {
|
|
98
|
-
width: size,
|
|
99
|
-
height: size,
|
|
100
|
-
position: "absolute"
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
[0, 1].map((index) => {
|
|
104
|
-
const inputRange = Array.from(
|
|
105
|
-
new Array(frames),
|
|
106
|
-
(_, frameIndex) => frameIndex / (frames - 1)
|
|
107
|
-
);
|
|
108
|
-
const outputRange = Array.from(new Array(frames), (_, frameIndex) => {
|
|
109
|
-
let progress = 2 * frameIndex / (frames - 1);
|
|
110
|
-
const rotationValue = index ? +(360 - 15) : -(180 - 15);
|
|
111
|
-
if (progress > 1) {
|
|
112
|
-
progress = 2 - progress;
|
|
113
|
-
}
|
|
114
|
-
const direction = index ? -1 : 1;
|
|
115
|
-
return `${direction * (180 - 30) * easing(progress) + rotationValue}deg`;
|
|
116
|
-
});
|
|
117
|
-
const layerStyle = {
|
|
118
|
-
width: size,
|
|
119
|
-
height: size,
|
|
120
|
-
transform: [
|
|
121
|
-
{
|
|
122
|
-
rotate: timer.interpolate({
|
|
123
|
-
inputRange: [0, 1],
|
|
124
|
-
outputRange: [`${0 + 30 + 15}deg`, `${2 * 360 + 30 + 15}deg`]
|
|
125
|
-
})
|
|
126
|
-
}
|
|
127
|
-
]
|
|
128
|
-
};
|
|
129
|
-
const viewportStyle = {
|
|
130
|
-
width: size,
|
|
131
|
-
height: size,
|
|
132
|
-
transform: [
|
|
133
|
-
{ translateY: index ? -size / 2 : 0 },
|
|
134
|
-
{
|
|
135
|
-
rotate: timer.interpolate({ inputRange, outputRange })
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
};
|
|
139
|
-
const offsetStyle = index ? { top: size / 2 } : null;
|
|
140
|
-
const lineStyle = {
|
|
141
|
-
width: size,
|
|
142
|
-
height: size,
|
|
143
|
-
borderColor: mainColor,
|
|
144
|
-
borderWidth: strokeWidth,
|
|
145
|
-
borderRadius: size / 2
|
|
146
|
-
};
|
|
147
|
-
return /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { key: index, style: [styles.layer] }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: layerStyle }, /* @__PURE__ */ _react2.default.createElement(
|
|
148
|
-
_reactnative.Animated.View,
|
|
149
|
-
{
|
|
150
|
-
style: [containerStyle, offsetStyle],
|
|
151
|
-
collapsable: false
|
|
152
|
-
},
|
|
153
|
-
/* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: viewportStyle }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: containerStyle, collapsable: false }, /* @__PURE__ */ _react2.default.createElement(_reactnative.Animated.View, { style: lineStyle })))
|
|
154
|
-
)));
|
|
155
|
-
})
|
|
156
|
-
));
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
// src/components/indicator/linear-activity-indicator.tsx
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
var _reactnativereanimated = require('react-native-reanimated'); var _reactnativereanimated2 = _interopRequireDefault(_reactnativereanimated);
|
|
163
|
-
|
|
164
|
-
// src/components/indicator/indicator.hook.ts
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
var useLinearActivityIndicatorAnimation = (disableAnimation) => {
|
|
175
|
-
const primaryTranslateX = _reactnativereanimated.useSharedValue.call(void 0, 0);
|
|
176
|
-
const primaryScaleX = _reactnativereanimated.useSharedValue.call(void 0, 0.08);
|
|
177
|
-
const secondaryTranslateX = _reactnativereanimated.useSharedValue.call(void 0, 0);
|
|
178
|
-
const secondaryScaleX = _reactnativereanimated.useSharedValue.call(void 0, 0.08);
|
|
179
|
-
_react.useEffect.call(void 0, () => {
|
|
180
|
-
if (disableAnimation) {
|
|
181
|
-
_reactnativereanimated.cancelAnimation.call(void 0, primaryTranslateX);
|
|
182
|
-
_reactnativereanimated.cancelAnimation.call(void 0, primaryScaleX);
|
|
183
|
-
_reactnativereanimated.cancelAnimation.call(void 0, secondaryTranslateX);
|
|
184
|
-
_reactnativereanimated.cancelAnimation.call(void 0, secondaryScaleX);
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
primaryTranslateX.value = _reactnativereanimated.withRepeat.call(void 0,
|
|
188
|
-
_reactnativereanimated.withSequence.call(void 0,
|
|
189
|
-
_reactnativereanimated.withTiming.call(void 0, 0, { duration: 0 }),
|
|
190
|
-
_reactnativereanimated.withTiming.call(void 0, 0, { duration: 400, easing: _reactnativereanimated.Easing.linear }),
|
|
191
|
-
_reactnativereanimated.withTiming.call(void 0, 0.836714, {
|
|
192
|
-
duration: 783,
|
|
193
|
-
easing: _reactnativereanimated.Easing.bezier(0.5, 0, 0.701732, 0.495819)
|
|
194
|
-
}),
|
|
195
|
-
_reactnativereanimated.withTiming.call(void 0, 2.00611, {
|
|
196
|
-
duration: 817,
|
|
197
|
-
easing: _reactnativereanimated.Easing.bezier(0.302435, 0.381352, 0.55, 0.956352)
|
|
198
|
-
})
|
|
199
|
-
),
|
|
200
|
-
-1,
|
|
201
|
-
false
|
|
202
|
-
);
|
|
203
|
-
primaryScaleX.value = _reactnativereanimated.withRepeat.call(void 0,
|
|
204
|
-
_reactnativereanimated.withSequence.call(void 0,
|
|
205
|
-
_reactnativereanimated.withTiming.call(void 0, 0.08, { duration: 0 }),
|
|
206
|
-
_reactnativereanimated.withTiming.call(void 0, 0.08, { duration: 733, easing: _reactnativereanimated.Easing.linear }),
|
|
207
|
-
_reactnativereanimated.withTiming.call(void 0, 0.661479, {
|
|
208
|
-
duration: 650,
|
|
209
|
-
easing: _reactnativereanimated.Easing.bezier(0.334731, 0.12482, 0.785844, 1)
|
|
210
|
-
}),
|
|
211
|
-
_reactnativereanimated.withTiming.call(void 0, 0.08, {
|
|
212
|
-
duration: 617,
|
|
213
|
-
easing: _reactnativereanimated.Easing.bezier(0.06, 0.11, 0.6, 1)
|
|
214
|
-
})
|
|
215
|
-
),
|
|
216
|
-
-1,
|
|
217
|
-
false
|
|
218
|
-
);
|
|
219
|
-
secondaryTranslateX.value = _reactnativereanimated.withRepeat.call(void 0,
|
|
220
|
-
_reactnativereanimated.withSequence.call(void 0,
|
|
221
|
-
_reactnativereanimated.withTiming.call(void 0, 0, { duration: 0 }),
|
|
222
|
-
_reactnativereanimated.withTiming.call(void 0, 0.376519, {
|
|
223
|
-
duration: 500,
|
|
224
|
-
easing: _reactnativereanimated.Easing.bezier(0.15, 0, 0.515058, 0.409685)
|
|
225
|
-
}),
|
|
226
|
-
_reactnativereanimated.withTiming.call(void 0, 0.843862, {
|
|
227
|
-
duration: 467,
|
|
228
|
-
easing: _reactnativereanimated.Easing.bezier(0.31033, 0.284058, 0.8, 0.733712)
|
|
229
|
-
}),
|
|
230
|
-
_reactnativereanimated.withTiming.call(void 0, 1.60278, {
|
|
231
|
-
duration: 1033,
|
|
232
|
-
easing: _reactnativereanimated.Easing.bezier(0.4, 0.627035, 0.6, 0.902026)
|
|
233
|
-
})
|
|
234
|
-
),
|
|
235
|
-
-1,
|
|
236
|
-
false
|
|
237
|
-
);
|
|
238
|
-
secondaryScaleX.value = _reactnativereanimated.withRepeat.call(void 0,
|
|
239
|
-
_reactnativereanimated.withSequence.call(void 0,
|
|
240
|
-
_reactnativereanimated.withTiming.call(void 0, 0.08, { duration: 0 }),
|
|
241
|
-
_reactnativereanimated.withTiming.call(void 0, 0.457104, {
|
|
242
|
-
duration: 383,
|
|
243
|
-
easing: _reactnativereanimated.Easing.bezier(0.205028, 0.057051, 0.57661, 0.453971)
|
|
244
|
-
}),
|
|
245
|
-
_reactnativereanimated.withTiming.call(void 0, 0.72796, {
|
|
246
|
-
duration: 500,
|
|
247
|
-
easing: _reactnativereanimated.Easing.bezier(0.152313, 0.196432, 0.648374, 1.00432)
|
|
248
|
-
}),
|
|
249
|
-
_reactnativereanimated.withTiming.call(void 0, 0.08, {
|
|
250
|
-
duration: 1117,
|
|
251
|
-
easing: _reactnativereanimated.Easing.bezier(0.257759, -3163e-6, 0.211762, 1.38179)
|
|
252
|
-
})
|
|
253
|
-
),
|
|
254
|
-
-1,
|
|
255
|
-
false
|
|
256
|
-
);
|
|
257
|
-
return () => {
|
|
258
|
-
_reactnativereanimated.cancelAnimation.call(void 0, primaryTranslateX);
|
|
259
|
-
_reactnativereanimated.cancelAnimation.call(void 0, primaryScaleX);
|
|
260
|
-
_reactnativereanimated.cancelAnimation.call(void 0, secondaryTranslateX);
|
|
261
|
-
_reactnativereanimated.cancelAnimation.call(void 0, secondaryScaleX);
|
|
262
|
-
};
|
|
263
|
-
}, [disableAnimation]);
|
|
264
|
-
return {
|
|
265
|
-
primaryTranslateX,
|
|
266
|
-
primaryScaleX,
|
|
267
|
-
secondaryTranslateX,
|
|
268
|
-
secondaryScaleX
|
|
269
|
-
};
|
|
270
|
-
};
|
|
271
|
-
|
|
272
|
-
// src/components/indicator/linear-activity-indicator.tsx
|
|
273
|
-
var LinearActivityIndicator = ({
|
|
274
|
-
size = 4,
|
|
275
|
-
themeColor = "primary",
|
|
276
|
-
color,
|
|
277
|
-
backgroundColor,
|
|
278
|
-
disableAnimation = false,
|
|
279
|
-
borderRadius = 0,
|
|
280
|
-
showTrack = true
|
|
281
|
-
}) => {
|
|
282
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
283
|
-
const { primaryTranslateX, primaryScaleX, secondaryTranslateX, secondaryScaleX } = useLinearActivityIndicatorAnimation(disableAnimation);
|
|
284
|
-
const colorScheme = theme.colors[themeColor];
|
|
285
|
-
const mainColor = color || colorScheme.main;
|
|
286
|
-
const trackColor = showTrack ? _nullishCoalesce(backgroundColor, () => ( colorScheme.container)) : "transparent";
|
|
287
|
-
const barStyle = {
|
|
288
|
-
..._reactnative.StyleSheet.absoluteFillObject,
|
|
289
|
-
backgroundColor: mainColor,
|
|
290
|
-
borderRadius
|
|
291
|
-
};
|
|
292
|
-
const primaryStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
|
|
293
|
-
transform: [
|
|
294
|
-
{ translateX: `${(primaryTranslateX.value - 1.45167) * 100}%` },
|
|
295
|
-
{ scaleX: primaryScaleX.value }
|
|
296
|
-
]
|
|
297
|
-
}));
|
|
298
|
-
const secondaryStyle = _reactnativereanimated.useAnimatedStyle.call(void 0, () => ({
|
|
299
|
-
transform: [
|
|
300
|
-
{ translateX: `${(secondaryTranslateX.value - 0.548889) * 100}%` },
|
|
301
|
-
{ scaleX: secondaryScaleX.value }
|
|
302
|
-
]
|
|
303
|
-
}));
|
|
304
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
305
|
-
_reactnative.View,
|
|
306
|
-
{
|
|
307
|
-
style: {
|
|
308
|
-
height: size,
|
|
309
|
-
width: "100%",
|
|
310
|
-
borderRadius,
|
|
311
|
-
backgroundColor: trackColor,
|
|
312
|
-
overflow: "hidden"
|
|
313
|
-
}
|
|
314
|
-
},
|
|
315
|
-
/* @__PURE__ */ _react2.default.createElement(_reactnativereanimated2.default.View, { style: [barStyle, primaryStyle] }),
|
|
316
|
-
/* @__PURE__ */ _react2.default.createElement(_reactnativereanimated2.default.View, { style: [barStyle, secondaryStyle] })
|
|
317
|
-
);
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
// src/components/indicator/indicator.tsx
|
|
321
|
-
var ActivityIndicator = (props) => {
|
|
322
|
-
const {
|
|
323
|
-
variant = "circular",
|
|
324
|
-
themeColor = "primary",
|
|
325
|
-
color,
|
|
326
|
-
backgroundColor,
|
|
327
|
-
size,
|
|
328
|
-
disableAnimation = false,
|
|
329
|
-
borderRadius,
|
|
330
|
-
showTrack
|
|
331
|
-
} = props;
|
|
332
|
-
const theme = _chunk7UFBLUMVcjs.useXUITheme.call(void 0, );
|
|
333
|
-
const colorScheme = theme.colors[themeColor];
|
|
334
|
-
const mainColor = _nullishCoalesce(color, () => ( colorScheme.main));
|
|
335
|
-
const trackColor = _nullishCoalesce(backgroundColor, () => ( (showTrack ? colorScheme.container : "transparent")));
|
|
336
|
-
if (variant === "circular") {
|
|
337
|
-
const circleSize = _nullishCoalesce(size, () => ( 40));
|
|
338
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
339
|
-
_reactnative.View,
|
|
340
|
-
{
|
|
341
|
-
style: [styles.container, { width: circleSize, height: circleSize }],
|
|
342
|
-
accessible: true,
|
|
343
|
-
accessibilityRole: "progressbar",
|
|
344
|
-
accessibilityLabel: "Loading"
|
|
345
|
-
},
|
|
346
|
-
/* @__PURE__ */ _react2.default.createElement(
|
|
347
|
-
CircularActivityIndicator,
|
|
348
|
-
{
|
|
349
|
-
size: circleSize,
|
|
350
|
-
themeColor,
|
|
351
|
-
color: mainColor,
|
|
352
|
-
backgroundColor: trackColor,
|
|
353
|
-
disableAnimation
|
|
354
|
-
}
|
|
355
|
-
)
|
|
356
|
-
);
|
|
357
|
-
}
|
|
358
|
-
const linearSize = _nullishCoalesce(size, () => ( 4));
|
|
359
|
-
return /* @__PURE__ */ _react2.default.createElement(
|
|
360
|
-
_reactnative.View,
|
|
361
|
-
{
|
|
362
|
-
style: styles.container,
|
|
363
|
-
accessible: true,
|
|
364
|
-
accessibilityRole: "progressbar",
|
|
365
|
-
accessibilityLabel: "Loading"
|
|
366
|
-
},
|
|
367
|
-
/* @__PURE__ */ _react2.default.createElement(
|
|
368
|
-
LinearActivityIndicator,
|
|
369
|
-
{
|
|
370
|
-
size: linearSize,
|
|
371
|
-
themeColor,
|
|
372
|
-
color: mainColor,
|
|
373
|
-
backgroundColor: trackColor,
|
|
374
|
-
disableAnimation,
|
|
375
|
-
borderRadius,
|
|
376
|
-
showTrack
|
|
377
|
-
}
|
|
378
|
-
)
|
|
379
|
-
);
|
|
380
|
-
};
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
exports.ActivityIndicator = ActivityIndicator;
|