@ornikar/kitt-universal 31.1.2-canary.b586e0e9612495f8597e9c4be7d2c5a28baa9437.0 → 31.2.1-canary.17485591ac55a14466021258b1ae9ff08b514eb1.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/CHANGELOG.md +16 -3
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts +4 -0
- package/dist/definitions/CardModal/CardModalAnimation/CardModalAnimation.web.d.ts.map +1 -0
- package/dist/definitions/CardModal/CardModalAnimation/NativeRotationAnimation.d.ts +1 -0
- package/dist/definitions/CardModal/CardModalAnimation/NativeRotationAnimation.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +3 -5
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +3 -5
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-22.17.cjs.js +3 -5
- package/dist/index-node-22.17.cjs.js.map +1 -1
- package/dist/index-node-22.17.cjs.web.css +8 -0
- package/dist/index-node-22.17.cjs.web.js +73 -149
- package/dist/index-node-22.17.cjs.web.js.map +1 -1
- package/dist/index-node-22.17.es.mjs +3 -5
- package/dist/index-node-22.17.es.mjs.map +1 -1
- package/dist/index-node-22.17.es.web.css +8 -0
- package/dist/index-node-22.17.es.web.mjs +73 -149
- package/dist/index-node-22.17.es.web.mjs.map +1 -1
- package/dist/index.es.js +3 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +88 -163
- package/dist/index.es.web.js.map +1 -1
- package/dist/styles.css +8 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
.kitt-u_overflowHidden_otm3u3{overflow:hidden;}
|
|
2
|
+
.kitt-u_contentAnimationEnter_c11xxy4r{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
|
|
3
|
+
.kitt-u_contentAnimatioEnterActive_cl52117{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
4
|
+
.kitt-u_contentAnimatioExit_cyjczep{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);}
|
|
5
|
+
.kitt-u_contentAnimatioExitActive_cpsy3dt{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
6
|
+
.kitt-u_opacityEnter_o1ae40dx{opacity:0;}
|
|
7
|
+
.kitt-u_opacityEnterActive_o1t4vl7b{opacity:1;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
8
|
+
.kitt-u_opacityExit_ogyytm1{opacity:1;}
|
|
9
|
+
.kitt-u_opacityExitActive_o18xvk52{opacity:0;-webkit-transition:opacity 250ms cubic-bezier(0.42,0,1,1);transition:opacity 250ms cubic-bezier(0.42,0,1,1);}
|
|
2
10
|
.kitt-u_contentAnimationEnter_c1i0gle8{opacity:0;-webkit-transform:rotateZ(5deg) scale(0.8);-ms-transform:rotateZ(5deg) scale(0.8);transform:rotateZ(5deg) scale(0.8);}
|
|
3
11
|
.kitt-u_contentAnimatioEnterActive_c1jmfkjw{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);-webkit-transition:all 400ms cubic-bezier(0.77,0,0.175,1);transition:all 400ms cubic-bezier(0.77,0,0.175,1);}
|
|
4
12
|
.kitt-u_contentAnimatioExit_cwjstxl{opacity:1;-webkit-transform:rotateZ(0) scale(1);-ms-transform:rotateZ(0) scale(1);transform:rotateZ(0) scale(1);}
|
|
@@ -3,10 +3,9 @@ import { View as View$1, ScrollView as ScrollView$1, Pressable as Pressable$1, I
|
|
|
3
3
|
export { useClipboard, useContrastText, useMediaQuery, useSx, useToken } from 'native-base';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
|
|
6
|
-
import { Animated, Easing,
|
|
6
|
+
import { Animated, Easing, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, StyleSheet, useWindowDimensions } from 'react-native';
|
|
7
7
|
export { useWindowDimensions as useWindowSize } from 'react-native';
|
|
8
8
|
import { createPortal } from 'react-dom';
|
|
9
|
-
import Animated$1, { useAnimatedStyle, withTiming, Easing as Easing$1, runOnJS, useSharedValue, withSpring, interpolateColor, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
10
9
|
import { CSSTransition } from 'react-transition-group';
|
|
11
10
|
import { parse } from '@twemoji/parser';
|
|
12
11
|
import Downshift, { useSelect } from 'downshift';
|
|
@@ -15,6 +14,7 @@ import { launchImageLibraryAsync } from 'expo-image-picker';
|
|
|
15
14
|
import { useDebouncedCallback } from 'use-debounce';
|
|
16
15
|
import { Loader } from '@googlemaps/js-api-loader';
|
|
17
16
|
import { parseNumber, getCountryCallingCode, isValidNumber } from 'libphonenumber-js';
|
|
17
|
+
import Animated$1, { useAnimatedStyle, withSpring, withTiming, useSharedValue, interpolateColor, Easing as Easing$1, useAnimatedProps, withDelay, withRepeat, interpolate, runOnJS, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
|
|
18
18
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
19
19
|
import Svg, { Circle as Circle$1 } from 'react-native-svg';
|
|
20
20
|
import { useFloating, autoUpdate, offset, autoPlacement, shift, arrow } from '@floating-ui/react-dom';
|
|
@@ -4324,161 +4324,85 @@ const CardModalRotationContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
4324
4324
|
});
|
|
4325
4325
|
});
|
|
4326
4326
|
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
y2
|
|
4352
|
-
} = easing;
|
|
4353
|
-
return {
|
|
4354
|
-
opacity: withTiming(visible ? 1 : 0, {
|
|
4355
|
-
duration,
|
|
4356
|
-
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4357
|
-
}, isFinished => {
|
|
4358
|
-
if (!isFinished) return;
|
|
4359
|
-
runOnJS(handleAnimationFinished)();
|
|
4360
|
-
})
|
|
4361
|
-
};
|
|
4362
|
-
}, [visible]);
|
|
4363
|
-
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
4364
|
-
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
4365
|
-
children: children
|
|
4366
|
-
});
|
|
4367
|
-
}
|
|
4368
|
-
|
|
4369
|
-
function NativeRotationAnimation({
|
|
4370
|
-
visible,
|
|
4371
|
-
children,
|
|
4372
|
-
onEntered,
|
|
4373
|
-
onExited
|
|
4374
|
-
}) {
|
|
4375
|
-
const theme = useTheme();
|
|
4376
|
-
const hasRunAnimationRef = useRef(false);
|
|
4377
|
-
const rotation = useSharedValue(0.8);
|
|
4378
|
-
function handleAnimationFinished() {
|
|
4379
|
-
if (visible) {
|
|
4380
|
-
if (onEntered) onEntered();
|
|
4381
|
-
hasRunAnimationRef.current = true;
|
|
4382
|
-
}
|
|
4383
|
-
if (!visible && hasRunAnimationRef.current) onExited();
|
|
4384
|
-
}
|
|
4385
|
-
const animatedStyle = useAnimatedStyle(() => {
|
|
4386
|
-
const {
|
|
4387
|
-
duration,
|
|
4388
|
-
easing
|
|
4389
|
-
} = theme.kitt.cardModal.animation.content;
|
|
4390
|
-
const {
|
|
4391
|
-
x1,
|
|
4392
|
-
y1,
|
|
4393
|
-
x2,
|
|
4394
|
-
y2
|
|
4395
|
-
} = easing;
|
|
4396
|
-
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4397
|
-
duration,
|
|
4398
|
-
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4399
|
-
}, isFinished => {
|
|
4400
|
-
if (!isFinished) return;
|
|
4401
|
-
runOnJS(handleAnimationFinished)();
|
|
4402
|
-
});
|
|
4403
|
-
return {
|
|
4404
|
-
opacity: withTiming(visible ? 1 : 0, {
|
|
4405
|
-
duration,
|
|
4406
|
-
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4407
|
-
}),
|
|
4408
|
-
transform: [{
|
|
4409
|
-
scale: withTiming(visible ? 1 : 0.8, {
|
|
4410
|
-
duration,
|
|
4411
|
-
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4412
|
-
})
|
|
4413
|
-
}, {
|
|
4414
|
-
rotateZ: `${rotation.value}deg`
|
|
4415
|
-
}]
|
|
4416
|
-
};
|
|
4417
|
-
}, [rotation, visible]);
|
|
4418
|
-
return /*#__PURE__*/jsx(Animated$1.View, {
|
|
4419
|
-
style: [{
|
|
4420
|
-
flexShrink: 1
|
|
4421
|
-
}, animatedStyle],
|
|
4422
|
-
children: children
|
|
4423
|
-
});
|
|
4424
|
-
}
|
|
4425
|
-
|
|
4327
|
+
const contentAnimationEnter$1 = "kitt-u_contentAnimationEnter_c11xxy4r";
|
|
4328
|
+
const contentAnimatioEnterActive$1 = "kitt-u_contentAnimatioEnterActive_cl52117";
|
|
4329
|
+
const contentAnimatioExit$1 = "kitt-u_contentAnimatioExit_cyjczep";
|
|
4330
|
+
const contentAnimatioExitActive$1 = "kitt-u_contentAnimatioExitActive_cpsy3dt";
|
|
4331
|
+
const contentAnimationClassNames$1 = {
|
|
4332
|
+
appear: contentAnimationEnter$1,
|
|
4333
|
+
appearActive: contentAnimatioEnterActive$1,
|
|
4334
|
+
enter: contentAnimationEnter$1,
|
|
4335
|
+
enterActive: contentAnimatioEnterActive$1,
|
|
4336
|
+
exit: contentAnimatioExit$1,
|
|
4337
|
+
exitActive: contentAnimatioExitActive$1
|
|
4338
|
+
};
|
|
4339
|
+
const opacityEnter$2 = "kitt-u_opacityEnter_o1ae40dx";
|
|
4340
|
+
const opacityEnterActive$2 = "kitt-u_opacityEnterActive_o1t4vl7b";
|
|
4341
|
+
const opacityExit$2 = "kitt-u_opacityExit_ogyytm1";
|
|
4342
|
+
const opacityExitActive$2 = "kitt-u_opacityExitActive_o18xvk52";
|
|
4343
|
+
const opacityClassNames$2 = {
|
|
4344
|
+
appear: opacityEnter$2,
|
|
4345
|
+
appearActive: opacityEnterActive$2,
|
|
4346
|
+
enter: opacityEnter$2,
|
|
4347
|
+
enterActive: opacityEnterActive$2,
|
|
4348
|
+
exit: opacityExit$2,
|
|
4349
|
+
exitActive: opacityExitActive$2
|
|
4350
|
+
};
|
|
4426
4351
|
function CardModalAnimation({
|
|
4427
|
-
visible,
|
|
4428
4352
|
children,
|
|
4353
|
+
appear = true,
|
|
4354
|
+
visible,
|
|
4355
|
+
unmountOnExit = true,
|
|
4356
|
+
isAnimationEnabled = true,
|
|
4429
4357
|
onEnter,
|
|
4430
4358
|
onEntered,
|
|
4431
4359
|
onExit,
|
|
4432
4360
|
onExited,
|
|
4433
|
-
onClose
|
|
4361
|
+
onClose,
|
|
4362
|
+
...props
|
|
4434
4363
|
}) {
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
const
|
|
4438
|
-
|
|
4439
|
-
|
|
4364
|
+
// React 19 has removed the ReactDOM.findDOMNode method. We need to use refs to access DOM nodes in CSSTransition.
|
|
4365
|
+
// See https://github.com/reactjs/react-transition-group/issues/918
|
|
4366
|
+
const overlayRef = useRef(null);
|
|
4367
|
+
const contentRef = useRef(null);
|
|
4368
|
+
const theme = useTheme();
|
|
4369
|
+
const {
|
|
4370
|
+
animation
|
|
4371
|
+
} = theme.kitt.cardModal;
|
|
4372
|
+
const sharedProps = {
|
|
4373
|
+
in: visible,
|
|
4374
|
+
appear,
|
|
4375
|
+
unmountOnExit
|
|
4440
4376
|
};
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
children: /*#__PURE__*/jsx(Overlay, {
|
|
4471
|
-
onPress: onClose
|
|
4472
|
-
})
|
|
4473
|
-
}), /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4474
|
-
children: /*#__PURE__*/jsx(NativeRotationAnimation, {
|
|
4475
|
-
visible: isContentVisible,
|
|
4476
|
-
onExited: handleAnimationExited,
|
|
4477
|
-
onEntered: onEntered,
|
|
4478
|
-
children: children
|
|
4479
|
-
})
|
|
4480
|
-
})]
|
|
4481
|
-
})
|
|
4377
|
+
return /*#__PURE__*/jsxs(View, {
|
|
4378
|
+
...props,
|
|
4379
|
+
height: "100%",
|
|
4380
|
+
justifyContent: "center",
|
|
4381
|
+
children: [/*#__PURE__*/jsx(CSSTransition, {
|
|
4382
|
+
...sharedProps,
|
|
4383
|
+
nodeRef: overlayRef,
|
|
4384
|
+
timeout: isAnimationEnabled ? animation.overlay.duration : 0,
|
|
4385
|
+
classNames: opacityClassNames$2,
|
|
4386
|
+
children: /*#__PURE__*/jsx(Overlay, {
|
|
4387
|
+
ref: overlayRef,
|
|
4388
|
+
onPress: onClose
|
|
4389
|
+
})
|
|
4390
|
+
}), /*#__PURE__*/jsx(CSSTransition, {
|
|
4391
|
+
...sharedProps,
|
|
4392
|
+
nodeRef: contentRef,
|
|
4393
|
+
timeout: isAnimationEnabled ? animation.content.duration : 0,
|
|
4394
|
+
classNames: contentAnimationClassNames$1,
|
|
4395
|
+
onEnter: onEnter,
|
|
4396
|
+
onEntered: onEntered,
|
|
4397
|
+
onExit: onExit,
|
|
4398
|
+
onExited: onExited,
|
|
4399
|
+
children: /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4400
|
+
ref: contentRef,
|
|
4401
|
+
alignItems: "center",
|
|
4402
|
+
margin: "auto",
|
|
4403
|
+
children: children
|
|
4404
|
+
})
|
|
4405
|
+
})]
|
|
4482
4406
|
});
|
|
4483
4407
|
}
|
|
4484
4408
|
|