@ornikar/kitt-universal 25.47.1 → 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 +20 -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/TimePicker/ModalDateTimePicker.d.ts +2 -1
- package/dist/definitions/TimePicker/ModalDateTimePicker.d.ts.map +1 -1
- package/dist/definitions/TimePicker/TimePicker.d.ts +2 -0
- package/dist/definitions/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/definitions/index.d.ts +6 -0
- package/dist/definitions/index.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +1028 -294
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +1028 -294
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-20.10.cjs.js +807 -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 +805 -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 +897 -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
|
@@ -4015,7 +4015,7 @@ function CardModalRotationContainer(props) {
|
|
|
4015
4015
|
});
|
|
4016
4016
|
}
|
|
4017
4017
|
|
|
4018
|
-
function NativeOpacityAnimation$
|
|
4018
|
+
function NativeOpacityAnimation$4({
|
|
4019
4019
|
visible,
|
|
4020
4020
|
children,
|
|
4021
4021
|
onExited
|
|
@@ -4052,7 +4052,7 @@ function NativeOpacityAnimation$2({
|
|
|
4052
4052
|
});
|
|
4053
4053
|
}
|
|
4054
4054
|
|
|
4055
|
-
function NativeRotationAnimation$
|
|
4055
|
+
function NativeRotationAnimation$2({
|
|
4056
4056
|
visible,
|
|
4057
4057
|
children,
|
|
4058
4058
|
onEntered,
|
|
@@ -4139,14 +4139,14 @@ function CardModalAnimation({
|
|
|
4139
4139
|
flexGrow: 1,
|
|
4140
4140
|
justifyContent: "center",
|
|
4141
4141
|
alignItems: "center",
|
|
4142
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$
|
|
4142
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$4, {
|
|
4143
4143
|
visible: isContentVisible,
|
|
4144
4144
|
onExited: handleAnimationExited,
|
|
4145
4145
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4146
4146
|
onPress: onClose
|
|
4147
4147
|
})
|
|
4148
4148
|
}), /*#__PURE__*/jsxRuntime.jsx(CardModalRotationContainer, {
|
|
4149
|
-
children: /*#__PURE__*/jsxRuntime.jsx(NativeRotationAnimation$
|
|
4149
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NativeRotationAnimation$2, {
|
|
4150
4150
|
visible: isContentVisible,
|
|
4151
4151
|
onExited: handleAnimationExited,
|
|
4152
4152
|
onEntered: onEntered,
|
|
@@ -4300,17 +4300,320 @@ function CardModal({
|
|
|
4300
4300
|
maxHeight: "100%",
|
|
4301
4301
|
maxWidth: maxWidth,
|
|
4302
4302
|
minHeight: "kitt.cardModal.minHeight",
|
|
4303
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ContentContainer, {
|
|
4304
|
-
children: children || /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4305
|
-
children: [header || null, body || null, footer || null]
|
|
4306
|
-
})
|
|
4307
|
-
})
|
|
4303
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ContentContainer, {
|
|
4304
|
+
children: children || /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4305
|
+
children: [header || null, body || null, footer || null]
|
|
4306
|
+
})
|
|
4307
|
+
})
|
|
4308
|
+
});
|
|
4309
|
+
}
|
|
4310
|
+
CardModal.Body = CardModalBody;
|
|
4311
|
+
CardModal.Header = CardModalHeader;
|
|
4312
|
+
CardModal.Footer = CardModalFooter;
|
|
4313
|
+
CardModal.ModalBehaviour = CardModalBehaviour;
|
|
4314
|
+
|
|
4315
|
+
function CardModal2RotationContainer(props) {
|
|
4316
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4317
|
+
paddingX: "kitt.cardModal.overlayPadding.horizontal",
|
|
4318
|
+
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
4319
|
+
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
4320
|
+
width: "100%",
|
|
4321
|
+
maxHeight: "100%",
|
|
4322
|
+
_web: {
|
|
4323
|
+
maxHeight: '100svh'
|
|
4324
|
+
},
|
|
4325
|
+
...props
|
|
4326
|
+
});
|
|
4327
|
+
}
|
|
4328
|
+
|
|
4329
|
+
function NativeOpacityAnimation$3({
|
|
4330
|
+
visible,
|
|
4331
|
+
children,
|
|
4332
|
+
onExited
|
|
4333
|
+
}) {
|
|
4334
|
+
const theme = useTheme();
|
|
4335
|
+
const hasRunAnimationRef = React.useRef(false);
|
|
4336
|
+
function handleAnimationFinished() {
|
|
4337
|
+
if (visible) {
|
|
4338
|
+
hasRunAnimationRef.current = true;
|
|
4339
|
+
}
|
|
4340
|
+
if (!visible && hasRunAnimationRef.current) {
|
|
4341
|
+
onExited();
|
|
4342
|
+
}
|
|
4343
|
+
}
|
|
4344
|
+
const opacityStyle = Animated.useAnimatedStyle(() => {
|
|
4345
|
+
const {
|
|
4346
|
+
duration,
|
|
4347
|
+
easing
|
|
4348
|
+
} = theme.kitt.cardModal.animation.overlay;
|
|
4349
|
+
const [x1, y1, x2, y2] = easing;
|
|
4350
|
+
return {
|
|
4351
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4352
|
+
duration,
|
|
4353
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4354
|
+
}, isFinished => {
|
|
4355
|
+
if (!isFinished) return;
|
|
4356
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
4357
|
+
})
|
|
4358
|
+
};
|
|
4359
|
+
});
|
|
4360
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
4361
|
+
style: [reactNative.StyleSheet.absoluteFillObject, opacityStyle],
|
|
4362
|
+
children: children
|
|
4363
|
+
});
|
|
4364
|
+
}
|
|
4365
|
+
|
|
4366
|
+
function NativeRotationAnimation$1({
|
|
4367
|
+
visible,
|
|
4368
|
+
children,
|
|
4369
|
+
onEntered,
|
|
4370
|
+
onExited
|
|
4371
|
+
}) {
|
|
4372
|
+
const theme = useTheme();
|
|
4373
|
+
const hasRunAnimationRef = React.useRef(false);
|
|
4374
|
+
const rotation = Animated.useSharedValue(0.8);
|
|
4375
|
+
function handleAnimationFinished() {
|
|
4376
|
+
if (visible) {
|
|
4377
|
+
if (onEntered) onEntered();
|
|
4378
|
+
hasRunAnimationRef.current = true;
|
|
4379
|
+
}
|
|
4380
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
4381
|
+
}
|
|
4382
|
+
const animatedStyle = Animated.useAnimatedStyle(() => {
|
|
4383
|
+
const {
|
|
4384
|
+
duration,
|
|
4385
|
+
easing
|
|
4386
|
+
} = theme.kitt.cardModal.animation.content;
|
|
4387
|
+
const [x1, y1, x2, y2] = easing;
|
|
4388
|
+
rotation.value = Animated.withTiming(visible ? 0 : 5, {
|
|
4389
|
+
duration,
|
|
4390
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4391
|
+
}, isFinished => {
|
|
4392
|
+
if (!isFinished) return;
|
|
4393
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
4394
|
+
});
|
|
4395
|
+
return {
|
|
4396
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
4397
|
+
duration,
|
|
4398
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4399
|
+
}),
|
|
4400
|
+
transform: [{
|
|
4401
|
+
scale: Animated.withTiming(visible ? 1 : 0.8, {
|
|
4402
|
+
duration,
|
|
4403
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
4404
|
+
})
|
|
4405
|
+
}, {
|
|
4406
|
+
rotateZ: `${rotation.value}deg`
|
|
4407
|
+
}]
|
|
4408
|
+
};
|
|
4409
|
+
});
|
|
4410
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
4411
|
+
style: [animatedStyle],
|
|
4412
|
+
children: children
|
|
4413
|
+
});
|
|
4414
|
+
}
|
|
4415
|
+
|
|
4416
|
+
function CardModal2Animation({
|
|
4417
|
+
visible,
|
|
4418
|
+
children,
|
|
4419
|
+
onEnter,
|
|
4420
|
+
onEntered,
|
|
4421
|
+
onExit,
|
|
4422
|
+
onExited,
|
|
4423
|
+
onClose
|
|
4424
|
+
}) {
|
|
4425
|
+
const [isModalVisible, setIsModalVisible] = React.useState(visible);
|
|
4426
|
+
const [isContentVisible, setIsContentVisible] = React.useState(false);
|
|
4427
|
+
const handleAnimationExited = () => {
|
|
4428
|
+
setIsModalVisible(false);
|
|
4429
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
4430
|
+
if (reactNative.Platform.OS === 'android' && onExited) onExited();
|
|
4431
|
+
};
|
|
4432
|
+
React.useEffect(() => {
|
|
4433
|
+
if (!(!visible && isContentVisible)) return;
|
|
4434
|
+
if (onExit) onExit();
|
|
4435
|
+
setIsContentVisible(false);
|
|
4436
|
+
}, [visible, isContentVisible, onExit]);
|
|
4437
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
|
|
4438
|
+
transparent: true,
|
|
4439
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
4440
|
+
visible: isModalVisible,
|
|
4441
|
+
onShow: () => {
|
|
4442
|
+
if (onEnter) onEnter();
|
|
4443
|
+
setIsContentVisible(true);
|
|
4444
|
+
},
|
|
4445
|
+
onDismiss: () => {
|
|
4446
|
+
if (onExited) onExited();
|
|
4447
|
+
},
|
|
4448
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4449
|
+
position: "relative",
|
|
4450
|
+
flexGrow: 1,
|
|
4451
|
+
justifyContent: "center",
|
|
4452
|
+
alignItems: "center",
|
|
4453
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$3, {
|
|
4454
|
+
visible: isContentVisible,
|
|
4455
|
+
onExited: handleAnimationExited,
|
|
4456
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
4457
|
+
onPress: onClose
|
|
4458
|
+
})
|
|
4459
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CardModal2RotationContainer, {
|
|
4460
|
+
children: /*#__PURE__*/jsxRuntime.jsx(NativeRotationAnimation$1, {
|
|
4461
|
+
visible: isContentVisible,
|
|
4462
|
+
onExited: handleAnimationExited,
|
|
4463
|
+
onEntered: onEntered,
|
|
4464
|
+
children: children
|
|
4465
|
+
})
|
|
4466
|
+
})]
|
|
4467
|
+
})
|
|
4468
|
+
});
|
|
4469
|
+
}
|
|
4470
|
+
|
|
4471
|
+
function CardModal2Behaviour({
|
|
4472
|
+
children,
|
|
4473
|
+
visible,
|
|
4474
|
+
onClose,
|
|
4475
|
+
onExited,
|
|
4476
|
+
...props
|
|
4477
|
+
}) {
|
|
4478
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = React.useState(visible);
|
|
4479
|
+
React.useEffect(() => {
|
|
4480
|
+
if (visible === true) {
|
|
4481
|
+
setIsModalBehaviourVisible(true);
|
|
4482
|
+
}
|
|
4483
|
+
}, [visible]);
|
|
4484
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
4485
|
+
visible: isModalBehaviourVisible,
|
|
4486
|
+
onClose: onClose,
|
|
4487
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CardModal2Animation, {
|
|
4488
|
+
...props,
|
|
4489
|
+
visible: visible,
|
|
4490
|
+
onExited: () => {
|
|
4491
|
+
if (onExited) onExited();
|
|
4492
|
+
setIsModalBehaviourVisible(false);
|
|
4493
|
+
},
|
|
4494
|
+
onClose: onClose,
|
|
4495
|
+
children: children
|
|
4496
|
+
})
|
|
4497
|
+
});
|
|
4498
|
+
}
|
|
4499
|
+
|
|
4500
|
+
function CardModal2Body({
|
|
4501
|
+
children,
|
|
4502
|
+
paddingX = {
|
|
4503
|
+
base: 'kitt.4',
|
|
4504
|
+
medium: 'kitt.6'
|
|
4505
|
+
},
|
|
4506
|
+
paddingY = 'kitt.4',
|
|
4507
|
+
...props
|
|
4508
|
+
}) {
|
|
4509
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
4510
|
+
showsVerticalScrollIndicator: false,
|
|
4511
|
+
_contentContainerStyle: {
|
|
4512
|
+
paddingX,
|
|
4513
|
+
paddingY
|
|
4514
|
+
},
|
|
4515
|
+
...props,
|
|
4516
|
+
children: children
|
|
4517
|
+
});
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
function CardModal2Footer({
|
|
4521
|
+
children,
|
|
4522
|
+
padding = {
|
|
4523
|
+
base: 'kitt.4',
|
|
4524
|
+
medium: 'kitt.2'
|
|
4525
|
+
},
|
|
4526
|
+
hasSeparator = true,
|
|
4527
|
+
...props
|
|
4528
|
+
}) {
|
|
4529
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4530
|
+
...props,
|
|
4531
|
+
marginTop: "kitt.2",
|
|
4532
|
+
padding: padding,
|
|
4533
|
+
borderTopWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4534
|
+
borderColor: "kitt.separator",
|
|
4535
|
+
alignItems: {
|
|
4536
|
+
base: undefined,
|
|
4537
|
+
medium: 'flex-end'
|
|
4538
|
+
},
|
|
4539
|
+
children: children
|
|
4540
|
+
});
|
|
4541
|
+
}
|
|
4542
|
+
|
|
4543
|
+
function CardModal2Header({
|
|
4544
|
+
children,
|
|
4545
|
+
title,
|
|
4546
|
+
paddingBottom = {
|
|
4547
|
+
base: 'kitt.4',
|
|
4548
|
+
medium: 'kitt.2'
|
|
4549
|
+
},
|
|
4550
|
+
hasSeparator = true,
|
|
4551
|
+
right,
|
|
4552
|
+
left,
|
|
4553
|
+
...props
|
|
4554
|
+
}) {
|
|
4555
|
+
const defaultContainerPadding = {
|
|
4556
|
+
base: 'kitt.4',
|
|
4557
|
+
medium: 'kitt.6'
|
|
4558
|
+
};
|
|
4559
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4560
|
+
...props,
|
|
4561
|
+
padding: paddingBottom,
|
|
4562
|
+
borderBottomWidth: hasSeparator ? 'kitt.cardModal.footer.borderWidth' : 0,
|
|
4563
|
+
borderColor: "kitt.separator",
|
|
4564
|
+
justifyContent: "center",
|
|
4565
|
+
width: "100%",
|
|
4566
|
+
height: "kitt.cardModal.header.height",
|
|
4567
|
+
paddingRight: right ? 'kitt.2' : defaultContainerPadding,
|
|
4568
|
+
paddingLeft: left ? 'kitt.2' : defaultContainerPadding,
|
|
4569
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4570
|
+
alignItems: "center",
|
|
4571
|
+
flexDirection: "row",
|
|
4572
|
+
justifyContent: !children && !left ? 'flex-end' : 'space-between',
|
|
4573
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4574
|
+
width: "kitt.iconButton.width",
|
|
4575
|
+
children: left
|
|
4576
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
4577
|
+
flexGrow: "1",
|
|
4578
|
+
paddingRight: right ? 'kitt.2' : 0,
|
|
4579
|
+
paddingLeft: left ? 'kitt.2' : 0,
|
|
4580
|
+
children: [title ? /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
4581
|
+
textAlign: !left && right ? 'left' : 'center',
|
|
4582
|
+
variant: "bold",
|
|
4583
|
+
children: title
|
|
4584
|
+
}) : null, children]
|
|
4585
|
+
}), right ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4586
|
+
width: "kitt.iconButton.width",
|
|
4587
|
+
children: right
|
|
4588
|
+
}) : null]
|
|
4589
|
+
})
|
|
4590
|
+
});
|
|
4591
|
+
}
|
|
4592
|
+
|
|
4593
|
+
function CardModal2({
|
|
4594
|
+
backgroundColor = 'kitt.uiBackgroundLight',
|
|
4595
|
+
maxWidth = 'kitt.cardModal.maxWidth',
|
|
4596
|
+
withoutShadow,
|
|
4597
|
+
children,
|
|
4598
|
+
...props
|
|
4599
|
+
}) {
|
|
4600
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
4601
|
+
...props,
|
|
4602
|
+
overflow: "hidden",
|
|
4603
|
+
backgroundColor: backgroundColor,
|
|
4604
|
+
shadow: withoutShadow ? undefined : 'kitt.cardModal.shadow',
|
|
4605
|
+
borderRadius: "kitt.cardModal.borderRadius",
|
|
4606
|
+
width: "100%",
|
|
4607
|
+
maxHeight: "100%",
|
|
4608
|
+
maxWidth: maxWidth,
|
|
4609
|
+
minHeight: "kitt.cardModal.minHeight",
|
|
4610
|
+
children: children
|
|
4308
4611
|
});
|
|
4309
4612
|
}
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4613
|
+
CardModal2.Body = CardModal2Body;
|
|
4614
|
+
CardModal2.Header = CardModal2Header;
|
|
4615
|
+
CardModal2.Footer = CardModal2Footer;
|
|
4616
|
+
CardModal2.Behaviour = CardModal2Behaviour;
|
|
4314
4617
|
|
|
4315
4618
|
function getBackgroundColor$5({
|
|
4316
4619
|
isDisabled,
|
|
@@ -4607,7 +4910,7 @@ const ChoicesElements = {
|
|
|
4607
4910
|
ButtonChoices
|
|
4608
4911
|
};
|
|
4609
4912
|
|
|
4610
|
-
function NativeOpacityAnimation$
|
|
4913
|
+
function NativeOpacityAnimation$2({
|
|
4611
4914
|
visible,
|
|
4612
4915
|
children,
|
|
4613
4916
|
onExited
|
|
@@ -4731,7 +5034,7 @@ function DialogModalAnimation({
|
|
|
4731
5034
|
flexGrow: 1,
|
|
4732
5035
|
justifyContent: "center",
|
|
4733
5036
|
alignItems: "center",
|
|
4734
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$
|
|
5037
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$2, {
|
|
4735
5038
|
visible: isContentVisible,
|
|
4736
5039
|
onExited: handleAnimationExited,
|
|
4737
5040
|
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
@@ -7803,36 +8106,313 @@ function FullscreenModalBody({
|
|
|
7803
8106
|
const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
7804
8107
|
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
7805
8108
|
...props,
|
|
7806
|
-
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
7807
|
-
paddingTop: paddingTop,
|
|
7808
|
-
paddingBottom: paddingBottom,
|
|
7809
|
-
style: style,
|
|
7810
|
-
children: children
|
|
8109
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8110
|
+
paddingTop: paddingTop,
|
|
8111
|
+
paddingBottom: paddingBottom,
|
|
8112
|
+
style: style,
|
|
8113
|
+
children: children
|
|
8114
|
+
});
|
|
8115
|
+
}
|
|
8116
|
+
|
|
8117
|
+
function FullscreenModalFooter({
|
|
8118
|
+
shouldHandleBottomNotch = true,
|
|
8119
|
+
hasSeparator = true,
|
|
8120
|
+
children,
|
|
8121
|
+
...props
|
|
8122
|
+
}) {
|
|
8123
|
+
const {
|
|
8124
|
+
bottom
|
|
8125
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8126
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8127
|
+
borderTopColor: "kitt.separator",
|
|
8128
|
+
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
8129
|
+
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8130
|
+
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
8131
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8132
|
+
...props,
|
|
8133
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8134
|
+
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8135
|
+
children: children
|
|
8136
|
+
})
|
|
8137
|
+
});
|
|
8138
|
+
}
|
|
8139
|
+
|
|
8140
|
+
function NativeOpacityAnimation$1({
|
|
8141
|
+
visible,
|
|
8142
|
+
children
|
|
8143
|
+
}) {
|
|
8144
|
+
const theme = useTheme();
|
|
8145
|
+
const opacityStyle = Animated.useAnimatedStyle(() => {
|
|
8146
|
+
const {
|
|
8147
|
+
duration,
|
|
8148
|
+
easing
|
|
8149
|
+
} = theme.kitt.fullscreenModal.animation.overlay;
|
|
8150
|
+
const [x1, y1, x2, y2] = easing;
|
|
8151
|
+
return {
|
|
8152
|
+
opacity: Animated.withTiming(visible ? 1 : 0, {
|
|
8153
|
+
duration,
|
|
8154
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
8155
|
+
})
|
|
8156
|
+
};
|
|
8157
|
+
});
|
|
8158
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
8159
|
+
style: [reactNative.StyleSheet.absoluteFillObject, opacityStyle],
|
|
8160
|
+
children: children
|
|
8161
|
+
});
|
|
8162
|
+
}
|
|
8163
|
+
|
|
8164
|
+
function NativeSlideInAnimation$1({
|
|
8165
|
+
visible,
|
|
8166
|
+
children,
|
|
8167
|
+
onEntered,
|
|
8168
|
+
onExited
|
|
8169
|
+
}) {
|
|
8170
|
+
const theme = useTheme();
|
|
8171
|
+
const {
|
|
8172
|
+
height: wHeight
|
|
8173
|
+
} = reactNative.useWindowDimensions();
|
|
8174
|
+
const hasRunAnimationRef = React.useRef(false);
|
|
8175
|
+
function handleAnimationFinished() {
|
|
8176
|
+
if (visible) {
|
|
8177
|
+
if (onEntered) onEntered();
|
|
8178
|
+
hasRunAnimationRef.current = true;
|
|
8179
|
+
}
|
|
8180
|
+
|
|
8181
|
+
// Since animation callback is called on component mount, we must make sure that the animation has been runed once to call it an exit
|
|
8182
|
+
if (!visible && hasRunAnimationRef.current) onExited();
|
|
8183
|
+
}
|
|
8184
|
+
const translateStyle = Animated.useAnimatedStyle(() => {
|
|
8185
|
+
const {
|
|
8186
|
+
duration,
|
|
8187
|
+
easing
|
|
8188
|
+
} = theme.kitt.fullscreenModal.animation.content;
|
|
8189
|
+
const [x1, y1, x2, y2] = easing;
|
|
8190
|
+
return {
|
|
8191
|
+
transform: [{
|
|
8192
|
+
translateY: Animated.withTiming(visible ? 0 : wHeight, {
|
|
8193
|
+
duration,
|
|
8194
|
+
easing: Animated.Easing.bezier(x1, y1, x2, y2)
|
|
8195
|
+
}, isFinished => {
|
|
8196
|
+
if (!isFinished) return;
|
|
8197
|
+
Animated.runOnJS(handleAnimationFinished)();
|
|
8198
|
+
})
|
|
8199
|
+
}]
|
|
8200
|
+
};
|
|
8201
|
+
});
|
|
8202
|
+
return /*#__PURE__*/jsxRuntime.jsx(Animated__default.View, {
|
|
8203
|
+
style: [{
|
|
8204
|
+
transform: [{
|
|
8205
|
+
translateY: wHeight
|
|
8206
|
+
}]
|
|
8207
|
+
}, translateStyle, {
|
|
8208
|
+
width: '100%',
|
|
8209
|
+
flex: 1
|
|
8210
|
+
}],
|
|
8211
|
+
children: children
|
|
8212
|
+
});
|
|
8213
|
+
}
|
|
8214
|
+
|
|
8215
|
+
function FullscreenModalAnimation({
|
|
8216
|
+
visible,
|
|
8217
|
+
children,
|
|
8218
|
+
onEnter,
|
|
8219
|
+
onEntered,
|
|
8220
|
+
onExit,
|
|
8221
|
+
onExited
|
|
8222
|
+
}) {
|
|
8223
|
+
const [isModalVisible, setIsModalVisible] = React.useState(visible);
|
|
8224
|
+
const [isContentVisible, setIsContentVisible] = React.useState(false);
|
|
8225
|
+
const handleAnimationExited = () => {
|
|
8226
|
+
setIsModalVisible(false);
|
|
8227
|
+
// Android doesn't handle the onDismiss callback on the modal, we need to call it manually
|
|
8228
|
+
if (reactNative.Platform.OS === 'android' && onExited) onExited();
|
|
8229
|
+
};
|
|
8230
|
+
|
|
8231
|
+
// When parent visibility is set to false, in order to have our exit animation we must in this order :
|
|
8232
|
+
// 1 - run the exit animation
|
|
8233
|
+
// 2 - once it is done, unmount the Modal
|
|
8234
|
+
React.useEffect(() => {
|
|
8235
|
+
if (!(!visible && isContentVisible)) return;
|
|
8236
|
+
if (onExit) onExit();
|
|
8237
|
+
setIsContentVisible(false);
|
|
8238
|
+
}, [visible, isContentVisible, onExit]);
|
|
8239
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNative.Modal, {
|
|
8240
|
+
transparent: true,
|
|
8241
|
+
supportedOrientations: ['landscape', 'portrait'],
|
|
8242
|
+
visible: isModalVisible,
|
|
8243
|
+
onShow: () => {
|
|
8244
|
+
if (onEnter) onEnter();
|
|
8245
|
+
setIsContentVisible(true);
|
|
8246
|
+
},
|
|
8247
|
+
onDismiss: () => {
|
|
8248
|
+
if (onExited) onExited();
|
|
8249
|
+
},
|
|
8250
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
8251
|
+
position: "relative",
|
|
8252
|
+
flexGrow: 1,
|
|
8253
|
+
justifyContent: "center",
|
|
8254
|
+
alignItems: "center",
|
|
8255
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(NativeOpacityAnimation$1, {
|
|
8256
|
+
visible: isContentVisible,
|
|
8257
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Overlay, {
|
|
8258
|
+
onPress: handleAnimationExited
|
|
8259
|
+
})
|
|
8260
|
+
}), /*#__PURE__*/jsxRuntime.jsx(NativeSlideInAnimation$1, {
|
|
8261
|
+
visible: isContentVisible,
|
|
8262
|
+
onExited: handleAnimationExited,
|
|
8263
|
+
onEntered: onEntered,
|
|
8264
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8265
|
+
flexGrow: 1,
|
|
8266
|
+
children: children
|
|
8267
|
+
})
|
|
8268
|
+
})]
|
|
8269
|
+
})
|
|
8270
|
+
});
|
|
8271
|
+
}
|
|
8272
|
+
|
|
8273
|
+
function FullscreenModalBehaviour({
|
|
8274
|
+
children,
|
|
8275
|
+
visible,
|
|
8276
|
+
onClose,
|
|
8277
|
+
onExited,
|
|
8278
|
+
...props
|
|
8279
|
+
}) {
|
|
8280
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = React.useState(visible);
|
|
8281
|
+
React.useEffect(() => {
|
|
8282
|
+
if (visible === true) {
|
|
8283
|
+
setIsModalBehaviourVisible(true);
|
|
8284
|
+
}
|
|
8285
|
+
}, [visible]);
|
|
8286
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
8287
|
+
visible: isModalBehaviourVisible,
|
|
8288
|
+
onClose: onClose,
|
|
8289
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FullscreenModalAnimation, {
|
|
8290
|
+
...props,
|
|
8291
|
+
visible: visible,
|
|
8292
|
+
onExited: () => {
|
|
8293
|
+
if (onExited) onExited();
|
|
8294
|
+
setIsModalBehaviourVisible(false);
|
|
8295
|
+
},
|
|
8296
|
+
children: children
|
|
8297
|
+
})
|
|
8298
|
+
});
|
|
8299
|
+
}
|
|
8300
|
+
|
|
8301
|
+
function FullscreenModalContainer({
|
|
8302
|
+
children,
|
|
8303
|
+
backgroundColor
|
|
8304
|
+
}) {
|
|
8305
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8306
|
+
position: "relative",
|
|
8307
|
+
flexGrow: 1,
|
|
8308
|
+
flexShrink: 1,
|
|
8309
|
+
flexBasis: "100%"
|
|
8310
|
+
/*
|
|
8311
|
+
Here we are setting the same min and max height because on web the content was overflowing and not scrolling
|
|
8312
|
+
minHeight is needed to make the modal fullscreen
|
|
8313
|
+
maxHeight limits the height to the viewport when the content is too long, this allows us to scroll inside
|
|
8314
|
+
We use svh instead of vh because vh is the total height of the viewport, including the address bar in mobile web browsers
|
|
8315
|
+
*/,
|
|
8316
|
+
_web: {
|
|
8317
|
+
minHeight: '100svh',
|
|
8318
|
+
maxHeight: '100svh'
|
|
8319
|
+
},
|
|
8320
|
+
backgroundColor: backgroundColor ?? 'kitt.uiBackgroundLight',
|
|
8321
|
+
children: children
|
|
8322
|
+
});
|
|
8323
|
+
}
|
|
8324
|
+
|
|
8325
|
+
function FullscreenModalHeader({
|
|
8326
|
+
hasSeparator = true,
|
|
8327
|
+
isTransparent,
|
|
8328
|
+
title,
|
|
8329
|
+
children,
|
|
8330
|
+
right,
|
|
8331
|
+
left,
|
|
8332
|
+
shouldHandleTopNotch = true,
|
|
8333
|
+
...props
|
|
8334
|
+
}) {
|
|
8335
|
+
const {
|
|
8336
|
+
top
|
|
8337
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8338
|
+
const hasRight = Boolean(right);
|
|
8339
|
+
const hasLeft = Boolean(left);
|
|
8340
|
+
const hasContent = Boolean(title || children);
|
|
8341
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8342
|
+
backgroundColor: isTransparent ? 'kitt.transparent' : 'kitt.uiBackgroundLight',
|
|
8343
|
+
minHeight: "kitt.fullscreenModal.header.height",
|
|
8344
|
+
width: "100%",
|
|
8345
|
+
justifyContent: "center",
|
|
8346
|
+
paddingTop: shouldHandleTopNotch ? top : undefined,
|
|
8347
|
+
paddingRight: hasRight ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8348
|
+
paddingLeft: hasLeft ? 'kitt.2' : 'kitt.fullscreenModal.horizontalPadding',
|
|
8349
|
+
borderBottomColor: "kitt.separator",
|
|
8350
|
+
borderBottomWidth: hasSeparator ? 1 : undefined,
|
|
8351
|
+
...props,
|
|
8352
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
8353
|
+
flexDirection: "row",
|
|
8354
|
+
alignItems: "center",
|
|
8355
|
+
justifyContent: !hasContent && !hasLeft ? 'flex-end' : 'space-between',
|
|
8356
|
+
children: [left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8357
|
+
width: "kitt.iconButton.width",
|
|
8358
|
+
children: left
|
|
8359
|
+
}) : null, title ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8360
|
+
flexGrow: 1,
|
|
8361
|
+
flexShrink: 1,
|
|
8362
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8363
|
+
paddingRight: hasRight ? 'kitt.2' : 0,
|
|
8364
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography.Text, {
|
|
8365
|
+
variant: "bold",
|
|
8366
|
+
textAlign: !hasLeft && hasRight ? 'left' : 'center',
|
|
8367
|
+
children: title
|
|
8368
|
+
})
|
|
8369
|
+
}) : null, children ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8370
|
+
flexGrow: 1,
|
|
8371
|
+
flexShrink: 1,
|
|
8372
|
+
alignItems: "center",
|
|
8373
|
+
paddingLeft: hasLeft ? 'kitt.2' : undefined,
|
|
8374
|
+
paddingRight: hasRight ? 'kitt.2' : undefined,
|
|
8375
|
+
children: children
|
|
8376
|
+
}) : null, right || left ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8377
|
+
width: "kitt.iconButton.width",
|
|
8378
|
+
children: right
|
|
8379
|
+
}) : null]
|
|
8380
|
+
})
|
|
7811
8381
|
});
|
|
7812
8382
|
}
|
|
7813
8383
|
|
|
7814
|
-
function
|
|
7815
|
-
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
8384
|
+
function FullscreenModal({
|
|
8385
|
+
body,
|
|
8386
|
+
header,
|
|
8387
|
+
footer,
|
|
8388
|
+
backgroundColor,
|
|
8389
|
+
contentContainer: ContentContainer = IdentityComponent
|
|
7819
8390
|
}) {
|
|
7820
|
-
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
8391
|
+
return /*#__PURE__*/jsxRuntime.jsx(FullscreenModalContainer, {
|
|
8392
|
+
backgroundColor: backgroundColor,
|
|
8393
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(ContentContainer, {
|
|
8394
|
+
children: [header ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8395
|
+
children: header
|
|
8396
|
+
}) : null, /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
8397
|
+
flexGrow: 1,
|
|
8398
|
+
flexShrink: 1,
|
|
8399
|
+
justifyContent: "space-between",
|
|
8400
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
8401
|
+
bounces: false,
|
|
8402
|
+
contentContainerStyle: {
|
|
8403
|
+
flexGrow: 1,
|
|
8404
|
+
position: 'relative'
|
|
8405
|
+
},
|
|
8406
|
+
children: body
|
|
8407
|
+
}), footer || null]
|
|
8408
|
+
})]
|
|
7833
8409
|
})
|
|
7834
8410
|
});
|
|
7835
8411
|
}
|
|
8412
|
+
FullscreenModal.Header = FullscreenModalHeader;
|
|
8413
|
+
FullscreenModal.Footer = FullscreenModalFooter;
|
|
8414
|
+
FullscreenModal.Body = FullscreenModalBody;
|
|
8415
|
+
FullscreenModal.ModalBehaviour = FullscreenModalBehaviour;
|
|
7836
8416
|
|
|
7837
8417
|
function NativeOpacityAnimation({
|
|
7838
8418
|
visible,
|
|
@@ -7909,7 +8489,7 @@ function NativeSlideInAnimation({
|
|
|
7909
8489
|
});
|
|
7910
8490
|
}
|
|
7911
8491
|
|
|
7912
|
-
function
|
|
8492
|
+
function FullscreenModal2Animation({
|
|
7913
8493
|
visible,
|
|
7914
8494
|
children,
|
|
7915
8495
|
onEnter,
|
|
@@ -7967,7 +8547,7 @@ function FullscreenModalAnimation({
|
|
|
7967
8547
|
});
|
|
7968
8548
|
}
|
|
7969
8549
|
|
|
7970
|
-
function
|
|
8550
|
+
function FullscreenModal2Behaviour({
|
|
7971
8551
|
children,
|
|
7972
8552
|
visible,
|
|
7973
8553
|
onClose,
|
|
@@ -7983,7 +8563,7 @@ function FullscreenModalBehaviour({
|
|
|
7983
8563
|
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
7984
8564
|
visible: isModalBehaviourVisible,
|
|
7985
8565
|
onClose: onClose,
|
|
7986
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
8566
|
+
children: /*#__PURE__*/jsxRuntime.jsx(FullscreenModal2Animation, {
|
|
7987
8567
|
...props,
|
|
7988
8568
|
visible: visible,
|
|
7989
8569
|
onExited: () => {
|
|
@@ -7995,7 +8575,51 @@ function FullscreenModalBehaviour({
|
|
|
7995
8575
|
});
|
|
7996
8576
|
}
|
|
7997
8577
|
|
|
7998
|
-
function
|
|
8578
|
+
function FullscreenModal2Body({
|
|
8579
|
+
children,
|
|
8580
|
+
shouldHandleBottomNotch,
|
|
8581
|
+
style,
|
|
8582
|
+
shouldHandleTopNotch,
|
|
8583
|
+
...props
|
|
8584
|
+
}) {
|
|
8585
|
+
const {
|
|
8586
|
+
bottom,
|
|
8587
|
+
top
|
|
8588
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8589
|
+
const {
|
|
8590
|
+
kitt: {
|
|
8591
|
+
fullscreenModal: {
|
|
8592
|
+
body: {
|
|
8593
|
+
verticalPadding
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
}
|
|
8597
|
+
} = useTheme();
|
|
8598
|
+
const paddingBottom = shouldHandleBottomNotch ? Math.max(bottom, verticalPadding) : verticalPadding;
|
|
8599
|
+
const paddingTop = shouldHandleTopNotch ? Math.max(top, verticalPadding) : verticalPadding;
|
|
8600
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8601
|
+
flexGrow: 1,
|
|
8602
|
+
flexShrink: 1,
|
|
8603
|
+
justifyContent: "space-between",
|
|
8604
|
+
children: /*#__PURE__*/jsxRuntime.jsx(nativeBase.ScrollView, {
|
|
8605
|
+
bounces: false,
|
|
8606
|
+
contentContainerStyle: {
|
|
8607
|
+
flexGrow: 1,
|
|
8608
|
+
position: 'relative'
|
|
8609
|
+
},
|
|
8610
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8611
|
+
...props,
|
|
8612
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8613
|
+
paddingTop: paddingTop,
|
|
8614
|
+
paddingBottom: paddingBottom,
|
|
8615
|
+
style: style,
|
|
8616
|
+
children: children
|
|
8617
|
+
})
|
|
8618
|
+
})
|
|
8619
|
+
});
|
|
8620
|
+
}
|
|
8621
|
+
|
|
8622
|
+
function FullscreenModal2Container({
|
|
7999
8623
|
children,
|
|
8000
8624
|
backgroundColor
|
|
8001
8625
|
}) {
|
|
@@ -8019,7 +8643,30 @@ function FullscreenModalContainer({
|
|
|
8019
8643
|
});
|
|
8020
8644
|
}
|
|
8021
8645
|
|
|
8022
|
-
function
|
|
8646
|
+
function FullscreenModal2Footer({
|
|
8647
|
+
shouldHandleBottomNotch = true,
|
|
8648
|
+
hasSeparator = true,
|
|
8649
|
+
children,
|
|
8650
|
+
...props
|
|
8651
|
+
}) {
|
|
8652
|
+
const {
|
|
8653
|
+
bottom
|
|
8654
|
+
} = reactNativeSafeAreaContext.useSafeAreaInsets();
|
|
8655
|
+
return /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8656
|
+
borderTopColor: "kitt.separator",
|
|
8657
|
+
borderTopWidth: hasSeparator ? 1 : undefined,
|
|
8658
|
+
paddingTop: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8659
|
+
paddingBottom: shouldHandleBottomNotch ? bottom : undefined,
|
|
8660
|
+
paddingX: "kitt.fullscreenModal.horizontalPadding",
|
|
8661
|
+
...props,
|
|
8662
|
+
children: /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8663
|
+
paddingBottom: "kitt.fullscreenModal.footer.verticalPadding",
|
|
8664
|
+
children: children
|
|
8665
|
+
})
|
|
8666
|
+
});
|
|
8667
|
+
}
|
|
8668
|
+
|
|
8669
|
+
function FullscreenModal2Header({
|
|
8023
8670
|
hasSeparator = true,
|
|
8024
8671
|
isTransparent,
|
|
8025
8672
|
title,
|
|
@@ -8078,38 +8725,19 @@ function FullscreenModalHeader({
|
|
|
8078
8725
|
});
|
|
8079
8726
|
}
|
|
8080
8727
|
|
|
8081
|
-
function
|
|
8082
|
-
body,
|
|
8083
|
-
header,
|
|
8084
|
-
footer,
|
|
8728
|
+
function FullscreenModal2({
|
|
8085
8729
|
backgroundColor,
|
|
8086
|
-
|
|
8730
|
+
children
|
|
8087
8731
|
}) {
|
|
8088
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
8732
|
+
return /*#__PURE__*/jsxRuntime.jsx(FullscreenModal2Container, {
|
|
8089
8733
|
backgroundColor: backgroundColor,
|
|
8090
|
-
children:
|
|
8091
|
-
children: [header ? /*#__PURE__*/jsxRuntime.jsx(View, {
|
|
8092
|
-
children: header
|
|
8093
|
-
}) : null, /*#__PURE__*/jsxRuntime.jsxs(View, {
|
|
8094
|
-
flexGrow: 1,
|
|
8095
|
-
flexShrink: 1,
|
|
8096
|
-
justifyContent: "space-between",
|
|
8097
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(reactNative.ScrollView, {
|
|
8098
|
-
bounces: false,
|
|
8099
|
-
contentContainerStyle: {
|
|
8100
|
-
flexGrow: 1,
|
|
8101
|
-
position: 'relative'
|
|
8102
|
-
},
|
|
8103
|
-
children: body
|
|
8104
|
-
}), footer || null]
|
|
8105
|
-
})]
|
|
8106
|
-
})
|
|
8734
|
+
children: children
|
|
8107
8735
|
});
|
|
8108
8736
|
}
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8737
|
+
FullscreenModal2.Header = FullscreenModal2Header;
|
|
8738
|
+
FullscreenModal2.Footer = FullscreenModal2Footer;
|
|
8739
|
+
FullscreenModal2.Body = FullscreenModal2Body;
|
|
8740
|
+
FullscreenModal2.Behaviour = FullscreenModal2Behaviour;
|
|
8113
8741
|
|
|
8114
8742
|
function GroupTags({
|
|
8115
8743
|
children,
|
|
@@ -11548,7 +12176,7 @@ function NavigationModal({
|
|
|
11548
12176
|
contentContainer: contentContainer
|
|
11549
12177
|
});
|
|
11550
12178
|
}
|
|
11551
|
-
function Header(props) {
|
|
12179
|
+
function Header$1(props) {
|
|
11552
12180
|
const Component = useBreakpointValue({
|
|
11553
12181
|
base: FullscreenModal.Header,
|
|
11554
12182
|
small: CardModal.Header
|
|
@@ -11557,7 +12185,7 @@ function Header(props) {
|
|
|
11557
12185
|
...props
|
|
11558
12186
|
});
|
|
11559
12187
|
}
|
|
11560
|
-
function Body(props) {
|
|
12188
|
+
function Body$1(props) {
|
|
11561
12189
|
const Component = useBreakpointValue({
|
|
11562
12190
|
base: FullscreenModal.Body,
|
|
11563
12191
|
small: CardModal.Body
|
|
@@ -11566,7 +12194,7 @@ function Body(props) {
|
|
|
11566
12194
|
...props
|
|
11567
12195
|
});
|
|
11568
12196
|
}
|
|
11569
|
-
function Footer(props) {
|
|
12197
|
+
function Footer$1(props) {
|
|
11570
12198
|
const Component = useBreakpointValue({
|
|
11571
12199
|
base: FullscreenModal.Footer,
|
|
11572
12200
|
small: CardModal.Footer
|
|
@@ -11575,11 +12203,106 @@ function Footer(props) {
|
|
|
11575
12203
|
...props
|
|
11576
12204
|
});
|
|
11577
12205
|
}
|
|
11578
|
-
NavigationModal.Header = Header;
|
|
11579
|
-
NavigationModal.Body = Body;
|
|
11580
|
-
NavigationModal.Footer = Footer;
|
|
12206
|
+
NavigationModal.Header = Header$1;
|
|
12207
|
+
NavigationModal.Body = Body$1;
|
|
12208
|
+
NavigationModal.Footer = Footer$1;
|
|
11581
12209
|
NavigationModal.ModalBehaviour = NavigationModalBehaviour;
|
|
11582
12210
|
|
|
12211
|
+
function NavigationModal2Behaviour({
|
|
12212
|
+
children,
|
|
12213
|
+
visible,
|
|
12214
|
+
appear = true,
|
|
12215
|
+
onExited,
|
|
12216
|
+
onEnter,
|
|
12217
|
+
onExit,
|
|
12218
|
+
onClose,
|
|
12219
|
+
...props
|
|
12220
|
+
}) {
|
|
12221
|
+
const AnimationComponent = useBreakpointValue({
|
|
12222
|
+
base: FullscreenModal2Animation,
|
|
12223
|
+
small: CardModal2Animation
|
|
12224
|
+
});
|
|
12225
|
+
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = React.useState(visible);
|
|
12226
|
+
const [shouldAppear, setShouldAppear] = React.useState(appear);
|
|
12227
|
+
React.useEffect(() => {
|
|
12228
|
+
if (visible === true) {
|
|
12229
|
+
setIsModalBehaviourVisible(true);
|
|
12230
|
+
}
|
|
12231
|
+
}, [visible]);
|
|
12232
|
+
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
12233
|
+
visible: isModalBehaviourVisible,
|
|
12234
|
+
onClose: onClose,
|
|
12235
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
|
|
12236
|
+
...props,
|
|
12237
|
+
appear: shouldAppear,
|
|
12238
|
+
visible: visible,
|
|
12239
|
+
onEnter: () => {
|
|
12240
|
+
if (onEnter) onEnter();
|
|
12241
|
+
|
|
12242
|
+
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
12243
|
+
setShouldAppear(false);
|
|
12244
|
+
},
|
|
12245
|
+
onExit: () => {
|
|
12246
|
+
if (onExit) onExit();
|
|
12247
|
+
|
|
12248
|
+
// Reset appear value to its original value for future modal display
|
|
12249
|
+
setShouldAppear(appear);
|
|
12250
|
+
},
|
|
12251
|
+
onExited: () => {
|
|
12252
|
+
if (onExited) onExited();
|
|
12253
|
+
setIsModalBehaviourVisible(false);
|
|
12254
|
+
},
|
|
12255
|
+
onClose: onClose,
|
|
12256
|
+
children: children
|
|
12257
|
+
})
|
|
12258
|
+
});
|
|
12259
|
+
}
|
|
12260
|
+
|
|
12261
|
+
function NavigationModal2({
|
|
12262
|
+
backgroundColor,
|
|
12263
|
+
children
|
|
12264
|
+
}) {
|
|
12265
|
+
const Component = useBreakpointValue({
|
|
12266
|
+
base: FullscreenModal2,
|
|
12267
|
+
small: CardModal2
|
|
12268
|
+
});
|
|
12269
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
12270
|
+
backgroundColor: backgroundColor,
|
|
12271
|
+
children: children
|
|
12272
|
+
});
|
|
12273
|
+
}
|
|
12274
|
+
function Header(props) {
|
|
12275
|
+
const Component = useBreakpointValue({
|
|
12276
|
+
base: FullscreenModal2.Header,
|
|
12277
|
+
small: CardModal2.Header
|
|
12278
|
+
});
|
|
12279
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
12280
|
+
...props
|
|
12281
|
+
});
|
|
12282
|
+
}
|
|
12283
|
+
function Body(props) {
|
|
12284
|
+
const Component = useBreakpointValue({
|
|
12285
|
+
base: FullscreenModal2.Body,
|
|
12286
|
+
small: CardModal2.Body
|
|
12287
|
+
});
|
|
12288
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
12289
|
+
...props
|
|
12290
|
+
});
|
|
12291
|
+
}
|
|
12292
|
+
function Footer(props) {
|
|
12293
|
+
const Component = useBreakpointValue({
|
|
12294
|
+
base: FullscreenModal2.Footer,
|
|
12295
|
+
small: CardModal2.Footer
|
|
12296
|
+
});
|
|
12297
|
+
return /*#__PURE__*/jsxRuntime.jsx(Component, {
|
|
12298
|
+
...props
|
|
12299
|
+
});
|
|
12300
|
+
}
|
|
12301
|
+
NavigationModal2.Header = Header;
|
|
12302
|
+
NavigationModal2.Body = Body;
|
|
12303
|
+
NavigationModal2.Footer = Footer;
|
|
12304
|
+
NavigationModal2.ModalBehaviour = NavigationModal2Behaviour;
|
|
12305
|
+
|
|
11583
12306
|
function Notification({
|
|
11584
12307
|
type,
|
|
11585
12308
|
children,
|
|
@@ -12890,6 +13613,7 @@ function ModalDateTimePicker({
|
|
|
12890
13613
|
visible,
|
|
12891
13614
|
value,
|
|
12892
13615
|
minuteInterval,
|
|
13616
|
+
timezoneName = 'UTC',
|
|
12893
13617
|
validateButtonLabel,
|
|
12894
13618
|
testID,
|
|
12895
13619
|
pickerTestID,
|
|
@@ -12924,6 +13648,7 @@ function ModalDateTimePicker({
|
|
|
12924
13648
|
}) : null, /*#__PURE__*/jsxRuntime.jsx(CardModal.Body, {
|
|
12925
13649
|
children: /*#__PURE__*/jsxRuntime.jsx(DateTimePicker__default, {
|
|
12926
13650
|
is24Hour: true,
|
|
13651
|
+
timeZoneName: timezoneName,
|
|
12927
13652
|
minuteInterval: minuteInterval,
|
|
12928
13653
|
testID: pickerTestID,
|
|
12929
13654
|
value: currentValue,
|
|
@@ -13018,6 +13743,7 @@ const TimePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
13018
13743
|
disabled = false,
|
|
13019
13744
|
stretch,
|
|
13020
13745
|
value,
|
|
13746
|
+
timezoneName = 'UTC',
|
|
13021
13747
|
minuteInterval,
|
|
13022
13748
|
validateButtonLabel,
|
|
13023
13749
|
isDefaultVisible,
|
|
@@ -13059,6 +13785,7 @@ const TimePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
13059
13785
|
testID: pickerTestID,
|
|
13060
13786
|
value: pickerValue,
|
|
13061
13787
|
minuteInterval: minuteInterval,
|
|
13788
|
+
timeZoneName: timezoneName,
|
|
13062
13789
|
mode: "time",
|
|
13063
13790
|
display: "spinner",
|
|
13064
13791
|
onChange: (event, date) => handleChange(date)
|
|
@@ -13067,6 +13794,7 @@ const TimePicker = /*#__PURE__*/React.forwardRef(({
|
|
|
13067
13794
|
minuteInterval: minuteInterval,
|
|
13068
13795
|
title: title,
|
|
13069
13796
|
testID: modalTestID,
|
|
13797
|
+
timezoneName: timezoneName,
|
|
13070
13798
|
pickerTestID: pickerTestID,
|
|
13071
13799
|
value: pickerValue,
|
|
13072
13800
|
validateButtonLabel: validateButtonLabel,
|
|
@@ -13960,6 +14688,7 @@ exports.Avatar = Avatar;
|
|
|
13960
14688
|
exports.BottomSheet = BottomSheet;
|
|
13961
14689
|
exports.Button = Button;
|
|
13962
14690
|
exports.CardModal = CardModal;
|
|
14691
|
+
exports.CardModal2 = CardModal2;
|
|
13963
14692
|
exports.Center = Center;
|
|
13964
14693
|
exports.Checkbox = Checkbox;
|
|
13965
14694
|
exports.ChoicesElements = ChoicesElements;
|
|
@@ -13974,6 +14703,7 @@ exports.FilePicker = FilePicker;
|
|
|
13974
14703
|
exports.FlatList = FlatList;
|
|
13975
14704
|
exports.Flex = Flex;
|
|
13976
14705
|
exports.FullscreenModal = FullscreenModal;
|
|
14706
|
+
exports.FullscreenModal2 = FullscreenModal2;
|
|
13977
14707
|
exports.GoogleMapsApiKeyProvider = GoogleMapsApiKeyProvider;
|
|
13978
14708
|
exports.GoogleMapsAutocompleteProvider = GoogleMapsAutocompleteProvider;
|
|
13979
14709
|
exports.GroupTags = GroupTags;
|
|
@@ -14013,6 +14743,7 @@ exports.Message = Message;
|
|
|
14013
14743
|
exports.ModalBehaviour = ModalBehaviour;
|
|
14014
14744
|
exports.NativeOnlyFlatList = FlatList;
|
|
14015
14745
|
exports.NavigationModal = NavigationModal;
|
|
14746
|
+
exports.NavigationModal2 = NavigationModal2;
|
|
14016
14747
|
exports.Notification = Notification;
|
|
14017
14748
|
exports.Overlay = Overlay;
|
|
14018
14749
|
exports.PageLoader = PageLoader;
|