@ornikar/kitt-universal 7.2.0 → 7.3.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.
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts +1 -0
- package/dist/definitions/Button/BaseStyledButtonPressable.d.ts.map +1 -1
- package/dist/definitions/Button/Button.d.ts +1 -0
- package/dist/definitions/Button/Button.d.ts.map +1 -1
- package/dist/definitions/Button/ButtonContent.d.ts.map +1 -1
- package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts +3 -0
- package/dist/definitions/PageLoader/AnimatedBackgroundCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts +3 -0
- package/dist/definitions/PageLoader/AnimatedFillCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts +8 -0
- package/dist/definitions/PageLoader/AnimatedFillCircleContainer.d.ts.map +1 -0
- package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts +10 -0
- package/dist/definitions/PageLoader/AnimatedLoaderCircle.d.ts.map +1 -0
- package/dist/definitions/PageLoader/PageLoader.d.ts.map +1 -1
- package/dist/definitions/PageLoader/PageLoader.web.d.ts.map +1 -1
- package/dist/definitions/forms/DatePicker/DatePickerInputPart.d.ts.map +1 -1
- package/dist/definitions/forms/InputText/InputText.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/button.d.ts +2 -1
- package/dist/definitions/themes/late-ocean/button.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/input.d.ts +2 -2
- package/dist/definitions/themes/late-ocean/input.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts +13 -0
- package/dist/definitions/themes/late-ocean/pageLoader.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +218 -29
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +218 -29
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +218 -29
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +113 -35
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +213 -24
- package/dist/index-node-14.17.cjs.js.map +1 -1
- package/dist/index-node-14.17.cjs.web.css +1 -1
- package/dist/index-node-14.17.cjs.web.js +102 -29
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +26 -3
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +26 -3
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +26 -3
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +26 -3
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +26 -3
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +26 -3
- package/dist/linaria-themes-node-14.17.cjs.web.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +9 -4
|
@@ -2,12 +2,12 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { UserIcon, CheckboxMark, XIcon, EyeOffIcon, EyeIcon, ArcIcon, InfoIcon, AlertTriangleIcon, CheckIcon, AlertCircleIcon, TooltipArrowIcon } from '@ornikar/kitt-icons';
|
|
4
4
|
export * from '@ornikar/kitt-icons';
|
|
5
|
-
import { useWindowDimensions, Platform, Image, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing
|
|
5
|
+
import { useWindowDimensions, Platform, Image, Linking, Pressable, StyleSheet, ScrollView, Modal as Modal$1, Text as Text$1, TextInput, View, Animated as Animated$1, Easing } from 'react-native';
|
|
6
6
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
7
7
|
import styled, { css, useTheme, ThemeProvider } from 'styled-components/native';
|
|
8
8
|
import { cloneElement, useContext, createContext, forwardRef, useMemo, useState, useRef, useEffect, Fragment as Fragment$1, Children } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
|
-
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring,
|
|
10
|
+
import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, useAnimatedProps, withDelay, withTiming, Easing as Easing$1, withRepeat, interpolate } from 'react-native-reanimated';
|
|
11
11
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
12
12
|
import { parse } from 'twemoji-parser';
|
|
13
13
|
import { openBrowserAsync } from 'expo-web-browser';
|
|
@@ -16,6 +16,7 @@ import { FormattedMessage } from 'react-intl';
|
|
|
16
16
|
import { styled as styled$1 } from '@linaria/react';
|
|
17
17
|
import _extends from '@babel/runtime/helpers/extends';
|
|
18
18
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
|
+
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
19
20
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
20
21
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
21
22
|
import { makeDecorator } from '@storybook/addons';
|
|
@@ -495,11 +496,14 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
495
496
|
}, function (_ref7) {
|
|
496
497
|
var theme = _ref7.theme,
|
|
497
498
|
$isLarge = _ref7.$isLarge,
|
|
499
|
+
$isXLarge = _ref7.$isXLarge,
|
|
498
500
|
$isDisabled = _ref7.$isDisabled;
|
|
499
501
|
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
500
502
|
large = _theme$kitt$button$co.large,
|
|
501
503
|
defaultPadding = _theme$kitt$button$co["default"],
|
|
502
|
-
disabledPadding = _theme$kitt$button$co.disabled
|
|
504
|
+
disabledPadding = _theme$kitt$button$co.disabled,
|
|
505
|
+
xLarge = _theme$kitt$button$co.xLarge;
|
|
506
|
+
if ($isXLarge) return xLarge;
|
|
503
507
|
if ($isLarge) return large;
|
|
504
508
|
if ($isDisabled) return disabledPadding;
|
|
505
509
|
return defaultPadding;
|
|
@@ -558,6 +562,9 @@ var getTextColorByType = function (type, variant) {
|
|
|
558
562
|
case 'subtle-dark':
|
|
559
563
|
return 'black';
|
|
560
564
|
|
|
565
|
+
case 'default':
|
|
566
|
+
return variant === 'ghost' ? 'white' : 'black';
|
|
567
|
+
|
|
561
568
|
default:
|
|
562
569
|
return 'black';
|
|
563
570
|
}
|
|
@@ -712,6 +719,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
712
719
|
return theme.kitt.button.borderRadius;
|
|
713
720
|
});
|
|
714
721
|
|
|
722
|
+
var allowedGhostTypes = ['primary', 'default'];
|
|
715
723
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
716
724
|
var children = _ref.children,
|
|
717
725
|
_ref$type = _ref.type,
|
|
@@ -721,6 +729,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
721
729
|
disabled = _ref.disabled,
|
|
722
730
|
stretch = _ref.stretch,
|
|
723
731
|
large = _ref.large,
|
|
732
|
+
xLarge = _ref.xLarge,
|
|
724
733
|
icon = _ref.icon,
|
|
725
734
|
_ref$iconPosition = _ref.iconPosition,
|
|
726
735
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
@@ -731,8 +740,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
731
740
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
732
741
|
onPress = _ref.onPress;
|
|
733
742
|
|
|
734
|
-
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type
|
|
735
|
-
throw new Error('variant=ghost is only allowed with type=primary');
|
|
743
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
|
|
744
|
+
throw new Error('variant=ghost is only allowed with type=primary or default');
|
|
736
745
|
}
|
|
737
746
|
|
|
738
747
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
@@ -751,6 +760,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
751
760
|
$variant: variant,
|
|
752
761
|
$isStretch: stretch,
|
|
753
762
|
$isLarge: large,
|
|
763
|
+
$isXLarge: xLarge,
|
|
754
764
|
$isDisabled: disabled,
|
|
755
765
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
756
766
|
type: type,
|
|
@@ -960,6 +970,7 @@ var button = {
|
|
|
960
970
|
contentPadding: {
|
|
961
971
|
"default": '7px 16px 7px',
|
|
962
972
|
large: '11px 24px 11px',
|
|
973
|
+
xLarge: '15px 24px 15px',
|
|
963
974
|
disabled: '5px 14px 5px'
|
|
964
975
|
},
|
|
965
976
|
transition: {
|
|
@@ -972,6 +983,15 @@ var button = {
|
|
|
972
983
|
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
973
984
|
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
974
985
|
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
986
|
+
},
|
|
987
|
+
ghost: {
|
|
988
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
989
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
990
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
991
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
992
|
+
color: lateOceanColorPalette.white,
|
|
993
|
+
hoverColor: lateOceanColorPalette.white,
|
|
994
|
+
activeColor: lateOceanColorPalette.white
|
|
975
995
|
}
|
|
976
996
|
},
|
|
977
997
|
primary: {
|
|
@@ -1211,8 +1231,8 @@ var input = {
|
|
|
1211
1231
|
size: 20
|
|
1212
1232
|
},
|
|
1213
1233
|
padding: {
|
|
1214
|
-
|
|
1215
|
-
|
|
1234
|
+
horizontal: 16,
|
|
1235
|
+
vertical: 5
|
|
1216
1236
|
},
|
|
1217
1237
|
transition: {
|
|
1218
1238
|
property: 'border-color',
|
|
@@ -1327,7 +1347,20 @@ var listItem = {
|
|
|
1327
1347
|
};
|
|
1328
1348
|
|
|
1329
1349
|
var pageLoader = {
|
|
1330
|
-
size: 60
|
|
1350
|
+
size: 60,
|
|
1351
|
+
strokeWidth: 3,
|
|
1352
|
+
colors: {
|
|
1353
|
+
base: colors.separator,
|
|
1354
|
+
fill: colors.primary
|
|
1355
|
+
},
|
|
1356
|
+
animation: {
|
|
1357
|
+
delay: 500,
|
|
1358
|
+
circleBackgroundFillDuration: 1000,
|
|
1359
|
+
filledCircleFillDuration: 1800,
|
|
1360
|
+
groupFilledCircleRotationDuration: 1800,
|
|
1361
|
+
filledCircleRotationDuration: 2160,
|
|
1362
|
+
fillEasingFunction: [0.39, 0.575, 0.565, 1]
|
|
1363
|
+
}
|
|
1331
1364
|
};
|
|
1332
1365
|
|
|
1333
1366
|
var shadows = {
|
|
@@ -1623,7 +1656,7 @@ var ViewInput = /*#__PURE__*/styled.View.withConfig({
|
|
|
1623
1656
|
displayName: "DatePickerInputPart__ViewInput"
|
|
1624
1657
|
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
|
|
1625
1658
|
var theme = _ref.theme;
|
|
1626
|
-
return theme.kitt.forms.input.padding
|
|
1659
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
1627
1660
|
}, function (_ref2) {
|
|
1628
1661
|
var theme = _ref2.theme;
|
|
1629
1662
|
return theme.kitt.forms.input.minHeight;
|
|
@@ -2389,20 +2422,18 @@ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
2389
2422
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
2390
2423
|
var theme = _ref.theme,
|
|
2391
2424
|
multiline = _ref.multiline;
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
return theme.kitt.forms.input.padding["default"];
|
|
2425
|
+
if (!multiline && Platform.OS !== 'web') return "0 ".concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
2426
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
2398
2427
|
}, function (_ref2) {
|
|
2399
2428
|
var theme = _ref2.theme,
|
|
2400
2429
|
multiline = _ref2.multiline;
|
|
2401
|
-
if (!multiline && Platform.OS
|
|
2430
|
+
if (!multiline && Platform.OS !== 'web') return 0;
|
|
2402
2431
|
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2403
2432
|
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
2404
2433
|
}, function (_ref3) {
|
|
2405
|
-
var
|
|
2434
|
+
var theme = _ref3.theme,
|
|
2435
|
+
_ref3$$minHeight = _ref3.$minHeight,
|
|
2436
|
+
$minHeight = _ref3$$minHeight === void 0 ? theme.kitt.forms.input.minHeight : _ref3$$minHeight;
|
|
2406
2437
|
return $minHeight;
|
|
2407
2438
|
});
|
|
2408
2439
|
var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
@@ -2411,8 +2442,7 @@ var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2411
2442
|
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
2412
2443
|
var id = _ref4.id,
|
|
2413
2444
|
right = _ref4.right,
|
|
2414
|
-
|
|
2415
|
-
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
2445
|
+
minHeight = _ref4.minHeight,
|
|
2416
2446
|
formState = _ref4.state,
|
|
2417
2447
|
internalForceState = _ref4.internalForceState,
|
|
2418
2448
|
_ref4$disabled = _ref4.disabled,
|
|
@@ -3295,19 +3325,178 @@ function Notification(_ref) {
|
|
|
3295
3325
|
});
|
|
3296
3326
|
}
|
|
3297
3327
|
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3328
|
+
var AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
|
|
3329
|
+
function AnimatedLoaderCircle(_ref) {
|
|
3330
|
+
var color = _ref.color,
|
|
3331
|
+
progress = _ref.progress;
|
|
3332
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3333
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3334
|
+
strokeWidth = _theme$kitt$pageLoade.strokeWidth,
|
|
3335
|
+
size = _theme$kitt$pageLoade.size;
|
|
3336
|
+
var centerCoord = size * 0.5;
|
|
3337
|
+
var circlePerimeter = 2 * Math.PI * (size * 0.5 - strokeWidth);
|
|
3338
|
+
var strokeAnimation = useAnimatedProps(function () {
|
|
3339
|
+
var _f = function () {
|
|
3340
|
+
return {
|
|
3341
|
+
strokeDashoffset: circlePerimeter - circlePerimeter * progress.value
|
|
3342
|
+
};
|
|
3343
|
+
};
|
|
3344
|
+
|
|
3345
|
+
_f._closure = {
|
|
3346
|
+
circlePerimeter: circlePerimeter,
|
|
3347
|
+
progress: progress
|
|
3348
|
+
};
|
|
3349
|
+
_f.asString = "function _f(){const{circlePerimeter,progress}=jsThis._closure;{return{strokeDashoffset:circlePerimeter-circlePerimeter*progress.value};}}";
|
|
3350
|
+
_f.__workletHash = 1345639818356;
|
|
3351
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedLoaderCircle.tsx (23:43)";
|
|
3352
|
+
|
|
3353
|
+
global.__reanimatedWorkletInit(_f);
|
|
3354
|
+
|
|
3355
|
+
return _f;
|
|
3356
|
+
}());
|
|
3357
|
+
return /*#__PURE__*/jsx(AnimatedCircle, {
|
|
3358
|
+
"transform-origin": "center center",
|
|
3359
|
+
strokeWidth: strokeWidth,
|
|
3360
|
+
stroke: color,
|
|
3361
|
+
strokeLinecap: "round",
|
|
3362
|
+
cx: centerCoord,
|
|
3363
|
+
cy: centerCoord,
|
|
3364
|
+
r: centerCoord - strokeWidth,
|
|
3365
|
+
fill: "none",
|
|
3366
|
+
strokeDasharray: circlePerimeter,
|
|
3367
|
+
animatedProps: strokeAnimation
|
|
3368
|
+
});
|
|
3301
3369
|
}
|
|
3302
3370
|
|
|
3303
|
-
function
|
|
3371
|
+
function AnimatedBackgroundCircle() {
|
|
3372
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3373
|
+
var progress = useSharedValue(0);
|
|
3374
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3375
|
+
animation = _theme$kitt$pageLoade.animation,
|
|
3376
|
+
colors = _theme$kitt$pageLoade.colors,
|
|
3377
|
+
size = _theme$kitt$pageLoade.size;
|
|
3378
|
+
useEffect(function () {
|
|
3379
|
+
var delay = animation.delay,
|
|
3380
|
+
circleBackgroundFillDuration = animation.circleBackgroundFillDuration,
|
|
3381
|
+
fillEasingFunction = animation.fillEasingFunction;
|
|
3382
|
+
|
|
3383
|
+
var _fillEasingFunction = _slicedToArray(fillEasingFunction, 4),
|
|
3384
|
+
x1 = _fillEasingFunction[0],
|
|
3385
|
+
y1 = _fillEasingFunction[1],
|
|
3386
|
+
x2 = _fillEasingFunction[2],
|
|
3387
|
+
y2 = _fillEasingFunction[3];
|
|
3388
|
+
|
|
3389
|
+
progress.value = withDelay(delay, withTiming(1, {
|
|
3390
|
+
duration: circleBackgroundFillDuration,
|
|
3391
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
3392
|
+
}));
|
|
3393
|
+
}, [progress, animation]);
|
|
3394
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
3395
|
+
width: size,
|
|
3396
|
+
height: size,
|
|
3397
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
3398
|
+
children: /*#__PURE__*/jsx(AnimatedLoaderCircle, {
|
|
3399
|
+
color: colors.base,
|
|
3400
|
+
progress: progress
|
|
3401
|
+
})
|
|
3402
|
+
});
|
|
3403
|
+
}
|
|
3404
|
+
|
|
3405
|
+
var isInfinitAnimation$1 = -1;
|
|
3406
|
+
function AnimatedFillCircleContainer(_ref) {
|
|
3407
|
+
var children = _ref.children,
|
|
3408
|
+
duration = _ref.duration;
|
|
3304
3409
|
var theme = /*#__PURE__*/useTheme();
|
|
3305
|
-
var
|
|
3306
|
-
var
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3410
|
+
var progress = useSharedValue(0);
|
|
3411
|
+
var animation = theme.kitt.pageLoader.animation;
|
|
3412
|
+
useEffect(function () {
|
|
3413
|
+
var delay = animation.delay;
|
|
3414
|
+
progress.value = withDelay(delay, withRepeat(withTiming(1, {
|
|
3415
|
+
duration: duration,
|
|
3416
|
+
easing: Easing$1.linear
|
|
3417
|
+
}), isInfinitAnimation$1));
|
|
3418
|
+
}, [progress, animation, duration]);
|
|
3419
|
+
var rotationStyles = useAnimatedStyle(function () {
|
|
3420
|
+
var _f = function () {
|
|
3421
|
+
return {
|
|
3422
|
+
transform: [{
|
|
3423
|
+
rotate: "".concat(360 * progress.value, "deg")
|
|
3424
|
+
}]
|
|
3425
|
+
};
|
|
3426
|
+
};
|
|
3427
|
+
|
|
3428
|
+
_f._closure = {
|
|
3429
|
+
progress: progress
|
|
3430
|
+
};
|
|
3431
|
+
_f.asString = "function _f(){const{progress}=jsThis._closure;{return{transform:[{rotate:360*progress.value+\"deg\"}]};}}";
|
|
3432
|
+
_f.__workletHash = 16553090406738;
|
|
3433
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedFillCircleContainer.tsx (36:42)";
|
|
3434
|
+
_f.__optimalization = 3;
|
|
3435
|
+
|
|
3436
|
+
global.__reanimatedWorkletInit(_f);
|
|
3437
|
+
|
|
3438
|
+
return _f;
|
|
3439
|
+
}());
|
|
3440
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
3441
|
+
style: [StyleSheet.absoluteFill, rotationStyles],
|
|
3442
|
+
children: children
|
|
3443
|
+
});
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
var isInfinitAnimation = -1;
|
|
3447
|
+
var shouldReverse = true;
|
|
3448
|
+
function AnimatedFilledCircle() {
|
|
3449
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3450
|
+
var progress = useSharedValue(0);
|
|
3451
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3452
|
+
size = _theme$kitt$pageLoade.size,
|
|
3453
|
+
animation = _theme$kitt$pageLoade.animation,
|
|
3454
|
+
colors = _theme$kitt$pageLoade.colors;
|
|
3455
|
+
useEffect(function () {
|
|
3456
|
+
var delay = animation.delay,
|
|
3457
|
+
filledCircleFillDuration = animation.filledCircleFillDuration,
|
|
3458
|
+
fillEasingFunction = animation.fillEasingFunction;
|
|
3459
|
+
|
|
3460
|
+
var _fillEasingFunction = _slicedToArray(fillEasingFunction, 4),
|
|
3461
|
+
x1 = _fillEasingFunction[0],
|
|
3462
|
+
y1 = _fillEasingFunction[1],
|
|
3463
|
+
x2 = _fillEasingFunction[2],
|
|
3464
|
+
y2 = _fillEasingFunction[3];
|
|
3465
|
+
|
|
3466
|
+
progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
|
|
3467
|
+
duration: filledCircleFillDuration,
|
|
3468
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
3469
|
+
}), isInfinitAnimation, shouldReverse));
|
|
3470
|
+
}, [progress, animation]);
|
|
3471
|
+
return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
3472
|
+
duration: animation.groupFilledCircleRotationDuration,
|
|
3473
|
+
children: /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
3474
|
+
duration: animation.filledCircleRotationDuration,
|
|
3475
|
+
children: /*#__PURE__*/jsx(Svg, {
|
|
3476
|
+
width: size,
|
|
3477
|
+
height: size,
|
|
3478
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
3479
|
+
children: /*#__PURE__*/jsx(AnimatedLoaderCircle, {
|
|
3480
|
+
color: colors.fill,
|
|
3481
|
+
progress: progress
|
|
3482
|
+
})
|
|
3483
|
+
})
|
|
3484
|
+
})
|
|
3485
|
+
});
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
var PageLoaderContainer = /*#__PURE__*/styled.View.withConfig({
|
|
3489
|
+
displayName: "PageLoader__PageLoaderContainer"
|
|
3490
|
+
})(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], function (_ref) {
|
|
3491
|
+
var theme = _ref.theme;
|
|
3492
|
+
return theme.kitt.pageLoader.size;
|
|
3493
|
+
}, function (_ref2) {
|
|
3494
|
+
var theme = _ref2.theme;
|
|
3495
|
+
return theme.kitt.pageLoader.size;
|
|
3496
|
+
});
|
|
3497
|
+
function PageLoader() {
|
|
3498
|
+
return /*#__PURE__*/jsxs(PageLoaderContainer, {
|
|
3499
|
+
children: [/*#__PURE__*/jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsx(AnimatedFilledCircle, {})]
|
|
3311
3500
|
});
|
|
3312
3501
|
}
|
|
3313
3502
|
|