@ornikar/kitt-universal 22.1.1 → 22.2.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 +14 -0
- package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalAnimation/CardModalRotationContainer.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalBehaviour.d.ts +0 -5
- package/dist/definitions/CardModal/CardModalBehaviour.d.ts.map +1 -1
- package/dist/definitions/CardModal/CardModalBody.d.ts +2 -2
- package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
- package/dist/definitions/NavigationModal/NavigationModalBehaviour.d.ts.map +1 -1
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +5 -17
- package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
- package/dist/definitions/themes/late-ocean/cardModal.d.ts +1 -0
- package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
- package/dist/index-metro.es.android.js +47 -75
- package/dist/index-metro.es.android.js.map +1 -1
- package/dist/index-metro.es.ios.js +47 -75
- package/dist/index-metro.es.ios.js.map +1 -1
- package/dist/index-node-18.18.cjs.js +40 -67
- package/dist/index-node-18.18.cjs.js.map +1 -1
- package/dist/index-node-18.18.cjs.web.js +40 -62
- package/dist/index-node-18.18.cjs.web.js.map +1 -1
- package/dist/index-node-18.18.es.mjs +40 -67
- package/dist/index-node-18.18.es.mjs.map +1 -1
- package/dist/index-node-18.18.es.web.mjs +40 -62
- package/dist/index-node-18.18.es.web.mjs.map +1 -1
- package/dist/index.es.js +58 -83
- package/dist/index.es.js.map +1 -1
- package/dist/index.es.web.js +58 -78
- package/dist/index.es.web.js.map +1 -1
- package/dist/linaria-themes-metro.es.android.js +2 -1
- package/dist/linaria-themes-metro.es.android.js.map +1 -1
- package/dist/linaria-themes-metro.es.ios.js +2 -1
- package/dist/linaria-themes-metro.es.ios.js.map +1 -1
- package/dist/linaria-themes-node-18.18.cjs.js +2 -1
- package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
- package/dist/linaria-themes-node-18.18.cjs.web.js +2 -1
- package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
- package/dist/linaria-themes-node-18.18.es.mjs +2 -1
- package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
- package/dist/linaria-themes-node-18.18.es.web.mjs +2 -1
- package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
- package/dist/linaria-themes.es.js +2 -1
- package/dist/linaria-themes.es.js.map +1 -1
- package/dist/linaria-themes.es.web.js +2 -1
- package/dist/linaria-themes.es.web.js.map +1 -1
- package/dist/tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -768,6 +768,7 @@ const cardModal = {
|
|
|
768
768
|
borderRadius: 20,
|
|
769
769
|
maxWidth,
|
|
770
770
|
maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
|
|
771
|
+
minHeight: 280,
|
|
771
772
|
shadow: {
|
|
772
773
|
color: colors.black,
|
|
773
774
|
offsetX: 0,
|
|
@@ -786,7 +787,7 @@ const cardModal = {
|
|
|
786
787
|
},
|
|
787
788
|
overlayPadding: {
|
|
788
789
|
horizontal: 24,
|
|
789
|
-
vertical:
|
|
790
|
+
vertical: 80
|
|
790
791
|
},
|
|
791
792
|
animation: {
|
|
792
793
|
overlay: {
|
|
@@ -3066,6 +3067,10 @@ function CardModalRotationContainer(props) {
|
|
|
3066
3067
|
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
3067
3068
|
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
3068
3069
|
width: "100%",
|
|
3070
|
+
maxHeight: "100%",
|
|
3071
|
+
_web: {
|
|
3072
|
+
maxHeight: '100svh'
|
|
3073
|
+
},
|
|
3069
3074
|
...props
|
|
3070
3075
|
});
|
|
3071
3076
|
}
|
|
@@ -3212,20 +3217,6 @@ function CardModalAnimation({
|
|
|
3212
3217
|
});
|
|
3213
3218
|
}
|
|
3214
3219
|
|
|
3215
|
-
function CardModalScrollContainer({
|
|
3216
|
-
children,
|
|
3217
|
-
...props
|
|
3218
|
-
}) {
|
|
3219
|
-
if (Platform.OS !== 'web') {
|
|
3220
|
-
return /*#__PURE__*/jsx(View, {
|
|
3221
|
-
children: children
|
|
3222
|
-
});
|
|
3223
|
-
}
|
|
3224
|
-
return /*#__PURE__*/jsx(ScrollView, {
|
|
3225
|
-
...props,
|
|
3226
|
-
children: children
|
|
3227
|
-
});
|
|
3228
|
-
}
|
|
3229
3220
|
function CardModalBehaviour({
|
|
3230
3221
|
children,
|
|
3231
3222
|
visible,
|
|
@@ -3242,21 +3233,15 @@ function CardModalBehaviour({
|
|
|
3242
3233
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
3243
3234
|
visible: isModalBehaviourVisible,
|
|
3244
3235
|
onClose: onClose,
|
|
3245
|
-
children: /*#__PURE__*/jsx(
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3236
|
+
children: /*#__PURE__*/jsx(CardModalAnimation, {
|
|
3237
|
+
...props,
|
|
3238
|
+
visible: visible,
|
|
3239
|
+
onExited: () => {
|
|
3240
|
+
if (onExited) onExited();
|
|
3241
|
+
setIsModalBehaviourVisible(false);
|
|
3249
3242
|
},
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
visible: visible,
|
|
3253
|
-
onExited: () => {
|
|
3254
|
-
if (onExited) onExited();
|
|
3255
|
-
setIsModalBehaviourVisible(false);
|
|
3256
|
-
},
|
|
3257
|
-
onClose: onClose,
|
|
3258
|
-
children: children
|
|
3259
|
-
})
|
|
3243
|
+
onClose: onClose,
|
|
3244
|
+
children: children
|
|
3260
3245
|
})
|
|
3261
3246
|
});
|
|
3262
3247
|
}
|
|
@@ -3270,7 +3255,8 @@ function CardModalBody({
|
|
|
3270
3255
|
paddingY = 'kitt.4',
|
|
3271
3256
|
...props
|
|
3272
3257
|
}) {
|
|
3273
|
-
return /*#__PURE__*/jsx(
|
|
3258
|
+
return /*#__PURE__*/jsx(ScrollView, {
|
|
3259
|
+
showsVerticalScrollIndicator: false,
|
|
3274
3260
|
paddingX: paddingX,
|
|
3275
3261
|
paddingY: paddingY,
|
|
3276
3262
|
...props,
|
|
@@ -3370,6 +3356,7 @@ function CardModal({
|
|
|
3370
3356
|
width: "100%",
|
|
3371
3357
|
maxHeight: "100%",
|
|
3372
3358
|
maxWidth: maxWidth,
|
|
3359
|
+
minHeight: "kitt.cardModal.minHeight",
|
|
3373
3360
|
children: children || /*#__PURE__*/jsxs(Fragment, {
|
|
3374
3361
|
children: [header || null, body || null, footer || null]
|
|
3375
3362
|
})
|
|
@@ -8036,7 +8023,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8036
8023
|
height: theme.cardModal.header.height
|
|
8037
8024
|
},
|
|
8038
8025
|
maxWidth: theme.cardModal.maxWidth,
|
|
8039
|
-
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
|
|
8026
|
+
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
8027
|
+
minHeight: theme.cardModal.minHeight
|
|
8040
8028
|
},
|
|
8041
8029
|
dialogModal: {
|
|
8042
8030
|
maxWidth: theme.dialogModal.maxWidth,
|
|
@@ -8150,7 +8138,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
8150
8138
|
padding: theme.button.padding
|
|
8151
8139
|
},
|
|
8152
8140
|
cardModal: {
|
|
8153
|
-
overlayPadding: theme.
|
|
8141
|
+
overlayPadding: theme.cardModal.overlayPadding
|
|
8154
8142
|
},
|
|
8155
8143
|
dialogModal: {
|
|
8156
8144
|
overlayPadding: theme.dialogModal.overlayPadding
|
|
@@ -8935,11 +8923,6 @@ function KittNativeBaseProvider({
|
|
|
8935
8923
|
});
|
|
8936
8924
|
}
|
|
8937
8925
|
|
|
8938
|
-
function SimpleContainer({
|
|
8939
|
-
children
|
|
8940
|
-
}) {
|
|
8941
|
-
return children;
|
|
8942
|
-
}
|
|
8943
8926
|
function NavigationModalBehaviour({
|
|
8944
8927
|
children,
|
|
8945
8928
|
visible,
|
|
@@ -8954,10 +8937,6 @@ function NavigationModalBehaviour({
|
|
|
8954
8937
|
base: FullscreenModalAnimation,
|
|
8955
8938
|
small: CardModalAnimation
|
|
8956
8939
|
});
|
|
8957
|
-
const CurrentContainerComponent = useBreakpointValue({
|
|
8958
|
-
base: SimpleContainer,
|
|
8959
|
-
small: CardModalScrollContainer
|
|
8960
|
-
});
|
|
8961
8940
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
|
|
8962
8941
|
const [shouldAppear, setShouldAppear] = useState(appear);
|
|
8963
8942
|
useEffect(() => {
|
|
@@ -8968,34 +8947,28 @@ function NavigationModalBehaviour({
|
|
|
8968
8947
|
return /*#__PURE__*/jsx(ModalBehaviour, {
|
|
8969
8948
|
visible: isModalBehaviourVisible,
|
|
8970
8949
|
onClose: onClose,
|
|
8971
|
-
children: /*#__PURE__*/jsx(
|
|
8972
|
-
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
...props,
|
|
8978
|
-
appear: shouldAppear,
|
|
8979
|
-
visible: visible,
|
|
8980
|
-
onEnter: () => {
|
|
8981
|
-
if (onEnter) onEnter();
|
|
8950
|
+
children: /*#__PURE__*/jsx(AnimationComponent, {
|
|
8951
|
+
...props,
|
|
8952
|
+
appear: shouldAppear,
|
|
8953
|
+
visible: visible,
|
|
8954
|
+
onEnter: () => {
|
|
8955
|
+
if (onEnter) onEnter();
|
|
8982
8956
|
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8957
|
+
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
8958
|
+
setShouldAppear(false);
|
|
8959
|
+
},
|
|
8960
|
+
onExit: () => {
|
|
8961
|
+
if (onExit) onExit();
|
|
8988
8962
|
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
})
|
|
8963
|
+
// Reset appear value to its original value for future modal display
|
|
8964
|
+
setShouldAppear(appear);
|
|
8965
|
+
},
|
|
8966
|
+
onExited: () => {
|
|
8967
|
+
if (onExited) onExited();
|
|
8968
|
+
setIsModalBehaviourVisible(false);
|
|
8969
|
+
},
|
|
8970
|
+
onClose: onClose,
|
|
8971
|
+
children: children
|
|
8999
8972
|
})
|
|
9000
8973
|
});
|
|
9001
8974
|
}
|