@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
@@ -764,6 +764,7 @@ const cardModal = {
764
764
  borderRadius: 20,
765
765
  maxWidth,
766
766
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
767
+ minHeight: 280,
767
768
  shadow: {
768
769
  color: colors.black,
769
770
  offsetX: 0,
@@ -782,7 +783,7 @@ const cardModal = {
782
783
  },
783
784
  overlayPadding: {
784
785
  horizontal: 24,
785
- vertical: 32
786
+ vertical: 80
786
787
  },
787
788
  animation: {
788
789
  overlay: {
@@ -3005,6 +3006,10 @@ function CardModalRotationContainer(props) {
3005
3006
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3006
3007
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3007
3008
  width: "100%",
3009
+ maxHeight: "100%",
3010
+ _web: {
3011
+ maxHeight: '100svh'
3012
+ },
3008
3013
  ...props
3009
3014
  });
3010
3015
  }
@@ -3083,15 +3088,6 @@ function CardModalAnimation({
3083
3088
  });
3084
3089
  }
3085
3090
 
3086
- function CardModalScrollContainer({
3087
- children,
3088
- ...props
3089
- }) {
3090
- return /*#__PURE__*/jsx(ScrollView, {
3091
- ...props,
3092
- children: children
3093
- });
3094
- }
3095
3091
  function CardModalBehaviour({
3096
3092
  children,
3097
3093
  visible,
@@ -3108,21 +3104,15 @@ function CardModalBehaviour({
3108
3104
  return /*#__PURE__*/jsx(ModalBehaviour, {
3109
3105
  visible: isModalBehaviourVisible,
3110
3106
  onClose: onClose,
3111
- children: /*#__PURE__*/jsx(CardModalScrollContainer, {
3112
- bounces: false,
3113
- contentContainerStyle: {
3114
- flexGrow: 1
3107
+ children: /*#__PURE__*/jsx(CardModalAnimation, {
3108
+ ...props,
3109
+ visible: visible,
3110
+ onExited: () => {
3111
+ if (onExited) onExited();
3112
+ setIsModalBehaviourVisible(false);
3115
3113
  },
3116
- children: /*#__PURE__*/jsx(CardModalAnimation, {
3117
- ...props,
3118
- visible: visible,
3119
- onExited: () => {
3120
- if (onExited) onExited();
3121
- setIsModalBehaviourVisible(false);
3122
- },
3123
- onClose: onClose,
3124
- children: children
3125
- })
3114
+ onClose: onClose,
3115
+ children: children
3126
3116
  })
3127
3117
  });
3128
3118
  }
@@ -3136,7 +3126,8 @@ function CardModalBody({
3136
3126
  paddingY = 'kitt.4',
3137
3127
  ...props
3138
3128
  }) {
3139
- return /*#__PURE__*/jsx(View, {
3129
+ return /*#__PURE__*/jsx(ScrollView, {
3130
+ showsVerticalScrollIndicator: false,
3140
3131
  paddingX: paddingX,
3141
3132
  paddingY: paddingY,
3142
3133
  ...props,
@@ -3236,6 +3227,7 @@ function CardModal({
3236
3227
  width: "100%",
3237
3228
  maxHeight: "100%",
3238
3229
  maxWidth: maxWidth,
3230
+ minHeight: "kitt.cardModal.minHeight",
3239
3231
  children: children || /*#__PURE__*/jsxs(Fragment, {
3240
3232
  children: [header || null, body || null, footer || null]
3241
3233
  })
@@ -7409,7 +7401,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7409
7401
  height: theme.cardModal.header.height
7410
7402
  },
7411
7403
  maxWidth: theme.cardModal.maxWidth,
7412
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
7404
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
7405
+ minHeight: theme.cardModal.minHeight
7413
7406
  },
7414
7407
  dialogModal: {
7415
7408
  maxWidth: theme.dialogModal.maxWidth,
@@ -7523,7 +7516,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7523
7516
  padding: theme.button.padding
7524
7517
  },
7525
7518
  cardModal: {
7526
- overlayPadding: theme.dialogModal.overlayPadding
7519
+ overlayPadding: theme.cardModal.overlayPadding
7527
7520
  },
7528
7521
  dialogModal: {
7529
7522
  overlayPadding: theme.dialogModal.overlayPadding
@@ -8348,11 +8341,6 @@ function NativeOnlyFlatList({
8348
8341
  });
8349
8342
  }
8350
8343
 
8351
- function SimpleContainer({
8352
- children
8353
- }) {
8354
- return children;
8355
- }
8356
8344
  function NavigationModalBehaviour({
8357
8345
  children,
8358
8346
  visible,
@@ -8367,10 +8355,6 @@ function NavigationModalBehaviour({
8367
8355
  base: FullscreenModalAnimation,
8368
8356
  small: CardModalAnimation
8369
8357
  });
8370
- const CurrentContainerComponent = useBreakpointValue({
8371
- base: SimpleContainer,
8372
- small: CardModalScrollContainer
8373
- });
8374
8358
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
8375
8359
  const [shouldAppear, setShouldAppear] = useState(appear);
8376
8360
  useEffect(() => {
@@ -8381,34 +8365,28 @@ function NavigationModalBehaviour({
8381
8365
  return /*#__PURE__*/jsx(ModalBehaviour, {
8382
8366
  visible: isModalBehaviourVisible,
8383
8367
  onClose: onClose,
8384
- children: /*#__PURE__*/jsx(CurrentContainerComponent, {
8385
- bounces: false,
8386
- contentContainerStyle: {
8387
- flexGrow: 1
8388
- },
8389
- children: /*#__PURE__*/jsx(AnimationComponent, {
8390
- ...props,
8391
- appear: shouldAppear,
8392
- visible: visible,
8393
- onEnter: () => {
8394
- if (onEnter) onEnter();
8368
+ children: /*#__PURE__*/jsx(AnimationComponent, {
8369
+ ...props,
8370
+ appear: shouldAppear,
8371
+ visible: visible,
8372
+ onEnter: () => {
8373
+ if (onEnter) onEnter();
8395
8374
 
8396
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8397
- setShouldAppear(false);
8398
- },
8399
- onExit: () => {
8400
- if (onExit) onExit();
8375
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8376
+ setShouldAppear(false);
8377
+ },
8378
+ onExit: () => {
8379
+ if (onExit) onExit();
8401
8380
 
8402
- // Reset appear value to its original value for future modal display
8403
- setShouldAppear(appear);
8404
- },
8405
- onExited: () => {
8406
- if (onExited) onExited();
8407
- setIsModalBehaviourVisible(false);
8408
- },
8409
- onClose: onClose,
8410
- children: children
8411
- })
8381
+ // Reset appear value to its original value for future modal display
8382
+ setShouldAppear(appear);
8383
+ },
8384
+ onExited: () => {
8385
+ if (onExited) onExited();
8386
+ setIsModalBehaviourVisible(false);
8387
+ },
8388
+ onClose: onClose,
8389
+ children: children
8412
8390
  })
8413
8391
  });
8414
8392
  }