@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
package/dist/index.es.js CHANGED
@@ -19,7 +19,7 @@ import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints
19
19
  import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
20
20
  import { parse } from 'twemoji-parser';
21
21
  import * as WebBrowser from 'expo-web-browser';
22
- import { CaretUpFillIcon, CaretDownFillIcon, EyeSlashFillIcon, EyeFillIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
22
+ import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
23
23
  import Downshift from 'downshift';
24
24
  import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
25
25
  import { FormattedMessage } from 'react-intl';
@@ -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
  })
@@ -4189,7 +4177,7 @@ var InputText = /*#__PURE__*/forwardRef(function (_ref, ref) {
4189
4177
  _ref$autoComplete = _ref.autoComplete,
4190
4178
  autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
4191
4179
  _ref$inputMode = _ref.inputMode,
4192
- inputMode = _ref$inputMode === void 0 ? 'none' : _ref$inputMode,
4180
+ inputMode = _ref$inputMode === void 0 ? 'text' : _ref$inputMode,
4193
4181
  multiline = _ref.multiline,
4194
4182
  onSubmitEditing = _ref.onSubmitEditing,
4195
4183
  props = _objectWithoutProperties(_ref, _excluded$v);
@@ -5954,16 +5942,14 @@ function InputField(_ref) {
5954
5942
  });
5955
5943
  }
5956
5944
 
5957
- var _excluded$l = ["onChange", "keyboardType"];
5945
+ var _excluded$l = ["onChange"];
5958
5946
  var InputNumber = /*#__PURE__*/forwardRef(function (_ref, ref) {
5959
5947
  var onChange = _ref.onChange,
5960
- _ref$keyboardType = _ref.keyboardType,
5961
- keyboardType = _ref$keyboardType === void 0 ? 'numeric' : _ref$keyboardType,
5962
5948
  props = _objectWithoutProperties(_ref, _excluded$l);
5963
5949
  return /*#__PURE__*/jsx(InputText, _objectSpread(_objectSpread({
5964
5950
  ref: ref
5965
5951
  }, props), {}, {
5966
- keyboardType: keyboardType,
5952
+ inputMode: "numeric",
5967
5953
  onChange: function handleChange(event) {
5968
5954
  if (!onChange) return;
5969
5955
  var value = parseFloat(event.nativeEvent.text);
@@ -6002,7 +5988,7 @@ var InputPassword = /*#__PURE__*/forwardRef(function (_ref, ref) {
6002
5988
  });
6003
5989
  },
6004
5990
  children: /*#__PURE__*/jsx(InputIcon, {
6005
- icon: isVisible ? /*#__PURE__*/jsx(EyeSlashFillIcon, {}) : /*#__PURE__*/jsx(EyeFillIcon, {})
5991
+ icon: isVisible ? /*#__PURE__*/jsx(EyeClosedRegularIcon, {}) : /*#__PURE__*/jsx(EyeRegularIcon, {})
6006
5992
  })
6007
5993
  })
6008
5994
  }));
@@ -8245,7 +8231,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8245
8231
  height: theme.cardModal.header.height
8246
8232
  },
8247
8233
  maxWidth: theme.cardModal.maxWidth,
8248
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
8234
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
8235
+ minHeight: theme.cardModal.minHeight
8249
8236
  },
8250
8237
  dialogModal: {
8251
8238
  maxWidth: theme.dialogModal.maxWidth,
@@ -8356,7 +8343,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8356
8343
  padding: theme.button.padding
8357
8344
  },
8358
8345
  cardModal: {
8359
- overlayPadding: theme.dialogModal.overlayPadding
8346
+ overlayPadding: theme.cardModal.overlayPadding
8360
8347
  },
8361
8348
  dialogModal: {
8362
8349
  overlayPadding: theme.dialogModal.overlayPadding
@@ -9142,28 +9129,20 @@ function KittNativeBaseProvider(_ref) {
9142
9129
  }
9143
9130
 
9144
9131
  var _excluded$9 = ["children", "visible", "appear", "onExited", "onEnter", "onExit", "onClose"];
9145
- function SimpleContainer(_ref) {
9146
- var children = _ref.children;
9147
- return children;
9148
- }
9149
- function NavigationModalBehaviour(_ref2) {
9150
- var children = _ref2.children,
9151
- visible = _ref2.visible,
9152
- _ref2$appear = _ref2.appear,
9153
- appear = _ref2$appear === void 0 ? true : _ref2$appear,
9154
- onExited = _ref2.onExited,
9155
- onEnter = _ref2.onEnter,
9156
- onExit = _ref2.onExit,
9157
- onClose = _ref2.onClose,
9158
- 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);
9159
9142
  var AnimationComponent = useBreakpointValue({
9160
9143
  base: FullscreenModalAnimation,
9161
9144
  small: CardModalAnimation
9162
9145
  });
9163
- var CurrentContainerComponent = useBreakpointValue({
9164
- base: SimpleContainer,
9165
- small: CardModalScrollContainer
9166
- });
9167
9146
  var _useState = useState(visible),
9168
9147
  _useState2 = _slicedToArray(_useState, 2),
9169
9148
  isModalBehaviourVisible = _useState2[0],
@@ -9180,34 +9159,28 @@ function NavigationModalBehaviour(_ref2) {
9180
9159
  return /*#__PURE__*/jsx(ModalBehaviour, {
9181
9160
  visible: isModalBehaviourVisible,
9182
9161
  onClose: onClose,
9183
- children: /*#__PURE__*/jsx(CurrentContainerComponent, {
9184
- bounces: false,
9185
- contentContainerStyle: {
9186
- flexGrow: 1
9187
- },
9188
- children: /*#__PURE__*/jsx(AnimationComponent, _objectSpread(_objectSpread({}, props), {}, {
9189
- appear: shouldAppear,
9190
- visible: visible,
9191
- onEnter: function handleEnter() {
9192
- 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();
9193
9167
 
9194
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
9195
- setShouldAppear(false);
9196
- },
9197
- onExit: function handleExit() {
9198
- 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();
9199
9173
 
9200
- // Reset appear value to its original value for future modal display
9201
- setShouldAppear(appear);
9202
- },
9203
- onExited: function handleExitAnimationDone() {
9204
- if (onExited) onExited();
9205
- setIsModalBehaviourVisible(false);
9206
- },
9207
- onClose: onClose,
9208
- children: children
9209
- }))
9210
- })
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
+ }))
9211
9184
  });
9212
9185
  }
9213
9186