@ornikar/kitt-universal 22.1.0 → 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 (52) hide show
  1. package/CHANGELOG.md +23 -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/forms/InputEmail/InputEmail.d.ts +1 -1
  10. package/dist/definitions/forms/InputEmail/InputEmail.d.ts.map +1 -1
  11. package/dist/definitions/forms/InputNumber/InputNumber.d.ts +2 -1
  12. package/dist/definitions/forms/InputNumber/InputNumber.d.ts.map +1 -1
  13. package/dist/definitions/forms/InputPhone/InputPhone.d.ts +1 -1
  14. package/dist/definitions/forms/InputPhone/InputPhone.d.ts.map +1 -1
  15. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts +5 -17
  16. package/dist/definitions/native-base/KittNativeBaseProvider.d.ts.map +1 -1
  17. package/dist/definitions/themes/late-ocean/cardModal.d.ts +1 -0
  18. package/dist/definitions/themes/late-ocean/cardModal.d.ts.map +1 -1
  19. package/dist/index-metro.es.android.js +53 -82
  20. package/dist/index-metro.es.android.js.map +1 -1
  21. package/dist/index-metro.es.ios.js +53 -82
  22. package/dist/index-metro.es.ios.js.map +1 -1
  23. package/dist/index-node-18.18.cjs.js +43 -71
  24. package/dist/index-node-18.18.cjs.js.map +1 -1
  25. package/dist/index-node-18.18.cjs.web.js +43 -66
  26. package/dist/index-node-18.18.cjs.web.js.map +1 -1
  27. package/dist/index-node-18.18.es.mjs +44 -72
  28. package/dist/index-node-18.18.es.mjs.map +1 -1
  29. package/dist/index-node-18.18.es.web.mjs +44 -67
  30. package/dist/index-node-18.18.es.web.mjs.map +1 -1
  31. package/dist/index.es.js +63 -90
  32. package/dist/index.es.js.map +1 -1
  33. package/dist/index.es.web.js +63 -85
  34. package/dist/index.es.web.js.map +1 -1
  35. package/dist/linaria-themes-metro.es.android.js +2 -1
  36. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  37. package/dist/linaria-themes-metro.es.ios.js +2 -1
  38. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  39. package/dist/linaria-themes-node-18.18.cjs.js +2 -1
  40. package/dist/linaria-themes-node-18.18.cjs.js.map +1 -1
  41. package/dist/linaria-themes-node-18.18.cjs.web.js +2 -1
  42. package/dist/linaria-themes-node-18.18.cjs.web.js.map +1 -1
  43. package/dist/linaria-themes-node-18.18.es.mjs +2 -1
  44. package/dist/linaria-themes-node-18.18.es.mjs.map +1 -1
  45. package/dist/linaria-themes-node-18.18.es.web.mjs +2 -1
  46. package/dist/linaria-themes-node-18.18.es.web.mjs.map +1 -1
  47. package/dist/linaria-themes.es.js +2 -1
  48. package/dist/linaria-themes.es.js.map +1 -1
  49. package/dist/linaria-themes.es.web.js +2 -1
  50. package/dist/linaria-themes.es.web.js.map +1 -1
  51. package/dist/tsbuildinfo +1 -1
  52. package/package.json +2 -2
@@ -17,7 +17,7 @@ import { CSSTransition } from 'react-transition-group';
17
17
  import { ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, useWindowDimensions } from 'react-native';
18
18
  export { useWindowDimensions as useWindowSize } from 'react-native';
19
19
  import { parse } from 'twemoji-parser';
20
- import { CaretUpFillIcon, CaretDownFillIcon, EyeSlashFillIcon, EyeFillIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
20
+ import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
21
21
  import Downshift, { useSelect } from 'downshift';
22
22
  import { useDebouncedCallback } from 'use-debounce';
23
23
  import { Loader } from '@googlemaps/js-api-loader';
@@ -782,6 +782,7 @@ var cardModal = {
782
782
  borderRadius: 20,
783
783
  maxWidth: maxWidth,
784
784
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
785
+ minHeight: 280,
785
786
  shadow: {
786
787
  color: colors.black,
787
788
  offsetX: 0,
@@ -800,7 +801,7 @@ var cardModal = {
800
801
  },
801
802
  overlayPadding: {
802
803
  horizontal: 24,
803
- vertical: 32
804
+ vertical: 80
804
805
  },
805
806
  animation: {
806
807
  overlay: {
@@ -2317,7 +2318,7 @@ function Icon(_ref) {
2317
2318
  }
2318
2319
 
2319
2320
  var _excluded$L = ["color", "size"],
2320
- _excluded2$7 = ["color"];
2321
+ _excluded2$6 = ["color"];
2321
2322
  function getIconSizeConfigKeyFromTypeName(breakpointName) {
2322
2323
  return breakpointName === KittBreakpointNameEnum.BASE || breakpointName === KittBreakpointNameEnum.SMALL ? 'baseAndSmall' : 'mediumAndWide';
2323
2324
  }
@@ -2359,7 +2360,7 @@ function TypographyIconInheritColor(props) {
2359
2360
  }
2360
2361
  function TypographyIcon(_ref2) {
2361
2362
  var color = _ref2.color,
2362
- props = _objectWithoutProperties(_ref2, _excluded2$7);
2363
+ props = _objectWithoutProperties(_ref2, _excluded2$6);
2363
2364
  if (color) {
2364
2365
  return /*#__PURE__*/jsx(TypographyIconSpecifiedColor, _objectSpread({
2365
2366
  color: color
@@ -3038,7 +3039,11 @@ function CardModalRotationContainer(props) {
3038
3039
  paddingX: "kitt.cardModal.overlayPadding.horizontal",
3039
3040
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3040
3041
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3041
- width: "100%"
3042
+ width: "100%",
3043
+ maxHeight: "100%",
3044
+ _web: {
3045
+ maxHeight: '100svh'
3046
+ }
3042
3047
  }, props));
3043
3048
  }
3044
3049
 
@@ -3114,21 +3119,13 @@ function CardModalAnimation(_ref) {
3114
3119
  }));
3115
3120
  }
3116
3121
 
3117
- var _excluded$F = ["children"],
3118
- _excluded2$6 = ["children", "visible", "onClose", "onExited"];
3119
- function CardModalScrollContainer(_ref) {
3122
+ var _excluded$F = ["children", "visible", "onClose", "onExited"];
3123
+ function CardModalBehaviour(_ref) {
3120
3124
  var children = _ref.children,
3125
+ visible = _ref.visible,
3126
+ onClose = _ref.onClose,
3127
+ onExited = _ref.onExited,
3121
3128
  props = _objectWithoutProperties(_ref, _excluded$F);
3122
- return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({}, props), {}, {
3123
- children: children
3124
- }));
3125
- }
3126
- function CardModalBehaviour(_ref2) {
3127
- var children = _ref2.children,
3128
- visible = _ref2.visible,
3129
- onClose = _ref2.onClose,
3130
- onExited = _ref2.onExited,
3131
- props = _objectWithoutProperties(_ref2, _excluded2$6);
3132
3129
  var _useState = useState(visible),
3133
3130
  _useState2 = _slicedToArray(_useState, 2),
3134
3131
  isModalBehaviourVisible = _useState2[0],
@@ -3141,21 +3138,15 @@ function CardModalBehaviour(_ref2) {
3141
3138
  return /*#__PURE__*/jsx(ModalBehaviour, {
3142
3139
  visible: isModalBehaviourVisible,
3143
3140
  onClose: onClose,
3144
- children: /*#__PURE__*/jsx(CardModalScrollContainer, {
3145
- bounces: false,
3146
- contentContainerStyle: {
3147
- flexGrow: 1
3141
+ children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
3142
+ visible: visible,
3143
+ onExited: function handleExitAnimationDone() {
3144
+ if (onExited) onExited();
3145
+ setIsModalBehaviourVisible(false);
3148
3146
  },
3149
- children: /*#__PURE__*/jsx(CardModalAnimation, _objectSpread(_objectSpread({}, props), {}, {
3150
- visible: visible,
3151
- onExited: function handleExitAnimationDone() {
3152
- if (onExited) onExited();
3153
- setIsModalBehaviourVisible(false);
3154
- },
3155
- onClose: onClose,
3156
- children: children
3157
- }))
3158
- })
3147
+ onClose: onClose,
3148
+ children: children
3149
+ }))
3159
3150
  });
3160
3151
  }
3161
3152
 
@@ -3170,7 +3161,8 @@ function CardModalBody(_ref) {
3170
3161
  _ref$paddingY = _ref.paddingY,
3171
3162
  paddingY = _ref$paddingY === void 0 ? 'kitt.4' : _ref$paddingY,
3172
3163
  props = _objectWithoutProperties(_ref, _excluded$E);
3173
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
3164
+ return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
3165
+ showsVerticalScrollIndicator: false,
3174
3166
  paddingX: paddingX,
3175
3167
  paddingY: paddingY
3176
3168
  }, props), {}, {
@@ -3273,6 +3265,7 @@ function CardModal(_ref) {
3273
3265
  width: "100%",
3274
3266
  maxHeight: "100%",
3275
3267
  maxWidth: maxWidth,
3268
+ minHeight: "kitt.cardModal.minHeight",
3276
3269
  children: children || /*#__PURE__*/jsxs(Fragment, {
3277
3270
  children: [header || null, body || null, footer || null]
3278
3271
  })
@@ -3916,7 +3909,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
3916
3909
  _ref$autoComplete = _ref.autoComplete,
3917
3910
  autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
3918
3911
  _ref$inputMode = _ref.inputMode,
3919
- inputMode = _ref$inputMode === void 0 ? 'none' : _ref$inputMode,
3912
+ inputMode = _ref$inputMode === void 0 ? 'text' : _ref$inputMode,
3920
3913
  multiline = _ref.multiline,
3921
3914
  onSubmitEditing = _ref.onSubmitEditing,
3922
3915
  props = _objectWithoutProperties(_ref, _excluded$u);
@@ -5318,16 +5311,14 @@ function InputField(_ref) {
5318
5311
  });
5319
5312
  }
5320
5313
 
5321
- var _excluded$o = ["onChange", "keyboardType"];
5314
+ var _excluded$o = ["onChange"];
5322
5315
  var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
5323
5316
  var onChange = _ref.onChange,
5324
- _ref$keyboardType = _ref.keyboardType,
5325
- keyboardType = _ref$keyboardType === void 0 ? 'numeric' : _ref$keyboardType,
5326
5317
  props = _objectWithoutProperties(_ref, _excluded$o);
5327
5318
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
5328
5319
  ref: ref
5329
5320
  }, props), {}, {
5330
- keyboardType: keyboardType,
5321
+ inputMode: "numeric",
5331
5322
  onChange: function handleChange(event) {
5332
5323
  if (!onChange) return;
5333
5324
  var value = parseFloat(event.nativeEvent.text);
@@ -5366,7 +5357,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
5366
5357
  });
5367
5358
  },
5368
5359
  children: /*#__PURE__*/jsx(InputIcon, {
5369
- icon: isVisible ? /*#__PURE__*/jsx(EyeSlashFillIcon, {}) : /*#__PURE__*/jsx(EyeFillIcon, {})
5360
+ icon: isVisible ? /*#__PURE__*/jsx(EyeClosedRegularIcon, {}) : /*#__PURE__*/jsx(EyeRegularIcon, {})
5370
5361
  })
5371
5362
  })
5372
5363
  }));
@@ -7540,7 +7531,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7540
7531
  height: theme.cardModal.header.height
7541
7532
  },
7542
7533
  maxWidth: theme.cardModal.maxWidth,
7543
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
7534
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
7535
+ minHeight: theme.cardModal.minHeight
7544
7536
  },
7545
7537
  dialogModal: {
7546
7538
  maxWidth: theme.dialogModal.maxWidth,
@@ -7651,7 +7643,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7651
7643
  padding: theme.button.padding
7652
7644
  },
7653
7645
  cardModal: {
7654
- overlayPadding: theme.dialogModal.overlayPadding
7646
+ overlayPadding: theme.cardModal.overlayPadding
7655
7647
  },
7656
7648
  dialogModal: {
7657
7649
  overlayPadding: theme.dialogModal.overlayPadding
@@ -8482,28 +8474,20 @@ function NativeOnlyFlatList(_ref) {
8482
8474
  }
8483
8475
 
8484
8476
  var _excluded$a = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
8485
- function SimpleContainer(_ref) {
8486
- var children = _ref.children;
8487
- return children;
8488
- }
8489
- function NavigationModalBehaviour(_ref2) {
8490
- var children = _ref2.children,
8491
- visible = _ref2.visible,
8492
- _ref2$appear = _ref2.appear,
8493
- appear = _ref2$appear === void 0 ? true : _ref2$appear,
8494
- onExited = _ref2.onExited,
8495
- onEnter = _ref2.onEnter,
8496
- onExit = _ref2.onExit,
8497
- onClose = _ref2.onClose,
8498
- props = _objectWithoutProperties(_ref2, _excluded$a);
8477
+ function NavigationModalBehaviour(_ref) {
8478
+ var children = _ref.children,
8479
+ visible = _ref.visible,
8480
+ _ref$appear = _ref.appear,
8481
+ appear = _ref$appear === void 0 ? true : _ref$appear,
8482
+ onExited = _ref.onExited,
8483
+ onEnter = _ref.onEnter,
8484
+ onExit = _ref.onExit,
8485
+ onClose = _ref.onClose,
8486
+ props = _objectWithoutProperties(_ref, _excluded$a);
8499
8487
  var AnimationComponent = useBreakpointValue({
8500
8488
  base: FullscreenModalAnimation,
8501
8489
  small: CardModalAnimation
8502
8490
  });
8503
- var CurrentContainerComponent = useBreakpointValue({
8504
- base: SimpleContainer,
8505
- small: CardModalScrollContainer
8506
- });
8507
8491
  var _useState = useState(visible),
8508
8492
  _useState2 = _slicedToArray(_useState, 2),
8509
8493
  isModalBehaviourVisible = _useState2[0],
@@ -8520,34 +8504,28 @@ function NavigationModalBehaviour(_ref2) {
8520
8504
  return /*#__PURE__*/jsx(ModalBehaviour, {
8521
8505
  visible: isModalBehaviourVisible,
8522
8506
  onClose: onClose,
8523
- children: /*#__PURE__*/jsx(CurrentContainerComponent, {
8524
- bounces: false,
8525
- contentContainerStyle: {
8526
- flexGrow: 1
8527
- },
8528
- children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
8529
- appear: shouldAppear,
8530
- visible: visible,
8531
- onEnter: function handleEnter() {
8532
- if (onEnter) onEnter();
8507
+ children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
8508
+ appear: shouldAppear,
8509
+ visible: visible,
8510
+ onEnter: function handleEnter() {
8511
+ if (onEnter) onEnter();
8533
8512
 
8534
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8535
- setShouldAppear(false);
8536
- },
8537
- onExit: function handleExit() {
8538
- if (onExit) onExit();
8513
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8514
+ setShouldAppear(false);
8515
+ },
8516
+ onExit: function handleExit() {
8517
+ if (onExit) onExit();
8539
8518
 
8540
- // Reset appear value to its original value for future modal display
8541
- setShouldAppear(appear);
8542
- },
8543
- onExited: function handleExitAnimationDone() {
8544
- if (onExited) onExited();
8545
- setIsModalBehaviourVisible(false);
8546
- },
8547
- onClose: onClose,
8548
- children: children
8549
- }))
8550
- })
8519
+ // Reset appear value to its original value for future modal display
8520
+ setShouldAppear(appear);
8521
+ },
8522
+ onExited: function handleExitAnimationDone() {
8523
+ if (onExited) onExited();
8524
+ setIsModalBehaviourVisible(false);
8525
+ },
8526
+ onClose: onClose,
8527
+ children: children
8528
+ }))
8551
8529
  });
8552
8530
  }
8553
8531