@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.
Files changed (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/definitions/CardModal/CardModal.d.ts.map +1 -1
  3. package/dist/definitions/CardModal/CardModalAnimation/CardModalRotationContainer.d.ts.map +1 -1
  4. package/dist/definitions/CardModal/CardModalBehaviour.d.ts +0 -5
  5. package/dist/definitions/CardModal/CardModalBehaviour.d.ts.map +1 -1
  6. package/dist/definitions/CardModal/CardModalBody.d.ts +2 -2
  7. package/dist/definitions/CardModal/CardModalBody.d.ts.map +1 -1
  8. package/dist/definitions/NavigationModal/NavigationModalBehaviour.d.ts.map +1 -1
  9. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +5 -17
  10. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  11. package/dist/definitions/themes/late-ocean/cardModal.d.ts +1 -0
  12. package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
  13. package/dist/index-metro.es.android.js +47 -75
  14. package/dist/index-metro.es.android.js.map +1 -1
  15. package/dist/index-metro.es.ios.js +47 -75
  16. package/dist/index-metro.es.ios.js.map +1 -1
  17. package/dist/index-node-18.18.cjs.js +40 -67
  18. package/dist/index-node-18.18.cjs.js.map +1 -1
  19. package/dist/index-node-18.18.cjs.web.js +40 -62
  20. package/dist/index-node-18.18.cjs.web.js.map +1 -1
  21. package/dist/index-node-18.18.es.mjs +40 -67
  22. package/dist/index-node-18.18.es.mjs.map +1 -1
  23. package/dist/index-node-18.18.es.web.mjs +40 -62
  24. package/dist/index-node-18.18.es.web.mjs.map +1 -1
  25. package/dist/index.es.js +58 -83
  26. package/dist/index.es.js.map +1 -1
  27. package/dist/index.es.web.js +58 -78
  28. package/dist/index.es.web.js.map +1 -1
  29. package/dist/linaria-themes-metro.es.android.js +2 -1
  30. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  31. package/dist/linaria-themes-metro.es.ios.js +2 -1
  32. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  33. package/dist/linaria-themes-node-18.18.cjs.js +2 -1
  34. package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
  35. package/dist/linaria-themes-node-18.18.cjs.web.js +2 -1
  36. package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
  37. package/dist/linaria-themes-node-18.18.es.mjs +2 -1
  38. package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
  39. package/dist/linaria-themes-node-18.18.es.web.mjs +2 -1
  40. package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
  41. package/dist/linaria-themes.es.js +2 -1
  42. package/dist/linaria-themes.es.js.map +1 -1
  43. package/dist/linaria-themes.es.web.js +2 -1
  44. package/dist/linaria-themes.es.web.js.map +1 -1
  45. package/dist/tsbuildinfo +1 -1
  46. package/package.json +2 -2
@@ -790,6 +790,7 @@ const cardModal = {
790
790
  borderRadius: 20,
791
791
  maxWidth,
792
792
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
793
+ minHeight: 280,
793
794
  shadow: {
794
795
  color: colors.black,
795
796
  offsetX: 0,
@@ -808,7 +809,7 @@ const cardModal = {
808
809
  },
809
810
  overlayPadding: {
810
811
  horizontal: 24,
811
- vertical: 32
812
+ vertical: 80
812
813
  },
813
814
  animation: {
814
815
  overlay: {
@@ -3088,6 +3089,10 @@ function CardModalRotationContainer(props) {
3088
3089
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3089
3090
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3090
3091
  width: "100%",
3092
+ maxHeight: "100%",
3093
+ _web: {
3094
+ maxHeight: '100svh'
3095
+ },
3091
3096
  ...props
3092
3097
  });
3093
3098
  }
@@ -3234,20 +3239,6 @@ function CardModalAnimation({
3234
3239
  });
3235
3240
  }
3236
3241
 
3237
- function CardModalScrollContainer({
3238
- children,
3239
- ...props
3240
- }) {
3241
- if (reactNative.Platform.OS !== 'web') {
3242
- return /*#__PURE__*/jsxRuntime.jsx(View, {
3243
- children: children
3244
- });
3245
- }
3246
- return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
3247
- ...props,
3248
- children: children
3249
- });
3250
- }
3251
3242
  function CardModalBehaviour({
3252
3243
  children,
3253
3244
  visible,
@@ -3264,21 +3255,15 @@ function CardModalBehaviour({
3264
3255
  return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
3265
3256
  visible: isModalBehaviourVisible,
3266
3257
  onClose: onClose,
3267
- children: /*#__PURE__*/jsxRuntime.jsx(CardModalScrollContainer, {
3268
- bounces: false,
3269
- contentContainerStyle: {
3270
- flexGrow: 1
3258
+ children: /*#__PURE__*/jsxRuntime.jsx(CardModalAnimation, {
3259
+ ...props,
3260
+ visible: visible,
3261
+ onExited: () => {
3262
+ if (onExited) onExited();
3263
+ setIsModalBehaviourVisible(false);
3271
3264
  },
3272
- children: /*#__PURE__*/jsxRuntime.jsx(CardModalAnimation, {
3273
- ...props,
3274
- visible: visible,
3275
- onExited: () => {
3276
- if (onExited) onExited();
3277
- setIsModalBehaviourVisible(false);
3278
- },
3279
- onClose: onClose,
3280
- children: children
3281
- })
3265
+ onClose: onClose,
3266
+ children: children
3282
3267
  })
3283
3268
  });
3284
3269
  }
@@ -3292,7 +3277,8 @@ function CardModalBody({
3292
3277
  paddingY = 'kitt.4',
3293
3278
  ...props
3294
3279
  }) {
3295
- return /*#__PURE__*/jsxRuntime.jsx(View, {
3280
+ return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
3281
+ showsVerticalScrollIndicator: false,
3296
3282
  paddingX: paddingX,
3297
3283
  paddingY: paddingY,
3298
3284
  ...props,
@@ -3392,6 +3378,7 @@ function CardModal({
3392
3378
  width: "100%",
3393
3379
  maxHeight: "100%",
3394
3380
  maxWidth: maxWidth,
3381
+ minHeight: "kitt.cardModal.minHeight",
3395
3382
  children: children || /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
3396
3383
  children: [header || null, body || null, footer || null]
3397
3384
  })
@@ -8058,7 +8045,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8058
8045
  height: theme.cardModal.header.height
8059
8046
  },
8060
8047
  maxWidth: theme.cardModal.maxWidth,
8061
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
8048
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
8049
+ minHeight: theme.cardModal.minHeight
8062
8050
  },
8063
8051
  dialogModal: {
8064
8052
  maxWidth: theme.dialogModal.maxWidth,
@@ -8172,7 +8160,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8172
8160
  padding: theme.button.padding
8173
8161
  },
8174
8162
  cardModal: {
8175
- overlayPadding: theme.dialogModal.overlayPadding
8163
+ overlayPadding: theme.cardModal.overlayPadding
8176
8164
  },
8177
8165
  dialogModal: {
8178
8166
  overlayPadding: theme.dialogModal.overlayPadding
@@ -8957,11 +8945,6 @@ function KittNativeBaseProvider({
8957
8945
  });
8958
8946
  }
8959
8947
 
8960
- function SimpleContainer({
8961
- children
8962
- }) {
8963
- return children;
8964
- }
8965
8948
  function NavigationModalBehaviour({
8966
8949
  children,
8967
8950
  visible,
@@ -8976,10 +8959,6 @@ function NavigationModalBehaviour({
8976
8959
  base: FullscreenModalAnimation,
8977
8960
  small: CardModalAnimation
8978
8961
  });
8979
- const CurrentContainerComponent = useBreakpointValue({
8980
- base: SimpleContainer,
8981
- small: CardModalScrollContainer
8982
- });
8983
8962
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = React.useState(visible);
8984
8963
  const [shouldAppear, setShouldAppear] = React.useState(appear);
8985
8964
  React.useEffect(() => {
@@ -8990,34 +8969,28 @@ function NavigationModalBehaviour({
8990
8969
  return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
8991
8970
  visible: isModalBehaviourVisible,
8992
8971
  onClose: onClose,
8993
- children: /*#__PURE__*/jsxRuntime.jsx(CurrentContainerComponent, {
8994
- bounces: false,
8995
- contentContainerStyle: {
8996
- flexGrow: 1
8997
- },
8998
- children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
8999
- ...props,
9000
- appear: shouldAppear,
9001
- visible: visible,
9002
- onEnter: () => {
9003
- if (onEnter) onEnter();
8972
+ children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
8973
+ ...props,
8974
+ appear: shouldAppear,
8975
+ visible: visible,
8976
+ onEnter: () => {
8977
+ if (onEnter) onEnter();
9004
8978
 
9005
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
9006
- setShouldAppear(false);
9007
- },
9008
- onExit: () => {
9009
- if (onExit) onExit();
8979
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8980
+ setShouldAppear(false);
8981
+ },
8982
+ onExit: () => {
8983
+ if (onExit) onExit();
9010
8984
 
9011
- // Reset appear value to its original value for future modal display
9012
- setShouldAppear(appear);
9013
- },
9014
- onExited: () => {
9015
- if (onExited) onExited();
9016
- setIsModalBehaviourVisible(false);
9017
- },
9018
- onClose: onClose,
9019
- children: children
9020
- })
8985
+ // Reset appear value to its original value for future modal display
8986
+ setShouldAppear(appear);
8987
+ },
8988
+ onExited: () => {
8989
+ if (onExited) onExited();
8990
+ setIsModalBehaviourVisible(false);
8991
+ },
8992
+ onClose: onClose,
8993
+ children: children
9021
8994
  })
9022
8995
  });
9023
8996
  }