@ornikar/kitt-universal 32.2.1-canary.b6a558c2a534e5d22cad1dfac7725ddeca489e44.0 → 32.3.1-canary.e5e3462569f2f32f91e8d06437eb0642c84cb55f.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 (51) hide show
  1. package/CHANGELOG.md +11 -2
  2. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts +2 -1
  3. package/dist/definitions/Choices/AnimatedChoiceItemView.d.ts.map +1 -1
  4. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts +1 -1
  5. package/dist/definitions/Choices/AnimatedChoiceItemView.web.d.ts.map +1 -1
  6. package/dist/definitions/Choices/ChoiceItem.d.ts +2 -1
  7. package/dist/definitions/Choices/ChoiceItem.d.ts.map +1 -1
  8. package/dist/definitions/Choices/ChoiceItemContainer.d.ts +2 -1
  9. package/dist/definitions/Choices/ChoiceItemContainer.d.ts.map +1 -1
  10. package/dist/definitions/Choices/Choices.d.ts +5 -5
  11. package/dist/definitions/Choices/Choices.d.ts.map +1 -1
  12. package/dist/definitions/FullscreenModal/FullscreenModalAnimation.web.d.ts.map +1 -1
  13. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts +0 -14
  14. package/dist/definitions/themes/late-ocean/fullscreenModal.d.ts.map +1 -1
  15. package/dist/index-metro.es.android.js +69 -48
  16. package/dist/index-metro.es.android.js.map +1 -1
  17. package/dist/index-metro.es.ios.js +69 -48
  18. package/dist/index-metro.es.ios.js.map +1 -1
  19. package/dist/index-node-22.17.cjs.js +70 -46
  20. package/dist/index-node-22.17.cjs.js.map +1 -1
  21. package/dist/index-node-22.17.cjs.web.css +38 -8
  22. package/dist/index-node-22.17.cjs.web.js +135 -104
  23. package/dist/index-node-22.17.cjs.web.js.map +1 -1
  24. package/dist/index-node-22.17.es.mjs +71 -47
  25. package/dist/index-node-22.17.es.mjs.map +1 -1
  26. package/dist/index-node-22.17.es.web.css +38 -8
  27. package/dist/index-node-22.17.es.web.mjs +136 -105
  28. package/dist/index-node-22.17.es.web.mjs.map +1 -1
  29. package/dist/index.es.js +72 -48
  30. package/dist/index.es.js.map +1 -1
  31. package/dist/index.es.web.js +135 -104
  32. package/dist/index.es.web.js.map +1 -1
  33. package/dist/linaria-themes-metro.es.android.js +34 -38
  34. package/dist/linaria-themes-metro.es.android.js.map +1 -1
  35. package/dist/linaria-themes-metro.es.ios.js +34 -38
  36. package/dist/linaria-themes-metro.es.ios.js.map +1 -1
  37. package/dist/linaria-themes-node-22.17.cjs.js +34 -38
  38. package/dist/linaria-themes-node-22.17.cjs.js.map +1 -1
  39. package/dist/linaria-themes-node-22.17.cjs.web.js +34 -38
  40. package/dist/linaria-themes-node-22.17.cjs.web.js.map +1 -1
  41. package/dist/linaria-themes-node-22.17.es.mjs +34 -38
  42. package/dist/linaria-themes-node-22.17.es.mjs.map +1 -1
  43. package/dist/linaria-themes-node-22.17.es.web.mjs +34 -38
  44. package/dist/linaria-themes-node-22.17.es.web.mjs.map +1 -1
  45. package/dist/linaria-themes.es.js +34 -38
  46. package/dist/linaria-themes.es.js.map +1 -1
  47. package/dist/linaria-themes.es.web.js +34 -38
  48. package/dist/linaria-themes.es.web.js.map +1 -1
  49. package/dist/styles.css +38 -8
  50. package/dist/tsbuildinfo +1 -1
  51. package/package.json +1 -1
@@ -7,7 +7,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
8
8
  import _extends from '@babel/runtime/helpers/extends';
9
9
  import Animated, { useSharedValue, useAnimatedStyle, interpolateColor, withSpring, withTiming, Easing as Easing$1, runOnJS, useDerivedValue, useAnimatedProps, withDelay, withRepeat, interpolate, ReducedMotionConfig, ReduceMotion } from 'react-native-reanimated';
10
- import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, ScrollView as ScrollView$2, View as View$2, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, PixelRatio } from 'react-native';
10
+ import { Platform, Animated as Animated$1, Easing, StyleSheet, Modal, Linking, Pressable as Pressable$2, Keyboard, Text as Text$1, useWindowDimensions, ScrollView as ScrollView$2, PixelRatio } from 'react-native';
11
11
  export { useWindowDimensions as useWindowSize } from 'react-native';
12
12
  import { SpinnerGapRegularIcon, UserRegularIcon, XRegularIcon, ArrowLeftRegularIcon, CaretUpFillIcon, CaretDownFillIcon, MapPinRegularIcon, EyeClosedRegularIcon, EyeRegularIcon, CheckCircleFillIcon, CaretDownRegularIcon, CaretRightRegularIcon, InfoRegularIcon, WarningRegularIcon, CheckRegularIcon, WarningCircleRegularIcon, ArrowCounterClockwiseRegularIcon, InfoFillIcon, WarningCircleFillIcon, WarningFillIcon } from '@ornikar/kitt-icons/phosphor';
13
13
  import { BottomSheetView, BottomSheetScrollView, BottomSheetSectionList, BottomSheetFlatList, BottomSheetHandle, BottomSheetBackdrop, BottomSheetFooter, BottomSheetTextInput, BottomSheetModal, useBottomSheetModal } from '@gorhom/bottom-sheet';
@@ -860,15 +860,15 @@ const card = {
860
860
  }
861
861
  };
862
862
 
863
- const webAnimationContentDuration$2 = 400;
864
- const webAnimationContentEasing$2 = {
863
+ const webAnimationContentDuration$1 = 400;
864
+ const webAnimationContentEasing$1 = {
865
865
  x1: 0.77,
866
866
  y1: 0,
867
867
  x2: 0.175,
868
868
  y2: 1
869
869
  };
870
- const webAnimationOverlayDuration$2 = 250;
871
- const webAnimationOverlayEasing$2 = {
870
+ const webAnimationOverlayDuration$1 = 250;
871
+ const webAnimationOverlayEasing$1 = {
872
872
  x1: 0.42,
873
873
  y1: 0,
874
874
  x2: 1,
@@ -903,12 +903,12 @@ const cardModal = {
903
903
  },
904
904
  animation: {
905
905
  overlay: {
906
- duration: webAnimationOverlayDuration$2,
907
- easing: webAnimationOverlayEasing$2
906
+ duration: webAnimationOverlayDuration$1,
907
+ easing: webAnimationOverlayEasing$1
908
908
  },
909
909
  content: {
910
- duration: webAnimationContentDuration$2,
911
- easing: webAnimationContentEasing$2
910
+ duration: webAnimationContentDuration$1,
911
+ easing: webAnimationContentEasing$1
912
912
  }
913
913
  }
914
914
  };
@@ -964,15 +964,15 @@ const choices = {
964
964
  }
965
965
  };
966
966
 
967
- const webAnimationContentDuration$1 = 400;
968
- const webAnimationContentEasing$1 = {
967
+ const webAnimationContentDuration = 400;
968
+ const webAnimationContentEasing = {
969
969
  x1: 0.77,
970
970
  y1: 0,
971
971
  x2: 0.175,
972
972
  y2: 1
973
973
  };
974
- const webAnimationOverlayDuration$1 = 250;
975
- const webAnimationOverlayEasing$1 = {
974
+ const webAnimationOverlayDuration = 250;
975
+ const webAnimationOverlayEasing = {
976
976
  x1: 0.42,
977
977
  y1: 0,
978
978
  x2: 1,
@@ -994,12 +994,12 @@ const dialogModal = {
994
994
  },
995
995
  animation: {
996
996
  overlay: {
997
- duration: webAnimationOverlayDuration$1,
998
- easing: webAnimationOverlayEasing$1
997
+ duration: webAnimationOverlayDuration,
998
+ easing: webAnimationOverlayEasing
999
999
  },
1000
1000
  content: {
1001
- duration: webAnimationContentDuration$1,
1002
- easing: webAnimationContentEasing$1
1001
+ duration: webAnimationContentDuration,
1002
+ easing: webAnimationContentEasing
1003
1003
  }
1004
1004
  }
1005
1005
  };
@@ -1057,10 +1057,10 @@ const autocomplete = {
1057
1057
  };
1058
1058
 
1059
1059
  const checkbox = {
1060
- borderWidth: 1,
1061
- borderRadius: 4,
1062
- height: 24,
1063
- width: 24,
1060
+ borderWidth: 2,
1061
+ borderRadius: 5,
1062
+ height: 20,
1063
+ width: 20,
1064
1064
  iconSize: 14,
1065
1065
  markColor: colors.uiBackgroundLight,
1066
1066
  textSpacing: 10,
@@ -1908,20 +1908,6 @@ const forms = {
1908
1908
  timePicker
1909
1909
  };
1910
1910
 
1911
- const webAnimationContentDuration = 600;
1912
- const webAnimationContentEasing = {
1913
- x1: 0.77,
1914
- y1: 0,
1915
- x2: 0.175,
1916
- y2: 1
1917
- };
1918
- const webAnimationOverlayDuration = 250;
1919
- const webAnimationOverlayEasing = {
1920
- x1: 0.42,
1921
- y1: 0,
1922
- x2: 1,
1923
- y2: 1
1924
- };
1925
1911
  const fullscreenModal = {
1926
1912
  header: {
1927
1913
  height: 56
@@ -1935,12 +1921,22 @@ const fullscreenModal = {
1935
1921
  },
1936
1922
  animation: {
1937
1923
  overlay: {
1938
- duration: webAnimationOverlayDuration,
1939
- easing: webAnimationOverlayEasing
1924
+ duration: 250,
1925
+ easing: {
1926
+ x1: 0.42,
1927
+ y1: 0,
1928
+ x2: 1,
1929
+ y2: 1
1930
+ }
1940
1931
  },
1941
1932
  content: {
1942
- duration: webAnimationContentDuration,
1943
- easing: webAnimationContentEasing
1933
+ duration: 600,
1934
+ easing: {
1935
+ x1: 0.77,
1936
+ y1: 0,
1937
+ x2: 0.175,
1938
+ y2: 1
1939
+ }
1944
1940
  }
1945
1941
  }
1946
1942
  };
@@ -4811,6 +4807,7 @@ function AnimatedChoiceItemView({
4811
4807
  isDisabled,
4812
4808
  isSelected,
4813
4809
  hasError,
4810
+ shouldExpand = false,
4814
4811
  animatedStyles
4815
4812
  }) {
4816
4813
  const sx = useSx();
@@ -4829,7 +4826,9 @@ function AnimatedChoiceItemView({
4829
4826
  isHovered,
4830
4827
  isPressed
4831
4828
  }),
4832
- padding: size === 'small' ? 'kitt.2' : 'kitt.4'
4829
+ padding: size === 'small' ? 'kitt.2' : 'kitt.4',
4830
+ flexGrow: shouldExpand ? 1 : undefined,
4831
+ flexShrink: shouldExpand ? 1 : undefined
4833
4832
  });
4834
4833
  return /*#__PURE__*/jsx(Animated.View, {
4835
4834
  style: [style, animatedStyles],
@@ -4893,6 +4892,7 @@ function ChoiceItem({
4893
4892
  value,
4894
4893
  selected,
4895
4894
  disabled,
4895
+ shouldExpand = false,
4896
4896
  children,
4897
4897
  isPressedInternal,
4898
4898
  isHoveredInternal,
@@ -4932,6 +4932,8 @@ function ChoiceItem({
4932
4932
  checked: selected
4933
4933
  },
4934
4934
  style: style,
4935
+ flexGrow: shouldExpand ? 1 : undefined,
4936
+ flexShrink: shouldExpand ? 1 : undefined,
4935
4937
  onBlur: onBlur,
4936
4938
  onFocus: onFocus,
4937
4939
  onPress: e => {
@@ -4951,6 +4953,8 @@ function ChoiceItem({
4951
4953
  });
4952
4954
  return /*#__PURE__*/jsxs(VStack, {
4953
4955
  space: "kitt.2",
4956
+ flexGrow: shouldExpand ? 1 : undefined,
4957
+ flexShrink: shouldExpand ? 1 : undefined,
4954
4958
  children: [/*#__PURE__*/jsxs(AnimatedChoiceItemView, {
4955
4959
  animatedStyles: backgroundStyles,
4956
4960
  isHovered: isHovered || isHoveredInternal,
@@ -4958,10 +4962,13 @@ function ChoiceItem({
4958
4962
  isSelected: selected,
4959
4963
  isPressed: isPressed || isPressedInternal,
4960
4964
  hasError: hasError,
4965
+ shouldExpand: shouldExpand,
4961
4966
  size: size,
4962
4967
  children: [/*#__PURE__*/jsxs(Stack, {
4963
4968
  alignItems: "center",
4964
4969
  space: "kitt.2",
4970
+ flexGrow: shouldExpand ? 1 : undefined,
4971
+ flexShrink: shouldExpand ? 1 : undefined,
4965
4972
  children: [icon ? /*#__PURE__*/jsx(TypographyIcon, {
4966
4973
  color: textColor,
4967
4974
  icon: icon
@@ -4990,36 +4997,46 @@ function ChoiceItem({
4990
4997
  function ChoiceItemContainer({
4991
4998
  children,
4992
4999
  direction,
5000
+ shouldExpand,
4993
5001
  isLast
4994
5002
  }) {
4995
5003
  const currentItemMarginValue = isLast ? undefined : 'kitt.3';
4996
- const flexProps = direction === 'row' ? {
5004
+ const directionFlexProps = direction === 'row' ? {
4997
5005
  flexGrow: 1,
4998
5006
  flexShrink: 1,
4999
5007
  flexBasis: 0
5000
5008
  } : {};
5001
- return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({
5009
+ const shouldExpandFlexProps = shouldExpand ? {
5010
+ flexGrow: 1,
5011
+ flexShrink: 1
5012
+ } : {};
5013
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread(_objectSpread({
5002
5014
  marginRight: direction === 'row' ? currentItemMarginValue : undefined,
5003
5015
  marginBottom: direction === 'column' ? currentItemMarginValue : undefined
5004
- }, flexProps), {}, {
5016
+ }, directionFlexProps), shouldExpandFlexProps), {}, {
5005
5017
  children: children
5006
5018
  }));
5007
5019
  }
5008
5020
 
5009
- const _excluded$G = ["direction", "contentContainerStyle"];
5021
+ const _excluded$G = ["direction", "shouldExpand", "contentContainerStyle"];
5010
5022
  function ChoicesContainer(_ref) {
5011
5023
  let {
5012
5024
  direction,
5025
+ shouldExpand,
5013
5026
  contentContainerStyle
5014
5027
  } = _ref,
5015
5028
  props = _objectWithoutProperties(_ref, _excluded$G);
5029
+ const shouldExpandFlexProps = shouldExpand ? {
5030
+ flexGrow: 1,
5031
+ flexShrink: 1
5032
+ } : {};
5016
5033
  if (direction === 'row') {
5017
- return /*#__PURE__*/jsx(ScrollView$2, _objectSpread({
5034
+ return /*#__PURE__*/jsx(ScrollView, _objectSpread(_objectSpread({
5018
5035
  horizontal: true,
5019
- contentContainerStyle: contentContainerStyle
5020
- }, props));
5036
+ contentContainerStyle: shouldExpand ? shouldExpandFlexProps : contentContainerStyle
5037
+ }, props), shouldExpandFlexProps));
5021
5038
  }
5022
- return /*#__PURE__*/jsx(View$2, _objectSpread({}, props));
5039
+ return /*#__PURE__*/jsx(View, _objectSpread(_objectSpread({}, props), shouldExpandFlexProps));
5023
5040
  }
5024
5041
 
5025
5042
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -5030,6 +5047,7 @@ function Choices({
5030
5047
  type,
5031
5048
  direction = 'column',
5032
5049
  disabled,
5050
+ shouldExpand = false,
5033
5051
  children,
5034
5052
  value,
5035
5053
  onPress,
@@ -5046,6 +5064,7 @@ function Choices({
5046
5064
  const sharedProps = {
5047
5065
  type,
5048
5066
  disabled,
5067
+ shouldExpand,
5049
5068
  onPress: !isForm ? onPress : undefined,
5050
5069
  onChange: isForm ? newValue => {
5051
5070
  setCurrentValue(newValue);
@@ -5057,6 +5076,7 @@ function Choices({
5057
5076
  };
5058
5077
  return /*#__PURE__*/jsx(ChoicesContainer, {
5059
5078
  direction: direction,
5079
+ shouldExpand: shouldExpand,
5060
5080
  testID: testID,
5061
5081
  id: id,
5062
5082
  style: style,
@@ -5067,6 +5087,7 @@ function Choices({
5067
5087
  }, sharedProps));
5068
5088
  return /*#__PURE__*/jsx(ChoiceItemContainer, {
5069
5089
  direction: direction,
5090
+ shouldExpand: shouldExpand,
5070
5091
  isLast: index === childrenArray.length - 1,
5071
5092
  children: element
5072
5093
  }, child.key);