@ornikar/kitt-universal 25.48.0 → 25.48.1-canary.430f6cd109998511d4c4ad7369a24908547c62f4.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 +11 -0
- package/dist/definitions/CardModal2/CardModal2.d.ts +19 -0
- package/dist/definitions/CardModal2/CardModal2.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts +8 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts +4 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2Animation.web.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts +7 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/CardModal2RotationContainer.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts +8 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeOpacityAnimation.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts +11 -0
- package/dist/definitions/CardModal2/components/CardModal2Animation/NativeRotationAnimation.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts +8 -0
- package/dist/definitions/CardModal2/components/CardModal2Behaviour.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Body.d.ts +7 -0
- package/dist/definitions/CardModal2/components/CardModal2Body.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts +7 -0
- package/dist/definitions/CardModal2/components/CardModal2Footer.d.ts.map +1 -0
- package/dist/definitions/CardModal2/components/CardModal2Header.d.ts +20 -0
- package/dist/definitions/CardModal2/components/CardModal2Header.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts +18 -0
- package/dist/definitions/FullscreenModal2/FullscreenModal2.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts +8 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Animation.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts +8 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Behaviour.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts +9 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Body.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts +8 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Container.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts +8 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Footer.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts +22 -0
- package/dist/definitions/FullscreenModal2/components/FullscreenModal2Header.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts +7 -0
- package/dist/definitions/FullscreenModal2/components/NativeOpacityAnimation.d.ts.map +1 -0
- package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts +10 -0
- package/dist/definitions/FullscreenModal2/components/NativeSlideInAnimation.d.ts.map +1 -0
- package/dist/definitions/NavigationModal2/NavigationModal2.d.ts +23 -0
- package/dist/definitions/NavigationModal2/NavigationModal2.d.ts.map +1 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts +8 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Behaviour.d.ts.map +1 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts +7 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Body.d.ts.map +1 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts +7 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Footer.d.ts.map +1 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts +7 -0
- package/dist/definitions/NavigationModal2/components/NavigationModal2Header.d.ts.map +1 -0
- package/dist/definitions/index.d.ts +6 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +1023 -294
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +1023 -294
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +802 -76
- package/dist/index-node-20.10.cjs.js.map +1 -1
- package/dist/index-node-20.10.cjs.web.css +8 -0
- package/dist/index-node-20.10.cjs.web.js +777 -120
- package/dist/index-node-20.10.cjs.web.js.map +1 -1
- package/dist/index-node-20.10.es.mjs +800 -77
- package/dist/index-node-20.10.es.mjs.map +1 -1
- package/dist/index-node-20.10.es.web.css +8 -0
- package/dist/index-node-20.10.es.web.mjs +776 -122
- package/dist/index-node-20.10.es.web.mjs.map +1 -1
- package/dist/index.es.js +890 -152
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +778 -120
- package/dist/index.es.web.js.map +1 -1
- package/dist/styles.css +8 -0
- package/dist/tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3992,7 +3992,7 @@ function CardModalRotationContainer(props) {
|
|
|
3992
3992
|
});
|
|
3993
3993
|
}
|
|
3994
3994
|
|
|
3995
|
-
function NativeOpacityAnimation$
|
|
3995
|
+
function NativeOpacityAnimation$4({
|
|
3996
3996
|
visible,
|
|
3997
3997
|
children,
|
|
3998
3998
|
onExited
|
|
@@ -4029,7 +4029,7 @@ function NativeOpacityAnimation$2({
|
|
|
4029
4029
|
});
|
|
4030
4030
|
}
|
|
4031
4031
|
|
|
4032
|
-
function NativeRotationAnimation$
|
|
4032
|
+
function NativeRotationAnimation$2({
|
|
4033
4033
|
visible,
|
|
4034
4034
|
children,
|
|
4035
4035
|
onEntered,
|
|
@@ -4116,14 +4116,14 @@ function CardModalAnimation({
|
|
|
4116
4116
|
flexGrow: 1,
|
|
4117
4117
|
justifyContent: "center",
|
|
4118
4118
|
alignItems: "center",
|
|
4119
|
-
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$
|
|
4119
|
+
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$4, {
|
|
4120
4120
|
visible: isContentVisible,
|
|
4121
4121
|
onExited: handleAnimationExited,
|
|
4122
4122
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
4123
4123
|
onPress: onClose
|
|
4124
4124
|
})
|
|
4125
4125
|
}), /*#__PURE__*/jsx(CardModalRotationContainer, {
|
|
4126
|
-
children: /*#__PURE__*/jsx(NativeRotationAnimation$
|
|
4126
|
+
children: /*#__PURE__*/jsx(NativeRotationAnimation$2, {
|
|
4127
4127
|
visible: isContentVisible,
|
|
4128
4128
|
onExited: handleAnimationExited,
|
|
4129
4129
|
onEntered: onEntered,
|
|
@@ -4277,17 +4277,320 @@ function CardModal({
|
|
|
4277
4277
|
maxHeight: "100%",
|
|
4278
4278
|
maxWidth: maxWidth,
|
|
4279
4279
|
minHeight: "kitt.cardModal.minHeight",
|
|
4280
|
-
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
4281
|
-
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4282
|
-
children: [header || null, body || null, footer || null]
|
|
4283
|
-
})
|
|
4284
|
-
})
|
|
4280
|
+
children: /*#__PURE__*/jsx(ContentContainer, {
|
|
4281
|
+
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
4282
|
+
children: [header || null, body || null, footer || null]
|
|
4283
|
+
})
|
|
4284
|
+
})
|
|
4285
|
+
});
|
|
4286
|
+
}
|
|
4287
|
+
CardModal.Body = CardModalBody;
|
|
4288
|
+
CardModal.Header = CardModalHeader;
|
|
4289
|
+
CardModal.Footer = CardModalFooter;
|
|
4290
|
+
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4291
|
+
|
|
4292
|
+
function CardModal2RotationContainer(props) {
|
|
4293
|
+
return /*#__PURE__*/jsx(View, {
|
|
4294
|
+
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4295
|
+
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
4296
|
+
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
4297
|
+
width: "100%",
|
|
4298
|
+
maxHeight: "100%",
|
|
4299
|
+
_web: {
|
|
4300
|
+
maxHeight: '100svh'
|
|
4301
|
+
},
|
|
4302
|
+
...props
|
|
4303
|
+
});
|
|
4304
|
+
}
|
|
4305
|
+
|
|
4306
|
+
function NativeOpacityAnimation$3({
|
|
4307
|
+
visible,
|
|
4308
|
+
children,
|
|
4309
|
+
onExited
|
|
4310
|
+
}) {
|
|
4311
|
+
const theme = useTheme();
|
|
4312
|
+
const hasRunAnimationRef = useRef(false);
|
|
4313
|
+
function handleAnimationFinished() {
|
|
4314
|
+
if (visible) {
|
|
4315
|
+
hasRunAnimationRef.current = true;
|
|
4316
|
+
}
|
|
4317
|
+
if (!visible && hasRunAnimationRef.current) {
|
|
4318
|
+
onExited();
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
const opacityStyle = useAnimatedStyle(() => {
|
|
4322
|
+
const {
|
|
4323
|
+
duration,
|
|
4324
|
+
easing
|
|
4325
|
+
} = theme.kitt.cardModal.animation.overlay;
|
|
4326
|
+
const [x1, y1, x2, y2] = easing;
|
|
4327
|
+
return {
|
|
4328
|
+
opacity: withTiming(visible ? 1 : 0, {
|
|
4329
|
+
duration,
|
|
4330
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4331
|
+
}, isFinished => {
|
|
4332
|
+
if (!isFinished) return;
|
|
4333
|
+
runOnJS(handleAnimationFinished)();
|
|
4334
|
+
})
|
|
4335
|
+
};
|
|
4336
|
+
});
|
|
4337
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
4338
|
+
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
4339
|
+
children: children
|
|
4340
|
+
});
|
|
4341
|
+
}
|
|
4342
|
+
|
|
4343
|
+
function NativeRotationAnimation$1({
|
|
4344
|
+
visible,
|
|
4345
|
+
children,
|
|
4346
|
+
onEntered,
|
|
4347
|
+
onExited
|
|
4348
|
+
}) {
|
|
4349
|
+
const theme = useTheme();
|
|
4350
|
+
const hasRunAnimationRef = useRef(false);
|
|
4351
|
+
const rotation = useSharedValue(0.8);
|
|
4352
|
+
function handleAnimationFinished() {
|
|
4353
|
+
if (visible) {
|
|
4354
|
+
if (onEntered) onEntered();
|
|
4355
|
+
hasRunAnimationRef.current = true;
|
|
4356
|
+
}
|
|
4357
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
4358
|
+
}
|
|
4359
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
4360
|
+
const {
|
|
4361
|
+
duration,
|
|
4362
|
+
easing
|
|
4363
|
+
} = theme.kitt.cardModal.animation.content;
|
|
4364
|
+
const [x1, y1, x2, y2] = easing;
|
|
4365
|
+
rotation.value = withTiming(visible ? 0 : 5, {
|
|
4366
|
+
duration,
|
|
4367
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4368
|
+
}, isFinished => {
|
|
4369
|
+
if (!isFinished) return;
|
|
4370
|
+
runOnJS(handleAnimationFinished)();
|
|
4371
|
+
});
|
|
4372
|
+
return {
|
|
4373
|
+
opacity: withTiming(visible ? 1 : 0, {
|
|
4374
|
+
duration,
|
|
4375
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4376
|
+
}),
|
|
4377
|
+
transform: [{
|
|
4378
|
+
scale: withTiming(visible ? 1 : 0.8, {
|
|
4379
|
+
duration,
|
|
4380
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
4381
|
+
})
|
|
4382
|
+
}, {
|
|
4383
|
+
rotateZ: `${rotation.value}deg`
|
|
4384
|
+
}]
|
|
4385
|
+
};
|
|
4386
|
+
});
|
|
4387
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
4388
|
+
style: [animatedStyle],
|
|
4389
|
+
children: children
|
|
4390
|
+
});
|
|
4391
|
+
}
|
|
4392
|
+
|
|
4393
|
+
function CardModal2Animation({
|
|
4394
|
+
visible,
|
|
4395
|
+
children,
|
|
4396
|
+
onEnter,
|
|
4397
|
+
onEntered,
|
|
4398
|
+
onExit,
|
|
4399
|
+
onExited,
|
|
4400
|
+
onClose
|
|
4401
|
+
}) {
|
|
4402
|
+
const [isModalVisible, setIsModalVisible] = useState(visible);
|
|
4403
|
+
const [isContentVisible, setIsContentVisible] = useState(false);
|
|
4404
|
+
const handleAnimationExited = () => {
|
|
4405
|
+
setIsModalVisible(false);
|
|
4406
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
4407
|
+
if (Platform.OS === 'android' && onExited) onExited();
|
|
4408
|
+
};
|
|
4409
|
+
useEffect(() => {
|
|
4410
|
+
if (!(!visible && isContentVisible)) return;
|
|
4411
|
+
if (onExit) onExit();
|
|
4412
|
+
setIsContentVisible(false);
|
|
4413
|
+
}, [visible, isContentVisible, onExit]);
|
|
4414
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
4415
|
+
transparent: true,
|
|
4416
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
4417
|
+
visible: isModalVisible,
|
|
4418
|
+
onShow: () => {
|
|
4419
|
+
if (onEnter) onEnter();
|
|
4420
|
+
setIsContentVisible(true);
|
|
4421
|
+
},
|
|
4422
|
+
onDismiss: () => {
|
|
4423
|
+
if (onExited) onExited();
|
|
4424
|
+
},
|
|
4425
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
4426
|
+
position: "relative",
|
|
4427
|
+
flexGrow: 1,
|
|
4428
|
+
justifyContent: "center",
|
|
4429
|
+
alignItems: "center",
|
|
4430
|
+
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$3, {
|
|
4431
|
+
visible: isContentVisible,
|
|
4432
|
+
onExited: handleAnimationExited,
|
|
4433
|
+
children: /*#__PURE__*/jsx(Overlay, {
|
|
4434
|
+
onPress: onClose
|
|
4435
|
+
})
|
|
4436
|
+
}), /*#__PURE__*/jsx(CardModal2RotationContainer, {
|
|
4437
|
+
children: /*#__PURE__*/jsx(NativeRotationAnimation$1, {
|
|
4438
|
+
visible: isContentVisible,
|
|
4439
|
+
onExited: handleAnimationExited,
|
|
4440
|
+
onEntered: onEntered,
|
|
4441
|
+
children: children
|
|
4442
|
+
})
|
|
4443
|
+
})]
|
|
4444
|
+
})
|
|
4445
|
+
});
|
|
4446
|
+
}
|
|
4447
|
+
|
|
4448
|
+
function CardModal2Behaviour({
|
|
4449
|
+
children,
|
|
4450
|
+
visible,
|
|
4451
|
+
onClose,
|
|
4452
|
+
onExited,
|
|
4453
|
+
...props
|
|
4454
|
+
}) {
|
|
4455
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
4456
|
+
useEffect(() => {
|
|
4457
|
+
if (visible === true) {
|
|
4458
|
+
setIsModalBehaviourVisible(true);
|
|
4459
|
+
}
|
|
4460
|
+
}, [visible]);
|
|
4461
|
+
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
4462
|
+
visible: isModalBehaviourVisible,
|
|
4463
|
+
onClose: onClose,
|
|
4464
|
+
children: /*#__PURE__*/jsx(CardModal2Animation, {
|
|
4465
|
+
...props,
|
|
4466
|
+
visible: visible,
|
|
4467
|
+
onExited: () => {
|
|
4468
|
+
if (onExited) onExited();
|
|
4469
|
+
setIsModalBehaviourVisible(false);
|
|
4470
|
+
},
|
|
4471
|
+
onClose: onClose,
|
|
4472
|
+
children: children
|
|
4473
|
+
})
|
|
4474
|
+
});
|
|
4475
|
+
}
|
|
4476
|
+
|
|
4477
|
+
function CardModal2Body({
|
|
4478
|
+
children,
|
|
4479
|
+
paddingX = {
|
|
4480
|
+
base: 'kitt.4',
|
|
4481
|
+
medium: 'kitt.6'
|
|
4482
|
+
},
|
|
4483
|
+
paddingY = 'kitt.4',
|
|
4484
|
+
...props
|
|
4485
|
+
}) {
|
|
4486
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
4487
|
+
showsVerticalScrollIndicator: false,
|
|
4488
|
+
_contentContainerStyle: {
|
|
4489
|
+
paddingX,
|
|
4490
|
+
paddingY
|
|
4491
|
+
},
|
|
4492
|
+
...props,
|
|
4493
|
+
children: children
|
|
4494
|
+
});
|
|
4495
|
+
}
|
|
4496
|
+
|
|
4497
|
+
function CardModal2Footer({
|
|
4498
|
+
children,
|
|
4499
|
+
padding = {
|
|
4500
|
+
base: 'kitt.4',
|
|
4501
|
+
medium: 'kitt.2'
|
|
4502
|
+
},
|
|
4503
|
+
hasSeparator = true,
|
|
4504
|
+
...props
|
|
4505
|
+
}) {
|
|
4506
|
+
return /*#__PURE__*/jsx(View, {
|
|
4507
|
+
...props,
|
|
4508
|
+
marginTop: "kitt.2",
|
|
4509
|
+
padding: padding,
|
|
4510
|
+
borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4511
|
+
borderColor: "kitt.separator",
|
|
4512
|
+
alignItems: {
|
|
4513
|
+
base: undefined,
|
|
4514
|
+
medium: 'flex-end'
|
|
4515
|
+
},
|
|
4516
|
+
children: children
|
|
4517
|
+
});
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
function CardModal2Header({
|
|
4521
|
+
children,
|
|
4522
|
+
title,
|
|
4523
|
+
paddingBottom = {
|
|
4524
|
+
base: 'kitt.4',
|
|
4525
|
+
medium: 'kitt.2'
|
|
4526
|
+
},
|
|
4527
|
+
hasSeparator = true,
|
|
4528
|
+
right,
|
|
4529
|
+
left,
|
|
4530
|
+
...props
|
|
4531
|
+
}) {
|
|
4532
|
+
const defaultContainerPadding = {
|
|
4533
|
+
base: 'kitt.4',
|
|
4534
|
+
medium: 'kitt.6'
|
|
4535
|
+
};
|
|
4536
|
+
return /*#__PURE__*/jsx(View, {
|
|
4537
|
+
...props,
|
|
4538
|
+
padding: paddingBottom,
|
|
4539
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4540
|
+
borderColor: "kitt.separator",
|
|
4541
|
+
justifyContent: "center",
|
|
4542
|
+
width: "100%",
|
|
4543
|
+
height: "kitt.cardModal.header.height",
|
|
4544
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4545
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4546
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
4547
|
+
alignItems: "center",
|
|
4548
|
+
flexDirection: "row",
|
|
4549
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4550
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
4551
|
+
width: "kitt.iconButton.width",
|
|
4552
|
+
children: left
|
|
4553
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
4554
|
+
flexGrow: "1",
|
|
4555
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4556
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4557
|
+
children: [title ? /*#__PURE__*/jsx(Typography.Text, {
|
|
4558
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4559
|
+
variant: "bold",
|
|
4560
|
+
children: title
|
|
4561
|
+
}) : null, children]
|
|
4562
|
+
}), right ? /*#__PURE__*/jsx(View, {
|
|
4563
|
+
width: "kitt.iconButton.width",
|
|
4564
|
+
children: right
|
|
4565
|
+
}) : null]
|
|
4566
|
+
})
|
|
4567
|
+
});
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4570
|
+
function CardModal2({
|
|
4571
|
+
backgroundColor = 'kitt.uiBackgroundLight',
|
|
4572
|
+
maxWidth = 'kitt.cardModal.maxWidth',
|
|
4573
|
+
withoutShadow,
|
|
4574
|
+
children,
|
|
4575
|
+
...props
|
|
4576
|
+
}) {
|
|
4577
|
+
return /*#__PURE__*/jsx(View, {
|
|
4578
|
+
...props,
|
|
4579
|
+
overflow: "hidden",
|
|
4580
|
+
backgroundColor: backgroundColor,
|
|
4581
|
+
shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
|
|
4582
|
+
borderRadius: "kitt.cardModal.borderRadius",
|
|
4583
|
+
width: "100%",
|
|
4584
|
+
maxHeight: "100%",
|
|
4585
|
+
maxWidth: maxWidth,
|
|
4586
|
+
minHeight: "kitt.cardModal.minHeight",
|
|
4587
|
+
children: children
|
|
4285
4588
|
});
|
|
4286
4589
|
}
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4590
|
+
CardModal2.Body = CardModal2Body;
|
|
4591
|
+
CardModal2.Header = CardModal2Header;
|
|
4592
|
+
CardModal2.Footer = CardModal2Footer;
|
|
4593
|
+
CardModal2.Behaviour = CardModal2Behaviour;
|
|
4291
4594
|
|
|
4292
4595
|
function getBackgroundColor$5({
|
|
4293
4596
|
isDisabled,
|
|
@@ -4584,7 +4887,7 @@ const ChoicesElements = {
|
|
|
4584
4887
|
ButtonChoices
|
|
4585
4888
|
};
|
|
4586
4889
|
|
|
4587
|
-
function NativeOpacityAnimation$
|
|
4890
|
+
function NativeOpacityAnimation$2({
|
|
4588
4891
|
visible,
|
|
4589
4892
|
children,
|
|
4590
4893
|
onExited
|
|
@@ -4708,7 +5011,7 @@ function DialogModalAnimation({
|
|
|
4708
5011
|
flexGrow: 1,
|
|
4709
5012
|
justifyContent: "center",
|
|
4710
5013
|
alignItems: "center",
|
|
4711
|
-
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$
|
|
5014
|
+
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$2, {
|
|
4712
5015
|
visible: isContentVisible,
|
|
4713
5016
|
onExited: handleAnimationExited,
|
|
4714
5017
|
children: /*#__PURE__*/jsx(Overlay, {
|
|
@@ -7780,36 +8083,313 @@ function FullscreenModalBody({
|
|
|
7780
8083
|
const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
7781
8084
|
return /*#__PURE__*/jsx(View, {
|
|
7782
8085
|
...props,
|
|
7783
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
7784
|
-
paddingTop: paddingTop,
|
|
7785
|
-
paddingBottom: paddingBottom,
|
|
7786
|
-
style: style,
|
|
7787
|
-
children: children
|
|
8086
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8087
|
+
paddingTop: paddingTop,
|
|
8088
|
+
paddingBottom: paddingBottom,
|
|
8089
|
+
style: style,
|
|
8090
|
+
children: children
|
|
8091
|
+
});
|
|
8092
|
+
}
|
|
8093
|
+
|
|
8094
|
+
function FullscreenModalFooter({
|
|
8095
|
+
shouldHandleBottomNotch = true,
|
|
8096
|
+
hasSeparator = true,
|
|
8097
|
+
children,
|
|
8098
|
+
...props
|
|
8099
|
+
}) {
|
|
8100
|
+
const {
|
|
8101
|
+
bottom
|
|
8102
|
+
} = useSafeAreaInsets();
|
|
8103
|
+
return /*#__PURE__*/jsx(View, {
|
|
8104
|
+
borderTopColor: "kitt.separator",
|
|
8105
|
+
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
8106
|
+
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8107
|
+
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
8108
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8109
|
+
...props,
|
|
8110
|
+
children: /*#__PURE__*/jsx(View, {
|
|
8111
|
+
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8112
|
+
children: children
|
|
8113
|
+
})
|
|
8114
|
+
});
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
function NativeOpacityAnimation$1({
|
|
8118
|
+
visible,
|
|
8119
|
+
children
|
|
8120
|
+
}) {
|
|
8121
|
+
const theme = useTheme();
|
|
8122
|
+
const opacityStyle = useAnimatedStyle(() => {
|
|
8123
|
+
const {
|
|
8124
|
+
duration,
|
|
8125
|
+
easing
|
|
8126
|
+
} = theme.kitt.fullscreenModal.animation.overlay;
|
|
8127
|
+
const [x1, y1, x2, y2] = easing;
|
|
8128
|
+
return {
|
|
8129
|
+
opacity: withTiming(visible ? 1 : 0, {
|
|
8130
|
+
duration,
|
|
8131
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
8132
|
+
})
|
|
8133
|
+
};
|
|
8134
|
+
});
|
|
8135
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
8136
|
+
style: [StyleSheet.absoluteFillObject, opacityStyle],
|
|
8137
|
+
children: children
|
|
8138
|
+
});
|
|
8139
|
+
}
|
|
8140
|
+
|
|
8141
|
+
function NativeSlideInAnimation$1({
|
|
8142
|
+
visible,
|
|
8143
|
+
children,
|
|
8144
|
+
onEntered,
|
|
8145
|
+
onExited
|
|
8146
|
+
}) {
|
|
8147
|
+
const theme = useTheme();
|
|
8148
|
+
const {
|
|
8149
|
+
height: wHeight
|
|
8150
|
+
} = useWindowDimensions();
|
|
8151
|
+
const hasRunAnimationRef = useRef(false);
|
|
8152
|
+
function handleAnimationFinished() {
|
|
8153
|
+
if (visible) {
|
|
8154
|
+
if (onEntered) onEntered();
|
|
8155
|
+
hasRunAnimationRef.current = true;
|
|
8156
|
+
}
|
|
8157
|
+
|
|
8158
|
+
// Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
|
|
8159
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
8160
|
+
}
|
|
8161
|
+
const translateStyle = useAnimatedStyle(() => {
|
|
8162
|
+
const {
|
|
8163
|
+
duration,
|
|
8164
|
+
easing
|
|
8165
|
+
} = theme.kitt.fullscreenModal.animation.content;
|
|
8166
|
+
const [x1, y1, x2, y2] = easing;
|
|
8167
|
+
return {
|
|
8168
|
+
transform: [{
|
|
8169
|
+
translateY: withTiming(visible ? 0 : wHeight, {
|
|
8170
|
+
duration,
|
|
8171
|
+
easing: Easing$1.bezier(x1, y1, x2, y2)
|
|
8172
|
+
}, isFinished => {
|
|
8173
|
+
if (!isFinished) return;
|
|
8174
|
+
runOnJS(handleAnimationFinished)();
|
|
8175
|
+
})
|
|
8176
|
+
}]
|
|
8177
|
+
};
|
|
8178
|
+
});
|
|
8179
|
+
return /*#__PURE__*/jsx(Animated.View, {
|
|
8180
|
+
style: [{
|
|
8181
|
+
transform: [{
|
|
8182
|
+
translateY: wHeight
|
|
8183
|
+
}]
|
|
8184
|
+
}, translateStyle, {
|
|
8185
|
+
width: '100%',
|
|
8186
|
+
flex: 1
|
|
8187
|
+
}],
|
|
8188
|
+
children: children
|
|
8189
|
+
});
|
|
8190
|
+
}
|
|
8191
|
+
|
|
8192
|
+
function FullscreenModalAnimation({
|
|
8193
|
+
visible,
|
|
8194
|
+
children,
|
|
8195
|
+
onEnter,
|
|
8196
|
+
onEntered,
|
|
8197
|
+
onExit,
|
|
8198
|
+
onExited
|
|
8199
|
+
}) {
|
|
8200
|
+
const [isModalVisible, setIsModalVisible] = useState(visible);
|
|
8201
|
+
const [isContentVisible, setIsContentVisible] = useState(false);
|
|
8202
|
+
const handleAnimationExited = () => {
|
|
8203
|
+
setIsModalVisible(false);
|
|
8204
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
8205
|
+
if (Platform.OS === 'android' && onExited) onExited();
|
|
8206
|
+
};
|
|
8207
|
+
|
|
8208
|
+
// When parent visibility is set to false, in order to have our exit animation we must in this order :
|
|
8209
|
+
// 1 - run the exit animation
|
|
8210
|
+
// 2 - once it is done, unmount the Modal
|
|
8211
|
+
useEffect(() => {
|
|
8212
|
+
if (!(!visible && isContentVisible)) return;
|
|
8213
|
+
if (onExit) onExit();
|
|
8214
|
+
setIsContentVisible(false);
|
|
8215
|
+
}, [visible, isContentVisible, onExit]);
|
|
8216
|
+
return /*#__PURE__*/jsx(Modal, {
|
|
8217
|
+
transparent: true,
|
|
8218
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
8219
|
+
visible: isModalVisible,
|
|
8220
|
+
onShow: () => {
|
|
8221
|
+
if (onEnter) onEnter();
|
|
8222
|
+
setIsContentVisible(true);
|
|
8223
|
+
},
|
|
8224
|
+
onDismiss: () => {
|
|
8225
|
+
if (onExited) onExited();
|
|
8226
|
+
},
|
|
8227
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
8228
|
+
position: "relative",
|
|
8229
|
+
flexGrow: 1,
|
|
8230
|
+
justifyContent: "center",
|
|
8231
|
+
alignItems: "center",
|
|
8232
|
+
children: [/*#__PURE__*/jsx(NativeOpacityAnimation$1, {
|
|
8233
|
+
visible: isContentVisible,
|
|
8234
|
+
children: /*#__PURE__*/jsx(Overlay, {
|
|
8235
|
+
onPress: handleAnimationExited
|
|
8236
|
+
})
|
|
8237
|
+
}), /*#__PURE__*/jsx(NativeSlideInAnimation$1, {
|
|
8238
|
+
visible: isContentVisible,
|
|
8239
|
+
onExited: handleAnimationExited,
|
|
8240
|
+
onEntered: onEntered,
|
|
8241
|
+
children: /*#__PURE__*/jsx(View, {
|
|
8242
|
+
flexGrow: 1,
|
|
8243
|
+
children: children
|
|
8244
|
+
})
|
|
8245
|
+
})]
|
|
8246
|
+
})
|
|
8247
|
+
});
|
|
8248
|
+
}
|
|
8249
|
+
|
|
8250
|
+
function FullscreenModalBehaviour({
|
|
8251
|
+
children,
|
|
8252
|
+
visible,
|
|
8253
|
+
onClose,
|
|
8254
|
+
onExited,
|
|
8255
|
+
...props
|
|
8256
|
+
}) {
|
|
8257
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
8258
|
+
useEffect(() => {
|
|
8259
|
+
if (visible === true) {
|
|
8260
|
+
setIsModalBehaviourVisible(true);
|
|
8261
|
+
}
|
|
8262
|
+
}, [visible]);
|
|
8263
|
+
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
8264
|
+
visible: isModalBehaviourVisible,
|
|
8265
|
+
onClose: onClose,
|
|
8266
|
+
children: /*#__PURE__*/jsx(FullscreenModalAnimation, {
|
|
8267
|
+
...props,
|
|
8268
|
+
visible: visible,
|
|
8269
|
+
onExited: () => {
|
|
8270
|
+
if (onExited) onExited();
|
|
8271
|
+
setIsModalBehaviourVisible(false);
|
|
8272
|
+
},
|
|
8273
|
+
children: children
|
|
8274
|
+
})
|
|
8275
|
+
});
|
|
8276
|
+
}
|
|
8277
|
+
|
|
8278
|
+
function FullscreenModalContainer({
|
|
8279
|
+
children,
|
|
8280
|
+
backgroundColor
|
|
8281
|
+
}) {
|
|
8282
|
+
return /*#__PURE__*/jsx(View, {
|
|
8283
|
+
position: "relative",
|
|
8284
|
+
flexGrow: 1,
|
|
8285
|
+
flexShrink: 1,
|
|
8286
|
+
flexBasis: "100%"
|
|
8287
|
+
/*
|
|
8288
|
+
Here we are setting the same min and max height because on web the content was overflowing and not scrolling
|
|
8289
|
+
minHeight is needed to make the modal fullscreen
|
|
8290
|
+
maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
|
|
8291
|
+
We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
|
|
8292
|
+
*/,
|
|
8293
|
+
_web: {
|
|
8294
|
+
minHeight: '100svh',
|
|
8295
|
+
maxHeight: '100svh'
|
|
8296
|
+
},
|
|
8297
|
+
backgroundColor: backgroundColor ?? 'kitt.uiBackgroundLight',
|
|
8298
|
+
children: children
|
|
8299
|
+
});
|
|
8300
|
+
}
|
|
8301
|
+
|
|
8302
|
+
function FullscreenModalHeader({
|
|
8303
|
+
hasSeparator = true,
|
|
8304
|
+
isTransparent,
|
|
8305
|
+
title,
|
|
8306
|
+
children,
|
|
8307
|
+
right,
|
|
8308
|
+
left,
|
|
8309
|
+
shouldHandleTopNotch = true,
|
|
8310
|
+
...props
|
|
8311
|
+
}) {
|
|
8312
|
+
const {
|
|
8313
|
+
top
|
|
8314
|
+
} = useSafeAreaInsets();
|
|
8315
|
+
const hasRight = Boolean(right);
|
|
8316
|
+
const hasLeft = Boolean(left);
|
|
8317
|
+
const hasContent = Boolean(title || children);
|
|
8318
|
+
return /*#__PURE__*/jsx(View, {
|
|
8319
|
+
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8320
|
+
minHeight: "kitt.fullscreenModal.header.height",
|
|
8321
|
+
width: "100%",
|
|
8322
|
+
justifyContent: "center",
|
|
8323
|
+
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8324
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8325
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8326
|
+
borderBottomColor: "kitt.separator",
|
|
8327
|
+
borderBottomWidth: hasSeparator ? 1 : undefined,
|
|
8328
|
+
...props,
|
|
8329
|
+
children: /*#__PURE__*/jsxs(View, {
|
|
8330
|
+
flexDirection: "row",
|
|
8331
|
+
alignItems: "center",
|
|
8332
|
+
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8333
|
+
children: [left ? /*#__PURE__*/jsx(View, {
|
|
8334
|
+
width: "kitt.iconButton.width",
|
|
8335
|
+
children: left
|
|
8336
|
+
}) : null, title ? /*#__PURE__*/jsx(View, {
|
|
8337
|
+
flexGrow: 1,
|
|
8338
|
+
flexShrink: 1,
|
|
8339
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8340
|
+
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8341
|
+
children: /*#__PURE__*/jsx(Typography.Text, {
|
|
8342
|
+
variant: "bold",
|
|
8343
|
+
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8344
|
+
children: title
|
|
8345
|
+
})
|
|
8346
|
+
}) : null, children ? /*#__PURE__*/jsx(View, {
|
|
8347
|
+
flexGrow: 1,
|
|
8348
|
+
flexShrink: 1,
|
|
8349
|
+
alignItems: "center",
|
|
8350
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8351
|
+
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8352
|
+
children: children
|
|
8353
|
+
}) : null, right || left ? /*#__PURE__*/jsx(View, {
|
|
8354
|
+
width: "kitt.iconButton.width",
|
|
8355
|
+
children: right
|
|
8356
|
+
}) : null]
|
|
8357
|
+
})
|
|
7788
8358
|
});
|
|
7789
8359
|
}
|
|
7790
8360
|
|
|
7791
|
-
function
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
|
|
7795
|
-
|
|
8361
|
+
function FullscreenModal({
|
|
8362
|
+
body,
|
|
8363
|
+
header,
|
|
8364
|
+
footer,
|
|
8365
|
+
backgroundColor,
|
|
8366
|
+
contentContainer: ContentContainer = IdentityComponent
|
|
7796
8367
|
}) {
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
8368
|
+
return /*#__PURE__*/jsx(FullscreenModalContainer, {
|
|
8369
|
+
backgroundColor: backgroundColor,
|
|
8370
|
+
children: /*#__PURE__*/jsxs(ContentContainer, {
|
|
8371
|
+
children: [header ? /*#__PURE__*/jsx(View, {
|
|
8372
|
+
children: header
|
|
8373
|
+
}) : null, /*#__PURE__*/jsxs(View, {
|
|
8374
|
+
flexGrow: 1,
|
|
8375
|
+
flexShrink: 1,
|
|
8376
|
+
justifyContent: "space-between",
|
|
8377
|
+
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
8378
|
+
bounces: false,
|
|
8379
|
+
contentContainerStyle: {
|
|
8380
|
+
flexGrow: 1,
|
|
8381
|
+
position: 'relative'
|
|
8382
|
+
},
|
|
8383
|
+
children: body
|
|
8384
|
+
}), footer || null]
|
|
8385
|
+
})]
|
|
7810
8386
|
})
|
|
7811
8387
|
});
|
|
7812
8388
|
}
|
|
8389
|
+
FullscreenModal.Header = FullscreenModalHeader;
|
|
8390
|
+
FullscreenModal.Footer = FullscreenModalFooter;
|
|
8391
|
+
FullscreenModal.Body = FullscreenModalBody;
|
|
8392
|
+
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
7813
8393
|
|
|
7814
8394
|
function NativeOpacityAnimation({
|
|
7815
8395
|
visible,
|
|
@@ -7886,7 +8466,7 @@ function NativeSlideInAnimation({
|
|
|
7886
8466
|
});
|
|
7887
8467
|
}
|
|
7888
8468
|
|
|
7889
|
-
function
|
|
8469
|
+
function FullscreenModal2Animation({
|
|
7890
8470
|
visible,
|
|
7891
8471
|
children,
|
|
7892
8472
|
onEnter,
|
|
@@ -7944,7 +8524,7 @@ function FullscreenModalAnimation({
|
|
|
7944
8524
|
});
|
|
7945
8525
|
}
|
|
7946
8526
|
|
|
7947
|
-
function
|
|
8527
|
+
function FullscreenModal2Behaviour({
|
|
7948
8528
|
children,
|
|
7949
8529
|
visible,
|
|
7950
8530
|
onClose,
|
|
@@ -7960,7 +8540,7 @@ function FullscreenModalBehaviour({
|
|
|
7960
8540
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
7961
8541
|
visible: isModalBehaviourVisible,
|
|
7962
8542
|
onClose: onClose,
|
|
7963
|
-
children: /*#__PURE__*/jsx(
|
|
8543
|
+
children: /*#__PURE__*/jsx(FullscreenModal2Animation, {
|
|
7964
8544
|
...props,
|
|
7965
8545
|
visible: visible,
|
|
7966
8546
|
onExited: () => {
|
|
@@ -7972,7 +8552,51 @@ function FullscreenModalBehaviour({
|
|
|
7972
8552
|
});
|
|
7973
8553
|
}
|
|
7974
8554
|
|
|
7975
|
-
function
|
|
8555
|
+
function FullscreenModal2Body({
|
|
8556
|
+
children,
|
|
8557
|
+
shouldHandleBottomNotch,
|
|
8558
|
+
style,
|
|
8559
|
+
shouldHandleTopNotch,
|
|
8560
|
+
...props
|
|
8561
|
+
}) {
|
|
8562
|
+
const {
|
|
8563
|
+
bottom,
|
|
8564
|
+
top
|
|
8565
|
+
} = useSafeAreaInsets();
|
|
8566
|
+
const {
|
|
8567
|
+
kitt: {
|
|
8568
|
+
fullscreenModal: {
|
|
8569
|
+
body: {
|
|
8570
|
+
verticalPadding
|
|
8571
|
+
}
|
|
8572
|
+
}
|
|
8573
|
+
}
|
|
8574
|
+
} = useTheme();
|
|
8575
|
+
const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
|
|
8576
|
+
const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
8577
|
+
return /*#__PURE__*/jsx(View, {
|
|
8578
|
+
flexGrow: 1,
|
|
8579
|
+
flexShrink: 1,
|
|
8580
|
+
justifyContent: "space-between",
|
|
8581
|
+
children: /*#__PURE__*/jsx(ScrollView$1, {
|
|
8582
|
+
bounces: false,
|
|
8583
|
+
contentContainerStyle: {
|
|
8584
|
+
flexGrow: 1,
|
|
8585
|
+
position: 'relative'
|
|
8586
|
+
},
|
|
8587
|
+
children: /*#__PURE__*/jsx(View, {
|
|
8588
|
+
...props,
|
|
8589
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8590
|
+
paddingTop: paddingTop,
|
|
8591
|
+
paddingBottom: paddingBottom,
|
|
8592
|
+
style: style,
|
|
8593
|
+
children: children
|
|
8594
|
+
})
|
|
8595
|
+
})
|
|
8596
|
+
});
|
|
8597
|
+
}
|
|
8598
|
+
|
|
8599
|
+
function FullscreenModal2Container({
|
|
7976
8600
|
children,
|
|
7977
8601
|
backgroundColor
|
|
7978
8602
|
}) {
|
|
@@ -7996,7 +8620,30 @@ function FullscreenModalContainer({
|
|
|
7996
8620
|
});
|
|
7997
8621
|
}
|
|
7998
8622
|
|
|
7999
|
-
function
|
|
8623
|
+
function FullscreenModal2Footer({
|
|
8624
|
+
shouldHandleBottomNotch = true,
|
|
8625
|
+
hasSeparator = true,
|
|
8626
|
+
children,
|
|
8627
|
+
...props
|
|
8628
|
+
}) {
|
|
8629
|
+
const {
|
|
8630
|
+
bottom
|
|
8631
|
+
} = useSafeAreaInsets();
|
|
8632
|
+
return /*#__PURE__*/jsx(View, {
|
|
8633
|
+
borderTopColor: "kitt.separator",
|
|
8634
|
+
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
8635
|
+
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8636
|
+
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
8637
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8638
|
+
...props,
|
|
8639
|
+
children: /*#__PURE__*/jsx(View, {
|
|
8640
|
+
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8641
|
+
children: children
|
|
8642
|
+
})
|
|
8643
|
+
});
|
|
8644
|
+
}
|
|
8645
|
+
|
|
8646
|
+
function FullscreenModal2Header({
|
|
8000
8647
|
hasSeparator = true,
|
|
8001
8648
|
isTransparent,
|
|
8002
8649
|
title,
|
|
@@ -8055,38 +8702,19 @@ function FullscreenModalHeader({
|
|
|
8055
8702
|
});
|
|
8056
8703
|
}
|
|
8057
8704
|
|
|
8058
|
-
function
|
|
8059
|
-
body,
|
|
8060
|
-
header,
|
|
8061
|
-
footer,
|
|
8705
|
+
function FullscreenModal2({
|
|
8062
8706
|
backgroundColor,
|
|
8063
|
-
|
|
8707
|
+
children
|
|
8064
8708
|
}) {
|
|
8065
|
-
return /*#__PURE__*/jsx(
|
|
8709
|
+
return /*#__PURE__*/jsx(FullscreenModal2Container, {
|
|
8066
8710
|
backgroundColor: backgroundColor,
|
|
8067
|
-
children:
|
|
8068
|
-
children: [header ? /*#__PURE__*/jsx(View, {
|
|
8069
|
-
children: header
|
|
8070
|
-
}) : null, /*#__PURE__*/jsxs(View, {
|
|
8071
|
-
flexGrow: 1,
|
|
8072
|
-
flexShrink: 1,
|
|
8073
|
-
justifyContent: "space-between",
|
|
8074
|
-
children: [/*#__PURE__*/jsx(ScrollView$2, {
|
|
8075
|
-
bounces: false,
|
|
8076
|
-
contentContainerStyle: {
|
|
8077
|
-
flexGrow: 1,
|
|
8078
|
-
position: 'relative'
|
|
8079
|
-
},
|
|
8080
|
-
children: body
|
|
8081
|
-
}), footer || null]
|
|
8082
|
-
})]
|
|
8083
|
-
})
|
|
8711
|
+
children: children
|
|
8084
8712
|
});
|
|
8085
8713
|
}
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8714
|
+
FullscreenModal2.Header = FullscreenModal2Header;
|
|
8715
|
+
FullscreenModal2.Footer = FullscreenModal2Footer;
|
|
8716
|
+
FullscreenModal2.Body = FullscreenModal2Body;
|
|
8717
|
+
FullscreenModal2.Behaviour = FullscreenModal2Behaviour;
|
|
8090
8718
|
|
|
8091
8719
|
function GroupTags({
|
|
8092
8720
|
children,
|
|
@@ -11525,7 +12153,7 @@ function NavigationModal({
|
|
|
11525
12153
|
contentContainer: contentContainer
|
|
11526
12154
|
});
|
|
11527
12155
|
}
|
|
11528
|
-
function Header(props) {
|
|
12156
|
+
function Header$1(props) {
|
|
11529
12157
|
const Component = useBreakpointValue({
|
|
11530
12158
|
base: FullscreenModal.Header,
|
|
11531
12159
|
small: CardModal.Header
|
|
@@ -11534,7 +12162,7 @@ function Header(props) {
|
|
|
11534
12162
|
...props
|
|
11535
12163
|
});
|
|
11536
12164
|
}
|
|
11537
|
-
function Body(props) {
|
|
12165
|
+
function Body$1(props) {
|
|
11538
12166
|
const Component = useBreakpointValue({
|
|
11539
12167
|
base: FullscreenModal.Body,
|
|
11540
12168
|
small: CardModal.Body
|
|
@@ -11543,7 +12171,7 @@ function Body(props) {
|
|
|
11543
12171
|
...props
|
|
11544
12172
|
});
|
|
11545
12173
|
}
|
|
11546
|
-
function Footer(props) {
|
|
12174
|
+
function Footer$1(props) {
|
|
11547
12175
|
const Component = useBreakpointValue({
|
|
11548
12176
|
base: FullscreenModal.Footer,
|
|
11549
12177
|
small: CardModal.Footer
|
|
@@ -11552,11 +12180,106 @@ function Footer(props) {
|
|
|
11552
12180
|
...props
|
|
11553
12181
|
});
|
|
11554
12182
|
}
|
|
11555
|
-
NavigationModal.Header = Header;
|
|
11556
|
-
NavigationModal.Body = Body;
|
|
11557
|
-
NavigationModal.Footer = Footer;
|
|
12183
|
+
NavigationModal.Header = Header$1;
|
|
12184
|
+
NavigationModal.Body = Body$1;
|
|
12185
|
+
NavigationModal.Footer = Footer$1;
|
|
11558
12186
|
NavigationModal.ModalBehaviour = NavigationModalBehaviour;
|
|
11559
12187
|
|
|
12188
|
+
function NavigationModal2Behaviour({
|
|
12189
|
+
children,
|
|
12190
|
+
visible,
|
|
12191
|
+
appear = true,
|
|
12192
|
+
onExited,
|
|
12193
|
+
onEnter,
|
|
12194
|
+
onExit,
|
|
12195
|
+
onClose,
|
|
12196
|
+
...props
|
|
12197
|
+
}) {
|
|
12198
|
+
const AnimationComponent = useBreakpointValue({
|
|
12199
|
+
base: FullscreenModal2Animation,
|
|
12200
|
+
small: CardModal2Animation
|
|
12201
|
+
});
|
|
12202
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
12203
|
+
const [shouldAppear, setShouldAppear] = useState(appear);
|
|
12204
|
+
useEffect(() => {
|
|
12205
|
+
if (visible === true) {
|
|
12206
|
+
setIsModalBehaviourVisible(true);
|
|
12207
|
+
}
|
|
12208
|
+
}, [visible]);
|
|
12209
|
+
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
12210
|
+
visible: isModalBehaviourVisible,
|
|
12211
|
+
onClose: onClose,
|
|
12212
|
+
children: /*#__PURE__*/jsx(AnimationComponent, {
|
|
12213
|
+
...props,
|
|
12214
|
+
appear: shouldAppear,
|
|
12215
|
+
visible: visible,
|
|
12216
|
+
onEnter: () => {
|
|
12217
|
+
if (onEnter) onEnter();
|
|
12218
|
+
|
|
12219
|
+
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
12220
|
+
setShouldAppear(false);
|
|
12221
|
+
},
|
|
12222
|
+
onExit: () => {
|
|
12223
|
+
if (onExit) onExit();
|
|
12224
|
+
|
|
12225
|
+
// Reset appear value to its original value for future modal display
|
|
12226
|
+
setShouldAppear(appear);
|
|
12227
|
+
},
|
|
12228
|
+
onExited: () => {
|
|
12229
|
+
if (onExited) onExited();
|
|
12230
|
+
setIsModalBehaviourVisible(false);
|
|
12231
|
+
},
|
|
12232
|
+
onClose: onClose,
|
|
12233
|
+
children: children
|
|
12234
|
+
})
|
|
12235
|
+
});
|
|
12236
|
+
}
|
|
12237
|
+
|
|
12238
|
+
function NavigationModal2({
|
|
12239
|
+
backgroundColor,
|
|
12240
|
+
children
|
|
12241
|
+
}) {
|
|
12242
|
+
const Component = useBreakpointValue({
|
|
12243
|
+
base: FullscreenModal2,
|
|
12244
|
+
small: CardModal2
|
|
12245
|
+
});
|
|
12246
|
+
return /*#__PURE__*/jsx(Component, {
|
|
12247
|
+
backgroundColor: backgroundColor,
|
|
12248
|
+
children: children
|
|
12249
|
+
});
|
|
12250
|
+
}
|
|
12251
|
+
function Header(props) {
|
|
12252
|
+
const Component = useBreakpointValue({
|
|
12253
|
+
base: FullscreenModal2.Header,
|
|
12254
|
+
small: CardModal2.Header
|
|
12255
|
+
});
|
|
12256
|
+
return /*#__PURE__*/jsx(Component, {
|
|
12257
|
+
...props
|
|
12258
|
+
});
|
|
12259
|
+
}
|
|
12260
|
+
function Body(props) {
|
|
12261
|
+
const Component = useBreakpointValue({
|
|
12262
|
+
base: FullscreenModal2.Body,
|
|
12263
|
+
small: CardModal2.Body
|
|
12264
|
+
});
|
|
12265
|
+
return /*#__PURE__*/jsx(Component, {
|
|
12266
|
+
...props
|
|
12267
|
+
});
|
|
12268
|
+
}
|
|
12269
|
+
function Footer(props) {
|
|
12270
|
+
const Component = useBreakpointValue({
|
|
12271
|
+
base: FullscreenModal2.Footer,
|
|
12272
|
+
small: CardModal2.Footer
|
|
12273
|
+
});
|
|
12274
|
+
return /*#__PURE__*/jsx(Component, {
|
|
12275
|
+
...props
|
|
12276
|
+
});
|
|
12277
|
+
}
|
|
12278
|
+
NavigationModal2.Header = Header;
|
|
12279
|
+
NavigationModal2.Body = Body;
|
|
12280
|
+
NavigationModal2.Footer = Footer;
|
|
12281
|
+
NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
|
|
12282
|
+
|
|
11560
12283
|
function Notification({
|
|
11561
12284
|
type,
|
|
11562
12285
|
children,
|
|
@@ -13929,5 +14652,5 @@ function VerticalSteps({
|
|
|
13929
14652
|
VerticalSteps.Step = Step;
|
|
13930
14653
|
VerticalSteps.BorderlessStep = BorderlessStep;
|
|
13931
14654
|
|
|
13932
|
-
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
14655
|
+
export { ActionCard, Actions, Autocomplete, Avatar, BottomSheet, Button, CardModal, CardModal2, Center, Checkbox, ChoicesElements, CloseIconButton, DatePicker, DialogModal, DocumentPicker, Emoji, ExternalAppLink, ExternalLink, FilePicker, FlatList, Flex, FullscreenModal, FullscreenModal2, GoogleMapsApiKeyProvider, GoogleMapsAutocompleteProvider, GroupTags, HStack, Highlight, Icon, IconButton, Image, ImagePicker, InfoCard, InputAddress, InputEmail, InputFeedback, InputField, InputIban, InputIcon, InputNumber, InputPassword, InputPhone, InputPressable, InputTag, InputText, KittBreakpointNameEnum, KittBreakpoints, KittBreakpointsMax, KittMapConfigProvider, KittNativeBaseProvider, KittThemeDecorator, KittThemeProvider, Label, ListItem, LoaderIcon, MapMarker, MapMarkerVariantEnum, MatchWindowSize, Message, ModalBehaviour, FlatList as NativeOnlyFlatList, NavigationModal, NavigationModal2, Notification, Overlay, PageLoader, Picker, Pressable, RadioWithRef as Radio, RadioButtonGroup, ScrollView, DeprecatedSection as Section, SectionList, SegmentedProgressBar, Skeleton, SpinningIcon, Stack, StaticMap, Story, StoryBlock, StoryContainer, StoryDecorator, StoryGrid, StorySection, StoryTitle, StyleWebWrapper, SwitchBreakpoints, TabBar, Tag, TextArea, TimePicker, ToastComponent, Toggle, Tooltip, Typography, TypographyEmoji, TypographyIcon, TypographyLink, VStack, VerticalSteps, View, createChoicesComponent, createResponsiveStyleFromProp, getStaticMapImageUrl, getValueForBreakpoint, hex2rgba, matchWindowSize, storyPadding, theme, useBottomSheet, useBreakpointValue, useCurrentBreakpointName, useGetStaticMapImageUrl, useKittMapConfig, useKittTheme, useMatchWindowSize, useOpenExternalLink, useStaticBottomSheet, useStoryBlockColor, useTheme };
|
|
13933
14656
|
//# sourceMappingURL=index-node-20.10.es.mjs.map
|