@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
@@ -769,6 +769,7 @@ const cardModal = {
769
769
  borderRadius: 20,
770
770
  maxWidth,
771
771
  maxWidthWithPadding: maxWidth + overlayHorizontalPadding * 2,
772
+ minHeight: 280,
772
773
  shadow: {
773
774
  color: colors.black,
774
775
  offsetX: 0,
@@ -787,7 +788,7 @@ const cardModal = {
787
788
  },
788
789
  overlayPadding: {
789
790
  horizontal: 24,
790
- vertical: 32
791
+ vertical: 80
791
792
  },
792
793
  animation: {
793
794
  overlay: {
@@ -3010,6 +3011,10 @@ function CardModalRotationContainer(props) {
3010
3011
  paddingY: "kitt.cardModal.overlayPadding.vertical",
3011
3012
  maxWidth: "kitt.cardModal.maxWidthWithPadding",
3012
3013
  width: "100%",
3014
+ maxHeight: "100%",
3015
+ _web: {
3016
+ maxHeight: '100svh'
3017
+ },
3013
3018
  ...props
3014
3019
  });
3015
3020
  }
@@ -3088,15 +3093,6 @@ function CardModalAnimation({
3088
3093
  });
3089
3094
  }
3090
3095
 
3091
- function CardModalScrollContainer({
3092
- children,
3093
- ...props
3094
- }) {
3095
- return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
3096
- ...props,
3097
- children: children
3098
- });
3099
- }
3100
3096
  function CardModalBehaviour({
3101
3097
  children,
3102
3098
  visible,
@@ -3113,21 +3109,15 @@ function CardModalBehaviour({
3113
3109
  return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
3114
3110
  visible: isModalBehaviourVisible,
3115
3111
  onClose: onClose,
3116
- children: /*#__PURE__*/jsxRuntime.jsx(CardModalScrollContainer, {
3117
- bounces: false,
3118
- contentContainerStyle: {
3119
- flexGrow: 1
3112
+ children: /*#__PURE__*/jsxRuntime.jsx(CardModalAnimation, {
3113
+ ...props,
3114
+ visible: visible,
3115
+ onExited: () => {
3116
+ if (onExited) onExited();
3117
+ setIsModalBehaviourVisible(false);
3120
3118
  },
3121
- children: /*#__PURE__*/jsxRuntime.jsx(CardModalAnimation, {
3122
- ...props,
3123
- visible: visible,
3124
- onExited: () => {
3125
- if (onExited) onExited();
3126
- setIsModalBehaviourVisible(false);
3127
- },
3128
- onClose: onClose,
3129
- children: children
3130
- })
3119
+ onClose: onClose,
3120
+ children: children
3131
3121
  })
3132
3122
  });
3133
3123
  }
@@ -3141,7 +3131,8 @@ function CardModalBody({
3141
3131
  paddingY = 'kitt.4',
3142
3132
  ...props
3143
3133
  }) {
3144
- return /*#__PURE__*/jsxRuntime.jsx(View, {
3134
+ return /*#__PURE__*/jsxRuntime.jsx(ScrollView, {
3135
+ showsVerticalScrollIndicator: false,
3145
3136
  paddingX: paddingX,
3146
3137
  paddingY: paddingY,
3147
3138
  ...props,
@@ -3241,6 +3232,7 @@ function CardModal({
3241
3232
  width: "100%",
3242
3233
  maxHeight: "100%",
3243
3234
  maxWidth: maxWidth,
3235
+ minHeight: "kitt.cardModal.minHeight",
3244
3236
  children: children || /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
3245
3237
  children: [header || null, body || null, footer || null]
3246
3238
  })
@@ -3844,7 +3836,7 @@ const InputText = /*#__PURE__*/react.forwardRef(({
3844
3836
  autoCorrect = true,
3845
3837
  textContentType = 'none',
3846
3838
  autoComplete = 'off',
3847
- inputMode = 'none',
3839
+ inputMode = 'text',
3848
3840
  multiline,
3849
3841
  onSubmitEditing,
3850
3842
  ...props
@@ -5180,13 +5172,12 @@ function InputField({
5180
5172
 
5181
5173
  const InputNumber = /*#__PURE__*/react.forwardRef(({
5182
5174
  onChange,
5183
- keyboardType = 'numeric',
5184
5175
  ...props
5185
5176
  }, ref) => {
5186
5177
  return /*#__PURE__*/jsxRuntime.jsx(InputText, {
5187
5178
  ref: ref,
5188
5179
  ...props,
5189
- keyboardType: keyboardType,
5180
+ inputMode: "numeric",
5190
5181
  onChange: event => {
5191
5182
  if (!onChange) return;
5192
5183
  const value = parseFloat(event.nativeEvent.text);
@@ -5218,7 +5209,7 @@ const InputPassword = /*#__PURE__*/react.forwardRef(({
5218
5209
  accessibilityRole: "button",
5219
5210
  onPress: () => setIsVisible(prev => !prev),
5220
5211
  children: /*#__PURE__*/jsxRuntime.jsx(InputIcon, {
5221
- icon: isVisible ? /*#__PURE__*/jsxRuntime.jsx(phosphor.EyeSlashFillIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(phosphor.EyeFillIcon, {})
5212
+ icon: isVisible ? /*#__PURE__*/jsxRuntime.jsx(phosphor.EyeClosedRegularIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(phosphor.EyeRegularIcon, {})
5222
5213
  })
5223
5214
  })
5224
5215
  });
@@ -7415,7 +7406,8 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7415
7406
  height: theme.cardModal.header.height
7416
7407
  },
7417
7408
  maxWidth: theme.cardModal.maxWidth,
7418
- maxWidthWithPadding: theme.cardModal.maxWidthWithPadding
7409
+ maxWidthWithPadding: theme.cardModal.maxWidthWithPadding,
7410
+ minHeight: theme.cardModal.minHeight
7419
7411
  },
7420
7412
  dialogModal: {
7421
7413
  maxWidth: theme.dialogModal.maxWidth,
@@ -7529,7 +7521,7 @@ function createKittNativeBaseCustomTheme(theme, appTheme) {
7529
7521
  padding: theme.button.padding
7530
7522
  },
7531
7523
  cardModal: {
7532
- overlayPadding: theme.dialogModal.overlayPadding
7524
+ overlayPadding: theme.cardModal.overlayPadding
7533
7525
  },
7534
7526
  dialogModal: {
7535
7527
  overlayPadding: theme.dialogModal.overlayPadding
@@ -8354,11 +8346,6 @@ function NativeOnlyFlatList({
8354
8346
  });
8355
8347
  }
8356
8348
 
8357
- function SimpleContainer({
8358
- children
8359
- }) {
8360
- return children;
8361
- }
8362
8349
  function NavigationModalBehaviour({
8363
8350
  children,
8364
8351
  visible,
@@ -8373,10 +8360,6 @@ function NavigationModalBehaviour({
8373
8360
  base: FullscreenModalAnimation,
8374
8361
  small: CardModalAnimation
8375
8362
  });
8376
- const CurrentContainerComponent = useBreakpointValue({
8377
- base: SimpleContainer,
8378
- small: CardModalScrollContainer
8379
- });
8380
8363
  const [isModalBehaviourVisible, setIsModalBehaviourVisible] = react.useState(visible);
8381
8364
  const [shouldAppear, setShouldAppear] = react.useState(appear);
8382
8365
  react.useEffect(() => {
@@ -8387,34 +8370,28 @@ function NavigationModalBehaviour({
8387
8370
  return /*#__PURE__*/jsxRuntime.jsx(ModalBehaviour, {
8388
8371
  visible: isModalBehaviourVisible,
8389
8372
  onClose: onClose,
8390
- children: /*#__PURE__*/jsxRuntime.jsx(CurrentContainerComponent, {
8391
- bounces: false,
8392
- contentContainerStyle: {
8393
- flexGrow: 1
8394
- },
8395
- children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
8396
- ...props,
8397
- appear: shouldAppear,
8398
- visible: visible,
8399
- onEnter: () => {
8400
- if (onEnter) onEnter();
8373
+ children: /*#__PURE__*/jsxRuntime.jsx(AnimationComponent, {
8374
+ ...props,
8375
+ appear: shouldAppear,
8376
+ visible: visible,
8377
+ onEnter: () => {
8378
+ if (onEnter) onEnter();
8401
8379
 
8402
- // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8403
- setShouldAppear(false);
8404
- },
8405
- onExit: () => {
8406
- if (onExit) onExit();
8380
+ // Once a children as been displayed, we force appear to false in order to avoid replaying animation on breakpoint change
8381
+ setShouldAppear(false);
8382
+ },
8383
+ onExit: () => {
8384
+ if (onExit) onExit();
8407
8385
 
8408
- // Reset appear value to its original value for future modal display
8409
- setShouldAppear(appear);
8410
- },
8411
- onExited: () => {
8412
- if (onExited) onExited();
8413
- setIsModalBehaviourVisible(false);
8414
- },
8415
- onClose: onClose,
8416
- children: children
8417
- })
8386
+ // Reset appear value to its original value for future modal display
8387
+ setShouldAppear(appear);
8388
+ },
8389
+ onExited: () => {
8390
+ if (onExited) onExited();
8391
+ setIsModalBehaviourVisible(false);
8392
+ },
8393
+ onClose: onClose,
8394
+ children: children
8418
8395
  })
8419
8396
  });
8420
8397
  }