@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
|
@@ -769,6 +769,7 @@ const cardModal = {
|
|
|
769
769
|
borderRadius: 20,
|
|
770
770
|
maxWidth,
|
|
771
771
|
maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
|
|
772
|
+
minHeight: 280,
|
|
772
773
|
shadow: {
|
|
773
774
|
color: colors.black,
|
|
774
775
|
offsetX: 0,
|
|
@@ -787,7 +788,7 @@ const cardModal = {
|
|
|
787
788
|
},
|
|
788
789
|
overlayPadding: {
|
|
789
790
|
horizontal: 24,
|
|
790
|
-
vertical:
|
|
791
|
+
vertical: 80
|
|
791
792
|
},
|
|
792
793
|
animation: {
|
|
793
794
|
overlay: {
|
|
@@ -3010,6 +3011,10 @@ function CardModalRotationContainer(props) {
|
|
|
3010
3011
|
paddingY: "kitt.cardModal.overlayPadding.vertical",
|
|
3011
3012
|
maxWidth: "kitt.cardModal.maxWidthWithPadding",
|
|
3012
3013
|
width: "100%",
|
|
3014
|
+
maxHeight: "100%",
|
|
3015
|
+
_web: {
|
|
3016
|
+
maxHeight: '100svh'
|
|
3017
|
+
},
|
|
3013
3018
|
...props
|
|
3014
3019
|
});
|
|
3015
3020
|
}
|
|
@@ -3088,15 +3093,6 @@ function CardModalAnimation({
|
|
|
3088
3093
|
});
|
|
3089
3094
|
}
|
|
3090
3095
|
|
|
3091
|
-
function CardModalScrollContainer({
|
|
3092
|
-
children,
|
|
3093
|
-
...props
|
|
3094
|
-
}) {
|
|
3095
|
-
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
3096
|
-
...props,
|
|
3097
|
-
children: children
|
|
3098
|
-
});
|
|
3099
|
-
}
|
|
3100
3096
|
function CardModalBehaviour({
|
|
3101
3097
|
children,
|
|
3102
3098
|
visible,
|
|
@@ -3113,21 +3109,15 @@ function CardModalBehaviour({
|
|
|
3113
3109
|
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
3114
3110
|
visible: isModalBehaviourVisible,
|
|
3115
3111
|
onClose: onClose,
|
|
3116
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3112
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CardModalAnimation, {
|
|
3113
|
+
...props,
|
|
3114
|
+
visible: visible,
|
|
3115
|
+
onExited: () => {
|
|
3116
|
+
if (onExited) onExited();
|
|
3117
|
+
setIsModalBehaviourVisible(false);
|
|
3120
3118
|
},
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
visible: visible,
|
|
3124
|
-
onExited: () => {
|
|
3125
|
-
if (onExited) onExited();
|
|
3126
|
-
setIsModalBehaviourVisible(false);
|
|
3127
|
-
},
|
|
3128
|
-
onClose: onClose,
|
|
3129
|
-
children: children
|
|
3130
|
-
})
|
|
3119
|
+
onClose: onClose,
|
|
3120
|
+
children: children
|
|
3131
3121
|
})
|
|
3132
3122
|
});
|
|
3133
3123
|
}
|
|
@@ -3141,7 +3131,8 @@ function CardModalBody({
|
|
|
3141
3131
|
paddingY = 'kitt.4',
|
|
3142
3132
|
...props
|
|
3143
3133
|
}) {
|
|
3144
|
-
return /*#__PURE__*/jsxRuntime.jsx(
|
|
3134
|
+
return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
|
|
3135
|
+
showsVerticalScrollIndicator: false,
|
|
3145
3136
|
paddingX: paddingX,
|
|
3146
3137
|
paddingY: paddingY,
|
|
3147
3138
|
...props,
|
|
@@ -3241,6 +3232,7 @@ function CardModal({
|
|
|
3241
3232
|
width: "100%",
|
|
3242
3233
|
maxHeight: "100%",
|
|
3243
3234
|
maxWidth: maxWidth,
|
|
3235
|
+
minHeight: "kitt.cardModal.minHeight",
|
|
3244
3236
|
children: children || /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3245
3237
|
children: [header || null, body || null, footer || null]
|
|
3246
3238
|
})
|
|
@@ -7414,7 +7406,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7414
7406
|
height: theme.cardModal.header.height
|
|
7415
7407
|
},
|
|
7416
7408
|
maxWidth: theme.cardModal.maxWidth,
|
|
7417
|
-
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
|
|
7409
|
+
maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
|
|
7410
|
+
minHeight: theme.cardModal.minHeight
|
|
7418
7411
|
},
|
|
7419
7412
|
dialogModal: {
|
|
7420
7413
|
maxWidth: theme.dialogModal.maxWidth,
|
|
@@ -7528,7 +7521,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
|
|
|
7528
7521
|
padding: theme.button.padding
|
|
7529
7522
|
},
|
|
7530
7523
|
cardModal: {
|
|
7531
|
-
overlayPadding: theme.
|
|
7524
|
+
overlayPadding: theme.cardModal.overlayPadding
|
|
7532
7525
|
},
|
|
7533
7526
|
dialogModal: {
|
|
7534
7527
|
overlayPadding: theme.dialogModal.overlayPadding
|
|
@@ -8353,11 +8346,6 @@ function NativeOnlyFlatList({
|
|
|
8353
8346
|
});
|
|
8354
8347
|
}
|
|
8355
8348
|
|
|
8356
|
-
function SimpleContainer({
|
|
8357
|
-
children
|
|
8358
|
-
}) {
|
|
8359
|
-
return children;
|
|
8360
|
-
}
|
|
8361
8349
|
function NavigationModalBehaviour({
|
|
8362
8350
|
children,
|
|
8363
8351
|
visible,
|
|
@@ -8372,10 +8360,6 @@ function NavigationModalBehaviour({
|
|
|
8372
8360
|
base: FullscreenModalAnimation,
|
|
8373
8361
|
small: CardModalAnimation
|
|
8374
8362
|
});
|
|
8375
|
-
const CurrentContainerComponent = useBreakpointValue({
|
|
8376
|
-
base: SimpleContainer,
|
|
8377
|
-
small: CardModalScrollContainer
|
|
8378
|
-
});
|
|
8379
8363
|
const [isModalBehaviourVisible, setIsModalBehaviourVisible] = react.useState(visible);
|
|
8380
8364
|
const [shouldAppear, setShouldAppear] = react.useState(appear);
|
|
8381
8365
|
react.useEffect(() => {
|
|
@@ -8386,34 +8370,28 @@ function NavigationModalBehaviour({
|
|
|
8386
8370
|
return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
|
|
8387
8371
|
visible: isModalBehaviourVisible,
|
|
8388
8372
|
onClose: onClose,
|
|
8389
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
...props,
|
|
8396
|
-
appear: shouldAppear,
|
|
8397
|
-
visible: visible,
|
|
8398
|
-
onEnter: () => {
|
|
8399
|
-
if (onEnter) onEnter();
|
|
8373
|
+
children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
|
|
8374
|
+
...props,
|
|
8375
|
+
appear: shouldAppear,
|
|
8376
|
+
visible: visible,
|
|
8377
|
+
onEnter: () => {
|
|
8378
|
+
if (onEnter) onEnter();
|
|
8400
8379
|
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8380
|
+
// Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
|
|
8381
|
+
setShouldAppear(false);
|
|
8382
|
+
},
|
|
8383
|
+
onExit: () => {
|
|
8384
|
+
if (onExit) onExit();
|
|
8406
8385
|
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
})
|
|
8386
|
+
// Reset appear value to its original value for future modal display
|
|
8387
|
+
setShouldAppear(appear);
|
|
8388
|
+
},
|
|
8389
|
+
onExited: () => {
|
|
8390
|
+
if (onExited) onExited();
|
|
8391
|
+
setIsModalBehaviourVisible(false);
|
|
8392
|
+
},
|
|
8393
|
+
onClose: onClose,
|
|
8394
|
+
children: children
|
|
8417
8395
|
})
|
|
8418
8396
|
});
|
|
8419
8397
|
}
|