@ornikar/kitt-universal 7.2.0 → 7.5.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 +219 -29
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +219 -29
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +219 -29
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +114 -35
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +214 -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 +103 -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 +10 -5
|
@@ -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';
|
|
@@ -15,6 +15,7 @@ import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/d
|
|
|
15
15
|
import { FormattedMessage } from 'react-intl';
|
|
16
16
|
import _extends from '@babel/runtime/helpers/extends';
|
|
17
17
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
18
|
+
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
18
19
|
import { LinearGradient } from 'expo-linear-gradient';
|
|
19
20
|
import { useFloating, offset, shift, flip } from '@floating-ui/react-native';
|
|
20
21
|
import { makeDecorator } from '@storybook/addons';
|
|
@@ -494,11 +495,14 @@ var BaseStyledButtonPressable = /*#__PURE__*/styled.View.withConfig({
|
|
|
494
495
|
}, function (_ref7) {
|
|
495
496
|
var theme = _ref7.theme,
|
|
496
497
|
$isLarge = _ref7.$isLarge,
|
|
498
|
+
$isXLarge = _ref7.$isXLarge,
|
|
497
499
|
$isDisabled = _ref7.$isDisabled;
|
|
498
500
|
var _theme$kitt$button$co = theme.kitt.button.contentPadding,
|
|
499
501
|
large = _theme$kitt$button$co.large,
|
|
500
502
|
defaultPadding = _theme$kitt$button$co["default"],
|
|
501
|
-
disabledPadding = _theme$kitt$button$co.disabled
|
|
503
|
+
disabledPadding = _theme$kitt$button$co.disabled,
|
|
504
|
+
xLarge = _theme$kitt$button$co.xLarge;
|
|
505
|
+
if ($isXLarge) return xLarge;
|
|
502
506
|
if ($isLarge) return large;
|
|
503
507
|
if ($isDisabled) return disabledPadding;
|
|
504
508
|
return defaultPadding;
|
|
@@ -557,6 +561,9 @@ var getTextColorByType = function (type, variant) {
|
|
|
557
561
|
case 'subtle-dark':
|
|
558
562
|
return 'black';
|
|
559
563
|
|
|
564
|
+
case 'default':
|
|
565
|
+
return variant === 'ghost' ? 'white' : 'black';
|
|
566
|
+
|
|
560
567
|
default:
|
|
561
568
|
return 'black';
|
|
562
569
|
}
|
|
@@ -711,6 +718,7 @@ var StyledDisabled = /*#__PURE__*/styled.View.withConfig({
|
|
|
711
718
|
return theme.kitt.button.borderRadius;
|
|
712
719
|
});
|
|
713
720
|
|
|
721
|
+
var allowedGhostTypes = ['primary', 'default'];
|
|
714
722
|
var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
715
723
|
var children = _ref.children,
|
|
716
724
|
_ref$type = _ref.type,
|
|
@@ -720,6 +728,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
720
728
|
disabled = _ref.disabled,
|
|
721
729
|
stretch = _ref.stretch,
|
|
722
730
|
large = _ref.large,
|
|
731
|
+
xLarge = _ref.xLarge,
|
|
723
732
|
icon = _ref.icon,
|
|
724
733
|
_ref$iconPosition = _ref.iconPosition,
|
|
725
734
|
iconPosition = _ref$iconPosition === void 0 ? 'left' : _ref$iconPosition,
|
|
@@ -730,8 +739,8 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
730
739
|
accessibilityRole = _ref$accessibilityRol === void 0 ? 'button' : _ref$accessibilityRol,
|
|
731
740
|
onPress = _ref.onPress;
|
|
732
741
|
|
|
733
|
-
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type
|
|
734
|
-
throw new Error('variant=ghost is only allowed with type=primary');
|
|
742
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
|
|
743
|
+
throw new Error('variant=ghost is only allowed with type=primary or default');
|
|
735
744
|
}
|
|
736
745
|
|
|
737
746
|
return /*#__PURE__*/jsx(AnimatedButtonPressable, {
|
|
@@ -750,6 +759,7 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
750
759
|
$variant: variant,
|
|
751
760
|
$isStretch: stretch,
|
|
752
761
|
$isLarge: large,
|
|
762
|
+
$isXLarge: xLarge,
|
|
753
763
|
$isDisabled: disabled,
|
|
754
764
|
children: [/*#__PURE__*/jsx(ButtonContent, {
|
|
755
765
|
type: type,
|
|
@@ -959,6 +969,7 @@ var button = {
|
|
|
959
969
|
contentPadding: {
|
|
960
970
|
"default": '7px 16px 7px',
|
|
961
971
|
large: '11px 24px 11px',
|
|
972
|
+
xLarge: '15px 24px 15px',
|
|
962
973
|
disabled: '5px 14px 5px'
|
|
963
974
|
},
|
|
964
975
|
transition: {
|
|
@@ -971,6 +982,15 @@ var button = {
|
|
|
971
982
|
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
972
983
|
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
973
984
|
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
985
|
+
},
|
|
986
|
+
ghost: {
|
|
987
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
988
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
989
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
990
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
991
|
+
color: lateOceanColorPalette.white,
|
|
992
|
+
hoverColor: lateOceanColorPalette.white,
|
|
993
|
+
activeColor: lateOceanColorPalette.white
|
|
974
994
|
}
|
|
975
995
|
},
|
|
976
996
|
primary: {
|
|
@@ -1210,8 +1230,8 @@ var input = {
|
|
|
1210
1230
|
size: 20
|
|
1211
1231
|
},
|
|
1212
1232
|
padding: {
|
|
1213
|
-
|
|
1214
|
-
|
|
1233
|
+
horizontal: 16,
|
|
1234
|
+
vertical: 5
|
|
1215
1235
|
},
|
|
1216
1236
|
transition: {
|
|
1217
1237
|
property: 'border-color',
|
|
@@ -1326,7 +1346,20 @@ var listItem = {
|
|
|
1326
1346
|
};
|
|
1327
1347
|
|
|
1328
1348
|
var pageLoader = {
|
|
1329
|
-
size: 60
|
|
1349
|
+
size: 60,
|
|
1350
|
+
strokeWidth: 3,
|
|
1351
|
+
colors: {
|
|
1352
|
+
base: colors.separator,
|
|
1353
|
+
fill: colors.primary
|
|
1354
|
+
},
|
|
1355
|
+
animation: {
|
|
1356
|
+
delay: 500,
|
|
1357
|
+
circleBackgroundFillDuration: 1000,
|
|
1358
|
+
filledCircleFillDuration: 1800,
|
|
1359
|
+
groupFilledCircleRotationDuration: 1800,
|
|
1360
|
+
filledCircleRotationDuration: 2160,
|
|
1361
|
+
fillEasingFunction: [0.39, 0.575, 0.565, 1]
|
|
1362
|
+
}
|
|
1330
1363
|
};
|
|
1331
1364
|
|
|
1332
1365
|
var shadows = {
|
|
@@ -1622,7 +1655,7 @@ var ViewInput = /*#__PURE__*/styled.View.withConfig({
|
|
|
1622
1655
|
displayName: "DatePickerInputPart__ViewInput"
|
|
1623
1656
|
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, function (_ref) {
|
|
1624
1657
|
var theme = _ref.theme;
|
|
1625
|
-
return theme.kitt.forms.input.padding
|
|
1658
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
1626
1659
|
}, function (_ref2) {
|
|
1627
1660
|
var theme = _ref2.theme;
|
|
1628
1661
|
return theme.kitt.forms.input.minHeight;
|
|
@@ -2336,20 +2369,18 @@ var StyledTextInput = /*#__PURE__*/styled(TextInput).withConfig({
|
|
|
2336
2369
|
})(["", " padding:", ";line-height:", ";width:100%;min-height:", "px;"], styledTextInputMixin, function (_ref) {
|
|
2337
2370
|
var theme = _ref.theme,
|
|
2338
2371
|
multiline = _ref.multiline;
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
return theme.kitt.forms.input.padding.iOSSingleLine;
|
|
2342
|
-
}
|
|
2343
|
-
|
|
2344
|
-
return theme.kitt.forms.input.padding["default"];
|
|
2372
|
+
if (!multiline && Platform.OS !== 'web') return "0 ".concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
2373
|
+
return "".concat(theme.kitt.forms.input.padding.vertical, "px ").concat(theme.kitt.forms.input.padding.horizontal, "px");
|
|
2345
2374
|
}, function (_ref2) {
|
|
2346
2375
|
var theme = _ref2.theme,
|
|
2347
2376
|
multiline = _ref2.multiline;
|
|
2348
|
-
if (!multiline && Platform.OS
|
|
2377
|
+
if (!multiline && Platform.OS !== 'web') return 0;
|
|
2349
2378
|
var typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2350
2379
|
return "".concat(theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight, "px");
|
|
2351
2380
|
}, function (_ref3) {
|
|
2352
|
-
var
|
|
2381
|
+
var theme = _ref3.theme,
|
|
2382
|
+
_ref3$$minHeight = _ref3.$minHeight,
|
|
2383
|
+
$minHeight = _ref3$$minHeight === void 0 ? theme.kitt.forms.input.minHeight : _ref3$$minHeight;
|
|
2353
2384
|
return $minHeight;
|
|
2354
2385
|
});
|
|
2355
2386
|
var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
@@ -2358,8 +2389,7 @@ var RightInputContainer = /*#__PURE__*/styled.View.withConfig({
|
|
|
2358
2389
|
var InputText = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
|
2359
2390
|
var id = _ref4.id,
|
|
2360
2391
|
right = _ref4.right,
|
|
2361
|
-
|
|
2362
|
-
minHeight = _ref4$minHeight === void 0 ? 0 : _ref4$minHeight,
|
|
2392
|
+
minHeight = _ref4.minHeight,
|
|
2363
2393
|
formState = _ref4.state,
|
|
2364
2394
|
internalForceState = _ref4.internalForceState,
|
|
2365
2395
|
_ref4$disabled = _ref4.disabled,
|
|
@@ -2545,6 +2575,7 @@ function InputPassword(_ref) {
|
|
|
2545
2575
|
autoCorrect: false,
|
|
2546
2576
|
secureTextEntry: !isVisible,
|
|
2547
2577
|
right: right || /*#__PURE__*/jsx(InputPressable, {
|
|
2578
|
+
hitSlop: 20,
|
|
2548
2579
|
accessibilityRole: "button",
|
|
2549
2580
|
onPress: function onPress() {
|
|
2550
2581
|
return setIsVisible(function (prev) {
|
|
@@ -3242,19 +3273,178 @@ function Notification(_ref) {
|
|
|
3242
3273
|
});
|
|
3243
3274
|
}
|
|
3244
3275
|
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3276
|
+
var AnimatedCircle = Animated.createAnimatedComponent(Circle$1);
|
|
3277
|
+
function AnimatedLoaderCircle(_ref) {
|
|
3278
|
+
var color = _ref.color,
|
|
3279
|
+
progress = _ref.progress;
|
|
3280
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3281
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3282
|
+
strokeWidth = _theme$kitt$pageLoade.strokeWidth,
|
|
3283
|
+
size = _theme$kitt$pageLoade.size;
|
|
3284
|
+
var centerCoord = size * 0.5;
|
|
3285
|
+
var circlePerimeter = 2 * Math.PI * (size * 0.5 - strokeWidth);
|
|
3286
|
+
var strokeAnimation = useAnimatedProps(function () {
|
|
3287
|
+
var _f = function () {
|
|
3288
|
+
return {
|
|
3289
|
+
strokeDashoffset: circlePerimeter - circlePerimeter * progress.value
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
|
|
3293
|
+
_f._closure = {
|
|
3294
|
+
circlePerimeter: circlePerimeter,
|
|
3295
|
+
progress: progress
|
|
3296
|
+
};
|
|
3297
|
+
_f.asString = "function _f(){const{circlePerimeter,progress}=jsThis._closure;{return{strokeDashoffset:circlePerimeter-circlePerimeter*progress.value};}}";
|
|
3298
|
+
_f.__workletHash = 1345639818356;
|
|
3299
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedLoaderCircle.tsx (23:43)";
|
|
3300
|
+
|
|
3301
|
+
global.__reanimatedWorkletInit(_f);
|
|
3302
|
+
|
|
3303
|
+
return _f;
|
|
3304
|
+
}());
|
|
3305
|
+
return /*#__PURE__*/jsx(AnimatedCircle, {
|
|
3306
|
+
"transform-origin": "center center",
|
|
3307
|
+
strokeWidth: strokeWidth,
|
|
3308
|
+
stroke: color,
|
|
3309
|
+
strokeLinecap: "round",
|
|
3310
|
+
cx: centerCoord,
|
|
3311
|
+
cy: centerCoord,
|
|
3312
|
+
r: centerCoord - strokeWidth,
|
|
3313
|
+
fill: "none",
|
|
3314
|
+
strokeDasharray: circlePerimeter,
|
|
3315
|
+
animatedProps: strokeAnimation
|
|
3316
|
+
});
|
|
3248
3317
|
}
|
|
3249
3318
|
|
|
3250
|
-
function
|
|
3319
|
+
function AnimatedBackgroundCircle() {
|
|
3320
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3321
|
+
var progress = useSharedValue(0);
|
|
3322
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3323
|
+
animation = _theme$kitt$pageLoade.animation,
|
|
3324
|
+
colors = _theme$kitt$pageLoade.colors,
|
|
3325
|
+
size = _theme$kitt$pageLoade.size;
|
|
3326
|
+
useEffect(function () {
|
|
3327
|
+
var delay = animation.delay,
|
|
3328
|
+
circleBackgroundFillDuration = animation.circleBackgroundFillDuration,
|
|
3329
|
+
fillEasingFunction = animation.fillEasingFunction;
|
|
3330
|
+
|
|
3331
|
+
var _fillEasingFunction = _slicedToArray(fillEasingFunction, 4),
|
|
3332
|
+
x1 = _fillEasingFunction[0],
|
|
3333
|
+
y1 = _fillEasingFunction[1],
|
|
3334
|
+
x2 = _fillEasingFunction[2],
|
|
3335
|
+
y2 = _fillEasingFunction[3];
|
|
3336
|
+
|
|
3337
|
+
progress.value = withDelay(delay, withTiming(1, {
|
|
3338
|
+
duration: circleBackgroundFillDuration,
|
|
3339
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
3340
|
+
}));
|
|
3341
|
+
}, [progress, animation]);
|
|
3342
|
+
return /*#__PURE__*/jsx(Svg, {
|
|
3343
|
+
width: size,
|
|
3344
|
+
height: size,
|
|
3345
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
3346
|
+
children: /*#__PURE__*/jsx(AnimatedLoaderCircle, {
|
|
3347
|
+
color: colors.base,
|
|
3348
|
+
progress: progress
|
|
3349
|
+
})
|
|
3350
|
+
});
|
|
3351
|
+
}
|
|
3352
|
+
|
|
3353
|
+
var isInfinitAnimation$1 = -1;
|
|
3354
|
+
function AnimatedFillCircleContainer(_ref) {
|
|
3355
|
+
var children = _ref.children,
|
|
3356
|
+
duration = _ref.duration;
|
|
3251
3357
|
var theme = /*#__PURE__*/useTheme();
|
|
3252
|
-
var
|
|
3253
|
-
var
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3358
|
+
var progress = useSharedValue(0);
|
|
3359
|
+
var animation = theme.kitt.pageLoader.animation;
|
|
3360
|
+
useEffect(function () {
|
|
3361
|
+
var delay = animation.delay;
|
|
3362
|
+
progress.value = withDelay(delay, withRepeat(withTiming(1, {
|
|
3363
|
+
duration: duration,
|
|
3364
|
+
easing: Easing$1.linear
|
|
3365
|
+
}), isInfinitAnimation$1));
|
|
3366
|
+
}, [progress, animation, duration]);
|
|
3367
|
+
var rotationStyles = useAnimatedStyle(function () {
|
|
3368
|
+
var _f = function () {
|
|
3369
|
+
return {
|
|
3370
|
+
transform: [{
|
|
3371
|
+
rotate: "".concat(360 * progress.value, "deg")
|
|
3372
|
+
}]
|
|
3373
|
+
};
|
|
3374
|
+
};
|
|
3375
|
+
|
|
3376
|
+
_f._closure = {
|
|
3377
|
+
progress: progress
|
|
3378
|
+
};
|
|
3379
|
+
_f.asString = "function _f(){const{progress}=jsThis._closure;{return{transform:[{rotate:360*progress.value+\"deg\"}]};}}";
|
|
3380
|
+
_f.__workletHash = 16553090406738;
|
|
3381
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedFillCircleContainer.tsx (36:42)";
|
|
3382
|
+
_f.__optimalization = 3;
|
|
3383
|
+
|
|
3384
|
+
global.__reanimatedWorkletInit(_f);
|
|
3385
|
+
|
|
3386
|
+
return _f;
|
|
3387
|
+
}());
|
|
3388
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
3389
|
+
style: [StyleSheet.absoluteFill, rotationStyles],
|
|
3390
|
+
children: children
|
|
3391
|
+
});
|
|
3392
|
+
}
|
|
3393
|
+
|
|
3394
|
+
var isInfinitAnimation = -1;
|
|
3395
|
+
var shouldReverse = true;
|
|
3396
|
+
function AnimatedFilledCircle() {
|
|
3397
|
+
var theme = /*#__PURE__*/useTheme();
|
|
3398
|
+
var progress = useSharedValue(0);
|
|
3399
|
+
var _theme$kitt$pageLoade = theme.kitt.pageLoader,
|
|
3400
|
+
size = _theme$kitt$pageLoade.size,
|
|
3401
|
+
animation = _theme$kitt$pageLoade.animation,
|
|
3402
|
+
colors = _theme$kitt$pageLoade.colors;
|
|
3403
|
+
useEffect(function () {
|
|
3404
|
+
var delay = animation.delay,
|
|
3405
|
+
filledCircleFillDuration = animation.filledCircleFillDuration,
|
|
3406
|
+
fillEasingFunction = animation.fillEasingFunction;
|
|
3407
|
+
|
|
3408
|
+
var _fillEasingFunction = _slicedToArray(fillEasingFunction, 4),
|
|
3409
|
+
x1 = _fillEasingFunction[0],
|
|
3410
|
+
y1 = _fillEasingFunction[1],
|
|
3411
|
+
x2 = _fillEasingFunction[2],
|
|
3412
|
+
y2 = _fillEasingFunction[3];
|
|
3413
|
+
|
|
3414
|
+
progress.value = withDelay(delay, withRepeat(withTiming(0.8, {
|
|
3415
|
+
duration: filledCircleFillDuration,
|
|
3416
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
3417
|
+
}), isInfinitAnimation, shouldReverse));
|
|
3418
|
+
}, [progress, animation]);
|
|
3419
|
+
return /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
3420
|
+
duration: animation.groupFilledCircleRotationDuration,
|
|
3421
|
+
children: /*#__PURE__*/jsx(AnimatedFillCircleContainer, {
|
|
3422
|
+
duration: animation.filledCircleRotationDuration,
|
|
3423
|
+
children: /*#__PURE__*/jsx(Svg, {
|
|
3424
|
+
width: size,
|
|
3425
|
+
height: size,
|
|
3426
|
+
viewBox: "0 0 ".concat(size, " ").concat(size),
|
|
3427
|
+
children: /*#__PURE__*/jsx(AnimatedLoaderCircle, {
|
|
3428
|
+
color: colors.fill,
|
|
3429
|
+
progress: progress
|
|
3430
|
+
})
|
|
3431
|
+
})
|
|
3432
|
+
})
|
|
3433
|
+
});
|
|
3434
|
+
}
|
|
3435
|
+
|
|
3436
|
+
var PageLoaderContainer = /*#__PURE__*/styled.View.withConfig({
|
|
3437
|
+
displayName: "PageLoader__PageLoaderContainer"
|
|
3438
|
+
})(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], function (_ref) {
|
|
3439
|
+
var theme = _ref.theme;
|
|
3440
|
+
return theme.kitt.pageLoader.size;
|
|
3441
|
+
}, function (_ref2) {
|
|
3442
|
+
var theme = _ref2.theme;
|
|
3443
|
+
return theme.kitt.pageLoader.size;
|
|
3444
|
+
});
|
|
3445
|
+
function PageLoader() {
|
|
3446
|
+
return /*#__PURE__*/jsxs(PageLoaderContainer, {
|
|
3447
|
+
children: [/*#__PURE__*/jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsx(AnimatedFilledCircle, {})]
|
|
3258
3448
|
});
|
|
3259
3449
|
}
|
|
3260
3450
|
|