@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
@@ -11,7 +11,7 @@ import { BottomSheetScrollView, BottomSheetView, useBottomSheetDynamicSnapPoints
11
11
  import { SafeAreaView, useSafeAreaInsets } from 'react-native-safe-area-context';
12
12
  import { parse } from 'twemoji-parser';
13
13
  import * as WebBrowser from 'expo-web-browser';
14
- import { CaretUpFillIcon, CaretDownFillIcon, EyeSlashFillIcon, EyeFillIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
14
+ import { CaretUpFillIcon, CaretDownFillIcon, EyeClosedRegularIcon, EyeRegularIcon, XRegularIcon } from '@ornikar/kitt-icons/phosphor';
15
15
  import Downshift from 'downshift';
16
16
  import DateTimePicker, { DateTimePickerAndroid } from '@react-native-community/datetimepicker';
17
17
  import { FormattedMessage } from 'react-intl';
@@ -768,6 +768,7 @@ const cardModal = {
768
768
  borderRadius: 20,
769
769
  maxWidth,
770
770
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
771
+ minHeight: 280,
771
772
  shadow: {
772
773
  color: colors.black,
773
774
  offsetX: 0,
@@ -786,7 +787,7 @@ const cardModal = {
786
787
  },
787
788
  overlayPadding: {
788
789
  horizontal: 24,
789
- vertical: 32
790
+ vertical: 80
790
791
  },
791
792
  animation: {
792
793
  overlay: {
@@ -3066,6 +3067,10 @@ function CardModalRotationContainer(props) {
3066
3067
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3067
3068
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3068
3069
  width: "100%",
3070
+ maxHeight: "100%",
3071
+ _web: {
3072
+ maxHeight: '100svh'
3073
+ },
3069
3074
  ...props
3070
3075
  });
3071
3076
  }
@@ -3212,20 +3217,6 @@ function CardModalAnimation({
3212
3217
  });
3213
3218
  }
3214
3219
 
3215
- function CardModalScrollContainer({
3216
- children,
3217
- ...props
3218
- }) {
3219
- if (Platform.OS !== 'web') {
3220
- return /*#__PURE__*/jsx(View, {
3221
- children: children
3222
- });
3223
- }
3224
- return /*#__PURE__*/jsx(ScrollView, {
3225
- ...props,
3226
- children: children
3227
- });
3228
- }
3229
3220
  function CardModalBehaviour({
3230
3221
  children,
3231
3222
  visible,
@@ -3242,21 +3233,15 @@ function CardModalBehaviour({
3242
3233
  return /*#__PURE__*/jsx(ModalBehaviour, {
3243
3234
  visible: isModalBehaviourVisible,
3244
3235
  onClose: onClose,
3245
- children: /*#__PURE__*/jsx(CardModalScrollContainer, {
3246
- bounces: false,
3247
- contentContainerStyle: {
3248
- flexGrow: 1
3236
+ children: /*#__PURE__*/jsx(CardModalAnimation, {
3237
+ ...props,
3238
+ visible: visible,
3239
+ onExited: () => {
3240
+ if (onExited) onExited();
3241
+ setIsModalBehaviourVisible(false);
3249
3242
  },
3250
- children: /*#__PURE__*/jsx(CardModalAnimation, {
3251
- ...props,
3252
- visible: visible,
3253
- onExited: () => {
3254
- if (onExited) onExited();
3255
- setIsModalBehaviourVisible(false);
3256
- },
3257
- onClose: onClose,
3258
- children: children
3259
- })
3243
+ onClose: onClose,
3244
+ children: children
3260
3245
  })
3261
3246
  });
3262
3247
  }
@@ -3270,7 +3255,8 @@ function CardModalBody({
3270
3255
  paddingY = 'kitt.4',
3271
3256
  ...props
3272
3257
  }) {
3273
- return /*#__PURE__*/jsx(View, {
3258
+ return /*#__PURE__*/jsx(ScrollView, {
3259
+ showsVerticalScrollIndicator: false,
3274
3260
  paddingX: paddingX,
3275
3261
  paddingY: paddingY,
3276
3262
  ...props,
@@ -3370,6 +3356,7 @@ function CardModal({
3370
3356
  width: "100%",
3371
3357
  maxHeight: "100%",
3372
3358
  maxWidth: maxWidth,
3359
+ minHeight: "kitt.cardModal.minHeight",
3373
3360
  children: children || /*#__PURE__*/jsxs(Fragment, {
3374
3361
  children: [header || null, body || null, footer || null]
3375
3362
  })
@@ -4082,7 +4069,7 @@ const InputText = /*#__PURE__*/forwardRef(({
4082
4069
  autoCorrect = true,
4083
4070
  textContentType = 'none',
4084
4071
  autoComplete = 'off',
4085
- inputMode = 'none',
4072
+ inputMode = 'text',
4086
4073
  multiline,
4087
4074
  onSubmitEditing,
4088
4075
  ...props
@@ -5745,13 +5732,12 @@ function InputField({
5745
5732
 
5746
5733
  const InputNumber = /*#__PURE__*/forwardRef(({
5747
5734
  onChange,
5748
- keyboardType = 'numeric',
5749
5735
  ...props
5750
5736
  }, ref) => {
5751
5737
  return /*#__PURE__*/jsx(InputText, {
5752
5738
  ref: ref,
5753
5739
  ...props,
5754
- keyboardType: keyboardType,
5740
+ inputMode: "numeric",
5755
5741
  onChange: event => {
5756
5742
  if (!onChange) return;
5757
5743
  const value = parseFloat(event.nativeEvent.text);
@@ -5783,7 +5769,7 @@ const InputPassword = /*#__PURE__*/forwardRef(({
5783
5769
  accessibilityRole: "button",
5784
5770
  onPress: () => setIsVisible(prev => !prev),
5785
5771
  children: /*#__PURE__*/jsx(InputIcon, {
5786
- icon: isVisible ? /*#__PURE__*/jsx(EyeSlashFillIcon, {}) : /*#__PURE__*/jsx(EyeFillIcon, {})
5772
+ icon: isVisible ? /*#__PURE__*/jsx(EyeClosedRegularIcon, {}) : /*#__PURE__*/jsx(EyeRegularIcon, {})
5787
5773
  })
5788
5774
  })
5789
5775
  });
@@ -8037,7 +8023,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8037
8023
  height: theme.cardModal.header.height
8038
8024
  },
8039
8025
  maxWidth: theme.cardModal.maxWidth,
8040
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
8026
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
8027
+ minHeight: theme.cardModal.minHeight
8041
8028
  },
8042
8029
  dialogModal: {
8043
8030
  maxWidth: theme.dialogModal.maxWidth,
@@ -8151,7 +8138,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
8151
8138
  padding: theme.button.padding
8152
8139
  },
8153
8140
  cardModal: {
8154
- overlayPadding: theme.dialogModal.overlayPadding
8141
+ overlayPadding: theme.cardModal.overlayPadding
8155
8142
  },
8156
8143
  dialogModal: {
8157
8144
  overlayPadding: theme.dialogModal.overlayPadding
@@ -8936,11 +8923,6 @@ function KittNativeBaseProvider({
8936
8923
  });
8937
8924
  }
8938
8925
 
8939
- function SimpleContainer({
8940
- children
8941
- }) {
8942
- return children;
8943
- }
8944
8926
  function NavigationModalBehaviour({
8945
8927
  children,
8946
8928
  visible,
@@ -8955,10 +8937,6 @@ function NavigationModalBehaviour({
8955
8937
  base: FullscreenModalAnimation,
8956
8938
  small: CardModalAnimation
8957
8939
  });
8958
- const CurrentContainerComponent = useBreakpointValue({
8959
- base: SimpleContainer,
8960
- small: CardModalScrollContainer
8961
- });
8962
8940
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = useState(visible);
8963
8941
  const [shouldAppear, setShouldAppear] = useState(appear);
8964
8942
  useEffect(() => {
@@ -8969,34 +8947,28 @@ function NavigationModalBehaviour({
8969
8947
  return /*#__PURE__*/jsx(ModalBehaviour, {
8970
8948
  visible: isModalBehaviourVisible,
8971
8949
  onClose: onClose,
8972
- children: /*#__PURE__*/jsx(CurrentContainerComponent, {
8973
- bounces: false,
8974
- contentContainerStyle: {
8975
- flexGrow: 1
8976
- },
8977
- children: /*#__PURE__*/jsx(AnimationComponent, {
8978
- ...props,
8979
- appear: shouldAppear,
8980
- visible: visible,
8981
- onEnter: () => {
8982
- if (onEnter) onEnter();
8950
+ children: /*#__PURE__*/jsx(AnimationComponent, {
8951
+ ...props,
8952
+ appear: shouldAppear,
8953
+ visible: visible,
8954
+ onEnter: () => {
8955
+ if (onEnter) onEnter();
8983
8956
 
8984
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8985
- setShouldAppear(false);
8986
- },
8987
- onExit: () => {
8988
- if (onExit) onExit();
8957
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8958
+ setShouldAppear(false);
8959
+ },
8960
+ onExit: () => {
8961
+ if (onExit) onExit();
8989
8962
 
8990
- // Reset appear value to its original value for future modal display
8991
- setShouldAppear(appear);
8992
- },
8993
- onExited: () => {
8994
- if (onExited) onExited();
8995
- setIsModalBehaviourVisible(false);
8996
- },
8997
- onClose: onClose,
8998
- children: children
8999
- })
8963
+ // Reset appear value to its original value for future modal display
8964
+ setShouldAppear(appear);
8965
+ },
8966
+ onExited: () => {
8967
+ if (onExited) onExited();
8968
+ setIsModalBehaviourVisible(false);
8969
+ },
8970
+ onClose: onClose,
8971
+ children: children
9000
8972
  })
9001
8973
  });
9002
8974
  }