@ornikar/kitt-universal 7.1.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/Overlay/Overlay.d.ts +1 -2
- package/dist/definitions/Overlay/Overlay.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/default.d.ts +2 -0
- package/dist/definitions/themes/default.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/colors.d.ts +2 -0
- package/dist/definitions/themes/late-ocean/colors.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/definitions/themes/late-ocean/typography.d.ts.map +1 -1
- package/dist/definitions/typography/Typography.d.ts.map +1 -1
- package/dist/index-browser-all.es.android.js +232 -40
- package/dist/index-browser-all.es.android.js.map +1 -1
- package/dist/index-browser-all.es.ios.js +232 -40
- package/dist/index-browser-all.es.ios.js.map +1 -1
- package/dist/index-browser-all.es.js +232 -40
- package/dist/index-browser-all.es.js.map +1 -1
- package/dist/index-browser-all.es.web.js +127 -46
- package/dist/index-browser-all.es.web.js.map +1 -1
- package/dist/index-node-14.17.cjs.js +228 -37
- 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 +117 -42
- package/dist/index-node-14.17.cjs.web.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.android.js +37 -12
- package/dist/linaria-themes-browser-all.es.android.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.ios.js +37 -12
- package/dist/linaria-themes-browser-all.es.ios.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.js +37 -12
- package/dist/linaria-themes-browser-all.es.js.map +1 -1
- package/dist/linaria-themes-browser-all.es.web.js +37 -12
- package/dist/linaria-themes-browser-all.es.web.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.js +37 -12
- package/dist/linaria-themes-node-14.17.cjs.js.map +1 -1
- package/dist/linaria-themes-node-14.17.cjs.web.js +37 -12
- 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
|
@@ -14,6 +14,7 @@ const DateTimePicker = require('@react-native-community/datetimepicker');
|
|
|
14
14
|
const reactIntl = require('react-intl');
|
|
15
15
|
const react$1 = require('@linaria/react');
|
|
16
16
|
const reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
17
|
+
const Svg = require('react-native-svg');
|
|
17
18
|
const expoLinearGradient = require('expo-linear-gradient');
|
|
18
19
|
const reactNative$1 = require('@floating-ui/react-native');
|
|
19
20
|
const addons = require('@storybook/addons');
|
|
@@ -23,6 +24,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
23
24
|
const styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
24
25
|
const Animated__default = /*#__PURE__*/_interopDefaultLegacy(Animated);
|
|
25
26
|
const DateTimePicker__default = /*#__PURE__*/_interopDefaultLegacy(DateTimePicker);
|
|
27
|
+
const Svg__default = /*#__PURE__*/_interopDefaultLegacy(Svg);
|
|
26
28
|
|
|
27
29
|
const defaultIconSize = 20;
|
|
28
30
|
const IconContainer$1 = /*#__PURE__*/styled__default.View.withConfig({
|
|
@@ -157,10 +159,10 @@ const StyledTypography = /*#__PURE__*/styled__default.Text.withConfig({
|
|
|
157
159
|
}, ({
|
|
158
160
|
theme,
|
|
159
161
|
$color
|
|
160
|
-
}) =>
|
|
161
|
-
color
|
|
162
|
-
text-decoration-color: $
|
|
163
|
-
|
|
162
|
+
}) => {
|
|
163
|
+
if (!$color) return '';
|
|
164
|
+
return styled.css(["color:", ";text-decoration-color:", ";"], theme.kitt.typography.colors[$color], theme.kitt.typography.colors[$color]);
|
|
165
|
+
});
|
|
164
166
|
function useTypographyTypeForCurrentWindowSize(base, small, medium, large) {
|
|
165
167
|
const {
|
|
166
168
|
width
|
|
@@ -507,13 +509,16 @@ const BaseStyledButtonPressable = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
507
509
|
}, ({
|
|
508
510
|
theme,
|
|
509
511
|
$isLarge,
|
|
512
|
+
$isXLarge,
|
|
510
513
|
$isDisabled
|
|
511
514
|
}) => {
|
|
512
515
|
const {
|
|
513
516
|
large,
|
|
514
517
|
default: defaultPadding,
|
|
515
|
-
disabled: disabledPadding
|
|
518
|
+
disabled: disabledPadding,
|
|
519
|
+
xLarge
|
|
516
520
|
} = theme.kitt.button.contentPadding;
|
|
521
|
+
if ($isXLarge) return xLarge;
|
|
517
522
|
if ($isLarge) return large;
|
|
518
523
|
if ($isDisabled) return disabledPadding;
|
|
519
524
|
return defaultPadding;
|
|
@@ -570,6 +575,9 @@ const getTextColorByType = (type, variant) => {
|
|
|
570
575
|
case 'subtle-dark':
|
|
571
576
|
return 'black';
|
|
572
577
|
|
|
578
|
+
case 'default':
|
|
579
|
+
return variant === 'ghost' ? 'white' : 'black';
|
|
580
|
+
|
|
573
581
|
default:
|
|
574
582
|
return 'black';
|
|
575
583
|
}
|
|
@@ -738,6 +746,7 @@ const StyledDisabled = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
738
746
|
theme
|
|
739
747
|
}) => theme.kitt.button.borderRadius);
|
|
740
748
|
|
|
749
|
+
const allowedGhostTypes = ['primary', 'default'];
|
|
741
750
|
const Button = /*#__PURE__*/react.forwardRef(({
|
|
742
751
|
children,
|
|
743
752
|
type = 'default',
|
|
@@ -745,6 +754,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
745
754
|
disabled,
|
|
746
755
|
stretch,
|
|
747
756
|
large,
|
|
757
|
+
xLarge,
|
|
748
758
|
icon,
|
|
749
759
|
iconPosition = 'left',
|
|
750
760
|
testID,
|
|
@@ -753,8 +763,8 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
753
763
|
accessibilityRole = 'button',
|
|
754
764
|
onPress
|
|
755
765
|
}, ref) => {
|
|
756
|
-
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && type
|
|
757
|
-
throw new Error('variant=ghost is only allowed with type=primary');
|
|
766
|
+
if ((process.env.NODE_ENV !== "production") && variant === 'ghost' && !allowedGhostTypes.includes(type)) {
|
|
767
|
+
throw new Error('variant=ghost is only allowed with type=primary or default');
|
|
758
768
|
}
|
|
759
769
|
|
|
760
770
|
return /*#__PURE__*/jsxRuntime.jsx(AnimatedButtonPressable, {
|
|
@@ -773,6 +783,7 @@ const Button = /*#__PURE__*/react.forwardRef(({
|
|
|
773
783
|
$variant: variant,
|
|
774
784
|
$isStretch: stretch,
|
|
775
785
|
$isLarge: large,
|
|
786
|
+
$isXLarge: xLarge,
|
|
776
787
|
$isDisabled: disabled,
|
|
777
788
|
children: [/*#__PURE__*/jsxRuntime.jsx(ButtonContent, {
|
|
778
789
|
type: type,
|
|
@@ -922,7 +933,9 @@ const colors = {
|
|
|
922
933
|
warning: lateOceanColorPalette.goldCrayola,
|
|
923
934
|
separator: lateOceanColorPalette.black100,
|
|
924
935
|
hover: lateOceanColorPalette.black100,
|
|
936
|
+
white: lateOceanColorPalette.white,
|
|
925
937
|
black: lateOceanColorPalette.black1000,
|
|
938
|
+
blackAnthracite: lateOceanColorPalette.black800,
|
|
926
939
|
uiBackground: lateOceanColorPalette.black25,
|
|
927
940
|
uiBackgroundLight: lateOceanColorPalette.white,
|
|
928
941
|
transparent: lateOceanColorPalette.transparent,
|
|
@@ -969,6 +982,7 @@ const button = {
|
|
|
969
982
|
contentPadding: {
|
|
970
983
|
default: '7px 16px 7px',
|
|
971
984
|
large: '11px 24px 11px',
|
|
985
|
+
xLarge: '15px 24px 15px',
|
|
972
986
|
disabled: '5px 14px 5px'
|
|
973
987
|
},
|
|
974
988
|
transition: {
|
|
@@ -981,6 +995,15 @@ const button = {
|
|
|
981
995
|
pressedBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
982
996
|
hoverBackgroundColor: 'rgba(0, 0, 0, 0.1)',
|
|
983
997
|
focusBorderColor: 'rgba(0, 0, 0, 0.1)'
|
|
998
|
+
},
|
|
999
|
+
ghost: {
|
|
1000
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
1001
|
+
pressedBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1002
|
+
hoverBackgroundColor: 'rgba(255, 255, 255, 0.05)',
|
|
1003
|
+
focusBorderColor: 'rgba(255, 255, 255, 0.4)',
|
|
1004
|
+
color: lateOceanColorPalette.white,
|
|
1005
|
+
hoverColor: lateOceanColorPalette.white,
|
|
1006
|
+
activeColor: lateOceanColorPalette.white
|
|
984
1007
|
}
|
|
985
1008
|
},
|
|
986
1009
|
primary: {
|
|
@@ -1111,16 +1134,16 @@ const createTypographyTypeConfig = (lineHeightMultiplier, baseAndSmallFontSize,
|
|
|
1111
1134
|
});
|
|
1112
1135
|
const typography = {
|
|
1113
1136
|
colors: {
|
|
1114
|
-
black:
|
|
1115
|
-
'black-anthracite':
|
|
1137
|
+
black: colors.black,
|
|
1138
|
+
'black-anthracite': colors.blackAnthracite,
|
|
1116
1139
|
'black-light': lateOceanColorPalette.black555,
|
|
1117
|
-
white:
|
|
1118
|
-
'white-light':
|
|
1119
|
-
primary:
|
|
1120
|
-
'primary-light':
|
|
1121
|
-
accent:
|
|
1122
|
-
success:
|
|
1123
|
-
danger:
|
|
1140
|
+
white: colors.white,
|
|
1141
|
+
'white-light': colors.white,
|
|
1142
|
+
primary: colors.primary,
|
|
1143
|
+
'primary-light': colors.primaryLight,
|
|
1144
|
+
accent: colors.accent,
|
|
1145
|
+
success: colors.success,
|
|
1146
|
+
danger: colors.danger
|
|
1124
1147
|
},
|
|
1125
1148
|
types: {
|
|
1126
1149
|
headers: {
|
|
@@ -1216,8 +1239,8 @@ const input = {
|
|
|
1216
1239
|
size: 20
|
|
1217
1240
|
},
|
|
1218
1241
|
padding: {
|
|
1219
|
-
|
|
1220
|
-
|
|
1242
|
+
horizontal: 16,
|
|
1243
|
+
vertical: 5
|
|
1221
1244
|
},
|
|
1222
1245
|
transition: {
|
|
1223
1246
|
property: 'border-color',
|
|
@@ -1332,7 +1355,20 @@ const listItem = {
|
|
|
1332
1355
|
};
|
|
1333
1356
|
|
|
1334
1357
|
const pageLoader = {
|
|
1335
|
-
size: 60
|
|
1358
|
+
size: 60,
|
|
1359
|
+
strokeWidth: 3,
|
|
1360
|
+
colors: {
|
|
1361
|
+
base: colors.separator,
|
|
1362
|
+
fill: colors.primary
|
|
1363
|
+
},
|
|
1364
|
+
animation: {
|
|
1365
|
+
delay: 500,
|
|
1366
|
+
circleBackgroundFillDuration: 1000,
|
|
1367
|
+
filledCircleFillDuration: 1800,
|
|
1368
|
+
groupFilledCircleRotationDuration: 1800,
|
|
1369
|
+
filledCircleRotationDuration: 2160,
|
|
1370
|
+
fillEasingFunction: [0.39, 0.575, 0.565, 1]
|
|
1371
|
+
}
|
|
1336
1372
|
};
|
|
1337
1373
|
|
|
1338
1374
|
const shadows = {
|
|
@@ -1614,7 +1650,7 @@ const ViewInput = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
1614
1650
|
componentId: "kitt-universal__sc-11fmlmi-1"
|
|
1615
1651
|
})(["", " padding:", ";min-height:", "px;min-width:", ";"], styledTextInputMixin, ({
|
|
1616
1652
|
theme
|
|
1617
|
-
}) => theme.kitt.forms.input.padding.
|
|
1653
|
+
}) => `${theme.kitt.forms.input.padding.vertical}px ${theme.kitt.forms.input.padding.horizontal}px`, ({
|
|
1618
1654
|
theme
|
|
1619
1655
|
}) => theme.kitt.forms.input.minHeight, ({
|
|
1620
1656
|
theme,
|
|
@@ -2369,20 +2405,18 @@ const StyledTextInput = /*#__PURE__*/styled__default(reactNative.TextInput).with
|
|
|
2369
2405
|
theme,
|
|
2370
2406
|
multiline
|
|
2371
2407
|
}) => {
|
|
2372
|
-
if (!multiline && reactNative.Platform.OS
|
|
2373
|
-
|
|
2374
|
-
}
|
|
2375
|
-
|
|
2376
|
-
return theme.kitt.forms.input.padding.default;
|
|
2408
|
+
if (!multiline && reactNative.Platform.OS !== 'web') return `0 ${theme.kitt.forms.input.padding.horizontal}px`;
|
|
2409
|
+
return `${theme.kitt.forms.input.padding.vertical}px ${theme.kitt.forms.input.padding.horizontal}px`;
|
|
2377
2410
|
}, ({
|
|
2378
2411
|
theme,
|
|
2379
2412
|
multiline
|
|
2380
2413
|
}) => {
|
|
2381
|
-
if (!multiline && reactNative.Platform.OS
|
|
2414
|
+
if (!multiline && reactNative.Platform.OS !== 'web') return 0;
|
|
2382
2415
|
const typeConfigKey = getTypographyTypeConfigKey(theme);
|
|
2383
2416
|
return `${theme.kitt.typography.types.bodies.configs.body[typeConfigKey].lineHeight}px`;
|
|
2384
2417
|
}, ({
|
|
2385
|
-
|
|
2418
|
+
theme,
|
|
2419
|
+
$minHeight = theme.kitt.forms.input.minHeight
|
|
2386
2420
|
}) => $minHeight);
|
|
2387
2421
|
const RightInputContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
2388
2422
|
displayName: "InputText__RightInputContainer",
|
|
@@ -2391,7 +2425,7 @@ const RightInputContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
|
2391
2425
|
const InputText = /*#__PURE__*/react.forwardRef(({
|
|
2392
2426
|
id,
|
|
2393
2427
|
right,
|
|
2394
|
-
minHeight
|
|
2428
|
+
minHeight,
|
|
2395
2429
|
state: formState,
|
|
2396
2430
|
internalForceState,
|
|
2397
2431
|
disabled = false,
|
|
@@ -3245,21 +3279,178 @@ function Notification({
|
|
|
3245
3279
|
});
|
|
3246
3280
|
}
|
|
3247
3281
|
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3282
|
+
const AnimatedCircle = Animated__default.createAnimatedComponent(Svg.Circle);
|
|
3283
|
+
function AnimatedLoaderCircle({
|
|
3284
|
+
color,
|
|
3285
|
+
progress
|
|
3286
|
+
}) {
|
|
3287
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
3288
|
+
const {
|
|
3289
|
+
strokeWidth,
|
|
3290
|
+
size
|
|
3291
|
+
} = theme.kitt.pageLoader;
|
|
3292
|
+
const centerCoord = size * 0.5;
|
|
3293
|
+
const circlePerimeter = 2 * Math.PI * (size * 0.5 - strokeWidth);
|
|
3294
|
+
const strokeAnimation = Animated.useAnimatedProps(function () {
|
|
3295
|
+
const _f = function () {
|
|
3296
|
+
return {
|
|
3297
|
+
strokeDashoffset: circlePerimeter - circlePerimeter * progress.value
|
|
3298
|
+
};
|
|
3299
|
+
};
|
|
3300
|
+
|
|
3301
|
+
_f._closure = {
|
|
3302
|
+
circlePerimeter,
|
|
3303
|
+
progress
|
|
3304
|
+
};
|
|
3305
|
+
_f.asString = "function _f(){const{circlePerimeter,progress}=jsThis._closure;{return{strokeDashoffset:circlePerimeter-circlePerimeter*progress.value};}}";
|
|
3306
|
+
_f.__workletHash = 1345639818356;
|
|
3307
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedLoaderCircle.tsx (23:43)";
|
|
3308
|
+
|
|
3309
|
+
global.__reanimatedWorkletInit(_f);
|
|
3310
|
+
|
|
3311
|
+
return _f;
|
|
3312
|
+
}());
|
|
3313
|
+
return /*#__PURE__*/jsxRuntime.jsx(AnimatedCircle, {
|
|
3314
|
+
"transform-origin": "center center",
|
|
3315
|
+
strokeWidth: strokeWidth,
|
|
3316
|
+
stroke: color,
|
|
3317
|
+
strokeLinecap: "round",
|
|
3318
|
+
cx: centerCoord,
|
|
3319
|
+
cy: centerCoord,
|
|
3320
|
+
r: centerCoord - strokeWidth,
|
|
3321
|
+
fill: "none",
|
|
3322
|
+
strokeDasharray: circlePerimeter,
|
|
3323
|
+
animatedProps: strokeAnimation
|
|
3324
|
+
});
|
|
3251
3325
|
}
|
|
3252
3326
|
|
|
3253
|
-
function
|
|
3327
|
+
function AnimatedBackgroundCircle() {
|
|
3254
3328
|
const theme = /*#__PURE__*/styled.useTheme();
|
|
3329
|
+
const progress = Animated.useSharedValue(0);
|
|
3255
3330
|
const {
|
|
3331
|
+
animation,
|
|
3332
|
+
colors,
|
|
3256
3333
|
size
|
|
3257
3334
|
} = theme.kitt.pageLoader;
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3335
|
+
react.useEffect(() => {
|
|
3336
|
+
const {
|
|
3337
|
+
delay,
|
|
3338
|
+
circleBackgroundFillDuration,
|
|
3339
|
+
fillEasingFunction
|
|
3340
|
+
} = animation;
|
|
3341
|
+
const [x1, y1, x2, y2] = fillEasingFunction;
|
|
3342
|
+
progress.value = Animated.withDelay(delay, Animated.withTiming(1, {
|
|
3343
|
+
duration: circleBackgroundFillDuration,
|
|
3344
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
3345
|
+
}));
|
|
3346
|
+
}, [progress, animation]);
|
|
3347
|
+
return /*#__PURE__*/jsxRuntime.jsx(Svg__default, {
|
|
3348
|
+
width: size,
|
|
3349
|
+
height: size,
|
|
3350
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
3351
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AnimatedLoaderCircle, {
|
|
3352
|
+
color: colors.base,
|
|
3353
|
+
progress: progress
|
|
3354
|
+
})
|
|
3355
|
+
});
|
|
3356
|
+
}
|
|
3357
|
+
|
|
3358
|
+
const isInfinitAnimation$1 = -1;
|
|
3359
|
+
function AnimatedFillCircleContainer({
|
|
3360
|
+
children,
|
|
3361
|
+
duration
|
|
3362
|
+
}) {
|
|
3363
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
3364
|
+
const progress = Animated.useSharedValue(0);
|
|
3365
|
+
const {
|
|
3366
|
+
animation
|
|
3367
|
+
} = theme.kitt.pageLoader;
|
|
3368
|
+
react.useEffect(() => {
|
|
3369
|
+
const {
|
|
3370
|
+
delay
|
|
3371
|
+
} = animation;
|
|
3372
|
+
progress.value = Animated.withDelay(delay, Animated.withRepeat(Animated.withTiming(1, {
|
|
3373
|
+
duration,
|
|
3374
|
+
easing: Animated.Easing.linear
|
|
3375
|
+
}), isInfinitAnimation$1));
|
|
3376
|
+
}, [progress, animation, duration]);
|
|
3377
|
+
const rotationStyles = Animated.useAnimatedStyle(function () {
|
|
3378
|
+
const _f = function () {
|
|
3379
|
+
return {
|
|
3380
|
+
transform: [{
|
|
3381
|
+
rotate: `${360 * progress.value}deg`
|
|
3382
|
+
}]
|
|
3383
|
+
};
|
|
3384
|
+
};
|
|
3385
|
+
|
|
3386
|
+
_f._closure = {
|
|
3387
|
+
progress
|
|
3388
|
+
};
|
|
3389
|
+
_f.asString = "function _f(){const{progress}=jsThis._closure;{return{transform:[{rotate:360*progress.value+\"deg\"}]};}}";
|
|
3390
|
+
_f.__workletHash = 16553090406738;
|
|
3391
|
+
_f.__location = "/home/circleci/repo/@ornikar/kitt-universal/src/PageLoader/AnimatedFillCircleContainer.tsx (36:42)";
|
|
3392
|
+
_f.__optimalization = 3;
|
|
3393
|
+
|
|
3394
|
+
global.__reanimatedWorkletInit(_f);
|
|
3395
|
+
|
|
3396
|
+
return _f;
|
|
3397
|
+
}());
|
|
3398
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
3399
|
+
style: [reactNative.StyleSheet.absoluteFill, rotationStyles],
|
|
3400
|
+
children: children
|
|
3401
|
+
});
|
|
3402
|
+
}
|
|
3403
|
+
|
|
3404
|
+
const isInfinitAnimation = -1;
|
|
3405
|
+
const shouldReverse = true;
|
|
3406
|
+
function AnimatedFilledCircle() {
|
|
3407
|
+
const theme = /*#__PURE__*/styled.useTheme();
|
|
3408
|
+
const progress = Animated.useSharedValue(0);
|
|
3409
|
+
const {
|
|
3410
|
+
size,
|
|
3411
|
+
animation,
|
|
3412
|
+
colors
|
|
3413
|
+
} = theme.kitt.pageLoader;
|
|
3414
|
+
react.useEffect(() => {
|
|
3415
|
+
const {
|
|
3416
|
+
delay,
|
|
3417
|
+
filledCircleFillDuration,
|
|
3418
|
+
fillEasingFunction
|
|
3419
|
+
} = animation;
|
|
3420
|
+
const [x1, y1, x2, y2] = fillEasingFunction;
|
|
3421
|
+
progress.value = Animated.withDelay(delay, Animated.withRepeat(Animated.withTiming(0.8, {
|
|
3422
|
+
duration: filledCircleFillDuration,
|
|
3423
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
3424
|
+
}), isInfinitAnimation, shouldReverse));
|
|
3425
|
+
}, [progress, animation]);
|
|
3426
|
+
return /*#__PURE__*/jsxRuntime.jsx(AnimatedFillCircleContainer, {
|
|
3427
|
+
duration: animation.groupFilledCircleRotationDuration,
|
|
3428
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AnimatedFillCircleContainer, {
|
|
3429
|
+
duration: animation.filledCircleRotationDuration,
|
|
3430
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Svg__default, {
|
|
3431
|
+
width: size,
|
|
3432
|
+
height: size,
|
|
3433
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
3434
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AnimatedLoaderCircle, {
|
|
3435
|
+
color: colors.fill,
|
|
3436
|
+
progress: progress
|
|
3437
|
+
})
|
|
3438
|
+
})
|
|
3439
|
+
})
|
|
3440
|
+
});
|
|
3441
|
+
}
|
|
3442
|
+
|
|
3443
|
+
const PageLoaderContainer = /*#__PURE__*/styled__default.View.withConfig({
|
|
3444
|
+
displayName: "PageLoader__PageLoaderContainer",
|
|
3445
|
+
componentId: "kitt-universal__sc-1l9zwqg-0"
|
|
3446
|
+
})(["transform:scale(-1) rotate(90deg);position:relative;width:", "px;height:", "px;"], ({
|
|
3447
|
+
theme
|
|
3448
|
+
}) => theme.kitt.pageLoader.size, ({
|
|
3449
|
+
theme
|
|
3450
|
+
}) => theme.kitt.pageLoader.size);
|
|
3451
|
+
function PageLoader() {
|
|
3452
|
+
return /*#__PURE__*/jsxRuntime.jsxs(PageLoaderContainer, {
|
|
3453
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(AnimatedBackgroundCircle, {}), /*#__PURE__*/jsxRuntime.jsx(AnimatedFilledCircle, {})]
|
|
3263
3454
|
});
|
|
3264
3455
|
}
|
|
3265
3456
|
|