@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
package/dist/index.es.js CHANGED
@@ -786,6 +786,7 @@ var cardModal = {
786
786
  borderRadius: 20,
787
787
  maxWidth: maxWidth,
788
788
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
789
+ minHeight: 280,
789
790
  shadow: {
790
791
  color: colors.black,
791
792
  offsetX: 0,
@@ -804,7 +805,7 @@ var cardModal = {
804
805
  },
805
806
  overlayPadding: {
806
807
  horizontal: 24,
807
- vertical: 32
808
+ vertical: 80
808
809
  },
809
810
  animation: {
810
811
  overlay: {
@@ -2277,7 +2278,7 @@ function Icon(_ref) {
2277
2278
  }
2278
2279
 
2279
2280
  var _excluded$K = ["color", "size"],
2280
- _excluded2$6 = ["color"];
2281
+ _excluded2$5 = ["color"];
2281
2282
  function getIconSizeConfigKeyFromTypeName(breakpointName) {
2282
2283
  return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
2283
2284
  }
@@ -2319,7 +2320,7 @@ function TypographyIconInheritColor(props) {
2319
2320
  }
2320
2321
  function TypographyIcon(_ref2) {
2321
2322
  var color = _ref2.color,
2322
- props = _objectWithoutProperties(_ref2, _excluded2$6);
2323
+ props = _objectWithoutProperties(_ref2, _excluded2$5);
2323
2324
  if (color) {
2324
2325
  return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
2325
2326
  color: color
@@ -3102,7 +3103,11 @@ function CardModalRotationContainer(props) {
3102
3103
  paddingX: "kitt.cardModal.overlayPadding.horizontal",
3103
3104
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3104
3105
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3105
- width: "100%"
3106
+ width: "100%",
3107
+ maxHeight: "100%",
3108
+ _web: {
3109
+ maxHeight: '100svh'
3110
+ }
3106
3111
  }, props));
3107
3112
  }
3108
3113
 
@@ -3257,26 +3262,13 @@ function CardModalAnimation(_ref) {
3257
3262
  });
3258
3263
  }
3259
3264
 
3260
- var _excluded$F = ["children"],
3261
- _excluded2$5 = ["children", "visible", "onClose", "onExited"];
3262
- function CardModalScrollContainer(_ref) {
3265
+ var _excluded$F = ["children", "visible", "onClose", "onExited"];
3266
+ function CardModalBehaviour(_ref) {
3263
3267
  var children = _ref.children,
3268
+ visible = _ref.visible,
3269
+ onClose = _ref.onClose,
3270
+ onExited = _ref.onExited,
3264
3271
  props = _objectWithoutProperties(_ref, _excluded$F);
3265
- if (Platform.OS !== 'web') {
3266
- return /*#__PURE__*/jsx(View, {
3267
- children: children
3268
- });
3269
- }
3270
- return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({}, props), {}, {
3271
- children: children
3272
- }));
3273
- }
3274
- function CardModalBehaviour(_ref2) {
3275
- var children = _ref2.children,
3276
- visible = _ref2.visible,
3277
- onClose = _ref2.onClose,
3278
- onExited = _ref2.onExited,
3279
- props = _objectWithoutProperties(_ref2, _excluded2$5);
3280
3272
  var _useState = useState(visible),
3281
3273
  _useState2 = _slicedToArray(_useState, 2),
3282
3274
  isModalBehaviourVisible = _useState2[0],
@@ -3289,21 +3281,15 @@ function CardModalBehaviour(_ref2) {
3289
3281
  return /*#__PURE__*/jsx(ModalBehaviour, {
3290
3282
  visible: isModalBehaviourVisible,
3291
3283
  onClose: onClose,
3292
- children: /*#__PURE__*/jsx(CardModalScrollContainer, {
3293
- bounces: false,
3294
- contentContainerStyle: {
3295
- flexGrow: 1
3284
+ children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
3285
+ visible: visible,
3286
+ onExited: function handleExitAnimationDone() {
3287
+ if (onExited) onExited();
3288
+ setIsModalBehaviourVisible(false);
3296
3289
  },
3297
- children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
3298
- visible: visible,
3299
- onExited: function handleExitAnimationDone() {
3300
- if (onExited) onExited();
3301
- setIsModalBehaviourVisible(false);
3302
- },
3303
- onClose: onClose,
3304
- children: children
3305
- }))
3306
- })
3290
+ onClose: onClose,
3291
+ children: children
3292
+ }))
3307
3293
  });
3308
3294
  }
3309
3295
 
@@ -3318,7 +3304,8 @@ function CardModalBody(_ref) {
3318
3304
  _ref$paddingY = _ref.paddingY,
3319
3305
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
3320
3306
  props = _objectWithoutProperties(_ref, _excluded$E);
3321
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
3307
+ return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
3308
+ showsVerticalScrollIndicator: false,
3322
3309
  paddingX: paddingX,
3323
3310
  paddingY: paddingY
3324
3311
  }, props), {}, {
@@ -3421,6 +3408,7 @@ function CardModal(_ref) {
3421
3408
  width: "100%",
3422
3409
  maxHeight: "100%",
3423
3410
  maxWidth: maxWidth,
3411
+ minHeight: "kitt.cardModal.minHeight",
3424
3412
  children: children || /*#__PURE__*/jsxs(Fragment, {
3425
3413
  children: [header || null, body || null, footer || null]
3426
3414
  })
@@ -8243,7 +8231,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8243
8231
  height: theme.cardModal.header.height
8244
8232
  },
8245
8233
  maxWidth: theme.cardModal.maxWidth,
8246
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
8234
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
8235
+ minHeight: theme.cardModal.minHeight
8247
8236
  },
8248
8237
  dialogModal: {
8249
8238
  maxWidth: theme.dialogModal.maxWidth,
@@ -8354,7 +8343,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8354
8343
  padding: theme.button.padding
8355
8344
  },
8356
8345
  cardModal: {
8357
- overlayPadding: theme.dialogModal.overlayPadding
8346
+ overlayPadding: theme.cardModal.overlayPadding
8358
8347
  },
8359
8348
  dialogModal: {
8360
8349
  overlayPadding: theme.dialogModal.overlayPadding
@@ -9140,28 +9129,20 @@ function KittNativeBaseProvider(_ref) {
9140
9129
  }
9141
9130
 
9142
9131
  var _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
9143
- function SimpleContainer(_ref) {
9144
- var children = _ref.children;
9145
- return children;
9146
- }
9147
- function NavigationModalBehaviour(_ref2) {
9148
- var children = _ref2.children,
9149
- visible = _ref2.visible,
9150
- _ref2$appear = _ref2.appear,
9151
- appear = _ref2$appear === void 0 ? true : _ref2$appear,
9152
- onExited = _ref2.onExited,
9153
- onEnter = _ref2.onEnter,
9154
- onExit = _ref2.onExit,
9155
- onClose = _ref2.onClose,
9156
- props = _objectWithoutProperties(_ref2, _excluded$9);
9132
+ function NavigationModalBehaviour(_ref) {
9133
+ var children = _ref.children,
9134
+ visible = _ref.visible,
9135
+ _ref$appear = _ref.appear,
9136
+ appear = _ref$appear === void 0 ? true : _ref$appear,
9137
+ onExited = _ref.onExited,
9138
+ onEnter = _ref.onEnter,
9139
+ onExit = _ref.onExit,
9140
+ onClose = _ref.onClose,
9141
+ props = _objectWithoutProperties(_ref, _excluded$9);
9157
9142
  var AnimationComponent = useBreakpointValue({
9158
9143
  base: FullscreenModalAnimation,
9159
9144
  small: CardModalAnimation
9160
9145
  });
9161
- var CurrentContainerComponent = useBreakpointValue({
9162
- base: SimpleContainer,
9163
- small: CardModalScrollContainer
9164
- });
9165
9146
  var _useState = useState(visible),
9166
9147
  _useState2 = _slicedToArray(_useState, 2),
9167
9148
  isModalBehaviourVisible = _useState2[0],
@@ -9178,34 +9159,28 @@ function NavigationModalBehaviour(_ref2) {
9178
9159
  return /*#__PURE__*/jsx(ModalBehaviour, {
9179
9160
  visible: isModalBehaviourVisible,
9180
9161
  onClose: onClose,
9181
- children: /*#__PURE__*/jsx(CurrentContainerComponent, {
9182
- bounces: false,
9183
- contentContainerStyle: {
9184
- flexGrow: 1
9185
- },
9186
- children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
9187
- appear: shouldAppear,
9188
- visible: visible,
9189
- onEnter: function handleEnter() {
9190
- if (onEnter) onEnter();
9162
+ children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
9163
+ appear: shouldAppear,
9164
+ visible: visible,
9165
+ onEnter: function handleEnter() {
9166
+ if (onEnter) onEnter();
9191
9167
 
9192
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
9193
- setShouldAppear(false);
9194
- },
9195
- onExit: function handleExit() {
9196
- if (onExit) onExit();
9168
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
9169
+ setShouldAppear(false);
9170
+ },
9171
+ onExit: function handleExit() {
9172
+ if (onExit) onExit();
9197
9173
 
9198
- // Reset appear value to its original value for future modal display
9199
- setShouldAppear(appear);
9200
- },
9201
- onExited: function handleExitAnimationDone() {
9202
- if (onExited) onExited();
9203
- setIsModalBehaviourVisible(false);
9204
- },
9205
- onClose: onClose,
9206
- children: children
9207
- }))
9208
- })
9174
+ // Reset appear value to its original value for future modal display
9175
+ setShouldAppear(appear);
9176
+ },
9177
+ onExited: function handleExitAnimationDone() {
9178
+ if (onExited) onExited();
9179
+ setIsModalBehaviourVisible(false);
9180
+ },
9181
+ onClose: onClose,
9182
+ children: children
9183
+ }))
9209
9184
  });
9210
9185
  }
9211
9186